PL_InitArenaPool:
   32|   166k|                 PRUint32 align) {
   33|       |  /*
   34|       |   * Look-up table of PR_BITMASK(PR_CeilingLog2(align)) values for
   35|       |   * align = 1 to 32.
   36|       |   */
   37|   166k|  static const PRUint8 pmasks[33] = {
   38|   166k|      0, /*  not used */
   39|   166k|      0,  1,  3,  3,  7,  7,  7,  7,
   40|   166k|      15, 15, 15, 15, 15, 15, 15, 15, /*  1 ... 16 */
   41|   166k|      31, 31, 31, 31, 31, 31, 31, 31,
   42|   166k|      31, 31, 31, 31, 31, 31, 31, 31 /* 17 ... 32 */
   43|   166k|  };
   44|       |
   45|   166k|  if (align == 0) {
  ------------------
  |  Branch (45:7): [True: 0, False: 166k]
  ------------------
   46|      0|    align = PL_ARENA_DEFAULT_ALIGN;
  ------------------
  |  |   28|      0|#define PL_ARENA_DEFAULT_ALIGN sizeof(double)
  ------------------
   47|      0|  }
   48|       |
   49|   166k|  if (align < sizeof(pmasks) / sizeof(pmasks[0])) {
  ------------------
  |  Branch (49:7): [True: 166k, False: 0]
  ------------------
   50|   166k|    pool->mask = pmasks[align];
   51|   166k|  } else {
   52|      0|    pool->mask = PR_BITMASK(PR_CeilingLog2(align));
  ------------------
  |  |  147|      0|#define PR_BITMASK(n)   (PR_BIT(n) - 1)
  |  |  ------------------
  |  |  |  |  146|      0|#define PR_BIT(n)       ((PRUint32)1 << (n))
  |  |  ------------------
  ------------------
   53|      0|  }
   54|       |
   55|   166k|  pool->first.next = NULL;
   56|       |  /* Set all three addresses in pool->first to the same dummy value.
   57|       |   * These addresses are only compared with each other, but never
   58|       |   * dereferenced. */
   59|   166k|  pool->first.base = pool->first.avail = pool->first.limit =
   60|   166k|      (PRUword)PL_ARENA_ALIGN(pool, &pool->first + 1);
  ------------------
  |  |  146|   166k|#define PL_ARENA_ALIGN(pool, n) (((PRUword)(n) + (pool)->mask) & ~(pool)->mask)
  ------------------
   61|   166k|  pool->current = &pool->first;
   62|       |  /*
   63|       |   * Compute the net size so that each arena's gross size is |size|.
   64|       |   * sizeof(PLArena) + pool->mask is the header and alignment slop
   65|       |   * that PL_ArenaAllocate adds to the net size.
   66|       |   */
   67|   166k|  if (size > sizeof(PLArena) + pool->mask) {
  ------------------
  |  Branch (67:7): [True: 166k, False: 0]
  ------------------
   68|   166k|    pool->arenasize = size - (sizeof(PLArena) + pool->mask);
   69|   166k|  } else {
   70|      0|    pool->arenasize = size;
   71|      0|  }
   72|       |#ifdef PL_ARENAMETER
   73|       |  memset(&pool->stats, 0, sizeof pool->stats);
   74|       |  pool->stats.name = strdup(name);
   75|       |  pool->stats.next = arena_stats_list;
   76|       |  arena_stats_list = &pool->stats;
   77|       |#endif
   78|   166k|}
PL_ArenaAllocate:
   99|   102k|PR_IMPLEMENT(void*) PL_ArenaAllocate(PLArenaPool* pool, PRUint32 nb) {
  100|   102k|  PLArena* a;
  101|   102k|  char* rp; /* returned pointer */
  102|   102k|  PRUint32 nbOld;
  103|       |
  104|   102k|  PR_ASSERT((nb & pool->mask) == 0);
  ------------------
  |  |  208|   102k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 102k, False: 0]
  |  |  ------------------
  ------------------
  105|       |
  106|   102k|  nbOld = nb;
  107|   102k|  nb = (PRUword)PL_ARENA_ALIGN(pool, nb); /* force alignment */
  ------------------
  |  |  146|   102k|#define PL_ARENA_ALIGN(pool, n) (((PRUword)(n) + (pool)->mask) & ~(pool)->mask)
  ------------------
  108|   102k|  if (nb < nbOld) {
  ------------------
  |  Branch (108:7): [True: 0, False: 102k]
  ------------------
  109|      0|    return NULL;
  110|      0|  }
  111|       |
  112|       |  /* attempt to allocate from arenas at pool->current */
  113|   102k|  {
  114|   102k|    a = pool->current;
  115|   102k|    do {
  116|   102k|      if (nb <= a->limit - a->avail) {
  ------------------
  |  Branch (116:11): [True: 0, False: 102k]
  ------------------
  117|      0|        pool->current = a;
  118|      0|        rp = (char*)a->avail;
  119|      0|        a->avail += nb;
  120|      0|        return rp;
  121|      0|      }
  122|   102k|    } while (NULL != (a = a->next));
  ------------------
  |  Branch (122:14): [True: 0, False: 102k]
  ------------------
  123|   102k|  }
  124|       |
  125|       |  /* attempt to allocate from the heap */
  126|   102k|  {
  127|   102k|    PRUint32 sz = PR_MAX(pool->arenasize, nb);
  ------------------
  |  |  159|   102k|#define PR_MAX(x,y)     ((x)>(y)?(x):(y))
  |  |  ------------------
  |  |  |  Branch (159:26): [True: 102k, False: 110]
  |  |  ------------------
  ------------------
  128|   102k|    if (PR_UINT32_MAX - sz < sizeof *a + pool->mask) {
  ------------------
  |  |  302|   102k|#define PR_UINT32_MAX PR_UINT32(4294967295)
  |  |  ------------------
  |  |  |  |  282|   102k|#define PR_UINT32(x) x ## U
  |  |  ------------------
  ------------------
  |  Branch (128:9): [True: 0, False: 102k]
  ------------------
  129|      0|      a = NULL;
  130|   102k|    } else {
  131|   102k|      sz += sizeof *a + pool->mask; /* header and alignment slop */
  132|   102k|      a = (PLArena*)PR_MALLOC(sz);
  ------------------
  |  |   55|   102k|#define PR_MALLOC(_bytes) (PR_Malloc((_bytes)))
  ------------------
  133|   102k|    }
  134|   102k|    if (NULL != a) {
  ------------------
  |  Branch (134:9): [True: 102k, False: 0]
  ------------------
  135|   102k|      a->limit = (PRUword)a + sz;
  136|   102k|      a->base = a->avail = (PRUword)PL_ARENA_ALIGN(pool, a + 1);
  ------------------
  |  |  146|   102k|#define PL_ARENA_ALIGN(pool, n) (((PRUword)(n) + (pool)->mask) & ~(pool)->mask)
  ------------------
  137|   102k|      PL_MAKE_MEM_NOACCESS((void*)a->avail, a->limit - a->avail);
  138|   102k|      rp = (char*)a->avail;
  139|   102k|      a->avail += nb;
  140|   102k|      PR_ASSERT(a->avail <= a->limit);
  ------------------
  |  |  208|   102k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 102k, False: 0]
  |  |  ------------------
  ------------------
  141|       |      /* the newly allocated arena is linked after pool->current
  142|       |       *  and becomes pool->current */
  143|   102k|      a->next = pool->current->next;
  144|   102k|      pool->current->next = a;
  145|   102k|      pool->current = a;
  146|   102k|      if (NULL == pool->first.next) {
  ------------------
  |  Branch (146:11): [True: 0, False: 102k]
  ------------------
  147|      0|        pool->first.next = a;
  148|      0|      }
  149|   102k|      PL_COUNT_ARENA(pool, ++);
  150|   102k|      COUNT(pool, nmallocs);
  151|   102k|      return (rp);
  152|   102k|    }
  153|   102k|  }
  154|       |
  155|       |  /* we got to here, and there's no memory to allocate */
  156|      0|  return (NULL);
  157|   102k|} /* --- end PL_ArenaAllocate() --- */
PL_ClearArenaPool:
  173|  51.0k|PR_IMPLEMENT(void) PL_ClearArenaPool(PLArenaPool* pool, PRInt32 pattern) {
  174|  51.0k|  PLArena* a;
  175|       |
  176|   102k|  for (a = pool->first.next; a; a = a->next) {
  ------------------
  |  Branch (176:30): [True: 51.9k, False: 51.0k]
  ------------------
  177|  51.9k|    PR_ASSERT(a->base <= a->avail && a->avail <= a->limit);
  ------------------
  |  |  208|   103k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:7): [True: 51.9k, False: 0]
  |  |  |  Branch (208:7): [True: 51.9k, False: 0]
  |  |  ------------------
  ------------------
  178|  51.9k|    a->avail = a->base;
  179|  51.9k|    PL_CLEAR_UNUSED_PATTERN(a, pattern);
  ------------------
  |  |  191|  51.9k|    PR_BEGIN_MACRO \
  |  |  ------------------
  |  |  |  |  123|  51.9k|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |  192|  51.9k|        PR_ASSERT((a)->avail <= (a)->limit); \
  |  |  ------------------
  |  |  |  |  208|  51.9k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 51.9k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  193|  51.9k|        PL_MAKE_MEM_UNDEFINED((void*)(a)->avail, (a)->limit - (a)->avail); \
  |  |  194|  51.9k|        memset((void*)(a)->avail, (pattern), (a)->limit - (a)->avail); \
  |  |  195|  51.9k|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|  51.9k|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  180|  51.9k|    PL_MAKE_MEM_NOACCESS((void*)a->avail, a->limit - a->avail);
  181|  51.9k|  }
  182|  51.0k|}
PL_ArenaRelease:
  207|     10|PR_IMPLEMENT(void) PL_ArenaRelease(PLArenaPool* pool, char* mark) {
  208|     10|  PLArena* a;
  209|       |
  210|     20|  for (a = &pool->first; a; a = a->next) {
  ------------------
  |  Branch (210:26): [True: 20, False: 0]
  ------------------
  211|     20|    if (PR_UPTRDIFF(mark, a->base) <= PR_UPTRDIFF(a->avail, a->base)) {
  ------------------
  |  |  188|     20|#define PR_UPTRDIFF(p,q) ((PRUword)(p) - (PRUword)(q))
  ------------------
                  if (PR_UPTRDIFF(mark, a->base) <= PR_UPTRDIFF(a->avail, a->base)) {
  ------------------
  |  |  188|     20|#define PR_UPTRDIFF(p,q) ((PRUword)(p) - (PRUword)(q))
  ------------------
  |  Branch (211:9): [True: 10, False: 10]
  ------------------
  212|     10|      a->avail = (PRUword)PL_ARENA_ALIGN(pool, mark);
  ------------------
  |  |  146|     10|#define PL_ARENA_ALIGN(pool, n) (((PRUword)(n) + (pool)->mask) & ~(pool)->mask)
  ------------------
  213|     10|      FreeArenaList(pool, a);
  214|     10|      return;
  215|     10|    }
  216|     20|  }
  217|     10|}
PL_FreeArenaPool:
  219|   155k|PR_IMPLEMENT(void) PL_FreeArenaPool(PLArenaPool* pool) {
  220|   155k|  FreeArenaList(pool, &pool->first);
  221|   155k|  COUNT(pool, ndeallocs);
  222|   155k|}
PL_FinishArenaPool:
  224|  10.4k|PR_IMPLEMENT(void) PL_FinishArenaPool(PLArenaPool* pool) {
  225|  10.4k|  FreeArenaList(pool, &pool->first);
  226|       |#ifdef PL_ARENAMETER
  227|       |  {
  228|       |    PLArenaStats *stats, **statsp;
  229|       |
  230|       |    if (pool->stats.name) {
  231|       |      PR_DELETE(pool->stats.name);
  232|       |    }
  233|       |    for (statsp = &arena_stats_list; (stats = *statsp) != 0;
  234|       |         statsp = &stats->next) {
  235|       |      if (stats == &pool->stats) {
  236|       |        *statsp = stats->next;
  237|       |        return;
  238|       |      }
  239|       |    }
  240|       |  }
  241|       |#endif
  242|  10.4k|}
plarena.c:FreeArenaList:
  188|   166k|static void FreeArenaList(PLArenaPool* pool, PLArena* head) {
  189|   166k|  PLArena* a = head->next;
  190|   166k|  if (!a) {
  ------------------
  |  Branch (190:7): [True: 66.7k, False: 99.4k]
  ------------------
  191|  66.7k|    return;
  192|  66.7k|  }
  193|       |
  194|  99.4k|  head->next = NULL;
  195|       |
  196|   102k|  do {
  197|   102k|    PLArena* tmp = a;
  198|   102k|    a = a->next;
  199|   102k|    PL_CLEAR_ARENA(tmp);
  ------------------
  |  |  200|   102k|    PR_BEGIN_MACRO \
  |  |  ------------------
  |  |  |  |  123|   102k|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |  201|   102k|        PL_MAKE_MEM_UNDEFINED((void*)(a), (a)->limit - (PRUword)(a)); \
  |  |  202|   102k|        memset((void*)(a), PL_FREE_PATTERN, (a)->limit - (PRUword)(a)); \
  |  |  ------------------
  |  |  |  |  197|   102k|#define PL_FREE_PATTERN 0xDA
  |  |  ------------------
  |  |  203|   102k|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|   102k|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  200|   102k|    PL_COUNT_ARENA(pool, --);
  201|   102k|    PR_DELETE(tmp);
  ------------------
  |  |  110|   102k|#define PR_DELETE(_ptr) { PR_Free(_ptr); (_ptr) = NULL; }
  ------------------
  202|   102k|  } while (a);
  ------------------
  |  Branch (202:12): [True: 3.36k, False: 99.4k]
  ------------------
  203|       |
  204|  99.4k|  pool->current = head;
  205|  99.4k|}

PL_NewHashTable:
   58|     17|                void* allocPriv) {
   59|     17|  PLHashTable* ht;
   60|     17|  PRSize nb;
   61|       |
   62|     17|  if (n <= MINBUCKETS) {
  ------------------
  |  |   22|     17|#define MINBUCKETS (1 << MINBUCKETSLOG2)
  |  |  ------------------
  |  |  |  |   21|     17|#define MINBUCKETSLOG2 4
  |  |  ------------------
  ------------------
  |  Branch (62:7): [True: 10, False: 7]
  ------------------
   63|     10|    n = MINBUCKETSLOG2;
  ------------------
  |  |   21|     10|#define MINBUCKETSLOG2 4
  ------------------
   64|     10|  } else {
   65|      7|    n = PR_CeilingLog2(n);
   66|      7|    if ((PRInt32)n < 0) {
  ------------------
  |  Branch (66:9): [True: 0, False: 7]
  ------------------
   67|      0|      return 0;
   68|      0|    }
   69|      7|  }
   70|       |
   71|     17|  if (!allocOps) {
  ------------------
  |  Branch (71:7): [True: 9, False: 8]
  ------------------
   72|      9|    allocOps = &defaultHashAllocOps;
   73|      9|  }
   74|       |
   75|     17|  ht = (PLHashTable*)((*allocOps->allocTable)(allocPriv, sizeof *ht));
   76|     17|  if (!ht) {
  ------------------
  |  Branch (76:7): [True: 0, False: 17]
  ------------------
   77|      0|    return 0;
   78|      0|  }
   79|     17|  memset(ht, 0, sizeof *ht);
   80|     17|  ht->shift = PL_HASH_BITS - n;
  ------------------
  |  |   19|     17|#define PL_HASH_BITS 32  /* Number of bits in PLHashNumber */
  ------------------
   81|     17|  n = 1 << n;
   82|     17|  nb = n * sizeof(PLHashEntry*);
   83|     17|  ht->buckets = (PLHashEntry**)((*allocOps->allocTable)(allocPriv, nb));
   84|     17|  if (!ht->buckets) {
  ------------------
  |  Branch (84:7): [True: 0, False: 17]
  ------------------
   85|      0|    (*allocOps->freeTable)(allocPriv, ht);
   86|      0|    return 0;
   87|      0|  }
   88|     17|  memset(ht->buckets, 0, nb);
   89|       |
   90|     17|  ht->keyHash = keyHash;
   91|     17|  ht->keyCompare = keyCompare;
   92|     17|  ht->valueCompare = valueCompare;
   93|     17|  ht->allocOps = allocOps;
   94|     17|  ht->allocPriv = allocPriv;
   95|     17|  return ht;
   96|     17|}
PL_HashTableDestroy:
   99|     17|PL_HashTableDestroy(PLHashTable* ht) {
  100|     17|  PRUint32 i, n;
  101|     17|  PLHashEntry *he, *next;
  102|     17|  const PLHashAllocOps* allocOps = ht->allocOps;
  103|     17|  void* allocPriv = ht->allocPriv;
  104|       |
  105|     17|  n = NBUCKETS(ht);
  ------------------
  |  |   18|     17|#define NBUCKETS(ht) (1 << (PL_HASH_BITS - (ht)->shift))
  |  |  ------------------
  |  |  |  |   19|     17|#define PL_HASH_BITS 32  /* Number of bits in PLHashNumber */
  |  |  ------------------
  ------------------
  106|  1.05k|  for (i = 0; i < n; i++) {
  ------------------
  |  Branch (106:15): [True: 1.04k, False: 17]
  ------------------
  107|  1.46k|    for (he = ht->buckets[i]; he; he = next) {
  ------------------
  |  Branch (107:31): [True: 428, False: 1.04k]
  ------------------
  108|    428|      next = he->next;
  109|    428|      (*allocOps->freeEntry)(allocPriv, he, HT_FREE_ENTRY);
  ------------------
  |  |   39|    428|#define HT_FREE_ENTRY   1               /* free value and entire entry */
  ------------------
  110|    428|    }
  111|  1.04k|  }
  112|     17|#ifdef DEBUG
  113|     17|  memset(ht->buckets, 0xDB, n * sizeof ht->buckets[0]);
  114|     17|#endif
  115|     17|  (*allocOps->freeTable)(allocPriv, ht->buckets);
  116|     17|#ifdef DEBUG
  117|     17|  memset(ht, 0xDB, sizeof *ht);
  118|     17|#endif
  119|     17|  (*allocOps->freeTable)(allocPriv, ht);
  120|     17|}
PL_HashTableRawLookup:
  128|   119k|PL_HashTableRawLookup(PLHashTable* ht, PLHashNumber keyHash, const void* key) {
  129|   119k|  PLHashEntry *he, **hep, **hep0;
  130|   119k|  PLHashNumber h;
  131|       |
  132|       |#ifdef HASHMETER
  133|       |  ht->nlookups++;
  134|       |#endif
  135|   119k|  h = keyHash * GOLDEN_RATIO;
  ------------------
  |  |  125|   119k|#define GOLDEN_RATIO 0x9E3779B9U /* 2/(1+sqrt(5))*(2^32) */
  ------------------
  136|   119k|  h >>= ht->shift;
  137|   119k|  hep = hep0 = &ht->buckets[h];
  138|   140k|  while ((he = *hep) != 0) {
  ------------------
  |  Branch (138:10): [True: 82.6k, False: 57.4k]
  ------------------
  139|  82.6k|    if (he->keyHash == keyHash && (*ht->keyCompare)(key, he->key)) {
  ------------------
  |  Branch (139:9): [True: 61.6k, False: 21.0k]
  |  Branch (139:35): [True: 61.5k, False: 2]
  ------------------
  140|       |      /* Move to front of chain if not already there */
  141|  61.5k|      if (hep != hep0) {
  ------------------
  |  Branch (141:11): [True: 4.51k, False: 57.0k]
  ------------------
  142|  4.51k|        *hep = he->next;
  143|  4.51k|        he->next = *hep0;
  144|  4.51k|        *hep0 = he;
  145|  4.51k|      }
  146|  61.5k|      return hep0;
  147|  61.5k|    }
  148|  21.0k|    hep = &he->next;
  149|       |#ifdef HASHMETER
  150|       |    ht->nsteps++;
  151|       |#endif
  152|  21.0k|  }
  153|  57.4k|  return hep;
  154|   119k|}
PL_HashTableRawLookupConst:
  161|  1.30M|                           const void* key) {
  162|  1.30M|  PLHashEntry *he, **hep;
  163|  1.30M|  PLHashNumber h;
  164|       |
  165|       |#ifdef HASHMETER
  166|       |  ht->nlookups++;
  167|       |#endif
  168|  1.30M|  h = keyHash * GOLDEN_RATIO;
  ------------------
  |  |  125|  1.30M|#define GOLDEN_RATIO 0x9E3779B9U /* 2/(1+sqrt(5))*(2^32) */
  ------------------
  169|  1.30M|  h >>= ht->shift;
  170|  1.30M|  hep = &ht->buckets[h];
  171|  1.34M|  while ((he = *hep) != 0) {
  ------------------
  |  Branch (171:10): [True: 1.33M, False: 13.4k]
  ------------------
  172|  1.33M|    if (he->keyHash == keyHash && (*ht->keyCompare)(key, he->key)) {
  ------------------
  |  Branch (172:9): [True: 1.28M, False: 42.8k]
  |  Branch (172:35): [True: 1.28M, False: 92]
  ------------------
  173|  1.28M|      break;
  174|  1.28M|    }
  175|  42.9k|    hep = &he->next;
  176|       |#ifdef HASHMETER
  177|       |    ht->nsteps++;
  178|       |#endif
  179|  42.9k|  }
  180|  1.30M|  return hep;
  181|  1.30M|}
PL_HashTableRawAdd:
  185|  21.0k|                   const void* key, void* value) {
  186|  21.0k|  PRUint32 i, n;
  187|  21.0k|  PLHashEntry *he, *next, **oldbuckets;
  188|  21.0k|  PRSize nb;
  189|       |
  190|       |  /* Grow the table if it is overloaded */
  191|  21.0k|  n = NBUCKETS(ht);
  ------------------
  |  |   18|  21.0k|#define NBUCKETS(ht) (1 << (PL_HASH_BITS - (ht)->shift))
  |  |  ------------------
  |  |  |  |   19|  21.0k|#define PL_HASH_BITS 32  /* Number of bits in PLHashNumber */
  |  |  ------------------
  ------------------
  192|  21.0k|  if (ht->nentries >= OVERLOADED(n)) {
  ------------------
  |  |   25|  21.0k|#define OVERLOADED(n) ((n) - ((n) >> 3))
  ------------------
  |  Branch (192:7): [True: 8, False: 21.0k]
  ------------------
  193|      8|    oldbuckets = ht->buckets;
  194|      8|    nb = 2 * n * sizeof(PLHashEntry*);
  195|      8|    ht->buckets =
  196|      8|        (PLHashEntry**)((*ht->allocOps->allocTable)(ht->allocPriv, nb));
  197|      8|    if (!ht->buckets) {
  ------------------
  |  Branch (197:9): [True: 0, False: 8]
  ------------------
  198|      0|      ht->buckets = oldbuckets;
  199|      0|      return 0;
  200|      0|    }
  201|      8|    memset(ht->buckets, 0, nb);
  202|       |#ifdef HASHMETER
  203|       |    ht->ngrows++;
  204|       |#endif
  205|      8|    ht->shift--;
  206|       |
  207|    616|    for (i = 0; i < n; i++) {
  ------------------
  |  Branch (207:17): [True: 608, False: 8]
  ------------------
  208|  1.14k|      for (he = oldbuckets[i]; he; he = next) {
  ------------------
  |  Branch (208:32): [True: 532, False: 608]
  ------------------
  209|    532|        next = he->next;
  210|    532|        hep = PL_HashTableRawLookup(ht, he->keyHash, he->key);
  211|    532|        PR_ASSERT(*hep == 0);
  ------------------
  |  |  208|    532|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 532, False: 0]
  |  |  ------------------
  ------------------
  212|    532|        he->next = 0;
  213|    532|        *hep = he;
  214|    532|      }
  215|    608|    }
  216|      8|#ifdef DEBUG
  217|      8|    memset(oldbuckets, 0xDB, n * sizeof oldbuckets[0]);
  218|      8|#endif
  219|      8|    (*ht->allocOps->freeTable)(ht->allocPriv, oldbuckets);
  220|      8|    hep = PL_HashTableRawLookup(ht, keyHash, key);
  221|      8|  }
  222|       |
  223|       |  /* Make a new key value entry */
  224|  21.0k|  he = (*ht->allocOps->allocEntry)(ht->allocPriv, key);
  225|  21.0k|  if (!he) {
  ------------------
  |  Branch (225:7): [True: 0, False: 21.0k]
  ------------------
  226|      0|    return 0;
  227|      0|  }
  228|  21.0k|  he->keyHash = keyHash;
  229|  21.0k|  he->key = key;
  230|  21.0k|  he->value = value;
  231|  21.0k|  he->next = *hep;
  232|  21.0k|  *hep = he;
  233|  21.0k|  ht->nentries++;
  234|  21.0k|  return he;
  235|  21.0k|}
PL_HashTableAdd:
  238|  21.0k|PL_HashTableAdd(PLHashTable* ht, const void* key, void* value) {
  239|  21.0k|  PLHashNumber keyHash;
  240|  21.0k|  PLHashEntry *he, **hep;
  241|       |
  242|  21.0k|  keyHash = (*ht->keyHash)(key);
  243|  21.0k|  hep = PL_HashTableRawLookup(ht, keyHash, key);
  244|  21.0k|  if ((he = *hep) != 0) {
  ------------------
  |  Branch (244:7): [True: 71, False: 21.0k]
  ------------------
  245|       |    /* Hit; see if values match */
  246|     71|    if ((*ht->valueCompare)(he->value, value)) {
  ------------------
  |  Branch (246:9): [True: 0, False: 71]
  ------------------
  247|       |      /* key,value pair is already present in table */
  248|      0|      return he;
  249|      0|    }
  250|     71|    if (he->value) {
  ------------------
  |  Branch (250:9): [True: 71, False: 0]
  ------------------
  251|     71|      (*ht->allocOps->freeEntry)(ht->allocPriv, he, HT_FREE_VALUE);
  ------------------
  |  |   38|     71|#define HT_FREE_VALUE   0               /* just free the entry's value */
  ------------------
  252|     71|    }
  253|     71|    he->value = value;
  254|     71|    return he;
  255|     71|  }
  256|  21.0k|  return PL_HashTableRawAdd(ht, hep, keyHash, key, value);
  257|  21.0k|}
PL_HashTableRawRemove:
  260|  20.5k|PL_HashTableRawRemove(PLHashTable* ht, PLHashEntry** hep, PLHashEntry* he) {
  261|  20.5k|  PRUint32 i, n;
  262|  20.5k|  PLHashEntry *next, **oldbuckets;
  263|  20.5k|  PRSize nb;
  264|       |
  265|  20.5k|  *hep = he->next;
  266|  20.5k|  (*ht->allocOps->freeEntry)(ht->allocPriv, he, HT_FREE_ENTRY);
  ------------------
  |  |   39|  20.5k|#define HT_FREE_ENTRY   1               /* free value and entire entry */
  ------------------
  267|       |
  268|       |  /* Shrink table if it's underloaded */
  269|  20.5k|  n = NBUCKETS(ht);
  ------------------
  |  |   18|  20.5k|#define NBUCKETS(ht) (1 << (PL_HASH_BITS - (ht)->shift))
  |  |  ------------------
  |  |  |  |   19|  20.5k|#define PL_HASH_BITS 32  /* Number of bits in PLHashNumber */
  |  |  ------------------
  ------------------
  270|  20.5k|  if (--ht->nentries < UNDERLOADED(n)) {
  ------------------
  |  |   28|  20.5k|#define UNDERLOADED(n) (((n) > MINBUCKETS) ? ((n) >> 2) : 0)
  |  |  ------------------
  |  |  |  |   22|  20.5k|#define MINBUCKETS (1 << MINBUCKETSLOG2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  20.5k|#define MINBUCKETSLOG2 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (28:25): [True: 2, False: 20.5k]
  |  |  ------------------
  ------------------
  |  Branch (270:7): [True: 2, False: 20.5k]
  ------------------
  271|      2|    oldbuckets = ht->buckets;
  272|      2|    nb = n * sizeof(PLHashEntry*) / 2;
  273|      2|    ht->buckets =
  274|      2|        (PLHashEntry**)((*ht->allocOps->allocTable)(ht->allocPriv, nb));
  275|      2|    if (!ht->buckets) {
  ------------------
  |  Branch (275:9): [True: 0, False: 2]
  ------------------
  276|      0|      ht->buckets = oldbuckets;
  277|      0|      return;
  278|      0|    }
  279|      2|    memset(ht->buckets, 0, nb);
  280|       |#ifdef HASHMETER
  281|       |    ht->nshrinks++;
  282|       |#endif
  283|      2|    ht->shift++;
  284|       |
  285|     98|    for (i = 0; i < n; i++) {
  ------------------
  |  Branch (285:17): [True: 96, False: 2]
  ------------------
  286|     97|      for (he = oldbuckets[i]; he; he = next) {
  ------------------
  |  Branch (286:32): [True: 1, False: 96]
  ------------------
  287|      1|        next = he->next;
  288|      1|        hep = PL_HashTableRawLookup(ht, he->keyHash, he->key);
  289|      1|        PR_ASSERT(*hep == 0);
  ------------------
  |  |  208|      1|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  290|      1|        he->next = 0;
  291|      1|        *hep = he;
  292|      1|      }
  293|     96|    }
  294|      2|#ifdef DEBUG
  295|      2|    memset(oldbuckets, 0xDB, n * sizeof oldbuckets[0]);
  296|      2|#endif
  297|      2|    (*ht->allocOps->freeTable)(ht->allocPriv, oldbuckets);
  298|      2|  }
  299|  20.5k|}
PL_HashTableRemove:
  302|  20.5k|PL_HashTableRemove(PLHashTable* ht, const void* key) {
  303|  20.5k|  PLHashNumber keyHash;
  304|  20.5k|  PLHashEntry *he, **hep;
  305|       |
  306|  20.5k|  keyHash = (*ht->keyHash)(key);
  307|  20.5k|  hep = PL_HashTableRawLookup(ht, keyHash, key);
  308|  20.5k|  if ((he = *hep) == 0) {
  ------------------
  |  Branch (308:7): [True: 0, False: 20.5k]
  ------------------
  309|      0|    return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  310|      0|  }
  311|       |
  312|       |  /* Hit; remove element */
  313|  20.5k|  PL_HashTableRawRemove(ht, hep, he);
  314|  20.5k|  return PR_TRUE;
  ------------------
  |  |  437|  20.5k|#define PR_TRUE 1
  ------------------
  315|  20.5k|}
PL_HashTableLookup:
  318|  76.8k|PL_HashTableLookup(PLHashTable* ht, const void* key) {
  319|  76.8k|  PLHashNumber keyHash;
  320|  76.8k|  PLHashEntry *he, **hep;
  321|       |
  322|  76.8k|  keyHash = (*ht->keyHash)(key);
  323|  76.8k|  hep = PL_HashTableRawLookup(ht, keyHash, key);
  324|  76.8k|  if ((he = *hep) != 0) {
  ------------------
  |  Branch (324:7): [True: 40.9k, False: 35.9k]
  ------------------
  325|  40.9k|    return he->value;
  326|  40.9k|  }
  327|  35.9k|  return 0;
  328|  76.8k|}
PL_HashTableLookupConst:
  334|  1.30M|PL_HashTableLookupConst(PLHashTable* ht, const void* key) {
  335|  1.30M|  PLHashNumber keyHash;
  336|  1.30M|  PLHashEntry *he, **hep;
  337|       |
  338|  1.30M|  keyHash = (*ht->keyHash)(key);
  339|  1.30M|  hep = PL_HashTableRawLookupConst(ht, keyHash, key);
  340|  1.30M|  if ((he = *hep) != 0) {
  ------------------
  |  Branch (340:7): [True: 1.28M, False: 13.4k]
  ------------------
  341|  1.28M|    return he->value;
  342|  1.28M|  }
  343|  13.4k|  return 0;
  344|  1.30M|}
PL_HashTableEnumerateEntries:
  352|      4|PL_HashTableEnumerateEntries(PLHashTable* ht, PLHashEnumerator f, void* arg) {
  353|      4|  PLHashEntry *he, **hep;
  354|      4|  PRUint32 i, nbuckets;
  355|      4|  int rv, n = 0;
  356|      4|  PLHashEntry* todo = 0;
  357|       |
  358|      4|  nbuckets = NBUCKETS(ht);
  ------------------
  |  |   18|      4|#define NBUCKETS(ht) (1 << (PL_HASH_BITS - (ht)->shift))
  |  |  ------------------
  |  |  |  |   19|      4|#define PL_HASH_BITS 32  /* Number of bits in PLHashNumber */
  |  |  ------------------
  ------------------
  359|    164|  for (i = 0; i < nbuckets; i++) {
  ------------------
  |  Branch (359:15): [True: 160, False: 4]
  ------------------
  360|    160|    hep = &ht->buckets[i];
  361|    160|    while ((he = *hep) != 0) {
  ------------------
  |  Branch (361:12): [True: 0, False: 160]
  ------------------
  362|      0|      rv = (*f)(he, n, arg);
  363|      0|      n++;
  364|      0|      if (rv & (HT_ENUMERATE_REMOVE | HT_ENUMERATE_UNHASH)) {
  ------------------
  |  |   28|      0|#define HT_ENUMERATE_REMOVE     2       /* remove and free the current entry */
  ------------------
                    if (rv & (HT_ENUMERATE_REMOVE | HT_ENUMERATE_UNHASH)) {
  ------------------
  |  |   29|      0|#define HT_ENUMERATE_UNHASH     4       /* just unhash the current entry */
  ------------------
  |  Branch (364:11): [True: 0, False: 0]
  ------------------
  365|      0|        *hep = he->next;
  366|      0|        if (rv & HT_ENUMERATE_REMOVE) {
  ------------------
  |  |   28|      0|#define HT_ENUMERATE_REMOVE     2       /* remove and free the current entry */
  ------------------
  |  Branch (366:13): [True: 0, False: 0]
  ------------------
  367|      0|          he->next = todo;
  368|      0|          todo = he;
  369|      0|        }
  370|      0|      } else {
  371|      0|        hep = &he->next;
  372|      0|      }
  373|      0|      if (rv & HT_ENUMERATE_STOP) {
  ------------------
  |  |   27|      0|#define HT_ENUMERATE_STOP       1       /* stop enumerating entries */
  ------------------
  |  Branch (373:11): [True: 0, False: 0]
  ------------------
  374|      0|        goto out;
  375|      0|      }
  376|      0|    }
  377|    160|  }
  378|       |
  379|      4|out:
  380|      4|  hep = &todo;
  381|      4|  while ((he = *hep) != 0) {
  ------------------
  |  Branch (381:10): [True: 0, False: 4]
  ------------------
  382|      0|    PL_HashTableRawRemove(ht, hep, he);
  383|      0|  }
  384|      4|  return n;
  385|      4|}
PL_CompareValues:
  468|  1.26M|PL_CompareValues(const void* v1, const void* v2) { return v1 == v2; }
plhash.c:DefaultAllocTable:
   33|     28|static void* PR_CALLBACK DefaultAllocTable(void* pool, PRSize size) {
   34|     28|  return PR_MALLOC(size);
  ------------------
  |  |   55|     28|#define PR_MALLOC(_bytes) (PR_Malloc((_bytes)))
  ------------------
   35|     28|}
plhash.c:DefaultFreeTable:
   37|     28|static void PR_CALLBACK DefaultFreeTable(void* pool, void* item) {
   38|     28|  PR_Free(item);
   39|     28|}
plhash.c:DefaultAllocEntry:
   41|  10.8k|static PLHashEntry* PR_CALLBACK DefaultAllocEntry(void* pool, const void* key) {
   42|  10.8k|  return PR_NEW(PLHashEntry);
  ------------------
  |  |   65|  10.8k|#define PR_NEW(_struct) ((_struct *) PR_MALLOC(sizeof(_struct)))
  |  |  ------------------
  |  |  |  |   55|  10.8k|#define PR_MALLOC(_bytes) (PR_Malloc((_bytes)))
  |  |  ------------------
  ------------------
   43|  10.8k|}
plhash.c:DefaultFreeEntry:
   46|  10.9k|                                         PRUintn flag) {
   47|  10.9k|  if (flag == HT_FREE_ENTRY) {
  ------------------
  |  |   39|  10.9k|#define HT_FREE_ENTRY   1               /* free value and entire entry */
  ------------------
  |  Branch (47:7): [True: 10.8k, False: 71]
  ------------------
   48|  10.8k|    PR_Free(he);
   49|  10.8k|  }
   50|  10.9k|}

PL_strcasecmp:
   41|      3|PL_strcasecmp(const char* a, const char* b) {
   42|      3|  const unsigned char* ua = (const unsigned char*)a;
   43|      3|  const unsigned char* ub = (const unsigned char*)b;
   44|       |
   45|      3|  if ((const char*)0 == a) {
  ------------------
  |  Branch (45:7): [True: 0, False: 3]
  ------------------
   46|      0|    return ((const char*)0 == b) ? 0 : -1;
  ------------------
  |  Branch (46:12): [True: 0, False: 0]
  ------------------
   47|      0|  }
   48|      3|  if ((const char*)0 == b) {
  ------------------
  |  Branch (48:7): [True: 0, False: 3]
  ------------------
   49|      0|    return 1;
   50|      0|  }
   51|       |
   52|      3|  while ((uc[*ua] == uc[*ub]) && ('\0' != *a)) {
  ------------------
  |  Branch (52:10): [True: 0, False: 3]
  |  Branch (52:34): [True: 0, False: 0]
  ------------------
   53|      0|    a++;
   54|      0|    ua++;
   55|      0|    ub++;
   56|      0|  }
   57|       |
   58|      3|  return (PRIntn)(uc[*ua] - uc[*ub]);
   59|      3|}
PL_strncasecmp:
   62|    798|PL_strncasecmp(const char* a, const char* b, PRUint32 max) {
   63|    798|  const unsigned char* ua = (const unsigned char*)a;
   64|    798|  const unsigned char* ub = (const unsigned char*)b;
   65|       |
   66|    798|  if ((const char*)0 == a) {
  ------------------
  |  Branch (66:7): [True: 0, False: 798]
  ------------------
   67|      0|    return ((const char*)0 == b) ? 0 : -1;
  ------------------
  |  Branch (67:12): [True: 0, False: 0]
  ------------------
   68|      0|  }
   69|    798|  if ((const char*)0 == b) {
  ------------------
  |  Branch (69:7): [True: 0, False: 798]
  ------------------
   70|      0|    return 1;
   71|      0|  }
   72|       |
   73|  1.65k|  while (max && (uc[*ua] == uc[*ub]) && ('\0' != *a)) {
  ------------------
  |  Branch (73:10): [True: 1.55k, False: 99]
  |  Branch (73:17): [True: 855, False: 699]
  |  Branch (73:41): [True: 855, False: 0]
  ------------------
   74|    855|    a++;
   75|    855|    ua++;
   76|    855|    ub++;
   77|    855|    max--;
   78|    855|  }
   79|       |
   80|    798|  if (0 == max) {
  ------------------
  |  Branch (80:7): [True: 99, False: 699]
  ------------------
   81|     99|    return (PRIntn)0;
   82|     99|  }
   83|       |
   84|    699|  return (PRIntn)(uc[*ua] - uc[*ub]);
   85|    798|}

PL_strlen:
   12|      4|PL_strlen(const char* str) {
   13|      4|  size_t l;
   14|       |
   15|      4|  if ((const char*)0 == str) {
  ------------------
  |  Branch (15:7): [True: 0, False: 4]
  ------------------
   16|      0|    return 0;
   17|      0|  }
   18|       |
   19|      4|  l = strlen(str);
   20|       |
   21|       |  /* error checking in case we have a 64-bit platform -- make sure
   22|       |   * we don't have ultra long strings that overflow an int32
   23|       |   */
   24|      4|  if (sizeof(PRUint32) < sizeof(size_t)) {
  ------------------
  |  Branch (24:7): [Folded - Ignored]
  ------------------
   25|      4|    if (l > PR_INT32_MAX) {
  ------------------
  |  |  300|      4|#define PR_INT32_MAX PR_INT32(2147483647)
  |  |  ------------------
  |  |  |  |  281|      4|#define PR_INT32(x)  x
  |  |  ------------------
  ------------------
  |  Branch (25:9): [True: 0, False: 4]
  ------------------
   26|      0|      PR_Assert("l <= PR_INT32_MAX", __FILE__, __LINE__);
   27|      0|    }
   28|      4|  }
   29|       |
   30|      4|  return (PRUint32)l;
   31|      4|}

_PR_Getfd:
   43|      3|PRFileDesc* _PR_Getfd(void) {
   44|      3|  PRFileDesc* fd;
   45|       |  /*
   46|       |  ** $$$
   47|       |  ** This may look a little wasteful. We'll see. Right now I want to
   48|       |  ** be able to toggle between caching and not at runtime to measure
   49|       |  ** the differences. If it isn't too annoying, I'll leave it in.
   50|       |  ** $$$$
   51|       |  **
   52|       |  ** The test is against _pr_fd_cache.limit_high. If that's zero,
   53|       |  ** we're not doing the extended cache but going for performance.
   54|       |  */
   55|      3|  if (0 == _pr_fd_cache.limit_high) {
  ------------------
  |  Branch (55:7): [True: 0, False: 3]
  ------------------
   56|      0|    goto allocate;
   57|      3|  } else {
   58|      3|    do {
   59|      3|      if (NULL == _pr_fd_cache.head) {
  ------------------
  |  Branch (59:11): [True: 3, False: 0]
  ------------------
   60|      3|        goto allocate; /* nothing there */
   61|      3|      }
   62|      0|      if (_pr_fd_cache.count < _pr_fd_cache.limit_low) {
  ------------------
  |  Branch (62:11): [True: 0, False: 0]
  ------------------
   63|      0|        goto allocate;
   64|      0|      }
   65|       |
   66|       |      /* we "should" be able to extract an fd from the cache */
   67|      0|      PR_Lock(_pr_fd_cache.ml); /* need the lock to do this safely */
   68|      0|      fd = _pr_fd_cache.head;   /* protected extraction */
   69|      0|      if (NULL == fd)           /* unexpected, but not fatal */
  ------------------
  |  Branch (69:11): [True: 0, False: 0]
  ------------------
   70|      0|      {
   71|      0|        PR_ASSERT(0 == _pr_fd_cache.count);
  ------------------
  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   72|      0|        PR_ASSERT(NULL == _pr_fd_cache.tail);
  ------------------
  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   73|      0|      } else {
   74|      0|        _pr_fd_cache.count -= 1;
   75|      0|        _pr_fd_cache.head = fd->higher;
   76|      0|        if (NULL == _pr_fd_cache.head) {
  ------------------
  |  Branch (76:13): [True: 0, False: 0]
  ------------------
   77|      0|          PR_ASSERT(0 == _pr_fd_cache.count);
  ------------------
  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   78|      0|          _pr_fd_cache.tail = NULL;
   79|      0|        }
   80|      0|        PR_ASSERT(&_pr_faulty_methods == fd->methods);
  ------------------
  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   81|      0|        PR_ASSERT(PR_INVALID_IO_LAYER == fd->identity);
  ------------------
  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   82|      0|        PR_ASSERT(_PR_FILEDESC_FREED == fd->secret->state);
  ------------------
  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   83|      0|      }
   84|      0|      PR_Unlock(_pr_fd_cache.ml);
   85|       |
   86|      0|    } while (NULL == fd); /* then go around and allocate a new one */
  ------------------
  |  Branch (86:14): [True: 0, False: 0]
  ------------------
   87|      3|  }
   88|       |
   89|      3|finished:
   90|      3|  fd->dtor = NULL;
   91|      3|  fd->lower = fd->higher = NULL;
   92|      3|  fd->identity = PR_NSPR_IO_LAYER;
  ------------------
  |  |  454|      3|#define PR_NSPR_IO_LAYER (PRDescIdentity)0
  ------------------
   93|      3|  memset(fd->secret, 0, sizeof(PRFilePrivate));
   94|      3|  return fd;
   95|       |
   96|      3|allocate:
   97|      3|  fd = PR_NEW(PRFileDesc);
  ------------------
  |  |   65|      3|#define PR_NEW(_struct) ((_struct *) PR_MALLOC(sizeof(_struct)))
  |  |  ------------------
  |  |  |  |   55|      3|#define PR_MALLOC(_bytes) (PR_Malloc((_bytes)))
  |  |  ------------------
  ------------------
   98|      3|  if (NULL != fd) {
  ------------------
  |  Branch (98:7): [True: 3, False: 0]
  ------------------
   99|      3|    fd->secret = PR_NEW(PRFilePrivate);
  ------------------
  |  |   65|      3|#define PR_NEW(_struct) ((_struct *) PR_MALLOC(sizeof(_struct)))
  |  |  ------------------
  |  |  |  |   55|      3|#define PR_MALLOC(_bytes) (PR_Malloc((_bytes)))
  |  |  ------------------
  ------------------
  100|      3|    if (NULL == fd->secret) {
  ------------------
  |  Branch (100:9): [True: 0, False: 3]
  ------------------
  101|      0|      PR_DELETE(fd);
  ------------------
  |  |  110|      0|#define PR_DELETE(_ptr) { PR_Free(_ptr); (_ptr) = NULL; }
  ------------------
  102|      0|    }
  103|      3|  }
  104|      3|  if (NULL != fd) {
  ------------------
  |  Branch (104:7): [True: 3, False: 0]
  ------------------
  105|      3|    goto finished;
  106|      3|  } else {
  107|      0|    return NULL;
  108|      0|  }
  109|       |
  110|      3|} /* _PR_Getfd */
_PR_InitFdCache:
  166|      1|void _PR_InitFdCache(void) {
  167|       |  /*
  168|       |  ** The fd caching is enabled by default for DEBUG builds,
  169|       |  ** disabled by default for OPT builds. That default can
  170|       |  ** be overridden at runtime using environment variables
  171|       |  ** or a super-wiz-bang API.
  172|       |  */
  173|      1|  const char* low = PR_GetEnv("NSPR_FD_CACHE_SIZE_LOW");
  174|      1|  const char* high = PR_GetEnv("NSPR_FD_CACHE_SIZE_HIGH");
  175|       |
  176|       |  /*
  177|       |  ** _low is allowed to be zero, _high is not.
  178|       |  ** If _high is zero, we're not doing the caching.
  179|       |  */
  180|       |
  181|      1|  _pr_fd_cache.limit_low = 0;
  182|      1|#if defined(DEBUG)
  183|      1|  _pr_fd_cache.limit_high = FD_SETSIZE;
  184|       |#else
  185|       |  _pr_fd_cache.limit_high = 0;
  186|       |#endif /* defined(DEBUG) */
  187|       |
  188|      1|  if (NULL != low) {
  ------------------
  |  Branch (188:7): [True: 0, False: 1]
  ------------------
  189|      0|    _pr_fd_cache.limit_low = atoi(low);
  190|      0|  }
  191|      1|  if (NULL != high) {
  ------------------
  |  Branch (191:7): [True: 0, False: 1]
  ------------------
  192|      0|    _pr_fd_cache.limit_high = atoi(high);
  193|      0|  }
  194|       |
  195|      1|  if (_pr_fd_cache.limit_low < 0) {
  ------------------
  |  Branch (195:7): [True: 0, False: 1]
  ------------------
  196|      0|    _pr_fd_cache.limit_low = 0;
  197|      0|  }
  198|      1|  if (_pr_fd_cache.limit_low > FD_SETSIZE) {
  ------------------
  |  Branch (198:7): [True: 0, False: 1]
  ------------------
  199|      0|    _pr_fd_cache.limit_low = FD_SETSIZE;
  200|      0|  }
  201|       |
  202|      1|  if (_pr_fd_cache.limit_high > FD_SETSIZE) {
  ------------------
  |  Branch (202:7): [True: 0, False: 1]
  ------------------
  203|      0|    _pr_fd_cache.limit_high = FD_SETSIZE;
  204|      0|  }
  205|       |
  206|      1|  if (_pr_fd_cache.limit_high < _pr_fd_cache.limit_low) {
  ------------------
  |  Branch (206:7): [True: 0, False: 1]
  ------------------
  207|      0|    _pr_fd_cache.limit_high = _pr_fd_cache.limit_low;
  208|      0|  }
  209|       |
  210|      1|  _pr_fd_cache.ml = PR_NewLock();
  211|      1|  PR_ASSERT(NULL != _pr_fd_cache.ml);
  ------------------
  |  |  208|      1|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  212|       |
  213|      1|} /* _PR_InitFdCache */

PR_Close:
   94|  9.36k|PR_IMPLEMENT(PRStatus) PR_Close(PRFileDesc* fd) {
   95|  9.36k|  return (fd->methods->close)(fd);
   96|  9.36k|}
PR_Read:
   98|    518|PR_IMPLEMENT(PRInt32) PR_Read(PRFileDesc* fd, void* buf, PRInt32 amount) {
   99|    518|  return ((fd->methods->read)(fd, buf, amount));
  100|    518|}
PR_GetSocketOption:
  219|  13.3k|PR_GetSocketOption(PRFileDesc* fd, PRSocketOptionData* data) {
  220|  13.3k|  return ((fd->methods->getsocketoption)(fd, data));
  221|  13.3k|}

pl_FDDestructor:
   21|  18.7k|void PR_CALLBACK pl_FDDestructor(PRFileDesc* fd) {
   22|  18.7k|  PR_ASSERT(fd != NULL);
  ------------------
  |  |  208|  18.7k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 18.7k, False: 0]
  |  |  ------------------
  ------------------
   23|  18.7k|  if (NULL != fd->lower) {
  ------------------
  |  Branch (23:7): [True: 0, False: 18.7k]
  ------------------
   24|      0|    fd->lower->higher = fd->higher;
   25|      0|  }
   26|  18.7k|  if (NULL != fd->higher) {
  ------------------
  |  Branch (26:7): [True: 0, False: 18.7k]
  ------------------
   27|      0|    fd->higher->lower = fd->lower;
   28|      0|  }
   29|  18.7k|  PR_DELETE(fd);
  ------------------
  |  |  110|  18.7k|#define PR_DELETE(_ptr) { PR_Free(_ptr); (_ptr) = NULL; }
  ------------------
   30|  18.7k|}
PR_GetDefaultIOMethods:
  403|      1|PR_IMPLEMENT(const PRIOMethods*) PR_GetDefaultIOMethods(void) {
  404|      1|  return &pl_methods;
  405|      1|} /* PR_GetDefaultIOMethods */
PR_CreateIOLayerStub:
  408|  18.7k|PR_CreateIOLayerStub(PRDescIdentity ident, const PRIOMethods* methods) {
  409|  18.7k|  PRFileDesc* fd = NULL;
  410|  18.7k|  PR_ASSERT((PR_NSPR_IO_LAYER != ident) && (PR_TOP_IO_LAYER != ident));
  ------------------
  |  |  208|  37.4k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:7): [True: 18.7k, False: 0]
  |  |  |  Branch (208:7): [True: 18.7k, False: 0]
  |  |  ------------------
  ------------------
  411|  18.7k|  if ((PR_NSPR_IO_LAYER == ident) || (PR_TOP_IO_LAYER == ident)) {
  ------------------
  |  |  454|  18.7k|#define PR_NSPR_IO_LAYER (PRDescIdentity)0
  ------------------
                if ((PR_NSPR_IO_LAYER == ident) || (PR_TOP_IO_LAYER == ident)) {
  ------------------
  |  |  453|  18.7k|#define PR_TOP_IO_LAYER (PRDescIdentity)-2
  ------------------
  |  Branch (411:7): [True: 0, False: 18.7k]
  |  Branch (411:38): [True: 0, False: 18.7k]
  ------------------
  412|      0|    PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0);
  ------------------
  |  |   55|      0|#define PR_INVALID_ARGUMENT_ERROR                (-5987L)
  ------------------
  413|  18.7k|  } else {
  414|  18.7k|    fd = PR_NEWZAP(PRFileDesc);
  ------------------
  |  |   99|  18.7k|#define PR_NEWZAP(_struct) ((_struct*)PR_Calloc(1, sizeof(_struct)))
  ------------------
  415|  18.7k|    if (NULL == fd) {
  ------------------
  |  Branch (415:9): [True: 0, False: 18.7k]
  ------------------
  416|      0|      PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0);
  ------------------
  |  |   16|      0|#define PR_OUT_OF_MEMORY_ERROR                   (-6000L)
  ------------------
  417|  18.7k|    } else {
  418|  18.7k|      fd->methods = methods;
  419|  18.7k|      fd->dtor = pl_FDDestructor;
  420|  18.7k|      fd->identity = ident;
  421|  18.7k|    }
  422|  18.7k|  }
  423|  18.7k|  return fd;
  424|  18.7k|} /* PR_CreateIOLayerStub */
PR_PushIOLayer:
  467|  9.36k|PR_PushIOLayer(PRFileDesc* stack, PRDescIdentity id, PRFileDesc* fd) {
  468|  9.36k|  PRFileDesc* insert = PR_GetIdentitiesLayer(stack, id);
  469|       |
  470|  9.36k|  PR_ASSERT(fd != NULL);
  ------------------
  |  |  208|  9.36k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 9.36k, False: 0]
  |  |  ------------------
  ------------------
  471|  9.36k|  PR_ASSERT(stack != NULL);
  ------------------
  |  |  208|  9.36k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 9.36k, False: 0]
  |  |  ------------------
  ------------------
  472|  9.36k|  PR_ASSERT(insert != NULL);
  ------------------
  |  |  208|  9.36k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 9.36k, False: 0]
  |  |  ------------------
  ------------------
  473|  9.36k|  PR_ASSERT(PR_IO_LAYER_HEAD != id);
  ------------------
  |  |  208|  9.36k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 9.36k, False: 0]
  |  |  ------------------
  ------------------
  474|  9.36k|  if ((NULL == stack) || (NULL == fd) || (NULL == insert)) {
  ------------------
  |  Branch (474:7): [True: 0, False: 9.36k]
  |  Branch (474:26): [True: 0, False: 9.36k]
  |  Branch (474:42): [True: 0, False: 9.36k]
  ------------------
  475|      0|    PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0);
  ------------------
  |  |   55|      0|#define PR_INVALID_ARGUMENT_ERROR                (-5987L)
  ------------------
  476|      0|    return PR_FAILURE;
  477|      0|  }
  478|       |
  479|  9.36k|  if (stack == insert) {
  ------------------
  |  Branch (479:7): [True: 9.36k, False: 0]
  ------------------
  480|       |    /* going on top of the stack */
  481|       |    /* old-style stack */
  482|  9.36k|    PRFileDesc copy = *stack;
  483|  9.36k|    *stack = *fd;
  484|  9.36k|    *fd = copy;
  485|  9.36k|    fd->higher = stack;
  486|  9.36k|    if (fd->lower) {
  ------------------
  |  Branch (486:9): [True: 0, False: 9.36k]
  ------------------
  487|      0|      PR_ASSERT(fd->lower->higher == stack);
  ------------------
  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  488|      0|      fd->lower->higher = fd;
  489|      0|    }
  490|  9.36k|    stack->lower = fd;
  491|  9.36k|    stack->higher = NULL;
  492|  9.36k|  } else {
  493|       |    /*
  494|       |     * going somewhere in the middle of the stack for both old and new
  495|       |     * style stacks, or going on top of stack for new style stack
  496|       |     */
  497|      0|    fd->lower = insert;
  498|      0|    fd->higher = insert->higher;
  499|       |
  500|      0|    insert->higher->lower = fd;
  501|      0|    insert->higher = fd;
  502|      0|  }
  503|       |
  504|  9.36k|  return PR_SUCCESS;
  505|  9.36k|}
PR_PopIOLayer:
  507|  9.36k|PR_IMPLEMENT(PRFileDesc*) PR_PopIOLayer(PRFileDesc* stack, PRDescIdentity id) {
  508|  9.36k|  PRFileDesc* extract = PR_GetIdentitiesLayer(stack, id);
  509|       |
  510|  9.36k|  PR_ASSERT(0 != id);
  ------------------
  |  |  208|  9.36k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 9.36k, False: 0]
  |  |  ------------------
  ------------------
  511|  9.36k|  PR_ASSERT(NULL != stack);
  ------------------
  |  |  208|  9.36k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 9.36k, False: 0]
  |  |  ------------------
  ------------------
  512|  9.36k|  PR_ASSERT(NULL != extract);
  ------------------
  |  |  208|  9.36k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 9.36k, False: 0]
  |  |  ------------------
  ------------------
  513|  9.36k|  if ((NULL == stack) || (0 == id) || (NULL == extract)) {
  ------------------
  |  Branch (513:7): [True: 0, False: 9.36k]
  |  Branch (513:26): [True: 0, False: 9.36k]
  |  Branch (513:39): [True: 0, False: 9.36k]
  ------------------
  514|      0|    PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0);
  ------------------
  |  |   55|      0|#define PR_INVALID_ARGUMENT_ERROR                (-5987L)
  ------------------
  515|      0|    return NULL;
  516|      0|  }
  517|       |
  518|  9.36k|  if (extract == stack) {
  ------------------
  |  Branch (518:7): [True: 9.36k, False: 0]
  ------------------
  519|       |    /* popping top layer of the stack */
  520|       |    /* old style stack */
  521|  9.36k|    PRFileDesc copy = *stack;
  522|  9.36k|    extract = stack->lower;
  523|  9.36k|    *stack = *extract;
  524|  9.36k|    *extract = copy;
  525|  9.36k|    stack->higher = NULL;
  526|  9.36k|    if (stack->lower) {
  ------------------
  |  Branch (526:9): [True: 0, False: 9.36k]
  ------------------
  527|      0|      PR_ASSERT(stack->lower->higher == extract);
  ------------------
  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  528|      0|      stack->lower->higher = stack;
  529|      0|    }
  530|  9.36k|  } else if ((PR_IO_LAYER_HEAD == stack->identity) &&
  ------------------
  |  |  451|      0|#define PR_IO_LAYER_HEAD (PRDescIdentity)-3
  ------------------
  |  Branch (530:14): [True: 0, False: 0]
  ------------------
  531|      0|             (extract == stack->lower) && (extract->lower == NULL)) {
  ------------------
  |  Branch (531:14): [True: 0, False: 0]
  |  Branch (531:43): [True: 0, False: 0]
  ------------------
  532|       |    /*
  533|       |     * new style stack
  534|       |     * popping the only layer in the stack; delete the stack too
  535|       |     */
  536|      0|    stack->lower = NULL;
  537|      0|    _PR_DestroyIOLayer(stack);
  538|      0|  } else {
  539|       |    /* for both kinds of stacks */
  540|      0|    extract->lower->higher = extract->higher;
  541|      0|    extract->higher->lower = extract->lower;
  542|      0|  }
  543|  9.36k|  extract->higher = extract->lower = NULL;
  544|  9.36k|  return extract;
  545|  9.36k|} /* PR_PopIOLayer */
PR_GetUniqueIdentity:
  557|      2|PR_IMPLEMENT(PRDescIdentity) PR_GetUniqueIdentity(const char* layer_name) {
  558|      2|  PRDescIdentity identity, length;
  559|      2|  char **names = NULL, *name = NULL, **old = NULL;
  560|       |
  561|      2|  if (!_pr_initialized) {
  ------------------
  |  Branch (561:7): [True: 0, False: 2]
  ------------------
  562|      0|    _PR_ImplicitInitialization();
  563|      0|  }
  564|       |
  565|      2|  PR_ASSERT((PRDescIdentity)((1UL << ((sizeof(PRDescIdentity) * 8) - 1)) - 1)
  ------------------
  |  |  208|      2|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  566|      2|            > identity_cache.ident);
  567|       |
  568|      2|  if (NULL != layer_name) {
  ------------------
  |  Branch (568:7): [True: 2, False: 0]
  ------------------
  569|      2|    name = (char*)PR_Malloc(strlen(layer_name) + 1);
  570|      2|    if (NULL == name) {
  ------------------
  |  Branch (570:9): [True: 0, False: 2]
  ------------------
  571|      0|      PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0);
  ------------------
  |  |   16|      0|#define PR_OUT_OF_MEMORY_ERROR                   (-6000L)
  ------------------
  572|      0|      return PR_INVALID_IO_LAYER;
  ------------------
  |  |  452|      0|#define PR_INVALID_IO_LAYER (PRDescIdentity)-1
  ------------------
  573|      0|    }
  574|      2|    strcpy(name, layer_name);
  575|      2|  }
  576|       |
  577|       |  /* this initial code runs unsafe */
  578|      2|retry:
  579|      2|  PR_ASSERT(NULL == names);
  ------------------
  |  |  208|      2|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  580|       |  /*
  581|       |   * In the initial round, both identity_cache.ident and
  582|       |   * identity_cache.length are 0, so (identity_cache.ident + 1) is greater
  583|       |   * than length.  In later rounds, identity_cache.ident is always less
  584|       |   * than length, so (identity_cache.ident + 1) can be equal to but cannot
  585|       |   * be greater than length.
  586|       |   */
  587|      2|  length = identity_cache.length;
  588|      2|  if ((identity_cache.ident + 1) >= length) {
  ------------------
  |  Branch (588:7): [True: 1, False: 1]
  ------------------
  589|      1|    length += ID_CACHE_INCREMENT;
  ------------------
  |  |  547|      1|#define ID_CACHE_INCREMENT 16
  ------------------
  590|      1|    names = (char**)PR_CALLOC(length * sizeof(char*));
  ------------------
  |  |   88|      1|#define PR_CALLOC(_size) (PR_Calloc(1, (_size)))
  ------------------
  591|      1|    if (NULL == names) {
  ------------------
  |  Branch (591:9): [True: 0, False: 1]
  ------------------
  592|      0|      if (NULL != name) {
  ------------------
  |  Branch (592:11): [True: 0, False: 0]
  ------------------
  593|      0|        PR_DELETE(name);
  ------------------
  |  |  110|      0|#define PR_DELETE(_ptr) { PR_Free(_ptr); (_ptr) = NULL; }
  ------------------
  594|      0|      }
  595|      0|      PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0);
  ------------------
  |  |   16|      0|#define PR_OUT_OF_MEMORY_ERROR                   (-6000L)
  ------------------
  596|      0|      return PR_INVALID_IO_LAYER;
  ------------------
  |  |  452|      0|#define PR_INVALID_IO_LAYER (PRDescIdentity)-1
  ------------------
  597|      0|    }
  598|      1|  }
  599|       |
  600|       |  /* now we get serious about thread safety */
  601|      2|  PR_Lock(identity_cache.ml);
  602|      2|  PR_ASSERT(identity_cache.length == 0 ||
  ------------------
  |  |  208|      3|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:7): [True: 1, False: 1]
  |  |  |  Branch (208:7): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  603|      2|            identity_cache.ident < identity_cache.length);
  604|      2|  identity = identity_cache.ident + 1;
  605|      2|  if (identity >= identity_cache.length) /* there's no room */
  ------------------
  |  Branch (605:7): [True: 1, False: 1]
  ------------------
  606|      1|  {
  607|       |    /* we have to do something - hopefully it's already done */
  608|      1|    if ((NULL != names) && (identity < length)) {
  ------------------
  |  Branch (608:9): [True: 1, False: 0]
  |  Branch (608:28): [True: 1, False: 0]
  ------------------
  609|       |      /* what we did is still okay */
  610|      1|      if (identity_cache.length != 0) {
  ------------------
  |  Branch (610:11): [True: 0, False: 1]
  ------------------
  611|      0|        memcpy(names, identity_cache.name,
  612|      0|               identity_cache.length * sizeof(char*));
  613|      0|      }
  614|      1|      old = identity_cache.name;
  615|      1|      identity_cache.name = names;
  616|      1|      identity_cache.length = length;
  617|      1|      names = NULL;
  618|      1|    } else {
  619|      0|      PR_Unlock(identity_cache.ml);
  620|      0|      if (NULL != names) {
  ------------------
  |  Branch (620:11): [True: 0, False: 0]
  ------------------
  621|      0|        PR_DELETE(names);
  ------------------
  |  |  110|      0|#define PR_DELETE(_ptr) { PR_Free(_ptr); (_ptr) = NULL; }
  ------------------
  622|      0|      }
  623|      0|      goto retry;
  624|      0|    }
  625|      1|  }
  626|      2|  if (NULL != name) /* there's a name to be stored */
  ------------------
  |  Branch (626:7): [True: 2, False: 0]
  ------------------
  627|      2|  {
  628|      2|    identity_cache.name[identity] = name;
  629|      2|  }
  630|      2|  identity_cache.ident = identity;
  631|      2|  PR_ASSERT(identity_cache.ident < identity_cache.length);
  ------------------
  |  |  208|      2|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  632|      2|  PR_Unlock(identity_cache.ml);
  633|       |
  634|      2|  if (NULL != old) {
  ------------------
  |  Branch (634:7): [True: 0, False: 2]
  ------------------
  635|      0|    PR_DELETE(old);
  ------------------
  |  |  110|      0|#define PR_DELETE(_ptr) { PR_Free(_ptr); (_ptr) = NULL; }
  ------------------
  636|      0|  }
  637|      2|  if (NULL != names) {
  ------------------
  |  Branch (637:7): [True: 0, False: 2]
  ------------------
  638|      0|    PR_DELETE(names);
  ------------------
  |  |  110|      0|#define PR_DELETE(_ptr) { PR_Free(_ptr); (_ptr) = NULL; }
  ------------------
  639|      0|  }
  640|       |
  641|      2|  return identity;
  642|      2|} /* PR_GetUniqueIdentity */
PR_GetIdentitiesLayer:
  670|   962k|PR_GetIdentitiesLayer(PRFileDesc* fd, PRDescIdentity id) {
  671|   962k|  PRFileDesc* layer = fd;
  672|       |
  673|   962k|  if (PR_TOP_IO_LAYER == id) {
  ------------------
  |  |  453|   962k|#define PR_TOP_IO_LAYER (PRDescIdentity)-2
  ------------------
  |  Branch (673:7): [True: 18.7k, False: 943k]
  ------------------
  674|  18.7k|    if (PR_IO_LAYER_HEAD == fd->identity) {
  ------------------
  |  |  451|  18.7k|#define PR_IO_LAYER_HEAD (PRDescIdentity)-3
  ------------------
  |  Branch (674:9): [True: 0, False: 18.7k]
  ------------------
  675|      0|      return fd->lower;
  676|      0|    }
  677|  18.7k|    return fd;
  678|  18.7k|  }
  679|       |
  680|   943k|  for (layer = fd; layer != NULL; layer = layer->lower) {
  ------------------
  |  Branch (680:20): [True: 943k, False: 0]
  ------------------
  681|   943k|    if (id == layer->identity) {
  ------------------
  |  Branch (681:9): [True: 943k, False: 0]
  ------------------
  682|   943k|      return layer;
  683|   943k|    }
  684|   943k|  }
  685|      0|  for (layer = fd; layer != NULL; layer = layer->higher) {
  ------------------
  |  Branch (685:20): [True: 0, False: 0]
  ------------------
  686|      0|    if (id == layer->identity) {
  ------------------
  |  Branch (686:9): [True: 0, False: 0]
  ------------------
  687|      0|      return layer;
  688|      0|    }
  689|      0|  }
  690|      0|  return NULL;
  691|      0|} /* PR_GetIdentitiesLayer */
_PR_InitLayerCache:
  693|      1|void _PR_InitLayerCache(void) {
  694|      1|  memset(&identity_cache, 0, sizeof(identity_cache));
  695|      1|  identity_cache.ml = PR_NewLock();
  696|      1|  PR_ASSERT(NULL != identity_cache.ml);
  ------------------
  |  |  208|      1|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  697|      1|} /* _PR_InitLayerCache */
prlayer.c:pl_DefGetsocketoption:
  341|  13.3k|                                                  PRSocketOptionData* data) {
  342|  13.3k|  PR_ASSERT(fd != NULL);
  ------------------
  |  |  208|  13.3k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 13.3k, False: 0]
  |  |  ------------------
  ------------------
  343|  13.3k|  PR_ASSERT(fd->lower != NULL);
  ------------------
  |  |  208|  13.3k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 13.3k, False: 0]
  |  |  ------------------
  ------------------
  344|       |
  345|  13.3k|  return (fd->lower->methods->getsocketoption)(fd->lower, data);
  346|  13.3k|}

_PR_InitLog:
  186|      1|void _PR_InitLog(void) {
  187|      1|  char* ev;
  188|       |
  189|      1|  _pr_logLock = PR_NewLock();
  190|       |
  191|      1|  ev = PR_GetEnv("NSPR_LOG_MODULES");
  192|      1|  if (ev && ev[0]) {
  ------------------
  |  Branch (192:7): [True: 0, False: 1]
  |  Branch (192:13): [True: 0, False: 0]
  ------------------
  193|      0|    char module[64]; /* Security-Critical: If you change this
  194|       |                      * size, you must also change the sscanf
  195|       |                      * format string to be size-1.
  196|       |                      */
  197|      0|    PRBool isSync = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  198|      0|    PRIntn evlen = strlen(ev), pos = 0;
  199|      0|    PRInt32 bufSize = DEFAULT_BUF_SIZE;
  ------------------
  |  |  139|      0|#define DEFAULT_BUF_SIZE 16384
  ------------------
  200|      0|    while (pos < evlen) {
  ------------------
  |  Branch (200:12): [True: 0, False: 0]
  ------------------
  201|      0|      PRIntn level = 1, count = 0, delta = 0;
  202|      0|      count = sscanf(
  203|      0|          &ev[pos],
  204|      0|          "%63[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-"
  205|      0|          "]%n:%d%n",
  206|      0|          module, &delta, &level, &delta);
  207|      0|      pos += delta;
  208|      0|      if (count == 0) {
  ------------------
  |  Branch (208:11): [True: 0, False: 0]
  ------------------
  209|      0|        break;
  210|      0|      }
  211|       |
  212|       |      /*
  213|       |      ** If count == 2, then we got module and level. If count
  214|       |      ** == 1, then level defaults to 1 (module enabled).
  215|       |      */
  216|      0|      if (strcasecmp(module, "sync") == 0) {
  ------------------
  |  Branch (216:11): [True: 0, False: 0]
  ------------------
  217|      0|        isSync = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  218|      0|      } else if (strcasecmp(module, "bufsize") == 0) {
  ------------------
  |  Branch (218:18): [True: 0, False: 0]
  ------------------
  219|      0|        if (level >= LINE_BUF_SIZE) {
  ------------------
  |  |  138|      0|#define LINE_BUF_SIZE 512
  ------------------
  |  Branch (219:13): [True: 0, False: 0]
  ------------------
  220|      0|          bufSize = level;
  221|      0|        }
  222|      0|      } else if (strcasecmp(module, "timestamp") == 0) {
  ------------------
  |  Branch (222:18): [True: 0, False: 0]
  ------------------
  223|      0|        outputTimeStamp = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  224|      0|      } else if (strcasecmp(module, "append") == 0) {
  ------------------
  |  Branch (224:18): [True: 0, False: 0]
  ------------------
  225|      0|        appendToLog = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  226|      0|      } else {
  227|      0|        PRLogModuleInfo* lm = logModules;
  228|      0|        PRBool skip_modcheck =
  229|      0|            (0 == strcasecmp(module, "all")) ? PR_TRUE : PR_FALSE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
                          (0 == strcasecmp(module, "all")) ? PR_TRUE : PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  |  Branch (229:13): [True: 0, False: 0]
  ------------------
  230|       |
  231|      0|        while (lm != NULL) {
  ------------------
  |  Branch (231:16): [True: 0, False: 0]
  ------------------
  232|      0|          if (skip_modcheck) {
  ------------------
  |  Branch (232:15): [True: 0, False: 0]
  ------------------
  233|      0|            lm->level = (PRLogModuleLevel)level;
  234|      0|          } else if (strcasecmp(module, lm->name) == 0) {
  ------------------
  |  Branch (234:22): [True: 0, False: 0]
  ------------------
  235|      0|            lm->level = (PRLogModuleLevel)level;
  236|      0|            break;
  237|      0|          }
  238|      0|          lm = lm->next;
  239|      0|        }
  240|      0|      }
  241|       |      /*found:*/
  242|      0|      count = sscanf(&ev[pos], " , %n", &delta);
  243|      0|      pos += delta;
  244|      0|      if (count == EOF) {
  ------------------
  |  Branch (244:11): [True: 0, False: 0]
  ------------------
  245|      0|        break;
  246|      0|      }
  247|      0|    }
  248|      0|    PR_SetLogBuffering(isSync ? 0 : bufSize);
  ------------------
  |  Branch (248:24): [True: 0, False: 0]
  ------------------
  249|       |
  250|      0|    ev = PR_GetEnvSecure("NSPR_LOG_FILE");
  251|      0|    if (ev && ev[0]) {
  ------------------
  |  Branch (251:9): [True: 0, False: 0]
  |  Branch (251:15): [True: 0, False: 0]
  ------------------
  252|      0|      if (!PR_SetLogFile(ev)) {
  ------------------
  |  Branch (252:11): [True: 0, False: 0]
  ------------------
  253|       |#ifdef XP_PC
  254|       |        char* str = PR_smprintf("Unable to create nspr log file '%s'\n", ev);
  255|       |        if (str) {
  256|       |          OutputDebugStringA(str);
  257|       |          PR_smprintf_free(str);
  258|       |        }
  259|       |#else
  260|      0|        fprintf(stderr, "Unable to create nspr log file '%s'\n", ev);
  261|      0|#endif
  262|      0|      }
  263|      0|    } else {
  264|       |#ifdef _PR_USE_STDIO_FOR_LOGGING
  265|       |      logFile = stderr;
  266|       |#else
  267|      0|      logFile = _pr_stderr;
  268|      0|#endif
  269|      0|    }
  270|      0|  }
  271|      1|}
PR_NewLogModule:
  353|     11|PR_IMPLEMENT(PRLogModuleInfo*) PR_NewLogModule(const char* name) {
  354|     11|  PRLogModuleInfo* lm;
  355|       |
  356|     11|  if (!_pr_initialized) {
  ------------------
  |  Branch (356:7): [True: 0, False: 11]
  ------------------
  357|      0|    _PR_ImplicitInitialization();
  358|      0|  }
  359|       |
  360|     11|  lm = PR_NEWZAP(PRLogModuleInfo);
  ------------------
  |  |   99|     11|#define PR_NEWZAP(_struct) ((_struct*)PR_Calloc(1, sizeof(_struct)))
  ------------------
  361|     11|  if (lm) {
  ------------------
  |  Branch (361:7): [True: 11, False: 0]
  ------------------
  362|     11|    lm->name = strdup(name);
  363|     11|    lm->level = PR_LOG_NONE;
  364|     11|    lm->next = logModules;
  365|     11|    logModules = lm;
  366|     11|    _PR_SetLogModuleLevel(lm);
  367|     11|  }
  368|     11|  return lm;
  369|     11|}
prlog.c:_PR_SetLogModuleLevel:
  311|     11|static void _PR_SetLogModuleLevel(PRLogModuleInfo* lm) {
  312|     11|  char* ev;
  313|       |
  314|     11|  ev = PR_GetEnv("NSPR_LOG_MODULES");
  315|     11|  if (ev && ev[0]) {
  ------------------
  |  Branch (315:7): [True: 0, False: 11]
  |  Branch (315:13): [True: 0, False: 0]
  ------------------
  316|      0|    char module[64]; /* Security-Critical: If you change this
  317|       |                      * size, you must also change the sscanf
  318|       |                      * format string to be size-1.
  319|       |                      */
  320|      0|    PRIntn evlen = strlen(ev), pos = 0;
  321|      0|    while (pos < evlen) {
  ------------------
  |  Branch (321:12): [True: 0, False: 0]
  ------------------
  322|      0|      PRIntn level = 1, count = 0, delta = 0;
  323|       |
  324|      0|      count = sscanf(
  325|      0|          &ev[pos],
  326|      0|          "%63[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-"
  327|      0|          "]%n:%d%n",
  328|      0|          module, &delta, &level, &delta);
  329|      0|      pos += delta;
  330|      0|      if (count == 0) {
  ------------------
  |  Branch (330:11): [True: 0, False: 0]
  ------------------
  331|      0|        break;
  332|      0|      }
  333|       |
  334|       |      /*
  335|       |      ** If count == 2, then we got module and level. If count
  336|       |      ** == 1, then level defaults to 1 (module enabled).
  337|       |      */
  338|      0|      if (lm != NULL) {
  ------------------
  |  Branch (338:11): [True: 0, False: 0]
  ------------------
  339|      0|        if ((strcasecmp(module, "all") == 0) ||
  ------------------
  |  Branch (339:13): [True: 0, False: 0]
  ------------------
  340|      0|            (strcasecmp(module, lm->name) == 0)) {
  ------------------
  |  Branch (340:13): [True: 0, False: 0]
  ------------------
  341|      0|          lm->level = (PRLogModuleLevel)level;
  342|      0|        }
  343|      0|      }
  344|      0|      count = sscanf(&ev[pos], " , %n", &delta);
  345|      0|      pos += delta;
  346|      0|      if (count == EOF) {
  ------------------
  |  Branch (346:11): [True: 0, False: 0]
  ------------------
  347|      0|        break;
  348|      0|      }
  349|      0|    }
  350|      0|  }
  351|     11|} /* end _PR_SetLogModuleLevel() */

_PR_InitMW:
  171|      1|void _PR_InitMW(void) {
  172|       |#ifdef WINNT
  173|       |  /*
  174|       |   * We use NT 4's InterlockedCompareExchange() to operate
  175|       |   * on PRMWStatus variables.
  176|       |   */
  177|       |  PR_ASSERT(sizeof(LONG) == sizeof(PRMWStatus));
  178|       |  TimerInit();
  179|       |#endif
  180|      1|  mw_lock = PR_NewLock();
  181|      1|  PR_ASSERT(NULL != mw_lock);
  ------------------
  |  |  208|      1|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  182|      1|  mw_state = PR_NEWZAP(_PRGlobalState);
  ------------------
  |  |   99|      1|#define PR_NEWZAP(_struct) ((_struct*)PR_Calloc(1, sizeof(_struct)))
  ------------------
  183|      1|  PR_ASSERT(NULL != mw_state);
  ------------------
  |  |  208|      1|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  184|      1|  PR_INIT_CLIST(&mw_state->group_list);
  ------------------
  |  |  100|      1|    PR_BEGIN_MACRO     \
  |  |  ------------------
  |  |  |  |  123|      1|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |  101|      1|    (_l)->next = (_l); \
  |  |  102|      1|    (_l)->prev = (_l); \
  |  |  103|      1|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|      1|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  185|      1|  max_polling_interval = PR_MillisecondsToInterval(MAX_POLLING_INTERVAL);
  ------------------
  |  |   15|      1|#define MAX_POLLING_INTERVAL 100
  ------------------
  186|      1|} /* _PR_InitMW */

PR_smprintf:
 1166|  16.2k|PR_IMPLEMENT(char*) PR_smprintf(const char* fmt, ...) {
 1167|  16.2k|  va_list ap;
 1168|  16.2k|  char* rv;
 1169|       |
 1170|  16.2k|  va_start(ap, fmt);
 1171|  16.2k|  rv = PR_vsmprintf(fmt, ap);
 1172|  16.2k|  va_end(ap);
 1173|  16.2k|  return rv;
 1174|  16.2k|}
PR_smprintf_free:
 1179|  16.2k|PR_IMPLEMENT(void) PR_smprintf_free(char* mem) { PR_DELETE(mem); }
  ------------------
  |  |  110|  16.2k|#define PR_DELETE(_ptr) { PR_Free(_ptr); (_ptr) = NULL; }
  ------------------
PR_vsmprintf:
 1181|  16.2k|PR_IMPLEMENT(char*) PR_vsmprintf(const char* fmt, va_list ap) {
 1182|  16.2k|  SprintfState ss;
 1183|  16.2k|  int rv;
 1184|       |
 1185|  16.2k|  ss.stuff = GrowStuff;
 1186|  16.2k|  ss.base = 0;
 1187|  16.2k|  ss.cur = 0;
 1188|  16.2k|  ss.maxlen = 0;
 1189|  16.2k|  rv = dosprintf(&ss, fmt, ap);
 1190|  16.2k|  if (rv < 0) {
  ------------------
  |  Branch (1190:7): [True: 0, False: 16.2k]
  ------------------
 1191|      0|    if (ss.base) {
  ------------------
  |  Branch (1191:9): [True: 0, False: 0]
  ------------------
 1192|      0|      PR_DELETE(ss.base);
  ------------------
  |  |  110|      0|#define PR_DELETE(_ptr) { PR_Free(_ptr); (_ptr) = NULL; }
  ------------------
 1193|      0|    }
 1194|      0|    return 0;
 1195|      0|  }
 1196|  16.2k|  return ss.base;
 1197|  16.2k|}
PR_snprintf:
 1220|  2.86k|PR_snprintf(char* out, PRUint32 outlen, const char* fmt, ...) {
 1221|  2.86k|  va_list ap;
 1222|  2.86k|  PRUint32 rv;
 1223|       |
 1224|  2.86k|  va_start(ap, fmt);
 1225|  2.86k|  rv = PR_vsnprintf(out, outlen, fmt, ap);
 1226|  2.86k|  va_end(ap);
 1227|  2.86k|  return rv;
 1228|  2.86k|}
PR_vsnprintf:
 1231|  2.86k|PR_vsnprintf(char* out, PRUint32 outlen, const char* fmt, va_list ap) {
 1232|  2.86k|  SprintfState ss;
 1233|  2.86k|  PRUint32 n;
 1234|       |
 1235|  2.86k|  PR_ASSERT(outlen != 0 && outlen <= PR_INT32_MAX);
  ------------------
  |  |  208|  5.73k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:7): [True: 2.86k, False: 0]
  |  |  |  Branch (208:7): [True: 2.86k, False: 0]
  |  |  ------------------
  ------------------
 1236|  2.86k|  if (outlen == 0 || outlen > PR_INT32_MAX) {
  ------------------
  |  |  300|  2.86k|#define PR_INT32_MAX PR_INT32(2147483647)
  |  |  ------------------
  |  |  |  |  281|  2.86k|#define PR_INT32(x)  x
  |  |  ------------------
  ------------------
  |  Branch (1236:7): [True: 0, False: 2.86k]
  |  Branch (1236:22): [True: 0, False: 2.86k]
  ------------------
 1237|      0|    return 0;
 1238|      0|  }
 1239|       |
 1240|  2.86k|  ss.stuff = LimitStuff;
 1241|  2.86k|  ss.base = out;
 1242|  2.86k|  ss.cur = out;
 1243|  2.86k|  ss.maxlen = outlen;
 1244|  2.86k|  (void)dosprintf(&ss, fmt, ap);
 1245|       |
 1246|       |  /* If we added chars, and we didn't append a null, do it now. */
 1247|  2.86k|  if ((ss.cur != ss.base) && (*(ss.cur - 1) != '\0')) {
  ------------------
  |  Branch (1247:7): [True: 2.86k, False: 0]
  |  Branch (1247:30): [True: 0, False: 2.86k]
  ------------------
 1248|      0|    *(ss.cur - 1) = '\0';
 1249|      0|  }
 1250|       |
 1251|  2.86k|  n = ss.cur - ss.base;
 1252|  2.86k|  return n ? n - 1 : n;
  ------------------
  |  Branch (1252:10): [True: 2.86k, False: 0]
  ------------------
 1253|  2.86k|}
prprf.c:dosprintf:
  677|  19.0k|static int dosprintf(SprintfState* ss, const char* fmt, va_list ap) {
  678|  19.0k|  char c;
  679|  19.0k|  int flags, width, prec, radix, type;
  680|  19.0k|  union {
  681|  19.0k|    char ch;
  682|  19.0k|    int i;
  683|  19.0k|    long l;
  684|  19.0k|    PRInt64 ll;
  685|  19.0k|    double d;
  686|  19.0k|    const char* s;
  687|  19.0k|    int* ip;
  688|       |#ifdef WIN32
  689|       |    const WCHAR* ws;
  690|       |#endif
  691|  19.0k|  } u;
  692|  19.0k|  const char* fmt0;
  693|  19.0k|  static char* hex = "0123456789abcdef";
  694|  19.0k|  static char* HEX = "0123456789ABCDEF";
  695|  19.0k|  char* hexp;
  696|  19.0k|  int rv, i;
  697|  19.0k|  struct NumArg* nas = NULL;
  698|  19.0k|  struct NumArg* nap = NULL;
  699|  19.0k|  struct NumArg nasArray[NAS_DEFAULT_NUM];
  700|  19.0k|  char pattern[20];
  701|  19.0k|  const char* dolPt = NULL; /* in "%4$.2f", dolPt will point to . */
  702|       |#ifdef WIN32
  703|       |  char* pBuf = NULL;
  704|       |#endif
  705|       |
  706|       |  /*
  707|       |  ** build an argument array, IF the fmt is numbered argument
  708|       |  ** list style, to contain the Numbered Argument list pointers
  709|       |  */
  710|       |
  711|  19.0k|  nas = BuildArgArray(fmt, ap, &rv, nasArray);
  712|  19.0k|  if (rv < 0) {
  ------------------
  |  Branch (712:7): [True: 0, False: 19.0k]
  ------------------
  713|       |    /* the fmt contains error Numbered Argument format, jliu@netscape.com */
  714|      0|    PR_ASSERT(0);
  ------------------
  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  ------------------
  ------------------
  715|      0|    return rv;
  716|      0|  }
  717|       |
  718|   151k|  while ((c = *fmt++) != 0) {
  ------------------
  |  Branch (718:10): [True: 132k, False: 19.0k]
  ------------------
  719|   132k|    if (c != '%') {
  ------------------
  |  Branch (719:9): [True: 99.3k, False: 33.0k]
  ------------------
  720|  99.3k|      rv = (*ss->stuff)(ss, fmt - 1, 1);
  721|  99.3k|      if (rv < 0) {
  ------------------
  |  Branch (721:11): [True: 0, False: 99.3k]
  ------------------
  722|      0|        return rv;
  723|      0|      }
  724|  99.3k|      continue;
  725|  99.3k|    }
  726|  33.0k|    fmt0 = fmt - 1;
  727|       |
  728|       |    /*
  729|       |    ** Gobble up the % format string. Hopefully we have handled all
  730|       |    ** of the strange cases!
  731|       |    */
  732|  33.0k|    flags = 0;
  733|  33.0k|    c = *fmt++;
  734|  33.0k|    if (c == '%') {
  ------------------
  |  Branch (734:9): [True: 0, False: 33.0k]
  ------------------
  735|       |      /* quoting a % with %% */
  736|      0|      rv = (*ss->stuff)(ss, fmt - 1, 1);
  737|      0|      if (rv < 0) {
  ------------------
  |  Branch (737:11): [True: 0, False: 0]
  ------------------
  738|      0|        return rv;
  739|      0|      }
  740|      0|      continue;
  741|      0|    }
  742|       |
  743|  33.0k|    if (nas != NULL) {
  ------------------
  |  Branch (743:9): [True: 0, False: 33.0k]
  ------------------
  744|       |      /* the fmt contains the Numbered Arguments feature */
  745|      0|      i = 0;
  746|      0|      while (c && c != '$') { /* should improve error check later */
  ------------------
  |  Branch (746:14): [True: 0, False: 0]
  |  Branch (746:19): [True: 0, False: 0]
  ------------------
  747|      0|        i = (i * 10) + (c - '0');
  748|      0|        c = *fmt++;
  749|      0|      }
  750|       |
  751|      0|      if (nas[i - 1].type == TYPE_UNKNOWN) {
  ------------------
  |  |   88|      0|#define TYPE_UNKNOWN 20
  ------------------
  |  Branch (751:11): [True: 0, False: 0]
  ------------------
  752|      0|        if (nas && (nas != nasArray)) {
  ------------------
  |  Branch (752:13): [True: 0, False: 0]
  |  Branch (752:20): [True: 0, False: 0]
  ------------------
  753|      0|          PR_DELETE(nas);
  ------------------
  |  |  110|      0|#define PR_DELETE(_ptr) { PR_Free(_ptr); (_ptr) = NULL; }
  ------------------
  754|      0|        }
  755|      0|        return -1;
  756|      0|      }
  757|       |
  758|      0|      nap = &nas[i - 1];
  759|      0|      dolPt = fmt;
  760|      0|      c = *fmt++;
  761|      0|    }
  762|       |
  763|       |    /*
  764|       |     * Examine optional flags.  Note that we do not implement the
  765|       |     * '#' flag of sprintf().  The ANSI C spec. of the '#' flag is
  766|       |     * somewhat ambiguous and not ideal, which is perhaps why
  767|       |     * the various sprintf() implementations are inconsistent
  768|       |     * on this feature.
  769|       |     */
  770|  33.0k|    while ((c == '-') || (c == '+') || (c == ' ') || (c == '0')) {
  ------------------
  |  Branch (770:12): [True: 0, False: 33.0k]
  |  Branch (770:26): [True: 0, False: 33.0k]
  |  Branch (770:40): [True: 0, False: 33.0k]
  |  Branch (770:54): [True: 0, False: 33.0k]
  ------------------
  771|      0|      if (c == '-') {
  ------------------
  |  Branch (771:11): [True: 0, False: 0]
  ------------------
  772|      0|        flags |= FLAG_LEFT;
  ------------------
  |  |   90|      0|#define FLAG_LEFT 0x1
  ------------------
  773|      0|      }
  774|      0|      if (c == '+') {
  ------------------
  |  Branch (774:11): [True: 0, False: 0]
  ------------------
  775|      0|        flags |= FLAG_SIGNED;
  ------------------
  |  |   91|      0|#define FLAG_SIGNED 0x2
  ------------------
  776|      0|      }
  777|      0|      if (c == ' ') {
  ------------------
  |  Branch (777:11): [True: 0, False: 0]
  ------------------
  778|      0|        flags |= FLAG_SPACED;
  ------------------
  |  |   92|      0|#define FLAG_SPACED 0x4
  ------------------
  779|      0|      }
  780|      0|      if (c == '0') {
  ------------------
  |  Branch (780:11): [True: 0, False: 0]
  ------------------
  781|      0|        flags |= FLAG_ZEROS;
  ------------------
  |  |   93|      0|#define FLAG_ZEROS 0x8
  ------------------
  782|      0|      }
  783|      0|      c = *fmt++;
  784|      0|    }
  785|  33.0k|    if (flags & FLAG_SIGNED) {
  ------------------
  |  |   91|  33.0k|#define FLAG_SIGNED 0x2
  ------------------
  |  Branch (785:9): [True: 0, False: 33.0k]
  ------------------
  786|      0|      flags &= ~FLAG_SPACED;
  ------------------
  |  |   92|      0|#define FLAG_SPACED 0x4
  ------------------
  787|      0|    }
  788|  33.0k|    if (flags & FLAG_LEFT) {
  ------------------
  |  |   90|  33.0k|#define FLAG_LEFT 0x1
  ------------------
  |  Branch (788:9): [True: 0, False: 33.0k]
  ------------------
  789|      0|      flags &= ~FLAG_ZEROS;
  ------------------
  |  |   93|      0|#define FLAG_ZEROS 0x8
  ------------------
  790|      0|    }
  791|       |
  792|       |    /* width */
  793|  33.0k|    if (c == '*') {
  ------------------
  |  Branch (793:9): [True: 0, False: 33.0k]
  ------------------
  794|      0|      c = *fmt++;
  795|      0|      width = va_arg(ap, int);
  796|  33.0k|    } else {
  797|  33.0k|      width = 0;
  798|  33.0k|      while ((c >= '0') && (c <= '9')) {
  ------------------
  |  Branch (798:14): [True: 33.0k, False: 0]
  |  Branch (798:28): [True: 0, False: 33.0k]
  ------------------
  799|      0|        width = (width * 10) + (c - '0');
  800|      0|        c = *fmt++;
  801|      0|      }
  802|  33.0k|    }
  803|       |
  804|       |    /* precision */
  805|  33.0k|    prec = -1;
  806|  33.0k|    if (c == '.') {
  ------------------
  |  Branch (806:9): [True: 0, False: 33.0k]
  ------------------
  807|      0|      c = *fmt++;
  808|      0|      if (c == '*') {
  ------------------
  |  Branch (808:11): [True: 0, False: 0]
  ------------------
  809|      0|        c = *fmt++;
  810|      0|        prec = va_arg(ap, int);
  811|      0|      } else {
  812|      0|        prec = 0;
  813|      0|        while ((c >= '0') && (c <= '9')) {
  ------------------
  |  Branch (813:16): [True: 0, False: 0]
  |  Branch (813:30): [True: 0, False: 0]
  ------------------
  814|      0|          prec = (prec * 10) + (c - '0');
  815|      0|          c = *fmt++;
  816|      0|        }
  817|      0|      }
  818|      0|    }
  819|       |
  820|       |    /* size */
  821|  33.0k|    type = TYPE_INTN;
  ------------------
  |  |   76|  33.0k|#define TYPE_INTN 2
  ------------------
  822|  33.0k|    if (c == 'h') {
  ------------------
  |  Branch (822:9): [True: 0, False: 33.0k]
  ------------------
  823|      0|      type = TYPE_INT16;
  ------------------
  |  |   74|      0|#define TYPE_INT16 0
  ------------------
  824|      0|      c = *fmt++;
  825|  33.0k|    } else if (c == 'L') {
  ------------------
  |  Branch (825:16): [True: 0, False: 33.0k]
  ------------------
  826|       |      /* XXX not quite sure here */
  827|      0|      type = TYPE_INT64;
  ------------------
  |  |   80|      0|#define TYPE_INT64 6
  ------------------
  828|      0|      c = *fmt++;
  829|  33.0k|    } else if (c == 'l') {
  ------------------
  |  Branch (829:16): [True: 17.9k, False: 15.1k]
  ------------------
  830|  17.9k|      type = TYPE_INT32;
  ------------------
  |  |   78|  17.9k|#define TYPE_INT32 4
  ------------------
  831|  17.9k|      c = *fmt++;
  832|  17.9k|      if (c == 'l') {
  ------------------
  |  Branch (832:11): [True: 376, False: 17.5k]
  ------------------
  833|    376|        type = TYPE_INT64;
  ------------------
  |  |   80|    376|#define TYPE_INT64 6
  ------------------
  834|    376|        c = *fmt++;
  835|    376|      }
  836|  17.9k|    } else if (c == 'z') {
  ------------------
  |  Branch (836:16): [True: 0, False: 15.1k]
  ------------------
  837|      0|      if (sizeof(size_t) == sizeof(PRInt32)) {
  ------------------
  |  Branch (837:11): [Folded - Ignored]
  ------------------
  838|      0|        type = TYPE_INT32;
  ------------------
  |  |   78|      0|#define TYPE_INT32 4
  ------------------
  839|      0|      } else if (sizeof(size_t) == sizeof(PRInt64)) {
  ------------------
  |  Branch (839:18): [Folded - Ignored]
  ------------------
  840|      0|        type = TYPE_INT64;
  ------------------
  |  |   80|      0|#define TYPE_INT64 6
  ------------------
  841|      0|      }
  842|      0|      c = *fmt++;
  843|      0|    }
  844|       |
  845|       |    /* format */
  846|  33.0k|    hexp = hex;
  847|  33.0k|    switch (c) {
  848|      0|      case 'd':
  ------------------
  |  Branch (848:7): [True: 0, False: 33.0k]
  ------------------
  849|      0|      case 'i': /* decimal/integer */
  ------------------
  |  Branch (849:7): [True: 0, False: 33.0k]
  ------------------
  850|      0|        radix = 10;
  851|      0|        goto fetch_and_convert;
  852|       |
  853|      0|      case 'o': /* octal */
  ------------------
  |  Branch (853:7): [True: 0, False: 33.0k]
  ------------------
  854|      0|        radix = 8;
  855|      0|        type |= 1;
  856|      0|        goto fetch_and_convert;
  857|       |
  858|  17.9k|      case 'u': /* unsigned decimal */
  ------------------
  |  Branch (858:7): [True: 17.9k, False: 15.1k]
  ------------------
  859|  17.9k|        radix = 10;
  860|  17.9k|        type |= 1;
  861|  17.9k|        goto fetch_and_convert;
  862|       |
  863|      0|      case 'x': /* unsigned hex */
  ------------------
  |  Branch (863:7): [True: 0, False: 33.0k]
  ------------------
  864|      0|        radix = 16;
  865|      0|        type |= 1;
  866|      0|        goto fetch_and_convert;
  867|       |
  868|      0|      case 'X': /* unsigned HEX */
  ------------------
  |  Branch (868:7): [True: 0, False: 33.0k]
  ------------------
  869|      0|        radix = 16;
  870|      0|        hexp = HEX;
  871|      0|        type |= 1;
  872|      0|        goto fetch_and_convert;
  873|       |
  874|  17.9k|      fetch_and_convert:
  875|  17.9k|        switch (type) {
  ------------------
  |  Branch (875:17): [True: 0, False: 17.9k]
  ------------------
  876|      0|          case TYPE_INT16:
  ------------------
  |  |   74|      0|#define TYPE_INT16 0
  ------------------
  |  Branch (876:11): [True: 0, False: 17.9k]
  ------------------
  877|      0|            u.l = nas ? nap->u.i : va_arg(ap, int);
  ------------------
  |  Branch (877:19): [True: 0, False: 0]
  ------------------
  878|      0|            if (u.l < 0) {
  ------------------
  |  Branch (878:17): [True: 0, False: 0]
  ------------------
  879|      0|              u.l = -u.l;
  880|      0|              flags |= FLAG_NEG;
  ------------------
  |  |   94|      0|#define FLAG_NEG 0x10
  ------------------
  881|      0|            }
  882|      0|            goto do_long;
  883|      0|          case TYPE_UINT16:
  ------------------
  |  |   75|      0|#define TYPE_UINT16 1
  ------------------
  |  Branch (883:11): [True: 0, False: 17.9k]
  ------------------
  884|      0|            u.l = (nas ? nap->u.i : va_arg(ap, int)) & 0xffff;
  ------------------
  |  Branch (884:20): [True: 0, False: 0]
  ------------------
  885|      0|            goto do_long;
  886|      0|          case TYPE_INTN:
  ------------------
  |  |   76|      0|#define TYPE_INTN 2
  ------------------
  |  Branch (886:11): [True: 0, False: 17.9k]
  ------------------
  887|      0|            u.l = nas ? nap->u.i : va_arg(ap, int);
  ------------------
  |  Branch (887:19): [True: 0, False: 0]
  ------------------
  888|      0|            if (u.l < 0) {
  ------------------
  |  Branch (888:17): [True: 0, False: 0]
  ------------------
  889|      0|              u.l = -u.l;
  890|      0|              flags |= FLAG_NEG;
  ------------------
  |  |   94|      0|#define FLAG_NEG 0x10
  ------------------
  891|      0|            }
  892|      0|            goto do_long;
  893|      0|          case TYPE_UINTN:
  ------------------
  |  |   77|      0|#define TYPE_UINTN 3
  ------------------
  |  Branch (893:11): [True: 0, False: 17.9k]
  ------------------
  894|      0|            u.l = (long)(nas ? nap->u.ui : va_arg(ap, unsigned int));
  ------------------
  |  Branch (894:26): [True: 0, False: 0]
  ------------------
  895|      0|            goto do_long;
  896|       |
  897|      0|          case TYPE_INT32:
  ------------------
  |  |   78|      0|#define TYPE_INT32 4
  ------------------
  |  Branch (897:11): [True: 0, False: 17.9k]
  ------------------
  898|      0|            u.l = nas ? nap->u.i32 : va_arg(ap, PRInt32);
  ------------------
  |  Branch (898:19): [True: 0, False: 0]
  ------------------
  899|      0|            if (u.l < 0) {
  ------------------
  |  Branch (899:17): [True: 0, False: 0]
  ------------------
  900|      0|              u.l = -u.l;
  901|      0|              flags |= FLAG_NEG;
  ------------------
  |  |   94|      0|#define FLAG_NEG 0x10
  ------------------
  902|      0|            }
  903|      0|            goto do_long;
  904|  17.5k|          case TYPE_UINT32:
  ------------------
  |  |   79|  17.5k|#define TYPE_UINT32 5
  ------------------
  |  Branch (904:11): [True: 17.5k, False: 376]
  ------------------
  905|  17.5k|            u.l = (long)(nas ? nap->u.ui32 : va_arg(ap, PRUint32));
  ------------------
  |  Branch (905:26): [True: 0, False: 17.5k]
  ------------------
  906|  17.5k|          do_long:
  907|  17.5k|            rv = cvt_l(ss, u.l, width, prec, radix, type, flags, hexp);
  908|  17.5k|            if (rv < 0) {
  ------------------
  |  Branch (908:17): [True: 0, False: 17.5k]
  ------------------
  909|      0|              return rv;
  910|      0|            }
  911|  17.5k|            break;
  912|       |
  913|  17.5k|          case TYPE_INT64:
  ------------------
  |  |   80|      0|#define TYPE_INT64 6
  ------------------
  |  Branch (913:11): [True: 0, False: 17.9k]
  ------------------
  914|      0|            u.ll = nas ? nap->u.ll : va_arg(ap, PRInt64);
  ------------------
  |  Branch (914:20): [True: 0, False: 0]
  ------------------
  915|      0|            if (!LL_GE_ZERO(u.ll)) {
  ------------------
  |  |   78|      0|#define LL_GE_ZERO(a)       ((a) >= 0)
  ------------------
  |  Branch (915:17): [True: 0, False: 0]
  ------------------
  916|      0|              LL_NEG(u.ll, u.ll);
  ------------------
  |  |  104|      0|#define LL_NEG(r, a)        ((r) = -(a))
  ------------------
  917|      0|              flags |= FLAG_NEG;
  ------------------
  |  |   94|      0|#define FLAG_NEG 0x10
  ------------------
  918|      0|            }
  919|      0|            goto do_longlong;
  920|    376|          case TYPE_UINT64:
  ------------------
  |  |   81|    376|#define TYPE_UINT64 7
  ------------------
  |  Branch (920:11): [True: 376, False: 17.5k]
  ------------------
  921|    376|            u.ll = nas ? nap->u.ull : va_arg(ap, PRUint64);
  ------------------
  |  Branch (921:20): [True: 0, False: 376]
  ------------------
  922|    376|          do_longlong:
  923|    376|            rv = cvt_ll(ss, u.ll, width, prec, radix, type, flags, hexp);
  924|    376|            if (rv < 0) {
  ------------------
  |  Branch (924:17): [True: 0, False: 376]
  ------------------
  925|      0|              return rv;
  926|      0|            }
  927|    376|            break;
  928|  17.9k|        }
  929|  17.9k|        break;
  930|       |
  931|  17.9k|      case 'e':
  ------------------
  |  Branch (931:7): [True: 0, False: 33.0k]
  ------------------
  932|      0|      case 'E':
  ------------------
  |  Branch (932:7): [True: 0, False: 33.0k]
  ------------------
  933|      0|      case 'f':
  ------------------
  |  Branch (933:7): [True: 0, False: 33.0k]
  ------------------
  934|      0|      case 'g':
  ------------------
  |  Branch (934:7): [True: 0, False: 33.0k]
  ------------------
  935|      0|        u.d = nas ? nap->u.d : va_arg(ap, double);
  ------------------
  |  Branch (935:15): [True: 0, False: 0]
  ------------------
  936|      0|        if (nas != NULL) {
  ------------------
  |  Branch (936:13): [True: 0, False: 0]
  ------------------
  937|      0|          i = fmt - dolPt;
  938|      0|          if (i < sizeof(pattern)) {
  ------------------
  |  Branch (938:15): [True: 0, False: 0]
  ------------------
  939|      0|            pattern[0] = '%';
  940|      0|            memcpy(&pattern[1], dolPt, i);
  941|      0|            rv = cvt_f(ss, u.d, pattern, &pattern[i + 1]);
  942|      0|          }
  943|      0|        } else {
  944|      0|          rv = cvt_f(ss, u.d, fmt0, fmt);
  945|      0|        }
  946|       |
  947|      0|        if (rv < 0) {
  ------------------
  |  Branch (947:13): [True: 0, False: 0]
  ------------------
  948|      0|          return rv;
  949|      0|        }
  950|      0|        break;
  951|       |
  952|      0|      case 'c':
  ------------------
  |  Branch (952:7): [True: 0, False: 33.0k]
  ------------------
  953|      0|        u.ch = nas ? nap->u.i : va_arg(ap, int);
  ------------------
  |  Branch (953:16): [True: 0, False: 0]
  ------------------
  954|      0|        if ((flags & FLAG_LEFT) == 0) {
  ------------------
  |  |   90|      0|#define FLAG_LEFT 0x1
  ------------------
  |  Branch (954:13): [True: 0, False: 0]
  ------------------
  955|      0|          while (width-- > 1) {
  ------------------
  |  Branch (955:18): [True: 0, False: 0]
  ------------------
  956|      0|            rv = (*ss->stuff)(ss, " ", 1);
  957|      0|            if (rv < 0) {
  ------------------
  |  Branch (957:17): [True: 0, False: 0]
  ------------------
  958|      0|              return rv;
  959|      0|            }
  960|      0|          }
  961|      0|        }
  962|      0|        rv = (*ss->stuff)(ss, &u.ch, 1);
  963|      0|        if (rv < 0) {
  ------------------
  |  Branch (963:13): [True: 0, False: 0]
  ------------------
  964|      0|          return rv;
  965|      0|        }
  966|      0|        if (flags & FLAG_LEFT) {
  ------------------
  |  |   90|      0|#define FLAG_LEFT 0x1
  ------------------
  |  Branch (966:13): [True: 0, False: 0]
  ------------------
  967|      0|          while (width-- > 1) {
  ------------------
  |  Branch (967:18): [True: 0, False: 0]
  ------------------
  968|      0|            rv = (*ss->stuff)(ss, " ", 1);
  969|      0|            if (rv < 0) {
  ------------------
  |  Branch (969:17): [True: 0, False: 0]
  ------------------
  970|      0|              return rv;
  971|      0|            }
  972|      0|          }
  973|      0|        }
  974|      0|        break;
  975|       |
  976|      0|      case 'p':
  ------------------
  |  Branch (976:7): [True: 0, False: 33.0k]
  ------------------
  977|      0|        if (sizeof(void*) == sizeof(PRInt32)) {
  ------------------
  |  Branch (977:13): [Folded - Ignored]
  ------------------
  978|      0|          type = TYPE_UINT32;
  ------------------
  |  |   79|      0|#define TYPE_UINT32 5
  ------------------
  979|      0|        } else if (sizeof(void*) == sizeof(PRInt64)) {
  ------------------
  |  Branch (979:20): [Folded - Ignored]
  ------------------
  980|      0|          type = TYPE_UINT64;
  ------------------
  |  |   81|      0|#define TYPE_UINT64 7
  ------------------
  981|      0|        } else if (sizeof(void*) == sizeof(int)) {
  ------------------
  |  Branch (981:20): [Folded - Ignored]
  ------------------
  982|      0|          type = TYPE_UINTN;
  ------------------
  |  |   77|      0|#define TYPE_UINTN 3
  ------------------
  983|      0|        } else {
  984|      0|          PR_ASSERT(0);
  ------------------
  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  ------------------
  ------------------
  985|      0|          break;
  986|      0|        }
  987|      0|        radix = 16;
  988|      0|        goto fetch_and_convert;
  989|       |
  990|      0|#ifndef WIN32
  991|      0|      case 'S':
  ------------------
  |  Branch (991:7): [True: 0, False: 33.0k]
  ------------------
  992|       |        /* XXX not supported I suppose */
  993|      0|        PR_ASSERT(0);
  ------------------
  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  ------------------
  ------------------
  994|      0|        break;
  995|      0|#endif
  996|       |
  997|       |#if 0
  998|       |            case 'C':
  999|       |            case 'E':
 1000|       |            case 'G':
 1001|       |                /* XXX not supported I suppose */
 1002|       |                PR_ASSERT(0);
 1003|       |                break;
 1004|       |#endif
 1005|       |
 1006|       |#ifdef WIN32
 1007|       |      case 'S':
 1008|       |        u.ws = nas ? nap->u.ws : va_arg(ap, const WCHAR*);
 1009|       |
 1010|       |        /* Get the required size in rv */
 1011|       |        rv = WideCharToMultiByte(CP_ACP, 0, u.ws, -1, NULL, 0, NULL, NULL);
 1012|       |        if (rv == 0) {
 1013|       |          rv = 1;
 1014|       |        }
 1015|       |        pBuf = PR_MALLOC(rv);
 1016|       |        WideCharToMultiByte(CP_ACP, 0, u.ws, -1, pBuf, (int)rv, NULL, NULL);
 1017|       |        pBuf[rv - 1] = '\0';
 1018|       |
 1019|       |        rv = cvt_s(ss, pBuf, width, prec, flags);
 1020|       |
 1021|       |        /* We don't need the allocated buffer anymore */
 1022|       |        PR_Free(pBuf);
 1023|       |        if (rv < 0) {
 1024|       |          return rv;
 1025|       |        }
 1026|       |        break;
 1027|       |
 1028|       |#endif
 1029|       |
 1030|  15.1k|      case 's':
  ------------------
  |  Branch (1030:7): [True: 15.1k, False: 17.9k]
  ------------------
 1031|  15.1k|        u.s = nas ? nap->u.s : va_arg(ap, const char*);
  ------------------
  |  Branch (1031:15): [True: 0, False: 15.1k]
  ------------------
 1032|  15.1k|        rv = cvt_s(ss, u.s, width, prec, flags);
 1033|  15.1k|        if (rv < 0) {
  ------------------
  |  Branch (1033:13): [True: 0, False: 15.1k]
  ------------------
 1034|      0|          return rv;
 1035|      0|        }
 1036|  15.1k|        break;
 1037|       |
 1038|  15.1k|      case 'n':
  ------------------
  |  Branch (1038:7): [True: 0, False: 33.0k]
  ------------------
 1039|      0|        u.ip = nas ? nap->u.ip : va_arg(ap, int*);
  ------------------
  |  Branch (1039:16): [True: 0, False: 0]
  ------------------
 1040|      0|        if (u.ip) {
  ------------------
  |  Branch (1040:13): [True: 0, False: 0]
  ------------------
 1041|      0|          *u.ip = ss->cur - ss->base;
 1042|      0|        }
 1043|      0|        break;
 1044|       |
 1045|      0|      default:
  ------------------
  |  Branch (1045:7): [True: 0, False: 33.0k]
  ------------------
 1046|       |        /* Not a % token after all... skip it */
 1047|       |#if 0
 1048|       |                PR_ASSERT(0);
 1049|       |#endif
 1050|      0|        rv = (*ss->stuff)(ss, "%", 1);
 1051|      0|        if (rv < 0) {
  ------------------
  |  Branch (1051:13): [True: 0, False: 0]
  ------------------
 1052|      0|          return rv;
 1053|      0|        }
 1054|      0|        rv = (*ss->stuff)(ss, fmt - 1, 1);
 1055|      0|        if (rv < 0) {
  ------------------
  |  Branch (1055:13): [True: 0, False: 0]
  ------------------
 1056|      0|          return rv;
 1057|      0|        }
 1058|  33.0k|    }
 1059|  33.0k|  }
 1060|       |
 1061|       |  /* Stuff trailing NUL */
 1062|  19.0k|  rv = (*ss->stuff)(ss, "\0", 1);
 1063|       |
 1064|  19.0k|  if (nas && (nas != nasArray)) {
  ------------------
  |  Branch (1064:7): [True: 0, False: 19.0k]
  |  Branch (1064:14): [True: 0, False: 0]
  ------------------
 1065|      0|    PR_DELETE(nas);
  ------------------
  |  |  110|      0|#define PR_DELETE(_ptr) { PR_Free(_ptr); (_ptr) = NULL; }
  ------------------
 1066|      0|  }
 1067|       |
 1068|  19.0k|  return rv;
 1069|  19.0k|}
prprf.c:BuildArgArray:
  384|  19.0k|                                    struct NumArg* nasArray) {
  385|  19.0k|  int number = 0, cn = 0, i;
  386|  19.0k|  const char* p;
  387|  19.0k|  char c;
  388|  19.0k|  struct NumArg* nas;
  389|       |
  390|       |  /*
  391|       |  **  first pass:
  392|       |  **  determine how many legal % I have got, then allocate space
  393|       |  */
  394|       |
  395|  19.0k|  p = fmt;
  396|  19.0k|  *rv = 0;
  397|  19.0k|  i = 0;
  398|   169k|  while ((c = *p++) != 0) {
  ------------------
  |  Branch (398:10): [True: 150k, False: 19.0k]
  ------------------
  399|   150k|    if (c != '%') {
  ------------------
  |  Branch (399:9): [True: 117k, False: 33.0k]
  ------------------
  400|   117k|      continue;
  401|   117k|    }
  402|  33.0k|    if ((c = *p++) == '%') { /* skip %% case */
  ------------------
  |  Branch (402:9): [True: 0, False: 33.0k]
  ------------------
  403|      0|      continue;
  404|      0|    }
  405|       |
  406|  33.0k|    while (c != 0) {
  ------------------
  |  Branch (406:12): [True: 33.0k, False: 0]
  ------------------
  407|  33.0k|      if (c > '9' || c < '0') {
  ------------------
  |  Branch (407:11): [True: 33.0k, False: 0]
  |  Branch (407:22): [True: 0, False: 0]
  ------------------
  408|  33.0k|        if (c == '$') { /* numbered argument case */
  ------------------
  |  Branch (408:13): [True: 0, False: 33.0k]
  ------------------
  409|      0|          if (i > 0) {
  ------------------
  |  Branch (409:15): [True: 0, False: 0]
  ------------------
  410|      0|            *rv = -1;
  411|      0|            return NULL;
  412|      0|          }
  413|      0|          number++;
  414|  33.0k|        } else { /* non-numbered argument case */
  415|  33.0k|          if (number > 0) {
  ------------------
  |  Branch (415:15): [True: 0, False: 33.0k]
  ------------------
  416|      0|            *rv = -1;
  417|      0|            return NULL;
  418|      0|          }
  419|  33.0k|          i = 1;
  420|  33.0k|        }
  421|  33.0k|        break;
  422|  33.0k|      }
  423|       |
  424|      0|      c = *p++;
  425|      0|    }
  426|  33.0k|  }
  427|       |
  428|  19.0k|  if (number == 0) {
  ------------------
  |  Branch (428:7): [True: 19.0k, False: 0]
  ------------------
  429|  19.0k|    return NULL;
  430|  19.0k|  }
  431|       |
  432|      0|  if (number > NAS_DEFAULT_NUM) {
  ------------------
  |  |   67|      0|#define NAS_DEFAULT_NUM 20 /* default number of NumberedArgument array */
  ------------------
  |  Branch (432:7): [True: 0, False: 0]
  ------------------
  433|      0|    nas = (struct NumArg*)PR_MALLOC(number * sizeof(struct NumArg));
  ------------------
  |  |   55|      0|#define PR_MALLOC(_bytes) (PR_Malloc((_bytes)))
  ------------------
  434|      0|    if (!nas) {
  ------------------
  |  Branch (434:9): [True: 0, False: 0]
  ------------------
  435|      0|      *rv = -1;
  436|      0|      return NULL;
  437|      0|    }
  438|      0|  } else {
  439|      0|    nas = nasArray;
  440|      0|  }
  441|       |
  442|      0|  for (i = 0; i < number; i++) {
  ------------------
  |  Branch (442:15): [True: 0, False: 0]
  ------------------
  443|      0|    nas[i].type = TYPE_UNKNOWN;
  ------------------
  |  |   88|      0|#define TYPE_UNKNOWN 20
  ------------------
  444|      0|  }
  445|       |
  446|       |  /*
  447|       |  ** second pass:
  448|       |  ** set nas[].type
  449|       |  */
  450|       |
  451|      0|  p = fmt;
  452|      0|  while ((c = *p++) != 0) {
  ------------------
  |  Branch (452:10): [True: 0, False: 0]
  ------------------
  453|      0|    if (c != '%') {
  ------------------
  |  Branch (453:9): [True: 0, False: 0]
  ------------------
  454|      0|      continue;
  455|      0|    }
  456|      0|    c = *p++;
  457|      0|    if (c == '%') {
  ------------------
  |  Branch (457:9): [True: 0, False: 0]
  ------------------
  458|      0|      continue;
  459|      0|    }
  460|       |
  461|      0|    cn = 0;
  462|      0|    while (c && c != '$') { /* should improve error check later */
  ------------------
  |  Branch (462:12): [True: 0, False: 0]
  |  Branch (462:17): [True: 0, False: 0]
  ------------------
  463|      0|      cn = cn * 10 + c - '0';
  464|      0|      c = *p++;
  465|      0|    }
  466|       |
  467|      0|    if (!c || cn < 1 || cn > number) {
  ------------------
  |  Branch (467:9): [True: 0, False: 0]
  |  Branch (467:15): [True: 0, False: 0]
  |  Branch (467:25): [True: 0, False: 0]
  ------------------
  468|      0|      *rv = -1;
  469|      0|      break;
  470|      0|    }
  471|       |
  472|       |    /* nas[cn] starts from 0, and make sure nas[cn].type is not assigned */
  473|      0|    cn--;
  474|      0|    if (nas[cn].type != TYPE_UNKNOWN) {
  ------------------
  |  |   88|      0|#define TYPE_UNKNOWN 20
  ------------------
  |  Branch (474:9): [True: 0, False: 0]
  ------------------
  475|      0|      continue;
  476|      0|    }
  477|       |
  478|      0|    c = *p++;
  479|       |
  480|       |    /* width */
  481|      0|    if (c == '*') {
  ------------------
  |  Branch (481:9): [True: 0, False: 0]
  ------------------
  482|       |      /* not supported feature, for the argument is not numbered */
  483|      0|      *rv = -1;
  484|      0|      break;
  485|      0|    }
  486|       |
  487|      0|    while ((c >= '0') && (c <= '9')) {
  ------------------
  |  Branch (487:12): [True: 0, False: 0]
  |  Branch (487:26): [True: 0, False: 0]
  ------------------
  488|      0|      c = *p++;
  489|      0|    }
  490|       |
  491|       |    /* precision */
  492|      0|    if (c == '.') {
  ------------------
  |  Branch (492:9): [True: 0, False: 0]
  ------------------
  493|      0|      c = *p++;
  494|      0|      if (c == '*') {
  ------------------
  |  Branch (494:11): [True: 0, False: 0]
  ------------------
  495|       |        /* not supported feature, for the argument is not numbered */
  496|      0|        *rv = -1;
  497|      0|        break;
  498|      0|      }
  499|       |
  500|      0|      while ((c >= '0') && (c <= '9')) {
  ------------------
  |  Branch (500:14): [True: 0, False: 0]
  |  Branch (500:28): [True: 0, False: 0]
  ------------------
  501|      0|        c = *p++;
  502|      0|      }
  503|      0|    }
  504|       |
  505|       |    /* size */
  506|      0|    nas[cn].type = TYPE_INTN;
  ------------------
  |  |   76|      0|#define TYPE_INTN 2
  ------------------
  507|      0|    if (c == 'h') {
  ------------------
  |  Branch (507:9): [True: 0, False: 0]
  ------------------
  508|      0|      nas[cn].type = TYPE_INT16;
  ------------------
  |  |   74|      0|#define TYPE_INT16 0
  ------------------
  509|      0|      c = *p++;
  510|      0|    } else if (c == 'L') {
  ------------------
  |  Branch (510:16): [True: 0, False: 0]
  ------------------
  511|       |      /* XXX not quite sure here */
  512|      0|      nas[cn].type = TYPE_INT64;
  ------------------
  |  |   80|      0|#define TYPE_INT64 6
  ------------------
  513|      0|      c = *p++;
  514|      0|    } else if (c == 'l') {
  ------------------
  |  Branch (514:16): [True: 0, False: 0]
  ------------------
  515|      0|      nas[cn].type = TYPE_INT32;
  ------------------
  |  |   78|      0|#define TYPE_INT32 4
  ------------------
  516|      0|      c = *p++;
  517|      0|      if (c == 'l') {
  ------------------
  |  Branch (517:11): [True: 0, False: 0]
  ------------------
  518|      0|        nas[cn].type = TYPE_INT64;
  ------------------
  |  |   80|      0|#define TYPE_INT64 6
  ------------------
  519|      0|        c = *p++;
  520|      0|      }
  521|      0|    } else if (c == 'z') {
  ------------------
  |  Branch (521:16): [True: 0, False: 0]
  ------------------
  522|      0|      if (sizeof(size_t) == sizeof(PRInt32)) {
  ------------------
  |  Branch (522:11): [Folded - Ignored]
  ------------------
  523|      0|        nas[cn].type = TYPE_INT32;
  ------------------
  |  |   78|      0|#define TYPE_INT32 4
  ------------------
  524|      0|      } else if (sizeof(size_t) == sizeof(PRInt64)) {
  ------------------
  |  Branch (524:18): [Folded - Ignored]
  ------------------
  525|      0|        nas[cn].type = TYPE_INT64;
  ------------------
  |  |   80|      0|#define TYPE_INT64 6
  ------------------
  526|      0|      } else {
  527|      0|        nas[cn].type = TYPE_UNKNOWN;
  ------------------
  |  |   88|      0|#define TYPE_UNKNOWN 20
  ------------------
  528|      0|      }
  529|      0|      c = *p++;
  530|      0|    }
  531|       |
  532|       |    /* format */
  533|      0|    switch (c) {
  534|      0|      case 'd':
  ------------------
  |  Branch (534:7): [True: 0, False: 0]
  ------------------
  535|      0|      case 'c':
  ------------------
  |  Branch (535:7): [True: 0, False: 0]
  ------------------
  536|      0|      case 'i':
  ------------------
  |  Branch (536:7): [True: 0, False: 0]
  ------------------
  537|      0|      case 'o':
  ------------------
  |  Branch (537:7): [True: 0, False: 0]
  ------------------
  538|      0|      case 'u':
  ------------------
  |  Branch (538:7): [True: 0, False: 0]
  ------------------
  539|      0|      case 'x':
  ------------------
  |  Branch (539:7): [True: 0, False: 0]
  ------------------
  540|      0|      case 'X':
  ------------------
  |  Branch (540:7): [True: 0, False: 0]
  ------------------
  541|      0|        break;
  542|       |
  543|      0|      case 'e':
  ------------------
  |  Branch (543:7): [True: 0, False: 0]
  ------------------
  544|      0|      case 'f':
  ------------------
  |  Branch (544:7): [True: 0, False: 0]
  ------------------
  545|      0|      case 'g':
  ------------------
  |  Branch (545:7): [True: 0, False: 0]
  ------------------
  546|      0|        nas[cn].type = TYPE_DOUBLE;
  ------------------
  |  |   83|      0|#define TYPE_DOUBLE 9
  ------------------
  547|      0|        break;
  548|       |
  549|      0|      case 'p':
  ------------------
  |  Branch (549:7): [True: 0, False: 0]
  ------------------
  550|       |        /* XXX should use cpp */
  551|      0|        if (sizeof(void*) == sizeof(PRInt32)) {
  ------------------
  |  Branch (551:13): [Folded - Ignored]
  ------------------
  552|      0|          nas[cn].type = TYPE_UINT32;
  ------------------
  |  |   79|      0|#define TYPE_UINT32 5
  ------------------
  553|      0|        } else if (sizeof(void*) == sizeof(PRInt64)) {
  ------------------
  |  Branch (553:20): [Folded - Ignored]
  ------------------
  554|      0|          nas[cn].type = TYPE_UINT64;
  ------------------
  |  |   81|      0|#define TYPE_UINT64 7
  ------------------
  555|      0|        } else if (sizeof(void*) == sizeof(PRIntn)) {
  ------------------
  |  Branch (555:20): [Folded - Ignored]
  ------------------
  556|      0|          nas[cn].type = TYPE_UINTN;
  ------------------
  |  |   77|      0|#define TYPE_UINTN 3
  ------------------
  557|      0|        } else {
  558|      0|          nas[cn].type = TYPE_UNKNOWN;
  ------------------
  |  |   88|      0|#define TYPE_UNKNOWN 20
  ------------------
  559|      0|        }
  560|      0|        break;
  561|       |
  562|      0|      case 'S':
  ------------------
  |  Branch (562:7): [True: 0, False: 0]
  ------------------
  563|       |#ifdef WIN32
  564|       |        nas[cn].type = TYPE_WSTRING;
  565|       |        break;
  566|       |#endif
  567|      0|      case 'C':
  ------------------
  |  Branch (567:7): [True: 0, False: 0]
  ------------------
  568|      0|      case 'E':
  ------------------
  |  Branch (568:7): [True: 0, False: 0]
  ------------------
  569|      0|      case 'G':
  ------------------
  |  Branch (569:7): [True: 0, False: 0]
  ------------------
  570|       |        /* XXX not supported I suppose */
  571|      0|        PR_ASSERT(0);
  ------------------
  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  ------------------
  ------------------
  572|      0|        nas[cn].type = TYPE_UNKNOWN;
  ------------------
  |  |   88|      0|#define TYPE_UNKNOWN 20
  ------------------
  573|      0|        break;
  574|       |
  575|      0|      case 's':
  ------------------
  |  Branch (575:7): [True: 0, False: 0]
  ------------------
  576|      0|        nas[cn].type = TYPE_STRING;
  ------------------
  |  |   82|      0|#define TYPE_STRING 8
  ------------------
  577|      0|        break;
  578|       |
  579|      0|      case 'n':
  ------------------
  |  Branch (579:7): [True: 0, False: 0]
  ------------------
  580|      0|        nas[cn].type = TYPE_INTSTR;
  ------------------
  |  |   84|      0|#define TYPE_INTSTR 10
  ------------------
  581|      0|        break;
  582|       |
  583|      0|      default:
  ------------------
  |  Branch (583:7): [True: 0, False: 0]
  ------------------
  584|      0|        PR_ASSERT(0);
  ------------------
  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  ------------------
  ------------------
  585|      0|        nas[cn].type = TYPE_UNKNOWN;
  ------------------
  |  |   88|      0|#define TYPE_UNKNOWN 20
  ------------------
  586|      0|        break;
  587|      0|    }
  588|       |
  589|       |    /* get a legal para. */
  590|      0|    if (nas[cn].type == TYPE_UNKNOWN) {
  ------------------
  |  |   88|      0|#define TYPE_UNKNOWN 20
  ------------------
  |  Branch (590:9): [True: 0, False: 0]
  ------------------
  591|      0|      *rv = -1;
  592|      0|      break;
  593|      0|    }
  594|      0|  }
  595|       |
  596|       |  /*
  597|       |  ** third pass
  598|       |  ** fill the nas[cn].ap
  599|       |  */
  600|       |
  601|      0|  if (*rv < 0) {
  ------------------
  |  Branch (601:7): [True: 0, False: 0]
  ------------------
  602|      0|    if (nas != nasArray) {
  ------------------
  |  Branch (602:9): [True: 0, False: 0]
  ------------------
  603|      0|      PR_DELETE(nas);
  ------------------
  |  |  110|      0|#define PR_DELETE(_ptr) { PR_Free(_ptr); (_ptr) = NULL; }
  ------------------
  604|      0|    }
  605|      0|    return NULL;
  606|      0|  }
  607|       |
  608|      0|  cn = 0;
  609|      0|  while (cn < number) {
  ------------------
  |  Branch (609:10): [True: 0, False: 0]
  ------------------
  610|      0|    if (nas[cn].type == TYPE_UNKNOWN) {
  ------------------
  |  |   88|      0|#define TYPE_UNKNOWN 20
  ------------------
  |  Branch (610:9): [True: 0, False: 0]
  ------------------
  611|      0|      cn++;
  612|      0|      continue;
  613|      0|    }
  614|       |
  615|      0|    switch (nas[cn].type) {
  616|      0|      case TYPE_INT16:
  ------------------
  |  |   74|      0|#define TYPE_INT16 0
  ------------------
  |  Branch (616:7): [True: 0, False: 0]
  ------------------
  617|      0|      case TYPE_UINT16:
  ------------------
  |  |   75|      0|#define TYPE_UINT16 1
  ------------------
  |  Branch (617:7): [True: 0, False: 0]
  ------------------
  618|      0|      case TYPE_INTN:
  ------------------
  |  |   76|      0|#define TYPE_INTN 2
  ------------------
  |  Branch (618:7): [True: 0, False: 0]
  ------------------
  619|      0|        nas[cn].u.i = va_arg(ap, int);
  620|      0|        break;
  621|       |
  622|      0|      case TYPE_UINTN:
  ------------------
  |  |   77|      0|#define TYPE_UINTN 3
  ------------------
  |  Branch (622:7): [True: 0, False: 0]
  ------------------
  623|      0|        nas[cn].u.ui = va_arg(ap, unsigned int);
  624|      0|        break;
  625|       |
  626|      0|      case TYPE_INT32:
  ------------------
  |  |   78|      0|#define TYPE_INT32 4
  ------------------
  |  Branch (626:7): [True: 0, False: 0]
  ------------------
  627|      0|        nas[cn].u.i32 = va_arg(ap, PRInt32);
  628|      0|        break;
  629|       |
  630|      0|      case TYPE_UINT32:
  ------------------
  |  |   79|      0|#define TYPE_UINT32 5
  ------------------
  |  Branch (630:7): [True: 0, False: 0]
  ------------------
  631|      0|        nas[cn].u.ui32 = va_arg(ap, PRUint32);
  632|      0|        break;
  633|       |
  634|      0|      case TYPE_INT64:
  ------------------
  |  |   80|      0|#define TYPE_INT64 6
  ------------------
  |  Branch (634:7): [True: 0, False: 0]
  ------------------
  635|      0|        nas[cn].u.ll = va_arg(ap, PRInt64);
  636|      0|        break;
  637|       |
  638|      0|      case TYPE_UINT64:
  ------------------
  |  |   81|      0|#define TYPE_UINT64 7
  ------------------
  |  Branch (638:7): [True: 0, False: 0]
  ------------------
  639|      0|        nas[cn].u.ull = va_arg(ap, PRUint64);
  640|      0|        break;
  641|       |
  642|      0|      case TYPE_STRING:
  ------------------
  |  |   82|      0|#define TYPE_STRING 8
  ------------------
  |  Branch (642:7): [True: 0, False: 0]
  ------------------
  643|      0|        nas[cn].u.s = va_arg(ap, char*);
  644|      0|        break;
  645|       |
  646|       |#ifdef WIN32
  647|       |      case TYPE_WSTRING:
  648|       |        nas[cn].u.ws = va_arg(ap, WCHAR*);
  649|       |        break;
  650|       |#endif
  651|       |
  652|      0|      case TYPE_INTSTR:
  ------------------
  |  |   84|      0|#define TYPE_INTSTR 10
  ------------------
  |  Branch (652:7): [True: 0, False: 0]
  ------------------
  653|      0|        nas[cn].u.ip = va_arg(ap, int*);
  654|      0|        break;
  655|       |
  656|      0|      case TYPE_DOUBLE:
  ------------------
  |  |   83|      0|#define TYPE_DOUBLE 9
  ------------------
  |  Branch (656:7): [True: 0, False: 0]
  ------------------
  657|      0|        nas[cn].u.d = va_arg(ap, double);
  658|      0|        break;
  659|       |
  660|      0|      default:
  ------------------
  |  Branch (660:7): [True: 0, False: 0]
  ------------------
  661|      0|        if (nas != nasArray) {
  ------------------
  |  Branch (661:13): [True: 0, False: 0]
  ------------------
  662|      0|          PR_DELETE(nas);
  ------------------
  |  |  110|      0|#define PR_DELETE(_ptr) { PR_Free(_ptr); (_ptr) = NULL; }
  ------------------
  663|      0|        }
  664|      0|        *rv = -1;
  665|      0|        return NULL;
  666|      0|    }
  667|       |
  668|      0|    cn++;
  669|      0|  }
  670|       |
  671|      0|  return nas;
  672|      0|}
prprf.c:cvt_l:
  228|  17.5k|                 int type, int flags, const char* hexp) {
  229|  17.5k|  char cvtbuf[100];
  230|  17.5k|  char* cvt;
  231|  17.5k|  int digits;
  232|       |
  233|       |  /* according to the man page this needs to happen */
  234|  17.5k|  if ((prec == 0) && (num == 0)) {
  ------------------
  |  Branch (234:7): [True: 0, False: 17.5k]
  |  Branch (234:22): [True: 0, False: 0]
  ------------------
  235|      0|    return 0;
  236|      0|  }
  237|       |
  238|       |  /*
  239|       |  ** Converting decimal is a little tricky. In the unsigned case we
  240|       |  ** need to stop when we hit 10 digits. In the signed case, we can
  241|       |  ** stop when the number is zero.
  242|       |  */
  243|  17.5k|  cvt = cvtbuf + sizeof(cvtbuf);
  244|  17.5k|  digits = 0;
  245|  40.0k|  while (num) {
  ------------------
  |  Branch (245:10): [True: 22.5k, False: 17.5k]
  ------------------
  246|  22.5k|    int digit = (((unsigned long)num) % radix) & 0xF;
  247|  22.5k|    *--cvt = hexp[digit];
  248|  22.5k|    digits++;
  249|  22.5k|    num = (long)(((unsigned long)num) / radix);
  250|  22.5k|  }
  251|  17.5k|  if (digits == 0) {
  ------------------
  |  Branch (251:7): [True: 1.06k, False: 16.4k]
  ------------------
  252|  1.06k|    *--cvt = '0';
  253|  1.06k|    digits++;
  254|  1.06k|  }
  255|       |
  256|       |  /*
  257|       |  ** Now that we have the number converted without its sign, deal with
  258|       |  ** the sign and zero padding.
  259|       |  */
  260|  17.5k|  return fill_n(ss, cvt, digits, width, prec, type, flags);
  261|  17.5k|}
prprf.c:fill_n:
  138|  17.9k|                  int prec, int type, int flags) {
  139|  17.9k|  int zerowidth = 0;
  140|  17.9k|  int precwidth = 0;
  141|  17.9k|  int signwidth = 0;
  142|  17.9k|  int leftspaces = 0;
  143|  17.9k|  int rightspaces = 0;
  144|  17.9k|  int cvtwidth;
  145|  17.9k|  int rv;
  146|  17.9k|  char sign;
  147|       |
  148|  17.9k|  if ((type & 1) == 0) {
  ------------------
  |  Branch (148:7): [True: 0, False: 17.9k]
  ------------------
  149|      0|    if (flags & FLAG_NEG) {
  ------------------
  |  |   94|      0|#define FLAG_NEG 0x10
  ------------------
  |  Branch (149:9): [True: 0, False: 0]
  ------------------
  150|      0|      sign = '-';
  151|      0|      signwidth = 1;
  152|      0|    } else if (flags & FLAG_SIGNED) {
  ------------------
  |  |   91|      0|#define FLAG_SIGNED 0x2
  ------------------
  |  Branch (152:16): [True: 0, False: 0]
  ------------------
  153|      0|      sign = '+';
  154|      0|      signwidth = 1;
  155|      0|    } else if (flags & FLAG_SPACED) {
  ------------------
  |  |   92|      0|#define FLAG_SPACED 0x4
  ------------------
  |  Branch (155:16): [True: 0, False: 0]
  ------------------
  156|      0|      sign = ' ';
  157|      0|      signwidth = 1;
  158|      0|    }
  159|      0|  }
  160|  17.9k|  cvtwidth = signwidth + srclen;
  161|       |
  162|  17.9k|  if (prec > 0) {
  ------------------
  |  Branch (162:7): [True: 0, False: 17.9k]
  ------------------
  163|      0|    if (prec > srclen) {
  ------------------
  |  Branch (163:9): [True: 0, False: 0]
  ------------------
  164|      0|      precwidth = prec - srclen; /* Need zero filling */
  165|      0|      cvtwidth += precwidth;
  166|      0|    }
  167|      0|  }
  168|       |
  169|  17.9k|  if ((flags & FLAG_ZEROS) && (prec < 0)) {
  ------------------
  |  |   93|  17.9k|#define FLAG_ZEROS 0x8
  ------------------
  |  Branch (169:7): [True: 0, False: 17.9k]
  |  Branch (169:31): [True: 0, False: 0]
  ------------------
  170|      0|    if (width > cvtwidth) {
  ------------------
  |  Branch (170:9): [True: 0, False: 0]
  ------------------
  171|      0|      zerowidth = width - cvtwidth; /* Zero filling */
  172|      0|      cvtwidth += zerowidth;
  173|      0|    }
  174|      0|  }
  175|       |
  176|  17.9k|  if (flags & FLAG_LEFT) {
  ------------------
  |  |   90|  17.9k|#define FLAG_LEFT 0x1
  ------------------
  |  Branch (176:7): [True: 0, False: 17.9k]
  ------------------
  177|      0|    if (width > cvtwidth) {
  ------------------
  |  Branch (177:9): [True: 0, False: 0]
  ------------------
  178|       |      /* Space filling on the right (i.e. left adjusting) */
  179|      0|      rightspaces = width - cvtwidth;
  180|      0|    }
  181|  17.9k|  } else {
  182|  17.9k|    if (width > cvtwidth) {
  ------------------
  |  Branch (182:9): [True: 0, False: 17.9k]
  ------------------
  183|       |      /* Space filling on the left (i.e. right adjusting) */
  184|      0|      leftspaces = width - cvtwidth;
  185|      0|    }
  186|  17.9k|  }
  187|  17.9k|  while (--leftspaces >= 0) {
  ------------------
  |  Branch (187:10): [True: 0, False: 17.9k]
  ------------------
  188|      0|    rv = (*ss->stuff)(ss, " ", 1);
  189|      0|    if (rv < 0) {
  ------------------
  |  Branch (189:9): [True: 0, False: 0]
  ------------------
  190|      0|      return rv;
  191|      0|    }
  192|      0|  }
  193|  17.9k|  if (signwidth) {
  ------------------
  |  Branch (193:7): [True: 0, False: 17.9k]
  ------------------
  194|      0|    rv = (*ss->stuff)(ss, &sign, 1);
  195|      0|    if (rv < 0) {
  ------------------
  |  Branch (195:9): [True: 0, False: 0]
  ------------------
  196|      0|      return rv;
  197|      0|    }
  198|      0|  }
  199|  17.9k|  while (--precwidth >= 0) {
  ------------------
  |  Branch (199:10): [True: 0, False: 17.9k]
  ------------------
  200|      0|    rv = (*ss->stuff)(ss, "0", 1);
  201|      0|    if (rv < 0) {
  ------------------
  |  Branch (201:9): [True: 0, False: 0]
  ------------------
  202|      0|      return rv;
  203|      0|    }
  204|      0|  }
  205|  17.9k|  while (--zerowidth >= 0) {
  ------------------
  |  Branch (205:10): [True: 0, False: 17.9k]
  ------------------
  206|      0|    rv = (*ss->stuff)(ss, "0", 1);
  207|      0|    if (rv < 0) {
  ------------------
  |  Branch (207:9): [True: 0, False: 0]
  ------------------
  208|      0|      return rv;
  209|      0|    }
  210|      0|  }
  211|  17.9k|  rv = (*ss->stuff)(ss, src, srclen);
  212|  17.9k|  if (rv < 0) {
  ------------------
  |  Branch (212:7): [True: 0, False: 17.9k]
  ------------------
  213|      0|    return rv;
  214|      0|  }
  215|  17.9k|  while (--rightspaces >= 0) {
  ------------------
  |  Branch (215:10): [True: 0, False: 17.9k]
  ------------------
  216|      0|    rv = (*ss->stuff)(ss, " ", 1);
  217|      0|    if (rv < 0) {
  ------------------
  |  Branch (217:9): [True: 0, False: 0]
  ------------------
  218|      0|      return rv;
  219|      0|    }
  220|      0|  }
  221|  17.9k|  return 0;
  222|  17.9k|}
prprf.c:cvt_ll:
  267|    376|                  int type, int flags, const char* hexp) {
  268|    376|  char cvtbuf[100];
  269|    376|  char* cvt;
  270|    376|  int digits;
  271|    376|  PRInt64 rad;
  272|       |
  273|       |  /* according to the man page this needs to happen */
  274|    376|  if ((prec == 0) && (LL_IS_ZERO(num))) {
  ------------------
  |  |   75|      0|#define LL_IS_ZERO(a)       ((a) == 0)
  ------------------
  |  Branch (274:7): [True: 0, False: 376]
  |  Branch (274:22): [True: 0, False: 0]
  ------------------
  275|      0|    return 0;
  276|      0|  }
  277|       |
  278|       |  /*
  279|       |  ** Converting decimal is a little tricky. In the unsigned case we
  280|       |  ** need to stop when we hit 10 digits. In the signed case, we can
  281|       |  ** stop when the number is zero.
  282|       |  */
  283|    376|  LL_I2L(rad, radix);
  ------------------
  |  |  149|    376|#define LL_I2L(l, i)        ((l) = (PRInt64)(i))
  ------------------
  284|    376|  cvt = cvtbuf + sizeof(cvtbuf);
  285|    376|  digits = 0;
  286|  4.13k|  while (!LL_IS_ZERO(num)) {
  ------------------
  |  |   75|  4.13k|#define LL_IS_ZERO(a)       ((a) == 0)
  ------------------
  |  Branch (286:10): [True: 3.76k, False: 376]
  ------------------
  287|  3.76k|    PRInt32 digit;
  288|  3.76k|    PRInt64 quot, rem;
  289|  3.76k|    LL_UDIVMOD(&quot, &rem, num, rad);
  ------------------
  |  |  164|  3.76k|    (*(qp) = ((PRUint64)(a) / (b)), \
  |  |  165|  3.76k|     *(rp) = ((PRUint64)(a) % (b)))
  ------------------
  290|  3.76k|    LL_L2I(digit, rem);
  ------------------
  |  |  144|  3.76k|#define LL_L2I(i, l)        ((i) = (PRInt32)(l))
  ------------------
  291|  3.76k|    *--cvt = hexp[digit & 0xf];
  292|  3.76k|    digits++;
  293|  3.76k|    num = quot;
  294|  3.76k|  }
  295|    376|  if (digits == 0) {
  ------------------
  |  Branch (295:7): [True: 0, False: 376]
  ------------------
  296|      0|    *--cvt = '0';
  297|      0|    digits++;
  298|      0|  }
  299|       |
  300|       |  /*
  301|       |  ** Now that we have the number converted without its sign, deal with
  302|       |  ** the sign and zero padding.
  303|       |  */
  304|    376|  return fill_n(ss, cvt, digits, width, prec, type, flags);
  305|    376|}
prprf.c:cvt_s:
  351|  15.1k|                 int flags) {
  352|  15.1k|  int slen;
  353|       |
  354|  15.1k|  if (prec == 0) {
  ------------------
  |  Branch (354:7): [True: 0, False: 15.1k]
  ------------------
  355|      0|    return 0;
  356|      0|  }
  357|       |
  358|       |  /* Limit string length by precision value */
  359|  15.1k|  if (!str) {
  ------------------
  |  Branch (359:7): [True: 0, False: 15.1k]
  ------------------
  360|      0|    str = "(null)";
  361|      0|  }
  362|  15.1k|  if (prec > 0) {
  ------------------
  |  Branch (362:7): [True: 0, False: 15.1k]
  ------------------
  363|       |    /* this is:  slen = strnlen(str, prec); */
  364|      0|    register const char* s;
  365|       |
  366|      0|    for (s = str; prec && *s; s++, prec--);
  ------------------
  |  Branch (366:19): [True: 0, False: 0]
  |  Branch (366:27): [True: 0, False: 0]
  ------------------
  367|      0|    slen = s - str;
  368|  15.1k|  } else {
  369|  15.1k|    slen = strlen(str);
  370|  15.1k|  }
  371|       |
  372|       |  /* and away we go */
  373|  15.1k|  return fill2(ss, str, slen, width, flags);
  374|  15.1k|}
prprf.c:fill2:
  100|  15.1k|                 int flags) {
  101|  15.1k|  char space = ' ';
  102|  15.1k|  int rv;
  103|       |
  104|  15.1k|  width -= srclen;
  105|  15.1k|  if ((width > 0) && ((flags & FLAG_LEFT) == 0)) { /* Right adjusting */
  ------------------
  |  |   90|      0|#define FLAG_LEFT 0x1
  ------------------
  |  Branch (105:7): [True: 0, False: 15.1k]
  |  Branch (105:22): [True: 0, False: 0]
  ------------------
  106|      0|    if (flags & FLAG_ZEROS) {
  ------------------
  |  |   93|      0|#define FLAG_ZEROS 0x8
  ------------------
  |  Branch (106:9): [True: 0, False: 0]
  ------------------
  107|      0|      space = '0';
  108|      0|    }
  109|      0|    while (--width >= 0) {
  ------------------
  |  Branch (109:12): [True: 0, False: 0]
  ------------------
  110|      0|      rv = (*ss->stuff)(ss, &space, 1);
  111|      0|      if (rv < 0) {
  ------------------
  |  Branch (111:11): [True: 0, False: 0]
  ------------------
  112|      0|        return rv;
  113|      0|      }
  114|      0|    }
  115|      0|  }
  116|       |
  117|       |  /* Copy out the source data */
  118|  15.1k|  rv = (*ss->stuff)(ss, src, srclen);
  119|  15.1k|  if (rv < 0) {
  ------------------
  |  Branch (119:7): [True: 0, False: 15.1k]
  ------------------
  120|      0|    return rv;
  121|      0|  }
  122|       |
  123|  15.1k|  if ((width > 0) && ((flags & FLAG_LEFT) != 0)) { /* Left adjusting */
  ------------------
  |  |   90|      0|#define FLAG_LEFT 0x1
  ------------------
  |  Branch (123:7): [True: 0, False: 15.1k]
  |  Branch (123:22): [True: 0, False: 0]
  ------------------
  124|      0|    while (--width >= 0) {
  ------------------
  |  Branch (124:12): [True: 0, False: 0]
  ------------------
  125|      0|      rv = (*ss->stuff)(ss, &space, 1);
  126|      0|      if (rv < 0) {
  ------------------
  |  Branch (126:11): [True: 0, False: 0]
  ------------------
  127|      0|        return rv;
  128|      0|      }
  129|      0|    }
  130|      0|  }
  131|  15.1k|  return 0;
  132|  15.1k|}
prprf.c:GrowStuff:
 1119|   140k|static int GrowStuff(SprintfState* ss, const char* sp, PRUint32 len) {
 1120|   140k|  ptrdiff_t off;
 1121|   140k|  char* newbase;
 1122|   140k|  PRUint32 newlen;
 1123|       |
 1124|   140k|  off = ss->cur - ss->base;
 1125|   140k|  if (PR_UINT32_MAX - len < off) {
  ------------------
  |  |  302|   140k|#define PR_UINT32_MAX PR_UINT32(4294967295)
  |  |  ------------------
  |  |  |  |  282|   140k|#define PR_UINT32(x) x ## U
  |  |  ------------------
  ------------------
  |  Branch (1125:7): [True: 0, False: 140k]
  ------------------
 1126|       |    /* off + len would be too big. */
 1127|      0|    return -1;
 1128|      0|  }
 1129|   140k|  if (off + len >= ss->maxlen) {
  ------------------
  |  Branch (1129:7): [True: 16.6k, False: 123k]
  ------------------
 1130|       |    /* Grow the buffer */
 1131|  16.6k|    PRUint32 increment = (len > 32) ? len : 32;
  ------------------
  |  Branch (1131:26): [True: 102, False: 16.5k]
  ------------------
 1132|  16.6k|    if (PR_UINT32_MAX - ss->maxlen < increment) {
  ------------------
  |  |  302|  16.6k|#define PR_UINT32_MAX PR_UINT32(4294967295)
  |  |  ------------------
  |  |  |  |  282|  16.6k|#define PR_UINT32(x) x ## U
  |  |  ------------------
  ------------------
  |  Branch (1132:9): [True: 0, False: 16.6k]
  ------------------
 1133|       |      /* ss->maxlen + increment would overflow. */
 1134|      0|      return -1;
 1135|      0|    }
 1136|  16.6k|    newlen = ss->maxlen + increment;
 1137|  16.6k|    if (newlen > PR_INT32_MAX) {
  ------------------
  |  |  300|  16.6k|#define PR_INT32_MAX PR_INT32(2147483647)
  |  |  ------------------
  |  |  |  |  281|  16.6k|#define PR_INT32(x)  x
  |  |  ------------------
  ------------------
  |  Branch (1137:9): [True: 0, False: 16.6k]
  ------------------
 1138|      0|      return -1;
 1139|      0|    }
 1140|  16.6k|    if (ss->base) {
  ------------------
  |  Branch (1140:9): [True: 391, False: 16.2k]
  ------------------
 1141|    391|      newbase = (char*)PR_REALLOC(ss->base, newlen);
  ------------------
  |  |   77|    391|#define PR_REALLOC(_ptr, _size) (PR_Realloc((_ptr), (_size)))
  ------------------
 1142|  16.2k|    } else {
 1143|  16.2k|      newbase = (char*)PR_MALLOC(newlen);
  ------------------
  |  |   55|  16.2k|#define PR_MALLOC(_bytes) (PR_Malloc((_bytes)))
  ------------------
 1144|  16.2k|    }
 1145|  16.6k|    if (!newbase) {
  ------------------
  |  Branch (1145:9): [True: 0, False: 16.6k]
  ------------------
 1146|       |      /* Ran out of memory */
 1147|      0|      return -1;
 1148|      0|    }
 1149|  16.6k|    ss->base = newbase;
 1150|  16.6k|    ss->maxlen = newlen;
 1151|  16.6k|    ss->cur = ss->base + off;
 1152|  16.6k|  }
 1153|       |
 1154|       |  /* Copy data */
 1155|   370k|  while (len) {
  ------------------
  |  Branch (1155:10): [True: 230k, False: 140k]
  ------------------
 1156|   230k|    --len;
 1157|   230k|    *ss->cur++ = *sp++;
 1158|   230k|  }
 1159|   140k|  PR_ASSERT((PRUint32)(ss->cur - ss->base) <= ss->maxlen);
  ------------------
  |  |  208|   140k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 140k, False: 0]
  |  |  ------------------
  ------------------
 1160|   140k|  return 0;
 1161|   140k|}
prprf.c:LimitStuff:
 1202|  11.4k|static int LimitStuff(SprintfState* ss, const char* sp, PRUint32 len) {
 1203|  11.4k|  PRUint32 limit = ss->maxlen - (ss->cur - ss->base);
 1204|       |
 1205|  11.4k|  if (len > limit) {
  ------------------
  |  Branch (1205:7): [True: 0, False: 11.4k]
  ------------------
 1206|      0|    len = limit;
 1207|      0|  }
 1208|  48.7k|  while (len) {
  ------------------
  |  Branch (1208:10): [True: 37.2k, False: 11.4k]
  ------------------
 1209|  37.2k|    --len;
 1210|  37.2k|    *ss->cur++ = *sp++;
 1211|  37.2k|  }
 1212|  11.4k|  return 0;
 1213|  11.4k|}

_PR_InitLinker:
  104|      1|void _PR_InitLinker(void) {
  105|      1|  PRLibrary* lm = NULL;
  106|      1|#if defined(XP_UNIX)
  107|      1|  void* h;
  108|      1|#endif
  109|       |
  110|      1|  if (!pr_linker_lock) {
  ------------------
  |  Branch (110:7): [True: 1, False: 0]
  ------------------
  111|      1|    pr_linker_lock = PR_NewNamedMonitor("linker-lock");
  112|      1|  }
  113|      1|  PR_EnterMonitor(pr_linker_lock);
  114|       |
  115|       |#if defined(XP_PC)
  116|       |  lm = PR_NEWZAP(PRLibrary);
  117|       |  lm->name = strdup("Executable");
  118|       |  /* A module handle for the executable. */
  119|       |  lm->dlh = GetModuleHandle(NULL);
  120|       |
  121|       |  lm->refCount = 1;
  122|       |  lm->staticTable = NULL;
  123|       |  pr_exe_loadmap = lm;
  124|       |  pr_loadmap = lm;
  125|       |
  126|       |#elif defined(XP_UNIX)
  127|       |#  ifdef HAVE_DLL
  128|      1|#    if defined(USE_DLFCN) && !defined(NO_DLOPEN_NULL)
  129|      1|  h = dlopen(0, RTLD_LAZY);
  130|      1|  if (!h) {
  ------------------
  |  Branch (130:7): [True: 0, False: 1]
  ------------------
  131|      0|    char* error;
  132|       |
  133|      0|    DLLErrorInternal(_MD_ERRNO());
  ------------------
  |  |  314|      0|#define _MD_ERRNO()                 (errno)
  ------------------
  134|      0|    error = (char*)PR_MALLOC(PR_GetErrorTextLength());
  ------------------
  |  |   55|      0|#define PR_MALLOC(_bytes) (PR_Malloc((_bytes)))
  ------------------
  135|      0|    (void)PR_GetErrorText(error);
  136|      0|    fprintf(stderr, "failed to initialize shared libraries [%s]\n", error);
  137|      0|    PR_DELETE(error);
  ------------------
  |  |  110|      0|#define PR_DELETE(_ptr) { PR_Free(_ptr); (_ptr) = NULL; }
  ------------------
  138|      0|    abort(); /* XXX */
  139|      0|  }
  140|       |#    elif defined(USE_HPSHL)
  141|       |  h = NULL;
  142|       |  /* don't abort with this NULL */
  143|       |#    elif defined(NO_DLOPEN_NULL)
  144|       |  h = NULL; /* XXXX  toshok */ /* XXXX  vlad */
  145|       |#    else
  146|       |#      error no dll strategy
  147|       |#    endif /* USE_DLFCN */
  148|       |
  149|      1|  lm = PR_NEWZAP(PRLibrary);
  ------------------
  |  |   99|      1|#define PR_NEWZAP(_struct) ((_struct*)PR_Calloc(1, sizeof(_struct)))
  ------------------
  150|      1|  if (lm) {
  ------------------
  |  Branch (150:7): [True: 1, False: 0]
  ------------------
  151|      1|    lm->name = strdup("a.out");
  152|      1|    lm->refCount = 1;
  153|      1|    lm->dlh = h;
  154|      1|    lm->staticTable = NULL;
  155|      1|  }
  156|      1|  pr_exe_loadmap = lm;
  157|      1|  pr_loadmap = lm;
  158|      1|#  endif   /* HAVE_DLL */
  159|      1|#endif     /* XP_UNIX */
  160|       |
  161|      1|  if (lm) {
  ------------------
  |  Branch (161:7): [True: 1, False: 0]
  ------------------
  162|      1|    PR_LOG(_pr_linker_lm, PR_LOG_MIN, ("Loaded library %s (init)", lm->name));
  ------------------
  |  |  177|      1|    PR_BEGIN_MACRO             \
  |  |  ------------------
  |  |  |  |  123|      1|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |  178|      1|      if (PR_LOG_TEST(_module,_level)) { \
  |  |  ------------------
  |  |  |  |  167|      1|    ((_module)->level >= (_level))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (167:5): [True: 0, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  179|      0|      PR_LogPrint _args;         \
  |  |  180|      0|      }                     \
  |  |  181|      1|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|      1|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  163|      1|  }
  164|       |
  165|      1|  PR_ExitMonitor(pr_linker_lock);
  166|      1|}

_PR_InitZones:
  140|      1|void _PR_InitZones(void) {
  141|      1|  int i, j;
  142|      1|  char* envp;
  143|      1|  PRBool* sym;
  144|       |
  145|      1|  if ((sym = (PRBool*)pr_FindSymbolInProg("nspr_use_zone_allocator")) != NULL) {
  ------------------
  |  Branch (145:7): [True: 0, False: 1]
  ------------------
  146|      0|    use_zone_allocator = *sym;
  147|      1|  } else if ((envp = getenv("NSPR_USE_ZONE_ALLOCATOR")) != NULL) {
  ------------------
  |  Branch (147:14): [True: 0, False: 1]
  ------------------
  148|      0|    use_zone_allocator = (atoi(envp) == 1);
  149|      0|  }
  150|       |
  151|      1|  if (!use_zone_allocator) {
  ------------------
  |  Branch (151:7): [True: 1, False: 0]
  ------------------
  152|      1|    return;
  153|      1|  }
  154|       |
  155|      0|  for (j = 0; j < THREAD_POOLS; j++) {
  ------------------
  |  |   47|      0|#  define THREAD_POOLS 11 /* prime number for modulus */
  ------------------
  |  Branch (155:15): [True: 0, False: 0]
  ------------------
  156|      0|    for (i = 0; i < MEM_ZONES; i++) {
  ------------------
  |  |   46|      0|#  define MEM_ZONES 7
  ------------------
  |  Branch (156:17): [True: 0, False: 0]
  ------------------
  157|      0|      MemoryZone* mz = &zones[i][j];
  158|      0|      int rv = pthread_mutex_init(&mz->lock, NULL);
  159|      0|      PR_ASSERT(0 == rv);
  ------------------
  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  160|      0|      if (rv != 0) {
  ------------------
  |  Branch (160:11): [True: 0, False: 0]
  ------------------
  161|      0|        goto loser;
  162|      0|      }
  163|      0|      mz->blockSize = 16 << (2 * i);
  164|      0|    }
  165|      0|  }
  166|      0|  return;
  167|       |
  168|      0|loser:
  169|      0|  _PR_DestroyZones();
  170|      0|  return;
  171|      0|}
PR_Malloc:
  420|  1.16M|PR_IMPLEMENT(void*) PR_Malloc(PRUint32 size) {
  421|  1.16M|  if (!_pr_initialized) {
  ------------------
  |  Branch (421:7): [True: 0, False: 1.16M]
  ------------------
  422|      0|    _PR_ImplicitInitialization();
  423|      0|  }
  424|       |
  425|  1.16M|  return use_zone_allocator ? pr_ZoneMalloc(size) : malloc(size);
  ------------------
  |  Branch (425:10): [True: 0, False: 1.16M]
  ------------------
  426|  1.16M|}
PR_Calloc:
  428|  1.05M|PR_IMPLEMENT(void*) PR_Calloc(PRUint32 nelem, PRUint32 elsize) {
  429|  1.05M|  if (!_pr_initialized) {
  ------------------
  |  Branch (429:7): [True: 0, False: 1.05M]
  ------------------
  430|      0|    _PR_ImplicitInitialization();
  431|      0|  }
  432|       |
  433|  1.05M|  return use_zone_allocator ? pr_ZoneCalloc(nelem, elsize)
  ------------------
  |  Branch (433:10): [True: 0, False: 1.05M]
  ------------------
  434|  1.05M|                            : calloc(nelem, elsize);
  435|  1.05M|}
PR_Realloc:
  437|  1.60k|PR_IMPLEMENT(void*) PR_Realloc(void* ptr, PRUint32 size) {
  438|  1.60k|  if (!_pr_initialized) {
  ------------------
  |  Branch (438:7): [True: 0, False: 1.60k]
  ------------------
  439|      0|    _PR_ImplicitInitialization();
  440|      0|  }
  441|       |
  442|  1.60k|  return use_zone_allocator ? pr_ZoneRealloc(ptr, size) : realloc(ptr, size);
  ------------------
  |  Branch (442:10): [True: 0, False: 1.60k]
  ------------------
  443|  1.60k|}
PR_Free:
  445|  2.21M|PR_IMPLEMENT(void) PR_Free(void* ptr) {
  446|  2.21M|  if (use_zone_allocator) {
  ------------------
  |  Branch (446:7): [True: 0, False: 2.21M]
  ------------------
  447|      0|    pr_ZoneFree(ptr);
  448|  2.21M|  } else {
  449|  2.21M|    free(ptr);
  450|  2.21M|  }
  451|  2.21M|}
prmem.c:pr_FindSymbolInProg:
   91|      1|static void* pr_FindSymbolInProg(const char* name) {
   92|      1|  void* h;
   93|      1|  void* sym;
   94|       |
   95|      1|  h = dlopen(0, RTLD_LAZY);
   96|      1|  if (h == NULL) {
  ------------------
  |  Branch (96:7): [True: 0, False: 1]
  ------------------
   97|      0|    return NULL;
   98|      0|  }
   99|      1|  sym = dlsym(h, name);
  100|      1|  (void)dlclose(h);
  101|      1|  return sym;
  102|      1|}

PR_GetPageSize:
   59|      1|PR_IMPLEMENT(PRInt32) PR_GetPageSize(void) {
   60|      1|  if (!_pr_pageSize) {
  ------------------
  |  Branch (60:7): [True: 1, False: 0]
  ------------------
   61|      1|    GetPageSize();
   62|      1|  }
   63|      1|  return _pr_pageSize;
   64|      1|}
prosdep.c:GetPageSize:
   22|      1|static void GetPageSize(void) {
   23|      1|  PRInt32 pageSize;
   24|       |
   25|       |  /* Get page size */
   26|      1|#ifdef XP_UNIX
   27|      1|#  if defined AIX || defined LINUX || defined __GNU__ || defined __GLIBC__ || \
   28|      1|      defined FREEBSD || defined NETBSD || defined OPENBSD || defined DARWIN
   29|      1|  _pr_pageSize = getpagesize();
   30|       |#  elif defined(HPUX)
   31|       |  /* I have no idea. Don't get me started. --Rob */
   32|       |  _pr_pageSize = sysconf(_SC_PAGE_SIZE);
   33|       |#  else
   34|       |  _pr_pageSize = sysconf(_SC_PAGESIZE);
   35|       |#  endif
   36|      1|#endif /* XP_UNIX */
   37|       |
   38|       |#ifdef XP_PC
   39|       |#  ifdef _WIN32
   40|       |  SYSTEM_INFO info;
   41|       |  GetSystemInfo(&info);
   42|       |  _pr_pageSize = info.dwPageSize;
   43|       |#  else
   44|       |  _pr_pageSize = 4096;
   45|       |#  endif
   46|       |#endif /* XP_PC */
   47|       |
   48|      1|  pageSize = _pr_pageSize;
   49|      1|  PR_CEILING_LOG2(_pr_pageShift, pageSize);
  ------------------
  |  |   72|      1|  PR_BEGIN_MACRO                       \
  |  |  ------------------
  |  |  |  |  123|      1|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |   73|      1|    PRUint32 j_ = (PRUint32)(_n);      \
  |  |   74|      1|    (_log2) = (j_ <= 1 ? 0 : 32 - pr_bitscan_clz32(j_ - 1)); \
  |  |  ------------------
  |  |  |  |   40|      1|# define pr_bitscan_clz32(val)  __builtin_clz(val)
  |  |  ------------------
  |  |  |  Branch (74:16): [True: 0, False: 1]
  |  |  ------------------
  |  |   75|      1|  PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|      1|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   50|      1|}

_MD_EarlyInit:
    8|      1|void _MD_EarlyInit(void) {}

_PR_UnixInit:
 2585|      1|void _PR_UnixInit(void) {
 2586|      1|  struct sigaction sigact;
 2587|      1|  int rv;
 2588|       |
 2589|      1|  sigemptyset(&timer_set);
 2590|       |
 2591|       |#if !defined(_PR_PTHREADS)
 2592|       |
 2593|       |  sigaddset(&timer_set, SIGALRM);
 2594|       |  sigemptyset(&empty_set);
 2595|       |  intr_timeout_ticks = PR_SecondsToInterval(_PR_INTERRUPT_CHECK_INTERVAL_SECS);
 2596|       |
 2597|       |#  if defined(SOLARIS)
 2598|       |
 2599|       |  if (getenv("NSPR_SIGSEGV_HANDLE")) {
 2600|       |    sigact.sa_handler = sigsegvhandler;
 2601|       |    sigact.sa_flags = 0;
 2602|       |    sigact.sa_mask = timer_set;
 2603|       |    sigaction(SIGSEGV, &sigact, 0);
 2604|       |  }
 2605|       |
 2606|       |  if (getenv("NSPR_SIGABRT_HANDLE")) {
 2607|       |    sigact.sa_handler = sigaborthandler;
 2608|       |    sigact.sa_flags = 0;
 2609|       |    sigact.sa_mask = timer_set;
 2610|       |    sigaction(SIGABRT, &sigact, 0);
 2611|       |  }
 2612|       |
 2613|       |  if (getenv("NSPR_SIGBUS_HANDLE")) {
 2614|       |    sigact.sa_handler = sigbushandler;
 2615|       |    sigact.sa_flags = 0;
 2616|       |    sigact.sa_mask = timer_set;
 2617|       |    sigaction(SIGBUS, &sigact, 0);
 2618|       |  }
 2619|       |
 2620|       |#  endif
 2621|       |#endif /* !defined(_PR_PTHREADS) */
 2622|       |
 2623|      1|  sigact.sa_handler = SIG_IGN;
 2624|      1|  sigemptyset(&sigact.sa_mask);
 2625|      1|  sigact.sa_flags = 0;
 2626|      1|  rv = sigaction(SIGPIPE, &sigact, 0);
 2627|      1|  PR_ASSERT(0 == rv);
  ------------------
  |  |  208|      1|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 1, False: 0]
  |  |  ------------------
  ------------------
 2628|       |
 2629|      1|  _pr_unix_rename_lock = PR_NewLock();
 2630|      1|  PR_ASSERT(NULL != _pr_unix_rename_lock);
  ------------------
  |  |  208|      1|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 1, False: 0]
  |  |  ------------------
  ------------------
 2631|      1|  _pr_Xfe_mon = PR_NewMonitor();
 2632|      1|  PR_ASSERT(NULL != _pr_Xfe_mon);
  ------------------
  |  |  208|      1|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 1, False: 0]
  |  |  ------------------
  ------------------
 2633|       |
 2634|      1|  _PR_InitIOV(); /* one last hack */
 2635|      1|}
PR_Now:
 2749|      1|PR_Now(void) {
 2750|      1|  struct timeval tv;
 2751|      1|  PRInt64 s, us, s2us;
 2752|       |
 2753|      1|  GETTIMEOFDAY(&tv);
  ------------------
  |  |  506|      1|#define GETTIMEOFDAY(tp) gettimeofday((tp), NULL)
  ------------------
 2754|      1|  LL_I2L(s2us, PR_USEC_PER_SEC);
  ------------------
  |  |  149|      1|#define LL_I2L(l, i)        ((l) = (PRInt64)(i))
  ------------------
 2755|      1|  LL_I2L(s, tv.tv_sec);
  ------------------
  |  |  149|      1|#define LL_I2L(l, i)        ((l) = (PRInt64)(i))
  ------------------
 2756|      1|  LL_I2L(us, tv.tv_usec);
  ------------------
  |  |  149|      1|#define LL_I2L(l, i)        ((l) = (PRInt64)(i))
  ------------------
 2757|      1|  LL_MUL(s, s, s2us);
  ------------------
  |  |  115|      1|#define LL_MUL(r, a, b)        ((r) = (a) * (b))
  ------------------
 2758|      1|  LL_ADD(s, s, us);
  ------------------
  |  |  105|      1|#define LL_ADD(r, a, b)     ((r) = (a) + (b))
  ------------------
 2759|      1|  return s;
 2760|      1|}
_PR_UNIX_GetInterval2:
 2785|  19.4k|PRIntervalTime _PR_UNIX_GetInterval2() {
 2786|  19.4k|  struct timespec time;
 2787|  19.4k|  PRIntervalTime ticks;
 2788|       |
 2789|  19.4k|  if (clock_gettime(CLOCK_MONOTONIC, &time) != 0) {
  ------------------
  |  Branch (2789:7): [True: 0, False: 19.4k]
  ------------------
 2790|      0|    fprintf(stderr, "clock_gettime failed: %d\n", errno);
 2791|      0|    abort();
 2792|      0|  }
 2793|       |
 2794|  19.4k|  ticks = (PRUint32)time.tv_sec * PR_MSEC_PER_SEC;
  ------------------
  |  |   27|  19.4k|#define PR_MSEC_PER_SEC     1000L
  ------------------
 2795|  19.4k|  ticks += (PRUint32)time.tv_nsec / PR_NSEC_PER_MSEC;
  ------------------
  |  |   31|  19.4k|#define PR_NSEC_PER_MSEC    1000000L
  ------------------
 2796|  19.4k|  return ticks;
 2797|  19.4k|}
_PR_UNIX_TicksPerSecond2:
 2799|  4.52k|PRIntervalTime _PR_UNIX_TicksPerSecond2() { return 1000; }
unix.c:_PR_InitIOV:
 2526|      1|static void _PR_InitIOV(void) {
 2527|       |#if defined(SOLARIS2_5)
 2528|       |  PRLibrary* lib;
 2529|       |  void* open64_func;
 2530|       |
 2531|       |  open64_func = PR_FindSymbolAndLibrary("open64", &lib);
 2532|       |  if (NULL != open64_func) {
 2533|       |    PR_ASSERT(NULL != lib);
 2534|       |    _md_iovector._open64 = (_MD_Open64)open64_func;
 2535|       |    _md_iovector._mmap64 = (_MD_Mmap64)PR_FindSymbol(lib, "mmap64");
 2536|       |    _md_iovector._fstat64 = (_MD_Fstat64)PR_FindSymbol(lib, "fstat64");
 2537|       |    _md_iovector._stat64 = (_MD_Stat64)PR_FindSymbol(lib, "stat64");
 2538|       |    _md_iovector._lseek64 = (_MD_Lseek64)PR_FindSymbol(lib, "lseek64");
 2539|       |    (void)PR_UnloadLibrary(lib);
 2540|       |  } else {
 2541|       |    _md_iovector._open64 = open;
 2542|       |    _md_iovector._mmap64 = _MD_Unix_mmap64;
 2543|       |    _md_iovector._fstat64 = _MD_solaris25_fstat64;
 2544|       |    _md_iovector._stat64 = _MD_solaris25_stat64;
 2545|       |    _md_iovector._lseek64 = _MD_Unix_lseek64;
 2546|       |  }
 2547|       |#elif defined(_PR_NO_LARGE_FILES)
 2548|       |  _md_iovector._open64 = open;
 2549|       |  _md_iovector._mmap64 = _MD_Unix_mmap64;
 2550|       |  _md_iovector._fstat64 = fstat;
 2551|       |  _md_iovector._stat64 = stat;
 2552|       |  _md_iovector._lseek64 = _MD_Unix_lseek64;
 2553|       |#elif defined(_PR_HAVE_OFF64_T)
 2554|       |#  if (defined(ANDROID) && __ANDROID_API__ < 21)
 2555|       |  /*
 2556|       |   * Android < 21 doesn't have open64.  We pass the O_LARGEFILE flag to open
 2557|       |   * in _MD_open.
 2558|       |   */
 2559|       |  _md_iovector._open64 = open;
 2560|       |#  else
 2561|      1|  _md_iovector._open64 = open64;
 2562|      1|#  endif
 2563|      1|  _md_iovector._mmap64 = mmap64;
 2564|       |#  if (defined(ANDROID) && __ANDROID_API__ < 21)
 2565|       |  /* Same as the open64 case for Android. */
 2566|       |  _md_iovector._fstat64 = (_MD_Fstat64)fstat;
 2567|       |  _md_iovector._stat64 = (_MD_Stat64)stat;
 2568|       |#  else
 2569|      1|  _md_iovector._fstat64 = fstat64;
 2570|      1|  _md_iovector._stat64 = stat64;
 2571|      1|#  endif
 2572|      1|  _md_iovector._lseek64 = lseek64;
 2573|       |#elif defined(_PR_HAVE_LARGE_OFF_T)
 2574|       |  _md_iovector._open64 = open;
 2575|       |  _md_iovector._mmap64 = mmap;
 2576|       |  _md_iovector._fstat64 = fstat;
 2577|       |  _md_iovector._stat64 = stat;
 2578|       |  _md_iovector._lseek64 = lseek;
 2579|       |#else
 2580|       |#  error "I don't know yet"
 2581|       |#endif
 2582|      1|  LL_I2L(minus_one, -1);
  ------------------
  |  |  149|      1|#define LL_I2L(l, i)        ((l) = (PRInt64)(i))
  ------------------
 2583|      1|} /* _PR_InitIOV */

_PR_InitSegs:
   13|      1|void _PR_InitSegs(void) {}

_PR_InitAtomic:
  243|      1|void _PR_InitAtomic(void) { _PR_MD_INIT_ATOMIC(); }

pr_inet_aton:
   99|  11.0k|int pr_inet_aton(const char* cp, PRUint32* addr) {
  100|  11.0k|  PRUint32 val;
  101|  11.0k|  int base, n;
  102|  11.0k|  char c;
  103|  11.0k|  PRUint8 parts[4];
  104|  11.0k|  PRUint8* pp = parts;
  105|  11.0k|  int digit;
  106|       |
  107|  11.0k|  c = *cp;
  108|  11.0k|  for (;;) {
  109|       |    /*
  110|       |     * Collect number up to ``.''.
  111|       |     * Values are specified as for C:
  112|       |     * 0x=hex, 0=octal, isdigit=decimal.
  113|       |     */
  114|  11.0k|    if (!_isdigit(c)) {
  ------------------
  |  Branch (114:9): [True: 11.0k, False: 0]
  ------------------
  115|  11.0k|      return (0);
  116|  11.0k|    }
  117|      0|    val = 0;
  118|      0|    base = 10;
  119|      0|    digit = 0;
  120|      0|    if (c == '0') {
  ------------------
  |  Branch (120:9): [True: 0, False: 0]
  ------------------
  121|      0|      c = *++cp;
  122|      0|      if (c == 'x' || c == 'X') {
  ------------------
  |  Branch (122:11): [True: 0, False: 0]
  |  Branch (122:23): [True: 0, False: 0]
  ------------------
  123|      0|        base = 16, c = *++cp;
  124|      0|      } else {
  125|      0|        base = 8;
  126|      0|        digit = 1;
  127|      0|      }
  128|      0|    }
  129|      0|    for (;;) {
  130|      0|      if (_isdigit(c)) {
  ------------------
  |  Branch (130:11): [True: 0, False: 0]
  ------------------
  131|      0|        if (base == 8 && (c == '8' || c == '9')) {
  ------------------
  |  Branch (131:13): [True: 0, False: 0]
  |  Branch (131:27): [True: 0, False: 0]
  |  Branch (131:39): [True: 0, False: 0]
  ------------------
  132|      0|          return (0);
  133|      0|        }
  134|      0|        val = (val * base) + (c - '0');
  135|      0|        c = *++cp;
  136|      0|        digit = 1;
  137|      0|      } else if (base == 16 && _isxdigit(c)) {
  ------------------
  |  Branch (137:18): [True: 0, False: 0]
  |  Branch (137:32): [True: 0, False: 0]
  ------------------
  138|      0|        val = (val << 4) + index_hex[(unsigned char)c];
  139|      0|        c = *++cp;
  140|      0|        digit = 1;
  141|      0|      } else {
  142|      0|        break;
  143|      0|      }
  144|      0|    }
  145|      0|    if (c == '.') {
  ------------------
  |  Branch (145:9): [True: 0, False: 0]
  ------------------
  146|       |      /*
  147|       |       * Internet format:
  148|       |       *    a.b.c.d
  149|       |       *    a.b.c    (with c treated as 16 bits)
  150|       |       *    a.b    (with b treated as 24 bits)
  151|       |       */
  152|      0|      if (pp >= parts + 3 || val > 0xffU) {
  ------------------
  |  Branch (152:11): [True: 0, False: 0]
  |  Branch (152:30): [True: 0, False: 0]
  ------------------
  153|      0|        return (0);
  154|      0|      }
  155|      0|      *pp++ = val;
  156|      0|      c = *++cp;
  157|      0|    } else {
  158|      0|      break;
  159|      0|    }
  160|      0|  }
  161|       |  /*
  162|       |   * Check for trailing characters.
  163|       |   */
  164|      0|  if (c != '\0' && !_isspace(c)) {
  ------------------
  |  Branch (164:7): [True: 0, False: 0]
  |  Branch (164:20): [True: 0, False: 0]
  ------------------
  165|      0|    return (0);
  166|      0|  }
  167|       |  /*
  168|       |   * Did we get a valid digit?
  169|       |   */
  170|      0|  if (!digit) {
  ------------------
  |  Branch (170:7): [True: 0, False: 0]
  ------------------
  171|      0|    return (0);
  172|      0|  }
  173|       |  /*
  174|       |   * Concoct the address according to
  175|       |   * the number of parts specified.
  176|       |   */
  177|      0|  n = pp - parts + 1;
  178|      0|  switch (n) {
  ------------------
  |  Branch (178:11): [True: 0, False: 0]
  ------------------
  179|      0|    case 1: /*%< a -- 32 bits */
  ------------------
  |  Branch (179:5): [True: 0, False: 0]
  ------------------
  180|      0|      break;
  181|       |
  182|      0|    case 2: /*%< a.b -- 8.24 bits */
  ------------------
  |  Branch (182:5): [True: 0, False: 0]
  ------------------
  183|      0|      if (val > 0xffffffU) {
  ------------------
  |  Branch (183:11): [True: 0, False: 0]
  ------------------
  184|      0|        return (0);
  185|      0|      }
  186|      0|      val |= (unsigned int)parts[0] << 24;
  187|      0|      break;
  188|       |
  189|      0|    case 3: /*%< a.b.c -- 8.8.16 bits */
  ------------------
  |  Branch (189:5): [True: 0, False: 0]
  ------------------
  190|      0|      if (val > 0xffffU) {
  ------------------
  |  Branch (190:11): [True: 0, False: 0]
  ------------------
  191|      0|        return (0);
  192|      0|      }
  193|      0|      val |= ((unsigned int)parts[0] << 24) | ((unsigned int)parts[1] << 16);
  194|      0|      break;
  195|       |
  196|      0|    case 4: /*%< a.b.c.d -- 8.8.8.8 bits */
  ------------------
  |  Branch (196:5): [True: 0, False: 0]
  ------------------
  197|      0|      if (val > 0xffU) {
  ------------------
  |  Branch (197:11): [True: 0, False: 0]
  ------------------
  198|      0|        return (0);
  199|      0|      }
  200|      0|      val |= ((unsigned int)parts[0] << 24) | ((unsigned int)parts[1] << 16) |
  201|      0|             ((unsigned int)parts[2] << 8);
  202|      0|      break;
  203|      0|  }
  204|      0|  *addr = PR_htonl(val);
  205|      0|  return (1);
  206|      0|}
praton.c:_isdigit:
   94|  11.0k|static PRBool _isdigit(char c) { return c >= '0' && c <= '9'; }
  ------------------
  |  Branch (94:41): [True: 11.0k, False: 0]
  |  Branch (94:53): [True: 0, False: 11.0k]
  ------------------

_PR_InitDtoa:
   25|      1|void _PR_InitDtoa(void) {
   26|      1|  dtoa_lock[0] = PR_NewLock();
   27|      1|  dtoa_lock[1] = PR_NewLock();
   28|      1|}

_PR_InitEnv:
   65|      1|void _PR_InitEnv(void) { _PR_NEW_LOCK_ENV(); }
  ------------------
  |  |   45|      1|    { _pr_envLock = PR_NewLock(); }
  ------------------
PR_GetEnv:
   69|     14|PR_IMPLEMENT(char*) PR_GetEnv(const char* var) {
   70|     14|  char* ev;
   71|       |
   72|     14|  if (!_pr_initialized) {
  ------------------
  |  Branch (72:7): [True: 0, False: 14]
  ------------------
   73|      0|    _PR_ImplicitInitialization();
   74|      0|  }
   75|       |
   76|     14|  _PR_LOCK_ENV();
  ------------------
  |  |   54|     14|    {                                        \
  |  |   55|     14|      if (_pr_envLock) PR_Lock(_pr_envLock); \
  |  |  ------------------
  |  |  |  Branch (55:11): [True: 3, False: 11]
  |  |  ------------------
  |  |   56|     14|    }
  ------------------
   77|     14|  ev = _PR_MD_GET_ENV(var);
  ------------------
  |  | 1923|     14|#define    _PR_MD_GET_ENV _MD_GET_ENV
  |  |  ------------------
  |  |  |  |  266|     14|#define _MD_GET_ENV             getenv
  |  |  ------------------
  ------------------
   78|     14|  _PR_UNLOCK_ENV();
  ------------------
  |  |   58|     14|    {                                          \
  |  |   59|     14|      if (_pr_envLock) PR_Unlock(_pr_envLock); \
  |  |  ------------------
  |  |  |  Branch (59:11): [True: 3, False: 11]
  |  |  ------------------
  |  |   60|     14|    }
  ------------------
   79|     14|  return ev;
   80|     14|}
PR_GetEnvSecure:
   82|  8.77k|PR_IMPLEMENT(char*) PR_GetEnvSecure(const char* var) {
   83|  8.77k|#ifdef HAVE_SECURE_GETENV
   84|  8.77k|  char* ev;
   85|       |
   86|  8.77k|  if (!_pr_initialized) {
  ------------------
  |  Branch (86:7): [True: 0, False: 8.77k]
  ------------------
   87|      0|    _PR_ImplicitInitialization();
   88|      0|  }
   89|       |
   90|  8.77k|  _PR_LOCK_ENV();
  ------------------
  |  |   54|  8.77k|    {                                        \
  |  |   55|  8.77k|      if (_pr_envLock) PR_Lock(_pr_envLock); \
  |  |  ------------------
  |  |  |  Branch (55:11): [True: 8.77k, False: 0]
  |  |  ------------------
  |  |   56|  8.77k|    }
  ------------------
   91|  8.77k|  ev = secure_getenv(var);
   92|  8.77k|  _PR_UNLOCK_ENV();
  ------------------
  |  |   58|  8.77k|    {                                          \
  |  |   59|  8.77k|      if (_pr_envLock) PR_Unlock(_pr_envLock); \
  |  |  ------------------
  |  |  |  Branch (59:11): [True: 8.77k, False: 0]
  |  |  ------------------
  |  |   60|  8.77k|    }
  ------------------
   93|       |
   94|  8.77k|  return ev;
   95|       |#else
   96|       |#  ifdef XP_UNIX
   97|       |  /*
   98|       |  ** Fall back to checking uids and gids.  This won't detect any other
   99|       |  ** privilege-granting mechanisms the platform may have.  This also
  100|       |  ** can't detect the case where the process already called
  101|       |  ** setuid(geteuid()) and/or setgid(getegid()).
  102|       |  */
  103|       |  if (getuid() != geteuid() || getgid() != getegid()) {
  104|       |    return NULL;
  105|       |  }
  106|       |#  endif /* XP_UNIX */
  107|       |  return PR_GetEnv(var);
  108|       |#endif   /* HAVE_SECURE_GETENV */
  109|  8.77k|}

nspr_InitializePRErrorTable:
  120|      1|void nspr_InitializePRErrorTable(void) { PR_ErrorInstallTable(&et); }

PR_GetError:
   11|  51.9k|PR_IMPLEMENT(PRErrorCode) PR_GetError(void) {
   12|  51.9k|  PRThread* thread = PR_GetCurrentThread();
   13|  51.9k|  return thread->errorCode;
   14|  51.9k|}
PR_SetError:
   21|   277k|PR_IMPLEMENT(void) PR_SetError(PRErrorCode code, PRInt32 osErr) {
   22|   277k|  PRThread* thread = PR_GetCurrentThread();
   23|   277k|  thread->errorCode = code;
   24|   277k|  thread->osErrorCode = osErr;
   25|   277k|  thread->errorStringLength = 0;
   26|   277k|}

PR_ErrorInstallTable:
  154|      3|PR_ErrorInstallTable(const struct PRErrorTable* table) {
  155|      3|  struct PRErrorTableList* new_et;
  156|       |
  157|      3|  new_et = (struct PRErrorTableList*)PR_Malloc(sizeof(struct PRErrorTableList));
  158|      3|  if (!new_et) {
  ------------------
  |  Branch (158:7): [True: 0, False: 3]
  ------------------
  159|      0|    return errno; /* oops */
  160|      0|  }
  161|      3|  new_et->table = table;
  162|      3|  if (callback_newtable) {
  ------------------
  |  Branch (162:7): [True: 0, False: 3]
  ------------------
  163|      0|    new_et->table_private = callback_newtable(table, callback_private);
  164|      3|  } else {
  165|      3|    new_et->table_private = 0;
  166|      3|  }
  167|      3|  new_et->next = Table_List;
  168|      3|  Table_List = new_et;
  169|      3|  return 0;
  170|      3|}

_PR_ImplicitInitialization:
  200|      1|void _PR_ImplicitInitialization(void) {
  201|      1|  _PR_InitStuff();
  202|       |
  203|       |  /* Enable interrupts */
  204|       |#if !defined(_PR_PTHREADS) && !defined(_PR_GLOBAL_THREADS_ONLY)
  205|       |  _PR_MD_START_INTERRUPTS();
  206|       |#endif
  207|      1|}
PR_CallOnce:
  706|   246k|PR_IMPLEMENT(PRStatus) PR_CallOnce(PRCallOnceType* once, PRCallOnceFN func) {
  707|   246k|  if (!_pr_initialized) {
  ------------------
  |  Branch (707:7): [True: 1, False: 246k]
  ------------------
  708|      1|    _PR_ImplicitInitialization();
  709|      1|  }
  710|       |
  711|   246k|  PR_Lock(mod_init.ml);
  712|   246k|  PRIntn initialized = once->initialized;
  713|   246k|  PRStatus status = once->status;
  714|   246k|  PR_Unlock(mod_init.ml);
  715|   246k|  if (!initialized) {
  ------------------
  |  Branch (715:7): [True: 12, False: 246k]
  ------------------
  716|     12|    if (PR_ATOMIC_SET(&once->inProgress, 1) == 0) {
  ------------------
  |  |  124|     12|#define PR_ATOMIC_SET(val, newval) __sync_lock_test_and_set(val, newval)
  ------------------
  |  Branch (716:9): [True: 12, False: 0]
  ------------------
  717|     12|      status = (*func)();
  718|     12|      PR_Lock(mod_init.ml);
  719|     12|      once->status = status;
  720|     12|      once->initialized = 1;
  721|     12|      PR_NotifyAllCondVar(mod_init.cv);
  722|     12|      PR_Unlock(mod_init.ml);
  723|     12|    } else {
  724|      0|      PR_Lock(mod_init.ml);
  725|      0|      while (!once->initialized) {
  ------------------
  |  Branch (725:14): [True: 0, False: 0]
  ------------------
  726|      0|        PR_WaitCondVar(mod_init.cv, PR_INTERVAL_NO_TIMEOUT);
  ------------------
  |  |   54|      0|#define PR_INTERVAL_NO_TIMEOUT 0xffffffffUL
  ------------------
  727|      0|      }
  728|      0|      status = once->status;
  729|      0|      PR_Unlock(mod_init.ml);
  730|      0|      if (PR_SUCCESS != status) {
  ------------------
  |  Branch (730:11): [True: 0, False: 0]
  ------------------
  731|      0|        PR_SetError(PR_CALL_ONCE_ERROR, 0);
  ------------------
  |  |  241|      0|#define PR_CALL_ONCE_ERROR                       (-5925L)
  ------------------
  732|      0|      }
  733|      0|    }
  734|     12|    return status;
  735|     12|  }
  736|   246k|  if (PR_SUCCESS != status) {
  ------------------
  |  Branch (736:7): [True: 0, False: 246k]
  ------------------
  737|      0|    PR_SetError(PR_CALL_ONCE_ERROR, 0);
  ------------------
  |  |  241|      0|#define PR_CALL_ONCE_ERROR                       (-5925L)
  ------------------
  738|      0|  }
  739|   246k|  return status;
  740|   246k|}
PR_CallOnceWithArg:
  743|   251k|PR_CallOnceWithArg(PRCallOnceType* once, PRCallOnceWithArgFN func, void* arg) {
  744|   251k|  if (!_pr_initialized) {
  ------------------
  |  Branch (744:7): [True: 0, False: 251k]
  ------------------
  745|      0|    _PR_ImplicitInitialization();
  746|      0|  }
  747|       |
  748|   251k|  PR_Lock(mod_init.ml);
  749|   251k|  PRIntn initialized = once->initialized;
  750|   251k|  PRStatus status = once->status;
  751|   251k|  PR_Unlock(mod_init.ml);
  752|   251k|  if (!initialized) {
  ------------------
  |  Branch (752:7): [True: 24, False: 251k]
  ------------------
  753|     24|    if (PR_ATOMIC_SET(&once->inProgress, 1) == 0) {
  ------------------
  |  |  124|     24|#define PR_ATOMIC_SET(val, newval) __sync_lock_test_and_set(val, newval)
  ------------------
  |  Branch (753:9): [True: 24, False: 0]
  ------------------
  754|     24|      status = (*func)(arg);
  755|     24|      PR_Lock(mod_init.ml);
  756|     24|      once->status = status;
  757|     24|      once->initialized = 1;
  758|     24|      PR_NotifyAllCondVar(mod_init.cv);
  759|     24|      PR_Unlock(mod_init.ml);
  760|     24|    } else {
  761|      0|      PR_Lock(mod_init.ml);
  762|      0|      while (!once->initialized) {
  ------------------
  |  Branch (762:14): [True: 0, False: 0]
  ------------------
  763|      0|        PR_WaitCondVar(mod_init.cv, PR_INTERVAL_NO_TIMEOUT);
  ------------------
  |  |   54|      0|#define PR_INTERVAL_NO_TIMEOUT 0xffffffffUL
  ------------------
  764|      0|      }
  765|      0|      status = once->status;
  766|      0|      PR_Unlock(mod_init.ml);
  767|      0|      if (PR_SUCCESS != status) {
  ------------------
  |  Branch (767:11): [True: 0, False: 0]
  ------------------
  768|      0|        PR_SetError(PR_CALL_ONCE_ERROR, 0);
  ------------------
  |  |  241|      0|#define PR_CALL_ONCE_ERROR                       (-5925L)
  ------------------
  769|      0|      }
  770|      0|    }
  771|     24|    return status;
  772|     24|  }
  773|   251k|  if (PR_SUCCESS != status) {
  ------------------
  |  Branch (773:7): [True: 0, False: 251k]
  ------------------
  774|      0|    PR_SetError(PR_CALL_ONCE_ERROR, 0);
  ------------------
  |  |  241|      0|#define PR_CALL_ONCE_ERROR                       (-5925L)
  ------------------
  775|      0|  }
  776|   251k|  return status;
  777|   251k|}
prinit.c:_PR_InitStuff:
  129|      1|static void _PR_InitStuff(void) {
  130|      1|  if (_pr_initialized) {
  ------------------
  |  Branch (130:7): [True: 0, False: 1]
  ------------------
  131|      0|    return;
  132|      0|  }
  133|      1|  _pr_initialized = PR_TRUE;
  ------------------
  |  |  437|      1|#define PR_TRUE 1
  ------------------
  134|      1|#ifdef _PR_ZONE_ALLOCATOR
  135|      1|  _PR_InitZones();
  136|      1|#endif
  137|       |#ifdef WINNT
  138|       |  _pr_SetNativeThreadsOnlyMode();
  139|       |#endif
  140|       |
  141|      1|  (void)PR_GetPageSize();
  142|       |
  143|      1|  _pr_clock_lm = PR_NewLogModule("clock");
  144|      1|  _pr_cmon_lm = PR_NewLogModule("cmon");
  145|      1|  _pr_io_lm = PR_NewLogModule("io");
  146|      1|  _pr_mon_lm = PR_NewLogModule("mon");
  147|      1|  _pr_linker_lm = PR_NewLogModule("linker");
  148|      1|  _pr_cvar_lm = PR_NewLogModule("cvar");
  149|      1|  _pr_sched_lm = PR_NewLogModule("sched");
  150|      1|  _pr_thread_lm = PR_NewLogModule("thread");
  151|      1|  _pr_gc_lm = PR_NewLogModule("gc");
  152|      1|  _pr_shm_lm = PR_NewLogModule("shm");
  153|      1|  _pr_shma_lm = PR_NewLogModule("shma");
  154|       |
  155|       |  /* NOTE: These init's cannot depend on _PR_MD_CURRENT_THREAD() */
  156|      1|  _PR_MD_EARLY_INIT();
  ------------------
  |  | 1888|      1|#define    _PR_MD_EARLY_INIT _MD_EARLY_INIT
  |  |  ------------------
  |  |  |  |  712|      1|#define _MD_EARLY_INIT                  _MD_EarlyInit
  |  |  ------------------
  ------------------
  157|       |
  158|      1|  _PR_InitLocks();
  159|      1|  _PR_InitAtomic();
  160|      1|  _PR_InitSegs();
  161|      1|  _PR_InitStacks();
  162|      1|  _PR_InitTPD();
  163|      1|  _PR_InitEnv();
  164|      1|  _PR_InitLayerCache();
  165|      1|  _PR_InitClock();
  166|       |
  167|      1|  _pr_sleeplock = PR_NewLock();
  168|      1|  PR_ASSERT(NULL != _pr_sleeplock);
  ------------------
  |  |  208|      1|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  169|       |
  170|      1|  _PR_InitThreads(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
  171|       |
  172|      1|#ifndef _PR_GLOBAL_THREADS_ONLY
  173|      1|  _PR_InitCPUs();
  174|      1|#endif
  175|       |
  176|       |  /*
  177|       |   * XXX: call _PR_InitMem only on those platforms for which nspr implements
  178|       |   *  malloc, for now.
  179|       |   */
  180|       |#ifdef _PR_OVERRIDE_MALLOC
  181|       |  _PR_InitMem();
  182|       |#endif
  183|       |
  184|      1|  _PR_InitCMon();
  185|      1|  _PR_InitIO();
  186|      1|  _PR_InitNet();
  187|      1|  _PR_InitTime();
  188|      1|  _PR_InitLog();
  189|      1|  _PR_InitLinker();
  190|      1|  _PR_InitCallOnce();
  191|      1|  _PR_InitDtoa();
  192|      1|  _PR_InitMW();
  193|      1|  _PR_InitRWLocks();
  194|       |
  195|      1|  nspr_InitializePRErrorTable();
  196|       |
  197|      1|  _PR_MD_FINAL_INIT();
  ------------------
  |  | 1894|      1|#define    _PR_MD_FINAL_INIT _MD_FINAL_INIT
  |  |  ------------------
  |  |  |  |  713|      1|#define _MD_FINAL_INIT                  _PR_UnixInit
  |  |  ------------------
  ------------------
  198|      1|}
prinit.c:_PR_InitCallOnce:
  692|      1|static void _PR_InitCallOnce(void) {
  693|      1|  mod_init.ml = PR_NewLock();
  694|      1|  PR_ASSERT(NULL != mod_init.ml);
  ------------------
  |  |  208|      1|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  695|      1|  mod_init.cv = PR_NewCondVar(mod_init.ml);
  696|      1|  PR_ASSERT(NULL != mod_init.cv);
  ------------------
  |  |  208|      1|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  697|      1|}

_PR_InitClock:
   22|      1|void _PR_InitClock(void) {
   23|      1|  _PR_MD_INTERVAL_INIT();
   24|      1|#ifdef DEBUG
   25|      1|  {
   26|      1|    PRIntervalTime ticksPerSec = PR_TicksPerSecond();
   27|       |
   28|      1|    PR_ASSERT(ticksPerSec >= PR_INTERVAL_MIN);
  ------------------
  |  |  208|      1|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 1, False: 0]
  |  |  ------------------
  ------------------
   29|      1|    PR_ASSERT(ticksPerSec <= PR_INTERVAL_MAX);
  ------------------
  |  |  208|      1|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 1, False: 0]
  |  |  ------------------
  ------------------
   30|      1|  }
   31|      1|#endif /* DEBUG */
   32|      1|}
PR_IntervalNow:
   34|  19.4k|PR_IMPLEMENT(PRIntervalTime) PR_IntervalNow(void) {
   35|  19.4k|  if (!_pr_initialized) {
  ------------------
  |  Branch (35:7): [True: 0, False: 19.4k]
  ------------------
   36|      0|    _PR_ImplicitInitialization();
   37|      0|  }
   38|  19.4k|  return _PR_MD_GET_INTERVAL();
  ------------------
  |  | 1963|  19.4k|#define _PR_MD_GET_INTERVAL _MD_GET_INTERVAL
  |  |  ------------------
  |  |  |  |  305|  19.4k|#define _MD_GET_INTERVAL        _PR_UNIX_GetInterval2
  |  |  ------------------
  ------------------
   39|  19.4k|} /* PR_IntervalNow */
PR_TicksPerSecond:
   41|  4.52k|PR_EXTERN(PRUint32) PR_TicksPerSecond(void) {
   42|  4.52k|  if (!_pr_initialized) {
  ------------------
  |  Branch (42:7): [True: 0, False: 4.52k]
  ------------------
   43|      0|    _PR_ImplicitInitialization();
   44|      0|  }
   45|  4.52k|  return _PR_MD_INTERVAL_PER_SEC();
  ------------------
  |  | 1966|  4.52k|#define _PR_MD_INTERVAL_PER_SEC _MD_INTERVAL_PER_SEC
  |  |  ------------------
  |  |  |  |  306|  4.52k|#define _MD_INTERVAL_PER_SEC        _PR_UNIX_TicksPerSecond2
  |  |  ------------------
  ------------------
   46|  4.52k|} /* PR_TicksPerSecond */
PR_MillisecondsToInterval:
   52|  4.52k|PR_IMPLEMENT(PRIntervalTime) PR_MillisecondsToInterval(PRUint32 milli) {
   53|  4.52k|  PRIntervalTime ticks;
   54|  4.52k|  PRUint64 tock, tps, msecPerSec, rounding;
   55|  4.52k|  LL_UI2L(tock, milli);
  ------------------
  |  |  150|  4.52k|#define LL_UI2L(l, ui)        ((l) = (PRInt64)(ui))
  ------------------
   56|  4.52k|  LL_I2L(msecPerSec, PR_MSEC_PER_SEC);
  ------------------
  |  |  149|  4.52k|#define LL_I2L(l, i)        ((l) = (PRInt64)(i))
  ------------------
   57|  4.52k|  LL_I2L(rounding, (PR_MSEC_PER_SEC >> 1));
  ------------------
  |  |  149|  4.52k|#define LL_I2L(l, i)        ((l) = (PRInt64)(i))
  ------------------
   58|  4.52k|  LL_I2L(tps, PR_TicksPerSecond());
  ------------------
  |  |  149|  4.52k|#define LL_I2L(l, i)        ((l) = (PRInt64)(i))
  ------------------
   59|  4.52k|  LL_MUL(tock, tock, tps);
  ------------------
  |  |  115|  4.52k|#define LL_MUL(r, a, b)        ((r) = (a) * (b))
  ------------------
   60|  4.52k|  LL_ADD(tock, tock, rounding);
  ------------------
  |  |  105|  4.52k|#define LL_ADD(r, a, b)     ((r) = (a) + (b))
  ------------------
   61|  4.52k|  LL_DIV(tock, tock, msecPerSec);
  ------------------
  |  |  116|  4.52k|#define LL_DIV(r, a, b)        ((r) = (a) / (b))
  ------------------
   62|  4.52k|  LL_L2UI(ticks, tock);
  ------------------
  |  |  145|  4.52k|#define LL_L2UI(ui, l)        ((ui) = (PRUint32)(l))
  ------------------
   63|  4.52k|  return ticks;
   64|  4.52k|} /* PR_MillisecondsToInterval */

PR_CeilingLog2:
   11|      7|PR_IMPLEMENT(PRIntn) PR_CeilingLog2(PRUint32 n) {
   12|      7|  PRIntn log2;
   13|      7|  PR_CEILING_LOG2(log2, n);
  ------------------
  |  |   72|      7|  PR_BEGIN_MACRO                       \
  |  |  ------------------
  |  |  |  |  123|      7|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |   73|      7|    PRUint32 j_ = (PRUint32)(_n);      \
  |  |   74|      7|    (_log2) = (j_ <= 1 ? 0 : 32 - pr_bitscan_clz32(j_ - 1)); \
  |  |  ------------------
  |  |  |  |   40|      7|# define pr_bitscan_clz32(val)  __builtin_clz(val)
  |  |  ------------------
  |  |  |  Branch (74:16): [True: 0, False: 7]
  |  |  ------------------
  |  |   75|      7|  PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|      7|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   14|      7|  return log2;
   15|      7|}

_PR_InitNet:
  358|      1|void _PR_InitNet(void) {
  359|      1|#if defined(XP_UNIX)
  360|       |#  ifdef HAVE_NETCONFIG
  361|       |  /*
  362|       |   * This one-liner prevents the endless re-open's and re-read's of
  363|       |   * /etc/netconfig on EACH and EVERY call to accept(), connect(), etc.
  364|       |   */
  365|       |  (void)setnetconfig();
  366|       |#  endif
  367|      1|#endif
  368|       |#if !defined(_PR_NO_DNS_LOCK)
  369|       |  _pr_dnsLock = PR_NewLock();
  370|       |#endif
  371|       |#if !defined(_PR_HAVE_GETPROTO_R)
  372|       |  _getproto_lock = PR_NewLock();
  373|       |#endif
  374|      1|#if defined(_PR_INET6) && defined(_PR_HAVE_GETHOSTBYNAME2)
  375|      1|  _pr_query_ifs_lock = PR_NewLock();
  376|      1|#endif
  377|      1|}
PR_ConvertIPv4AddrToIPv6:
 1754|  9.36k|PR_ConvertIPv4AddrToIPv6(PRUint32 v4addr, PRIPv6Addr* v6addr) {
 1755|  9.36k|  PRUint8* dstp;
 1756|  9.36k|  dstp = v6addr->pr_s6_addr;
  ------------------
  |  |  138|  9.36k|#define pr_s6_addr      _S6_un._S6_u8
  ------------------
 1757|  9.36k|  memset(dstp, 0, 10);
 1758|  9.36k|  memset(dstp + 10, 0xff, 2);
 1759|  9.36k|  memcpy(dstp + 12, (char*)&v4addr, 4);
 1760|  9.36k|}
PR_htonll:
 1779|  2.18M|PR_IMPLEMENT(PRUint64) PR_htonll(PRUint64 n) {
 1780|       |#ifdef IS_BIG_ENDIAN
 1781|       |  return n;
 1782|       |#else
 1783|  2.18M|  PRUint32 hi, lo;
 1784|  2.18M|  lo = (PRUint32)n;
 1785|  2.18M|  hi = (PRUint32)(n >> 32);
 1786|  2.18M|  hi = htonl(hi);
 1787|  2.18M|  lo = htonl(lo);
 1788|  2.18M|  return ((PRUint64)lo << 32) + (PRUint64)hi;
 1789|  2.18M|#endif
 1790|  2.18M|} /* htonll */
PR_StringToNetAddr:
 2244|  11.0k|PR_IMPLEMENT(PRStatus) PR_StringToNetAddr(const char* string, PRNetAddr* addr) {
 2245|  11.0k|  if (!_pr_initialized) {
  ------------------
  |  Branch (2245:7): [True: 0, False: 11.0k]
  ------------------
 2246|      0|    _PR_ImplicitInitialization();
 2247|      0|  }
 2248|       |
 2249|  11.0k|  if (!addr || !string || !*string) {
  ------------------
  |  Branch (2249:7): [True: 0, False: 11.0k]
  |  Branch (2249:16): [True: 0, False: 11.0k]
  |  Branch (2249:27): [True: 0, False: 11.0k]
  ------------------
 2250|      0|    PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0);
  ------------------
  |  |   55|      0|#define PR_INVALID_ARGUMENT_ERROR                (-5987L)
  ------------------
 2251|      0|    return PR_FAILURE;
 2252|      0|  }
 2253|       |
 2254|       |#if !defined(_PR_HAVE_GETADDRINFO)
 2255|       |  return pr_StringToNetAddrFB(string, addr);
 2256|       |#else
 2257|       |  /*
 2258|       |   * getaddrinfo with AI_NUMERICHOST is much slower than pr_inet_aton on some
 2259|       |   * platforms, such as Mac OS X (bug 404399), Linux glibc 2.10 (bug 344809),
 2260|       |   * and most likely others. So we only use it to convert literal IP addresses
 2261|       |   * that contain IPv6 scope IDs, which pr_inet_aton cannot convert.
 2262|       |   */
 2263|  11.0k|  if (!strchr(string, '%')) {
  ------------------
  |  Branch (2263:7): [True: 11.0k, False: 0]
  ------------------
 2264|  11.0k|    return pr_StringToNetAddrFB(string, addr);
 2265|  11.0k|  }
 2266|       |
 2267|      0|#  if defined(_PR_INET6_PROBE)
 2268|      0|  if (!_pr_ipv6_is_present()) {
  ------------------
  |  Branch (2268:7): [True: 0, False: 0]
  ------------------
 2269|      0|    return pr_StringToNetAddrFB(string, addr);
 2270|      0|  }
 2271|      0|#  endif
 2272|       |
 2273|      0|  return pr_StringToNetAddrGAI(string, addr);
 2274|      0|#endif
 2275|      0|}
prnetdb.c:pr_StringToNetAddrFB:
 2220|  11.0k|static PRStatus pr_StringToNetAddrFB(const char* string, PRNetAddr* addr) {
 2221|  11.0k|  PRIntn rv;
 2222|       |
 2223|  11.0k|  rv = pr_inet_aton(string, &addr->inet.ip);
 2224|  11.0k|  if (1 == rv) {
  ------------------
  |  Branch (2224:7): [True: 0, False: 11.0k]
  ------------------
 2225|      0|    addr->raw.family = AF_INET;
 2226|      0|    return PR_SUCCESS;
 2227|      0|  }
 2228|       |
 2229|  11.0k|  PR_ASSERT(0 == rv);
  ------------------
  |  |  208|  11.0k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 11.0k, False: 0]
  |  |  ------------------
  ------------------
 2230|       |  /* clean up after the failed call */
 2231|  11.0k|  memset(&addr->inet.ip, 0, sizeof(addr->inet.ip));
 2232|       |
 2233|  11.0k|  rv = StringToV6Addr(string, &addr->ipv6.ip);
 2234|  11.0k|  if (1 == rv) {
  ------------------
  |  Branch (2234:7): [True: 0, False: 11.0k]
  ------------------
 2235|      0|    addr->raw.family = PR_AF_INET6;
  ------------------
  |  |   27|      0|#define PR_AF_INET6 10  /* same as AF_INET6 */
  ------------------
 2236|      0|    return PR_SUCCESS;
 2237|      0|  }
 2238|       |
 2239|  11.0k|  PR_ASSERT(0 == rv);
  ------------------
  |  |  208|  11.0k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 11.0k, False: 0]
  |  |  ------------------
  ------------------
 2240|  11.0k|  PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0);
  ------------------
  |  |   55|  11.0k|#define PR_INVALID_ARGUMENT_ERROR                (-5987L)
  ------------------
 2241|  11.0k|  return PR_FAILURE;
 2242|  11.0k|}
prnetdb.c:StringToV6Addr:
 1486|  11.0k|static int StringToV6Addr(const char* string, PRIPv6Addr* addr) {
 1487|  11.0k|  const unsigned char* s = (const unsigned char*)string;
 1488|  11.0k|  int section = 0;       /* index of the current section (a 16-bit
 1489|       |                          * piece of the address */
 1490|  11.0k|  int double_colon = -1; /* index of the section after the first
 1491|       |                          * 16-bit group of zeros represented by
 1492|       |                          * the double colon */
 1493|  11.0k|  unsigned int val;
 1494|  11.0k|  int len;
 1495|       |
 1496|       |  /* Handle initial (double) colon */
 1497|  11.0k|  if (*s == ':') {
  ------------------
  |  Branch (1497:7): [True: 0, False: 11.0k]
  ------------------
 1498|      0|    if (s[1] != ':') {
  ------------------
  |  Branch (1498:9): [True: 0, False: 0]
  ------------------
 1499|      0|      return 0;
 1500|      0|    }
 1501|      0|    s += 2;
 1502|      0|    addr->pr_s6_addr16[0] = 0;
  ------------------
  |  |  139|      0|#define pr_s6_addr16    _S6_un._S6_u16
  ------------------
 1503|      0|    section = double_colon = 1;
 1504|      0|  }
 1505|       |
 1506|  11.0k|  while (*s) {
  ------------------
  |  Branch (1506:10): [True: 11.0k, False: 0]
  ------------------
 1507|  11.0k|    if (section == 8) {
  ------------------
  |  Branch (1507:9): [True: 0, False: 11.0k]
  ------------------
 1508|      0|      return 0; /* too long */
 1509|      0|    }
 1510|  11.0k|    if (*s == ':') {
  ------------------
  |  Branch (1510:9): [True: 0, False: 11.0k]
  ------------------
 1511|      0|      if (double_colon != -1) {
  ------------------
  |  Branch (1511:11): [True: 0, False: 0]
  ------------------
 1512|      0|        return 0; /* two double colons */
 1513|      0|      }
 1514|      0|      addr->pr_s6_addr16[section++] = 0;
  ------------------
  |  |  139|      0|#define pr_s6_addr16    _S6_un._S6_u16
  ------------------
 1515|      0|      double_colon = section;
 1516|      0|      s++;
 1517|      0|      continue;
 1518|      0|    }
 1519|  22.0k|    for (len = val = 0; len < 4 && index_hex[*s] != XX; len++) {
  ------------------
  |  | 1463|  22.0k|#define XX 127
  ------------------
  |  Branch (1519:25): [True: 22.0k, False: 0]
  |  Branch (1519:36): [True: 11.0k, False: 11.0k]
  ------------------
 1520|  11.0k|      val = (val << 4) + index_hex[*s++];
 1521|  11.0k|    }
 1522|  11.0k|    if (*s == '.') {
  ------------------
  |  Branch (1522:9): [True: 0, False: 11.0k]
  ------------------
 1523|      0|      if (len == 0) {
  ------------------
  |  Branch (1523:11): [True: 0, False: 0]
  ------------------
 1524|      0|        return 0; /* nothing between : and . */
 1525|      0|      }
 1526|      0|      break;
 1527|      0|    }
 1528|  11.0k|    if (*s == ':') {
  ------------------
  |  Branch (1528:9): [True: 0, False: 11.0k]
  ------------------
 1529|      0|      s++;
 1530|      0|      if (!*s) {
  ------------------
  |  Branch (1530:11): [True: 0, False: 0]
  ------------------
 1531|      0|        return 0; /* cannot end with single colon */
 1532|      0|      }
 1533|  11.0k|    } else if (*s) {
  ------------------
  |  Branch (1533:16): [True: 11.0k, False: 0]
  ------------------
 1534|  11.0k|      return 0; /* bad character */
 1535|  11.0k|    }
 1536|      0|    addr->pr_s6_addr16[section++] = htons((unsigned short)val);
  ------------------
  |  |  139|      0|#define pr_s6_addr16    _S6_un._S6_u16
  ------------------
 1537|      0|  }
 1538|       |
 1539|      0|  if (*s == '.') {
  ------------------
  |  Branch (1539:7): [True: 0, False: 0]
  ------------------
 1540|       |    /* Have a trailing v4 format address */
 1541|      0|    if (section > 6) {
  ------------------
  |  Branch (1541:9): [True: 0, False: 0]
  ------------------
 1542|      0|      return 0; /* not enough room */
 1543|      0|    }
 1544|       |
 1545|       |    /*
 1546|       |     * The number before the '.' is decimal, but we parsed it
 1547|       |     * as hex.  That means it is in BCD.  Check it for validity
 1548|       |     * and convert it to binary.
 1549|       |     */
 1550|      0|    if (val > 0x0255 || (val & 0xf0) > 0x90 || (val & 0xf) > 9) {
  ------------------
  |  Branch (1550:9): [True: 0, False: 0]
  |  Branch (1550:25): [True: 0, False: 0]
  |  Branch (1550:48): [True: 0, False: 0]
  ------------------
 1551|      0|      return 0;
 1552|      0|    }
 1553|      0|    val = (val >> 8) * 100 + ((val >> 4) & 0xf) * 10 + (val & 0xf);
 1554|      0|    addr->pr_s6_addr[2 * section] = val;
  ------------------
  |  |  138|      0|#define pr_s6_addr      _S6_un._S6_u8
  ------------------
 1555|       |
 1556|      0|    s++;
 1557|      0|    val = index_hex[*s++];
 1558|      0|    if (val > 9) {
  ------------------
  |  Branch (1558:9): [True: 0, False: 0]
  ------------------
 1559|      0|      return 0;
 1560|      0|    }
 1561|      0|    while (*s >= '0' && *s <= '9') {
  ------------------
  |  Branch (1561:12): [True: 0, False: 0]
  |  Branch (1561:25): [True: 0, False: 0]
  ------------------
 1562|      0|      val = val * 10 + *s++ - '0';
 1563|      0|      if (val > 255) {
  ------------------
  |  Branch (1563:11): [True: 0, False: 0]
  ------------------
 1564|      0|        return 0;
 1565|      0|      }
 1566|      0|    }
 1567|      0|    if (*s != '.') {
  ------------------
  |  Branch (1567:9): [True: 0, False: 0]
  ------------------
 1568|      0|      return 0; /* must have exactly 4 decimal numbers */
 1569|      0|    }
 1570|      0|    addr->pr_s6_addr[2 * section + 1] = val;
  ------------------
  |  |  138|      0|#define pr_s6_addr      _S6_un._S6_u8
  ------------------
 1571|      0|    section++;
 1572|       |
 1573|      0|    s++;
 1574|      0|    val = index_hex[*s++];
 1575|      0|    if (val > 9) {
  ------------------
  |  Branch (1575:9): [True: 0, False: 0]
  ------------------
 1576|      0|      return 0;
 1577|      0|    }
 1578|      0|    while (*s >= '0' && *s <= '9') {
  ------------------
  |  Branch (1578:12): [True: 0, False: 0]
  |  Branch (1578:25): [True: 0, False: 0]
  ------------------
 1579|      0|      val = val * 10 + *s++ - '0';
 1580|      0|      if (val > 255) {
  ------------------
  |  Branch (1580:11): [True: 0, False: 0]
  ------------------
 1581|      0|        return 0;
 1582|      0|      }
 1583|      0|    }
 1584|      0|    if (*s != '.') {
  ------------------
  |  Branch (1584:9): [True: 0, False: 0]
  ------------------
 1585|      0|      return 0; /* must have exactly 4 decimal numbers */
 1586|      0|    }
 1587|      0|    addr->pr_s6_addr[2 * section] = val;
  ------------------
  |  |  138|      0|#define pr_s6_addr      _S6_un._S6_u8
  ------------------
 1588|       |
 1589|      0|    s++;
 1590|      0|    val = index_hex[*s++];
 1591|      0|    if (val > 9) {
  ------------------
  |  Branch (1591:9): [True: 0, False: 0]
  ------------------
 1592|      0|      return 0;
 1593|      0|    }
 1594|      0|    while (*s >= '0' && *s <= '9') {
  ------------------
  |  Branch (1594:12): [True: 0, False: 0]
  |  Branch (1594:25): [True: 0, False: 0]
  ------------------
 1595|      0|      val = val * 10 + *s++ - '0';
 1596|      0|      if (val > 255) {
  ------------------
  |  Branch (1596:11): [True: 0, False: 0]
  ------------------
 1597|      0|        return 0;
 1598|      0|      }
 1599|      0|    }
 1600|      0|    if (*s) {
  ------------------
  |  Branch (1600:9): [True: 0, False: 0]
  ------------------
 1601|      0|      return 0; /* must have exactly 4 decimal numbers */
 1602|      0|    }
 1603|      0|    addr->pr_s6_addr[2 * section + 1] = val;
  ------------------
  |  |  138|      0|#define pr_s6_addr      _S6_un._S6_u8
  ------------------
 1604|      0|    section++;
 1605|      0|  }
 1606|       |
 1607|      0|  if (double_colon != -1) {
  ------------------
  |  Branch (1607:7): [True: 0, False: 0]
  ------------------
 1608|       |    /* Stretch the double colon */
 1609|      0|    int tosection;
 1610|      0|    int ncopy = section - double_colon;
 1611|      0|    for (tosection = 7; ncopy--; tosection--) {
  ------------------
  |  Branch (1611:25): [True: 0, False: 0]
  ------------------
 1612|      0|      addr->pr_s6_addr16[tosection] = addr->pr_s6_addr16[double_colon + ncopy];
  ------------------
  |  |  139|      0|#define pr_s6_addr16    _S6_un._S6_u16
  ------------------
                    addr->pr_s6_addr16[tosection] = addr->pr_s6_addr16[double_colon + ncopy];
  ------------------
  |  |  139|      0|#define pr_s6_addr16    _S6_un._S6_u16
  ------------------
 1613|      0|    }
 1614|      0|    while (tosection >= double_colon) {
  ------------------
  |  Branch (1614:12): [True: 0, False: 0]
  ------------------
 1615|      0|      addr->pr_s6_addr16[tosection--] = 0;
  ------------------
  |  |  139|      0|#define pr_s6_addr16    _S6_un._S6_u16
  ------------------
 1616|      0|    }
 1617|      0|  } else if (section != 8) {
  ------------------
  |  Branch (1617:14): [True: 0, False: 0]
  ------------------
 1618|      0|    return 0; /* too short */
 1619|      0|  }
 1620|      0|  return 1;
 1621|      0|}

_PR_InitTime:
  538|      1|void _PR_InitTime(void) {
  539|       |#ifdef HAVE_LOCALTIME_MONITOR
  540|       |  monitor = PR_NewLock();
  541|       |#endif
  542|       |#ifdef WINCE
  543|       |  _MD_InitTime();
  544|       |#endif
  545|      1|}

_PR_InitIO:
 1117|      1|void _PR_InitIO(void) {
 1118|      1|#  if defined(DEBUG)
 1119|      1|  memset(&pt_debug, 0, sizeof(PTDebug));
 1120|      1|  pt_debug.timeStarted = PR_Now();
 1121|      1|#  endif
 1122|       |
 1123|      1|  _pr_flock_lock = PR_NewLock();
 1124|      1|  PR_ASSERT(NULL != _pr_flock_lock);
  ------------------
  |  |  208|      1|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 1, False: 0]
  |  |  ------------------
  ------------------
 1125|      1|  _pr_flock_cv = PR_NewCondVar(_pr_flock_lock);
 1126|      1|  PR_ASSERT(NULL != _pr_flock_cv);
  ------------------
  |  |  208|      1|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 1, False: 0]
  |  |  ------------------
  ------------------
 1127|      1|  _pr_rename_lock = PR_NewLock();
 1128|      1|  PR_ASSERT(NULL != _pr_rename_lock);
  ------------------
  |  |  208|      1|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 1, False: 0]
  |  |  ------------------
  ------------------
 1129|       |
 1130|      1|  _PR_InitFdCache(); /* do that */
 1131|       |
 1132|      1|  _pr_stdin = pt_SetMethods(0, PR_DESC_FILE, PR_FALSE, PR_TRUE);
  ------------------
  |  |  438|      1|#define PR_FALSE 0
  ------------------
                _pr_stdin = pt_SetMethods(0, PR_DESC_FILE, PR_FALSE, PR_TRUE);
  ------------------
  |  |  437|      1|#define PR_TRUE 1
  ------------------
 1133|      1|  _pr_stdout = pt_SetMethods(1, PR_DESC_FILE, PR_FALSE, PR_TRUE);
  ------------------
  |  |  438|      1|#define PR_FALSE 0
  ------------------
                _pr_stdout = pt_SetMethods(1, PR_DESC_FILE, PR_FALSE, PR_TRUE);
  ------------------
  |  |  437|      1|#define PR_TRUE 1
  ------------------
 1134|      1|  _pr_stderr = pt_SetMethods(2, PR_DESC_FILE, PR_FALSE, PR_TRUE);
  ------------------
  |  |  438|      1|#define PR_FALSE 0
  ------------------
                _pr_stderr = pt_SetMethods(2, PR_DESC_FILE, PR_FALSE, PR_TRUE);
  ------------------
  |  |  437|      1|#define PR_TRUE 1
  ------------------
 1135|      1|  PR_ASSERT(_pr_stdin && _pr_stdout && _pr_stderr);
  ------------------
  |  |  208|      4|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:7): [True: 1, False: 0]
  |  |  |  Branch (208:7): [True: 1, False: 0]
  |  |  |  Branch (208:7): [True: 1, False: 0]
  |  |  ------------------
  ------------------
 1136|       |
 1137|       |#  ifdef _PR_IPV6_V6ONLY_PROBE
 1138|       |  /* In Mac OS X v10.3 Panther Beta the IPV6_V6ONLY socket option
 1139|       |   * is turned on by default, contrary to what RFC 3493, Section
 1140|       |   * 5.3 says.  So we have to turn it off.  Find out whether we
 1141|       |   * are running on such a system.
 1142|       |   */
 1143|       |  {
 1144|       |    int osfd;
 1145|       |    osfd = socket(AF_INET6, SOCK_STREAM, 0);
 1146|       |    if (osfd != -1) {
 1147|       |      int on;
 1148|       |      socklen_t optlen = sizeof(on);
 1149|       |      if (getsockopt(osfd, IPPROTO_IPV6, IPV6_V6ONLY, &on, &optlen) == 0) {
 1150|       |        _pr_ipv6_v6only_on_by_default = on;
 1151|       |      }
 1152|       |      close(osfd);
 1153|       |    }
 1154|       |  }
 1155|       |#  endif
 1156|      1|} /* _PR_InitIO */
PR_GetFileMethods:
 3367|      3|PR_IMPLEMENT(const PRIOMethods*) PR_GetFileMethods(void) {
 3368|      3|  return &_pr_file_methods;
 3369|      3|} /* PR_GetFileMethods */
ptio.c:pt_SetMethods:
 3319|      3|                                 PRBool isAcceptedSocket, PRBool imported) {
 3320|      3|  PRFileDesc* fd = _PR_Getfd();
 3321|       |
 3322|      3|  if (fd == NULL) {
  ------------------
  |  Branch (3322:7): [True: 0, False: 3]
  ------------------
 3323|      0|    PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0);
  ------------------
  |  |   16|      0|#define PR_OUT_OF_MEMORY_ERROR                   (-6000L)
  ------------------
 3324|      3|  } else {
 3325|      3|    fd->secret->md.osfd = osfd;
 3326|      3|    fd->secret->state = _PR_FILEDESC_OPEN;
  ------------------
  |  | 1702|      3|#define _PR_FILEDESC_OPEN       0xaaaaaaaa    /* 1010101... */
  ------------------
 3327|      3|    if (imported) {
  ------------------
  |  Branch (3327:9): [True: 3, False: 0]
  ------------------
 3328|      3|      fd->secret->inheritable = _PR_TRI_UNKNOWN;
 3329|      3|    } else {
 3330|       |      /* By default, a Unix fd is not closed on exec. */
 3331|      0|#  ifdef DEBUG
 3332|      0|      PRIntn flags;
 3333|      0|      flags = fcntl(osfd, F_GETFD, 0);
 3334|      0|      PR_ASSERT(0 == flags);
  ------------------
  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3335|      0|#  endif
 3336|      0|      fd->secret->inheritable = _PR_TRI_TRUE;
 3337|      0|    }
 3338|      3|    switch (type) {
 3339|      3|      case PR_DESC_FILE:
  ------------------
  |  Branch (3339:7): [True: 3, False: 0]
  ------------------
 3340|      3|        fd->methods = PR_GetFileMethods();
 3341|      3|        break;
 3342|      0|      case PR_DESC_SOCKET_TCP:
  ------------------
  |  Branch (3342:7): [True: 0, False: 3]
  ------------------
 3343|      0|        fd->methods = PR_GetTCPMethods();
 3344|       |#  ifdef _PR_ACCEPT_INHERIT_NONBLOCK
 3345|       |        if (!isAcceptedSocket) {
 3346|       |          pt_MakeSocketNonblock(osfd);
 3347|       |        }
 3348|       |#  else
 3349|      0|        pt_MakeSocketNonblock(osfd);
  ------------------
  |  | 3315|      0|#    define pt_MakeSocketNonblock pt_MakeFdNonblock
  ------------------
 3350|      0|#  endif
 3351|      0|        break;
 3352|      0|      case PR_DESC_SOCKET_UDP:
  ------------------
  |  Branch (3352:7): [True: 0, False: 3]
  ------------------
 3353|      0|        fd->methods = PR_GetUDPMethods();
 3354|      0|        pt_MakeFdNonblock(osfd);
 3355|      0|        break;
 3356|      0|      case PR_DESC_PIPE:
  ------------------
  |  Branch (3356:7): [True: 0, False: 3]
  ------------------
 3357|      0|        fd->methods = PR_GetPipeMethods();
 3358|      0|        pt_MakeFdNonblock(osfd);
 3359|      0|        break;
 3360|      0|      default:
  ------------------
  |  Branch (3360:7): [True: 0, False: 3]
  ------------------
 3361|      0|        break;
 3362|      3|    }
 3363|      3|  }
 3364|      3|  return fd;
 3365|      3|} /* pt_SetMethods */

_PR_InitCPUs:
   22|      1|void _PR_InitCPUs(void) { PT_LOG("_PR_InitCPUs") }
_PR_InitStacks:
   23|      1|void _PR_InitStacks(void){PT_LOG("_PR_InitStacks")}

_PR_InitLocks:
   45|      1|void _PR_InitLocks(void) {
   46|      1|  int rv;
   47|      1|  rv = _PT_PTHREAD_MUTEXATTR_INIT(&_pt_mattr);
  ------------------
  |  |   17|      1|#define _PT_PTHREAD_MUTEXATTR_INIT        pthread_mutexattr_init
  ------------------
   48|      1|  PR_ASSERT(0 == rv);
  ------------------
  |  |  208|      1|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 1, False: 0]
  |  |  ------------------
  ------------------
   49|       |
   50|      1|#  if (defined(LINUX) &&                                               \
   51|      1|       (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2))) || \
   52|      1|      (defined(FREEBSD) && __FreeBSD_version > 700055)
   53|      1|  rv = pthread_mutexattr_settype(&_pt_mattr, PTHREAD_MUTEX_ADAPTIVE_NP);
   54|      1|  PR_ASSERT(0 == rv);
  ------------------
  |  |  208|      1|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 1, False: 0]
  |  |  ------------------
  ------------------
   55|      1|#  endif
   56|       |
   57|      1|  rv = _PT_PTHREAD_CONDATTR_INIT(&_pt_cvar_attr);
  ------------------
  |  |   30|      1|#define _PT_PTHREAD_CONDATTR_INIT         pthread_condattr_init
  ------------------
   58|      1|  PR_ASSERT(0 == rv);
  ------------------
  |  |  208|      1|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 1, False: 0]
  |  |  ------------------
  ------------------
   59|      1|}
PR_NewLock:
  121|   410k|PR_IMPLEMENT(PRLock*) PR_NewLock(void) {
  122|   410k|  PRIntn rv;
  123|   410k|  PRLock* lock;
  124|       |
  125|   410k|  if (!_pr_initialized) {
  ------------------
  |  Branch (125:7): [True: 0, False: 410k]
  ------------------
  126|      0|    _PR_ImplicitInitialization();
  127|      0|  }
  128|       |
  129|   410k|  lock = PR_NEWZAP(PRLock);
  ------------------
  |  |   99|   410k|#define PR_NEWZAP(_struct) ((_struct*)PR_Calloc(1, sizeof(_struct)))
  ------------------
  130|   410k|  if (lock != NULL) {
  ------------------
  |  Branch (130:7): [True: 410k, False: 0]
  ------------------
  131|   410k|    rv = _PT_PTHREAD_MUTEX_INIT(lock->mutex, _pt_mattr);
  ------------------
  |  |   19|   410k|#define _PT_PTHREAD_MUTEX_INIT(m, a)      pthread_mutex_init(&(m), &(a))
  ------------------
  132|   410k|    PR_ASSERT(0 == rv);
  ------------------
  |  |  208|   410k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 410k, False: 0]
  |  |  ------------------
  ------------------
  133|   410k|  }
  134|   410k|#  if defined(DEBUG)
  135|   410k|  pt_debug.locks_created += 1;
  136|   410k|#  endif
  137|   410k|  return lock;
  138|   410k|} /* PR_NewLock */
PR_DestroyLock:
  140|   410k|PR_IMPLEMENT(void) PR_DestroyLock(PRLock* lock) {
  141|   410k|  PRIntn rv;
  142|   410k|  PR_ASSERT(NULL != lock);
  ------------------
  |  |  208|   410k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 410k, False: 0]
  |  |  ------------------
  ------------------
  143|   410k|  PR_ASSERT(PR_FALSE == lock->locked);
  ------------------
  |  |  208|   410k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 410k, False: 0]
  |  |  ------------------
  ------------------
  144|   410k|  PR_ASSERT(0 == lock->notified.length);
  ------------------
  |  |  208|   410k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 410k, False: 0]
  |  |  ------------------
  ------------------
  145|   410k|  PR_ASSERT(NULL == lock->notified.link);
  ------------------
  |  |  208|   410k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 410k, False: 0]
  |  |  ------------------
  ------------------
  146|   410k|  rv = pthread_mutex_destroy(&lock->mutex);
  147|   410k|  PR_ASSERT(0 == rv);
  ------------------
  |  |  208|   410k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 410k, False: 0]
  |  |  ------------------
  ------------------
  148|   410k|#  if defined(DEBUG)
  149|   410k|  memset(lock, 0xaf, sizeof(PRLock));
  150|   410k|  pt_debug.locks_destroyed += 1;
  151|   410k|#  endif
  152|   410k|  PR_Free(lock);
  153|   410k|} /* PR_DestroyLock */
PR_Lock:
  155|  12.2M|PR_IMPLEMENT(void) PR_Lock(PRLock* lock) {
  156|       |  /* Nb: PR_Lock must not call PR_GetCurrentThread to access the |id| or
  157|       |   * |tid| field of the current thread's PRThread structure because
  158|       |   * _pt_root calls PR_Lock before setting thred->id and thred->tid. */
  159|  12.2M|  PRIntn rv;
  160|  12.2M|  PR_ASSERT(lock != NULL);
  ------------------
  |  |  208|  12.2M|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 12.2M, False: 0]
  |  |  ------------------
  ------------------
  161|  12.2M|  rv = pthread_mutex_lock(&lock->mutex);
  162|  12.2M|  PR_ASSERT(0 == rv);
  ------------------
  |  |  208|  12.2M|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 12.2M, False: 0]
  |  |  ------------------
  ------------------
  163|  12.2M|  PR_ASSERT(0 == lock->notified.length);
  ------------------
  |  |  208|  12.2M|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 12.2M, False: 0]
  |  |  ------------------
  ------------------
  164|  12.2M|  PR_ASSERT(NULL == lock->notified.link);
  ------------------
  |  |  208|  12.2M|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 12.2M, False: 0]
  |  |  ------------------
  ------------------
  165|  12.2M|  PR_ASSERT(PR_FALSE == lock->locked);
  ------------------
  |  |  208|  12.2M|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 12.2M, False: 0]
  |  |  ------------------
  ------------------
  166|       |  /* Nb: the order of the next two statements is not critical to
  167|       |   * the correctness of PR_AssertCurrentThreadOwnsLock(), but
  168|       |   * this particular order makes the assertion more likely to
  169|       |   * catch errors. */
  170|  12.2M|  lock->owner = pthread_self();
  171|  12.2M|  lock->locked = PR_TRUE;
  ------------------
  |  |  437|  12.2M|#define PR_TRUE 1
  ------------------
  172|  12.2M|#  if defined(DEBUG)
  173|  12.2M|  pt_debug.locks_acquired += 1;
  174|  12.2M|#  endif
  175|  12.2M|} /* PR_Lock */
PR_Unlock:
  177|  12.2M|PR_IMPLEMENT(PRStatus) PR_Unlock(PRLock* lock) {
  178|  12.2M|  pthread_t self = pthread_self();
  179|  12.2M|  PRIntn rv;
  180|       |
  181|  12.2M|  PR_ASSERT(lock != NULL);
  ------------------
  |  |  208|  12.2M|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 12.2M, False: 0]
  |  |  ------------------
  ------------------
  182|  12.2M|  PR_ASSERT(_PT_PTHREAD_MUTEX_IS_LOCKED(lock->mutex));
  ------------------
  |  |  208|  12.2M|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 12.2M, False: 0]
  |  |  ------------------
  ------------------
  183|  12.2M|  PR_ASSERT(PR_TRUE == lock->locked);
  ------------------
  |  |  208|  12.2M|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 12.2M, False: 0]
  |  |  ------------------
  ------------------
  184|  12.2M|  PR_ASSERT(pthread_equal(lock->owner, self));
  ------------------
  |  |  208|  12.2M|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 12.2M, False: 0]
  |  |  ------------------
  ------------------
  185|       |
  186|  12.2M|  if (!lock->locked || !pthread_equal(lock->owner, self)) {
  ------------------
  |  Branch (186:7): [True: 0, False: 12.2M]
  |  Branch (186:24): [True: 0, False: 12.2M]
  ------------------
  187|      0|    return PR_FAILURE;
  188|      0|  }
  189|       |
  190|  12.2M|  lock->locked = PR_FALSE;
  ------------------
  |  |  438|  12.2M|#define PR_FALSE 0
  ------------------
  191|  12.2M|  if (0 == lock->notified.length) /* shortcut */
  ------------------
  |  Branch (191:7): [True: 12.2M, False: 37]
  ------------------
  192|  12.2M|  {
  193|  12.2M|    rv = pthread_mutex_unlock(&lock->mutex);
  194|  12.2M|    PR_ASSERT(0 == rv);
  ------------------
  |  |  208|  12.2M|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 12.2M, False: 0]
  |  |  ------------------
  ------------------
  195|  12.2M|  } else {
  196|     37|    pt_PostNotifies(lock, PR_TRUE);
  ------------------
  |  |  437|     37|#define PR_TRUE 1
  ------------------
  197|     37|  }
  198|       |
  199|  12.2M|#  if defined(DEBUG)
  200|  12.2M|  pt_debug.locks_released += 1;
  201|  12.2M|#  endif
  202|  12.2M|  return PR_SUCCESS;
  203|  12.2M|} /* PR_Unlock */
PR_NewCondVar:
  296|  18.7k|PR_IMPLEMENT(PRCondVar*) PR_NewCondVar(PRLock* lock) {
  297|  18.7k|  PRCondVar* cv = PR_NEW(PRCondVar);
  ------------------
  |  |   65|  18.7k|#define PR_NEW(_struct) ((_struct *) PR_MALLOC(sizeof(_struct)))
  |  |  ------------------
  |  |  |  |   55|  18.7k|#define PR_MALLOC(_bytes) (PR_Malloc((_bytes)))
  |  |  ------------------
  ------------------
  298|  18.7k|  PR_ASSERT(lock != NULL);
  ------------------
  |  |  208|  18.7k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 18.7k, False: 0]
  |  |  ------------------
  ------------------
  299|  18.7k|  if (cv != NULL) {
  ------------------
  |  Branch (299:7): [True: 18.7k, False: 0]
  ------------------
  300|  18.7k|    int rv = _PT_PTHREAD_COND_INIT(cv->cv, _pt_cvar_attr);
  ------------------
  |  |   33|  18.7k|#define _PT_PTHREAD_COND_INIT(m, a)       pthread_cond_init(&(m), &(a))
  ------------------
  301|  18.7k|    PR_ASSERT(0 == rv);
  ------------------
  |  |  208|  18.7k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 18.7k, False: 0]
  |  |  ------------------
  ------------------
  302|  18.7k|    if (0 == rv) {
  ------------------
  |  Branch (302:9): [True: 18.7k, False: 0]
  ------------------
  303|  18.7k|      cv->lock = lock;
  304|  18.7k|      cv->notify_pending = 0;
  305|  18.7k|#  if defined(DEBUG)
  306|  18.7k|      pt_debug.cvars_created += 1;
  307|  18.7k|#  endif
  308|  18.7k|    } else {
  309|      0|      PR_DELETE(cv);
  ------------------
  |  |  110|      0|#define PR_DELETE(_ptr) { PR_Free(_ptr); (_ptr) = NULL; }
  ------------------
  310|      0|      cv = NULL;
  311|      0|    }
  312|  18.7k|  }
  313|  18.7k|  return cv;
  314|  18.7k|} /* PR_NewCondVar */
PR_DestroyCondVar:
  316|  18.7k|PR_IMPLEMENT(void) PR_DestroyCondVar(PRCondVar* cvar) {
  317|  18.7k|  if (0 > PR_ATOMIC_DECREMENT(&cvar->notify_pending)) {
  ------------------
  |  |  123|  18.7k|#define PR_ATOMIC_DECREMENT(val) __sync_sub_and_fetch(val, 1)
  ------------------
  |  Branch (317:7): [True: 18.7k, False: 0]
  ------------------
  318|  18.7k|    PRIntn rv = pthread_cond_destroy(&cvar->cv);
  319|  18.7k|#  if defined(DEBUG)
  320|  18.7k|    PR_ASSERT(0 == rv);
  ------------------
  |  |  208|  18.7k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 18.7k, False: 0]
  |  |  ------------------
  ------------------
  321|  18.7k|    memset(cvar, 0xaf, sizeof(PRCondVar));
  322|  18.7k|    pt_debug.cvars_destroyed += 1;
  323|       |#  else
  324|       |    (void)rv;
  325|       |#  endif
  326|  18.7k|    PR_Free(cvar);
  327|  18.7k|  }
  328|  18.7k|} /* PR_DestroyCondVar */
PR_NotifyAllCondVar:
  401|     37|PR_IMPLEMENT(PRStatus) PR_NotifyAllCondVar(PRCondVar* cvar) {
  402|     37|  PR_ASSERT(cvar != NULL);
  ------------------
  |  |  208|     37|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 37, False: 0]
  |  |  ------------------
  ------------------
  403|     37|  pt_PostNotifyToCvar(cvar, PR_TRUE);
  ------------------
  |  |  437|     37|#define PR_TRUE 1
  ------------------
  404|     37|  return PR_SUCCESS;
  405|     37|} /* PR_NotifyAllCondVar */
PR_NewMonitor:
  452|  42.7k|PR_IMPLEMENT(PRMonitor*) PR_NewMonitor(void) {
  453|  42.7k|  PRMonitor* mon;
  454|  42.7k|  int rv;
  455|       |
  456|  42.7k|  if (!_pr_initialized) {
  ------------------
  |  Branch (456:7): [True: 0, False: 42.7k]
  ------------------
  457|      0|    _PR_ImplicitInitialization();
  458|      0|  }
  459|       |
  460|  42.7k|  mon = PR_NEWZAP(PRMonitor);
  ------------------
  |  |   99|  42.7k|#define PR_NEWZAP(_struct) ((_struct*)PR_Calloc(1, sizeof(_struct)))
  ------------------
  461|  42.7k|  if (mon == NULL) {
  ------------------
  |  Branch (461:7): [True: 0, False: 42.7k]
  ------------------
  462|      0|    PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0);
  ------------------
  |  |   16|      0|#define PR_OUT_OF_MEMORY_ERROR                   (-6000L)
  ------------------
  463|      0|    return NULL;
  464|      0|  }
  465|       |
  466|  42.7k|  rv = _PT_PTHREAD_MUTEX_INIT(mon->lock, _pt_mattr);
  ------------------
  |  |   19|  42.7k|#define _PT_PTHREAD_MUTEX_INIT(m, a)      pthread_mutex_init(&(m), &(a))
  ------------------
  467|  42.7k|  PR_ASSERT(0 == rv);
  ------------------
  |  |  208|  42.7k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 42.7k, False: 0]
  |  |  ------------------
  ------------------
  468|  42.7k|  if (0 != rv) {
  ------------------
  |  Branch (468:7): [True: 0, False: 42.7k]
  ------------------
  469|      0|    goto error1;
  470|      0|  }
  471|       |
  472|  42.7k|  _PT_PTHREAD_INVALIDATE_THR_HANDLE(mon->owner);
  ------------------
  |  |   70|  42.7k|#define _PT_PTHREAD_INVALIDATE_THR_HANDLE(t)  (t) = 0
  ------------------
  473|       |
  474|  42.7k|  rv = _PT_PTHREAD_COND_INIT(mon->entryCV, _pt_cvar_attr);
  ------------------
  |  |   33|  42.7k|#define _PT_PTHREAD_COND_INIT(m, a)       pthread_cond_init(&(m), &(a))
  ------------------
  475|  42.7k|  PR_ASSERT(0 == rv);
  ------------------
  |  |  208|  42.7k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 42.7k, False: 0]
  |  |  ------------------
  ------------------
  476|  42.7k|  if (0 != rv) {
  ------------------
  |  Branch (476:7): [True: 0, False: 42.7k]
  ------------------
  477|      0|    goto error2;
  478|      0|  }
  479|       |
  480|  42.7k|  rv = _PT_PTHREAD_COND_INIT(mon->waitCV, _pt_cvar_attr);
  ------------------
  |  |   33|  42.7k|#define _PT_PTHREAD_COND_INIT(m, a)       pthread_cond_init(&(m), &(a))
  ------------------
  481|  42.7k|  PR_ASSERT(0 == rv);
  ------------------
  |  |  208|  42.7k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 42.7k, False: 0]
  |  |  ------------------
  ------------------
  482|  42.7k|  if (0 != rv) {
  ------------------
  |  Branch (482:7): [True: 0, False: 42.7k]
  ------------------
  483|      0|    goto error3;
  484|      0|  }
  485|       |
  486|  42.7k|  mon->notifyTimes = 0;
  487|  42.7k|  mon->entryCount = 0;
  488|  42.7k|  mon->refCount = 1;
  489|  42.7k|  mon->name = NULL;
  490|  42.7k|  return mon;
  491|       |
  492|      0|error3:
  493|      0|  pthread_cond_destroy(&mon->entryCV);
  494|      0|error2:
  495|      0|  pthread_mutex_destroy(&mon->lock);
  496|      0|error1:
  497|      0|  PR_Free(mon);
  498|      0|  _PR_MD_MAP_DEFAULT_ERROR(rv);
  ------------------
  |  |   15|      0|#define _PR_MD_MAP_DEFAULT_ERROR    _MD_unix_map_default_error
  ------------------
  499|      0|  return NULL;
  500|      0|} /* PR_NewMonitor */
PR_NewNamedMonitor:
  502|      1|PR_IMPLEMENT(PRMonitor*) PR_NewNamedMonitor(const char* name) {
  503|      1|  PRMonitor* mon = PR_NewMonitor();
  504|      1|  if (mon) {
  ------------------
  |  Branch (504:7): [True: 1, False: 0]
  ------------------
  505|      1|    mon->name = name;
  506|      1|  }
  507|      1|  return mon;
  508|      1|}
PR_DestroyMonitor:
  510|  1.69M|PR_IMPLEMENT(void) PR_DestroyMonitor(PRMonitor* mon) {
  511|  1.69M|  int rv;
  512|       |
  513|  1.69M|  PR_ASSERT(mon != NULL);
  ------------------
  |  |  208|  1.69M|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 1.69M, False: 0]
  |  |  ------------------
  ------------------
  514|  1.69M|  if (PR_ATOMIC_DECREMENT(&mon->refCount) == 0) {
  ------------------
  |  |  123|  1.69M|#define PR_ATOMIC_DECREMENT(val) __sync_sub_and_fetch(val, 1)
  ------------------
  |  Branch (514:7): [True: 42.7k, False: 1.64M]
  ------------------
  515|  42.7k|    rv = pthread_cond_destroy(&mon->waitCV);
  516|  42.7k|    PR_ASSERT(0 == rv);
  ------------------
  |  |  208|  42.7k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 42.7k, False: 0]
  |  |  ------------------
  ------------------
  517|  42.7k|    rv = pthread_cond_destroy(&mon->entryCV);
  518|  42.7k|    PR_ASSERT(0 == rv);
  ------------------
  |  |  208|  42.7k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 42.7k, False: 0]
  |  |  ------------------
  ------------------
  519|  42.7k|    rv = pthread_mutex_destroy(&mon->lock);
  520|  42.7k|    PR_ASSERT(0 == rv);
  ------------------
  |  |  208|  42.7k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 42.7k, False: 0]
  |  |  ------------------
  ------------------
  521|  42.7k|#  if defined(DEBUG)
  522|  42.7k|    memset(mon, 0xaf, sizeof(PRMonitor));
  523|  42.7k|#  endif
  524|  42.7k|    PR_Free(mon);
  525|  42.7k|  }
  526|  1.69M|} /* PR_DestroyMonitor */
PR_GetMonitorEntryCount:
  531|  3.43M|PR_IMPLEMENT(PRIntn) PR_GetMonitorEntryCount(PRMonitor* mon) {
  532|  3.43M|  pthread_t self = pthread_self();
  533|  3.43M|  PRIntn rv;
  534|  3.43M|  PRIntn count = 0;
  535|       |
  536|  3.43M|  rv = pthread_mutex_lock(&mon->lock);
  537|  3.43M|  PR_ASSERT(0 == rv);
  ------------------
  |  |  208|  3.43M|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 3.43M, False: 0]
  |  |  ------------------
  ------------------
  538|  3.43M|  if (pthread_equal(mon->owner, self)) {
  ------------------
  |  Branch (538:7): [True: 1.56M, False: 1.87M]
  ------------------
  539|  1.56M|    count = mon->entryCount;
  540|  1.56M|  }
  541|  3.43M|  rv = pthread_mutex_unlock(&mon->lock);
  542|  3.43M|  PR_ASSERT(0 == rv);
  ------------------
  |  |  208|  3.43M|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 3.43M, False: 0]
  |  |  ------------------
  ------------------
  543|  3.43M|  return count;
  544|  3.43M|}
PR_EnterMonitor:
  558|  1.66M|PR_IMPLEMENT(void) PR_EnterMonitor(PRMonitor* mon) {
  559|  1.66M|  pthread_t self = pthread_self();
  560|  1.66M|  PRIntn rv;
  561|       |
  562|  1.66M|  PR_ASSERT(mon != NULL);
  ------------------
  |  |  208|  1.66M|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 1.66M, False: 0]
  |  |  ------------------
  ------------------
  563|  1.66M|  rv = pthread_mutex_lock(&mon->lock);
  564|  1.66M|  PR_ASSERT(0 == rv);
  ------------------
  |  |  208|  1.66M|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 1.66M, False: 0]
  |  |  ------------------
  ------------------
  565|  1.66M|  if (mon->entryCount != 0) {
  ------------------
  |  Branch (565:7): [True: 15.9k, False: 1.64M]
  ------------------
  566|  15.9k|    if (pthread_equal(mon->owner, self)) {
  ------------------
  |  Branch (566:9): [True: 15.9k, False: 0]
  ------------------
  567|  15.9k|      goto done;
  568|  15.9k|    }
  569|      0|    while (mon->entryCount != 0) {
  ------------------
  |  Branch (569:12): [True: 0, False: 0]
  ------------------
  570|      0|      rv = pthread_cond_wait(&mon->entryCV, &mon->lock);
  571|      0|      PR_ASSERT(0 == rv);
  ------------------
  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  572|      0|    }
  573|      0|  }
  574|       |  /* and now I have the monitor */
  575|  1.64M|  PR_ASSERT(0 == mon->notifyTimes);
  ------------------
  |  |  208|  1.64M|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 1.64M, False: 0]
  |  |  ------------------
  ------------------
  576|  1.64M|  PR_ASSERT(_PT_PTHREAD_THR_HANDLE_IS_INVALID(mon->owner));
  ------------------
  |  |  208|  1.64M|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 1.64M, False: 0]
  |  |  ------------------
  ------------------
  577|  1.64M|  _PT_PTHREAD_COPY_THR_HANDLE(self, mon->owner);
  ------------------
  |  |   72|  1.64M|#define _PT_PTHREAD_COPY_THR_HANDLE(st, dt)   (dt) = (st)
  ------------------
  578|       |
  579|  1.66M|done:
  580|  1.66M|  mon->entryCount += 1;
  581|  1.66M|  rv = pthread_mutex_unlock(&mon->lock);
  582|  1.66M|  PR_ASSERT(0 == rv);
  ------------------
  |  |  208|  1.66M|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 1.66M, False: 0]
  |  |  ------------------
  ------------------
  583|  1.66M|} /* PR_EnterMonitor */
PR_ExitMonitor:
  585|  1.66M|PR_IMPLEMENT(PRStatus) PR_ExitMonitor(PRMonitor* mon) {
  586|  1.66M|  pthread_t self = pthread_self();
  587|  1.66M|  PRIntn rv;
  588|  1.66M|  PRBool notifyEntryWaiter = PR_FALSE;
  ------------------
  |  |  438|  1.66M|#define PR_FALSE 0
  ------------------
  589|  1.66M|  PRIntn notifyTimes = 0;
  590|       |
  591|  1.66M|  PR_ASSERT(mon != NULL);
  ------------------
  |  |  208|  1.66M|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 1.66M, False: 0]
  |  |  ------------------
  ------------------
  592|  1.66M|  rv = pthread_mutex_lock(&mon->lock);
  593|  1.66M|  PR_ASSERT(0 == rv);
  ------------------
  |  |  208|  1.66M|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 1.66M, False: 0]
  |  |  ------------------
  ------------------
  594|       |  /* the entries should be > 0 and we'd better be the owner */
  595|  1.66M|  PR_ASSERT(mon->entryCount > 0);
  ------------------
  |  |  208|  1.66M|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 1.66M, False: 0]
  |  |  ------------------
  ------------------
  596|  1.66M|  PR_ASSERT(pthread_equal(mon->owner, self));
  ------------------
  |  |  208|  1.66M|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 1.66M, False: 0]
  |  |  ------------------
  ------------------
  597|  1.66M|  if (mon->entryCount == 0 || !pthread_equal(mon->owner, self)) {
  ------------------
  |  Branch (597:7): [True: 0, False: 1.66M]
  |  Branch (597:31): [True: 0, False: 1.66M]
  ------------------
  598|      0|    rv = pthread_mutex_unlock(&mon->lock);
  599|      0|    PR_ASSERT(0 == rv);
  ------------------
  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  600|      0|    return PR_FAILURE;
  601|      0|  }
  602|       |
  603|  1.66M|  mon->entryCount -= 1; /* reduce by one */
  604|  1.66M|  if (mon->entryCount == 0) {
  ------------------
  |  Branch (604:7): [True: 1.64M, False: 15.9k]
  ------------------
  605|       |    /* and if it transitioned to zero - notify an entry waiter */
  606|       |    /* make the owner unknown */
  607|  1.64M|    _PT_PTHREAD_INVALIDATE_THR_HANDLE(mon->owner);
  ------------------
  |  |   70|  1.64M|#define _PT_PTHREAD_INVALIDATE_THR_HANDLE(t)  (t) = 0
  ------------------
  608|  1.64M|    notifyEntryWaiter = PR_TRUE;
  ------------------
  |  |  437|  1.64M|#define PR_TRUE 1
  ------------------
  609|  1.64M|    notifyTimes = mon->notifyTimes;
  610|  1.64M|    mon->notifyTimes = 0;
  611|       |    /* We will access the members of 'mon' after unlocking mon->lock.
  612|       |     * Add a reference. */
  613|  1.64M|    PR_ATOMIC_INCREMENT(&mon->refCount);
  ------------------
  |  |  122|  1.64M|#define PR_ATOMIC_INCREMENT(val) __sync_add_and_fetch(val, 1)
  ------------------
  614|  1.64M|  }
  615|  1.66M|  rv = pthread_mutex_unlock(&mon->lock);
  616|  1.66M|  PR_ASSERT(0 == rv);
  ------------------
  |  |  208|  1.66M|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 1.66M, False: 0]
  |  |  ------------------
  ------------------
  617|  1.66M|  if (notifyEntryWaiter) {
  ------------------
  |  Branch (617:7): [True: 1.64M, False: 15.9k]
  ------------------
  618|  1.64M|    if (notifyTimes) {
  ------------------
  |  Branch (618:9): [True: 0, False: 1.64M]
  ------------------
  619|      0|      pt_PostNotifiesFromMonitor(&mon->waitCV, notifyTimes);
  620|      0|    }
  621|  1.64M|    rv = pthread_cond_signal(&mon->entryCV);
  622|  1.64M|    PR_ASSERT(0 == rv);
  ------------------
  |  |  208|  1.64M|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 1.64M, False: 0]
  |  |  ------------------
  ------------------
  623|       |    /* We are done accessing the members of 'mon'. Release the
  624|       |     * reference. */
  625|  1.64M|    PR_DestroyMonitor(mon);
  626|  1.64M|  }
  627|  1.66M|  return PR_SUCCESS;
  628|  1.66M|} /* PR_ExitMonitor */
ptsynch.c:pt_PostNotifies:
   61|     37|static void pt_PostNotifies(PRLock* lock, PRBool unlock) {
   62|     37|  PRIntn index, rv;
   63|     37|  _PT_Notified post;
   64|     37|  _PT_Notified *notified, *prev = NULL;
   65|       |  /*
   66|       |   * Time to actually notify any conditions that were affected
   67|       |   * while the lock was held. Get a copy of the list that's in
   68|       |   * the lock structure and then zero the original. If it's
   69|       |   * linked to other such structures, we own that storage.
   70|       |   */
   71|     37|  post = lock->notified; /* a safe copy; we own the lock */
   72|       |
   73|     37|#  if defined(DEBUG)
   74|     37|  memset(&lock->notified, 0, sizeof(_PT_Notified)); /* reset */
   75|       |#  else
   76|       |  lock->notified.length = 0; /* these are really sufficient */
   77|       |  lock->notified.link = NULL;
   78|       |#  endif
   79|       |
   80|       |  /* should (may) we release lock before notifying? */
   81|     37|  if (unlock) {
  ------------------
  |  Branch (81:7): [True: 37, False: 0]
  ------------------
   82|     37|    rv = pthread_mutex_unlock(&lock->mutex);
   83|     37|    PR_ASSERT(0 == rv);
  ------------------
  |  |  208|     37|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 37, False: 0]
  |  |  ------------------
  ------------------
   84|     37|  }
   85|       |
   86|     37|  notified = &post; /* this is where we start */
   87|     37|  do {
   88|     74|    for (index = 0; index < notified->length; ++index) {
  ------------------
  |  Branch (88:21): [True: 37, False: 37]
  ------------------
   89|     37|      PRCondVar* cv = notified->cv[index].cv;
   90|     37|      PR_ASSERT(NULL != cv);
  ------------------
  |  |  208|     37|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 37, False: 0]
  |  |  ------------------
  ------------------
   91|     37|      PR_ASSERT(0 != notified->cv[index].times);
  ------------------
  |  |  208|     37|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 37, False: 0]
  |  |  ------------------
  ------------------
   92|     37|      if (-1 == notified->cv[index].times) {
  ------------------
  |  Branch (92:11): [True: 37, False: 0]
  ------------------
   93|     37|        rv = pthread_cond_broadcast(&cv->cv);
   94|     37|        PR_ASSERT(0 == rv);
  ------------------
  |  |  208|     37|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 37, False: 0]
  |  |  ------------------
  ------------------
   95|     37|      } else {
   96|      0|        while (notified->cv[index].times-- > 0) {
  ------------------
  |  Branch (96:16): [True: 0, False: 0]
  ------------------
   97|      0|          rv = pthread_cond_signal(&cv->cv);
   98|      0|          PR_ASSERT(0 == rv);
  ------------------
  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   99|      0|        }
  100|      0|      }
  101|     37|#  if defined(DEBUG)
  102|     37|      pt_debug.cvars_notified += 1;
  103|     37|      if (0 > PR_ATOMIC_DECREMENT(&cv->notify_pending)) {
  ------------------
  |  |  123|     37|#define PR_ATOMIC_DECREMENT(val) __sync_sub_and_fetch(val, 1)
  ------------------
  |  Branch (103:11): [True: 0, False: 37]
  ------------------
  104|      0|        pt_debug.delayed_cv_deletes += 1;
  105|      0|        PR_DestroyCondVar(cv);
  106|      0|      }
  107|       |#  else  /* defined(DEBUG) */
  108|       |      if (0 > PR_ATOMIC_DECREMENT(&cv->notify_pending)) {
  109|       |        PR_DestroyCondVar(cv);
  110|       |      }
  111|       |#  endif /* defined(DEBUG) */
  112|     37|    }
  113|     37|    prev = notified;
  114|     37|    notified = notified->link;
  115|     37|    if (&post != prev) {
  ------------------
  |  Branch (115:9): [True: 0, False: 37]
  ------------------
  116|      0|      PR_DELETE(prev);
  ------------------
  |  |  110|      0|#define PR_DELETE(_ptr) { PR_Free(_ptr); (_ptr) = NULL; }
  ------------------
  117|      0|    }
  118|     37|  } while (NULL != notified);
  ------------------
  |  Branch (118:12): [True: 0, False: 37]
  ------------------
  119|     37|} /* pt_PostNotifies */
ptsynch.c:pt_PostNotifyToCvar:
  258|     37|static void pt_PostNotifyToCvar(PRCondVar* cvar, PRBool broadcast) {
  259|     37|  PRIntn index = 0;
  260|     37|  _PT_Notified* notified = &cvar->lock->notified;
  261|       |
  262|     37|  PR_ASSERT(PR_TRUE == cvar->lock->locked);
  ------------------
  |  |  208|     37|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 37, False: 0]
  |  |  ------------------
  ------------------
  263|     37|  PR_ASSERT(pthread_equal(cvar->lock->owner, pthread_self()));
  ------------------
  |  |  208|     37|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 37, False: 0]
  |  |  ------------------
  ------------------
  264|     37|  PR_ASSERT(_PT_PTHREAD_MUTEX_IS_LOCKED(cvar->lock->mutex));
  ------------------
  |  |  208|     37|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 37, False: 0]
  |  |  ------------------
  ------------------
  265|       |
  266|     37|  while (1) {
  ------------------
  |  Branch (266:10): [Folded - Ignored]
  ------------------
  267|     37|    for (index = 0; index < notified->length; ++index) {
  ------------------
  |  Branch (267:21): [True: 0, False: 37]
  ------------------
  268|      0|      if (notified->cv[index].cv == cvar) {
  ------------------
  |  Branch (268:11): [True: 0, False: 0]
  ------------------
  269|      0|        if (broadcast) {
  ------------------
  |  Branch (269:13): [True: 0, False: 0]
  ------------------
  270|      0|          notified->cv[index].times = -1;
  271|      0|        } else if (-1 != notified->cv[index].times) {
  ------------------
  |  Branch (271:20): [True: 0, False: 0]
  ------------------
  272|      0|          notified->cv[index].times += 1;
  273|      0|        }
  274|      0|        return; /* we're finished */
  275|      0|      }
  276|      0|    }
  277|       |    /* if not full, enter new CV in this array */
  278|     37|    if (notified->length < PT_CV_NOTIFIED_LENGTH) {
  ------------------
  |  |  122|     37|#define PT_CV_NOTIFIED_LENGTH 6
  ------------------
  |  Branch (278:9): [True: 37, False: 0]
  ------------------
  279|     37|      break;
  280|     37|    }
  281|       |
  282|       |    /* if there's no link, create an empty array and link it */
  283|      0|    if (NULL == notified->link) {
  ------------------
  |  Branch (283:9): [True: 0, False: 0]
  ------------------
  284|      0|      notified->link = PR_NEWZAP(_PT_Notified);
  ------------------
  |  |   99|      0|#define PR_NEWZAP(_struct) ((_struct*)PR_Calloc(1, sizeof(_struct)))
  ------------------
  285|      0|    }
  286|      0|    notified = notified->link;
  287|      0|  }
  288|       |
  289|       |  /* A brand new entry in the array */
  290|     37|  (void)PR_ATOMIC_INCREMENT(&cvar->notify_pending);
  ------------------
  |  |  122|     37|#define PR_ATOMIC_INCREMENT(val) __sync_add_and_fetch(val, 1)
  ------------------
  291|     37|  notified->cv[index].times = (broadcast) ? -1 : 1;
  ------------------
  |  Branch (291:31): [True: 37, False: 0]
  ------------------
  292|     37|  notified->cv[index].cv = cvar;
  293|     37|  notified->length += 1;
  294|     37|} /* pt_PostNotifyToCvar */

PR_GetCurrentThread:
  581|  1.47M|PR_IMPLEMENT(PRThread*) PR_GetCurrentThread(void) {
  582|  1.47M|  void* thred;
  583|       |
  584|  1.47M|  if (!_pr_initialized) {
  ------------------
  |  Branch (584:7): [True: 0, False: 1.47M]
  ------------------
  585|      0|    _PR_ImplicitInitialization();
  586|      0|  }
  587|       |
  588|  1.47M|  _PT_PTHREAD_GETSPECIFIC(pt_book.key, thred);
  ------------------
  |  |   84|  1.47M|#define _PT_PTHREAD_GETSPECIFIC(k, r)    (r) = pthread_getspecific(k)
  ------------------
  589|  1.47M|  if (NULL == thred) {
  ------------------
  |  Branch (589:7): [True: 0, False: 1.47M]
  ------------------
  590|      0|    thred = pt_AttachThread();
  591|      0|  }
  592|  1.47M|  PR_ASSERT(NULL != thred);
  ------------------
  |  |  208|  1.47M|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 1.47M, False: 0]
  |  |  ------------------
  ------------------
  593|  1.47M|  return (PRThread*)thred;
  594|  1.47M|} /* PR_GetCurrentThread */
_PR_InitThreads:
  835|      1|                     PRUintn maxPTDs) {
  836|      1|  int rv;
  837|      1|  PRThread* thred;
  838|       |
  839|      1|  PR_ASSERT(priority == PR_PRIORITY_NORMAL);
  ------------------
  |  |  208|      1|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  840|       |
  841|       |#  ifdef _PR_NEED_PTHREAD_INIT
  842|       |  /*
  843|       |   * On BSD/OS (3.1 and 4.0), the pthread subsystem is lazily
  844|       |   * initialized, but pthread_self() fails to initialize
  845|       |   * pthreads and hence returns a null thread ID if invoked
  846|       |   * by the primordial thread before any other pthread call.
  847|       |   * So we explicitly initialize pthreads here.
  848|       |   */
  849|       |  pthread_init();
  850|       |#  endif
  851|       |
  852|       |#  if _POSIX_THREAD_PRIORITY_SCHEDULING > 0
  853|       |#    if defined(FREEBSD)
  854|       |  {
  855|       |    pthread_attr_t attr;
  856|       |    int policy;
  857|       |    /* get the min and max priorities of the default policy */
  858|       |    pthread_attr_init(&attr);
  859|       |    pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);
  860|       |    pthread_attr_getschedpolicy(&attr, &policy);
  861|       |    pt_book.minPrio = sched_get_priority_min(policy);
  862|       |    PR_ASSERT(-1 != pt_book.minPrio);
  863|       |    pt_book.maxPrio = sched_get_priority_max(policy);
  864|       |    PR_ASSERT(-1 != pt_book.maxPrio);
  865|       |    pthread_attr_destroy(&attr);
  866|       |  }
  867|       |#    else
  868|       |  /*
  869|       |  ** These might be function evaluations
  870|       |  */
  871|       |  pt_book.minPrio = PT_PRIO_MIN;
  872|       |  pt_book.maxPrio = PT_PRIO_MAX;
  873|       |#    endif
  874|       |#  endif
  875|       |
  876|      1|  PR_ASSERT(NULL == pt_book.ml);
  ------------------
  |  |  208|      1|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  877|      1|  pt_book.ml = PR_NewLock();
  878|      1|  PR_ASSERT(NULL != pt_book.ml);
  ------------------
  |  |  208|      1|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  879|      1|  pt_book.cv = PR_NewCondVar(pt_book.ml);
  880|      1|  PR_ASSERT(NULL != pt_book.cv);
  ------------------
  |  |  208|      1|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  881|      1|  thred = PR_NEWZAP(PRThread);
  ------------------
  |  |   99|      1|#define PR_NEWZAP(_struct) ((_struct*)PR_Calloc(1, sizeof(_struct)))
  ------------------
  882|      1|  PR_ASSERT(NULL != thred);
  ------------------
  |  |  208|      1|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  883|      1|  thred->arg = NULL;
  884|      1|  thred->startFunc = NULL;
  885|      1|  thred->priority = priority;
  886|      1|  thred->id = pthread_self();
  887|      1|  thred->idSet = PR_TRUE;
  ------------------
  |  |  437|      1|#define PR_TRUE 1
  ------------------
  888|      1|#  ifdef _PR_NICE_PRIORITY_SCHEDULING
  889|      1|  thred->tid = gettid();
  890|      1|#  endif
  891|       |
  892|      1|  thred->state = (PT_THREAD_DETACHED | PT_THREAD_PRIMORD);
  ------------------
  |  |  138|      1|#define PT_THREAD_DETACHED  0x01    /* thread can't be joined */
  ------------------
                thred->state = (PT_THREAD_DETACHED | PT_THREAD_PRIMORD);
  ------------------
  |  |  141|      1|#define PT_THREAD_PRIMORD   0x08    /* this is the primordial thread */
  ------------------
  893|      1|  if (PR_SYSTEM_THREAD == type) {
  ------------------
  |  Branch (893:7): [True: 0, False: 1]
  ------------------
  894|      0|    thred->state |= PT_THREAD_SYSTEM;
  ------------------
  |  |  140|      0|#define PT_THREAD_SYSTEM    0x04    /* system (not user) thread */
  ------------------
  895|      0|    pt_book.system += 1;
  896|      0|    pt_book.this_many = 0;
  897|      1|  } else {
  898|      1|    pt_book.user += 1;
  899|      1|    pt_book.this_many = 1;
  900|      1|  }
  901|      1|  thred->next = thred->prev = NULL;
  902|      1|  pt_book.first = pt_book.last = thred;
  903|       |
  904|      1|  thred->stack = PR_NEWZAP(PRThreadStack);
  ------------------
  |  |   99|      1|#define PR_NEWZAP(_struct) ((_struct*)PR_Calloc(1, sizeof(_struct)))
  ------------------
  905|      1|  PR_ASSERT(thred->stack != NULL);
  ------------------
  |  |  208|      1|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  906|      1|  thred->stack->stackSize = 0;
  907|      1|  thred->stack->thr = thred;
  908|      1|  _PR_InitializeStack(thred->stack);
  909|       |
  910|       |  /*
  911|       |   * Create a key for our use to store a backpointer in the pthread
  912|       |   * to our PRThread object. This object gets deleted when the thread
  913|       |   * returns from its root in the case of a detached thread. Other
  914|       |   * threads delete the objects in Join.
  915|       |   *
  916|       |   * NB: The destructor logic seems to have a bug so it isn't used.
  917|       |   * NBB: Oh really? I'm going to give it a spin - AOF 19 June 1998.
  918|       |   * More info - the problem is that pthreads calls the destructor
  919|       |   * eagerly as the thread returns from its root, rather than lazily
  920|       |   * after the thread is joined. Therefore, threads that are joining
  921|       |   * and holding PRThread references are actually holding pointers to
  922|       |   * nothing.
  923|       |   */
  924|      1|  rv = _PT_PTHREAD_KEY_CREATE(&pt_book.key, _pt_thread_death);
  ------------------
  |  |   81|      1|#define _PT_PTHREAD_KEY_CREATE           pthread_key_create
  ------------------
  925|      1|  if (0 != rv) {
  ------------------
  |  Branch (925:7): [True: 0, False: 1]
  ------------------
  926|      0|    PR_Assert("0 == rv", __FILE__, __LINE__);
  927|      0|  }
  928|      1|  pt_book.keyCreated = PR_TRUE;
  ------------------
  |  |  437|      1|#define PR_TRUE 1
  ------------------
  929|      1|  rv = pthread_setspecific(pt_book.key, thred);
  930|      1|  PR_ASSERT(0 == rv);
  ------------------
  |  |  208|      1|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  931|      1|} /* _PR_InitThreads */
ptthread.c:_PR_InitializeStack:
   99|      1|static void _PR_InitializeStack(PRThreadStack* ts) {
  100|      1|  if (ts && (ts->stackTop == 0)) {
  ------------------
  |  Branch (100:7): [True: 1, False: 0]
  |  Branch (100:13): [True: 1, False: 0]
  ------------------
  101|      1|    ts->allocBase = (char*)&ts;
  102|      1|    ts->allocSize = ts->stackSize;
  103|       |
  104|       |    /*
  105|       |    ** Setup stackTop and stackBottom values.
  106|       |    */
  107|       |#  ifdef HAVE_STACK_GROWING_UP
  108|       |    ts->stackBottom = ts->allocBase + ts->stackSize;
  109|       |    ts->stackTop = ts->allocBase;
  110|       |#  else
  111|      1|    ts->stackTop = ts->allocBase;
  112|      1|    ts->stackBottom = ts->allocBase - ts->stackSize;
  113|      1|#  endif
  114|      1|  }
  115|      1|}

_PR_InitCMon:
  308|      1|void _PR_InitCMon(void) {
  309|      1|  _PR_NEW_LOCK_MCACHE();
  ------------------
  |  |   30|      1|#    define _PR_NEW_LOCK_MCACHE() (_pr_mcacheLock = PR_NewLock())
  ------------------
  310|      1|  ExpandMonitorCache(3);
  311|      1|}
prcmon.c:ExpandMonitorCache:
   94|      1|static PRStatus ExpandMonitorCache(PRUintn new_size_log2) {
   95|      1|  MonitorCacheEntry **old_hash_buckets, *p;
   96|      1|  PRUintn i, entries, old_num_hash_buckets, added;
   97|      1|  MonitorCacheEntry** new_hash_buckets;
   98|      1|  MonitorCacheEntryBlock* new_block;
   99|       |
  100|      1|  entries = 1L << new_size_log2;
  101|       |
  102|       |  /*
  103|       |  ** Expand the monitor-cache-entry free list
  104|       |  */
  105|      1|  new_block = (MonitorCacheEntryBlock*)PR_CALLOC(
  ------------------
  |  |   88|      1|#define PR_CALLOC(_size) (PR_Calloc(1, (_size)))
  ------------------
  106|      1|      sizeof(MonitorCacheEntryBlock) +
  107|      1|      (entries - 1) * sizeof(MonitorCacheEntry));
  108|      1|  if (NULL == new_block) {
  ------------------
  |  Branch (108:7): [True: 0, False: 1]
  ------------------
  109|      0|    return PR_FAILURE;
  110|      0|  }
  111|       |
  112|       |  /*
  113|       |  ** Allocate system monitors for the new monitor cache entries. If we
  114|       |  ** run out of system monitors, break out of the loop.
  115|       |  */
  116|      9|  for (i = 0, p = new_block->entries; i < entries; i++, p++) {
  ------------------
  |  Branch (116:39): [True: 8, False: 1]
  ------------------
  117|      8|    p->mon = PR_NewMonitor();
  118|      8|    if (!p->mon) {
  ------------------
  |  Branch (118:9): [True: 0, False: 8]
  ------------------
  119|      0|      break;
  120|      0|    }
  121|      8|  }
  122|      1|  added = i;
  123|      1|  if (added != entries) {
  ------------------
  |  Branch (123:7): [True: 0, False: 1]
  ------------------
  124|      0|    MonitorCacheEntryBlock* realloc_block;
  125|       |
  126|      0|    if (added == 0) {
  ------------------
  |  Branch (126:9): [True: 0, False: 0]
  ------------------
  127|       |      /* Totally out of system monitors. Lossage abounds */
  128|      0|      PR_DELETE(new_block);
  ------------------
  |  |  110|      0|#define PR_DELETE(_ptr) { PR_Free(_ptr); (_ptr) = NULL; }
  ------------------
  129|      0|      return PR_FAILURE;
  130|      0|    }
  131|       |
  132|       |    /*
  133|       |    ** We were able to allocate some of the system monitors. Use
  134|       |    ** realloc to shrink down the new_block memory. If that fails,
  135|       |    ** carry on with the too-large new_block.
  136|       |    */
  137|      0|    realloc_block = (MonitorCacheEntryBlock*)PR_REALLOC(
  ------------------
  |  |   77|      0|#define PR_REALLOC(_ptr, _size) (PR_Realloc((_ptr), (_size)))
  ------------------
  138|      0|        new_block, sizeof(MonitorCacheEntryBlock) +
  139|      0|                       (added - 1) * sizeof(MonitorCacheEntry));
  140|      0|    if (realloc_block) {
  ------------------
  |  Branch (140:9): [True: 0, False: 0]
  ------------------
  141|      0|      new_block = realloc_block;
  142|      0|    }
  143|      0|  }
  144|       |
  145|       |  /*
  146|       |  ** Now that we have allocated all of the system monitors, build up
  147|       |  ** the new free list. We can just update the free_list because we own
  148|       |  ** the mcache-lock and we aren't calling anyone who might want to use
  149|       |  ** it.
  150|       |  */
  151|      8|  for (i = 0, p = new_block->entries; i < added - 1; i++, p++) {
  ------------------
  |  Branch (151:39): [True: 7, False: 1]
  ------------------
  152|      7|    p->next = p + 1;
  153|      7|  }
  154|      1|  p->next = free_entries;
  155|      1|  free_entries = new_block->entries;
  156|      1|  num_free_entries += added;
  157|      1|  new_block->next = mcache_blocks;
  158|      1|  mcache_blocks = new_block;
  159|       |
  160|       |  /* Try to expand the hash table */
  161|      1|  new_hash_buckets =
  162|      1|      (MonitorCacheEntry**)PR_CALLOC(entries * sizeof(MonitorCacheEntry*));
  ------------------
  |  |   88|      1|#define PR_CALLOC(_size) (PR_Calloc(1, (_size)))
  ------------------
  163|      1|  if (NULL == new_hash_buckets) {
  ------------------
  |  Branch (163:7): [True: 0, False: 1]
  ------------------
  164|       |    /*
  165|       |    ** Partial lossage. In this situation we don't get any more hash
  166|       |    ** buckets, which just means that the table lookups will take
  167|       |    ** longer. This is bad, but not fatal
  168|       |    */
  169|      0|    PR_LOG(_pr_cmon_lm, PR_LOG_WARNING,
  ------------------
  |  |  177|      0|    PR_BEGIN_MACRO             \
  |  |  ------------------
  |  |  |  |  123|      0|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |  178|      0|      if (PR_LOG_TEST(_module,_level)) { \
  |  |  ------------------
  |  |  |  |  167|      0|    ((_module)->level >= (_level))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (167:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  179|      0|      PR_LogPrint _args;         \
  |  |  180|      0|      }                     \
  |  |  181|      0|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|      0|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  170|      0|           ("unable to grow monitor cache hash buckets"));
  171|      0|    return PR_SUCCESS;
  172|      0|  }
  173|       |
  174|       |  /*
  175|       |  ** Compute new hash mask value. This value is used to mask an address
  176|       |  ** until it's bits are in the right spot for indexing into the hash
  177|       |  ** table.
  178|       |  */
  179|      1|  hash_mask = entries - 1;
  180|       |
  181|       |  /*
  182|       |  ** Expand the hash table. We have to rehash everything in the old
  183|       |  ** table into the new table.
  184|       |  */
  185|      1|  old_hash_buckets = hash_buckets;
  186|      1|  old_num_hash_buckets = num_hash_buckets;
  187|      1|  for (i = 0; i < old_num_hash_buckets; i++) {
  ------------------
  |  Branch (187:15): [True: 0, False: 1]
  ------------------
  188|      0|    p = old_hash_buckets[i];
  189|      0|    while (p) {
  ------------------
  |  Branch (189:12): [True: 0, False: 0]
  ------------------
  190|      0|      MonitorCacheEntry* next = p->next;
  191|       |
  192|       |      /* Hash based on new table size, and then put p in the new table */
  193|      0|      PRUintn hash = HASH(p->address);
  ------------------
  |  |   78|      0|  ((PRUint32)(((PRUptrdiff)(address) >> 2) ^ ((PRUptrdiff)(address) >> 10)) & \
  |  |   79|      0|   hash_mask)
  ------------------
  194|      0|      p->next = new_hash_buckets[hash];
  195|      0|      new_hash_buckets[hash] = p;
  196|       |
  197|      0|      p = next;
  198|      0|    }
  199|      0|  }
  200|       |
  201|       |  /*
  202|       |  ** Switch over to new hash table and THEN call free of the old
  203|       |  ** table. Since free might re-enter _pr_mcache_lock, things would
  204|       |  ** break terribly if it used the old hash table.
  205|       |  */
  206|      1|  hash_buckets = new_hash_buckets;
  207|      1|  num_hash_buckets = entries;
  208|      1|  num_hash_buckets_log2 = new_size_log2;
  209|      1|  PR_DELETE(old_hash_buckets);
  ------------------
  |  |  110|      1|#define PR_DELETE(_ptr) { PR_Free(_ptr); (_ptr) = NULL; }
  ------------------
  210|       |
  211|      1|  PR_LOG(
  ------------------
  |  |  177|      1|    PR_BEGIN_MACRO             \
  |  |  ------------------
  |  |  |  |  123|      1|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |  178|      1|      if (PR_LOG_TEST(_module,_level)) { \
  |  |  ------------------
  |  |  |  |  167|      1|    ((_module)->level >= (_level))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (167:5): [True: 0, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  179|      0|      PR_LogPrint _args;         \
  |  |  180|      0|      }                     \
  |  |  181|      1|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|      1|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  212|      1|      _pr_cmon_lm, PR_LOG_NOTICE,
  213|      1|      ("expanded monitor cache to %d (buckets %d)", num_free_entries, entries));
  214|       |
  215|      1|  return PR_SUCCESS;
  216|      1|} /* ExpandMonitorCache */

_PR_InitRWLocks:
  367|      1|void _PR_InitRWLocks(void) {
  368|       |  /*
  369|       |   * allocated thread-private-data index for rwlock list
  370|       |   */
  371|      1|  if (PR_NewThreadPrivateIndex(&pr_thread_rwlock_key, _PR_RELEASE_LOCK_STACK) ==
  ------------------
  |  Branch (371:7): [True: 0, False: 1]
  ------------------
  372|      1|      PR_FAILURE) {
  373|      0|    pr_thread_rwlock_alloc_failed = 1;
  374|      0|    return;
  375|      0|  }
  376|      1|}

_PR_InitTPD:
   60|      1|void _PR_InitTPD(void) {
   61|      1|  _pr_tpd_destructors = (PRThreadPrivateDTOR*)PR_CALLOC(
  ------------------
  |  |   88|      1|#define PR_CALLOC(_size) (PR_Calloc(1, (_size)))
  ------------------
   62|      1|      _PR_TPD_LIMIT * sizeof(PRThreadPrivateDTOR*));
   63|      1|  PR_ASSERT(NULL != _pr_tpd_destructors);
  ------------------
  |  |  208|      1|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 1, False: 0]
  |  |  ------------------
  ------------------
   64|      1|  _pr_tpd_length = _PR_TPD_LIMIT;
  ------------------
  |  |   49|      1|#define _PR_TPD_LIMIT 128             /* arbitary limit on the TPD slots */
  ------------------
   65|      1|}
PR_NewThreadPrivateIndex:
   93|      2|PR_NewThreadPrivateIndex(PRUintn* newIndex, PRThreadPrivateDTOR dtor) {
   94|      2|  PRStatus rv;
   95|      2|  PRInt32 index;
   96|       |
   97|      2|  if (!_pr_initialized) {
  ------------------
  |  Branch (97:7): [True: 0, False: 2]
  ------------------
   98|      0|    _PR_ImplicitInitialization();
   99|      0|  }
  100|       |
  101|      2|  PR_ASSERT(NULL != newIndex);
  ------------------
  |  |  208|      2|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  102|      2|  PR_ASSERT(NULL != _pr_tpd_destructors);
  ------------------
  |  |  208|      2|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  103|       |
  104|      2|  index = PR_ATOMIC_INCREMENT(&_pr_tpd_highwater) - 1; /* allocate index */
  ------------------
  |  |  122|      2|#define PR_ATOMIC_INCREMENT(val) __sync_add_and_fetch(val, 1)
  ------------------
  105|      2|  if (_PR_TPD_LIMIT <= index) {
  ------------------
  |  |   49|      2|#define _PR_TPD_LIMIT 128             /* arbitary limit on the TPD slots */
  ------------------
  |  Branch (105:7): [True: 0, False: 2]
  ------------------
  106|      0|    PR_SetError(PR_TPD_RANGE_ERROR, 0);
  ------------------
  |  |  100|      0|#define PR_TPD_RANGE_ERROR                       (-5972L)
  ------------------
  107|      0|    rv = PR_FAILURE; /* that's just wrong */
  108|      2|  } else {
  109|      2|    _pr_tpd_destructors[index] = dtor; /* record destructor @index */
  110|      2|    *newIndex = (PRUintn)index;        /* copy into client's location */
  111|      2|    rv = PR_SUCCESS;                   /* that's okay */
  112|      2|  }
  113|       |
  114|      2|  return rv;
  115|      2|}
PR_SetThreadPrivate:
  131|      2|PR_IMPLEMENT(PRStatus) PR_SetThreadPrivate(PRUintn index, void* priv) {
  132|      2|  PRThread* self = PR_GetCurrentThread();
  133|       |
  134|       |  /*
  135|       |  ** To improve performance, we don't check if the index has been
  136|       |  ** allocated.
  137|       |  */
  138|      2|  if (index >= _PR_TPD_LIMIT) {
  ------------------
  |  |   49|      2|#define _PR_TPD_LIMIT 128             /* arbitary limit on the TPD slots */
  ------------------
  |  Branch (138:7): [True: 0, False: 2]
  ------------------
  139|      0|    PR_SetError(PR_TPD_RANGE_ERROR, 0);
  ------------------
  |  |  100|      0|#define PR_TPD_RANGE_ERROR                       (-5972L)
  ------------------
  140|      0|    return PR_FAILURE;
  141|      0|  }
  142|       |
  143|      2|  PR_ASSERT(((NULL == self->privateData) && (0 == self->tpdLength)) ||
  ------------------
  |  |  208|      8|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:7): [True: 1, False: 1]
  |  |  |  Branch (208:7): [True: 1, False: 0]
  |  |  |  Branch (208:7): [True: 1, False: 0]
  |  |  |  Branch (208:7): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  144|      2|            ((NULL != self->privateData) && (0 != self->tpdLength)));
  145|       |
  146|       |  /*
  147|       |  ** If this thread does not have a sufficient vector for the index
  148|       |  ** being set, go ahead and extend this vector now.
  149|       |  */
  150|      2|  if ((NULL == self->privateData) || (self->tpdLength <= index)) {
  ------------------
  |  Branch (150:7): [True: 1, False: 1]
  |  Branch (150:38): [True: 0, False: 1]
  ------------------
  151|      1|    void* extension = PR_CALLOC(_pr_tpd_length * sizeof(void*));
  ------------------
  |  |   88|      1|#define PR_CALLOC(_size) (PR_Calloc(1, (_size)))
  ------------------
  152|      1|    if (NULL == extension) {
  ------------------
  |  Branch (152:9): [True: 0, False: 1]
  ------------------
  153|      0|      PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0);
  ------------------
  |  |   16|      0|#define PR_OUT_OF_MEMORY_ERROR                   (-6000L)
  ------------------
  154|      0|      return PR_FAILURE;
  155|      0|    }
  156|      1|    if (self->privateData) {
  ------------------
  |  Branch (156:9): [True: 0, False: 1]
  ------------------
  157|      0|      (void)memcpy(extension, self->privateData,
  158|      0|                   self->tpdLength * sizeof(void*));
  159|      0|      PR_DELETE(self->privateData);
  ------------------
  |  |  110|      0|#define PR_DELETE(_ptr) { PR_Free(_ptr); (_ptr) = NULL; }
  ------------------
  160|      0|    }
  161|      1|    self->tpdLength = _pr_tpd_length;
  162|      1|    self->privateData = (void**)extension;
  163|      1|  }
  164|       |  /*
  165|       |  ** There wasn't much chance of having to call the destructor
  166|       |  ** unless the slot already existed.
  167|       |  */
  168|      1|  else if (self->privateData[index] && _pr_tpd_destructors[index]) {
  ------------------
  |  Branch (168:12): [True: 1, False: 0]
  |  Branch (168:40): [True: 1, False: 0]
  ------------------
  169|      1|    void* data = self->privateData[index];
  170|      1|    self->privateData[index] = NULL;
  171|      1|    (*_pr_tpd_destructors[index])(data);
  172|      1|  }
  173|       |
  174|      2|  PR_ASSERT(index < self->tpdLength);
  ------------------
  |  |  208|      2|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  175|      2|  self->privateData[index] = priv;
  176|       |
  177|      2|  return PR_SUCCESS;
  178|      2|}
PR_GetThreadPrivate:
  189|  35.9k|PR_IMPLEMENT(void*) PR_GetThreadPrivate(PRUintn index) {
  190|  35.9k|  PRThread* self = PR_GetCurrentThread();
  191|  35.9k|  void* tpd = ((NULL == self->privateData) || (index >= self->tpdLength))
  ------------------
  |  Branch (191:16): [True: 1, False: 35.9k]
  |  Branch (191:47): [True: 0, False: 35.9k]
  ------------------
  192|  35.9k|                  ? NULL
  193|  35.9k|                  : self->privateData[index];
  194|       |
  195|  35.9k|  return tpd;
  196|  35.9k|}

_ZN19DummyIOLayerMethods8CreateFDEiPS_:
   20|  9.36k|                                               DummyIOLayerMethods *methods) {
   21|  9.36k|  ScopedPRFileDesc fd(PR_CreateIOLayerStub(id, &DummyMethodsForward));
   22|  9.36k|  assert(fd);
   23|  9.36k|  if (!fd) {
  ------------------
  |  Branch (23:7): [True: 0, False: 9.36k]
  ------------------
   24|      0|    return nullptr;
   25|      0|  }
   26|  9.36k|  fd->secret = reinterpret_cast<PRFilePrivate *>(methods);
   27|  9.36k|  return fd;
   28|  9.36k|}
_ZN19DummyIOLayerMethods5CloseEP10PRFileDesc:
   30|  9.36k|PRStatus DummyIOLayerMethods::Close(PRFileDesc *f) {
   31|  9.36k|  f->secret = nullptr;
   32|  9.36k|  f->dtor(f);
   33|  9.36k|  return PR_SUCCESS;
   34|  9.36k|}
_ZN19DummyIOLayerMethods4SendEP10PRFileDescPKviij:
  125|  17.6k|                                  PRIntervalTime to) {
  126|  17.6k|  return Write(f, buf, amount);
  127|  17.6k|}
_ZN19DummyIOLayerMethods11GetpeernameEP10PRFileDescP9PRNetAddr:
  168|  18.7k|PRStatus DummyIOLayerMethods::Getpeername(PRFileDesc *f, PRNetAddr *addr) {
  169|  18.7k|  addr->inet.family = PR_AF_INET;
  ------------------
  |  |   96|  18.7k|#define PR_AF_INET AF_INET
  ------------------
  170|  18.7k|  addr->inet.port = 0;
  171|  18.7k|  addr->inet.ip = 0;
  172|       |
  173|  18.7k|  return PR_SUCCESS;
  174|  18.7k|}
_ZN19DummyIOLayerMethods13GetsockoptionEP10PRFileDescP18PRSocketOptionData:
  182|  13.3k|                                            PRSocketOptionData *opt) {
  183|  13.3k|  switch (opt->option) {
  184|  13.3k|    case PR_SockOpt_Nonblocking:
  ------------------
  |  Branch (184:5): [True: 13.3k, False: 0]
  ------------------
  185|  13.3k|      opt->value.non_blocking = PR_TRUE;
  ------------------
  |  |  437|  13.3k|#define PR_TRUE 1
  ------------------
  186|  13.3k|      return PR_SUCCESS;
  187|      0|    default:
  ------------------
  |  Branch (187:5): [True: 0, False: 13.3k]
  ------------------
  188|      0|      UNIMPLEMENTED();
  ------------------
  |  |   14|      0|  std::cerr << "Unimplemented: " << __FUNCTION__ << std::endl; \
  |  |   15|      0|  assert(false);
  ------------------
  189|      0|      break;
  190|  13.3k|  }
  191|       |
  192|      0|  return PR_FAILURE;
  193|  13.3k|}

dummy_io_fwd.cc:_ZL10DummyCloseP10PRFileDesc:
   13|  9.36k|static PRStatus DummyClose(PRFileDesc *f) { return ToMethods(f)->Close(f); }
dummy_io_fwd.cc:_ZL9ToMethodsP10PRFileDesc:
    9|  76.0k|static DummyIOLayerMethods *ToMethods(PRFileDesc *f) {
   10|  76.0k|  return reinterpret_cast<DummyIOLayerMethods *>(f->secret);
   11|  76.0k|}
dummy_io_fwd.cc:_ZL9DummyRecvP10PRFileDescPviij:
   77|  16.8k|                         int32_t flags, PRIntervalTime to) {
   78|  16.8k|  return ToMethods(f)->Recv(f, buf, buflen, flags, to);
   79|  16.8k|}
dummy_io_fwd.cc:_ZL9DummySendP10PRFileDescPKviij:
   82|  17.6k|                         int32_t flags, PRIntervalTime to) {
   83|  17.6k|  return ToMethods(f)->Send(f, buf, amount, flags, to);
   84|  17.6k|}
dummy_io_fwd.cc:_ZL16DummyGetpeernameP10PRFileDescP9PRNetAddr:
  114|  18.7k|static PRStatus DummyGetpeername(PRFileDesc *f, PRNetAddr *addr) {
  115|  18.7k|  return ToMethods(f)->Getpeername(f, addr);
  116|  18.7k|}
dummy_io_fwd.cc:_ZL18DummyGetsockoptionP10PRFileDescP18PRSocketOptionData:
  122|  13.3k|static PRStatus DummyGetsockoption(PRFileDesc *f, PRSocketOptionData *opt) {
  123|  13.3k|  return ToMethods(f)->Getsockoption(f, opt);
  124|  13.3k|}

_ZN17ScopedMaybeDeleteI10PRFileDescEclEPS0_:
   64|  9.36k|  void operator()(T* ptr) {
   65|  9.36k|    if (ptr) {
  ------------------
  |  Branch (65:9): [True: 9.36k, False: 0]
  ------------------
   66|  9.36k|      ScopedDelete del;
   67|  9.36k|      del(ptr);
   68|  9.36k|    }
   69|  9.36k|  }
_ZN12ScopedDeleteclEP10PRFileDesc:
   44|  9.36k|  void operator()(PRFileDesc* fd) { PR_Close(fd); }
_ZN12ScopedDeleteclEP15PK11SlotInfoStr:
   38|  4.73k|  void operator()(PK11SlotInfo* slot) { PK11_FreeSlot(slot); }
_ZN12ScopedDeleteclEP13PK11SymKeyStr:
   40|  4.73k|  void operator()(PK11SymKey* key) { PK11_FreeSymKey(key); }
_ZN17ScopedMaybeDeleteI15PK11SlotInfoStrEclEPS0_:
   64|  4.73k|  void operator()(T* ptr) {
   65|  4.73k|    if (ptr) {
  ------------------
  |  Branch (65:9): [True: 4.73k, False: 0]
  ------------------
   66|  4.73k|      ScopedDelete del;
   67|  4.73k|      del(ptr);
   68|  4.73k|    }
   69|  4.73k|  }
_ZN17ScopedMaybeDeleteI13PK11SymKeyStrEclEPS0_:
   64|  4.73k|  void operator()(T* ptr) {
   65|  4.73k|    if (ptr) {
  ------------------
  |  Branch (65:9): [True: 4.73k, False: 0]
  ------------------
   66|  4.73k|      ScopedDelete del;
   67|  4.73k|      del(ptr);
   68|  4.73k|    }
   69|  4.73k|  }

_ZN11NSSDatabaseC2Ev:
   15|      1|  NSSDatabase() { assert(NSS_NoDB_Init(nullptr) == SECSuccess); }
_ZN11NSSDatabaseD2Ev:
   16|      1|  ~NSSDatabase() { assert(NSS_Shutdown() == SECSuccess); }

_ZN9TlsClient6ConfigC2EPKhm:
   53|  9.36k|Config::Config(const uint8_t* data, size_t len) {
   54|  9.36k|  union {
   55|  9.36k|    uint64_t bitmap;
   56|  9.36k|    struct {
   57|  9.36k|      uint32_t config;
   58|  9.36k|      uint16_t ssl_version_range_min;
   59|  9.36k|      uint16_t ssl_version_range_max;
   60|  9.36k|    };
   61|  9.36k|  };
   62|       |
   63|  76.7M|  for (size_t i = 0; i < len; i++) {
  ------------------
  |  Branch (63:22): [True: 76.7M, False: 9.36k]
  ------------------
   64|  76.7M|    bitmap ^= static_cast<uint64_t>(data[i]) << (8 * (i % 8));
   65|  76.7M|  }
   66|       |
   67|       |  // Map SSL version values to a valid range.
   68|  9.36k|  ssl_version_range_min =
   69|  9.36k|      SSL_VERSION_RANGE_MIN_VALID +
  ------------------
  |  |   16|  9.36k|#define SSL_VERSION_RANGE_MIN_VALID 0x0302
  ------------------
   70|  9.36k|      (ssl_version_range_min %
   71|  9.36k|       (1 + SSL_VERSION_RANGE_MAX_VALID - SSL_VERSION_RANGE_MIN_VALID));
  ------------------
  |  |   20|  9.36k|#define SSL_VERSION_RANGE_MAX_VALID 0x0304
  ------------------
                     (1 + SSL_VERSION_RANGE_MAX_VALID - SSL_VERSION_RANGE_MIN_VALID));
  ------------------
  |  |   16|  9.36k|#define SSL_VERSION_RANGE_MIN_VALID 0x0302
  ------------------
   72|  9.36k|  ssl_version_range_max =
   73|  9.36k|      ssl_version_range_min +
   74|  9.36k|      (ssl_version_range_max %
   75|  9.36k|       (1 + SSL_VERSION_RANGE_MAX_VALID - ssl_version_range_min));
  ------------------
  |  |   20|  9.36k|#define SSL_VERSION_RANGE_MAX_VALID 0x0304
  ------------------
   76|       |
   77|  9.36k|  config_ = config;
   78|  9.36k|  ssl_version_range_ = {
   79|  9.36k|      .min = ssl_version_range_min,
   80|  9.36k|      .max = ssl_version_range_max,
   81|  9.36k|  };
   82|  9.36k|}
_ZN9TlsClient6Config12SetCallbacksEP10PRFileDesc:
   84|  9.36k|void Config::SetCallbacks(PRFileDesc* fd) {
   85|  9.36k|  SECStatus rv = SSL_AuthCertificateHook(fd, AuthCertificateHook, this);
   86|  9.36k|  assert(rv == SECSuccess);
   87|       |
   88|  9.36k|  rv = SSL_SetCanFalseStartCallback(fd, CanFalseStartCallback, nullptr);
   89|  9.36k|  assert(rv == SECSuccess);
   90|  9.36k|}
_ZN9TlsClient6Config16SetSocketOptionsEP10PRFileDesc:
   92|  9.36k|void Config::SetSocketOptions(PRFileDesc* fd) {
   93|  9.36k|  SECStatus rv = SSL_OptionSet(fd, SSL_ENABLE_EXTENDED_MASTER_SECRET,
  ------------------
  |  |  195|  9.36k|#define SSL_ENABLE_EXTENDED_MASTER_SECRET 30
  ------------------
   94|  9.36k|                               this->EnableExtendedMasterSecret());
   95|  9.36k|  assert(rv == SECSuccess);
   96|       |
   97|  9.36k|  rv = SSL_OptionSet(fd, SSL_REQUIRE_DH_NAMED_GROUPS,
  ------------------
  |  |  214|  9.36k|#define SSL_REQUIRE_DH_NAMED_GROUPS 32
  ------------------
   98|  9.36k|                     this->RequireDhNamedGroups());
   99|  9.36k|  assert(rv == SECSuccess);
  100|       |
  101|  9.36k|  rv = SSL_OptionSet(fd, SSL_ENABLE_FALSE_START, this->EnableFalseStart());
  ------------------
  |  |  117|  9.36k|#define SSL_ENABLE_FALSE_START 22       /* Enable SSL false start (off by */
  ------------------
  102|  9.36k|  assert(rv == SECSuccess);
  103|       |
  104|  9.36k|  rv = SSL_OptionSet(fd, SSL_ENABLE_DEFLATE, this->EnableDeflate());
  ------------------
  |  |  110|  9.36k|#define SSL_ENABLE_DEFLATE 19           /* (unsupported, deprecated, off) */
  ------------------
  105|  9.36k|  assert(rv == SECSuccess);
  106|       |
  107|  9.36k|  rv = SSL_OptionSet(fd, SSL_CBC_RANDOM_IV, this->CbcRandomIv());
  ------------------
  |  |  158|  9.36k|#define SSL_CBC_RANDOM_IV 23
  ------------------
  108|  9.36k|  assert(rv == SECSuccess);
  109|       |
  110|  9.36k|  rv = SSL_OptionSet(fd, SSL_REQUIRE_SAFE_NEGOTIATION,
  ------------------
  |  |  112|  9.36k|#define SSL_REQUIRE_SAFE_NEGOTIATION 21 /* Peer must send Signaling       */
  ------------------
  111|  9.36k|                     this->RequireSafeNegotiation());
  112|  9.36k|  assert(rv == SECSuccess);
  113|       |
  114|  9.36k|  rv = SSL_OptionSet(fd, SSL_NO_CACHE, this->NoCache());
  ------------------
  |  |   85|  9.36k|#define SSL_NO_CACHE 9             /* don't use the session cache */
  ------------------
  115|  9.36k|  assert(rv == SECSuccess);
  116|       |
  117|  9.36k|  rv = SSL_OptionSet(fd, SSL_ENABLE_GREASE, this->EnableGrease());
  ------------------
  |  |  374|  9.36k|#define SSL_ENABLE_GREASE 42
  ------------------
  118|  9.36k|  assert(rv == SECSuccess);
  119|       |
  120|  9.36k|  rv = SSL_OptionSet(fd, SSL_ENABLE_CH_EXTENSION_PERMUTATION,
  ------------------
  |  |  381|  9.36k|#define SSL_ENABLE_CH_EXTENSION_PERMUTATION 43
  ------------------
  121|  9.36k|                     this->EnableCHExtensionPermutation());
  122|  9.36k|  assert(rv == SECSuccess);
  123|       |
  124|  9.36k|  if (this->SetCertificateCompressionAlgorithm()) {
  ------------------
  |  Branch (124:7): [True: 4.57k, False: 4.78k]
  ------------------
  125|  4.57k|    rv = SSL_SetCertificateCompressionAlgorithm(fd, kCompressionAlg);
  ------------------
  |  | 1083|  4.57k|    SSL_EXPERIMENTAL_API("SSL_SetCertificateCompressionAlgorithm", \
  |  |  ------------------
  |  |  |  |   22|  4.57k|    (SSL_GetExperimentalAPI(name)                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (22:6): [True: 4.57k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   23|  4.57k|         ? ((SECStatus(*) arglist)SSL_GetExperimentalAPI(name))args \
  |  |  |  |   24|  4.57k|         : SECFailure)
  |  |  ------------------
  |  | 1084|  4.57k|                         (PRFileDesc * _fd,                        \
  |  | 1085|  4.57k|                          SSLCertificateCompressionAlgorithm t),   \
  |  | 1086|  4.57k|                         (fd, t))
  ------------------
  126|  4.57k|    assert(rv == SECSuccess);
  127|  4.57k|  }
  128|       |
  129|  9.36k|  if (this->SetVersionRange()) {
  ------------------
  |  Branch (129:7): [True: 3.56k, False: 5.80k]
  ------------------
  130|  3.56k|    rv = SSL_VersionRangeSet(fd, &ssl_version_range_);
  131|  3.56k|    assert(rv == SECSuccess);
  132|  3.56k|  }
  133|       |
  134|  9.36k|  if (this->AddExternalPsk()) {
  ------------------
  |  Branch (134:7): [True: 4.73k, False: 4.63k]
  ------------------
  135|  4.73k|    ScopedPK11SlotInfo slot(PK11_GetInternalSlot());
  136|  4.73k|    assert(slot);
  137|       |
  138|  4.73k|    ScopedPK11SymKey key(PK11_KeyGen(slot.get(), CKM_NSS_CHACHA20_POLY1305,
  ------------------
  |  |  243|  4.73k|#define CKM_NSS_CHACHA20_POLY1305 (CKM_NSS + 28)
  |  |  ------------------
  |  |  |  |  162|  4.73k|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|  4.73k|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  4.73k|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  139|  4.73k|                                     nullptr, 32, nullptr));
  140|  4.73k|    assert(key);
  141|       |
  142|  4.73k|    rv = SSL_AddExternalPsk(fd, key.get(), kPskIdentity,
  ------------------
  |  | 1051|  4.73k|    SSL_EXPERIMENTAL_API("SSL_AddExternalPsk",                                 \
  |  |  ------------------
  |  |  |  |   22|  4.73k|    (SSL_GetExperimentalAPI(name)                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (22:6): [True: 4.73k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   23|  4.73k|         ? ((SECStatus(*) arglist)SSL_GetExperimentalAPI(name))args \
  |  |  |  |   24|  4.73k|         : SECFailure)
  |  |  ------------------
  |  | 1052|  4.73k|                         (PRFileDesc * _fd, PK11SymKey * _psk,                 \
  |  | 1053|  4.73k|                          const PRUint8 *_identity, unsigned int _identityLen, \
  |  | 1054|  4.73k|                          SSLHashType _hash),                                  \
  |  | 1055|  4.73k|                         (fd, psk, identity, identityLen, hash))
  ------------------
  143|  4.73k|                            sizeof(kPskIdentity) - 1, this->PskHashType());
  144|  4.73k|    assert(rv == SECSuccess);
  145|  4.73k|  }
  146|       |
  147|  9.36k|  rv = SSL_OptionSet(fd, SSL_ENABLE_POST_HANDSHAKE_AUTH,
  ------------------
  |  |  311|  9.36k|#define SSL_ENABLE_POST_HANDSHAKE_AUTH 39
  ------------------
  148|  9.36k|                     this->EnablePostHandshakeAuth());
  149|  9.36k|  assert(rv == SECSuccess);
  150|       |
  151|  9.36k|  rv = SSL_OptionSet(fd, SSL_ENABLE_0RTT_DATA, this->EnableZeroRtt());
  ------------------
  |  |  244|  9.36k|#define SSL_ENABLE_0RTT_DATA 33
  ------------------
  152|  9.36k|  assert(rv == SECSuccess);
  153|       |
  154|  9.36k|  rv = SSL_OptionSet(fd, SSL_ENABLE_ALPN, this->EnableAlpn());
  ------------------
  |  |  174|  9.36k|#define SSL_ENABLE_ALPN 26
  ------------------
  155|  9.36k|  assert(rv == SECSuccess);
  156|       |
  157|  9.36k|  rv = SSL_OptionSet(fd, SSL_ENABLE_FALLBACK_SCSV, this->EnableFallbackScsv());
  ------------------
  |  |  183|  9.36k|#define SSL_ENABLE_FALLBACK_SCSV 28 /* Send fallback SCSV in \
  ------------------
  158|  9.36k|  assert(rv == SECSuccess);
  159|       |
  160|  9.36k|  rv = SSL_OptionSet(fd, SSL_ENABLE_OCSP_STAPLING, this->EnableOcspStapling());
  ------------------
  |  |  159|  9.36k|#define SSL_ENABLE_OCSP_STAPLING 24 /* Request OCSP stapling (client) */
  ------------------
  161|  9.36k|  assert(rv == SECSuccess);
  162|       |
  163|  9.36k|  rv = SSL_OptionSet(fd, SSL_ENABLE_SESSION_TICKETS,
  ------------------
  |  |  108|  9.36k|#define SSL_ENABLE_SESSION_TICKETS 18   /* Enable TLS SessionTicket       */
  ------------------
  164|  9.36k|                     this->EnableSessionTickets());
  165|  9.36k|  assert(rv == SECSuccess);
  166|       |
  167|  9.36k|  rv = SSL_OptionSet(fd, SSL_ENABLE_TLS13_COMPAT_MODE,
  ------------------
  |  |  272|  9.36k|#define SSL_ENABLE_TLS13_COMPAT_MODE 35
  ------------------
  168|  9.36k|                     this->EnableTls13CompatMode());
  169|  9.36k|  assert(rv == SECSuccess);
  170|       |
  171|  9.36k|  rv = SSL_OptionSet(fd, SSL_NO_LOCKS, this->NoLocks());
  ------------------
  |  |  107|  9.36k|#define SSL_NO_LOCKS 17                 /* Don't use locks for protection */
  ------------------
  172|  9.36k|  assert(rv == SECSuccess);
  173|       |
  174|  9.36k|  rv = SSL_EnableTls13GreaseEch(fd, this->EnableTls13GreaseEch());
  ------------------
  |  |  517|  9.36k|    SSL_EXPERIMENTAL_API("SSL_EnableTls13GreaseEch", \
  |  |  ------------------
  |  |  |  |   22|  9.36k|    (SSL_GetExperimentalAPI(name)                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (22:6): [True: 9.36k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   23|  9.36k|         ? ((SECStatus(*) arglist)SSL_GetExperimentalAPI(name))args \
  |  |  |  |   24|  9.36k|         : SECFailure)
  |  |  ------------------
  |  |  518|  9.36k|                         (PRFileDesc * _fd, PRBool _enabled), (fd, enabled))
  ------------------
  175|  9.36k|  assert(rv == SECSuccess);
  176|       |
  177|  9.36k|  rv = SSL_SetDtls13VersionWorkaround(fd, this->SetDtls13VersionWorkaround());
  ------------------
  |  | 1028|  9.36k|    SSL_EXPERIMENTAL_API("SSL_SetDtls13VersionWorkaround", \
  |  |  ------------------
  |  |  |  |   22|  9.36k|    (SSL_GetExperimentalAPI(name)                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (22:6): [True: 9.36k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   23|  9.36k|         ? ((SECStatus(*) arglist)SSL_GetExperimentalAPI(name))args \
  |  |  |  |   24|  9.36k|         : SECFailure)
  |  |  ------------------
  |  | 1029|  9.36k|                         (PRFileDesc * _fd, PRBool _enabled), (fd, enabled))
  ------------------
  178|  9.36k|  assert(rv == SECSuccess);
  179|       |
  180|  9.36k|  rv = SSL_OptionSet(fd, SSL_ENABLE_DELEGATED_CREDENTIALS,
  ------------------
  |  |  328|  9.36k|#define SSL_ENABLE_DELEGATED_CREDENTIALS 40
  ------------------
  181|  9.36k|                     this->EnableDelegatedCredentials());
  182|  9.36k|  assert(rv == SECSuccess);
  183|       |
  184|  9.36k|  rv = SSL_OptionSet(fd, SSL_ENABLE_DTLS_SHORT_HEADER,
  ------------------
  |  |  283|  9.36k|#define SSL_ENABLE_DTLS_SHORT_HEADER 36
  ------------------
  185|  9.36k|                     this->EnableDtlsShortHeader());
  186|  9.36k|  assert(rv == SECSuccess);
  187|       |
  188|       |#ifndef IS_DTLS_FUZZ
  189|       |  rv =
  190|       |      SSL_OptionSet(fd, SSL_ENABLE_RENEGOTIATION, SSL_RENEGOTIATE_UNRESTRICTED);
  191|       |  assert(rv == SECSuccess);
  192|       |
  193|       |  if (this->SetClientEchConfigs()) {
  194|       |    ScopedSECItem echConfigsBin(NSSBase64_DecodeBuffer(
  195|       |        nullptr, nullptr, kEchConfigs, sizeof(kEchConfigs)));
  196|       |    assert(echConfigsBin);
  197|       |
  198|       |    rv = SSL_SetClientEchConfigs(fd, echConfigsBin->data, echConfigsBin->len);
  199|       |    assert(rv == SECSuccess);
  200|       |  }
  201|       |#endif  // IS_DTLS_FUZZ
  202|  9.36k|}
client_config.cc:_ZL19AuthCertificateHookPvP10PRFileDescii:
   33|  4.61k|                                     PRBool isServer) {
   34|  4.61k|  assert(!isServer);
   35|       |
   36|  4.61k|  auto config = reinterpret_cast<TlsClient::Config*>(arg);
   37|  4.61k|  if (config->FailCertificateAuthentication()) return SECFailure;
  ------------------
  |  Branch (37:7): [True: 75, False: 4.54k]
  ------------------
   38|       |
   39|  4.54k|  return SECSuccess;
   40|  4.61k|}
client_config.cc:_ZL21CanFalseStartCallbackP10PRFileDescPvPi:
   43|    518|                                       PRBool* canFalseStart) {
   44|    518|  *canFalseStart = true;
   45|    518|  return SECSuccess;
   46|    518|}

_ZN9TlsClient6Config11PskHashTypeEv:
   31|  4.73k|  SSLHashType PskHashType() {
   32|  4.73k|    if (config_ % 2) return ssl_hash_sha256;
  ------------------
  |  Branch (32:9): [True: 1.20k, False: 3.52k]
  ------------------
   33|       |
   34|  3.52k|    return ssl_hash_sha384;
   35|  4.73k|  };
_ZN9TlsClient6Config29FailCertificateAuthenticationEv:
   40|  4.61k|  bool FailCertificateAuthentication() { return config_ & (1 << 0); };
_ZN9TlsClient6Config26EnableExtendedMasterSecretEv:
   41|  9.36k|  bool EnableExtendedMasterSecret() { return config_ & (1 << 1); };
_ZN9TlsClient6Config20RequireDhNamedGroupsEv:
   42|  9.36k|  bool RequireDhNamedGroups() { return config_ & (1 << 2); };
_ZN9TlsClient6Config16EnableFalseStartEv:
   43|  9.36k|  bool EnableFalseStart() { return config_ & (1 << 3); };
_ZN9TlsClient6Config13EnableDeflateEv:
   44|  9.36k|  bool EnableDeflate() { return config_ & (1 << 4); };
_ZN9TlsClient6Config11CbcRandomIvEv:
   45|  9.36k|  bool CbcRandomIv() { return config_ & (1 << 5); };
_ZN9TlsClient6Config22RequireSafeNegotiationEv:
   46|  9.36k|  bool RequireSafeNegotiation() { return config_ & (1 << 6); };
_ZN9TlsClient6Config7NoCacheEv:
   47|  9.36k|  bool NoCache() { return config_ & (1 << 7); };
_ZN9TlsClient6Config12EnableGreaseEv:
   48|  9.36k|  bool EnableGrease() { return config_ & (1 << 8); };
_ZN9TlsClient6Config28EnableCHExtensionPermutationEv:
   49|  9.36k|  bool EnableCHExtensionPermutation() { return config_ & (1 << 9); };
_ZN9TlsClient6Config34SetCertificateCompressionAlgorithmEv:
   50|  9.36k|  bool SetCertificateCompressionAlgorithm() { return config_ & (1 << 10); };
_ZN9TlsClient6Config15SetVersionRangeEv:
   52|  9.36k|  bool SetVersionRange() { return config_ & (1 << 12); };
_ZN9TlsClient6Config14AddExternalPskEv:
   53|  9.36k|  bool AddExternalPsk() { return config_ & (1 << 13); };
_ZN9TlsClient6Config23EnablePostHandshakeAuthEv:
   54|  9.36k|  bool EnablePostHandshakeAuth() { return config_ & (1 << 14); };
_ZN9TlsClient6Config13EnableZeroRttEv:
   55|  9.36k|  bool EnableZeroRtt() { return config_ & (1 << 15); };
_ZN9TlsClient6Config10EnableAlpnEv:
   56|  9.36k|  bool EnableAlpn() { return config_ & (1 << 16); };
_ZN9TlsClient6Config18EnableFallbackScsvEv:
   57|  9.36k|  bool EnableFallbackScsv() { return config_ & (1 << 17); };
_ZN9TlsClient6Config18EnableOcspStaplingEv:
   58|  9.36k|  bool EnableOcspStapling() { return config_ & (1 << 18); };
_ZN9TlsClient6Config20EnableSessionTicketsEv:
   59|  9.36k|  bool EnableSessionTickets() { return config_ & (1 << 19); };
_ZN9TlsClient6Config21EnableTls13CompatModeEv:
   60|  9.36k|  bool EnableTls13CompatMode() { return config_ & (1 << 20); };
_ZN9TlsClient6Config7NoLocksEv:
   61|  9.36k|  bool NoLocks() { return config_ & (1 << 21); };
_ZN9TlsClient6Config20EnableTls13GreaseEchEv:
   62|  9.36k|  bool EnableTls13GreaseEch() { return config_ & (1 << 22); };
_ZN9TlsClient6Config26SetDtls13VersionWorkaroundEv:
   63|  9.36k|  bool SetDtls13VersionWorkaround() { return config_ & (1 << 23); };
_ZN9TlsClient6Config26EnableDelegatedCredentialsEv:
   64|  9.36k|  bool EnableDelegatedCredentials() { return config_ & (1 << 24); };
_ZN9TlsClient6Config21EnableDtlsShortHeaderEv:
   65|  9.36k|  bool EnableDtlsShortHeader() { return config_ & (1 << 25); };

_ZN9TlsCommon7FixTimeEP10PRFileDesc:
   21|  9.36k|void FixTime(PRFileDesc* fd) {
   22|  9.36k|  SECStatus rv = SSL_SetTimeFunc(fd, FixedTime, nullptr);
  ------------------
  |  |  892|  9.36k|    SSL_EXPERIMENTAL_API("SSL_SetTimeFunc",                              \
  |  |  ------------------
  |  |  |  |   22|  9.36k|    (SSL_GetExperimentalAPI(name)                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (22:6): [True: 9.36k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   23|  9.36k|         ? ((SECStatus(*) arglist)SSL_GetExperimentalAPI(name))args \
  |  |  |  |   24|  9.36k|         : SECFailure)
  |  |  ------------------
  |  |  893|  9.36k|                         (PRFileDesc * _fd, SSLTimeFunc _f, void *_arg), \
  |  |  894|  9.36k|                         (fd, f, arg))
  ------------------
   23|  9.36k|  assert(rv == SECSuccess);
   24|  9.36k|}
_ZN9TlsCommon25EnableAllProtocolVersionsEv:
   26|  9.36k|void EnableAllProtocolVersions() {
   27|  9.36k|  SSLVersionRange supported;
   28|  9.36k|  SECStatus rv;
   29|       |
   30|       |  // Enable all supported versions for TCP.
   31|  9.36k|  rv = SSL_VersionRangeGetSupported(ssl_variant_stream, &supported);
   32|  9.36k|  assert(rv == SECSuccess);
   33|       |
   34|  9.36k|  rv = SSL_VersionRangeSetDefault(ssl_variant_stream, &supported);
   35|  9.36k|  assert(rv == SECSuccess);
   36|       |
   37|       |  // Enable all supported versions for UDP.
   38|  9.36k|  rv = SSL_VersionRangeGetSupported(ssl_variant_datagram, &supported);
   39|  9.36k|  assert(rv == SECSuccess);
   40|       |
   41|  9.36k|  rv = SSL_VersionRangeSetDefault(ssl_variant_datagram, &supported);
   42|  9.36k|  assert(rv == SECSuccess);
   43|  9.36k|}
_ZN9TlsCommon21EnableAllCipherSuitesEP10PRFileDesc:
   45|  9.36k|void EnableAllCipherSuites(PRFileDesc* fd) {
   46|   674k|  for (uint16_t i = 0; i < SSL_NumImplementedCiphers; ++i) {
  ------------------
  |  Branch (46:24): [True: 664k, False: 9.36k]
  ------------------
   47|   664k|    SECStatus rv = SSL_CipherPrefSet(fd, SSL_ImplementedCiphers[i], true);
   48|   664k|    assert(rv == SECSuccess);
   49|   664k|  }
   50|  9.36k|}
_ZN9TlsCommon11DoHandshakeEP10PRFileDescb:
   52|  9.36k|void DoHandshake(PRFileDesc* fd, bool isServer) {
   53|  9.36k|  SECStatus rv = SSL_ResetHandshake(fd, isServer);
   54|  9.36k|  assert(rv == SECSuccess);
   55|       |
   56|  12.8k|  do {
   57|  12.8k|    rv = SSL_ForceHandshake(fd);
   58|  12.8k|  } while (rv != SECSuccess && PR_GetError() == PR_WOULD_BLOCK_ERROR);
  ------------------
  |  |   22|  12.3k|#define PR_WOULD_BLOCK_ERROR                     (-5998L)
  ------------------
  |  Branch (58:12): [True: 12.3k, False: 518]
  |  Branch (58:32): [True: 3.50k, False: 8.84k]
  ------------------
   59|       |
   60|       |  // If the handshake succeeds, let's read some data from the server, if any.
   61|  9.36k|  if (rv == SECSuccess) {
  ------------------
  |  Branch (61:7): [True: 518, False: 8.84k]
  ------------------
   62|    518|    uint8_t block[1024];
   63|    518|    int32_t nb;
   64|       |
   65|       |    // Read application data and echo it back.
   66|    518|    while ((nb = PR_Read(fd, block, sizeof(block))) > 0) {
  ------------------
  |  Branch (66:12): [True: 0, False: 518]
  ------------------
   67|      0|      PR_Write(fd, block, nb);
   68|      0|    }
   69|    518|  }
   70|  9.36k|}
common.cc:_ZL9FixedTimePv:
   16|  10.5k|static PRTime FixedTime(void*) { return 1234; }

_ZN9TlsSocket13DummyPrSocket4ReadEP10PRFileDescPvi:
   17|  16.8k|int32_t DummyPrSocket::Read(PRFileDesc *fd, void *data, int32_t len) {
   18|  16.8k|  assert(data && len > 0);
   19|       |
   20|  16.8k|  int32_t amount = std::min(len, static_cast<int32_t>(len_));
   21|  16.8k|  memcpy(data, buf_, amount);
   22|       |
   23|  16.8k|  buf_ += amount;
   24|  16.8k|  len_ -= amount;
   25|       |
   26|  16.8k|  return amount;
   27|  16.8k|}
_ZN9TlsSocket13DummyPrSocket5WriteEP10PRFileDescPKvi:
   29|  17.6k|int32_t DummyPrSocket::Write(PRFileDesc *fd, const void *buf, int32_t length) {
   30|  17.6k|  return length;
   31|  17.6k|}
_ZN9TlsSocket13DummyPrSocket4RecvEP10PRFileDescPviij:
   34|  16.8k|                            int32_t flags, PRIntervalTime to) {
   35|  16.8k|  assert(flags == 0);
   36|  16.8k|  return Read(fd, buf, buflen);
   37|  16.8k|}

_ZN9TlsSocket13DummyPrSocketC2EPKhm:
   18|  9.36k|  DummyPrSocket(const uint8_t *buf, size_t len) : buf_(buf), len_(len) {}

LLVMFuzzerTestOneInput:
   28|  9.36k|extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
   29|  9.36k|  static NSSDatabase db = NSSDatabase();
   30|  9.36k|  static PRDescIdentity id = PR_GetUniqueIdentity("fuzz-client");
   31|       |
   32|       |  // Create and import dummy socket.
   33|  9.36k|  TlsSocket::DummyPrSocket socket = TlsSocket::DummyPrSocket(data, size);
   34|  9.36k|  ScopedPRFileDesc prFd(DummyIOLayerMethods::CreateFD(id, &socket));
   35|  9.36k|  PRFileDesc* sslFd = ImportFD(nullptr, prFd.get());
  ------------------
  |  |   23|  9.36k|#define ImportFD DTLS_ImportFD
  ------------------
   36|  9.36k|  assert(sslFd == prFd.get());
   37|       |
   38|       |  // Derive client config from input data.
   39|  9.36k|  TlsClient::Config config = TlsClient::Config(data, size);
   40|       |
   41|  9.36k|  if (ssl_trace >= 90) {
  ------------------
  |  Branch (41:7): [True: 0, False: 9.36k]
  ------------------
   42|      0|    std::cerr << config << "\n";
   43|      0|  }
   44|       |
   45|       |  // Reset the RNG state.
   46|  9.36k|  assert(RNG_RandomUpdate(NULL, 0) == SECSuccess);
   47|  9.36k|  assert(SSL_SetURL(sslFd, "fuzz.client") == SECSuccess);
   48|       |
   49|  9.36k|  TlsCommon::EnableAllProtocolVersions();
   50|  9.36k|  TlsCommon::EnableAllCipherSuites(sslFd);
   51|  9.36k|  TlsCommon::FixTime(sslFd);
   52|       |
   53|       |  // Set socket callbacks & options from client config.
   54|  9.36k|  config.SetCallbacks(sslFd);
   55|  9.36k|  config.SetSocketOptions(sslFd);
   56|       |
   57|       |  // Perform the acutal handshake.
   58|  9.36k|  TlsCommon::DoHandshake(sslFd, false);
   59|       |
   60|       |  // Release all SIDs.
   61|  9.36k|  SSL_ClearSessionCache();
   62|       |
   63|  9.36k|  return 0;
   64|  9.36k|}

nssArena_verifyPointer:
  153|  25.6k|{
  154|  25.6k|    PRStatus rv;
  155|       |
  156|  25.6k|    rv = nssPointerTracker_initialize(&arena_pointer_tracker);
  157|  25.6k|    if (PR_SUCCESS != rv) {
  ------------------
  |  Branch (157:9): [True: 0, False: 25.6k]
  ------------------
  158|       |        /*
  159|       |         * This is a little disingenious.  We have to initialize the
  160|       |         * tracker, because someone could "legitimately" try to verify
  161|       |         * an arena pointer before one is ever created.  And this step
  162|       |         * might fail, due to lack of memory.  But the only way that
  163|       |         * this step can fail is if it's doing the call_once stuff,
  164|       |         * (later calls just no-op).  And if it didn't no-op, there
  165|       |         * aren't any valid arenas.. so the argument certainly isn't one.
  166|       |         */
  167|      0|        nss_SetError(NSS_ERROR_INVALID_ARENA);
  168|      0|        return PR_FAILURE;
  169|      0|    }
  170|       |
  171|  25.6k|    rv = nssPointerTracker_verify(&arena_pointer_tracker, arena);
  172|  25.6k|    if (PR_SUCCESS != rv) {
  ------------------
  |  Branch (172:9): [True: 0, False: 25.6k]
  ------------------
  173|      0|        nss_SetError(NSS_ERROR_INVALID_ARENA);
  174|      0|        return PR_FAILURE;
  175|      0|    }
  176|       |
  177|  25.6k|    return PR_SUCCESS;
  178|  25.6k|}
NSSArena_Create:
  328|      2|{
  329|      2|    nss_ClearErrorStack();
  330|      2|    return nssArena_Create();
  331|      2|}
nssArena_Create:
  350|  10.4k|{
  351|  10.4k|    NSSArena *rv = (NSSArena *)NULL;
  352|       |
  353|  10.4k|    rv = nss_ZNEW((NSSArena *)NULL, NSSArena);
  ------------------
  |  |  348|  10.4k|#define nss_ZNEW(arenaOpt, type) ((type *)nss_ZAlloc((arenaOpt), sizeof(type)))
  ------------------
  354|  10.4k|    if ((NSSArena *)NULL == rv) {
  ------------------
  |  Branch (354:9): [True: 0, False: 10.4k]
  ------------------
  355|      0|        nss_SetError(NSS_ERROR_NO_MEMORY);
  356|      0|        return (NSSArena *)NULL;
  357|      0|    }
  358|       |
  359|  10.4k|    rv->lock = PR_NewLock();
  360|  10.4k|    if ((PRLock *)NULL == rv->lock) {
  ------------------
  |  Branch (360:9): [True: 0, False: 10.4k]
  ------------------
  361|      0|        (void)nss_ZFreeIf(rv);
  362|      0|        nss_SetError(NSS_ERROR_NO_MEMORY);
  363|      0|        return (NSSArena *)NULL;
  364|      0|    }
  365|       |
  366|       |    /*
  367|       |     * Arena sizes.  The current security code has 229 occurrences of
  368|       |     * PORT_NewArena.  The default chunksizes specified break down as
  369|       |     *
  370|       |     *  Size    Mult.   Specified as
  371|       |     *   512       1    512
  372|       |     *  1024       7    1024
  373|       |     *  2048       5    2048
  374|       |     *  2048       5    CRMF_DEFAULT_ARENA_SIZE
  375|       |     *  2048     190    DER_DEFAULT_CHUNKSIZE
  376|       |     *  2048      20    SEC_ASN1_DEFAULT_ARENA_SIZE
  377|       |     *  4096       1    4096
  378|       |     *
  379|       |     * Obviously this "default chunksize" flexibility isn't very
  380|       |     * useful to us, so I'll just pick 2048.
  381|       |     */
  382|       |
  383|  10.4k|    PL_InitArenaPool(&rv->pool, "NSS", 2048, sizeof(double));
  384|       |
  385|  10.4k|#ifdef DEBUG
  386|  10.4k|    {
  387|  10.4k|        PRStatus st;
  388|  10.4k|        st = arena_add_pointer(rv);
  389|  10.4k|        if (PR_SUCCESS != st) {
  ------------------
  |  Branch (389:13): [True: 0, False: 10.4k]
  ------------------
  390|      0|            PL_FinishArenaPool(&rv->pool);
  391|      0|            PR_DestroyLock(rv->lock);
  392|      0|            (void)nss_ZFreeIf(rv);
  393|      0|            return (NSSArena *)NULL;
  394|      0|        }
  395|  10.4k|    }
  396|  10.4k|#endif /* DEBUG */
  397|       |
  398|  10.4k|    return rv;
  399|  10.4k|}
NSSArena_Destroy:
  419|  5.09k|{
  420|  5.09k|    nss_ClearErrorStack();
  421|       |
  422|  5.09k|#ifdef DEBUG
  423|  5.09k|    if (PR_SUCCESS != nssArena_verifyPointer(arena)) {
  ------------------
  |  Branch (423:9): [True: 0, False: 5.09k]
  ------------------
  424|      0|        return PR_FAILURE;
  425|      0|    }
  426|  5.09k|#endif /* DEBUG */
  427|       |
  428|  5.09k|    return nssArena_Destroy(arena);
  429|  5.09k|}
nssArena_Destroy:
  449|  10.4k|{
  450|  10.4k|    PRLock *lock;
  451|       |
  452|       |#ifdef NSSDEBUG
  453|       |    if (PR_SUCCESS != nssArena_verifyPointer(arena)) {
  454|       |        return PR_FAILURE;
  455|       |    }
  456|       |#endif /* NSSDEBUG */
  457|       |
  458|  10.4k|    if ((PRLock *)NULL == arena->lock) {
  ------------------
  |  Branch (458:9): [True: 0, False: 10.4k]
  ------------------
  459|       |        /* Just got destroyed */
  460|      0|        nss_SetError(NSS_ERROR_INVALID_ARENA);
  461|      0|        return PR_FAILURE;
  462|      0|    }
  463|  10.4k|    PR_Lock(arena->lock);
  464|       |
  465|  10.4k|#ifdef DEBUG
  466|  10.4k|    if (PR_SUCCESS != arena_remove_pointer(arena)) {
  ------------------
  |  Branch (466:9): [True: 0, False: 10.4k]
  ------------------
  467|      0|        PR_Unlock(arena->lock);
  468|      0|        return PR_FAILURE;
  469|      0|    }
  470|  10.4k|#endif /* DEBUG */
  471|       |
  472|  10.4k|#ifdef ARENA_DESTRUCTOR_LIST
  473|       |    /* Note that the arena is locked at this time */
  474|  10.4k|    nss_arena_call_destructor_chain(arena->first_destructor);
  475|  10.4k|#endif /* ARENA_DESTRUCTOR_LIST */
  476|       |
  477|  10.4k|    PL_FinishArenaPool(&arena->pool);
  478|  10.4k|    lock = arena->lock;
  479|  10.4k|    arena->lock = (PRLock *)NULL;
  480|  10.4k|    PR_Unlock(lock);
  481|  10.4k|    PR_DestroyLock(lock);
  482|  10.4k|    (void)nss_ZFreeIf(arena);
  483|  10.4k|    return PR_SUCCESS;
  484|  10.4k|}
nss_ZAlloc:
  823|   102k|{
  824|   102k|    struct pointer_header *h;
  825|   102k|    PRUint32 my_size = size + sizeof(struct pointer_header);
  826|       |
  827|   102k|    if (my_size < sizeof(struct pointer_header)) {
  ------------------
  |  Branch (827:9): [True: 0, False: 102k]
  ------------------
  828|       |        /* Wrapped */
  829|      0|        nss_SetError(NSS_ERROR_NO_MEMORY);
  830|      0|        return (void *)NULL;
  831|      0|    }
  832|       |
  833|   102k|    if ((NSSArena *)NULL == arenaOpt) {
  ------------------
  |  Branch (833:9): [True: 56.3k, False: 46.4k]
  ------------------
  834|       |        /* Heap allocation, no locking required. */
  835|  56.3k|        h = (struct pointer_header *)PR_Calloc(1, my_size);
  836|  56.3k|        if ((struct pointer_header *)NULL == h) {
  ------------------
  |  Branch (836:13): [True: 0, False: 56.3k]
  ------------------
  837|      0|            nss_SetError(NSS_ERROR_NO_MEMORY);
  838|      0|            return (void *)NULL;
  839|      0|        }
  840|       |
  841|  56.3k|        h->arena = (NSSArena *)NULL;
  842|  56.3k|        h->size = size;
  843|       |        /* We used calloc: it's already zeroed */
  844|       |
  845|  56.3k|        return (void *)((char *)h + sizeof(struct pointer_header));
  846|  56.3k|    } else {
  847|  46.4k|        void *rv;
  848|       |/* Arena allocation */
  849|       |#ifdef NSSDEBUG
  850|       |        if (PR_SUCCESS != nssArena_verifyPointer(arenaOpt)) {
  851|       |            return (void *)NULL;
  852|       |        }
  853|       |#endif /* NSSDEBUG */
  854|       |
  855|  46.4k|        if ((PRLock *)NULL == arenaOpt->lock) {
  ------------------
  |  Branch (855:13): [True: 0, False: 46.4k]
  ------------------
  856|       |            /* Just got destroyed */
  857|      0|            nss_SetError(NSS_ERROR_INVALID_ARENA);
  858|      0|            return (void *)NULL;
  859|      0|        }
  860|  46.4k|        PR_Lock(arenaOpt->lock);
  861|       |
  862|  46.4k|#ifdef ARENA_THREADMARK
  863|  46.4k|        if ((PRThread *)NULL != arenaOpt->marking_thread) {
  ------------------
  |  Branch (863:13): [True: 0, False: 46.4k]
  ------------------
  864|      0|            if (PR_GetCurrentThread() != arenaOpt->marking_thread) {
  ------------------
  |  Branch (864:17): [True: 0, False: 0]
  ------------------
  865|      0|                nss_SetError(NSS_ERROR_ARENA_MARKED_BY_ANOTHER_THREAD);
  866|      0|                PR_Unlock(arenaOpt->lock);
  867|      0|                return (void *)NULL;
  868|      0|            }
  869|      0|        }
  870|  46.4k|#endif /* ARENA_THREADMARK */
  871|       |
  872|  46.4k|        rv = nss_zalloc_arena_locked(arenaOpt, size);
  873|       |
  874|  46.4k|        PR_Unlock(arenaOpt->lock);
  875|  46.4k|        return rv;
  876|  46.4k|    }
  877|       |    /*NOTREACHED*/
  878|   102k|}
nss_ZFreeIf:
  923|  71.5k|{
  924|  71.5k|    struct pointer_header *h;
  925|       |
  926|  71.5k|    if ((void *)NULL == pointer) {
  ------------------
  |  Branch (926:9): [True: 5.09k, False: 66.4k]
  ------------------
  927|  5.09k|        return PR_SUCCESS;
  928|  5.09k|    }
  929|       |
  930|  66.4k|    h = (struct pointer_header *)((char *)pointer -
  931|  66.4k|                                  sizeof(struct pointer_header));
  932|       |
  933|       |    /* Check any magic here */
  934|       |
  935|  66.4k|    if ((NSSArena *)NULL == h->arena) {
  ------------------
  |  Branch (935:9): [True: 56.3k, False: 10.1k]
  ------------------
  936|       |        /* Heap */
  937|  56.3k|        (void)nsslibc_memset(pointer, 0, h->size);
  938|  56.3k|        PR_Free(h);
  939|  56.3k|        return PR_SUCCESS;
  940|  56.3k|    } else {
  941|       |/* Arena */
  942|       |#ifdef NSSDEBUG
  943|       |        if (PR_SUCCESS != nssArena_verifyPointer(h->arena)) {
  944|       |            return PR_FAILURE;
  945|       |        }
  946|       |#endif /* NSSDEBUG */
  947|       |
  948|  10.1k|        if ((PRLock *)NULL == h->arena->lock) {
  ------------------
  |  Branch (948:13): [True: 0, False: 10.1k]
  ------------------
  949|       |            /* Just got destroyed.. so this pointer is invalid */
  950|      0|            nss_SetError(NSS_ERROR_INVALID_POINTER);
  951|      0|            return PR_FAILURE;
  952|      0|        }
  953|  10.1k|        PR_Lock(h->arena->lock);
  954|       |
  955|  10.1k|        (void)nsslibc_memset(pointer, 0, h->size);
  956|       |
  957|       |        /* No way to "free" it within an NSPR arena. */
  958|       |
  959|  10.1k|        PR_Unlock(h->arena->lock);
  960|  10.1k|        return PR_SUCCESS;
  961|  10.1k|    }
  962|       |    /*NOTREACHED*/
  963|  66.4k|}
nssArena_Shutdown:
 1137|      1|{
 1138|      1|    PRStatus rv = PR_SUCCESS;
 1139|      1|#ifdef DEBUG
 1140|      1|    rv = nssPointerTracker_finalize(&arena_pointer_tracker);
 1141|      1|#endif
 1142|      1|    return rv;
 1143|      1|}
arena.c:arena_add_pointer:
  100|  10.4k|{
  101|  10.4k|    PRStatus rv;
  102|       |
  103|  10.4k|    rv = nssPointerTracker_initialize(&arena_pointer_tracker);
  104|  10.4k|    if (PR_SUCCESS != rv) {
  ------------------
  |  Branch (104:9): [True: 0, False: 10.4k]
  ------------------
  105|      0|        return rv;
  106|      0|    }
  107|       |
  108|  10.4k|    rv = nssPointerTracker_add(&arena_pointer_tracker, arena);
  109|  10.4k|    if (PR_SUCCESS != rv) {
  ------------------
  |  Branch (109:9): [True: 0, False: 10.4k]
  ------------------
  110|      0|        NSSError e = NSS_GetError();
  111|      0|        if (NSS_ERROR_NO_MEMORY != e) {
  ------------------
  |  Branch (111:13): [True: 0, False: 0]
  ------------------
  112|      0|            nss_SetError(NSS_ERROR_INTERNAL_ERROR);
  113|      0|        }
  114|       |
  115|      0|        return rv;
  116|      0|    }
  117|       |
  118|  10.4k|    return PR_SUCCESS;
  119|  10.4k|}
arena.c:arena_remove_pointer:
  123|  10.4k|{
  124|  10.4k|    PRStatus rv;
  125|       |
  126|  10.4k|    rv = nssPointerTracker_remove(&arena_pointer_tracker, arena);
  127|  10.4k|    if (PR_SUCCESS != rv) {
  ------------------
  |  Branch (127:9): [True: 0, False: 10.4k]
  ------------------
  128|      0|        nss_SetError(NSS_ERROR_INTERNAL_ERROR);
  129|      0|    }
  130|       |
  131|  10.4k|    return rv;
  132|  10.4k|}
arena.c:nss_arena_call_destructor_chain:
  304|  10.4k|{
  305|  10.4k|    for (; it; it = it->next) {
  ------------------
  |  Branch (305:12): [True: 0, False: 10.4k]
  ------------------
  306|      0|        (*(it->destructor))(it->arg);
  307|      0|    }
  308|  10.4k|}
arena.c:nss_zalloc_arena_locked:
  746|  46.4k|{
  747|  46.4k|    void *p;
  748|  46.4k|    void *rv;
  749|  46.4k|    struct pointer_header *h;
  750|  46.4k|    PRUint32 my_size = size + sizeof(struct pointer_header);
  751|  46.4k|    PL_ARENA_ALLOCATE(p, &arena->pool, my_size);
  ------------------
  |  |  150|  46.4k|    PR_BEGIN_MACRO \
  |  |  ------------------
  |  |  |  |  123|  46.4k|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |  151|  46.4k|        PLArena *_a = (pool)->current; \
  |  |  152|  46.4k|        PRUint32 _nb = PL_ARENA_ALIGN(pool, (PRUint32)nb); \
  |  |  ------------------
  |  |  |  |  146|  46.4k|#define PL_ARENA_ALIGN(pool, n) (((PRUword)(n) + (pool)->mask) & ~(pool)->mask)
  |  |  ------------------
  |  |  153|  46.4k|        PRUword _p = _a->avail; \
  |  |  154|  46.4k|        if (_nb < (PRUint32)nb) { \
  |  |  ------------------
  |  |  |  Branch (154:13): [True: 0, False: 46.4k]
  |  |  ------------------
  |  |  155|      0|            _p = 0; \
  |  |  156|  46.4k|        } else if (_nb > (_a->limit - _a->avail)) { \
  |  |  ------------------
  |  |  |  Branch (156:20): [True: 10.4k, False: 36.0k]
  |  |  ------------------
  |  |  157|  10.4k|            _p = (PRUword)PL_ArenaAllocate(pool, _nb); \
  |  |  158|  36.0k|        } else { \
  |  |  159|  36.0k|            _a->avail += _nb; \
  |  |  160|  36.0k|        } \
  |  |  161|  46.4k|        p = (void *)_p; \
  |  |  162|  46.4k|        if (p) { \
  |  |  ------------------
  |  |  |  Branch (162:13): [True: 46.4k, False: 0]
  |  |  ------------------
  |  |  163|  46.4k|            PL_MAKE_MEM_UNDEFINED(p, (PRUint32)nb); \
  |  |  164|  46.4k|            PL_ArenaCountAllocation(pool, (PRUint32)nb); \
  |  |  165|  46.4k|        } \
  |  |  166|  46.4k|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|  46.4k|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  752|  46.4k|    if ((void *)NULL == p) {
  ------------------
  |  Branch (752:9): [True: 0, False: 46.4k]
  ------------------
  753|      0|        nss_SetError(NSS_ERROR_NO_MEMORY);
  754|      0|        return (void *)NULL;
  755|      0|    }
  756|       |    /*
  757|       |     * Do this before we unlock.  This way if the user is using
  758|       |     * an arena in one thread while destroying it in another, he'll
  759|       |     * fault/FMR in his code, not ours.
  760|       |     */
  761|  46.4k|    h = (struct pointer_header *)p;
  762|  46.4k|    h->arena = arena;
  763|  46.4k|    h->size = size;
  764|  46.4k|    rv = (void *)((char *)h + sizeof(struct pointer_header));
  765|  46.4k|    (void)nsslibc_memset(rv, 0, size);
  766|  46.4k|    return rv;
  767|  46.4k|}

NSS_GetErrorStack:
  219|    211|{
  220|    211|    error_stack *es = error_get_my_stack();
  221|       |
  222|    211|    if ((error_stack *)NULL == es) {
  ------------------
  |  Branch (222:9): [True: 0, False: 211]
  ------------------
  223|      0|        return (PRInt32 *)NULL;
  224|      0|    }
  225|       |
  226|       |    /* Make sure it's terminated */
  227|    211|    es->stack[es->header.count] = 0;
  228|       |
  229|    211|    return es->stack;
  230|    211|}
nss_SetError:
  242|  30.6k|{
  243|  30.6k|    error_stack *es;
  244|       |
  245|  30.6k|    if (0 == error) {
  ------------------
  |  Branch (245:9): [True: 0, False: 30.6k]
  ------------------
  246|      0|        nss_ClearErrorStack();
  247|      0|        return;
  248|      0|    }
  249|       |
  250|  30.6k|    es = error_get_my_stack();
  251|  30.6k|    if ((error_stack *)NULL == es) {
  ------------------
  |  Branch (251:9): [True: 0, False: 30.6k]
  ------------------
  252|       |        /* Oh, well. */
  253|      0|        return;
  254|      0|    }
  255|       |
  256|  30.6k|    if (es->header.count < es->header.space) {
  ------------------
  |  Branch (256:9): [True: 30.6k, False: 0]
  ------------------
  257|  30.6k|        es->stack[es->header.count++] = error;
  258|  30.6k|    } else {
  259|      0|        memmove(es->stack, es->stack + 1,
  260|      0|                (es->header.space - 1) * (sizeof es->stack[0]));
  261|      0|        es->stack[es->header.space - 1] = error;
  262|      0|    }
  263|  30.6k|    return;
  264|  30.6k|}
nss_ClearErrorStack:
  274|  5.09k|{
  275|  5.09k|    error_stack *es = error_get_my_stack();
  276|  5.09k|    if ((error_stack *)NULL == es) {
  ------------------
  |  Branch (276:9): [True: 0, False: 5.09k]
  ------------------
  277|       |        /* Oh, well. */
  278|      0|        return;
  279|      0|    }
  280|       |
  281|  5.09k|    es->header.count = 0;
  282|  5.09k|    es->stack[0] = 0;
  283|  5.09k|    return;
  284|  5.09k|}
nss_DestroyErrorStack:
  294|      1|{
  295|      1|    if (INVALID_TPD_INDEX != error_stack_index) {
  ------------------
  |  |   51|      1|#define INVALID_TPD_INDEX UINT_MAX
  ------------------
  |  Branch (295:9): [True: 1, False: 0]
  ------------------
  296|      1|        PR_SetThreadPrivate(error_stack_index, NULL);
  297|      1|        error_stack_index = INVALID_TPD_INDEX;
  ------------------
  |  |   51|      1|#define INVALID_TPD_INDEX UINT_MAX
  ------------------
  298|      1|        error_call_once = error_call_again; /* allow to init again */
  299|      1|    }
  300|      1|    return;
  301|      1|}
error.c:error_get_my_stack:
  110|  35.9k|{
  111|  35.9k|    PRStatus st;
  112|  35.9k|    error_stack *rv;
  113|  35.9k|    PRUintn new_size;
  114|  35.9k|    PRUint32 new_bytes;
  115|  35.9k|    error_stack *new_stack;
  116|       |
  117|  35.9k|    if (INVALID_TPD_INDEX == error_stack_index) {
  ------------------
  |  |   51|  35.9k|#define INVALID_TPD_INDEX UINT_MAX
  ------------------
  |  Branch (117:9): [True: 1, False: 35.9k]
  ------------------
  118|      1|        st = PR_CallOnce(&error_call_once, error_once_function);
  119|      1|        if (PR_SUCCESS != st) {
  ------------------
  |  Branch (119:13): [True: 0, False: 1]
  ------------------
  120|      0|            return (error_stack *)NULL;
  121|      0|        }
  122|      1|    }
  123|       |
  124|  35.9k|    rv = (error_stack *)PR_GetThreadPrivate(error_stack_index);
  125|  35.9k|    if ((error_stack *)NULL == rv) {
  ------------------
  |  Branch (125:9): [True: 1, False: 35.9k]
  ------------------
  126|       |        /* Doesn't exist; create one */
  127|      1|        new_size = 16;
  128|  35.9k|    } else if (rv->header.count == rv->header.space &&
  ------------------
  |  Branch (128:16): [True: 0, False: 35.9k]
  ------------------
  129|  35.9k|               rv->header.count < NSS_MAX_ERROR_STACK_COUNT) {
  ------------------
  |  |   22|      0|#define NSS_MAX_ERROR_STACK_COUNT 16 /* error codes */
  ------------------
  |  Branch (129:16): [True: 0, False: 0]
  ------------------
  130|       |        /* Too small, expand it */
  131|      0|        new_size = PR_MIN(rv->header.space * 2, NSS_MAX_ERROR_STACK_COUNT);
  ------------------
  |  |  158|      0|#define PR_MIN(x,y)     ((x)<(y)?(x):(y))
  |  |  ------------------
  |  |  |  Branch (158:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  132|  35.9k|    } else {
  133|       |        /* Okay, return it */
  134|  35.9k|        return rv;
  135|  35.9k|    }
  136|       |
  137|      1|    new_bytes = (new_size * sizeof(PRInt32)) + sizeof(error_stack);
  138|       |    /* Use NSPR's calloc/realloc, not NSS's, to avoid loops! */
  139|      1|    new_stack = PR_Calloc(1, new_bytes);
  140|       |
  141|      1|    if ((error_stack *)NULL != new_stack) {
  ------------------
  |  Branch (141:9): [True: 1, False: 0]
  ------------------
  142|      1|        if ((error_stack *)NULL != rv) {
  ------------------
  |  Branch (142:13): [True: 0, False: 1]
  ------------------
  143|      0|            (void)nsslibc_memcpy(new_stack, rv, rv->header.space);
  144|      0|        }
  145|      1|        new_stack->header.space = new_size;
  146|      1|    }
  147|       |
  148|       |    /* Set the value, whether or not the allocation worked */
  149|      1|    PR_SetThreadPrivate(error_stack_index, new_stack);
  150|      1|    return new_stack;
  151|  35.9k|}
error.c:error_once_function:
   71|      1|{
   72|       |
   73|       |/*
   74|       | * This #ifdef function is redundant. It performs the same thing as the
   75|       | * else case.
   76|       | *
   77|       | * However, the MinGW version looks up the function from nss3's export
   78|       | * table, and on MinGW _that_ behaves differently than passing a
   79|       | * function pointer in a different module because MinGW has
   80|       | * -mnop-fun-dllimport specified, which generates function thunks for
   81|       | * cross-module calls. And when a module (like nssckbi) gets unloaded,
   82|       | * and you try to call into that thunk (which is now missing) you'll
   83|       | * crash. So we do this bit of ugly to avoid that crash. Fortunately
   84|       | * this is the only place we've had to do this.
   85|       | */
   86|       |#if defined(__MINGW32__)
   87|       |    HMODULE nss3 = GetModuleHandleW(L"nss3");
   88|       |    if (nss3) {
   89|       |        PRThreadPrivateDTOR freePtr = (PRThreadPrivateDTOR)GetProcAddress(nss3, "PR_Free");
   90|       |        if (freePtr) {
   91|       |            return PR_NewThreadPrivateIndex(&error_stack_index, freePtr);
   92|       |        }
   93|       |    }
   94|       |    return PR_NewThreadPrivateIndex(&error_stack_index, PR_Free);
   95|       |#else
   96|      1|    return PR_NewThreadPrivateIndex(&error_stack_index, PR_Free);
   97|      1|#endif
   98|      1|}

nssHash_Create:
   80|      6|{
   81|      6|    nssHash *rv;
   82|      6|    NSSArena *arena;
   83|      6|    PRBool i_alloced;
   84|       |
   85|       |#ifdef NSSDEBUG
   86|       |    if (arenaOpt && PR_SUCCESS != nssArena_verifyPointer(arenaOpt)) {
   87|       |        nss_SetError(NSS_ERROR_INVALID_POINTER);
   88|       |        return (nssHash *)NULL;
   89|       |    }
   90|       |#endif /* NSSDEBUG */
   91|       |
   92|      6|    if (arenaOpt) {
  ------------------
  |  Branch (92:9): [True: 6, False: 0]
  ------------------
   93|      6|        arena = arenaOpt;
   94|      6|        i_alloced = PR_FALSE;
  ------------------
  |  |  438|      6|#define PR_FALSE 0
  ------------------
   95|      6|    } else {
   96|      0|        arena = nssArena_Create();
   97|      0|        i_alloced = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
   98|      0|    }
   99|       |
  100|      6|    rv = nss_ZNEW(arena, nssHash);
  ------------------
  |  |  348|      6|#define nss_ZNEW(arenaOpt, type) ((type *)nss_ZAlloc((arenaOpt), sizeof(type)))
  ------------------
  101|      6|    if ((nssHash *)NULL == rv) {
  ------------------
  |  Branch (101:9): [True: 0, False: 6]
  ------------------
  102|      0|        goto loser;
  103|      0|    }
  104|       |
  105|      6|    rv->mutex = PZ_NewLock(nssILockOther);
  ------------------
  |  |  243|      6|#define PZ_NewLock(t) PR_NewLock()
  ------------------
  106|      6|    if ((PZLock *)NULL == rv->mutex) {
  ------------------
  |  Branch (106:9): [True: 0, False: 6]
  ------------------
  107|      0|        goto loser;
  108|      0|    }
  109|       |
  110|      6|    rv->plHashTable =
  111|      6|        PL_NewHashTable(numBuckets, keyHash, keyCompare, valueCompare,
  112|      6|                        &nssArenaHashAllocOps, arena);
  113|      6|    if ((PLHashTable *)NULL == rv->plHashTable) {
  ------------------
  |  Branch (113:9): [True: 0, False: 6]
  ------------------
  114|      0|        (void)PZ_DestroyLock(rv->mutex);
  ------------------
  |  |  244|      0|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
  115|      0|        goto loser;
  116|      0|    }
  117|       |
  118|      6|    rv->count = 0;
  119|      6|    rv->arena = arena;
  120|      6|    rv->i_alloced_arena = i_alloced;
  121|       |
  122|      6|    return rv;
  123|      0|loser:
  124|      0|    (void)nss_ZFreeIf(rv);
  125|      0|    return (nssHash *)NULL;
  126|      6|}
nssHash_CreateString:
  145|      2|{
  146|      2|    return nssHash_Create(arenaOpt, numBuckets, PL_HashString,
  147|      2|                          PL_CompareStrings, PL_CompareStrings);
  148|      2|}
nssHash_CreateItem:
  156|      2|{
  157|      2|    return nssHash_Create(arenaOpt, numBuckets, nss_item_hash,
  158|      2|                          nss_compare_items, PL_CompareValues);
  159|      2|}
nssHash_Destroy:
  167|      6|{
  168|      6|    (void)PZ_DestroyLock(hash->mutex);
  ------------------
  |  |  244|      6|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
  169|      6|    PL_HashTableDestroy(hash->plHashTable);
  170|      6|    if (hash->i_alloced_arena) {
  ------------------
  |  Branch (170:9): [True: 0, False: 6]
  ------------------
  171|      0|        nssArena_Destroy(hash->arena);
  172|      6|    } else {
  173|      6|        nss_ZFreeIf(hash);
  174|      6|    }
  175|      6|}
nssHash_Add:
  183|  10.1k|{
  184|  10.1k|    PRStatus error = PR_FAILURE;
  185|  10.1k|    PLHashEntry *he;
  186|       |
  187|  10.1k|    PZ_Lock(hash->mutex);
  ------------------
  |  |  245|  10.1k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
  188|       |
  189|  10.1k|    he = PL_HashTableAdd(hash->plHashTable, key, (void *)value);
  190|  10.1k|    if ((PLHashEntry *)NULL == he) {
  ------------------
  |  Branch (190:9): [True: 0, False: 10.1k]
  ------------------
  191|      0|        nss_SetError(NSS_ERROR_NO_MEMORY);
  192|  10.1k|    } else if (he->value != value) {
  ------------------
  |  Branch (192:16): [True: 0, False: 10.1k]
  ------------------
  193|      0|        nss_SetError(NSS_ERROR_HASH_COLLISION);
  194|  10.1k|    } else {
  195|  10.1k|        hash->count++;
  196|  10.1k|        error = PR_SUCCESS;
  197|  10.1k|    }
  198|       |
  199|  10.1k|    (void)PZ_Unlock(hash->mutex);
  ------------------
  |  |  246|  10.1k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  200|       |
  201|  10.1k|    return error;
  202|  10.1k|}
nssHash_Remove:
  210|  10.1k|{
  211|  10.1k|    PRBool found;
  212|       |
  213|  10.1k|    PZ_Lock(hash->mutex);
  ------------------
  |  |  245|  10.1k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
  214|       |
  215|  10.1k|    found = PL_HashTableRemove(hash->plHashTable, it);
  216|  10.1k|    if (found) {
  ------------------
  |  Branch (216:9): [True: 10.1k, False: 0]
  ------------------
  217|  10.1k|        hash->count--;
  218|  10.1k|    }
  219|       |
  220|  10.1k|    (void)PZ_Unlock(hash->mutex);
  ------------------
  |  |  246|  10.1k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  221|  10.1k|    return;
  222|  10.1k|}
nssHash_Count:
  230|      2|{
  231|      2|    PRUint32 count;
  232|       |
  233|      2|    PZ_Lock(hash->mutex);
  ------------------
  |  |  245|      2|#define PZ_Lock(k) PR_Lock((k))
  ------------------
  234|       |
  235|      2|    count = hash->count;
  236|       |
  237|      2|    (void)PZ_Unlock(hash->mutex);
  ------------------
  |  |  246|      2|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  238|       |
  239|      2|    return count;
  240|      2|}
nssHash_Lookup:
  270|  40.8k|{
  271|  40.8k|    void *rv;
  272|       |
  273|  40.8k|    PZ_Lock(hash->mutex);
  ------------------
  |  |  245|  40.8k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
  274|       |
  275|  40.8k|    rv = PL_HashTableLookup(hash->plHashTable, it);
  276|       |
  277|  40.8k|    (void)PZ_Unlock(hash->mutex);
  ------------------
  |  |  246|  40.8k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  278|       |
  279|  40.8k|    return rv;
  280|  40.8k|}
hash.c:nss_item_hash:
   56|  20.3k|{
   57|  20.3k|    unsigned int i;
   58|  20.3k|    PLHashNumber h;
   59|  20.3k|    NSSItem *it = (NSSItem *)key;
   60|  20.3k|    h = 0;
   61|   388k|    for (i = 0; i < it->size; i++)
  ------------------
  |  Branch (61:17): [True: 368k, False: 20.3k]
  ------------------
   62|   368k|        h = PR_ROTATE_LEFT32(h, 4) ^ ((unsigned char *)it->data)[i];
  ------------------
  |  |  147|   368k|#define PR_ROTATE_LEFT32(a, bits) (((a) << (bits)) | ((a) >> (32 - (bits))))
  ------------------
   63|  20.3k|    return h;
   64|  20.3k|}
hash.c:nss_compare_items:
   68|  10.1k|{
   69|  10.1k|    PRStatus ignore;
   70|  10.1k|    return (int)nssItem_Equal((NSSItem *)v1, (NSSItem *)v2, &ignore);
   71|  10.1k|}

hashops.c:nss_arena_hash_alloc_table:
   17|     12|{
   18|     12|    NSSArena *arena = (NSSArena *)NULL;
   19|       |
   20|       |#ifdef NSSDEBUG
   21|       |    if ((void *)NULL != arena) {
   22|       |        if (PR_SUCCESS != nssArena_verifyPointer(arena)) {
   23|       |            return (void *)NULL;
   24|       |        }
   25|       |    }
   26|       |#endif /* NSSDEBUG */
   27|       |
   28|     12|    return nss_ZAlloc(arena, size);
   29|     12|}
hashops.c:nss_arena_hash_free_table:
   33|     12|{
   34|     12|    (void)nss_ZFreeIf(item);
   35|     12|}
hashops.c:nss_arena_hash_alloc_entry:
   39|  10.1k|{
   40|  10.1k|    NSSArena *arena = NULL;
   41|       |
   42|       |#ifdef NSSDEBUG
   43|       |    if ((void *)NULL != arena) {
   44|       |        if (PR_SUCCESS != nssArena_verifyPointer(arena)) {
   45|       |            return (void *)NULL;
   46|       |        }
   47|       |    }
   48|       |#endif /* NSSDEBUG */
   49|       |
   50|  10.1k|    return nss_ZNEW(arena, PLHashEntry);
  ------------------
  |  |  348|  10.1k|#define nss_ZNEW(arenaOpt, type) ((type *)nss_ZAlloc((arenaOpt), sizeof(type)))
  ------------------
   51|  10.1k|}
hashops.c:nss_arena_hash_free_entry:
   55|  10.1k|{
   56|  10.1k|    if (HT_FREE_ENTRY == flag) {
  ------------------
  |  |   39|  10.1k|#define HT_FREE_ENTRY   1               /* free value and entire entry */
  ------------------
  |  Branch (56:9): [True: 10.1k, False: 0]
  ------------------
   57|  10.1k|        (void)nss_ZFreeIf(he);
   58|  10.1k|    }
   59|  10.1k|}

nssItem_Create:
   34|  20.5k|{
   35|  20.5k|    NSSItem *rv = (NSSItem *)NULL;
   36|       |
   37|  20.5k|#ifdef DEBUG
   38|  20.5k|    if ((NSSArena *)NULL != arenaOpt) {
  ------------------
  |  Branch (38:9): [True: 20.5k, False: 0]
  ------------------
   39|  20.5k|        if (PR_SUCCESS != nssArena_verifyPointer(arenaOpt)) {
  ------------------
  |  Branch (39:13): [True: 0, False: 20.5k]
  ------------------
   40|      0|            return (NSSItem *)NULL;
   41|      0|        }
   42|  20.5k|    }
   43|       |
   44|  20.5k|    if ((const void *)NULL == data) {
  ------------------
  |  Branch (44:9): [True: 0, False: 20.5k]
  ------------------
   45|      0|        if (length > 0) {
  ------------------
  |  Branch (45:13): [True: 0, False: 0]
  ------------------
   46|      0|            nss_SetError(NSS_ERROR_INVALID_POINTER);
   47|      0|            return (NSSItem *)NULL;
   48|      0|        }
   49|      0|    }
   50|  20.5k|#endif /* DEBUG */
   51|       |
   52|  20.5k|    if ((NSSItem *)NULL == rvOpt) {
  ------------------
  |  Branch (52:9): [True: 0, False: 20.5k]
  ------------------
   53|      0|        rv = (NSSItem *)nss_ZNEW(arenaOpt, NSSItem);
  ------------------
  |  |  348|      0|#define nss_ZNEW(arenaOpt, type) ((type *)nss_ZAlloc((arenaOpt), sizeof(type)))
  ------------------
   54|      0|        if ((NSSItem *)NULL == rv) {
  ------------------
  |  Branch (54:13): [True: 0, False: 0]
  ------------------
   55|      0|            goto loser;
   56|      0|        }
   57|  20.5k|    } else {
   58|  20.5k|        rv = rvOpt;
   59|  20.5k|    }
   60|       |
   61|  20.5k|    rv->size = length;
   62|  20.5k|    rv->data = nss_ZAlloc(arenaOpt, length);
   63|  20.5k|    if ((void *)NULL == rv->data) {
  ------------------
  |  Branch (63:9): [True: 0, False: 20.5k]
  ------------------
   64|      0|        goto loser;
   65|      0|    }
   66|       |
   67|  20.5k|    if (length > 0) {
  ------------------
  |  Branch (67:9): [True: 20.5k, False: 0]
  ------------------
   68|  20.5k|        (void)nsslibc_memcpy(rv->data, data, length);
   69|  20.5k|    }
   70|       |
   71|  20.5k|    return rv;
   72|       |
   73|      0|loser:
   74|      0|    if (rv != rvOpt) {
  ------------------
  |  Branch (74:9): [True: 0, False: 0]
  ------------------
   75|      0|        nss_ZFreeIf(rv);
   76|      0|    }
   77|       |
   78|      0|    return (NSSItem *)NULL;
   79|  20.5k|}
nssItem_Equal:
  168|  40.7k|{
  169|  40.7k|    if ((PRStatus *)NULL != statusOpt) {
  ------------------
  |  Branch (169:9): [True: 40.7k, False: 0]
  ------------------
  170|  40.7k|        *statusOpt = PR_SUCCESS;
  171|  40.7k|    }
  172|       |
  173|  40.7k|    if (((const NSSItem *)NULL == one) && ((const NSSItem *)NULL == two)) {
  ------------------
  |  Branch (173:9): [True: 0, False: 40.7k]
  |  Branch (173:43): [True: 0, False: 0]
  ------------------
  174|      0|        return PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  175|      0|    }
  176|       |
  177|  40.7k|    if (((const NSSItem *)NULL == one) || ((const NSSItem *)NULL == two)) {
  ------------------
  |  Branch (177:9): [True: 0, False: 40.7k]
  |  Branch (177:43): [True: 0, False: 40.7k]
  ------------------
  178|      0|        return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  179|      0|    }
  180|       |
  181|  40.7k|    if (one->size != two->size) {
  ------------------
  |  Branch (181:9): [True: 0, False: 40.7k]
  ------------------
  182|      0|        return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  183|      0|    }
  184|       |
  185|  40.7k|    return nsslibc_memequal(one->data, two->data, one->size, statusOpt);
  186|  40.7k|}

nsslibc_memcpy:
   42|  20.5k|{
   43|       |#ifdef NSSDEBUG
   44|       |    if (((void *)NULL == dest) || ((const void *)NULL == source)) {
   45|       |        nss_SetError(NSS_ERROR_INVALID_POINTER);
   46|       |        return (void *)NULL;
   47|       |    }
   48|       |#endif /* NSSDEBUG */
   49|       |
   50|  20.5k|    return memcpy(dest, source, (size_t)n);
   51|  20.5k|}
nsslibc_memset:
   66|   112k|{
   67|       |#ifdef NSSDEBUG
   68|       |    if (((void *)NULL == dest)) {
   69|       |        nss_SetError(NSS_ERROR_INVALID_POINTER);
   70|       |        return (void *)NULL;
   71|       |    }
   72|       |#endif /* NSSDEBUG */
   73|       |
   74|   112k|    return memset(dest, (int)byte, (size_t)n);
   75|   112k|}
nsslibc_memequal:
   92|  40.7k|{
   93|       |#ifdef NSSDEBUG
   94|       |    if ((((void *)NULL == a) || ((void *)NULL == b))) {
   95|       |        nss_SetError(NSS_ERROR_INVALID_POINTER);
   96|       |        if ((PRStatus *)NULL != statusOpt) {
   97|       |            *statusOpt = PR_FAILURE;
   98|       |        }
   99|       |        return PR_FALSE;
  100|       |    }
  101|       |#endif /* NSSDEBUG */
  102|       |
  103|  40.7k|    if ((PRStatus *)NULL != statusOpt) {
  ------------------
  |  Branch (103:9): [True: 40.7k, False: 0]
  ------------------
  104|  40.7k|        *statusOpt = PR_SUCCESS;
  105|  40.7k|    }
  106|       |
  107|  40.7k|    if (0 == memcmp(a, b, len)) {
  ------------------
  |  Branch (107:9): [True: 40.7k, False: 0]
  ------------------
  108|  40.7k|        return PR_TRUE;
  ------------------
  |  |  437|  40.7k|#define PR_TRUE 1
  ------------------
  109|  40.7k|    } else {
  110|      0|        return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  111|      0|    }
  112|  40.7k|}

nssList_Create:
   76|  5.09k|{
   77|  5.09k|    NSSArena *arena;
   78|  5.09k|    nssList *list;
   79|  5.09k|    PRBool i_alloced;
   80|  5.09k|    if (arenaOpt) {
  ------------------
  |  Branch (80:9): [True: 1, False: 5.09k]
  ------------------
   81|      1|        arena = arenaOpt;
   82|      1|        i_alloced = PR_FALSE;
  ------------------
  |  |  438|      1|#define PR_FALSE 0
  ------------------
   83|  5.09k|    } else {
   84|  5.09k|        arena = nssArena_Create();
   85|  5.09k|        i_alloced = PR_TRUE;
  ------------------
  |  |  437|  5.09k|#define PR_TRUE 1
  ------------------
   86|  5.09k|    }
   87|  5.09k|    if (!arena) {
  ------------------
  |  Branch (87:9): [True: 0, False: 5.09k]
  ------------------
   88|      0|        return (nssList *)NULL;
   89|      0|    }
   90|  5.09k|    list = nss_ZNEW(arena, nssList);
  ------------------
  |  |  348|  5.09k|#define nss_ZNEW(arenaOpt, type) ((type *)nss_ZAlloc((arenaOpt), sizeof(type)))
  ------------------
   91|  5.09k|    if (!list) {
  ------------------
  |  Branch (91:9): [True: 0, False: 5.09k]
  ------------------
   92|      0|        if (!arenaOpt) {
  ------------------
  |  Branch (92:13): [True: 0, False: 0]
  ------------------
   93|      0|            NSSArena_Destroy(arena);
   94|      0|        }
   95|      0|        return (nssList *)NULL;
   96|      0|    }
   97|  5.09k|    if (threadSafe) {
  ------------------
  |  Branch (97:9): [True: 2, False: 5.09k]
  ------------------
   98|      2|        list->lock = PZ_NewLock(nssILockOther);
  ------------------
  |  |  243|      2|#define PZ_NewLock(t) PR_NewLock()
  ------------------
   99|      2|        if (!list->lock) {
  ------------------
  |  Branch (99:13): [True: 0, False: 2]
  ------------------
  100|      0|            if (arenaOpt) {
  ------------------
  |  Branch (100:17): [True: 0, False: 0]
  ------------------
  101|      0|                nss_ZFreeIf(list);
  102|      0|            } else {
  103|      0|                NSSArena_Destroy(arena);
  104|      0|            }
  105|      0|            return (nssList *)NULL;
  106|      0|        }
  107|      2|    }
  108|  5.09k|    list->arena = arena;
  109|  5.09k|    list->i_alloced_arena = i_alloced;
  110|  5.09k|    list->compareFunc = pointer_compare;
  111|  5.09k|    return list;
  112|  5.09k|}
nssList_Destroy:
  116|  5.09k|{
  117|  5.09k|    if (!list) {
  ------------------
  |  Branch (117:9): [True: 0, False: 5.09k]
  ------------------
  118|      0|        return PR_SUCCESS;
  119|      0|    }
  120|  5.09k|    if (!list->i_alloced_arena) {
  ------------------
  |  Branch (120:9): [True: 1, False: 5.09k]
  ------------------
  121|      1|        nssList_Clear(list, NULL);
  122|      1|    }
  123|  5.09k|    if (list->lock) {
  ------------------
  |  Branch (123:9): [True: 2, False: 5.09k]
  ------------------
  124|      2|        (void)PZ_DestroyLock(list->lock);
  ------------------
  |  |  244|      2|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
  125|      2|    }
  126|  5.09k|    if (list->i_alloced_arena) {
  ------------------
  |  Branch (126:9): [True: 5.09k, False: 1]
  ------------------
  127|  5.09k|        NSSArena_Destroy(list->arena);
  128|  5.09k|        list = NULL;
  129|  5.09k|    }
  130|  5.09k|    nss_ZFreeIf(list);
  131|  5.09k|    return PR_SUCCESS;
  132|  5.09k|}
nssList_SetSortFunction:
  142|  5.09k|{
  143|       |    /* XXX if list already has elements, sort them */
  144|  5.09k|    list->sortFunc = sortFunc;
  145|  5.09k|}
nssList_Clear:
  155|      2|{
  156|      2|    PRCList *link;
  157|      2|    nssListElement *node, *tmp;
  158|      2|    if (!list) {
  ------------------
  |  Branch (158:9): [True: 0, False: 2]
  ------------------
  159|      0|        return;
  160|      0|    }
  161|      2|    NSSLIST_LOCK_IF(list);
  ------------------
  |  |   39|      2|    if ((list)->lock)         \
  |  |  ------------------
  |  |  |  Branch (39:9): [True: 2, False: 0]
  |  |  ------------------
  |  |   40|      2|    PZ_Lock((list)->lock)
  |  |  ------------------
  |  |  |  |  245|      2|#define PZ_Lock(k) PR_Lock((k))
  |  |  ------------------
  ------------------
  162|      2|    node = list->head;
  163|      2|    list->head = NULL;
  164|      4|    while (node && list->count > 0) {
  ------------------
  |  Branch (164:12): [True: 3, False: 1]
  |  Branch (164:20): [True: 2, False: 1]
  ------------------
  165|      2|        if (destructor)
  ------------------
  |  Branch (165:13): [True: 2, False: 0]
  ------------------
  166|      2|            (*destructor)(node->data);
  167|      2|        link = &node->link;
  168|      2|        tmp = (nssListElement *)PR_NEXT_LINK(link);
  ------------------
  |  |   47|      2|        ((_e)->next)
  ------------------
  169|      2|        PR_REMOVE_LINK(link);
  ------------------
  |  |   72|      2|    PR_BEGIN_MACRO             \
  |  |  ------------------
  |  |  |  |  123|      2|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |   73|      2|    (_e)->prev->next = (_e)->next; \
  |  |   74|      2|    (_e)->next->prev = (_e)->prev; \
  |  |   75|      2|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|      2|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  170|      2|        nss_ZFreeIf(node);
  171|      2|        node = tmp;
  172|      2|        --list->count;
  173|      2|    }
  174|      2|    NSSLIST_UNLOCK_IF(list);
  ------------------
  |  |   43|      2|    if ((list)->lock)           \
  |  |  ------------------
  |  |  |  Branch (43:9): [True: 2, False: 0]
  |  |  ------------------
  |  |   44|      2|    PZ_Unlock((list)->lock)
  |  |  ------------------
  |  |  |  |  246|      2|#define PZ_Unlock(k) PR_Unlock((k))
  |  |  ------------------
  ------------------
  175|      2|}
nssList_Add:
  222|  5.09k|{
  223|  5.09k|    NSSLIST_LOCK_IF(list);
  ------------------
  |  |   39|  5.09k|    if ((list)->lock)         \
  |  |  ------------------
  |  |  |  Branch (39:9): [True: 4, False: 5.09k]
  |  |  ------------------
  |  |   40|  5.09k|    PZ_Lock((list)->lock)
  |  |  ------------------
  |  |  |  |  245|      4|#define PZ_Lock(k) PR_Lock((k))
  |  |  ------------------
  ------------------
  224|  5.09k|    (void)nsslist_add_element(list, data);
  225|  5.09k|    NSSLIST_UNLOCK_IF(list);
  ------------------
  |  |   43|  5.09k|    if ((list)->lock)           \
  |  |  ------------------
  |  |  |  Branch (43:9): [True: 4, False: 5.09k]
  |  |  ------------------
  |  |   44|  5.09k|    PZ_Unlock((list)->lock)
  |  |  ------------------
  |  |  |  |  246|      4|#define PZ_Unlock(k) PR_Unlock((k))
  |  |  ------------------
  ------------------
  226|  5.09k|    return PR_SUCCESS;
  227|  5.09k|}
nssList_Remove:
  248|  5.09k|{
  249|  5.09k|    nssListElement *node;
  250|  5.09k|    NSSLIST_LOCK_IF(list);
  ------------------
  |  |   39|  5.09k|    if ((list)->lock)         \
  |  |  ------------------
  |  |  |  Branch (39:9): [True: 0, False: 5.09k]
  |  |  ------------------
  |  |   40|  5.09k|    PZ_Lock((list)->lock)
  |  |  ------------------
  |  |  |  |  245|      0|#define PZ_Lock(k) PR_Lock((k))
  |  |  ------------------
  ------------------
  251|  5.09k|    node = nsslist_get_matching_element(list, data);
  252|  5.09k|    if (node) {
  ------------------
  |  Branch (252:9): [True: 5.09k, False: 0]
  ------------------
  253|  5.09k|        if (node == list->head) {
  ------------------
  |  Branch (253:13): [True: 5.09k, False: 0]
  ------------------
  254|  5.09k|            list->head = (nssListElement *)PR_NEXT_LINK(&node->link);
  ------------------
  |  |   47|  5.09k|        ((_e)->next)
  ------------------
  255|  5.09k|        }
  256|  5.09k|        PR_REMOVE_LINK(&node->link);
  ------------------
  |  |   72|  5.09k|    PR_BEGIN_MACRO             \
  |  |  ------------------
  |  |  |  |  123|  5.09k|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |   73|  5.09k|    (_e)->prev->next = (_e)->next; \
  |  |   74|  5.09k|    (_e)->next->prev = (_e)->prev; \
  |  |   75|  5.09k|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|  5.09k|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  257|  5.09k|        nss_ZFreeIf(node);
  258|  5.09k|        if (--list->count == 0) {
  ------------------
  |  Branch (258:13): [True: 5.09k, False: 0]
  ------------------
  259|  5.09k|            list->head = NULL;
  260|  5.09k|        }
  261|  5.09k|    }
  262|  5.09k|    NSSLIST_UNLOCK_IF(list);
  ------------------
  |  |   43|  5.09k|    if ((list)->lock)           \
  |  |  ------------------
  |  |  |  Branch (43:9): [True: 0, False: 5.09k]
  |  |  ------------------
  |  |   44|  5.09k|    PZ_Unlock((list)->lock)
  |  |  ------------------
  |  |  |  |  246|      0|#define PZ_Unlock(k) PR_Unlock((k))
  |  |  ------------------
  ------------------
  263|  5.09k|    return PR_SUCCESS;
  264|  5.09k|}
nssList_Count:
  278|  20.4k|{
  279|  20.4k|    return list->count;
  280|  20.4k|}
nssList_GetArray:
  284|  15.3k|{
  285|  15.3k|    nssListElement *node;
  286|  15.3k|    PRUint32 i = 0;
  287|  15.3k|    PR_ASSERT(maxElements > 0);
  ------------------
  |  |  208|  15.3k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 15.3k, False: 0]
  |  |  ------------------
  ------------------
  288|  15.3k|    node = list->head;
  289|  15.3k|    if (!node) {
  ------------------
  |  Branch (289:9): [True: 0, False: 15.3k]
  ------------------
  290|      0|        return PR_SUCCESS;
  291|      0|    }
  292|  15.3k|    NSSLIST_LOCK_IF(list);
  ------------------
  |  |   39|  15.3k|    if ((list)->lock)         \
  |  |  ------------------
  |  |  |  Branch (39:9): [True: 15.3k, False: 0]
  |  |  ------------------
  |  |   40|  15.3k|    PZ_Lock((list)->lock)
  |  |  ------------------
  |  |  |  |  245|  15.3k|#define PZ_Lock(k) PR_Lock((k))
  |  |  ------------------
  ------------------
  293|  30.6k|    while (node) {
  ------------------
  |  Branch (293:12): [True: 30.6k, False: 0]
  ------------------
  294|  30.6k|        rvArray[i++] = node->data;
  295|  30.6k|        if (i == maxElements)
  ------------------
  |  Branch (295:13): [True: 15.3k, False: 15.3k]
  ------------------
  296|  15.3k|            break;
  297|  15.3k|        node = (nssListElement *)PR_NEXT_LINK(&node->link);
  ------------------
  |  |   47|  15.3k|        ((_e)->next)
  ------------------
  298|  15.3k|        if (node == list->head) {
  ------------------
  |  Branch (298:13): [True: 0, False: 15.3k]
  ------------------
  299|      0|            break;
  300|      0|        }
  301|  15.3k|    }
  302|  15.3k|    NSSLIST_UNLOCK_IF(list);
  ------------------
  |  |   43|  15.3k|    if ((list)->lock)           \
  |  |  ------------------
  |  |  |  Branch (43:9): [True: 15.3k, False: 0]
  |  |  ------------------
  |  |   44|  15.3k|    PZ_Unlock((list)->lock)
  |  |  ------------------
  |  |  |  |  246|  15.3k|#define PZ_Unlock(k) PR_Unlock((k))
  |  |  ------------------
  ------------------
  303|  15.3k|    return PR_SUCCESS;
  304|  15.3k|}
nssList_Clone:
  308|      1|{
  309|      1|    nssList *rvList;
  310|      1|    nssListElement *node;
  311|      1|    rvList = nssList_Create(NULL, (list->lock != NULL));
  312|      1|    if (!rvList) {
  ------------------
  |  Branch (312:9): [True: 0, False: 1]
  ------------------
  313|      0|        return NULL;
  314|      0|    }
  315|      1|    NSSLIST_LOCK_IF(list);
  ------------------
  |  |   39|      1|    if ((list)->lock)         \
  |  |  ------------------
  |  |  |  Branch (39:9): [True: 1, False: 0]
  |  |  ------------------
  |  |   40|      1|    PZ_Lock((list)->lock)
  |  |  ------------------
  |  |  |  |  245|      1|#define PZ_Lock(k) PR_Lock((k))
  |  |  ------------------
  ------------------
  316|      1|    if (list->count > 0) {
  ------------------
  |  Branch (316:9): [True: 1, False: 0]
  ------------------
  317|      1|        node = list->head;
  318|      2|        while (PR_TRUE) {
  ------------------
  |  |  437|      2|#define PR_TRUE 1
  |  |  ------------------
  |  |  |  Branch (437:17): [Folded - Ignored]
  |  |  ------------------
  ------------------
  319|      2|            nssList_Add(rvList, node->data);
  320|      2|            node = (nssListElement *)PR_NEXT_LINK(&node->link);
  ------------------
  |  |   47|      2|        ((_e)->next)
  ------------------
  321|      2|            if (node == list->head) {
  ------------------
  |  Branch (321:17): [True: 1, False: 1]
  ------------------
  322|      1|                break;
  323|      1|            }
  324|      2|        }
  325|      1|    }
  326|      1|    NSSLIST_UNLOCK_IF(list);
  ------------------
  |  |   43|      1|    if ((list)->lock)           \
  |  |  ------------------
  |  |  |  Branch (43:9): [True: 1, False: 0]
  |  |  ------------------
  |  |   44|      1|    PZ_Unlock((list)->lock)
  |  |  ------------------
  |  |  |  |  246|      1|#define PZ_Unlock(k) PR_Unlock((k))
  |  |  ------------------
  ------------------
  327|      1|    return rvList;
  328|      1|}
nssList_CreateIterator:
  332|      1|{
  333|      1|    nssListIterator *rvIterator;
  334|      1|    rvIterator = nss_ZNEW(NULL, nssListIterator);
  ------------------
  |  |  348|      1|#define nss_ZNEW(arenaOpt, type) ((type *)nss_ZAlloc((arenaOpt), sizeof(type)))
  ------------------
  335|      1|    if (!rvIterator) {
  ------------------
  |  Branch (335:9): [True: 0, False: 1]
  ------------------
  336|      0|        return NULL;
  337|      0|    }
  338|      1|    rvIterator->list = nssList_Clone(list);
  339|      1|    if (!rvIterator->list) {
  ------------------
  |  Branch (339:9): [True: 0, False: 1]
  ------------------
  340|      0|        nss_ZFreeIf(rvIterator);
  341|      0|        return NULL;
  342|      0|    }
  343|      1|    rvIterator->current = rvIterator->list->head;
  344|      1|    if (list->lock) {
  ------------------
  |  Branch (344:9): [True: 1, False: 0]
  ------------------
  345|      1|        rvIterator->lock = PZ_NewLock(nssILockOther);
  ------------------
  |  |  243|      1|#define PZ_NewLock(t) PR_NewLock()
  ------------------
  346|      1|        if (!rvIterator->lock) {
  ------------------
  |  Branch (346:13): [True: 0, False: 1]
  ------------------
  347|      0|            nssList_Destroy(rvIterator->list);
  348|      0|            nss_ZFreeIf(rvIterator);
  349|      0|            rvIterator = NULL;
  350|      0|        }
  351|      1|    }
  352|      1|    return rvIterator;
  353|      1|}
nssListIterator_Destroy:
  357|      1|{
  358|      1|    if (iter->lock) {
  ------------------
  |  Branch (358:9): [True: 1, False: 0]
  ------------------
  359|      1|        (void)PZ_DestroyLock(iter->lock);
  ------------------
  |  |  244|      1|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
  360|      1|    }
  361|      1|    if (iter->list) {
  ------------------
  |  Branch (361:9): [True: 1, False: 0]
  ------------------
  362|      1|        nssList_Destroy(iter->list);
  363|      1|    }
  364|      1|    nss_ZFreeIf(iter);
  365|      1|}
list.c:pointer_compare:
   48|  5.09k|{
   49|  5.09k|    return (PRBool)(a == b);
   50|  5.09k|}
list.c:nsslist_add_element:
  179|  5.09k|{
  180|  5.09k|    nssListElement *node = nss_ZNEW(list->arena, nssListElement);
  ------------------
  |  |  348|  5.09k|#define nss_ZNEW(arenaOpt, type) ((type *)nss_ZAlloc((arenaOpt), sizeof(type)))
  ------------------
  181|  5.09k|    if (!node) {
  ------------------
  |  Branch (181:9): [True: 0, False: 5.09k]
  ------------------
  182|      0|        return PR_FAILURE;
  183|      0|    }
  184|  5.09k|    PR_INIT_CLIST(&node->link);
  ------------------
  |  |  100|  10.1k|    PR_BEGIN_MACRO     \
  |  |  ------------------
  |  |  |  |  123|  5.09k|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |  101|  10.1k|    (_l)->next = (_l); \
  |  |  102|  10.1k|    (_l)->prev = (_l); \
  |  |  103|  10.1k|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|  5.09k|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  185|  5.09k|    node->data = data;
  186|  5.09k|    if (list->head) {
  ------------------
  |  Branch (186:9): [True: 2, False: 5.09k]
  ------------------
  187|      2|        if (list->sortFunc) {
  ------------------
  |  Branch (187:13): [True: 0, False: 2]
  ------------------
  188|      0|            PRCList *link;
  189|      0|            nssListElement *currNode;
  190|      0|            currNode = list->head;
  191|       |            /* insert in ordered list */
  192|      0|            while (currNode) {
  ------------------
  |  Branch (192:20): [True: 0, False: 0]
  ------------------
  193|      0|                link = &currNode->link;
  194|      0|                if (list->sortFunc(data, currNode->data) <= 0) {
  ------------------
  |  Branch (194:21): [True: 0, False: 0]
  ------------------
  195|       |                    /* new element goes before current node */
  196|      0|                    PR_INSERT_BEFORE(&node->link, link);
  ------------------
  |  |   25|      0|    PR_BEGIN_MACRO       \
  |  |  ------------------
  |  |  |  |  123|      0|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |   26|      0|    (_e)->next = (_l);   \
  |  |   27|      0|    (_e)->prev = (_l)->prev; \
  |  |   28|      0|    (_l)->prev->next = (_e); \
  |  |   29|      0|    (_l)->prev = (_e);   \
  |  |   30|      0|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|      0|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  197|       |                    /* reset head if this is first */
  198|      0|                    if (currNode == list->head)
  ------------------
  |  Branch (198:25): [True: 0, False: 0]
  ------------------
  199|      0|                        list->head = node;
  200|      0|                    break;
  201|      0|                }
  202|      0|                if (link == PR_LIST_TAIL(&list->head->link)) {
  ------------------
  |  |   66|      0|#define PR_LIST_TAIL(_l) (_l)->prev
  ------------------
  |  Branch (202:21): [True: 0, False: 0]
  ------------------
  203|       |                    /* reached end of list, append */
  204|      0|                    PR_INSERT_AFTER(&node->link, link);
  ------------------
  |  |   36|      0|    PR_BEGIN_MACRO       \
  |  |  ------------------
  |  |  |  |  123|      0|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |   37|      0|    (_e)->next = (_l)->next; \
  |  |   38|      0|    (_e)->prev = (_l);   \
  |  |   39|      0|    (_l)->next->prev = (_e); \
  |  |   40|      0|    (_l)->next = (_e);   \
  |  |   41|      0|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|      0|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|      0|                    break;
  206|      0|                }
  207|      0|                currNode = (nssListElement *)PR_NEXT_LINK(&currNode->link);
  ------------------
  |  |   47|      0|        ((_e)->next)
  ------------------
  208|      0|            }
  209|      2|        } else {
  210|       |            /* not sorting */
  211|      2|            PR_APPEND_LINK(&node->link, &list->head->link);
  ------------------
  |  |   57|      2|#define PR_APPEND_LINK(_e,_l) PR_INSERT_BEFORE(_e,_l)
  |  |  ------------------
  |  |  |  |   25|      2|    PR_BEGIN_MACRO       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  123|      2|#define PR_BEGIN_MACRO  do {
  |  |  |  |  ------------------
  |  |  |  |   26|      2|    (_e)->next = (_l);   \
  |  |  |  |   27|      2|    (_e)->prev = (_l)->prev; \
  |  |  |  |   28|      2|    (_l)->prev->next = (_e); \
  |  |  |  |   29|      2|    (_l)->prev = (_e);   \
  |  |  |  |   30|      2|    PR_END_MACRO
  |  |  |  |  ------------------
  |  |  |  |  |  |  124|      2|#define PR_END_MACRO    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  212|      2|        }
  213|  5.09k|    } else {
  214|  5.09k|        list->head = node;
  215|  5.09k|    }
  216|  5.09k|    ++list->count;
  217|  5.09k|    return PR_SUCCESS;
  218|  5.09k|}
list.c:nsslist_get_matching_element:
   54|  5.09k|{
   55|  5.09k|    nssListElement *node;
   56|  5.09k|    node = list->head;
   57|  5.09k|    if (!node) {
  ------------------
  |  Branch (57:9): [True: 0, False: 5.09k]
  ------------------
   58|      0|        return NULL;
   59|      0|    }
   60|  5.09k|    while (node) {
  ------------------
  |  Branch (60:12): [True: 5.09k, False: 0]
  ------------------
   61|       |        /* using a callback slows things down when it's just compare ... */
   62|  5.09k|        if (list->compareFunc(node->data, data)) {
  ------------------
  |  Branch (62:13): [True: 5.09k, False: 0]
  ------------------
   63|  5.09k|            break;
   64|  5.09k|        }
   65|      0|        if (&node->link == PR_LIST_TAIL(&list->head->link)) {
  ------------------
  |  |   66|      0|#define PR_LIST_TAIL(_l) (_l)->prev
  ------------------
  |  Branch (65:13): [True: 0, False: 0]
  ------------------
   66|      0|            node = NULL;
   67|      0|            break;
   68|      0|        }
   69|      0|        node = (nssListElement *)PR_NEXT_LINK(&node->link);
  ------------------
  |  |   47|      0|        ((_e)->next)
  ------------------
   70|      0|    }
   71|  5.09k|    return node;
   72|  5.09k|}

nssPointerTracker_initialize:
   85|  36.0k|{
   86|  36.0k|    PRStatus rv = PR_CallOnceWithArg(&tracker->once, trackerOnceFunc, tracker);
   87|  36.0k|    if (PR_SUCCESS != rv) {
  ------------------
  |  Branch (87:9): [True: 0, False: 36.0k]
  ------------------
   88|      0|        nss_SetError(NSS_ERROR_NO_MEMORY);
   89|      0|    }
   90|       |
   91|  36.0k|    return rv;
   92|  36.0k|}
nssPointerTracker_finalize:
  147|      1|{
  148|      1|    PZLock *lock;
  ------------------
  |  |  185|      1|#define PZLock PRLock
  ------------------
  149|       |
  150|      1|    if ((nssPointerTracker *)NULL == tracker) {
  ------------------
  |  Branch (150:9): [True: 0, False: 1]
  ------------------
  151|      0|        nss_SetError(NSS_ERROR_INVALID_POINTER);
  152|      0|        return PR_FAILURE;
  153|      0|    }
  154|       |
  155|      1|    if ((PZLock *)NULL == tracker->lock) {
  ------------------
  |  Branch (155:9): [True: 0, False: 1]
  ------------------
  156|      0|        nss_SetError(NSS_ERROR_TRACKER_NOT_INITIALIZED);
  157|      0|        return PR_FAILURE;
  158|      0|    }
  159|       |
  160|      1|    lock = tracker->lock;
  161|      1|    PZ_Lock(lock);
  ------------------
  |  |  245|      1|#define PZ_Lock(k) PR_Lock((k))
  ------------------
  162|       |
  163|      1|    if ((PLHashTable *)NULL == tracker->table) {
  ------------------
  |  Branch (163:9): [True: 0, False: 1]
  ------------------
  164|      0|        PZ_Unlock(lock);
  ------------------
  |  |  246|      0|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  165|      0|        nss_SetError(NSS_ERROR_TRACKER_NOT_INITIALIZED);
  166|      0|        return PR_FAILURE;
  167|      0|    }
  168|       |
  169|       |#ifdef DONT_DESTROY_EMPTY_TABLES
  170|       |    /*
  171|       |     * I changed my mind; I think we don't want this after all.
  172|       |     * Comments?
  173|       |     */
  174|       |    count = PL_HashTableEnumerateEntries(tracker->table, count_entries,
  175|       |                                         (void *)NULL);
  176|       |
  177|       |    if (0 != count) {
  178|       |        PZ_Unlock(lock);
  179|       |        nss_SetError(NSS_ERROR_TRACKER_NOT_EMPTY);
  180|       |        return PR_FAILURE;
  181|       |    }
  182|       |#endif /* DONT_DESTROY_EMPTY_TABLES */
  183|       |
  184|      1|    PL_HashTableDestroy(tracker->table);
  185|       |    /* memset(tracker, 0, sizeof(nssPointerTracker)); */
  186|      1|    tracker->once = zero_once;
  187|      1|    tracker->lock = (PZLock *)NULL;
  188|      1|    tracker->table = (PLHashTable *)NULL;
  189|       |
  190|      1|    PZ_Unlock(lock);
  ------------------
  |  |  246|      1|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  191|      1|    PZ_DestroyLock(lock);
  ------------------
  |  |  244|      1|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
  192|       |
  193|      1|    return PR_SUCCESS;
  194|      1|}
nssPointerTracker_add:
  221|  10.4k|{
  222|  10.4k|    void *check;
  223|  10.4k|    PLHashEntry *entry;
  224|       |
  225|  10.4k|    if ((nssPointerTracker *)NULL == tracker) {
  ------------------
  |  Branch (225:9): [True: 0, False: 10.4k]
  ------------------
  226|      0|        nss_SetError(NSS_ERROR_INVALID_POINTER);
  227|      0|        return PR_FAILURE;
  228|      0|    }
  229|       |
  230|  10.4k|    if ((PZLock *)NULL == tracker->lock) {
  ------------------
  |  Branch (230:9): [True: 0, False: 10.4k]
  ------------------
  231|      0|        nss_SetError(NSS_ERROR_TRACKER_NOT_INITIALIZED);
  232|      0|        return PR_FAILURE;
  233|      0|    }
  234|       |
  235|  10.4k|    PZ_Lock(tracker->lock);
  ------------------
  |  |  245|  10.4k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
  236|       |
  237|  10.4k|    if ((PLHashTable *)NULL == tracker->table) {
  ------------------
  |  Branch (237:9): [True: 0, False: 10.4k]
  ------------------
  238|      0|        PZ_Unlock(tracker->lock);
  ------------------
  |  |  246|      0|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  239|      0|        nss_SetError(NSS_ERROR_TRACKER_NOT_INITIALIZED);
  240|      0|        return PR_FAILURE;
  241|      0|    }
  242|       |
  243|  10.4k|    check = PL_HashTableLookup(tracker->table, pointer);
  244|  10.4k|    if ((void *)NULL != check) {
  ------------------
  |  Branch (244:9): [True: 0, False: 10.4k]
  ------------------
  245|      0|        PZ_Unlock(tracker->lock);
  ------------------
  |  |  246|      0|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  246|      0|        nss_SetError(NSS_ERROR_DUPLICATE_POINTER);
  247|      0|        return PR_FAILURE;
  248|      0|    }
  249|       |
  250|  10.4k|    entry = PL_HashTableAdd(tracker->table, pointer, (void *)pointer);
  251|       |
  252|  10.4k|    PZ_Unlock(tracker->lock);
  ------------------
  |  |  246|  10.4k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  253|       |
  254|  10.4k|    if ((PLHashEntry *)NULL == entry) {
  ------------------
  |  Branch (254:9): [True: 0, False: 10.4k]
  ------------------
  255|      0|        nss_SetError(NSS_ERROR_NO_MEMORY);
  256|      0|        return PR_FAILURE;
  257|      0|    }
  258|       |
  259|  10.4k|    return PR_SUCCESS;
  260|  10.4k|}
nssPointerTracker_remove:
  287|  10.4k|{
  288|  10.4k|    PRBool registered;
  289|       |
  290|  10.4k|    if ((nssPointerTracker *)NULL == tracker) {
  ------------------
  |  Branch (290:9): [True: 0, False: 10.4k]
  ------------------
  291|      0|        nss_SetError(NSS_ERROR_INVALID_POINTER);
  292|      0|        return PR_FAILURE;
  293|      0|    }
  294|       |
  295|  10.4k|    if ((PZLock *)NULL == tracker->lock) {
  ------------------
  |  Branch (295:9): [True: 0, False: 10.4k]
  ------------------
  296|      0|        nss_SetError(NSS_ERROR_TRACKER_NOT_INITIALIZED);
  297|      0|        return PR_FAILURE;
  298|      0|    }
  299|       |
  300|  10.4k|    PZ_Lock(tracker->lock);
  ------------------
  |  |  245|  10.4k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
  301|       |
  302|  10.4k|    if ((PLHashTable *)NULL == tracker->table) {
  ------------------
  |  Branch (302:9): [True: 0, False: 10.4k]
  ------------------
  303|      0|        PZ_Unlock(tracker->lock);
  ------------------
  |  |  246|      0|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  304|      0|        nss_SetError(NSS_ERROR_TRACKER_NOT_INITIALIZED);
  305|      0|        return PR_FAILURE;
  306|      0|    }
  307|       |
  308|  10.4k|    registered = PL_HashTableRemove(tracker->table, pointer);
  309|  10.4k|    PZ_Unlock(tracker->lock);
  ------------------
  |  |  246|  10.4k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  310|       |
  311|  10.4k|    if (!registered) {
  ------------------
  |  Branch (311:9): [True: 0, False: 10.4k]
  ------------------
  312|      0|        nss_SetError(NSS_ERROR_POINTER_NOT_REGISTERED);
  313|      0|        return PR_FAILURE;
  314|      0|    }
  315|       |
  316|  10.4k|    return PR_SUCCESS;
  317|  10.4k|}
nssPointerTracker_verify:
  346|  25.6k|{
  347|  25.6k|    void *check;
  348|       |
  349|  25.6k|    if ((nssPointerTracker *)NULL == tracker) {
  ------------------
  |  Branch (349:9): [True: 0, False: 25.6k]
  ------------------
  350|      0|        nss_SetError(NSS_ERROR_INVALID_POINTER);
  351|      0|        return PR_FAILURE;
  352|      0|    }
  353|       |
  354|  25.6k|    if ((PZLock *)NULL == tracker->lock) {
  ------------------
  |  Branch (354:9): [True: 0, False: 25.6k]
  ------------------
  355|      0|        nss_SetError(NSS_ERROR_TRACKER_NOT_INITIALIZED);
  356|      0|        return PR_FAILURE;
  357|      0|    }
  358|       |
  359|  25.6k|    PZ_Lock(tracker->lock);
  ------------------
  |  |  245|  25.6k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
  360|       |
  361|  25.6k|    if ((PLHashTable *)NULL == tracker->table) {
  ------------------
  |  Branch (361:9): [True: 0, False: 25.6k]
  ------------------
  362|      0|        PZ_Unlock(tracker->lock);
  ------------------
  |  |  246|      0|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  363|      0|        nss_SetError(NSS_ERROR_TRACKER_NOT_INITIALIZED);
  364|      0|        return PR_FAILURE;
  365|      0|    }
  366|       |
  367|  25.6k|    check = PL_HashTableLookup(tracker->table, pointer);
  368|  25.6k|    PZ_Unlock(tracker->lock);
  ------------------
  |  |  246|  25.6k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  369|       |
  370|  25.6k|    if ((void *)NULL == check) {
  ------------------
  |  Branch (370:9): [True: 0, False: 25.6k]
  ------------------
  371|      0|        nss_SetError(NSS_ERROR_POINTER_NOT_REGISTERED);
  372|      0|        return PR_FAILURE;
  373|      0|    }
  374|       |
  375|  25.6k|    return PR_SUCCESS;
  376|  25.6k|}
tracker.c:trackerOnceFunc:
   42|      1|{
   43|      1|    nssPointerTracker *tracker = (nssPointerTracker *)arg;
   44|       |
   45|      1|    tracker->lock = PZ_NewLock(nssILockOther);
  ------------------
  |  |  243|      1|#define PZ_NewLock(t) PR_NewLock()
  ------------------
   46|      1|    if ((PZLock *)NULL == tracker->lock) {
  ------------------
  |  Branch (46:9): [True: 0, False: 1]
  ------------------
   47|      0|        return PR_FAILURE;
   48|      0|    }
   49|       |
   50|      1|    tracker->table =
   51|      1|        PL_NewHashTable(0, identity_hash, PL_CompareValues, PL_CompareValues,
   52|      1|                        (PLHashAllocOps *)NULL, (void *)NULL);
   53|      1|    if ((PLHashTable *)NULL == tracker->table) {
  ------------------
  |  Branch (53:9): [True: 0, False: 1]
  ------------------
   54|      0|        PZ_DestroyLock(tracker->lock);
  ------------------
  |  |  244|      0|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
   55|      0|        tracker->lock = (PZLock *)NULL;
   56|      0|        return PR_FAILURE;
   57|      0|    }
   58|       |
   59|      1|    return PR_SUCCESS;
   60|      1|}
tracker.c:identity_hash:
   28|  56.8k|{
   29|  56.8k|    return (PLHashNumber)((char *)key - (char *)NULL);
   30|  56.8k|}

nssUTF8_Duplicate:
  193|      4|{
  194|      4|    NSSUTF8 *rv;
  195|      4|    PRUint32 len;
  196|       |
  197|       |#ifdef NSSDEBUG
  198|       |    if ((const NSSUTF8 *)NULL == s) {
  199|       |        nss_SetError(NSS_ERROR_INVALID_POINTER);
  200|       |        return (NSSUTF8 *)NULL;
  201|       |    }
  202|       |
  203|       |    if ((NSSArena *)NULL != arenaOpt) {
  204|       |        if (PR_SUCCESS != nssArena_verifyPointer(arenaOpt)) {
  205|       |            return (NSSUTF8 *)NULL;
  206|       |        }
  207|       |    }
  208|       |#endif /* NSSDEBUG */
  209|       |
  210|      4|    len = PL_strlen((const char *)s);
  211|       |#ifdef PEDANTIC
  212|       |    if ('\0' != ((const char *)s)[len]) {
  213|       |        /* must have wrapped, e.g., too big for PRUint32 */
  214|       |        nss_SetError(NSS_ERROR_NO_MEMORY);
  215|       |        return (NSSUTF8 *)NULL;
  216|       |    }
  217|       |#endif     /* PEDANTIC */
  218|      4|    len++; /* zero termination */
  219|       |
  220|      4|    rv = nss_ZAlloc(arenaOpt, len);
  221|      4|    if ((void *)NULL == rv) {
  ------------------
  |  Branch (221:9): [True: 0, False: 4]
  ------------------
  222|      0|        return (NSSUTF8 *)NULL;
  223|      0|    }
  224|       |
  225|      4|    (void)nsslibc_memcpy(rv, s, len);
  226|      4|    return rv;
  227|      4|}
nssUTF8_Create:
  429|     11|{
  430|     11|    NSSUTF8 *rv = NULL;
  431|       |
  432|       |#ifdef NSSDEBUG
  433|       |    if ((NSSArena *)NULL != arenaOpt) {
  434|       |        if (PR_SUCCESS != nssArena_verifyPointer(arenaOpt)) {
  435|       |            return (NSSUTF8 *)NULL;
  436|       |        }
  437|       |    }
  438|       |
  439|       |    if ((const void *)NULL == inputString) {
  440|       |        nss_SetError(NSS_ERROR_INVALID_POINTER);
  441|       |        return (NSSUTF8 *)NULL;
  442|       |    }
  443|       |#endif /* NSSDEBUG */
  444|       |
  445|     11|    switch (type) {
  446|      0|        case nssStringType_DirectoryString:
  ------------------
  |  Branch (446:9): [True: 0, False: 11]
  ------------------
  447|       |            /* This is a composite type requiring BER */
  448|      0|            nss_SetError(NSS_ERROR_UNSUPPORTED_TYPE);
  449|      0|            break;
  450|      0|        case nssStringType_TeletexString:
  ------------------
  |  Branch (450:9): [True: 0, False: 11]
  ------------------
  451|       |            /*
  452|       |             * draft-ietf-pkix-ipki-part1-11 says in part:
  453|       |             *
  454|       |             * In addition, many legacy implementations support names encoded
  455|       |             * in the ISO 8859-1 character set (Latin1String) but tag them as
  456|       |             * TeletexString.  The Latin1String includes characters used in
  457|       |             * Western European countries which are not part of the
  458|       |             * TeletexString charcter set.  Implementations that process
  459|       |             * TeletexString SHOULD be prepared to handle the entire ISO
  460|       |             * 8859-1 character set.[ISO 8859-1].
  461|       |             */
  462|      0|            nss_SetError(NSS_ERROR_INTERNAL_ERROR); /* unimplemented */
  463|      0|            break;
  464|     11|        case nssStringType_PrintableString:
  ------------------
  |  Branch (464:9): [True: 11, False: 0]
  ------------------
  465|       |            /*
  466|       |             * PrintableString consists of A-Za-z0-9 ,()+,-./:=?
  467|       |             * This is a subset of ASCII, which is a subset of UTF8.
  468|       |             * So we can just duplicate the string over.
  469|       |             */
  470|       |
  471|     11|            if (0 == size) {
  ------------------
  |  Branch (471:17): [True: 0, False: 11]
  ------------------
  472|      0|                rv = nssUTF8_Duplicate((const NSSUTF8 *)inputString, arenaOpt);
  473|     11|            } else {
  474|     11|                rv = nss_ZAlloc(arenaOpt, size + 1);
  475|     11|                if ((NSSUTF8 *)NULL == rv) {
  ------------------
  |  Branch (475:21): [True: 0, False: 11]
  ------------------
  476|      0|                    return (NSSUTF8 *)NULL;
  477|      0|                }
  478|       |
  479|     11|                (void)nsslibc_memcpy(rv, inputString, size);
  480|     11|            }
  481|       |
  482|     11|            break;
  483|     11|        case nssStringType_UniversalString:
  ------------------
  |  Branch (483:9): [True: 0, False: 11]
  ------------------
  484|       |            /* 4-byte unicode */
  485|      0|            nss_SetError(NSS_ERROR_INTERNAL_ERROR); /* unimplemented */
  486|      0|            break;
  487|      0|        case nssStringType_BMPString:
  ------------------
  |  Branch (487:9): [True: 0, False: 11]
  ------------------
  488|       |            /* Base Multilingual Plane of Unicode */
  489|      0|            nss_SetError(NSS_ERROR_INTERNAL_ERROR); /* unimplemented */
  490|      0|            break;
  491|      0|        case nssStringType_UTF8String:
  ------------------
  |  Branch (491:9): [True: 0, False: 11]
  ------------------
  492|      0|            if (0 == size) {
  ------------------
  |  Branch (492:17): [True: 0, False: 0]
  ------------------
  493|      0|                rv = nssUTF8_Duplicate((const NSSUTF8 *)inputString, arenaOpt);
  494|      0|            } else {
  495|      0|                rv = nss_ZAlloc(arenaOpt, size + 1);
  496|      0|                if ((NSSUTF8 *)NULL == rv) {
  ------------------
  |  Branch (496:21): [True: 0, False: 0]
  ------------------
  497|      0|                    return (NSSUTF8 *)NULL;
  498|      0|                }
  499|       |
  500|      0|                (void)nsslibc_memcpy(rv, inputString, size);
  501|      0|            }
  502|       |
  503|      0|            break;
  504|      0|        case nssStringType_PHGString:
  ------------------
  |  Branch (504:9): [True: 0, False: 11]
  ------------------
  505|       |            /*
  506|       |             * PHGString is an IA5String (with case-insensitive comparisons).
  507|       |             * IA5 is ~almost~ ascii; ascii has dollar-sign where IA5 has
  508|       |             * currency symbol.
  509|       |             */
  510|      0|            nss_SetError(NSS_ERROR_INTERNAL_ERROR); /* unimplemented */
  511|      0|            break;
  512|      0|        case nssStringType_GeneralString:
  ------------------
  |  Branch (512:9): [True: 0, False: 11]
  ------------------
  513|      0|            nss_SetError(NSS_ERROR_INTERNAL_ERROR); /* unimplemented */
  514|      0|            break;
  515|      0|        default:
  ------------------
  |  Branch (515:9): [True: 0, False: 11]
  ------------------
  516|      0|            nss_SetError(NSS_ERROR_UNSUPPORTED_TYPE);
  517|      0|            break;
  518|     11|    }
  519|       |
  520|     11|    return rv;
  521|     11|}

CERT_GetOidString:
  701|  6.81k|{
  702|  6.81k|    PRUint8* stop;  /* points to first byte after OID string */
  703|  6.81k|    PRUint8* first; /* byte of an OID component integer      */
  704|  6.81k|    PRUint8* last;  /* byte of an OID component integer      */
  705|  6.81k|    char* rvString = NULL;
  706|  6.81k|    char* prefix = NULL;
  707|       |
  708|  6.81k|#define MAX_OID_LEN 1024 /* bytes */
  709|       |
  710|  6.81k|    if (oid->len > MAX_OID_LEN) {
  ------------------
  |  |  708|  6.81k|#define MAX_OID_LEN 1024 /* bytes */
  ------------------
  |  Branch (710:9): [True: 0, False: 6.81k]
  ------------------
  711|      0|        PORT_SetError(SEC_ERROR_INPUT_LEN);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  712|      0|        return NULL;
  713|      0|    }
  714|       |
  715|       |    /* If the OID has length 1, we bail. */
  716|  6.81k|    if (oid->len < 2) {
  ------------------
  |  Branch (716:9): [True: 43, False: 6.77k]
  ------------------
  717|     43|        return NULL;
  718|     43|    }
  719|       |
  720|       |    /* first will point to the next sequence of bytes to decode */
  721|  6.77k|    first = (PRUint8*)oid->data;
  722|       |    /* stop points to one past the legitimate data */
  723|  6.77k|    stop = &first[oid->len];
  724|       |
  725|       |    /*
  726|       |     * Check for our pseudo-encoded single-digit OIDs
  727|       |     */
  728|  6.77k|    if ((*first == 0x80) && (2 == oid->len)) {
  ------------------
  |  Branch (728:9): [True: 228, False: 6.54k]
  |  Branch (728:29): [True: 8, False: 220]
  ------------------
  729|       |        /* Funky encoding.  The second byte is the number */
  730|      8|        rvString = PR_smprintf("%lu", (PRUint32)first[1]);
  731|      8|        if (!rvString) {
  ------------------
  |  Branch (731:13): [True: 0, False: 8]
  ------------------
  732|      0|            PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  733|      0|        }
  734|      8|        return rvString;
  735|      8|    }
  736|       |
  737|  22.9k|    for (; first < stop; first = last + 1) {
  ------------------
  |  Branch (737:12): [True: 16.2k, False: 6.76k]
  ------------------
  738|  16.2k|        unsigned int bytesBeforeLast;
  739|       |
  740|  24.2k|        for (last = first; last < stop; last++) {
  ------------------
  |  Branch (740:28): [True: 23.1k, False: 1.06k]
  ------------------
  741|  23.1k|            if (0 == (*last & 0x80)) {
  ------------------
  |  Branch (741:17): [True: 15.1k, False: 8.04k]
  ------------------
  742|  15.1k|                break;
  743|  15.1k|            }
  744|  23.1k|        }
  745|       |        /* There's no first bit set, so this isn't valid. Bail.*/
  746|  16.2k|        if (last == stop) {
  ------------------
  |  Branch (746:13): [True: 1.06k, False: 15.1k]
  ------------------
  747|  1.06k|            goto unsupported;
  748|  1.06k|        }
  749|  15.1k|        bytesBeforeLast = (unsigned int)(last - first);
  750|  15.1k|        if (bytesBeforeLast <= 3U) { /* 0-28 bit number */
  ------------------
  |  Branch (750:13): [True: 14.8k, False: 288]
  ------------------
  751|  14.8k|            PRUint32 n = 0;
  752|  14.8k|            PRUint32 c;
  753|       |
  754|  14.8k|#define CGET(i, m)    \
  755|  14.8k|    c = last[-i] & m; \
  756|  14.8k|    n |= c << (7 * i)
  757|       |
  758|  14.8k|#define CASE(i, m)  \
  759|  14.8k|    case i:         \
  760|  14.8k|        CGET(i, m); \
  761|  14.8k|        if (!n)     \
  762|  14.8k|        goto unsupported /* fall-through */
  763|       |
  764|  14.8k|            switch (bytesBeforeLast) {
  ------------------
  |  Branch (764:21): [True: 0, False: 14.8k]
  ------------------
  765|     65|                CASE(3, 0x7f);
  ------------------
  |  |  759|     65|    case i:         \
  |  |  ------------------
  |  |  |  Branch (759:5): [True: 65, False: 14.7k]
  |  |  ------------------
  |  |  760|     65|        CGET(i, m); \
  |  |  ------------------
  |  |  |  |  755|     65|    c = last[-i] & m; \
  |  |  |  |  756|     65|    n |= c << (7 * i)
  |  |  ------------------
  |  |  761|     65|        if (!n)     \
  |  |  ------------------
  |  |  |  Branch (761:13): [True: 13, False: 52]
  |  |  ------------------
  |  |  762|     65|        goto unsupported /* fall-through */
  ------------------
  766|    365|                CASE(2, 0x7f);
  ------------------
  |  |  759|    365|    case i:         \
  |  |  ------------------
  |  |  |  Branch (759:5): [True: 313, False: 14.5k]
  |  |  ------------------
  |  |  760|    365|        CGET(i, m); \
  |  |  ------------------
  |  |  |  |  755|    365|    c = last[-i] & m; \
  |  |  |  |  756|    365|    n |= c << (7 * i)
  |  |  ------------------
  |  |  761|    365|        if (!n)     \
  |  |  ------------------
  |  |  |  Branch (761:13): [True: 172, False: 193]
  |  |  ------------------
  |  |  762|    365|        goto unsupported /* fall-through */
  ------------------
  767|  4.30k|                CASE(1, 0x7f);
  ------------------
  |  |  759|  4.30k|    case i:         \
  |  |  ------------------
  |  |  |  Branch (759:5): [True: 4.11k, False: 10.7k]
  |  |  ------------------
  |  |  760|  4.30k|        CGET(i, m); \
  |  |  ------------------
  |  |  |  |  755|  4.30k|    c = last[-i] & m; \
  |  |  |  |  756|  4.30k|    n |= c << (7 * i)
  |  |  ------------------
  |  |  761|  4.30k|        if (!n)     \
  |  |  ------------------
  |  |  |  Branch (761:13): [True: 3.54k, False: 767]
  |  |  ------------------
  |  |  762|  4.30k|        goto unsupported /* fall-through */
  ------------------
  768|  11.1k|                case 0:
  ------------------
  |  Branch (768:17): [True: 10.3k, False: 4.49k]
  ------------------
  769|  11.1k|                    n |= last[0] & 0x7f;
  770|  11.1k|                    break;
  771|  14.8k|            }
  772|  11.1k|            if (last[0] & 0x80) {
  ------------------
  |  Branch (772:17): [True: 0, False: 11.1k]
  ------------------
  773|      0|                goto unsupported;
  774|      0|            }
  775|       |
  776|  11.1k|            if (!rvString) {
  ------------------
  |  Branch (776:17): [True: 6.38k, False: 4.74k]
  ------------------
  777|       |                /* This is the first number.. decompose it */
  778|  6.38k|                PRUint32 one = PR_MIN(n / 40, 2); /* never > 2 */
  ------------------
  |  |  158|  6.38k|#define PR_MIN(x,y)     ((x)<(y)?(x):(y))
  |  |  ------------------
  |  |  |  Branch (158:26): [True: 686, False: 5.69k]
  |  |  ------------------
  ------------------
  779|  6.38k|                PRUint32 two = n - (one * 40);
  780|       |
  781|  6.38k|                rvString = PR_smprintf("OID.%lu.%lu", one, two);
  782|  6.38k|            } else {
  783|  4.74k|                prefix = rvString;
  784|  4.74k|                rvString = PR_smprintf("%s.%lu", prefix, n);
  785|  4.74k|            }
  786|  11.1k|        } else if (bytesBeforeLast <= 9U) { /* 29-64 bit number */
  ------------------
  |  Branch (786:20): [True: 284, False: 4]
  ------------------
  787|    284|            PRUint64 n = 0;
  788|    284|            PRUint64 c;
  789|       |
  790|    284|            switch (bytesBeforeLast) {
  ------------------
  |  Branch (790:21): [True: 0, False: 284]
  ------------------
  791|     72|                CASE(9, 0x01);
  ------------------
  |  |  759|     72|    case i:         \
  |  |  ------------------
  |  |  |  Branch (759:5): [True: 72, False: 212]
  |  |  ------------------
  |  |  760|     72|        CGET(i, m); \
  |  |  ------------------
  |  |  |  |  755|     72|    c = last[-i] & m; \
  |  |  |  |  756|     72|    n |= c << (7 * i)
  |  |  ------------------
  |  |  761|     72|        if (!n)     \
  |  |  ------------------
  |  |  |  Branch (761:13): [True: 6, False: 66]
  |  |  ------------------
  |  |  762|     72|        goto unsupported /* fall-through */
  ------------------
  792|     92|                CASE(8, 0x7f);
  ------------------
  |  |  759|     92|    case i:         \
  |  |  ------------------
  |  |  |  Branch (759:5): [True: 26, False: 258]
  |  |  ------------------
  |  |  760|     92|        CGET(i, m); \
  |  |  ------------------
  |  |  |  |  755|     92|    c = last[-i] & m; \
  |  |  |  |  756|     92|    n |= c << (7 * i)
  |  |  ------------------
  |  |  761|     92|        if (!n)     \
  |  |  ------------------
  |  |  |  Branch (761:13): [True: 3, False: 89]
  |  |  ------------------
  |  |  762|     92|        goto unsupported /* fall-through */
  ------------------
  793|    114|                CASE(7, 0x7f);
  ------------------
  |  |  759|    114|    case i:         \
  |  |  ------------------
  |  |  |  Branch (759:5): [True: 25, False: 259]
  |  |  ------------------
  |  |  760|    114|        CGET(i, m); \
  |  |  ------------------
  |  |  |  |  755|    114|    c = last[-i] & m; \
  |  |  |  |  756|    114|    n |= c << (7 * i)
  |  |  ------------------
  |  |  761|    114|        if (!n)     \
  |  |  ------------------
  |  |  |  Branch (761:13): [True: 3, False: 111]
  |  |  ------------------
  |  |  762|    114|        goto unsupported /* fall-through */
  ------------------
  794|    132|                CASE(6, 0x7f);
  ------------------
  |  |  759|    132|    case i:         \
  |  |  ------------------
  |  |  |  Branch (759:5): [True: 21, False: 263]
  |  |  ------------------
  |  |  760|    132|        CGET(i, m); \
  |  |  ------------------
  |  |  |  |  755|    132|    c = last[-i] & m; \
  |  |  |  |  756|    132|    n |= c << (7 * i)
  |  |  ------------------
  |  |  761|    132|        if (!n)     \
  |  |  ------------------
  |  |  |  Branch (761:13): [True: 4, False: 128]
  |  |  ------------------
  |  |  762|    132|        goto unsupported /* fall-through */
  ------------------
  795|    190|                CASE(5, 0x7f);
  ------------------
  |  |  759|    190|    case i:         \
  |  |  ------------------
  |  |  |  Branch (759:5): [True: 62, False: 222]
  |  |  ------------------
  |  |  760|    190|        CGET(i, m); \
  |  |  ------------------
  |  |  |  |  755|    190|    c = last[-i] & m; \
  |  |  |  |  756|    190|    n |= c << (7 * i)
  |  |  ------------------
  |  |  761|    190|        if (!n)     \
  |  |  ------------------
  |  |  |  Branch (761:13): [True: 18, False: 172]
  |  |  ------------------
  |  |  762|    190|        goto unsupported /* fall-through */
  ------------------
  796|    250|                CASE(4, 0x7f);
  ------------------
  |  |  759|    250|    case i:         \
  |  |  ------------------
  |  |  |  Branch (759:5): [True: 78, False: 206]
  |  |  ------------------
  |  |  760|    250|        CGET(i, m); \
  |  |  ------------------
  |  |  |  |  755|    250|    c = last[-i] & m; \
  |  |  |  |  756|    250|    n |= c << (7 * i)
  |  |  ------------------
  |  |  761|    250|        if (!n)     \
  |  |  ------------------
  |  |  |  Branch (761:13): [True: 15, False: 235]
  |  |  ------------------
  |  |  762|    250|        goto unsupported /* fall-through */
  ------------------
  797|    235|                CGET(3, 0x7f);
  ------------------
  |  |  755|    235|    c = last[-i] & m; \
  |  |  756|    235|    n |= c << (7 * i)
  ------------------
  798|    235|                CGET(2, 0x7f);
  ------------------
  |  |  755|    235|    c = last[-i] & m; \
  |  |  756|    235|    n |= c << (7 * i)
  ------------------
  799|    235|                CGET(1, 0x7f);
  ------------------
  |  |  755|    235|    c = last[-i] & m; \
  |  |  756|    235|    n |= c << (7 * i)
  ------------------
  800|    235|                CGET(0, 0x7f);
  ------------------
  |  |  755|    235|    c = last[-i] & m; \
  |  |  756|    235|    n |= c << (7 * i)
  ------------------
  801|    235|                break;
  802|    284|            }
  803|    235|            if (last[0] & 0x80)
  ------------------
  |  Branch (803:17): [True: 0, False: 235]
  ------------------
  804|      0|                goto unsupported;
  805|       |
  806|    235|            if (!rvString) {
  ------------------
  |  Branch (806:17): [True: 141, False: 94]
  ------------------
  807|       |                /* This is the first number.. decompose it */
  808|    141|                PRUint64 one = PR_MIN(n / 40, 2); /* never > 2 */
  ------------------
  |  |  158|    141|#define PR_MIN(x,y)     ((x)<(y)?(x):(y))
  |  |  ------------------
  |  |  |  Branch (158:26): [True: 0, False: 141]
  |  |  ------------------
  ------------------
  809|    141|                PRUint64 two = n - (one * 40);
  810|       |
  811|    141|                rvString = PR_smprintf("OID.%llu.%llu", one, two);
  812|    141|            } else {
  813|     94|                prefix = rvString;
  814|     94|                rvString = PR_smprintf("%s.%llu", prefix, n);
  815|     94|            }
  816|    235|        } else {
  817|       |        /* More than a 64-bit number, or not minimal encoding. */
  818|  4.83k|        unsupported:
  819|  4.83k|            if (!rvString)
  ------------------
  |  Branch (819:17): [True: 241, False: 4.59k]
  ------------------
  820|    241|                rvString = PR_smprintf("OID.UNSUPPORTED");
  821|  4.59k|            else {
  822|  4.59k|                prefix = rvString;
  823|  4.59k|                rvString = PR_smprintf("%s.UNSUPPORTED", prefix);
  824|  4.59k|            }
  825|  4.83k|        }
  826|       |
  827|  16.2k|        if (prefix) {
  ------------------
  |  Branch (827:13): [True: 9.44k, False: 6.76k]
  ------------------
  828|  9.44k|            PR_smprintf_free(prefix);
  829|  9.44k|            prefix = NULL;
  830|  9.44k|        }
  831|  16.2k|        if (!rvString) {
  ------------------
  |  Branch (831:13): [True: 0, False: 16.2k]
  ------------------
  832|      0|            PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  833|      0|            break;
  834|      0|        }
  835|  16.2k|    }
  836|  6.76k|    return rvString;
  837|  6.76k|}
CERT_NameToAsciiInvertible:
 1117|  10.1k|{
 1118|  10.1k|    CERTRDN** rdns;
 1119|  10.1k|    CERTRDN** lastRdn;
 1120|  10.1k|    CERTRDN** rdn;
 1121|  10.1k|    PRBool first = PR_TRUE;
  ------------------
  |  |  437|  10.1k|#define PR_TRUE 1
  ------------------
 1122|  10.1k|    stringBuf strBuf = { NULL, 0, 0 };
 1123|       |
 1124|  10.1k|    rdns = name->rdns;
 1125|  10.1k|    if (rdns == NULL) {
  ------------------
  |  Branch (1125:9): [True: 0, False: 10.1k]
  ------------------
 1126|      0|        return NULL;
 1127|      0|    }
 1128|       |
 1129|       |    /* find last RDN */
 1130|  10.1k|    lastRdn = rdns;
 1131|  20.5k|    while (*lastRdn)
  ------------------
  |  Branch (1131:12): [True: 10.4k, False: 10.1k]
  ------------------
 1132|  10.4k|        lastRdn++;
 1133|  10.1k|    lastRdn--;
 1134|       |
 1135|       |    /*
 1136|       |     * Loop over name contents in _reverse_ RDN order appending to string
 1137|       |     */
 1138|  20.5k|    for (rdn = lastRdn; rdn >= rdns; rdn--) {
  ------------------
  |  Branch (1138:25): [True: 10.3k, False: 10.1k]
  ------------------
 1139|  10.3k|        CERTAVA** avas = (*rdn)->avas;
 1140|  10.3k|        CERTAVA* ava;
 1141|  10.3k|        PRBool newRDN = PR_TRUE;
  ------------------
  |  |  437|  10.3k|#define PR_TRUE 1
  ------------------
 1142|       |
 1143|       |        /*
 1144|       |         * XXX Do we need to traverse the AVAs in reverse order, too?
 1145|       |         */
 1146|  20.7k|        while (avas && (ava = *avas++) != NULL) {
  ------------------
  |  Branch (1146:16): [True: 20.7k, False: 0]
  |  Branch (1146:24): [True: 10.3k, False: 10.3k]
  ------------------
 1147|  10.3k|            SECStatus rv;
 1148|       |            /* Put in comma or plus separator */
 1149|  10.3k|            if (!first) {
  ------------------
  |  Branch (1149:17): [True: 201, False: 10.1k]
  ------------------
 1150|       |                /* Use of spaces is deprecated in RFC 2253. */
 1151|    201|                rv = AppendStr(&strBuf, newRDN ? "," : "+");
  ------------------
  |  Branch (1151:41): [True: 201, False: 0]
  ------------------
 1152|    201|                if (rv)
  ------------------
  |  Branch (1152:21): [True: 0, False: 201]
  ------------------
 1153|      0|                    goto loser;
 1154|  10.1k|            } else {
 1155|  10.1k|                first = PR_FALSE;
  ------------------
  |  |  438|  10.1k|#define PR_FALSE 0
  ------------------
 1156|  10.1k|            }
 1157|       |
 1158|       |            /* Add in tag type plus value into strBuf */
 1159|  10.3k|            rv = AppendAVA(&strBuf, ava, strict);
 1160|  10.3k|            if (rv)
  ------------------
  |  Branch (1160:17): [True: 43, False: 10.3k]
  ------------------
 1161|     43|                goto loser;
 1162|  10.3k|            newRDN = PR_FALSE;
  ------------------
  |  |  438|  10.3k|#define PR_FALSE 0
  ------------------
 1163|  10.3k|        }
 1164|  10.3k|    }
 1165|  10.1k|    return strBuf.buffer;
 1166|     43|loser:
 1167|     43|    if (strBuf.buffer) {
  ------------------
  |  Branch (1167:9): [True: 23, False: 20]
  ------------------
 1168|     23|        PORT_Free(strBuf.buffer);
  ------------------
  |  |   60|     23|#define PORT_Free PORT_Free_Util
  ------------------
 1169|     23|    }
 1170|     43|    return NULL;
 1171|  10.1k|}
CERT_NameToAscii:
 1175|  10.1k|{
 1176|  10.1k|    return CERT_NameToAsciiInvertible(name, CERT_N2A_READABLE);
 1177|  10.1k|}
cert_GetCertificateEmailAddresses:
 1437|  5.09k|{
 1438|  5.09k|    char* rawEmailAddr = NULL;
 1439|  5.09k|    char* addrBuf = NULL;
 1440|  5.09k|    char* pBuf = NULL;
 1441|  5.09k|    PORTCheapArenaPool tmpArena;
 1442|  5.09k|    PRUint32 maxLen = 0;
 1443|  5.09k|    PRInt32 finalLen = 0;
 1444|  5.09k|    SECStatus rv;
 1445|  5.09k|    SECItem subAltName;
 1446|       |
 1447|  5.09k|    PORT_InitCheapArena(&tmpArena, DER_DEFAULT_CHUNKSIZE);
  ------------------
  |  |   60|  5.09k|#define DER_DEFAULT_CHUNKSIZE (2048)
  ------------------
 1448|       |
 1449|  5.09k|    subAltName.data = NULL;
 1450|  5.09k|    maxLen = cert->derCert.len;
 1451|  5.09k|    PORT_Assert(maxLen);
  ------------------
  |  |  120|  5.09k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  5.09k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 5.09k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1452|  5.09k|    if (!maxLen)
  ------------------
  |  Branch (1452:9): [True: 0, False: 5.09k]
  ------------------
 1453|      0|        maxLen = 2000; /* a guess, should never happen */
 1454|       |
 1455|  5.09k|    pBuf = addrBuf = (char*)PORT_ArenaZAlloc(&tmpArena.arena, maxLen + 1);
  ------------------
  |  |   59|  5.09k|#define PORT_ArenaZAlloc PORT_ArenaZAlloc_Util
  ------------------
 1456|  5.09k|    if (!addrBuf)
  ------------------
  |  Branch (1456:9): [True: 0, False: 5.09k]
  ------------------
 1457|      0|        goto loser;
 1458|       |
 1459|  5.09k|    rawEmailAddr = CERT_GetNameElement(&tmpArena.arena, &cert->subject,
 1460|  5.09k|                                       SEC_OID_PKCS9_EMAIL_ADDRESS);
 1461|  5.09k|    pBuf = appendStringToBuf(pBuf, rawEmailAddr, &maxLen);
 1462|       |
 1463|  5.09k|    rawEmailAddr = CERT_GetNameElement(&tmpArena.arena, &cert->subject,
 1464|  5.09k|                                       SEC_OID_RFC1274_MAIL);
 1465|  5.09k|    pBuf = appendStringToBuf(pBuf, rawEmailAddr, &maxLen);
 1466|       |
 1467|  5.09k|    rv = CERT_FindCertExtension(cert, SEC_OID_X509_SUBJECT_ALT_NAME, &subAltName);
 1468|  5.09k|    if (rv == SECSuccess && subAltName.data) {
  ------------------
  |  Branch (1468:9): [True: 135, False: 4.95k]
  |  Branch (1468:29): [True: 134, False: 1]
  ------------------
 1469|    134|        CERTGeneralName* nameList = NULL;
 1470|       |
 1471|    134|        if (!!(nameList = CERT_DecodeAltNameExtension(&tmpArena.arena, &subAltName))) {
  ------------------
  |  Branch (1471:13): [True: 17, False: 117]
  ------------------
 1472|     17|            CERTGeneralName* current = nameList;
 1473|     27|            do {
 1474|     27|                if (current->type == certDirectoryName) {
  ------------------
  |  Branch (1474:21): [True: 2, False: 25]
  ------------------
 1475|      2|                    rawEmailAddr =
 1476|      2|                        CERT_GetNameElement(&tmpArena.arena,
 1477|      2|                                            &current->name.directoryName,
 1478|      2|                                            SEC_OID_PKCS9_EMAIL_ADDRESS);
 1479|      2|                    pBuf =
 1480|      2|                        appendStringToBuf(pBuf, rawEmailAddr, &maxLen);
 1481|       |
 1482|      2|                    rawEmailAddr =
 1483|      2|                        CERT_GetNameElement(&tmpArena.arena,
 1484|      2|                                            &current->name.directoryName,
 1485|      2|                                            SEC_OID_RFC1274_MAIL);
 1486|      2|                    pBuf =
 1487|      2|                        appendStringToBuf(pBuf, rawEmailAddr, &maxLen);
 1488|     25|                } else if (current->type == certRFC822Name) {
  ------------------
  |  Branch (1488:28): [True: 20, False: 5]
  ------------------
 1489|     20|                    pBuf =
 1490|     20|                        appendItemToBuf(pBuf, &current->name.other, &maxLen);
 1491|     20|                }
 1492|     27|                current = CERT_GetNextGeneralName(current);
 1493|     27|            } while (current != nameList);
  ------------------
  |  Branch (1493:22): [True: 10, False: 17]
  ------------------
 1494|     17|        }
 1495|    134|        SECITEM_FreeItem(&subAltName, PR_FALSE);
  ------------------
  |  |  108|    134|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                      SECITEM_FreeItem(&subAltName, PR_FALSE);
  ------------------
  |  |  438|    134|#define PR_FALSE 0
  ------------------
 1496|       |        /* Don't free nameList, it's part of the tmpArena. */
 1497|    134|    }
 1498|       |    /* now copy superstring to cert's arena */
 1499|  5.09k|    finalLen = (pBuf - addrBuf) + 1;
 1500|  5.09k|    pBuf = NULL;
 1501|  5.09k|    if (finalLen > 1) {
  ------------------
  |  Branch (1501:9): [True: 11, False: 5.08k]
  ------------------
 1502|     11|        pBuf = PORT_ArenaAlloc(cert->arena, finalLen);
  ------------------
  |  |   53|     11|#define PORT_ArenaAlloc PORT_ArenaAlloc_Util
  ------------------
 1503|     11|        if (pBuf) {
  ------------------
  |  Branch (1503:13): [True: 11, False: 0]
  ------------------
 1504|     11|            PORT_Memcpy(pBuf, addrBuf, finalLen);
  ------------------
  |  |  180|     11|#define PORT_Memcpy memcpy
  ------------------
 1505|     11|        }
 1506|     11|    }
 1507|  5.09k|loser:
 1508|  5.09k|    PORT_DestroyCheapArena(&tmpArena);
 1509|       |
 1510|  5.09k|    return pBuf;
 1511|  5.09k|}
alg1485.c:escapeAndQuote:
  655|  7.69k|{
  656|  7.69k|    int i, reqLen = 0;
  657|  7.69k|    EQMode mode = pEQMode ? *pEQMode : minimalEscape;
  ------------------
  |  Branch (657:19): [True: 7.69k, False: 0]
  ------------------
  658|       |
  659|  7.69k|    reqLen = cert_RFC1485_GetRequiredLen(src, srclen, &mode);
  660|       |    /* reqLen is max 16384*3 + 2 */
  661|       |    /* space for terminal null */
  662|  7.69k|    if (reqLen < 0 || reqLen + 1 > dstlen) {
  ------------------
  |  Branch (662:9): [True: 0, False: 7.69k]
  |  Branch (662:23): [True: 0, False: 7.69k]
  ------------------
  663|      0|        PORT_SetError(SEC_ERROR_OUTPUT_LEN);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  664|      0|        return SECFailure;
  665|      0|    }
  666|       |
  667|  7.69k|    if (mode == minimalEscapeAndQuote)
  ------------------
  |  Branch (667:9): [True: 469, False: 7.22k]
  ------------------
  668|    469|        *dst++ = C_DOUBLE_QUOTE;
  ------------------
  |  |  117|    469|#define C_DOUBLE_QUOTE '\042'
  ------------------
  669|  45.6k|    for (i = 0; i < srclen; i++) {
  ------------------
  |  Branch (669:17): [True: 37.9k, False: 7.69k]
  ------------------
  670|  37.9k|        char c = src[i];
  671|  37.9k|        if (NEEDS_HEX_ESCAPE(c)) {
  ------------------
  |  |  155|  37.9k|#define NEEDS_HEX_ESCAPE(c) ((PRUint8)c < 0x20 || c == 0x7f)
  |  |  ------------------
  |  |  |  Branch (155:30): [True: 4.79k, False: 33.1k]
  |  |  |  Branch (155:51): [True: 42, False: 33.1k]
  |  |  ------------------
  ------------------
  672|  4.84k|            *dst++ = C_BACKSLASH;
  ------------------
  |  |  119|  4.84k|#define C_BACKSLASH '\134'
  ------------------
  673|  4.84k|            *dst++ = hexChars[(c >> 4) & 0x0f];
  674|  4.84k|            *dst++ = hexChars[c & 0x0f];
  675|  33.1k|        } else {
  676|  33.1k|            if (NEEDS_ESCAPE(c) || (SPECIAL_CHAR(c) && mode == fullEscape)) {
  ------------------
  |  |  153|  66.2k|#define NEEDS_ESCAPE(c) (c == C_DOUBLE_QUOTE || c == C_BACKSLASH)
  |  |  ------------------
  |  |  |  |  117|  66.2k|#define C_DOUBLE_QUOTE '\042'
  |  |  ------------------
  |  |               #define NEEDS_ESCAPE(c) (c == C_DOUBLE_QUOTE || c == C_BACKSLASH)
  |  |  ------------------
  |  |  |  |  119|  66.0k|#define C_BACKSLASH '\134'
  |  |  ------------------
  |  |  |  Branch (153:26): [True: 166, False: 32.9k]
  |  |  |  Branch (153:49): [True: 108, False: 32.8k]
  |  |  ------------------
  ------------------
                          if (NEEDS_ESCAPE(c) || (SPECIAL_CHAR(c) && mode == fullEscape)) {
  ------------------
  |  |  127|  65.6k|    (((c) == ',') || ((c) == '=') || ((c) == C_DOUBLE_QUOTE) ||                \
  |  |  ------------------
  |  |  |  |  117|  32.6k|#define C_DOUBLE_QUOTE '\042'
  |  |  ------------------
  |  |  |  Branch (127:6): [True: 97, False: 32.7k]
  |  |  |  Branch (127:22): [True: 108, False: 32.6k]
  |  |  |  Branch (127:38): [True: 0, False: 32.6k]
  |  |  ------------------
  |  |  128|  32.8k|     ((c) == '\r') || ((c) == '\n') || ((c) == '+') ||                         \
  |  |  ------------------
  |  |  |  Branch (128:6): [True: 0, False: 32.6k]
  |  |  |  Branch (128:23): [True: 0, False: 32.6k]
  |  |  |  Branch (128:40): [True: 130, False: 32.4k]
  |  |  ------------------
  |  |  129|  32.8k|     ((c) == '<') || ((c) == '>') || ((c) == '#') ||                           \
  |  |  ------------------
  |  |  |  Branch (129:6): [True: 75, False: 32.4k]
  |  |  |  Branch (129:22): [True: 81, False: 32.3k]
  |  |  |  Branch (129:38): [True: 162, False: 32.1k]
  |  |  ------------------
  |  |  130|  32.8k|     ((c) == ';') || ((c) == C_BACKSLASH))
  |  |  ------------------
  |  |  |  |  119|  32.0k|#define C_BACKSLASH '\134'
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 98, False: 32.0k]
  |  |  |  Branch (130:22): [True: 0, False: 32.0k]
  |  |  ------------------
  ------------------
  |  Branch (676:56): [True: 0, False: 751]
  ------------------
  677|    274|                *dst++ = C_BACKSLASH;
  ------------------
  |  |  119|    274|#define C_BACKSLASH '\134'
  ------------------
  678|    274|            }
  679|  33.1k|            *dst++ = c;
  680|  33.1k|        }
  681|  37.9k|    }
  682|  7.69k|    if (mode == minimalEscapeAndQuote)
  ------------------
  |  Branch (682:9): [True: 469, False: 7.22k]
  ------------------
  683|    469|        *dst++ = C_DOUBLE_QUOTE;
  ------------------
  |  |  117|    469|#define C_DOUBLE_QUOTE '\042'
  ------------------
  684|  7.69k|    *dst++ = 0;
  685|  7.69k|    if (pEQMode)
  ------------------
  |  Branch (685:9): [True: 7.69k, False: 0]
  ------------------
  686|  7.69k|        *pEQMode = mode;
  687|  7.69k|    return SECSuccess;
  688|  7.69k|}
alg1485.c:cert_RFC1485_GetRequiredLen:
  608|  15.3k|{
  609|  15.3k|    int i, reqLen = 0;
  610|  15.3k|    EQMode mode = pEQMode ? *pEQMode : minimalEscape;
  ------------------
  |  Branch (610:19): [True: 15.3k, False: 0]
  ------------------
  611|  15.3k|    PRBool needsQuoting = PR_FALSE;
  ------------------
  |  |  438|  15.3k|#define PR_FALSE 0
  ------------------
  612|  15.3k|    char lastC = 0;
  613|       |
  614|       |    /* avoids needing to check for overflow */
  615|  15.3k|    if (srclen > 16384) {
  ------------------
  |  Branch (615:9): [True: 0, False: 15.3k]
  ------------------
  616|      0|        return -1;
  617|      0|    }
  618|       |    /* need to make an initial pass to determine if quoting is needed */
  619|  91.6k|    for (i = 0; i < srclen; i++) {
  ------------------
  |  Branch (619:17): [True: 76.2k, False: 15.3k]
  ------------------
  620|  76.2k|        char c = src[i];
  621|  76.2k|        reqLen++;
  622|  76.2k|        if (NEEDS_HEX_ESCAPE(c)) { /* c -> \xx  */
  ------------------
  |  |  155|  76.2k|#define NEEDS_HEX_ESCAPE(c) ((PRUint8)c < 0x20 || c == 0x7f)
  |  |  ------------------
  |  |  |  Branch (155:30): [True: 9.68k, False: 66.5k]
  |  |  |  Branch (155:51): [True: 85, False: 66.4k]
  |  |  ------------------
  ------------------
  623|  9.77k|            reqLen += 2;
  624|  66.4k|        } else if (NEEDS_ESCAPE(c)) { /* c -> \c   */
  ------------------
  |  |  153|  66.4k|#define NEEDS_ESCAPE(c) (c == C_DOUBLE_QUOTE || c == C_BACKSLASH)
  |  |  ------------------
  |  |  |  |  117|   132k|#define C_DOUBLE_QUOTE '\042'
  |  |  ------------------
  |  |               #define NEEDS_ESCAPE(c) (c == C_DOUBLE_QUOTE || c == C_BACKSLASH)
  |  |  ------------------
  |  |  |  |  119|   132k|#define C_BACKSLASH '\134'
  |  |  ------------------
  |  |  |  Branch (153:26): [True: 336, False: 66.1k]
  |  |  |  Branch (153:49): [True: 220, False: 65.9k]
  |  |  ------------------
  ------------------
  625|    556|            reqLen++;
  626|  65.9k|        } else if (SPECIAL_CHAR(c)) {
  ------------------
  |  |  127|  65.9k|    (((c) == ',') || ((c) == '=') || ((c) == C_DOUBLE_QUOTE) ||                \
  |  |  ------------------
  |  |  |  |  117|  65.4k|#define C_DOUBLE_QUOTE '\042'
  |  |  ------------------
  |  |  |  Branch (127:6): [True: 197, False: 65.7k]
  |  |  |  Branch (127:22): [True: 219, False: 65.4k]
  |  |  |  Branch (127:38): [True: 0, False: 65.4k]
  |  |  ------------------
  |  |  128|  65.9k|     ((c) == '\r') || ((c) == '\n') || ((c) == '+') ||                         \
  |  |  ------------------
  |  |  |  Branch (128:6): [True: 0, False: 65.4k]
  |  |  |  Branch (128:23): [True: 0, False: 65.4k]
  |  |  |  Branch (128:40): [True: 274, False: 65.2k]
  |  |  ------------------
  |  |  129|  65.9k|     ((c) == '<') || ((c) == '>') || ((c) == '#') ||                           \
  |  |  ------------------
  |  |  |  Branch (129:6): [True: 154, False: 65.0k]
  |  |  |  Branch (129:22): [True: 168, False: 64.8k]
  |  |  |  Branch (129:38): [True: 334, False: 64.5k]
  |  |  ------------------
  |  |  130|  65.9k|     ((c) == ';') || ((c) == C_BACKSLASH))
  |  |  ------------------
  |  |  |  |  119|  64.3k|#define C_BACKSLASH '\134'
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 199, False: 64.3k]
  |  |  |  Branch (130:22): [True: 0, False: 64.3k]
  |  |  ------------------
  ------------------
  627|  1.54k|            if (mode == minimalEscapeAndQuote) /* quoting is allowed */
  ------------------
  |  Branch (627:17): [True: 1.54k, False: 0]
  ------------------
  628|  1.54k|                needsQuoting = PR_TRUE;        /* entirety will need quoting */
  ------------------
  |  |  437|  1.54k|#define PR_TRUE 1
  ------------------
  629|      0|            else if (mode == fullEscape)
  ------------------
  |  Branch (629:22): [True: 0, False: 0]
  ------------------
  630|      0|                reqLen++; /* MAY escape this character */
  631|  64.3k|        } else if (OPTIONAL_SPACE(c) && OPTIONAL_SPACE(lastC)) {
  ------------------
  |  |  124|   128k|    (((c) == ' ') || ((c) == '\r') || ((c) == '\n'))
  |  |  ------------------
  |  |  |  Branch (124:6): [True: 854, False: 63.5k]
  |  |  |  Branch (124:22): [True: 0, False: 63.5k]
  |  |  |  Branch (124:39): [True: 0, False: 63.5k]
  |  |  ------------------
  ------------------
                      } else if (OPTIONAL_SPACE(c) && OPTIONAL_SPACE(lastC)) {
  ------------------
  |  |  124|    854|    (((c) == ' ') || ((c) == '\r') || ((c) == '\n'))
  |  |  ------------------
  |  |  |  Branch (124:6): [True: 229, False: 625]
  |  |  |  Branch (124:22): [True: 28, False: 597]
  |  |  |  Branch (124:39): [True: 17, False: 580]
  |  |  ------------------
  ------------------
  632|    274|            if (mode == minimalEscapeAndQuote) /* quoting is allowed */
  ------------------
  |  Branch (632:17): [True: 274, False: 0]
  ------------------
  633|    274|                needsQuoting = PR_TRUE;        /* entirety will need quoting */
  ------------------
  |  |  437|    274|#define PR_TRUE 1
  ------------------
  634|    274|        }
  635|  76.2k|        lastC = c;
  636|  76.2k|    }
  637|       |    /* if it begins or ends in optional space it needs quoting */
  638|  15.3k|    if (!needsQuoting && srclen > 0 && mode == minimalEscapeAndQuote &&
  ------------------
  |  Branch (638:9): [True: 14.6k, False: 754]
  |  Branch (638:26): [True: 14.5k, False: 76]
  |  Branch (638:40): [True: 7.39k, False: 7.16k]
  ------------------
  639|  15.3k|        (OPTIONAL_SPACE(src[srclen - 1]) || OPTIONAL_SPACE(src[0]))) {
  ------------------
  |  |  124|  14.7k|    (((c) == ' ') || ((c) == '\r') || ((c) == '\n'))
  |  |  ------------------
  |  |  |  Branch (124:6): [True: 46, False: 7.34k]
  |  |  |  Branch (124:22): [True: 18, False: 7.32k]
  |  |  |  Branch (124:39): [True: 14, False: 7.31k]
  |  |  ------------------
  ------------------
                      (OPTIONAL_SPACE(src[srclen - 1]) || OPTIONAL_SPACE(src[0]))) {
  ------------------
  |  |  124|  7.31k|    (((c) == ' ') || ((c) == '\r') || ((c) == '\n'))
  |  |  ------------------
  |  |  |  Branch (124:6): [True: 61, False: 7.25k]
  |  |  |  Branch (124:22): [True: 54, False: 7.20k]
  |  |  |  Branch (124:39): [True: 14, False: 7.18k]
  |  |  ------------------
  ------------------
  640|    207|        needsQuoting = PR_TRUE;
  ------------------
  |  |  437|    207|#define PR_TRUE 1
  ------------------
  641|    207|    }
  642|       |
  643|  15.3k|    if (needsQuoting)
  ------------------
  |  Branch (643:9): [True: 961, False: 14.4k]
  ------------------
  644|    961|        reqLen += 2;
  645|  15.3k|    if (pEQMode && mode == minimalEscapeAndQuote && !needsQuoting)
  ------------------
  |  Branch (645:9): [True: 15.3k, False: 0]
  |  Branch (645:20): [True: 8.18k, False: 7.20k]
  |  Branch (645:53): [True: 7.22k, False: 961]
  ------------------
  646|  7.22k|        *pEQMode = minimalEscape;
  647|       |    /* Maximum output size would be 3*srclen+2 */
  648|  15.3k|    return reqLen;
  649|  15.3k|}
alg1485.c:AppendStr:
  554|  10.5k|{
  555|  10.5k|    char* buf;
  556|  10.5k|    unsigned bufLen, bufSize, len;
  557|  10.5k|    int size = 0;
  558|       |
  559|       |    /* Figure out how much to grow buf by (add in the '\0') */
  560|  10.5k|    buf = bufp->buffer;
  561|  10.5k|    bufLen = bufp->offset;
  562|  10.5k|    len = PORT_Strlen(str);
  ------------------
  |  |  190|  10.5k|#define PORT_Strlen(s) strlen(s)
  ------------------
  563|  10.5k|    bufSize = bufLen + len;
  564|  10.5k|    if (!buf) {
  ------------------
  |  Branch (564:9): [True: 10.1k, False: 379]
  ------------------
  565|  10.1k|        bufSize++;
  566|  10.1k|        size = PR_MAX(DEFAULT_BUFFER_SIZE, bufSize * 2);
  ------------------
  |  |  159|  10.1k|#define PR_MAX(x,y)     ((x)>(y)?(x):(y))
  |  |  ------------------
  |  |  |  Branch (159:26): [True: 10.1k, False: 0]
  |  |  ------------------
  ------------------
  567|  10.1k|        buf = (char*)PORT_Alloc(size);
  ------------------
  |  |   52|  10.1k|#define PORT_Alloc PORT_Alloc_Util
  ------------------
  568|  10.1k|        bufp->size = size;
  569|  10.1k|    } else if (bufp->size < bufSize) {
  ------------------
  |  Branch (569:16): [True: 0, False: 379]
  ------------------
  570|      0|        size = bufSize * 2;
  571|      0|        buf = (char*)PORT_Realloc(buf, size);
  ------------------
  |  |   64|      0|#define PORT_Realloc PORT_Realloc_Util
  ------------------
  572|      0|        bufp->size = size;
  573|      0|    }
  574|  10.5k|    if (!buf) {
  ------------------
  |  Branch (574:9): [True: 0, False: 10.5k]
  ------------------
  575|      0|        PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  576|      0|        return SECFailure;
  577|      0|    }
  578|  10.5k|    bufp->buffer = buf;
  579|  10.5k|    bufp->offset = bufSize;
  580|       |
  581|       |    /* Concatenate str onto buf */
  582|  10.5k|    buf = buf + bufLen;
  583|  10.5k|    if (bufLen)
  ------------------
  |  Branch (583:9): [True: 379, False: 10.1k]
  ------------------
  584|    379|        buf--;                      /* stomp on old '\0' */
  585|  10.5k|    PORT_Memcpy(buf, str, len + 1); /* put in new null */
  ------------------
  |  |  180|  10.5k|#define PORT_Memcpy memcpy
  ------------------
  586|  10.5k|    return SECSuccess;
  587|  10.5k|}
alg1485.c:AppendAVA:
  921|  10.3k|{
  922|  10.3k|#define TMPBUF_LEN 2048
  923|  10.3k|    const NameToKind* pn2k = name2kinds;
  924|  10.3k|    SECItem* avaValue = NULL;
  925|  10.3k|    char* unknownTag = NULL;
  926|  10.3k|    char* encodedAVA = NULL;
  927|  10.3k|    PRBool useHex = PR_FALSE; /* use =#hexXXXX form */
  ------------------
  |  |  438|  10.3k|#define PR_FALSE 0
  ------------------
  928|  10.3k|    PRBool truncateName = PR_FALSE;
  ------------------
  |  |  438|  10.3k|#define PR_FALSE 0
  ------------------
  929|  10.3k|    PRBool truncateValue = PR_FALSE;
  ------------------
  |  |  438|  10.3k|#define PR_FALSE 0
  ------------------
  930|  10.3k|    SECOidTag endKind;
  931|  10.3k|    SECStatus rv;
  932|  10.3k|    unsigned int len;
  933|  10.3k|    unsigned int nameLen, valueLen;
  934|  10.3k|    unsigned int maxName, maxValue;
  935|  10.3k|    EQMode mode = minimalEscapeAndQuote;
  936|  10.3k|    NameToKind n2k = { NULL, 32767, SEC_OID_UNKNOWN, SEC_ASN1_DS };
  ------------------
  |  |   24|  10.3k|#define SEC_ASN1_DS SEC_ASN1_HIGH_TAG_NUMBER
  |  |  ------------------
  |  |  |  |  107|  10.3k|#define SEC_ASN1_HIGH_TAG_NUMBER 0x1f
  |  |  ------------------
  ------------------
  937|  10.3k|    char tmpBuf[TMPBUF_LEN];
  938|       |
  939|  10.3k|#define tagName n2k.name /* non-NULL means use NAME= form */
  940|  10.3k|#define maxBytes n2k.maxLen
  941|  10.3k|#define tag n2k.kind
  942|  10.3k|#define vt n2k.valueType
  943|       |
  944|       |    /* READABLE mode recognizes more names from the name2kinds table
  945|       |     * than do STRICT or INVERTIBLE modes.  This assignment chooses the
  946|       |     * point in the table where the attribute type name scanning stops.
  947|       |     */
  948|  10.3k|    endKind = (strict == CERT_N2A_READABLE) ? SEC_OID_UNKNOWN
  ------------------
  |  Branch (948:15): [True: 10.3k, False: 0]
  ------------------
  949|  10.3k|                                            : SEC_OID_AVA_POSTAL_ADDRESS;
  950|  10.3k|    tag = CERT_GetAVATag(ava);
  ------------------
  |  |  941|  10.3k|#define tag n2k.kind
  ------------------
  951|   204k|    while (pn2k->kind != tag && pn2k->kind != endKind) {
  ------------------
  |  |  941|   408k|#define tag n2k.kind
  ------------------
  |  Branch (951:12): [True: 200k, False: 3.55k]
  |  Branch (951:33): [True: 193k, False: 6.81k]
  ------------------
  952|   193k|        ++pn2k;
  953|   193k|    }
  954|       |
  955|  10.3k|    if (pn2k->kind != endKind) {
  ------------------
  |  Branch (955:9): [True: 3.55k, False: 6.81k]
  ------------------
  956|  3.55k|        n2k = *pn2k;
  957|  6.81k|    } else if (strict != CERT_N2A_READABLE) {
  ------------------
  |  Branch (957:16): [True: 0, False: 6.81k]
  ------------------
  958|      0|        useHex = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  959|      0|    }
  960|       |    /* For invertable form, force Directory Strings to use hex form. */
  961|  10.3k|    if (strict == CERT_N2A_INVERTIBLE && vt == SEC_ASN1_DS) {
  ------------------
  |  |  942|      0|#define vt n2k.valueType
  ------------------
                  if (strict == CERT_N2A_INVERTIBLE && vt == SEC_ASN1_DS) {
  ------------------
  |  |   24|      0|#define SEC_ASN1_DS SEC_ASN1_HIGH_TAG_NUMBER
  |  |  ------------------
  |  |  |  |  107|      0|#define SEC_ASN1_HIGH_TAG_NUMBER 0x1f
  |  |  ------------------
  ------------------
  |  Branch (961:9): [True: 0, False: 10.3k]
  |  Branch (961:42): [True: 0, False: 0]
  ------------------
  962|      0|        tagName = NULL;   /* must use OID.N form */
  ------------------
  |  |  939|      0|#define tagName n2k.name /* non-NULL means use NAME= form */
  ------------------
  963|      0|        useHex = PR_TRUE; /* must use hex string */
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  964|      0|    }
  965|  10.3k|    if (!useHex) {
  ------------------
  |  Branch (965:9): [True: 10.3k, False: 0]
  ------------------
  966|  10.3k|        avaValue = CERT_DecodeAVAValue(&ava->value);
  967|  10.3k|        if (!avaValue) {
  ------------------
  |  Branch (967:13): [True: 2.67k, False: 7.69k]
  ------------------
  968|  2.67k|            useHex = PR_TRUE;
  ------------------
  |  |  437|  2.67k|#define PR_TRUE 1
  ------------------
  969|  2.67k|            if (strict != CERT_N2A_READABLE) {
  ------------------
  |  Branch (969:17): [True: 0, False: 2.67k]
  ------------------
  970|      0|                tagName = NULL; /* must use OID.N form */
  ------------------
  |  |  939|      0|#define tagName n2k.name /* non-NULL means use NAME= form */
  ------------------
  971|      0|            }
  972|  2.67k|        }
  973|  10.3k|    }
  974|  10.3k|    if (!tagName) {
  ------------------
  |  |  939|  10.3k|#define tagName n2k.name /* non-NULL means use NAME= form */
  ------------------
  |  Branch (974:9): [True: 6.81k, False: 3.55k]
  ------------------
  975|       |        /* handle unknown attribute types per RFC 2253 */
  976|  6.81k|        tagName = unknownTag = CERT_GetOidString(&ava->type);
  ------------------
  |  |  939|  6.81k|#define tagName n2k.name /* non-NULL means use NAME= form */
  ------------------
  977|  6.81k|        if (!tagName) {
  ------------------
  |  |  939|  6.81k|#define tagName n2k.name /* non-NULL means use NAME= form */
  ------------------
  |  Branch (977:13): [True: 43, False: 6.77k]
  ------------------
  978|     43|            if (avaValue)
  ------------------
  |  Branch (978:17): [True: 5, False: 38]
  ------------------
  979|      5|                SECITEM_FreeItem(avaValue, PR_TRUE);
  ------------------
  |  |  108|      5|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                              SECITEM_FreeItem(avaValue, PR_TRUE);
  ------------------
  |  |  437|      5|#define PR_TRUE 1
  ------------------
  980|     43|            return SECFailure;
  981|     43|        }
  982|  6.81k|    }
  983|  10.3k|    if (useHex) {
  ------------------
  |  Branch (983:9): [True: 2.63k, False: 7.69k]
  ------------------
  984|  2.63k|        avaValue = get_hex_string(&ava->value);
  985|  2.63k|        if (!avaValue) {
  ------------------
  |  Branch (985:13): [True: 0, False: 2.63k]
  ------------------
  986|      0|            if (unknownTag)
  ------------------
  |  Branch (986:17): [True: 0, False: 0]
  ------------------
  987|      0|                PR_smprintf_free(unknownTag);
  988|      0|            return SECFailure;
  989|      0|        }
  990|  2.63k|    }
  991|       |
  992|  10.3k|    nameLen = strlen(tagName);
  ------------------
  |  |  939|  10.3k|#define tagName n2k.name /* non-NULL means use NAME= form */
  ------------------
  993|       |
  994|  10.3k|    if (useHex) {
  ------------------
  |  Branch (994:9): [True: 2.63k, False: 7.69k]
  ------------------
  995|  2.63k|        valueLen = avaValue->len;
  996|  7.69k|    } else {
  997|  7.69k|        int reqLen = cert_RFC1485_GetRequiredLen((char*)avaValue->data, avaValue->len, &mode);
  998|  7.69k|        if (reqLen < 0) {
  ------------------
  |  Branch (998:13): [True: 0, False: 7.69k]
  ------------------
  999|      0|            SECITEM_FreeItem(avaValue, PR_TRUE);
  ------------------
  |  |  108|      0|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                          SECITEM_FreeItem(avaValue, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 1000|      0|            return SECFailure;
 1001|      0|        }
 1002|  7.69k|        valueLen = reqLen;
 1003|  7.69k|    }
 1004|  10.3k|    if (UINT_MAX - nameLen < 2 ||
  ------------------
  |  Branch (1004:9): [True: 0, False: 10.3k]
  ------------------
 1005|  10.3k|        valueLen > UINT_MAX - nameLen - 2) {
  ------------------
  |  Branch (1005:9): [True: 0, False: 10.3k]
  ------------------
 1006|      0|        SECITEM_FreeItem(avaValue, PR_TRUE);
  ------------------
  |  |  108|      0|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                      SECITEM_FreeItem(avaValue, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 1007|      0|        return SECFailure;
 1008|      0|    }
 1009|  10.3k|    len = nameLen + valueLen + 2; /* Add 2 for '=' and trailing NUL */
 1010|       |
 1011|  10.3k|    maxName = nameLen;
 1012|  10.3k|    maxValue = valueLen;
 1013|  10.3k|    if (len <= sizeof(tmpBuf)) {
  ------------------
  |  Branch (1013:9): [True: 10.3k, False: 0]
  ------------------
 1014|  10.3k|        encodedAVA = tmpBuf;
 1015|  10.3k|    } else if (strict != CERT_N2A_READABLE) {
  ------------------
  |  Branch (1015:16): [True: 0, False: 0]
  ------------------
 1016|      0|        encodedAVA = PORT_Alloc(len);
  ------------------
  |  |   52|      0|#define PORT_Alloc PORT_Alloc_Util
  ------------------
 1017|      0|        if (!encodedAVA) {
  ------------------
  |  Branch (1017:13): [True: 0, False: 0]
  ------------------
 1018|      0|            SECITEM_FreeItem(avaValue, PR_TRUE);
  ------------------
  |  |  108|      0|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                          SECITEM_FreeItem(avaValue, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 1019|      0|            if (unknownTag)
  ------------------
  |  Branch (1019:17): [True: 0, False: 0]
  ------------------
 1020|      0|                PR_smprintf_free(unknownTag);
 1021|      0|            return SECFailure;
 1022|      0|        }
 1023|      0|    } else {
 1024|       |        /* Must make output fit in tmpbuf */
 1025|      0|        unsigned int fair = (sizeof tmpBuf) / 2 - 1; /* for = and \0 */
 1026|       |
 1027|      0|        if (nameLen < fair) {
  ------------------
  |  Branch (1027:13): [True: 0, False: 0]
  ------------------
 1028|       |            /* just truncate the value */
 1029|      0|            maxValue = (sizeof tmpBuf) - (nameLen + 6); /* for "=...\0",
 1030|       |                                                     and possibly '"' */
 1031|      0|        } else if (valueLen < fair) {
  ------------------
  |  Branch (1031:20): [True: 0, False: 0]
  ------------------
 1032|       |            /* just truncate the name */
 1033|      0|            maxName = (sizeof tmpBuf) - (valueLen + 5); /* for "=...\0" */
 1034|      0|        } else {
 1035|       |            /* truncate both */
 1036|      0|            maxName = maxValue = fair - 3; /* for "..." */
 1037|      0|        }
 1038|      0|        if (nameLen > maxName) {
  ------------------
  |  Branch (1038:13): [True: 0, False: 0]
  ------------------
 1039|      0|            PORT_Assert(unknownTag && unknownTag == tagName);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1040|      0|            truncateName = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 1041|      0|            nameLen = maxName;
 1042|      0|        }
 1043|      0|        encodedAVA = tmpBuf;
 1044|      0|    }
 1045|       |
 1046|  10.3k|    memcpy(encodedAVA, tagName, nameLen);
  ------------------
  |  |  939|  10.3k|#define tagName n2k.name /* non-NULL means use NAME= form */
  ------------------
 1047|  10.3k|    if (truncateName) {
  ------------------
  |  Branch (1047:9): [True: 0, False: 10.3k]
  ------------------
 1048|       |        /* If tag name is too long, we know it is an OID form that was
 1049|       |         * allocated from the heap, so we can modify it in place
 1050|       |         */
 1051|      0|        encodedAVA[nameLen - 1] = '.';
 1052|      0|        encodedAVA[nameLen - 2] = '.';
 1053|      0|        encodedAVA[nameLen - 3] = '.';
 1054|      0|    }
 1055|  10.3k|    encodedAVA[nameLen++] = '=';
 1056|  10.3k|    if (unknownTag)
  ------------------
  |  Branch (1056:9): [True: 6.77k, False: 3.55k]
  ------------------
 1057|  6.77k|        PR_smprintf_free(unknownTag);
 1058|       |
 1059|  10.3k|    if (strict == CERT_N2A_READABLE && maxValue > maxBytes)
  ------------------
  |  |  940|  10.3k|#define maxBytes n2k.maxLen
  ------------------
  |  Branch (1059:9): [True: 10.3k, False: 0]
  |  Branch (1059:40): [True: 85, False: 10.2k]
  ------------------
 1060|     85|        maxValue = maxBytes;
  ------------------
  |  |  940|     85|#define maxBytes n2k.maxLen
  ------------------
 1061|  10.3k|    if (valueLen > maxValue) {
  ------------------
  |  Branch (1061:9): [True: 85, False: 10.2k]
  ------------------
 1062|     85|        valueLen = maxValue;
 1063|     85|        truncateValue = PR_TRUE;
  ------------------
  |  |  437|     85|#define PR_TRUE 1
  ------------------
 1064|     85|    }
 1065|       |    /* escape and quote as necessary - don't quote hex strings */
 1066|  10.3k|    if (useHex) {
  ------------------
  |  Branch (1066:9): [True: 2.63k, False: 7.69k]
  ------------------
 1067|  2.63k|        char* end = encodedAVA + nameLen + valueLen;
 1068|  2.63k|        memcpy(encodedAVA + nameLen, (char*)avaValue->data, valueLen);
 1069|  2.63k|        end[0] = '\0';
 1070|  2.63k|        if (truncateValue) {
  ------------------
  |  Branch (1070:13): [True: 26, False: 2.61k]
  ------------------
 1071|     26|            end[-1] = '.';
 1072|     26|            end[-2] = '.';
 1073|     26|            end[-3] = '.';
 1074|     26|        }
 1075|  2.63k|        rv = SECSuccess;
 1076|  7.69k|    } else if (!truncateValue) {
  ------------------
  |  Branch (1076:16): [True: 7.63k, False: 59]
  ------------------
 1077|  7.63k|        rv = escapeAndQuote(encodedAVA + nameLen, len - nameLen,
 1078|  7.63k|                            (char*)avaValue->data, avaValue->len, &mode);
 1079|  7.63k|    } else {
 1080|       |        /* must truncate the escaped and quoted value */
 1081|     59|        char bigTmpBuf[TMPBUF_LEN * 3 + 3];
 1082|     59|        PORT_Assert(valueLen < sizeof tmpBuf);
  ------------------
  |  |  120|     59|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|     59|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 59, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1083|     59|        rv = escapeAndQuote(bigTmpBuf, sizeof bigTmpBuf, (char*)avaValue->data,
 1084|     59|                            PR_MIN(avaValue->len, valueLen), &mode);
  ------------------
  |  |  158|     59|#define PR_MIN(x,y)     ((x)<(y)?(x):(y))
  |  |  ------------------
  |  |  |  Branch (158:26): [True: 0, False: 59]
  |  |  ------------------
  ------------------
 1085|       |
 1086|     59|        bigTmpBuf[valueLen--] = '\0'; /* hard stop here */
 1087|       |        /* See if we're in the middle of a multi-byte UTF8 character */
 1088|     68|        while (((bigTmpBuf[valueLen] & 0xc0) == 0x80) && valueLen > 0) {
  ------------------
  |  Branch (1088:16): [True: 14, False: 54]
  |  Branch (1088:58): [True: 9, False: 5]
  ------------------
 1089|      9|            bigTmpBuf[valueLen--] = '\0';
 1090|      9|        }
 1091|       |        /* add ellipsis to signify truncation. */
 1092|     59|        bigTmpBuf[++valueLen] = '.';
 1093|     59|        bigTmpBuf[++valueLen] = '.';
 1094|     59|        bigTmpBuf[++valueLen] = '.';
 1095|     59|        if (bigTmpBuf[0] == '"')
  ------------------
  |  Branch (1095:13): [True: 25, False: 34]
  ------------------
 1096|     25|            bigTmpBuf[++valueLen] = '"';
 1097|     59|        bigTmpBuf[++valueLen] = '\0';
 1098|     59|        PORT_Assert(nameLen + valueLen <= (sizeof tmpBuf) - 1);
  ------------------
  |  |  120|     59|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|     59|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 59, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1099|     59|        memcpy(encodedAVA + nameLen, bigTmpBuf, valueLen + 1);
 1100|     59|    }
 1101|       |
 1102|  10.3k|    SECITEM_FreeItem(avaValue, PR_TRUE);
  ------------------
  |  |  108|  10.3k|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                  SECITEM_FreeItem(avaValue, PR_TRUE);
  ------------------
  |  |  437|  10.3k|#define PR_TRUE 1
  ------------------
 1103|  10.3k|    if (rv == SECSuccess)
  ------------------
  |  Branch (1103:9): [True: 10.3k, False: 0]
  ------------------
 1104|  10.3k|        rv = AppendStr(bufp, encodedAVA);
 1105|  10.3k|    if (encodedAVA != tmpBuf)
  ------------------
  |  Branch (1105:9): [True: 0, False: 10.3k]
  ------------------
 1106|      0|        PORT_Free(encodedAVA);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 1107|  10.3k|    return rv;
 1108|  10.3k|}
alg1485.c:get_hex_string:
  842|  2.63k|{
  843|  2.63k|    SECItem* rv;
  844|  2.63k|    unsigned int i, j;
  845|  2.63k|    static const char hex[] = { "0123456789ABCDEF" };
  846|       |
  847|       |    /* '#' + 2 chars per octet + terminator */
  848|  2.63k|    rv = SECITEM_AllocItem(NULL, NULL, data->len * 2 + 2);
  ------------------
  |  |  103|  2.63k|#define SECITEM_AllocItem SECITEM_AllocItem_Util
  ------------------
  849|  2.63k|    if (!rv) {
  ------------------
  |  Branch (849:9): [True: 0, False: 2.63k]
  ------------------
  850|      0|        return NULL;
  851|      0|    }
  852|  2.63k|    rv->data[0] = '#';
  853|  2.63k|    rv->len = 1 + 2 * data->len;
  854|  17.9k|    for (i = 0; i < data->len; i++) {
  ------------------
  |  Branch (854:17): [True: 15.3k, False: 2.63k]
  ------------------
  855|  15.3k|        j = data->data[i];
  856|  15.3k|        rv->data[2 * i + 1] = hex[j >> 4];
  857|  15.3k|        rv->data[2 * i + 2] = hex[j & 15];
  858|  15.3k|    }
  859|  2.63k|    rv->data[rv->len] = 0;
  860|  2.63k|    return rv;
  861|  2.63k|}
alg1485.c:CERT_GetNameElement:
 1252|  10.1k|{
 1253|  10.1k|    CERTRDN** rdns = name->rdns;
 1254|  10.1k|    CERTRDN* rdn;
 1255|  10.1k|    CERTAVA* ava = NULL;
 1256|       |
 1257|  20.6k|    while (rdns && (rdn = *rdns++) != 0) {
  ------------------
  |  Branch (1257:12): [True: 20.6k, False: 0]
  |  Branch (1257:20): [True: 10.4k, False: 10.1k]
  ------------------
 1258|  10.4k|        CERTAVA** avas = rdn->avas;
 1259|  20.8k|        while (avas && (ava = *avas++) != 0) {
  ------------------
  |  Branch (1259:16): [True: 20.8k, False: 0]
  |  Branch (1259:24): [True: 10.4k, False: 10.4k]
  ------------------
 1260|  10.4k|            int tag = CERT_GetAVATag(ava);
 1261|  10.4k|            if (tag == wantedTag) {
  ------------------
  |  Branch (1261:17): [True: 0, False: 10.4k]
  ------------------
 1262|      0|                avas = NULL;
 1263|      0|                rdns = NULL; /* break out of all loops */
 1264|      0|            }
 1265|  10.4k|        }
 1266|  10.4k|    }
 1267|  10.1k|    return ava ? avaToString(arena, ava) : NULL;
  ------------------
  |  Branch (1267:12): [True: 0, False: 10.1k]
  ------------------
 1268|  10.1k|}
alg1485.c:appendStringToBuf:
 1381|  10.1k|{
 1382|  10.1k|    PRUint32 len;
 1383|  10.1k|    if (dest && src && src[0] && *pRemaining > (len = PL_strlen(src))) {
  ------------------
  |  Branch (1383:9): [True: 10.1k, False: 0]
  |  Branch (1383:17): [True: 0, False: 10.1k]
  |  Branch (1383:24): [True: 0, False: 0]
  |  Branch (1383:34): [True: 0, False: 0]
  ------------------
 1384|      0|        PRUint32 i;
 1385|      0|        for (i = 0; i < len; ++i)
  ------------------
  |  Branch (1385:21): [True: 0, False: 0]
  ------------------
 1386|      0|            dest[i] = tolower((unsigned char)src[i]);
 1387|      0|        dest[len] = 0;
 1388|      0|        dest += len + 1;
 1389|      0|        *pRemaining -= len + 1;
 1390|      0|    }
 1391|  10.1k|    return dest;
 1392|  10.1k|}
alg1485.c:appendItemToBuf:
 1399|     20|{
 1400|     20|    if (dest && src && src->data && src->len && src->data[0]) {
  ------------------
  |  Branch (1400:9): [True: 20, False: 0]
  |  Branch (1400:17): [True: 20, False: 0]
  |  Branch (1400:24): [True: 12, False: 8]
  |  Branch (1400:37): [True: 12, False: 0]
  |  Branch (1400:49): [True: 11, False: 1]
  ------------------
 1401|     11|        PRUint32 len = src->len;
 1402|     11|        PRUint32 i;
 1403|     11|        PRUint32 reqLen = len + 1;
 1404|       |        /* are there any embedded control characters ? */
 1405|    158|        for (i = 0; i < len; i++) {
  ------------------
  |  Branch (1405:21): [True: 147, False: 11]
  ------------------
 1406|    147|            if (NEEDS_HEX_ESCAPE(src->data[i]))
  ------------------
  |  | 1395|    147|#define NEEDS_HEX_ESCAPE(c) (c < 0x20)
  |  |  ------------------
  |  |  |  Branch (1395:29): [True: 73, False: 74]
  |  |  ------------------
  ------------------
 1407|     73|                reqLen += 2;
 1408|    147|        }
 1409|     11|        if (*pRemaining > reqLen) {
  ------------------
  |  Branch (1409:13): [True: 11, False: 0]
  ------------------
 1410|    158|            for (i = 0; i < len; ++i) {
  ------------------
  |  Branch (1410:25): [True: 147, False: 11]
  ------------------
 1411|    147|                PRUint8 c = src->data[i];
 1412|    147|                if (NEEDS_HEX_ESCAPE(c)) {
  ------------------
  |  | 1395|    147|#define NEEDS_HEX_ESCAPE(c) (c < 0x20)
  |  |  ------------------
  |  |  |  Branch (1395:29): [True: 73, False: 74]
  |  |  ------------------
  ------------------
 1413|     73|                    *dest++ =
 1414|     73|                        C_BACKSLASH;
  ------------------
  |  |  119|     73|#define C_BACKSLASH '\134'
  ------------------
 1415|     73|                    *dest++ =
 1416|     73|                        hexChars[(c >> 4) & 0x0f];
 1417|     73|                    *dest++ =
 1418|     73|                        hexChars[c & 0x0f];
 1419|     74|                } else {
 1420|     74|                    *dest++ =
 1421|     74|                        tolower(c);
 1422|     74|                }
 1423|    147|            }
 1424|     11|            *dest++ = '\0';
 1425|     11|            *pRemaining -= reqLen;
 1426|     11|        }
 1427|     11|    }
 1428|     20|    return dest;
 1429|     20|}

CERT_KeyFromIssuerAndSN:
  184|  5.09k|{
  185|  5.09k|    key->len = sn->len + issuer->len;
  186|       |
  187|  5.09k|    if ((sn->data == NULL) || (issuer->data == NULL)) {
  ------------------
  |  Branch (187:9): [True: 0, False: 5.09k]
  |  Branch (187:31): [True: 0, False: 5.09k]
  ------------------
  188|      0|        goto loser;
  189|      0|    }
  190|       |
  191|  5.09k|    key->data = (unsigned char *)PORT_ArenaAlloc(arena, key->len);
  ------------------
  |  |   53|  5.09k|#define PORT_ArenaAlloc PORT_ArenaAlloc_Util
  ------------------
  192|  5.09k|    if (!key->data) {
  ------------------
  |  Branch (192:9): [True: 0, False: 5.09k]
  ------------------
  193|      0|        goto loser;
  194|      0|    }
  195|       |
  196|       |    /* copy the serialNumber */
  197|  5.09k|    PORT_Memcpy(key->data, sn->data, sn->len);
  ------------------
  |  |  180|  5.09k|#define PORT_Memcpy memcpy
  ------------------
  198|       |
  199|       |    /* copy the issuer */
  200|  5.09k|    PORT_Memcpy(&key->data[sn->len], issuer->data, issuer->len);
  ------------------
  |  |  180|  5.09k|#define PORT_Memcpy memcpy
  ------------------
  201|       |
  202|  5.09k|    return (SECSuccess);
  203|       |
  204|      0|loser:
  205|      0|    return (SECFailure);
  206|  5.09k|}
CERT_IssuerNameFromDERCert:
  258|  10.6k|{
  259|  10.6k|    int rv;
  260|  10.6k|    PORTCheapArenaPool tmpArena;
  261|  10.6k|    CERTSignedData sd;
  262|  10.6k|    void *tmpptr;
  263|       |
  264|  10.6k|    PORT_InitCheapArena(&tmpArena, DER_DEFAULT_CHUNKSIZE);
  ------------------
  |  |   60|  10.6k|#define DER_DEFAULT_CHUNKSIZE (2048)
  ------------------
  265|       |
  266|  10.6k|    PORT_Memset(&sd, 0, sizeof(CERTSignedData));
  ------------------
  |  |  182|  10.6k|#define PORT_Memset memset
  ------------------
  267|  10.6k|    rv = SEC_QuickDERDecodeItem(&tmpArena.arena, &sd, CERT_SignedDataTemplate,
  ------------------
  |  |  102|  10.6k|#define SEC_QuickDERDecodeItem SEC_QuickDERDecodeItem_Util
  ------------------
  268|  10.6k|                                derCert);
  269|  10.6k|    if (rv) {
  ------------------
  |  Branch (269:9): [True: 340, False: 10.2k]
  ------------------
  270|    340|        goto loser;
  271|    340|    }
  272|       |
  273|  10.2k|    PORT_Memset(derName, 0, sizeof(SECItem));
  ------------------
  |  |  182|  10.2k|#define PORT_Memset memset
  ------------------
  274|  10.2k|    rv = SEC_QuickDERDecodeItem(&tmpArena.arena, derName,
  ------------------
  |  |  102|  10.2k|#define SEC_QuickDERDecodeItem SEC_QuickDERDecodeItem_Util
  ------------------
  275|  10.2k|                                SEC_CertIssuerTemplate, &sd.data);
  276|  10.2k|    if (rv) {
  ------------------
  |  Branch (276:9): [True: 8, False: 10.2k]
  ------------------
  277|      8|        goto loser;
  278|      8|    }
  279|       |
  280|  10.2k|    tmpptr = derName->data;
  281|  10.2k|    derName->data = (unsigned char *)PORT_Alloc(derName->len);
  ------------------
  |  |   52|  10.2k|#define PORT_Alloc PORT_Alloc_Util
  ------------------
  282|  10.2k|    if (derName->data == NULL) {
  ------------------
  |  Branch (282:9): [True: 0, False: 10.2k]
  ------------------
  283|      0|        goto loser;
  284|      0|    }
  285|       |
  286|  10.2k|    PORT_Memcpy(derName->data, tmpptr, derName->len);
  ------------------
  |  |  180|  10.2k|#define PORT_Memcpy memcpy
  ------------------
  287|       |
  288|  10.2k|    PORT_DestroyCheapArena(&tmpArena);
  289|  10.2k|    return (SECSuccess);
  290|       |
  291|    348|loser:
  292|    348|    PORT_DestroyCheapArena(&tmpArena);
  293|    348|    return (SECFailure);
  294|  10.2k|}
CERT_SerialNumberFromDERCert:
  298|  15.3k|{
  299|  15.3k|    int rv;
  300|  15.3k|    PORTCheapArenaPool tmpArena;
  301|  15.3k|    CERTSignedData sd;
  302|  15.3k|    void *tmpptr;
  303|       |
  304|  15.3k|    PORT_InitCheapArena(&tmpArena, DER_DEFAULT_CHUNKSIZE);
  ------------------
  |  |   60|  15.3k|#define DER_DEFAULT_CHUNKSIZE (2048)
  ------------------
  305|       |
  306|  15.3k|    PORT_Memset(&sd, 0, sizeof(CERTSignedData));
  ------------------
  |  |  182|  15.3k|#define PORT_Memset memset
  ------------------
  307|  15.3k|    rv = SEC_QuickDERDecodeItem(&tmpArena.arena, &sd, CERT_SignedDataTemplate,
  ------------------
  |  |  102|  15.3k|#define SEC_QuickDERDecodeItem SEC_QuickDERDecodeItem_Util
  ------------------
  308|  15.3k|                                derCert);
  309|  15.3k|    if (rv) {
  ------------------
  |  Branch (309:9): [True: 0, False: 15.3k]
  ------------------
  310|      0|        goto loser;
  311|      0|    }
  312|       |
  313|  15.3k|    PORT_Memset(derName, 0, sizeof(SECItem));
  ------------------
  |  |  182|  15.3k|#define PORT_Memset memset
  ------------------
  314|  15.3k|    rv = SEC_QuickDERDecodeItem(&tmpArena.arena, derName,
  ------------------
  |  |  102|  15.3k|#define SEC_QuickDERDecodeItem SEC_QuickDERDecodeItem_Util
  ------------------
  315|  15.3k|                                SEC_CertSerialNumberTemplate, &sd.data);
  316|  15.3k|    if (rv) {
  ------------------
  |  Branch (316:9): [True: 0, False: 15.3k]
  ------------------
  317|      0|        goto loser;
  318|      0|    }
  319|       |
  320|  15.3k|    tmpptr = derName->data;
  321|  15.3k|    derName->data = (unsigned char *)PORT_Alloc(derName->len);
  ------------------
  |  |   52|  15.3k|#define PORT_Alloc PORT_Alloc_Util
  ------------------
  322|  15.3k|    if (derName->data == NULL) {
  ------------------
  |  Branch (322:9): [True: 0, False: 15.3k]
  ------------------
  323|      0|        goto loser;
  324|      0|    }
  325|       |
  326|  15.3k|    PORT_Memcpy(derName->data, tmpptr, derName->len);
  ------------------
  |  |  180|  15.3k|#define PORT_Memcpy memcpy
  ------------------
  327|       |
  328|  15.3k|    PORT_DestroyCheapArena(&tmpArena);
  329|  15.3k|    return (SECSuccess);
  330|       |
  331|      0|loser:
  332|      0|    PORT_DestroyCheapArena(&tmpArena);
  333|      0|    return (SECFailure);
  334|  15.3k|}
cert_GetCertType:
  434|  5.09k|{
  435|  5.09k|    PRUint32 nsCertType;
  436|       |
  437|  5.09k|    if (cert->nsCertType) {
  ------------------
  |  Branch (437:9): [True: 0, False: 5.09k]
  ------------------
  438|       |        /* once set, no need to recalculate */
  439|      0|        return SECSuccess;
  440|      0|    }
  441|  5.09k|    nsCertType = cert_ComputeCertType(cert);
  442|       |
  443|       |    /* Assert that it is safe to cast &cert->nsCertType to "PRInt32 *" */
  444|  5.09k|    PORT_Assert(sizeof(cert->nsCertType) == sizeof(PRInt32));
  ------------------
  |  |  120|  5.09k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  5.09k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  445|  5.09k|    PR_ATOMIC_SET((PRInt32 *)&cert->nsCertType, nsCertType);
  ------------------
  |  |  124|  5.09k|#define PR_ATOMIC_SET(val, newval) __sync_lock_test_and_set(val, newval)
  ------------------
  446|  5.09k|    return SECSuccess;
  447|  5.09k|}
cert_IsIPsecOID:
  451|     63|{
  452|     63|    if (findOIDinOIDSeqByTagNum(
  ------------------
  |  Branch (452:9): [True: 0, False: 63]
  ------------------
  453|     63|            extKeyUsage, SEC_OID_EXT_KEY_USAGE_IPSEC_IKE) == SECSuccess) {
  454|      0|        return PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  455|      0|    }
  456|     63|    if (findOIDinOIDSeqByTagNum(
  ------------------
  |  Branch (456:9): [True: 0, False: 63]
  ------------------
  457|     63|            extKeyUsage, SEC_OID_IPSEC_IKE_END) == SECSuccess) {
  458|      0|        return PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  459|      0|    }
  460|     63|    if (findOIDinOIDSeqByTagNum(
  ------------------
  |  Branch (460:9): [True: 0, False: 63]
  ------------------
  461|     63|            extKeyUsage, SEC_OID_IPSEC_IKE_INTERMEDIATE) == SECSuccess) {
  462|      0|        return PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  463|      0|    }
  464|       |    /* these are now deprecated, but may show up. Treat them the same as IKE */
  465|     63|    if (findOIDinOIDSeqByTagNum(
  ------------------
  |  Branch (465:9): [True: 0, False: 63]
  ------------------
  466|     63|            extKeyUsage, SEC_OID_EXT_KEY_USAGE_IPSEC_END) == SECSuccess) {
  467|      0|        return PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  468|      0|    }
  469|     63|    if (findOIDinOIDSeqByTagNum(
  ------------------
  |  Branch (469:9): [True: 0, False: 63]
  ------------------
  470|     63|            extKeyUsage, SEC_OID_EXT_KEY_USAGE_IPSEC_TUNNEL) == SECSuccess) {
  471|      0|        return PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  472|      0|    }
  473|     63|    if (findOIDinOIDSeqByTagNum(
  ------------------
  |  Branch (473:9): [True: 0, False: 63]
  ------------------
  474|     63|            extKeyUsage, SEC_OID_EXT_KEY_USAGE_IPSEC_USER) == SECSuccess) {
  475|      0|        return PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  476|      0|    }
  477|       |    /* this one should probably be in cert_ComputeCertType and set all usages? */
  478|     63|    if (findOIDinOIDSeqByTagNum(
  ------------------
  |  Branch (478:9): [True: 0, False: 63]
  ------------------
  479|     63|            extKeyUsage, SEC_OID_X509_ANY_EXT_KEY_USAGE) == SECSuccess) {
  480|      0|        return PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  481|      0|    }
  482|     63|    return PR_FALSE;
  ------------------
  |  |  438|     63|#define PR_FALSE 0
  ------------------
  483|     63|}
cert_ComputeCertType:
  487|  5.09k|{
  488|  5.09k|    SECStatus rv;
  489|  5.09k|    SECItem tmpitem;
  490|  5.09k|    SECItem encodedExtKeyUsage;
  491|  5.09k|    CERTOidSequence *extKeyUsage = NULL;
  492|  5.09k|    CERTBasicConstraints basicConstraint;
  493|  5.09k|    PRUint32 nsCertType = 0;
  494|  5.09k|    PRBool isCA = PR_FALSE;
  ------------------
  |  |  438|  5.09k|#define PR_FALSE 0
  ------------------
  495|       |
  496|  5.09k|    tmpitem.data = NULL;
  497|  5.09k|    CERT_FindNSCertTypeExtension(cert, &tmpitem);
  498|  5.09k|    encodedExtKeyUsage.data = NULL;
  499|  5.09k|    rv = CERT_FindCertExtension(cert, SEC_OID_X509_EXT_KEY_USAGE,
  500|  5.09k|                                &encodedExtKeyUsage);
  501|  5.09k|    if (rv == SECSuccess) {
  ------------------
  |  Branch (501:9): [True: 858, False: 4.23k]
  ------------------
  502|    858|        extKeyUsage = CERT_DecodeOidSequence(&encodedExtKeyUsage);
  503|    858|    }
  504|  5.09k|    rv = CERT_FindBasicConstraintExten(cert, &basicConstraint);
  505|  5.09k|    if (rv == SECSuccess) {
  ------------------
  |  Branch (505:9): [True: 1.76k, False: 3.32k]
  ------------------
  506|  1.76k|        isCA = basicConstraint.isCA;
  507|  1.76k|    }
  508|  5.09k|    if (tmpitem.data != NULL || extKeyUsage != NULL) {
  ------------------
  |  Branch (508:9): [True: 0, False: 5.09k]
  |  Branch (508:33): [True: 63, False: 5.02k]
  ------------------
  509|     63|        if (tmpitem.data == NULL || tmpitem.len == 0) {
  ------------------
  |  Branch (509:13): [True: 63, False: 0]
  |  Branch (509:37): [True: 0, False: 0]
  ------------------
  510|     63|            nsCertType = 0;
  511|     63|        } else {
  512|      0|            nsCertType = tmpitem.data[0];
  513|      0|        }
  514|       |
  515|       |        /* free tmpitem data pointer to avoid memory leak */
  516|     63|        PORT_Free(tmpitem.data);
  ------------------
  |  |   60|     63|#define PORT_Free PORT_Free_Util
  ------------------
  517|     63|        tmpitem.data = NULL;
  518|       |
  519|       |        /*
  520|       |         * for this release, we will allow SSL certs with an email address
  521|       |         * to be used for email
  522|       |         */
  523|     63|        if ((nsCertType & NS_CERT_TYPE_SSL_CLIENT) && cert->emailAddr &&
  ------------------
  |  |  447|     63|#define NS_CERT_TYPE_SSL_CLIENT (0x80)        /* bit 0 */
  ------------------
  |  Branch (523:13): [True: 0, False: 63]
  |  Branch (523:55): [True: 0, False: 0]
  ------------------
  524|     63|            cert->emailAddr[0]) {
  ------------------
  |  Branch (524:13): [True: 0, False: 0]
  ------------------
  525|      0|            nsCertType |= NS_CERT_TYPE_EMAIL;
  ------------------
  |  |  449|      0|#define NS_CERT_TYPE_EMAIL (0x20)             /* bit 2 */
  ------------------
  526|      0|        }
  527|       |        /*
  528|       |         * for this release, we will allow SSL intermediate CAs to be
  529|       |         * email intermediate CAs too.
  530|       |         */
  531|     63|        if (nsCertType & NS_CERT_TYPE_SSL_CA) {
  ------------------
  |  |  452|     63|#define NS_CERT_TYPE_SSL_CA (0x04)            /* bit 5 */
  ------------------
  |  Branch (531:13): [True: 0, False: 63]
  ------------------
  532|      0|            nsCertType |= NS_CERT_TYPE_EMAIL_CA;
  ------------------
  |  |  453|      0|#define NS_CERT_TYPE_EMAIL_CA (0x02)          /* bit 6 */
  ------------------
  533|      0|        }
  534|       |        /*
  535|       |         * allow a cert with the extended key usage of EMail Protect
  536|       |         * to be used for email or as an email CA, if basic constraints
  537|       |         * indicates that it is a CA.
  538|       |         */
  539|     63|        if (findOIDinOIDSeqByTagNum(extKeyUsage,
  ------------------
  |  Branch (539:13): [True: 0, False: 63]
  ------------------
  540|     63|                                    SEC_OID_EXT_KEY_USAGE_EMAIL_PROTECT) ==
  541|     63|            SECSuccess) {
  542|      0|            nsCertType |= isCA ? NS_CERT_TYPE_EMAIL_CA : NS_CERT_TYPE_EMAIL;
  ------------------
  |  |  453|      0|#define NS_CERT_TYPE_EMAIL_CA (0x02)          /* bit 6 */
  ------------------
                          nsCertType |= isCA ? NS_CERT_TYPE_EMAIL_CA : NS_CERT_TYPE_EMAIL;
  ------------------
  |  |  449|      0|#define NS_CERT_TYPE_EMAIL (0x20)             /* bit 2 */
  ------------------
  |  Branch (542:27): [True: 0, False: 0]
  ------------------
  543|      0|        }
  544|     63|        if (findOIDinOIDSeqByTagNum(
  ------------------
  |  Branch (544:13): [True: 0, False: 63]
  ------------------
  545|     63|                extKeyUsage, SEC_OID_EXT_KEY_USAGE_SERVER_AUTH) == SECSuccess) {
  546|      0|            nsCertType |= isCA ? NS_CERT_TYPE_SSL_CA : NS_CERT_TYPE_SSL_SERVER;
  ------------------
  |  |  452|      0|#define NS_CERT_TYPE_SSL_CA (0x04)            /* bit 5 */
  ------------------
                          nsCertType |= isCA ? NS_CERT_TYPE_SSL_CA : NS_CERT_TYPE_SSL_SERVER;
  ------------------
  |  |  448|      0|#define NS_CERT_TYPE_SSL_SERVER (0x40)        /* bit 1 */
  ------------------
  |  Branch (546:27): [True: 0, False: 0]
  ------------------
  547|      0|        }
  548|       |        /*
  549|       |         * Treat certs with step-up OID as also having SSL server type.
  550|       |         * COMODO needs this behaviour until June 2020.  See Bug 737802.
  551|       |         */
  552|     63|        if (findOIDinOIDSeqByTagNum(extKeyUsage,
  ------------------
  |  Branch (552:13): [True: 0, False: 63]
  ------------------
  553|     63|                                    SEC_OID_NS_KEY_USAGE_GOVT_APPROVED) ==
  554|     63|            SECSuccess) {
  555|      0|            nsCertType |= isCA ? NS_CERT_TYPE_SSL_CA : NS_CERT_TYPE_SSL_SERVER;
  ------------------
  |  |  452|      0|#define NS_CERT_TYPE_SSL_CA (0x04)            /* bit 5 */
  ------------------
                          nsCertType |= isCA ? NS_CERT_TYPE_SSL_CA : NS_CERT_TYPE_SSL_SERVER;
  ------------------
  |  |  448|      0|#define NS_CERT_TYPE_SSL_SERVER (0x40)        /* bit 1 */
  ------------------
  |  Branch (555:27): [True: 0, False: 0]
  ------------------
  556|      0|        }
  557|     63|        if (findOIDinOIDSeqByTagNum(
  ------------------
  |  Branch (557:13): [True: 0, False: 63]
  ------------------
  558|     63|                extKeyUsage, SEC_OID_EXT_KEY_USAGE_CLIENT_AUTH) == SECSuccess) {
  559|      0|            nsCertType |= isCA ? NS_CERT_TYPE_SSL_CA : NS_CERT_TYPE_SSL_CLIENT;
  ------------------
  |  |  452|      0|#define NS_CERT_TYPE_SSL_CA (0x04)            /* bit 5 */
  ------------------
                          nsCertType |= isCA ? NS_CERT_TYPE_SSL_CA : NS_CERT_TYPE_SSL_CLIENT;
  ------------------
  |  |  447|      0|#define NS_CERT_TYPE_SSL_CLIENT (0x80)        /* bit 0 */
  ------------------
  |  Branch (559:27): [True: 0, False: 0]
  ------------------
  560|      0|        }
  561|     63|        if (cert_IsIPsecOID(extKeyUsage)) {
  ------------------
  |  Branch (561:13): [True: 0, False: 63]
  ------------------
  562|      0|            nsCertType |= isCA ? NS_CERT_TYPE_IPSEC_CA : NS_CERT_TYPE_IPSEC;
  ------------------
  |  |  445|      0|#define NS_CERT_TYPE_IPSEC_CA (0x200)         /* outside the NS Cert Type Extenstion */
  ------------------
                          nsCertType |= isCA ? NS_CERT_TYPE_IPSEC_CA : NS_CERT_TYPE_IPSEC;
  ------------------
  |  |  446|      0|#define NS_CERT_TYPE_IPSEC (0x100)            /* outside the NS Cert Type Extenstion */
  ------------------
  |  Branch (562:27): [True: 0, False: 0]
  ------------------
  563|      0|        }
  564|     63|        if (findOIDinOIDSeqByTagNum(
  ------------------
  |  Branch (564:13): [True: 0, False: 63]
  ------------------
  565|     63|                extKeyUsage, SEC_OID_EXT_KEY_USAGE_CODE_SIGN) == SECSuccess) {
  566|      0|            nsCertType |= isCA ? NS_CERT_TYPE_OBJECT_SIGNING_CA : NS_CERT_TYPE_OBJECT_SIGNING;
  ------------------
  |  |  454|      0|#define NS_CERT_TYPE_OBJECT_SIGNING_CA (0x01) /* bit 7 */
  ------------------
                          nsCertType |= isCA ? NS_CERT_TYPE_OBJECT_SIGNING_CA : NS_CERT_TYPE_OBJECT_SIGNING;
  ------------------
  |  |  450|      0|#define NS_CERT_TYPE_OBJECT_SIGNING (0x10)    /* bit 3 */
  ------------------
  |  Branch (566:27): [True: 0, False: 0]
  ------------------
  567|      0|        }
  568|     63|        if (findOIDinOIDSeqByTagNum(
  ------------------
  |  Branch (568:13): [True: 0, False: 63]
  ------------------
  569|     63|                extKeyUsage, SEC_OID_EXT_KEY_USAGE_TIME_STAMP) == SECSuccess) {
  570|      0|            nsCertType |= EXT_KEY_USAGE_TIME_STAMP;
  ------------------
  |  |  456|      0|#define EXT_KEY_USAGE_TIME_STAMP (0x8000)
  ------------------
  571|      0|        }
  572|     63|        if (findOIDinOIDSeqByTagNum(extKeyUsage, SEC_OID_OCSP_RESPONDER) ==
  ------------------
  |  Branch (572:13): [True: 0, False: 63]
  ------------------
  573|     63|            SECSuccess) {
  574|      0|            nsCertType |= EXT_KEY_USAGE_STATUS_RESPONDER;
  ------------------
  |  |  457|      0|#define EXT_KEY_USAGE_STATUS_RESPONDER (0x4000)
  ------------------
  575|      0|        }
  576|  5.02k|    } else {
  577|       |        /* If no NS Cert Type extension and no EKU extension, then */
  578|  5.02k|        nsCertType = 0;
  579|  5.02k|        if (CERT_IsCACert(cert, &nsCertType))
  ------------------
  |  Branch (579:13): [True: 58, False: 4.97k]
  ------------------
  580|     58|            nsCertType |= EXT_KEY_USAGE_STATUS_RESPONDER;
  ------------------
  |  |  457|     58|#define EXT_KEY_USAGE_STATUS_RESPONDER (0x4000)
  ------------------
  581|       |        /* if the basic constraint extension says the cert is a CA, then
  582|       |           allow SSL CA and EMAIL CA and Status Responder */
  583|  5.02k|        if (isCA) {
  ------------------
  |  Branch (583:13): [True: 37, False: 4.99k]
  ------------------
  584|     37|            nsCertType |= (NS_CERT_TYPE_SSL_CA | NS_CERT_TYPE_EMAIL_CA |
  ------------------
  |  |  452|     37|#define NS_CERT_TYPE_SSL_CA (0x04)            /* bit 5 */
  ------------------
                          nsCertType |= (NS_CERT_TYPE_SSL_CA | NS_CERT_TYPE_EMAIL_CA |
  ------------------
  |  |  453|     37|#define NS_CERT_TYPE_EMAIL_CA (0x02)          /* bit 6 */
  ------------------
  585|     37|                           EXT_KEY_USAGE_STATUS_RESPONDER);
  ------------------
  |  |  457|     37|#define EXT_KEY_USAGE_STATUS_RESPONDER (0x4000)
  ------------------
  586|     37|        }
  587|       |        /* allow any ssl or email (no ca or object signing. */
  588|  5.02k|        nsCertType |= NS_CERT_TYPE_SSL_CLIENT | NS_CERT_TYPE_SSL_SERVER |
  ------------------
  |  |  447|  5.02k|#define NS_CERT_TYPE_SSL_CLIENT (0x80)        /* bit 0 */
  ------------------
                      nsCertType |= NS_CERT_TYPE_SSL_CLIENT | NS_CERT_TYPE_SSL_SERVER |
  ------------------
  |  |  448|  5.02k|#define NS_CERT_TYPE_SSL_SERVER (0x40)        /* bit 1 */
  ------------------
  589|  5.02k|                      NS_CERT_TYPE_EMAIL;
  ------------------
  |  |  449|  5.02k|#define NS_CERT_TYPE_EMAIL (0x20)             /* bit 2 */
  ------------------
  590|  5.02k|    }
  591|       |
  592|       |    /* IPSEC is allowed to use SSL client and server certs as well as email certs */
  593|  5.09k|    if (nsCertType & (NS_CERT_TYPE_SSL_CLIENT | NS_CERT_TYPE_SSL_SERVER | NS_CERT_TYPE_EMAIL)) {
  ------------------
  |  |  447|  5.09k|#define NS_CERT_TYPE_SSL_CLIENT (0x80)        /* bit 0 */
  ------------------
                  if (nsCertType & (NS_CERT_TYPE_SSL_CLIENT | NS_CERT_TYPE_SSL_SERVER | NS_CERT_TYPE_EMAIL)) {
  ------------------
  |  |  448|  5.09k|#define NS_CERT_TYPE_SSL_SERVER (0x40)        /* bit 1 */
  ------------------
                  if (nsCertType & (NS_CERT_TYPE_SSL_CLIENT | NS_CERT_TYPE_SSL_SERVER | NS_CERT_TYPE_EMAIL)) {
  ------------------
  |  |  449|  5.09k|#define NS_CERT_TYPE_EMAIL (0x20)             /* bit 2 */
  ------------------
  |  Branch (593:9): [True: 5.02k, False: 63]
  ------------------
  594|  5.02k|        nsCertType |= NS_CERT_TYPE_IPSEC;
  ------------------
  |  |  446|  5.02k|#define NS_CERT_TYPE_IPSEC (0x100)            /* outside the NS Cert Type Extenstion */
  ------------------
  595|  5.02k|    }
  596|  5.09k|    if (nsCertType & (NS_CERT_TYPE_SSL_CA | NS_CERT_TYPE_EMAIL_CA)) {
  ------------------
  |  |  452|  5.09k|#define NS_CERT_TYPE_SSL_CA (0x04)            /* bit 5 */
  ------------------
                  if (nsCertType & (NS_CERT_TYPE_SSL_CA | NS_CERT_TYPE_EMAIL_CA)) {
  ------------------
  |  |  453|  5.09k|#define NS_CERT_TYPE_EMAIL_CA (0x02)          /* bit 6 */
  ------------------
  |  Branch (596:9): [True: 58, False: 5.03k]
  ------------------
  597|     58|        nsCertType |= NS_CERT_TYPE_IPSEC_CA;
  ------------------
  |  |  445|     58|#define NS_CERT_TYPE_IPSEC_CA (0x200)         /* outside the NS Cert Type Extenstion */
  ------------------
  598|     58|    }
  599|       |
  600|  5.09k|    if (encodedExtKeyUsage.data != NULL) {
  ------------------
  |  Branch (600:9): [True: 857, False: 4.23k]
  ------------------
  601|    857|        PORT_Free(encodedExtKeyUsage.data);
  ------------------
  |  |   60|    857|#define PORT_Free PORT_Free_Util
  ------------------
  602|    857|    }
  603|  5.09k|    if (extKeyUsage != NULL) {
  ------------------
  |  Branch (603:9): [True: 63, False: 5.02k]
  ------------------
  604|     63|        CERT_DestroyOidSequence(extKeyUsage);
  605|     63|    }
  606|  5.09k|    return nsCertType;
  607|  5.09k|}
cert_GetKeyID:
  614|  5.09k|{
  615|  5.09k|    SECItem tmpitem;
  616|  5.09k|    SECStatus rv;
  617|       |
  618|  5.09k|    cert->subjectKeyID.len = 0;
  619|       |
  620|       |    /* see of the cert has a key identifier extension */
  621|  5.09k|    rv = CERT_FindSubjectKeyIDExtension(cert, &tmpitem);
  622|  5.09k|    if (rv == SECSuccess) {
  ------------------
  |  Branch (622:9): [True: 11, False: 5.08k]
  ------------------
  623|     11|        cert->subjectKeyID.data =
  624|     11|            (unsigned char *)PORT_ArenaAlloc(cert->arena, tmpitem.len);
  ------------------
  |  |   53|     11|#define PORT_ArenaAlloc PORT_ArenaAlloc_Util
  ------------------
  625|     11|        if (cert->subjectKeyID.data != NULL) {
  ------------------
  |  Branch (625:13): [True: 11, False: 0]
  ------------------
  626|     11|            PORT_Memcpy(cert->subjectKeyID.data, tmpitem.data, tmpitem.len);
  ------------------
  |  |  180|     11|#define PORT_Memcpy memcpy
  ------------------
  627|     11|            cert->subjectKeyID.len = tmpitem.len;
  628|     11|            cert->keyIDGenerated = PR_FALSE;
  ------------------
  |  |  438|     11|#define PR_FALSE 0
  ------------------
  629|     11|        }
  630|       |
  631|     11|        PORT_Free(tmpitem.data);
  ------------------
  |  |   60|     11|#define PORT_Free PORT_Free_Util
  ------------------
  632|     11|    }
  633|       |
  634|       |    /* if the cert doesn't have a key identifier extension, then generate one*/
  635|  5.09k|    if (cert->subjectKeyID.len == 0) {
  ------------------
  |  Branch (635:9): [True: 5.08k, False: 10]
  ------------------
  636|       |        /*
  637|       |         * pkix says that if the subjectKeyID is not present, then we should
  638|       |         * use the SHA-1 hash of the DER-encoded publicKeyInfo from the cert
  639|       |         */
  640|  5.08k|        cert->subjectKeyID.data =
  641|  5.08k|            (unsigned char *)PORT_ArenaAlloc(cert->arena, SHA1_LENGTH);
  ------------------
  |  |   53|  5.08k|#define PORT_ArenaAlloc PORT_ArenaAlloc_Util
  ------------------
                          (unsigned char *)PORT_ArenaAlloc(cert->arena, SHA1_LENGTH);
  ------------------
  |  |  101|  5.08k|#define SHA1_LENGTH 20       /* Bytes */
  ------------------
  642|  5.08k|        if (cert->subjectKeyID.data != NULL) {
  ------------------
  |  Branch (642:13): [True: 5.08k, False: 0]
  ------------------
  643|  5.08k|            rv = PK11_HashBuf(SEC_OID_SHA1, cert->subjectKeyID.data,
  644|  5.08k|                              cert->derPublicKey.data, cert->derPublicKey.len);
  645|  5.08k|            if (rv == SECSuccess) {
  ------------------
  |  Branch (645:17): [True: 5.08k, False: 0]
  ------------------
  646|  5.08k|                cert->subjectKeyID.len = SHA1_LENGTH;
  ------------------
  |  |  101|  5.08k|#define SHA1_LENGTH 20       /* Bytes */
  ------------------
  647|  5.08k|            }
  648|  5.08k|        }
  649|  5.08k|    }
  650|       |
  651|  5.09k|    if (cert->subjectKeyID.len == 0) {
  ------------------
  |  Branch (651:9): [True: 0, False: 5.09k]
  ------------------
  652|      0|        return (SECFailure);
  653|      0|    }
  654|  5.09k|    return (SECSuccess);
  655|  5.09k|}
CERT_DecodeDERCertificate:
  721|  5.30k|{
  722|  5.30k|    CERTCertificate *cert;
  723|  5.30k|    PLArenaPool *arena;
  724|  5.30k|    void *data;
  725|  5.30k|    int rv;
  726|  5.30k|    int len;
  727|  5.30k|    char *tmpname;
  728|       |
  729|       |    /* make a new arena */
  730|  5.30k|    arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
  ------------------
  |  |   63|  5.30k|#define PORT_NewArena PORT_NewArena_Util
  ------------------
                  arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
  ------------------
  |  |   60|  5.30k|#define DER_DEFAULT_CHUNKSIZE (2048)
  ------------------
  731|       |
  732|  5.30k|    if (!arena) {
  ------------------
  |  Branch (732:9): [True: 0, False: 5.30k]
  ------------------
  733|      0|        return 0;
  734|      0|    }
  735|       |
  736|       |    /* allocate the certificate structure */
  737|  5.30k|    cert = (CERTCertificate *)PORT_ArenaZAlloc(arena, sizeof(CERTCertificate));
  ------------------
  |  |   59|  5.30k|#define PORT_ArenaZAlloc PORT_ArenaZAlloc_Util
  ------------------
  738|       |
  739|  5.30k|    if (!cert) {
  ------------------
  |  Branch (739:9): [True: 0, False: 5.30k]
  ------------------
  740|      0|        goto loser;
  741|      0|    }
  742|       |
  743|  5.30k|    cert->arena = arena;
  744|       |
  745|  5.30k|    if (copyDER) {
  ------------------
  |  Branch (745:9): [True: 5.30k, False: 0]
  ------------------
  746|       |        /* copy the DER data for the cert into this arena */
  747|  5.30k|        data = (void *)PORT_ArenaAlloc(arena, derSignedCert->len);
  ------------------
  |  |   53|  5.30k|#define PORT_ArenaAlloc PORT_ArenaAlloc_Util
  ------------------
  748|  5.30k|        if (!data) {
  ------------------
  |  Branch (748:13): [True: 0, False: 5.30k]
  ------------------
  749|      0|            goto loser;
  750|      0|        }
  751|  5.30k|        cert->derCert.data = (unsigned char *)data;
  752|  5.30k|        cert->derCert.len = derSignedCert->len;
  753|  5.30k|        PORT_Memcpy(data, derSignedCert->data, derSignedCert->len);
  ------------------
  |  |  180|  5.30k|#define PORT_Memcpy memcpy
  ------------------
  754|  5.30k|    } else {
  755|       |        /* point to passed in DER data */
  756|      0|        cert->derCert = *derSignedCert;
  757|      0|    }
  758|       |
  759|       |    /* decode the certificate info */
  760|  5.30k|    rv = SEC_QuickDERDecodeItem(arena, cert, SEC_SignedCertificateTemplate,
  ------------------
  |  |  102|  5.30k|#define SEC_QuickDERDecodeItem SEC_QuickDERDecodeItem_Util
  ------------------
  761|  5.30k|                                &cert->derCert);
  762|       |
  763|  5.30k|    if (rv) {
  ------------------
  |  Branch (763:9): [True: 211, False: 5.09k]
  ------------------
  764|    211|        goto loser;
  765|    211|    }
  766|       |
  767|  5.09k|    if (cert_HasUnknownCriticalExten(cert->extensions) == PR_TRUE) {
  ------------------
  |  |  437|  5.09k|#define PR_TRUE 1
  ------------------
  |  Branch (767:9): [True: 15, False: 5.07k]
  ------------------
  768|     15|        cert->options.bits.hasUnsupportedCriticalExt = PR_TRUE;
  ------------------
  |  |  437|     15|#define PR_TRUE 1
  ------------------
  769|     15|    }
  770|       |
  771|       |    /* generate and save the database key for the cert */
  772|  5.09k|    rv = CERT_KeyFromIssuerAndSN(arena, &cert->derIssuer, &cert->serialNumber,
  773|  5.09k|                                 &cert->certKey);
  774|  5.09k|    if (rv) {
  ------------------
  |  Branch (774:9): [True: 0, False: 5.09k]
  ------------------
  775|      0|        goto loser;
  776|      0|    }
  777|       |
  778|       |    /* set the nickname */
  779|  5.09k|    if (nickname == NULL) {
  ------------------
  |  Branch (779:9): [True: 5.09k, False: 0]
  ------------------
  780|  5.09k|        cert->nickname = NULL;
  781|  5.09k|    } else {
  782|       |        /* copy and install the nickname */
  783|      0|        len = PORT_Strlen(nickname) + 1;
  ------------------
  |  |  190|      0|#define PORT_Strlen(s) strlen(s)
  ------------------
  784|      0|        cert->nickname = (char *)PORT_ArenaAlloc(arena, len);
  ------------------
  |  |   53|      0|#define PORT_ArenaAlloc PORT_ArenaAlloc_Util
  ------------------
  785|      0|        if (cert->nickname == NULL) {
  ------------------
  |  Branch (785:13): [True: 0, False: 0]
  ------------------
  786|      0|            goto loser;
  787|      0|        }
  788|       |
  789|      0|        PORT_Memcpy(cert->nickname, nickname, len);
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
  790|      0|    }
  791|       |
  792|       |    /* set the email address */
  793|  5.09k|    cert->emailAddr = cert_GetCertificateEmailAddresses(cert);
  794|       |
  795|       |    /* initialize the subjectKeyID */
  796|  5.09k|    rv = cert_GetKeyID(cert);
  797|  5.09k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (797:9): [True: 0, False: 5.09k]
  ------------------
  798|      0|        goto loser;
  799|      0|    }
  800|       |
  801|       |    /* initialize keyUsage */
  802|  5.09k|    rv = GetKeyUsage(cert);
  803|  5.09k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (803:9): [True: 0, False: 5.09k]
  ------------------
  804|      0|        goto loser;
  805|      0|    }
  806|       |
  807|       |    /* determine if this is a root cert */
  808|  5.09k|    cert->isRoot = cert_IsRootCert(cert);
  809|       |
  810|       |    /* initialize the certType */
  811|  5.09k|    rv = cert_GetCertType(cert);
  812|  5.09k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (812:9): [True: 0, False: 5.09k]
  ------------------
  813|      0|        goto loser;
  814|      0|    }
  815|       |
  816|  5.09k|    tmpname = CERT_NameToAscii(&cert->subject);
  817|  5.09k|    if (tmpname != NULL) {
  ------------------
  |  Branch (817:9): [True: 5.07k, False: 20]
  ------------------
  818|  5.07k|        cert->subjectName = PORT_ArenaStrdup(cert->arena, tmpname);
  ------------------
  |  |   57|  5.07k|#define PORT_ArenaStrdup PORT_ArenaStrdup_Util
  ------------------
  819|  5.07k|        PORT_Free(tmpname);
  ------------------
  |  |   60|  5.07k|#define PORT_Free PORT_Free_Util
  ------------------
  820|  5.07k|    }
  821|       |
  822|  5.09k|    tmpname = CERT_NameToAscii(&cert->issuer);
  823|  5.09k|    if (tmpname != NULL) {
  ------------------
  |  Branch (823:9): [True: 5.05k, False: 32]
  ------------------
  824|  5.05k|        cert->issuerName = PORT_ArenaStrdup(cert->arena, tmpname);
  ------------------
  |  |   57|  5.05k|#define PORT_ArenaStrdup PORT_ArenaStrdup_Util
  ------------------
  825|  5.05k|        PORT_Free(tmpname);
  ------------------
  |  |   60|  5.05k|#define PORT_Free PORT_Free_Util
  ------------------
  826|  5.05k|    }
  827|       |
  828|  5.09k|    cert->referenceCount = 1;
  829|  5.09k|    cert->slot = NULL;
  830|  5.09k|    cert->pkcs11ID = CK_INVALID_HANDLE;
  ------------------
  |  |   78|  5.09k|#define CK_INVALID_HANDLE 0
  ------------------
  831|  5.09k|    cert->dbnickname = NULL;
  832|       |
  833|  5.09k|    return (cert);
  834|       |
  835|    211|loser:
  836|       |
  837|    211|    if (arena) {
  ------------------
  |  Branch (837:9): [True: 211, False: 0]
  ------------------
  838|    211|        PORT_FreeArena(arena, PR_FALSE);
  ------------------
  |  |   61|    211|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                      PORT_FreeArena(arena, PR_FALSE);
  ------------------
  |  |  438|    211|#define PR_FALSE 0
  ------------------
  839|    211|    }
  840|       |
  841|    211|    return (0);
  842|  5.09k|}
CERT_DupCertificate:
 1269|  4.54k|{
 1270|  4.54k|    if (c) {
  ------------------
  |  Branch (1270:9): [True: 4.54k, False: 0]
  ------------------
 1271|  4.54k|        NSSCertificate *tmp = STAN_GetNSSCertificate(c);
 1272|  4.54k|        nssCertificate_AddRef(tmp);
 1273|  4.54k|    }
 1274|  4.54k|    return c;
 1275|  4.54k|}
CERT_SetDefaultCertDB:
 1296|      1|{
 1297|      1|    default_cert_db_handle = handle;
 1298|       |
 1299|      1|    return;
 1300|      1|}
CERT_GetDefaultCertDB:
 1304|  9.36k|{
 1305|  9.36k|    return (default_cert_db_handle);
 1306|  9.36k|}
CERT_IsCACert:
 2113|  5.02k|{
 2114|  5.02k|    unsigned int cType = cert->nsCertType;
 2115|  5.02k|    PRBool ret = PR_FALSE;
  ------------------
  |  |  438|  5.02k|#define PR_FALSE 0
  ------------------
 2116|       |
 2117|       |    /*
 2118|       |     * Check if the constraints are available and it's a CA, OR if it's
 2119|       |     * a X.509 v1 Root CA.
 2120|       |     */
 2121|  5.02k|    CERTBasicConstraints constraints;
 2122|  5.02k|    if ((CERT_FindBasicConstraintExten(cert, &constraints) == SECSuccess &&
  ------------------
  |  Branch (2122:10): [True: 1.76k, False: 3.25k]
  ------------------
 2123|  5.02k|         constraints.isCA) ||
  ------------------
  |  Branch (2123:10): [True: 37, False: 1.73k]
  ------------------
 2124|  5.02k|        (cert->isRoot && cert_Version(cert) < SEC_CERTIFICATE_VERSION_3))
  ------------------
  |  |  300|    754|#define SEC_CERTIFICATE_VERSION_3 2 /* v3 extensions */
  ------------------
  |  Branch (2124:10): [True: 754, False: 4.23k]
  |  Branch (2124:26): [True: 21, False: 733]
  ------------------
 2125|     58|        cType |= (NS_CERT_TYPE_SSL_CA | NS_CERT_TYPE_EMAIL_CA);
  ------------------
  |  |  452|     58|#define NS_CERT_TYPE_SSL_CA (0x04)            /* bit 5 */
  ------------------
                      cType |= (NS_CERT_TYPE_SSL_CA | NS_CERT_TYPE_EMAIL_CA);
  ------------------
  |  |  453|     58|#define NS_CERT_TYPE_EMAIL_CA (0x02)          /* bit 6 */
  ------------------
 2126|       |
 2127|       |    /*
 2128|       |     * Apply trust overrides, if any.
 2129|       |     */
 2130|  5.02k|    cType = cert_ComputeTrustOverrides(cert, cType);
 2131|  5.02k|    ret = (cType & (NS_CERT_TYPE_SSL_CA | NS_CERT_TYPE_EMAIL_CA |
  ------------------
  |  |  452|  5.02k|#define NS_CERT_TYPE_SSL_CA (0x04)            /* bit 5 */
  ------------------
                  ret = (cType & (NS_CERT_TYPE_SSL_CA | NS_CERT_TYPE_EMAIL_CA |
  ------------------
  |  |  453|  5.02k|#define NS_CERT_TYPE_EMAIL_CA (0x02)          /* bit 6 */
  ------------------
  |  Branch (2131:11): [True: 58, False: 4.97k]
  ------------------
 2132|  5.02k|                    NS_CERT_TYPE_OBJECT_SIGNING_CA))
  ------------------
  |  |  454|  5.02k|#define NS_CERT_TYPE_OBJECT_SIGNING_CA (0x01) /* bit 7 */
  ------------------
 2133|  5.02k|              ? PR_TRUE
  ------------------
  |  |  437|     58|#define PR_TRUE 1
  ------------------
 2134|  5.02k|              : PR_FALSE;
  ------------------
  |  |  438|  9.99k|#define PR_FALSE 0
  ------------------
 2135|       |
 2136|  5.02k|    if (rettype) {
  ------------------
  |  Branch (2136:9): [True: 5.02k, False: 0]
  ------------------
 2137|  5.02k|        *rettype = cType;
 2138|  5.02k|    }
 2139|       |
 2140|  5.02k|    return ret;
 2141|  5.02k|}
CERT_LockCertTrust:
 2991|  10.1k|{
 2992|  10.1k|    PORT_Assert(certTrustLock != NULL);
  ------------------
  |  |  120|  10.1k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  10.1k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 10.1k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2993|  10.1k|    PZ_Lock(certTrustLock);
  ------------------
  |  |  245|  10.1k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
 2994|  10.1k|}
CERT_LockCertTempPerm:
 3003|  24.9k|{
 3004|  24.9k|    PORT_Assert(certTempPermCertLock != NULL);
  ------------------
  |  |  120|  24.9k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  24.9k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 24.9k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3005|  24.9k|    PZ_Lock(certTempPermCertLock);
  ------------------
  |  |  245|  24.9k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
 3006|  24.9k|}
CERT_MaybeLockCertTempPerm:
 3013|  9.63k|{
 3014|  9.63k|    if (certTempPermCertLock) {
  ------------------
  |  Branch (3014:9): [True: 9.63k, False: 0]
  ------------------
 3015|  9.63k|        PZ_Lock(certTempPermCertLock);
  ------------------
  |  |  245|  9.63k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
 3016|  9.63k|    }
 3017|  9.63k|}
cert_InitLocks:
 3021|      1|{
 3022|      1|    if (certRefCountLock == NULL) {
  ------------------
  |  Branch (3022:9): [True: 1, False: 0]
  ------------------
 3023|      1|        certRefCountLock = PZ_NewLock(nssILockRefLock);
  ------------------
  |  |  243|      1|#define PZ_NewLock(t) PR_NewLock()
  ------------------
 3024|      1|        PORT_Assert(certRefCountLock != NULL);
  ------------------
  |  |  120|      1|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      1|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3025|      1|        if (!certRefCountLock) {
  ------------------
  |  Branch (3025:13): [True: 0, False: 1]
  ------------------
 3026|      0|            return SECFailure;
 3027|      0|        }
 3028|      1|    }
 3029|       |
 3030|      1|    if (certTrustLock == NULL) {
  ------------------
  |  Branch (3030:9): [True: 1, False: 0]
  ------------------
 3031|      1|        certTrustLock = PZ_NewLock(nssILockCertDB);
  ------------------
  |  |  243|      1|#define PZ_NewLock(t) PR_NewLock()
  ------------------
 3032|      1|        PORT_Assert(certTrustLock != NULL);
  ------------------
  |  |  120|      1|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      1|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3033|      1|        if (!certTrustLock) {
  ------------------
  |  Branch (3033:13): [True: 0, False: 1]
  ------------------
 3034|      0|            PZ_DestroyLock(certRefCountLock);
  ------------------
  |  |  244|      0|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
 3035|      0|            certRefCountLock = NULL;
 3036|      0|            return SECFailure;
 3037|      0|        }
 3038|      1|    }
 3039|       |
 3040|      1|    if (certTempPermCertLock == NULL) {
  ------------------
  |  Branch (3040:9): [True: 1, False: 0]
  ------------------
 3041|      1|        certTempPermCertLock = PZ_NewLock(nssILockCertDB);
  ------------------
  |  |  243|      1|#define PZ_NewLock(t) PR_NewLock()
  ------------------
 3042|      1|        PORT_Assert(certTempPermCertLock != NULL);
  ------------------
  |  |  120|      1|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      1|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3043|      1|        if (!certTempPermCertLock) {
  ------------------
  |  Branch (3043:13): [True: 0, False: 1]
  ------------------
 3044|      0|            PZ_DestroyLock(certTrustLock);
  ------------------
  |  |  244|      0|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
 3045|      0|            PZ_DestroyLock(certRefCountLock);
  ------------------
  |  |  244|      0|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
 3046|      0|            certRefCountLock = NULL;
 3047|      0|            certTrustLock = NULL;
 3048|      0|            return SECFailure;
 3049|      0|        }
 3050|      1|    }
 3051|       |
 3052|      1|    return SECSuccess;
 3053|      1|}
cert_DestroyLocks:
 3057|      1|{
 3058|      1|    SECStatus rv = SECSuccess;
 3059|       |
 3060|      1|    PORT_Assert(certRefCountLock != NULL);
  ------------------
  |  |  120|      1|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      1|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3061|      1|    if (certRefCountLock) {
  ------------------
  |  Branch (3061:9): [True: 1, False: 0]
  ------------------
 3062|      1|        PZ_DestroyLock(certRefCountLock);
  ------------------
  |  |  244|      1|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
 3063|      1|        certRefCountLock = NULL;
 3064|      1|    } else {
 3065|      0|        rv = SECFailure;
 3066|      0|    }
 3067|       |
 3068|      1|    PORT_Assert(certTrustLock != NULL);
  ------------------
  |  |  120|      1|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      1|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3069|      1|    if (certTrustLock) {
  ------------------
  |  Branch (3069:9): [True: 1, False: 0]
  ------------------
 3070|      1|        PZ_DestroyLock(certTrustLock);
  ------------------
  |  |  244|      1|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
 3071|      1|        certTrustLock = NULL;
 3072|      1|    } else {
 3073|      0|        rv = SECFailure;
 3074|      0|    }
 3075|       |
 3076|      1|    PORT_Assert(certTempPermCertLock != NULL);
  ------------------
  |  |  120|      1|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      1|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3077|      1|    if (certTempPermCertLock) {
  ------------------
  |  Branch (3077:9): [True: 1, False: 0]
  ------------------
 3078|      1|        PZ_DestroyLock(certTempPermCertLock);
  ------------------
  |  |  244|      1|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
 3079|      1|        certTempPermCertLock = NULL;
 3080|      1|    } else {
 3081|      0|        rv = SECFailure;
 3082|      0|    }
 3083|      1|    return rv;
 3084|      1|}
CERT_UnlockCertTrust:
 3091|  10.1k|{
 3092|  10.1k|    PORT_Assert(certTrustLock != NULL);
  ------------------
  |  |  120|  10.1k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  10.1k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 10.1k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3093|  10.1k|    PRStatus prstat = PZ_Unlock(certTrustLock);
  ------------------
  |  |  246|  10.1k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
 3094|  10.1k|    PORT_AssertArg(prstat == PR_SUCCESS);
  ------------------
  |  |  124|  10.1k|#define PORT_AssertArg PR_ASSERT_ARG
  |  |  ------------------
  |  |  |  |  210|  10.1k|#define PR_ASSERT_ARG(_expr) PR_ASSERT(_expr)
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|  10.1k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 10.1k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3095|  10.1k|}
CERT_UnlockCertTempPerm:
 3102|  24.9k|{
 3103|  24.9k|    PORT_Assert(certTempPermCertLock != NULL);
  ------------------
  |  |  120|  24.9k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  24.9k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 24.9k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3104|  24.9k|    PRStatus prstat = PZ_Unlock(certTempPermCertLock);
  ------------------
  |  |  246|  24.9k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
 3105|  24.9k|    PORT_AssertArg(prstat == PR_SUCCESS);
  ------------------
  |  |  124|  24.9k|#define PORT_AssertArg PR_ASSERT_ARG
  |  |  ------------------
  |  |  |  |  210|  24.9k|#define PR_ASSERT_ARG(_expr) PR_ASSERT(_expr)
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|  24.9k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 24.9k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3106|  24.9k|}
CERT_MaybeUnlockCertTempPerm:
 3110|  9.63k|{
 3111|  9.63k|    if (certTempPermCertLock) {
  ------------------
  |  Branch (3111:9): [True: 9.63k, False: 0]
  ------------------
 3112|  9.63k|        PZ_Unlock(certTempPermCertLock);
  ------------------
  |  |  246|  9.63k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
 3113|  9.63k|    }
 3114|  9.63k|}
cert_CreateSubjectKeyIDSlotCheckHash:
 3178|      1|{
 3179|       |    /*
 3180|       |     * This hash is used to remember the series of a slot
 3181|       |     * when we last checked for user certs
 3182|       |     */
 3183|      1|    gSubjKeyIDSlotCheckHash =
 3184|      1|        PL_NewHashTable(0, SECITEM_Hash, SECITEM_HashCompare,
 3185|      1|                        SECITEM_HashCompare, &cert_AllocOps, NULL);
 3186|      1|    if (!gSubjKeyIDSlotCheckHash) {
  ------------------
  |  Branch (3186:9): [True: 0, False: 1]
  ------------------
 3187|      0|        PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 3188|      0|        return SECFailure;
 3189|      0|    }
 3190|      1|    gSubjKeyIDSlotCheckLock = PR_NewLock();
 3191|      1|    if (!gSubjKeyIDSlotCheckLock) {
  ------------------
  |  Branch (3191:9): [True: 0, False: 1]
  ------------------
 3192|      0|        PL_HashTableDestroy(gSubjKeyIDSlotCheckHash);
 3193|      0|        gSubjKeyIDSlotCheckHash = NULL;
 3194|      0|        PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 3195|      0|        return SECFailure;
 3196|      0|    }
 3197|      1|    return SECSuccess;
 3198|      1|}
cert_CreateSubjectKeyIDHashTable:
 3202|      1|{
 3203|      1|    gSubjKeyIDHash = PL_NewHashTable(0, SECITEM_Hash, SECITEM_HashCompare,
 3204|      1|                                     SECITEM_HashCompare, &cert_AllocOps, NULL);
 3205|      1|    if (!gSubjKeyIDHash) {
  ------------------
  |  Branch (3205:9): [True: 0, False: 1]
  ------------------
 3206|      0|        PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 3207|      0|        return SECFailure;
 3208|      0|    }
 3209|      1|    gSubjKeyIDLock = PR_NewLock();
 3210|      1|    if (!gSubjKeyIDLock) {
  ------------------
  |  Branch (3210:9): [True: 0, False: 1]
  ------------------
 3211|      0|        PL_HashTableDestroy(gSubjKeyIDHash);
 3212|      0|        gSubjKeyIDHash = NULL;
 3213|      0|        PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 3214|      0|        return SECFailure;
 3215|      0|    }
 3216|       |    /* initialize the companion hash (for remembering slot series) */
 3217|      1|    if (cert_CreateSubjectKeyIDSlotCheckHash() != SECSuccess) {
  ------------------
  |  Branch (3217:9): [True: 0, False: 1]
  ------------------
 3218|      0|        cert_DestroySubjectKeyIDHashTable();
 3219|      0|        return SECFailure;
 3220|      0|    }
 3221|      1|    return SECSuccess;
 3222|      1|}
cert_DestroySubjectKeyIDSlotCheckHash:
 3355|      1|{
 3356|      1|    if (gSubjKeyIDSlotCheckHash) {
  ------------------
  |  Branch (3356:9): [True: 1, False: 0]
  ------------------
 3357|      1|        PR_Lock(gSubjKeyIDSlotCheckLock);
 3358|      1|        PL_HashTableDestroy(gSubjKeyIDSlotCheckHash);
 3359|      1|        gSubjKeyIDSlotCheckHash = NULL;
 3360|      1|        PR_Unlock(gSubjKeyIDSlotCheckLock);
 3361|      1|        PR_DestroyLock(gSubjKeyIDSlotCheckLock);
 3362|      1|        gSubjKeyIDSlotCheckLock = NULL;
 3363|      1|    }
 3364|      1|    return SECSuccess;
 3365|      1|}
cert_DestroySubjectKeyIDHashTable:
 3369|      1|{
 3370|      1|    if (gSubjKeyIDHash) {
  ------------------
  |  Branch (3370:9): [True: 1, False: 0]
  ------------------
 3371|      1|        PR_Lock(gSubjKeyIDLock);
 3372|      1|        PL_HashTableDestroy(gSubjKeyIDHash);
 3373|      1|        gSubjKeyIDHash = NULL;
 3374|      1|        PR_Unlock(gSubjKeyIDLock);
 3375|      1|        PR_DestroyLock(gSubjKeyIDLock);
 3376|      1|        gSubjKeyIDLock = NULL;
 3377|      1|    }
 3378|      1|    cert_DestroySubjectKeyIDSlotCheckHash();
 3379|      1|    return SECSuccess;
 3380|      1|}
certdb.c:findOIDinOIDSeqByTagNum:
  410|    882|{
  411|    882|    SECItem **oids;
  412|    882|    SECItem *oid;
  413|    882|    SECStatus rv = SECFailure;
  414|       |
  415|    882|    if (seq != NULL) {
  ------------------
  |  Branch (415:9): [True: 882, False: 0]
  ------------------
  416|    882|        oids = seq->oids;
  417|    966|        while (oids != NULL && *oids != NULL) {
  ------------------
  |  Branch (417:16): [True: 966, False: 0]
  |  Branch (417:32): [True: 84, False: 882]
  ------------------
  418|     84|            oid = *oids;
  419|     84|            if (SECOID_FindOIDTag(oid) == tagnum) {
  ------------------
  |  |  117|     84|#define SECOID_FindOIDTag SECOID_FindOIDTag_Util
  ------------------
  |  Branch (419:17): [True: 0, False: 84]
  ------------------
  420|      0|                rv = SECSuccess;
  421|      0|                break;
  422|      0|            }
  423|     84|            oids++;
  424|     84|        }
  425|    882|    }
  426|    882|    return rv;
  427|    882|}
certdb.c:GetKeyUsage:
  380|  5.09k|{
  381|  5.09k|    SECStatus rv;
  382|  5.09k|    SECItem tmpitem;
  383|       |
  384|  5.09k|    rv = CERT_FindKeyUsageExtension(cert, &tmpitem);
  385|  5.09k|    if (rv == SECSuccess) {
  ------------------
  |  Branch (385:9): [True: 2.18k, False: 2.90k]
  ------------------
  386|       |        /* remember the actual value of the extension */
  387|  2.18k|        cert->rawKeyUsage = tmpitem.len ? tmpitem.data[0] : 0;
  ------------------
  |  Branch (387:29): [True: 2.18k, False: 0]
  ------------------
  388|  2.18k|        cert->keyUsagePresent = PR_TRUE;
  ------------------
  |  |  437|  2.18k|#define PR_TRUE 1
  ------------------
  389|  2.18k|        cert->keyUsage = cert->rawKeyUsage;
  390|       |
  391|  2.18k|        PORT_Free(tmpitem.data);
  ------------------
  |  |   60|  2.18k|#define PORT_Free PORT_Free_Util
  ------------------
  392|  2.18k|        tmpitem.data = NULL;
  393|  2.90k|    } else {
  394|       |        /* if the extension is not present, then we allow all uses */
  395|  2.90k|        cert->keyUsage = KU_ALL;
  ------------------
  |  |  571|  2.90k|    (KU_DIGITAL_SIGNATURE | KU_NON_REPUDIATION | KU_KEY_ENCIPHERMENT | \
  |  |  ------------------
  |  |  |  |  562|  2.90k|#define KU_DIGITAL_SIGNATURE (0x80) /* bit 0 */
  |  |  ------------------
  |  |                   (KU_DIGITAL_SIGNATURE | KU_NON_REPUDIATION | KU_KEY_ENCIPHERMENT | \
  |  |  ------------------
  |  |  |  |  563|  2.90k|#define KU_NON_REPUDIATION (0x40)   /* bit 1 */
  |  |  ------------------
  |  |                   (KU_DIGITAL_SIGNATURE | KU_NON_REPUDIATION | KU_KEY_ENCIPHERMENT | \
  |  |  ------------------
  |  |  |  |  564|  2.90k|#define KU_KEY_ENCIPHERMENT (0x20)  /* bit 2 */
  |  |  ------------------
  |  |  572|  2.90k|     KU_DATA_ENCIPHERMENT | KU_KEY_AGREEMENT | KU_KEY_CERT_SIGN |      \
  |  |  ------------------
  |  |  |  |  565|  2.90k|#define KU_DATA_ENCIPHERMENT (0x10) /* bit 3 */
  |  |  ------------------
  |  |                    KU_DATA_ENCIPHERMENT | KU_KEY_AGREEMENT | KU_KEY_CERT_SIGN |      \
  |  |  ------------------
  |  |  |  |  566|  2.90k|#define KU_KEY_AGREEMENT (0x08)     /* bit 4 */
  |  |  ------------------
  |  |                    KU_DATA_ENCIPHERMENT | KU_KEY_AGREEMENT | KU_KEY_CERT_SIGN |      \
  |  |  ------------------
  |  |  |  |  567|  2.90k|#define KU_KEY_CERT_SIGN (0x04)     /* bit 5 */
  |  |  ------------------
  |  |  573|  2.90k|     KU_CRL_SIGN | KU_ENCIPHER_ONLY)
  |  |  ------------------
  |  |  |  |  568|  2.90k|#define KU_CRL_SIGN (0x02)          /* bit 6 */
  |  |  ------------------
  |  |                    KU_CRL_SIGN | KU_ENCIPHER_ONLY)
  |  |  ------------------
  |  |  |  |  569|  2.90k|#define KU_ENCIPHER_ONLY (0x01)     /* bit 7 */
  |  |  ------------------
  ------------------
  396|  2.90k|        cert->rawKeyUsage = KU_ALL;
  ------------------
  |  |  571|  2.90k|    (KU_DIGITAL_SIGNATURE | KU_NON_REPUDIATION | KU_KEY_ENCIPHERMENT | \
  |  |  ------------------
  |  |  |  |  562|  2.90k|#define KU_DIGITAL_SIGNATURE (0x80) /* bit 0 */
  |  |  ------------------
  |  |                   (KU_DIGITAL_SIGNATURE | KU_NON_REPUDIATION | KU_KEY_ENCIPHERMENT | \
  |  |  ------------------
  |  |  |  |  563|  2.90k|#define KU_NON_REPUDIATION (0x40)   /* bit 1 */
  |  |  ------------------
  |  |                   (KU_DIGITAL_SIGNATURE | KU_NON_REPUDIATION | KU_KEY_ENCIPHERMENT | \
  |  |  ------------------
  |  |  |  |  564|  2.90k|#define KU_KEY_ENCIPHERMENT (0x20)  /* bit 2 */
  |  |  ------------------
  |  |  572|  2.90k|     KU_DATA_ENCIPHERMENT | KU_KEY_AGREEMENT | KU_KEY_CERT_SIGN |      \
  |  |  ------------------
  |  |  |  |  565|  2.90k|#define KU_DATA_ENCIPHERMENT (0x10) /* bit 3 */
  |  |  ------------------
  |  |                    KU_DATA_ENCIPHERMENT | KU_KEY_AGREEMENT | KU_KEY_CERT_SIGN |      \
  |  |  ------------------
  |  |  |  |  566|  2.90k|#define KU_KEY_AGREEMENT (0x08)     /* bit 4 */
  |  |  ------------------
  |  |                    KU_DATA_ENCIPHERMENT | KU_KEY_AGREEMENT | KU_KEY_CERT_SIGN |      \
  |  |  ------------------
  |  |  |  |  567|  2.90k|#define KU_KEY_CERT_SIGN (0x04)     /* bit 5 */
  |  |  ------------------
  |  |  573|  2.90k|     KU_CRL_SIGN | KU_ENCIPHER_ONLY)
  |  |  ------------------
  |  |  |  |  568|  2.90k|#define KU_CRL_SIGN (0x02)          /* bit 6 */
  |  |  ------------------
  |  |                    KU_CRL_SIGN | KU_ENCIPHER_ONLY)
  |  |  ------------------
  |  |  |  |  569|  2.90k|#define KU_ENCIPHER_ONLY (0x01)     /* bit 7 */
  |  |  ------------------
  ------------------
  397|  2.90k|        cert->keyUsagePresent = PR_FALSE;
  ------------------
  |  |  438|  2.90k|#define PR_FALSE 0
  ------------------
  398|  2.90k|    }
  399|       |
  400|  5.09k|    if (CERT_GovtApprovedBitSet(cert)) {
  ------------------
  |  Branch (400:9): [True: 0, False: 5.09k]
  ------------------
  401|      0|        cert->keyUsage |= KU_NS_GOVT_APPROVED;
  ------------------
  |  |  589|      0|#define KU_NS_GOVT_APPROVED (0x8000) /*don't make part of KU_ALL!*/
  ------------------
  402|      0|        cert->rawKeyUsage |= KU_NS_GOVT_APPROVED;
  ------------------
  |  |  589|      0|#define KU_NS_GOVT_APPROVED (0x8000) /*don't make part of KU_ALL!*/
  ------------------
  403|      0|    }
  404|       |
  405|  5.09k|    return (SECSuccess);
  406|  5.09k|}
certdb.c:cert_IsRootCert:
  659|  5.09k|{
  660|  5.09k|    SECStatus rv;
  661|  5.09k|    SECItem tmpitem;
  662|       |
  663|       |    /* cache the authKeyID extension, if present */
  664|  5.09k|    cert->authKeyID = CERT_FindAuthKeyIDExten(cert->arena, cert);
  665|       |
  666|       |    /* it MUST be self-issued to be a root */
  667|  5.09k|    if (cert->derIssuer.len == 0 ||
  ------------------
  |  Branch (667:9): [True: 0, False: 5.09k]
  ------------------
  668|  5.09k|        !SECITEM_ItemsAreEqual(&cert->derIssuer, &cert->derSubject)) {
  ------------------
  |  |  109|  5.09k|#define SECITEM_ItemsAreEqual SECITEM_ItemsAreEqual_Util
  ------------------
  |  Branch (668:9): [True: 4.32k, False: 770]
  ------------------
  669|  4.32k|        return PR_FALSE;
  ------------------
  |  |  438|  4.32k|#define PR_FALSE 0
  ------------------
  670|  4.32k|    }
  671|       |
  672|       |    /* check the authKeyID extension */
  673|    770|    if (cert->authKeyID) {
  ------------------
  |  Branch (673:9): [True: 10, False: 760]
  ------------------
  674|       |        /* authority key identifier is present */
  675|     10|        if (cert->authKeyID->keyID.len > 0) {
  ------------------
  |  Branch (675:13): [True: 5, False: 5]
  ------------------
  676|       |            /* the keyIdentifier field is set, look for subjectKeyID */
  677|      5|            rv = CERT_FindSubjectKeyIDExtension(cert, &tmpitem);
  678|      5|            if (rv == SECSuccess) {
  ------------------
  |  Branch (678:17): [True: 3, False: 2]
  ------------------
  679|      3|                PRBool match;
  680|       |                /* also present, they MUST match for it to be a root */
  681|      3|                match =
  682|      3|                    SECITEM_ItemsAreEqual(&cert->authKeyID->keyID, &tmpitem);
  ------------------
  |  |  109|      3|#define SECITEM_ItemsAreEqual SECITEM_ItemsAreEqual_Util
  ------------------
  683|      3|                PORT_Free(tmpitem.data);
  ------------------
  |  |   60|      3|#define PORT_Free PORT_Free_Util
  ------------------
  684|      3|                if (!match)
  ------------------
  |  Branch (684:21): [True: 1, False: 2]
  ------------------
  685|      1|                    return PR_FALSE; /* else fall through */
  ------------------
  |  |  438|      1|#define PR_FALSE 0
  ------------------
  686|      3|            } else {
  687|       |                /* the subject key ID is required when AKI is present */
  688|      2|                return PR_FALSE;
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
  689|      2|            }
  690|      5|        }
  691|      7|        if (cert->authKeyID->authCertIssuer) {
  ------------------
  |  Branch (691:13): [True: 0, False: 7]
  ------------------
  692|      0|            SECItem *caName;
  693|      0|            caName = (SECItem *)CERT_GetGeneralNameByType(
  694|      0|                cert->authKeyID->authCertIssuer, certDirectoryName, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  695|      0|            if (caName) {
  ------------------
  |  Branch (695:17): [True: 0, False: 0]
  ------------------
  696|      0|                if (!SECITEM_ItemsAreEqual(&cert->derIssuer, caName)) {
  ------------------
  |  |  109|      0|#define SECITEM_ItemsAreEqual SECITEM_ItemsAreEqual_Util
  ------------------
  |  Branch (696:21): [True: 0, False: 0]
  ------------------
  697|      0|                    return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  698|      0|                } /* else fall through */
  699|      0|            }     /* else ??? could not get general name as directory name? */
  700|      0|        }
  701|      7|        if (cert->authKeyID->authCertSerialNumber.len > 0) {
  ------------------
  |  Branch (701:13): [True: 1, False: 6]
  ------------------
  702|      1|            if (!SECITEM_ItemsAreEqual(
  ------------------
  |  |  109|      1|#define SECITEM_ItemsAreEqual SECITEM_ItemsAreEqual_Util
  ------------------
  |  Branch (702:17): [True: 1, False: 0]
  ------------------
  703|      1|                    &cert->serialNumber,
  704|      1|                    &cert->authKeyID->authCertSerialNumber)) {
  705|      1|                return PR_FALSE;
  ------------------
  |  |  438|      1|#define PR_FALSE 0
  ------------------
  706|      1|            } /* else fall through */
  707|      1|        }
  708|       |        /* all of the AKI fields that were present passed the test */
  709|      6|        return PR_TRUE;
  ------------------
  |  |  437|      6|#define PR_TRUE 1
  ------------------
  710|      7|    }
  711|       |    /* else the AKI was not present, so this is a root */
  712|    760|    return PR_TRUE;
  ------------------
  |  |  437|    760|#define PR_TRUE 1
  ------------------
  713|    770|}
certdb.c:cert_Version:
 2055|    754|{
 2056|    754|    int version = 0;
 2057|    754|    if (cert && cert->version.data && cert->version.len) {
  ------------------
  |  Branch (2057:9): [True: 754, False: 0]
  |  Branch (2057:17): [True: 753, False: 1]
  |  Branch (2057:39): [True: 753, False: 0]
  ------------------
 2058|    753|        version = DER_GetInteger(&cert->version);
  ------------------
  |  |   27|    753|#define DER_GetInteger DER_GetInteger_Util
  ------------------
 2059|    753|        if (version < 0)
  ------------------
  |  Branch (2059:13): [True: 15, False: 738]
  ------------------
 2060|     15|            version = 0;
 2061|    753|    }
 2062|    754|    return version;
 2063|    754|}
certdb.c:cert_ComputeTrustOverrides:
 2067|  5.02k|{
 2068|  5.02k|    CERTCertTrust trust;
 2069|  5.02k|    SECStatus rv = SECFailure;
 2070|       |
 2071|  5.02k|    rv = CERT_GetCertTrust(cert, &trust);
 2072|       |
 2073|  5.02k|    if (rv == SECSuccess &&
  ------------------
  |  Branch (2073:9): [True: 0, False: 5.02k]
  ------------------
 2074|  5.02k|        (trust.sslFlags | trust.emailFlags | trust.objectSigningFlags)) {
  ------------------
  |  Branch (2074:9): [True: 0, False: 0]
  ------------------
 2075|       |
 2076|      0|        if (trust.sslFlags & (CERTDB_TERMINAL_RECORD | CERTDB_TRUSTED))
  ------------------
  |  |    9|      0|#define CERTDB_TERMINAL_RECORD (1u << 0)
  ------------------
                      if (trust.sslFlags & (CERTDB_TERMINAL_RECORD | CERTDB_TRUSTED))
  ------------------
  |  |   10|      0|#define CERTDB_TRUSTED (1u << 1)
  ------------------
  |  Branch (2076:13): [True: 0, False: 0]
  ------------------
 2077|      0|            cType |= NS_CERT_TYPE_SSL_SERVER | NS_CERT_TYPE_SSL_CLIENT;
  ------------------
  |  |  448|      0|#define NS_CERT_TYPE_SSL_SERVER (0x40)        /* bit 1 */
  ------------------
                          cType |= NS_CERT_TYPE_SSL_SERVER | NS_CERT_TYPE_SSL_CLIENT;
  ------------------
  |  |  447|      0|#define NS_CERT_TYPE_SSL_CLIENT (0x80)        /* bit 0 */
  ------------------
 2078|      0|        if (trust.sslFlags & (CERTDB_VALID_CA | CERTDB_TRUSTED_CA))
  ------------------
  |  |   12|      0|#define CERTDB_VALID_CA (1u << 3)
  ------------------
                      if (trust.sslFlags & (CERTDB_VALID_CA | CERTDB_TRUSTED_CA))
  ------------------
  |  |   13|      0|#define CERTDB_TRUSTED_CA (1u << 4) /* trusted for issuing server certs */
  ------------------
  |  Branch (2078:13): [True: 0, False: 0]
  ------------------
 2079|      0|            cType |= NS_CERT_TYPE_SSL_CA;
  ------------------
  |  |  452|      0|#define NS_CERT_TYPE_SSL_CA (0x04)            /* bit 5 */
  ------------------
 2080|       |#if defined(CERTDB_NOT_TRUSTED)
 2081|       |        if (trust.sslFlags & CERTDB_NOT_TRUSTED)
 2082|       |            cType &= ~(NS_CERT_TYPE_SSL_SERVER | NS_CERT_TYPE_SSL_CLIENT |
 2083|       |                       NS_CERT_TYPE_SSL_CA);
 2084|       |#endif
 2085|      0|        if (trust.emailFlags & (CERTDB_TERMINAL_RECORD | CERTDB_TRUSTED))
  ------------------
  |  |    9|      0|#define CERTDB_TERMINAL_RECORD (1u << 0)
  ------------------
                      if (trust.emailFlags & (CERTDB_TERMINAL_RECORD | CERTDB_TRUSTED))
  ------------------
  |  |   10|      0|#define CERTDB_TRUSTED (1u << 1)
  ------------------
  |  Branch (2085:13): [True: 0, False: 0]
  ------------------
 2086|      0|            cType |= NS_CERT_TYPE_EMAIL;
  ------------------
  |  |  449|      0|#define NS_CERT_TYPE_EMAIL (0x20)             /* bit 2 */
  ------------------
 2087|      0|        if (trust.emailFlags & (CERTDB_VALID_CA | CERTDB_TRUSTED_CA))
  ------------------
  |  |   12|      0|#define CERTDB_VALID_CA (1u << 3)
  ------------------
                      if (trust.emailFlags & (CERTDB_VALID_CA | CERTDB_TRUSTED_CA))
  ------------------
  |  |   13|      0|#define CERTDB_TRUSTED_CA (1u << 4) /* trusted for issuing server certs */
  ------------------
  |  Branch (2087:13): [True: 0, False: 0]
  ------------------
 2088|      0|            cType |= NS_CERT_TYPE_EMAIL_CA;
  ------------------
  |  |  453|      0|#define NS_CERT_TYPE_EMAIL_CA (0x02)          /* bit 6 */
  ------------------
 2089|       |#if defined(CERTDB_NOT_TRUSTED)
 2090|       |        if (trust.emailFlags & CERTDB_NOT_TRUSTED)
 2091|       |            cType &= ~(NS_CERT_TYPE_EMAIL | NS_CERT_TYPE_EMAIL_CA);
 2092|       |#endif
 2093|      0|        if (trust.objectSigningFlags &
  ------------------
  |  Branch (2093:13): [True: 0, False: 0]
  ------------------
 2094|      0|            (CERTDB_TERMINAL_RECORD | CERTDB_TRUSTED))
  ------------------
  |  |    9|      0|#define CERTDB_TERMINAL_RECORD (1u << 0)
  ------------------
                          (CERTDB_TERMINAL_RECORD | CERTDB_TRUSTED))
  ------------------
  |  |   10|      0|#define CERTDB_TRUSTED (1u << 1)
  ------------------
 2095|      0|            cType |= NS_CERT_TYPE_OBJECT_SIGNING;
  ------------------
  |  |  450|      0|#define NS_CERT_TYPE_OBJECT_SIGNING (0x10)    /* bit 3 */
  ------------------
 2096|      0|        if (trust.objectSigningFlags & (CERTDB_VALID_CA | CERTDB_TRUSTED_CA))
  ------------------
  |  |   12|      0|#define CERTDB_VALID_CA (1u << 3)
  ------------------
                      if (trust.objectSigningFlags & (CERTDB_VALID_CA | CERTDB_TRUSTED_CA))
  ------------------
  |  |   13|      0|#define CERTDB_TRUSTED_CA (1u << 4) /* trusted for issuing server certs */
  ------------------
  |  Branch (2096:13): [True: 0, False: 0]
  ------------------
 2097|      0|            cType |= NS_CERT_TYPE_OBJECT_SIGNING_CA;
  ------------------
  |  |  454|      0|#define NS_CERT_TYPE_OBJECT_SIGNING_CA (0x01) /* bit 7 */
  ------------------
 2098|       |#if defined(CERTDB_NOT_TRUSTED)
 2099|       |        if (trust.objectSigningFlags & CERTDB_NOT_TRUSTED)
 2100|       |            cType &=
 2101|       |                ~(NS_CERT_TYPE_OBJECT_SIGNING | NS_CERT_TYPE_OBJECT_SIGNING_CA);
 2102|       |#endif
 2103|      0|    }
 2104|  5.02k|    return cType;
 2105|  5.02k|}
certdb.c:cert_AllocTable:
 3147|      4|{
 3148|      4|    return PORT_Alloc(size);
  ------------------
  |  |   52|      4|#define PORT_Alloc PORT_Alloc_Util
  ------------------
 3149|      4|}
certdb.c:cert_FreeTable:
 3153|      4|{
 3154|      4|    PORT_Free(item);
  ------------------
  |  |   60|      4|#define PORT_Free PORT_Free_Util
  ------------------
 3155|      4|}

CERT_FindCertExtension:
   25|  15.2k|{
   26|  15.2k|    return (cert_FindExtension(cert->extensions, tag, value));
   27|  15.2k|}
CERT_FindNSCertTypeExtension:
   49|  5.09k|{
   50|       |
   51|  5.09k|    return (CERT_FindBitStringExtension(
   52|  5.09k|        cert->extensions, SEC_OID_NS_CERT_EXT_CERT_TYPE, retItem));
   53|  5.09k|}
CERT_FindKeyUsageExtension:
  112|  5.09k|{
  113|       |
  114|  5.09k|    return (CERT_FindBitStringExtension(cert->extensions,
  115|  5.09k|                                        SEC_OID_X509_KEY_USAGE, retItem));
  116|  5.09k|}
CERT_FindSubjectKeyIDExtension:
  123|  5.09k|{
  124|       |
  125|  5.09k|    SECStatus rv;
  126|  5.09k|    SECItem encodedValue = { siBuffer, NULL, 0 };
  127|  5.09k|    SECItem decodedValue = { siBuffer, NULL, 0 };
  128|       |
  129|  5.09k|    rv = cert_FindExtension(cert->extensions, SEC_OID_X509_SUBJECT_KEY_ID,
  130|  5.09k|                            &encodedValue);
  131|  5.09k|    if (rv == SECSuccess) {
  ------------------
  |  Branch (131:9): [True: 61, False: 5.03k]
  ------------------
  132|     61|        PORTCheapArenaPool tmpArena;
  133|     61|        PORT_InitCheapArena(&tmpArena, DER_DEFAULT_CHUNKSIZE);
  ------------------
  |  |   60|     61|#define DER_DEFAULT_CHUNKSIZE (2048)
  ------------------
  134|     61|        rv = SEC_QuickDERDecodeItem(&tmpArena.arena, &decodedValue,
  ------------------
  |  |  102|     61|#define SEC_QuickDERDecodeItem SEC_QuickDERDecodeItem_Util
  ------------------
  135|     61|                                    SEC_ASN1_GET(SEC_OctetStringTemplate),
  ------------------
  |  |  188|     61|#define SEC_ASN1_GET(x) x
  ------------------
  136|     61|                                    &encodedValue);
  137|     61|        if (rv == SECSuccess) {
  ------------------
  |  Branch (137:13): [True: 14, False: 47]
  ------------------
  138|     14|            rv = SECITEM_CopyItem(NULL, retItem, &decodedValue);
  ------------------
  |  |  106|     14|#define SECITEM_CopyItem SECITEM_CopyItem_Util
  ------------------
  139|     14|        }
  140|     61|        PORT_DestroyCheapArena(&tmpArena);
  141|     61|    }
  142|  5.09k|    SECITEM_FreeItem(&encodedValue, PR_FALSE);
  ------------------
  |  |  108|  5.09k|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                  SECITEM_FreeItem(&encodedValue, PR_FALSE);
  ------------------
  |  |  438|  5.09k|#define PR_FALSE 0
  ------------------
  143|  5.09k|    return rv;
  144|  5.09k|}
CERT_FindBasicConstraintExten:
  149|  10.1k|{
  150|  10.1k|    SECItem encodedExtenValue;
  151|  10.1k|    SECStatus rv;
  152|       |
  153|  10.1k|    encodedExtenValue.data = NULL;
  154|  10.1k|    encodedExtenValue.len = 0;
  155|       |
  156|  10.1k|    rv = cert_FindExtension(cert->extensions, SEC_OID_X509_BASIC_CONSTRAINTS,
  157|  10.1k|                            &encodedExtenValue);
  158|  10.1k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (158:9): [True: 4.38k, False: 5.73k]
  ------------------
  159|  4.38k|        return (rv);
  160|  4.38k|    }
  161|       |
  162|  5.73k|    rv = CERT_DecodeBasicConstraintValue(value, &encodedExtenValue);
  163|       |
  164|       |    /* free the raw extension data */
  165|  5.73k|    PORT_Free(encodedExtenValue.data);
  ------------------
  |  |   60|  5.73k|#define PORT_Free PORT_Free_Util
  ------------------
  166|  5.73k|    encodedExtenValue.data = NULL;
  167|       |
  168|  5.73k|    return (rv);
  169|  10.1k|}
CERT_FindAuthKeyIDExten:
  173|  5.09k|{
  174|  5.09k|    SECItem encodedExtenValue;
  175|  5.09k|    SECStatus rv;
  176|  5.09k|    CERTAuthKeyID *ret;
  177|       |
  178|  5.09k|    encodedExtenValue.data = NULL;
  179|  5.09k|    encodedExtenValue.len = 0;
  180|       |
  181|  5.09k|    rv = cert_FindExtension(cert->extensions, SEC_OID_X509_AUTH_KEY_ID,
  182|  5.09k|                            &encodedExtenValue);
  183|  5.09k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (183:9): [True: 4.91k, False: 181]
  ------------------
  184|  4.91k|        return (NULL);
  185|  4.91k|    }
  186|       |
  187|    181|    ret = CERT_DecodeAuthKeyID(arena, &encodedExtenValue);
  188|       |
  189|    181|    PORT_Free(encodedExtenValue.data);
  ------------------
  |  |   60|    181|#define PORT_Free PORT_Free_Util
  ------------------
  190|    181|    encodedExtenValue.data = NULL;
  191|       |
  192|    181|    return (ret);
  193|  5.09k|}

cert_FindExtensionByOID:
   49|  45.7k|{
   50|  45.7k|    CERTCertExtension *ext;
   51|  45.7k|    SECStatus rv = SECSuccess;
   52|       |
   53|  45.7k|    ext = GetExtension(extensions, oid);
   54|  45.7k|    if (ext == NULL) {
  ------------------
  |  Branch (54:9): [True: 34.8k, False: 10.8k]
  ------------------
   55|  34.8k|        PORT_SetError(SEC_ERROR_EXTENSION_NOT_FOUND);
  ------------------
  |  |   65|  34.8k|#define PORT_SetError PORT_SetError_Util
  ------------------
   56|  34.8k|        return (SECFailure);
   57|  34.8k|    }
   58|  10.8k|    if (value)
  ------------------
  |  Branch (58:9): [True: 10.8k, False: 0]
  ------------------
   59|  10.8k|        rv = SECITEM_CopyItem(NULL, value, &ext->value);
  ------------------
  |  |  106|  10.8k|#define SECITEM_CopyItem SECITEM_CopyItem_Util
  ------------------
   60|  10.8k|    return (rv);
   61|  45.7k|}
cert_FindExtension:
   95|  45.7k|{
   96|  45.7k|    SECOidData *oid;
   97|       |
   98|  45.7k|    oid = SECOID_FindOIDByTag((SECOidTag)tag);
  ------------------
  |  |  116|  45.7k|#define SECOID_FindOIDByTag SECOID_FindOIDByTag_Util
  ------------------
   99|  45.7k|    if (!oid) {
  ------------------
  |  Branch (99:9): [True: 0, False: 45.7k]
  ------------------
  100|      0|        return (SECFailure);
  101|      0|    }
  102|       |
  103|  45.7k|    return (cert_FindExtensionByOID(extensions, &oid->oid, value));
  104|  45.7k|}
CERT_FindBitStringExtension:
  397|  10.1k|{
  398|  10.1k|    SECItem wrapperItem, tmpItem = { siBuffer, 0 };
  399|  10.1k|    SECStatus rv;
  400|  10.1k|    PORTCheapArenaPool tmpArena;
  401|       |
  402|  10.1k|    wrapperItem.data = NULL;
  403|  10.1k|    tmpItem.data = NULL;
  404|       |
  405|  10.1k|    PORT_InitCheapArena(&tmpArena, DER_DEFAULT_CHUNKSIZE);
  ------------------
  |  |   60|  10.1k|#define DER_DEFAULT_CHUNKSIZE (2048)
  ------------------
  406|       |
  407|  10.1k|    rv = cert_FindExtension(extensions, tag, &wrapperItem);
  408|  10.1k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (408:9): [True: 7.13k, False: 3.05k]
  ------------------
  409|  7.13k|        goto loser;
  410|  7.13k|    }
  411|       |
  412|  3.05k|    rv = SEC_QuickDERDecodeItem(&tmpArena.arena, &tmpItem,
  ------------------
  |  |  102|  3.05k|#define SEC_QuickDERDecodeItem SEC_QuickDERDecodeItem_Util
  ------------------
  413|  3.05k|                                SEC_ASN1_GET(SEC_BitStringTemplate),
  ------------------
  |  |  188|  3.05k|#define SEC_ASN1_GET(x) x
  ------------------
  414|  3.05k|                                &wrapperItem);
  415|       |
  416|  3.05k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (416:9): [True: 868, False: 2.18k]
  ------------------
  417|    868|        goto loser;
  418|    868|    }
  419|       |
  420|  2.18k|    retItem->data = (unsigned char *)PORT_ZAlloc((tmpItem.len + 7) >> 3);
  ------------------
  |  |   72|  2.18k|#define PORT_ZAlloc PORT_ZAlloc_Util
  ------------------
  421|  2.18k|    if (retItem->data == NULL) {
  ------------------
  |  Branch (421:9): [True: 0, False: 2.18k]
  ------------------
  422|      0|        goto loser;
  423|      0|    }
  424|       |
  425|  2.18k|    if (tmpItem.len > 0) {
  ------------------
  |  Branch (425:9): [True: 2.18k, False: 0]
  ------------------
  426|  2.18k|        PORT_Memcpy(retItem->data, tmpItem.data, (tmpItem.len + 7) >> 3);
  ------------------
  |  |  180|  2.18k|#define PORT_Memcpy memcpy
  ------------------
  427|  2.18k|    }
  428|       |
  429|  2.18k|    retItem->len = tmpItem.len;
  430|       |
  431|  2.18k|    rv = SECSuccess;
  432|  2.18k|    goto done;
  433|       |
  434|  7.99k|loser:
  435|  7.99k|    rv = SECFailure;
  436|       |
  437|  10.1k|done:
  438|  10.1k|    PORT_DestroyCheapArena(&tmpArena);
  439|       |
  440|  10.1k|    if (wrapperItem.data) {
  ------------------
  |  Branch (440:9): [True: 3.05k, False: 7.13k]
  ------------------
  441|  3.05k|        PORT_Free(wrapperItem.data);
  ------------------
  |  |   60|  3.05k|#define PORT_Free PORT_Free_Util
  ------------------
  442|  3.05k|    }
  443|       |
  444|  10.1k|    return (rv);
  445|  7.99k|}
cert_HasUnknownCriticalExten:
  472|  5.09k|{
  473|  5.09k|    CERTCertExtension **exts;
  474|  5.09k|    CERTCertExtension *ext = NULL;
  475|  5.09k|    PRBool hasUnknownCriticalExten = PR_FALSE;
  ------------------
  |  |  438|  5.09k|#define PR_FALSE 0
  ------------------
  476|       |
  477|  5.09k|    exts = extensions;
  478|       |
  479|  5.09k|    if (exts) {
  ------------------
  |  Branch (479:9): [True: 5.08k, False: 2]
  ------------------
  480|  14.9k|        while (*exts) {
  ------------------
  |  Branch (480:16): [True: 9.84k, False: 5.07k]
  ------------------
  481|  9.84k|            ext = *exts;
  482|       |            /* If the criticality is omitted, it's non-critical.
  483|       |               If an extension is critical, make sure that we know
  484|       |               how to process the extension.
  485|       |             */
  486|  9.84k|            if (ext->critical.data && ext->critical.data[0] == 0xff) {
  ------------------
  |  Branch (486:17): [True: 43, False: 9.80k]
  |  Branch (486:39): [True: 29, False: 14]
  ------------------
  487|     29|                if (SECOID_KnownCertExtenOID(&ext->id) == PR_FALSE) {
  ------------------
  |  |  438|     29|#define PR_FALSE 0
  ------------------
  |  Branch (487:21): [True: 15, False: 14]
  ------------------
  488|     15|                    hasUnknownCriticalExten = PR_TRUE;
  ------------------
  |  |  437|     15|#define PR_TRUE 1
  ------------------
  489|     15|                    break;
  490|     15|                }
  491|     29|            }
  492|  9.82k|            exts++;
  493|  9.82k|        }
  494|  5.08k|    }
  495|  5.09k|    return (hasUnknownCriticalExten);
  496|  5.09k|}
certxutl.c:GetExtension:
   25|  45.7k|{
   26|  45.7k|    CERTCertExtension **exts;
   27|  45.7k|    CERTCertExtension *ext = NULL;
   28|  45.7k|    SECComparison comp;
   29|       |
   30|  45.7k|    exts = extensions;
   31|       |
   32|  45.7k|    if (exts) {
  ------------------
  |  Branch (32:9): [True: 45.7k, False: 18]
  ------------------
   33|   116k|        while (*exts) {
  ------------------
  |  Branch (33:16): [True: 81.1k, False: 34.8k]
  ------------------
   34|  81.1k|            ext = *exts;
   35|  81.1k|            comp = SECITEM_CompareItem(oid, &ext->id);
  ------------------
  |  |  105|  81.1k|#define SECITEM_CompareItem SECITEM_CompareItem_Util
  ------------------
   36|  81.1k|            if (comp == SECEqual)
  ------------------
  |  Branch (36:17): [True: 10.8k, False: 70.2k]
  ------------------
   37|  10.8k|                break;
   38|       |
   39|  70.2k|            exts++;
   40|  70.2k|        }
   41|  45.7k|        return (*exts ? ext : NULL);
  ------------------
  |  Branch (41:17): [True: 10.8k, False: 34.8k]
  ------------------
   42|  45.7k|    }
   43|     18|    return (NULL);
   44|  45.7k|}

InitCRLCache:
  962|      1|{
  963|      1|    if (PR_FALSE == crlcache_initialized) {
  ------------------
  |  |  438|      1|#define PR_FALSE 0
  ------------------
  |  Branch (963:9): [True: 1, False: 0]
  ------------------
  964|      1|        PORT_Assert(NULL == crlcache.lock);
  ------------------
  |  |  120|      1|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      1|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  965|      1|        PORT_Assert(NULL == crlcache.issuers);
  ------------------
  |  |  120|      1|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      1|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  966|      1|        PORT_Assert(NULL == namedCRLCache.lock);
  ------------------
  |  |  120|      1|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      1|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  967|      1|        PORT_Assert(NULL == namedCRLCache.entries);
  ------------------
  |  |  120|      1|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      1|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  968|      1|        if (crlcache.lock || crlcache.issuers || namedCRLCache.lock ||
  ------------------
  |  Branch (968:13): [True: 0, False: 1]
  |  Branch (968:30): [True: 0, False: 1]
  |  Branch (968:50): [True: 0, False: 1]
  ------------------
  969|      1|            namedCRLCache.entries) {
  ------------------
  |  Branch (969:13): [True: 0, False: 1]
  ------------------
  970|       |            /* CRL cache already partially initialized */
  971|      0|            PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  972|      0|            return SECFailure;
  973|      0|        }
  974|       |#ifdef GLOBAL_RWLOCK
  975|       |        crlcache.lock = NSSRWLock_New(NSS_RWLOCK_RANK_NONE, NULL);
  976|       |#else
  977|      1|        crlcache.lock = PR_NewLock();
  978|      1|#endif
  979|      1|        namedCRLCache.lock = PR_NewLock();
  980|      1|        crlcache.issuers = PL_NewHashTable(0, SECITEM_Hash, SECITEM_HashCompare,
  981|      1|                                           PL_CompareValues, NULL, NULL);
  982|      1|        namedCRLCache.entries = PL_NewHashTable(
  983|      1|            0, SECITEM_Hash, SECITEM_HashCompare, PL_CompareValues, NULL, NULL);
  984|      1|        if (!crlcache.lock || !namedCRLCache.lock || !crlcache.issuers ||
  ------------------
  |  Branch (984:13): [True: 0, False: 1]
  |  Branch (984:31): [True: 0, False: 1]
  |  Branch (984:54): [True: 0, False: 1]
  ------------------
  985|      1|            !namedCRLCache.entries) {
  ------------------
  |  Branch (985:13): [True: 0, False: 1]
  ------------------
  986|      0|            if (crlcache.lock) {
  ------------------
  |  Branch (986:17): [True: 0, False: 0]
  ------------------
  987|       |#ifdef GLOBAL_RWLOCK
  988|       |                NSSRWLock_Destroy(crlcache.lock);
  989|       |#else
  990|      0|                PR_DestroyLock(crlcache.lock);
  991|      0|#endif
  992|      0|                crlcache.lock = NULL;
  993|      0|            }
  994|      0|            if (namedCRLCache.lock) {
  ------------------
  |  Branch (994:17): [True: 0, False: 0]
  ------------------
  995|      0|                PR_DestroyLock(namedCRLCache.lock);
  996|      0|                namedCRLCache.lock = NULL;
  997|      0|            }
  998|      0|            if (crlcache.issuers) {
  ------------------
  |  Branch (998:17): [True: 0, False: 0]
  ------------------
  999|      0|                PL_HashTableDestroy(crlcache.issuers);
 1000|      0|                crlcache.issuers = NULL;
 1001|      0|            }
 1002|      0|            if (namedCRLCache.entries) {
  ------------------
  |  Branch (1002:17): [True: 0, False: 0]
  ------------------
 1003|      0|                PL_HashTableDestroy(namedCRLCache.entries);
 1004|      0|                namedCRLCache.entries = NULL;
 1005|      0|            }
 1006|       |
 1007|      0|            return SECFailure;
 1008|      0|        }
 1009|      1|        crlcache_initialized = PR_TRUE;
  ------------------
  |  |  437|      1|#define PR_TRUE 1
  ------------------
 1010|      1|        return SECSuccess;
 1011|      1|    } else {
 1012|      0|        PORT_Assert(crlcache.lock);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1013|      0|        PORT_Assert(crlcache.issuers);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1014|      0|        if ((NULL == crlcache.lock) || (NULL == crlcache.issuers)) {
  ------------------
  |  Branch (1014:13): [True: 0, False: 0]
  |  Branch (1014:40): [True: 0, False: 0]
  ------------------
 1015|       |            /* CRL cache not fully initialized */
 1016|      0|            return SECFailure;
 1017|      0|        } else {
 1018|       |            /* CRL cache already initialized */
 1019|      0|            return SECSuccess;
 1020|      0|        }
 1021|      0|    }
 1022|      1|}
ShutdownCRLCache:
 1202|      1|{
 1203|      1|    SECStatus rv = SECSuccess;
 1204|      1|    if (PR_FALSE == crlcache_initialized && !crlcache.lock &&
  ------------------
  |  |  438|      1|#define PR_FALSE 0
  ------------------
  |  Branch (1204:9): [True: 0, False: 1]
  |  Branch (1204:45): [True: 0, False: 0]
  ------------------
 1205|      1|        !crlcache.issuers) {
  ------------------
  |  Branch (1205:9): [True: 0, False: 0]
  ------------------
 1206|       |        /* CRL cache has already been shut down */
 1207|      0|        return SECSuccess;
 1208|      0|    }
 1209|      1|    if (PR_TRUE == crlcache_initialized &&
  ------------------
  |  |  437|      1|#define PR_TRUE 1
  ------------------
  |  Branch (1209:9): [True: 1, False: 0]
  ------------------
 1210|      1|        (!crlcache.lock || !crlcache.issuers || !namedCRLCache.lock ||
  ------------------
  |  Branch (1210:10): [True: 0, False: 1]
  |  Branch (1210:28): [True: 0, False: 1]
  |  Branch (1210:49): [True: 0, False: 1]
  ------------------
 1211|      1|         !namedCRLCache.entries)) {
  ------------------
  |  Branch (1211:10): [True: 0, False: 1]
  ------------------
 1212|       |        /* CRL cache has partially been shut down */
 1213|      0|        PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1214|      0|        return SECFailure;
 1215|      0|    }
 1216|       |    /* empty the CRL cache */
 1217|       |    /* free the issuers */
 1218|      1|    PL_HashTableEnumerateEntries(crlcache.issuers, &FreeIssuer, &rv);
 1219|       |    /* free the hash table of issuers */
 1220|      1|    PL_HashTableDestroy(crlcache.issuers);
 1221|      1|    crlcache.issuers = NULL;
 1222|       |/* free the global lock */
 1223|       |#ifdef GLOBAL_RWLOCK
 1224|       |    NSSRWLock_Destroy(crlcache.lock);
 1225|       |#else
 1226|      1|    PR_DestroyLock(crlcache.lock);
 1227|      1|#endif
 1228|      1|    crlcache.lock = NULL;
 1229|       |
 1230|       |    /* empty the named CRL cache. This must be done after freeing the CRL
 1231|       |     * cache, since some CRLs in this cache are in the memory for the other  */
 1232|       |    /* free the entries */
 1233|      1|    PL_HashTableEnumerateEntries(namedCRLCache.entries, &FreeNamedEntries, &rv);
 1234|       |    /* free the hash table of issuers */
 1235|      1|    PL_HashTableDestroy(namedCRLCache.entries);
 1236|      1|    namedCRLCache.entries = NULL;
 1237|       |    /* free the global lock */
 1238|      1|    PR_DestroyLock(namedCRLCache.lock);
 1239|      1|    namedCRLCache.lock = NULL;
 1240|       |
 1241|      1|    crlcache_initialized = PR_FALSE;
  ------------------
  |  |  438|      1|#define PR_FALSE 0
  ------------------
 1242|      1|    return rv;
 1243|      1|}

CERT_NewGeneralName:
  153|     39|{
  154|     39|    CERTGeneralName *name = arena ? PORT_ArenaZNew(arena, CERTGeneralName)
  ------------------
  |  |  155|     39|    (type *)PORT_ArenaZAlloc(poolp, sizeof(type))
  |  |  ------------------
  |  |  |  |   59|     39|#define PORT_ArenaZAlloc PORT_ArenaZAlloc_Util
  |  |  ------------------
  ------------------
  |  Branch (154:29): [True: 39, False: 0]
  ------------------
  155|     39|                                  : PORT_ZNew(CERTGeneralName);
  ------------------
  |  |  148|      0|#define PORT_ZNew(type) (type *)PORT_ZAlloc(sizeof(type))
  |  |  ------------------
  |  |  |  |   72|      0|#define PORT_ZAlloc PORT_ZAlloc_Util
  |  |  ------------------
  ------------------
  156|     39|    if (name) {
  ------------------
  |  Branch (156:9): [True: 39, False: 0]
  ------------------
  157|     39|        name->type = type;
  158|     39|        name->l.prev = name->l.next = &name->l;
  159|     39|    }
  160|     39|    return name;
  161|     39|}
CERT_GetNextGeneralName:
  264|     44|{
  265|     44|    PRCList *next;
  266|       |
  267|     44|    next = current->l.next;
  268|     44|    return (CERTGeneralName *)(((char *)next) - offsetof(CERTGeneralName, l));
  269|     44|}
CERT_DecodeGeneralName:
  418|     39|{
  419|     39|    const SEC_ASN1Template *template;
  420|     39|    CERTGeneralNameType genNameType;
  421|     39|    SECStatus rv = SECSuccess;
  422|     39|    SECItem *newEncodedName;
  423|       |
  424|     39|    if (!reqArena) {
  ------------------
  |  Branch (424:9): [True: 0, False: 39]
  ------------------
  425|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  426|      0|        return NULL;
  427|      0|    }
  428|       |    /* make a copy for decoding so the data decoded with QuickDER doesn't
  429|       |       point to temporary memory */
  430|     39|    newEncodedName = SECITEM_ArenaDupItem(reqArena, encodedName);
  ------------------
  |  |  104|     39|#define SECITEM_ArenaDupItem SECITEM_ArenaDupItem_Util
  ------------------
  431|     39|    if (!newEncodedName) {
  ------------------
  |  Branch (431:9): [True: 0, False: 39]
  ------------------
  432|      0|        return NULL;
  433|      0|    }
  434|       |    /* TODO: mark arena */
  435|     39|    genNameType = (CERTGeneralNameType)((*(newEncodedName->data) & 0x0f) + 1);
  436|     39|    if (genName == NULL) {
  ------------------
  |  Branch (436:9): [True: 39, False: 0]
  ------------------
  437|     39|        genName = CERT_NewGeneralName(reqArena, genNameType);
  438|     39|        if (!genName)
  ------------------
  |  Branch (438:13): [True: 0, False: 39]
  ------------------
  439|      0|            goto loser;
  440|     39|    } else {
  441|      0|        genName->type = genNameType;
  442|      0|        genName->l.prev = genName->l.next = &genName->l;
  443|      0|    }
  444|       |
  445|     39|    switch (genNameType) {
  446|      1|        case certURI:
  ------------------
  |  Branch (446:9): [True: 1, False: 38]
  ------------------
  447|      1|            template = CERT_URITemplate;
  448|      1|            break;
  449|     22|        case certRFC822Name:
  ------------------
  |  Branch (449:9): [True: 22, False: 17]
  ------------------
  450|     22|            template = CERT_RFC822NameTemplate;
  451|     22|            break;
  452|      1|        case certDNSName:
  ------------------
  |  Branch (452:9): [True: 1, False: 38]
  ------------------
  453|      1|            template = CERT_DNSNameTemplate;
  454|      1|            break;
  455|      2|        case certIPAddress:
  ------------------
  |  Branch (455:9): [True: 2, False: 37]
  ------------------
  456|      2|            template = CERT_IPAddressTemplate;
  457|      2|            break;
  458|      2|        case certOtherName:
  ------------------
  |  Branch (458:9): [True: 2, False: 37]
  ------------------
  459|      2|            template = CERTOtherNameTemplate;
  460|      2|            break;
  461|      2|        case certRegisterID:
  ------------------
  |  Branch (461:9): [True: 2, False: 37]
  ------------------
  462|      2|            template = CERT_RegisteredIDTemplate;
  463|      2|            break;
  464|      0|        case certEDIPartyName:
  ------------------
  |  Branch (464:9): [True: 0, False: 39]
  ------------------
  465|      0|            template = CERT_EDIPartyNameTemplate;
  466|      0|            break;
  467|      1|        case certX400Address:
  ------------------
  |  Branch (467:9): [True: 1, False: 38]
  ------------------
  468|      1|            template = CERT_X400AddressTemplate;
  469|      1|            break;
  470|      3|        case certDirectoryName:
  ------------------
  |  Branch (470:9): [True: 3, False: 36]
  ------------------
  471|      3|            template = CERT_DirectoryNameTemplate;
  472|      3|            break;
  473|      5|        default:
  ------------------
  |  Branch (473:9): [True: 5, False: 34]
  ------------------
  474|      5|            goto loser;
  475|     39|    }
  476|     34|    rv = SEC_QuickDERDecodeItem(reqArena, genName, template, newEncodedName);
  ------------------
  |  |  102|     34|#define SEC_QuickDERDecodeItem SEC_QuickDERDecodeItem_Util
  ------------------
  477|     34|    if (rv != SECSuccess)
  ------------------
  |  Branch (477:9): [True: 6, False: 28]
  ------------------
  478|      6|        goto loser;
  479|     28|    if (genNameType == certDirectoryName) {
  ------------------
  |  Branch (479:9): [True: 3, False: 25]
  ------------------
  480|      3|        rv = SEC_QuickDERDecodeItem(reqArena, &(genName->name.directoryName),
  ------------------
  |  |  102|      3|#define SEC_QuickDERDecodeItem SEC_QuickDERDecodeItem_Util
  ------------------
  481|      3|                                    CERT_NameTemplate,
  482|      3|                                    &(genName->derDirectoryName));
  483|      3|        if (rv != SECSuccess)
  ------------------
  |  Branch (483:13): [True: 1, False: 2]
  ------------------
  484|      1|            goto loser;
  485|      3|    }
  486|       |
  487|       |    /* TODO: unmark arena */
  488|     27|    return genName;
  489|     12|loser:
  490|       |    /* TODO: release arena to mark */
  491|     12|    return NULL;
  492|     28|}
cert_DecodeGeneralNames:
  496|     85|{
  497|     85|    PRCList *head = NULL;
  498|     85|    PRCList *tail = NULL;
  499|     85|    CERTGeneralName *currentName = NULL;
  500|       |
  501|     85|    PORT_Assert(arena);
  ------------------
  |  |  120|     85|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|     85|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 85, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  502|     85|    if (!encodedGenName || !arena) {
  ------------------
  |  Branch (502:9): [True: 56, False: 29]
  |  Branch (502:28): [True: 0, False: 29]
  ------------------
  503|     56|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|     56|#define PORT_SetError PORT_SetError_Util
  ------------------
  504|     56|        return NULL;
  505|     56|    }
  506|       |    /* TODO: mark arena */
  507|     56|    while (*encodedGenName != NULL) {
  ------------------
  |  Branch (507:12): [True: 39, False: 17]
  ------------------
  508|     39|        currentName = CERT_DecodeGeneralName(arena, *encodedGenName, NULL);
  509|     39|        if (currentName == NULL)
  ------------------
  |  Branch (509:13): [True: 12, False: 27]
  ------------------
  510|     12|            break;
  511|     27|        if (head == NULL) {
  ------------------
  |  Branch (511:13): [True: 17, False: 10]
  ------------------
  512|     17|            head = &(currentName->l);
  513|     17|            tail = head;
  514|     17|        }
  515|     27|        currentName->l.next = head;
  516|     27|        currentName->l.prev = tail;
  517|     27|        tail = head->prev = tail->next = &(currentName->l);
  518|     27|        encodedGenName++;
  519|     27|    }
  520|     29|    if (currentName) {
  ------------------
  |  Branch (520:9): [True: 17, False: 12]
  ------------------
  521|       |        /* TODO: unmark arena */
  522|     17|        return CERT_GetNextGeneralName(currentName);
  523|     17|    }
  524|       |    /* TODO: release arena to mark */
  525|     12|    return NULL;
  526|     29|}

CERT_DecodeOidSequence:
  590|  1.71k|{
  591|  1.71k|    PLArenaPool *arena = NULL;
  592|  1.71k|    SECStatus rv;
  593|  1.71k|    CERTOidSequence *oidSeq;
  594|  1.71k|    SECItem newSeqItem;
  595|       |
  596|       |    /* make a new arena */
  597|  1.71k|    arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
  ------------------
  |  |   63|  1.71k|#define PORT_NewArena PORT_NewArena_Util
  ------------------
                  arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
  ------------------
  |  |   60|  1.71k|#define DER_DEFAULT_CHUNKSIZE (2048)
  ------------------
  598|       |
  599|  1.71k|    if (!arena) {
  ------------------
  |  Branch (599:9): [True: 0, False: 1.71k]
  ------------------
  600|      0|        goto loser;
  601|      0|    }
  602|       |
  603|       |    /* allocate the userNotice structure */
  604|  1.71k|    oidSeq =
  605|  1.71k|        (CERTOidSequence *)PORT_ArenaZAlloc(arena, sizeof(CERTOidSequence));
  ------------------
  |  |   59|  1.71k|#define PORT_ArenaZAlloc PORT_ArenaZAlloc_Util
  ------------------
  606|       |
  607|  1.71k|    if (oidSeq == NULL) {
  ------------------
  |  Branch (607:9): [True: 0, False: 1.71k]
  ------------------
  608|      0|        goto loser;
  609|      0|    }
  610|       |
  611|  1.71k|    oidSeq->arena = arena;
  612|       |
  613|       |    /* copy the DER into the arena, since Quick DER returns data that points
  614|       |       into the DER input, which may get freed by the caller */
  615|  1.71k|    rv = SECITEM_CopyItem(arena, &newSeqItem, seqItem);
  ------------------
  |  |  106|  1.71k|#define SECITEM_CopyItem SECITEM_CopyItem_Util
  ------------------
  616|  1.71k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (616:9): [True: 0, False: 1.71k]
  ------------------
  617|      0|        goto loser;
  618|      0|    }
  619|       |
  620|       |    /* decode the user notice */
  621|  1.71k|    rv =
  622|  1.71k|        SEC_QuickDERDecodeItem(arena, oidSeq, CERT_OidSeqTemplate, &newSeqItem);
  ------------------
  |  |  102|  1.71k|#define SEC_QuickDERDecodeItem SEC_QuickDERDecodeItem_Util
  ------------------
  623|       |
  624|  1.71k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (624:9): [True: 1.59k, False: 126]
  ------------------
  625|  1.59k|        goto loser;
  626|  1.59k|    }
  627|       |
  628|    126|    return (oidSeq);
  629|       |
  630|  1.59k|loser:
  631|  1.59k|    if (arena) {
  ------------------
  |  Branch (631:9): [True: 1.59k, False: 0]
  ------------------
  632|  1.59k|        PORT_FreeArena(arena, PR_FALSE);
  ------------------
  |  |   61|  1.59k|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                      PORT_FreeArena(arena, PR_FALSE);
  ------------------
  |  |  438|  1.59k|#define PR_FALSE 0
  ------------------
  633|  1.59k|    }
  634|  1.59k|    return (NULL);
  635|  1.71k|}
CERT_DestroyOidSequence:
  639|    126|{
  640|    126|    if (oidSeq != NULL) {
  ------------------
  |  Branch (640:9): [True: 126, False: 0]
  ------------------
  641|    126|        PORT_FreeArena(oidSeq->arena, PR_FALSE);
  ------------------
  |  |   61|    126|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                      PORT_FreeArena(oidSeq->arena, PR_FALSE);
  ------------------
  |  |  438|    126|#define PR_FALSE 0
  ------------------
  642|    126|    }
  643|    126|    return;
  644|    126|}
CERT_GovtApprovedBitSet:
  648|  5.09k|{
  649|  5.09k|    SECStatus rv;
  650|  5.09k|    SECItem extItem;
  651|  5.09k|    CERTOidSequence *oidSeq = NULL;
  652|  5.09k|    PRBool ret;
  653|  5.09k|    SECItem **oids;
  654|  5.09k|    SECItem *oid;
  655|  5.09k|    SECOidTag oidTag;
  656|       |
  657|  5.09k|    extItem.data = NULL;
  658|  5.09k|    rv = CERT_FindCertExtension(cert, SEC_OID_X509_EXT_KEY_USAGE, &extItem);
  659|  5.09k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (659:9): [True: 4.23k, False: 858]
  ------------------
  660|  4.23k|        goto loser;
  661|  4.23k|    }
  662|       |
  663|    858|    oidSeq = CERT_DecodeOidSequence(&extItem);
  664|    858|    if (oidSeq == NULL) {
  ------------------
  |  Branch (664:9): [True: 795, False: 63]
  ------------------
  665|    795|        goto loser;
  666|    795|    }
  667|       |
  668|     63|    oids = oidSeq->oids;
  669|     69|    while (oids != NULL && *oids != NULL) {
  ------------------
  |  Branch (669:12): [True: 69, False: 0]
  |  Branch (669:28): [True: 6, False: 63]
  ------------------
  670|      6|        oid = *oids;
  671|       |
  672|      6|        oidTag = SECOID_FindOIDTag(oid);
  ------------------
  |  |  117|      6|#define SECOID_FindOIDTag SECOID_FindOIDTag_Util
  ------------------
  673|       |
  674|      6|        if (oidTag == SEC_OID_NS_KEY_USAGE_GOVT_APPROVED) {
  ------------------
  |  Branch (674:13): [True: 0, False: 6]
  ------------------
  675|      0|            goto success;
  676|      0|        }
  677|       |
  678|      6|        oids++;
  679|      6|    }
  680|       |
  681|  5.09k|loser:
  682|  5.09k|    ret = PR_FALSE;
  ------------------
  |  |  438|  5.09k|#define PR_FALSE 0
  ------------------
  683|  5.09k|    goto done;
  684|      0|success:
  685|      0|    ret = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  686|  5.09k|done:
  687|  5.09k|    if (oidSeq != NULL) {
  ------------------
  |  Branch (687:9): [True: 63, False: 5.02k]
  ------------------
  688|     63|        CERT_DestroyOidSequence(oidSeq);
  689|     63|    }
  690|  5.09k|    if (extItem.data != NULL) {
  ------------------
  |  Branch (690:9): [True: 857, False: 4.23k]
  ------------------
  691|    857|        PORT_Free(extItem.data);
  ------------------
  |  |   60|    857|#define PORT_Free PORT_Free_Util
  ------------------
  692|    857|    }
  693|  5.09k|    return (ret);
  694|      0|}

CERT_GetAVATag:
   69|  20.8k|{
   70|  20.8k|    SECOidData *oid;
   71|  20.8k|    if (!ava->type.data)
  ------------------
  |  Branch (71:9): [True: 0, False: 20.8k]
  ------------------
   72|      0|        return (SECOidTag)-1;
   73|       |
   74|  20.8k|    oid = SECOID_FindOID(&ava->type);
  ------------------
  |  |  115|  20.8k|#define SECOID_FindOID SECOID_FindOID_Util
  ------------------
   75|       |
   76|  20.8k|    if (oid) {
  ------------------
  |  Branch (76:9): [True: 7.91k, False: 12.8k]
  ------------------
   77|  7.91k|        return (oid->offset);
   78|  7.91k|    }
   79|  12.8k|    return (SECOidTag)-1;
   80|  20.8k|}
CERT_DecodeAVAValue:
  599|  10.3k|{
  600|  10.3k|    SECItem *retItem;
  601|  10.3k|    const SEC_ASN1Template *theTemplate = NULL;
  602|  10.3k|    enum { conv_none,
  603|  10.3k|           conv_ucs4,
  604|  10.3k|           conv_ucs2,
  605|  10.3k|           conv_iso88591 } convert = conv_none;
  606|  10.3k|    SECItem avaValue = { siBuffer, 0 };
  607|  10.3k|    PORTCheapArenaPool tmpArena;
  608|       |
  609|  10.3k|    if (!derAVAValue || !derAVAValue->len || !derAVAValue->data) {
  ------------------
  |  Branch (609:9): [True: 0, False: 10.3k]
  |  Branch (609:25): [True: 0, False: 10.3k]
  |  Branch (609:46): [True: 0, False: 10.3k]
  ------------------
  610|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  611|      0|        return NULL;
  612|      0|    }
  613|       |
  614|  10.3k|    switch (derAVAValue->data[0]) {
  615|    107|        case SEC_ASN1_UNIVERSAL_STRING:
  ------------------
  |  |  104|    107|#define SEC_ASN1_UNIVERSAL_STRING 0x1c
  ------------------
  |  Branch (615:9): [True: 107, False: 10.2k]
  ------------------
  616|    107|            convert = conv_ucs4;
  617|    107|            theTemplate = SEC_ASN1_GET(SEC_UniversalStringTemplate);
  ------------------
  |  |  188|    107|#define SEC_ASN1_GET(x) x
  ------------------
  618|    107|            break;
  619|     93|        case SEC_ASN1_IA5_STRING:
  ------------------
  |  |   98|     93|#define SEC_ASN1_IA5_STRING 0x16
  ------------------
  |  Branch (619:9): [True: 93, False: 10.2k]
  ------------------
  620|     93|            theTemplate = SEC_ASN1_GET(SEC_IA5StringTemplate);
  ------------------
  |  |  188|     93|#define SEC_ASN1_GET(x) x
  ------------------
  621|     93|            break;
  622|  6.13k|        case SEC_ASN1_PRINTABLE_STRING:
  ------------------
  |  |   95|  6.13k|#define SEC_ASN1_PRINTABLE_STRING 0x13
  ------------------
  |  Branch (622:9): [True: 6.13k, False: 4.24k]
  ------------------
  623|  6.13k|            theTemplate = SEC_ASN1_GET(SEC_PrintableStringTemplate);
  ------------------
  |  |  188|  6.13k|#define SEC_ASN1_GET(x) x
  ------------------
  624|  6.13k|            break;
  625|    132|        case SEC_ASN1_T61_STRING:
  ------------------
  |  |   96|    132|#define SEC_ASN1_T61_STRING 0x14
  ------------------
  |  Branch (625:9): [True: 132, False: 10.2k]
  ------------------
  626|       |            /*
  627|       |             * Per common practice, we're not decoding actual T.61, but instead
  628|       |             * treating T61-labeled strings as containing ISO-8859-1.
  629|       |             */
  630|    132|            convert = conv_iso88591;
  631|    132|            theTemplate = SEC_ASN1_GET(SEC_T61StringTemplate);
  ------------------
  |  |  188|    132|#define SEC_ASN1_GET(x) x
  ------------------
  632|    132|            break;
  633|  1.40k|        case SEC_ASN1_BMP_STRING:
  ------------------
  |  |  106|  1.40k|#define SEC_ASN1_BMP_STRING 0x1e
  ------------------
  |  Branch (633:9): [True: 1.40k, False: 8.96k]
  ------------------
  634|  1.40k|            convert = conv_ucs2;
  635|  1.40k|            theTemplate = SEC_ASN1_GET(SEC_BMPStringTemplate);
  ------------------
  |  |  188|  1.40k|#define SEC_ASN1_GET(x) x
  ------------------
  636|  1.40k|            break;
  637|  1.21k|        case SEC_ASN1_UTF8_STRING:
  ------------------
  |  |   88|  1.21k|#define SEC_ASN1_UTF8_STRING 0x0c
  ------------------
  |  Branch (637:9): [True: 1.21k, False: 9.15k]
  ------------------
  638|       |            /* No conversion needed ! */
  639|  1.21k|            theTemplate = SEC_ASN1_GET(SEC_UTF8StringTemplate);
  ------------------
  |  |  188|  1.21k|#define SEC_ASN1_GET(x) x
  ------------------
  640|  1.21k|            break;
  641|  1.28k|        default:
  ------------------
  |  Branch (641:9): [True: 1.28k, False: 9.08k]
  ------------------
  642|  1.28k|            PORT_SetError(SEC_ERROR_INVALID_AVA);
  ------------------
  |  |   65|  1.28k|#define PORT_SetError PORT_SetError_Util
  ------------------
  643|  1.28k|            return NULL;
  644|  10.3k|    }
  645|       |
  646|  9.08k|    PORT_Memset(&avaValue, 0, sizeof(SECItem));
  ------------------
  |  |  182|  9.08k|#define PORT_Memset memset
  ------------------
  647|  9.08k|    PORT_InitCheapArena(&tmpArena, DER_DEFAULT_CHUNKSIZE);
  ------------------
  |  |   60|  9.08k|#define DER_DEFAULT_CHUNKSIZE (2048)
  ------------------
  648|  9.08k|    if (SEC_QuickDERDecodeItem(&tmpArena.arena, &avaValue, theTemplate,
  ------------------
  |  |  102|  9.08k|#define SEC_QuickDERDecodeItem SEC_QuickDERDecodeItem_Util
  ------------------
  |  Branch (648:9): [True: 0, False: 9.08k]
  ------------------
  649|  9.08k|                               derAVAValue) != SECSuccess) {
  650|      0|        PORT_DestroyCheapArena(&tmpArena);
  651|      0|        return NULL;
  652|      0|    }
  653|       |
  654|  9.08k|    if (convert != conv_none) {
  ------------------
  |  Branch (654:9): [True: 1.64k, False: 7.44k]
  ------------------
  655|  1.64k|        unsigned int utf8ValLen = avaValue.len * 3;
  656|  1.64k|        unsigned char *utf8Val =
  657|  1.64k|            (unsigned char *)PORT_ArenaZAlloc(&tmpArena.arena, utf8ValLen);
  ------------------
  |  |   59|  1.64k|#define PORT_ArenaZAlloc PORT_ArenaZAlloc_Util
  ------------------
  658|       |
  659|  1.64k|        switch (convert) {
  ------------------
  |  Branch (659:17): [True: 0, False: 1.64k]
  ------------------
  660|    107|            case conv_ucs4:
  ------------------
  |  Branch (660:13): [True: 107, False: 1.53k]
  ------------------
  661|    107|                if (avaValue.len % 4 != 0 ||
  ------------------
  |  Branch (661:21): [True: 10, False: 97]
  ------------------
  662|    107|                    !PORT_UCS4_UTF8Conversion(PR_FALSE, avaValue.data,
  ------------------
  |  |  438|     97|#define PR_FALSE 0
  ------------------
  |  Branch (662:21): [True: 34, False: 63]
  ------------------
  663|     97|                                              avaValue.len, utf8Val, utf8ValLen,
  664|     97|                                              &utf8ValLen)) {
  665|     44|                    PORT_DestroyCheapArena(&tmpArena);
  666|     44|                    PORT_SetError(SEC_ERROR_INVALID_AVA);
  ------------------
  |  |   65|     44|#define PORT_SetError PORT_SetError_Util
  ------------------
  667|     44|                    return NULL;
  668|     44|                }
  669|     63|                break;
  670|  1.40k|            case conv_ucs2:
  ------------------
  |  Branch (670:13): [True: 1.40k, False: 239]
  ------------------
  671|  1.40k|                if (avaValue.len % 2 != 0 ||
  ------------------
  |  Branch (671:21): [True: 1.32k, False: 78]
  ------------------
  672|  1.40k|                    !PORT_UCS2_UTF8Conversion(PR_FALSE, avaValue.data,
  ------------------
  |  |   71|     78|#define PORT_UCS2_UTF8Conversion PORT_UCS2_UTF8Conversion_Util
  ------------------
                                  !PORT_UCS2_UTF8Conversion(PR_FALSE, avaValue.data,
  ------------------
  |  |  438|     78|#define PR_FALSE 0
  ------------------
  |  Branch (672:21): [True: 18, False: 60]
  ------------------
  673|     78|                                              avaValue.len, utf8Val, utf8ValLen,
  674|  1.34k|                                              &utf8ValLen)) {
  675|  1.34k|                    PORT_DestroyCheapArena(&tmpArena);
  676|  1.34k|                    PORT_SetError(SEC_ERROR_INVALID_AVA);
  ------------------
  |  |   65|  1.34k|#define PORT_SetError PORT_SetError_Util
  ------------------
  677|  1.34k|                    return NULL;
  678|  1.34k|                }
  679|     60|                break;
  680|    132|            case conv_iso88591:
  ------------------
  |  Branch (680:13): [True: 132, False: 1.51k]
  ------------------
  681|    132|                if (!PORT_ISO88591_UTF8Conversion(avaValue.data, avaValue.len,
  ------------------
  |  Branch (681:21): [True: 0, False: 132]
  ------------------
  682|    132|                                                  utf8Val, utf8ValLen,
  683|    132|                                                  &utf8ValLen)) {
  684|      0|                    PORT_DestroyCheapArena(&tmpArena);
  685|      0|                    PORT_SetError(SEC_ERROR_INVALID_AVA);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  686|      0|                    return NULL;
  687|      0|                }
  688|    132|                break;
  689|    132|            case conv_none:
  ------------------
  |  Branch (689:13): [True: 0, False: 1.64k]
  ------------------
  690|      0|                PORT_Assert(0); /* not reached */
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  691|      0|                break;
  692|  1.64k|        }
  693|       |
  694|    255|        avaValue.data = utf8Val;
  695|    255|        avaValue.len = utf8ValLen;
  696|    255|    }
  697|       |
  698|  7.69k|    retItem = SECITEM_DupItem(&avaValue);
  ------------------
  |  |  107|  7.69k|#define SECITEM_DupItem SECITEM_DupItem_Util
  ------------------
  699|  7.69k|    PORT_DestroyCheapArena(&tmpArena);
  700|  7.69k|    return retItem;
  701|  9.08k|}

CERT_GetCertTrust:
   95|  10.1k|{
   96|  10.1k|    SECStatus rv;
   97|  10.1k|    CERT_LockCertTrust(cert);
   98|  10.1k|    if (!cert || cert->trust == NULL) {
  ------------------
  |  Branch (98:9): [True: 0, False: 10.1k]
  |  Branch (98:18): [True: 10.1k, False: 0]
  ------------------
   99|  10.1k|        rv = SECFailure;
  100|  10.1k|    } else {
  101|      0|        *trust = *cert->trust;
  102|      0|        rv = SECSuccess;
  103|      0|    }
  104|  10.1k|    CERT_UnlockCertTrust(cert);
  105|  10.1k|    return (rv);
  106|  10.1k|}
CERT_MapStanError:
  159|    211|{
  160|    211|    PRInt32 *errorStack;
  161|    211|    NSSError error, prevError;
  162|    211|    int secError;
  163|    211|    int i;
  164|       |
  165|    211|    errorStack = NSS_GetErrorStack();
  166|    211|    if (errorStack == 0) {
  ------------------
  |  Branch (166:9): [True: 0, False: 211]
  ------------------
  167|      0|        PORT_SetError(0);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  168|      0|        return;
  169|      0|    }
  170|    211|    error = prevError = CKR_GENERAL_ERROR;
  ------------------
  |  | 1396|    211|#define CKR_GENERAL_ERROR 0x00000005UL
  ------------------
  171|       |    /* get the 'top 2' error codes from the stack */
  172|    303|    for (i = 0; errorStack[i]; i++) {
  ------------------
  |  Branch (172:17): [True: 92, False: 211]
  ------------------
  173|     92|        prevError = error;
  174|     92|        error = errorStack[i];
  175|     92|    }
  176|    211|    if (error == NSS_ERROR_PKCS11) {
  ------------------
  |  Branch (176:9): [True: 0, False: 211]
  ------------------
  177|       |        /* map it */
  178|      0|        secError = PK11_MapError(prevError);
  179|      0|    }
  180|    211|    STAN_MAP_ERROR(NSS_ERROR_NO_ERROR, 0)
  ------------------
  |  |  150|    211|    else if (error == (x)) { secError = y; }
  |  |  ------------------
  |  |  |  Branch (150:14): [True: 0, False: 211]
  |  |  ------------------
  ------------------
  181|    211|    STAN_MAP_ERROR(NSS_ERROR_NO_MEMORY, SEC_ERROR_NO_MEMORY)
  ------------------
  |  |  150|    211|    else if (error == (x)) { secError = y; }
  |  |  ------------------
  |  |  |  Branch (150:14): [True: 0, False: 211]
  |  |  ------------------
  ------------------
  182|    211|    STAN_MAP_ERROR(NSS_ERROR_INVALID_BASE64, SEC_ERROR_BAD_DATA)
  ------------------
  |  |  150|    211|    else if (error == (x)) { secError = y; }
  |  |  ------------------
  |  |  |  Branch (150:14): [True: 0, False: 211]
  |  |  ------------------
  ------------------
  183|    211|    STAN_MAP_ERROR(NSS_ERROR_INVALID_BER, SEC_ERROR_BAD_DER)
  ------------------
  |  |  150|    211|    else if (error == (x)) { secError = y; }
  |  |  ------------------
  |  |  |  Branch (150:14): [True: 0, False: 211]
  |  |  ------------------
  ------------------
  184|    211|    STAN_MAP_ERROR(NSS_ERROR_INVALID_ATAV, SEC_ERROR_INVALID_AVA)
  ------------------
  |  |  150|    211|    else if (error == (x)) { secError = y; }
  |  |  ------------------
  |  |  |  Branch (150:14): [True: 0, False: 211]
  |  |  ------------------
  ------------------
  185|    211|    STAN_MAP_ERROR(NSS_ERROR_INVALID_PASSWORD, SEC_ERROR_BAD_PASSWORD)
  ------------------
  |  |  150|    211|    else if (error == (x)) { secError = y; }
  |  |  ------------------
  |  |  |  Branch (150:14): [True: 0, False: 211]
  |  |  ------------------
  ------------------
  186|    211|    STAN_MAP_ERROR(NSS_ERROR_BUSY, SEC_ERROR_BUSY)
  ------------------
  |  |  150|    211|    else if (error == (x)) { secError = y; }
  |  |  ------------------
  |  |  |  Branch (150:14): [True: 0, False: 211]
  |  |  ------------------
  ------------------
  187|    211|    STAN_MAP_ERROR(NSS_ERROR_DEVICE_ERROR, SEC_ERROR_IO)
  ------------------
  |  |  150|    211|    else if (error == (x)) { secError = y; }
  |  |  ------------------
  |  |  |  Branch (150:14): [True: 0, False: 211]
  |  |  ------------------
  ------------------
  188|    211|    STAN_MAP_ERROR(NSS_ERROR_CERTIFICATE_ISSUER_NOT_FOUND,
  ------------------
  |  |  150|    211|    else if (error == (x)) { secError = y; }
  |  |  ------------------
  |  |  |  Branch (150:14): [True: 0, False: 211]
  |  |  ------------------
  ------------------
  189|    211|                   SEC_ERROR_UNKNOWN_ISSUER)
  190|    211|    STAN_MAP_ERROR(NSS_ERROR_INVALID_CERTIFICATE, SEC_ERROR_CERT_NOT_VALID)
  ------------------
  |  |  150|    211|    else if (error == (x)) { secError = y; }
  |  |  ------------------
  |  |  |  Branch (150:14): [True: 0, False: 211]
  |  |  ------------------
  ------------------
  191|    211|    STAN_MAP_ERROR(NSS_ERROR_INVALID_UTF8, SEC_ERROR_BAD_DATA)
  ------------------
  |  |  150|    211|    else if (error == (x)) { secError = y; }
  |  |  ------------------
  |  |  |  Branch (150:14): [True: 0, False: 211]
  |  |  ------------------
  ------------------
  192|    211|    STAN_MAP_ERROR(NSS_ERROR_INVALID_NSSOID, SEC_ERROR_BAD_DATA)
  ------------------
  |  |  150|    211|    else if (error == (x)) { secError = y; }
  |  |  ------------------
  |  |  |  Branch (150:14): [True: 0, False: 211]
  |  |  ------------------
  ------------------
  193|       |
  194|       |    /* these are library failure for lack of a better error code */
  195|    211|    STAN_MAP_ERROR(NSS_ERROR_NOT_FOUND, SEC_ERROR_LIBRARY_FAILURE)
  ------------------
  |  |  150|    211|    else if (error == (x)) { secError = y; }
  |  |  ------------------
  |  |  |  Branch (150:14): [True: 46, False: 165]
  |  |  ------------------
  ------------------
  196|    211|    STAN_MAP_ERROR(NSS_ERROR_CERTIFICATE_IN_CACHE, SEC_ERROR_LIBRARY_FAILURE)
  ------------------
  |  |  150|    211|    else if (error == (x)) { secError = y; }
  |  |  ------------------
  |  |  |  Branch (150:14): [True: 0, False: 165]
  |  |  ------------------
  ------------------
  197|    165|    STAN_MAP_ERROR(NSS_ERROR_MAXIMUM_FOUND, SEC_ERROR_LIBRARY_FAILURE)
  ------------------
  |  |  150|    165|    else if (error == (x)) { secError = y; }
  |  |  ------------------
  |  |  |  Branch (150:14): [True: 0, False: 165]
  |  |  ------------------
  ------------------
  198|    165|    STAN_MAP_ERROR(NSS_ERROR_USER_CANCELED, SEC_ERROR_LIBRARY_FAILURE)
  ------------------
  |  |  150|    165|    else if (error == (x)) { secError = y; }
  |  |  ------------------
  |  |  |  Branch (150:14): [True: 0, False: 165]
  |  |  ------------------
  ------------------
  199|    165|    STAN_MAP_ERROR(NSS_ERROR_TRACKER_NOT_INITIALIZED, SEC_ERROR_LIBRARY_FAILURE)
  ------------------
  |  |  150|    165|    else if (error == (x)) { secError = y; }
  |  |  ------------------
  |  |  |  Branch (150:14): [True: 0, False: 165]
  |  |  ------------------
  ------------------
  200|    165|    STAN_MAP_ERROR(NSS_ERROR_ALREADY_INITIALIZED, SEC_ERROR_LIBRARY_FAILURE)
  ------------------
  |  |  150|    165|    else if (error == (x)) { secError = y; }
  |  |  ------------------
  |  |  |  Branch (150:14): [True: 0, False: 165]
  |  |  ------------------
  ------------------
  201|    165|    STAN_MAP_ERROR(NSS_ERROR_ARENA_MARKED_BY_ANOTHER_THREAD,
  ------------------
  |  |  150|    165|    else if (error == (x)) { secError = y; }
  |  |  ------------------
  |  |  |  Branch (150:14): [True: 0, False: 165]
  |  |  ------------------
  ------------------
  202|    165|                   SEC_ERROR_LIBRARY_FAILURE)
  203|    165|    STAN_MAP_ERROR(NSS_ERROR_HASH_COLLISION, SEC_ERROR_LIBRARY_FAILURE)
  ------------------
  |  |  150|    165|    else if (error == (x)) { secError = y; }
  |  |  ------------------
  |  |  |  Branch (150:14): [True: 0, False: 165]
  |  |  ------------------
  ------------------
  204|       |
  205|    165|    STAN_MAP_ERROR(NSS_ERROR_INTERNAL_ERROR, SEC_ERROR_LIBRARY_FAILURE)
  ------------------
  |  |  150|    165|    else if (error == (x)) { secError = y; }
  |  |  ------------------
  |  |  |  Branch (150:14): [True: 0, False: 165]
  |  |  ------------------
  ------------------
  206|       |
  207|       |    /* these are all invalid arguments */
  208|    165|    STAN_MAP_ERROR(NSS_ERROR_INVALID_ARGUMENT, SEC_ERROR_INVALID_ARGS)
  ------------------
  |  |  150|    165|    else if (error == (x)) { secError = y; }
  |  |  ------------------
  |  |  |  Branch (150:14): [True: 0, False: 165]
  |  |  ------------------
  ------------------
  209|    165|    STAN_MAP_ERROR(NSS_ERROR_INVALID_POINTER, SEC_ERROR_INVALID_ARGS)
  ------------------
  |  |  150|    165|    else if (error == (x)) { secError = y; }
  |  |  ------------------
  |  |  |  Branch (150:14): [True: 0, False: 165]
  |  |  ------------------
  ------------------
  210|    165|    STAN_MAP_ERROR(NSS_ERROR_INVALID_ARENA, SEC_ERROR_INVALID_ARGS)
  ------------------
  |  |  150|    165|    else if (error == (x)) { secError = y; }
  |  |  ------------------
  |  |  |  Branch (150:14): [True: 0, False: 165]
  |  |  ------------------
  ------------------
  211|    165|    STAN_MAP_ERROR(NSS_ERROR_INVALID_ARENA_MARK, SEC_ERROR_INVALID_ARGS)
  ------------------
  |  |  150|    165|    else if (error == (x)) { secError = y; }
  |  |  ------------------
  |  |  |  Branch (150:14): [True: 165, False: 0]
  |  |  ------------------
  ------------------
  212|    165|    STAN_MAP_ERROR(NSS_ERROR_DUPLICATE_POINTER, SEC_ERROR_INVALID_ARGS)
  ------------------
  |  |  150|    165|    else if (error == (x)) { secError = y; }
  |  |  ------------------
  |  |  |  Branch (150:14): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  213|      0|    STAN_MAP_ERROR(NSS_ERROR_POINTER_NOT_REGISTERED, SEC_ERROR_INVALID_ARGS)
  ------------------
  |  |  150|      0|    else if (error == (x)) { secError = y; }
  |  |  ------------------
  |  |  |  Branch (150:14): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  214|      0|    STAN_MAP_ERROR(NSS_ERROR_TRACKER_NOT_EMPTY, SEC_ERROR_INVALID_ARGS)
  ------------------
  |  |  150|      0|    else if (error == (x)) { secError = y; }
  |  |  ------------------
  |  |  |  Branch (150:14): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  215|      0|    STAN_MAP_ERROR(NSS_ERROR_VALUE_TOO_LARGE, SEC_ERROR_INVALID_ARGS)
  ------------------
  |  |  150|      0|    else if (error == (x)) { secError = y; }
  |  |  ------------------
  |  |  |  Branch (150:14): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  216|      0|    STAN_MAP_ERROR(NSS_ERROR_UNSUPPORTED_TYPE, SEC_ERROR_INVALID_ARGS)
  ------------------
  |  |  150|      0|    else if (error == (x)) { secError = y; }
  |  |  ------------------
  |  |  |  Branch (150:14): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  217|      0|    STAN_MAP_ERROR(NSS_ERROR_BUFFER_TOO_SHORT, SEC_ERROR_INVALID_ARGS)
  ------------------
  |  |  150|      0|    else if (error == (x)) { secError = y; }
  |  |  ------------------
  |  |  |  Branch (150:14): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  218|      0|    STAN_MAP_ERROR(NSS_ERROR_INVALID_ATOB_CONTEXT, SEC_ERROR_INVALID_ARGS)
  ------------------
  |  |  150|      0|    else if (error == (x)) { secError = y; }
  |  |  ------------------
  |  |  |  Branch (150:14): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  219|      0|    STAN_MAP_ERROR(NSS_ERROR_INVALID_BTOA_CONTEXT, SEC_ERROR_INVALID_ARGS)
  ------------------
  |  |  150|      0|    else if (error == (x)) { secError = y; }
  |  |  ------------------
  |  |  |  Branch (150:14): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  220|      0|    STAN_MAP_ERROR(NSS_ERROR_INVALID_ITEM, SEC_ERROR_INVALID_ARGS)
  ------------------
  |  |  150|      0|    else if (error == (x)) { secError = y; }
  |  |  ------------------
  |  |  |  Branch (150:14): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  221|      0|    STAN_MAP_ERROR(NSS_ERROR_INVALID_STRING, SEC_ERROR_INVALID_ARGS)
  ------------------
  |  |  150|      0|    else if (error == (x)) { secError = y; }
  |  |  ------------------
  |  |  |  Branch (150:14): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  222|      0|    STAN_MAP_ERROR(NSS_ERROR_INVALID_ASN1ENCODER, SEC_ERROR_INVALID_ARGS)
  ------------------
  |  |  150|      0|    else if (error == (x)) { secError = y; }
  |  |  ------------------
  |  |  |  Branch (150:14): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  223|      0|    STAN_MAP_ERROR(NSS_ERROR_INVALID_ASN1DECODER, SEC_ERROR_INVALID_ARGS)
  ------------------
  |  |  150|      0|    else if (error == (x)) { secError = y; }
  |  |  ------------------
  |  |  |  Branch (150:14): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  224|      0|    STAN_MAP_ERROR(NSS_ERROR_UNKNOWN_ATTRIBUTE, SEC_ERROR_INVALID_ARGS)
  ------------------
  |  |  150|      0|    else if (error == (x)) { secError = y; }
  |  |  ------------------
  |  |  |  Branch (150:14): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  225|      0|    else { secError = SEC_ERROR_LIBRARY_FAILURE; }
  226|    211|    PORT_SetError(secError);
  ------------------
  |  |   65|    211|#define PORT_SetError PORT_SetError_Util
  ------------------
  227|    211|}
CERT_NewTempCertificate:
  357|  5.30k|{
  358|  5.30k|    NSSCertificate *c;
  359|  5.30k|    CERTCertificate *cc;
  360|  5.30k|    NSSCertificate *tempCert = NULL;
  361|  5.30k|    nssPKIObject *pkio;
  362|  5.30k|    NSSCryptoContext *gCC = STAN_GetDefaultCryptoContext();
  363|  5.30k|    NSSTrustDomain *gTD = STAN_GetDefaultTrustDomain();
  364|  5.30k|    if (!isperm) {
  ------------------
  |  Branch (364:9): [True: 5.30k, False: 0]
  ------------------
  365|  5.30k|        NSSDER encoding;
  366|  5.30k|        NSSITEM_FROM_SECITEM(&encoding, derCert);
  ------------------
  |  |   27|  5.30k|    (nssit)->data = (void *)(secit)->data; \
  |  |   28|  5.30k|    (nssit)->size = (PRUint32)(secit)->len;
  ------------------
  367|       |        /* First, see if it is already a temp cert */
  368|  5.30k|        c = NSSCryptoContext_FindCertificateByEncodedCertificate(gCC,
  369|  5.30k|                                                                 &encoding);
  370|  5.30k|        if (!c && handle) {
  ------------------
  |  Branch (370:13): [True: 5.30k, False: 0]
  |  Branch (370:19): [True: 5.30k, False: 0]
  ------------------
  371|       |            /* Then, see if it is already a perm cert */
  372|  5.30k|            c = NSSTrustDomain_FindCertificateByEncodedCertificate(handle,
  373|  5.30k|                                                                   &encoding);
  374|  5.30k|        }
  375|  5.30k|        if (c) {
  ------------------
  |  Branch (375:13): [True: 0, False: 5.30k]
  ------------------
  376|       |            /* actually, that search ends up going by issuer/serial,
  377|       |             * so it is still possible to return a cert with the same
  378|       |             * issuer/serial but a different encoding, and we're
  379|       |             * going to reject that
  380|       |             */
  381|      0|            if (!nssItem_Equal(&c->encoding, &encoding, NULL)) {
  ------------------
  |  Branch (381:17): [True: 0, False: 0]
  ------------------
  382|      0|                nssCertificate_Destroy(c);
  383|      0|                PORT_SetError(SEC_ERROR_REUSED_ISSUER_AND_SERIAL);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  384|      0|                cc = NULL;
  385|      0|            } else {
  386|      0|                cc = STAN_GetCERTCertificateOrRelease(c);
  387|      0|                if (cc == NULL) {
  ------------------
  |  Branch (387:21): [True: 0, False: 0]
  ------------------
  388|      0|                    CERT_MapStanError();
  389|      0|                }
  390|      0|            }
  391|      0|            return cc;
  392|      0|        }
  393|  5.30k|    }
  394|  5.30k|    pkio = nssPKIObject_Create(NULL, NULL, gTD, gCC, nssPKIMonitor);
  395|  5.30k|    if (!pkio) {
  ------------------
  |  Branch (395:9): [True: 0, False: 5.30k]
  ------------------
  396|      0|        CERT_MapStanError();
  397|      0|        return NULL;
  398|      0|    }
  399|  5.30k|    c = nss_ZNEW(pkio->arena, NSSCertificate);
  ------------------
  |  |  348|  5.30k|#define nss_ZNEW(arenaOpt, type) ((type *)nss_ZAlloc((arenaOpt), sizeof(type)))
  ------------------
  400|  5.30k|    if (!c) {
  ------------------
  |  Branch (400:9): [True: 0, False: 5.30k]
  ------------------
  401|      0|        CERT_MapStanError();
  402|      0|        nssPKIObject_Destroy(pkio);
  403|      0|        return NULL;
  404|      0|    }
  405|  5.30k|    c->object = *pkio;
  406|  5.30k|    if (copyDER) {
  ------------------
  |  Branch (406:9): [True: 5.30k, False: 0]
  ------------------
  407|  5.30k|        nssItem_Create(c->object.arena, &c->encoding, derCert->len,
  408|  5.30k|                       derCert->data);
  409|  5.30k|    } else {
  410|      0|        NSSITEM_FROM_SECITEM(&c->encoding, derCert);
  ------------------
  |  |   27|      0|    (nssit)->data = (void *)(secit)->data; \
  |  |   28|      0|    (nssit)->size = (PRUint32)(secit)->len;
  ------------------
  411|      0|    }
  412|       |    /* Forces a decoding of the cert in order to obtain the parts used
  413|       |     * below
  414|       |     */
  415|       |    /* 'c' is not adopted here, if we fail loser frees what has been
  416|       |     * allocated so far for 'c' */
  417|  5.30k|    cc = STAN_GetCERTCertificate(c);
  418|  5.30k|    if (!cc) {
  ------------------
  |  Branch (418:9): [True: 211, False: 5.09k]
  ------------------
  419|    211|        CERT_MapStanError();
  420|    211|        goto loser;
  421|    211|    }
  422|  5.09k|    nssItem_Create(c->object.arena, &c->issuer, cc->derIssuer.len,
  423|  5.09k|                   cc->derIssuer.data);
  424|  5.09k|    nssItem_Create(c->object.arena, &c->subject, cc->derSubject.len,
  425|  5.09k|                   cc->derSubject.data);
  426|       |    /* CERTCertificate stores serial numbers decoded.  I need the DER
  427|       |     * here.  sigh.
  428|       |     */
  429|  5.09k|    SECItem derSerial = { 0 };
  430|  5.09k|    CERT_SerialNumberFromDERCert(&cc->derCert, &derSerial);
  431|  5.09k|    if (!derSerial.data)
  ------------------
  |  Branch (431:9): [True: 0, False: 5.09k]
  ------------------
  432|      0|        goto loser;
  433|  5.09k|    nssItem_Create(c->object.arena, &c->serial, derSerial.len,
  434|  5.09k|                   derSerial.data);
  435|  5.09k|    PORT_Free(derSerial.data);
  ------------------
  |  |   60|  5.09k|#define PORT_Free PORT_Free_Util
  ------------------
  436|       |
  437|  5.09k|    if (nickname) {
  ------------------
  |  Branch (437:9): [True: 0, False: 5.09k]
  ------------------
  438|      0|        c->object.tempName =
  439|      0|            nssUTF8_Create(c->object.arena, nssStringType_UTF8String,
  440|      0|                           (NSSUTF8 *)nickname, PORT_Strlen(nickname));
  ------------------
  |  |  190|      0|#define PORT_Strlen(s) strlen(s)
  ------------------
  441|      0|    }
  442|  5.09k|    if (cc->emailAddr && cc->emailAddr[0]) {
  ------------------
  |  Branch (442:9): [True: 11, False: 5.08k]
  |  Branch (442:26): [True: 11, False: 0]
  ------------------
  443|     11|        c->email = nssUTF8_Create(
  444|     11|            c->object.arena, nssStringType_PrintableString,
  445|     11|            (NSSUTF8 *)cc->emailAddr, PORT_Strlen(cc->emailAddr));
  ------------------
  |  |  190|     11|#define PORT_Strlen(s) strlen(s)
  ------------------
  446|     11|    }
  447|       |
  448|  5.09k|    tempCert = NSSCryptoContext_FindOrImportCertificate(gCC, c);
  449|  5.09k|    if (!tempCert) {
  ------------------
  |  Branch (449:9): [True: 0, False: 5.09k]
  ------------------
  450|      0|        CERT_MapStanError();
  451|      0|        goto loser;
  452|      0|    }
  453|       |    /* destroy our copy */
  454|  5.09k|    NSSCertificate_Destroy(c);
  455|       |    /* and use the stored entry */
  456|  5.09k|    c = tempCert;
  457|  5.09k|    cc = STAN_GetCERTCertificateOrRelease(c);
  458|  5.09k|    if (!cc) {
  ------------------
  |  Branch (458:9): [True: 0, False: 5.09k]
  ------------------
  459|       |        /* STAN_GetCERTCertificateOrRelease destroys c on failure. */
  460|      0|        CERT_MapStanError();
  461|      0|        return NULL;
  462|      0|    }
  463|       |
  464|  5.09k|    CERT_LockCertTempPerm(cc);
  465|  5.09k|    cc->istemp = PR_TRUE;
  ------------------
  |  |  437|  5.09k|#define PR_TRUE 1
  ------------------
  466|  5.09k|    cc->isperm = PR_FALSE;
  ------------------
  |  |  438|  5.09k|#define PR_FALSE 0
  ------------------
  467|  5.09k|    CERT_UnlockCertTempPerm(cc);
  468|  5.09k|    return cc;
  469|    211|loser:
  470|       |    /* Perhaps this should be nssCertificate_Destroy(c) */
  471|    211|    nssPKIObject_Destroy(&c->object);
  472|    211|    return NULL;
  473|  5.09k|}
CERT_DestroyCertificate:
  817|  9.64k|{
  818|  9.64k|    if (cert) {
  ------------------
  |  Branch (818:9): [True: 9.63k, False: 13]
  ------------------
  819|       |        /* don't use STAN_GetNSSCertificate because we don't want to
  820|       |         * go to the trouble of translating the CERTCertificate into
  821|       |         * an NSSCertificate just to destroy it.  If it hasn't been done
  822|       |         * yet, don't do it at all
  823|       |         *
  824|       |         * cert->nssCertificate contains its own locks and refcount, but as it
  825|       |         * may be NULL, the pointer itself must be guarded by some other lock.
  826|       |         * Rather than creating a new global lock for only this purpose, share
  827|       |         * an existing global lock that happens to be taken near the write in
  828|       |         * fill_CERTCertificateFields(). The longer-term goal is to refactor
  829|       |         * all these global locks to be certificate-scoped. */
  830|  9.63k|        CERT_MaybeLockCertTempPerm(cert);
  831|  9.63k|        NSSCertificate *tmp = cert->nssCertificate;
  832|  9.63k|        CERT_MaybeUnlockCertTempPerm(cert);
  833|  9.63k|        if (tmp) {
  ------------------
  |  Branch (833:13): [True: 9.63k, False: 0]
  ------------------
  834|       |            /* delete the NSSCertificate */
  835|  9.63k|            NSSCertificate_Destroy(tmp);
  836|  9.63k|        } else if (cert->arena) {
  ------------------
  |  Branch (836:20): [True: 0, False: 0]
  ------------------
  837|      0|            PORT_FreeArena(cert->arena, PR_FALSE);
  ------------------
  |  |   61|      0|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                          PORT_FreeArena(cert->arena, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  838|      0|        }
  839|  9.63k|    }
  840|  9.64k|    return;
  841|  9.64k|}

CERT_DecodeAuthKeyID:
   81|    181|{
   82|    181|    CERTAuthKeyID *value = NULL;
   83|    181|    SECStatus rv = SECFailure;
   84|    181|    void *mark;
   85|    181|    SECItem newEncodedValue;
   86|       |
   87|    181|    PORT_Assert(arena);
  ------------------
  |  |  120|    181|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    181|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 181, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   88|       |
   89|    181|    do {
   90|    181|        mark = PORT_ArenaMark(arena);
  ------------------
  |  |   55|    181|#define PORT_ArenaMark PORT_ArenaMark_Util
  ------------------
   91|    181|        value = (CERTAuthKeyID *)PORT_ArenaZAlloc(arena, sizeof(*value));
  ------------------
  |  |   59|    181|#define PORT_ArenaZAlloc PORT_ArenaZAlloc_Util
  ------------------
   92|    181|        if (value == NULL)
  ------------------
  |  Branch (92:13): [True: 0, False: 181]
  ------------------
   93|      0|            break;
   94|    181|        value->DERAuthCertIssuer = NULL;
   95|       |        /* copy the DER into the arena, since Quick DER returns data that points
   96|       |           into the DER input, which may get freed by the caller */
   97|    181|        rv = SECITEM_CopyItem(arena, &newEncodedValue, encodedValue);
  ------------------
  |  |  106|    181|#define SECITEM_CopyItem SECITEM_CopyItem_Util
  ------------------
   98|    181|        if (rv != SECSuccess) {
  ------------------
  |  Branch (98:13): [True: 0, False: 181]
  ------------------
   99|      0|            break;
  100|      0|        }
  101|       |
  102|    181|        rv = SEC_QuickDERDecodeItem(arena, value, CERTAuthKeyIDTemplate,
  ------------------
  |  |  102|    181|#define SEC_QuickDERDecodeItem SEC_QuickDERDecodeItem_Util
  ------------------
  103|    181|                                    &newEncodedValue);
  104|    181|        if (rv != SECSuccess)
  ------------------
  |  Branch (104:13): [True: 125, False: 56]
  ------------------
  105|    125|            break;
  106|       |
  107|     56|        value->authCertIssuer =
  108|     56|            cert_DecodeGeneralNames(arena, value->DERAuthCertIssuer);
  109|     56|        if (value->authCertIssuer == NULL)
  ------------------
  |  Branch (109:13): [True: 56, False: 0]
  ------------------
  110|     56|            break;
  111|       |
  112|       |        /* what if the general name contains other format but not URI ?
  113|       |           hl
  114|       |         */
  115|      0|        if ((value->authCertSerialNumber.data && !value->authCertIssuer) ||
  ------------------
  |  Branch (115:14): [True: 0, False: 0]
  |  Branch (115:50): [True: 0, False: 0]
  ------------------
  116|      0|            (!value->authCertSerialNumber.data && value->authCertIssuer)) {
  ------------------
  |  Branch (116:14): [True: 0, False: 0]
  |  Branch (116:51): [True: 0, False: 0]
  ------------------
  117|      0|            PORT_SetError(SEC_ERROR_EXTENSION_VALUE_INVALID);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  118|      0|            break;
  119|      0|        }
  120|      0|    } while (0);
  ------------------
  |  Branch (120:14): [Folded - Ignored]
  ------------------
  121|       |
  122|    181|    if (rv != SECSuccess) {
  ------------------
  |  Branch (122:9): [True: 125, False: 56]
  ------------------
  123|    125|        PORT_ArenaRelease(arena, mark);
  ------------------
  |  |   56|    125|#define PORT_ArenaRelease PORT_ArenaRelease_Util
  ------------------
  124|    125|        return ((CERTAuthKeyID *)NULL);
  125|    125|    }
  126|     56|    PORT_ArenaUnmark(arena, mark);
  ------------------
  |  |   58|     56|#define PORT_ArenaUnmark PORT_ArenaUnmark_Util
  ------------------
  127|     56|    return (value);
  128|    181|}

CERT_DecodeBasicConstraintValue:
   94|  5.73k|{
   95|  5.73k|    EncodedContext decodeContext;
   96|  5.73k|    PORTCheapArenaPool tmpArena;
   97|  5.73k|    SECStatus rv = SECSuccess;
   98|       |
   99|  5.73k|    do {
  100|  5.73k|        PORT_Memset(&decodeContext, 0, sizeof(decodeContext));
  ------------------
  |  |  182|  5.73k|#define PORT_Memset memset
  ------------------
  101|       |        /* initialize the value just in case we got "0x30 00", or when the
  102|       |           pathLenConstraint is omitted.
  103|       |         */
  104|  5.73k|        decodeContext.isCA.data = &hexFalse;
  105|  5.73k|        decodeContext.isCA.len = 1;
  106|       |
  107|  5.73k|        PORT_InitCheapArena(&tmpArena, SEC_ASN1_DEFAULT_ARENA_SIZE);
  ------------------
  |  |   60|  5.73k|#define SEC_ASN1_DEFAULT_ARENA_SIZE (2048)
  ------------------
  108|       |
  109|  5.73k|        rv = SEC_QuickDERDecodeItem(&tmpArena.arena, &decodeContext,
  ------------------
  |  |  102|  5.73k|#define SEC_QuickDERDecodeItem SEC_QuickDERDecodeItem_Util
  ------------------
  110|  5.73k|                                    CERTBasicConstraintsTemplate, encodedValue);
  111|  5.73k|        if (rv == SECFailure)
  ------------------
  |  Branch (111:13): [True: 2.19k, False: 3.54k]
  ------------------
  112|  2.19k|            break;
  113|       |
  114|  3.54k|        value->isCA = decodeContext.isCA.data
  ------------------
  |  Branch (114:23): [True: 3.54k, False: 0]
  ------------------
  115|  3.54k|                          ? (PRBool)(decodeContext.isCA.data[0] != 0)
  116|  3.54k|                          : PR_FALSE;
  ------------------
  |  |  438|  3.54k|#define PR_FALSE 0
  ------------------
  117|  3.54k|        if (decodeContext.pathLenConstraint.data == NULL) {
  ------------------
  |  Branch (117:13): [True: 3.53k, False: 2]
  ------------------
  118|       |            /* if the pathLenConstraint is not encoded, and the current setting
  119|       |              is CA, then the pathLenConstraint should be set to a negative
  120|       |              number
  121|       |              for unlimited certificate path.
  122|       |             */
  123|  3.53k|            if (value->isCA) {
  ------------------
  |  Branch (123:17): [True: 74, False: 3.46k]
  ------------------
  124|     74|                value->pathLenConstraint = CERT_UNLIMITED_PATH_CONSTRAINT;
  ------------------
  |  |  599|     74|#define CERT_UNLIMITED_PATH_CONSTRAINT -2
  ------------------
  125|  3.46k|            } else {
  126|  3.46k|                value->pathLenConstraint = 0;
  127|  3.46k|            }
  128|  3.53k|        } else if (value->isCA) {
  ------------------
  |  Branch (128:20): [True: 0, False: 2]
  ------------------
  129|      0|            long len = DER_GetInteger(&decodeContext.pathLenConstraint);
  ------------------
  |  |   27|      0|#define DER_GetInteger DER_GetInteger_Util
  ------------------
  130|      0|            if (len < 0 || len == LONG_MAX) {
  ------------------
  |  Branch (130:17): [True: 0, False: 0]
  |  Branch (130:28): [True: 0, False: 0]
  ------------------
  131|      0|                PORT_SetError(SEC_ERROR_BAD_DER);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  132|      0|                GEN_BREAK(SECFailure);
  ------------------
  |  |   41|      0|    rv = status;          \
  |  |   42|      0|    break;
  ------------------
  133|      0|            }
  134|      0|            value->pathLenConstraint = len;
  135|      2|        } else {
  136|       |            /* here we get an error where the subject is not a CA, but
  137|       |               the pathLenConstraint is set */
  138|      2|            PORT_SetError(SEC_ERROR_BAD_DER);
  ------------------
  |  |   65|      2|#define PORT_SetError PORT_SetError_Util
  ------------------
  139|      2|            GEN_BREAK(SECFailure);
  ------------------
  |  |   41|      2|    rv = status;          \
  |  |   42|      2|    break;
  ------------------
  140|      0|            break;
  141|      2|        }
  142|  3.54k|    } while (0);
  ------------------
  |  Branch (142:14): [Folded - Ignored]
  ------------------
  143|       |
  144|      0|    PORT_DestroyCheapArena(&tmpArena);
  145|  5.73k|    return (rv);
  146|  5.73k|}

CERT_DecodeAltNameExtension:
  164|    134|{
  165|    134|    SECStatus rv = SECSuccess;
  166|    134|    CERTAltNameEncodedContext encodedContext;
  167|    134|    SECItem *newEncodedAltName;
  168|       |
  169|    134|    if (!reqArena) {
  ------------------
  |  Branch (169:9): [True: 0, False: 134]
  ------------------
  170|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  171|      0|        return NULL;
  172|      0|    }
  173|       |
  174|    134|    newEncodedAltName = SECITEM_ArenaDupItem(reqArena, EncodedAltName);
  ------------------
  |  |  104|    134|#define SECITEM_ArenaDupItem SECITEM_ArenaDupItem_Util
  ------------------
  175|    134|    if (!newEncodedAltName) {
  ------------------
  |  Branch (175:9): [True: 0, False: 134]
  ------------------
  176|      0|        return NULL;
  177|      0|    }
  178|       |
  179|    134|    encodedContext.encodedGenName = NULL;
  180|    134|    PORT_Memset(&encodedContext, 0, sizeof(CERTAltNameEncodedContext));
  ------------------
  |  |  182|    134|#define PORT_Memset memset
  ------------------
  181|    134|    rv = SEC_QuickDERDecodeItem(reqArena, &encodedContext,
  ------------------
  |  |  102|    134|#define SEC_QuickDERDecodeItem SEC_QuickDERDecodeItem_Util
  ------------------
  182|    134|                                CERT_GeneralNamesTemplate, newEncodedAltName);
  183|    134|    if (rv == SECFailure) {
  ------------------
  |  Branch (183:9): [True: 85, False: 49]
  ------------------
  184|     85|        goto loser;
  185|     85|    }
  186|     49|    if (encodedContext.encodedGenName && encodedContext.encodedGenName[0])
  ------------------
  |  Branch (186:9): [True: 49, False: 0]
  |  Branch (186:42): [True: 29, False: 20]
  ------------------
  187|     29|        return cert_DecodeGeneralNames(reqArena, encodedContext.encodedGenName);
  188|       |    /* Extension contained an empty GeneralNames sequence */
  189|       |    /* Treat as extension not found */
  190|     20|    PORT_SetError(SEC_ERROR_EXTENSION_NOT_FOUND);
  ------------------
  |  |   65|     20|#define PORT_SetError PORT_SetError_Util
  ------------------
  191|    105|loser:
  192|    105|    return NULL;
  193|     20|}

CERT_ClearOCSPCache:
  595|      1|{
  596|      1|    OCSP_TRACE(("OCSP CERT_ClearOCSPCache\n"));
  ------------------
  |  |  144|      1|#define OCSP_TRACE(msg) ocsp_Trace msg
  ------------------
  597|      1|    PR_EnterMonitor(OCSP_Global.monitor);
  598|      1|    while (OCSP_Global.cache.numberOfEntries > 0) {
  ------------------
  |  Branch (598:12): [True: 0, False: 1]
  ------------------
  599|      0|        ocsp_RemoveCacheItem(&OCSP_Global.cache,
  600|      0|                             OCSP_Global.cache.LRUitem);
  601|      0|    }
  602|      1|    PR_ExitMonitor(OCSP_Global.monitor);
  603|      1|    return SECSuccess;
  604|      1|}
OCSP_InitGlobal:
  933|      1|{
  934|      1|    SECStatus rv = SECFailure;
  935|       |
  936|      1|    if (OCSP_Global.monitor == NULL) {
  ------------------
  |  Branch (936:9): [True: 1, False: 0]
  ------------------
  937|      1|        OCSP_Global.monitor = PR_NewMonitor();
  938|      1|    }
  939|      1|    if (!OCSP_Global.monitor)
  ------------------
  |  Branch (939:9): [True: 0, False: 1]
  ------------------
  940|      0|        return SECFailure;
  941|       |
  942|      1|    PR_EnterMonitor(OCSP_Global.monitor);
  943|      1|    if (!OCSP_Global.cache.entries) {
  ------------------
  |  Branch (943:9): [True: 1, False: 0]
  ------------------
  944|      1|        OCSP_Global.cache.entries =
  945|      1|            PL_NewHashTable(0,
  946|      1|                            ocsp_CacheKeyHashFunction,
  947|      1|                            ocsp_CacheKeyCompareFunction,
  948|      1|                            PL_CompareValues,
  949|      1|                            NULL,
  950|      1|                            NULL);
  951|      1|        OCSP_Global.ocspFailureMode = ocspMode_FailureIsVerificationFailure;
  952|      1|        OCSP_Global.cache.numberOfEntries = 0;
  953|      1|        OCSP_Global.cache.MRUitem = NULL;
  954|      1|        OCSP_Global.cache.LRUitem = NULL;
  955|      1|    } else {
  956|       |        /*
  957|       |         * NSS might call this function twice while attempting to init.
  958|       |         * But it's not allowed to call this again after any activity.
  959|       |         */
  960|      0|        PORT_Assert(OCSP_Global.cache.numberOfEntries == 0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  961|      0|        PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  962|      0|    }
  963|      1|    if (OCSP_Global.cache.entries)
  ------------------
  |  Branch (963:9): [True: 1, False: 0]
  ------------------
  964|      1|        rv = SECSuccess;
  965|      1|    PR_ExitMonitor(OCSP_Global.monitor);
  966|      1|    return rv;
  967|      1|}
OCSP_ShutdownGlobal:
  971|      1|{
  972|      1|    if (!OCSP_Global.monitor)
  ------------------
  |  Branch (972:9): [True: 0, False: 1]
  ------------------
  973|      0|        return SECSuccess;
  974|       |
  975|      1|    PR_EnterMonitor(OCSP_Global.monitor);
  976|      1|    if (OCSP_Global.cache.entries) {
  ------------------
  |  Branch (976:9): [True: 1, False: 0]
  ------------------
  977|      1|        CERT_ClearOCSPCache();
  978|      1|        PL_HashTableDestroy(OCSP_Global.cache.entries);
  979|      1|        OCSP_Global.cache.entries = NULL;
  980|      1|    }
  981|      1|    PORT_Assert(OCSP_Global.cache.numberOfEntries == 0);
  ------------------
  |  |  120|      1|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      1|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  982|      1|    OCSP_Global.cache.MRUitem = NULL;
  983|      1|    OCSP_Global.cache.LRUitem = NULL;
  984|       |
  985|      1|    OCSP_Global.defaultHttpClientFcn = NULL;
  986|      1|    OCSP_Global.maxCacheEntries = DEFAULT_OCSP_CACHE_SIZE;
  ------------------
  |  |   40|      1|#define DEFAULT_OCSP_CACHE_SIZE 1000
  ------------------
  987|      1|    OCSP_Global.minimumSecondsToNextFetchAttempt =
  988|      1|        DEFAULT_MINIMUM_SECONDS_TO_NEXT_OCSP_FETCH_ATTEMPT;
  ------------------
  |  |   41|      1|#define DEFAULT_MINIMUM_SECONDS_TO_NEXT_OCSP_FETCH_ATTEMPT 1 * 60 * 60L
  ------------------
  989|      1|    OCSP_Global.maximumSecondsToNextFetchAttempt =
  990|      1|        DEFAULT_MAXIMUM_SECONDS_TO_NEXT_OCSP_FETCH_ATTEMPT;
  ------------------
  |  |   42|      1|#define DEFAULT_MAXIMUM_SECONDS_TO_NEXT_OCSP_FETCH_ATTEMPT 24 * 60 * 60L
  ------------------
  991|      1|    OCSP_Global.ocspFailureMode =
  992|      1|        ocspMode_FailureIsVerificationFailure;
  993|      1|    PR_ExitMonitor(OCSP_Global.monitor);
  994|       |
  995|      1|    PR_DestroyMonitor(OCSP_Global.monitor);
  996|      1|    OCSP_Global.monitor = NULL;
  997|      1|    return SECSuccess;
  998|      1|}
ocsp.c:ocsp_Trace:
  173|      1|{
  174|      1|    char buf[2000];
  175|      1|    va_list args;
  176|       |
  177|      1|    if (!wantOcspTrace())
  ------------------
  |  Branch (177:9): [True: 1, False: 0]
  ------------------
  178|      1|        return;
  179|      0|    va_start(args, format);
  180|      0|    PR_vsnprintf(buf, sizeof(buf), format, args);
  181|      0|    va_end(args);
  182|      0|    PR_LogPrint("%s", buf);
  183|      0|}
ocsp.c:wantOcspTrace:
  155|      1|{
  156|      1|    static PRBool firstTime = PR_TRUE;
  ------------------
  |  |  437|      1|#define PR_TRUE 1
  ------------------
  157|      1|    static PRBool wantTrace = PR_FALSE;
  ------------------
  |  |  438|      1|#define PR_FALSE 0
  ------------------
  158|       |
  159|      1|#ifdef NSS_HAVE_GETENV
  160|      1|    if (firstTime) {
  ------------------
  |  Branch (160:9): [True: 1, False: 0]
  ------------------
  161|      1|        char *ev = PR_GetEnvSecure("NSS_TRACE_OCSP");
  162|      1|        if (ev && ev[0]) {
  ------------------
  |  Branch (162:13): [True: 0, False: 1]
  |  Branch (162:19): [True: 0, False: 0]
  ------------------
  163|      0|            wantTrace = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  164|      0|        }
  165|      1|        firstTime = PR_FALSE;
  ------------------
  |  |  438|      1|#define PR_FALSE 0
  ------------------
  166|      1|    }
  167|      1|#endif
  168|      1|    return wantTrace;
  169|      1|}

DSAU_ConvertSignedToFixedUnsigned:
   70|  2.60k|{
   71|  2.60k|    unsigned char *pSrc = src->data;
   72|  2.60k|    unsigned char *pDst = dest->data;
   73|  2.60k|    unsigned int cntSrc = src->len;
   74|  2.60k|    unsigned int cntDst = dest->len;
   75|  2.60k|    int zCount = cntDst - cntSrc;
   76|       |
   77|  2.60k|    if (zCount > 0) {
  ------------------
  |  Branch (77:9): [True: 2.14k, False: 455]
  ------------------
   78|  2.14k|        PORT_Memset(pDst, 0, zCount);
  ------------------
  |  |  182|  2.14k|#define PORT_Memset memset
  ------------------
   79|  2.14k|        PORT_Memcpy(pDst + zCount, pSrc, cntSrc);
  ------------------
  |  |  180|  2.14k|#define PORT_Memcpy memcpy
  ------------------
   80|  2.14k|        return SECSuccess;
   81|  2.14k|    }
   82|    455|    if (zCount <= 0) {
  ------------------
  |  Branch (82:9): [True: 455, False: 0]
  ------------------
   83|       |        /* Source is longer than destination.  Check for leading zeros. */
   84|    455|        while (zCount++ < 0) {
  ------------------
  |  Branch (84:16): [True: 11, False: 444]
  ------------------
   85|     11|            if (*pSrc++ != 0)
  ------------------
  |  Branch (85:17): [True: 11, False: 0]
  ------------------
   86|     11|                goto loser;
   87|     11|        }
   88|    455|    }
   89|    444|    PORT_Memcpy(pDst, pSrc, cntDst);
  ------------------
  |  |  180|    444|#define PORT_Memcpy memcpy
  ------------------
   90|    444|    return SECSuccess;
   91|       |
   92|     11|loser:
   93|     11|    PORT_SetError(PR_INVALID_ARGUMENT_ERROR);
  ------------------
  |  |   65|     11|#define PORT_SetError PORT_SetError_Util
  ------------------
                  PORT_SetError(PR_INVALID_ARGUMENT_ERROR);
  ------------------
  |  |   55|     11|#define PR_INVALID_ARGUMENT_ERROR                (-5987L)
  ------------------
   94|     11|    return SECFailure;
   95|    455|}
DSAU_DecodeDerSigToLen:
  269|  1.32k|{
  270|  1.32k|    return common_DecodeDerSig(item, len / 2);
  271|  1.32k|}
dsautil.c:common_DecodeDerSig:
  166|  1.32k|{
  167|  1.32k|    SECItem *result = NULL;
  168|  1.32k|    PORTCheapArenaPool arena;
  169|  1.32k|    SECStatus status;
  170|  1.32k|    DSA_ASN1Signature sig;
  171|  1.32k|    SECItem dst;
  172|       |
  173|  1.32k|    PORT_Memset(&sig, 0, sizeof(sig));
  ------------------
  |  |  182|  1.32k|#define PORT_Memset memset
  ------------------
  174|       |
  175|       |    /* Make enough room for r + s. */
  176|  1.32k|    PORT_InitCheapArena(&arena, PR_MAX(2 * MAX_ECKEY_LEN, DSA_MAX_SIGNATURE_LEN));
  ------------------
  |  |  159|  1.32k|#define PR_MAX(x,y)     ((x)>(y)?(x):(y))
  |  |  ------------------
  |  |  |  Branch (159:26): [Folded - Ignored]
  |  |  ------------------
  ------------------
  177|       |
  178|  1.32k|    result = PORT_ZNew(SECItem);
  ------------------
  |  |  148|  1.32k|#define PORT_ZNew(type) (type *)PORT_ZAlloc(sizeof(type))
  |  |  ------------------
  |  |  |  |   72|  1.32k|#define PORT_ZAlloc PORT_ZAlloc_Util
  |  |  ------------------
  ------------------
  179|  1.32k|    if (result == NULL)
  ------------------
  |  Branch (179:9): [True: 0, False: 1.32k]
  ------------------
  180|      0|        goto loser;
  181|       |
  182|  1.32k|    result->len = 2 * len;
  183|  1.32k|    result->data = (unsigned char *)PORT_Alloc(2 * len);
  ------------------
  |  |   52|  1.32k|#define PORT_Alloc PORT_Alloc_Util
  ------------------
  184|  1.32k|    if (result->data == NULL)
  ------------------
  |  Branch (184:9): [True: 0, False: 1.32k]
  ------------------
  185|      0|        goto loser;
  186|       |
  187|  1.32k|    sig.r.type = siUnsignedInteger;
  188|  1.32k|    sig.s.type = siUnsignedInteger;
  189|  1.32k|    status = SEC_QuickDERDecodeItem(&arena.arena, &sig, DSA_SignatureTemplate, item);
  ------------------
  |  |  102|  1.32k|#define SEC_QuickDERDecodeItem SEC_QuickDERDecodeItem_Util
  ------------------
  190|  1.32k|    if (status != SECSuccess)
  ------------------
  |  Branch (190:9): [True: 19, False: 1.30k]
  ------------------
  191|     19|        goto loser;
  192|       |
  193|       |    /* Convert sig.r and sig.s from variable  length signed integers to
  194|       |    ** fixed length unsigned integers.
  195|       |    */
  196|  1.30k|    dst.data = result->data;
  197|  1.30k|    dst.len = len;
  198|  1.30k|    status = DSAU_ConvertSignedToFixedUnsigned(&dst, &sig.r);
  199|  1.30k|    if (status != SECSuccess)
  ------------------
  |  Branch (199:9): [True: 9, False: 1.29k]
  ------------------
  200|      9|        goto loser;
  201|       |
  202|  1.29k|    dst.data += len;
  203|  1.29k|    status = DSAU_ConvertSignedToFixedUnsigned(&dst, &sig.s);
  204|  1.29k|    if (status != SECSuccess)
  ------------------
  |  Branch (204:9): [True: 2, False: 1.29k]
  ------------------
  205|      2|        goto loser;
  206|       |
  207|  1.32k|done:
  208|  1.32k|    PORT_DestroyCheapArena(&arena);
  209|       |
  210|  1.32k|    return result;
  211|       |
  212|     30|loser:
  213|     30|    if (result != NULL) {
  ------------------
  |  Branch (213:9): [True: 30, False: 0]
  ------------------
  214|     30|        SECITEM_FreeItem(result, PR_TRUE);
  ------------------
  |  |  108|     30|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                      SECITEM_FreeItem(result, PR_TRUE);
  ------------------
  |  |  437|     30|#define PR_TRUE 1
  ------------------
  215|     30|        result = NULL;
  216|     30|    }
  217|     30|    goto done;
  218|  1.29k|}

HASH_GetHashObjectByOidTag:
  273|  18.1k|{
  274|  18.1k|    HASH_HashType ht = HASH_GetHashTypeByOidTag(hashOid);
  ------------------
  |  |  125|  18.1k|#define HASH_GetHashTypeByOidTag HASH_GetHashTypeByOidTag_Util
  ------------------
  275|       |
  276|  18.1k|    return (ht == HASH_AlgNULL) ? NULL : &SECHashObjects[ht];
  ------------------
  |  Branch (276:12): [True: 0, False: 18.1k]
  ------------------
  277|  18.1k|}
HASH_ResultLenByOidTag:
  282|  18.1k|{
  283|  18.1k|    const SECHashObject *hashObject = HASH_GetHashObjectByOidTag(hashOid);
  284|  18.1k|    unsigned int resultLen = 0;
  285|       |
  286|  18.1k|    if (hashObject)
  ------------------
  |  Branch (286:9): [True: 18.1k, False: 0]
  ------------------
  287|  18.1k|        resultLen = hashObject->length;
  288|  18.1k|    return resultLen;
  289|  18.1k|}

SECKEY_CreateDHPrivateKey:
  175|  1.13k|{
  176|  1.13k|    SECKEYPrivateKey *privk;
  177|  1.13k|    PK11SlotInfo *slot;
  178|       |
  179|  1.13k|    if (!param || !param->base.data || !param->prime.data ||
  ------------------
  |  Branch (179:9): [True: 0, False: 1.13k]
  |  Branch (179:19): [True: 0, False: 1.13k]
  |  Branch (179:40): [True: 0, False: 1.13k]
  ------------------
  180|  1.13k|        SECKEY_BigIntegerBitLength(&param->prime) < DH_MIN_P_BITS ||
  ------------------
  |  |  154|  2.26k|#define DH_MIN_P_BITS 128
  ------------------
  |  Branch (180:9): [True: 0, False: 1.13k]
  ------------------
  181|  1.13k|        param->base.len == 0 || param->base.len > param->prime.len + 1 ||
  ------------------
  |  Branch (181:9): [True: 0, False: 1.13k]
  |  Branch (181:33): [True: 0, False: 1.13k]
  ------------------
  182|  1.13k|        (param->base.len == 1 && param->base.data[0] == 0)) {
  ------------------
  |  Branch (182:10): [True: 1.13k, False: 0]
  |  Branch (182:34): [True: 0, False: 1.13k]
  ------------------
  183|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  184|      0|        return NULL;
  185|      0|    }
  186|       |
  187|  1.13k|    slot = PK11_GetBestSlot(CKM_DH_PKCS_KEY_PAIR_GEN, cx);
  ------------------
  |  |  758|  1.13k|#define CKM_DH_PKCS_KEY_PAIR_GEN 0x00000020UL
  ------------------
  188|  1.13k|    if (!slot) {
  ------------------
  |  Branch (188:9): [True: 0, False: 1.13k]
  ------------------
  189|      0|        return NULL;
  190|      0|    }
  191|       |
  192|  1.13k|    privk = PK11_GenerateKeyPair(slot, CKM_DH_PKCS_KEY_PAIR_GEN, param,
  ------------------
  |  |  758|  1.13k|#define CKM_DH_PKCS_KEY_PAIR_GEN 0x00000020UL
  ------------------
  193|  1.13k|                                 pubk, PR_FALSE, PR_FALSE, cx);
  ------------------
  |  |  438|  1.13k|#define PR_FALSE 0
  ------------------
                                               pubk, PR_FALSE, PR_FALSE, cx);
  ------------------
  |  |  438|  1.13k|#define PR_FALSE 0
  ------------------
  194|  1.13k|    if (!privk)
  ------------------
  |  Branch (194:9): [True: 0, False: 1.13k]
  ------------------
  195|      0|        privk = PK11_GenerateKeyPair(slot, CKM_DH_PKCS_KEY_PAIR_GEN, param,
  ------------------
  |  |  758|      0|#define CKM_DH_PKCS_KEY_PAIR_GEN 0x00000020UL
  ------------------
  196|      0|                                     pubk, PR_FALSE, PR_TRUE, cx);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
                                                   pubk, PR_FALSE, PR_TRUE, cx);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  197|       |
  198|  1.13k|    PK11_FreeSlot(slot);
  199|  1.13k|    return (privk);
  200|  1.13k|}
SECKEY_DestroyPrivateKey:
  267|  19.0k|{
  268|  19.0k|    if (privk) {
  ------------------
  |  Branch (268:9): [True: 9.67k, False: 9.37k]
  ------------------
  269|  9.67k|        if (privk->pkcs11Slot) {
  ------------------
  |  Branch (269:13): [True: 9.67k, False: 0]
  ------------------
  270|  9.67k|            if (privk->pkcs11IsTemp) {
  ------------------
  |  Branch (270:17): [True: 9.67k, False: 0]
  ------------------
  271|  9.67k|                PK11_DestroyObject(privk->pkcs11Slot, privk->pkcs11ID);
  272|  9.67k|            }
  273|  9.67k|            PK11_FreeSlot(privk->pkcs11Slot);
  274|  9.67k|        }
  275|  9.67k|        if (privk->arena) {
  ------------------
  |  Branch (275:13): [True: 9.67k, False: 0]
  ------------------
  276|  9.67k|            PORT_FreeArena(privk->arena, PR_TRUE);
  ------------------
  |  |   61|  9.67k|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                          PORT_FreeArena(privk->arena, PR_TRUE);
  ------------------
  |  |  437|  9.67k|#define PR_TRUE 1
  ------------------
  277|  9.67k|        }
  278|  9.67k|    }
  279|  19.0k|}
SECKEY_DestroyPublicKey:
  283|  28.4k|{
  284|  28.4k|    if (pubk) {
  ------------------
  |  Branch (284:9): [True: 19.0k, False: 9.36k]
  ------------------
  285|  19.0k|        if (pubk->pkcs11Slot) {
  ------------------
  |  Branch (285:13): [True: 13.3k, False: 5.68k]
  ------------------
  286|  13.3k|            if (!PK11_IsPermObject(pubk->pkcs11Slot, pubk->pkcs11ID)) {
  ------------------
  |  Branch (286:17): [True: 13.3k, False: 0]
  ------------------
  287|  13.3k|                PK11_DestroyObject(pubk->pkcs11Slot, pubk->pkcs11ID);
  288|  13.3k|            }
  289|  13.3k|            PK11_FreeSlot(pubk->pkcs11Slot);
  290|  13.3k|        }
  291|  19.0k|        if (pubk->arena) {
  ------------------
  |  Branch (291:13): [True: 19.0k, False: 0]
  ------------------
  292|  19.0k|            PORT_FreeArena(pubk->arena, PR_FALSE);
  ------------------
  |  |   61|  19.0k|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                          PORT_FreeArena(pubk->arena, PR_FALSE);
  ------------------
  |  |  438|  19.0k|#define PR_FALSE 0
  ------------------
  293|  19.0k|        }
  294|  19.0k|    }
  295|  28.4k|}
SECKEY_UpdateCertPQG:
  459|  5.01k|{
  460|  5.01k|    if (!subjectCert) {
  ------------------
  |  Branch (460:9): [True: 0, False: 5.01k]
  ------------------
  461|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  462|      0|        return SECFailure;
  463|      0|    }
  464|  5.01k|    return seckey_UpdateCertPQGChain(subjectCert, 0);
  465|  5.01k|}
seckey_GetKeyType:
  520|    205|{
  521|    205|    KeyType keyType;
  522|       |
  523|    205|    switch (tag) {
  524|      0|        case SEC_OID_X500_RSA_ENCRYPTION:
  ------------------
  |  Branch (524:9): [True: 0, False: 205]
  ------------------
  525|     18|        case SEC_OID_PKCS1_RSA_ENCRYPTION:
  ------------------
  |  Branch (525:9): [True: 18, False: 187]
  ------------------
  526|     18|            keyType = rsaKey;
  527|     18|            break;
  528|      0|        case SEC_OID_PKCS1_RSA_PSS_SIGNATURE:
  ------------------
  |  Branch (528:9): [True: 0, False: 205]
  ------------------
  529|      0|            keyType = rsaPssKey;
  530|      0|            break;
  531|      0|        case SEC_OID_PKCS1_RSA_OAEP_ENCRYPTION:
  ------------------
  |  Branch (531:9): [True: 0, False: 205]
  ------------------
  532|      0|            keyType = rsaOaepKey;
  533|      0|            break;
  534|      0|        case SEC_OID_ANSIX9_DSA_SIGNATURE:
  ------------------
  |  Branch (534:9): [True: 0, False: 205]
  ------------------
  535|      0|            keyType = dsaKey;
  536|      0|            break;
  537|      0|        case SEC_OID_MISSI_KEA_DSS_OLD:
  ------------------
  |  Branch (537:9): [True: 0, False: 205]
  ------------------
  538|      0|        case SEC_OID_MISSI_KEA_DSS:
  ------------------
  |  Branch (538:9): [True: 0, False: 205]
  ------------------
  539|      0|        case SEC_OID_MISSI_DSS_OLD:
  ------------------
  |  Branch (539:9): [True: 0, False: 205]
  ------------------
  540|      0|        case SEC_OID_MISSI_DSS:
  ------------------
  |  Branch (540:9): [True: 0, False: 205]
  ------------------
  541|      0|            keyType = fortezzaKey;
  542|      0|            break;
  543|      0|        case SEC_OID_MISSI_KEA:
  ------------------
  |  Branch (543:9): [True: 0, False: 205]
  ------------------
  544|      0|        case SEC_OID_MISSI_ALT_KEA:
  ------------------
  |  Branch (544:9): [True: 0, False: 205]
  ------------------
  545|      0|            keyType = keaKey;
  546|      0|            break;
  547|      0|        case SEC_OID_X942_DIFFIE_HELMAN_KEY:
  ------------------
  |  Branch (547:9): [True: 0, False: 205]
  ------------------
  548|      0|            keyType = dhKey;
  549|      0|            break;
  550|    187|        case SEC_OID_ANSIX962_EC_PUBLIC_KEY:
  ------------------
  |  Branch (550:9): [True: 187, False: 18]
  ------------------
  551|    187|            keyType = ecKey;
  552|    187|            break;
  553|      0|        case SEC_OID_ED25519_PUBLIC_KEY:
  ------------------
  |  Branch (553:9): [True: 0, False: 205]
  ------------------
  554|      0|            keyType = edKey;
  555|      0|            break;
  556|       |        /* accommodate applications that hand us a signature type when they
  557|       |         * should be handing us a cipher type */
  558|      0|        case SEC_OID_PKCS1_MD5_WITH_RSA_ENCRYPTION:
  ------------------
  |  Branch (558:9): [True: 0, False: 205]
  ------------------
  559|      0|        case SEC_OID_PKCS1_SHA1_WITH_RSA_ENCRYPTION:
  ------------------
  |  Branch (559:9): [True: 0, False: 205]
  ------------------
  560|      0|        case SEC_OID_PKCS1_SHA224_WITH_RSA_ENCRYPTION:
  ------------------
  |  Branch (560:9): [True: 0, False: 205]
  ------------------
  561|      0|        case SEC_OID_PKCS1_SHA256_WITH_RSA_ENCRYPTION:
  ------------------
  |  Branch (561:9): [True: 0, False: 205]
  ------------------
  562|      0|        case SEC_OID_PKCS1_SHA384_WITH_RSA_ENCRYPTION:
  ------------------
  |  Branch (562:9): [True: 0, False: 205]
  ------------------
  563|      0|        case SEC_OID_PKCS1_SHA512_WITH_RSA_ENCRYPTION:
  ------------------
  |  Branch (563:9): [True: 0, False: 205]
  ------------------
  564|      0|            keyType = rsaKey;
  565|      0|            break;
  566|      0|        default:
  ------------------
  |  Branch (566:9): [True: 0, False: 205]
  ------------------
  567|      0|            keyType = nullKey;
  568|    205|    }
  569|    205|    return keyType;
  570|    205|}
SECKEY_ExtractPublicKey:
  755|  2.48k|{
  756|  2.48k|    return seckey_ExtractPublicKey(spki);
  757|  2.48k|}
CERT_ExtractPublicKey:
  761|  6.71k|{
  762|  6.71k|    return seckey_ExtractPublicKey(&cert->subjectPublicKeyInfo);
  763|  6.71k|}
SECKEY_ECParamsToKeySize:
  767|  2.23k|{
  768|  2.23k|    SECOidTag tag;
  769|  2.23k|    SECItem oid = { siBuffer, NULL, 0 };
  770|       |
  771|       |    /* The encodedParams data contains 0x06 (SEC_ASN1_OBJECT_ID),
  772|       |     * followed by the length of the curve oid and the curve oid.
  773|       |     */
  774|  2.23k|    oid.len = encodedParams->data[1];
  775|  2.23k|    oid.data = encodedParams->data + 2;
  776|  2.23k|    if ((tag = SECOID_FindOIDTag(&oid)) == SEC_OID_UNKNOWN)
  ------------------
  |  |  117|  2.23k|#define SECOID_FindOIDTag SECOID_FindOIDTag_Util
  ------------------
  |  Branch (776:9): [True: 55, False: 2.17k]
  ------------------
  777|     55|        return 0;
  778|       |
  779|  2.17k|    switch (tag) {
  780|      1|        case SEC_OID_SECG_EC_SECP112R1:
  ------------------
  |  Branch (780:9): [True: 1, False: 2.17k]
  ------------------
  781|      2|        case SEC_OID_SECG_EC_SECP112R2:
  ------------------
  |  Branch (781:9): [True: 1, False: 2.17k]
  ------------------
  782|      2|            return 112;
  783|       |
  784|      1|        case SEC_OID_SECG_EC_SECT113R1:
  ------------------
  |  Branch (784:9): [True: 1, False: 2.17k]
  ------------------
  785|      2|        case SEC_OID_SECG_EC_SECT113R2:
  ------------------
  |  Branch (785:9): [True: 1, False: 2.17k]
  ------------------
  786|      2|            return 113;
  787|       |
  788|      1|        case SEC_OID_SECG_EC_SECP128R1:
  ------------------
  |  Branch (788:9): [True: 1, False: 2.17k]
  ------------------
  789|      2|        case SEC_OID_SECG_EC_SECP128R2:
  ------------------
  |  Branch (789:9): [True: 1, False: 2.17k]
  ------------------
  790|      2|            return 128;
  791|       |
  792|      1|        case SEC_OID_SECG_EC_SECT131R1:
  ------------------
  |  Branch (792:9): [True: 1, False: 2.17k]
  ------------------
  793|      2|        case SEC_OID_SECG_EC_SECT131R2:
  ------------------
  |  Branch (793:9): [True: 1, False: 2.17k]
  ------------------
  794|      2|            return 131;
  795|       |
  796|      1|        case SEC_OID_SECG_EC_SECP160K1:
  ------------------
  |  Branch (796:9): [True: 1, False: 2.17k]
  ------------------
  797|      2|        case SEC_OID_SECG_EC_SECP160R1:
  ------------------
  |  Branch (797:9): [True: 1, False: 2.17k]
  ------------------
  798|      3|        case SEC_OID_SECG_EC_SECP160R2:
  ------------------
  |  Branch (798:9): [True: 1, False: 2.17k]
  ------------------
  799|      3|            return 160;
  800|       |
  801|      1|        case SEC_OID_SECG_EC_SECT163K1:
  ------------------
  |  Branch (801:9): [True: 1, False: 2.17k]
  ------------------
  802|      2|        case SEC_OID_SECG_EC_SECT163R1:
  ------------------
  |  Branch (802:9): [True: 1, False: 2.17k]
  ------------------
  803|      3|        case SEC_OID_SECG_EC_SECT163R2:
  ------------------
  |  Branch (803:9): [True: 1, False: 2.17k]
  ------------------
  804|      6|        case SEC_OID_ANSIX962_EC_C2PNB163V1:
  ------------------
  |  Branch (804:9): [True: 3, False: 2.17k]
  ------------------
  805|      7|        case SEC_OID_ANSIX962_EC_C2PNB163V2:
  ------------------
  |  Branch (805:9): [True: 1, False: 2.17k]
  ------------------
  806|      8|        case SEC_OID_ANSIX962_EC_C2PNB163V3:
  ------------------
  |  Branch (806:9): [True: 1, False: 2.17k]
  ------------------
  807|      8|            return 163;
  808|       |
  809|      2|        case SEC_OID_ANSIX962_EC_C2PNB176V1:
  ------------------
  |  Branch (809:9): [True: 2, False: 2.17k]
  ------------------
  810|      2|            return 176;
  811|       |
  812|      1|        case SEC_OID_ANSIX962_EC_C2TNB191V1:
  ------------------
  |  Branch (812:9): [True: 1, False: 2.17k]
  ------------------
  813|      2|        case SEC_OID_ANSIX962_EC_C2TNB191V2:
  ------------------
  |  Branch (813:9): [True: 1, False: 2.17k]
  ------------------
  814|      6|        case SEC_OID_ANSIX962_EC_C2TNB191V3:
  ------------------
  |  Branch (814:9): [True: 4, False: 2.17k]
  ------------------
  815|      7|        case SEC_OID_ANSIX962_EC_C2ONB191V4:
  ------------------
  |  Branch (815:9): [True: 1, False: 2.17k]
  ------------------
  816|      8|        case SEC_OID_ANSIX962_EC_C2ONB191V5:
  ------------------
  |  Branch (816:9): [True: 1, False: 2.17k]
  ------------------
  817|      8|            return 191;
  818|       |
  819|      1|        case SEC_OID_SECG_EC_SECP192K1:
  ------------------
  |  Branch (819:9): [True: 1, False: 2.17k]
  ------------------
  820|      3|        case SEC_OID_ANSIX962_EC_PRIME192V1:
  ------------------
  |  Branch (820:9): [True: 2, False: 2.17k]
  ------------------
  821|      5|        case SEC_OID_ANSIX962_EC_PRIME192V2:
  ------------------
  |  Branch (821:9): [True: 2, False: 2.17k]
  ------------------
  822|      7|        case SEC_OID_ANSIX962_EC_PRIME192V3:
  ------------------
  |  Branch (822:9): [True: 2, False: 2.17k]
  ------------------
  823|      7|            return 192;
  824|       |
  825|      1|        case SEC_OID_SECG_EC_SECT193R1:
  ------------------
  |  Branch (825:9): [True: 1, False: 2.17k]
  ------------------
  826|      2|        case SEC_OID_SECG_EC_SECT193R2:
  ------------------
  |  Branch (826:9): [True: 1, False: 2.17k]
  ------------------
  827|      2|            return 193;
  828|       |
  829|      1|        case SEC_OID_ANSIX962_EC_C2PNB208W1:
  ------------------
  |  Branch (829:9): [True: 1, False: 2.17k]
  ------------------
  830|      1|            return 208;
  831|       |
  832|      1|        case SEC_OID_SECG_EC_SECP224K1:
  ------------------
  |  Branch (832:9): [True: 1, False: 2.17k]
  ------------------
  833|      2|        case SEC_OID_SECG_EC_SECP224R1:
  ------------------
  |  Branch (833:9): [True: 1, False: 2.17k]
  ------------------
  834|      2|            return 224;
  835|       |
  836|      2|        case SEC_OID_SECG_EC_SECT233K1:
  ------------------
  |  Branch (836:9): [True: 2, False: 2.17k]
  ------------------
  837|      3|        case SEC_OID_SECG_EC_SECT233R1:
  ------------------
  |  Branch (837:9): [True: 1, False: 2.17k]
  ------------------
  838|      3|            return 233;
  839|       |
  840|      1|        case SEC_OID_SECG_EC_SECT239K1:
  ------------------
  |  Branch (840:9): [True: 1, False: 2.17k]
  ------------------
  841|      2|        case SEC_OID_ANSIX962_EC_C2TNB239V1:
  ------------------
  |  Branch (841:9): [True: 1, False: 2.17k]
  ------------------
  842|      5|        case SEC_OID_ANSIX962_EC_C2TNB239V2:
  ------------------
  |  Branch (842:9): [True: 3, False: 2.17k]
  ------------------
  843|      6|        case SEC_OID_ANSIX962_EC_C2TNB239V3:
  ------------------
  |  Branch (843:9): [True: 1, False: 2.17k]
  ------------------
  844|      7|        case SEC_OID_ANSIX962_EC_C2ONB239V4:
  ------------------
  |  Branch (844:9): [True: 1, False: 2.17k]
  ------------------
  845|      8|        case SEC_OID_ANSIX962_EC_C2ONB239V5:
  ------------------
  |  Branch (845:9): [True: 1, False: 2.17k]
  ------------------
  846|     10|        case SEC_OID_ANSIX962_EC_PRIME239V1:
  ------------------
  |  Branch (846:9): [True: 2, False: 2.17k]
  ------------------
  847|     16|        case SEC_OID_ANSIX962_EC_PRIME239V2:
  ------------------
  |  Branch (847:9): [True: 6, False: 2.17k]
  ------------------
  848|     17|        case SEC_OID_ANSIX962_EC_PRIME239V3:
  ------------------
  |  Branch (848:9): [True: 1, False: 2.17k]
  ------------------
  849|     17|            return 239;
  850|       |
  851|     11|        case SEC_OID_SECG_EC_SECP256K1:
  ------------------
  |  Branch (851:9): [True: 11, False: 2.16k]
  ------------------
  852|  1.16k|        case SEC_OID_ANSIX962_EC_PRIME256V1:
  ------------------
  |  Branch (852:9): [True: 1.15k, False: 1.02k]
  ------------------
  853|  1.16k|            return 256;
  854|       |
  855|     12|        case SEC_OID_ANSIX962_EC_C2PNB272W1:
  ------------------
  |  Branch (855:9): [True: 12, False: 2.16k]
  ------------------
  856|     12|            return 272;
  857|       |
  858|      8|        case SEC_OID_SECG_EC_SECT283K1:
  ------------------
  |  Branch (858:9): [True: 8, False: 2.16k]
  ------------------
  859|     18|        case SEC_OID_SECG_EC_SECT283R1:
  ------------------
  |  Branch (859:9): [True: 10, False: 2.16k]
  ------------------
  860|     18|            return 283;
  861|       |
  862|     44|        case SEC_OID_ANSIX962_EC_C2PNB304W1:
  ------------------
  |  Branch (862:9): [True: 44, False: 2.13k]
  ------------------
  863|     44|            return 304;
  864|       |
  865|     14|        case SEC_OID_ANSIX962_EC_C2TNB359V1:
  ------------------
  |  Branch (865:9): [True: 14, False: 2.16k]
  ------------------
  866|     14|            return 359;
  867|       |
  868|     26|        case SEC_OID_ANSIX962_EC_C2PNB368W1:
  ------------------
  |  Branch (868:9): [True: 26, False: 2.15k]
  ------------------
  869|     26|            return 368;
  870|       |
  871|    115|        case SEC_OID_SECG_EC_SECP384R1:
  ------------------
  |  Branch (871:9): [True: 115, False: 2.06k]
  ------------------
  872|    115|            return 384;
  873|       |
  874|     10|        case SEC_OID_SECG_EC_SECT409K1:
  ------------------
  |  Branch (874:9): [True: 10, False: 2.16k]
  ------------------
  875|     24|        case SEC_OID_SECG_EC_SECT409R1:
  ------------------
  |  Branch (875:9): [True: 14, False: 2.16k]
  ------------------
  876|     24|            return 409;
  877|       |
  878|     16|        case SEC_OID_ANSIX962_EC_C2TNB431R1:
  ------------------
  |  Branch (878:9): [True: 16, False: 2.16k]
  ------------------
  879|     16|            return 431;
  880|       |
  881|    164|        case SEC_OID_SECG_EC_SECP521R1:
  ------------------
  |  Branch (881:9): [True: 164, False: 2.01k]
  ------------------
  882|    164|            return 521;
  883|       |
  884|     11|        case SEC_OID_SECG_EC_SECT571K1:
  ------------------
  |  Branch (884:9): [True: 11, False: 2.16k]
  ------------------
  885|     21|        case SEC_OID_SECG_EC_SECT571R1:
  ------------------
  |  Branch (885:9): [True: 10, False: 2.16k]
  ------------------
  886|     21|            return 571;
  887|       |
  888|      0|        case SEC_OID_X25519:
  ------------------
  |  Branch (888:9): [True: 0, False: 2.17k]
  ------------------
  889|    489|        case SEC_OID_CURVE25519:
  ------------------
  |  Branch (889:9): [True: 489, False: 1.68k]
  ------------------
  890|    489|        case SEC_OID_ED25519_PUBLIC_KEY:
  ------------------
  |  Branch (890:9): [True: 0, False: 2.17k]
  ------------------
  891|    489|            return 255;
  892|       |
  893|      7|        default:
  ------------------
  |  Branch (893:9): [True: 7, False: 2.16k]
  ------------------
  894|      7|            PORT_SetError(SEC_ERROR_UNSUPPORTED_ELLIPTIC_CURVE);
  ------------------
  |  |   65|      7|#define PORT_SetError PORT_SetError_Util
  ------------------
  895|      7|            return 0;
  896|  2.17k|    }
  897|  2.17k|}
SECKEY_ECParamsToBasePointOrderLen:
  901|    346|{
  902|    346|    SECOidTag tag;
  903|    346|    SECItem oid = { siBuffer, NULL, 0 };
  904|       |
  905|       |    /* The encodedParams data contains 0x06 (SEC_ASN1_OBJECT_ID),
  906|       |     * followed by the length of the curve oid and the curve oid.
  907|       |     */
  908|    346|    oid.len = encodedParams->data[1];
  909|    346|    oid.data = encodedParams->data + 2;
  910|    346|    if ((tag = SECOID_FindOIDTag(&oid)) == SEC_OID_UNKNOWN)
  ------------------
  |  |  117|    346|#define SECOID_FindOIDTag SECOID_FindOIDTag_Util
  ------------------
  |  Branch (910:9): [True: 0, False: 346]
  ------------------
  911|      0|        return 0;
  912|       |
  913|    346|    switch (tag) {
  914|      0|        case SEC_OID_SECG_EC_SECP112R1:
  ------------------
  |  Branch (914:9): [True: 0, False: 346]
  ------------------
  915|      0|            return 112;
  916|      0|        case SEC_OID_SECG_EC_SECP112R2:
  ------------------
  |  Branch (916:9): [True: 0, False: 346]
  ------------------
  917|      0|            return 110;
  918|       |
  919|      0|        case SEC_OID_SECG_EC_SECT113R1:
  ------------------
  |  Branch (919:9): [True: 0, False: 346]
  ------------------
  920|      0|        case SEC_OID_SECG_EC_SECT113R2:
  ------------------
  |  Branch (920:9): [True: 0, False: 346]
  ------------------
  921|      0|            return 113;
  922|       |
  923|      0|        case SEC_OID_SECG_EC_SECP128R1:
  ------------------
  |  Branch (923:9): [True: 0, False: 346]
  ------------------
  924|      0|            return 128;
  925|      0|        case SEC_OID_SECG_EC_SECP128R2:
  ------------------
  |  Branch (925:9): [True: 0, False: 346]
  ------------------
  926|      0|            return 126;
  927|       |
  928|      0|        case SEC_OID_SECG_EC_SECT131R1:
  ------------------
  |  Branch (928:9): [True: 0, False: 346]
  ------------------
  929|      0|        case SEC_OID_SECG_EC_SECT131R2:
  ------------------
  |  Branch (929:9): [True: 0, False: 346]
  ------------------
  930|      0|            return 131;
  931|       |
  932|      0|        case SEC_OID_SECG_EC_SECP160K1:
  ------------------
  |  Branch (932:9): [True: 0, False: 346]
  ------------------
  933|      0|        case SEC_OID_SECG_EC_SECP160R1:
  ------------------
  |  Branch (933:9): [True: 0, False: 346]
  ------------------
  934|      0|        case SEC_OID_SECG_EC_SECP160R2:
  ------------------
  |  Branch (934:9): [True: 0, False: 346]
  ------------------
  935|      0|            return 161;
  936|       |
  937|      0|        case SEC_OID_SECG_EC_SECT163K1:
  ------------------
  |  Branch (937:9): [True: 0, False: 346]
  ------------------
  938|      0|            return 163;
  939|      0|        case SEC_OID_SECG_EC_SECT163R1:
  ------------------
  |  Branch (939:9): [True: 0, False: 346]
  ------------------
  940|      0|            return 162;
  941|      0|        case SEC_OID_SECG_EC_SECT163R2:
  ------------------
  |  Branch (941:9): [True: 0, False: 346]
  ------------------
  942|      0|        case SEC_OID_ANSIX962_EC_C2PNB163V1:
  ------------------
  |  Branch (942:9): [True: 0, False: 346]
  ------------------
  943|      0|            return 163;
  944|      0|        case SEC_OID_ANSIX962_EC_C2PNB163V2:
  ------------------
  |  Branch (944:9): [True: 0, False: 346]
  ------------------
  945|      0|        case SEC_OID_ANSIX962_EC_C2PNB163V3:
  ------------------
  |  Branch (945:9): [True: 0, False: 346]
  ------------------
  946|      0|            return 162;
  947|       |
  948|      0|        case SEC_OID_ANSIX962_EC_C2PNB176V1:
  ------------------
  |  Branch (948:9): [True: 0, False: 346]
  ------------------
  949|      0|            return 161;
  950|       |
  951|      0|        case SEC_OID_ANSIX962_EC_C2TNB191V1:
  ------------------
  |  Branch (951:9): [True: 0, False: 346]
  ------------------
  952|      0|            return 191;
  953|      0|        case SEC_OID_ANSIX962_EC_C2TNB191V2:
  ------------------
  |  Branch (953:9): [True: 0, False: 346]
  ------------------
  954|      0|            return 190;
  955|      0|        case SEC_OID_ANSIX962_EC_C2TNB191V3:
  ------------------
  |  Branch (955:9): [True: 0, False: 346]
  ------------------
  956|      0|            return 189;
  957|      0|        case SEC_OID_ANSIX962_EC_C2ONB191V4:
  ------------------
  |  Branch (957:9): [True: 0, False: 346]
  ------------------
  958|      0|            return 191;
  959|      0|        case SEC_OID_ANSIX962_EC_C2ONB191V5:
  ------------------
  |  Branch (959:9): [True: 0, False: 346]
  ------------------
  960|      0|            return 188;
  961|       |
  962|      0|        case SEC_OID_SECG_EC_SECP192K1:
  ------------------
  |  Branch (962:9): [True: 0, False: 346]
  ------------------
  963|      0|        case SEC_OID_ANSIX962_EC_PRIME192V1:
  ------------------
  |  Branch (963:9): [True: 0, False: 346]
  ------------------
  964|      0|        case SEC_OID_ANSIX962_EC_PRIME192V2:
  ------------------
  |  Branch (964:9): [True: 0, False: 346]
  ------------------
  965|      0|        case SEC_OID_ANSIX962_EC_PRIME192V3:
  ------------------
  |  Branch (965:9): [True: 0, False: 346]
  ------------------
  966|      0|            return 192;
  967|       |
  968|      0|        case SEC_OID_SECG_EC_SECT193R1:
  ------------------
  |  Branch (968:9): [True: 0, False: 346]
  ------------------
  969|      0|        case SEC_OID_SECG_EC_SECT193R2:
  ------------------
  |  Branch (969:9): [True: 0, False: 346]
  ------------------
  970|      0|            return 193;
  971|       |
  972|      0|        case SEC_OID_ANSIX962_EC_C2PNB208W1:
  ------------------
  |  Branch (972:9): [True: 0, False: 346]
  ------------------
  973|      0|            return 193;
  974|       |
  975|      0|        case SEC_OID_SECG_EC_SECP224K1:
  ------------------
  |  Branch (975:9): [True: 0, False: 346]
  ------------------
  976|      0|            return 225;
  977|      0|        case SEC_OID_SECG_EC_SECP224R1:
  ------------------
  |  Branch (977:9): [True: 0, False: 346]
  ------------------
  978|      0|            return 224;
  979|       |
  980|      0|        case SEC_OID_SECG_EC_SECT233K1:
  ------------------
  |  Branch (980:9): [True: 0, False: 346]
  ------------------
  981|      0|            return 232;
  982|      0|        case SEC_OID_SECG_EC_SECT233R1:
  ------------------
  |  Branch (982:9): [True: 0, False: 346]
  ------------------
  983|      0|            return 233;
  984|       |
  985|      0|        case SEC_OID_SECG_EC_SECT239K1:
  ------------------
  |  Branch (985:9): [True: 0, False: 346]
  ------------------
  986|      0|        case SEC_OID_ANSIX962_EC_C2TNB239V1:
  ------------------
  |  Branch (986:9): [True: 0, False: 346]
  ------------------
  987|      0|            return 238;
  988|      0|        case SEC_OID_ANSIX962_EC_C2TNB239V2:
  ------------------
  |  Branch (988:9): [True: 0, False: 346]
  ------------------
  989|      0|            return 237;
  990|      0|        case SEC_OID_ANSIX962_EC_C2TNB239V3:
  ------------------
  |  Branch (990:9): [True: 0, False: 346]
  ------------------
  991|      0|            return 236;
  992|      0|        case SEC_OID_ANSIX962_EC_C2ONB239V4:
  ------------------
  |  Branch (992:9): [True: 0, False: 346]
  ------------------
  993|      0|            return 238;
  994|      0|        case SEC_OID_ANSIX962_EC_C2ONB239V5:
  ------------------
  |  Branch (994:9): [True: 0, False: 346]
  ------------------
  995|      0|            return 237;
  996|      0|        case SEC_OID_ANSIX962_EC_PRIME239V1:
  ------------------
  |  Branch (996:9): [True: 0, False: 346]
  ------------------
  997|      0|        case SEC_OID_ANSIX962_EC_PRIME239V2:
  ------------------
  |  Branch (997:9): [True: 0, False: 346]
  ------------------
  998|      0|        case SEC_OID_ANSIX962_EC_PRIME239V3:
  ------------------
  |  Branch (998:9): [True: 0, False: 346]
  ------------------
  999|      0|            return 239;
 1000|       |
 1001|      3|        case SEC_OID_SECG_EC_SECP256K1:
  ------------------
  |  Branch (1001:9): [True: 3, False: 343]
  ------------------
 1002|    141|        case SEC_OID_ANSIX962_EC_PRIME256V1:
  ------------------
  |  Branch (1002:9): [True: 138, False: 208]
  ------------------
 1003|    141|            return 256;
 1004|       |
 1005|      3|        case SEC_OID_ANSIX962_EC_C2PNB272W1:
  ------------------
  |  Branch (1005:9): [True: 3, False: 343]
  ------------------
 1006|      3|            return 257;
 1007|       |
 1008|      3|        case SEC_OID_SECG_EC_SECT283K1:
  ------------------
  |  Branch (1008:9): [True: 3, False: 343]
  ------------------
 1009|      3|            return 281;
 1010|      3|        case SEC_OID_SECG_EC_SECT283R1:
  ------------------
  |  Branch (1010:9): [True: 3, False: 343]
  ------------------
 1011|      3|            return 282;
 1012|       |
 1013|      3|        case SEC_OID_ANSIX962_EC_C2PNB304W1:
  ------------------
  |  Branch (1013:9): [True: 3, False: 343]
  ------------------
 1014|      3|            return 289;
 1015|       |
 1016|      4|        case SEC_OID_ANSIX962_EC_C2TNB359V1:
  ------------------
  |  Branch (1016:9): [True: 4, False: 342]
  ------------------
 1017|      4|            return 353;
 1018|       |
 1019|      4|        case SEC_OID_ANSIX962_EC_C2PNB368W1:
  ------------------
  |  Branch (1019:9): [True: 4, False: 342]
  ------------------
 1020|      4|            return 353;
 1021|       |
 1022|     73|        case SEC_OID_SECG_EC_SECP384R1:
  ------------------
  |  Branch (1022:9): [True: 73, False: 273]
  ------------------
 1023|     73|            return 384;
 1024|       |
 1025|      3|        case SEC_OID_SECG_EC_SECT409K1:
  ------------------
  |  Branch (1025:9): [True: 3, False: 343]
  ------------------
 1026|      3|            return 407;
 1027|      4|        case SEC_OID_SECG_EC_SECT409R1:
  ------------------
  |  Branch (1027:9): [True: 4, False: 342]
  ------------------
 1028|      4|            return 409;
 1029|       |
 1030|      5|        case SEC_OID_ANSIX962_EC_C2TNB431R1:
  ------------------
  |  Branch (1030:9): [True: 5, False: 341]
  ------------------
 1031|      5|            return 418;
 1032|       |
 1033|     93|        case SEC_OID_SECG_EC_SECP521R1:
  ------------------
  |  Branch (1033:9): [True: 93, False: 253]
  ------------------
 1034|     93|            return 521;
 1035|       |
 1036|      4|        case SEC_OID_SECG_EC_SECT571K1:
  ------------------
  |  Branch (1036:9): [True: 4, False: 342]
  ------------------
 1037|      7|        case SEC_OID_SECG_EC_SECT571R1:
  ------------------
  |  Branch (1037:9): [True: 3, False: 343]
  ------------------
 1038|      7|            return 570;
 1039|       |
 1040|      0|        case SEC_OID_X25519:
  ------------------
  |  Branch (1040:9): [True: 0, False: 346]
  ------------------
 1041|      0|        case SEC_OID_CURVE25519:
  ------------------
  |  Branch (1041:9): [True: 0, False: 346]
  ------------------
 1042|      0|        case SEC_OID_ED25519_PUBLIC_KEY:
  ------------------
  |  Branch (1042:9): [True: 0, False: 346]
  ------------------
 1043|      0|            return 255;
 1044|       |
 1045|      0|        default:
  ------------------
  |  Branch (1045:9): [True: 0, False: 346]
  ------------------
 1046|      0|            PORT_SetError(SEC_ERROR_UNSUPPORTED_ELLIPTIC_CURVE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1047|      0|            return 0;
 1048|    346|    }
 1049|    346|}
SECKEY_BigIntegerBitLength:
 1054|  14.9k|{
 1055|  14.9k|    const unsigned char *p;
 1056|  14.9k|    unsigned octets;
 1057|  14.9k|    unsigned bits;
 1058|       |
 1059|  14.9k|    if (!number || !number->data) {
  ------------------
  |  Branch (1059:9): [True: 0, False: 14.9k]
  |  Branch (1059:20): [True: 3, False: 14.9k]
  ------------------
 1060|      3|        PORT_SetError(SEC_ERROR_INVALID_KEY);
  ------------------
  |  |   65|      3|#define PORT_SetError PORT_SetError_Util
  ------------------
 1061|      3|        return 0;
 1062|      3|    }
 1063|       |
 1064|  14.9k|    p = number->data;
 1065|  14.9k|    octets = number->len;
 1066|  53.8k|    while (octets > 0 && !*p) {
  ------------------
  |  Branch (1066:12): [True: 53.8k, False: 3]
  |  Branch (1066:26): [True: 38.9k, False: 14.9k]
  ------------------
 1067|  38.9k|        ++p;
 1068|  38.9k|        --octets;
 1069|  38.9k|    }
 1070|  14.9k|    if (octets == 0) {
  ------------------
  |  Branch (1070:9): [True: 3, False: 14.9k]
  ------------------
 1071|      3|        return 0;
 1072|      3|    }
 1073|       |    /* bits = 7..1 because we know at least one bit is set already */
 1074|       |    /* Note: This could do a binary search, but this is faster for keys if we
 1075|       |     * assume that good keys will have the MSB set. */
 1076|  31.1k|    for (bits = 7; bits > 0; --bits) {
  ------------------
  |  Branch (1076:20): [True: 30.3k, False: 828]
  ------------------
 1077|  30.3k|        if (*p & (1 << bits)) {
  ------------------
  |  Branch (1077:13): [True: 14.1k, False: 16.2k]
  ------------------
 1078|  14.1k|            break;
 1079|  14.1k|        }
 1080|  30.3k|    }
 1081|  14.9k|    return octets * 8 + bits - 7;
 1082|  14.9k|}
SECKEY_PublicKeyStrength:
 1087|     18|{
 1088|     18|    return (SECKEY_PublicKeyStrengthInBits(pubk) + 7) / 8;
 1089|     18|}
SECKEY_PublicKeyStrengthInBits:
 1094|  9.43k|{
 1095|  9.43k|    unsigned bitSize = 0;
 1096|       |
 1097|  9.43k|    if (!pubk) {
  ------------------
  |  Branch (1097:9): [True: 0, False: 9.43k]
  ------------------
 1098|      0|        PORT_SetError(SEC_ERROR_INVALID_KEY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1099|      0|        return 0;
 1100|      0|    }
 1101|       |
 1102|       |    /* interpret modulus length as key strength */
 1103|  9.43k|    switch (pubk->keyType) {
 1104|  5.07k|        case rsaKey:
  ------------------
  |  Branch (1104:9): [True: 5.07k, False: 4.36k]
  ------------------
 1105|  5.07k|            bitSize = SECKEY_BigIntegerBitLength(&pubk->u.rsa.modulus);
 1106|  5.07k|            break;
 1107|  1.16k|        case dsaKey:
  ------------------
  |  Branch (1107:9): [True: 1.16k, False: 8.27k]
  ------------------
 1108|  1.16k|            bitSize = SECKEY_BigIntegerBitLength(&pubk->u.dsa.params.prime);
 1109|  1.16k|            break;
 1110|    965|        case dhKey:
  ------------------
  |  Branch (1110:9): [True: 965, False: 8.47k]
  ------------------
 1111|    965|            bitSize = SECKEY_BigIntegerBitLength(&pubk->u.dh.prime);
 1112|    965|            break;
 1113|  2.23k|        case ecKey:
  ------------------
  |  Branch (1113:9): [True: 2.23k, False: 7.20k]
  ------------------
 1114|  2.23k|        case edKey:
  ------------------
  |  Branch (1114:9): [True: 0, False: 9.43k]
  ------------------
 1115|  2.23k|        case ecMontKey:
  ------------------
  |  Branch (1115:9): [True: 0, False: 9.43k]
  ------------------
 1116|  2.23k|            bitSize = SECKEY_ECParamsToKeySize(&pubk->u.ec.DEREncodedParams);
 1117|  2.23k|            break;
 1118|      0|        default:
  ------------------
  |  Branch (1118:9): [True: 0, False: 9.43k]
  ------------------
 1119|      0|            PORT_SetError(SEC_ERROR_INVALID_KEY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1120|      0|            break;
 1121|  9.43k|    }
 1122|  9.43k|    return bitSize;
 1123|  9.43k|}
SECKEY_SignatureLen:
 1190|  1.48k|{
 1191|  1.48k|    unsigned size;
 1192|       |
 1193|  1.48k|    switch (pubk->keyType) {
 1194|      0|        case rsaKey:
  ------------------
  |  Branch (1194:9): [True: 0, False: 1.48k]
  ------------------
 1195|      0|        case rsaPssKey:
  ------------------
  |  Branch (1195:9): [True: 0, False: 1.48k]
  ------------------
 1196|      0|            if (pubk->u.rsa.modulus.len == 0) {
  ------------------
  |  Branch (1196:17): [True: 0, False: 0]
  ------------------
 1197|      0|                return 0;
 1198|      0|            }
 1199|      0|            if (pubk->u.rsa.modulus.data[0] == 0) {
  ------------------
  |  Branch (1199:17): [True: 0, False: 0]
  ------------------
 1200|      0|                return pubk->u.rsa.modulus.len - 1;
 1201|      0|            }
 1202|      0|            return pubk->u.rsa.modulus.len;
 1203|  1.13k|        case dsaKey:
  ------------------
  |  Branch (1203:9): [True: 1.13k, False: 346]
  ------------------
 1204|  1.13k|            return pubk->u.dsa.params.subPrime.len * 2;
 1205|    346|        case ecKey:
  ------------------
  |  Branch (1205:9): [True: 346, False: 1.13k]
  ------------------
 1206|    346|        case edKey:
  ------------------
  |  Branch (1206:9): [True: 0, False: 1.48k]
  ------------------
 1207|    346|        case ecMontKey:
  ------------------
  |  Branch (1207:9): [True: 0, False: 1.48k]
  ------------------
 1208|       |            /* Get the base point order length in bits and adjust */
 1209|    346|            size = SECKEY_ECParamsToBasePointOrderLen(
 1210|    346|                &pubk->u.ec.DEREncodedParams);
 1211|    346|            return ((size + 7) / 8) * 2;
 1212|      0|        default:
  ------------------
  |  Branch (1212:9): [True: 0, False: 1.48k]
  ------------------
 1213|      0|            break;
 1214|  1.48k|    }
 1215|      0|    PORT_SetError(SEC_ERROR_INVALID_KEY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1216|      0|    return 0;
 1217|  1.48k|}
SECKEY_CopyPublicKey:
 1268|    205|{
 1269|    205|    SECKEYPublicKey *copyk;
 1270|    205|    PLArenaPool *arena;
 1271|    205|    SECStatus rv = SECSuccess;
 1272|       |
 1273|    205|    arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
  ------------------
  |  |   63|    205|#define PORT_NewArena PORT_NewArena_Util
  ------------------
                  arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
  ------------------
  |  |   60|    205|#define DER_DEFAULT_CHUNKSIZE (2048)
  ------------------
 1274|    205|    if (arena == NULL) {
  ------------------
  |  Branch (1274:9): [True: 0, False: 205]
  ------------------
 1275|      0|        PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1276|      0|        return NULL;
 1277|      0|    }
 1278|       |
 1279|    205|    copyk = (SECKEYPublicKey *)PORT_ArenaZAlloc(arena, sizeof(SECKEYPublicKey));
  ------------------
  |  |   59|    205|#define PORT_ArenaZAlloc PORT_ArenaZAlloc_Util
  ------------------
 1280|    205|    if (!copyk) {
  ------------------
  |  Branch (1280:9): [True: 0, False: 205]
  ------------------
 1281|      0|        PORT_FreeArena(arena, PR_FALSE);
  ------------------
  |  |   61|      0|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                      PORT_FreeArena(arena, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 1282|      0|        PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1283|      0|        return NULL;
 1284|      0|    }
 1285|       |
 1286|    205|    copyk->arena = arena;
 1287|    205|    copyk->keyType = pubk->keyType;
 1288|    205|    if (pubk->pkcs11Slot &&
  ------------------
  |  Branch (1288:9): [True: 0, False: 205]
  ------------------
 1289|    205|        PK11_IsPermObject(pubk->pkcs11Slot, pubk->pkcs11ID)) {
  ------------------
  |  Branch (1289:9): [True: 0, False: 0]
  ------------------
 1290|      0|        copyk->pkcs11Slot = PK11_ReferenceSlot(pubk->pkcs11Slot);
 1291|      0|        copyk->pkcs11ID = pubk->pkcs11ID;
 1292|    205|    } else {
 1293|    205|        copyk->pkcs11Slot = NULL; /* go get own reference */
 1294|    205|        copyk->pkcs11ID = CK_INVALID_HANDLE;
  ------------------
  |  |   78|    205|#define CK_INVALID_HANDLE 0
  ------------------
 1295|    205|    }
 1296|    205|    switch (pubk->keyType) {
 1297|     18|        case rsaKey:
  ------------------
  |  Branch (1297:9): [True: 18, False: 187]
  ------------------
 1298|     18|            rv = SECITEM_CopyItem(arena, &copyk->u.rsa.modulus,
  ------------------
  |  |  106|     18|#define SECITEM_CopyItem SECITEM_CopyItem_Util
  ------------------
 1299|     18|                                  &pubk->u.rsa.modulus);
 1300|     18|            if (rv == SECSuccess) {
  ------------------
  |  Branch (1300:17): [True: 18, False: 0]
  ------------------
 1301|     18|                rv = SECITEM_CopyItem(arena, &copyk->u.rsa.publicExponent,
  ------------------
  |  |  106|     18|#define SECITEM_CopyItem SECITEM_CopyItem_Util
  ------------------
 1302|     18|                                      &pubk->u.rsa.publicExponent);
 1303|     18|                if (rv == SECSuccess)
  ------------------
  |  Branch (1303:21): [True: 18, False: 0]
  ------------------
 1304|     18|                    return copyk;
 1305|     18|            }
 1306|      0|            break;
 1307|      0|        case dsaKey:
  ------------------
  |  Branch (1307:9): [True: 0, False: 205]
  ------------------
 1308|      0|            rv = SECITEM_CopyItem(arena, &copyk->u.dsa.publicValue,
  ------------------
  |  |  106|      0|#define SECITEM_CopyItem SECITEM_CopyItem_Util
  ------------------
 1309|      0|                                  &pubk->u.dsa.publicValue);
 1310|      0|            if (rv != SECSuccess)
  ------------------
  |  Branch (1310:17): [True: 0, False: 0]
  ------------------
 1311|      0|                break;
 1312|      0|            rv = SECITEM_CopyItem(arena, &copyk->u.dsa.params.prime,
  ------------------
  |  |  106|      0|#define SECITEM_CopyItem SECITEM_CopyItem_Util
  ------------------
 1313|      0|                                  &pubk->u.dsa.params.prime);
 1314|      0|            if (rv != SECSuccess)
  ------------------
  |  Branch (1314:17): [True: 0, False: 0]
  ------------------
 1315|      0|                break;
 1316|      0|            rv = SECITEM_CopyItem(arena, &copyk->u.dsa.params.subPrime,
  ------------------
  |  |  106|      0|#define SECITEM_CopyItem SECITEM_CopyItem_Util
  ------------------
 1317|      0|                                  &pubk->u.dsa.params.subPrime);
 1318|      0|            if (rv != SECSuccess)
  ------------------
  |  Branch (1318:17): [True: 0, False: 0]
  ------------------
 1319|      0|                break;
 1320|      0|            rv = SECITEM_CopyItem(arena, &copyk->u.dsa.params.base,
  ------------------
  |  |  106|      0|#define SECITEM_CopyItem SECITEM_CopyItem_Util
  ------------------
 1321|      0|                                  &pubk->u.dsa.params.base);
 1322|      0|            break;
 1323|      0|        case dhKey:
  ------------------
  |  Branch (1323:9): [True: 0, False: 205]
  ------------------
 1324|      0|            rv = SECITEM_CopyItem(arena, &copyk->u.dh.prime, &pubk->u.dh.prime);
  ------------------
  |  |  106|      0|#define SECITEM_CopyItem SECITEM_CopyItem_Util
  ------------------
 1325|      0|            if (rv != SECSuccess)
  ------------------
  |  Branch (1325:17): [True: 0, False: 0]
  ------------------
 1326|      0|                break;
 1327|      0|            rv = SECITEM_CopyItem(arena, &copyk->u.dh.base, &pubk->u.dh.base);
  ------------------
  |  |  106|      0|#define SECITEM_CopyItem SECITEM_CopyItem_Util
  ------------------
 1328|      0|            if (rv != SECSuccess)
  ------------------
  |  Branch (1328:17): [True: 0, False: 0]
  ------------------
 1329|      0|                break;
 1330|      0|            rv = SECITEM_CopyItem(arena, &copyk->u.dh.publicValue,
  ------------------
  |  |  106|      0|#define SECITEM_CopyItem SECITEM_CopyItem_Util
  ------------------
 1331|      0|                                  &pubk->u.dh.publicValue);
 1332|      0|            break;
 1333|    187|        case ecKey:
  ------------------
  |  Branch (1333:9): [True: 187, False: 18]
  ------------------
 1334|    187|        case edKey:
  ------------------
  |  Branch (1334:9): [True: 0, False: 205]
  ------------------
 1335|    187|        case ecMontKey:
  ------------------
  |  Branch (1335:9): [True: 0, False: 205]
  ------------------
 1336|    187|            copyk->u.ec.size = pubk->u.ec.size;
 1337|    187|            rv = seckey_HasCurveOID(pubk);
 1338|    187|            if (rv != SECSuccess) {
  ------------------
  |  Branch (1338:17): [True: 0, False: 187]
  ------------------
 1339|      0|                break;
 1340|      0|            }
 1341|    187|            rv = SECITEM_CopyItem(arena, &copyk->u.ec.DEREncodedParams,
  ------------------
  |  |  106|    187|#define SECITEM_CopyItem SECITEM_CopyItem_Util
  ------------------
 1342|    187|                                  &pubk->u.ec.DEREncodedParams);
 1343|    187|            if (rv != SECSuccess) {
  ------------------
  |  Branch (1343:17): [True: 0, False: 187]
  ------------------
 1344|      0|                break;
 1345|      0|            }
 1346|    187|            copyk->u.ec.encoding = ECPoint_Undefined;
 1347|    187|            rv = SECITEM_CopyItem(arena, &copyk->u.ec.publicValue,
  ------------------
  |  |  106|    187|#define SECITEM_CopyItem SECITEM_CopyItem_Util
  ------------------
 1348|    187|                                  &pubk->u.ec.publicValue);
 1349|    187|            break;
 1350|      0|        case nullKey:
  ------------------
  |  Branch (1350:9): [True: 0, False: 205]
  ------------------
 1351|      0|            return copyk;
 1352|      0|        case kyberKey:
  ------------------
  |  Branch (1352:9): [True: 0, False: 205]
  ------------------
 1353|      0|            copyk->u.kyber.params = pubk->u.kyber.params;
 1354|      0|            rv = SECITEM_CopyItem(arena, &copyk->u.kyber.publicValue,
  ------------------
  |  |  106|      0|#define SECITEM_CopyItem SECITEM_CopyItem_Util
  ------------------
 1355|      0|                                  &pubk->u.kyber.publicValue);
 1356|      0|            break;
 1357|      0|        default:
  ------------------
  |  Branch (1357:9): [True: 0, False: 205]
  ------------------
 1358|      0|            PORT_SetError(SEC_ERROR_INVALID_KEY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1359|      0|            rv = SECFailure;
 1360|      0|            break;
 1361|    205|    }
 1362|    187|    if (rv == SECSuccess)
  ------------------
  |  Branch (1362:9): [True: 187, False: 0]
  ------------------
 1363|    187|        return copyk;
 1364|       |
 1365|      0|    SECKEY_DestroyPublicKey(copyk);
 1366|      0|    return NULL;
 1367|    187|}
SECKEY_EnforceKeySize:
 1375|    205|{
 1376|    205|    PRInt32 opt = -1;
 1377|    205|    PRInt32 optVal;
 1378|    205|    SECStatus rv;
 1379|       |
 1380|    205|    switch (keyType) {
 1381|     18|        case rsaKey:
  ------------------
  |  Branch (1381:9): [True: 18, False: 187]
  ------------------
 1382|     18|        case rsaPssKey:
  ------------------
  |  Branch (1382:9): [True: 0, False: 205]
  ------------------
 1383|     18|        case rsaOaepKey:
  ------------------
  |  Branch (1383:9): [True: 0, False: 205]
  ------------------
 1384|     18|            opt = NSS_RSA_MIN_KEY_SIZE;
  ------------------
  |  |  286|     18|#define NSS_RSA_MIN_KEY_SIZE 0x001
  ------------------
 1385|     18|            break;
 1386|      0|        case dsaKey:
  ------------------
  |  Branch (1386:9): [True: 0, False: 205]
  ------------------
 1387|      0|        case fortezzaKey:
  ------------------
  |  Branch (1387:9): [True: 0, False: 205]
  ------------------
 1388|      0|            opt = NSS_DSA_MIN_KEY_SIZE;
  ------------------
  |  |  288|      0|#define NSS_DSA_MIN_KEY_SIZE 0x004
  ------------------
 1389|      0|            break;
 1390|      0|        case dhKey:
  ------------------
  |  Branch (1390:9): [True: 0, False: 205]
  ------------------
 1391|      0|        case keaKey:
  ------------------
  |  Branch (1391:9): [True: 0, False: 205]
  ------------------
 1392|      0|            opt = NSS_DH_MIN_KEY_SIZE;
  ------------------
  |  |  287|      0|#define NSS_DH_MIN_KEY_SIZE 0x002
  ------------------
 1393|      0|            break;
 1394|    187|        case ecKey:
  ------------------
  |  Branch (1394:9): [True: 187, False: 18]
  ------------------
 1395|    187|            opt = NSS_ECC_MIN_KEY_SIZE;
  ------------------
  |  |  327|    187|#define NSS_ECC_MIN_KEY_SIZE 0x011
  ------------------
 1396|    187|            break;
 1397|      0|        case nullKey:
  ------------------
  |  Branch (1397:9): [True: 0, False: 205]
  ------------------
 1398|      0|        default:
  ------------------
  |  Branch (1398:9): [True: 0, False: 205]
  ------------------
 1399|      0|            PORT_SetError(SEC_ERROR_INVALID_KEY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1400|      0|            return SECFailure;
 1401|    205|    }
 1402|    205|    PORT_Assert(opt != -1);
  ------------------
  |  |  120|    205|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    205|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 205, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1403|    205|    rv = NSS_OptionGet(opt, &optVal);
 1404|    205|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1404:9): [True: 0, False: 205]
  ------------------
 1405|      0|        return rv;
 1406|      0|    }
 1407|    205|    if (optVal > keyLength) {
  ------------------
  |  Branch (1407:9): [True: 0, False: 205]
  ------------------
 1408|      0|        PORT_SetError(error);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1409|      0|        return SECFailure;
 1410|      0|    }
 1411|    205|    return SECSuccess;
 1412|    205|}
SECKEY_GetPublicKeyType:
 2065|  8.56k|{
 2066|  8.56k|    return pubKey->keyType;
 2067|  8.56k|}
seckey.c:seckey_UpdateCertPQGChain:
  334|  5.01k|{
  335|  5.01k|    SECStatus rv;
  336|  5.01k|    SECOidData *oid = NULL;
  337|  5.01k|    int tag;
  338|  5.01k|    CERTSubjectPublicKeyInfo *subjectSpki = NULL;
  339|  5.01k|    CERTSubjectPublicKeyInfo *issuerSpki = NULL;
  340|  5.01k|    CERTCertificate *issuerCert = NULL;
  341|       |
  342|       |    /* increment cert chain length counter*/
  343|  5.01k|    count++;
  344|       |
  345|       |    /* check if cert chain length exceeds the maximum length*/
  346|  5.01k|    if (count > CERT_MAX_CERT_CHAIN) {
  ------------------
  |  |  610|  5.01k|#define CERT_MAX_CERT_CHAIN 20
  ------------------
  |  Branch (346:9): [True: 0, False: 5.01k]
  ------------------
  347|      0|        return SECFailure;
  348|      0|    }
  349|       |
  350|  5.01k|    oid = SECOID_FindOID(&subjectCert->subjectPublicKeyInfo.algorithm.algorithm);
  ------------------
  |  |  115|  5.01k|#define SECOID_FindOID SECOID_FindOID_Util
  ------------------
  351|  5.01k|    if (oid != NULL) {
  ------------------
  |  Branch (351:9): [True: 4.82k, False: 190]
  ------------------
  352|  4.82k|        tag = oid->offset;
  353|       |
  354|       |        /* Check if cert has a DSA or EC public key. If not, return
  355|       |         * success since no PQG params need to be updated.
  356|       |         *
  357|       |         * Question: do we really need to do this for EC keys. They don't have
  358|       |         * PQG parameters, but they do have parameters. The question is does
  359|       |         * the child cert inherit those parameters for EC from the parent, or
  360|       |         * do we always include those parameters in each cert.
  361|       |         */
  362|       |
  363|  4.82k|        if ((tag != SEC_OID_ANSIX9_DSA_SIGNATURE) &&
  ------------------
  |  Branch (363:13): [True: 3.65k, False: 1.16k]
  ------------------
  364|  4.82k|            (tag != SEC_OID_ANSIX9_DSA_SIGNATURE_WITH_SHA1_DIGEST) &&
  ------------------
  |  Branch (364:13): [True: 3.65k, False: 1]
  ------------------
  365|  4.82k|            (tag != SEC_OID_NIST_DSA_SIGNATURE_WITH_SHA224_DIGEST) &&
  ------------------
  |  Branch (365:13): [True: 3.65k, False: 1]
  ------------------
  366|  4.82k|            (tag != SEC_OID_NIST_DSA_SIGNATURE_WITH_SHA256_DIGEST) &&
  ------------------
  |  Branch (366:13): [True: 3.65k, False: 1]
  ------------------
  367|  4.82k|            (tag != SEC_OID_BOGUS_DSA_SIGNATURE_WITH_SHA1_DIGEST) &&
  ------------------
  |  Branch (367:13): [True: 3.65k, False: 0]
  ------------------
  368|  4.82k|            (tag != SEC_OID_SDN702_DSA_SIGNATURE) &&
  ------------------
  |  Branch (368:13): [True: 3.65k, False: 0]
  ------------------
  369|  4.82k|            (tag != SEC_OID_ED25519_PUBLIC_KEY) &&
  ------------------
  |  Branch (369:13): [True: 3.65k, False: 0]
  ------------------
  370|  4.82k|            (tag != SEC_OID_ANSIX962_EC_PUBLIC_KEY)) {
  ------------------
  |  Branch (370:13): [True: 2.54k, False: 1.10k]
  ------------------
  371|       |
  372|  2.54k|            return SECSuccess;
  373|  2.54k|        }
  374|  4.82k|    } else {
  375|    190|        return SECFailure; /* return failure if oid is NULL */
  376|    190|    }
  377|       |
  378|       |    /* if cert has PQG parameters, return success */
  379|       |
  380|  2.27k|    subjectSpki = &subjectCert->subjectPublicKeyInfo;
  381|       |
  382|  2.27k|    if (subjectSpki->algorithm.parameters.len != 0) {
  ------------------
  |  Branch (382:9): [True: 2.27k, False: 0]
  ------------------
  383|  2.27k|        return SECSuccess;
  384|  2.27k|    }
  385|       |
  386|       |    /* check if the cert is self-signed */
  387|      0|    if (subjectCert->isRoot) {
  ------------------
  |  Branch (387:9): [True: 0, False: 0]
  ------------------
  388|       |        /* fail since cert is self-signed and has no pqg params. */
  389|      0|        return SECFailure;
  390|      0|    }
  391|       |
  392|       |    /* get issuer cert */
  393|      0|    issuerCert = CERT_FindCertIssuer(subjectCert, PR_Now(), certUsageAnyCA);
  394|      0|    if (!issuerCert) {
  ------------------
  |  Branch (394:9): [True: 0, False: 0]
  ------------------
  395|      0|        return SECFailure;
  396|      0|    }
  397|       |
  398|       |    /* if parent is not DSA, return failure since
  399|       |       we don't allow this case. */
  400|       |
  401|      0|    oid = SECOID_FindOID(&issuerCert->subjectPublicKeyInfo.algorithm.algorithm);
  ------------------
  |  |  115|      0|#define SECOID_FindOID SECOID_FindOID_Util
  ------------------
  402|      0|    if (oid != NULL) {
  ------------------
  |  Branch (402:9): [True: 0, False: 0]
  ------------------
  403|      0|        tag = oid->offset;
  404|       |
  405|       |        /* Check if issuer cert has a DSA public key. If not,
  406|       |         * return failure.   */
  407|       |
  408|      0|        if ((tag != SEC_OID_ANSIX9_DSA_SIGNATURE) &&
  ------------------
  |  Branch (408:13): [True: 0, False: 0]
  ------------------
  409|      0|            (tag != SEC_OID_ANSIX9_DSA_SIGNATURE_WITH_SHA1_DIGEST) &&
  ------------------
  |  Branch (409:13): [True: 0, False: 0]
  ------------------
  410|      0|            (tag != SEC_OID_NIST_DSA_SIGNATURE_WITH_SHA224_DIGEST) &&
  ------------------
  |  Branch (410:13): [True: 0, False: 0]
  ------------------
  411|      0|            (tag != SEC_OID_NIST_DSA_SIGNATURE_WITH_SHA256_DIGEST) &&
  ------------------
  |  Branch (411:13): [True: 0, False: 0]
  ------------------
  412|      0|            (tag != SEC_OID_BOGUS_DSA_SIGNATURE_WITH_SHA1_DIGEST) &&
  ------------------
  |  Branch (412:13): [True: 0, False: 0]
  ------------------
  413|      0|            (tag != SEC_OID_SDN702_DSA_SIGNATURE) &&
  ------------------
  |  Branch (413:13): [True: 0, False: 0]
  ------------------
  414|      0|            (tag != SEC_OID_ED25519_PUBLIC_KEY) &&
  ------------------
  |  Branch (414:13): [True: 0, False: 0]
  ------------------
  415|      0|            (tag != SEC_OID_ANSIX962_EC_PUBLIC_KEY)) {
  ------------------
  |  Branch (415:13): [True: 0, False: 0]
  ------------------
  416|      0|            rv = SECFailure;
  417|      0|            goto loser;
  418|      0|        }
  419|      0|    } else {
  420|      0|        rv = SECFailure; /* return failure if oid is NULL */
  421|      0|        goto loser;
  422|      0|    }
  423|       |
  424|       |    /* at this point the subject cert has no pqg parameters and the
  425|       |     * issuer cert has a DSA public key.  Update the issuer's
  426|       |     * pqg parameters with a recursive call to this same function. */
  427|       |
  428|      0|    rv = seckey_UpdateCertPQGChain(issuerCert, count);
  429|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (429:9): [True: 0, False: 0]
  ------------------
  430|      0|        rv = SECFailure;
  431|      0|        goto loser;
  432|      0|    }
  433|       |
  434|       |    /* ensure issuer has pqg parameters */
  435|       |
  436|      0|    issuerSpki = &issuerCert->subjectPublicKeyInfo;
  437|      0|    if (issuerSpki->algorithm.parameters.len == 0) {
  ------------------
  |  Branch (437:9): [True: 0, False: 0]
  ------------------
  438|      0|        rv = SECFailure;
  439|      0|    }
  440|       |
  441|       |    /* if update was successful and pqg params present, then copy the
  442|       |     * parameters to the subject cert's key. */
  443|       |
  444|      0|    if (rv == SECSuccess) {
  ------------------
  |  Branch (444:9): [True: 0, False: 0]
  ------------------
  445|      0|        rv = SECITEM_CopyItem(subjectCert->arena,
  ------------------
  |  |  106|      0|#define SECITEM_CopyItem SECITEM_CopyItem_Util
  ------------------
  446|      0|                              &subjectSpki->algorithm.parameters,
  447|      0|                              &issuerSpki->algorithm.parameters);
  448|      0|    }
  449|       |
  450|      0|loser:
  451|      0|    if (issuerCert) {
  ------------------
  |  Branch (451:9): [True: 0, False: 0]
  ------------------
  452|      0|        CERT_DestroyCertificate(issuerCert);
  453|      0|    }
  454|      0|    return rv;
  455|      0|}
seckey.c:seckey_ExtractPublicKey:
  598|  9.19k|{
  599|  9.19k|    SECKEYPublicKey *pubk;
  600|  9.19k|    SECItem os, newOs, newParms;
  601|  9.19k|    SECStatus rv;
  602|  9.19k|    PLArenaPool *arena;
  603|  9.19k|    SECOidTag tag;
  604|       |
  605|  9.19k|    arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
  ------------------
  |  |   63|  9.19k|#define PORT_NewArena PORT_NewArena_Util
  ------------------
                  arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
  ------------------
  |  |   60|  9.19k|#define DER_DEFAULT_CHUNKSIZE (2048)
  ------------------
  606|  9.19k|    if (arena == NULL)
  ------------------
  |  Branch (606:9): [True: 0, False: 9.19k]
  ------------------
  607|      0|        return NULL;
  608|       |
  609|  9.19k|    pubk = (SECKEYPublicKey *)PORT_ArenaZAlloc(arena, sizeof(SECKEYPublicKey));
  ------------------
  |  |   59|  9.19k|#define PORT_ArenaZAlloc PORT_ArenaZAlloc_Util
  ------------------
  610|  9.19k|    if (pubk == NULL) {
  ------------------
  |  Branch (610:9): [True: 0, False: 9.19k]
  ------------------
  611|      0|        PORT_FreeArena(arena, PR_FALSE);
  ------------------
  |  |   61|      0|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                      PORT_FreeArena(arena, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  612|      0|        return NULL;
  613|      0|    }
  614|       |
  615|  9.19k|    pubk->arena = arena;
  616|  9.19k|    pubk->pkcs11Slot = 0;
  617|  9.19k|    pubk->pkcs11ID = CK_INVALID_HANDLE;
  ------------------
  |  |   78|  9.19k|#define CK_INVALID_HANDLE 0
  ------------------
  618|       |
  619|       |    /* Convert bit string length from bits to bytes */
  620|  9.19k|    os = spki->subjectPublicKey;
  621|  9.19k|    DER_ConvertBitString(&os);
  ------------------
  |  |  125|  9.19k|    {                                         \
  |  |  126|  9.19k|        (item)->len = ((item)->len + 7) >> 3; \
  |  |  127|  9.19k|    }
  ------------------
  622|       |
  623|  9.19k|    tag = SECOID_GetAlgorithmTag(&spki->algorithm);
  ------------------
  |  |  119|  9.19k|#define SECOID_GetAlgorithmTag SECOID_GetAlgorithmTag_Util
  ------------------
  624|       |
  625|       |    /* copy the DER into the arena, since Quick DER returns data that points
  626|       |       into the DER input, which may get freed by the caller */
  627|  9.19k|    rv = SECITEM_CopyItem(arena, &newOs, &os);
  ------------------
  |  |  106|  9.19k|#define SECITEM_CopyItem SECITEM_CopyItem_Util
  ------------------
  628|  9.19k|    if (rv == SECSuccess)
  ------------------
  |  Branch (628:9): [True: 9.19k, False: 0]
  ------------------
  629|  9.19k|        switch (tag) {
  630|      0|            case SEC_OID_X500_RSA_ENCRYPTION:
  ------------------
  |  Branch (630:13): [True: 0, False: 9.19k]
  ------------------
  631|  4.90k|            case SEC_OID_PKCS1_RSA_ENCRYPTION:
  ------------------
  |  Branch (631:13): [True: 4.90k, False: 4.28k]
  ------------------
  632|  4.93k|            case SEC_OID_PKCS1_RSA_PSS_SIGNATURE:
  ------------------
  |  Branch (632:13): [True: 26, False: 9.16k]
  ------------------
  633|  4.93k|                pubk->keyType = rsaKey;
  634|  4.93k|                prepare_rsa_pub_key_for_asn1(pubk);
  635|  4.93k|                rv = SEC_QuickDERDecodeItem(arena, pubk, SECKEY_RSAPublicKeyTemplate, &newOs);
  ------------------
  |  |  102|  4.93k|#define SEC_QuickDERDecodeItem SEC_QuickDERDecodeItem_Util
  ------------------
  636|  4.93k|                if (rv == SECSuccess)
  ------------------
  |  Branch (636:21): [True: 4.92k, False: 7]
  ------------------
  637|  4.92k|                    return pubk;
  638|      7|                break;
  639|  2.31k|            case SEC_OID_ANSIX9_DSA_SIGNATURE:
  ------------------
  |  Branch (639:13): [True: 2.31k, False: 6.88k]
  ------------------
  640|  2.31k|            case SEC_OID_SDN702_DSA_SIGNATURE:
  ------------------
  |  Branch (640:13): [True: 0, False: 9.19k]
  ------------------
  641|  2.31k|                pubk->keyType = dsaKey;
  642|  2.31k|                prepare_dsa_pub_key_for_asn1(pubk);
  643|  2.31k|                rv = SEC_QuickDERDecodeItem(arena, pubk, SECKEY_DSAPublicKeyTemplate, &newOs);
  ------------------
  |  |  102|  2.31k|#define SEC_QuickDERDecodeItem SEC_QuickDERDecodeItem_Util
  ------------------
  644|  2.31k|                if (rv != SECSuccess)
  ------------------
  |  Branch (644:21): [True: 3, False: 2.30k]
  ------------------
  645|      3|                    break;
  646|       |
  647|  2.30k|                rv = seckey_DSADecodePQG(arena, pubk,
  648|  2.30k|                                         &spki->algorithm.parameters);
  649|       |
  650|  2.30k|                if (rv == SECSuccess)
  ------------------
  |  Branch (650:21): [True: 2.30k, False: 8]
  ------------------
  651|  2.30k|                    return pubk;
  652|      8|                break;
  653|     31|            case SEC_OID_X942_DIFFIE_HELMAN_KEY:
  ------------------
  |  Branch (653:13): [True: 31, False: 9.16k]
  ------------------
  654|     31|                pubk->keyType = dhKey;
  655|     31|                prepare_dh_pub_key_for_asn1(pubk);
  656|     31|                rv = SEC_QuickDERDecodeItem(arena, pubk, SECKEY_DHPublicKeyTemplate, &newOs);
  ------------------
  |  |  102|     31|#define SEC_QuickDERDecodeItem SEC_QuickDERDecodeItem_Util
  ------------------
  657|     31|                if (rv != SECSuccess)
  ------------------
  |  Branch (657:21): [True: 8, False: 23]
  ------------------
  658|      8|                    break;
  659|       |
  660|       |                /* copy the DER into the arena, since Quick DER returns data that points
  661|       |                   into the DER input, which may get freed by the caller */
  662|     23|                rv = SECITEM_CopyItem(arena, &newParms, &spki->algorithm.parameters);
  ------------------
  |  |  106|     23|#define SECITEM_CopyItem SECITEM_CopyItem_Util
  ------------------
  663|     23|                if (rv != SECSuccess)
  ------------------
  |  Branch (663:21): [True: 0, False: 23]
  ------------------
  664|      0|                    break;
  665|       |
  666|     23|                rv = SEC_QuickDERDecodeItem(arena, pubk, SECKEY_DHParamKeyTemplate,
  ------------------
  |  |  102|     23|#define SEC_QuickDERDecodeItem SEC_QuickDERDecodeItem_Util
  ------------------
  667|     23|                                            &newParms);
  668|       |
  669|     23|                if (rv == SECSuccess)
  ------------------
  |  Branch (669:21): [True: 22, False: 1]
  ------------------
  670|     22|                    return pubk;
  671|      1|                break;
  672|      1|            case SEC_OID_X25519:
  ------------------
  |  Branch (672:13): [True: 0, False: 9.19k]
  ------------------
  673|      0|            case SEC_OID_ED25519_PUBLIC_KEY:
  ------------------
  |  Branch (673:13): [True: 0, False: 9.19k]
  ------------------
  674|       |                /* A basic consistency check on inputs. */
  675|      0|                if (newOs.len == 0) {
  ------------------
  |  Branch (675:21): [True: 0, False: 0]
  ------------------
  676|      0|                    PORT_SetError(SEC_ERROR_INPUT_LEN);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  677|      0|                    break;
  678|      0|                }
  679|       |
  680|       |                /* Currently supporting only (Pure)Ed25519 .*/
  681|      0|                if (spki->algorithm.parameters.len != 0) {
  ------------------
  |  Branch (681:21): [True: 0, False: 0]
  ------------------
  682|      0|                    PORT_SetError(SEC_ERROR_UNSUPPORTED_KEYALG);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  683|      0|                    break;
  684|      0|                }
  685|       |
  686|       |                /* edKey corresponds to Ed25519 mechanism.
  687|       |                 * ecMontKey corresponds to X25519 mechanism.
  688|       |                 * The other options are not supported. */
  689|      0|                if (tag == SEC_OID_X25519) {
  ------------------
  |  Branch (689:21): [True: 0, False: 0]
  ------------------
  690|      0|                    pubk->keyType = ecMontKey;
  691|      0|                } else {
  692|       |                    /* tag == SEC_OID_ED25519_PUBLIC_KEY */
  693|      0|                    pubk->keyType = edKey;
  694|      0|                }
  695|       |
  696|      0|                pubk->u.ec.size = 0;
  697|       |
  698|      0|                SECOidData *oid25519 = SECOID_FindOIDByTag(tag);
  ------------------
  |  |  116|      0|#define SECOID_FindOIDByTag SECOID_FindOIDByTag_Util
  ------------------
  699|      0|                if (!oid25519) {
  ------------------
  |  Branch (699:21): [True: 0, False: 0]
  ------------------
  700|      0|                    break;
  701|      0|                }
  702|       |
  703|      0|                if (!SECITEM_AllocItem(arena, &pubk->u.ec.DEREncodedParams, oid25519->oid.len + 2)) {
  ------------------
  |  |  103|      0|#define SECITEM_AllocItem SECITEM_AllocItem_Util
  ------------------
  |  Branch (703:21): [True: 0, False: 0]
  ------------------
  704|      0|                    break;
  705|      0|                }
  706|      0|                pubk->u.ec.DEREncodedParams.data[0] = SEC_ASN1_OBJECT_ID;
  ------------------
  |  |   82|      0|#define SEC_ASN1_OBJECT_ID 0x06
  ------------------
  707|      0|                pubk->u.ec.DEREncodedParams.data[1] = oid25519->oid.len;
  708|      0|                PORT_Memcpy(pubk->u.ec.DEREncodedParams.data + 2, oid25519->oid.data, oid25519->oid.len);
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
  709|       |
  710|      0|                rv = SECITEM_CopyItem(arena, &pubk->u.ec.publicValue, &newOs);
  ------------------
  |  |  106|      0|#define SECITEM_CopyItem SECITEM_CopyItem_Util
  ------------------
  711|      0|                if (rv != SECSuccess) {
  ------------------
  |  Branch (711:21): [True: 0, False: 0]
  ------------------
  712|      0|                    break;
  713|      0|                }
  714|      0|                return pubk;
  715|  1.71k|            case SEC_OID_ANSIX962_EC_PUBLIC_KEY:
  ------------------
  |  Branch (715:13): [True: 1.71k, False: 7.48k]
  ------------------
  716|       |                /* A basic sanity check on inputs. */
  717|  1.71k|                if (spki->algorithm.parameters.len == 0 || newOs.len == 0) {
  ------------------
  |  Branch (717:21): [True: 0, False: 1.71k]
  |  Branch (717:60): [True: 0, False: 1.71k]
  ------------------
  718|      0|                    PORT_SetError(SEC_ERROR_INPUT_LEN);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  719|      0|                    break;
  720|      0|                }
  721|  1.71k|                pubk->keyType = ecKey;
  722|  1.71k|                pubk->u.ec.size = 0;
  723|       |
  724|       |                /* Since PKCS#11 directly takes the DER encoding of EC params
  725|       |                 * and public value, we don't need any decoding here.
  726|       |                 */
  727|  1.71k|                rv = SECITEM_CopyItem(arena, &pubk->u.ec.DEREncodedParams,
  ------------------
  |  |  106|  1.71k|#define SECITEM_CopyItem SECITEM_CopyItem_Util
  ------------------
  728|  1.71k|                                      &spki->algorithm.parameters);
  729|  1.71k|                if (rv != SECSuccess) {
  ------------------
  |  Branch (729:21): [True: 0, False: 1.71k]
  ------------------
  730|      0|                    break;
  731|      0|                }
  732|  1.71k|                rv = SECITEM_CopyItem(arena, &pubk->u.ec.publicValue, &newOs);
  ------------------
  |  |  106|  1.71k|#define SECITEM_CopyItem SECITEM_CopyItem_Util
  ------------------
  733|  1.71k|                if (rv != SECSuccess) {
  ------------------
  |  Branch (733:21): [True: 0, False: 1.71k]
  ------------------
  734|      0|                    break;
  735|      0|                }
  736|  1.71k|                pubk->u.ec.encoding = ECPoint_Undefined;
  737|  1.71k|                rv = seckey_HasCurveOID(pubk);
  738|  1.71k|                if (rv == SECSuccess) {
  ------------------
  |  Branch (738:21): [True: 1.69k, False: 12]
  ------------------
  739|  1.69k|                    return pubk;
  740|  1.69k|                }
  741|     12|                break;
  742|       |
  743|    208|            default:
  ------------------
  |  Branch (743:13): [True: 208, False: 8.98k]
  ------------------
  744|    208|                PORT_SetError(SEC_ERROR_UNSUPPORTED_KEYALG);
  ------------------
  |  |   65|    208|#define PORT_SetError PORT_SetError_Util
  ------------------
  745|    208|                break;
  746|  9.19k|        }
  747|       |
  748|    247|    SECKEY_DestroyPublicKey(pubk);
  749|    247|    return NULL;
  750|  9.19k|}
seckey.c:seckey_DSADecodePQG:
  475|  2.30k|{
  476|  2.30k|    SECStatus rv;
  477|  2.30k|    SECItem newparams;
  478|       |
  479|  2.30k|    if (params == NULL)
  ------------------
  |  Branch (479:9): [True: 0, False: 2.30k]
  ------------------
  480|      0|        return SECFailure;
  481|       |
  482|  2.30k|    if (params->data == NULL)
  ------------------
  |  Branch (482:9): [True: 0, False: 2.30k]
  ------------------
  483|      0|        return SECFailure;
  484|       |
  485|  2.30k|    PORT_Assert(arena);
  ------------------
  |  |  120|  2.30k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  2.30k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 2.30k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  486|       |
  487|       |    /* make a copy of the data into the arena so QuickDER output is valid */
  488|  2.30k|    rv = SECITEM_CopyItem(arena, &newparams, params);
  ------------------
  |  |  106|  2.30k|#define SECITEM_CopyItem SECITEM_CopyItem_Util
  ------------------
  489|       |
  490|       |    /* Check if params use the standard format.
  491|       |     * The value 0xa1 will appear in the first byte of the parameter data
  492|       |     * if the PQG parameters are not using the standard format.  This
  493|       |     * code should be changed to use a better method to detect non-standard
  494|       |     * parameters.    */
  495|       |
  496|  2.30k|    if ((newparams.data[0] != 0xa1) &&
  ------------------
  |  Branch (496:9): [True: 2.30k, False: 1]
  ------------------
  497|  2.30k|        (newparams.data[0] != 0xa0)) {
  ------------------
  |  Branch (497:9): [True: 2.30k, False: 1]
  ------------------
  498|       |
  499|  2.30k|        if (SECSuccess == rv) {
  ------------------
  |  Branch (499:13): [True: 2.30k, False: 0]
  ------------------
  500|       |            /* PQG params are in the standard format */
  501|  2.30k|            prepare_pqg_params_for_asn1(&pubk->u.dsa.params);
  502|  2.30k|            rv = SEC_QuickDERDecodeItem(arena, &pubk->u.dsa.params,
  ------------------
  |  |  102|  2.30k|#define SEC_QuickDERDecodeItem SEC_QuickDERDecodeItem_Util
  ------------------
  503|  2.30k|                                        SECKEY_PQGParamsTemplate,
  504|  2.30k|                                        &newparams);
  505|  2.30k|        }
  506|  2.30k|    } else {
  507|       |
  508|      2|        if (SECSuccess == rv) {
  ------------------
  |  Branch (508:13): [True: 2, False: 0]
  ------------------
  509|       |            /* else the old fortezza-only wrapped format is used. */
  510|      2|            PORT_SetError(SEC_ERROR_BAD_DER);
  ------------------
  |  |   65|      2|#define PORT_SetError PORT_SetError_Util
  ------------------
  511|      2|            rv = SECFailure;
  512|      2|        }
  513|      2|    }
  514|  2.30k|    return rv;
  515|  2.30k|}
seckey.c:prepare_pqg_params_for_asn1:
  129|  2.30k|{
  130|  2.30k|    params->prime.type = siUnsignedInteger;
  131|  2.30k|    params->subPrime.type = siUnsignedInteger;
  132|  2.30k|    params->base.type = siUnsignedInteger;
  133|  2.30k|}
seckey.c:seckey_HasCurveOID:
  582|  1.89k|{
  583|  1.89k|    SECItem oid;
  584|  1.89k|    SECStatus rv;
  585|  1.89k|    PORTCheapArenaPool tmpArena;
  586|       |
  587|  1.89k|    PORT_InitCheapArena(&tmpArena, DER_DEFAULT_CHUNKSIZE);
  ------------------
  |  |   60|  1.89k|#define DER_DEFAULT_CHUNKSIZE (2048)
  ------------------
  588|       |    /* If we can decode it, an OID is available. */
  589|  1.89k|    rv = SEC_QuickDERDecodeItem(&tmpArena.arena, &oid,
  ------------------
  |  |  102|  1.89k|#define SEC_QuickDERDecodeItem SEC_QuickDERDecodeItem_Util
  ------------------
  590|  1.89k|                                SEC_ASN1_GET(SEC_ObjectIDTemplate),
  ------------------
  |  |  188|  1.89k|#define SEC_ASN1_GET(x) x
  ------------------
  591|  1.89k|                                &pubKey->u.ec.DEREncodedParams);
  592|  1.89k|    PORT_DestroyCheapArena(&tmpArena);
  593|  1.89k|    return rv;
  594|  1.89k|}
seckey.c:prepare_rsa_pub_key_for_asn1:
  116|  4.93k|{
  117|  4.93k|    pubk->u.rsa.modulus.type = siUnsignedInteger;
  118|  4.93k|    pubk->u.rsa.publicExponent.type = siUnsignedInteger;
  119|  4.93k|}
seckey.c:prepare_dsa_pub_key_for_asn1:
  123|  2.31k|{
  124|  2.31k|    pubk->u.dsa.publicValue.type = siUnsignedInteger;
  125|  2.31k|}
seckey.c:prepare_dh_pub_key_for_asn1:
  137|     31|{
  138|     31|    pubk->u.dh.prime.type = siUnsignedInteger;
  139|     31|    pubk->u.dh.base.type = siUnsignedInteger;
  140|     31|    pubk->u.dh.publicValue.type = siUnsignedInteger;
  141|     31|}

vfy_ImportPublicKey:
  630|    205|{
  631|    205|    PK11SlotInfo *slot;
  632|    205|    CK_OBJECT_HANDLE objID;
  633|       |
  634|    205|    if (cx->key->pkcs11Slot &&
  ------------------
  |  Branch (634:9): [True: 0, False: 205]
  ------------------
  635|    205|        PK11_DoesMechanismFlag(cx->key->pkcs11Slot,
  ------------------
  |  Branch (635:9): [True: 0, False: 0]
  ------------------
  636|      0|                               cx->mech, CKF_VERIFY)) {
  ------------------
  |  | 1358|      0|#define CKF_VERIFY 0x00002000
  ------------------
  637|      0|        return SECSuccess;
  638|      0|    }
  639|    205|    slot = PK11_GetBestSlotWithAttributes(cx->mech, CKF_VERIFY, 0, cx->wincx);
  ------------------
  |  | 1358|    205|#define CKF_VERIFY 0x00002000
  ------------------
  640|    205|    if (slot == NULL) {
  ------------------
  |  Branch (640:9): [True: 0, False: 205]
  ------------------
  641|      0|        return SECFailure; /* can't find a slot, fall back to
  642|       |                            * normal processing */
  643|      0|    }
  644|    205|    objID = PK11_ImportPublicKey(slot, cx->key, PR_FALSE);
  ------------------
  |  |  438|    205|#define PR_FALSE 0
  ------------------
  645|    205|    PK11_FreeSlot(slot);
  646|    205|    return objID == CK_INVALID_HANDLE ? SECFailure : SECSuccess;
  ------------------
  |  |   78|    205|#define CK_INVALID_HANDLE 0
  ------------------
  |  Branch (646:12): [True: 44, False: 161]
  ------------------
  647|    205|}
VFY_DestroyContext:
  885|    205|{
  886|    205|    if (cx) {
  ------------------
  |  Branch (886:9): [True: 205, False: 0]
  ------------------
  887|    205|        if (cx->hashcx != NULL) {
  ------------------
  |  Branch (887:13): [True: 0, False: 205]
  ------------------
  888|      0|            (*cx->hashobj->destroy)(cx->hashcx, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  889|      0|            cx->hashcx = NULL;
  890|      0|        }
  891|    205|        if (cx->vfycx != NULL) {
  ------------------
  |  Branch (891:13): [True: 0, False: 205]
  ------------------
  892|      0|            (void)PK11_DestroyContext(cx->vfycx, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  893|      0|            cx->vfycx = NULL;
  894|      0|        }
  895|    205|        if (cx->key) {
  ------------------
  |  Branch (895:13): [True: 205, False: 0]
  ------------------
  896|    205|            SECKEY_DestroyPublicKey(cx->key);
  897|    205|        }
  898|    205|        if (cx->pkcs1RSADigestInfo) {
  ------------------
  |  Branch (898:13): [True: 3, False: 202]
  ------------------
  899|      3|            PORT_Free(cx->pkcs1RSADigestInfo);
  ------------------
  |  |   60|      3|#define PORT_Free PORT_Free_Util
  ------------------
  900|      3|        }
  901|    205|        SECITEM_FreeItem(&cx->mechparams, PR_FALSE);
  ------------------
  |  |  108|    205|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                      SECITEM_FreeItem(&cx->mechparams, PR_FALSE);
  ------------------
  |  |  438|    205|#define PR_FALSE 0
  ------------------
  902|    205|        if (freeit) {
  ------------------
  |  Branch (902:13): [True: 205, False: 0]
  ------------------
  903|    205|            PORT_ZFree(cx, sizeof(VFYContext));
  ------------------
  |  |   75|    205|#define PORT_ZFree PORT_ZFree_Util
  ------------------
  904|    205|        }
  905|    205|    }
  906|    205|}
VFY_VerifyDigestDirect:
 1107|    205|{
 1108|    205|    CK_MECHANISM_TYPE mech = sec_GetCombinedMech(encAlg, hashAlg);
 1109|    205|    return vfy_VerifyDigest(digest, key, sig, encAlg, hashAlg, mech,
 1110|    205|                            NULL, wincx);
 1111|    205|}
secvfy.c:sec_ECDSAGetCombinedMech:
  370|    187|{
  371|    187|    switch (hashalg) {
  372|     45|        case SEC_OID_SHA1:
  ------------------
  |  Branch (372:9): [True: 45, False: 142]
  ------------------
  373|     45|            return CKM_ECDSA_SHA1;
  ------------------
  |  | 1075|     45|#define CKM_ECDSA_SHA1 0x00001042UL
  ------------------
  374|      0|        case SEC_OID_SHA224:
  ------------------
  |  Branch (374:9): [True: 0, False: 187]
  ------------------
  375|      0|            return CKM_ECDSA_SHA224;
  ------------------
  |  | 1078|      0|#define CKM_ECDSA_SHA224 0x00001043UL
  ------------------
  376|     54|        case SEC_OID_SHA256:
  ------------------
  |  Branch (376:9): [True: 54, False: 133]
  ------------------
  377|     54|            return CKM_ECDSA_SHA256;
  ------------------
  |  | 1079|     54|#define CKM_ECDSA_SHA256 0x00001044UL
  ------------------
  378|     80|        case SEC_OID_SHA384:
  ------------------
  |  Branch (378:9): [True: 80, False: 107]
  ------------------
  379|     80|            return CKM_ECDSA_SHA384;
  ------------------
  |  | 1080|     80|#define CKM_ECDSA_SHA384 0x00001045UL
  ------------------
  380|      8|        case SEC_OID_SHA512:
  ------------------
  |  Branch (380:9): [True: 8, False: 179]
  ------------------
  381|      8|            return CKM_ECDSA_SHA512;
  ------------------
  |  | 1081|      8|#define CKM_ECDSA_SHA512 0x00001046UL
  ------------------
  382|      0|        default:
  ------------------
  |  Branch (382:9): [True: 0, False: 187]
  ------------------
  383|      0|            break;
  384|    187|    }
  385|      0|    return CKM_INVALID_MECHANISM;
  ------------------
  |  |  155|      0|#define CKM_INVALID_MECHANISM 0xffffffffUL
  ------------------
  386|    187|}
secvfy.c:vfy_CreateContext:
  721|    205|{
  722|    205|    VFYContext *cx;
  723|    205|    SECStatus rv;
  724|    205|    KeyType type;
  725|    205|    PRUint32 policyFlags;
  726|    205|    PRInt32 optFlags;
  727|       |
  728|       |    /* make sure the encryption algorithm matches the key type */
  729|       |    /* RSA-PSS algorithm can be used with both rsaKey and rsaPssKey */
  730|    205|    type = seckey_GetKeyType(encAlg);
  731|    205|    if ((key->keyType != type) &&
  ------------------
  |  Branch (731:9): [True: 0, False: 205]
  ------------------
  732|    205|        ((key->keyType != rsaKey) || (type != rsaPssKey))) {
  ------------------
  |  Branch (732:10): [True: 0, False: 0]
  |  Branch (732:38): [True: 0, False: 0]
  ------------------
  733|      0|        SECITEM_FreeItem(mechparamsp, PR_FALSE);
  ------------------
  |  |  108|      0|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                      SECITEM_FreeItem(mechparamsp, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  734|      0|        PORT_SetError(SEC_ERROR_PKCS7_KEYALG_MISMATCH);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  735|      0|        return NULL;
  736|      0|    }
  737|    205|    if (NSS_OptionGet(NSS_KEY_SIZE_POLICY_FLAGS, &optFlags) != SECFailure) {
  ------------------
  |  |  317|    205|#define NSS_KEY_SIZE_POLICY_FLAGS 0x00e
  ------------------
  |  Branch (737:9): [True: 205, False: 0]
  ------------------
  738|    205|        if (optFlags & NSS_KEY_SIZE_POLICY_VERIFY_FLAG) {
  ------------------
  |  |  322|    205|#define NSS_KEY_SIZE_POLICY_VERIFY_FLAG 2
  ------------------
  |  Branch (738:13): [True: 205, False: 0]
  ------------------
  739|    205|            rv = SECKEY_EnforceKeySize(key->keyType,
  740|    205|                                       SECKEY_PublicKeyStrengthInBits(key),
  741|    205|                                       SEC_ERROR_SIGNATURE_ALGORITHM_DISABLED);
  742|    205|            if (rv != SECSuccess) {
  ------------------
  |  Branch (742:17): [True: 0, False: 205]
  ------------------
  743|      0|                SECITEM_FreeItem(mechparamsp, PR_FALSE);
  ------------------
  |  |  108|      0|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                              SECITEM_FreeItem(mechparamsp, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  744|      0|                return NULL;
  745|      0|            }
  746|    205|        }
  747|    205|    }
  748|       |    /* check the policy on the encryption algorithm */
  749|    205|    if ((NSS_GetAlgorithmPolicy(encAlg, &policyFlags) == SECFailure) ||
  ------------------
  |  Branch (749:9): [True: 0, False: 205]
  ------------------
  750|    205|        !(policyFlags & NSS_USE_ALG_IN_ANY_SIGNATURE)) {
  ------------------
  |  |  575|    205|#define NSS_USE_ALG_IN_ANY_SIGNATURE 0x00000020    /* used in any signature */
  ------------------
  |  Branch (750:9): [True: 0, False: 205]
  ------------------
  751|      0|        SECITEM_FreeItem(mechparamsp, PR_FALSE);
  ------------------
  |  |  108|      0|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                      SECITEM_FreeItem(mechparamsp, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  752|      0|        PORT_SetError(SEC_ERROR_SIGNATURE_ALGORITHM_DISABLED);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  753|      0|        return NULL;
  754|      0|    }
  755|       |
  756|    205|    cx = (VFYContext *)PORT_ZAlloc(sizeof(VFYContext));
  ------------------
  |  |   72|    205|#define PORT_ZAlloc PORT_ZAlloc_Util
  ------------------
  757|    205|    if (cx == NULL) {
  ------------------
  |  Branch (757:9): [True: 0, False: 205]
  ------------------
  758|       |        /* after this point mechparamsp is 'owned' by the context and will be
  759|       |         * freed by Destroy context for any other failures here */
  760|      0|        SECITEM_FreeItem(mechparamsp, PR_FALSE);
  ------------------
  |  |  108|      0|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                      SECITEM_FreeItem(mechparamsp, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  761|      0|        goto loser;
  762|      0|    }
  763|       |
  764|    205|    cx->wincx = wincx;
  765|    205|    cx->hasSignature = (sig != NULL);
  766|    205|    cx->encAlg = encAlg;
  767|    205|    cx->hashAlg = hashAlg;
  768|    205|    cx->mech = mech;
  769|    205|    if (mechparamsp) {
  ------------------
  |  Branch (769:9): [True: 0, False: 205]
  ------------------
  770|      0|        cx->mechparams = *mechparamsp;
  771|    205|    } else {
  772|       |        /* probably needs to have a call to set the default
  773|       |         * paramseters based on hashAlg and encAlg */
  774|    205|        cx->mechparams.data = NULL;
  775|    205|        cx->mechparams.len = 0;
  776|    205|    }
  777|    205|    cx->key = SECKEY_CopyPublicKey(key);
  778|    205|    cx->pkcs1RSADigestInfo = NULL;
  779|    205|    if (mech != CKM_INVALID_MECHANISM) {
  ------------------
  |  |  155|    205|#define CKM_INVALID_MECHANISM 0xffffffffUL
  ------------------
  |  Branch (779:9): [True: 205, False: 0]
  ------------------
  780|    205|        rv = vfy_ImportPublicKey(cx);
  781|       |        /* if we can't import the key, then we probably can't
  782|       |         * support the requested combined mechanism, fallback
  783|       |         * to the non-combined method */
  784|    205|        if (rv != SECSuccess) {
  ------------------
  |  Branch (784:13): [True: 44, False: 161]
  ------------------
  785|     44|            cx->mech = mech = CKM_INVALID_MECHANISM;
  ------------------
  |  |  155|     44|#define CKM_INVALID_MECHANISM 0xffffffffUL
  ------------------
  786|     44|        }
  787|    205|    }
  788|    205|    if (sig) {
  ------------------
  |  Branch (788:9): [True: 205, False: 0]
  ------------------
  789|       |        /* sigh, if we are prehashing, we still need to do verifyRecover
  790|       |         * recover for RSA PKCS #1 */
  791|    205|        if ((mech == CKM_INVALID_MECHANISM || prehash) && (type == rsaKey)) {
  ------------------
  |  |  155|    410|#define CKM_INVALID_MECHANISM 0xffffffffUL
  ------------------
  |  Branch (791:14): [True: 44, False: 161]
  |  Branch (791:47): [True: 161, False: 0]
  |  Branch (791:59): [True: 18, False: 187]
  ------------------
  792|       |            /* in traditional rsa PKCS #1, we use verify recover to get
  793|       |             * the encoded RSADigestInfo. In all other cases we just
  794|       |             * stash the signature encoded in PKCS#11 in our context */
  795|     18|            rv = recoverPKCS1DigestInfo(hashAlg, &cx->hashAlg,
  796|     18|                                        &cx->pkcs1RSADigestInfo,
  797|     18|                                        &cx->pkcs1RSADigestInfoLen,
  798|     18|                                        cx->key,
  799|     18|                                        sig, wincx);
  800|    187|        } else {
  801|       |            /* at this point hashAlg should be known. Only the RSA case
  802|       |             * enters here with hashAlg unknown, and it's found out
  803|       |             * above */
  804|    187|            PORT_Assert(hashAlg != SEC_OID_UNKNOWN);
  ------------------
  |  |  120|    187|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    187|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 187, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  805|    187|            rv = vfy_SetPKCS11SigFromX509Sig(cx, sig);
  806|    187|        }
  807|    205|        if (rv != SECSuccess) {
  ------------------
  |  Branch (807:13): [True: 43, False: 162]
  ------------------
  808|     43|            goto loser;
  809|     43|        }
  810|    205|    }
  811|       |
  812|       |    /* check hash alg again, RSA may have changed it.*/
  813|    162|    if (HASH_GetHashTypeByOidTag(cx->hashAlg) == HASH_AlgNULL) {
  ------------------
  |  |  125|    162|#define HASH_GetHashTypeByOidTag HASH_GetHashTypeByOidTag_Util
  ------------------
  |  Branch (813:9): [True: 0, False: 162]
  ------------------
  814|       |        /* error set by HASH_GetHashTypeByOidTag */
  815|      0|        goto loser;
  816|      0|    }
  817|       |    /* check the policy on the hash algorithm. Do this after
  818|       |     * the rsa decode because some uses of this function get hash implicitly
  819|       |     * from the RSA signature itself. */
  820|    162|    if ((NSS_GetAlgorithmPolicy(cx->hashAlg, &policyFlags) == SECFailure) ||
  ------------------
  |  Branch (820:9): [True: 0, False: 162]
  ------------------
  821|    162|        !(policyFlags & NSS_USE_ALG_IN_ANY_SIGNATURE)) {
  ------------------
  |  |  575|    162|#define NSS_USE_ALG_IN_ANY_SIGNATURE 0x00000020    /* used in any signature */
  ------------------
  |  Branch (821:9): [True: 0, False: 162]
  ------------------
  822|      0|        PORT_SetError(SEC_ERROR_SIGNATURE_ALGORITHM_DISABLED);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  823|      0|        goto loser;
  824|      0|    }
  825|       |
  826|    162|    if (hash) {
  ------------------
  |  Branch (826:9): [True: 0, False: 162]
  ------------------
  827|      0|        *hash = cx->hashAlg;
  828|      0|    }
  829|    162|    return cx;
  830|       |
  831|     43|loser:
  832|     43|    if (cx) {
  ------------------
  |  Branch (832:9): [True: 43, False: 0]
  ------------------
  833|     43|        VFY_DestroyContext(cx, PR_TRUE);
  ------------------
  |  |  437|     43|#define PR_TRUE 1
  ------------------
  834|     43|    }
  835|     43|    return 0;
  836|    162|}
secvfy.c:sec_GetCombinedMech:
  390|    205|{
  391|    205|    switch (encalg) {
  392|     18|        case SEC_OID_PKCS1_RSA_ENCRYPTION:
  ------------------
  |  Branch (392:9): [True: 18, False: 187]
  ------------------
  393|     18|            return sec_RSAPKCS1GetCombinedMech(hashalg);
  394|      0|        case SEC_OID_PKCS1_RSA_PSS_SIGNATURE:
  ------------------
  |  Branch (394:9): [True: 0, False: 205]
  ------------------
  395|      0|            return sec_RSAPSSGetCombinedMech(hashalg);
  396|    187|        case SEC_OID_ANSIX962_EC_PUBLIC_KEY:
  ------------------
  |  Branch (396:9): [True: 187, False: 18]
  ------------------
  397|    187|            return sec_ECDSAGetCombinedMech(hashalg);
  398|      0|        case SEC_OID_ANSIX9_DSA_SIGNATURE:
  ------------------
  |  Branch (398:9): [True: 0, False: 205]
  ------------------
  399|      0|            return sec_DSAGetCombinedMech(hashalg);
  400|      0|        default:
  ------------------
  |  Branch (400:9): [True: 0, False: 205]
  ------------------
  401|      0|            break;
  402|    205|    }
  403|      0|    return CKM_INVALID_MECHANISM;
  ------------------
  |  |  155|      0|#define CKM_INVALID_MECHANISM 0xffffffffUL
  ------------------
  404|    205|}
secvfy.c:sec_RSAPKCS1GetCombinedMech:
  307|     18|{
  308|     18|    switch (hashalg) {
  309|      0|        case SEC_OID_MD5:
  ------------------
  |  Branch (309:9): [True: 0, False: 18]
  ------------------
  310|      0|            return CKM_MD5_RSA_PKCS;
  ------------------
  |  |  727|      0|#define CKM_MD5_RSA_PKCS 0x00000005UL
  ------------------
  311|      0|        case SEC_OID_MD2:
  ------------------
  |  Branch (311:9): [True: 0, False: 18]
  ------------------
  312|      0|            return CKM_MD2_RSA_PKCS;
  ------------------
  |  |  726|      0|#define CKM_MD2_RSA_PKCS 0x00000004UL
  ------------------
  313|      4|        case SEC_OID_SHA1:
  ------------------
  |  Branch (313:9): [True: 4, False: 14]
  ------------------
  314|      4|            return CKM_SHA1_RSA_PKCS;
  ------------------
  |  |  728|      4|#define CKM_SHA1_RSA_PKCS 0x00000006UL
  ------------------
  315|      0|        case SEC_OID_SHA224:
  ------------------
  |  Branch (315:9): [True: 0, False: 18]
  ------------------
  316|      0|            return CKM_SHA224_RSA_PKCS;
  ------------------
  |  |  778|      0|#define CKM_SHA224_RSA_PKCS 0x00000046UL
  ------------------
  317|     10|        case SEC_OID_SHA256:
  ------------------
  |  Branch (317:9): [True: 10, False: 8]
  ------------------
  318|     10|            return CKM_SHA256_RSA_PKCS;
  ------------------
  |  |  770|     10|#define CKM_SHA256_RSA_PKCS 0x00000040UL
  ------------------
  319|      2|        case SEC_OID_SHA384:
  ------------------
  |  Branch (319:9): [True: 2, False: 16]
  ------------------
  320|      2|            return CKM_SHA384_RSA_PKCS;
  ------------------
  |  |  771|      2|#define CKM_SHA384_RSA_PKCS 0x00000041UL
  ------------------
  321|      2|        case SEC_OID_SHA512:
  ------------------
  |  Branch (321:9): [True: 2, False: 16]
  ------------------
  322|      2|            return CKM_SHA512_RSA_PKCS;
  ------------------
  |  |  772|      2|#define CKM_SHA512_RSA_PKCS 0x00000042UL
  ------------------
  323|      0|        default:
  ------------------
  |  Branch (323:9): [True: 0, False: 18]
  ------------------
  324|      0|            break;
  325|     18|    }
  326|      0|    return CKM_INVALID_MECHANISM;
  ------------------
  |  |  155|      0|#define CKM_INVALID_MECHANISM 0xffffffffUL
  ------------------
  327|     18|}
secvfy.c:vfy_SetPKCS11SigFromX509Sig:
  655|    187|{
  656|    187|    unsigned int sigLen;
  657|       |
  658|       |    /* skip the legacy RSA PKCS #11 case, it's always handled separately */
  659|    187|    if ((cx->key->keyType == rsaKey) && (cx->mech == CKM_INVALID_MECHANISM) &&
  ------------------
  |  |  155|      0|#define CKM_INVALID_MECHANISM 0xffffffffUL
  ------------------
  |  Branch (659:9): [True: 0, False: 187]
  |  Branch (659:41): [True: 0, False: 0]
  ------------------
  660|    187|        (cx->encAlg != SEC_OID_PKCS1_RSA_PSS_SIGNATURE)) {
  ------------------
  |  Branch (660:9): [True: 0, False: 0]
  ------------------
  661|      0|        return SECSuccess;
  662|      0|    }
  663|       |
  664|    187|    sigLen = checkedSignatureLen(cx->key);
  665|       |    /* Check signature length is within limits */
  666|    187|    if (sigLen == 0) {
  ------------------
  |  Branch (666:9): [True: 0, False: 187]
  ------------------
  667|       |        /* error set by checkedSignatureLen */
  668|      0|        return SECFailure;
  669|      0|    }
  670|    187|    if (sigLen > sizeof(cx->u)) {
  ------------------
  |  Branch (670:9): [True: 0, False: 187]
  ------------------
  671|      0|        PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  672|      0|        return SECFailure;
  673|      0|    }
  674|       |    /* save the authenticated length */
  675|    187|    cx->signatureLen = sigLen;
  676|    187|    switch (cx->encAlg) {
  677|      0|        case SEC_OID_ANSIX9_DSA_SIGNATURE:
  ------------------
  |  Branch (677:9): [True: 0, False: 187]
  ------------------
  678|    187|        case SEC_OID_ANSIX962_EC_PUBLIC_KEY:
  ------------------
  |  Branch (678:9): [True: 187, False: 0]
  ------------------
  679|       |            /* decodeECorDSASignature will check sigLen == sig->len after padding */
  680|    187|            return decodeECorDSASignature(cx->encAlg, sig, cx->u.buffer, sigLen);
  681|      0|        default:
  ------------------
  |  Branch (681:9): [True: 0, False: 187]
  ------------------
  682|      0|            break;
  683|    187|    }
  684|       |    /* all other cases, no transform needed, just copy the signature */
  685|      0|    if (sig->len != sigLen) {
  ------------------
  |  Branch (685:9): [True: 0, False: 0]
  ------------------
  686|      0|        PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  687|      0|        return SECFailure;
  688|      0|    }
  689|      0|    PORT_Memcpy(cx->u.buffer, sig->data, sigLen);
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
  690|      0|    return SECSuccess;
  691|      0|}
secvfy.c:checkedSignatureLen:
  175|    346|{
  176|    346|    unsigned int sigLen = SECKEY_SignatureLen(pubk);
  177|    346|    if (sigLen == 0) {
  ------------------
  |  Branch (177:9): [True: 0, False: 346]
  ------------------
  178|       |        /* Error set by SECKEY_SignatureLen */
  179|      0|        return sigLen;
  180|      0|    }
  181|    346|    unsigned int maxSigLen;
  182|    346|    switch (pubk->keyType) {
  183|      0|        case rsaKey:
  ------------------
  |  Branch (183:9): [True: 0, False: 346]
  ------------------
  184|      0|        case rsaPssKey:
  ------------------
  |  Branch (184:9): [True: 0, False: 346]
  ------------------
  185|      0|            maxSigLen = (RSA_MAX_MODULUS_BITS + 7) / 8;
  ------------------
  |  |  152|      0|#define RSA_MAX_MODULUS_BITS 16384
  ------------------
  186|      0|            break;
  187|      0|        case dsaKey:
  ------------------
  |  Branch (187:9): [True: 0, False: 346]
  ------------------
  188|      0|            maxSigLen = DSA_MAX_SIGNATURE_LEN;
  ------------------
  |  |   52|      0|#define DSA_MAX_SIGNATURE_LEN (DSA_MAX_SUBPRIME_LEN * 2) /* Bytes */
  |  |  ------------------
  |  |  |  |   51|      0|#define DSA_MAX_SUBPRIME_LEN 32                          /* Bytes */
  |  |  ------------------
  ------------------
  189|      0|            break;
  190|    346|        case ecKey:
  ------------------
  |  Branch (190:9): [True: 346, False: 0]
  ------------------
  191|    346|            maxSigLen = 2 * MAX_ECKEY_LEN;
  ------------------
  |  |   81|    346|#define MAX_ECKEY_LEN 72 /* Bytes */
  ------------------
  192|    346|            break;
  193|      0|        default:
  ------------------
  |  Branch (193:9): [True: 0, False: 346]
  ------------------
  194|      0|            PORT_SetError(SEC_ERROR_UNSUPPORTED_KEYALG);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  195|      0|            return 0;
  196|    346|    }
  197|    346|    PORT_Assert(maxSigLen <= MAX_SIGNATURE_LEN);
  ------------------
  |  |  120|    346|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    346|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 346, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  198|    346|    if (sigLen > maxSigLen) {
  ------------------
  |  Branch (198:9): [True: 0, False: 346]
  ------------------
  199|      0|        PORT_SetError(SEC_ERROR_INVALID_KEY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  200|      0|        return 0;
  201|      0|    }
  202|    346|    return sigLen;
  203|    346|}
secvfy.c:decodeECorDSASignature:
  213|    187|{
  214|    187|    SECItem *dsasig = NULL; /* also used for ECDSA */
  215|       |
  216|       |    /* Safety: Ensure algId is as expected and that signature size is within maxmimums */
  217|    187|    if (algid == SEC_OID_ANSIX9_DSA_SIGNATURE) {
  ------------------
  |  Branch (217:9): [True: 0, False: 187]
  ------------------
  218|      0|        if (len > DSA_MAX_SIGNATURE_LEN) {
  ------------------
  |  |   52|      0|#define DSA_MAX_SIGNATURE_LEN (DSA_MAX_SUBPRIME_LEN * 2) /* Bytes */
  |  |  ------------------
  |  |  |  |   51|      0|#define DSA_MAX_SUBPRIME_LEN 32                          /* Bytes */
  |  |  ------------------
  ------------------
  |  Branch (218:13): [True: 0, False: 0]
  ------------------
  219|      0|            goto loser;
  220|      0|        }
  221|    187|    } else if (algid == SEC_OID_ANSIX962_EC_PUBLIC_KEY) {
  ------------------
  |  Branch (221:16): [True: 187, False: 0]
  ------------------
  222|    187|        if (len > MAX_ECKEY_LEN * 2) {
  ------------------
  |  |   81|    187|#define MAX_ECKEY_LEN 72 /* Bytes */
  ------------------
  |  Branch (222:13): [True: 0, False: 187]
  ------------------
  223|      0|            goto loser;
  224|      0|        }
  225|    187|    } else {
  226|      0|        goto loser;
  227|      0|    }
  228|       |
  229|       |    /* Decode and pad to length */
  230|    187|    dsasig = DSAU_DecodeDerSigToLen((SECItem *)sig, len);
  231|    187|    if (dsasig == NULL) {
  ------------------
  |  Branch (231:9): [True: 28, False: 159]
  ------------------
  232|     28|        goto loser;
  233|     28|    }
  234|    159|    if (dsasig->len != len) {
  ------------------
  |  Branch (234:9): [True: 0, False: 159]
  ------------------
  235|      0|        SECITEM_FreeItem(dsasig, PR_TRUE);
  ------------------
  |  |  108|      0|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                      SECITEM_FreeItem(dsasig, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  236|      0|        goto loser;
  237|      0|    }
  238|       |
  239|    159|    PORT_Memcpy(dsig, dsasig->data, len);
  ------------------
  |  |  180|    159|#define PORT_Memcpy memcpy
  ------------------
  240|    159|    SECITEM_FreeItem(dsasig, PR_TRUE);
  ------------------
  |  |  108|    159|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                  SECITEM_FreeItem(dsasig, PR_TRUE);
  ------------------
  |  |  437|    159|#define PR_TRUE 1
  ------------------
  241|       |
  242|    159|    return SECSuccess;
  243|       |
  244|     28|loser:
  245|     28|    PORT_SetError(SEC_ERROR_BAD_DER);
  ------------------
  |  |   65|     28|#define PORT_SetError PORT_SetError_Util
  ------------------
  246|     28|    return SECFailure;
  247|    159|}
secvfy.c:recoverPKCS1DigestInfo:
   45|     18|{
   46|     18|    SGNDigestInfo *di = NULL;
   47|     18|    SECItem it;
   48|     18|    PRBool rv = SECSuccess;
   49|       |
   50|     18|    PORT_Assert(digestAlgOut);
  ------------------
  |  |  120|     18|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|     18|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 18, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   51|     18|    PORT_Assert(digestInfo);
  ------------------
  |  |  120|     18|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|     18|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 18, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   52|     18|    PORT_Assert(digestInfoLen);
  ------------------
  |  |  120|     18|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|     18|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 18, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   53|     18|    PORT_Assert(key);
  ------------------
  |  |  120|     18|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|     18|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 18, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   54|     18|    PORT_Assert(key->keyType == rsaKey);
  ------------------
  |  |  120|     18|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|     18|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 18, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   55|     18|    PORT_Assert(sig);
  ------------------
  |  |  120|     18|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|     18|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 18, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   56|       |
   57|     18|    it.data = NULL;
   58|     18|    it.len = SECKEY_PublicKeyStrength(key);
   59|     18|    if (it.len != 0) {
  ------------------
  |  Branch (59:9): [True: 18, False: 0]
  ------------------
   60|     18|        it.data = (unsigned char *)PORT_Alloc(it.len);
  ------------------
  |  |   52|     18|#define PORT_Alloc PORT_Alloc_Util
  ------------------
   61|     18|    }
   62|     18|    if (it.len == 0 || it.data == NULL) {
  ------------------
  |  Branch (62:9): [True: 0, False: 18]
  |  Branch (62:24): [True: 0, False: 18]
  ------------------
   63|      0|        rv = SECFailure;
   64|      0|    }
   65|       |
   66|     18|    if (rv == SECSuccess) {
  ------------------
  |  Branch (66:9): [True: 18, False: 0]
  ------------------
   67|       |        /* decrypt the block */
   68|     18|        rv = PK11_VerifyRecover(key, sig, &it, wincx);
   69|     18|    }
   70|       |
   71|     18|    if (rv == SECSuccess) {
  ------------------
  |  Branch (71:9): [True: 3, False: 15]
  ------------------
   72|      3|        if (givenDigestAlg != SEC_OID_UNKNOWN) {
  ------------------
  |  Branch (72:13): [True: 3, False: 0]
  ------------------
   73|       |            /* We don't need to parse the DigestInfo if the caller gave us the
   74|       |             * digest algorithm to use. Later verifyPKCS1DigestInfo will verify
   75|       |             * that the DigestInfo identifies the given digest algorithm and
   76|       |             * that the DigestInfo is encoded absolutely correctly.
   77|       |             */
   78|      3|            *digestInfoLen = it.len;
   79|      3|            *digestInfo = (unsigned char *)it.data;
   80|      3|            *digestAlgOut = givenDigestAlg;
   81|      3|            return SECSuccess;
   82|      3|        }
   83|      3|    }
   84|       |
   85|     15|    if (rv == SECSuccess) {
  ------------------
  |  Branch (85:9): [True: 0, False: 15]
  ------------------
   86|       |        /* The caller didn't specify a digest algorithm to use, so choose the
   87|       |         * digest algorithm by parsing the AlgorithmIdentifier within the
   88|       |         * DigestInfo.
   89|       |         */
   90|      0|        di = SGN_DecodeDigestInfo(&it);
   91|      0|        if (!di) {
  ------------------
  |  Branch (91:13): [True: 0, False: 0]
  ------------------
   92|      0|            rv = SECFailure;
   93|      0|        }
   94|      0|    }
   95|       |
   96|     15|    if (rv == SECSuccess) {
  ------------------
  |  Branch (96:9): [True: 0, False: 15]
  ------------------
   97|      0|        *digestAlgOut = SECOID_GetAlgorithmTag(&di->digestAlgorithm);
  ------------------
  |  |  119|      0|#define SECOID_GetAlgorithmTag SECOID_GetAlgorithmTag_Util
  ------------------
   98|      0|        if (*digestAlgOut == SEC_OID_UNKNOWN) {
  ------------------
  |  Branch (98:13): [True: 0, False: 0]
  ------------------
   99|      0|            rv = SECFailure;
  100|      0|        }
  101|      0|    }
  102|       |
  103|     15|    if (di) {
  ------------------
  |  Branch (103:9): [True: 0, False: 15]
  ------------------
  104|      0|        SGN_DestroyDigestInfo(di);
  ------------------
  |  |  124|      0|#define SGN_DestroyDigestInfo SGN_DestroyDigestInfo_Util
  ------------------
  105|      0|    }
  106|       |
  107|     15|    if (rv == SECSuccess) {
  ------------------
  |  Branch (107:9): [True: 0, False: 15]
  ------------------
  108|      0|        *digestInfoLen = it.len;
  109|      0|        *digestInfo = (unsigned char *)it.data;
  110|     15|    } else {
  111|     15|        if (it.data) {
  ------------------
  |  Branch (111:13): [True: 15, False: 0]
  ------------------
  112|     15|            PORT_Free(it.data);
  ------------------
  |  |   60|     15|#define PORT_Free PORT_Free_Util
  ------------------
  113|     15|        }
  114|     15|        *digestInfo = NULL;
  115|     15|        *digestInfoLen = 0;
  116|     15|        PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
  ------------------
  |  |   65|     15|#define PORT_SetError PORT_SetError_Util
  ------------------
  117|     15|    }
  118|       |
  119|     15|    return rv;
  120|     18|}
secvfy.c:verifyPKCS1DigestInfo:
  164|      3|{
  165|      3|    SECItem pkcs1DigestInfo;
  166|      3|    pkcs1DigestInfo.data = cx->pkcs1RSADigestInfo;
  167|      3|    pkcs1DigestInfo.len = cx->pkcs1RSADigestInfoLen;
  168|      3|    return _SGN_VerifyPKCS1DigestInfo(
  169|      3|        cx->hashAlg, digest, &pkcs1DigestInfo,
  170|      3|        PR_FALSE /*XXX: unsafeAllowMissingParameters*/);
  ------------------
  |  |  438|      3|#define PR_FALSE 0
  ------------------
  171|      3|}
secvfy.c:vfy_VerifyDigest:
 1060|    205|{
 1061|    205|    SECStatus rv;
 1062|    205|    VFYContext *cx;
 1063|    205|    SECItem dsasig; /* also used for ECDSA */
 1064|    205|    rv = SECFailure;
 1065|       |
 1066|    205|    cx = vfy_CreateContext(key, sig, encAlg, hashAlg, mech, mechparamsp,
 1067|    205|                           NULL, PR_TRUE, wincx);
  ------------------
  |  |  437|    205|#define PR_TRUE 1
  ------------------
 1068|    205|    if (cx != NULL) {
  ------------------
  |  Branch (1068:9): [True: 162, False: 43]
  ------------------
 1069|    162|        switch (key->keyType) {
 1070|      3|            case rsaKey:
  ------------------
  |  Branch (1070:13): [True: 3, False: 159]
  ------------------
 1071|       |                /* PSS isn't handled here for VerifyDigest. SSL
 1072|       |                 * calls PK11_Verify directly */
 1073|      3|                rv = verifyPKCS1DigestInfo(cx, digest);
 1074|       |                /* Error (if any) set by verifyPKCS1DigestInfo */
 1075|      3|                break;
 1076|    159|            case ecKey:
  ------------------
  |  Branch (1076:13): [True: 159, False: 3]
  ------------------
 1077|    159|            case dsaKey:
  ------------------
  |  Branch (1077:13): [True: 0, False: 162]
  ------------------
 1078|    159|                dsasig.data = cx->u.buffer;
 1079|    159|                dsasig.len = checkedSignatureLen(cx->key);
 1080|    159|                if (dsasig.len == 0) {
  ------------------
  |  Branch (1080:21): [True: 0, False: 159]
  ------------------
 1081|       |                    /* Error set by checkedSignatureLen */
 1082|      0|                    rv = SECFailure;
 1083|      0|                    break;
 1084|      0|                }
 1085|    159|                if (dsasig.len > sizeof(cx->u)) {
  ------------------
  |  Branch (1085:21): [True: 0, False: 159]
  ------------------
 1086|      0|                    PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1087|      0|                    rv = SECFailure;
 1088|      0|                    break;
 1089|      0|                }
 1090|    159|                rv = PK11_Verify(cx->key, &dsasig, (SECItem *)digest, cx->wincx);
 1091|    159|                if (rv != SECSuccess) {
  ------------------
  |  Branch (1091:21): [True: 159, False: 0]
  ------------------
 1092|    159|                    PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
  ------------------
  |  |   65|    159|#define PORT_SetError PORT_SetError_Util
  ------------------
 1093|    159|                }
 1094|    159|                break;
 1095|      0|            default:
  ------------------
  |  Branch (1095:13): [True: 0, False: 162]
  ------------------
 1096|      0|                break;
 1097|    162|        }
 1098|    162|        VFY_DestroyContext(cx, PR_TRUE);
  ------------------
  |  |  437|    162|#define PR_TRUE 1
  ------------------
 1099|    162|    }
 1100|    205|    return rv;
 1101|    205|}

nssSlot_Destroy:
   33|  30.6k|{
   34|  30.6k|    if (slot) {
  ------------------
  |  Branch (34:9): [True: 30.6k, False: 0]
  ------------------
   35|  30.6k|        if (PR_ATOMIC_DECREMENT(&slot->base.refCount) == 0) {
  ------------------
  |  |  123|  30.6k|#define PR_ATOMIC_DECREMENT(val) __sync_sub_and_fetch(val, 1)
  ------------------
  |  Branch (35:13): [True: 2, False: 30.6k]
  ------------------
   36|      2|            PK11_FreeSlot(slot->pk11slot);
   37|      2|            PZ_DestroyLock(slot->base.lock);
  ------------------
  |  |  244|      2|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
   38|      2|            PZ_DestroyCondVar(slot->isPresentCondition);
  ------------------
  |  |  249|      2|#define PZ_DestroyCondVar(v) PR_DestroyCondVar((v))
  ------------------
   39|      2|            PZ_DestroyLock(slot->isPresentLock);
  ------------------
  |  |  244|      2|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
   40|      2|            return nssArena_Destroy(slot->base.arena);
   41|      2|        }
   42|  30.6k|    }
   43|  30.6k|    return PR_SUCCESS;
   44|  30.6k|}
nssSlot_AddRef:
   72|  30.6k|{
   73|  30.6k|    PR_ATOMIC_INCREMENT(&slot->base.refCount);
  ------------------
  |  |  122|  30.6k|#define PR_ATOMIC_INCREMENT(val) __sync_add_and_fetch(val, 1)
  ------------------
   74|  30.6k|    return slot;
   75|  30.6k|}
nssSlot_IsTokenPresent:
  118|  30.6k|{
  119|  30.6k|    CK_RV ckrv;
  120|  30.6k|    PRStatus nssrv;
  121|  30.6k|    NSSToken *nssToken = NULL;
  122|       |    /* XXX */
  123|  30.6k|    nssSession *session;
  124|  30.6k|    CK_SLOT_INFO slotInfo;
  125|  30.6k|    void *epv;
  126|  30.6k|    PRBool isPresent = PR_FALSE;
  ------------------
  |  |  438|  30.6k|#define PR_FALSE 0
  ------------------
  127|  30.6k|    PRBool doUpdateCachedCerts = PR_FALSE;
  ------------------
  |  |  438|  30.6k|#define PR_FALSE 0
  ------------------
  128|       |
  129|       |    /* permanent slots are always present unless they're disabled */
  130|  30.6k|    if (nssSlot_IsPermanent(slot)) {
  ------------------
  |  Branch (130:9): [True: 30.6k, False: 0]
  ------------------
  131|  30.6k|        return !PK11_IsDisabled(slot->pk11slot);
  132|  30.6k|    }
  133|       |
  134|       |    /* avoid repeated calls to check token status within set interval */
  135|      0|    PZ_Lock(slot->isPresentLock);
  ------------------
  |  |  245|      0|#define PZ_Lock(k) PR_Lock((k))
  ------------------
  136|      0|    if (token_status_checked(slot)) {
  ------------------
  |  Branch (136:9): [True: 0, False: 0]
  ------------------
  137|      0|        CK_FLAGS ckFlags = slot->ckFlags;
  138|      0|        PZ_Unlock(slot->isPresentLock);
  ------------------
  |  |  246|      0|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  139|      0|        return ((ckFlags & CKF_TOKEN_PRESENT) != 0);
  ------------------
  |  |  131|      0|#define CKF_TOKEN_PRESENT 0x00000001UL    /* a token is there */
  ------------------
  140|      0|    }
  141|      0|    PZ_Unlock(slot->isPresentLock);
  ------------------
  |  |  246|      0|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  142|       |
  143|       |    /* First obtain the slot epv before we set up the condition
  144|       |     * variable, so we can just return if we couldn't get it. */
  145|      0|    epv = slot->epv;
  146|      0|    if (!epv) {
  ------------------
  |  Branch (146:9): [True: 0, False: 0]
  ------------------
  147|      0|        return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  148|      0|    }
  149|       |
  150|       |    /* set up condition so only one thread is active in this part of the code at a time */
  151|      0|    PZ_Lock(slot->isPresentLock);
  ------------------
  |  |  245|      0|#define PZ_Lock(k) PR_Lock((k))
  ------------------
  152|      0|    while (slot->isPresentThread) {
  ------------------
  |  Branch (152:12): [True: 0, False: 0]
  ------------------
  153|      0|        PR_WaitCondVar(slot->isPresentCondition, PR_INTERVAL_NO_TIMEOUT);
  ------------------
  |  |   54|      0|#define PR_INTERVAL_NO_TIMEOUT 0xffffffffUL
  ------------------
  154|      0|    }
  155|       |    /* if we were one of multiple threads here, the first thread will have
  156|       |     * given us the answer, no need to make more queries of the token. */
  157|      0|    if (token_status_checked(slot)) {
  ------------------
  |  Branch (157:9): [True: 0, False: 0]
  ------------------
  158|      0|        CK_FLAGS ckFlags = slot->ckFlags;
  159|      0|        PZ_Unlock(slot->isPresentLock);
  ------------------
  |  |  246|      0|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  160|      0|        return ((ckFlags & CKF_TOKEN_PRESENT) != 0);
  ------------------
  |  |  131|      0|#define CKF_TOKEN_PRESENT 0x00000001UL    /* a token is there */
  ------------------
  161|      0|    }
  162|       |    /* this is the winning thread, block all others until we've determined
  163|       |     * if the token is present and that it needs initialization. */
  164|      0|    slot->lastTokenPingState = nssSlotLastPingState_Update;
  165|      0|    slot->isPresentThread = PR_GetCurrentThread();
  166|       |
  167|      0|    PZ_Unlock(slot->isPresentLock);
  ------------------
  |  |  246|      0|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  168|       |
  169|      0|    nssToken = PK11Slot_GetNSSToken(slot->pk11slot);
  170|      0|    if (!nssToken) {
  ------------------
  |  Branch (170:9): [True: 0, False: 0]
  ------------------
  171|      0|        isPresent = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  172|      0|        goto done;
  173|      0|    }
  174|       |
  175|      0|    if (PK11_GetSlotInfo(slot->pk11slot, &slotInfo) != SECSuccess) {
  ------------------
  |  Branch (175:9): [True: 0, False: 0]
  ------------------
  176|      0|        nssToken->base.name[0] = 0; /* XXX */
  177|      0|        isPresent = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  178|      0|        goto done;
  179|      0|    }
  180|      0|    slot->ckFlags = slotInfo.flags;
  181|       |    /* check for the presence of the token */
  182|      0|    if ((slot->ckFlags & CKF_TOKEN_PRESENT) == 0) {
  ------------------
  |  |  131|      0|#define CKF_TOKEN_PRESENT 0x00000001UL    /* a token is there */
  ------------------
  |  Branch (182:9): [True: 0, False: 0]
  ------------------
  183|      0|        session = nssToken_GetDefaultSession(nssToken);
  184|      0|        if (session) {
  ------------------
  |  Branch (184:13): [True: 0, False: 0]
  ------------------
  185|      0|            nssSession_EnterMonitor(session);
  186|       |            /* token is not present */
  187|      0|            if (session->handle != CK_INVALID_HANDLE) {
  ------------------
  |  |   78|      0|#define CK_INVALID_HANDLE 0
  ------------------
  |  Branch (187:17): [True: 0, False: 0]
  ------------------
  188|       |                /* session is valid, close and invalidate it */
  189|      0|                CKAPI(epv)
  ------------------
  |  |   24|      0|    ((CK_FUNCTION_LIST_PTR)(epv))
  ------------------
  190|      0|                    ->C_CloseSession(session->handle);
  191|      0|                session->handle = CK_INVALID_HANDLE;
  ------------------
  |  |   78|      0|#define CK_INVALID_HANDLE 0
  ------------------
  192|      0|            }
  193|      0|            nssSession_ExitMonitor(session);
  194|      0|        }
  195|      0|        if (nssToken->base.name[0] != 0) {
  ------------------
  |  Branch (195:13): [True: 0, False: 0]
  ------------------
  196|       |            /* notify the high-level cache that the token is removed */
  197|      0|            nssToken->base.name[0] = 0; /* XXX */
  198|      0|            nssToken_NotifyCertsNotVisible(nssToken);
  199|      0|        }
  200|      0|        nssToken->base.name[0] = 0; /* XXX */
  201|       |        /* clear the token cache */
  202|      0|        nssToken_Remove(nssToken);
  203|      0|        isPresent = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  204|      0|        goto done;
  205|      0|    }
  206|       |    /* token is present, use the session info to determine if the card
  207|       |     * has been removed and reinserted.
  208|       |     */
  209|      0|    session = nssToken_GetDefaultSession(nssToken);
  210|      0|    if (session) {
  ------------------
  |  Branch (210:9): [True: 0, False: 0]
  ------------------
  211|      0|        PRBool tokenRemoved;
  212|      0|        nssSession_EnterMonitor(session);
  213|      0|        if (session->handle != CK_INVALID_HANDLE) {
  ------------------
  |  |   78|      0|#define CK_INVALID_HANDLE 0
  ------------------
  |  Branch (213:13): [True: 0, False: 0]
  ------------------
  214|      0|            CK_SESSION_INFO sessionInfo;
  215|      0|            ckrv = CKAPI(epv)->C_GetSessionInfo(session->handle, &sessionInfo);
  ------------------
  |  |   24|      0|    ((CK_FUNCTION_LIST_PTR)(epv))
  ------------------
  216|      0|            if (ckrv != CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (216:17): [True: 0, False: 0]
  ------------------
  217|       |                /* session is screwy, close and invalidate it */
  218|      0|                CKAPI(epv)
  ------------------
  |  |   24|      0|    ((CK_FUNCTION_LIST_PTR)(epv))
  ------------------
  219|      0|                    ->C_CloseSession(session->handle);
  220|      0|                session->handle = CK_INVALID_HANDLE;
  ------------------
  |  |   78|      0|#define CK_INVALID_HANDLE 0
  ------------------
  221|      0|            }
  222|      0|        }
  223|      0|        tokenRemoved = (session->handle == CK_INVALID_HANDLE);
  ------------------
  |  |   78|      0|#define CK_INVALID_HANDLE 0
  ------------------
  224|      0|        nssSession_ExitMonitor(session);
  225|       |        /* token not removed, finished */
  226|      0|        if (!tokenRemoved) {
  ------------------
  |  Branch (226:13): [True: 0, False: 0]
  ------------------
  227|      0|            isPresent = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  228|      0|            goto done;
  229|      0|        }
  230|      0|    }
  231|       |    /* the token has been removed, and reinserted, or the slot contains
  232|       |     * a token it doesn't recognize. invalidate all the old
  233|       |     * information we had on this token, if we can't refresh, clear
  234|       |     * the present flag */
  235|      0|    nssToken_NotifyCertsNotVisible(nssToken);
  236|      0|    nssToken_Remove(nssToken);
  237|      0|    if (nssToken->base.name[0] == 0) {
  ------------------
  |  Branch (237:9): [True: 0, False: 0]
  ------------------
  238|      0|        doUpdateCachedCerts = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  239|      0|    }
  240|      0|    if (PK11_InitToken(slot->pk11slot, PR_FALSE) != SECSuccess) {
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  |  Branch (240:9): [True: 0, False: 0]
  ------------------
  241|      0|        isPresent = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  242|      0|        goto done;
  243|      0|    }
  244|      0|    if (doUpdateCachedCerts) {
  ------------------
  |  Branch (244:9): [True: 0, False: 0]
  ------------------
  245|      0|        nssTrustDomain_UpdateCachedTokenCerts(nssToken->trustDomain,
  246|      0|                                              nssToken);
  247|      0|    }
  248|      0|    nssrv = nssToken_Refresh(nssToken);
  249|      0|    if (nssrv != PR_SUCCESS) {
  ------------------
  |  Branch (249:9): [True: 0, False: 0]
  ------------------
  250|      0|        nssToken->base.name[0] = 0; /* XXX */
  251|      0|        slot->ckFlags &= ~CKF_TOKEN_PRESENT;
  ------------------
  |  |  131|      0|#define CKF_TOKEN_PRESENT 0x00000001UL    /* a token is there */
  ------------------
  252|      0|        isPresent = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  253|      0|        goto done;
  254|      0|    }
  255|      0|    isPresent = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  256|      0|done:
  257|      0|    if (nssToken) {
  ------------------
  |  Branch (257:9): [True: 0, False: 0]
  ------------------
  258|      0|        (void)nssToken_Destroy(nssToken);
  259|      0|    }
  260|       |    /* Once we've set up the condition variable,
  261|       |     * Before returning, it's necessary to:
  262|       |     *  1) Set the lastTokenPingTime so that any other threads waiting on this
  263|       |     *     initialization and any future calls within the initialization window
  264|       |     *     return the just-computed status.
  265|       |     *  2) Indicate we're complete, waking up all other threads that may still
  266|       |     *     be waiting on initialization can progress.
  267|       |     */
  268|      0|    PZ_Lock(slot->isPresentLock);
  ------------------
  |  |  245|      0|#define PZ_Lock(k) PR_Lock((k))
  ------------------
  269|       |    /* don't update the time if we were reset while we were
  270|       |     * getting the token state */
  271|      0|    if (slot->lastTokenPingState == nssSlotLastPingState_Update) {
  ------------------
  |  Branch (271:9): [True: 0, False: 0]
  ------------------
  272|      0|        slot->lastTokenPingTime = PR_IntervalNow();
  273|      0|        slot->lastTokenPingState = nssSlotLastPingState_Valid;
  274|      0|    }
  275|      0|    slot->isPresentThread = NULL;
  276|      0|    PR_NotifyAllCondVar(slot->isPresentCondition);
  277|      0|    PZ_Unlock(slot->isPresentLock);
  ------------------
  |  |  246|      0|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  278|      0|    return isPresent;
  279|      0|}
nssSlot_GetCryptokiEPV:
  284|  30.6k|{
  285|  30.6k|    return slot->epv;
  286|  30.6k|}
nssSlot_GetToken:
  291|  30.6k|{
  292|  30.6k|    NSSToken *rvToken = NULL;
  293|       |
  294|  30.6k|    if (nssSlot_IsTokenPresent(slot)) {
  ------------------
  |  Branch (294:9): [True: 30.6k, False: 0]
  ------------------
  295|  30.6k|        rvToken = PK11Slot_GetNSSToken(slot->pk11slot);
  296|  30.6k|    }
  297|       |
  298|  30.6k|    return rvToken;
  299|  30.6k|}
nssSession_EnterMonitor:
  304|  30.6k|{
  305|  30.6k|    if (s->lock)
  ------------------
  |  Branch (305:9): [True: 30.6k, False: 0]
  ------------------
  306|  30.6k|        PZ_Lock(s->lock);
  ------------------
  |  |  245|  30.6k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
  307|  30.6k|    return PR_SUCCESS;
  308|  30.6k|}
nssSession_ExitMonitor:
  313|  30.6k|{
  314|  30.6k|    return (s->lock) ? PZ_Unlock(s->lock) : PR_SUCCESS;
  ------------------
  |  |  246|  30.6k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  |  Branch (314:12): [True: 30.6k, False: 0]
  ------------------
  315|  30.6k|}

nssToken_Destroy:
   29|  30.6k|{
   30|  30.6k|    if (tok) {
  ------------------
  |  Branch (30:9): [True: 30.6k, False: 4]
  ------------------
   31|  30.6k|        if (PR_ATOMIC_DECREMENT(&tok->base.refCount) == 0) {
  ------------------
  |  |  123|  30.6k|#define PR_ATOMIC_DECREMENT(val) __sync_sub_and_fetch(val, 1)
  ------------------
  |  Branch (31:13): [True: 2, False: 30.6k]
  ------------------
   32|      2|            PK11_FreeSlot(tok->pk11slot);
   33|      2|            PZ_DestroyLock(tok->base.lock);
  ------------------
  |  |  244|      2|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
   34|      2|            nssTokenObjectCache_Destroy(tok->cache);
   35|      2|            (void)nssSlot_Destroy(tok->slot);
   36|      2|            return nssArena_Destroy(tok->base.arena);
   37|      2|        }
   38|  30.6k|    }
   39|  30.6k|    return PR_SUCCESS;
   40|  30.6k|}
nssToken_AddRef:
   52|  30.6k|{
   53|  30.6k|    PR_ATOMIC_INCREMENT(&tok->base.refCount);
  ------------------
  |  |  122|  30.6k|#define PR_ATOMIC_INCREMENT(val) __sync_add_and_fetch(val, 1)
  ------------------
   54|  30.6k|    return tok;
   55|  30.6k|}
nssToken_GetSlot:
   60|  30.6k|{
   61|  30.6k|    return nssSlot_AddRef(tok->slot);
   62|  30.6k|}
nssToken_GetCryptokiEPV:
   67|  30.6k|{
   68|  30.6k|    return nssSlot_GetCryptokiEPV(token->slot);
   69|  30.6k|}
nssToken_GetDefaultSession:
   74|  10.2k|{
   75|  10.2k|    return token->defaultSession;
   76|  10.2k|}
nssToken_FindObjectsByTemplate:
  372|  30.6k|{
  373|  30.6k|    CK_OBJECT_CLASS objclass = (CK_OBJECT_CLASS)-1;
  374|  30.6k|    nssCryptokiObject **objects = NULL;
  375|  30.6k|    PRUint32 i;
  376|       |
  377|  30.6k|    if (!token) {
  ------------------
  |  Branch (377:9): [True: 0, False: 30.6k]
  ------------------
  378|      0|        PORT_SetError(SEC_ERROR_NO_TOKEN);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  379|      0|        if (statusOpt)
  ------------------
  |  Branch (379:13): [True: 0, False: 0]
  ------------------
  380|      0|            *statusOpt = PR_FAILURE;
  381|      0|        return NULL;
  382|      0|    }
  383|  61.2k|    for (i = 0; i < otsize; i++) {
  ------------------
  |  Branch (383:17): [True: 61.2k, False: 0]
  ------------------
  384|  61.2k|        if (obj_template[i].type == CKA_CLASS) {
  ------------------
  |  |  511|  61.2k|#define CKA_CLASS 0x00000000UL
  ------------------
  |  Branch (384:13): [True: 30.6k, False: 30.6k]
  ------------------
  385|  30.6k|            objclass = *(CK_OBJECT_CLASS *)obj_template[i].pValue;
  386|  30.6k|            break;
  387|  30.6k|        }
  388|  61.2k|    }
  389|  30.6k|    PR_ASSERT(i < otsize);
  ------------------
  |  |  208|  30.6k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 30.6k, False: 0]
  |  |  ------------------
  ------------------
  390|  30.6k|    if (i == otsize) {
  ------------------
  |  Branch (390:9): [True: 0, False: 30.6k]
  ------------------
  391|      0|        PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  392|      0|        if (statusOpt)
  ------------------
  |  Branch (392:13): [True: 0, False: 0]
  ------------------
  393|      0|            *statusOpt = PR_FAILURE;
  394|      0|        return NULL;
  395|      0|    }
  396|       |    /* If these objects are being cached, try looking there first */
  397|  30.6k|    if (token->cache &&
  ------------------
  |  Branch (397:9): [True: 0, False: 30.6k]
  ------------------
  398|  30.6k|        nssTokenObjectCache_HaveObjectClass(token->cache, objclass)) {
  ------------------
  |  Branch (398:9): [True: 0, False: 0]
  ------------------
  399|      0|        PRStatus status;
  400|      0|        objects = nssTokenObjectCache_FindObjectsByTemplate(token->cache,
  401|      0|                                                            objclass,
  402|      0|                                                            obj_template,
  403|      0|                                                            otsize,
  404|      0|                                                            maximumOpt,
  405|      0|                                                            &status);
  406|      0|        if (status == PR_SUCCESS) {
  ------------------
  |  Branch (406:13): [True: 0, False: 0]
  ------------------
  407|      0|            if (statusOpt)
  ------------------
  |  Branch (407:17): [True: 0, False: 0]
  ------------------
  408|      0|                *statusOpt = status;
  409|      0|            return objects;
  410|      0|        }
  411|      0|    }
  412|       |    /* Either they are not cached, or cache failed; look on token. */
  413|  30.6k|    objects = find_objects(token, sessionOpt,
  414|  30.6k|                           obj_template, otsize,
  415|  30.6k|                           maximumOpt, statusOpt);
  416|  30.6k|    return objects;
  417|  30.6k|}
nssToken_FindCertificateByIssuerAndSerialNumber:
  744|  10.2k|{
  745|  10.2k|    CK_ATTRIBUTE_PTR attr;
  746|  10.2k|    CK_ATTRIBUTE cert_template[4];
  747|  10.2k|    CK_ULONG ctsize;
  748|  10.2k|    nssCryptokiObject **objects;
  749|  10.2k|    nssCryptokiObject *rvObject = NULL;
  750|  10.2k|    NSS_CK_TEMPLATE_START(cert_template, attr, ctsize);
  ------------------
  |  |   30|  10.2k|    attr = _template;                                \
  |  |   31|  10.2k|    size = 0;
  ------------------
  751|       |
  752|  10.2k|    if (!token) {
  ------------------
  |  Branch (752:9): [True: 0, False: 10.2k]
  ------------------
  753|      0|        PORT_SetError(SEC_ERROR_NO_TOKEN);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  754|      0|        if (statusOpt)
  ------------------
  |  Branch (754:13): [True: 0, False: 0]
  ------------------
  755|      0|            *statusOpt = PR_FAILURE;
  756|      0|        return NULL;
  757|      0|    }
  758|       |    /* Set the search to token/session only if provided */
  759|  10.2k|    if (searchType == nssTokenSearchType_SessionOnly) {
  ------------------
  |  Branch (759:9): [True: 0, False: 10.2k]
  ------------------
  760|      0|        NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_TOKEN, &g_ck_false);
  ------------------
  |  |   34|      0|    (pattr)->type = kind;                            \
  |  |   35|      0|    (pattr)->pValue = (CK_VOID_PTR)(item)->data;     \
  |  |   36|      0|    (pattr)->ulValueLen = (CK_ULONG)(item)->size;    \
  |  |   37|      0|    (pattr)++;
  ------------------
  761|  10.2k|    } else if ((searchType == nssTokenSearchType_TokenOnly) ||
  ------------------
  |  Branch (761:16): [True: 10.2k, False: 0]
  ------------------
  762|  10.2k|               (searchType == nssTokenSearchType_TokenForced)) {
  ------------------
  |  Branch (762:16): [True: 0, False: 0]
  ------------------
  763|  10.2k|        NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_TOKEN, &g_ck_true);
  ------------------
  |  |   34|  10.2k|    (pattr)->type = kind;                            \
  |  |   35|  10.2k|    (pattr)->pValue = (CK_VOID_PTR)(item)->data;     \
  |  |   36|  10.2k|    (pattr)->ulValueLen = (CK_ULONG)(item)->size;    \
  |  |   37|  10.2k|    (pattr)++;
  ------------------
  764|  10.2k|    }
  765|       |    /* Set the unique id */
  766|  10.2k|    NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_CLASS, &g_ck_class_cert);
  ------------------
  |  |   34|  10.2k|    (pattr)->type = kind;                            \
  |  |   35|  10.2k|    (pattr)->pValue = (CK_VOID_PTR)(item)->data;     \
  |  |   36|  10.2k|    (pattr)->ulValueLen = (CK_ULONG)(item)->size;    \
  |  |   37|  10.2k|    (pattr)++;
  ------------------
  767|  10.2k|    NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_ISSUER, issuer);
  ------------------
  |  |   34|  10.2k|    (pattr)->type = kind;                            \
  |  |   35|  10.2k|    (pattr)->pValue = (CK_VOID_PTR)(item)->data;     \
  |  |   36|  10.2k|    (pattr)->ulValueLen = (CK_ULONG)(item)->size;    \
  |  |   37|  10.2k|    (pattr)++;
  ------------------
  768|  10.2k|    NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_SERIAL_NUMBER, serial);
  ------------------
  |  |   34|  10.2k|    (pattr)->type = kind;                            \
  |  |   35|  10.2k|    (pattr)->pValue = (CK_VOID_PTR)(item)->data;     \
  |  |   36|  10.2k|    (pattr)->ulValueLen = (CK_ULONG)(item)->size;    \
  |  |   37|  10.2k|    (pattr)++;
  ------------------
  769|  10.2k|    NSS_CK_TEMPLATE_FINISH(cert_template, attr, ctsize);
  ------------------
  |  |   60|  10.2k|    size = (attr) - (_template);                      \
  |  |   61|  10.2k|    PR_ASSERT(size <= sizeof(_template) / sizeof(_template[0]));
  |  |  ------------------
  |  |  |  |  208|  10.2k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 10.2k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  770|       |    /* get the object handle */
  771|  10.2k|    if (searchType == nssTokenSearchType_TokenForced) {
  ------------------
  |  Branch (771:9): [True: 0, False: 10.2k]
  ------------------
  772|      0|        objects = find_objects(token, sessionOpt,
  773|      0|                               cert_template, ctsize,
  774|      0|                               1, statusOpt);
  775|  10.2k|    } else {
  776|  10.2k|        objects = nssToken_FindObjectsByTemplate(token, sessionOpt,
  777|  10.2k|                                                 cert_template, ctsize,
  778|  10.2k|                                                 1, statusOpt);
  779|  10.2k|    }
  780|  10.2k|    if (objects) {
  ------------------
  |  Branch (780:9): [True: 0, False: 10.2k]
  ------------------
  781|      0|        rvObject = objects[0];
  782|      0|        nss_ZFreeIf(objects);
  783|      0|    }
  784|       |
  785|  10.2k|    return rvObject;
  786|  10.2k|}
nssToken_FindTrustForCertificate:
 1037|  20.3k|{
 1038|  20.3k|    CK_OBJECT_CLASS tobjc = CKO_NSS_TRUST;
  ------------------
  |  |   37|  20.3k|#define CKO_NSS_TRUST (CKO_NSS + 3)
  |  |  ------------------
  |  |  |  |   33|  20.3k|#define CKO_NSS (CKO_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|  20.3k|#define CKO_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKO_NSS (CKO_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  20.3k|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1039|  20.3k|    CK_ATTRIBUTE_PTR attr;
 1040|  20.3k|    CK_ATTRIBUTE tobj_template[5];
 1041|  20.3k|    CK_ULONG tobj_size;
 1042|  20.3k|    nssSession *session = sessionOpt ? sessionOpt : token->defaultSession;
  ------------------
  |  Branch (1042:27): [True: 0, False: 20.3k]
  ------------------
 1043|  20.3k|    nssCryptokiObject *object = NULL, **objects;
 1044|       |
 1045|       |    /* Don't ask the module to use an invalid session handle. */
 1046|  20.3k|    if (!session || session->handle == CK_INVALID_HANDLE) {
  ------------------
  |  |   78|  20.3k|#define CK_INVALID_HANDLE 0
  ------------------
  |  Branch (1046:9): [True: 0, False: 20.3k]
  |  Branch (1046:21): [True: 0, False: 20.3k]
  ------------------
 1047|      0|        PORT_SetError(SEC_ERROR_NO_TOKEN);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1048|      0|        return object;
 1049|      0|    }
 1050|       |
 1051|  20.3k|    NSS_CK_TEMPLATE_START(tobj_template, attr, tobj_size);
  ------------------
  |  |   30|  20.3k|    attr = _template;                                \
  |  |   31|  20.3k|    size = 0;
  ------------------
 1052|  20.3k|    if (searchType == nssTokenSearchType_TokenOnly) {
  ------------------
  |  Branch (1052:9): [True: 20.3k, False: 0]
  ------------------
 1053|  20.3k|        NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_TOKEN, &g_ck_true);
  ------------------
  |  |   34|  20.3k|    (pattr)->type = kind;                            \
  |  |   35|  20.3k|    (pattr)->pValue = (CK_VOID_PTR)(item)->data;     \
  |  |   36|  20.3k|    (pattr)->ulValueLen = (CK_ULONG)(item)->size;    \
  |  |   37|  20.3k|    (pattr)++;
  ------------------
 1054|  20.3k|    }
 1055|  20.3k|    NSS_CK_SET_ATTRIBUTE_VAR(attr, CKA_CLASS, tobjc);
  ------------------
  |  |   48|  20.3k|    (pattr)->type = kind;                          \
  |  |   49|  20.3k|    (pattr)->pValue = (CK_VOID_PTR)&var;           \
  |  |   50|  20.3k|    (pattr)->ulValueLen = (CK_ULONG)sizeof(var);   \
  |  |   51|  20.3k|    (pattr)++;
  ------------------
 1056|  20.3k|    NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_ISSUER, certIssuer);
  ------------------
  |  |   34|  20.3k|    (pattr)->type = kind;                            \
  |  |   35|  20.3k|    (pattr)->pValue = (CK_VOID_PTR)(item)->data;     \
  |  |   36|  20.3k|    (pattr)->ulValueLen = (CK_ULONG)(item)->size;    \
  |  |   37|  20.3k|    (pattr)++;
  ------------------
 1057|  20.3k|    NSS_CK_SET_ATTRIBUTE_ITEM(attr, CKA_SERIAL_NUMBER, certSerial);
  ------------------
  |  |   34|  20.3k|    (pattr)->type = kind;                            \
  |  |   35|  20.3k|    (pattr)->pValue = (CK_VOID_PTR)(item)->data;     \
  |  |   36|  20.3k|    (pattr)->ulValueLen = (CK_ULONG)(item)->size;    \
  |  |   37|  20.3k|    (pattr)++;
  ------------------
 1058|  20.3k|    NSS_CK_TEMPLATE_FINISH(tobj_template, attr, tobj_size);
  ------------------
  |  |   60|  20.3k|    size = (attr) - (_template);                      \
  |  |   61|  20.3k|    PR_ASSERT(size <= sizeof(_template) / sizeof(_template[0]));
  |  |  ------------------
  |  |  |  |  208|  20.3k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 20.3k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1059|  20.3k|    objects = nssToken_FindObjectsByTemplate(token, session,
 1060|  20.3k|                                             tobj_template, tobj_size,
 1061|  20.3k|                                             1, NULL);
 1062|  20.3k|    if (objects) {
  ------------------
  |  Branch (1062:9): [True: 0, False: 20.3k]
  ------------------
 1063|      0|        object = objects[0];
 1064|      0|        nss_ZFreeIf(objects);
 1065|      0|    }
 1066|  20.3k|    return object;
 1067|  20.3k|}
devtoken.c:find_objects:
  240|  30.6k|{
  241|  30.6k|    CK_RV ckrv = CKR_OK;
  ------------------
  |  | 1388|  30.6k|#define CKR_OK 0x00000000UL
  ------------------
  242|  30.6k|    CK_ULONG count;
  243|  30.6k|    CK_OBJECT_HANDLE *objectHandles = NULL;
  244|  30.6k|    CK_OBJECT_HANDLE staticObjects[OBJECT_STACK_SIZE];
  245|  30.6k|    PRUint32 arraySize, numHandles;
  246|  30.6k|    void *epv = nssToken_GetCryptokiEPV(tok);
  247|  30.6k|    nssCryptokiObject **objects;
  248|  30.6k|    nssSession *session = (sessionOpt) ? sessionOpt : tok->defaultSession;
  ------------------
  |  Branch (248:27): [True: 30.6k, False: 0]
  ------------------
  249|       |
  250|       |    /* Don't ask the module to use an invalid session handle. */
  251|  30.6k|    if (!session || session->handle == CK_INVALID_HANDLE) {
  ------------------
  |  |   78|  30.6k|#define CK_INVALID_HANDLE 0
  ------------------
  |  Branch (251:9): [True: 0, False: 30.6k]
  |  Branch (251:21): [True: 0, False: 30.6k]
  ------------------
  252|      0|        ckrv = CKR_SESSION_HANDLE_INVALID;
  ------------------
  |  | 1465|      0|#define CKR_SESSION_HANDLE_INVALID 0x000000B3UL
  ------------------
  253|      0|        goto loser;
  254|      0|    }
  255|       |
  256|       |    /* the arena is only for the array of object handles */
  257|  30.6k|    if (maximumOpt > 0) {
  ------------------
  |  Branch (257:9): [True: 30.6k, False: 0]
  ------------------
  258|  30.6k|        arraySize = maximumOpt;
  259|  30.6k|    } else {
  260|      0|        arraySize = OBJECT_STACK_SIZE;
  ------------------
  |  |   24|      0|#define OBJECT_STACK_SIZE 16
  ------------------
  261|      0|    }
  262|  30.6k|    numHandles = 0;
  263|  30.6k|    if (arraySize <= OBJECT_STACK_SIZE) {
  ------------------
  |  |   24|  30.6k|#define OBJECT_STACK_SIZE 16
  ------------------
  |  Branch (263:9): [True: 30.6k, False: 0]
  ------------------
  264|  30.6k|        objectHandles = staticObjects;
  265|  30.6k|    } else {
  266|      0|        objectHandles = nss_ZNEWARRAY(NULL, CK_OBJECT_HANDLE, arraySize);
  ------------------
  |  |  371|      0|    ((type *)nss_ZAlloc((arenaOpt), sizeof(type) * (quantity)))
  ------------------
  267|      0|    }
  268|  30.6k|    if (!objectHandles) {
  ------------------
  |  Branch (268:9): [True: 0, False: 30.6k]
  ------------------
  269|      0|        ckrv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
  270|      0|        goto loser;
  271|      0|    }
  272|  30.6k|    nssSession_EnterMonitor(session); /* ==== session lock === */
  273|       |    /* Initialize the find with the template */
  274|  30.6k|    ckrv = CKAPI(epv)->C_FindObjectsInit(session->handle,
  ------------------
  |  |   24|  30.6k|    ((CK_FUNCTION_LIST_PTR)(epv))
  ------------------
  275|  30.6k|                                         obj_template, otsize);
  276|  30.6k|    if (ckrv != CKR_OK) {
  ------------------
  |  | 1388|  30.6k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (276:9): [True: 0, False: 30.6k]
  ------------------
  277|      0|        nssSession_ExitMonitor(session);
  278|      0|        goto loser;
  279|      0|    }
  280|  30.6k|    while (PR_TRUE) {
  ------------------
  |  |  437|  30.6k|#define PR_TRUE 1
  |  |  ------------------
  |  |  |  Branch (437:17): [Folded - Ignored]
  |  |  ------------------
  ------------------
  281|       |        /* Issue the find for up to arraySize - numHandles objects */
  282|  30.6k|        ckrv = CKAPI(epv)->C_FindObjects(session->handle,
  ------------------
  |  |   24|  30.6k|    ((CK_FUNCTION_LIST_PTR)(epv))
  ------------------
  283|  30.6k|                                         objectHandles + numHandles,
  284|  30.6k|                                         arraySize - numHandles,
  285|  30.6k|                                         &count);
  286|  30.6k|        if (ckrv != CKR_OK) {
  ------------------
  |  | 1388|  30.6k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (286:13): [True: 0, False: 30.6k]
  ------------------
  287|      0|            nssSession_ExitMonitor(session);
  288|      0|            goto loser;
  289|      0|        }
  290|       |        /* bump the number of found objects */
  291|  30.6k|        numHandles += count;
  292|  30.6k|        if (maximumOpt > 0 || numHandles < arraySize) {
  ------------------
  |  Branch (292:13): [True: 30.6k, False: 0]
  |  Branch (292:31): [True: 0, False: 0]
  ------------------
  293|       |            /* When a maximum is provided, the search is done all at once,
  294|       |             * so the search is finished.  If the number returned was less
  295|       |             * than the number sought, the search is finished.
  296|       |             */
  297|  30.6k|            break;
  298|  30.6k|        }
  299|       |        /* the array is filled, double it and continue */
  300|      0|        arraySize *= 2;
  301|      0|        if (objectHandles == staticObjects) {
  ------------------
  |  Branch (301:13): [True: 0, False: 0]
  ------------------
  302|      0|            objectHandles = nss_ZNEWARRAY(NULL, CK_OBJECT_HANDLE, arraySize);
  ------------------
  |  |  371|      0|    ((type *)nss_ZAlloc((arenaOpt), sizeof(type) * (quantity)))
  ------------------
  303|      0|            if (objectHandles) {
  ------------------
  |  Branch (303:17): [True: 0, False: 0]
  ------------------
  304|      0|                PORT_Memcpy(objectHandles, staticObjects,
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
  305|      0|                            OBJECT_STACK_SIZE * sizeof(objectHandles[1]));
  ------------------
  |  |   24|      0|#define OBJECT_STACK_SIZE 16
  ------------------
  306|      0|            }
  307|      0|        } else {
  308|      0|            objectHandles = nss_ZREALLOCARRAY(objectHandles,
  ------------------
  |  |  391|      0|    ((type *)nss_ZRealloc((p), sizeof(type) * (quantity)))
  ------------------
  309|      0|                                              CK_OBJECT_HANDLE,
  310|      0|                                              arraySize);
  311|      0|        }
  312|      0|        if (!objectHandles) {
  ------------------
  |  Branch (312:13): [True: 0, False: 0]
  ------------------
  313|      0|            nssSession_ExitMonitor(session);
  314|      0|            ckrv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
  315|      0|            goto loser;
  316|      0|        }
  317|      0|    }
  318|  30.6k|    ckrv = CKAPI(epv)->C_FindObjectsFinal(session->handle);
  ------------------
  |  |   24|  30.6k|    ((CK_FUNCTION_LIST_PTR)(epv))
  ------------------
  319|  30.6k|    nssSession_ExitMonitor(session); /* ==== end session lock === */
  320|  30.6k|    if (ckrv != CKR_OK) {
  ------------------
  |  | 1388|  30.6k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (320:9): [True: 0, False: 30.6k]
  ------------------
  321|      0|        goto loser;
  322|      0|    }
  323|  30.6k|    if (numHandles > 0) {
  ------------------
  |  Branch (323:9): [True: 0, False: 30.6k]
  ------------------
  324|      0|        objects = create_objects_from_handles(tok, session,
  325|      0|                                              objectHandles, numHandles);
  326|  30.6k|    } else {
  327|  30.6k|        nss_SetError(NSS_ERROR_NOT_FOUND);
  328|  30.6k|        objects = NULL;
  329|  30.6k|    }
  330|  30.6k|    if (objectHandles && objectHandles != staticObjects) {
  ------------------
  |  Branch (330:9): [True: 30.6k, False: 0]
  |  Branch (330:26): [True: 0, False: 30.6k]
  ------------------
  331|      0|        nss_ZFreeIf(objectHandles);
  332|      0|    }
  333|  30.6k|    if (statusOpt)
  ------------------
  |  Branch (333:9): [True: 10.2k, False: 20.3k]
  ------------------
  334|  10.2k|        *statusOpt = PR_SUCCESS;
  335|  30.6k|    return objects;
  336|      0|loser:
  337|      0|    if (objectHandles && objectHandles != staticObjects) {
  ------------------
  |  Branch (337:9): [True: 0, False: 0]
  |  Branch (337:26): [True: 0, False: 0]
  ------------------
  338|      0|        nss_ZFreeIf(objectHandles);
  339|      0|    }
  340|       |    /*
  341|       |     * These errors should be treated the same as if the objects just weren't
  342|       |     * found..
  343|       |     */
  344|      0|    if ((ckrv == CKR_ATTRIBUTE_TYPE_INVALID) ||
  ------------------
  |  | 1408|      0|#define CKR_ATTRIBUTE_TYPE_INVALID 0x00000012UL
  ------------------
  |  Branch (344:9): [True: 0, False: 0]
  ------------------
  345|      0|        (ckrv == CKR_ATTRIBUTE_VALUE_INVALID) ||
  ------------------
  |  | 1409|      0|#define CKR_ATTRIBUTE_VALUE_INVALID 0x00000013UL
  ------------------
  |  Branch (345:9): [True: 0, False: 0]
  ------------------
  346|      0|        (ckrv == CKR_DATA_INVALID) ||
  ------------------
  |  | 1414|      0|#define CKR_DATA_INVALID 0x00000020UL
  ------------------
  |  Branch (346:9): [True: 0, False: 0]
  ------------------
  347|      0|        (ckrv == CKR_DATA_LEN_RANGE) ||
  ------------------
  |  | 1415|      0|#define CKR_DATA_LEN_RANGE 0x00000021UL
  ------------------
  |  Branch (347:9): [True: 0, False: 0]
  ------------------
  348|      0|        (ckrv == CKR_FUNCTION_NOT_SUPPORTED) ||
  ------------------
  |  | 1426|      0|#define CKR_FUNCTION_NOT_SUPPORTED 0x00000054UL
  ------------------
  |  Branch (348:9): [True: 0, False: 0]
  ------------------
  349|      0|        (ckrv == CKR_TEMPLATE_INCOMPLETE) ||
  ------------------
  |  | 1477|      0|#define CKR_TEMPLATE_INCOMPLETE 0x000000D0UL
  ------------------
  |  Branch (349:9): [True: 0, False: 0]
  ------------------
  350|      0|        (ckrv == CKR_TEMPLATE_INCONSISTENT)) {
  ------------------
  |  | 1478|      0|#define CKR_TEMPLATE_INCONSISTENT 0x000000D1UL
  ------------------
  |  Branch (350:9): [True: 0, False: 0]
  ------------------
  351|       |
  352|      0|        nss_SetError(NSS_ERROR_NOT_FOUND);
  353|      0|        if (statusOpt)
  ------------------
  |  Branch (353:13): [True: 0, False: 0]
  ------------------
  354|      0|            *statusOpt = PR_SUCCESS;
  355|      0|    } else {
  356|      0|        nss_SetError(ckrv);
  357|      0|        nss_SetError(NSS_ERROR_PKCS11);
  358|      0|        if (statusOpt)
  ------------------
  |  Branch (358:13): [True: 0, False: 0]
  ------------------
  359|      0|            *statusOpt = PR_FAILURE;
  360|      0|    }
  361|      0|    return (nssCryptokiObject **)NULL;
  362|  30.6k|}

nssSlotArray_Destroy:
  129|  15.3k|{
  130|  15.3k|    if (slots) {
  ------------------
  |  Branch (130:9): [True: 15.3k, False: 0]
  ------------------
  131|  15.3k|        NSSSlot **slotp;
  132|  45.9k|        for (slotp = slots; *slotp; slotp++) {
  ------------------
  |  Branch (132:29): [True: 30.6k, False: 15.3k]
  ------------------
  133|  30.6k|            nssSlot_Destroy(*slotp);
  134|  30.6k|        }
  135|  15.3k|        nss_ZFreeIf(slots);
  136|  15.3k|    }
  137|  15.3k|}
nssTokenObjectCache_Destroy:
  259|      2|{
  260|      2|    if (cache) {
  ------------------
  |  Branch (260:9): [True: 0, False: 2]
  ------------------
  261|      0|        clear_cache(cache);
  262|      0|        if (cache->lock) {
  ------------------
  |  Branch (262:13): [True: 0, False: 0]
  ------------------
  263|      0|            PZ_DestroyLock(cache->lock);
  ------------------
  |  |  244|      0|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
  264|      0|        }
  265|      0|        nss_ZFreeIf(cache);
  266|      0|    }
  267|      2|}

rijndael_native_key_expansion:
  127|  7.93k|{
  128|  7.93k|    switch (Nk) {
  129|  3.53k|        case 4:
  ------------------
  |  Branch (129:9): [True: 3.53k, False: 4.39k]
  ------------------
  130|  3.53k|            native_key_expansion128(cx, key);
  131|  3.53k|            return;
  132|      0|        case 6:
  ------------------
  |  Branch (132:9): [True: 0, False: 7.93k]
  ------------------
  133|      0|            native_key_expansion192(cx, key);
  134|      0|            return;
  135|  4.39k|        case 8:
  ------------------
  |  Branch (135:9): [True: 4.39k, False: 3.53k]
  ------------------
  136|  4.39k|            native_key_expansion256(cx, key);
  137|  4.39k|            return;
  138|      0|        default:
  ------------------
  |  Branch (138:9): [True: 0, False: 7.93k]
  ------------------
  139|       |            /* This shouldn't happen (checked by the caller). */
  140|      0|            return;
  141|  7.93k|    }
  142|  7.93k|}
rijndael_native_encryptBlock:
  148|  15.7k|{
  149|  15.7k|    unsigned int i;
  150|  15.7k|    pre_align __m128i m post_align = _mm_loadu_si128((__m128i *)input);
  151|  15.7k|    m = _mm_xor_si128(m, cx->k.keySchedule[0]);
  152|   196k|    for (i = 1; i < cx->Nr; ++i) {
  ------------------
  |  Branch (152:17): [True: 180k, False: 15.7k]
  ------------------
  153|   180k|        m = _mm_aesenc_si128(m, cx->k.keySchedule[i]);
  154|   180k|    }
  155|  15.7k|    m = _mm_aesenclast_si128(m, cx->k.keySchedule[cx->Nr]);
  156|  15.7k|    _mm_storeu_si128((__m128i *)output, m);
  157|  15.7k|}
rijndael_native_decryptBlock:
  163|  15.2k|{
  164|  15.2k|    int i;
  165|  15.2k|    pre_align __m128i m post_align = _mm_loadu_si128((__m128i *)input);
  166|  15.2k|    m = _mm_xor_si128(m, cx->k.keySchedule[cx->Nr]);
  167|   196k|    for (i = cx->Nr - 1; i > 0; --i) {
  ------------------
  |  Branch (167:26): [True: 181k, False: 15.2k]
  ------------------
  168|   181k|        m = _mm_aesdec_si128(m, cx->k.keySchedule[i]);
  169|   181k|    }
  170|  15.2k|    m = _mm_aesdeclast_si128(m, cx->k.keySchedule[0]);
  171|  15.2k|    _mm_storeu_si128((__m128i *)output, m);
  172|  15.2k|}
native_xorBlock:
  179|  16.2k|{
  180|  16.2k|    pre_align __m128i post_align in1 = _mm_loadu_si128((__m128i *)(a));
  181|  16.2k|    pre_align __m128i post_align in2 = _mm_loadu_si128((__m128i *)(b));
  182|  16.2k|    in1 = _mm_xor_si128(in1, in2);
  183|  16.2k|    _mm_storeu_si128((__m128i *)(out), in1);
  184|  16.2k|}
aes-x86.c:native_key_expansion128:
   23|  3.53k|{
   24|  3.53k|    __m128i *keySchedule = cx->k.keySchedule;
   25|  3.53k|    pre_align __m128i tmp_key post_align;
   26|  3.53k|    pre_align __m128i tmp post_align;
   27|  3.53k|    keySchedule[0] = _mm_loadu_si128((__m128i *)key);
   28|  3.53k|    EXPAND_KEY128(keySchedule[0], 0x01, keySchedule[1]);
  ------------------
  |  |   14|  3.53k|    tmp_key = _mm_aeskeygenassist_si128(k, rcon);     \
  |  |   15|  3.53k|    tmp_key = _mm_shuffle_epi32(tmp_key, 0xFF);       \
  |  |   16|  3.53k|    tmp = _mm_xor_si128(k, _mm_slli_si128(k, 4));     \
  |  |   17|  3.53k|    tmp = _mm_xor_si128(tmp, _mm_slli_si128(tmp, 4)); \
  |  |   18|  3.53k|    tmp = _mm_xor_si128(tmp, _mm_slli_si128(tmp, 4)); \
  |  |   19|  3.53k|    res = _mm_xor_si128(tmp, tmp_key)
  ------------------
   29|  3.53k|    EXPAND_KEY128(keySchedule[1], 0x02, keySchedule[2]);
  ------------------
  |  |   14|  3.53k|    tmp_key = _mm_aeskeygenassist_si128(k, rcon);     \
  |  |   15|  3.53k|    tmp_key = _mm_shuffle_epi32(tmp_key, 0xFF);       \
  |  |   16|  3.53k|    tmp = _mm_xor_si128(k, _mm_slli_si128(k, 4));     \
  |  |   17|  3.53k|    tmp = _mm_xor_si128(tmp, _mm_slli_si128(tmp, 4)); \
  |  |   18|  3.53k|    tmp = _mm_xor_si128(tmp, _mm_slli_si128(tmp, 4)); \
  |  |   19|  3.53k|    res = _mm_xor_si128(tmp, tmp_key)
  ------------------
   30|  3.53k|    EXPAND_KEY128(keySchedule[2], 0x04, keySchedule[3]);
  ------------------
  |  |   14|  3.53k|    tmp_key = _mm_aeskeygenassist_si128(k, rcon);     \
  |  |   15|  3.53k|    tmp_key = _mm_shuffle_epi32(tmp_key, 0xFF);       \
  |  |   16|  3.53k|    tmp = _mm_xor_si128(k, _mm_slli_si128(k, 4));     \
  |  |   17|  3.53k|    tmp = _mm_xor_si128(tmp, _mm_slli_si128(tmp, 4)); \
  |  |   18|  3.53k|    tmp = _mm_xor_si128(tmp, _mm_slli_si128(tmp, 4)); \
  |  |   19|  3.53k|    res = _mm_xor_si128(tmp, tmp_key)
  ------------------
   31|  3.53k|    EXPAND_KEY128(keySchedule[3], 0x08, keySchedule[4]);
  ------------------
  |  |   14|  3.53k|    tmp_key = _mm_aeskeygenassist_si128(k, rcon);     \
  |  |   15|  3.53k|    tmp_key = _mm_shuffle_epi32(tmp_key, 0xFF);       \
  |  |   16|  3.53k|    tmp = _mm_xor_si128(k, _mm_slli_si128(k, 4));     \
  |  |   17|  3.53k|    tmp = _mm_xor_si128(tmp, _mm_slli_si128(tmp, 4)); \
  |  |   18|  3.53k|    tmp = _mm_xor_si128(tmp, _mm_slli_si128(tmp, 4)); \
  |  |   19|  3.53k|    res = _mm_xor_si128(tmp, tmp_key)
  ------------------
   32|  3.53k|    EXPAND_KEY128(keySchedule[4], 0x10, keySchedule[5]);
  ------------------
  |  |   14|  3.53k|    tmp_key = _mm_aeskeygenassist_si128(k, rcon);     \
  |  |   15|  3.53k|    tmp_key = _mm_shuffle_epi32(tmp_key, 0xFF);       \
  |  |   16|  3.53k|    tmp = _mm_xor_si128(k, _mm_slli_si128(k, 4));     \
  |  |   17|  3.53k|    tmp = _mm_xor_si128(tmp, _mm_slli_si128(tmp, 4)); \
  |  |   18|  3.53k|    tmp = _mm_xor_si128(tmp, _mm_slli_si128(tmp, 4)); \
  |  |   19|  3.53k|    res = _mm_xor_si128(tmp, tmp_key)
  ------------------
   33|  3.53k|    EXPAND_KEY128(keySchedule[5], 0x20, keySchedule[6]);
  ------------------
  |  |   14|  3.53k|    tmp_key = _mm_aeskeygenassist_si128(k, rcon);     \
  |  |   15|  3.53k|    tmp_key = _mm_shuffle_epi32(tmp_key, 0xFF);       \
  |  |   16|  3.53k|    tmp = _mm_xor_si128(k, _mm_slli_si128(k, 4));     \
  |  |   17|  3.53k|    tmp = _mm_xor_si128(tmp, _mm_slli_si128(tmp, 4)); \
  |  |   18|  3.53k|    tmp = _mm_xor_si128(tmp, _mm_slli_si128(tmp, 4)); \
  |  |   19|  3.53k|    res = _mm_xor_si128(tmp, tmp_key)
  ------------------
   34|  3.53k|    EXPAND_KEY128(keySchedule[6], 0x40, keySchedule[7]);
  ------------------
  |  |   14|  3.53k|    tmp_key = _mm_aeskeygenassist_si128(k, rcon);     \
  |  |   15|  3.53k|    tmp_key = _mm_shuffle_epi32(tmp_key, 0xFF);       \
  |  |   16|  3.53k|    tmp = _mm_xor_si128(k, _mm_slli_si128(k, 4));     \
  |  |   17|  3.53k|    tmp = _mm_xor_si128(tmp, _mm_slli_si128(tmp, 4)); \
  |  |   18|  3.53k|    tmp = _mm_xor_si128(tmp, _mm_slli_si128(tmp, 4)); \
  |  |   19|  3.53k|    res = _mm_xor_si128(tmp, tmp_key)
  ------------------
   35|  3.53k|    EXPAND_KEY128(keySchedule[7], 0x80, keySchedule[8]);
  ------------------
  |  |   14|  3.53k|    tmp_key = _mm_aeskeygenassist_si128(k, rcon);     \
  |  |   15|  3.53k|    tmp_key = _mm_shuffle_epi32(tmp_key, 0xFF);       \
  |  |   16|  3.53k|    tmp = _mm_xor_si128(k, _mm_slli_si128(k, 4));     \
  |  |   17|  3.53k|    tmp = _mm_xor_si128(tmp, _mm_slli_si128(tmp, 4)); \
  |  |   18|  3.53k|    tmp = _mm_xor_si128(tmp, _mm_slli_si128(tmp, 4)); \
  |  |   19|  3.53k|    res = _mm_xor_si128(tmp, tmp_key)
  ------------------
   36|  3.53k|    EXPAND_KEY128(keySchedule[8], 0x1B, keySchedule[9]);
  ------------------
  |  |   14|  3.53k|    tmp_key = _mm_aeskeygenassist_si128(k, rcon);     \
  |  |   15|  3.53k|    tmp_key = _mm_shuffle_epi32(tmp_key, 0xFF);       \
  |  |   16|  3.53k|    tmp = _mm_xor_si128(k, _mm_slli_si128(k, 4));     \
  |  |   17|  3.53k|    tmp = _mm_xor_si128(tmp, _mm_slli_si128(tmp, 4)); \
  |  |   18|  3.53k|    tmp = _mm_xor_si128(tmp, _mm_slli_si128(tmp, 4)); \
  |  |   19|  3.53k|    res = _mm_xor_si128(tmp, tmp_key)
  ------------------
   37|  3.53k|    EXPAND_KEY128(keySchedule[9], 0x36, keySchedule[10]);
  ------------------
  |  |   14|  3.53k|    tmp_key = _mm_aeskeygenassist_si128(k, rcon);     \
  |  |   15|  3.53k|    tmp_key = _mm_shuffle_epi32(tmp_key, 0xFF);       \
  |  |   16|  3.53k|    tmp = _mm_xor_si128(k, _mm_slli_si128(k, 4));     \
  |  |   17|  3.53k|    tmp = _mm_xor_si128(tmp, _mm_slli_si128(tmp, 4)); \
  |  |   18|  3.53k|    tmp = _mm_xor_si128(tmp, _mm_slli_si128(tmp, 4)); \
  |  |   19|  3.53k|    res = _mm_xor_si128(tmp, tmp_key)
  ------------------
   38|  3.53k|}
aes-x86.c:native_key_expansion256:
   98|  4.39k|{
   99|  4.39k|    __m128i *keySchedule = cx->k.keySchedule;
  100|  4.39k|    pre_align __m128i tmp_key post_align;
  101|  4.39k|    pre_align __m128i tmp1 post_align;
  102|  4.39k|    pre_align __m128i tmp2 post_align;
  103|  4.39k|    keySchedule[0] = _mm_loadu_si128((__m128i *)key);
  104|  4.39k|    keySchedule[1] = _mm_loadu_si128((__m128i *)(key + 16));
  105|  4.39k|    EXPAND_KEY256(keySchedule[2], keySchedule[3], keySchedule[0],
  ------------------
  |  |   93|  4.39k|    EXPAND_KEY256_PART(res1, rcon, k1, k2, 0xFF); \
  |  |  ------------------
  |  |  |  |   85|  4.39k|    tmp_key = _mm_shuffle_epi32(_mm_aeskeygenassist_si128(k2x, rconx), X);    \
  |  |  |  |   86|  4.39k|    tmp2 = _mm_slli_si128(k1x, 4);                                            \
  |  |  |  |   87|  4.39k|    tmp1 = _mm_xor_si128(k1x, tmp2);                                          \
  |  |  |  |   88|  4.39k|    tmp2 = _mm_slli_si128(tmp2, 4);                                           \
  |  |  |  |   89|  4.39k|    tmp1 = _mm_xor_si128(_mm_xor_si128(tmp1, tmp2), _mm_slli_si128(tmp2, 4)); \
  |  |  |  |   90|  4.39k|    res = _mm_xor_si128(tmp1, tmp_key);
  |  |  ------------------
  |  |   94|  4.39k|    EXPAND_KEY256_PART(res2, 0x00, k2, res1, 0xAA)
  |  |  ------------------
  |  |  |  |   85|  4.39k|    tmp_key = _mm_shuffle_epi32(_mm_aeskeygenassist_si128(k2x, rconx), X);    \
  |  |  |  |   86|  4.39k|    tmp2 = _mm_slli_si128(k1x, 4);                                            \
  |  |  |  |   87|  4.39k|    tmp1 = _mm_xor_si128(k1x, tmp2);                                          \
  |  |  |  |   88|  4.39k|    tmp2 = _mm_slli_si128(tmp2, 4);                                           \
  |  |  |  |   89|  4.39k|    tmp1 = _mm_xor_si128(_mm_xor_si128(tmp1, tmp2), _mm_slli_si128(tmp2, 4)); \
  |  |  |  |   90|  4.39k|    res = _mm_xor_si128(tmp1, tmp_key);
  |  |  ------------------
  ------------------
  106|  4.39k|                  keySchedule[1], 0x01);
  107|  4.39k|    EXPAND_KEY256(keySchedule[4], keySchedule[5], keySchedule[2],
  ------------------
  |  |   93|  4.39k|    EXPAND_KEY256_PART(res1, rcon, k1, k2, 0xFF); \
  |  |  ------------------
  |  |  |  |   85|  4.39k|    tmp_key = _mm_shuffle_epi32(_mm_aeskeygenassist_si128(k2x, rconx), X);    \
  |  |  |  |   86|  4.39k|    tmp2 = _mm_slli_si128(k1x, 4);                                            \
  |  |  |  |   87|  4.39k|    tmp1 = _mm_xor_si128(k1x, tmp2);                                          \
  |  |  |  |   88|  4.39k|    tmp2 = _mm_slli_si128(tmp2, 4);                                           \
  |  |  |  |   89|  4.39k|    tmp1 = _mm_xor_si128(_mm_xor_si128(tmp1, tmp2), _mm_slli_si128(tmp2, 4)); \
  |  |  |  |   90|  4.39k|    res = _mm_xor_si128(tmp1, tmp_key);
  |  |  ------------------
  |  |   94|  4.39k|    EXPAND_KEY256_PART(res2, 0x00, k2, res1, 0xAA)
  |  |  ------------------
  |  |  |  |   85|  4.39k|    tmp_key = _mm_shuffle_epi32(_mm_aeskeygenassist_si128(k2x, rconx), X);    \
  |  |  |  |   86|  4.39k|    tmp2 = _mm_slli_si128(k1x, 4);                                            \
  |  |  |  |   87|  4.39k|    tmp1 = _mm_xor_si128(k1x, tmp2);                                          \
  |  |  |  |   88|  4.39k|    tmp2 = _mm_slli_si128(tmp2, 4);                                           \
  |  |  |  |   89|  4.39k|    tmp1 = _mm_xor_si128(_mm_xor_si128(tmp1, tmp2), _mm_slli_si128(tmp2, 4)); \
  |  |  |  |   90|  4.39k|    res = _mm_xor_si128(tmp1, tmp_key);
  |  |  ------------------
  ------------------
  108|  4.39k|                  keySchedule[3], 0x02);
  109|  4.39k|    EXPAND_KEY256(keySchedule[6], keySchedule[7], keySchedule[4],
  ------------------
  |  |   93|  4.39k|    EXPAND_KEY256_PART(res1, rcon, k1, k2, 0xFF); \
  |  |  ------------------
  |  |  |  |   85|  4.39k|    tmp_key = _mm_shuffle_epi32(_mm_aeskeygenassist_si128(k2x, rconx), X);    \
  |  |  |  |   86|  4.39k|    tmp2 = _mm_slli_si128(k1x, 4);                                            \
  |  |  |  |   87|  4.39k|    tmp1 = _mm_xor_si128(k1x, tmp2);                                          \
  |  |  |  |   88|  4.39k|    tmp2 = _mm_slli_si128(tmp2, 4);                                           \
  |  |  |  |   89|  4.39k|    tmp1 = _mm_xor_si128(_mm_xor_si128(tmp1, tmp2), _mm_slli_si128(tmp2, 4)); \
  |  |  |  |   90|  4.39k|    res = _mm_xor_si128(tmp1, tmp_key);
  |  |  ------------------
  |  |   94|  4.39k|    EXPAND_KEY256_PART(res2, 0x00, k2, res1, 0xAA)
  |  |  ------------------
  |  |  |  |   85|  4.39k|    tmp_key = _mm_shuffle_epi32(_mm_aeskeygenassist_si128(k2x, rconx), X);    \
  |  |  |  |   86|  4.39k|    tmp2 = _mm_slli_si128(k1x, 4);                                            \
  |  |  |  |   87|  4.39k|    tmp1 = _mm_xor_si128(k1x, tmp2);                                          \
  |  |  |  |   88|  4.39k|    tmp2 = _mm_slli_si128(tmp2, 4);                                           \
  |  |  |  |   89|  4.39k|    tmp1 = _mm_xor_si128(_mm_xor_si128(tmp1, tmp2), _mm_slli_si128(tmp2, 4)); \
  |  |  |  |   90|  4.39k|    res = _mm_xor_si128(tmp1, tmp_key);
  |  |  ------------------
  ------------------
  110|  4.39k|                  keySchedule[5], 0x04);
  111|  4.39k|    EXPAND_KEY256(keySchedule[8], keySchedule[9], keySchedule[6],
  ------------------
  |  |   93|  4.39k|    EXPAND_KEY256_PART(res1, rcon, k1, k2, 0xFF); \
  |  |  ------------------
  |  |  |  |   85|  4.39k|    tmp_key = _mm_shuffle_epi32(_mm_aeskeygenassist_si128(k2x, rconx), X);    \
  |  |  |  |   86|  4.39k|    tmp2 = _mm_slli_si128(k1x, 4);                                            \
  |  |  |  |   87|  4.39k|    tmp1 = _mm_xor_si128(k1x, tmp2);                                          \
  |  |  |  |   88|  4.39k|    tmp2 = _mm_slli_si128(tmp2, 4);                                           \
  |  |  |  |   89|  4.39k|    tmp1 = _mm_xor_si128(_mm_xor_si128(tmp1, tmp2), _mm_slli_si128(tmp2, 4)); \
  |  |  |  |   90|  4.39k|    res = _mm_xor_si128(tmp1, tmp_key);
  |  |  ------------------
  |  |   94|  4.39k|    EXPAND_KEY256_PART(res2, 0x00, k2, res1, 0xAA)
  |  |  ------------------
  |  |  |  |   85|  4.39k|    tmp_key = _mm_shuffle_epi32(_mm_aeskeygenassist_si128(k2x, rconx), X);    \
  |  |  |  |   86|  4.39k|    tmp2 = _mm_slli_si128(k1x, 4);                                            \
  |  |  |  |   87|  4.39k|    tmp1 = _mm_xor_si128(k1x, tmp2);                                          \
  |  |  |  |   88|  4.39k|    tmp2 = _mm_slli_si128(tmp2, 4);                                           \
  |  |  |  |   89|  4.39k|    tmp1 = _mm_xor_si128(_mm_xor_si128(tmp1, tmp2), _mm_slli_si128(tmp2, 4)); \
  |  |  |  |   90|  4.39k|    res = _mm_xor_si128(tmp1, tmp_key);
  |  |  ------------------
  ------------------
  112|  4.39k|                  keySchedule[7], 0x08);
  113|  4.39k|    EXPAND_KEY256(keySchedule[10], keySchedule[11], keySchedule[8],
  ------------------
  |  |   93|  4.39k|    EXPAND_KEY256_PART(res1, rcon, k1, k2, 0xFF); \
  |  |  ------------------
  |  |  |  |   85|  4.39k|    tmp_key = _mm_shuffle_epi32(_mm_aeskeygenassist_si128(k2x, rconx), X);    \
  |  |  |  |   86|  4.39k|    tmp2 = _mm_slli_si128(k1x, 4);                                            \
  |  |  |  |   87|  4.39k|    tmp1 = _mm_xor_si128(k1x, tmp2);                                          \
  |  |  |  |   88|  4.39k|    tmp2 = _mm_slli_si128(tmp2, 4);                                           \
  |  |  |  |   89|  4.39k|    tmp1 = _mm_xor_si128(_mm_xor_si128(tmp1, tmp2), _mm_slli_si128(tmp2, 4)); \
  |  |  |  |   90|  4.39k|    res = _mm_xor_si128(tmp1, tmp_key);
  |  |  ------------------
  |  |   94|  4.39k|    EXPAND_KEY256_PART(res2, 0x00, k2, res1, 0xAA)
  |  |  ------------------
  |  |  |  |   85|  4.39k|    tmp_key = _mm_shuffle_epi32(_mm_aeskeygenassist_si128(k2x, rconx), X);    \
  |  |  |  |   86|  4.39k|    tmp2 = _mm_slli_si128(k1x, 4);                                            \
  |  |  |  |   87|  4.39k|    tmp1 = _mm_xor_si128(k1x, tmp2);                                          \
  |  |  |  |   88|  4.39k|    tmp2 = _mm_slli_si128(tmp2, 4);                                           \
  |  |  |  |   89|  4.39k|    tmp1 = _mm_xor_si128(_mm_xor_si128(tmp1, tmp2), _mm_slli_si128(tmp2, 4)); \
  |  |  |  |   90|  4.39k|    res = _mm_xor_si128(tmp1, tmp_key);
  |  |  ------------------
  ------------------
  114|  4.39k|                  keySchedule[9], 0x10);
  115|  4.39k|    EXPAND_KEY256(keySchedule[12], keySchedule[13], keySchedule[10],
  ------------------
  |  |   93|  4.39k|    EXPAND_KEY256_PART(res1, rcon, k1, k2, 0xFF); \
  |  |  ------------------
  |  |  |  |   85|  4.39k|    tmp_key = _mm_shuffle_epi32(_mm_aeskeygenassist_si128(k2x, rconx), X);    \
  |  |  |  |   86|  4.39k|    tmp2 = _mm_slli_si128(k1x, 4);                                            \
  |  |  |  |   87|  4.39k|    tmp1 = _mm_xor_si128(k1x, tmp2);                                          \
  |  |  |  |   88|  4.39k|    tmp2 = _mm_slli_si128(tmp2, 4);                                           \
  |  |  |  |   89|  4.39k|    tmp1 = _mm_xor_si128(_mm_xor_si128(tmp1, tmp2), _mm_slli_si128(tmp2, 4)); \
  |  |  |  |   90|  4.39k|    res = _mm_xor_si128(tmp1, tmp_key);
  |  |  ------------------
  |  |   94|  4.39k|    EXPAND_KEY256_PART(res2, 0x00, k2, res1, 0xAA)
  |  |  ------------------
  |  |  |  |   85|  4.39k|    tmp_key = _mm_shuffle_epi32(_mm_aeskeygenassist_si128(k2x, rconx), X);    \
  |  |  |  |   86|  4.39k|    tmp2 = _mm_slli_si128(k1x, 4);                                            \
  |  |  |  |   87|  4.39k|    tmp1 = _mm_xor_si128(k1x, tmp2);                                          \
  |  |  |  |   88|  4.39k|    tmp2 = _mm_slli_si128(tmp2, 4);                                           \
  |  |  |  |   89|  4.39k|    tmp1 = _mm_xor_si128(_mm_xor_si128(tmp1, tmp2), _mm_slli_si128(tmp2, 4)); \
  |  |  |  |   90|  4.39k|    res = _mm_xor_si128(tmp1, tmp_key);
  |  |  ------------------
  ------------------
  116|  4.39k|                  keySchedule[11], 0x20);
  117|  4.39k|    EXPAND_KEY256_PART(keySchedule[14], 0x40, keySchedule[12],
  ------------------
  |  |   85|  4.39k|    tmp_key = _mm_shuffle_epi32(_mm_aeskeygenassist_si128(k2x, rconx), X);    \
  |  |   86|  4.39k|    tmp2 = _mm_slli_si128(k1x, 4);                                            \
  |  |   87|  4.39k|    tmp1 = _mm_xor_si128(k1x, tmp2);                                          \
  |  |   88|  4.39k|    tmp2 = _mm_slli_si128(tmp2, 4);                                           \
  |  |   89|  4.39k|    tmp1 = _mm_xor_si128(_mm_xor_si128(tmp1, tmp2), _mm_slli_si128(tmp2, 4)); \
  |  |   90|  4.39k|    res = _mm_xor_si128(tmp1, tmp_key);
  ------------------
  118|  4.39k|                       keySchedule[13], 0xFF);
  119|  4.39k|}

HMAC_Destroy:
   27|  76.8k|{
   28|  76.8k|    if (cx == NULL)
  ------------------
  |  Branch (28:9): [True: 0, False: 76.8k]
  ------------------
   29|      0|        return;
   30|       |
   31|  76.8k|    PORT_Assert(!freeit == !cx->wasAllocated);
  ------------------
  |  |  120|  76.8k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  76.8k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 76.8k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   32|  76.8k|    if (cx->hash != NULL) {
  ------------------
  |  Branch (32:9): [True: 76.8k, False: 0]
  ------------------
   33|  76.8k|        cx->hashobj->destroy(cx->hash, PR_TRUE);
  ------------------
  |  |  437|  76.8k|#define PR_TRUE 1
  ------------------
   34|  76.8k|        PORT_Memset(cx, 0, sizeof *cx);
  ------------------
  |  |  182|  76.8k|#define PORT_Memset memset
  ------------------
   35|  76.8k|    }
   36|  76.8k|    if (freeit)
  ------------------
  |  Branch (36:9): [True: 76.8k, False: 0]
  ------------------
   37|  76.8k|        PORT_Free(cx);
  ------------------
  |  |   60|  76.8k|#define PORT_Free PORT_Free_Util
  ------------------
   38|  76.8k|}
HMAC_Init:
   85|  76.8k|{
   86|  76.8k|    SECStatus rv;
   87|       |
   88|  76.8k|    if (cx == NULL) {
  ------------------
  |  Branch (88:9): [True: 0, False: 76.8k]
  ------------------
   89|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
   90|      0|        return SECFailure;
   91|      0|    }
   92|  76.8k|    cx->wasAllocated = PR_FALSE;
  ------------------
  |  |  438|  76.8k|#define PR_FALSE 0
  ------------------
   93|  76.8k|    cx->hashobj = hash_obj;
   94|  76.8k|    cx->hash = cx->hashobj->create();
   95|  76.8k|    if (cx->hash == NULL)
  ------------------
  |  Branch (95:9): [True: 0, False: 76.8k]
  ------------------
   96|      0|        goto loser;
   97|       |
   98|  76.8k|    rv = hmac_initKey(cx, secret, secret_len, isFIPS);
   99|  76.8k|    if (rv != SECSuccess)
  ------------------
  |  Branch (99:9): [True: 0, False: 76.8k]
  ------------------
  100|      0|        goto loser;
  101|       |
  102|  76.8k|    return rv;
  103|      0|loser:
  104|      0|    if (cx->hash != NULL)
  ------------------
  |  Branch (104:9): [True: 0, False: 0]
  ------------------
  105|      0|        cx->hashobj->destroy(cx->hash, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  106|      0|    return SECFailure;
  107|  76.8k|}
HMAC_Create:
  112|  76.8k|{
  113|  76.8k|    SECStatus rv;
  114|  76.8k|    HMACContext *cx = PORT_ZNew(HMACContext);
  ------------------
  |  |  148|  76.8k|#define PORT_ZNew(type) (type *)PORT_ZAlloc(sizeof(type))
  |  |  ------------------
  |  |  |  |   72|  76.8k|#define PORT_ZAlloc PORT_ZAlloc_Util
  |  |  ------------------
  ------------------
  115|  76.8k|    if (cx == NULL)
  ------------------
  |  Branch (115:9): [True: 0, False: 76.8k]
  ------------------
  116|      0|        return NULL;
  117|  76.8k|    rv = HMAC_Init(cx, hash_obj, secret, secret_len, isFIPS);
  118|  76.8k|    cx->wasAllocated = PR_TRUE;
  ------------------
  |  |  437|  76.8k|#define PR_TRUE 1
  ------------------
  119|  76.8k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (119:9): [True: 0, False: 76.8k]
  ------------------
  120|      0|        PORT_Free(cx); /* contains no secret info */
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
  121|      0|        cx = NULL;
  122|      0|    }
  123|  76.8k|    return cx;
  124|  76.8k|}
HMAC_Begin:
  156|  97.7k|{
  157|       |    /* start inner hash */
  158|  97.7k|    cx->hashobj->begin(cx->hash);
  159|  97.7k|    cx->hashobj->update(cx->hash, cx->ipad, cx->hashobj->blocklength);
  160|  97.7k|}
HMAC_Update:
  164|   170k|{
  165|   170k|    cx->hashobj->update(cx->hash, data, data_len);
  166|   170k|}
HMAC_Finish:
  171|  96.4k|{
  172|  96.4k|    if (max_result_len < cx->hashobj->length) {
  ------------------
  |  Branch (172:9): [True: 0, False: 96.4k]
  ------------------
  173|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  174|      0|        return SECFailure;
  175|      0|    }
  176|       |
  177|  96.4k|    cx->hashobj->end(cx->hash, result, result_len, max_result_len);
  178|  96.4k|    if (*result_len != cx->hashobj->length)
  ------------------
  |  Branch (178:9): [True: 0, False: 96.4k]
  ------------------
  179|      0|        return SECFailure;
  180|       |
  181|  96.4k|    cx->hashobj->begin(cx->hash);
  182|  96.4k|    cx->hashobj->update(cx->hash, cx->opad, cx->hashobj->blocklength);
  183|  96.4k|    cx->hashobj->update(cx->hash, result, *result_len);
  184|  96.4k|    cx->hashobj->end(cx->hash, result, result_len, max_result_len);
  185|  96.4k|    return SECSuccess;
  186|  96.4k|}
alghmac.c:hmac_initKey:
   43|  76.8k|{
   44|  76.8k|    unsigned int i;
   45|  76.8k|    unsigned char hashed_secret[HASH_LENGTH_MAX];
   46|       |
   47|       |    /* required by FIPS 198 Section 3 */
   48|  76.8k|    if (isFIPS && secret_len < cx->hashobj->length / 2) {
  ------------------
  |  Branch (48:9): [True: 0, False: 76.8k]
  |  Branch (48:19): [True: 0, False: 0]
  ------------------
   49|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
   50|      0|        return SECFailure;
   51|      0|    }
   52|       |
   53|  76.8k|    if (secret_len > cx->hashobj->blocklength) {
  ------------------
  |  Branch (53:9): [True: 3, False: 76.8k]
  ------------------
   54|      3|        cx->hashobj->begin(cx->hash);
   55|      3|        cx->hashobj->update(cx->hash, secret, secret_len);
   56|      3|        PORT_Assert(cx->hashobj->length <= sizeof hashed_secret);
  ------------------
  |  |  120|      3|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      3|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 3, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   57|      3|        cx->hashobj->end(cx->hash, hashed_secret, &secret_len,
   58|      3|                         sizeof hashed_secret);
   59|      3|        if (secret_len != cx->hashobj->length) {
  ------------------
  |  Branch (59:13): [True: 0, False: 3]
  ------------------
   60|      0|            PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
   61|      0|            goto loser;
   62|      0|        }
   63|      3|        secret = (const unsigned char *)&hashed_secret[0];
   64|      3|    }
   65|       |
   66|  76.8k|    PORT_Memset(cx->ipad, 0x36, cx->hashobj->blocklength);
  ------------------
  |  |  182|  76.8k|#define PORT_Memset memset
  ------------------
   67|  76.8k|    PORT_Memset(cx->opad, 0x5c, cx->hashobj->blocklength);
  ------------------
  |  |  182|  76.8k|#define PORT_Memset memset
  ------------------
   68|       |
   69|       |    /* fold secret into padding */
   70|  2.21M|    for (i = 0; i < secret_len; i++) {
  ------------------
  |  Branch (70:17): [True: 2.14M, False: 76.8k]
  ------------------
   71|  2.14M|        cx->ipad[i] ^= secret[i];
   72|  2.14M|        cx->opad[i] ^= secret[i];
   73|  2.14M|    }
   74|  76.8k|    PORT_Memset(hashed_secret, 0, sizeof hashed_secret);
  ------------------
  |  |  182|  76.8k|#define PORT_Memset memset
  ------------------
   75|  76.8k|    return SECSuccess;
   76|       |
   77|      0|loser:
   78|      0|    PORT_Memset(hashed_secret, 0, sizeof hashed_secret);
  ------------------
  |  |  182|      0|#define PORT_Memset memset
  ------------------
   79|      0|    return SECFailure;
   80|  76.8k|}

CheckX86CPUSupport:
  102|      1|{
  103|      1|    unsigned long eax, ebx, ecx, edx;
  104|      1|    unsigned long eax7, ebx7, ecx7, edx7;
  105|      1|    char *disable_hw_aes = PR_GetEnvSecure("NSS_DISABLE_HW_AES");
  106|      1|    char *disable_pclmul = PR_GetEnvSecure("NSS_DISABLE_PCLMUL");
  107|      1|    char *disable_hw_sha = PR_GetEnvSecure("NSS_DISABLE_HW_SHA");
  108|      1|    char *disable_avx = PR_GetEnvSecure("NSS_DISABLE_AVX");
  109|      1|    char *disable_avx2 = PR_GetEnvSecure("NSS_DISABLE_AVX2");
  110|      1|    char *disable_adx = PR_GetEnvSecure("NSS_DISABLE_ADX");
  111|      1|    char *disable_ssse3 = PR_GetEnvSecure("NSS_DISABLE_SSSE3");
  112|      1|    char *disable_sse4_1 = PR_GetEnvSecure("NSS_DISABLE_SSE4_1");
  113|      1|    char *disable_sse4_2 = PR_GetEnvSecure("NSS_DISABLE_SSE4_2");
  114|      1|    freebl_cpuid(1, &eax, &ebx, &ecx, &edx);
  115|      1|    freebl_cpuid(7, &eax7, &ebx7, &ecx7, &edx7);
  116|      1|    aesni_support_ = (PRBool)((ecx & ECX_AESNI) != 0 && disable_hw_aes == NULL);
  ------------------
  |  |   81|      1|#define ECX_AESNI (1 << 25)
  ------------------
  |  Branch (116:31): [True: 1, False: 0]
  |  Branch (116:57): [True: 1, False: 0]
  ------------------
  117|      1|    clmul_support_ = (PRBool)((ecx & ECX_CLMUL) != 0 && disable_pclmul == NULL);
  ------------------
  |  |   82|      1|#define ECX_CLMUL (1 << 1)
  ------------------
  |  Branch (117:31): [True: 1, False: 0]
  |  Branch (117:57): [True: 1, False: 0]
  ------------------
  118|      1|    sha_support_ = (PRBool)((ebx7 & EBX_SHA) != 0 && disable_hw_sha == NULL);
  ------------------
  |  |   90|      1|#define EBX_SHA (1 << 29)
  ------------------
  |  Branch (118:29): [True: 1, False: 0]
  |  Branch (118:54): [True: 1, False: 0]
  ------------------
  119|       |    /* For AVX we ensure that:
  120|       |     *  - The AVX, OSXSAVE, and XSAVE bits of ECX from CPUID(EAX=1) are set, and
  121|       |     *  - the SSE and AVX state bits of XCR0 are set (check_xcr0_ymm).
  122|       |     */
  123|      1|    avx_support_ = (PRBool)((ecx & AVX_BITS) == AVX_BITS) && check_xcr0_ymm() &&
  ------------------
  |  |   96|      1|#define AVX_BITS (ECX_XSAVE | ECX_OSXSAVE | ECX_AVX)
  |  |  ------------------
  |  |  |  |   83|      1|#define ECX_XSAVE (1 << 26)
  |  |  ------------------
  |  |               #define AVX_BITS (ECX_XSAVE | ECX_OSXSAVE | ECX_AVX)
  |  |  ------------------
  |  |  |  |   84|      1|#define ECX_OSXSAVE (1 << 27)
  |  |  ------------------
  |  |               #define AVX_BITS (ECX_XSAVE | ECX_OSXSAVE | ECX_AVX)
  |  |  ------------------
  |  |  |  |   85|      1|#define ECX_AVX (1 << 28)
  |  |  ------------------
  ------------------
                  avx_support_ = (PRBool)((ecx & AVX_BITS) == AVX_BITS) && check_xcr0_ymm() &&
  ------------------
  |  |   96|      1|#define AVX_BITS (ECX_XSAVE | ECX_OSXSAVE | ECX_AVX)
  |  |  ------------------
  |  |  |  |   83|      1|#define ECX_XSAVE (1 << 26)
  |  |  ------------------
  |  |               #define AVX_BITS (ECX_XSAVE | ECX_OSXSAVE | ECX_AVX)
  |  |  ------------------
  |  |  |  |   84|      1|#define ECX_OSXSAVE (1 << 27)
  |  |  ------------------
  |  |               #define AVX_BITS (ECX_XSAVE | ECX_OSXSAVE | ECX_AVX)
  |  |  ------------------
  |  |  |  |   85|      1|#define ECX_AVX (1 << 28)
  |  |  ------------------
  ------------------
  |  Branch (123:20): [True: 1, False: 0]
  |  Branch (123:62): [True: 1, False: 0]
  ------------------
  124|      1|                   disable_avx == NULL;
  ------------------
  |  Branch (124:20): [True: 1, False: 0]
  ------------------
  125|       |    /* For AVX2 we ensure that:
  126|       |     *  - AVX is supported,
  127|       |     *  - the AVX2, BMI1, and BMI2 bits of EBX from CPUID(EAX=7) are set, and
  128|       |     *  - the FMA, and MOVBE bits of ECX from CPUID(EAX=1) are set.
  129|       |     * We do not check for LZCNT support.
  130|       |     */
  131|      1|    avx2_support_ = (PRBool)(avx_support_ == PR_TRUE &&
  ------------------
  |  |  437|      2|#define PR_TRUE 1
  ------------------
  |  Branch (131:30): [True: 1, False: 0]
  ------------------
  132|      1|                             (ebx7 & AVX2_EBX_BITS) == AVX2_EBX_BITS &&
  ------------------
  |  |   97|      1|#define AVX2_EBX_BITS (EBX_AVX2 | EBX_BMI1 | EBX_BMI2)
  |  |  ------------------
  |  |  |  |   86|      1|#define EBX_AVX2 (1 << 5)
  |  |  ------------------
  |  |               #define AVX2_EBX_BITS (EBX_AVX2 | EBX_BMI1 | EBX_BMI2)
  |  |  ------------------
  |  |  |  |   88|      1|#define EBX_BMI1 (1 << 3)
  |  |  ------------------
  |  |               #define AVX2_EBX_BITS (EBX_AVX2 | EBX_BMI1 | EBX_BMI2)
  |  |  ------------------
  |  |  |  |   89|      1|#define EBX_BMI2 (1 << 8)
  |  |  ------------------
  ------------------
                                           (ebx7 & AVX2_EBX_BITS) == AVX2_EBX_BITS &&
  ------------------
  |  |   97|      2|#define AVX2_EBX_BITS (EBX_AVX2 | EBX_BMI1 | EBX_BMI2)
  |  |  ------------------
  |  |  |  |   86|      1|#define EBX_AVX2 (1 << 5)
  |  |  ------------------
  |  |               #define AVX2_EBX_BITS (EBX_AVX2 | EBX_BMI1 | EBX_BMI2)
  |  |  ------------------
  |  |  |  |   88|      1|#define EBX_BMI1 (1 << 3)
  |  |  ------------------
  |  |               #define AVX2_EBX_BITS (EBX_AVX2 | EBX_BMI1 | EBX_BMI2)
  |  |  ------------------
  |  |  |  |   89|      1|#define EBX_BMI2 (1 << 8)
  |  |  ------------------
  ------------------
  |  Branch (132:30): [True: 1, False: 0]
  ------------------
  133|      1|                             (ecx & AVX2_ECX_BITS) == AVX2_ECX_BITS &&
  ------------------
  |  |   98|      1|#define AVX2_ECX_BITS (ECX_FMA | ECX_MOVBE)
  |  |  ------------------
  |  |  |  |   91|      1|#define ECX_FMA (1 << 12)
  |  |  ------------------
  |  |               #define AVX2_ECX_BITS (ECX_FMA | ECX_MOVBE)
  |  |  ------------------
  |  |  |  |   92|      1|#define ECX_MOVBE (1 << 22)
  |  |  ------------------
  ------------------
                                           (ecx & AVX2_ECX_BITS) == AVX2_ECX_BITS &&
  ------------------
  |  |   98|      2|#define AVX2_ECX_BITS (ECX_FMA | ECX_MOVBE)
  |  |  ------------------
  |  |  |  |   91|      1|#define ECX_FMA (1 << 12)
  |  |  ------------------
  |  |               #define AVX2_ECX_BITS (ECX_FMA | ECX_MOVBE)
  |  |  ------------------
  |  |  |  |   92|      1|#define ECX_MOVBE (1 << 22)
  |  |  ------------------
  ------------------
  |  Branch (133:30): [True: 1, False: 0]
  ------------------
  134|      1|                             disable_avx2 == NULL);
  ------------------
  |  Branch (134:30): [True: 1, False: 0]
  ------------------
  135|       |    /* CPUID.(EAX=07H, ECX=0H):EBX.ADX[bit 19]=1 indicates
  136|       |    the processor supports ADCX and ADOX instructions.*/
  137|      1|    adx_support_ = (PRBool)((ebx7 & EBX_ADX) != 0 && disable_adx == NULL);
  ------------------
  |  |   87|      1|#define EBX_ADX (1 << 19)
  ------------------
  |  Branch (137:29): [True: 1, False: 0]
  |  Branch (137:54): [True: 1, False: 0]
  ------------------
  138|      1|    ssse3_support_ = (PRBool)((ecx & ECX_SSSE3) != 0 &&
  ------------------
  |  |   93|      1|#define ECX_SSSE3 (1 << 9)
  ------------------
  |  Branch (138:31): [True: 1, False: 0]
  ------------------
  139|      1|                              disable_ssse3 == NULL);
  ------------------
  |  Branch (139:31): [True: 1, False: 0]
  ------------------
  140|      1|    sse4_1_support_ = (PRBool)((ecx & ECX_SSE4_1) != 0 &&
  ------------------
  |  |   94|      1|#define ECX_SSE4_1 (1 << 19)
  ------------------
  |  Branch (140:32): [True: 1, False: 0]
  ------------------
  141|      1|                               disable_sse4_1 == NULL);
  ------------------
  |  Branch (141:32): [True: 1, False: 0]
  ------------------
  142|      1|    sse4_2_support_ = (PRBool)((ecx & ECX_SSE4_2) != 0 &&
  ------------------
  |  |   95|      1|#define ECX_SSE4_2 (1 << 20)
  ------------------
  |  Branch (142:32): [True: 1, False: 0]
  ------------------
  143|      1|                               disable_sse4_2 == NULL);
  ------------------
  |  Branch (143:32): [True: 1, False: 0]
  ------------------
  144|      1|}
aesni_support:
  440|  26.5k|{
  441|  26.5k|    return aesni_support_;
  442|  26.5k|}
clmul_support:
  445|  1.63k|{
  446|  1.63k|    return clmul_support_;
  447|  1.63k|}
sha_support:
  450|   104k|{
  451|   104k|    return sha_support_;
  452|   104k|}
avx2_support:
  460|  10.1k|{
  461|  10.1k|    return avx2_support_;
  462|  10.1k|}
ssse3_support:
  470|   104k|{
  471|   104k|    return ssse3_support_;
  472|   104k|}
sse4_1_support:
  475|   104k|{
  476|   104k|    return sse4_1_support_;
  477|   104k|}
arm_sha2_support:
  505|   104k|{
  506|   104k|    return arm_sha2_support_;
  507|   104k|}
BL_Init:
  576|      1|{
  577|      1|    if (PR_CallOnce(&coFreeblInit, FreeblInit) != PR_SUCCESS) {
  ------------------
  |  Branch (577:9): [True: 0, False: 1]
  ------------------
  578|      0|        PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  579|      0|        return SECFailure;
  580|      0|    }
  581|      1|    RSA_Init();
  582|       |
  583|      1|    return SECSuccess;
  584|      1|}
blinit.c:check_xcr0_ymm:
   58|      1|{
   59|      1|    PRUint32 xcr0;
   60|       |#if defined(_MSC_VER)
   61|       |#if defined(_M_IX86)
   62|       |    __asm {
   63|       |        mov ecx, 0
   64|       |        xgetbv
   65|       |        mov xcr0, eax
   66|       |    }
   67|       |#else
   68|       |    xcr0 = (PRUint32)_xgetbv(0); /* Requires VS2010 SP1 or later. */
   69|       |#endif /* _M_IX86 */
   70|       |#else  /* _MSC_VER */
   71|       |    /* Old OSX compilers don't support xgetbv. Use byte form. */
   72|      1|    __asm__(".byte 0x0F, 0x01, 0xd0"
   73|      1|            : "=a"(xcr0)
   74|      1|            : "c"(0)
   75|      1|            : "%edx");
   76|      1|#endif /* _MSC_VER */
   77|       |    /* Check if xmm and ymm state are enabled in XCR0. */
   78|      1|    return (xcr0 & 6) == 6;
   79|      1|}
blinit.c:FreeblInit:
  563|      1|{
  564|      1|#ifdef NSS_X86_OR_X64
  565|      1|    CheckX86CPUSupport();
  566|       |#elif (defined(__aarch64__) || defined(__arm__))
  567|       |    CheckARMSupport();
  568|       |#elif (defined(__powerpc__))
  569|       |    CheckPPCSupport();
  570|       |#endif
  571|      1|    return PR_SUCCESS;
  572|      1|}

camellia_setup128:
  435|    148|{
  436|    148|    PRUint32 kll, klr, krl, krr;
  437|    148|    PRUint32 il, ir, t0, t1, w0, w1;
  438|    148|    PRUint32 kw4l, kw4r, dw, tl, tr;
  439|    148|    PRUint32 subL[26];
  440|    148|    PRUint32 subR[26];
  441|       |#if defined(CAMELLIA_NEED_TMP_VARIABLE)
  442|       |    PRUint32 tmp;
  443|       |#endif
  444|       |
  445|       |    /**
  446|       |     *  k == kll || klr || krl || krr (|| is concatination)
  447|       |     */
  448|    148|    kll = GETU32(key);
  ------------------
  |  |   45|    148|#define GETU32(p) SHA_HTONL(*((PRUint32 *)(p)))
  |  |  ------------------
  |  |  |  |   97|    148|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
  449|    148|    klr = GETU32(key + 4);
  ------------------
  |  |   45|    148|#define GETU32(p) SHA_HTONL(*((PRUint32 *)(p)))
  |  |  ------------------
  |  |  |  |   97|    148|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
  450|    148|    krl = GETU32(key + 8);
  ------------------
  |  |   45|    148|#define GETU32(p) SHA_HTONL(*((PRUint32 *)(p)))
  |  |  ------------------
  |  |  |  |   97|    148|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
  451|    148|    krr = GETU32(key + 12);
  ------------------
  |  |   45|    148|#define GETU32(p) SHA_HTONL(*((PRUint32 *)(p)))
  |  |  ------------------
  |  |  |  |   97|    148|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
  452|       |    /**
  453|       |     * generate KL dependent subkeys
  454|       |     */
  455|    148|    subl(0) = kll;
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  456|    148|    subr(0) = klr;
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  457|    148|    subl(1) = krl;
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  458|    148|    subr(1) = krr;
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  459|    148|    CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15);
  ------------------
  |  |   77|    148|    do {                                             \
  |  |   78|    148|        w0 = ll;                                     \
  |  |   79|    148|        ll = (ll << bits) + (lr >> (32 - bits));     \
  |  |   80|    148|        lr = (lr << bits) + (rl >> (32 - bits));     \
  |  |   81|    148|        rl = (rl << bits) + (rr >> (32 - bits));     \
  |  |   82|    148|        rr = (rr << bits) + (w0 >> (32 - bits));     \
  |  |   83|    148|    } while (0)
  |  |  ------------------
  |  |  |  Branch (83:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  460|    148|    subl(4) = kll;
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  461|    148|    subr(4) = klr;
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  462|    148|    subl(5) = krl;
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  463|    148|    subr(5) = krr;
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  464|    148|    CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 30);
  ------------------
  |  |   77|    148|    do {                                             \
  |  |   78|    148|        w0 = ll;                                     \
  |  |   79|    148|        ll = (ll << bits) + (lr >> (32 - bits));     \
  |  |   80|    148|        lr = (lr << bits) + (rl >> (32 - bits));     \
  |  |   81|    148|        rl = (rl << bits) + (rr >> (32 - bits));     \
  |  |   82|    148|        rr = (rr << bits) + (w0 >> (32 - bits));     \
  |  |   83|    148|    } while (0)
  |  |  ------------------
  |  |  |  Branch (83:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  465|    148|    subl(10) = kll;
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  466|    148|    subr(10) = klr;
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  467|    148|    subl(11) = krl;
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  468|    148|    subr(11) = krr;
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  469|    148|    CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15);
  ------------------
  |  |   77|    148|    do {                                             \
  |  |   78|    148|        w0 = ll;                                     \
  |  |   79|    148|        ll = (ll << bits) + (lr >> (32 - bits));     \
  |  |   80|    148|        lr = (lr << bits) + (rl >> (32 - bits));     \
  |  |   81|    148|        rl = (rl << bits) + (rr >> (32 - bits));     \
  |  |   82|    148|        rr = (rr << bits) + (w0 >> (32 - bits));     \
  |  |   83|    148|    } while (0)
  |  |  ------------------
  |  |  |  Branch (83:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  470|    148|    subl(13) = krl;
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  471|    148|    subr(13) = krr;
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  472|    148|    CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 17);
  ------------------
  |  |   77|    148|    do {                                             \
  |  |   78|    148|        w0 = ll;                                     \
  |  |   79|    148|        ll = (ll << bits) + (lr >> (32 - bits));     \
  |  |   80|    148|        lr = (lr << bits) + (rl >> (32 - bits));     \
  |  |   81|    148|        rl = (rl << bits) + (rr >> (32 - bits));     \
  |  |   82|    148|        rr = (rr << bits) + (w0 >> (32 - bits));     \
  |  |   83|    148|    } while (0)
  |  |  ------------------
  |  |  |  Branch (83:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  473|    148|    subl(16) = kll;
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  474|    148|    subr(16) = klr;
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  475|    148|    subl(17) = krl;
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  476|    148|    subr(17) = krr;
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  477|    148|    CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 17);
  ------------------
  |  |   77|    148|    do {                                             \
  |  |   78|    148|        w0 = ll;                                     \
  |  |   79|    148|        ll = (ll << bits) + (lr >> (32 - bits));     \
  |  |   80|    148|        lr = (lr << bits) + (rl >> (32 - bits));     \
  |  |   81|    148|        rl = (rl << bits) + (rr >> (32 - bits));     \
  |  |   82|    148|        rr = (rr << bits) + (w0 >> (32 - bits));     \
  |  |   83|    148|    } while (0)
  |  |  ------------------
  |  |  |  Branch (83:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  478|    148|    subl(18) = kll;
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  479|    148|    subr(18) = klr;
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  480|    148|    subl(19) = krl;
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  481|    148|    subr(19) = krr;
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  482|    148|    CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 17);
  ------------------
  |  |   77|    148|    do {                                             \
  |  |   78|    148|        w0 = ll;                                     \
  |  |   79|    148|        ll = (ll << bits) + (lr >> (32 - bits));     \
  |  |   80|    148|        lr = (lr << bits) + (rl >> (32 - bits));     \
  |  |   81|    148|        rl = (rl << bits) + (rr >> (32 - bits));     \
  |  |   82|    148|        rr = (rr << bits) + (w0 >> (32 - bits));     \
  |  |   83|    148|    } while (0)
  |  |  ------------------
  |  |  |  Branch (83:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  483|    148|    subl(22) = kll;
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  484|    148|    subr(22) = klr;
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  485|    148|    subl(23) = krl;
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  486|    148|    subr(23) = krr;
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  487|       |
  488|       |    /* generate KA */
  489|    148|    kll = subl(0);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  490|    148|    klr = subr(0);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  491|    148|    krl = subl(1);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  492|    148|    krr = subr(1);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  493|    148|    CAMELLIA_F(kll, klr,
  ------------------
  |  |  101|    148|    do {                                                   \
  |  |  102|    148|        il = xl ^ kl;                                      \
  |  |  103|    148|        ir = xr ^ kr;                                      \
  |  |  104|    148|        t0 = il >> 16;                                     \
  |  |  105|    148|        t1 = ir >> 16;                                     \
  |  |  106|    148|        yl = CAMELLIA_SP1110(ir & 0xff) ^                  \
  |  |  ------------------
  |  |  |  |   95|    148|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  107|    148|             CAMELLIA_SP0222((t1 >> 8) & 0xff) ^           \
  |  |  ------------------
  |  |  |  |   96|    148|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  108|    148|             CAMELLIA_SP3033(t1 & 0xff) ^                  \
  |  |  ------------------
  |  |  |  |   97|    148|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  109|    148|             CAMELLIA_SP4404((ir >> 8) & 0xff);            \
  |  |  ------------------
  |  |  |  |   98|    148|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  110|    148|        yr = CAMELLIA_SP1110((t0 >> 8) & 0xff) ^           \
  |  |  ------------------
  |  |  |  |   95|    148|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  111|    148|             CAMELLIA_SP0222(t0 & 0xff) ^                  \
  |  |  ------------------
  |  |  |  |   96|    148|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  112|    148|             CAMELLIA_SP3033((il >> 8) & 0xff) ^           \
  |  |  ------------------
  |  |  |  |   97|    148|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  113|    148|             CAMELLIA_SP4404(il & 0xff);                   \
  |  |  ------------------
  |  |  |  |   98|    148|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  114|    148|        yl ^= yr;                                          \
  |  |  115|    148|        yr = CAMELLIA_RR8(yr);                             \
  |  |  ------------------
  |  |  |  |   70|    148|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  116|    148|        yr ^= yl;                                          \
  |  |  117|    148|    } while (0)
  |  |  ------------------
  |  |  |  Branch (117:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  494|    148|               CAMELLIA_SIGMA1L, CAMELLIA_SIGMA1R,
  495|    148|               w0, w1, il, ir, t0, t1);
  496|    148|    krl ^= w0;
  497|    148|    krr ^= w1;
  498|    148|    CAMELLIA_F(krl, krr,
  ------------------
  |  |  101|    148|    do {                                                   \
  |  |  102|    148|        il = xl ^ kl;                                      \
  |  |  103|    148|        ir = xr ^ kr;                                      \
  |  |  104|    148|        t0 = il >> 16;                                     \
  |  |  105|    148|        t1 = ir >> 16;                                     \
  |  |  106|    148|        yl = CAMELLIA_SP1110(ir & 0xff) ^                  \
  |  |  ------------------
  |  |  |  |   95|    148|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  107|    148|             CAMELLIA_SP0222((t1 >> 8) & 0xff) ^           \
  |  |  ------------------
  |  |  |  |   96|    148|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  108|    148|             CAMELLIA_SP3033(t1 & 0xff) ^                  \
  |  |  ------------------
  |  |  |  |   97|    148|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  109|    148|             CAMELLIA_SP4404((ir >> 8) & 0xff);            \
  |  |  ------------------
  |  |  |  |   98|    148|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  110|    148|        yr = CAMELLIA_SP1110((t0 >> 8) & 0xff) ^           \
  |  |  ------------------
  |  |  |  |   95|    148|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  111|    148|             CAMELLIA_SP0222(t0 & 0xff) ^                  \
  |  |  ------------------
  |  |  |  |   96|    148|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  112|    148|             CAMELLIA_SP3033((il >> 8) & 0xff) ^           \
  |  |  ------------------
  |  |  |  |   97|    148|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  113|    148|             CAMELLIA_SP4404(il & 0xff);                   \
  |  |  ------------------
  |  |  |  |   98|    148|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  114|    148|        yl ^= yr;                                          \
  |  |  115|    148|        yr = CAMELLIA_RR8(yr);                             \
  |  |  ------------------
  |  |  |  |   70|    148|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  116|    148|        yr ^= yl;                                          \
  |  |  117|    148|    } while (0)
  |  |  ------------------
  |  |  |  Branch (117:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  499|    148|               CAMELLIA_SIGMA2L, CAMELLIA_SIGMA2R,
  500|    148|               kll, klr, il, ir, t0, t1);
  501|    148|    CAMELLIA_F(kll, klr,
  ------------------
  |  |  101|    148|    do {                                                   \
  |  |  102|    148|        il = xl ^ kl;                                      \
  |  |  103|    148|        ir = xr ^ kr;                                      \
  |  |  104|    148|        t0 = il >> 16;                                     \
  |  |  105|    148|        t1 = ir >> 16;                                     \
  |  |  106|    148|        yl = CAMELLIA_SP1110(ir & 0xff) ^                  \
  |  |  ------------------
  |  |  |  |   95|    148|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  107|    148|             CAMELLIA_SP0222((t1 >> 8) & 0xff) ^           \
  |  |  ------------------
  |  |  |  |   96|    148|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  108|    148|             CAMELLIA_SP3033(t1 & 0xff) ^                  \
  |  |  ------------------
  |  |  |  |   97|    148|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  109|    148|             CAMELLIA_SP4404((ir >> 8) & 0xff);            \
  |  |  ------------------
  |  |  |  |   98|    148|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  110|    148|        yr = CAMELLIA_SP1110((t0 >> 8) & 0xff) ^           \
  |  |  ------------------
  |  |  |  |   95|    148|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  111|    148|             CAMELLIA_SP0222(t0 & 0xff) ^                  \
  |  |  ------------------
  |  |  |  |   96|    148|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  112|    148|             CAMELLIA_SP3033((il >> 8) & 0xff) ^           \
  |  |  ------------------
  |  |  |  |   97|    148|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  113|    148|             CAMELLIA_SP4404(il & 0xff);                   \
  |  |  ------------------
  |  |  |  |   98|    148|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  114|    148|        yl ^= yr;                                          \
  |  |  115|    148|        yr = CAMELLIA_RR8(yr);                             \
  |  |  ------------------
  |  |  |  |   70|    148|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  116|    148|        yr ^= yl;                                          \
  |  |  117|    148|    } while (0)
  |  |  ------------------
  |  |  |  Branch (117:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  502|    148|               CAMELLIA_SIGMA3L, CAMELLIA_SIGMA3R,
  503|    148|               krl, krr, il, ir, t0, t1);
  504|    148|    krl ^= w0;
  505|    148|    krr ^= w1;
  506|    148|    CAMELLIA_F(krl, krr,
  ------------------
  |  |  101|    148|    do {                                                   \
  |  |  102|    148|        il = xl ^ kl;                                      \
  |  |  103|    148|        ir = xr ^ kr;                                      \
  |  |  104|    148|        t0 = il >> 16;                                     \
  |  |  105|    148|        t1 = ir >> 16;                                     \
  |  |  106|    148|        yl = CAMELLIA_SP1110(ir & 0xff) ^                  \
  |  |  ------------------
  |  |  |  |   95|    148|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  107|    148|             CAMELLIA_SP0222((t1 >> 8) & 0xff) ^           \
  |  |  ------------------
  |  |  |  |   96|    148|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  108|    148|             CAMELLIA_SP3033(t1 & 0xff) ^                  \
  |  |  ------------------
  |  |  |  |   97|    148|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  109|    148|             CAMELLIA_SP4404((ir >> 8) & 0xff);            \
  |  |  ------------------
  |  |  |  |   98|    148|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  110|    148|        yr = CAMELLIA_SP1110((t0 >> 8) & 0xff) ^           \
  |  |  ------------------
  |  |  |  |   95|    148|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  111|    148|             CAMELLIA_SP0222(t0 & 0xff) ^                  \
  |  |  ------------------
  |  |  |  |   96|    148|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  112|    148|             CAMELLIA_SP3033((il >> 8) & 0xff) ^           \
  |  |  ------------------
  |  |  |  |   97|    148|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  113|    148|             CAMELLIA_SP4404(il & 0xff);                   \
  |  |  ------------------
  |  |  |  |   98|    148|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  114|    148|        yl ^= yr;                                          \
  |  |  115|    148|        yr = CAMELLIA_RR8(yr);                             \
  |  |  ------------------
  |  |  |  |   70|    148|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  116|    148|        yr ^= yl;                                          \
  |  |  117|    148|    } while (0)
  |  |  ------------------
  |  |  |  Branch (117:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  507|    148|               CAMELLIA_SIGMA4L, CAMELLIA_SIGMA4R,
  508|    148|               w0, w1, il, ir, t0, t1);
  509|    148|    kll ^= w0;
  510|    148|    klr ^= w1;
  511|       |
  512|       |    /* generate KA dependent subkeys */
  513|    148|    subl(2) = kll;
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  514|    148|    subr(2) = klr;
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  515|    148|    subl(3) = krl;
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  516|    148|    subr(3) = krr;
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  517|    148|    CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15);
  ------------------
  |  |   77|    148|    do {                                             \
  |  |   78|    148|        w0 = ll;                                     \
  |  |   79|    148|        ll = (ll << bits) + (lr >> (32 - bits));     \
  |  |   80|    148|        lr = (lr << bits) + (rl >> (32 - bits));     \
  |  |   81|    148|        rl = (rl << bits) + (rr >> (32 - bits));     \
  |  |   82|    148|        rr = (rr << bits) + (w0 >> (32 - bits));     \
  |  |   83|    148|    } while (0)
  |  |  ------------------
  |  |  |  Branch (83:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  518|    148|    subl(6) = kll;
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  519|    148|    subr(6) = klr;
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  520|    148|    subl(7) = krl;
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  521|    148|    subr(7) = krr;
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  522|    148|    CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15);
  ------------------
  |  |   77|    148|    do {                                             \
  |  |   78|    148|        w0 = ll;                                     \
  |  |   79|    148|        ll = (ll << bits) + (lr >> (32 - bits));     \
  |  |   80|    148|        lr = (lr << bits) + (rl >> (32 - bits));     \
  |  |   81|    148|        rl = (rl << bits) + (rr >> (32 - bits));     \
  |  |   82|    148|        rr = (rr << bits) + (w0 >> (32 - bits));     \
  |  |   83|    148|    } while (0)
  |  |  ------------------
  |  |  |  Branch (83:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  523|    148|    subl(8) = kll;
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  524|    148|    subr(8) = klr;
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  525|    148|    subl(9) = krl;
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  526|    148|    subr(9) = krr;
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  527|    148|    CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15);
  ------------------
  |  |   77|    148|    do {                                             \
  |  |   78|    148|        w0 = ll;                                     \
  |  |   79|    148|        ll = (ll << bits) + (lr >> (32 - bits));     \
  |  |   80|    148|        lr = (lr << bits) + (rl >> (32 - bits));     \
  |  |   81|    148|        rl = (rl << bits) + (rr >> (32 - bits));     \
  |  |   82|    148|        rr = (rr << bits) + (w0 >> (32 - bits));     \
  |  |   83|    148|    } while (0)
  |  |  ------------------
  |  |  |  Branch (83:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  528|    148|    subl(12) = kll;
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  529|    148|    subr(12) = klr;
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  530|    148|    CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15);
  ------------------
  |  |   77|    148|    do {                                             \
  |  |   78|    148|        w0 = ll;                                     \
  |  |   79|    148|        ll = (ll << bits) + (lr >> (32 - bits));     \
  |  |   80|    148|        lr = (lr << bits) + (rl >> (32 - bits));     \
  |  |   81|    148|        rl = (rl << bits) + (rr >> (32 - bits));     \
  |  |   82|    148|        rr = (rr << bits) + (w0 >> (32 - bits));     \
  |  |   83|    148|    } while (0)
  |  |  ------------------
  |  |  |  Branch (83:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  531|    148|    subl(14) = kll;
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  532|    148|    subr(14) = klr;
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  533|    148|    subl(15) = krl;
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  534|    148|    subr(15) = krr;
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  535|    148|    CAMELLIA_ROLDQo32(kll, klr, krl, krr, w0, w1, 34);
  ------------------
  |  |   86|    148|    do {                                                \
  |  |   87|    148|        w0 = ll;                                        \
  |  |   88|    148|        w1 = lr;                                        \
  |  |   89|    148|        ll = (lr << (bits - 32)) + (rl >> (64 - bits)); \
  |  |   90|    148|        lr = (rl << (bits - 32)) + (rr >> (64 - bits)); \
  |  |   91|    148|        rl = (rr << (bits - 32)) + (w0 >> (64 - bits)); \
  |  |   92|    148|        rr = (w0 << (bits - 32)) + (w1 >> (64 - bits)); \
  |  |   93|    148|    } while (0)
  |  |  ------------------
  |  |  |  Branch (93:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  536|    148|    subl(20) = kll;
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  537|    148|    subr(20) = klr;
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  538|    148|    subl(21) = krl;
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  539|    148|    subr(21) = krr;
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  540|    148|    CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 17);
  ------------------
  |  |   77|    148|    do {                                             \
  |  |   78|    148|        w0 = ll;                                     \
  |  |   79|    148|        ll = (ll << bits) + (lr >> (32 - bits));     \
  |  |   80|    148|        lr = (lr << bits) + (rl >> (32 - bits));     \
  |  |   81|    148|        rl = (rl << bits) + (rr >> (32 - bits));     \
  |  |   82|    148|        rr = (rr << bits) + (w0 >> (32 - bits));     \
  |  |   83|    148|    } while (0)
  |  |  ------------------
  |  |  |  Branch (83:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  541|    148|    subl(24) = kll;
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  542|    148|    subr(24) = klr;
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  543|    148|    subl(25) = krl;
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  544|    148|    subr(25) = krr;
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  545|       |
  546|       |    /* absorb kw2 to other subkeys */
  547|    148|    subl(3) ^= subl(1);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
                  subl(3) ^= subl(1);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  548|    148|    subr(3) ^= subr(1);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
                  subr(3) ^= subr(1);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  549|    148|    subl(5) ^= subl(1);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
                  subl(5) ^= subl(1);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  550|    148|    subr(5) ^= subr(1);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
                  subr(5) ^= subr(1);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  551|    148|    subl(7) ^= subl(1);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
                  subl(7) ^= subl(1);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  552|    148|    subr(7) ^= subr(1);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
                  subr(7) ^= subr(1);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  553|    148|    subl(1) ^= subr(1) & ~subr(9);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
                  subl(1) ^= subr(1) & ~subr(9);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
                  subl(1) ^= subr(1) & ~subr(9);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  554|    148|    dw = subl(1) & subl(9), subr(1) ^= CAMELLIA_RL1(dw);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
                  dw = subl(1) & subl(9), subr(1) ^= CAMELLIA_RL1(dw);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
                  dw = subl(1) & subl(9), subr(1) ^= CAMELLIA_RL1(dw);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
                  dw = subl(1) & subl(9), subr(1) ^= CAMELLIA_RL1(dw);
  ------------------
  |  |   72|    148|#define CAMELLIA_RL1(x) (((x) << 1) + ((x) >> 31))
  ------------------
  555|    148|    subl(11) ^= subl(1);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
                  subl(11) ^= subl(1);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  556|    148|    subr(11) ^= subr(1);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
                  subr(11) ^= subr(1);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  557|    148|    subl(13) ^= subl(1);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
                  subl(13) ^= subl(1);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  558|    148|    subr(13) ^= subr(1);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
                  subr(13) ^= subr(1);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  559|    148|    subl(15) ^= subl(1);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
                  subl(15) ^= subl(1);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  560|    148|    subr(15) ^= subr(1);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
                  subr(15) ^= subr(1);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  561|    148|    subl(1) ^= subr(1) & ~subr(17);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
                  subl(1) ^= subr(1) & ~subr(17);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
                  subl(1) ^= subr(1) & ~subr(17);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  562|    148|    dw = subl(1) & subl(17), subr(1) ^= CAMELLIA_RL1(dw);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
                  dw = subl(1) & subl(17), subr(1) ^= CAMELLIA_RL1(dw);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
                  dw = subl(1) & subl(17), subr(1) ^= CAMELLIA_RL1(dw);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
                  dw = subl(1) & subl(17), subr(1) ^= CAMELLIA_RL1(dw);
  ------------------
  |  |   72|    148|#define CAMELLIA_RL1(x) (((x) << 1) + ((x) >> 31))
  ------------------
  563|    148|    subl(19) ^= subl(1);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
                  subl(19) ^= subl(1);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  564|    148|    subr(19) ^= subr(1);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
                  subr(19) ^= subr(1);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  565|    148|    subl(21) ^= subl(1);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
                  subl(21) ^= subl(1);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  566|    148|    subr(21) ^= subr(1);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
                  subr(21) ^= subr(1);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  567|    148|    subl(23) ^= subl(1);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
                  subl(23) ^= subl(1);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  568|    148|    subr(23) ^= subr(1);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
                  subr(23) ^= subr(1);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  569|    148|    subl(24) ^= subl(1);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
                  subl(24) ^= subl(1);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  570|    148|    subr(24) ^= subr(1);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
                  subr(24) ^= subr(1);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  571|       |
  572|       |    /* absorb kw4 to other subkeys */
  573|    148|    kw4l = subl(25);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  574|    148|    kw4r = subr(25);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  575|    148|    subl(22) ^= kw4l;
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  576|    148|    subr(22) ^= kw4r;
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  577|    148|    subl(20) ^= kw4l;
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  578|    148|    subr(20) ^= kw4r;
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  579|    148|    subl(18) ^= kw4l;
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  580|    148|    subr(18) ^= kw4r;
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  581|    148|    kw4l ^= kw4r & ~subr(16);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  582|    148|    dw = kw4l & subl(16), kw4r ^= CAMELLIA_RL1(dw);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
                  dw = kw4l & subl(16), kw4r ^= CAMELLIA_RL1(dw);
  ------------------
  |  |   72|    148|#define CAMELLIA_RL1(x) (((x) << 1) + ((x) >> 31))
  ------------------
  583|    148|    subl(14) ^= kw4l;
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  584|    148|    subr(14) ^= kw4r;
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  585|    148|    subl(12) ^= kw4l;
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  586|    148|    subr(12) ^= kw4r;
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  587|    148|    subl(10) ^= kw4l;
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  588|    148|    subr(10) ^= kw4r;
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  589|    148|    kw4l ^= kw4r & ~subr(8);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  590|    148|    dw = kw4l & subl(8), kw4r ^= CAMELLIA_RL1(dw);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
                  dw = kw4l & subl(8), kw4r ^= CAMELLIA_RL1(dw);
  ------------------
  |  |   72|    148|#define CAMELLIA_RL1(x) (((x) << 1) + ((x) >> 31))
  ------------------
  591|    148|    subl(6) ^= kw4l;
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  592|    148|    subr(6) ^= kw4r;
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  593|    148|    subl(4) ^= kw4l;
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  594|    148|    subr(4) ^= kw4r;
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  595|    148|    subl(2) ^= kw4l;
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  596|    148|    subr(2) ^= kw4r;
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  597|    148|    subl(0) ^= kw4l;
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  598|    148|    subr(0) ^= kw4r;
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  599|       |
  600|       |    /* key XOR is end of F-function */
  601|    148|    CamelliaSubkeyL(0) = subl(0) ^ subl(2);
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(0) = subl(0) ^ subl(2);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
                  CamelliaSubkeyL(0) = subl(0) ^ subl(2);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  602|    148|    CamelliaSubkeyR(0) = subr(0) ^ subr(2);
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(0) = subr(0) ^ subr(2);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
                  CamelliaSubkeyR(0) = subr(0) ^ subr(2);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  603|    148|    CamelliaSubkeyL(2) = subl(3);
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(2) = subl(3);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  604|    148|    CamelliaSubkeyR(2) = subr(3);
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(2) = subr(3);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  605|    148|    CamelliaSubkeyL(3) = subl(2) ^ subl(4);
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(3) = subl(2) ^ subl(4);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
                  CamelliaSubkeyL(3) = subl(2) ^ subl(4);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  606|    148|    CamelliaSubkeyR(3) = subr(2) ^ subr(4);
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(3) = subr(2) ^ subr(4);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
                  CamelliaSubkeyR(3) = subr(2) ^ subr(4);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  607|    148|    CamelliaSubkeyL(4) = subl(3) ^ subl(5);
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(4) = subl(3) ^ subl(5);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
                  CamelliaSubkeyL(4) = subl(3) ^ subl(5);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  608|    148|    CamelliaSubkeyR(4) = subr(3) ^ subr(5);
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(4) = subr(3) ^ subr(5);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
                  CamelliaSubkeyR(4) = subr(3) ^ subr(5);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  609|    148|    CamelliaSubkeyL(5) = subl(4) ^ subl(6);
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(5) = subl(4) ^ subl(6);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
                  CamelliaSubkeyL(5) = subl(4) ^ subl(6);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  610|    148|    CamelliaSubkeyR(5) = subr(4) ^ subr(6);
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(5) = subr(4) ^ subr(6);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
                  CamelliaSubkeyR(5) = subr(4) ^ subr(6);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  611|    148|    CamelliaSubkeyL(6) = subl(5) ^ subl(7);
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(6) = subl(5) ^ subl(7);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
                  CamelliaSubkeyL(6) = subl(5) ^ subl(7);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  612|    148|    CamelliaSubkeyR(6) = subr(5) ^ subr(7);
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(6) = subr(5) ^ subr(7);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
                  CamelliaSubkeyR(6) = subr(5) ^ subr(7);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  613|    148|    tl = subl(10) ^ (subr(10) & ~subr(8));
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
                  tl = subl(10) ^ (subr(10) & ~subr(8));
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
                  tl = subl(10) ^ (subr(10) & ~subr(8));
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  614|    148|    dw = tl & subl(8), tr = subr(10) ^ CAMELLIA_RL1(dw);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
                  dw = tl & subl(8), tr = subr(10) ^ CAMELLIA_RL1(dw);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
                  dw = tl & subl(8), tr = subr(10) ^ CAMELLIA_RL1(dw);
  ------------------
  |  |   72|    148|#define CAMELLIA_RL1(x) (((x) << 1) + ((x) >> 31))
  ------------------
  615|    148|    CamelliaSubkeyL(7) = subl(6) ^ tl;
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(7) = subl(6) ^ tl;
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  616|    148|    CamelliaSubkeyR(7) = subr(6) ^ tr;
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(7) = subr(6) ^ tr;
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  617|    148|    CamelliaSubkeyL(8) = subl(8);
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(8) = subl(8);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  618|    148|    CamelliaSubkeyR(8) = subr(8);
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(8) = subr(8);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  619|    148|    CamelliaSubkeyL(9) = subl(9);
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(9) = subl(9);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  620|    148|    CamelliaSubkeyR(9) = subr(9);
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(9) = subr(9);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  621|    148|    tl = subl(7) ^ (subr(7) & ~subr(9));
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
                  tl = subl(7) ^ (subr(7) & ~subr(9));
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
                  tl = subl(7) ^ (subr(7) & ~subr(9));
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  622|    148|    dw = tl & subl(9), tr = subr(7) ^ CAMELLIA_RL1(dw);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
                  dw = tl & subl(9), tr = subr(7) ^ CAMELLIA_RL1(dw);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
                  dw = tl & subl(9), tr = subr(7) ^ CAMELLIA_RL1(dw);
  ------------------
  |  |   72|    148|#define CAMELLIA_RL1(x) (((x) << 1) + ((x) >> 31))
  ------------------
  623|    148|    CamelliaSubkeyL(10) = tl ^ subl(11);
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(10) = tl ^ subl(11);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  624|    148|    CamelliaSubkeyR(10) = tr ^ subr(11);
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(10) = tr ^ subr(11);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  625|    148|    CamelliaSubkeyL(11) = subl(10) ^ subl(12);
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(11) = subl(10) ^ subl(12);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
                  CamelliaSubkeyL(11) = subl(10) ^ subl(12);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  626|    148|    CamelliaSubkeyR(11) = subr(10) ^ subr(12);
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(11) = subr(10) ^ subr(12);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
                  CamelliaSubkeyR(11) = subr(10) ^ subr(12);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  627|    148|    CamelliaSubkeyL(12) = subl(11) ^ subl(13);
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(12) = subl(11) ^ subl(13);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
                  CamelliaSubkeyL(12) = subl(11) ^ subl(13);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  628|    148|    CamelliaSubkeyR(12) = subr(11) ^ subr(13);
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(12) = subr(11) ^ subr(13);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
                  CamelliaSubkeyR(12) = subr(11) ^ subr(13);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  629|    148|    CamelliaSubkeyL(13) = subl(12) ^ subl(14);
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(13) = subl(12) ^ subl(14);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
                  CamelliaSubkeyL(13) = subl(12) ^ subl(14);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  630|    148|    CamelliaSubkeyR(13) = subr(12) ^ subr(14);
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(13) = subr(12) ^ subr(14);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
                  CamelliaSubkeyR(13) = subr(12) ^ subr(14);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  631|    148|    CamelliaSubkeyL(14) = subl(13) ^ subl(15);
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(14) = subl(13) ^ subl(15);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
                  CamelliaSubkeyL(14) = subl(13) ^ subl(15);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  632|    148|    CamelliaSubkeyR(14) = subr(13) ^ subr(15);
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(14) = subr(13) ^ subr(15);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
                  CamelliaSubkeyR(14) = subr(13) ^ subr(15);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  633|    148|    tl = subl(18) ^ (subr(18) & ~subr(16));
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
                  tl = subl(18) ^ (subr(18) & ~subr(16));
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
                  tl = subl(18) ^ (subr(18) & ~subr(16));
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  634|    148|    dw = tl & subl(16), tr = subr(18) ^ CAMELLIA_RL1(dw);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
                  dw = tl & subl(16), tr = subr(18) ^ CAMELLIA_RL1(dw);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
                  dw = tl & subl(16), tr = subr(18) ^ CAMELLIA_RL1(dw);
  ------------------
  |  |   72|    148|#define CAMELLIA_RL1(x) (((x) << 1) + ((x) >> 31))
  ------------------
  635|    148|    CamelliaSubkeyL(15) = subl(14) ^ tl;
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(15) = subl(14) ^ tl;
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  636|    148|    CamelliaSubkeyR(15) = subr(14) ^ tr;
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(15) = subr(14) ^ tr;
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  637|    148|    CamelliaSubkeyL(16) = subl(16);
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(16) = subl(16);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  638|    148|    CamelliaSubkeyR(16) = subr(16);
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(16) = subr(16);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  639|    148|    CamelliaSubkeyL(17) = subl(17);
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(17) = subl(17);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  640|    148|    CamelliaSubkeyR(17) = subr(17);
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(17) = subr(17);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  641|    148|    tl = subl(15) ^ (subr(15) & ~subr(17));
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
                  tl = subl(15) ^ (subr(15) & ~subr(17));
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
                  tl = subl(15) ^ (subr(15) & ~subr(17));
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  642|    148|    dw = tl & subl(17), tr = subr(15) ^ CAMELLIA_RL1(dw);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
                  dw = tl & subl(17), tr = subr(15) ^ CAMELLIA_RL1(dw);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
                  dw = tl & subl(17), tr = subr(15) ^ CAMELLIA_RL1(dw);
  ------------------
  |  |   72|    148|#define CAMELLIA_RL1(x) (((x) << 1) + ((x) >> 31))
  ------------------
  643|    148|    CamelliaSubkeyL(18) = tl ^ subl(19);
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(18) = tl ^ subl(19);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  644|    148|    CamelliaSubkeyR(18) = tr ^ subr(19);
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(18) = tr ^ subr(19);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  645|    148|    CamelliaSubkeyL(19) = subl(18) ^ subl(20);
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(19) = subl(18) ^ subl(20);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
                  CamelliaSubkeyL(19) = subl(18) ^ subl(20);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  646|    148|    CamelliaSubkeyR(19) = subr(18) ^ subr(20);
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(19) = subr(18) ^ subr(20);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
                  CamelliaSubkeyR(19) = subr(18) ^ subr(20);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  647|    148|    CamelliaSubkeyL(20) = subl(19) ^ subl(21);
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(20) = subl(19) ^ subl(21);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
                  CamelliaSubkeyL(20) = subl(19) ^ subl(21);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  648|    148|    CamelliaSubkeyR(20) = subr(19) ^ subr(21);
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(20) = subr(19) ^ subr(21);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
                  CamelliaSubkeyR(20) = subr(19) ^ subr(21);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  649|    148|    CamelliaSubkeyL(21) = subl(20) ^ subl(22);
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(21) = subl(20) ^ subl(22);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
                  CamelliaSubkeyL(21) = subl(20) ^ subl(22);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  650|    148|    CamelliaSubkeyR(21) = subr(20) ^ subr(22);
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(21) = subr(20) ^ subr(22);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
                  CamelliaSubkeyR(21) = subr(20) ^ subr(22);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  651|    148|    CamelliaSubkeyL(22) = subl(21) ^ subl(23);
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(22) = subl(21) ^ subl(23);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
                  CamelliaSubkeyL(22) = subl(21) ^ subl(23);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  652|    148|    CamelliaSubkeyR(22) = subr(21) ^ subr(23);
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(22) = subr(21) ^ subr(23);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
                  CamelliaSubkeyR(22) = subr(21) ^ subr(23);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  653|    148|    CamelliaSubkeyL(23) = subl(22);
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(23) = subl(22);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  654|    148|    CamelliaSubkeyR(23) = subr(22);
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(23) = subr(22);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  655|    148|    CamelliaSubkeyL(24) = subl(24) ^ subl(23);
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(24) = subl(24) ^ subl(23);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
                  CamelliaSubkeyL(24) = subl(24) ^ subl(23);
  ------------------
  |  |  430|    148|#define subl(x) subL[(x)]
  ------------------
  656|    148|    CamelliaSubkeyR(24) = subr(24) ^ subr(23);
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(24) = subr(24) ^ subr(23);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
                  CamelliaSubkeyR(24) = subr(24) ^ subr(23);
  ------------------
  |  |  431|    148|#define subr(x) subR[(x)]
  ------------------
  657|       |
  658|       |    /* apply the inverse of the last half of P-function */
  659|    148|    dw = CamelliaSubkeyL(2) ^ CamelliaSubkeyR(2), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  dw = CamelliaSubkeyL(2) ^ CamelliaSubkeyR(2), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  dw = CamelliaSubkeyL(2) ^ CamelliaSubkeyR(2), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   74|    148|#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24))
  ------------------
  660|    148|    CamelliaSubkeyR(2) = CamelliaSubkeyL(2) ^ dw, CamelliaSubkeyL(2) = dw;
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(2) = CamelliaSubkeyL(2) ^ dw, CamelliaSubkeyL(2) = dw;
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyR(2) = CamelliaSubkeyL(2) ^ dw, CamelliaSubkeyL(2) = dw;
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
  661|    148|    dw = CamelliaSubkeyL(3) ^ CamelliaSubkeyR(3), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  dw = CamelliaSubkeyL(3) ^ CamelliaSubkeyR(3), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  dw = CamelliaSubkeyL(3) ^ CamelliaSubkeyR(3), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   74|    148|#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24))
  ------------------
  662|    148|    CamelliaSubkeyR(3) = CamelliaSubkeyL(3) ^ dw, CamelliaSubkeyL(3) = dw;
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(3) = CamelliaSubkeyL(3) ^ dw, CamelliaSubkeyL(3) = dw;
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyR(3) = CamelliaSubkeyL(3) ^ dw, CamelliaSubkeyL(3) = dw;
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
  663|    148|    dw = CamelliaSubkeyL(4) ^ CamelliaSubkeyR(4), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  dw = CamelliaSubkeyL(4) ^ CamelliaSubkeyR(4), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  dw = CamelliaSubkeyL(4) ^ CamelliaSubkeyR(4), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   74|    148|#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24))
  ------------------
  664|    148|    CamelliaSubkeyR(4) = CamelliaSubkeyL(4) ^ dw, CamelliaSubkeyL(4) = dw;
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(4) = CamelliaSubkeyL(4) ^ dw, CamelliaSubkeyL(4) = dw;
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyR(4) = CamelliaSubkeyL(4) ^ dw, CamelliaSubkeyL(4) = dw;
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
  665|    148|    dw = CamelliaSubkeyL(5) ^ CamelliaSubkeyR(5), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  dw = CamelliaSubkeyL(5) ^ CamelliaSubkeyR(5), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  dw = CamelliaSubkeyL(5) ^ CamelliaSubkeyR(5), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   74|    148|#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24))
  ------------------
  666|    148|    CamelliaSubkeyR(5) = CamelliaSubkeyL(5) ^ dw, CamelliaSubkeyL(5) = dw;
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(5) = CamelliaSubkeyL(5) ^ dw, CamelliaSubkeyL(5) = dw;
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyR(5) = CamelliaSubkeyL(5) ^ dw, CamelliaSubkeyL(5) = dw;
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
  667|    148|    dw = CamelliaSubkeyL(6) ^ CamelliaSubkeyR(6), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  dw = CamelliaSubkeyL(6) ^ CamelliaSubkeyR(6), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  dw = CamelliaSubkeyL(6) ^ CamelliaSubkeyR(6), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   74|    148|#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24))
  ------------------
  668|    148|    CamelliaSubkeyR(6) = CamelliaSubkeyL(6) ^ dw, CamelliaSubkeyL(6) = dw;
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(6) = CamelliaSubkeyL(6) ^ dw, CamelliaSubkeyL(6) = dw;
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyR(6) = CamelliaSubkeyL(6) ^ dw, CamelliaSubkeyL(6) = dw;
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
  669|    148|    dw = CamelliaSubkeyL(7) ^ CamelliaSubkeyR(7), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  dw = CamelliaSubkeyL(7) ^ CamelliaSubkeyR(7), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  dw = CamelliaSubkeyL(7) ^ CamelliaSubkeyR(7), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   74|    148|#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24))
  ------------------
  670|    148|    CamelliaSubkeyR(7) = CamelliaSubkeyL(7) ^ dw, CamelliaSubkeyL(7) = dw;
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(7) = CamelliaSubkeyL(7) ^ dw, CamelliaSubkeyL(7) = dw;
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyR(7) = CamelliaSubkeyL(7) ^ dw, CamelliaSubkeyL(7) = dw;
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
  671|    148|    dw = CamelliaSubkeyL(10) ^ CamelliaSubkeyR(10), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  dw = CamelliaSubkeyL(10) ^ CamelliaSubkeyR(10), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  dw = CamelliaSubkeyL(10) ^ CamelliaSubkeyR(10), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   74|    148|#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24))
  ------------------
  672|    148|    CamelliaSubkeyR(10) = CamelliaSubkeyL(10) ^ dw, CamelliaSubkeyL(10) = dw;
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(10) = CamelliaSubkeyL(10) ^ dw, CamelliaSubkeyL(10) = dw;
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyR(10) = CamelliaSubkeyL(10) ^ dw, CamelliaSubkeyL(10) = dw;
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
  673|    148|    dw = CamelliaSubkeyL(11) ^ CamelliaSubkeyR(11), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  dw = CamelliaSubkeyL(11) ^ CamelliaSubkeyR(11), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  dw = CamelliaSubkeyL(11) ^ CamelliaSubkeyR(11), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   74|    148|#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24))
  ------------------
  674|    148|    CamelliaSubkeyR(11) = CamelliaSubkeyL(11) ^ dw, CamelliaSubkeyL(11) = dw;
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(11) = CamelliaSubkeyL(11) ^ dw, CamelliaSubkeyL(11) = dw;
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyR(11) = CamelliaSubkeyL(11) ^ dw, CamelliaSubkeyL(11) = dw;
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
  675|    148|    dw = CamelliaSubkeyL(12) ^ CamelliaSubkeyR(12), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  dw = CamelliaSubkeyL(12) ^ CamelliaSubkeyR(12), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  dw = CamelliaSubkeyL(12) ^ CamelliaSubkeyR(12), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   74|    148|#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24))
  ------------------
  676|    148|    CamelliaSubkeyR(12) = CamelliaSubkeyL(12) ^ dw, CamelliaSubkeyL(12) = dw;
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(12) = CamelliaSubkeyL(12) ^ dw, CamelliaSubkeyL(12) = dw;
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyR(12) = CamelliaSubkeyL(12) ^ dw, CamelliaSubkeyL(12) = dw;
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
  677|    148|    dw = CamelliaSubkeyL(13) ^ CamelliaSubkeyR(13), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  dw = CamelliaSubkeyL(13) ^ CamelliaSubkeyR(13), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  dw = CamelliaSubkeyL(13) ^ CamelliaSubkeyR(13), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   74|    148|#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24))
  ------------------
  678|    148|    CamelliaSubkeyR(13) = CamelliaSubkeyL(13) ^ dw, CamelliaSubkeyL(13) = dw;
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(13) = CamelliaSubkeyL(13) ^ dw, CamelliaSubkeyL(13) = dw;
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyR(13) = CamelliaSubkeyL(13) ^ dw, CamelliaSubkeyL(13) = dw;
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
  679|    148|    dw = CamelliaSubkeyL(14) ^ CamelliaSubkeyR(14), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  dw = CamelliaSubkeyL(14) ^ CamelliaSubkeyR(14), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  dw = CamelliaSubkeyL(14) ^ CamelliaSubkeyR(14), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   74|    148|#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24))
  ------------------
  680|    148|    CamelliaSubkeyR(14) = CamelliaSubkeyL(14) ^ dw, CamelliaSubkeyL(14) = dw;
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(14) = CamelliaSubkeyL(14) ^ dw, CamelliaSubkeyL(14) = dw;
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyR(14) = CamelliaSubkeyL(14) ^ dw, CamelliaSubkeyL(14) = dw;
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
  681|    148|    dw = CamelliaSubkeyL(15) ^ CamelliaSubkeyR(15), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  dw = CamelliaSubkeyL(15) ^ CamelliaSubkeyR(15), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  dw = CamelliaSubkeyL(15) ^ CamelliaSubkeyR(15), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   74|    148|#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24))
  ------------------
  682|    148|    CamelliaSubkeyR(15) = CamelliaSubkeyL(15) ^ dw, CamelliaSubkeyL(15) = dw;
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(15) = CamelliaSubkeyL(15) ^ dw, CamelliaSubkeyL(15) = dw;
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyR(15) = CamelliaSubkeyL(15) ^ dw, CamelliaSubkeyL(15) = dw;
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
  683|    148|    dw = CamelliaSubkeyL(18) ^ CamelliaSubkeyR(18), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  dw = CamelliaSubkeyL(18) ^ CamelliaSubkeyR(18), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  dw = CamelliaSubkeyL(18) ^ CamelliaSubkeyR(18), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   74|    148|#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24))
  ------------------
  684|    148|    CamelliaSubkeyR(18) = CamelliaSubkeyL(18) ^ dw, CamelliaSubkeyL(18) = dw;
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(18) = CamelliaSubkeyL(18) ^ dw, CamelliaSubkeyL(18) = dw;
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyR(18) = CamelliaSubkeyL(18) ^ dw, CamelliaSubkeyL(18) = dw;
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
  685|    148|    dw = CamelliaSubkeyL(19) ^ CamelliaSubkeyR(19), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  dw = CamelliaSubkeyL(19) ^ CamelliaSubkeyR(19), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  dw = CamelliaSubkeyL(19) ^ CamelliaSubkeyR(19), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   74|    148|#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24))
  ------------------
  686|    148|    CamelliaSubkeyR(19) = CamelliaSubkeyL(19) ^ dw, CamelliaSubkeyL(19) = dw;
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(19) = CamelliaSubkeyL(19) ^ dw, CamelliaSubkeyL(19) = dw;
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyR(19) = CamelliaSubkeyL(19) ^ dw, CamelliaSubkeyL(19) = dw;
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
  687|    148|    dw = CamelliaSubkeyL(20) ^ CamelliaSubkeyR(20), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  dw = CamelliaSubkeyL(20) ^ CamelliaSubkeyR(20), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  dw = CamelliaSubkeyL(20) ^ CamelliaSubkeyR(20), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   74|    148|#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24))
  ------------------
  688|    148|    CamelliaSubkeyR(20) = CamelliaSubkeyL(20) ^ dw, CamelliaSubkeyL(20) = dw;
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(20) = CamelliaSubkeyL(20) ^ dw, CamelliaSubkeyL(20) = dw;
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyR(20) = CamelliaSubkeyL(20) ^ dw, CamelliaSubkeyL(20) = dw;
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
  689|    148|    dw = CamelliaSubkeyL(21) ^ CamelliaSubkeyR(21), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  dw = CamelliaSubkeyL(21) ^ CamelliaSubkeyR(21), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  dw = CamelliaSubkeyL(21) ^ CamelliaSubkeyR(21), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   74|    148|#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24))
  ------------------
  690|    148|    CamelliaSubkeyR(21) = CamelliaSubkeyL(21) ^ dw, CamelliaSubkeyL(21) = dw;
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(21) = CamelliaSubkeyL(21) ^ dw, CamelliaSubkeyL(21) = dw;
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyR(21) = CamelliaSubkeyL(21) ^ dw, CamelliaSubkeyL(21) = dw;
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
  691|    148|    dw = CamelliaSubkeyL(22) ^ CamelliaSubkeyR(22), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  dw = CamelliaSubkeyL(22) ^ CamelliaSubkeyR(22), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  dw = CamelliaSubkeyL(22) ^ CamelliaSubkeyR(22), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   74|    148|#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24))
  ------------------
  692|    148|    CamelliaSubkeyR(22) = CamelliaSubkeyL(22) ^ dw, CamelliaSubkeyL(22) = dw;
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(22) = CamelliaSubkeyL(22) ^ dw, CamelliaSubkeyL(22) = dw;
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyR(22) = CamelliaSubkeyL(22) ^ dw, CamelliaSubkeyL(22) = dw;
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
  693|    148|    dw = CamelliaSubkeyL(23) ^ CamelliaSubkeyR(23), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  dw = CamelliaSubkeyL(23) ^ CamelliaSubkeyR(23), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  dw = CamelliaSubkeyL(23) ^ CamelliaSubkeyR(23), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   74|    148|#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24))
  ------------------
  694|    148|    CamelliaSubkeyR(23) = CamelliaSubkeyL(23) ^ dw, CamelliaSubkeyL(23) = dw;
  ------------------
  |  |   67|    148|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(23) = CamelliaSubkeyL(23) ^ dw, CamelliaSubkeyL(23) = dw;
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyR(23) = CamelliaSubkeyL(23) ^ dw, CamelliaSubkeyL(23) = dw;
  ------------------
  |  |   66|    148|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
  695|       |
  696|    148|    return;
  697|    148|}
camellia_setup256:
  701|     42|{
  702|     42|    PRUint32 kll, klr, krl, krr;     /* left half of key */
  703|     42|    PRUint32 krll, krlr, krrl, krrr; /* right half of key */
  704|     42|    PRUint32 il, ir, t0, t1, w0, w1; /* temporary variables */
  705|     42|    PRUint32 kw4l, kw4r, dw, tl, tr;
  706|     42|    PRUint32 subL[34];
  707|     42|    PRUint32 subR[34];
  708|       |#if defined(CAMELLIA_NEED_TMP_VARIABLE)
  709|       |    PRUint32 tmp;
  710|       |#endif
  711|       |
  712|       |    /**
  713|       |     *  key = (kll || klr || krl || krr || krll || krlr || krrl || krrr)
  714|       |     *  (|| is concatination)
  715|       |     */
  716|       |
  717|     42|    kll = GETU32(key);
  ------------------
  |  |   45|     42|#define GETU32(p) SHA_HTONL(*((PRUint32 *)(p)))
  |  |  ------------------
  |  |  |  |   97|     42|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
  718|     42|    klr = GETU32(key + 4);
  ------------------
  |  |   45|     42|#define GETU32(p) SHA_HTONL(*((PRUint32 *)(p)))
  |  |  ------------------
  |  |  |  |   97|     42|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
  719|     42|    krl = GETU32(key + 8);
  ------------------
  |  |   45|     42|#define GETU32(p) SHA_HTONL(*((PRUint32 *)(p)))
  |  |  ------------------
  |  |  |  |   97|     42|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
  720|     42|    krr = GETU32(key + 12);
  ------------------
  |  |   45|     42|#define GETU32(p) SHA_HTONL(*((PRUint32 *)(p)))
  |  |  ------------------
  |  |  |  |   97|     42|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
  721|     42|    krll = GETU32(key + 16);
  ------------------
  |  |   45|     42|#define GETU32(p) SHA_HTONL(*((PRUint32 *)(p)))
  |  |  ------------------
  |  |  |  |   97|     42|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
  722|     42|    krlr = GETU32(key + 20);
  ------------------
  |  |   45|     42|#define GETU32(p) SHA_HTONL(*((PRUint32 *)(p)))
  |  |  ------------------
  |  |  |  |   97|     42|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
  723|     42|    krrl = GETU32(key + 24);
  ------------------
  |  |   45|     42|#define GETU32(p) SHA_HTONL(*((PRUint32 *)(p)))
  |  |  ------------------
  |  |  |  |   97|     42|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
  724|     42|    krrr = GETU32(key + 28);
  ------------------
  |  |   45|     42|#define GETU32(p) SHA_HTONL(*((PRUint32 *)(p)))
  |  |  ------------------
  |  |  |  |   97|     42|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
  725|       |
  726|       |    /* generate KL dependent subkeys */
  727|     42|    subl(0) = kll;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  728|     42|    subr(0) = klr;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  729|     42|    subl(1) = krl;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  730|     42|    subr(1) = krr;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  731|     42|    CAMELLIA_ROLDQo32(kll, klr, krl, krr, w0, w1, 45);
  ------------------
  |  |   86|     42|    do {                                                \
  |  |   87|     42|        w0 = ll;                                        \
  |  |   88|     42|        w1 = lr;                                        \
  |  |   89|     42|        ll = (lr << (bits - 32)) + (rl >> (64 - bits)); \
  |  |   90|     42|        lr = (rl << (bits - 32)) + (rr >> (64 - bits)); \
  |  |   91|     42|        rl = (rr << (bits - 32)) + (w0 >> (64 - bits)); \
  |  |   92|     42|        rr = (w0 << (bits - 32)) + (w1 >> (64 - bits)); \
  |  |   93|     42|    } while (0)
  |  |  ------------------
  |  |  |  Branch (93:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  732|     42|    subl(12) = kll;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  733|     42|    subr(12) = klr;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  734|     42|    subl(13) = krl;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  735|     42|    subr(13) = krr;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  736|     42|    CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15);
  ------------------
  |  |   77|     42|    do {                                             \
  |  |   78|     42|        w0 = ll;                                     \
  |  |   79|     42|        ll = (ll << bits) + (lr >> (32 - bits));     \
  |  |   80|     42|        lr = (lr << bits) + (rl >> (32 - bits));     \
  |  |   81|     42|        rl = (rl << bits) + (rr >> (32 - bits));     \
  |  |   82|     42|        rr = (rr << bits) + (w0 >> (32 - bits));     \
  |  |   83|     42|    } while (0)
  |  |  ------------------
  |  |  |  Branch (83:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  737|     42|    subl(16) = kll;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  738|     42|    subr(16) = klr;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  739|     42|    subl(17) = krl;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  740|     42|    subr(17) = krr;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  741|     42|    CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 17);
  ------------------
  |  |   77|     42|    do {                                             \
  |  |   78|     42|        w0 = ll;                                     \
  |  |   79|     42|        ll = (ll << bits) + (lr >> (32 - bits));     \
  |  |   80|     42|        lr = (lr << bits) + (rl >> (32 - bits));     \
  |  |   81|     42|        rl = (rl << bits) + (rr >> (32 - bits));     \
  |  |   82|     42|        rr = (rr << bits) + (w0 >> (32 - bits));     \
  |  |   83|     42|    } while (0)
  |  |  ------------------
  |  |  |  Branch (83:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  742|     42|    subl(22) = kll;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  743|     42|    subr(22) = klr;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  744|     42|    subl(23) = krl;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  745|     42|    subr(23) = krr;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  746|     42|    CAMELLIA_ROLDQo32(kll, klr, krl, krr, w0, w1, 34);
  ------------------
  |  |   86|     42|    do {                                                \
  |  |   87|     42|        w0 = ll;                                        \
  |  |   88|     42|        w1 = lr;                                        \
  |  |   89|     42|        ll = (lr << (bits - 32)) + (rl >> (64 - bits)); \
  |  |   90|     42|        lr = (rl << (bits - 32)) + (rr >> (64 - bits)); \
  |  |   91|     42|        rl = (rr << (bits - 32)) + (w0 >> (64 - bits)); \
  |  |   92|     42|        rr = (w0 << (bits - 32)) + (w1 >> (64 - bits)); \
  |  |   93|     42|    } while (0)
  |  |  ------------------
  |  |  |  Branch (93:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  747|     42|    subl(30) = kll;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  748|     42|    subr(30) = klr;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  749|     42|    subl(31) = krl;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  750|     42|    subr(31) = krr;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  751|       |
  752|       |    /* generate KR dependent subkeys */
  753|     42|    CAMELLIA_ROLDQ(krll, krlr, krrl, krrr, w0, w1, 15);
  ------------------
  |  |   77|     42|    do {                                             \
  |  |   78|     42|        w0 = ll;                                     \
  |  |   79|     42|        ll = (ll << bits) + (lr >> (32 - bits));     \
  |  |   80|     42|        lr = (lr << bits) + (rl >> (32 - bits));     \
  |  |   81|     42|        rl = (rl << bits) + (rr >> (32 - bits));     \
  |  |   82|     42|        rr = (rr << bits) + (w0 >> (32 - bits));     \
  |  |   83|     42|    } while (0)
  |  |  ------------------
  |  |  |  Branch (83:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  754|     42|    subl(4) = krll;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  755|     42|    subr(4) = krlr;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  756|     42|    subl(5) = krrl;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  757|     42|    subr(5) = krrr;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  758|     42|    CAMELLIA_ROLDQ(krll, krlr, krrl, krrr, w0, w1, 15);
  ------------------
  |  |   77|     42|    do {                                             \
  |  |   78|     42|        w0 = ll;                                     \
  |  |   79|     42|        ll = (ll << bits) + (lr >> (32 - bits));     \
  |  |   80|     42|        lr = (lr << bits) + (rl >> (32 - bits));     \
  |  |   81|     42|        rl = (rl << bits) + (rr >> (32 - bits));     \
  |  |   82|     42|        rr = (rr << bits) + (w0 >> (32 - bits));     \
  |  |   83|     42|    } while (0)
  |  |  ------------------
  |  |  |  Branch (83:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  759|     42|    subl(8) = krll;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  760|     42|    subr(8) = krlr;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  761|     42|    subl(9) = krrl;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  762|     42|    subr(9) = krrr;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  763|     42|    CAMELLIA_ROLDQ(krll, krlr, krrl, krrr, w0, w1, 30);
  ------------------
  |  |   77|     42|    do {                                             \
  |  |   78|     42|        w0 = ll;                                     \
  |  |   79|     42|        ll = (ll << bits) + (lr >> (32 - bits));     \
  |  |   80|     42|        lr = (lr << bits) + (rl >> (32 - bits));     \
  |  |   81|     42|        rl = (rl << bits) + (rr >> (32 - bits));     \
  |  |   82|     42|        rr = (rr << bits) + (w0 >> (32 - bits));     \
  |  |   83|     42|    } while (0)
  |  |  ------------------
  |  |  |  Branch (83:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  764|     42|    subl(18) = krll;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  765|     42|    subr(18) = krlr;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  766|     42|    subl(19) = krrl;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  767|     42|    subr(19) = krrr;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  768|     42|    CAMELLIA_ROLDQo32(krll, krlr, krrl, krrr, w0, w1, 34);
  ------------------
  |  |   86|     42|    do {                                                \
  |  |   87|     42|        w0 = ll;                                        \
  |  |   88|     42|        w1 = lr;                                        \
  |  |   89|     42|        ll = (lr << (bits - 32)) + (rl >> (64 - bits)); \
  |  |   90|     42|        lr = (rl << (bits - 32)) + (rr >> (64 - bits)); \
  |  |   91|     42|        rl = (rr << (bits - 32)) + (w0 >> (64 - bits)); \
  |  |   92|     42|        rr = (w0 << (bits - 32)) + (w1 >> (64 - bits)); \
  |  |   93|     42|    } while (0)
  |  |  ------------------
  |  |  |  Branch (93:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  769|     42|    subl(26) = krll;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  770|     42|    subr(26) = krlr;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  771|     42|    subl(27) = krrl;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  772|     42|    subr(27) = krrr;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  773|     42|    CAMELLIA_ROLDQo32(krll, krlr, krrl, krrr, w0, w1, 34);
  ------------------
  |  |   86|     42|    do {                                                \
  |  |   87|     42|        w0 = ll;                                        \
  |  |   88|     42|        w1 = lr;                                        \
  |  |   89|     42|        ll = (lr << (bits - 32)) + (rl >> (64 - bits)); \
  |  |   90|     42|        lr = (rl << (bits - 32)) + (rr >> (64 - bits)); \
  |  |   91|     42|        rl = (rr << (bits - 32)) + (w0 >> (64 - bits)); \
  |  |   92|     42|        rr = (w0 << (bits - 32)) + (w1 >> (64 - bits)); \
  |  |   93|     42|    } while (0)
  |  |  ------------------
  |  |  |  Branch (93:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  774|       |
  775|       |    /* generate KA */
  776|     42|    kll = subl(0) ^ krll;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  777|     42|    klr = subr(0) ^ krlr;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  778|     42|    krl = subl(1) ^ krrl;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  779|     42|    krr = subr(1) ^ krrr;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  780|     42|    CAMELLIA_F(kll, klr,
  ------------------
  |  |  101|     42|    do {                                                   \
  |  |  102|     42|        il = xl ^ kl;                                      \
  |  |  103|     42|        ir = xr ^ kr;                                      \
  |  |  104|     42|        t0 = il >> 16;                                     \
  |  |  105|     42|        t1 = ir >> 16;                                     \
  |  |  106|     42|        yl = CAMELLIA_SP1110(ir & 0xff) ^                  \
  |  |  ------------------
  |  |  |  |   95|     42|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  107|     42|             CAMELLIA_SP0222((t1 >> 8) & 0xff) ^           \
  |  |  ------------------
  |  |  |  |   96|     42|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  108|     42|             CAMELLIA_SP3033(t1 & 0xff) ^                  \
  |  |  ------------------
  |  |  |  |   97|     42|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  109|     42|             CAMELLIA_SP4404((ir >> 8) & 0xff);            \
  |  |  ------------------
  |  |  |  |   98|     42|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  110|     42|        yr = CAMELLIA_SP1110((t0 >> 8) & 0xff) ^           \
  |  |  ------------------
  |  |  |  |   95|     42|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  111|     42|             CAMELLIA_SP0222(t0 & 0xff) ^                  \
  |  |  ------------------
  |  |  |  |   96|     42|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  112|     42|             CAMELLIA_SP3033((il >> 8) & 0xff) ^           \
  |  |  ------------------
  |  |  |  |   97|     42|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  113|     42|             CAMELLIA_SP4404(il & 0xff);                   \
  |  |  ------------------
  |  |  |  |   98|     42|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  114|     42|        yl ^= yr;                                          \
  |  |  115|     42|        yr = CAMELLIA_RR8(yr);                             \
  |  |  ------------------
  |  |  |  |   70|     42|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  116|     42|        yr ^= yl;                                          \
  |  |  117|     42|    } while (0)
  |  |  ------------------
  |  |  |  Branch (117:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  781|     42|               CAMELLIA_SIGMA1L, CAMELLIA_SIGMA1R,
  782|     42|               w0, w1, il, ir, t0, t1);
  783|     42|    krl ^= w0;
  784|     42|    krr ^= w1;
  785|     42|    CAMELLIA_F(krl, krr,
  ------------------
  |  |  101|     42|    do {                                                   \
  |  |  102|     42|        il = xl ^ kl;                                      \
  |  |  103|     42|        ir = xr ^ kr;                                      \
  |  |  104|     42|        t0 = il >> 16;                                     \
  |  |  105|     42|        t1 = ir >> 16;                                     \
  |  |  106|     42|        yl = CAMELLIA_SP1110(ir & 0xff) ^                  \
  |  |  ------------------
  |  |  |  |   95|     42|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  107|     42|             CAMELLIA_SP0222((t1 >> 8) & 0xff) ^           \
  |  |  ------------------
  |  |  |  |   96|     42|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  108|     42|             CAMELLIA_SP3033(t1 & 0xff) ^                  \
  |  |  ------------------
  |  |  |  |   97|     42|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  109|     42|             CAMELLIA_SP4404((ir >> 8) & 0xff);            \
  |  |  ------------------
  |  |  |  |   98|     42|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  110|     42|        yr = CAMELLIA_SP1110((t0 >> 8) & 0xff) ^           \
  |  |  ------------------
  |  |  |  |   95|     42|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  111|     42|             CAMELLIA_SP0222(t0 & 0xff) ^                  \
  |  |  ------------------
  |  |  |  |   96|     42|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  112|     42|             CAMELLIA_SP3033((il >> 8) & 0xff) ^           \
  |  |  ------------------
  |  |  |  |   97|     42|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  113|     42|             CAMELLIA_SP4404(il & 0xff);                   \
  |  |  ------------------
  |  |  |  |   98|     42|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  114|     42|        yl ^= yr;                                          \
  |  |  115|     42|        yr = CAMELLIA_RR8(yr);                             \
  |  |  ------------------
  |  |  |  |   70|     42|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  116|     42|        yr ^= yl;                                          \
  |  |  117|     42|    } while (0)
  |  |  ------------------
  |  |  |  Branch (117:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  786|     42|               CAMELLIA_SIGMA2L, CAMELLIA_SIGMA2R,
  787|     42|               kll, klr, il, ir, t0, t1);
  788|     42|    kll ^= krll;
  789|     42|    klr ^= krlr;
  790|     42|    CAMELLIA_F(kll, klr,
  ------------------
  |  |  101|     42|    do {                                                   \
  |  |  102|     42|        il = xl ^ kl;                                      \
  |  |  103|     42|        ir = xr ^ kr;                                      \
  |  |  104|     42|        t0 = il >> 16;                                     \
  |  |  105|     42|        t1 = ir >> 16;                                     \
  |  |  106|     42|        yl = CAMELLIA_SP1110(ir & 0xff) ^                  \
  |  |  ------------------
  |  |  |  |   95|     42|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  107|     42|             CAMELLIA_SP0222((t1 >> 8) & 0xff) ^           \
  |  |  ------------------
  |  |  |  |   96|     42|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  108|     42|             CAMELLIA_SP3033(t1 & 0xff) ^                  \
  |  |  ------------------
  |  |  |  |   97|     42|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  109|     42|             CAMELLIA_SP4404((ir >> 8) & 0xff);            \
  |  |  ------------------
  |  |  |  |   98|     42|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  110|     42|        yr = CAMELLIA_SP1110((t0 >> 8) & 0xff) ^           \
  |  |  ------------------
  |  |  |  |   95|     42|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  111|     42|             CAMELLIA_SP0222(t0 & 0xff) ^                  \
  |  |  ------------------
  |  |  |  |   96|     42|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  112|     42|             CAMELLIA_SP3033((il >> 8) & 0xff) ^           \
  |  |  ------------------
  |  |  |  |   97|     42|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  113|     42|             CAMELLIA_SP4404(il & 0xff);                   \
  |  |  ------------------
  |  |  |  |   98|     42|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  114|     42|        yl ^= yr;                                          \
  |  |  115|     42|        yr = CAMELLIA_RR8(yr);                             \
  |  |  ------------------
  |  |  |  |   70|     42|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  116|     42|        yr ^= yl;                                          \
  |  |  117|     42|    } while (0)
  |  |  ------------------
  |  |  |  Branch (117:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  791|     42|               CAMELLIA_SIGMA3L, CAMELLIA_SIGMA3R,
  792|     42|               krl, krr, il, ir, t0, t1);
  793|     42|    krl ^= w0 ^ krrl;
  794|     42|    krr ^= w1 ^ krrr;
  795|     42|    CAMELLIA_F(krl, krr,
  ------------------
  |  |  101|     42|    do {                                                   \
  |  |  102|     42|        il = xl ^ kl;                                      \
  |  |  103|     42|        ir = xr ^ kr;                                      \
  |  |  104|     42|        t0 = il >> 16;                                     \
  |  |  105|     42|        t1 = ir >> 16;                                     \
  |  |  106|     42|        yl = CAMELLIA_SP1110(ir & 0xff) ^                  \
  |  |  ------------------
  |  |  |  |   95|     42|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  107|     42|             CAMELLIA_SP0222((t1 >> 8) & 0xff) ^           \
  |  |  ------------------
  |  |  |  |   96|     42|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  108|     42|             CAMELLIA_SP3033(t1 & 0xff) ^                  \
  |  |  ------------------
  |  |  |  |   97|     42|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  109|     42|             CAMELLIA_SP4404((ir >> 8) & 0xff);            \
  |  |  ------------------
  |  |  |  |   98|     42|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  110|     42|        yr = CAMELLIA_SP1110((t0 >> 8) & 0xff) ^           \
  |  |  ------------------
  |  |  |  |   95|     42|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  111|     42|             CAMELLIA_SP0222(t0 & 0xff) ^                  \
  |  |  ------------------
  |  |  |  |   96|     42|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  112|     42|             CAMELLIA_SP3033((il >> 8) & 0xff) ^           \
  |  |  ------------------
  |  |  |  |   97|     42|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  113|     42|             CAMELLIA_SP4404(il & 0xff);                   \
  |  |  ------------------
  |  |  |  |   98|     42|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  114|     42|        yl ^= yr;                                          \
  |  |  115|     42|        yr = CAMELLIA_RR8(yr);                             \
  |  |  ------------------
  |  |  |  |   70|     42|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  116|     42|        yr ^= yl;                                          \
  |  |  117|     42|    } while (0)
  |  |  ------------------
  |  |  |  Branch (117:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  796|     42|               CAMELLIA_SIGMA4L, CAMELLIA_SIGMA4R,
  797|     42|               w0, w1, il, ir, t0, t1);
  798|     42|    kll ^= w0;
  799|     42|    klr ^= w1;
  800|       |
  801|       |    /* generate KB */
  802|     42|    krll ^= kll;
  803|     42|    krlr ^= klr;
  804|     42|    krrl ^= krl;
  805|     42|    krrr ^= krr;
  806|     42|    CAMELLIA_F(krll, krlr,
  ------------------
  |  |  101|     42|    do {                                                   \
  |  |  102|     42|        il = xl ^ kl;                                      \
  |  |  103|     42|        ir = xr ^ kr;                                      \
  |  |  104|     42|        t0 = il >> 16;                                     \
  |  |  105|     42|        t1 = ir >> 16;                                     \
  |  |  106|     42|        yl = CAMELLIA_SP1110(ir & 0xff) ^                  \
  |  |  ------------------
  |  |  |  |   95|     42|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  107|     42|             CAMELLIA_SP0222((t1 >> 8) & 0xff) ^           \
  |  |  ------------------
  |  |  |  |   96|     42|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  108|     42|             CAMELLIA_SP3033(t1 & 0xff) ^                  \
  |  |  ------------------
  |  |  |  |   97|     42|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  109|     42|             CAMELLIA_SP4404((ir >> 8) & 0xff);            \
  |  |  ------------------
  |  |  |  |   98|     42|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  110|     42|        yr = CAMELLIA_SP1110((t0 >> 8) & 0xff) ^           \
  |  |  ------------------
  |  |  |  |   95|     42|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  111|     42|             CAMELLIA_SP0222(t0 & 0xff) ^                  \
  |  |  ------------------
  |  |  |  |   96|     42|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  112|     42|             CAMELLIA_SP3033((il >> 8) & 0xff) ^           \
  |  |  ------------------
  |  |  |  |   97|     42|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  113|     42|             CAMELLIA_SP4404(il & 0xff);                   \
  |  |  ------------------
  |  |  |  |   98|     42|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  114|     42|        yl ^= yr;                                          \
  |  |  115|     42|        yr = CAMELLIA_RR8(yr);                             \
  |  |  ------------------
  |  |  |  |   70|     42|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  116|     42|        yr ^= yl;                                          \
  |  |  117|     42|    } while (0)
  |  |  ------------------
  |  |  |  Branch (117:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  807|     42|               CAMELLIA_SIGMA5L, CAMELLIA_SIGMA5R,
  808|     42|               w0, w1, il, ir, t0, t1);
  809|     42|    krrl ^= w0;
  810|     42|    krrr ^= w1;
  811|     42|    CAMELLIA_F(krrl, krrr,
  ------------------
  |  |  101|     42|    do {                                                   \
  |  |  102|     42|        il = xl ^ kl;                                      \
  |  |  103|     42|        ir = xr ^ kr;                                      \
  |  |  104|     42|        t0 = il >> 16;                                     \
  |  |  105|     42|        t1 = ir >> 16;                                     \
  |  |  106|     42|        yl = CAMELLIA_SP1110(ir & 0xff) ^                  \
  |  |  ------------------
  |  |  |  |   95|     42|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  107|     42|             CAMELLIA_SP0222((t1 >> 8) & 0xff) ^           \
  |  |  ------------------
  |  |  |  |   96|     42|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  108|     42|             CAMELLIA_SP3033(t1 & 0xff) ^                  \
  |  |  ------------------
  |  |  |  |   97|     42|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  109|     42|             CAMELLIA_SP4404((ir >> 8) & 0xff);            \
  |  |  ------------------
  |  |  |  |   98|     42|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  110|     42|        yr = CAMELLIA_SP1110((t0 >> 8) & 0xff) ^           \
  |  |  ------------------
  |  |  |  |   95|     42|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  111|     42|             CAMELLIA_SP0222(t0 & 0xff) ^                  \
  |  |  ------------------
  |  |  |  |   96|     42|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  112|     42|             CAMELLIA_SP3033((il >> 8) & 0xff) ^           \
  |  |  ------------------
  |  |  |  |   97|     42|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  113|     42|             CAMELLIA_SP4404(il & 0xff);                   \
  |  |  ------------------
  |  |  |  |   98|     42|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  114|     42|        yl ^= yr;                                          \
  |  |  115|     42|        yr = CAMELLIA_RR8(yr);                             \
  |  |  ------------------
  |  |  |  |   70|     42|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  116|     42|        yr ^= yl;                                          \
  |  |  117|     42|    } while (0)
  |  |  ------------------
  |  |  |  Branch (117:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  812|     42|               CAMELLIA_SIGMA6L, CAMELLIA_SIGMA6R,
  813|     42|               w0, w1, il, ir, t0, t1);
  814|     42|    krll ^= w0;
  815|     42|    krlr ^= w1;
  816|       |
  817|       |    /* generate KA dependent subkeys */
  818|     42|    CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15);
  ------------------
  |  |   77|     42|    do {                                             \
  |  |   78|     42|        w0 = ll;                                     \
  |  |   79|     42|        ll = (ll << bits) + (lr >> (32 - bits));     \
  |  |   80|     42|        lr = (lr << bits) + (rl >> (32 - bits));     \
  |  |   81|     42|        rl = (rl << bits) + (rr >> (32 - bits));     \
  |  |   82|     42|        rr = (rr << bits) + (w0 >> (32 - bits));     \
  |  |   83|     42|    } while (0)
  |  |  ------------------
  |  |  |  Branch (83:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  819|     42|    subl(6) = kll;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  820|     42|    subr(6) = klr;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  821|     42|    subl(7) = krl;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  822|     42|    subr(7) = krr;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  823|     42|    CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 30);
  ------------------
  |  |   77|     42|    do {                                             \
  |  |   78|     42|        w0 = ll;                                     \
  |  |   79|     42|        ll = (ll << bits) + (lr >> (32 - bits));     \
  |  |   80|     42|        lr = (lr << bits) + (rl >> (32 - bits));     \
  |  |   81|     42|        rl = (rl << bits) + (rr >> (32 - bits));     \
  |  |   82|     42|        rr = (rr << bits) + (w0 >> (32 - bits));     \
  |  |   83|     42|    } while (0)
  |  |  ------------------
  |  |  |  Branch (83:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  824|     42|    subl(14) = kll;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  825|     42|    subr(14) = klr;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  826|     42|    subl(15) = krl;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  827|     42|    subr(15) = krr;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  828|     42|    subl(24) = klr;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  829|     42|    subr(24) = krl;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  830|     42|    subl(25) = krr;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  831|     42|    subr(25) = kll;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  832|     42|    CAMELLIA_ROLDQo32(kll, klr, krl, krr, w0, w1, 49);
  ------------------
  |  |   86|     42|    do {                                                \
  |  |   87|     42|        w0 = ll;                                        \
  |  |   88|     42|        w1 = lr;                                        \
  |  |   89|     42|        ll = (lr << (bits - 32)) + (rl >> (64 - bits)); \
  |  |   90|     42|        lr = (rl << (bits - 32)) + (rr >> (64 - bits)); \
  |  |   91|     42|        rl = (rr << (bits - 32)) + (w0 >> (64 - bits)); \
  |  |   92|     42|        rr = (w0 << (bits - 32)) + (w1 >> (64 - bits)); \
  |  |   93|     42|    } while (0)
  |  |  ------------------
  |  |  |  Branch (93:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  833|     42|    subl(28) = kll;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  834|     42|    subr(28) = klr;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  835|     42|    subl(29) = krl;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  836|     42|    subr(29) = krr;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  837|       |
  838|       |    /* generate KB dependent subkeys */
  839|     42|    subl(2) = krll;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  840|     42|    subr(2) = krlr;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  841|     42|    subl(3) = krrl;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  842|     42|    subr(3) = krrr;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  843|     42|    CAMELLIA_ROLDQ(krll, krlr, krrl, krrr, w0, w1, 30);
  ------------------
  |  |   77|     42|    do {                                             \
  |  |   78|     42|        w0 = ll;                                     \
  |  |   79|     42|        ll = (ll << bits) + (lr >> (32 - bits));     \
  |  |   80|     42|        lr = (lr << bits) + (rl >> (32 - bits));     \
  |  |   81|     42|        rl = (rl << bits) + (rr >> (32 - bits));     \
  |  |   82|     42|        rr = (rr << bits) + (w0 >> (32 - bits));     \
  |  |   83|     42|    } while (0)
  |  |  ------------------
  |  |  |  Branch (83:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  844|     42|    subl(10) = krll;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  845|     42|    subr(10) = krlr;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  846|     42|    subl(11) = krrl;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  847|     42|    subr(11) = krrr;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  848|     42|    CAMELLIA_ROLDQ(krll, krlr, krrl, krrr, w0, w1, 30);
  ------------------
  |  |   77|     42|    do {                                             \
  |  |   78|     42|        w0 = ll;                                     \
  |  |   79|     42|        ll = (ll << bits) + (lr >> (32 - bits));     \
  |  |   80|     42|        lr = (lr << bits) + (rl >> (32 - bits));     \
  |  |   81|     42|        rl = (rl << bits) + (rr >> (32 - bits));     \
  |  |   82|     42|        rr = (rr << bits) + (w0 >> (32 - bits));     \
  |  |   83|     42|    } while (0)
  |  |  ------------------
  |  |  |  Branch (83:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  849|     42|    subl(20) = krll;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  850|     42|    subr(20) = krlr;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  851|     42|    subl(21) = krrl;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  852|     42|    subr(21) = krrr;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  853|     42|    CAMELLIA_ROLDQo32(krll, krlr, krrl, krrr, w0, w1, 51);
  ------------------
  |  |   86|     42|    do {                                                \
  |  |   87|     42|        w0 = ll;                                        \
  |  |   88|     42|        w1 = lr;                                        \
  |  |   89|     42|        ll = (lr << (bits - 32)) + (rl >> (64 - bits)); \
  |  |   90|     42|        lr = (rl << (bits - 32)) + (rr >> (64 - bits)); \
  |  |   91|     42|        rl = (rr << (bits - 32)) + (w0 >> (64 - bits)); \
  |  |   92|     42|        rr = (w0 << (bits - 32)) + (w1 >> (64 - bits)); \
  |  |   93|     42|    } while (0)
  |  |  ------------------
  |  |  |  Branch (93:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  854|     42|    subl(32) = krll;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  855|     42|    subr(32) = krlr;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  856|     42|    subl(33) = krrl;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  857|     42|    subr(33) = krrr;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  858|       |
  859|       |    /* absorb kw2 to other subkeys */
  860|     42|    subl(3) ^= subl(1);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  subl(3) ^= subl(1);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  861|     42|    subr(3) ^= subr(1);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  subr(3) ^= subr(1);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  862|     42|    subl(5) ^= subl(1);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  subl(5) ^= subl(1);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  863|     42|    subr(5) ^= subr(1);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  subr(5) ^= subr(1);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  864|     42|    subl(7) ^= subl(1);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  subl(7) ^= subl(1);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  865|     42|    subr(7) ^= subr(1);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  subr(7) ^= subr(1);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  866|     42|    subl(1) ^= subr(1) & ~subr(9);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  subl(1) ^= subr(1) & ~subr(9);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  subl(1) ^= subr(1) & ~subr(9);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  867|     42|    dw = subl(1) & subl(9), subr(1) ^= CAMELLIA_RL1(dw);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  dw = subl(1) & subl(9), subr(1) ^= CAMELLIA_RL1(dw);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  dw = subl(1) & subl(9), subr(1) ^= CAMELLIA_RL1(dw);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  dw = subl(1) & subl(9), subr(1) ^= CAMELLIA_RL1(dw);
  ------------------
  |  |   72|     42|#define CAMELLIA_RL1(x) (((x) << 1) + ((x) >> 31))
  ------------------
  868|     42|    subl(11) ^= subl(1);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  subl(11) ^= subl(1);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  869|     42|    subr(11) ^= subr(1);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  subr(11) ^= subr(1);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  870|     42|    subl(13) ^= subl(1);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  subl(13) ^= subl(1);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  871|     42|    subr(13) ^= subr(1);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  subr(13) ^= subr(1);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  872|     42|    subl(15) ^= subl(1);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  subl(15) ^= subl(1);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  873|     42|    subr(15) ^= subr(1);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  subr(15) ^= subr(1);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  874|     42|    subl(1) ^= subr(1) & ~subr(17);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  subl(1) ^= subr(1) & ~subr(17);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  subl(1) ^= subr(1) & ~subr(17);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  875|     42|    dw = subl(1) & subl(17), subr(1) ^= CAMELLIA_RL1(dw);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  dw = subl(1) & subl(17), subr(1) ^= CAMELLIA_RL1(dw);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  dw = subl(1) & subl(17), subr(1) ^= CAMELLIA_RL1(dw);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  dw = subl(1) & subl(17), subr(1) ^= CAMELLIA_RL1(dw);
  ------------------
  |  |   72|     42|#define CAMELLIA_RL1(x) (((x) << 1) + ((x) >> 31))
  ------------------
  876|     42|    subl(19) ^= subl(1);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  subl(19) ^= subl(1);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  877|     42|    subr(19) ^= subr(1);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  subr(19) ^= subr(1);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  878|     42|    subl(21) ^= subl(1);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  subl(21) ^= subl(1);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  879|     42|    subr(21) ^= subr(1);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  subr(21) ^= subr(1);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  880|     42|    subl(23) ^= subl(1);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  subl(23) ^= subl(1);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  881|     42|    subr(23) ^= subr(1);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  subr(23) ^= subr(1);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  882|     42|    subl(1) ^= subr(1) & ~subr(25);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  subl(1) ^= subr(1) & ~subr(25);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  subl(1) ^= subr(1) & ~subr(25);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  883|     42|    dw = subl(1) & subl(25), subr(1) ^= CAMELLIA_RL1(dw);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  dw = subl(1) & subl(25), subr(1) ^= CAMELLIA_RL1(dw);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  dw = subl(1) & subl(25), subr(1) ^= CAMELLIA_RL1(dw);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  dw = subl(1) & subl(25), subr(1) ^= CAMELLIA_RL1(dw);
  ------------------
  |  |   72|     42|#define CAMELLIA_RL1(x) (((x) << 1) + ((x) >> 31))
  ------------------
  884|     42|    subl(27) ^= subl(1);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  subl(27) ^= subl(1);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  885|     42|    subr(27) ^= subr(1);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  subr(27) ^= subr(1);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  886|     42|    subl(29) ^= subl(1);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  subl(29) ^= subl(1);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  887|     42|    subr(29) ^= subr(1);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  subr(29) ^= subr(1);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  888|     42|    subl(31) ^= subl(1);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  subl(31) ^= subl(1);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  889|     42|    subr(31) ^= subr(1);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  subr(31) ^= subr(1);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  890|     42|    subl(32) ^= subl(1);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  subl(32) ^= subl(1);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  891|     42|    subr(32) ^= subr(1);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  subr(32) ^= subr(1);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  892|       |
  893|       |    /* absorb kw4 to other subkeys */
  894|     42|    kw4l = subl(33);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  895|     42|    kw4r = subr(33);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  896|     42|    subl(30) ^= kw4l;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  897|     42|    subr(30) ^= kw4r;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  898|     42|    subl(28) ^= kw4l;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  899|     42|    subr(28) ^= kw4r;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  900|     42|    subl(26) ^= kw4l;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  901|     42|    subr(26) ^= kw4r;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  902|     42|    kw4l ^= kw4r & ~subr(24);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  903|     42|    dw = kw4l & subl(24), kw4r ^= CAMELLIA_RL1(dw);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  dw = kw4l & subl(24), kw4r ^= CAMELLIA_RL1(dw);
  ------------------
  |  |   72|     42|#define CAMELLIA_RL1(x) (((x) << 1) + ((x) >> 31))
  ------------------
  904|     42|    subl(22) ^= kw4l;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  905|     42|    subr(22) ^= kw4r;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  906|     42|    subl(20) ^= kw4l;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  907|     42|    subr(20) ^= kw4r;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  908|     42|    subl(18) ^= kw4l;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  909|     42|    subr(18) ^= kw4r;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  910|     42|    kw4l ^= kw4r & ~subr(16);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  911|     42|    dw = kw4l & subl(16), kw4r ^= CAMELLIA_RL1(dw);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  dw = kw4l & subl(16), kw4r ^= CAMELLIA_RL1(dw);
  ------------------
  |  |   72|     42|#define CAMELLIA_RL1(x) (((x) << 1) + ((x) >> 31))
  ------------------
  912|     42|    subl(14) ^= kw4l;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  913|     42|    subr(14) ^= kw4r;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  914|     42|    subl(12) ^= kw4l;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  915|     42|    subr(12) ^= kw4r;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  916|     42|    subl(10) ^= kw4l;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  917|     42|    subr(10) ^= kw4r;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  918|     42|    kw4l ^= kw4r & ~subr(8);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  919|     42|    dw = kw4l & subl(8), kw4r ^= CAMELLIA_RL1(dw);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  dw = kw4l & subl(8), kw4r ^= CAMELLIA_RL1(dw);
  ------------------
  |  |   72|     42|#define CAMELLIA_RL1(x) (((x) << 1) + ((x) >> 31))
  ------------------
  920|     42|    subl(6) ^= kw4l;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  921|     42|    subr(6) ^= kw4r;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  922|     42|    subl(4) ^= kw4l;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  923|     42|    subr(4) ^= kw4r;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  924|     42|    subl(2) ^= kw4l;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  925|     42|    subr(2) ^= kw4r;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  926|     42|    subl(0) ^= kw4l;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  927|     42|    subr(0) ^= kw4r;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  928|       |
  929|       |    /* key XOR is end of F-function */
  930|     42|    CamelliaSubkeyL(0) = subl(0) ^ subl(2);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(0) = subl(0) ^ subl(2);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  CamelliaSubkeyL(0) = subl(0) ^ subl(2);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  931|     42|    CamelliaSubkeyR(0) = subr(0) ^ subr(2);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(0) = subr(0) ^ subr(2);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  CamelliaSubkeyR(0) = subr(0) ^ subr(2);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  932|     42|    CamelliaSubkeyL(2) = subl(3);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(2) = subl(3);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  933|     42|    CamelliaSubkeyR(2) = subr(3);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(2) = subr(3);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  934|     42|    CamelliaSubkeyL(3) = subl(2) ^ subl(4);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(3) = subl(2) ^ subl(4);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  CamelliaSubkeyL(3) = subl(2) ^ subl(4);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  935|     42|    CamelliaSubkeyR(3) = subr(2) ^ subr(4);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(3) = subr(2) ^ subr(4);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  CamelliaSubkeyR(3) = subr(2) ^ subr(4);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  936|     42|    CamelliaSubkeyL(4) = subl(3) ^ subl(5);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(4) = subl(3) ^ subl(5);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  CamelliaSubkeyL(4) = subl(3) ^ subl(5);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  937|     42|    CamelliaSubkeyR(4) = subr(3) ^ subr(5);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(4) = subr(3) ^ subr(5);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  CamelliaSubkeyR(4) = subr(3) ^ subr(5);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  938|     42|    CamelliaSubkeyL(5) = subl(4) ^ subl(6);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(5) = subl(4) ^ subl(6);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  CamelliaSubkeyL(5) = subl(4) ^ subl(6);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  939|     42|    CamelliaSubkeyR(5) = subr(4) ^ subr(6);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(5) = subr(4) ^ subr(6);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  CamelliaSubkeyR(5) = subr(4) ^ subr(6);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  940|     42|    CamelliaSubkeyL(6) = subl(5) ^ subl(7);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(6) = subl(5) ^ subl(7);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  CamelliaSubkeyL(6) = subl(5) ^ subl(7);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  941|     42|    CamelliaSubkeyR(6) = subr(5) ^ subr(7);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(6) = subr(5) ^ subr(7);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  CamelliaSubkeyR(6) = subr(5) ^ subr(7);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  942|     42|    tl = subl(10) ^ (subr(10) & ~subr(8));
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  tl = subl(10) ^ (subr(10) & ~subr(8));
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  tl = subl(10) ^ (subr(10) & ~subr(8));
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  943|     42|    dw = tl & subl(8), tr = subr(10) ^ CAMELLIA_RL1(dw);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  dw = tl & subl(8), tr = subr(10) ^ CAMELLIA_RL1(dw);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  dw = tl & subl(8), tr = subr(10) ^ CAMELLIA_RL1(dw);
  ------------------
  |  |   72|     42|#define CAMELLIA_RL1(x) (((x) << 1) + ((x) >> 31))
  ------------------
  944|     42|    CamelliaSubkeyL(7) = subl(6) ^ tl;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(7) = subl(6) ^ tl;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  945|     42|    CamelliaSubkeyR(7) = subr(6) ^ tr;
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(7) = subr(6) ^ tr;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  946|     42|    CamelliaSubkeyL(8) = subl(8);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(8) = subl(8);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  947|     42|    CamelliaSubkeyR(8) = subr(8);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(8) = subr(8);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  948|     42|    CamelliaSubkeyL(9) = subl(9);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(9) = subl(9);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  949|     42|    CamelliaSubkeyR(9) = subr(9);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(9) = subr(9);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  950|     42|    tl = subl(7) ^ (subr(7) & ~subr(9));
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  tl = subl(7) ^ (subr(7) & ~subr(9));
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  tl = subl(7) ^ (subr(7) & ~subr(9));
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  951|     42|    dw = tl & subl(9), tr = subr(7) ^ CAMELLIA_RL1(dw);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  dw = tl & subl(9), tr = subr(7) ^ CAMELLIA_RL1(dw);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  dw = tl & subl(9), tr = subr(7) ^ CAMELLIA_RL1(dw);
  ------------------
  |  |   72|     42|#define CAMELLIA_RL1(x) (((x) << 1) + ((x) >> 31))
  ------------------
  952|     42|    CamelliaSubkeyL(10) = tl ^ subl(11);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(10) = tl ^ subl(11);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  953|     42|    CamelliaSubkeyR(10) = tr ^ subr(11);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(10) = tr ^ subr(11);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  954|     42|    CamelliaSubkeyL(11) = subl(10) ^ subl(12);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(11) = subl(10) ^ subl(12);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  CamelliaSubkeyL(11) = subl(10) ^ subl(12);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  955|     42|    CamelliaSubkeyR(11) = subr(10) ^ subr(12);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(11) = subr(10) ^ subr(12);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  CamelliaSubkeyR(11) = subr(10) ^ subr(12);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  956|     42|    CamelliaSubkeyL(12) = subl(11) ^ subl(13);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(12) = subl(11) ^ subl(13);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  CamelliaSubkeyL(12) = subl(11) ^ subl(13);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  957|     42|    CamelliaSubkeyR(12) = subr(11) ^ subr(13);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(12) = subr(11) ^ subr(13);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  CamelliaSubkeyR(12) = subr(11) ^ subr(13);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  958|     42|    CamelliaSubkeyL(13) = subl(12) ^ subl(14);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(13) = subl(12) ^ subl(14);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  CamelliaSubkeyL(13) = subl(12) ^ subl(14);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  959|     42|    CamelliaSubkeyR(13) = subr(12) ^ subr(14);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(13) = subr(12) ^ subr(14);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  CamelliaSubkeyR(13) = subr(12) ^ subr(14);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  960|     42|    CamelliaSubkeyL(14) = subl(13) ^ subl(15);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(14) = subl(13) ^ subl(15);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  CamelliaSubkeyL(14) = subl(13) ^ subl(15);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  961|     42|    CamelliaSubkeyR(14) = subr(13) ^ subr(15);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(14) = subr(13) ^ subr(15);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  CamelliaSubkeyR(14) = subr(13) ^ subr(15);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  962|     42|    tl = subl(18) ^ (subr(18) & ~subr(16));
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  tl = subl(18) ^ (subr(18) & ~subr(16));
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  tl = subl(18) ^ (subr(18) & ~subr(16));
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  963|     42|    dw = tl & subl(16), tr = subr(18) ^ CAMELLIA_RL1(dw);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  dw = tl & subl(16), tr = subr(18) ^ CAMELLIA_RL1(dw);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  dw = tl & subl(16), tr = subr(18) ^ CAMELLIA_RL1(dw);
  ------------------
  |  |   72|     42|#define CAMELLIA_RL1(x) (((x) << 1) + ((x) >> 31))
  ------------------
  964|     42|    CamelliaSubkeyL(15) = subl(14) ^ tl;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(15) = subl(14) ^ tl;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  965|     42|    CamelliaSubkeyR(15) = subr(14) ^ tr;
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(15) = subr(14) ^ tr;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  966|     42|    CamelliaSubkeyL(16) = subl(16);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(16) = subl(16);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  967|     42|    CamelliaSubkeyR(16) = subr(16);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(16) = subr(16);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  968|     42|    CamelliaSubkeyL(17) = subl(17);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(17) = subl(17);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  969|     42|    CamelliaSubkeyR(17) = subr(17);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(17) = subr(17);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  970|     42|    tl = subl(15) ^ (subr(15) & ~subr(17));
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  tl = subl(15) ^ (subr(15) & ~subr(17));
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  tl = subl(15) ^ (subr(15) & ~subr(17));
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  971|     42|    dw = tl & subl(17), tr = subr(15) ^ CAMELLIA_RL1(dw);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  dw = tl & subl(17), tr = subr(15) ^ CAMELLIA_RL1(dw);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  dw = tl & subl(17), tr = subr(15) ^ CAMELLIA_RL1(dw);
  ------------------
  |  |   72|     42|#define CAMELLIA_RL1(x) (((x) << 1) + ((x) >> 31))
  ------------------
  972|     42|    CamelliaSubkeyL(18) = tl ^ subl(19);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(18) = tl ^ subl(19);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  973|     42|    CamelliaSubkeyR(18) = tr ^ subr(19);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(18) = tr ^ subr(19);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  974|     42|    CamelliaSubkeyL(19) = subl(18) ^ subl(20);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(19) = subl(18) ^ subl(20);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  CamelliaSubkeyL(19) = subl(18) ^ subl(20);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  975|     42|    CamelliaSubkeyR(19) = subr(18) ^ subr(20);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(19) = subr(18) ^ subr(20);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  CamelliaSubkeyR(19) = subr(18) ^ subr(20);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  976|     42|    CamelliaSubkeyL(20) = subl(19) ^ subl(21);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(20) = subl(19) ^ subl(21);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  CamelliaSubkeyL(20) = subl(19) ^ subl(21);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  977|     42|    CamelliaSubkeyR(20) = subr(19) ^ subr(21);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(20) = subr(19) ^ subr(21);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  CamelliaSubkeyR(20) = subr(19) ^ subr(21);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  978|     42|    CamelliaSubkeyL(21) = subl(20) ^ subl(22);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(21) = subl(20) ^ subl(22);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  CamelliaSubkeyL(21) = subl(20) ^ subl(22);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  979|     42|    CamelliaSubkeyR(21) = subr(20) ^ subr(22);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(21) = subr(20) ^ subr(22);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  CamelliaSubkeyR(21) = subr(20) ^ subr(22);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  980|     42|    CamelliaSubkeyL(22) = subl(21) ^ subl(23);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(22) = subl(21) ^ subl(23);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  CamelliaSubkeyL(22) = subl(21) ^ subl(23);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  981|     42|    CamelliaSubkeyR(22) = subr(21) ^ subr(23);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(22) = subr(21) ^ subr(23);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  CamelliaSubkeyR(22) = subr(21) ^ subr(23);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  982|     42|    tl = subl(26) ^ (subr(26) & ~subr(24));
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  tl = subl(26) ^ (subr(26) & ~subr(24));
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  tl = subl(26) ^ (subr(26) & ~subr(24));
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  983|     42|    dw = tl & subl(24), tr = subr(26) ^ CAMELLIA_RL1(dw);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  dw = tl & subl(24), tr = subr(26) ^ CAMELLIA_RL1(dw);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  dw = tl & subl(24), tr = subr(26) ^ CAMELLIA_RL1(dw);
  ------------------
  |  |   72|     42|#define CAMELLIA_RL1(x) (((x) << 1) + ((x) >> 31))
  ------------------
  984|     42|    CamelliaSubkeyL(23) = subl(22) ^ tl;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(23) = subl(22) ^ tl;
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  985|     42|    CamelliaSubkeyR(23) = subr(22) ^ tr;
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(23) = subr(22) ^ tr;
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  986|     42|    CamelliaSubkeyL(24) = subl(24);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(24) = subl(24);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  987|     42|    CamelliaSubkeyR(24) = subr(24);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(24) = subr(24);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  988|     42|    CamelliaSubkeyL(25) = subl(25);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(25) = subl(25);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  989|     42|    CamelliaSubkeyR(25) = subr(25);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(25) = subr(25);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  990|     42|    tl = subl(23) ^ (subr(23) & ~subr(25));
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  tl = subl(23) ^ (subr(23) & ~subr(25));
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  tl = subl(23) ^ (subr(23) & ~subr(25));
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  991|     42|    dw = tl & subl(25), tr = subr(23) ^ CAMELLIA_RL1(dw);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  dw = tl & subl(25), tr = subr(23) ^ CAMELLIA_RL1(dw);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  dw = tl & subl(25), tr = subr(23) ^ CAMELLIA_RL1(dw);
  ------------------
  |  |   72|     42|#define CAMELLIA_RL1(x) (((x) << 1) + ((x) >> 31))
  ------------------
  992|     42|    CamelliaSubkeyL(26) = tl ^ subl(27);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(26) = tl ^ subl(27);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  993|     42|    CamelliaSubkeyR(26) = tr ^ subr(27);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(26) = tr ^ subr(27);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  994|     42|    CamelliaSubkeyL(27) = subl(26) ^ subl(28);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(27) = subl(26) ^ subl(28);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  CamelliaSubkeyL(27) = subl(26) ^ subl(28);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  995|     42|    CamelliaSubkeyR(27) = subr(26) ^ subr(28);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(27) = subr(26) ^ subr(28);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  CamelliaSubkeyR(27) = subr(26) ^ subr(28);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  996|     42|    CamelliaSubkeyL(28) = subl(27) ^ subl(29);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(28) = subl(27) ^ subl(29);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  CamelliaSubkeyL(28) = subl(27) ^ subl(29);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  997|     42|    CamelliaSubkeyR(28) = subr(27) ^ subr(29);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(28) = subr(27) ^ subr(29);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  CamelliaSubkeyR(28) = subr(27) ^ subr(29);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
  998|     42|    CamelliaSubkeyL(29) = subl(28) ^ subl(30);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(29) = subl(28) ^ subl(30);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  CamelliaSubkeyL(29) = subl(28) ^ subl(30);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
  999|     42|    CamelliaSubkeyR(29) = subr(28) ^ subr(30);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(29) = subr(28) ^ subr(30);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  CamelliaSubkeyR(29) = subr(28) ^ subr(30);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
 1000|     42|    CamelliaSubkeyL(30) = subl(29) ^ subl(31);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(30) = subl(29) ^ subl(31);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  CamelliaSubkeyL(30) = subl(29) ^ subl(31);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
 1001|     42|    CamelliaSubkeyR(30) = subr(29) ^ subr(31);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(30) = subr(29) ^ subr(31);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  CamelliaSubkeyR(30) = subr(29) ^ subr(31);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
 1002|     42|    CamelliaSubkeyL(31) = subl(30);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(31) = subl(30);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
 1003|     42|    CamelliaSubkeyR(31) = subr(30);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(31) = subr(30);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
 1004|     42|    CamelliaSubkeyL(32) = subl(32) ^ subl(31);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyL(32) = subl(32) ^ subl(31);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
                  CamelliaSubkeyL(32) = subl(32) ^ subl(31);
  ------------------
  |  |  430|     42|#define subl(x) subL[(x)]
  ------------------
 1005|     42|    CamelliaSubkeyR(32) = subr(32) ^ subr(31);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(32) = subr(32) ^ subr(31);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
                  CamelliaSubkeyR(32) = subr(32) ^ subr(31);
  ------------------
  |  |  431|     42|#define subr(x) subR[(x)]
  ------------------
 1006|       |
 1007|       |    /* apply the inverse of the last half of P-function */
 1008|     42|    dw = CamelliaSubkeyL(2) ^ CamelliaSubkeyR(2), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  dw = CamelliaSubkeyL(2) ^ CamelliaSubkeyR(2), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  dw = CamelliaSubkeyL(2) ^ CamelliaSubkeyR(2), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   74|     42|#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24))
  ------------------
 1009|     42|    CamelliaSubkeyR(2) = CamelliaSubkeyL(2) ^ dw, CamelliaSubkeyL(2) = dw;
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(2) = CamelliaSubkeyL(2) ^ dw, CamelliaSubkeyL(2) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyR(2) = CamelliaSubkeyL(2) ^ dw, CamelliaSubkeyL(2) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
 1010|     42|    dw = CamelliaSubkeyL(3) ^ CamelliaSubkeyR(3), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  dw = CamelliaSubkeyL(3) ^ CamelliaSubkeyR(3), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  dw = CamelliaSubkeyL(3) ^ CamelliaSubkeyR(3), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   74|     42|#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24))
  ------------------
 1011|     42|    CamelliaSubkeyR(3) = CamelliaSubkeyL(3) ^ dw, CamelliaSubkeyL(3) = dw;
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(3) = CamelliaSubkeyL(3) ^ dw, CamelliaSubkeyL(3) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyR(3) = CamelliaSubkeyL(3) ^ dw, CamelliaSubkeyL(3) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
 1012|     42|    dw = CamelliaSubkeyL(4) ^ CamelliaSubkeyR(4), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  dw = CamelliaSubkeyL(4) ^ CamelliaSubkeyR(4), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  dw = CamelliaSubkeyL(4) ^ CamelliaSubkeyR(4), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   74|     42|#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24))
  ------------------
 1013|     42|    CamelliaSubkeyR(4) = CamelliaSubkeyL(4) ^ dw, CamelliaSubkeyL(4) = dw;
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(4) = CamelliaSubkeyL(4) ^ dw, CamelliaSubkeyL(4) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyR(4) = CamelliaSubkeyL(4) ^ dw, CamelliaSubkeyL(4) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
 1014|     42|    dw = CamelliaSubkeyL(5) ^ CamelliaSubkeyR(5), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  dw = CamelliaSubkeyL(5) ^ CamelliaSubkeyR(5), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  dw = CamelliaSubkeyL(5) ^ CamelliaSubkeyR(5), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   74|     42|#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24))
  ------------------
 1015|     42|    CamelliaSubkeyR(5) = CamelliaSubkeyL(5) ^ dw, CamelliaSubkeyL(5) = dw;
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(5) = CamelliaSubkeyL(5) ^ dw, CamelliaSubkeyL(5) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyR(5) = CamelliaSubkeyL(5) ^ dw, CamelliaSubkeyL(5) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
 1016|     42|    dw = CamelliaSubkeyL(6) ^ CamelliaSubkeyR(6), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  dw = CamelliaSubkeyL(6) ^ CamelliaSubkeyR(6), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  dw = CamelliaSubkeyL(6) ^ CamelliaSubkeyR(6), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   74|     42|#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24))
  ------------------
 1017|     42|    CamelliaSubkeyR(6) = CamelliaSubkeyL(6) ^ dw, CamelliaSubkeyL(6) = dw;
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(6) = CamelliaSubkeyL(6) ^ dw, CamelliaSubkeyL(6) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyR(6) = CamelliaSubkeyL(6) ^ dw, CamelliaSubkeyL(6) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
 1018|     42|    dw = CamelliaSubkeyL(7) ^ CamelliaSubkeyR(7), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  dw = CamelliaSubkeyL(7) ^ CamelliaSubkeyR(7), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  dw = CamelliaSubkeyL(7) ^ CamelliaSubkeyR(7), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   74|     42|#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24))
  ------------------
 1019|     42|    CamelliaSubkeyR(7) = CamelliaSubkeyL(7) ^ dw, CamelliaSubkeyL(7) = dw;
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(7) = CamelliaSubkeyL(7) ^ dw, CamelliaSubkeyL(7) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyR(7) = CamelliaSubkeyL(7) ^ dw, CamelliaSubkeyL(7) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
 1020|     42|    dw = CamelliaSubkeyL(10) ^ CamelliaSubkeyR(10), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  dw = CamelliaSubkeyL(10) ^ CamelliaSubkeyR(10), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  dw = CamelliaSubkeyL(10) ^ CamelliaSubkeyR(10), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   74|     42|#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24))
  ------------------
 1021|     42|    CamelliaSubkeyR(10) = CamelliaSubkeyL(10) ^ dw, CamelliaSubkeyL(10) = dw;
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(10) = CamelliaSubkeyL(10) ^ dw, CamelliaSubkeyL(10) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyR(10) = CamelliaSubkeyL(10) ^ dw, CamelliaSubkeyL(10) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
 1022|     42|    dw = CamelliaSubkeyL(11) ^ CamelliaSubkeyR(11), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  dw = CamelliaSubkeyL(11) ^ CamelliaSubkeyR(11), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  dw = CamelliaSubkeyL(11) ^ CamelliaSubkeyR(11), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   74|     42|#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24))
  ------------------
 1023|     42|    CamelliaSubkeyR(11) = CamelliaSubkeyL(11) ^ dw, CamelliaSubkeyL(11) = dw;
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(11) = CamelliaSubkeyL(11) ^ dw, CamelliaSubkeyL(11) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyR(11) = CamelliaSubkeyL(11) ^ dw, CamelliaSubkeyL(11) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
 1024|     42|    dw = CamelliaSubkeyL(12) ^ CamelliaSubkeyR(12), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  dw = CamelliaSubkeyL(12) ^ CamelliaSubkeyR(12), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  dw = CamelliaSubkeyL(12) ^ CamelliaSubkeyR(12), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   74|     42|#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24))
  ------------------
 1025|     42|    CamelliaSubkeyR(12) = CamelliaSubkeyL(12) ^ dw, CamelliaSubkeyL(12) = dw;
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(12) = CamelliaSubkeyL(12) ^ dw, CamelliaSubkeyL(12) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyR(12) = CamelliaSubkeyL(12) ^ dw, CamelliaSubkeyL(12) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
 1026|     42|    dw = CamelliaSubkeyL(13) ^ CamelliaSubkeyR(13), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  dw = CamelliaSubkeyL(13) ^ CamelliaSubkeyR(13), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  dw = CamelliaSubkeyL(13) ^ CamelliaSubkeyR(13), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   74|     42|#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24))
  ------------------
 1027|     42|    CamelliaSubkeyR(13) = CamelliaSubkeyL(13) ^ dw, CamelliaSubkeyL(13) = dw;
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(13) = CamelliaSubkeyL(13) ^ dw, CamelliaSubkeyL(13) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyR(13) = CamelliaSubkeyL(13) ^ dw, CamelliaSubkeyL(13) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
 1028|     42|    dw = CamelliaSubkeyL(14) ^ CamelliaSubkeyR(14), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  dw = CamelliaSubkeyL(14) ^ CamelliaSubkeyR(14), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  dw = CamelliaSubkeyL(14) ^ CamelliaSubkeyR(14), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   74|     42|#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24))
  ------------------
 1029|     42|    CamelliaSubkeyR(14) = CamelliaSubkeyL(14) ^ dw, CamelliaSubkeyL(14) = dw;
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(14) = CamelliaSubkeyL(14) ^ dw, CamelliaSubkeyL(14) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyR(14) = CamelliaSubkeyL(14) ^ dw, CamelliaSubkeyL(14) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
 1030|     42|    dw = CamelliaSubkeyL(15) ^ CamelliaSubkeyR(15), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  dw = CamelliaSubkeyL(15) ^ CamelliaSubkeyR(15), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  dw = CamelliaSubkeyL(15) ^ CamelliaSubkeyR(15), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   74|     42|#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24))
  ------------------
 1031|     42|    CamelliaSubkeyR(15) = CamelliaSubkeyL(15) ^ dw, CamelliaSubkeyL(15) = dw;
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(15) = CamelliaSubkeyL(15) ^ dw, CamelliaSubkeyL(15) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyR(15) = CamelliaSubkeyL(15) ^ dw, CamelliaSubkeyL(15) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
 1032|     42|    dw = CamelliaSubkeyL(18) ^ CamelliaSubkeyR(18), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  dw = CamelliaSubkeyL(18) ^ CamelliaSubkeyR(18), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  dw = CamelliaSubkeyL(18) ^ CamelliaSubkeyR(18), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   74|     42|#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24))
  ------------------
 1033|     42|    CamelliaSubkeyR(18) = CamelliaSubkeyL(18) ^ dw, CamelliaSubkeyL(18) = dw;
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(18) = CamelliaSubkeyL(18) ^ dw, CamelliaSubkeyL(18) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyR(18) = CamelliaSubkeyL(18) ^ dw, CamelliaSubkeyL(18) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
 1034|     42|    dw = CamelliaSubkeyL(19) ^ CamelliaSubkeyR(19), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  dw = CamelliaSubkeyL(19) ^ CamelliaSubkeyR(19), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  dw = CamelliaSubkeyL(19) ^ CamelliaSubkeyR(19), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   74|     42|#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24))
  ------------------
 1035|     42|    CamelliaSubkeyR(19) = CamelliaSubkeyL(19) ^ dw, CamelliaSubkeyL(19) = dw;
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(19) = CamelliaSubkeyL(19) ^ dw, CamelliaSubkeyL(19) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyR(19) = CamelliaSubkeyL(19) ^ dw, CamelliaSubkeyL(19) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
 1036|     42|    dw = CamelliaSubkeyL(20) ^ CamelliaSubkeyR(20), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  dw = CamelliaSubkeyL(20) ^ CamelliaSubkeyR(20), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  dw = CamelliaSubkeyL(20) ^ CamelliaSubkeyR(20), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   74|     42|#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24))
  ------------------
 1037|     42|    CamelliaSubkeyR(20) = CamelliaSubkeyL(20) ^ dw, CamelliaSubkeyL(20) = dw;
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(20) = CamelliaSubkeyL(20) ^ dw, CamelliaSubkeyL(20) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyR(20) = CamelliaSubkeyL(20) ^ dw, CamelliaSubkeyL(20) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
 1038|     42|    dw = CamelliaSubkeyL(21) ^ CamelliaSubkeyR(21), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  dw = CamelliaSubkeyL(21) ^ CamelliaSubkeyR(21), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  dw = CamelliaSubkeyL(21) ^ CamelliaSubkeyR(21), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   74|     42|#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24))
  ------------------
 1039|     42|    CamelliaSubkeyR(21) = CamelliaSubkeyL(21) ^ dw, CamelliaSubkeyL(21) = dw;
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(21) = CamelliaSubkeyL(21) ^ dw, CamelliaSubkeyL(21) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyR(21) = CamelliaSubkeyL(21) ^ dw, CamelliaSubkeyL(21) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
 1040|     42|    dw = CamelliaSubkeyL(22) ^ CamelliaSubkeyR(22), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  dw = CamelliaSubkeyL(22) ^ CamelliaSubkeyR(22), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  dw = CamelliaSubkeyL(22) ^ CamelliaSubkeyR(22), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   74|     42|#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24))
  ------------------
 1041|     42|    CamelliaSubkeyR(22) = CamelliaSubkeyL(22) ^ dw, CamelliaSubkeyL(22) = dw;
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(22) = CamelliaSubkeyL(22) ^ dw, CamelliaSubkeyL(22) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyR(22) = CamelliaSubkeyL(22) ^ dw, CamelliaSubkeyL(22) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
 1042|     42|    dw = CamelliaSubkeyL(23) ^ CamelliaSubkeyR(23), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  dw = CamelliaSubkeyL(23) ^ CamelliaSubkeyR(23), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  dw = CamelliaSubkeyL(23) ^ CamelliaSubkeyR(23), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   74|     42|#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24))
  ------------------
 1043|     42|    CamelliaSubkeyR(23) = CamelliaSubkeyL(23) ^ dw, CamelliaSubkeyL(23) = dw;
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(23) = CamelliaSubkeyL(23) ^ dw, CamelliaSubkeyL(23) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyR(23) = CamelliaSubkeyL(23) ^ dw, CamelliaSubkeyL(23) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
 1044|     42|    dw = CamelliaSubkeyL(26) ^ CamelliaSubkeyR(26), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  dw = CamelliaSubkeyL(26) ^ CamelliaSubkeyR(26), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  dw = CamelliaSubkeyL(26) ^ CamelliaSubkeyR(26), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   74|     42|#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24))
  ------------------
 1045|     42|    CamelliaSubkeyR(26) = CamelliaSubkeyL(26) ^ dw, CamelliaSubkeyL(26) = dw;
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(26) = CamelliaSubkeyL(26) ^ dw, CamelliaSubkeyL(26) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyR(26) = CamelliaSubkeyL(26) ^ dw, CamelliaSubkeyL(26) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
 1046|     42|    dw = CamelliaSubkeyL(27) ^ CamelliaSubkeyR(27), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  dw = CamelliaSubkeyL(27) ^ CamelliaSubkeyR(27), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  dw = CamelliaSubkeyL(27) ^ CamelliaSubkeyR(27), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   74|     42|#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24))
  ------------------
 1047|     42|    CamelliaSubkeyR(27) = CamelliaSubkeyL(27) ^ dw, CamelliaSubkeyL(27) = dw;
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(27) = CamelliaSubkeyL(27) ^ dw, CamelliaSubkeyL(27) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyR(27) = CamelliaSubkeyL(27) ^ dw, CamelliaSubkeyL(27) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
 1048|     42|    dw = CamelliaSubkeyL(28) ^ CamelliaSubkeyR(28), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  dw = CamelliaSubkeyL(28) ^ CamelliaSubkeyR(28), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  dw = CamelliaSubkeyL(28) ^ CamelliaSubkeyR(28), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   74|     42|#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24))
  ------------------
 1049|     42|    CamelliaSubkeyR(28) = CamelliaSubkeyL(28) ^ dw, CamelliaSubkeyL(28) = dw;
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(28) = CamelliaSubkeyL(28) ^ dw, CamelliaSubkeyL(28) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyR(28) = CamelliaSubkeyL(28) ^ dw, CamelliaSubkeyL(28) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
 1050|     42|    dw = CamelliaSubkeyL(29) ^ CamelliaSubkeyR(29), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  dw = CamelliaSubkeyL(29) ^ CamelliaSubkeyR(29), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  dw = CamelliaSubkeyL(29) ^ CamelliaSubkeyR(29), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   74|     42|#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24))
  ------------------
 1051|     42|    CamelliaSubkeyR(29) = CamelliaSubkeyL(29) ^ dw, CamelliaSubkeyL(29) = dw;
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(29) = CamelliaSubkeyL(29) ^ dw, CamelliaSubkeyL(29) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyR(29) = CamelliaSubkeyL(29) ^ dw, CamelliaSubkeyL(29) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
 1052|     42|    dw = CamelliaSubkeyL(30) ^ CamelliaSubkeyR(30), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  dw = CamelliaSubkeyL(30) ^ CamelliaSubkeyR(30), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  dw = CamelliaSubkeyL(30) ^ CamelliaSubkeyR(30), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   74|     42|#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24))
  ------------------
 1053|     42|    CamelliaSubkeyR(30) = CamelliaSubkeyL(30) ^ dw, CamelliaSubkeyL(30) = dw;
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(30) = CamelliaSubkeyL(30) ^ dw, CamelliaSubkeyL(30) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyR(30) = CamelliaSubkeyL(30) ^ dw, CamelliaSubkeyL(30) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
 1054|     42|    dw = CamelliaSubkeyL(31) ^ CamelliaSubkeyR(31), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  dw = CamelliaSubkeyL(31) ^ CamelliaSubkeyR(31), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  dw = CamelliaSubkeyL(31) ^ CamelliaSubkeyR(31), dw = CAMELLIA_RL8(dw);
  ------------------
  |  |   74|     42|#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24))
  ------------------
 1055|     42|    CamelliaSubkeyR(31) = CamelliaSubkeyL(31) ^ dw, CamelliaSubkeyL(31) = dw;
  ------------------
  |  |   67|     42|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
                  CamelliaSubkeyR(31) = CamelliaSubkeyL(31) ^ dw, CamelliaSubkeyL(31) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
                  CamelliaSubkeyR(31) = CamelliaSubkeyL(31) ^ dw, CamelliaSubkeyL(31) = dw;
  ------------------
  |  |   66|     42|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
 1056|       |
 1057|     42|    return;
 1058|     42|}
camellia_encrypt128:
 1085|    302|{
 1086|    302|    PRUint32 il, ir, t0, t1;
 1087|    302|    PRUint32 io[4];
 1088|       |#if defined(CAMELLIA_NEED_TMP_VARIABLE)
 1089|       |    PRUint32 tmp;
 1090|       |#endif
 1091|       |
 1092|    302|    io[0] = GETU32(input);
  ------------------
  |  |   45|    302|#define GETU32(p) SHA_HTONL(*((PRUint32 *)(p)))
  |  |  ------------------
  |  |  |  |   97|    302|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
 1093|    302|    io[1] = GETU32(input + 4);
  ------------------
  |  |   45|    302|#define GETU32(p) SHA_HTONL(*((PRUint32 *)(p)))
  |  |  ------------------
  |  |  |  |   97|    302|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
 1094|    302|    io[2] = GETU32(input + 8);
  ------------------
  |  |   45|    302|#define GETU32(p) SHA_HTONL(*((PRUint32 *)(p)))
  |  |  ------------------
  |  |  |  |   97|    302|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
 1095|    302|    io[3] = GETU32(input + 12);
  ------------------
  |  |   45|    302|#define GETU32(p) SHA_HTONL(*((PRUint32 *)(p)))
  |  |  ------------------
  |  |  |  |   97|    302|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
 1096|       |
 1097|       |    /* pre whitening but absorb kw2*/
 1098|    302|    io[0] ^= CamelliaSubkeyL(0);
  ------------------
  |  |   66|    302|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
 1099|    302|    io[1] ^= CamelliaSubkeyR(0);
  ------------------
  |  |   67|    302|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
 1100|       |    /* main iteration */
 1101|       |
 1102|    302|    CAMELLIA_ROUNDSM(io[0], io[1],
  ------------------
  |  |  141|    302|    do {                                                         \
  |  |  142|    302|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|    302|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|    302|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|    302|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|    302|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|    302|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|    302|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|    302|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|    302|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|    302|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|    302|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|    302|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|    302|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|    302|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|    302|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|    302|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|    302|        il ^= kl;                                                \
  |  |  151|    302|        ir ^= kr;                                                \
  |  |  152|    302|        ir ^= il;                                                \
  |  |  153|    302|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|    302|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|    302|        il ^= ir;                                                \
  |  |  155|    302|        yl ^= ir;                                                \
  |  |  156|    302|        yr ^= il;                                                \
  |  |  157|    302|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1103|    302|                     CamelliaSubkeyL(2), CamelliaSubkeyR(2),
 1104|    302|                     io[2], io[3], il, ir, t0, t1);
 1105|    302|    CAMELLIA_ROUNDSM(io[2], io[3],
  ------------------
  |  |  141|    302|    do {                                                         \
  |  |  142|    302|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|    302|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|    302|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|    302|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|    302|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|    302|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|    302|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|    302|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|    302|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|    302|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|    302|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|    302|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|    302|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|    302|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|    302|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|    302|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|    302|        il ^= kl;                                                \
  |  |  151|    302|        ir ^= kr;                                                \
  |  |  152|    302|        ir ^= il;                                                \
  |  |  153|    302|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|    302|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|    302|        il ^= ir;                                                \
  |  |  155|    302|        yl ^= ir;                                                \
  |  |  156|    302|        yr ^= il;                                                \
  |  |  157|    302|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1106|    302|                     CamelliaSubkeyL(3), CamelliaSubkeyR(3),
 1107|    302|                     io[0], io[1], il, ir, t0, t1);
 1108|    302|    CAMELLIA_ROUNDSM(io[0], io[1],
  ------------------
  |  |  141|    302|    do {                                                         \
  |  |  142|    302|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|    302|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|    302|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|    302|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|    302|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|    302|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|    302|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|    302|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|    302|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|    302|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|    302|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|    302|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|    302|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|    302|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|    302|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|    302|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|    302|        il ^= kl;                                                \
  |  |  151|    302|        ir ^= kr;                                                \
  |  |  152|    302|        ir ^= il;                                                \
  |  |  153|    302|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|    302|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|    302|        il ^= ir;                                                \
  |  |  155|    302|        yl ^= ir;                                                \
  |  |  156|    302|        yr ^= il;                                                \
  |  |  157|    302|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1109|    302|                     CamelliaSubkeyL(4), CamelliaSubkeyR(4),
 1110|    302|                     io[2], io[3], il, ir, t0, t1);
 1111|    302|    CAMELLIA_ROUNDSM(io[2], io[3],
  ------------------
  |  |  141|    302|    do {                                                         \
  |  |  142|    302|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|    302|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|    302|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|    302|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|    302|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|    302|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|    302|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|    302|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|    302|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|    302|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|    302|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|    302|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|    302|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|    302|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|    302|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|    302|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|    302|        il ^= kl;                                                \
  |  |  151|    302|        ir ^= kr;                                                \
  |  |  152|    302|        ir ^= il;                                                \
  |  |  153|    302|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|    302|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|    302|        il ^= ir;                                                \
  |  |  155|    302|        yl ^= ir;                                                \
  |  |  156|    302|        yr ^= il;                                                \
  |  |  157|    302|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1112|    302|                     CamelliaSubkeyL(5), CamelliaSubkeyR(5),
 1113|    302|                     io[0], io[1], il, ir, t0, t1);
 1114|    302|    CAMELLIA_ROUNDSM(io[0], io[1],
  ------------------
  |  |  141|    302|    do {                                                         \
  |  |  142|    302|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|    302|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|    302|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|    302|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|    302|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|    302|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|    302|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|    302|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|    302|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|    302|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|    302|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|    302|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|    302|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|    302|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|    302|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|    302|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|    302|        il ^= kl;                                                \
  |  |  151|    302|        ir ^= kr;                                                \
  |  |  152|    302|        ir ^= il;                                                \
  |  |  153|    302|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|    302|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|    302|        il ^= ir;                                                \
  |  |  155|    302|        yl ^= ir;                                                \
  |  |  156|    302|        yr ^= il;                                                \
  |  |  157|    302|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1115|    302|                     CamelliaSubkeyL(6), CamelliaSubkeyR(6),
 1116|    302|                     io[2], io[3], il, ir, t0, t1);
 1117|    302|    CAMELLIA_ROUNDSM(io[2], io[3],
  ------------------
  |  |  141|    302|    do {                                                         \
  |  |  142|    302|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|    302|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|    302|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|    302|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|    302|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|    302|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|    302|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|    302|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|    302|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|    302|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|    302|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|    302|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|    302|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|    302|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|    302|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|    302|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|    302|        il ^= kl;                                                \
  |  |  151|    302|        ir ^= kr;                                                \
  |  |  152|    302|        ir ^= il;                                                \
  |  |  153|    302|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|    302|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|    302|        il ^= ir;                                                \
  |  |  155|    302|        yl ^= ir;                                                \
  |  |  156|    302|        yr ^= il;                                                \
  |  |  157|    302|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1118|    302|                     CamelliaSubkeyL(7), CamelliaSubkeyR(7),
 1119|    302|                     io[0], io[1], il, ir, t0, t1);
 1120|       |
 1121|    302|    CAMELLIA_FLS(io[0], io[1], io[2], io[3],
  ------------------
  |  |  124|    302|    do {                                                                 \
  |  |  125|    302|        t0 = kll;                                                        \
  |  |  126|    302|        t0 &= ll;                                                        \
  |  |  127|    302|        lr ^= CAMELLIA_RL1(t0);                                          \
  |  |  ------------------
  |  |  |  |   72|    302|#define CAMELLIA_RL1(x) (((x) << 1) + ((x) >> 31))
  |  |  ------------------
  |  |  128|    302|        t1 = klr;                                                        \
  |  |  129|    302|        t1 |= lr;                                                        \
  |  |  130|    302|        ll ^= t1;                                                        \
  |  |  131|    302|                                                                         \
  |  |  132|    302|        t2 = krr;                                                        \
  |  |  133|    302|        t2 |= rr;                                                        \
  |  |  134|    302|        rl ^= t2;                                                        \
  |  |  135|    302|        t3 = krl;                                                        \
  |  |  136|    302|        t3 &= rl;                                                        \
  |  |  137|    302|        rr ^= CAMELLIA_RL1(t3);                                          \
  |  |  ------------------
  |  |  |  |   72|    302|#define CAMELLIA_RL1(x) (((x) << 1) + ((x) >> 31))
  |  |  ------------------
  |  |  138|    302|    } while (0)
  |  |  ------------------
  |  |  |  Branch (138:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1122|    302|                 CamelliaSubkeyL(8), CamelliaSubkeyR(8),
 1123|    302|                 CamelliaSubkeyL(9), CamelliaSubkeyR(9),
 1124|    302|                 t0, t1, il, ir);
 1125|       |
 1126|    302|    CAMELLIA_ROUNDSM(io[0], io[1],
  ------------------
  |  |  141|    302|    do {                                                         \
  |  |  142|    302|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|    302|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|    302|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|    302|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|    302|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|    302|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|    302|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|    302|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|    302|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|    302|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|    302|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|    302|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|    302|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|    302|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|    302|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|    302|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|    302|        il ^= kl;                                                \
  |  |  151|    302|        ir ^= kr;                                                \
  |  |  152|    302|        ir ^= il;                                                \
  |  |  153|    302|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|    302|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|    302|        il ^= ir;                                                \
  |  |  155|    302|        yl ^= ir;                                                \
  |  |  156|    302|        yr ^= il;                                                \
  |  |  157|    302|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1127|    302|                     CamelliaSubkeyL(10), CamelliaSubkeyR(10),
 1128|    302|                     io[2], io[3], il, ir, t0, t1);
 1129|    302|    CAMELLIA_ROUNDSM(io[2], io[3],
  ------------------
  |  |  141|    302|    do {                                                         \
  |  |  142|    302|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|    302|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|    302|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|    302|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|    302|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|    302|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|    302|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|    302|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|    302|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|    302|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|    302|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|    302|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|    302|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|    302|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|    302|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|    302|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|    302|        il ^= kl;                                                \
  |  |  151|    302|        ir ^= kr;                                                \
  |  |  152|    302|        ir ^= il;                                                \
  |  |  153|    302|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|    302|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|    302|        il ^= ir;                                                \
  |  |  155|    302|        yl ^= ir;                                                \
  |  |  156|    302|        yr ^= il;                                                \
  |  |  157|    302|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1130|    302|                     CamelliaSubkeyL(11), CamelliaSubkeyR(11),
 1131|    302|                     io[0], io[1], il, ir, t0, t1);
 1132|    302|    CAMELLIA_ROUNDSM(io[0], io[1],
  ------------------
  |  |  141|    302|    do {                                                         \
  |  |  142|    302|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|    302|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|    302|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|    302|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|    302|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|    302|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|    302|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|    302|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|    302|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|    302|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|    302|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|    302|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|    302|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|    302|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|    302|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|    302|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|    302|        il ^= kl;                                                \
  |  |  151|    302|        ir ^= kr;                                                \
  |  |  152|    302|        ir ^= il;                                                \
  |  |  153|    302|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|    302|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|    302|        il ^= ir;                                                \
  |  |  155|    302|        yl ^= ir;                                                \
  |  |  156|    302|        yr ^= il;                                                \
  |  |  157|    302|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1133|    302|                     CamelliaSubkeyL(12), CamelliaSubkeyR(12),
 1134|    302|                     io[2], io[3], il, ir, t0, t1);
 1135|    302|    CAMELLIA_ROUNDSM(io[2], io[3],
  ------------------
  |  |  141|    302|    do {                                                         \
  |  |  142|    302|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|    302|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|    302|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|    302|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|    302|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|    302|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|    302|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|    302|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|    302|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|    302|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|    302|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|    302|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|    302|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|    302|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|    302|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|    302|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|    302|        il ^= kl;                                                \
  |  |  151|    302|        ir ^= kr;                                                \
  |  |  152|    302|        ir ^= il;                                                \
  |  |  153|    302|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|    302|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|    302|        il ^= ir;                                                \
  |  |  155|    302|        yl ^= ir;                                                \
  |  |  156|    302|        yr ^= il;                                                \
  |  |  157|    302|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1136|    302|                     CamelliaSubkeyL(13), CamelliaSubkeyR(13),
 1137|    302|                     io[0], io[1], il, ir, t0, t1);
 1138|    302|    CAMELLIA_ROUNDSM(io[0], io[1],
  ------------------
  |  |  141|    302|    do {                                                         \
  |  |  142|    302|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|    302|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|    302|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|    302|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|    302|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|    302|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|    302|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|    302|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|    302|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|    302|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|    302|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|    302|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|    302|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|    302|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|    302|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|    302|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|    302|        il ^= kl;                                                \
  |  |  151|    302|        ir ^= kr;                                                \
  |  |  152|    302|        ir ^= il;                                                \
  |  |  153|    302|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|    302|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|    302|        il ^= ir;                                                \
  |  |  155|    302|        yl ^= ir;                                                \
  |  |  156|    302|        yr ^= il;                                                \
  |  |  157|    302|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1139|    302|                     CamelliaSubkeyL(14), CamelliaSubkeyR(14),
 1140|    302|                     io[2], io[3], il, ir, t0, t1);
 1141|    302|    CAMELLIA_ROUNDSM(io[2], io[3],
  ------------------
  |  |  141|    302|    do {                                                         \
  |  |  142|    302|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|    302|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|    302|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|    302|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|    302|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|    302|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|    302|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|    302|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|    302|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|    302|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|    302|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|    302|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|    302|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|    302|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|    302|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|    302|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|    302|        il ^= kl;                                                \
  |  |  151|    302|        ir ^= kr;                                                \
  |  |  152|    302|        ir ^= il;                                                \
  |  |  153|    302|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|    302|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|    302|        il ^= ir;                                                \
  |  |  155|    302|        yl ^= ir;                                                \
  |  |  156|    302|        yr ^= il;                                                \
  |  |  157|    302|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1142|    302|                     CamelliaSubkeyL(15), CamelliaSubkeyR(15),
 1143|    302|                     io[0], io[1], il, ir, t0, t1);
 1144|       |
 1145|    302|    CAMELLIA_FLS(io[0], io[1], io[2], io[3],
  ------------------
  |  |  124|    302|    do {                                                                 \
  |  |  125|    302|        t0 = kll;                                                        \
  |  |  126|    302|        t0 &= ll;                                                        \
  |  |  127|    302|        lr ^= CAMELLIA_RL1(t0);                                          \
  |  |  ------------------
  |  |  |  |   72|    302|#define CAMELLIA_RL1(x) (((x) << 1) + ((x) >> 31))
  |  |  ------------------
  |  |  128|    302|        t1 = klr;                                                        \
  |  |  129|    302|        t1 |= lr;                                                        \
  |  |  130|    302|        ll ^= t1;                                                        \
  |  |  131|    302|                                                                         \
  |  |  132|    302|        t2 = krr;                                                        \
  |  |  133|    302|        t2 |= rr;                                                        \
  |  |  134|    302|        rl ^= t2;                                                        \
  |  |  135|    302|        t3 = krl;                                                        \
  |  |  136|    302|        t3 &= rl;                                                        \
  |  |  137|    302|        rr ^= CAMELLIA_RL1(t3);                                          \
  |  |  ------------------
  |  |  |  |   72|    302|#define CAMELLIA_RL1(x) (((x) << 1) + ((x) >> 31))
  |  |  ------------------
  |  |  138|    302|    } while (0)
  |  |  ------------------
  |  |  |  Branch (138:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1146|    302|                 CamelliaSubkeyL(16), CamelliaSubkeyR(16),
 1147|    302|                 CamelliaSubkeyL(17), CamelliaSubkeyR(17),
 1148|    302|                 t0, t1, il, ir);
 1149|       |
 1150|    302|    CAMELLIA_ROUNDSM(io[0], io[1],
  ------------------
  |  |  141|    302|    do {                                                         \
  |  |  142|    302|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|    302|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|    302|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|    302|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|    302|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|    302|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|    302|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|    302|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|    302|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|    302|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|    302|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|    302|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|    302|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|    302|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|    302|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|    302|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|    302|        il ^= kl;                                                \
  |  |  151|    302|        ir ^= kr;                                                \
  |  |  152|    302|        ir ^= il;                                                \
  |  |  153|    302|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|    302|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|    302|        il ^= ir;                                                \
  |  |  155|    302|        yl ^= ir;                                                \
  |  |  156|    302|        yr ^= il;                                                \
  |  |  157|    302|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1151|    302|                     CamelliaSubkeyL(18), CamelliaSubkeyR(18),
 1152|    302|                     io[2], io[3], il, ir, t0, t1);
 1153|    302|    CAMELLIA_ROUNDSM(io[2], io[3],
  ------------------
  |  |  141|    302|    do {                                                         \
  |  |  142|    302|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|    302|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|    302|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|    302|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|    302|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|    302|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|    302|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|    302|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|    302|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|    302|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|    302|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|    302|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|    302|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|    302|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|    302|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|    302|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|    302|        il ^= kl;                                                \
  |  |  151|    302|        ir ^= kr;                                                \
  |  |  152|    302|        ir ^= il;                                                \
  |  |  153|    302|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|    302|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|    302|        il ^= ir;                                                \
  |  |  155|    302|        yl ^= ir;                                                \
  |  |  156|    302|        yr ^= il;                                                \
  |  |  157|    302|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1154|    302|                     CamelliaSubkeyL(19), CamelliaSubkeyR(19),
 1155|    302|                     io[0], io[1], il, ir, t0, t1);
 1156|    302|    CAMELLIA_ROUNDSM(io[0], io[1],
  ------------------
  |  |  141|    302|    do {                                                         \
  |  |  142|    302|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|    302|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|    302|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|    302|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|    302|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|    302|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|    302|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|    302|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|    302|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|    302|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|    302|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|    302|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|    302|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|    302|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|    302|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|    302|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|    302|        il ^= kl;                                                \
  |  |  151|    302|        ir ^= kr;                                                \
  |  |  152|    302|        ir ^= il;                                                \
  |  |  153|    302|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|    302|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|    302|        il ^= ir;                                                \
  |  |  155|    302|        yl ^= ir;                                                \
  |  |  156|    302|        yr ^= il;                                                \
  |  |  157|    302|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1157|    302|                     CamelliaSubkeyL(20), CamelliaSubkeyR(20),
 1158|    302|                     io[2], io[3], il, ir, t0, t1);
 1159|    302|    CAMELLIA_ROUNDSM(io[2], io[3],
  ------------------
  |  |  141|    302|    do {                                                         \
  |  |  142|    302|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|    302|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|    302|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|    302|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|    302|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|    302|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|    302|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|    302|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|    302|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|    302|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|    302|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|    302|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|    302|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|    302|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|    302|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|    302|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|    302|        il ^= kl;                                                \
  |  |  151|    302|        ir ^= kr;                                                \
  |  |  152|    302|        ir ^= il;                                                \
  |  |  153|    302|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|    302|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|    302|        il ^= ir;                                                \
  |  |  155|    302|        yl ^= ir;                                                \
  |  |  156|    302|        yr ^= il;                                                \
  |  |  157|    302|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1160|    302|                     CamelliaSubkeyL(21), CamelliaSubkeyR(21),
 1161|    302|                     io[0], io[1], il, ir, t0, t1);
 1162|    302|    CAMELLIA_ROUNDSM(io[0], io[1],
  ------------------
  |  |  141|    302|    do {                                                         \
  |  |  142|    302|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|    302|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|    302|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|    302|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|    302|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|    302|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|    302|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|    302|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|    302|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|    302|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|    302|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|    302|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|    302|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|    302|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|    302|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|    302|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|    302|        il ^= kl;                                                \
  |  |  151|    302|        ir ^= kr;                                                \
  |  |  152|    302|        ir ^= il;                                                \
  |  |  153|    302|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|    302|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|    302|        il ^= ir;                                                \
  |  |  155|    302|        yl ^= ir;                                                \
  |  |  156|    302|        yr ^= il;                                                \
  |  |  157|    302|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1163|    302|                     CamelliaSubkeyL(22), CamelliaSubkeyR(22),
 1164|    302|                     io[2], io[3], il, ir, t0, t1);
 1165|    302|    CAMELLIA_ROUNDSM(io[2], io[3],
  ------------------
  |  |  141|    302|    do {                                                         \
  |  |  142|    302|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|    302|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|    302|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|    302|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|    302|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|    302|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|    302|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|    302|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|    302|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|    302|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|    302|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|    302|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|    302|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|    302|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|    302|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|    302|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|    302|        il ^= kl;                                                \
  |  |  151|    302|        ir ^= kr;                                                \
  |  |  152|    302|        ir ^= il;                                                \
  |  |  153|    302|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|    302|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|    302|        il ^= ir;                                                \
  |  |  155|    302|        yl ^= ir;                                                \
  |  |  156|    302|        yr ^= il;                                                \
  |  |  157|    302|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1166|    302|                     CamelliaSubkeyL(23), CamelliaSubkeyR(23),
 1167|    302|                     io[0], io[1], il, ir, t0, t1);
 1168|       |
 1169|       |    /* post whitening but kw4 */
 1170|    302|    io[2] ^= CamelliaSubkeyL(24);
  ------------------
  |  |   66|    302|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
 1171|    302|    io[3] ^= CamelliaSubkeyR(24);
  ------------------
  |  |   67|    302|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
 1172|       |
 1173|    302|    t0 = io[0];
 1174|    302|    t1 = io[1];
 1175|    302|    io[0] = io[2];
 1176|    302|    io[1] = io[3];
 1177|    302|    io[2] = t0;
 1178|    302|    io[3] = t1;
 1179|       |
 1180|    302|    PUTU32(output, io[0]);
  ------------------
  |  |   47|    302|    {                                        \
  |  |   48|    302|        *((PRUint32 *)(ct)) = SHA_HTONL(st); \
  |  |  ------------------
  |  |  |  |   97|    302|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  |  |   49|    302|    }
  ------------------
 1181|    302|    PUTU32(output + 4, io[1]);
  ------------------
  |  |   47|    302|    {                                        \
  |  |   48|    302|        *((PRUint32 *)(ct)) = SHA_HTONL(st); \
  |  |  ------------------
  |  |  |  |   97|    302|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  |  |   49|    302|    }
  ------------------
 1182|    302|    PUTU32(output + 8, io[2]);
  ------------------
  |  |   47|    302|    {                                        \
  |  |   48|    302|        *((PRUint32 *)(ct)) = SHA_HTONL(st); \
  |  |  ------------------
  |  |  |  |   97|    302|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  |  |   49|    302|    }
  ------------------
 1183|    302|    PUTU32(output + 12, io[3]);
  ------------------
  |  |   47|    302|    {                                        \
  |  |   48|    302|        *((PRUint32 *)(ct)) = SHA_HTONL(st); \
  |  |  ------------------
  |  |  |  |   97|    302|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  |  |   49|    302|    }
  ------------------
 1184|       |
 1185|    302|    return SECSuccess;
 1186|    302|}
camellia_decrypt128:
 1192|  25.7k|{
 1193|  25.7k|    PRUint32 il, ir, t0, t1; /* temporary valiables */
 1194|  25.7k|    PRUint32 io[4];
 1195|       |#if defined(CAMELLIA_NEED_TMP_VARIABLE)
 1196|       |    PRUint32 tmp;
 1197|       |#endif
 1198|       |
 1199|  25.7k|    io[0] = GETU32(input);
  ------------------
  |  |   45|  25.7k|#define GETU32(p) SHA_HTONL(*((PRUint32 *)(p)))
  |  |  ------------------
  |  |  |  |   97|  25.7k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
 1200|  25.7k|    io[1] = GETU32(input + 4);
  ------------------
  |  |   45|  25.7k|#define GETU32(p) SHA_HTONL(*((PRUint32 *)(p)))
  |  |  ------------------
  |  |  |  |   97|  25.7k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
 1201|  25.7k|    io[2] = GETU32(input + 8);
  ------------------
  |  |   45|  25.7k|#define GETU32(p) SHA_HTONL(*((PRUint32 *)(p)))
  |  |  ------------------
  |  |  |  |   97|  25.7k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
 1202|  25.7k|    io[3] = GETU32(input + 12);
  ------------------
  |  |   45|  25.7k|#define GETU32(p) SHA_HTONL(*((PRUint32 *)(p)))
  |  |  ------------------
  |  |  |  |   97|  25.7k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
 1203|       |
 1204|       |    /* pre whitening but absorb kw2*/
 1205|  25.7k|    io[0] ^= CamelliaSubkeyL(24);
  ------------------
  |  |   66|  25.7k|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
 1206|  25.7k|    io[1] ^= CamelliaSubkeyR(24);
  ------------------
  |  |   67|  25.7k|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
 1207|       |
 1208|       |    /* main iteration */
 1209|  25.7k|    CAMELLIA_ROUNDSM(io[0], io[1],
  ------------------
  |  |  141|  25.7k|    do {                                                         \
  |  |  142|  25.7k|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|  25.7k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|  25.7k|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  25.7k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|  25.7k|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|  25.7k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|  25.7k|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|  25.7k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|  25.7k|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|  25.7k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|  25.7k|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  25.7k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|  25.7k|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|  25.7k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|  25.7k|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|  25.7k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|  25.7k|        il ^= kl;                                                \
  |  |  151|  25.7k|        ir ^= kr;                                                \
  |  |  152|  25.7k|        ir ^= il;                                                \
  |  |  153|  25.7k|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|  25.7k|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|  25.7k|        il ^= ir;                                                \
  |  |  155|  25.7k|        yl ^= ir;                                                \
  |  |  156|  25.7k|        yr ^= il;                                                \
  |  |  157|  25.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1210|  25.7k|                     CamelliaSubkeyL(23), CamelliaSubkeyR(23),
 1211|  25.7k|                     io[2], io[3], il, ir, t0, t1);
 1212|  25.7k|    CAMELLIA_ROUNDSM(io[2], io[3],
  ------------------
  |  |  141|  25.7k|    do {                                                         \
  |  |  142|  25.7k|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|  25.7k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|  25.7k|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  25.7k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|  25.7k|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|  25.7k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|  25.7k|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|  25.7k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|  25.7k|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|  25.7k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|  25.7k|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  25.7k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|  25.7k|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|  25.7k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|  25.7k|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|  25.7k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|  25.7k|        il ^= kl;                                                \
  |  |  151|  25.7k|        ir ^= kr;                                                \
  |  |  152|  25.7k|        ir ^= il;                                                \
  |  |  153|  25.7k|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|  25.7k|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|  25.7k|        il ^= ir;                                                \
  |  |  155|  25.7k|        yl ^= ir;                                                \
  |  |  156|  25.7k|        yr ^= il;                                                \
  |  |  157|  25.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1213|  25.7k|                     CamelliaSubkeyL(22), CamelliaSubkeyR(22),
 1214|  25.7k|                     io[0], io[1], il, ir, t0, t1);
 1215|  25.7k|    CAMELLIA_ROUNDSM(io[0], io[1],
  ------------------
  |  |  141|  25.7k|    do {                                                         \
  |  |  142|  25.7k|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|  25.7k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|  25.7k|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  25.7k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|  25.7k|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|  25.7k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|  25.7k|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|  25.7k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|  25.7k|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|  25.7k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|  25.7k|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  25.7k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|  25.7k|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|  25.7k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|  25.7k|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|  25.7k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|  25.7k|        il ^= kl;                                                \
  |  |  151|  25.7k|        ir ^= kr;                                                \
  |  |  152|  25.7k|        ir ^= il;                                                \
  |  |  153|  25.7k|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|  25.7k|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|  25.7k|        il ^= ir;                                                \
  |  |  155|  25.7k|        yl ^= ir;                                                \
  |  |  156|  25.7k|        yr ^= il;                                                \
  |  |  157|  25.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1216|  25.7k|                     CamelliaSubkeyL(21), CamelliaSubkeyR(21),
 1217|  25.7k|                     io[2], io[3], il, ir, t0, t1);
 1218|  25.7k|    CAMELLIA_ROUNDSM(io[2], io[3],
  ------------------
  |  |  141|  25.7k|    do {                                                         \
  |  |  142|  25.7k|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|  25.7k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|  25.7k|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  25.7k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|  25.7k|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|  25.7k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|  25.7k|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|  25.7k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|  25.7k|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|  25.7k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|  25.7k|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  25.7k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|  25.7k|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|  25.7k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|  25.7k|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|  25.7k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|  25.7k|        il ^= kl;                                                \
  |  |  151|  25.7k|        ir ^= kr;                                                \
  |  |  152|  25.7k|        ir ^= il;                                                \
  |  |  153|  25.7k|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|  25.7k|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|  25.7k|        il ^= ir;                                                \
  |  |  155|  25.7k|        yl ^= ir;                                                \
  |  |  156|  25.7k|        yr ^= il;                                                \
  |  |  157|  25.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1219|  25.7k|                     CamelliaSubkeyL(20), CamelliaSubkeyR(20),
 1220|  25.7k|                     io[0], io[1], il, ir, t0, t1);
 1221|  25.7k|    CAMELLIA_ROUNDSM(io[0], io[1],
  ------------------
  |  |  141|  25.7k|    do {                                                         \
  |  |  142|  25.7k|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|  25.7k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|  25.7k|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  25.7k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|  25.7k|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|  25.7k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|  25.7k|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|  25.7k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|  25.7k|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|  25.7k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|  25.7k|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  25.7k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|  25.7k|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|  25.7k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|  25.7k|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|  25.7k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|  25.7k|        il ^= kl;                                                \
  |  |  151|  25.7k|        ir ^= kr;                                                \
  |  |  152|  25.7k|        ir ^= il;                                                \
  |  |  153|  25.7k|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|  25.7k|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|  25.7k|        il ^= ir;                                                \
  |  |  155|  25.7k|        yl ^= ir;                                                \
  |  |  156|  25.7k|        yr ^= il;                                                \
  |  |  157|  25.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1222|  25.7k|                     CamelliaSubkeyL(19), CamelliaSubkeyR(19),
 1223|  25.7k|                     io[2], io[3], il, ir, t0, t1);
 1224|  25.7k|    CAMELLIA_ROUNDSM(io[2], io[3],
  ------------------
  |  |  141|  25.7k|    do {                                                         \
  |  |  142|  25.7k|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|  25.7k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|  25.7k|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  25.7k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|  25.7k|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|  25.7k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|  25.7k|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|  25.7k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|  25.7k|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|  25.7k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|  25.7k|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  25.7k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|  25.7k|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|  25.7k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|  25.7k|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|  25.7k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|  25.7k|        il ^= kl;                                                \
  |  |  151|  25.7k|        ir ^= kr;                                                \
  |  |  152|  25.7k|        ir ^= il;                                                \
  |  |  153|  25.7k|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|  25.7k|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|  25.7k|        il ^= ir;                                                \
  |  |  155|  25.7k|        yl ^= ir;                                                \
  |  |  156|  25.7k|        yr ^= il;                                                \
  |  |  157|  25.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1225|  25.7k|                     CamelliaSubkeyL(18), CamelliaSubkeyR(18),
 1226|  25.7k|                     io[0], io[1], il, ir, t0, t1);
 1227|       |
 1228|  25.7k|    CAMELLIA_FLS(io[0], io[1], io[2], io[3],
  ------------------
  |  |  124|  25.7k|    do {                                                                 \
  |  |  125|  25.7k|        t0 = kll;                                                        \
  |  |  126|  25.7k|        t0 &= ll;                                                        \
  |  |  127|  25.7k|        lr ^= CAMELLIA_RL1(t0);                                          \
  |  |  ------------------
  |  |  |  |   72|  25.7k|#define CAMELLIA_RL1(x) (((x) << 1) + ((x) >> 31))
  |  |  ------------------
  |  |  128|  25.7k|        t1 = klr;                                                        \
  |  |  129|  25.7k|        t1 |= lr;                                                        \
  |  |  130|  25.7k|        ll ^= t1;                                                        \
  |  |  131|  25.7k|                                                                         \
  |  |  132|  25.7k|        t2 = krr;                                                        \
  |  |  133|  25.7k|        t2 |= rr;                                                        \
  |  |  134|  25.7k|        rl ^= t2;                                                        \
  |  |  135|  25.7k|        t3 = krl;                                                        \
  |  |  136|  25.7k|        t3 &= rl;                                                        \
  |  |  137|  25.7k|        rr ^= CAMELLIA_RL1(t3);                                          \
  |  |  ------------------
  |  |  |  |   72|  25.7k|#define CAMELLIA_RL1(x) (((x) << 1) + ((x) >> 31))
  |  |  ------------------
  |  |  138|  25.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (138:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1229|  25.7k|                 CamelliaSubkeyL(17), CamelliaSubkeyR(17),
 1230|  25.7k|                 CamelliaSubkeyL(16), CamelliaSubkeyR(16),
 1231|  25.7k|                 t0, t1, il, ir);
 1232|       |
 1233|  25.7k|    CAMELLIA_ROUNDSM(io[0], io[1],
  ------------------
  |  |  141|  25.7k|    do {                                                         \
  |  |  142|  25.7k|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|  25.7k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|  25.7k|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  25.7k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|  25.7k|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|  25.7k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|  25.7k|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|  25.7k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|  25.7k|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|  25.7k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|  25.7k|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  25.7k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|  25.7k|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|  25.7k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|  25.7k|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|  25.7k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|  25.7k|        il ^= kl;                                                \
  |  |  151|  25.7k|        ir ^= kr;                                                \
  |  |  152|  25.7k|        ir ^= il;                                                \
  |  |  153|  25.7k|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|  25.7k|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|  25.7k|        il ^= ir;                                                \
  |  |  155|  25.7k|        yl ^= ir;                                                \
  |  |  156|  25.7k|        yr ^= il;                                                \
  |  |  157|  25.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1234|  25.7k|                     CamelliaSubkeyL(15), CamelliaSubkeyR(15),
 1235|  25.7k|                     io[2], io[3], il, ir, t0, t1);
 1236|  25.7k|    CAMELLIA_ROUNDSM(io[2], io[3],
  ------------------
  |  |  141|  25.7k|    do {                                                         \
  |  |  142|  25.7k|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|  25.7k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|  25.7k|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  25.7k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|  25.7k|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|  25.7k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|  25.7k|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|  25.7k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|  25.7k|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|  25.7k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|  25.7k|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  25.7k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|  25.7k|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|  25.7k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|  25.7k|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|  25.7k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|  25.7k|        il ^= kl;                                                \
  |  |  151|  25.7k|        ir ^= kr;                                                \
  |  |  152|  25.7k|        ir ^= il;                                                \
  |  |  153|  25.7k|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|  25.7k|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|  25.7k|        il ^= ir;                                                \
  |  |  155|  25.7k|        yl ^= ir;                                                \
  |  |  156|  25.7k|        yr ^= il;                                                \
  |  |  157|  25.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1237|  25.7k|                     CamelliaSubkeyL(14), CamelliaSubkeyR(14),
 1238|  25.7k|                     io[0], io[1], il, ir, t0, t1);
 1239|  25.7k|    CAMELLIA_ROUNDSM(io[0], io[1],
  ------------------
  |  |  141|  25.7k|    do {                                                         \
  |  |  142|  25.7k|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|  25.7k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|  25.7k|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  25.7k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|  25.7k|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|  25.7k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|  25.7k|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|  25.7k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|  25.7k|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|  25.7k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|  25.7k|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  25.7k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|  25.7k|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|  25.7k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|  25.7k|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|  25.7k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|  25.7k|        il ^= kl;                                                \
  |  |  151|  25.7k|        ir ^= kr;                                                \
  |  |  152|  25.7k|        ir ^= il;                                                \
  |  |  153|  25.7k|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|  25.7k|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|  25.7k|        il ^= ir;                                                \
  |  |  155|  25.7k|        yl ^= ir;                                                \
  |  |  156|  25.7k|        yr ^= il;                                                \
  |  |  157|  25.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1240|  25.7k|                     CamelliaSubkeyL(13), CamelliaSubkeyR(13),
 1241|  25.7k|                     io[2], io[3], il, ir, t0, t1);
 1242|  25.7k|    CAMELLIA_ROUNDSM(io[2], io[3],
  ------------------
  |  |  141|  25.7k|    do {                                                         \
  |  |  142|  25.7k|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|  25.7k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|  25.7k|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  25.7k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|  25.7k|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|  25.7k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|  25.7k|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|  25.7k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|  25.7k|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|  25.7k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|  25.7k|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  25.7k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|  25.7k|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|  25.7k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|  25.7k|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|  25.7k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|  25.7k|        il ^= kl;                                                \
  |  |  151|  25.7k|        ir ^= kr;                                                \
  |  |  152|  25.7k|        ir ^= il;                                                \
  |  |  153|  25.7k|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|  25.7k|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|  25.7k|        il ^= ir;                                                \
  |  |  155|  25.7k|        yl ^= ir;                                                \
  |  |  156|  25.7k|        yr ^= il;                                                \
  |  |  157|  25.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1243|  25.7k|                     CamelliaSubkeyL(12), CamelliaSubkeyR(12),
 1244|  25.7k|                     io[0], io[1], il, ir, t0, t1);
 1245|  25.7k|    CAMELLIA_ROUNDSM(io[0], io[1],
  ------------------
  |  |  141|  25.7k|    do {                                                         \
  |  |  142|  25.7k|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|  25.7k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|  25.7k|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  25.7k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|  25.7k|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|  25.7k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|  25.7k|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|  25.7k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|  25.7k|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|  25.7k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|  25.7k|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  25.7k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|  25.7k|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|  25.7k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|  25.7k|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|  25.7k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|  25.7k|        il ^= kl;                                                \
  |  |  151|  25.7k|        ir ^= kr;                                                \
  |  |  152|  25.7k|        ir ^= il;                                                \
  |  |  153|  25.7k|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|  25.7k|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|  25.7k|        il ^= ir;                                                \
  |  |  155|  25.7k|        yl ^= ir;                                                \
  |  |  156|  25.7k|        yr ^= il;                                                \
  |  |  157|  25.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1246|  25.7k|                     CamelliaSubkeyL(11), CamelliaSubkeyR(11),
 1247|  25.7k|                     io[2], io[3], il, ir, t0, t1);
 1248|  25.7k|    CAMELLIA_ROUNDSM(io[2], io[3],
  ------------------
  |  |  141|  25.7k|    do {                                                         \
  |  |  142|  25.7k|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|  25.7k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|  25.7k|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  25.7k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|  25.7k|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|  25.7k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|  25.7k|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|  25.7k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|  25.7k|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|  25.7k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|  25.7k|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  25.7k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|  25.7k|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|  25.7k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|  25.7k|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|  25.7k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|  25.7k|        il ^= kl;                                                \
  |  |  151|  25.7k|        ir ^= kr;                                                \
  |  |  152|  25.7k|        ir ^= il;                                                \
  |  |  153|  25.7k|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|  25.7k|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|  25.7k|        il ^= ir;                                                \
  |  |  155|  25.7k|        yl ^= ir;                                                \
  |  |  156|  25.7k|        yr ^= il;                                                \
  |  |  157|  25.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1249|  25.7k|                     CamelliaSubkeyL(10), CamelliaSubkeyR(10),
 1250|  25.7k|                     io[0], io[1], il, ir, t0, t1);
 1251|       |
 1252|  25.7k|    CAMELLIA_FLS(io[0], io[1], io[2], io[3],
  ------------------
  |  |  124|  25.7k|    do {                                                                 \
  |  |  125|  25.7k|        t0 = kll;                                                        \
  |  |  126|  25.7k|        t0 &= ll;                                                        \
  |  |  127|  25.7k|        lr ^= CAMELLIA_RL1(t0);                                          \
  |  |  ------------------
  |  |  |  |   72|  25.7k|#define CAMELLIA_RL1(x) (((x) << 1) + ((x) >> 31))
  |  |  ------------------
  |  |  128|  25.7k|        t1 = klr;                                                        \
  |  |  129|  25.7k|        t1 |= lr;                                                        \
  |  |  130|  25.7k|        ll ^= t1;                                                        \
  |  |  131|  25.7k|                                                                         \
  |  |  132|  25.7k|        t2 = krr;                                                        \
  |  |  133|  25.7k|        t2 |= rr;                                                        \
  |  |  134|  25.7k|        rl ^= t2;                                                        \
  |  |  135|  25.7k|        t3 = krl;                                                        \
  |  |  136|  25.7k|        t3 &= rl;                                                        \
  |  |  137|  25.7k|        rr ^= CAMELLIA_RL1(t3);                                          \
  |  |  ------------------
  |  |  |  |   72|  25.7k|#define CAMELLIA_RL1(x) (((x) << 1) + ((x) >> 31))
  |  |  ------------------
  |  |  138|  25.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (138:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1253|  25.7k|                 CamelliaSubkeyL(9), CamelliaSubkeyR(9),
 1254|  25.7k|                 CamelliaSubkeyL(8), CamelliaSubkeyR(8),
 1255|  25.7k|                 t0, t1, il, ir);
 1256|       |
 1257|  25.7k|    CAMELLIA_ROUNDSM(io[0], io[1],
  ------------------
  |  |  141|  25.7k|    do {                                                         \
  |  |  142|  25.7k|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|  25.7k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|  25.7k|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  25.7k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|  25.7k|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|  25.7k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|  25.7k|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|  25.7k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|  25.7k|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|  25.7k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|  25.7k|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  25.7k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|  25.7k|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|  25.7k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|  25.7k|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|  25.7k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|  25.7k|        il ^= kl;                                                \
  |  |  151|  25.7k|        ir ^= kr;                                                \
  |  |  152|  25.7k|        ir ^= il;                                                \
  |  |  153|  25.7k|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|  25.7k|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|  25.7k|        il ^= ir;                                                \
  |  |  155|  25.7k|        yl ^= ir;                                                \
  |  |  156|  25.7k|        yr ^= il;                                                \
  |  |  157|  25.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1258|  25.7k|                     CamelliaSubkeyL(7), CamelliaSubkeyR(7),
 1259|  25.7k|                     io[2], io[3], il, ir, t0, t1);
 1260|  25.7k|    CAMELLIA_ROUNDSM(io[2], io[3],
  ------------------
  |  |  141|  25.7k|    do {                                                         \
  |  |  142|  25.7k|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|  25.7k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|  25.7k|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  25.7k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|  25.7k|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|  25.7k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|  25.7k|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|  25.7k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|  25.7k|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|  25.7k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|  25.7k|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  25.7k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|  25.7k|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|  25.7k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|  25.7k|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|  25.7k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|  25.7k|        il ^= kl;                                                \
  |  |  151|  25.7k|        ir ^= kr;                                                \
  |  |  152|  25.7k|        ir ^= il;                                                \
  |  |  153|  25.7k|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|  25.7k|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|  25.7k|        il ^= ir;                                                \
  |  |  155|  25.7k|        yl ^= ir;                                                \
  |  |  156|  25.7k|        yr ^= il;                                                \
  |  |  157|  25.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1261|  25.7k|                     CamelliaSubkeyL(6), CamelliaSubkeyR(6),
 1262|  25.7k|                     io[0], io[1], il, ir, t0, t1);
 1263|  25.7k|    CAMELLIA_ROUNDSM(io[0], io[1],
  ------------------
  |  |  141|  25.7k|    do {                                                         \
  |  |  142|  25.7k|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|  25.7k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|  25.7k|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  25.7k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|  25.7k|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|  25.7k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|  25.7k|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|  25.7k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|  25.7k|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|  25.7k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|  25.7k|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  25.7k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|  25.7k|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|  25.7k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|  25.7k|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|  25.7k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|  25.7k|        il ^= kl;                                                \
  |  |  151|  25.7k|        ir ^= kr;                                                \
  |  |  152|  25.7k|        ir ^= il;                                                \
  |  |  153|  25.7k|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|  25.7k|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|  25.7k|        il ^= ir;                                                \
  |  |  155|  25.7k|        yl ^= ir;                                                \
  |  |  156|  25.7k|        yr ^= il;                                                \
  |  |  157|  25.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1264|  25.7k|                     CamelliaSubkeyL(5), CamelliaSubkeyR(5),
 1265|  25.7k|                     io[2], io[3], il, ir, t0, t1);
 1266|  25.7k|    CAMELLIA_ROUNDSM(io[2], io[3],
  ------------------
  |  |  141|  25.7k|    do {                                                         \
  |  |  142|  25.7k|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|  25.7k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|  25.7k|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  25.7k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|  25.7k|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|  25.7k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|  25.7k|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|  25.7k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|  25.7k|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|  25.7k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|  25.7k|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  25.7k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|  25.7k|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|  25.7k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|  25.7k|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|  25.7k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|  25.7k|        il ^= kl;                                                \
  |  |  151|  25.7k|        ir ^= kr;                                                \
  |  |  152|  25.7k|        ir ^= il;                                                \
  |  |  153|  25.7k|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|  25.7k|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|  25.7k|        il ^= ir;                                                \
  |  |  155|  25.7k|        yl ^= ir;                                                \
  |  |  156|  25.7k|        yr ^= il;                                                \
  |  |  157|  25.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1267|  25.7k|                     CamelliaSubkeyL(4), CamelliaSubkeyR(4),
 1268|  25.7k|                     io[0], io[1], il, ir, t0, t1);
 1269|  25.7k|    CAMELLIA_ROUNDSM(io[0], io[1],
  ------------------
  |  |  141|  25.7k|    do {                                                         \
  |  |  142|  25.7k|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|  25.7k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|  25.7k|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  25.7k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|  25.7k|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|  25.7k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|  25.7k|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|  25.7k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|  25.7k|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|  25.7k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|  25.7k|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  25.7k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|  25.7k|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|  25.7k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|  25.7k|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|  25.7k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|  25.7k|        il ^= kl;                                                \
  |  |  151|  25.7k|        ir ^= kr;                                                \
  |  |  152|  25.7k|        ir ^= il;                                                \
  |  |  153|  25.7k|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|  25.7k|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|  25.7k|        il ^= ir;                                                \
  |  |  155|  25.7k|        yl ^= ir;                                                \
  |  |  156|  25.7k|        yr ^= il;                                                \
  |  |  157|  25.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1270|  25.7k|                     CamelliaSubkeyL(3), CamelliaSubkeyR(3),
 1271|  25.7k|                     io[2], io[3], il, ir, t0, t1);
 1272|  25.7k|    CAMELLIA_ROUNDSM(io[2], io[3],
  ------------------
  |  |  141|  25.7k|    do {                                                         \
  |  |  142|  25.7k|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|  25.7k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|  25.7k|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  25.7k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|  25.7k|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|  25.7k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|  25.7k|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|  25.7k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|  25.7k|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|  25.7k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|  25.7k|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  25.7k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|  25.7k|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|  25.7k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|  25.7k|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|  25.7k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|  25.7k|        il ^= kl;                                                \
  |  |  151|  25.7k|        ir ^= kr;                                                \
  |  |  152|  25.7k|        ir ^= il;                                                \
  |  |  153|  25.7k|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|  25.7k|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|  25.7k|        il ^= ir;                                                \
  |  |  155|  25.7k|        yl ^= ir;                                                \
  |  |  156|  25.7k|        yr ^= il;                                                \
  |  |  157|  25.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1273|  25.7k|                     CamelliaSubkeyL(2), CamelliaSubkeyR(2),
 1274|  25.7k|                     io[0], io[1], il, ir, t0, t1);
 1275|       |
 1276|       |    /* post whitening but kw4 */
 1277|  25.7k|    io[2] ^= CamelliaSubkeyL(0);
  ------------------
  |  |   66|  25.7k|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
 1278|  25.7k|    io[3] ^= CamelliaSubkeyR(0);
  ------------------
  |  |   67|  25.7k|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
 1279|       |
 1280|  25.7k|    t0 = io[0];
 1281|  25.7k|    t1 = io[1];
 1282|  25.7k|    io[0] = io[2];
 1283|  25.7k|    io[1] = io[3];
 1284|  25.7k|    io[2] = t0;
 1285|  25.7k|    io[3] = t1;
 1286|       |
 1287|  25.7k|    PUTU32(output, io[0]);
  ------------------
  |  |   47|  25.7k|    {                                        \
  |  |   48|  25.7k|        *((PRUint32 *)(ct)) = SHA_HTONL(st); \
  |  |  ------------------
  |  |  |  |   97|  25.7k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  |  |   49|  25.7k|    }
  ------------------
 1288|  25.7k|    PUTU32(output + 4, io[1]);
  ------------------
  |  |   47|  25.7k|    {                                        \
  |  |   48|  25.7k|        *((PRUint32 *)(ct)) = SHA_HTONL(st); \
  |  |  ------------------
  |  |  |  |   97|  25.7k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  |  |   49|  25.7k|    }
  ------------------
 1289|  25.7k|    PUTU32(output + 8, io[2]);
  ------------------
  |  |   47|  25.7k|    {                                        \
  |  |   48|  25.7k|        *((PRUint32 *)(ct)) = SHA_HTONL(st); \
  |  |  ------------------
  |  |  |  |   97|  25.7k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  |  |   49|  25.7k|    }
  ------------------
 1290|  25.7k|    PUTU32(output + 12, io[3]);
  ------------------
  |  |   47|  25.7k|    {                                        \
  |  |   48|  25.7k|        *((PRUint32 *)(ct)) = SHA_HTONL(st); \
  |  |  ------------------
  |  |  |  |   97|  25.7k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  |  |   49|  25.7k|    }
  ------------------
 1291|       |
 1292|  25.7k|    return SECSuccess;
 1293|  25.7k|}
camellia_encrypt256:
 1302|     84|{
 1303|     84|    PRUint32 il, ir, t0, t1; /* temporary valiables */
 1304|     84|    PRUint32 io[4];
 1305|       |#if defined(CAMELLIA_NEED_TMP_VARIABLE)
 1306|       |    PRUint32 tmp;
 1307|       |#endif
 1308|       |
 1309|     84|    io[0] = GETU32(input);
  ------------------
  |  |   45|     84|#define GETU32(p) SHA_HTONL(*((PRUint32 *)(p)))
  |  |  ------------------
  |  |  |  |   97|     84|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
 1310|     84|    io[1] = GETU32(input + 4);
  ------------------
  |  |   45|     84|#define GETU32(p) SHA_HTONL(*((PRUint32 *)(p)))
  |  |  ------------------
  |  |  |  |   97|     84|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
 1311|     84|    io[2] = GETU32(input + 8);
  ------------------
  |  |   45|     84|#define GETU32(p) SHA_HTONL(*((PRUint32 *)(p)))
  |  |  ------------------
  |  |  |  |   97|     84|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
 1312|     84|    io[3] = GETU32(input + 12);
  ------------------
  |  |   45|     84|#define GETU32(p) SHA_HTONL(*((PRUint32 *)(p)))
  |  |  ------------------
  |  |  |  |   97|     84|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
 1313|       |
 1314|       |    /* pre whitening but absorb kw2*/
 1315|     84|    io[0] ^= CamelliaSubkeyL(0);
  ------------------
  |  |   66|     84|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
 1316|     84|    io[1] ^= CamelliaSubkeyR(0);
  ------------------
  |  |   67|     84|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
 1317|       |
 1318|       |    /* main iteration */
 1319|     84|    CAMELLIA_ROUNDSM(io[0], io[1],
  ------------------
  |  |  141|     84|    do {                                                         \
  |  |  142|     84|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|     84|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|     84|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|     84|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|     84|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|     84|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|     84|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|     84|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|     84|        il ^= kl;                                                \
  |  |  151|     84|        ir ^= kr;                                                \
  |  |  152|     84|        ir ^= il;                                                \
  |  |  153|     84|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|     84|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|     84|        il ^= ir;                                                \
  |  |  155|     84|        yl ^= ir;                                                \
  |  |  156|     84|        yr ^= il;                                                \
  |  |  157|     84|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1320|     84|                     CamelliaSubkeyL(2), CamelliaSubkeyR(2),
 1321|     84|                     io[2], io[3], il, ir, t0, t1);
 1322|     84|    CAMELLIA_ROUNDSM(io[2], io[3],
  ------------------
  |  |  141|     84|    do {                                                         \
  |  |  142|     84|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|     84|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|     84|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|     84|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|     84|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|     84|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|     84|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|     84|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|     84|        il ^= kl;                                                \
  |  |  151|     84|        ir ^= kr;                                                \
  |  |  152|     84|        ir ^= il;                                                \
  |  |  153|     84|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|     84|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|     84|        il ^= ir;                                                \
  |  |  155|     84|        yl ^= ir;                                                \
  |  |  156|     84|        yr ^= il;                                                \
  |  |  157|     84|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1323|     84|                     CamelliaSubkeyL(3), CamelliaSubkeyR(3),
 1324|     84|                     io[0], io[1], il, ir, t0, t1);
 1325|     84|    CAMELLIA_ROUNDSM(io[0], io[1],
  ------------------
  |  |  141|     84|    do {                                                         \
  |  |  142|     84|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|     84|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|     84|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|     84|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|     84|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|     84|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|     84|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|     84|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|     84|        il ^= kl;                                                \
  |  |  151|     84|        ir ^= kr;                                                \
  |  |  152|     84|        ir ^= il;                                                \
  |  |  153|     84|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|     84|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|     84|        il ^= ir;                                                \
  |  |  155|     84|        yl ^= ir;                                                \
  |  |  156|     84|        yr ^= il;                                                \
  |  |  157|     84|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1326|     84|                     CamelliaSubkeyL(4), CamelliaSubkeyR(4),
 1327|     84|                     io[2], io[3], il, ir, t0, t1);
 1328|     84|    CAMELLIA_ROUNDSM(io[2], io[3],
  ------------------
  |  |  141|     84|    do {                                                         \
  |  |  142|     84|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|     84|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|     84|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|     84|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|     84|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|     84|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|     84|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|     84|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|     84|        il ^= kl;                                                \
  |  |  151|     84|        ir ^= kr;                                                \
  |  |  152|     84|        ir ^= il;                                                \
  |  |  153|     84|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|     84|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|     84|        il ^= ir;                                                \
  |  |  155|     84|        yl ^= ir;                                                \
  |  |  156|     84|        yr ^= il;                                                \
  |  |  157|     84|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1329|     84|                     CamelliaSubkeyL(5), CamelliaSubkeyR(5),
 1330|     84|                     io[0], io[1], il, ir, t0, t1);
 1331|     84|    CAMELLIA_ROUNDSM(io[0], io[1],
  ------------------
  |  |  141|     84|    do {                                                         \
  |  |  142|     84|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|     84|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|     84|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|     84|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|     84|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|     84|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|     84|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|     84|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|     84|        il ^= kl;                                                \
  |  |  151|     84|        ir ^= kr;                                                \
  |  |  152|     84|        ir ^= il;                                                \
  |  |  153|     84|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|     84|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|     84|        il ^= ir;                                                \
  |  |  155|     84|        yl ^= ir;                                                \
  |  |  156|     84|        yr ^= il;                                                \
  |  |  157|     84|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1332|     84|                     CamelliaSubkeyL(6), CamelliaSubkeyR(6),
 1333|     84|                     io[2], io[3], il, ir, t0, t1);
 1334|     84|    CAMELLIA_ROUNDSM(io[2], io[3],
  ------------------
  |  |  141|     84|    do {                                                         \
  |  |  142|     84|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|     84|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|     84|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|     84|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|     84|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|     84|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|     84|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|     84|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|     84|        il ^= kl;                                                \
  |  |  151|     84|        ir ^= kr;                                                \
  |  |  152|     84|        ir ^= il;                                                \
  |  |  153|     84|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|     84|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|     84|        il ^= ir;                                                \
  |  |  155|     84|        yl ^= ir;                                                \
  |  |  156|     84|        yr ^= il;                                                \
  |  |  157|     84|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1335|     84|                     CamelliaSubkeyL(7), CamelliaSubkeyR(7),
 1336|     84|                     io[0], io[1], il, ir, t0, t1);
 1337|       |
 1338|     84|    CAMELLIA_FLS(io[0], io[1], io[2], io[3],
  ------------------
  |  |  124|     84|    do {                                                                 \
  |  |  125|     84|        t0 = kll;                                                        \
  |  |  126|     84|        t0 &= ll;                                                        \
  |  |  127|     84|        lr ^= CAMELLIA_RL1(t0);                                          \
  |  |  ------------------
  |  |  |  |   72|     84|#define CAMELLIA_RL1(x) (((x) << 1) + ((x) >> 31))
  |  |  ------------------
  |  |  128|     84|        t1 = klr;                                                        \
  |  |  129|     84|        t1 |= lr;                                                        \
  |  |  130|     84|        ll ^= t1;                                                        \
  |  |  131|     84|                                                                         \
  |  |  132|     84|        t2 = krr;                                                        \
  |  |  133|     84|        t2 |= rr;                                                        \
  |  |  134|     84|        rl ^= t2;                                                        \
  |  |  135|     84|        t3 = krl;                                                        \
  |  |  136|     84|        t3 &= rl;                                                        \
  |  |  137|     84|        rr ^= CAMELLIA_RL1(t3);                                          \
  |  |  ------------------
  |  |  |  |   72|     84|#define CAMELLIA_RL1(x) (((x) << 1) + ((x) >> 31))
  |  |  ------------------
  |  |  138|     84|    } while (0)
  |  |  ------------------
  |  |  |  Branch (138:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1339|     84|                 CamelliaSubkeyL(8), CamelliaSubkeyR(8),
 1340|     84|                 CamelliaSubkeyL(9), CamelliaSubkeyR(9),
 1341|     84|                 t0, t1, il, ir);
 1342|       |
 1343|     84|    CAMELLIA_ROUNDSM(io[0], io[1],
  ------------------
  |  |  141|     84|    do {                                                         \
  |  |  142|     84|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|     84|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|     84|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|     84|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|     84|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|     84|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|     84|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|     84|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|     84|        il ^= kl;                                                \
  |  |  151|     84|        ir ^= kr;                                                \
  |  |  152|     84|        ir ^= il;                                                \
  |  |  153|     84|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|     84|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|     84|        il ^= ir;                                                \
  |  |  155|     84|        yl ^= ir;                                                \
  |  |  156|     84|        yr ^= il;                                                \
  |  |  157|     84|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1344|     84|                     CamelliaSubkeyL(10), CamelliaSubkeyR(10),
 1345|     84|                     io[2], io[3], il, ir, t0, t1);
 1346|     84|    CAMELLIA_ROUNDSM(io[2], io[3],
  ------------------
  |  |  141|     84|    do {                                                         \
  |  |  142|     84|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|     84|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|     84|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|     84|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|     84|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|     84|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|     84|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|     84|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|     84|        il ^= kl;                                                \
  |  |  151|     84|        ir ^= kr;                                                \
  |  |  152|     84|        ir ^= il;                                                \
  |  |  153|     84|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|     84|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|     84|        il ^= ir;                                                \
  |  |  155|     84|        yl ^= ir;                                                \
  |  |  156|     84|        yr ^= il;                                                \
  |  |  157|     84|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1347|     84|                     CamelliaSubkeyL(11), CamelliaSubkeyR(11),
 1348|     84|                     io[0], io[1], il, ir, t0, t1);
 1349|     84|    CAMELLIA_ROUNDSM(io[0], io[1],
  ------------------
  |  |  141|     84|    do {                                                         \
  |  |  142|     84|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|     84|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|     84|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|     84|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|     84|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|     84|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|     84|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|     84|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|     84|        il ^= kl;                                                \
  |  |  151|     84|        ir ^= kr;                                                \
  |  |  152|     84|        ir ^= il;                                                \
  |  |  153|     84|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|     84|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|     84|        il ^= ir;                                                \
  |  |  155|     84|        yl ^= ir;                                                \
  |  |  156|     84|        yr ^= il;                                                \
  |  |  157|     84|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1350|     84|                     CamelliaSubkeyL(12), CamelliaSubkeyR(12),
 1351|     84|                     io[2], io[3], il, ir, t0, t1);
 1352|     84|    CAMELLIA_ROUNDSM(io[2], io[3],
  ------------------
  |  |  141|     84|    do {                                                         \
  |  |  142|     84|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|     84|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|     84|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|     84|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|     84|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|     84|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|     84|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|     84|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|     84|        il ^= kl;                                                \
  |  |  151|     84|        ir ^= kr;                                                \
  |  |  152|     84|        ir ^= il;                                                \
  |  |  153|     84|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|     84|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|     84|        il ^= ir;                                                \
  |  |  155|     84|        yl ^= ir;                                                \
  |  |  156|     84|        yr ^= il;                                                \
  |  |  157|     84|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1353|     84|                     CamelliaSubkeyL(13), CamelliaSubkeyR(13),
 1354|     84|                     io[0], io[1], il, ir, t0, t1);
 1355|     84|    CAMELLIA_ROUNDSM(io[0], io[1],
  ------------------
  |  |  141|     84|    do {                                                         \
  |  |  142|     84|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|     84|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|     84|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|     84|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|     84|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|     84|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|     84|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|     84|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|     84|        il ^= kl;                                                \
  |  |  151|     84|        ir ^= kr;                                                \
  |  |  152|     84|        ir ^= il;                                                \
  |  |  153|     84|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|     84|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|     84|        il ^= ir;                                                \
  |  |  155|     84|        yl ^= ir;                                                \
  |  |  156|     84|        yr ^= il;                                                \
  |  |  157|     84|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1356|     84|                     CamelliaSubkeyL(14), CamelliaSubkeyR(14),
 1357|     84|                     io[2], io[3], il, ir, t0, t1);
 1358|     84|    CAMELLIA_ROUNDSM(io[2], io[3],
  ------------------
  |  |  141|     84|    do {                                                         \
  |  |  142|     84|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|     84|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|     84|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|     84|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|     84|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|     84|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|     84|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|     84|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|     84|        il ^= kl;                                                \
  |  |  151|     84|        ir ^= kr;                                                \
  |  |  152|     84|        ir ^= il;                                                \
  |  |  153|     84|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|     84|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|     84|        il ^= ir;                                                \
  |  |  155|     84|        yl ^= ir;                                                \
  |  |  156|     84|        yr ^= il;                                                \
  |  |  157|     84|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1359|     84|                     CamelliaSubkeyL(15), CamelliaSubkeyR(15),
 1360|     84|                     io[0], io[1], il, ir, t0, t1);
 1361|       |
 1362|     84|    CAMELLIA_FLS(io[0], io[1], io[2], io[3],
  ------------------
  |  |  124|     84|    do {                                                                 \
  |  |  125|     84|        t0 = kll;                                                        \
  |  |  126|     84|        t0 &= ll;                                                        \
  |  |  127|     84|        lr ^= CAMELLIA_RL1(t0);                                          \
  |  |  ------------------
  |  |  |  |   72|     84|#define CAMELLIA_RL1(x) (((x) << 1) + ((x) >> 31))
  |  |  ------------------
  |  |  128|     84|        t1 = klr;                                                        \
  |  |  129|     84|        t1 |= lr;                                                        \
  |  |  130|     84|        ll ^= t1;                                                        \
  |  |  131|     84|                                                                         \
  |  |  132|     84|        t2 = krr;                                                        \
  |  |  133|     84|        t2 |= rr;                                                        \
  |  |  134|     84|        rl ^= t2;                                                        \
  |  |  135|     84|        t3 = krl;                                                        \
  |  |  136|     84|        t3 &= rl;                                                        \
  |  |  137|     84|        rr ^= CAMELLIA_RL1(t3);                                          \
  |  |  ------------------
  |  |  |  |   72|     84|#define CAMELLIA_RL1(x) (((x) << 1) + ((x) >> 31))
  |  |  ------------------
  |  |  138|     84|    } while (0)
  |  |  ------------------
  |  |  |  Branch (138:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1363|     84|                 CamelliaSubkeyL(16), CamelliaSubkeyR(16),
 1364|     84|                 CamelliaSubkeyL(17), CamelliaSubkeyR(17),
 1365|     84|                 t0, t1, il, ir);
 1366|       |
 1367|     84|    CAMELLIA_ROUNDSM(io[0], io[1],
  ------------------
  |  |  141|     84|    do {                                                         \
  |  |  142|     84|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|     84|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|     84|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|     84|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|     84|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|     84|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|     84|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|     84|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|     84|        il ^= kl;                                                \
  |  |  151|     84|        ir ^= kr;                                                \
  |  |  152|     84|        ir ^= il;                                                \
  |  |  153|     84|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|     84|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|     84|        il ^= ir;                                                \
  |  |  155|     84|        yl ^= ir;                                                \
  |  |  156|     84|        yr ^= il;                                                \
  |  |  157|     84|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1368|     84|                     CamelliaSubkeyL(18), CamelliaSubkeyR(18),
 1369|     84|                     io[2], io[3], il, ir, t0, t1);
 1370|     84|    CAMELLIA_ROUNDSM(io[2], io[3],
  ------------------
  |  |  141|     84|    do {                                                         \
  |  |  142|     84|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|     84|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|     84|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|     84|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|     84|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|     84|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|     84|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|     84|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|     84|        il ^= kl;                                                \
  |  |  151|     84|        ir ^= kr;                                                \
  |  |  152|     84|        ir ^= il;                                                \
  |  |  153|     84|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|     84|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|     84|        il ^= ir;                                                \
  |  |  155|     84|        yl ^= ir;                                                \
  |  |  156|     84|        yr ^= il;                                                \
  |  |  157|     84|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1371|     84|                     CamelliaSubkeyL(19), CamelliaSubkeyR(19),
 1372|     84|                     io[0], io[1], il, ir, t0, t1);
 1373|     84|    CAMELLIA_ROUNDSM(io[0], io[1],
  ------------------
  |  |  141|     84|    do {                                                         \
  |  |  142|     84|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|     84|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|     84|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|     84|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|     84|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|     84|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|     84|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|     84|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|     84|        il ^= kl;                                                \
  |  |  151|     84|        ir ^= kr;                                                \
  |  |  152|     84|        ir ^= il;                                                \
  |  |  153|     84|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|     84|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|     84|        il ^= ir;                                                \
  |  |  155|     84|        yl ^= ir;                                                \
  |  |  156|     84|        yr ^= il;                                                \
  |  |  157|     84|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1374|     84|                     CamelliaSubkeyL(20), CamelliaSubkeyR(20),
 1375|     84|                     io[2], io[3], il, ir, t0, t1);
 1376|     84|    CAMELLIA_ROUNDSM(io[2], io[3],
  ------------------
  |  |  141|     84|    do {                                                         \
  |  |  142|     84|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|     84|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|     84|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|     84|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|     84|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|     84|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|     84|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|     84|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|     84|        il ^= kl;                                                \
  |  |  151|     84|        ir ^= kr;                                                \
  |  |  152|     84|        ir ^= il;                                                \
  |  |  153|     84|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|     84|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|     84|        il ^= ir;                                                \
  |  |  155|     84|        yl ^= ir;                                                \
  |  |  156|     84|        yr ^= il;                                                \
  |  |  157|     84|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1377|     84|                     CamelliaSubkeyL(21), CamelliaSubkeyR(21),
 1378|     84|                     io[0], io[1], il, ir, t0, t1);
 1379|     84|    CAMELLIA_ROUNDSM(io[0], io[1],
  ------------------
  |  |  141|     84|    do {                                                         \
  |  |  142|     84|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|     84|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|     84|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|     84|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|     84|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|     84|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|     84|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|     84|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|     84|        il ^= kl;                                                \
  |  |  151|     84|        ir ^= kr;                                                \
  |  |  152|     84|        ir ^= il;                                                \
  |  |  153|     84|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|     84|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|     84|        il ^= ir;                                                \
  |  |  155|     84|        yl ^= ir;                                                \
  |  |  156|     84|        yr ^= il;                                                \
  |  |  157|     84|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1380|     84|                     CamelliaSubkeyL(22), CamelliaSubkeyR(22),
 1381|     84|                     io[2], io[3], il, ir, t0, t1);
 1382|     84|    CAMELLIA_ROUNDSM(io[2], io[3],
  ------------------
  |  |  141|     84|    do {                                                         \
  |  |  142|     84|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|     84|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|     84|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|     84|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|     84|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|     84|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|     84|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|     84|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|     84|        il ^= kl;                                                \
  |  |  151|     84|        ir ^= kr;                                                \
  |  |  152|     84|        ir ^= il;                                                \
  |  |  153|     84|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|     84|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|     84|        il ^= ir;                                                \
  |  |  155|     84|        yl ^= ir;                                                \
  |  |  156|     84|        yr ^= il;                                                \
  |  |  157|     84|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1383|     84|                     CamelliaSubkeyL(23), CamelliaSubkeyR(23),
 1384|     84|                     io[0], io[1], il, ir, t0, t1);
 1385|       |
 1386|     84|    CAMELLIA_FLS(io[0], io[1], io[2], io[3],
  ------------------
  |  |  124|     84|    do {                                                                 \
  |  |  125|     84|        t0 = kll;                                                        \
  |  |  126|     84|        t0 &= ll;                                                        \
  |  |  127|     84|        lr ^= CAMELLIA_RL1(t0);                                          \
  |  |  ------------------
  |  |  |  |   72|     84|#define CAMELLIA_RL1(x) (((x) << 1) + ((x) >> 31))
  |  |  ------------------
  |  |  128|     84|        t1 = klr;                                                        \
  |  |  129|     84|        t1 |= lr;                                                        \
  |  |  130|     84|        ll ^= t1;                                                        \
  |  |  131|     84|                                                                         \
  |  |  132|     84|        t2 = krr;                                                        \
  |  |  133|     84|        t2 |= rr;                                                        \
  |  |  134|     84|        rl ^= t2;                                                        \
  |  |  135|     84|        t3 = krl;                                                        \
  |  |  136|     84|        t3 &= rl;                                                        \
  |  |  137|     84|        rr ^= CAMELLIA_RL1(t3);                                          \
  |  |  ------------------
  |  |  |  |   72|     84|#define CAMELLIA_RL1(x) (((x) << 1) + ((x) >> 31))
  |  |  ------------------
  |  |  138|     84|    } while (0)
  |  |  ------------------
  |  |  |  Branch (138:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1387|     84|                 CamelliaSubkeyL(24), CamelliaSubkeyR(24),
 1388|     84|                 CamelliaSubkeyL(25), CamelliaSubkeyR(25),
 1389|     84|                 t0, t1, il, ir);
 1390|       |
 1391|     84|    CAMELLIA_ROUNDSM(io[0], io[1],
  ------------------
  |  |  141|     84|    do {                                                         \
  |  |  142|     84|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|     84|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|     84|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|     84|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|     84|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|     84|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|     84|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|     84|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|     84|        il ^= kl;                                                \
  |  |  151|     84|        ir ^= kr;                                                \
  |  |  152|     84|        ir ^= il;                                                \
  |  |  153|     84|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|     84|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|     84|        il ^= ir;                                                \
  |  |  155|     84|        yl ^= ir;                                                \
  |  |  156|     84|        yr ^= il;                                                \
  |  |  157|     84|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1392|     84|                     CamelliaSubkeyL(26), CamelliaSubkeyR(26),
 1393|     84|                     io[2], io[3], il, ir, t0, t1);
 1394|     84|    CAMELLIA_ROUNDSM(io[2], io[3],
  ------------------
  |  |  141|     84|    do {                                                         \
  |  |  142|     84|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|     84|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|     84|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|     84|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|     84|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|     84|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|     84|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|     84|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|     84|        il ^= kl;                                                \
  |  |  151|     84|        ir ^= kr;                                                \
  |  |  152|     84|        ir ^= il;                                                \
  |  |  153|     84|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|     84|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|     84|        il ^= ir;                                                \
  |  |  155|     84|        yl ^= ir;                                                \
  |  |  156|     84|        yr ^= il;                                                \
  |  |  157|     84|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1395|     84|                     CamelliaSubkeyL(27), CamelliaSubkeyR(27),
 1396|     84|                     io[0], io[1], il, ir, t0, t1);
 1397|     84|    CAMELLIA_ROUNDSM(io[0], io[1],
  ------------------
  |  |  141|     84|    do {                                                         \
  |  |  142|     84|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|     84|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|     84|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|     84|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|     84|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|     84|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|     84|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|     84|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|     84|        il ^= kl;                                                \
  |  |  151|     84|        ir ^= kr;                                                \
  |  |  152|     84|        ir ^= il;                                                \
  |  |  153|     84|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|     84|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|     84|        il ^= ir;                                                \
  |  |  155|     84|        yl ^= ir;                                                \
  |  |  156|     84|        yr ^= il;                                                \
  |  |  157|     84|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1398|     84|                     CamelliaSubkeyL(28), CamelliaSubkeyR(28),
 1399|     84|                     io[2], io[3], il, ir, t0, t1);
 1400|     84|    CAMELLIA_ROUNDSM(io[2], io[3],
  ------------------
  |  |  141|     84|    do {                                                         \
  |  |  142|     84|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|     84|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|     84|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|     84|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|     84|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|     84|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|     84|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|     84|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|     84|        il ^= kl;                                                \
  |  |  151|     84|        ir ^= kr;                                                \
  |  |  152|     84|        ir ^= il;                                                \
  |  |  153|     84|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|     84|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|     84|        il ^= ir;                                                \
  |  |  155|     84|        yl ^= ir;                                                \
  |  |  156|     84|        yr ^= il;                                                \
  |  |  157|     84|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1401|     84|                     CamelliaSubkeyL(29), CamelliaSubkeyR(29),
 1402|     84|                     io[0], io[1], il, ir, t0, t1);
 1403|     84|    CAMELLIA_ROUNDSM(io[0], io[1],
  ------------------
  |  |  141|     84|    do {                                                         \
  |  |  142|     84|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|     84|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|     84|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|     84|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|     84|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|     84|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|     84|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|     84|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|     84|        il ^= kl;                                                \
  |  |  151|     84|        ir ^= kr;                                                \
  |  |  152|     84|        ir ^= il;                                                \
  |  |  153|     84|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|     84|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|     84|        il ^= ir;                                                \
  |  |  155|     84|        yl ^= ir;                                                \
  |  |  156|     84|        yr ^= il;                                                \
  |  |  157|     84|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1404|     84|                     CamelliaSubkeyL(30), CamelliaSubkeyR(30),
 1405|     84|                     io[2], io[3], il, ir, t0, t1);
 1406|     84|    CAMELLIA_ROUNDSM(io[2], io[3],
  ------------------
  |  |  141|     84|    do {                                                         \
  |  |  142|     84|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|     84|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|     84|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|     84|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|     84|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|     84|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|     84|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|     84|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|     84|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|     84|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|     84|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|     84|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|     84|        il ^= kl;                                                \
  |  |  151|     84|        ir ^= kr;                                                \
  |  |  152|     84|        ir ^= il;                                                \
  |  |  153|     84|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|     84|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|     84|        il ^= ir;                                                \
  |  |  155|     84|        yl ^= ir;                                                \
  |  |  156|     84|        yr ^= il;                                                \
  |  |  157|     84|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1407|     84|                     CamelliaSubkeyL(31), CamelliaSubkeyR(31),
 1408|     84|                     io[0], io[1], il, ir, t0, t1);
 1409|       |
 1410|       |    /* post whitening but kw4 */
 1411|     84|    io[2] ^= CamelliaSubkeyL(32);
  ------------------
  |  |   66|     84|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
 1412|     84|    io[3] ^= CamelliaSubkeyR(32);
  ------------------
  |  |   67|     84|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
 1413|       |
 1414|     84|    t0 = io[0];
 1415|     84|    t1 = io[1];
 1416|     84|    io[0] = io[2];
 1417|     84|    io[1] = io[3];
 1418|     84|    io[2] = t0;
 1419|     84|    io[3] = t1;
 1420|       |
 1421|     84|    PUTU32(output, io[0]);
  ------------------
  |  |   47|     84|    {                                        \
  |  |   48|     84|        *((PRUint32 *)(ct)) = SHA_HTONL(st); \
  |  |  ------------------
  |  |  |  |   97|     84|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  |  |   49|     84|    }
  ------------------
 1422|     84|    PUTU32(output + 4, io[1]);
  ------------------
  |  |   47|     84|    {                                        \
  |  |   48|     84|        *((PRUint32 *)(ct)) = SHA_HTONL(st); \
  |  |  ------------------
  |  |  |  |   97|     84|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  |  |   49|     84|    }
  ------------------
 1423|     84|    PUTU32(output + 8, io[2]);
  ------------------
  |  |   47|     84|    {                                        \
  |  |   48|     84|        *((PRUint32 *)(ct)) = SHA_HTONL(st); \
  |  |  ------------------
  |  |  |  |   97|     84|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  |  |   49|     84|    }
  ------------------
 1424|     84|    PUTU32(output + 12, io[3]);
  ------------------
  |  |   47|     84|    {                                        \
  |  |   48|     84|        *((PRUint32 *)(ct)) = SHA_HTONL(st); \
  |  |  ------------------
  |  |  |  |   97|     84|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  |  |   49|     84|    }
  ------------------
 1425|       |
 1426|     84|    return SECSuccess;
 1427|     84|}
camellia_decrypt256:
 1433|  4.61k|{
 1434|  4.61k|    PRUint32 il, ir, t0, t1; /* temporary valiables */
 1435|  4.61k|    PRUint32 io[4];
 1436|       |#if defined(CAMELLIA_NEED_TMP_VARIABLE)
 1437|       |    PRUint32 tmp;
 1438|       |#endif
 1439|       |
 1440|  4.61k|    io[0] = GETU32(input);
  ------------------
  |  |   45|  4.61k|#define GETU32(p) SHA_HTONL(*((PRUint32 *)(p)))
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
 1441|  4.61k|    io[1] = GETU32(input + 4);
  ------------------
  |  |   45|  4.61k|#define GETU32(p) SHA_HTONL(*((PRUint32 *)(p)))
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
 1442|  4.61k|    io[2] = GETU32(input + 8);
  ------------------
  |  |   45|  4.61k|#define GETU32(p) SHA_HTONL(*((PRUint32 *)(p)))
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
 1443|  4.61k|    io[3] = GETU32(input + 12);
  ------------------
  |  |   45|  4.61k|#define GETU32(p) SHA_HTONL(*((PRUint32 *)(p)))
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
 1444|       |
 1445|       |    /* pre whitening but absorb kw2*/
 1446|  4.61k|    io[0] ^= CamelliaSubkeyL(32);
  ------------------
  |  |   66|  4.61k|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
 1447|  4.61k|    io[1] ^= CamelliaSubkeyR(32);
  ------------------
  |  |   67|  4.61k|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
 1448|       |
 1449|       |    /* main iteration */
 1450|  4.61k|    CAMELLIA_ROUNDSM(io[0], io[1],
  ------------------
  |  |  141|  4.61k|    do {                                                         \
  |  |  142|  4.61k|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|  4.61k|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|  4.61k|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|  4.61k|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|  4.61k|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|  4.61k|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|  4.61k|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|  4.61k|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|  4.61k|        il ^= kl;                                                \
  |  |  151|  4.61k|        ir ^= kr;                                                \
  |  |  152|  4.61k|        ir ^= il;                                                \
  |  |  153|  4.61k|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|  4.61k|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|  4.61k|        il ^= ir;                                                \
  |  |  155|  4.61k|        yl ^= ir;                                                \
  |  |  156|  4.61k|        yr ^= il;                                                \
  |  |  157|  4.61k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1451|  4.61k|                     CamelliaSubkeyL(31), CamelliaSubkeyR(31),
 1452|  4.61k|                     io[2], io[3], il, ir, t0, t1);
 1453|  4.61k|    CAMELLIA_ROUNDSM(io[2], io[3],
  ------------------
  |  |  141|  4.61k|    do {                                                         \
  |  |  142|  4.61k|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|  4.61k|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|  4.61k|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|  4.61k|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|  4.61k|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|  4.61k|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|  4.61k|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|  4.61k|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|  4.61k|        il ^= kl;                                                \
  |  |  151|  4.61k|        ir ^= kr;                                                \
  |  |  152|  4.61k|        ir ^= il;                                                \
  |  |  153|  4.61k|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|  4.61k|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|  4.61k|        il ^= ir;                                                \
  |  |  155|  4.61k|        yl ^= ir;                                                \
  |  |  156|  4.61k|        yr ^= il;                                                \
  |  |  157|  4.61k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1454|  4.61k|                     CamelliaSubkeyL(30), CamelliaSubkeyR(30),
 1455|  4.61k|                     io[0], io[1], il, ir, t0, t1);
 1456|  4.61k|    CAMELLIA_ROUNDSM(io[0], io[1],
  ------------------
  |  |  141|  4.61k|    do {                                                         \
  |  |  142|  4.61k|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|  4.61k|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|  4.61k|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|  4.61k|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|  4.61k|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|  4.61k|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|  4.61k|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|  4.61k|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|  4.61k|        il ^= kl;                                                \
  |  |  151|  4.61k|        ir ^= kr;                                                \
  |  |  152|  4.61k|        ir ^= il;                                                \
  |  |  153|  4.61k|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|  4.61k|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|  4.61k|        il ^= ir;                                                \
  |  |  155|  4.61k|        yl ^= ir;                                                \
  |  |  156|  4.61k|        yr ^= il;                                                \
  |  |  157|  4.61k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1457|  4.61k|                     CamelliaSubkeyL(29), CamelliaSubkeyR(29),
 1458|  4.61k|                     io[2], io[3], il, ir, t0, t1);
 1459|  4.61k|    CAMELLIA_ROUNDSM(io[2], io[3],
  ------------------
  |  |  141|  4.61k|    do {                                                         \
  |  |  142|  4.61k|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|  4.61k|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|  4.61k|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|  4.61k|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|  4.61k|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|  4.61k|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|  4.61k|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|  4.61k|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|  4.61k|        il ^= kl;                                                \
  |  |  151|  4.61k|        ir ^= kr;                                                \
  |  |  152|  4.61k|        ir ^= il;                                                \
  |  |  153|  4.61k|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|  4.61k|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|  4.61k|        il ^= ir;                                                \
  |  |  155|  4.61k|        yl ^= ir;                                                \
  |  |  156|  4.61k|        yr ^= il;                                                \
  |  |  157|  4.61k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1460|  4.61k|                     CamelliaSubkeyL(28), CamelliaSubkeyR(28),
 1461|  4.61k|                     io[0], io[1], il, ir, t0, t1);
 1462|  4.61k|    CAMELLIA_ROUNDSM(io[0], io[1],
  ------------------
  |  |  141|  4.61k|    do {                                                         \
  |  |  142|  4.61k|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|  4.61k|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|  4.61k|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|  4.61k|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|  4.61k|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|  4.61k|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|  4.61k|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|  4.61k|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|  4.61k|        il ^= kl;                                                \
  |  |  151|  4.61k|        ir ^= kr;                                                \
  |  |  152|  4.61k|        ir ^= il;                                                \
  |  |  153|  4.61k|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|  4.61k|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|  4.61k|        il ^= ir;                                                \
  |  |  155|  4.61k|        yl ^= ir;                                                \
  |  |  156|  4.61k|        yr ^= il;                                                \
  |  |  157|  4.61k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1463|  4.61k|                     CamelliaSubkeyL(27), CamelliaSubkeyR(27),
 1464|  4.61k|                     io[2], io[3], il, ir, t0, t1);
 1465|  4.61k|    CAMELLIA_ROUNDSM(io[2], io[3],
  ------------------
  |  |  141|  4.61k|    do {                                                         \
  |  |  142|  4.61k|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|  4.61k|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|  4.61k|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|  4.61k|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|  4.61k|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|  4.61k|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|  4.61k|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|  4.61k|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|  4.61k|        il ^= kl;                                                \
  |  |  151|  4.61k|        ir ^= kr;                                                \
  |  |  152|  4.61k|        ir ^= il;                                                \
  |  |  153|  4.61k|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|  4.61k|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|  4.61k|        il ^= ir;                                                \
  |  |  155|  4.61k|        yl ^= ir;                                                \
  |  |  156|  4.61k|        yr ^= il;                                                \
  |  |  157|  4.61k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1466|  4.61k|                     CamelliaSubkeyL(26), CamelliaSubkeyR(26),
 1467|  4.61k|                     io[0], io[1], il, ir, t0, t1);
 1468|       |
 1469|  4.61k|    CAMELLIA_FLS(io[0], io[1], io[2], io[3],
  ------------------
  |  |  124|  4.61k|    do {                                                                 \
  |  |  125|  4.61k|        t0 = kll;                                                        \
  |  |  126|  4.61k|        t0 &= ll;                                                        \
  |  |  127|  4.61k|        lr ^= CAMELLIA_RL1(t0);                                          \
  |  |  ------------------
  |  |  |  |   72|  4.61k|#define CAMELLIA_RL1(x) (((x) << 1) + ((x) >> 31))
  |  |  ------------------
  |  |  128|  4.61k|        t1 = klr;                                                        \
  |  |  129|  4.61k|        t1 |= lr;                                                        \
  |  |  130|  4.61k|        ll ^= t1;                                                        \
  |  |  131|  4.61k|                                                                         \
  |  |  132|  4.61k|        t2 = krr;                                                        \
  |  |  133|  4.61k|        t2 |= rr;                                                        \
  |  |  134|  4.61k|        rl ^= t2;                                                        \
  |  |  135|  4.61k|        t3 = krl;                                                        \
  |  |  136|  4.61k|        t3 &= rl;                                                        \
  |  |  137|  4.61k|        rr ^= CAMELLIA_RL1(t3);                                          \
  |  |  ------------------
  |  |  |  |   72|  4.61k|#define CAMELLIA_RL1(x) (((x) << 1) + ((x) >> 31))
  |  |  ------------------
  |  |  138|  4.61k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (138:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1470|  4.61k|                 CamelliaSubkeyL(25), CamelliaSubkeyR(25),
 1471|  4.61k|                 CamelliaSubkeyL(24), CamelliaSubkeyR(24),
 1472|  4.61k|                 t0, t1, il, ir);
 1473|       |
 1474|  4.61k|    CAMELLIA_ROUNDSM(io[0], io[1],
  ------------------
  |  |  141|  4.61k|    do {                                                         \
  |  |  142|  4.61k|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|  4.61k|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|  4.61k|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|  4.61k|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|  4.61k|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|  4.61k|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|  4.61k|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|  4.61k|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|  4.61k|        il ^= kl;                                                \
  |  |  151|  4.61k|        ir ^= kr;                                                \
  |  |  152|  4.61k|        ir ^= il;                                                \
  |  |  153|  4.61k|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|  4.61k|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|  4.61k|        il ^= ir;                                                \
  |  |  155|  4.61k|        yl ^= ir;                                                \
  |  |  156|  4.61k|        yr ^= il;                                                \
  |  |  157|  4.61k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1475|  4.61k|                     CamelliaSubkeyL(23), CamelliaSubkeyR(23),
 1476|  4.61k|                     io[2], io[3], il, ir, t0, t1);
 1477|  4.61k|    CAMELLIA_ROUNDSM(io[2], io[3],
  ------------------
  |  |  141|  4.61k|    do {                                                         \
  |  |  142|  4.61k|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|  4.61k|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|  4.61k|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|  4.61k|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|  4.61k|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|  4.61k|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|  4.61k|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|  4.61k|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|  4.61k|        il ^= kl;                                                \
  |  |  151|  4.61k|        ir ^= kr;                                                \
  |  |  152|  4.61k|        ir ^= il;                                                \
  |  |  153|  4.61k|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|  4.61k|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|  4.61k|        il ^= ir;                                                \
  |  |  155|  4.61k|        yl ^= ir;                                                \
  |  |  156|  4.61k|        yr ^= il;                                                \
  |  |  157|  4.61k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1478|  4.61k|                     CamelliaSubkeyL(22), CamelliaSubkeyR(22),
 1479|  4.61k|                     io[0], io[1], il, ir, t0, t1);
 1480|  4.61k|    CAMELLIA_ROUNDSM(io[0], io[1],
  ------------------
  |  |  141|  4.61k|    do {                                                         \
  |  |  142|  4.61k|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|  4.61k|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|  4.61k|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|  4.61k|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|  4.61k|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|  4.61k|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|  4.61k|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|  4.61k|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|  4.61k|        il ^= kl;                                                \
  |  |  151|  4.61k|        ir ^= kr;                                                \
  |  |  152|  4.61k|        ir ^= il;                                                \
  |  |  153|  4.61k|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|  4.61k|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|  4.61k|        il ^= ir;                                                \
  |  |  155|  4.61k|        yl ^= ir;                                                \
  |  |  156|  4.61k|        yr ^= il;                                                \
  |  |  157|  4.61k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1481|  4.61k|                     CamelliaSubkeyL(21), CamelliaSubkeyR(21),
 1482|  4.61k|                     io[2], io[3], il, ir, t0, t1);
 1483|  4.61k|    CAMELLIA_ROUNDSM(io[2], io[3],
  ------------------
  |  |  141|  4.61k|    do {                                                         \
  |  |  142|  4.61k|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|  4.61k|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|  4.61k|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|  4.61k|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|  4.61k|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|  4.61k|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|  4.61k|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|  4.61k|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|  4.61k|        il ^= kl;                                                \
  |  |  151|  4.61k|        ir ^= kr;                                                \
  |  |  152|  4.61k|        ir ^= il;                                                \
  |  |  153|  4.61k|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|  4.61k|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|  4.61k|        il ^= ir;                                                \
  |  |  155|  4.61k|        yl ^= ir;                                                \
  |  |  156|  4.61k|        yr ^= il;                                                \
  |  |  157|  4.61k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1484|  4.61k|                     CamelliaSubkeyL(20), CamelliaSubkeyR(20),
 1485|  4.61k|                     io[0], io[1], il, ir, t0, t1);
 1486|  4.61k|    CAMELLIA_ROUNDSM(io[0], io[1],
  ------------------
  |  |  141|  4.61k|    do {                                                         \
  |  |  142|  4.61k|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|  4.61k|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|  4.61k|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|  4.61k|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|  4.61k|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|  4.61k|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|  4.61k|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|  4.61k|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|  4.61k|        il ^= kl;                                                \
  |  |  151|  4.61k|        ir ^= kr;                                                \
  |  |  152|  4.61k|        ir ^= il;                                                \
  |  |  153|  4.61k|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|  4.61k|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|  4.61k|        il ^= ir;                                                \
  |  |  155|  4.61k|        yl ^= ir;                                                \
  |  |  156|  4.61k|        yr ^= il;                                                \
  |  |  157|  4.61k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1487|  4.61k|                     CamelliaSubkeyL(19), CamelliaSubkeyR(19),
 1488|  4.61k|                     io[2], io[3], il, ir, t0, t1);
 1489|  4.61k|    CAMELLIA_ROUNDSM(io[2], io[3],
  ------------------
  |  |  141|  4.61k|    do {                                                         \
  |  |  142|  4.61k|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|  4.61k|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|  4.61k|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|  4.61k|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|  4.61k|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|  4.61k|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|  4.61k|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|  4.61k|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|  4.61k|        il ^= kl;                                                \
  |  |  151|  4.61k|        ir ^= kr;                                                \
  |  |  152|  4.61k|        ir ^= il;                                                \
  |  |  153|  4.61k|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|  4.61k|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|  4.61k|        il ^= ir;                                                \
  |  |  155|  4.61k|        yl ^= ir;                                                \
  |  |  156|  4.61k|        yr ^= il;                                                \
  |  |  157|  4.61k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1490|  4.61k|                     CamelliaSubkeyL(18), CamelliaSubkeyR(18),
 1491|  4.61k|                     io[0], io[1], il, ir, t0, t1);
 1492|       |
 1493|  4.61k|    CAMELLIA_FLS(io[0], io[1], io[2], io[3],
  ------------------
  |  |  124|  4.61k|    do {                                                                 \
  |  |  125|  4.61k|        t0 = kll;                                                        \
  |  |  126|  4.61k|        t0 &= ll;                                                        \
  |  |  127|  4.61k|        lr ^= CAMELLIA_RL1(t0);                                          \
  |  |  ------------------
  |  |  |  |   72|  4.61k|#define CAMELLIA_RL1(x) (((x) << 1) + ((x) >> 31))
  |  |  ------------------
  |  |  128|  4.61k|        t1 = klr;                                                        \
  |  |  129|  4.61k|        t1 |= lr;                                                        \
  |  |  130|  4.61k|        ll ^= t1;                                                        \
  |  |  131|  4.61k|                                                                         \
  |  |  132|  4.61k|        t2 = krr;                                                        \
  |  |  133|  4.61k|        t2 |= rr;                                                        \
  |  |  134|  4.61k|        rl ^= t2;                                                        \
  |  |  135|  4.61k|        t3 = krl;                                                        \
  |  |  136|  4.61k|        t3 &= rl;                                                        \
  |  |  137|  4.61k|        rr ^= CAMELLIA_RL1(t3);                                          \
  |  |  ------------------
  |  |  |  |   72|  4.61k|#define CAMELLIA_RL1(x) (((x) << 1) + ((x) >> 31))
  |  |  ------------------
  |  |  138|  4.61k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (138:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1494|  4.61k|                 CamelliaSubkeyL(17), CamelliaSubkeyR(17),
 1495|  4.61k|                 CamelliaSubkeyL(16), CamelliaSubkeyR(16),
 1496|  4.61k|                 t0, t1, il, ir);
 1497|       |
 1498|  4.61k|    CAMELLIA_ROUNDSM(io[0], io[1],
  ------------------
  |  |  141|  4.61k|    do {                                                         \
  |  |  142|  4.61k|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|  4.61k|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|  4.61k|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|  4.61k|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|  4.61k|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|  4.61k|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|  4.61k|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|  4.61k|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|  4.61k|        il ^= kl;                                                \
  |  |  151|  4.61k|        ir ^= kr;                                                \
  |  |  152|  4.61k|        ir ^= il;                                                \
  |  |  153|  4.61k|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|  4.61k|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|  4.61k|        il ^= ir;                                                \
  |  |  155|  4.61k|        yl ^= ir;                                                \
  |  |  156|  4.61k|        yr ^= il;                                                \
  |  |  157|  4.61k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1499|  4.61k|                     CamelliaSubkeyL(15), CamelliaSubkeyR(15),
 1500|  4.61k|                     io[2], io[3], il, ir, t0, t1);
 1501|  4.61k|    CAMELLIA_ROUNDSM(io[2], io[3],
  ------------------
  |  |  141|  4.61k|    do {                                                         \
  |  |  142|  4.61k|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|  4.61k|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|  4.61k|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|  4.61k|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|  4.61k|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|  4.61k|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|  4.61k|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|  4.61k|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|  4.61k|        il ^= kl;                                                \
  |  |  151|  4.61k|        ir ^= kr;                                                \
  |  |  152|  4.61k|        ir ^= il;                                                \
  |  |  153|  4.61k|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|  4.61k|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|  4.61k|        il ^= ir;                                                \
  |  |  155|  4.61k|        yl ^= ir;                                                \
  |  |  156|  4.61k|        yr ^= il;                                                \
  |  |  157|  4.61k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1502|  4.61k|                     CamelliaSubkeyL(14), CamelliaSubkeyR(14),
 1503|  4.61k|                     io[0], io[1], il, ir, t0, t1);
 1504|  4.61k|    CAMELLIA_ROUNDSM(io[0], io[1],
  ------------------
  |  |  141|  4.61k|    do {                                                         \
  |  |  142|  4.61k|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|  4.61k|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|  4.61k|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|  4.61k|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|  4.61k|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|  4.61k|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|  4.61k|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|  4.61k|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|  4.61k|        il ^= kl;                                                \
  |  |  151|  4.61k|        ir ^= kr;                                                \
  |  |  152|  4.61k|        ir ^= il;                                                \
  |  |  153|  4.61k|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|  4.61k|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|  4.61k|        il ^= ir;                                                \
  |  |  155|  4.61k|        yl ^= ir;                                                \
  |  |  156|  4.61k|        yr ^= il;                                                \
  |  |  157|  4.61k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1505|  4.61k|                     CamelliaSubkeyL(13), CamelliaSubkeyR(13),
 1506|  4.61k|                     io[2], io[3], il, ir, t0, t1);
 1507|  4.61k|    CAMELLIA_ROUNDSM(io[2], io[3],
  ------------------
  |  |  141|  4.61k|    do {                                                         \
  |  |  142|  4.61k|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|  4.61k|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|  4.61k|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|  4.61k|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|  4.61k|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|  4.61k|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|  4.61k|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|  4.61k|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|  4.61k|        il ^= kl;                                                \
  |  |  151|  4.61k|        ir ^= kr;                                                \
  |  |  152|  4.61k|        ir ^= il;                                                \
  |  |  153|  4.61k|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|  4.61k|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|  4.61k|        il ^= ir;                                                \
  |  |  155|  4.61k|        yl ^= ir;                                                \
  |  |  156|  4.61k|        yr ^= il;                                                \
  |  |  157|  4.61k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1508|  4.61k|                     CamelliaSubkeyL(12), CamelliaSubkeyR(12),
 1509|  4.61k|                     io[0], io[1], il, ir, t0, t1);
 1510|  4.61k|    CAMELLIA_ROUNDSM(io[0], io[1],
  ------------------
  |  |  141|  4.61k|    do {                                                         \
  |  |  142|  4.61k|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|  4.61k|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|  4.61k|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|  4.61k|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|  4.61k|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|  4.61k|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|  4.61k|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|  4.61k|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|  4.61k|        il ^= kl;                                                \
  |  |  151|  4.61k|        ir ^= kr;                                                \
  |  |  152|  4.61k|        ir ^= il;                                                \
  |  |  153|  4.61k|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|  4.61k|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|  4.61k|        il ^= ir;                                                \
  |  |  155|  4.61k|        yl ^= ir;                                                \
  |  |  156|  4.61k|        yr ^= il;                                                \
  |  |  157|  4.61k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1511|  4.61k|                     CamelliaSubkeyL(11), CamelliaSubkeyR(11),
 1512|  4.61k|                     io[2], io[3], il, ir, t0, t1);
 1513|  4.61k|    CAMELLIA_ROUNDSM(io[2], io[3],
  ------------------
  |  |  141|  4.61k|    do {                                                         \
  |  |  142|  4.61k|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|  4.61k|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|  4.61k|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|  4.61k|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|  4.61k|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|  4.61k|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|  4.61k|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|  4.61k|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|  4.61k|        il ^= kl;                                                \
  |  |  151|  4.61k|        ir ^= kr;                                                \
  |  |  152|  4.61k|        ir ^= il;                                                \
  |  |  153|  4.61k|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|  4.61k|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|  4.61k|        il ^= ir;                                                \
  |  |  155|  4.61k|        yl ^= ir;                                                \
  |  |  156|  4.61k|        yr ^= il;                                                \
  |  |  157|  4.61k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1514|  4.61k|                     CamelliaSubkeyL(10), CamelliaSubkeyR(10),
 1515|  4.61k|                     io[0], io[1], il, ir, t0, t1);
 1516|       |
 1517|  4.61k|    CAMELLIA_FLS(io[0], io[1], io[2], io[3],
  ------------------
  |  |  124|  4.61k|    do {                                                                 \
  |  |  125|  4.61k|        t0 = kll;                                                        \
  |  |  126|  4.61k|        t0 &= ll;                                                        \
  |  |  127|  4.61k|        lr ^= CAMELLIA_RL1(t0);                                          \
  |  |  ------------------
  |  |  |  |   72|  4.61k|#define CAMELLIA_RL1(x) (((x) << 1) + ((x) >> 31))
  |  |  ------------------
  |  |  128|  4.61k|        t1 = klr;                                                        \
  |  |  129|  4.61k|        t1 |= lr;                                                        \
  |  |  130|  4.61k|        ll ^= t1;                                                        \
  |  |  131|  4.61k|                                                                         \
  |  |  132|  4.61k|        t2 = krr;                                                        \
  |  |  133|  4.61k|        t2 |= rr;                                                        \
  |  |  134|  4.61k|        rl ^= t2;                                                        \
  |  |  135|  4.61k|        t3 = krl;                                                        \
  |  |  136|  4.61k|        t3 &= rl;                                                        \
  |  |  137|  4.61k|        rr ^= CAMELLIA_RL1(t3);                                          \
  |  |  ------------------
  |  |  |  |   72|  4.61k|#define CAMELLIA_RL1(x) (((x) << 1) + ((x) >> 31))
  |  |  ------------------
  |  |  138|  4.61k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (138:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1518|  4.61k|                 CamelliaSubkeyL(9), CamelliaSubkeyR(9),
 1519|  4.61k|                 CamelliaSubkeyL(8), CamelliaSubkeyR(8),
 1520|  4.61k|                 t0, t1, il, ir);
 1521|       |
 1522|  4.61k|    CAMELLIA_ROUNDSM(io[0], io[1],
  ------------------
  |  |  141|  4.61k|    do {                                                         \
  |  |  142|  4.61k|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|  4.61k|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|  4.61k|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|  4.61k|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|  4.61k|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|  4.61k|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|  4.61k|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|  4.61k|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|  4.61k|        il ^= kl;                                                \
  |  |  151|  4.61k|        ir ^= kr;                                                \
  |  |  152|  4.61k|        ir ^= il;                                                \
  |  |  153|  4.61k|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|  4.61k|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|  4.61k|        il ^= ir;                                                \
  |  |  155|  4.61k|        yl ^= ir;                                                \
  |  |  156|  4.61k|        yr ^= il;                                                \
  |  |  157|  4.61k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1523|  4.61k|                     CamelliaSubkeyL(7), CamelliaSubkeyR(7),
 1524|  4.61k|                     io[2], io[3], il, ir, t0, t1);
 1525|  4.61k|    CAMELLIA_ROUNDSM(io[2], io[3],
  ------------------
  |  |  141|  4.61k|    do {                                                         \
  |  |  142|  4.61k|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|  4.61k|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|  4.61k|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|  4.61k|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|  4.61k|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|  4.61k|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|  4.61k|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|  4.61k|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|  4.61k|        il ^= kl;                                                \
  |  |  151|  4.61k|        ir ^= kr;                                                \
  |  |  152|  4.61k|        ir ^= il;                                                \
  |  |  153|  4.61k|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|  4.61k|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|  4.61k|        il ^= ir;                                                \
  |  |  155|  4.61k|        yl ^= ir;                                                \
  |  |  156|  4.61k|        yr ^= il;                                                \
  |  |  157|  4.61k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1526|  4.61k|                     CamelliaSubkeyL(6), CamelliaSubkeyR(6),
 1527|  4.61k|                     io[0], io[1], il, ir, t0, t1);
 1528|  4.61k|    CAMELLIA_ROUNDSM(io[0], io[1],
  ------------------
  |  |  141|  4.61k|    do {                                                         \
  |  |  142|  4.61k|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|  4.61k|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|  4.61k|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|  4.61k|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|  4.61k|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|  4.61k|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|  4.61k|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|  4.61k|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|  4.61k|        il ^= kl;                                                \
  |  |  151|  4.61k|        ir ^= kr;                                                \
  |  |  152|  4.61k|        ir ^= il;                                                \
  |  |  153|  4.61k|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|  4.61k|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|  4.61k|        il ^= ir;                                                \
  |  |  155|  4.61k|        yl ^= ir;                                                \
  |  |  156|  4.61k|        yr ^= il;                                                \
  |  |  157|  4.61k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1529|  4.61k|                     CamelliaSubkeyL(5), CamelliaSubkeyR(5),
 1530|  4.61k|                     io[2], io[3], il, ir, t0, t1);
 1531|  4.61k|    CAMELLIA_ROUNDSM(io[2], io[3],
  ------------------
  |  |  141|  4.61k|    do {                                                         \
  |  |  142|  4.61k|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|  4.61k|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|  4.61k|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|  4.61k|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|  4.61k|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|  4.61k|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|  4.61k|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|  4.61k|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|  4.61k|        il ^= kl;                                                \
  |  |  151|  4.61k|        ir ^= kr;                                                \
  |  |  152|  4.61k|        ir ^= il;                                                \
  |  |  153|  4.61k|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|  4.61k|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|  4.61k|        il ^= ir;                                                \
  |  |  155|  4.61k|        yl ^= ir;                                                \
  |  |  156|  4.61k|        yr ^= il;                                                \
  |  |  157|  4.61k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1532|  4.61k|                     CamelliaSubkeyL(4), CamelliaSubkeyR(4),
 1533|  4.61k|                     io[0], io[1], il, ir, t0, t1);
 1534|  4.61k|    CAMELLIA_ROUNDSM(io[0], io[1],
  ------------------
  |  |  141|  4.61k|    do {                                                         \
  |  |  142|  4.61k|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|  4.61k|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|  4.61k|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|  4.61k|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|  4.61k|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|  4.61k|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|  4.61k|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|  4.61k|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|  4.61k|        il ^= kl;                                                \
  |  |  151|  4.61k|        ir ^= kr;                                                \
  |  |  152|  4.61k|        ir ^= il;                                                \
  |  |  153|  4.61k|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|  4.61k|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|  4.61k|        il ^= ir;                                                \
  |  |  155|  4.61k|        yl ^= ir;                                                \
  |  |  156|  4.61k|        yr ^= il;                                                \
  |  |  157|  4.61k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1535|  4.61k|                     CamelliaSubkeyL(3), CamelliaSubkeyR(3),
 1536|  4.61k|                     io[2], io[3], il, ir, t0, t1);
 1537|  4.61k|    CAMELLIA_ROUNDSM(io[2], io[3],
  ------------------
  |  |  141|  4.61k|    do {                                                         \
  |  |  142|  4.61k|        ir = CAMELLIA_SP1110(xr & 0xff) ^                        \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  143|  4.61k|             CAMELLIA_SP0222((xr >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  144|  4.61k|             CAMELLIA_SP3033((xr >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  145|  4.61k|             CAMELLIA_SP4404((xr >> 8) & 0xff);                  \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  146|  4.61k|        il = CAMELLIA_SP1110((xl >> 24) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   95|  4.61k|#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
  |  |  ------------------
  |  |  147|  4.61k|             CAMELLIA_SP0222((xl >> 16) & 0xff) ^                \
  |  |  ------------------
  |  |  |  |   96|  4.61k|#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
  |  |  ------------------
  |  |  148|  4.61k|             CAMELLIA_SP3033((xl >> 8) & 0xff) ^                 \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
  |  |  ------------------
  |  |  149|  4.61k|             CAMELLIA_SP4404(xl & 0xff);                         \
  |  |  ------------------
  |  |  |  |   98|  4.61k|#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
  |  |  ------------------
  |  |  150|  4.61k|        il ^= kl;                                                \
  |  |  151|  4.61k|        ir ^= kr;                                                \
  |  |  152|  4.61k|        ir ^= il;                                                \
  |  |  153|  4.61k|        il = CAMELLIA_RR8(il);                                   \
  |  |  ------------------
  |  |  |  |   70|  4.61k|#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
  |  |  ------------------
  |  |  154|  4.61k|        il ^= ir;                                                \
  |  |  155|  4.61k|        yl ^= ir;                                                \
  |  |  156|  4.61k|        yr ^= il;                                                \
  |  |  157|  4.61k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (157:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1538|  4.61k|                     CamelliaSubkeyL(2), CamelliaSubkeyR(2),
 1539|  4.61k|                     io[0], io[1], il, ir, t0, t1);
 1540|       |
 1541|       |    /* post whitening but kw4 */
 1542|  4.61k|    io[2] ^= CamelliaSubkeyL(0);
  ------------------
  |  |   66|  4.61k|#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
  ------------------
 1543|  4.61k|    io[3] ^= CamelliaSubkeyR(0);
  ------------------
  |  |   67|  4.61k|#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
  ------------------
 1544|       |
 1545|  4.61k|    t0 = io[0];
 1546|  4.61k|    t1 = io[1];
 1547|  4.61k|    io[0] = io[2];
 1548|  4.61k|    io[1] = io[3];
 1549|  4.61k|    io[2] = t0;
 1550|  4.61k|    io[3] = t1;
 1551|       |
 1552|  4.61k|    PUTU32(output, io[0]);
  ------------------
  |  |   47|  4.61k|    {                                        \
  |  |   48|  4.61k|        *((PRUint32 *)(ct)) = SHA_HTONL(st); \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  |  |   49|  4.61k|    }
  ------------------
 1553|  4.61k|    PUTU32(output + 4, io[1]);
  ------------------
  |  |   47|  4.61k|    {                                        \
  |  |   48|  4.61k|        *((PRUint32 *)(ct)) = SHA_HTONL(st); \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  |  |   49|  4.61k|    }
  ------------------
 1554|  4.61k|    PUTU32(output + 8, io[2]);
  ------------------
  |  |   47|  4.61k|    {                                        \
  |  |   48|  4.61k|        *((PRUint32 *)(ct)) = SHA_HTONL(st); \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  |  |   49|  4.61k|    }
  ------------------
 1555|  4.61k|    PUTU32(output + 12, io[3]);
  ------------------
  |  |   47|  4.61k|    {                                        \
  |  |   48|  4.61k|        *((PRUint32 *)(ct)) = SHA_HTONL(st); \
  |  |  ------------------
  |  |  |  |   97|  4.61k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  |  |   49|  4.61k|    }
  ------------------
 1556|       |
 1557|  4.61k|    return SECSuccess;
 1558|  4.61k|}
camellia_key_expansion:
 1570|    190|{
 1571|    190|    cx->keysize = keysize;
 1572|       |
 1573|    190|    switch (keysize) {
 1574|    148|        case 16:
  ------------------
  |  Branch (1574:9): [True: 148, False: 42]
  ------------------
 1575|    148|            camellia_setup128(key, cx->expandedKey);
 1576|    148|            break;
 1577|      0|        case 24:
  ------------------
  |  Branch (1577:9): [True: 0, False: 190]
  ------------------
 1578|      0|            camellia_setup192(key, cx->expandedKey);
 1579|      0|            break;
 1580|     42|        case 32:
  ------------------
  |  Branch (1580:9): [True: 42, False: 148]
  ------------------
 1581|     42|            camellia_setup256(key, cx->expandedKey);
 1582|     42|            break;
 1583|      0|        default:
  ------------------
  |  Branch (1583:9): [True: 0, False: 190]
  ------------------
 1584|      0|            break;
 1585|    190|    }
 1586|    190|    return SECSuccess;
 1587|    190|}
camellia_encryptCBC:
 1620|    194|{
 1621|    194|    unsigned int j;
 1622|    194|    unsigned char *lastblock;
 1623|    194|    unsigned char inblock[CAMELLIA_BLOCK_SIZE];
 1624|    194|    CamelliaBlockFunc *encryptor;
 1625|       |
 1626|    194|    if (!inputLen)
  ------------------
  |  Branch (1626:9): [True: 0, False: 194]
  ------------------
 1627|      0|        return SECSuccess;
 1628|    194|    lastblock = cx->iv;
 1629|       |
 1630|    194|    encryptor = (cx->keysize == 16)
  ------------------
  |  Branch (1630:17): [True: 152, False: 42]
  ------------------
 1631|    194|                    ? &camellia_encrypt128
 1632|    194|                    : &camellia_encrypt256;
 1633|       |
 1634|    580|    while (inputLen > 0) {
  ------------------
  |  Branch (1634:12): [True: 386, False: 194]
  ------------------
 1635|       |        /* XOR with the last block (IV if first block) */
 1636|  6.56k|        for (j = 0; j < CAMELLIA_BLOCK_SIZE; ++j)
  ------------------
  |  |    8|  6.56k|#define CAMELLIA_BLOCK_SIZE 16  /* bytes */
  ------------------
  |  Branch (1636:21): [True: 6.17k, False: 386]
  ------------------
 1637|  6.17k|            inblock[j] = input[j] ^ lastblock[j];
 1638|       |        /* encrypt */
 1639|    386|        (*encryptor)(cx->expandedKey, output, inblock);
 1640|       |
 1641|       |        /* move to the next block */
 1642|    386|        lastblock = output;
 1643|    386|        output += CAMELLIA_BLOCK_SIZE;
  ------------------
  |  |    8|    386|#define CAMELLIA_BLOCK_SIZE 16  /* bytes */
  ------------------
 1644|    386|        input += CAMELLIA_BLOCK_SIZE;
  ------------------
  |  |    8|    386|#define CAMELLIA_BLOCK_SIZE 16  /* bytes */
  ------------------
 1645|    386|        inputLen -= CAMELLIA_BLOCK_SIZE;
  ------------------
  |  |    8|    386|#define CAMELLIA_BLOCK_SIZE 16  /* bytes */
  ------------------
 1646|    386|    }
 1647|    194|    memcpy(cx->iv, lastblock, CAMELLIA_BLOCK_SIZE);
  ------------------
  |  |    8|    194|#define CAMELLIA_BLOCK_SIZE 16  /* bytes */
  ------------------
 1648|    194|    return SECSuccess;
 1649|    194|}
camellia_decryptCBC:
 1677|  1.62k|{
 1678|  1.62k|    const unsigned char *in;
 1679|  1.62k|    unsigned char *out;
 1680|  1.62k|    unsigned int j;
 1681|  1.62k|    unsigned char newIV[CAMELLIA_BLOCK_SIZE];
 1682|  1.62k|    CamelliaBlockFunc *decryptor;
 1683|       |
 1684|  1.62k|    if (!inputLen)
  ------------------
  |  Branch (1684:9): [True: 0, False: 1.62k]
  ------------------
 1685|      0|        return SECSuccess;
 1686|       |
 1687|  1.62k|    PORT_Assert(output - input >= 0 || input - output >= (int)inputLen);
  ------------------
  |  |  120|  1.62k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  2.41k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 841, False: 785]
  |  |  |  |  |  Branch (208:7): [True: 785, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1688|       |
 1689|  1.62k|    in = input + (inputLen - CAMELLIA_BLOCK_SIZE);
  ------------------
  |  |    8|  1.62k|#define CAMELLIA_BLOCK_SIZE 16  /* bytes */
  ------------------
 1690|  1.62k|    memcpy(newIV, in, CAMELLIA_BLOCK_SIZE);
  ------------------
  |  |    8|  1.62k|#define CAMELLIA_BLOCK_SIZE 16  /* bytes */
  ------------------
 1691|  1.62k|    out = output + (inputLen - CAMELLIA_BLOCK_SIZE);
  ------------------
  |  |    8|  1.62k|#define CAMELLIA_BLOCK_SIZE 16  /* bytes */
  ------------------
 1692|       |
 1693|  1.62k|    decryptor = (cx->keysize == 16)
  ------------------
  |  Branch (1693:17): [True: 1.53k, False: 94]
  ------------------
 1694|  1.62k|                    ? &camellia_decrypt128
 1695|  1.62k|                    : &camellia_decrypt256;
 1696|       |
 1697|  30.3k|    while (inputLen > CAMELLIA_BLOCK_SIZE) {
  ------------------
  |  |    8|  30.3k|#define CAMELLIA_BLOCK_SIZE 16  /* bytes */
  ------------------
  |  Branch (1697:12): [True: 28.7k, False: 1.62k]
  ------------------
 1698|  28.7k|        (*decryptor)(cx->expandedKey, out, in);
 1699|       |
 1700|   488k|        for (j = 0; j < CAMELLIA_BLOCK_SIZE; ++j)
  ------------------
  |  |    8|   488k|#define CAMELLIA_BLOCK_SIZE 16  /* bytes */
  ------------------
  |  Branch (1700:21): [True: 459k, False: 28.7k]
  ------------------
 1701|   459k|            out[j] ^= in[(int)(j - CAMELLIA_BLOCK_SIZE)];
  ------------------
  |  |    8|   459k|#define CAMELLIA_BLOCK_SIZE 16  /* bytes */
  ------------------
 1702|       |
 1703|  28.7k|        out -= CAMELLIA_BLOCK_SIZE;
  ------------------
  |  |    8|  28.7k|#define CAMELLIA_BLOCK_SIZE 16  /* bytes */
  ------------------
 1704|  28.7k|        in -= CAMELLIA_BLOCK_SIZE;
  ------------------
  |  |    8|  28.7k|#define CAMELLIA_BLOCK_SIZE 16  /* bytes */
  ------------------
 1705|  28.7k|        inputLen -= CAMELLIA_BLOCK_SIZE;
  ------------------
  |  |    8|  28.7k|#define CAMELLIA_BLOCK_SIZE 16  /* bytes */
  ------------------
 1706|  28.7k|    }
 1707|  1.62k|    if (in == input) {
  ------------------
  |  Branch (1707:9): [True: 1.62k, False: 0]
  ------------------
 1708|  1.62k|        (*decryptor)(cx->expandedKey, out, in);
 1709|       |
 1710|  27.6k|        for (j = 0; j < CAMELLIA_BLOCK_SIZE; ++j)
  ------------------
  |  |    8|  27.6k|#define CAMELLIA_BLOCK_SIZE 16  /* bytes */
  ------------------
  |  Branch (1710:21): [True: 26.0k, False: 1.62k]
  ------------------
 1711|  26.0k|            out[j] ^= cx->iv[j];
 1712|  1.62k|    }
 1713|  1.62k|    memcpy(cx->iv, newIV, CAMELLIA_BLOCK_SIZE);
  ------------------
  |  |    8|  1.62k|#define CAMELLIA_BLOCK_SIZE 16  /* bytes */
  ------------------
 1714|  1.62k|    return SECSuccess;
 1715|  1.62k|}
Camellia_CreateContext:
 1777|    190|{
 1778|    190|    CamelliaContext *cx;
 1779|       |
 1780|    190|    if (key == NULL ||
  ------------------
  |  Branch (1780:9): [True: 0, False: 190]
  ------------------
 1781|    190|        (keysize != 16 && keysize != 24 && keysize != 32)) {
  ------------------
  |  Branch (1781:10): [True: 42, False: 148]
  |  Branch (1781:27): [True: 42, False: 0]
  |  Branch (1781:44): [True: 0, False: 42]
  ------------------
 1782|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1783|      0|        return NULL;
 1784|      0|    }
 1785|    190|    if (mode != NSS_CAMELLIA && mode != NSS_CAMELLIA_CBC) {
  ------------------
  |  |   42|    380|#define NSS_CAMELLIA 0
  ------------------
                  if (mode != NSS_CAMELLIA && mode != NSS_CAMELLIA_CBC) {
  ------------------
  |  |   43|    190|#define NSS_CAMELLIA_CBC 1
  ------------------
  |  Branch (1785:9): [True: 190, False: 0]
  |  Branch (1785:33): [True: 0, False: 190]
  ------------------
 1786|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1787|      0|        return NULL;
 1788|      0|    }
 1789|    190|    if (mode == NSS_CAMELLIA_CBC && iv == NULL) {
  ------------------
  |  |   43|    380|#define NSS_CAMELLIA_CBC 1
  ------------------
  |  Branch (1789:9): [True: 190, False: 0]
  |  Branch (1789:37): [True: 0, False: 190]
  ------------------
 1790|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1791|      0|        return NULL;
 1792|      0|    }
 1793|    190|    cx = PORT_ZNew(CamelliaContext);
  ------------------
  |  |  148|    190|#define PORT_ZNew(type) (type *)PORT_ZAlloc(sizeof(type))
  |  |  ------------------
  |  |  |  |   72|    190|#define PORT_ZAlloc PORT_ZAlloc_Util
  |  |  ------------------
  ------------------
 1794|    190|    if (!cx) {
  ------------------
  |  Branch (1794:9): [True: 0, False: 190]
  ------------------
 1795|      0|        PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1796|      0|        return NULL;
 1797|      0|    }
 1798|       |
 1799|       |    /* copy in the iv, if neccessary */
 1800|    190|    if (mode == NSS_CAMELLIA_CBC) {
  ------------------
  |  |   43|    190|#define NSS_CAMELLIA_CBC 1
  ------------------
  |  Branch (1800:9): [True: 190, False: 0]
  ------------------
 1801|    190|        memcpy(cx->iv, iv, CAMELLIA_BLOCK_SIZE);
  ------------------
  |  |    8|    190|#define CAMELLIA_BLOCK_SIZE 16  /* bytes */
  ------------------
 1802|    190|        cx->worker = (encrypt) ? &camellia_encryptCBC : &camellia_decryptCBC;
  ------------------
  |  Branch (1802:22): [True: 95, False: 95]
  ------------------
 1803|    190|    } else {
 1804|      0|        cx->worker = (encrypt) ? &camellia_encryptECB : &camellia_decryptECB;
  ------------------
  |  Branch (1804:22): [True: 0, False: 0]
  ------------------
 1805|      0|    }
 1806|       |    /* copy keysize */
 1807|    190|    cx->keysize = keysize;
 1808|       |
 1809|       |    /* Generate expanded key */
 1810|    190|    if (camellia_key_expansion(cx, key, keysize) != SECSuccess)
  ------------------
  |  Branch (1810:9): [True: 0, False: 190]
  ------------------
 1811|      0|        goto cleanup;
 1812|       |
 1813|    190|    return cx;
 1814|      0|cleanup:
 1815|      0|    PORT_ZFree(cx, sizeof *cx);
  ------------------
  |  |   75|      0|#define PORT_ZFree PORT_ZFree_Util
  ------------------
 1816|      0|    return NULL;
 1817|    190|}
Camellia_DestroyContext:
 1827|    190|{
 1828|    190|    if (cx)
  ------------------
  |  Branch (1828:9): [True: 190, False: 0]
  ------------------
 1829|    190|        memset(cx, 0, sizeof *cx);
 1830|    190|    if (freeit)
  ------------------
  |  Branch (1830:9): [True: 190, False: 0]
  ------------------
 1831|    190|        PORT_Free(cx);
  ------------------
  |  |   60|    190|#define PORT_Free PORT_Free_Util
  ------------------
 1832|    190|}
Camellia_Encrypt:
 1844|    194|{
 1845|       |
 1846|       |    /* Check args */
 1847|    194|    if (cx == NULL || output == NULL || input == NULL ||
  ------------------
  |  Branch (1847:9): [True: 0, False: 194]
  |  Branch (1847:23): [True: 0, False: 194]
  |  Branch (1847:41): [True: 0, False: 194]
  ------------------
 1848|    194|        outputLen == NULL) {
  ------------------
  |  Branch (1848:9): [True: 0, False: 194]
  ------------------
 1849|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1850|      0|        return SECFailure;
 1851|      0|    }
 1852|       |
 1853|    194|    if (inputLen % CAMELLIA_BLOCK_SIZE != 0) {
  ------------------
  |  |    8|    194|#define CAMELLIA_BLOCK_SIZE 16  /* bytes */
  ------------------
  |  Branch (1853:9): [True: 0, False: 194]
  ------------------
 1854|      0|        PORT_SetError(SEC_ERROR_INPUT_LEN);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1855|      0|        return SECFailure;
 1856|      0|    }
 1857|    194|    if (maxOutputLen < inputLen) {
  ------------------
  |  Branch (1857:9): [True: 0, False: 194]
  ------------------
 1858|      0|        PORT_SetError(SEC_ERROR_OUTPUT_LEN);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1859|      0|        return SECFailure;
 1860|      0|    }
 1861|    194|    *outputLen = inputLen;
 1862|       |
 1863|    194|    return (*cx->worker)(cx, output, outputLen, maxOutputLen,
 1864|    194|                         input, inputLen);
 1865|    194|}
Camellia_Decrypt:
 1877|  1.62k|{
 1878|       |
 1879|       |    /* Check args */
 1880|  1.62k|    if (cx == NULL || output == NULL || input == NULL || outputLen == NULL) {
  ------------------
  |  Branch (1880:9): [True: 0, False: 1.62k]
  |  Branch (1880:23): [True: 0, False: 1.62k]
  |  Branch (1880:41): [True: 0, False: 1.62k]
  |  Branch (1880:58): [True: 0, False: 1.62k]
  ------------------
 1881|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1882|      0|        return SECFailure;
 1883|      0|    }
 1884|  1.62k|    if (inputLen % CAMELLIA_BLOCK_SIZE != 0) {
  ------------------
  |  |    8|  1.62k|#define CAMELLIA_BLOCK_SIZE 16  /* bytes */
  ------------------
  |  Branch (1884:9): [True: 0, False: 1.62k]
  ------------------
 1885|      0|        PORT_SetError(SEC_ERROR_INPUT_LEN);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1886|      0|        return SECFailure;
 1887|      0|    }
 1888|  1.62k|    if (maxOutputLen < inputLen) {
  ------------------
  |  Branch (1888:9): [True: 0, False: 1.62k]
  ------------------
 1889|      0|        PORT_SetError(SEC_ERROR_OUTPUT_LEN);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1890|      0|        return SECFailure;
 1891|      0|    }
 1892|  1.62k|    *outputLen = inputLen;
 1893|       |
 1894|  1.62k|    return (*cx->worker)(cx, output, outputLen, maxOutputLen,
 1895|  1.62k|                         input, inputLen);
 1896|  1.62k|}

ChaCha20Poly1305_InitContext:
  153|  36.3k|{
  154|       |#ifdef NSS_DISABLE_CHACHAPOLY
  155|       |    return SECFailure;
  156|       |#else
  157|  36.3k|    if (keyLen != 32) {
  ------------------
  |  Branch (157:9): [True: 0, False: 36.3k]
  ------------------
  158|      0|        PORT_SetError(SEC_ERROR_BAD_KEY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  159|      0|        return SECFailure;
  160|      0|    }
  161|  36.3k|    if (tagLen != 16) {
  ------------------
  |  Branch (161:9): [True: 0, False: 36.3k]
  ------------------
  162|      0|        PORT_SetError(SEC_ERROR_INPUT_LEN);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  163|      0|        return SECFailure;
  164|      0|    }
  165|       |
  166|  36.3k|    PORT_Memcpy(ctx->key, key, sizeof(ctx->key));
  ------------------
  |  |  180|  36.3k|#define PORT_Memcpy memcpy
  ------------------
  167|  36.3k|    ctx->tagLen = tagLen;
  168|       |
  169|  36.3k|    NSS_CLASSIFY(ctx->key, sizeof(ctx->key));
  170|       |
  171|  36.3k|    return SECSuccess;
  172|  36.3k|#endif
  173|  36.3k|}
ChaCha20Poly1305_CreateContext:
  178|  36.3k|{
  179|       |#ifdef NSS_DISABLE_CHACHAPOLY
  180|       |    return NULL;
  181|       |#else
  182|  36.3k|    ChaCha20Poly1305Context *ctx;
  183|       |
  184|  36.3k|    ctx = PORT_New(ChaCha20Poly1305Context);
  ------------------
  |  |  151|  36.3k|#define PORT_New(type) (type *)PORT_Alloc(sizeof(type))
  |  |  ------------------
  |  |  |  |   52|  36.3k|#define PORT_Alloc PORT_Alloc_Util
  |  |  ------------------
  ------------------
  185|  36.3k|    if (ctx == NULL) {
  ------------------
  |  Branch (185:9): [True: 0, False: 36.3k]
  ------------------
  186|      0|        return NULL;
  187|      0|    }
  188|       |
  189|  36.3k|    if (ChaCha20Poly1305_InitContext(ctx, key, keyLen, tagLen) != SECSuccess) {
  ------------------
  |  Branch (189:9): [True: 0, False: 36.3k]
  ------------------
  190|      0|        PORT_Free(ctx);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
  191|      0|        ctx = NULL;
  192|      0|    }
  193|       |
  194|  36.3k|    return ctx;
  195|  36.3k|#endif
  196|  36.3k|}
ChaCha20Poly1305_DestroyContext:
  200|  36.3k|{
  201|  36.3k|#ifndef NSS_DISABLE_CHACHAPOLY
  202|  36.3k|    PORT_Memset(ctx, 0, sizeof(*ctx));
  ------------------
  |  |  182|  36.3k|#define PORT_Memset memset
  ------------------
  203|  36.3k|    if (freeit) {
  ------------------
  |  Branch (203:9): [True: 36.3k, False: 0]
  ------------------
  204|  36.3k|        PORT_Free(ctx);
  ------------------
  |  |   60|  36.3k|#define PORT_Free PORT_Free_Util
  ------------------
  205|  36.3k|    }
  206|  36.3k|#endif
  207|  36.3k|}
ChaCha20Xor:
  213|  5.31k|{
  214|  5.31k|#ifdef NSS_X64
  215|  5.31k|#ifndef NSS_DISABLE_AVX2
  216|  5.31k|    if (avx2_support()) {
  ------------------
  |  Branch (216:9): [True: 5.31k, False: 0]
  ------------------
  217|  5.31k|        Hacl_Chacha20_Vec256_chacha20_encrypt_256(len, output, block, k, nonce, ctr);
  218|  5.31k|        return;
  219|  5.31k|    }
  220|      0|#endif
  221|       |
  222|      0|#ifndef NSS_DISABLE_SSE3
  223|      0|    if (ssse3_support() && sse4_1_support() && avx_support()) {
  ------------------
  |  Branch (223:9): [True: 0, False: 0]
  |  Branch (223:28): [True: 0, False: 0]
  |  Branch (223:48): [True: 0, False: 0]
  ------------------
  224|      0|        Hacl_Chacha20_Vec128_chacha20_encrypt_128(len, output, block, k, nonce, ctr);
  225|      0|        return;
  226|      0|    }
  227|      0|#endif
  228|       |
  229|       |#elif defined(__powerpc64__) && defined(__LITTLE_ENDIAN__) && \
  230|       |    !defined(NSS_DISABLE_ALTIVEC) && !defined(NSS_DISABLE_CRYPTO_VSX)
  231|       |    if (ppc_crypto_support()) {
  232|       |        chacha20vsx(len, output, block, k, nonce, ctr);
  233|       |        return;
  234|       |    }
  235|       |#endif
  236|      0|    {
  237|      0|        Hacl_Chacha20_chacha20_encrypt(len, output, block, k, nonce, ctr);
  238|      0|        return;
  239|      0|    }
  240|      0|}
ChaCha20_Xor:
  246|  5.31k|{
  247|       |#ifdef NSS_DISABLE_CHACHAPOLY
  248|       |    return SECFailure;
  249|       |#else
  250|       |    // ChaCha has a 64 octet block, with a 32-bit block counter.
  251|  5.31k|    if (sizeof(len) > 4) {
  ------------------
  |  Branch (251:9): [Folded - Ignored]
  ------------------
  252|      0|        unsigned long long len_ull = len;
  253|      0|        if (len_ull >= (1ULL << (6 + 32))) {
  ------------------
  |  Branch (253:13): [True: 0, False: 0]
  ------------------
  254|      0|            PORT_SetError(SEC_ERROR_INPUT_LEN);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  255|      0|            return SECFailure;
  256|      0|        }
  257|      0|    }
  258|  5.31k|    ChaCha20Xor(output, (uint8_t *)block, len, (uint8_t *)k,
  259|  5.31k|                (uint8_t *)nonce, ctr);
  260|  5.31k|    return SECSuccess;
  261|  5.31k|#endif
  262|  5.31k|}
ChaCha20Poly1305_Encrypt:
  418|      4|{
  419|       |#ifdef NSS_DISABLE_CHACHAPOLY
  420|       |    return SECFailure;
  421|       |#else
  422|       |
  423|      4|    if (nonceLen != 12) {
  ------------------
  |  Branch (423:9): [True: 0, False: 4]
  ------------------
  424|      0|        PORT_SetError(SEC_ERROR_INPUT_LEN);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  425|      0|        return SECFailure;
  426|      0|    }
  427|       |    // ChaCha has a 64 octet block, with a 32-bit block counter.
  428|      4|    if (sizeof(inputLen) > 4) {
  ------------------
  |  Branch (428:9): [Folded - Ignored]
  ------------------
  429|      0|        unsigned long long inputLen_ull = inputLen;
  430|      0|        if (inputLen_ull >= (1ULL << (6 + 32))) {
  ------------------
  |  Branch (430:13): [True: 0, False: 0]
  ------------------
  431|      0|            PORT_SetError(SEC_ERROR_INPUT_LEN);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  432|      0|            return SECFailure;
  433|      0|        }
  434|      0|    }
  435|      4|    if (maxOutputLen < inputLen) {
  ------------------
  |  Branch (435:9): [True: 0, False: 4]
  ------------------
  436|      0|        PORT_SetError(SEC_ERROR_OUTPUT_LEN);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  437|      0|        return SECFailure;
  438|      0|    }
  439|       |
  440|      4|#ifdef NSS_X64
  441|      4|#ifndef NSS_DISABLE_AVX2
  442|      4|    if (avx2_support()) {
  ------------------
  |  Branch (442:9): [True: 4, False: 0]
  ------------------
  443|      4|        Hacl_Chacha20Poly1305_256_aead_encrypt(
  444|      4|            (uint8_t *)ctx->key, (uint8_t *)nonce, adLen, (uint8_t *)ad, inputLen,
  445|      4|            (uint8_t *)input, output, outTag);
  446|      4|        goto finish;
  447|      4|    }
  448|      0|#endif
  449|       |
  450|      0|#ifndef NSS_DISABLE_SSE3
  451|      0|    if (ssse3_support() && sse4_1_support() && avx_support()) {
  ------------------
  |  Branch (451:9): [True: 0, False: 0]
  |  Branch (451:28): [True: 0, False: 0]
  |  Branch (451:48): [True: 0, False: 0]
  ------------------
  452|      0|        Hacl_Chacha20Poly1305_128_aead_encrypt(
  453|      0|            (uint8_t *)ctx->key, (uint8_t *)nonce, adLen, (uint8_t *)ad, inputLen,
  454|      0|            (uint8_t *)input, output, outTag);
  455|      0|        goto finish;
  456|      0|    }
  457|      0|#endif
  458|       |#elif defined(__powerpc64__) && defined(__LITTLE_ENDIAN__) && \
  459|       |    !defined(NSS_DISABLE_ALTIVEC) && !defined(NSS_DISABLE_CRYPTO_VSX)
  460|       |    if (ppc_crypto_support()) {
  461|       |        Chacha20Poly1305_vsx_aead_encrypt(
  462|       |            (uint8_t *)ctx->key, (uint8_t *)nonce, adLen, (uint8_t *)ad, inputLen,
  463|       |            (uint8_t *)input, output, outTag);
  464|       |        goto finish;
  465|       |    }
  466|       |#endif
  467|      0|    {
  468|      0|        Hacl_Chacha20Poly1305_32_aead_encrypt(
  469|      0|            (uint8_t *)ctx->key, (uint8_t *)nonce, adLen, (uint8_t *)ad, inputLen,
  470|      0|            (uint8_t *)input, output, outTag);
  471|      0|        goto finish;
  472|      0|    }
  473|       |
  474|      4|finish:
  475|      4|    *outputLen = inputLen;
  476|      4|    return SECSuccess;
  477|      0|#endif
  478|      0|}
ChaCha20Poly1305_Decrypt:
  487|  4.84k|{
  488|       |#ifdef NSS_DISABLE_CHACHAPOLY
  489|       |    return SECFailure;
  490|       |#else
  491|  4.84k|    unsigned int ciphertextLen;
  492|       |
  493|  4.84k|    if (nonceLen != 12) {
  ------------------
  |  Branch (493:9): [True: 0, False: 4.84k]
  ------------------
  494|      0|        PORT_SetError(SEC_ERROR_INPUT_LEN);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  495|      0|        return SECFailure;
  496|      0|    }
  497|  4.84k|    ciphertextLen = inputLen;
  498|  4.84k|    if (maxOutputLen < ciphertextLen) {
  ------------------
  |  Branch (498:9): [True: 0, False: 4.84k]
  ------------------
  499|      0|        PORT_SetError(SEC_ERROR_OUTPUT_LEN);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  500|      0|        return SECFailure;
  501|      0|    }
  502|       |    // ChaCha has a 64 octet block, with a 32-bit block counter.
  503|  4.84k|    if (sizeof(inputLen) > 4) {
  ------------------
  |  Branch (503:9): [Folded - Ignored]
  ------------------
  504|      0|        unsigned long long inputLen_ull = inputLen;
  505|      0|        if (inputLen_ull >= (1ULL << (6 + 32))) {
  ------------------
  |  Branch (505:13): [True: 0, False: 0]
  ------------------
  506|      0|            PORT_SetError(SEC_ERROR_INPUT_LEN);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  507|      0|            return SECFailure;
  508|      0|        }
  509|      0|    }
  510|       |
  511|  4.84k|    uint32_t res = 1;
  512|  4.84k|#ifdef NSS_X64
  513|  4.84k|#ifndef NSS_DISABLE_AVX2
  514|  4.84k|    if (avx2_support()) {
  ------------------
  |  Branch (514:9): [True: 4.84k, False: 0]
  ------------------
  515|  4.84k|        res = Hacl_Chacha20Poly1305_256_aead_decrypt(
  516|  4.84k|            (uint8_t *)ctx->key, (uint8_t *)nonce, adLen, (uint8_t *)ad, ciphertextLen,
  517|  4.84k|            (uint8_t *)output, (uint8_t *)input, (uint8_t *)tagIn);
  518|  4.84k|        goto finish;
  519|  4.84k|    }
  520|      0|#endif
  521|       |
  522|      0|#ifndef NSS_DISABLE_SSE3
  523|      0|    if (ssse3_support() && sse4_1_support() && avx_support()) {
  ------------------
  |  Branch (523:9): [True: 0, False: 0]
  |  Branch (523:28): [True: 0, False: 0]
  |  Branch (523:48): [True: 0, False: 0]
  ------------------
  524|      0|        res = Hacl_Chacha20Poly1305_128_aead_decrypt(
  525|      0|            (uint8_t *)ctx->key, (uint8_t *)nonce, adLen, (uint8_t *)ad, ciphertextLen,
  526|      0|            (uint8_t *)output, (uint8_t *)input, (uint8_t *)tagIn);
  527|      0|        goto finish;
  528|      0|    }
  529|      0|#endif
  530|       |
  531|       |#elif defined(__powerpc64__) && defined(__LITTLE_ENDIAN__) && \
  532|       |    !defined(NSS_DISABLE_ALTIVEC) && !defined(NSS_DISABLE_CRYPTO_VSX)
  533|       |    if (ppc_crypto_support()) {
  534|       |        res = Chacha20Poly1305_vsx_aead_decrypt(
  535|       |            (uint8_t *)ctx->key, (uint8_t *)nonce, adLen, (uint8_t *)ad, ciphertextLen,
  536|       |            (uint8_t *)output, (uint8_t *)input, (uint8_t *)tagIn);
  537|       |        goto finish;
  538|       |    }
  539|       |#endif
  540|      0|    {
  541|      0|        res = Hacl_Chacha20Poly1305_32_aead_decrypt(
  542|      0|            (uint8_t *)ctx->key, (uint8_t *)nonce, adLen, (uint8_t *)ad, ciphertextLen,
  543|      0|            (uint8_t *)output, (uint8_t *)input, (uint8_t *)tagIn);
  544|      0|        goto finish;
  545|      0|    }
  546|       |
  547|  4.84k|finish:
  548|  4.84k|    if (res) {
  ------------------
  |  Branch (548:9): [True: 4.84k, False: 0]
  ------------------
  549|  4.84k|        PORT_SetError(SEC_ERROR_BAD_DATA);
  ------------------
  |  |   65|  4.84k|#define PORT_SetError PORT_SetError_Util
  ------------------
  550|  4.84k|        return SECFailure;
  551|  4.84k|    }
  552|       |
  553|      0|    *outputLen = ciphertextLen;
  554|      0|    return SECSuccess;
  555|  4.84k|#endif
  556|  4.84k|}

CTR_InitContext:
   29|  6.38k|{
   30|  6.38k|    const CK_AES_CTR_PARAMS *ctrParams = (const CK_AES_CTR_PARAMS *)param;
   31|       |
   32|  6.38k|    if (ctrParams->ulCounterBits == 0 ||
  ------------------
  |  Branch (32:9): [True: 0, False: 6.38k]
  ------------------
   33|  6.38k|        ctrParams->ulCounterBits > AES_BLOCK_SIZE * PR_BITS_PER_BYTE) {
  ------------------
  |  |  130|  6.38k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
                      ctrParams->ulCounterBits > AES_BLOCK_SIZE * PR_BITS_PER_BYTE) {
  ------------------
  |  |  286|  6.38k|#define PR_BITS_PER_BYTE    8
  ------------------
  |  Branch (33:9): [True: 0, False: 6.38k]
  ------------------
   34|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
   35|      0|        return SECFailure;
   36|      0|    }
   37|       |
   38|       |    /* Invariant: 0 < ctr->bufPtr <= AES_BLOCK_SIZE */
   39|  6.38k|    ctr->checkWrap = PR_FALSE;
  ------------------
  |  |  438|  6.38k|#define PR_FALSE 0
  ------------------
   40|  6.38k|    ctr->bufPtr = AES_BLOCK_SIZE; /* no unused data in the buffer */
  ------------------
  |  |  130|  6.38k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
   41|  6.38k|    ctr->cipher = cipher;
   42|  6.38k|    ctr->context = context;
   43|  6.38k|    ctr->counterBits = ctrParams->ulCounterBits;
   44|  6.38k|    if (AES_BLOCK_SIZE > sizeof(ctr->counter) ||
  ------------------
  |  |  130|  6.38k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  |  Branch (44:9): [Folded - Ignored]
  ------------------
   45|  6.38k|        AES_BLOCK_SIZE > sizeof(ctrParams->cb)) {
  ------------------
  |  |  130|      0|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  |  Branch (45:9): [Folded - Ignored]
  ------------------
   46|      0|        PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
   47|      0|        return SECFailure;
   48|      0|    }
   49|  6.38k|    PORT_Memcpy(ctr->counter, ctrParams->cb, AES_BLOCK_SIZE);
  ------------------
  |  |  180|  6.38k|#define PORT_Memcpy memcpy
  ------------------
                  PORT_Memcpy(ctr->counter, ctrParams->cb, AES_BLOCK_SIZE);
  ------------------
  |  |  130|  6.38k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
   50|  6.38k|    if (ctr->counterBits < 64) {
  ------------------
  |  Branch (50:9): [True: 6.38k, False: 0]
  ------------------
   51|  6.38k|        PORT_Memcpy(ctr->counterFirst, ctr->counter, AES_BLOCK_SIZE);
  ------------------
  |  |  180|  6.38k|#define PORT_Memcpy memcpy
  ------------------
                      PORT_Memcpy(ctr->counterFirst, ctr->counter, AES_BLOCK_SIZE);
  ------------------
  |  |  130|  6.38k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
   52|  6.38k|        ctr->checkWrap = PR_TRUE;
  ------------------
  |  |  437|  6.38k|#define PR_TRUE 1
  ------------------
   53|  6.38k|    }
   54|  6.38k|    return SECSuccess;
   55|  6.38k|}
CTR_DestroyContext:
   79|  6.38k|{
   80|  6.38k|    PORT_Memset(ctr, 0, sizeof(CTRContext));
  ------------------
  |  |  182|  6.38k|#define PORT_Memset memset
  ------------------
   81|  6.38k|    if (freeit) {
  ------------------
  |  Branch (81:9): [True: 0, False: 6.38k]
  ------------------
   82|      0|        PORT_Free(ctr);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
   83|      0|    }
   84|  6.38k|}

SEED_set_key:
  300|    202|{
  301|    202|    seed_word K0, K1, K2, K3;
  302|    202|    seed_word t0, t1;
  303|       |
  304|    202|    char2word(rawkey, K0);
  ------------------
  |  |   24|    202|    (i) = ((((seed_word)((c)[0])) << 24) | \
  |  |   25|    202|           (((seed_word)((c)[1])) << 16) | \
  |  |   26|    202|           (((seed_word)((c)[2])) << 8) |  \
  |  |   27|    202|           ((seed_word)((c)[3])))
  ------------------
  305|    202|    char2word(rawkey + 4, K1);
  ------------------
  |  |   24|    202|    (i) = ((((seed_word)((c)[0])) << 24) | \
  |  |   25|    202|           (((seed_word)((c)[1])) << 16) | \
  |  |   26|    202|           (((seed_word)((c)[2])) << 8) |  \
  |  |   27|    202|           ((seed_word)((c)[3])))
  ------------------
  306|    202|    char2word(rawkey + 8, K2);
  ------------------
  |  |   24|    202|    (i) = ((((seed_word)((c)[0])) << 24) | \
  |  |   25|    202|           (((seed_word)((c)[1])) << 16) | \
  |  |   26|    202|           (((seed_word)((c)[2])) << 8) |  \
  |  |   27|    202|           ((seed_word)((c)[3])))
  ------------------
  307|    202|    char2word(rawkey + 12, K3);
  ------------------
  |  |   24|    202|    (i) = ((((seed_word)((c)[0])) << 24) | \
  |  |   25|    202|           (((seed_word)((c)[1])) << 16) | \
  |  |   26|    202|           (((seed_word)((c)[2])) << 8) |  \
  |  |   27|    202|           ((seed_word)((c)[3])))
  ------------------
  308|       |
  309|    202|    t0 = (K0 + K2 - KC0);
  ------------------
  |  |  280|    202|#define KC0 0x9e3779b9
  ------------------
  310|    202|    t1 = (K1 - K3 + KC0);
  ------------------
  |  |  280|    202|#define KC0 0x9e3779b9
  ------------------
  311|    202|    KEYUPDATE_TEMP(t0, t1, &ks->data[0]);
  ------------------
  |  |   50|    202|    (K)[0] = G_FUNC((T0));        \
  |  |  ------------------
  |  |  |  |   18|    202|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    202|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    202|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    202|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   51|    202|    (K)[1] = G_FUNC((T1))
  |  |  ------------------
  |  |  |  |   18|    202|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    202|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    202|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    202|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  ------------------
  312|    202|    KEYSCHEDULE_UPDATE1(t0, t1, K0, K1, K2, K3, KC1);
  ------------------
  |  |   43|    202|    (T0) = (K0);                                        \
  |  |   44|    202|    (K0) = (((K0) >> 8) ^ ((K1) << 24));                \
  |  |   45|    202|    (K1) = (((K1) >> 8) ^ ((T0) << 24));                \
  |  |   46|    202|    (T0) = ((K0) + (K2) - (KC));                        \
  |  |   47|    202|    (T1) = ((K1) + (KC) - (K3))
  ------------------
  313|    202|    KEYUPDATE_TEMP(t0, t1, &ks->data[2]);
  ------------------
  |  |   50|    202|    (K)[0] = G_FUNC((T0));        \
  |  |  ------------------
  |  |  |  |   18|    202|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    202|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    202|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    202|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   51|    202|    (K)[1] = G_FUNC((T1))
  |  |  ------------------
  |  |  |  |   18|    202|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    202|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    202|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    202|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  ------------------
  314|    202|    KEYSCHEDULE_UPDATE0(t0, t1, K0, K1, K2, K3, KC2);
  ------------------
  |  |   36|    202|    (T0) = (K2);                                        \
  |  |   37|    202|    (K2) = (((K2) << 8) ^ ((K3) >> 24));                \
  |  |   38|    202|    (K3) = (((K3) << 8) ^ ((T0) >> 24));                \
  |  |   39|    202|    (T0) = ((K0) + (K2) - (KC));                        \
  |  |   40|    202|    (T1) = ((K1) + (KC) - (K3))
  ------------------
  315|    202|    KEYUPDATE_TEMP(t0, t1, &ks->data[4]);
  ------------------
  |  |   50|    202|    (K)[0] = G_FUNC((T0));        \
  |  |  ------------------
  |  |  |  |   18|    202|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    202|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    202|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    202|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   51|    202|    (K)[1] = G_FUNC((T1))
  |  |  ------------------
  |  |  |  |   18|    202|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    202|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    202|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    202|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  ------------------
  316|    202|    KEYSCHEDULE_UPDATE1(t0, t1, K0, K1, K2, K3, KC3);
  ------------------
  |  |   43|    202|    (T0) = (K0);                                        \
  |  |   44|    202|    (K0) = (((K0) >> 8) ^ ((K1) << 24));                \
  |  |   45|    202|    (K1) = (((K1) >> 8) ^ ((T0) << 24));                \
  |  |   46|    202|    (T0) = ((K0) + (K2) - (KC));                        \
  |  |   47|    202|    (T1) = ((K1) + (KC) - (K3))
  ------------------
  317|    202|    KEYUPDATE_TEMP(t0, t1, &ks->data[6]);
  ------------------
  |  |   50|    202|    (K)[0] = G_FUNC((T0));        \
  |  |  ------------------
  |  |  |  |   18|    202|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    202|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    202|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    202|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   51|    202|    (K)[1] = G_FUNC((T1))
  |  |  ------------------
  |  |  |  |   18|    202|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    202|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    202|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    202|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  ------------------
  318|    202|    KEYSCHEDULE_UPDATE0(t0, t1, K0, K1, K2, K3, KC4);
  ------------------
  |  |   36|    202|    (T0) = (K2);                                        \
  |  |   37|    202|    (K2) = (((K2) << 8) ^ ((K3) >> 24));                \
  |  |   38|    202|    (K3) = (((K3) << 8) ^ ((T0) >> 24));                \
  |  |   39|    202|    (T0) = ((K0) + (K2) - (KC));                        \
  |  |   40|    202|    (T1) = ((K1) + (KC) - (K3))
  ------------------
  319|    202|    KEYUPDATE_TEMP(t0, t1, &ks->data[8]);
  ------------------
  |  |   50|    202|    (K)[0] = G_FUNC((T0));        \
  |  |  ------------------
  |  |  |  |   18|    202|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    202|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    202|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    202|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   51|    202|    (K)[1] = G_FUNC((T1))
  |  |  ------------------
  |  |  |  |   18|    202|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    202|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    202|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    202|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  ------------------
  320|    202|    KEYSCHEDULE_UPDATE1(t0, t1, K0, K1, K2, K3, KC5);
  ------------------
  |  |   43|    202|    (T0) = (K0);                                        \
  |  |   44|    202|    (K0) = (((K0) >> 8) ^ ((K1) << 24));                \
  |  |   45|    202|    (K1) = (((K1) >> 8) ^ ((T0) << 24));                \
  |  |   46|    202|    (T0) = ((K0) + (K2) - (KC));                        \
  |  |   47|    202|    (T1) = ((K1) + (KC) - (K3))
  ------------------
  321|    202|    KEYUPDATE_TEMP(t0, t1, &ks->data[10]);
  ------------------
  |  |   50|    202|    (K)[0] = G_FUNC((T0));        \
  |  |  ------------------
  |  |  |  |   18|    202|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    202|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    202|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    202|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   51|    202|    (K)[1] = G_FUNC((T1))
  |  |  ------------------
  |  |  |  |   18|    202|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    202|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    202|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    202|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  ------------------
  322|    202|    KEYSCHEDULE_UPDATE0(t0, t1, K0, K1, K2, K3, KC6);
  ------------------
  |  |   36|    202|    (T0) = (K2);                                        \
  |  |   37|    202|    (K2) = (((K2) << 8) ^ ((K3) >> 24));                \
  |  |   38|    202|    (K3) = (((K3) << 8) ^ ((T0) >> 24));                \
  |  |   39|    202|    (T0) = ((K0) + (K2) - (KC));                        \
  |  |   40|    202|    (T1) = ((K1) + (KC) - (K3))
  ------------------
  323|    202|    KEYUPDATE_TEMP(t0, t1, &ks->data[12]);
  ------------------
  |  |   50|    202|    (K)[0] = G_FUNC((T0));        \
  |  |  ------------------
  |  |  |  |   18|    202|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    202|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    202|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    202|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   51|    202|    (K)[1] = G_FUNC((T1))
  |  |  ------------------
  |  |  |  |   18|    202|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    202|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    202|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    202|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  ------------------
  324|    202|    KEYSCHEDULE_UPDATE1(t0, t1, K0, K1, K2, K3, KC7);
  ------------------
  |  |   43|    202|    (T0) = (K0);                                        \
  |  |   44|    202|    (K0) = (((K0) >> 8) ^ ((K1) << 24));                \
  |  |   45|    202|    (K1) = (((K1) >> 8) ^ ((T0) << 24));                \
  |  |   46|    202|    (T0) = ((K0) + (K2) - (KC));                        \
  |  |   47|    202|    (T1) = ((K1) + (KC) - (K3))
  ------------------
  325|    202|    KEYUPDATE_TEMP(t0, t1, &ks->data[14]);
  ------------------
  |  |   50|    202|    (K)[0] = G_FUNC((T0));        \
  |  |  ------------------
  |  |  |  |   18|    202|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    202|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    202|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    202|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   51|    202|    (K)[1] = G_FUNC((T1))
  |  |  ------------------
  |  |  |  |   18|    202|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    202|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    202|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    202|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  ------------------
  326|    202|    KEYSCHEDULE_UPDATE0(t0, t1, K0, K1, K2, K3, KC8);
  ------------------
  |  |   36|    202|    (T0) = (K2);                                        \
  |  |   37|    202|    (K2) = (((K2) << 8) ^ ((K3) >> 24));                \
  |  |   38|    202|    (K3) = (((K3) << 8) ^ ((T0) >> 24));                \
  |  |   39|    202|    (T0) = ((K0) + (K2) - (KC));                        \
  |  |   40|    202|    (T1) = ((K1) + (KC) - (K3))
  ------------------
  327|    202|    KEYUPDATE_TEMP(t0, t1, &ks->data[16]);
  ------------------
  |  |   50|    202|    (K)[0] = G_FUNC((T0));        \
  |  |  ------------------
  |  |  |  |   18|    202|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    202|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    202|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    202|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   51|    202|    (K)[1] = G_FUNC((T1))
  |  |  ------------------
  |  |  |  |   18|    202|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    202|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    202|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    202|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  ------------------
  328|    202|    KEYSCHEDULE_UPDATE1(t0, t1, K0, K1, K2, K3, KC9);
  ------------------
  |  |   43|    202|    (T0) = (K0);                                        \
  |  |   44|    202|    (K0) = (((K0) >> 8) ^ ((K1) << 24));                \
  |  |   45|    202|    (K1) = (((K1) >> 8) ^ ((T0) << 24));                \
  |  |   46|    202|    (T0) = ((K0) + (K2) - (KC));                        \
  |  |   47|    202|    (T1) = ((K1) + (KC) - (K3))
  ------------------
  329|    202|    KEYUPDATE_TEMP(t0, t1, &ks->data[18]);
  ------------------
  |  |   50|    202|    (K)[0] = G_FUNC((T0));        \
  |  |  ------------------
  |  |  |  |   18|    202|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    202|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    202|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    202|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   51|    202|    (K)[1] = G_FUNC((T1))
  |  |  ------------------
  |  |  |  |   18|    202|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    202|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    202|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    202|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  ------------------
  330|    202|    KEYSCHEDULE_UPDATE0(t0, t1, K0, K1, K2, K3, KC10);
  ------------------
  |  |   36|    202|    (T0) = (K2);                                        \
  |  |   37|    202|    (K2) = (((K2) << 8) ^ ((K3) >> 24));                \
  |  |   38|    202|    (K3) = (((K3) << 8) ^ ((T0) >> 24));                \
  |  |   39|    202|    (T0) = ((K0) + (K2) - (KC));                        \
  |  |   40|    202|    (T1) = ((K1) + (KC) - (K3))
  ------------------
  331|    202|    KEYUPDATE_TEMP(t0, t1, &ks->data[20]);
  ------------------
  |  |   50|    202|    (K)[0] = G_FUNC((T0));        \
  |  |  ------------------
  |  |  |  |   18|    202|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    202|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    202|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    202|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   51|    202|    (K)[1] = G_FUNC((T1))
  |  |  ------------------
  |  |  |  |   18|    202|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    202|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    202|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    202|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  ------------------
  332|    202|    KEYSCHEDULE_UPDATE1(t0, t1, K0, K1, K2, K3, KC11);
  ------------------
  |  |   43|    202|    (T0) = (K0);                                        \
  |  |   44|    202|    (K0) = (((K0) >> 8) ^ ((K1) << 24));                \
  |  |   45|    202|    (K1) = (((K1) >> 8) ^ ((T0) << 24));                \
  |  |   46|    202|    (T0) = ((K0) + (K2) - (KC));                        \
  |  |   47|    202|    (T1) = ((K1) + (KC) - (K3))
  ------------------
  333|    202|    KEYUPDATE_TEMP(t0, t1, &ks->data[22]);
  ------------------
  |  |   50|    202|    (K)[0] = G_FUNC((T0));        \
  |  |  ------------------
  |  |  |  |   18|    202|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    202|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    202|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    202|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   51|    202|    (K)[1] = G_FUNC((T1))
  |  |  ------------------
  |  |  |  |   18|    202|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    202|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    202|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    202|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  ------------------
  334|    202|    KEYSCHEDULE_UPDATE0(t0, t1, K0, K1, K2, K3, KC12);
  ------------------
  |  |   36|    202|    (T0) = (K2);                                        \
  |  |   37|    202|    (K2) = (((K2) << 8) ^ ((K3) >> 24));                \
  |  |   38|    202|    (K3) = (((K3) << 8) ^ ((T0) >> 24));                \
  |  |   39|    202|    (T0) = ((K0) + (K2) - (KC));                        \
  |  |   40|    202|    (T1) = ((K1) + (KC) - (K3))
  ------------------
  335|    202|    KEYUPDATE_TEMP(t0, t1, &ks->data[24]);
  ------------------
  |  |   50|    202|    (K)[0] = G_FUNC((T0));        \
  |  |  ------------------
  |  |  |  |   18|    202|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    202|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    202|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    202|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   51|    202|    (K)[1] = G_FUNC((T1))
  |  |  ------------------
  |  |  |  |   18|    202|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    202|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    202|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    202|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  ------------------
  336|    202|    KEYSCHEDULE_UPDATE1(t0, t1, K0, K1, K2, K3, KC13);
  ------------------
  |  |   43|    202|    (T0) = (K0);                                        \
  |  |   44|    202|    (K0) = (((K0) >> 8) ^ ((K1) << 24));                \
  |  |   45|    202|    (K1) = (((K1) >> 8) ^ ((T0) << 24));                \
  |  |   46|    202|    (T0) = ((K0) + (K2) - (KC));                        \
  |  |   47|    202|    (T1) = ((K1) + (KC) - (K3))
  ------------------
  337|    202|    KEYUPDATE_TEMP(t0, t1, &ks->data[26]);
  ------------------
  |  |   50|    202|    (K)[0] = G_FUNC((T0));        \
  |  |  ------------------
  |  |  |  |   18|    202|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    202|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    202|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    202|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   51|    202|    (K)[1] = G_FUNC((T1))
  |  |  ------------------
  |  |  |  |   18|    202|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    202|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    202|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    202|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  ------------------
  338|    202|    KEYSCHEDULE_UPDATE0(t0, t1, K0, K1, K2, K3, KC14);
  ------------------
  |  |   36|    202|    (T0) = (K2);                                        \
  |  |   37|    202|    (K2) = (((K2) << 8) ^ ((K3) >> 24));                \
  |  |   38|    202|    (K3) = (((K3) << 8) ^ ((T0) >> 24));                \
  |  |   39|    202|    (T0) = ((K0) + (K2) - (KC));                        \
  |  |   40|    202|    (T1) = ((K1) + (KC) - (K3))
  ------------------
  339|    202|    KEYUPDATE_TEMP(t0, t1, &ks->data[28]);
  ------------------
  |  |   50|    202|    (K)[0] = G_FUNC((T0));        \
  |  |  ------------------
  |  |  |  |   18|    202|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    202|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    202|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    202|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   51|    202|    (K)[1] = G_FUNC((T1))
  |  |  ------------------
  |  |  |  |   18|    202|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    202|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    202|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    202|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  ------------------
  340|    202|    KEYSCHEDULE_UPDATE1(t0, t1, K0, K1, K2, K3, KC15);
  ------------------
  |  |   43|    202|    (T0) = (K0);                                        \
  |  |   44|    202|    (K0) = (((K0) >> 8) ^ ((K1) << 24));                \
  |  |   45|    202|    (K1) = (((K1) >> 8) ^ ((T0) << 24));                \
  |  |   46|    202|    (T0) = ((K0) + (K2) - (KC));                        \
  |  |   47|    202|    (T1) = ((K1) + (KC) - (K3))
  ------------------
  341|    202|    KEYUPDATE_TEMP(t0, t1, &ks->data[30]);
  ------------------
  |  |   50|    202|    (K)[0] = G_FUNC((T0));        \
  |  |  ------------------
  |  |  |  |   18|    202|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    202|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    202|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    202|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   51|    202|    (K)[1] = G_FUNC((T1))
  |  |  ------------------
  |  |  |  |   18|    202|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    202|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    202|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    202|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  ------------------
  342|    202|}
SEED_encrypt:
  348|    410|{
  349|    410|    seed_word L0, L1, R0, R1;
  350|    410|    seed_word t0, t1;
  351|       |
  352|    410|    char2word(s, L0);
  ------------------
  |  |   24|    410|    (i) = ((((seed_word)((c)[0])) << 24) | \
  |  |   25|    410|           (((seed_word)((c)[1])) << 16) | \
  |  |   26|    410|           (((seed_word)((c)[2])) << 8) |  \
  |  |   27|    410|           ((seed_word)((c)[3])))
  ------------------
  353|    410|    char2word(s + 4, L1);
  ------------------
  |  |   24|    410|    (i) = ((((seed_word)((c)[0])) << 24) | \
  |  |   25|    410|           (((seed_word)((c)[1])) << 16) | \
  |  |   26|    410|           (((seed_word)((c)[2])) << 8) |  \
  |  |   27|    410|           ((seed_word)((c)[3])))
  ------------------
  354|    410|    char2word(s + 8, R0);
  ------------------
  |  |   24|    410|    (i) = ((((seed_word)((c)[0])) << 24) | \
  |  |   25|    410|           (((seed_word)((c)[1])) << 16) | \
  |  |   26|    410|           (((seed_word)((c)[2])) << 8) |  \
  |  |   27|    410|           ((seed_word)((c)[3])))
  ------------------
  355|    410|    char2word(s + 12, R1);
  ------------------
  |  |   24|    410|    (i) = ((((seed_word)((c)[0])) << 24) | \
  |  |   25|    410|           (((seed_word)((c)[1])) << 16) | \
  |  |   26|    410|           (((seed_word)((c)[2])) << 8) |  \
  |  |   27|    410|           ((seed_word)((c)[3])))
  ------------------
  356|       |
  357|    410|    E_SEED(t0, t1, L0, L1, R0, R1, 0);
  ------------------
  |  |   78|    410|    (T0) = (X3) ^ (ks->data)[(rbase)];        \
  |  |   79|    410|    (T1) = (X4) ^ (ks->data)[(rbase) + 1];    \
  |  |   80|    410|    (T1) ^= (T0);                             \
  |  |   81|    410|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   82|    410|    (T0) += (T1);                             \
  |  |   83|    410|    (T0) = G_FUNC(T0);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   84|    410|    (T1) += (T0);                             \
  |  |   85|    410|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   86|    410|    (T0) += (T1);                             \
  |  |   87|    410|    (X1) ^= (T0);                             \
  |  |   88|    410|    (X2) ^= (T1)
  ------------------
  358|    410|    E_SEED(t0, t1, R0, R1, L0, L1, 2);
  ------------------
  |  |   78|    410|    (T0) = (X3) ^ (ks->data)[(rbase)];        \
  |  |   79|    410|    (T1) = (X4) ^ (ks->data)[(rbase) + 1];    \
  |  |   80|    410|    (T1) ^= (T0);                             \
  |  |   81|    410|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   82|    410|    (T0) += (T1);                             \
  |  |   83|    410|    (T0) = G_FUNC(T0);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   84|    410|    (T1) += (T0);                             \
  |  |   85|    410|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   86|    410|    (T0) += (T1);                             \
  |  |   87|    410|    (X1) ^= (T0);                             \
  |  |   88|    410|    (X2) ^= (T1)
  ------------------
  359|    410|    E_SEED(t0, t1, L0, L1, R0, R1, 4);
  ------------------
  |  |   78|    410|    (T0) = (X3) ^ (ks->data)[(rbase)];        \
  |  |   79|    410|    (T1) = (X4) ^ (ks->data)[(rbase) + 1];    \
  |  |   80|    410|    (T1) ^= (T0);                             \
  |  |   81|    410|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   82|    410|    (T0) += (T1);                             \
  |  |   83|    410|    (T0) = G_FUNC(T0);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   84|    410|    (T1) += (T0);                             \
  |  |   85|    410|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   86|    410|    (T0) += (T1);                             \
  |  |   87|    410|    (X1) ^= (T0);                             \
  |  |   88|    410|    (X2) ^= (T1)
  ------------------
  360|    410|    E_SEED(t0, t1, R0, R1, L0, L1, 6);
  ------------------
  |  |   78|    410|    (T0) = (X3) ^ (ks->data)[(rbase)];        \
  |  |   79|    410|    (T1) = (X4) ^ (ks->data)[(rbase) + 1];    \
  |  |   80|    410|    (T1) ^= (T0);                             \
  |  |   81|    410|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   82|    410|    (T0) += (T1);                             \
  |  |   83|    410|    (T0) = G_FUNC(T0);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   84|    410|    (T1) += (T0);                             \
  |  |   85|    410|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   86|    410|    (T0) += (T1);                             \
  |  |   87|    410|    (X1) ^= (T0);                             \
  |  |   88|    410|    (X2) ^= (T1)
  ------------------
  361|    410|    E_SEED(t0, t1, L0, L1, R0, R1, 8);
  ------------------
  |  |   78|    410|    (T0) = (X3) ^ (ks->data)[(rbase)];        \
  |  |   79|    410|    (T1) = (X4) ^ (ks->data)[(rbase) + 1];    \
  |  |   80|    410|    (T1) ^= (T0);                             \
  |  |   81|    410|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   82|    410|    (T0) += (T1);                             \
  |  |   83|    410|    (T0) = G_FUNC(T0);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   84|    410|    (T1) += (T0);                             \
  |  |   85|    410|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   86|    410|    (T0) += (T1);                             \
  |  |   87|    410|    (X1) ^= (T0);                             \
  |  |   88|    410|    (X2) ^= (T1)
  ------------------
  362|    410|    E_SEED(t0, t1, R0, R1, L0, L1, 10);
  ------------------
  |  |   78|    410|    (T0) = (X3) ^ (ks->data)[(rbase)];        \
  |  |   79|    410|    (T1) = (X4) ^ (ks->data)[(rbase) + 1];    \
  |  |   80|    410|    (T1) ^= (T0);                             \
  |  |   81|    410|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   82|    410|    (T0) += (T1);                             \
  |  |   83|    410|    (T0) = G_FUNC(T0);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   84|    410|    (T1) += (T0);                             \
  |  |   85|    410|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   86|    410|    (T0) += (T1);                             \
  |  |   87|    410|    (X1) ^= (T0);                             \
  |  |   88|    410|    (X2) ^= (T1)
  ------------------
  363|    410|    E_SEED(t0, t1, L0, L1, R0, R1, 12);
  ------------------
  |  |   78|    410|    (T0) = (X3) ^ (ks->data)[(rbase)];        \
  |  |   79|    410|    (T1) = (X4) ^ (ks->data)[(rbase) + 1];    \
  |  |   80|    410|    (T1) ^= (T0);                             \
  |  |   81|    410|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   82|    410|    (T0) += (T1);                             \
  |  |   83|    410|    (T0) = G_FUNC(T0);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   84|    410|    (T1) += (T0);                             \
  |  |   85|    410|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   86|    410|    (T0) += (T1);                             \
  |  |   87|    410|    (X1) ^= (T0);                             \
  |  |   88|    410|    (X2) ^= (T1)
  ------------------
  364|    410|    E_SEED(t0, t1, R0, R1, L0, L1, 14);
  ------------------
  |  |   78|    410|    (T0) = (X3) ^ (ks->data)[(rbase)];        \
  |  |   79|    410|    (T1) = (X4) ^ (ks->data)[(rbase) + 1];    \
  |  |   80|    410|    (T1) ^= (T0);                             \
  |  |   81|    410|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   82|    410|    (T0) += (T1);                             \
  |  |   83|    410|    (T0) = G_FUNC(T0);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   84|    410|    (T1) += (T0);                             \
  |  |   85|    410|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   86|    410|    (T0) += (T1);                             \
  |  |   87|    410|    (X1) ^= (T0);                             \
  |  |   88|    410|    (X2) ^= (T1)
  ------------------
  365|    410|    E_SEED(t0, t1, L0, L1, R0, R1, 16);
  ------------------
  |  |   78|    410|    (T0) = (X3) ^ (ks->data)[(rbase)];        \
  |  |   79|    410|    (T1) = (X4) ^ (ks->data)[(rbase) + 1];    \
  |  |   80|    410|    (T1) ^= (T0);                             \
  |  |   81|    410|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   82|    410|    (T0) += (T1);                             \
  |  |   83|    410|    (T0) = G_FUNC(T0);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   84|    410|    (T1) += (T0);                             \
  |  |   85|    410|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   86|    410|    (T0) += (T1);                             \
  |  |   87|    410|    (X1) ^= (T0);                             \
  |  |   88|    410|    (X2) ^= (T1)
  ------------------
  366|    410|    E_SEED(t0, t1, R0, R1, L0, L1, 18);
  ------------------
  |  |   78|    410|    (T0) = (X3) ^ (ks->data)[(rbase)];        \
  |  |   79|    410|    (T1) = (X4) ^ (ks->data)[(rbase) + 1];    \
  |  |   80|    410|    (T1) ^= (T0);                             \
  |  |   81|    410|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   82|    410|    (T0) += (T1);                             \
  |  |   83|    410|    (T0) = G_FUNC(T0);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   84|    410|    (T1) += (T0);                             \
  |  |   85|    410|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   86|    410|    (T0) += (T1);                             \
  |  |   87|    410|    (X1) ^= (T0);                             \
  |  |   88|    410|    (X2) ^= (T1)
  ------------------
  367|    410|    E_SEED(t0, t1, L0, L1, R0, R1, 20);
  ------------------
  |  |   78|    410|    (T0) = (X3) ^ (ks->data)[(rbase)];        \
  |  |   79|    410|    (T1) = (X4) ^ (ks->data)[(rbase) + 1];    \
  |  |   80|    410|    (T1) ^= (T0);                             \
  |  |   81|    410|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   82|    410|    (T0) += (T1);                             \
  |  |   83|    410|    (T0) = G_FUNC(T0);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   84|    410|    (T1) += (T0);                             \
  |  |   85|    410|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   86|    410|    (T0) += (T1);                             \
  |  |   87|    410|    (X1) ^= (T0);                             \
  |  |   88|    410|    (X2) ^= (T1)
  ------------------
  368|    410|    E_SEED(t0, t1, R0, R1, L0, L1, 22);
  ------------------
  |  |   78|    410|    (T0) = (X3) ^ (ks->data)[(rbase)];        \
  |  |   79|    410|    (T1) = (X4) ^ (ks->data)[(rbase) + 1];    \
  |  |   80|    410|    (T1) ^= (T0);                             \
  |  |   81|    410|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   82|    410|    (T0) += (T1);                             \
  |  |   83|    410|    (T0) = G_FUNC(T0);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   84|    410|    (T1) += (T0);                             \
  |  |   85|    410|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   86|    410|    (T0) += (T1);                             \
  |  |   87|    410|    (X1) ^= (T0);                             \
  |  |   88|    410|    (X2) ^= (T1)
  ------------------
  369|    410|    E_SEED(t0, t1, L0, L1, R0, R1, 24);
  ------------------
  |  |   78|    410|    (T0) = (X3) ^ (ks->data)[(rbase)];        \
  |  |   79|    410|    (T1) = (X4) ^ (ks->data)[(rbase) + 1];    \
  |  |   80|    410|    (T1) ^= (T0);                             \
  |  |   81|    410|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   82|    410|    (T0) += (T1);                             \
  |  |   83|    410|    (T0) = G_FUNC(T0);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   84|    410|    (T1) += (T0);                             \
  |  |   85|    410|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   86|    410|    (T0) += (T1);                             \
  |  |   87|    410|    (X1) ^= (T0);                             \
  |  |   88|    410|    (X2) ^= (T1)
  ------------------
  370|    410|    E_SEED(t0, t1, R0, R1, L0, L1, 26);
  ------------------
  |  |   78|    410|    (T0) = (X3) ^ (ks->data)[(rbase)];        \
  |  |   79|    410|    (T1) = (X4) ^ (ks->data)[(rbase) + 1];    \
  |  |   80|    410|    (T1) ^= (T0);                             \
  |  |   81|    410|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   82|    410|    (T0) += (T1);                             \
  |  |   83|    410|    (T0) = G_FUNC(T0);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   84|    410|    (T1) += (T0);                             \
  |  |   85|    410|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   86|    410|    (T0) += (T1);                             \
  |  |   87|    410|    (X1) ^= (T0);                             \
  |  |   88|    410|    (X2) ^= (T1)
  ------------------
  371|    410|    E_SEED(t0, t1, L0, L1, R0, R1, 28);
  ------------------
  |  |   78|    410|    (T0) = (X3) ^ (ks->data)[(rbase)];        \
  |  |   79|    410|    (T1) = (X4) ^ (ks->data)[(rbase) + 1];    \
  |  |   80|    410|    (T1) ^= (T0);                             \
  |  |   81|    410|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   82|    410|    (T0) += (T1);                             \
  |  |   83|    410|    (T0) = G_FUNC(T0);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   84|    410|    (T1) += (T0);                             \
  |  |   85|    410|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   86|    410|    (T0) += (T1);                             \
  |  |   87|    410|    (X1) ^= (T0);                             \
  |  |   88|    410|    (X2) ^= (T1)
  ------------------
  372|    410|    E_SEED(t0, t1, R0, R1, L0, L1, 30);
  ------------------
  |  |   78|    410|    (T0) = (X3) ^ (ks->data)[(rbase)];        \
  |  |   79|    410|    (T1) = (X4) ^ (ks->data)[(rbase) + 1];    \
  |  |   80|    410|    (T1) ^= (T0);                             \
  |  |   81|    410|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   82|    410|    (T0) += (T1);                             \
  |  |   83|    410|    (T0) = G_FUNC(T0);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   84|    410|    (T1) += (T0);                             \
  |  |   85|    410|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|    410|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|    410|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|    410|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|    410|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   86|    410|    (T0) += (T1);                             \
  |  |   87|    410|    (X1) ^= (T0);                             \
  |  |   88|    410|    (X2) ^= (T1)
  ------------------
  373|       |
  374|    410|    word2char(R0, d);
  ------------------
  |  |   30|    410|    *((c) + 0) = (unsigned char)((l) >> 24); \
  |  |   31|    410|    *((c) + 1) = (unsigned char)((l) >> 16); \
  |  |   32|    410|    *((c) + 2) = (unsigned char)((l) >> 8);  \
  |  |   33|    410|    *((c) + 3) = (unsigned char)((l))
  ------------------
  375|    410|    word2char(R1, d + 4);
  ------------------
  |  |   30|    410|    *((c) + 0) = (unsigned char)((l) >> 24); \
  |  |   31|    410|    *((c) + 1) = (unsigned char)((l) >> 16); \
  |  |   32|    410|    *((c) + 2) = (unsigned char)((l) >> 8);  \
  |  |   33|    410|    *((c) + 3) = (unsigned char)((l))
  ------------------
  376|    410|    word2char(L0, d + 8);
  ------------------
  |  |   30|    410|    *((c) + 0) = (unsigned char)((l) >> 24); \
  |  |   31|    410|    *((c) + 1) = (unsigned char)((l) >> 16); \
  |  |   32|    410|    *((c) + 2) = (unsigned char)((l) >> 8);  \
  |  |   33|    410|    *((c) + 3) = (unsigned char)((l))
  ------------------
  377|    410|    word2char(L1, d + 12);
  ------------------
  |  |   30|    410|    *((c) + 0) = (unsigned char)((l) >> 24); \
  |  |   31|    410|    *((c) + 1) = (unsigned char)((l) >> 16); \
  |  |   32|    410|    *((c) + 2) = (unsigned char)((l) >> 8);  \
  |  |   33|    410|    *((c) + 3) = (unsigned char)((l))
  ------------------
  378|    410|}
SEED_decrypt:
  384|  6.49k|{
  385|  6.49k|    seed_word L0, L1, R0, R1;
  386|  6.49k|    seed_word t0, t1;
  387|       |
  388|  6.49k|    char2word(s, L0);
  ------------------
  |  |   24|  6.49k|    (i) = ((((seed_word)((c)[0])) << 24) | \
  |  |   25|  6.49k|           (((seed_word)((c)[1])) << 16) | \
  |  |   26|  6.49k|           (((seed_word)((c)[2])) << 8) |  \
  |  |   27|  6.49k|           ((seed_word)((c)[3])))
  ------------------
  389|  6.49k|    char2word(s + 4, L1);
  ------------------
  |  |   24|  6.49k|    (i) = ((((seed_word)((c)[0])) << 24) | \
  |  |   25|  6.49k|           (((seed_word)((c)[1])) << 16) | \
  |  |   26|  6.49k|           (((seed_word)((c)[2])) << 8) |  \
  |  |   27|  6.49k|           ((seed_word)((c)[3])))
  ------------------
  390|  6.49k|    char2word(s + 8, R0);
  ------------------
  |  |   24|  6.49k|    (i) = ((((seed_word)((c)[0])) << 24) | \
  |  |   25|  6.49k|           (((seed_word)((c)[1])) << 16) | \
  |  |   26|  6.49k|           (((seed_word)((c)[2])) << 8) |  \
  |  |   27|  6.49k|           ((seed_word)((c)[3])))
  ------------------
  391|  6.49k|    char2word(s + 12, R1);
  ------------------
  |  |   24|  6.49k|    (i) = ((((seed_word)((c)[0])) << 24) | \
  |  |   25|  6.49k|           (((seed_word)((c)[1])) << 16) | \
  |  |   26|  6.49k|           (((seed_word)((c)[2])) << 8) |  \
  |  |   27|  6.49k|           ((seed_word)((c)[3])))
  ------------------
  392|       |
  393|  6.49k|    E_SEED(t0, t1, L0, L1, R0, R1, 30);
  ------------------
  |  |   78|  6.49k|    (T0) = (X3) ^ (ks->data)[(rbase)];        \
  |  |   79|  6.49k|    (T1) = (X4) ^ (ks->data)[(rbase) + 1];    \
  |  |   80|  6.49k|    (T1) ^= (T0);                             \
  |  |   81|  6.49k|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   82|  6.49k|    (T0) += (T1);                             \
  |  |   83|  6.49k|    (T0) = G_FUNC(T0);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   84|  6.49k|    (T1) += (T0);                             \
  |  |   85|  6.49k|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   86|  6.49k|    (T0) += (T1);                             \
  |  |   87|  6.49k|    (X1) ^= (T0);                             \
  |  |   88|  6.49k|    (X2) ^= (T1)
  ------------------
  394|  6.49k|    E_SEED(t0, t1, R0, R1, L0, L1, 28);
  ------------------
  |  |   78|  6.49k|    (T0) = (X3) ^ (ks->data)[(rbase)];        \
  |  |   79|  6.49k|    (T1) = (X4) ^ (ks->data)[(rbase) + 1];    \
  |  |   80|  6.49k|    (T1) ^= (T0);                             \
  |  |   81|  6.49k|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   82|  6.49k|    (T0) += (T1);                             \
  |  |   83|  6.49k|    (T0) = G_FUNC(T0);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   84|  6.49k|    (T1) += (T0);                             \
  |  |   85|  6.49k|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   86|  6.49k|    (T0) += (T1);                             \
  |  |   87|  6.49k|    (X1) ^= (T0);                             \
  |  |   88|  6.49k|    (X2) ^= (T1)
  ------------------
  395|  6.49k|    E_SEED(t0, t1, L0, L1, R0, R1, 26);
  ------------------
  |  |   78|  6.49k|    (T0) = (X3) ^ (ks->data)[(rbase)];        \
  |  |   79|  6.49k|    (T1) = (X4) ^ (ks->data)[(rbase) + 1];    \
  |  |   80|  6.49k|    (T1) ^= (T0);                             \
  |  |   81|  6.49k|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   82|  6.49k|    (T0) += (T1);                             \
  |  |   83|  6.49k|    (T0) = G_FUNC(T0);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   84|  6.49k|    (T1) += (T0);                             \
  |  |   85|  6.49k|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   86|  6.49k|    (T0) += (T1);                             \
  |  |   87|  6.49k|    (X1) ^= (T0);                             \
  |  |   88|  6.49k|    (X2) ^= (T1)
  ------------------
  396|  6.49k|    E_SEED(t0, t1, R0, R1, L0, L1, 24);
  ------------------
  |  |   78|  6.49k|    (T0) = (X3) ^ (ks->data)[(rbase)];        \
  |  |   79|  6.49k|    (T1) = (X4) ^ (ks->data)[(rbase) + 1];    \
  |  |   80|  6.49k|    (T1) ^= (T0);                             \
  |  |   81|  6.49k|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   82|  6.49k|    (T0) += (T1);                             \
  |  |   83|  6.49k|    (T0) = G_FUNC(T0);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   84|  6.49k|    (T1) += (T0);                             \
  |  |   85|  6.49k|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   86|  6.49k|    (T0) += (T1);                             \
  |  |   87|  6.49k|    (X1) ^= (T0);                             \
  |  |   88|  6.49k|    (X2) ^= (T1)
  ------------------
  397|  6.49k|    E_SEED(t0, t1, L0, L1, R0, R1, 22);
  ------------------
  |  |   78|  6.49k|    (T0) = (X3) ^ (ks->data)[(rbase)];        \
  |  |   79|  6.49k|    (T1) = (X4) ^ (ks->data)[(rbase) + 1];    \
  |  |   80|  6.49k|    (T1) ^= (T0);                             \
  |  |   81|  6.49k|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   82|  6.49k|    (T0) += (T1);                             \
  |  |   83|  6.49k|    (T0) = G_FUNC(T0);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   84|  6.49k|    (T1) += (T0);                             \
  |  |   85|  6.49k|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   86|  6.49k|    (T0) += (T1);                             \
  |  |   87|  6.49k|    (X1) ^= (T0);                             \
  |  |   88|  6.49k|    (X2) ^= (T1)
  ------------------
  398|  6.49k|    E_SEED(t0, t1, R0, R1, L0, L1, 20);
  ------------------
  |  |   78|  6.49k|    (T0) = (X3) ^ (ks->data)[(rbase)];        \
  |  |   79|  6.49k|    (T1) = (X4) ^ (ks->data)[(rbase) + 1];    \
  |  |   80|  6.49k|    (T1) ^= (T0);                             \
  |  |   81|  6.49k|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   82|  6.49k|    (T0) += (T1);                             \
  |  |   83|  6.49k|    (T0) = G_FUNC(T0);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   84|  6.49k|    (T1) += (T0);                             \
  |  |   85|  6.49k|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   86|  6.49k|    (T0) += (T1);                             \
  |  |   87|  6.49k|    (X1) ^= (T0);                             \
  |  |   88|  6.49k|    (X2) ^= (T1)
  ------------------
  399|  6.49k|    E_SEED(t0, t1, L0, L1, R0, R1, 18);
  ------------------
  |  |   78|  6.49k|    (T0) = (X3) ^ (ks->data)[(rbase)];        \
  |  |   79|  6.49k|    (T1) = (X4) ^ (ks->data)[(rbase) + 1];    \
  |  |   80|  6.49k|    (T1) ^= (T0);                             \
  |  |   81|  6.49k|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   82|  6.49k|    (T0) += (T1);                             \
  |  |   83|  6.49k|    (T0) = G_FUNC(T0);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   84|  6.49k|    (T1) += (T0);                             \
  |  |   85|  6.49k|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   86|  6.49k|    (T0) += (T1);                             \
  |  |   87|  6.49k|    (X1) ^= (T0);                             \
  |  |   88|  6.49k|    (X2) ^= (T1)
  ------------------
  400|  6.49k|    E_SEED(t0, t1, R0, R1, L0, L1, 16);
  ------------------
  |  |   78|  6.49k|    (T0) = (X3) ^ (ks->data)[(rbase)];        \
  |  |   79|  6.49k|    (T1) = (X4) ^ (ks->data)[(rbase) + 1];    \
  |  |   80|  6.49k|    (T1) ^= (T0);                             \
  |  |   81|  6.49k|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   82|  6.49k|    (T0) += (T1);                             \
  |  |   83|  6.49k|    (T0) = G_FUNC(T0);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   84|  6.49k|    (T1) += (T0);                             \
  |  |   85|  6.49k|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   86|  6.49k|    (T0) += (T1);                             \
  |  |   87|  6.49k|    (X1) ^= (T0);                             \
  |  |   88|  6.49k|    (X2) ^= (T1)
  ------------------
  401|  6.49k|    E_SEED(t0, t1, L0, L1, R0, R1, 14);
  ------------------
  |  |   78|  6.49k|    (T0) = (X3) ^ (ks->data)[(rbase)];        \
  |  |   79|  6.49k|    (T1) = (X4) ^ (ks->data)[(rbase) + 1];    \
  |  |   80|  6.49k|    (T1) ^= (T0);                             \
  |  |   81|  6.49k|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   82|  6.49k|    (T0) += (T1);                             \
  |  |   83|  6.49k|    (T0) = G_FUNC(T0);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   84|  6.49k|    (T1) += (T0);                             \
  |  |   85|  6.49k|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   86|  6.49k|    (T0) += (T1);                             \
  |  |   87|  6.49k|    (X1) ^= (T0);                             \
  |  |   88|  6.49k|    (X2) ^= (T1)
  ------------------
  402|  6.49k|    E_SEED(t0, t1, R0, R1, L0, L1, 12);
  ------------------
  |  |   78|  6.49k|    (T0) = (X3) ^ (ks->data)[(rbase)];        \
  |  |   79|  6.49k|    (T1) = (X4) ^ (ks->data)[(rbase) + 1];    \
  |  |   80|  6.49k|    (T1) ^= (T0);                             \
  |  |   81|  6.49k|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   82|  6.49k|    (T0) += (T1);                             \
  |  |   83|  6.49k|    (T0) = G_FUNC(T0);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   84|  6.49k|    (T1) += (T0);                             \
  |  |   85|  6.49k|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   86|  6.49k|    (T0) += (T1);                             \
  |  |   87|  6.49k|    (X1) ^= (T0);                             \
  |  |   88|  6.49k|    (X2) ^= (T1)
  ------------------
  403|  6.49k|    E_SEED(t0, t1, L0, L1, R0, R1, 10);
  ------------------
  |  |   78|  6.49k|    (T0) = (X3) ^ (ks->data)[(rbase)];        \
  |  |   79|  6.49k|    (T1) = (X4) ^ (ks->data)[(rbase) + 1];    \
  |  |   80|  6.49k|    (T1) ^= (T0);                             \
  |  |   81|  6.49k|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   82|  6.49k|    (T0) += (T1);                             \
  |  |   83|  6.49k|    (T0) = G_FUNC(T0);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   84|  6.49k|    (T1) += (T0);                             \
  |  |   85|  6.49k|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   86|  6.49k|    (T0) += (T1);                             \
  |  |   87|  6.49k|    (X1) ^= (T0);                             \
  |  |   88|  6.49k|    (X2) ^= (T1)
  ------------------
  404|  6.49k|    E_SEED(t0, t1, R0, R1, L0, L1, 8);
  ------------------
  |  |   78|  6.49k|    (T0) = (X3) ^ (ks->data)[(rbase)];        \
  |  |   79|  6.49k|    (T1) = (X4) ^ (ks->data)[(rbase) + 1];    \
  |  |   80|  6.49k|    (T1) ^= (T0);                             \
  |  |   81|  6.49k|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   82|  6.49k|    (T0) += (T1);                             \
  |  |   83|  6.49k|    (T0) = G_FUNC(T0);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   84|  6.49k|    (T1) += (T0);                             \
  |  |   85|  6.49k|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   86|  6.49k|    (T0) += (T1);                             \
  |  |   87|  6.49k|    (X1) ^= (T0);                             \
  |  |   88|  6.49k|    (X2) ^= (T1)
  ------------------
  405|  6.49k|    E_SEED(t0, t1, L0, L1, R0, R1, 6);
  ------------------
  |  |   78|  6.49k|    (T0) = (X3) ^ (ks->data)[(rbase)];        \
  |  |   79|  6.49k|    (T1) = (X4) ^ (ks->data)[(rbase) + 1];    \
  |  |   80|  6.49k|    (T1) ^= (T0);                             \
  |  |   81|  6.49k|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   82|  6.49k|    (T0) += (T1);                             \
  |  |   83|  6.49k|    (T0) = G_FUNC(T0);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   84|  6.49k|    (T1) += (T0);                             \
  |  |   85|  6.49k|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   86|  6.49k|    (T0) += (T1);                             \
  |  |   87|  6.49k|    (X1) ^= (T0);                             \
  |  |   88|  6.49k|    (X2) ^= (T1)
  ------------------
  406|  6.49k|    E_SEED(t0, t1, R0, R1, L0, L1, 4);
  ------------------
  |  |   78|  6.49k|    (T0) = (X3) ^ (ks->data)[(rbase)];        \
  |  |   79|  6.49k|    (T1) = (X4) ^ (ks->data)[(rbase) + 1];    \
  |  |   80|  6.49k|    (T1) ^= (T0);                             \
  |  |   81|  6.49k|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   82|  6.49k|    (T0) += (T1);                             \
  |  |   83|  6.49k|    (T0) = G_FUNC(T0);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   84|  6.49k|    (T1) += (T0);                             \
  |  |   85|  6.49k|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   86|  6.49k|    (T0) += (T1);                             \
  |  |   87|  6.49k|    (X1) ^= (T0);                             \
  |  |   88|  6.49k|    (X2) ^= (T1)
  ------------------
  407|  6.49k|    E_SEED(t0, t1, L0, L1, R0, R1, 2);
  ------------------
  |  |   78|  6.49k|    (T0) = (X3) ^ (ks->data)[(rbase)];        \
  |  |   79|  6.49k|    (T1) = (X4) ^ (ks->data)[(rbase) + 1];    \
  |  |   80|  6.49k|    (T1) ^= (T0);                             \
  |  |   81|  6.49k|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   82|  6.49k|    (T0) += (T1);                             \
  |  |   83|  6.49k|    (T0) = G_FUNC(T0);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   84|  6.49k|    (T1) += (T0);                             \
  |  |   85|  6.49k|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   86|  6.49k|    (T0) += (T1);                             \
  |  |   87|  6.49k|    (X1) ^= (T0);                             \
  |  |   88|  6.49k|    (X2) ^= (T1)
  ------------------
  408|  6.49k|    E_SEED(t0, t1, R0, R1, L0, L1, 0);
  ------------------
  |  |   78|  6.49k|    (T0) = (X3) ^ (ks->data)[(rbase)];        \
  |  |   79|  6.49k|    (T1) = (X4) ^ (ks->data)[(rbase) + 1];    \
  |  |   80|  6.49k|    (T1) ^= (T0);                             \
  |  |   81|  6.49k|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   82|  6.49k|    (T0) += (T1);                             \
  |  |   83|  6.49k|    (T0) = G_FUNC(T0);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   84|  6.49k|    (T1) += (T0);                             \
  |  |   85|  6.49k|    (T1) = G_FUNC(T1);                        \
  |  |  ------------------
  |  |  |  |   18|  6.49k|    SS[0][((v)&0xff)] ^             \
  |  |  |  |   19|  6.49k|        SS[1][((v) >> 8 & 0xff)] ^  \
  |  |  |  |   20|  6.49k|        SS[2][((v) >> 16 & 0xff)] ^ \
  |  |  |  |   21|  6.49k|        SS[3][((v) >> 24 & 0xff)]
  |  |  ------------------
  |  |   86|  6.49k|    (T0) += (T1);                             \
  |  |   87|  6.49k|    (X1) ^= (T0);                             \
  |  |   88|  6.49k|    (X2) ^= (T1)
  ------------------
  409|       |
  410|  6.49k|    word2char(R0, d);
  ------------------
  |  |   30|  6.49k|    *((c) + 0) = (unsigned char)((l) >> 24); \
  |  |   31|  6.49k|    *((c) + 1) = (unsigned char)((l) >> 16); \
  |  |   32|  6.49k|    *((c) + 2) = (unsigned char)((l) >> 8);  \
  |  |   33|  6.49k|    *((c) + 3) = (unsigned char)((l))
  ------------------
  411|  6.49k|    word2char(R1, d + 4);
  ------------------
  |  |   30|  6.49k|    *((c) + 0) = (unsigned char)((l) >> 24); \
  |  |   31|  6.49k|    *((c) + 1) = (unsigned char)((l) >> 16); \
  |  |   32|  6.49k|    *((c) + 2) = (unsigned char)((l) >> 8);  \
  |  |   33|  6.49k|    *((c) + 3) = (unsigned char)((l))
  ------------------
  412|  6.49k|    word2char(L0, d + 8);
  ------------------
  |  |   30|  6.49k|    *((c) + 0) = (unsigned char)((l) >> 24); \
  |  |   31|  6.49k|    *((c) + 1) = (unsigned char)((l) >> 16); \
  |  |   32|  6.49k|    *((c) + 2) = (unsigned char)((l) >> 8);  \
  |  |   33|  6.49k|    *((c) + 3) = (unsigned char)((l))
  ------------------
  413|  6.49k|    word2char(L1, d + 12);
  ------------------
  |  |   30|  6.49k|    *((c) + 0) = (unsigned char)((l) >> 24); \
  |  |   31|  6.49k|    *((c) + 1) = (unsigned char)((l) >> 16); \
  |  |   32|  6.49k|    *((c) + 2) = (unsigned char)((l) >> 8);  \
  |  |   33|  6.49k|    *((c) + 3) = (unsigned char)((l))
  ------------------
  414|  6.49k|}
SEED_cbc_encrypt:
  443|  1.12k|{
  444|  1.12k|    size_t n;
  445|  1.12k|    unsigned char tmp[SEED_BLOCK_SIZE];
  446|  1.12k|    const unsigned char *iv = ivec;
  447|       |
  448|  1.12k|    if (enc) {
  ------------------
  |  Branch (448:9): [True: 206, False: 921]
  ------------------
  449|    616|        while (len >= SEED_BLOCK_SIZE) {
  ------------------
  |  |  140|    616|#define SEED_BLOCK_SIZE 16 /* bytes */
  ------------------
  |  Branch (449:16): [True: 410, False: 206]
  ------------------
  450|  6.97k|            for (n = 0; n < SEED_BLOCK_SIZE; ++n) {
  ------------------
  |  |  140|  6.97k|#define SEED_BLOCK_SIZE 16 /* bytes */
  ------------------
  |  Branch (450:25): [True: 6.56k, False: 410]
  ------------------
  451|  6.56k|                out[n] = in[n] ^ iv[n];
  452|  6.56k|            }
  453|       |
  454|    410|            SEED_encrypt(out, out, ks);
  455|    410|            iv = out;
  456|    410|            len -= SEED_BLOCK_SIZE;
  ------------------
  |  |  140|    410|#define SEED_BLOCK_SIZE 16 /* bytes */
  ------------------
  457|    410|            in += SEED_BLOCK_SIZE;
  ------------------
  |  |  140|    410|#define SEED_BLOCK_SIZE 16 /* bytes */
  ------------------
  458|    410|            out += SEED_BLOCK_SIZE;
  ------------------
  |  |  140|    410|#define SEED_BLOCK_SIZE 16 /* bytes */
  ------------------
  459|    410|        }
  460|       |
  461|    206|        if (len) {
  ------------------
  |  Branch (461:13): [True: 0, False: 206]
  ------------------
  462|      0|            for (n = 0; n < len; ++n) {
  ------------------
  |  Branch (462:25): [True: 0, False: 0]
  ------------------
  463|      0|                out[n] = in[n] ^ iv[n];
  464|      0|            }
  465|       |
  466|      0|            for (n = len; n < SEED_BLOCK_SIZE; ++n) {
  ------------------
  |  |  140|      0|#define SEED_BLOCK_SIZE 16 /* bytes */
  ------------------
  |  Branch (466:27): [True: 0, False: 0]
  ------------------
  467|      0|                out[n] = iv[n];
  468|      0|            }
  469|       |
  470|      0|            SEED_encrypt(out, out, ks);
  471|      0|            iv = out;
  472|      0|        }
  473|       |
  474|    206|        memcpy(ivec, iv, SEED_BLOCK_SIZE);
  ------------------
  |  |  140|    206|#define SEED_BLOCK_SIZE 16 /* bytes */
  ------------------
  475|    921|    } else if (in != out) {
  ------------------
  |  Branch (475:16): [True: 921, False: 0]
  ------------------
  476|  7.41k|        while (len >= SEED_BLOCK_SIZE) {
  ------------------
  |  |  140|  7.41k|#define SEED_BLOCK_SIZE 16 /* bytes */
  ------------------
  |  Branch (476:16): [True: 6.49k, False: 921]
  ------------------
  477|  6.49k|            SEED_decrypt(in, out, ks);
  478|       |
  479|   110k|            for (n = 0; n < SEED_BLOCK_SIZE; ++n) {
  ------------------
  |  |  140|   110k|#define SEED_BLOCK_SIZE 16 /* bytes */
  ------------------
  |  Branch (479:25): [True: 103k, False: 6.49k]
  ------------------
  480|   103k|                out[n] ^= iv[n];
  481|   103k|            }
  482|       |
  483|  6.49k|            iv = in;
  484|  6.49k|            len -= SEED_BLOCK_SIZE;
  ------------------
  |  |  140|  6.49k|#define SEED_BLOCK_SIZE 16 /* bytes */
  ------------------
  485|  6.49k|            in += SEED_BLOCK_SIZE;
  ------------------
  |  |  140|  6.49k|#define SEED_BLOCK_SIZE 16 /* bytes */
  ------------------
  486|  6.49k|            out += SEED_BLOCK_SIZE;
  ------------------
  |  |  140|  6.49k|#define SEED_BLOCK_SIZE 16 /* bytes */
  ------------------
  487|  6.49k|        }
  488|       |
  489|    921|        if (len) {
  ------------------
  |  Branch (489:13): [True: 0, False: 921]
  ------------------
  490|      0|            SEED_decrypt(in, tmp, ks);
  491|       |
  492|      0|            for (n = 0; n < len; ++n) {
  ------------------
  |  Branch (492:25): [True: 0, False: 0]
  ------------------
  493|      0|                out[n] = tmp[n] ^ iv[n];
  494|      0|            }
  495|       |
  496|      0|            iv = in;
  497|      0|        }
  498|       |
  499|    921|        memcpy(ivec, iv, SEED_BLOCK_SIZE);
  ------------------
  |  |  140|    921|#define SEED_BLOCK_SIZE 16 /* bytes */
  ------------------
  500|    921|    } else {
  501|      0|        while (len >= SEED_BLOCK_SIZE) {
  ------------------
  |  |  140|      0|#define SEED_BLOCK_SIZE 16 /* bytes */
  ------------------
  |  Branch (501:16): [True: 0, False: 0]
  ------------------
  502|      0|            memcpy(tmp, in, SEED_BLOCK_SIZE);
  ------------------
  |  |  140|      0|#define SEED_BLOCK_SIZE 16 /* bytes */
  ------------------
  503|      0|            SEED_decrypt(in, out, ks);
  504|       |
  505|      0|            for (n = 0; n < SEED_BLOCK_SIZE; ++n) {
  ------------------
  |  |  140|      0|#define SEED_BLOCK_SIZE 16 /* bytes */
  ------------------
  |  Branch (505:25): [True: 0, False: 0]
  ------------------
  506|      0|                out[n] ^= ivec[n];
  507|      0|            }
  508|       |
  509|      0|            memcpy(ivec, tmp, SEED_BLOCK_SIZE);
  ------------------
  |  |  140|      0|#define SEED_BLOCK_SIZE 16 /* bytes */
  ------------------
  510|      0|            len -= SEED_BLOCK_SIZE;
  ------------------
  |  |  140|      0|#define SEED_BLOCK_SIZE 16 /* bytes */
  ------------------
  511|      0|            in += SEED_BLOCK_SIZE;
  ------------------
  |  |  140|      0|#define SEED_BLOCK_SIZE 16 /* bytes */
  ------------------
  512|      0|            out += SEED_BLOCK_SIZE;
  ------------------
  |  |  140|      0|#define SEED_BLOCK_SIZE 16 /* bytes */
  ------------------
  513|      0|        }
  514|       |
  515|      0|        if (len) {
  ------------------
  |  Branch (515:13): [True: 0, False: 0]
  ------------------
  516|      0|            memcpy(tmp, in, SEED_BLOCK_SIZE);
  ------------------
  |  |  140|      0|#define SEED_BLOCK_SIZE 16 /* bytes */
  ------------------
  517|      0|            SEED_decrypt(tmp, tmp, ks);
  518|       |
  519|      0|            for (n = 0; n < len; ++n) {
  ------------------
  |  Branch (519:25): [True: 0, False: 0]
  ------------------
  520|      0|                out[n] = tmp[n] ^ ivec[n];
  521|      0|            }
  522|       |
  523|      0|            memcpy(ivec, tmp, SEED_BLOCK_SIZE);
  ------------------
  |  |  140|      0|#define SEED_BLOCK_SIZE 16 /* bytes */
  ------------------
  524|      0|        }
  525|      0|    }
  526|  1.12k|}
SEED_InitContext:
  538|    202|{
  539|    202|    if (!cx) {
  ------------------
  |  Branch (539:9): [True: 0, False: 202]
  ------------------
  540|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  541|      0|        return SECFailure;
  542|      0|    }
  543|       |
  544|    202|    switch (mode) {
  545|      0|        case NSS_SEED:
  ------------------
  |  |   46|      0|#define NSS_SEED 0
  ------------------
  |  Branch (545:9): [True: 0, False: 202]
  ------------------
  546|      0|            SEED_set_key(key, &cx->ks);
  547|      0|            cx->mode = NSS_SEED;
  ------------------
  |  |   46|      0|#define NSS_SEED 0
  ------------------
  548|      0|            cx->encrypt = encrypt;
  549|      0|            break;
  550|       |
  551|    202|        case NSS_SEED_CBC:
  ------------------
  |  |   47|    202|#define NSS_SEED_CBC 1
  ------------------
  |  Branch (551:9): [True: 202, False: 0]
  ------------------
  552|    202|            memcpy(cx->iv, iv, 16);
  553|    202|            SEED_set_key(key, &cx->ks);
  554|    202|            cx->mode = NSS_SEED_CBC;
  ------------------
  |  |   47|    202|#define NSS_SEED_CBC 1
  ------------------
  555|    202|            cx->encrypt = encrypt;
  556|    202|            break;
  557|       |
  558|      0|        default:
  ------------------
  |  Branch (558:9): [True: 0, False: 202]
  ------------------
  559|      0|            PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  560|      0|            return SECFailure;
  561|    202|    }
  562|       |
  563|    202|    return SECSuccess;
  564|    202|}
SEED_CreateContext:
  569|    202|{
  570|    202|    SEEDContext *cx = PORT_ZNew(SEEDContext);
  ------------------
  |  |  148|    202|#define PORT_ZNew(type) (type *)PORT_ZAlloc(sizeof(type))
  |  |  ------------------
  |  |  |  |   72|    202|#define PORT_ZAlloc PORT_ZAlloc_Util
  |  |  ------------------
  ------------------
  571|    202|    SECStatus rv = SEED_InitContext(cx, key, SEED_KEY_LENGTH, iv, mode,
  ------------------
  |  |  141|    202|#define SEED_KEY_LENGTH 16 /* bytes */
  ------------------
  572|    202|                                    encrypt, 0);
  573|       |
  574|    202|    if (rv != SECSuccess) {
  ------------------
  |  Branch (574:9): [True: 0, False: 202]
  ------------------
  575|      0|        PORT_ZFree(cx, sizeof *cx);
  ------------------
  |  |   75|      0|#define PORT_ZFree PORT_ZFree_Util
  ------------------
  576|      0|        cx = NULL;
  577|      0|    }
  578|       |
  579|    202|    return cx;
  580|    202|}
SEED_DestroyContext:
  584|    202|{
  585|    202|    if (cx) {
  ------------------
  |  Branch (585:9): [True: 202, False: 0]
  ------------------
  586|    202|        memset(cx, 0, sizeof *cx);
  587|       |
  588|    202|        if (freeit)
  ------------------
  |  Branch (588:13): [True: 202, False: 0]
  ------------------
  589|    202|            PORT_Free(cx);
  ------------------
  |  |   60|    202|#define PORT_Free PORT_Free_Util
  ------------------
  590|    202|    }
  591|    202|}
SEED_Encrypt:
  597|    206|{
  598|    206|    if (!cx) {
  ------------------
  |  Branch (598:9): [True: 0, False: 206]
  ------------------
  599|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  600|      0|        return SECFailure;
  601|      0|    }
  602|       |
  603|    206|    if ((inLen % SEED_BLOCK_SIZE) != 0 || maxOutLen < SEED_BLOCK_SIZE ||
  ------------------
  |  |  140|    206|#define SEED_BLOCK_SIZE 16 /* bytes */
  ------------------
                  if ((inLen % SEED_BLOCK_SIZE) != 0 || maxOutLen < SEED_BLOCK_SIZE ||
  ------------------
  |  |  140|    412|#define SEED_BLOCK_SIZE 16 /* bytes */
  ------------------
  |  Branch (603:9): [True: 0, False: 206]
  |  Branch (603:43): [True: 0, False: 206]
  ------------------
  604|    206|        maxOutLen < inLen) {
  ------------------
  |  Branch (604:9): [True: 0, False: 206]
  ------------------
  605|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  606|      0|        return SECFailure;
  607|      0|    }
  608|       |
  609|    206|    if (!cx->encrypt) {
  ------------------
  |  Branch (609:9): [True: 0, False: 206]
  ------------------
  610|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  611|      0|        return SECFailure;
  612|      0|    }
  613|       |
  614|    206|    switch (cx->mode) {
  615|      0|        case NSS_SEED:
  ------------------
  |  |   46|      0|#define NSS_SEED 0
  ------------------
  |  Branch (615:9): [True: 0, False: 206]
  ------------------
  616|      0|            SEED_ecb_encrypt(in, out, inLen, &cx->ks, 1);
  617|      0|            *outLen = inLen;
  618|      0|            break;
  619|       |
  620|    206|        case NSS_SEED_CBC:
  ------------------
  |  |   47|    206|#define NSS_SEED_CBC 1
  ------------------
  |  Branch (620:9): [True: 206, False: 0]
  ------------------
  621|    206|            SEED_cbc_encrypt(in, out, inLen, &cx->ks, cx->iv, 1);
  622|    206|            *outLen = inLen;
  623|    206|            break;
  624|       |
  625|      0|        default:
  ------------------
  |  Branch (625:9): [True: 0, False: 206]
  ------------------
  626|      0|            PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  627|      0|            return SECFailure;
  628|    206|    }
  629|       |
  630|    206|    return SECSuccess;
  631|    206|}
SEED_Decrypt:
  637|    921|{
  638|    921|    if (!cx) {
  ------------------
  |  Branch (638:9): [True: 0, False: 921]
  ------------------
  639|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  640|      0|        return SECFailure;
  641|      0|    }
  642|       |
  643|    921|    if ((inLen % SEED_BLOCK_SIZE) != 0 || maxOutLen < SEED_BLOCK_SIZE ||
  ------------------
  |  |  140|    921|#define SEED_BLOCK_SIZE 16 /* bytes */
  ------------------
                  if ((inLen % SEED_BLOCK_SIZE) != 0 || maxOutLen < SEED_BLOCK_SIZE ||
  ------------------
  |  |  140|  1.84k|#define SEED_BLOCK_SIZE 16 /* bytes */
  ------------------
  |  Branch (643:9): [True: 0, False: 921]
  |  Branch (643:43): [True: 0, False: 921]
  ------------------
  644|    921|        maxOutLen < inLen) {
  ------------------
  |  Branch (644:9): [True: 0, False: 921]
  ------------------
  645|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  646|      0|        return SECFailure;
  647|      0|    }
  648|       |
  649|    921|    if (cx->encrypt) {
  ------------------
  |  Branch (649:9): [True: 0, False: 921]
  ------------------
  650|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  651|      0|        return SECFailure;
  652|      0|    }
  653|       |
  654|    921|    switch (cx->mode) {
  655|      0|        case NSS_SEED:
  ------------------
  |  |   46|      0|#define NSS_SEED 0
  ------------------
  |  Branch (655:9): [True: 0, False: 921]
  ------------------
  656|      0|            SEED_ecb_encrypt(in, out, inLen, &cx->ks, 0);
  657|      0|            *outLen = inLen;
  658|      0|            break;
  659|       |
  660|    921|        case NSS_SEED_CBC:
  ------------------
  |  |   47|    921|#define NSS_SEED_CBC 1
  ------------------
  |  Branch (660:9): [True: 921, False: 0]
  ------------------
  661|    921|            SEED_cbc_encrypt(in, out, inLen, &cx->ks, cx->iv, 0);
  662|    921|            *outLen = inLen;
  663|    921|            break;
  664|       |
  665|      0|        default:
  ------------------
  |  Branch (665:9): [True: 0, False: 921]
  ------------------
  666|      0|            PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  667|      0|            return SECFailure;
  668|    921|    }
  669|       |
  670|    921|    return SECSuccess;
  671|    921|}

DES_MakeSchedule:
  404|  3.11k|{
  405|  3.11k|    register HALF left, right;
  406|  3.11k|    register HALF c0, d0;
  407|  3.11k|    register HALF temp;
  408|  3.11k|    int delta;
  409|  3.11k|    unsigned int ls;
  410|       |
  411|  3.11k|#if defined(HAVE_UNALIGNED_ACCESS)
  412|  3.11k|    left = HALFPTR(key)[0];
  ------------------
  |  |   18|  3.11k|#define HALFPTR(x) ((HALF *)(x))
  ------------------
  413|  3.11k|    right = HALFPTR(key)[1];
  ------------------
  |  |   18|  3.11k|#define HALFPTR(x) ((HALF *)(x))
  ------------------
  414|  3.11k|#if defined(IS_LITTLE_ENDIAN)
  415|  3.11k|    BYTESWAP(left, temp);
  ------------------
  |  |  358|  3.11k|    __asm("bswap  %0"        \
  |  |  359|  3.11k|          : "+r"(word));
  ------------------
  416|  3.11k|    BYTESWAP(right, temp);
  ------------------
  |  |  358|  3.11k|    __asm("bswap  %0"        \
  |  |  359|  3.11k|          : "+r"(word));
  ------------------
  417|  3.11k|#endif
  418|       |#else
  419|       |    if (((ptrdiff_t)key & 0x03) == 0) {
  420|       |        left = HALFPTR(key)[0];
  421|       |        right = HALFPTR(key)[1];
  422|       |#if defined(IS_LITTLE_ENDIAN)
  423|       |        BYTESWAP(left, temp);
  424|       |        BYTESWAP(right, temp);
  425|       |#endif
  426|       |    } else {
  427|       |        left = ((HALF)key[0] << 24) | ((HALF)key[1] << 16) |
  428|       |               ((HALF)key[2] << 8) | key[3];
  429|       |        right = ((HALF)key[4] << 24) | ((HALF)key[5] << 16) |
  430|       |                ((HALF)key[6] << 8) | key[7];
  431|       |    }
  432|       |#endif
  433|       |
  434|  3.11k|    PC1(left, right, c0, d0, temp);
  ------------------
  |  |  387|  3.11k|    right ^= temp = ((left >> 4) ^ right) & 0x0f0f0f0f; \
  |  |  388|  3.11k|    left ^= temp << 4;                                  \
  |  |  389|  3.11k|    FLIP_RIGHT_DIAGONAL(left, temp);                    \
  |  |  ------------------
  |  |  |  |  351|  3.11k|    temp = (word ^ (word >> 18)) & 0x00003333; \
  |  |  |  |  352|  3.11k|    word ^= temp | (temp << 18);               \
  |  |  |  |  353|  3.11k|    temp = (word ^ (word >> 9)) & 0x00550055;  \
  |  |  |  |  354|  3.11k|    word ^= temp | (temp << 9);
  |  |  ------------------
  |  |  390|  3.11k|    FLIP_RIGHT_DIAGONAL(right, temp);                   \
  |  |  ------------------
  |  |  |  |  351|  3.11k|    temp = (word ^ (word >> 18)) & 0x00003333; \
  |  |  |  |  352|  3.11k|    word ^= temp | (temp << 18);               \
  |  |  |  |  353|  3.11k|    temp = (word ^ (word >> 9)) & 0x00550055;  \
  |  |  |  |  354|  3.11k|    word ^= temp | (temp << 9);
  |  |  ------------------
  |  |  391|  3.11k|    BYTESWAP(right, temp);                              \
  |  |  ------------------
  |  |  |  |  358|  3.11k|    __asm("bswap  %0"        \
  |  |  |  |  359|  3.11k|          : "+r"(word));
  |  |  ------------------
  |  |  392|  3.11k|    c0 = right >> 4;                                    \
  |  |  393|  3.11k|    d0 = ((left & 0x00ffffff) << 4) | (right & 0xf);
  ------------------
  435|       |
  436|  3.11k|    if (direction == DES_ENCRYPT) {
  ------------------
  |  Branch (436:9): [True: 1.55k, False: 1.55k]
  ------------------
  437|  1.55k|        delta = 2 * (int)sizeof(HALF);
  438|  1.55k|    } else {
  439|  1.55k|        ks += 30;
  440|  1.55k|        delta = (-2) * (int)sizeof(HALF);
  441|  1.55k|    }
  442|       |
  443|  53.0k|    for (ls = 0x8103; ls; ls >>= 1) {
  ------------------
  |  Branch (443:23): [True: 49.8k, False: 3.11k]
  ------------------
  444|  49.8k|        if (ls & 1) {
  ------------------
  |  Branch (444:13): [True: 12.4k, False: 37.4k]
  ------------------
  445|  12.4k|            c0 = LEFT_SHIFT_1(c0);
  ------------------
  |  |  395|  12.4k|#define LEFT_SHIFT_1(reg) (((reg << 1) | (reg >> 27)) & 0x0FFFFFFF)
  ------------------
  446|  12.4k|            d0 = LEFT_SHIFT_1(d0);
  ------------------
  |  |  395|  12.4k|#define LEFT_SHIFT_1(reg) (((reg << 1) | (reg >> 27)) & 0x0FFFFFFF)
  ------------------
  447|  37.4k|        } else {
  448|  37.4k|            c0 = LEFT_SHIFT_2(c0);
  ------------------
  |  |  396|  37.4k|#define LEFT_SHIFT_2(reg) (((reg << 2) | (reg >> 26)) & 0x0FFFFFFF)
  ------------------
  449|  37.4k|            d0 = LEFT_SHIFT_2(d0);
  ------------------
  |  |  396|  37.4k|#define LEFT_SHIFT_2(reg) (((reg << 2) | (reg >> 26)) & 0x0FFFFFFF)
  ------------------
  450|  37.4k|        }
  451|       |
  452|       |#ifdef USE_INDEXING
  453|       |#define PC2LOOKUP(b, c) PC2[b][c]
  454|       |
  455|       |        left = PC2LOOKUP(0, ((c0 >> 22) & 0x3F));
  456|       |        left |= PC2LOOKUP(1, ((c0 >> 13) & 0x3F));
  457|       |        left |= PC2LOOKUP(2, ((c0 >> 4) & 0x38) | (c0 & 0x7));
  458|       |        left |= PC2LOOKUP(3, ((c0 >> 18) & 0xC) | ((c0 >> 11) & 0x3) | (c0 & 0x30));
  459|       |
  460|       |        right = PC2LOOKUP(4, ((d0 >> 22) & 0x3F));
  461|       |        right |= PC2LOOKUP(5, ((d0 >> 15) & 0x30) | ((d0 >> 14) & 0xf));
  462|       |        right |= PC2LOOKUP(6, ((d0 >> 7) & 0x3F));
  463|       |        right |= PC2LOOKUP(7, ((d0 >> 1) & 0x3C) | (d0 & 0x3));
  464|       |#else
  465|  49.8k|#define PC2LOOKUP(b, c) *(HALF *)((BYTE *)&PC2[b][0] + (c))
  466|       |
  467|  49.8k|        left = PC2LOOKUP(0, ((c0 >> 20) & 0xFC));
  ------------------
  |  |  465|  49.8k|#define PC2LOOKUP(b, c) *(HALF *)((BYTE *)&PC2[b][0] + (c))
  ------------------
  468|  49.8k|        left |= PC2LOOKUP(1, ((c0 >> 11) & 0xFC));
  ------------------
  |  |  465|  49.8k|#define PC2LOOKUP(b, c) *(HALF *)((BYTE *)&PC2[b][0] + (c))
  ------------------
  469|  49.8k|        left |= PC2LOOKUP(2, ((c0 >> 2) & 0xE0) | ((c0 << 2) & 0x1C));
  ------------------
  |  |  465|  49.8k|#define PC2LOOKUP(b, c) *(HALF *)((BYTE *)&PC2[b][0] + (c))
  ------------------
  470|  49.8k|        left |= PC2LOOKUP(3, ((c0 >> 16) & 0x30) | ((c0 >> 9) & 0xC) | ((c0 << 2) & 0xC0));
  ------------------
  |  |  465|  49.8k|#define PC2LOOKUP(b, c) *(HALF *)((BYTE *)&PC2[b][0] + (c))
  ------------------
  471|       |
  472|  49.8k|        right = PC2LOOKUP(4, ((d0 >> 20) & 0xFC));
  ------------------
  |  |  465|  49.8k|#define PC2LOOKUP(b, c) *(HALF *)((BYTE *)&PC2[b][0] + (c))
  ------------------
  473|  49.8k|        right |= PC2LOOKUP(5, ((d0 >> 13) & 0xC0) | ((d0 >> 12) & 0x3C));
  ------------------
  |  |  465|  49.8k|#define PC2LOOKUP(b, c) *(HALF *)((BYTE *)&PC2[b][0] + (c))
  ------------------
  474|  49.8k|        right |= PC2LOOKUP(6, ((d0 >> 5) & 0xFC));
  ------------------
  |  |  465|  49.8k|#define PC2LOOKUP(b, c) *(HALF *)((BYTE *)&PC2[b][0] + (c))
  ------------------
  475|  49.8k|        right |= PC2LOOKUP(7, ((d0 << 1) & 0xF0) | ((d0 << 2) & 0x0C));
  ------------------
  |  |  465|  49.8k|#define PC2LOOKUP(b, c) *(HALF *)((BYTE *)&PC2[b][0] + (c))
  ------------------
  476|  49.8k|#endif
  477|       |        /* left  contains key bits for S1 S3 S2 S4 */
  478|       |        /* right contains key bits for S6 S8 S5 S7 */
  479|  49.8k|        temp = (left << 16)     /* S2 S4 XX XX */
  480|  49.8k|               | (right >> 16); /* XX XX S6 S8 */
  481|  49.8k|        ks[0] = temp;
  482|       |
  483|  49.8k|        temp = (left & 0xffff0000)     /* S1 S3 XX XX */
  484|  49.8k|               | (right & 0x0000ffff); /* XX XX S5 S7 */
  485|  49.8k|        ks[1] = temp;
  486|       |
  487|  49.8k|        ks = (HALF *)((BYTE *)ks + delta);
  488|  49.8k|    }
  489|  3.11k|}
DES_Do1Block:
  560|   179k|{
  561|   179k|    register HALF left, right;
  562|   179k|    register HALF temp;
  563|       |
  564|   179k|#if defined(HAVE_UNALIGNED_ACCESS)
  565|   179k|    left = HALFPTR(inbuf)[0];
  ------------------
  |  |   18|   179k|#define HALFPTR(x) ((HALF *)(x))
  ------------------
  566|   179k|    right = HALFPTR(inbuf)[1];
  ------------------
  |  |   18|   179k|#define HALFPTR(x) ((HALF *)(x))
  ------------------
  567|   179k|#if defined(IS_LITTLE_ENDIAN)
  568|   179k|    BYTESWAP(left, temp);
  ------------------
  |  |  358|   179k|    __asm("bswap  %0"        \
  |  |  359|   179k|          : "+r"(word));
  ------------------
  569|   179k|    BYTESWAP(right, temp);
  ------------------
  |  |  358|   179k|    __asm("bswap  %0"        \
  |  |  359|   179k|          : "+r"(word));
  ------------------
  570|   179k|#endif
  571|       |#else
  572|       |    if (((ptrdiff_t)inbuf & 0x03) == 0) {
  573|       |        left = HALFPTR(inbuf)[0];
  574|       |        right = HALFPTR(inbuf)[1];
  575|       |#if defined(IS_LITTLE_ENDIAN)
  576|       |        BYTESWAP(left, temp);
  577|       |        BYTESWAP(right, temp);
  578|       |#endif
  579|       |    } else {
  580|       |        left = ((HALF)inbuf[0] << 24) | ((HALF)inbuf[1] << 16) |
  581|       |               ((HALF)inbuf[2] << 8) | inbuf[3];
  582|       |        right = ((HALF)inbuf[4] << 24) | ((HALF)inbuf[5] << 16) |
  583|       |                ((HALF)inbuf[6] << 8) | inbuf[7];
  584|       |    }
  585|       |#endif
  586|       |
  587|   179k|    IP(left, right, temp);
  ------------------
  |  |  531|   179k|    right ^= temp = ((left >> 4) ^ right) & 0x0f0f0f0f;  \
  |  |  532|   179k|    left ^= temp << 4;                                   \
  |  |  533|   179k|    right ^= temp = ((left >> 16) ^ right) & 0x0000ffff; \
  |  |  534|   179k|    left ^= temp << 16;                                  \
  |  |  535|   179k|    right ^= temp = ((left << 2) ^ right) & 0xcccccccc;  \
  |  |  536|   179k|    left ^= temp >> 2;                                   \
  |  |  537|   179k|    right ^= temp = ((left << 8) ^ right) & 0xff00ff00;  \
  |  |  538|   179k|    left ^= temp >> 8;                                   \
  |  |  539|   179k|    right ^= temp = ((left >> 1) ^ right) & 0x55555555;  \
  |  |  540|   179k|    left ^= temp << 1;
  ------------------
  588|       |
  589|       |    /* shift the values left circularly 3 bits. */
  590|   179k|    left = (left << 3) | (left >> 29);
  591|   179k|    right = (right << 3) | (right >> 29);
  592|       |
  593|       |#ifdef USE_INDEXING
  594|       |#define KSLOOKUP(s, b) SP[s][((temp >> (b + 2)) & 0x3f)]
  595|       |#else
  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  597|   179k|#endif
  598|   179k|#define ROUND(out, in, r)                            \
  599|   179k|    temp = in ^ ks[2 * r];                           \
  600|   179k|    out ^= KSLOOKUP(1, 24);                          \
  601|   179k|    out ^= KSLOOKUP(3, 16);                          \
  602|   179k|    out ^= KSLOOKUP(5, 8);                           \
  603|   179k|    out ^= KSLOOKUP(7, 0);                           \
  604|   179k|    temp = ((in >> 4) | (in << 28)) ^ ks[2 * r + 1]; \
  605|   179k|    out ^= KSLOOKUP(0, 24);                          \
  606|   179k|    out ^= KSLOOKUP(2, 16);                          \
  607|   179k|    out ^= KSLOOKUP(4, 8);                           \
  608|   179k|    out ^= KSLOOKUP(6, 0);
  609|       |
  610|       |    /* Do the 16 Feistel rounds */
  611|   179k|    ROUND(left, right, 0)
  ------------------
  |  |  599|   179k|    temp = in ^ ks[2 * r];                           \
  |  |  600|   179k|    out ^= KSLOOKUP(1, 24);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  601|   179k|    out ^= KSLOOKUP(3, 16);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  602|   179k|    out ^= KSLOOKUP(5, 8);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  603|   179k|    out ^= KSLOOKUP(7, 0);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  604|   179k|    temp = ((in >> 4) | (in << 28)) ^ ks[2 * r + 1]; \
  |  |  605|   179k|    out ^= KSLOOKUP(0, 24);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  606|   179k|    out ^= KSLOOKUP(2, 16);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  607|   179k|    out ^= KSLOOKUP(4, 8);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  608|   179k|    out ^= KSLOOKUP(6, 0);
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  ------------------
  612|   179k|    ROUND(right, left, 1)
  ------------------
  |  |  599|   179k|    temp = in ^ ks[2 * r];                           \
  |  |  600|   179k|    out ^= KSLOOKUP(1, 24);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  601|   179k|    out ^= KSLOOKUP(3, 16);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  602|   179k|    out ^= KSLOOKUP(5, 8);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  603|   179k|    out ^= KSLOOKUP(7, 0);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  604|   179k|    temp = ((in >> 4) | (in << 28)) ^ ks[2 * r + 1]; \
  |  |  605|   179k|    out ^= KSLOOKUP(0, 24);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  606|   179k|    out ^= KSLOOKUP(2, 16);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  607|   179k|    out ^= KSLOOKUP(4, 8);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  608|   179k|    out ^= KSLOOKUP(6, 0);
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  ------------------
  613|   179k|    ROUND(left, right, 2)
  ------------------
  |  |  599|   179k|    temp = in ^ ks[2 * r];                           \
  |  |  600|   179k|    out ^= KSLOOKUP(1, 24);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  601|   179k|    out ^= KSLOOKUP(3, 16);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  602|   179k|    out ^= KSLOOKUP(5, 8);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  603|   179k|    out ^= KSLOOKUP(7, 0);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  604|   179k|    temp = ((in >> 4) | (in << 28)) ^ ks[2 * r + 1]; \
  |  |  605|   179k|    out ^= KSLOOKUP(0, 24);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  606|   179k|    out ^= KSLOOKUP(2, 16);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  607|   179k|    out ^= KSLOOKUP(4, 8);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  608|   179k|    out ^= KSLOOKUP(6, 0);
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  ------------------
  614|   179k|    ROUND(right, left, 3)
  ------------------
  |  |  599|   179k|    temp = in ^ ks[2 * r];                           \
  |  |  600|   179k|    out ^= KSLOOKUP(1, 24);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  601|   179k|    out ^= KSLOOKUP(3, 16);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  602|   179k|    out ^= KSLOOKUP(5, 8);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  603|   179k|    out ^= KSLOOKUP(7, 0);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  604|   179k|    temp = ((in >> 4) | (in << 28)) ^ ks[2 * r + 1]; \
  |  |  605|   179k|    out ^= KSLOOKUP(0, 24);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  606|   179k|    out ^= KSLOOKUP(2, 16);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  607|   179k|    out ^= KSLOOKUP(4, 8);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  608|   179k|    out ^= KSLOOKUP(6, 0);
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  ------------------
  615|   179k|    ROUND(left, right, 4)
  ------------------
  |  |  599|   179k|    temp = in ^ ks[2 * r];                           \
  |  |  600|   179k|    out ^= KSLOOKUP(1, 24);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  601|   179k|    out ^= KSLOOKUP(3, 16);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  602|   179k|    out ^= KSLOOKUP(5, 8);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  603|   179k|    out ^= KSLOOKUP(7, 0);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  604|   179k|    temp = ((in >> 4) | (in << 28)) ^ ks[2 * r + 1]; \
  |  |  605|   179k|    out ^= KSLOOKUP(0, 24);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  606|   179k|    out ^= KSLOOKUP(2, 16);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  607|   179k|    out ^= KSLOOKUP(4, 8);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  608|   179k|    out ^= KSLOOKUP(6, 0);
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  ------------------
  616|   179k|    ROUND(right, left, 5)
  ------------------
  |  |  599|   179k|    temp = in ^ ks[2 * r];                           \
  |  |  600|   179k|    out ^= KSLOOKUP(1, 24);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  601|   179k|    out ^= KSLOOKUP(3, 16);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  602|   179k|    out ^= KSLOOKUP(5, 8);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  603|   179k|    out ^= KSLOOKUP(7, 0);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  604|   179k|    temp = ((in >> 4) | (in << 28)) ^ ks[2 * r + 1]; \
  |  |  605|   179k|    out ^= KSLOOKUP(0, 24);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  606|   179k|    out ^= KSLOOKUP(2, 16);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  607|   179k|    out ^= KSLOOKUP(4, 8);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  608|   179k|    out ^= KSLOOKUP(6, 0);
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  ------------------
  617|   179k|    ROUND(left, right, 6)
  ------------------
  |  |  599|   179k|    temp = in ^ ks[2 * r];                           \
  |  |  600|   179k|    out ^= KSLOOKUP(1, 24);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  601|   179k|    out ^= KSLOOKUP(3, 16);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  602|   179k|    out ^= KSLOOKUP(5, 8);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  603|   179k|    out ^= KSLOOKUP(7, 0);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  604|   179k|    temp = ((in >> 4) | (in << 28)) ^ ks[2 * r + 1]; \
  |  |  605|   179k|    out ^= KSLOOKUP(0, 24);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  606|   179k|    out ^= KSLOOKUP(2, 16);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  607|   179k|    out ^= KSLOOKUP(4, 8);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  608|   179k|    out ^= KSLOOKUP(6, 0);
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  ------------------
  618|   179k|    ROUND(right, left, 7)
  ------------------
  |  |  599|   179k|    temp = in ^ ks[2 * r];                           \
  |  |  600|   179k|    out ^= KSLOOKUP(1, 24);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  601|   179k|    out ^= KSLOOKUP(3, 16);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  602|   179k|    out ^= KSLOOKUP(5, 8);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  603|   179k|    out ^= KSLOOKUP(7, 0);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  604|   179k|    temp = ((in >> 4) | (in << 28)) ^ ks[2 * r + 1]; \
  |  |  605|   179k|    out ^= KSLOOKUP(0, 24);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  606|   179k|    out ^= KSLOOKUP(2, 16);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  607|   179k|    out ^= KSLOOKUP(4, 8);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  608|   179k|    out ^= KSLOOKUP(6, 0);
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  ------------------
  619|   179k|    ROUND(left, right, 8)
  ------------------
  |  |  599|   179k|    temp = in ^ ks[2 * r];                           \
  |  |  600|   179k|    out ^= KSLOOKUP(1, 24);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  601|   179k|    out ^= KSLOOKUP(3, 16);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  602|   179k|    out ^= KSLOOKUP(5, 8);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  603|   179k|    out ^= KSLOOKUP(7, 0);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  604|   179k|    temp = ((in >> 4) | (in << 28)) ^ ks[2 * r + 1]; \
  |  |  605|   179k|    out ^= KSLOOKUP(0, 24);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  606|   179k|    out ^= KSLOOKUP(2, 16);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  607|   179k|    out ^= KSLOOKUP(4, 8);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  608|   179k|    out ^= KSLOOKUP(6, 0);
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  ------------------
  620|   179k|    ROUND(right, left, 9)
  ------------------
  |  |  599|   179k|    temp = in ^ ks[2 * r];                           \
  |  |  600|   179k|    out ^= KSLOOKUP(1, 24);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  601|   179k|    out ^= KSLOOKUP(3, 16);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  602|   179k|    out ^= KSLOOKUP(5, 8);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  603|   179k|    out ^= KSLOOKUP(7, 0);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  604|   179k|    temp = ((in >> 4) | (in << 28)) ^ ks[2 * r + 1]; \
  |  |  605|   179k|    out ^= KSLOOKUP(0, 24);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  606|   179k|    out ^= KSLOOKUP(2, 16);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  607|   179k|    out ^= KSLOOKUP(4, 8);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  608|   179k|    out ^= KSLOOKUP(6, 0);
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  ------------------
  621|   179k|    ROUND(left, right, 10)
  ------------------
  |  |  599|   179k|    temp = in ^ ks[2 * r];                           \
  |  |  600|   179k|    out ^= KSLOOKUP(1, 24);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  601|   179k|    out ^= KSLOOKUP(3, 16);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  602|   179k|    out ^= KSLOOKUP(5, 8);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  603|   179k|    out ^= KSLOOKUP(7, 0);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  604|   179k|    temp = ((in >> 4) | (in << 28)) ^ ks[2 * r + 1]; \
  |  |  605|   179k|    out ^= KSLOOKUP(0, 24);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  606|   179k|    out ^= KSLOOKUP(2, 16);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  607|   179k|    out ^= KSLOOKUP(4, 8);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  608|   179k|    out ^= KSLOOKUP(6, 0);
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  ------------------
  622|   179k|    ROUND(right, left, 11)
  ------------------
  |  |  599|   179k|    temp = in ^ ks[2 * r];                           \
  |  |  600|   179k|    out ^= KSLOOKUP(1, 24);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  601|   179k|    out ^= KSLOOKUP(3, 16);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  602|   179k|    out ^= KSLOOKUP(5, 8);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  603|   179k|    out ^= KSLOOKUP(7, 0);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  604|   179k|    temp = ((in >> 4) | (in << 28)) ^ ks[2 * r + 1]; \
  |  |  605|   179k|    out ^= KSLOOKUP(0, 24);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  606|   179k|    out ^= KSLOOKUP(2, 16);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  607|   179k|    out ^= KSLOOKUP(4, 8);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  608|   179k|    out ^= KSLOOKUP(6, 0);
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  ------------------
  623|   179k|    ROUND(left, right, 12)
  ------------------
  |  |  599|   179k|    temp = in ^ ks[2 * r];                           \
  |  |  600|   179k|    out ^= KSLOOKUP(1, 24);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  601|   179k|    out ^= KSLOOKUP(3, 16);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  602|   179k|    out ^= KSLOOKUP(5, 8);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  603|   179k|    out ^= KSLOOKUP(7, 0);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  604|   179k|    temp = ((in >> 4) | (in << 28)) ^ ks[2 * r + 1]; \
  |  |  605|   179k|    out ^= KSLOOKUP(0, 24);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  606|   179k|    out ^= KSLOOKUP(2, 16);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  607|   179k|    out ^= KSLOOKUP(4, 8);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  608|   179k|    out ^= KSLOOKUP(6, 0);
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  ------------------
  624|   179k|    ROUND(right, left, 13)
  ------------------
  |  |  599|   179k|    temp = in ^ ks[2 * r];                           \
  |  |  600|   179k|    out ^= KSLOOKUP(1, 24);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  601|   179k|    out ^= KSLOOKUP(3, 16);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  602|   179k|    out ^= KSLOOKUP(5, 8);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  603|   179k|    out ^= KSLOOKUP(7, 0);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  604|   179k|    temp = ((in >> 4) | (in << 28)) ^ ks[2 * r + 1]; \
  |  |  605|   179k|    out ^= KSLOOKUP(0, 24);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  606|   179k|    out ^= KSLOOKUP(2, 16);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  607|   179k|    out ^= KSLOOKUP(4, 8);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  608|   179k|    out ^= KSLOOKUP(6, 0);
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  ------------------
  625|   179k|    ROUND(left, right, 14)
  ------------------
  |  |  599|   179k|    temp = in ^ ks[2 * r];                           \
  |  |  600|   179k|    out ^= KSLOOKUP(1, 24);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  601|   179k|    out ^= KSLOOKUP(3, 16);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  602|   179k|    out ^= KSLOOKUP(5, 8);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  603|   179k|    out ^= KSLOOKUP(7, 0);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  604|   179k|    temp = ((in >> 4) | (in << 28)) ^ ks[2 * r + 1]; \
  |  |  605|   179k|    out ^= KSLOOKUP(0, 24);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  606|   179k|    out ^= KSLOOKUP(2, 16);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  607|   179k|    out ^= KSLOOKUP(4, 8);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  608|   179k|    out ^= KSLOOKUP(6, 0);
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  ------------------
  626|   179k|    ROUND(right, left, 15)
  ------------------
  |  |  599|   179k|    temp = in ^ ks[2 * r];                           \
  |  |  600|   179k|    out ^= KSLOOKUP(1, 24);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  601|   179k|    out ^= KSLOOKUP(3, 16);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  602|   179k|    out ^= KSLOOKUP(5, 8);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  603|   179k|    out ^= KSLOOKUP(7, 0);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  604|   179k|    temp = ((in >> 4) | (in << 28)) ^ ks[2 * r + 1]; \
  |  |  605|   179k|    out ^= KSLOOKUP(0, 24);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  606|   179k|    out ^= KSLOOKUP(2, 16);                          \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  607|   179k|    out ^= KSLOOKUP(4, 8);                           \
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  |  |  608|   179k|    out ^= KSLOOKUP(6, 0);
  |  |  ------------------
  |  |  |  |  596|   179k|#define KSLOOKUP(s, b) *(HALF *)((BYTE *)&SP[s][0] + ((temp >> b) & 0xFC))
  |  |  ------------------
  ------------------
  627|       |
  628|       |    /* now shift circularly right 3 bits to undo the shifting done
  629|       |    ** above.  switch left and right here.
  630|       |    */
  631|   179k|    temp = (left >> 3) | (left << 29);
  632|   179k|    left = (right >> 3) | (right << 29);
  633|   179k|    right = temp;
  634|       |
  635|   179k|    FP(left, right, temp);
  ------------------
  |  |  547|   179k|    right ^= temp = ((left >> 1) ^ right) & 0x55555555;  \
  |  |  548|   179k|    left ^= temp << 1;                                   \
  |  |  549|   179k|    right ^= temp = ((left << 8) ^ right) & 0xff00ff00;  \
  |  |  550|   179k|    left ^= temp >> 8;                                   \
  |  |  551|   179k|    right ^= temp = ((left << 2) ^ right) & 0xcccccccc;  \
  |  |  552|   179k|    left ^= temp >> 2;                                   \
  |  |  553|   179k|    right ^= temp = ((left >> 16) ^ right) & 0x0000ffff; \
  |  |  554|   179k|    left ^= temp << 16;                                  \
  |  |  555|   179k|    right ^= temp = ((left >> 4) ^ right) & 0x0f0f0f0f;  \
  |  |  556|   179k|    left ^= temp << 4;
  ------------------
  636|       |
  637|   179k|#if defined(HAVE_UNALIGNED_ACCESS)
  638|   179k|#if defined(IS_LITTLE_ENDIAN)
  639|   179k|    BYTESWAP(left, temp);
  ------------------
  |  |  358|   179k|    __asm("bswap  %0"        \
  |  |  359|   179k|          : "+r"(word));
  ------------------
  640|   179k|    BYTESWAP(right, temp);
  ------------------
  |  |  358|   179k|    __asm("bswap  %0"        \
  |  |  359|   179k|          : "+r"(word));
  ------------------
  641|   179k|#endif
  642|   179k|    HALFPTR(outbuf)
  ------------------
  |  |   18|   179k|#define HALFPTR(x) ((HALF *)(x))
  ------------------
  643|   179k|    [0] = left;
  644|   179k|    HALFPTR(outbuf)
  ------------------
  |  |   18|   179k|#define HALFPTR(x) ((HALF *)(x))
  ------------------
  645|   179k|    [1] = right;
  646|       |#else
  647|       |    if (((ptrdiff_t)outbuf & 0x03) == 0) {
  648|       |#if defined(IS_LITTLE_ENDIAN)
  649|       |        BYTESWAP(left, temp);
  650|       |        BYTESWAP(right, temp);
  651|       |#endif
  652|       |        HALFPTR(outbuf)
  653|       |        [0] = left;
  654|       |        HALFPTR(outbuf)
  655|       |        [1] = right;
  656|       |    } else {
  657|       |        outbuf[0] = (BYTE)(left >> 24);
  658|       |        outbuf[1] = (BYTE)(left >> 16);
  659|       |        outbuf[2] = (BYTE)(left >> 8);
  660|       |        outbuf[3] = (BYTE)(left);
  661|       |
  662|       |        outbuf[4] = (BYTE)(right >> 24);
  663|       |        outbuf[5] = (BYTE)(right >> 16);
  664|       |        outbuf[6] = (BYTE)(right >> 8);
  665|       |        outbuf[7] = (BYTE)(right);
  666|       |    }
  667|       |#endif
  668|   179k|}

DES_InitContext:
  146|  1.09k|{
  147|  1.09k|    DESDirection opposite;
  148|  1.09k|    if (!cx) {
  ------------------
  |  Branch (148:9): [True: 0, False: 1.09k]
  ------------------
  149|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  150|      0|        return SECFailure;
  151|      0|    }
  152|  1.09k|    cx->direction = encrypt ? DES_ENCRYPT : DES_DECRYPT;
  ------------------
  |  Branch (152:21): [True: 545, False: 545]
  ------------------
  153|  1.09k|    opposite = encrypt ? DES_DECRYPT : DES_ENCRYPT;
  ------------------
  |  Branch (153:16): [True: 545, False: 545]
  ------------------
  154|  1.09k|    switch (mode) {
  155|      0|        case NSS_DES: /* DES ECB */
  ------------------
  |  |   25|      0|#define NSS_DES 0
  ------------------
  |  Branch (155:9): [True: 0, False: 1.09k]
  ------------------
  156|      0|            DES_MakeSchedule(cx->ks0, key, cx->direction);
  157|      0|            cx->worker = &DES_ECB;
  158|      0|            break;
  159|       |
  160|      0|        case NSS_DES_EDE3: /* DES EDE ECB */
  ------------------
  |  |   27|      0|#define NSS_DES_EDE3 2
  ------------------
  |  Branch (160:9): [True: 0, False: 1.09k]
  ------------------
  161|      0|            cx->worker = &DES_EDE3_ECB;
  162|      0|            if (encrypt) {
  ------------------
  |  Branch (162:17): [True: 0, False: 0]
  ------------------
  163|      0|                DES_MakeSchedule(cx->ks0, key, cx->direction);
  164|      0|                DES_MakeSchedule(cx->ks1, key + 8, opposite);
  165|      0|                DES_MakeSchedule(cx->ks2, key + 16, cx->direction);
  166|      0|            } else {
  167|      0|                DES_MakeSchedule(cx->ks2, key, cx->direction);
  168|      0|                DES_MakeSchedule(cx->ks1, key + 8, opposite);
  169|      0|                DES_MakeSchedule(cx->ks0, key + 16, cx->direction);
  170|      0|            }
  171|      0|            break;
  172|       |
  173|     76|        case NSS_DES_CBC: /* DES CBC */
  ------------------
  |  |   26|     76|#define NSS_DES_CBC 1
  ------------------
  |  Branch (173:9): [True: 76, False: 1.01k]
  ------------------
  174|     76|            COPY8BTOHALF(cx->iv, iv);
  ------------------
  |  |   31|     76|#define COPY8BTOHALF(to, from) COPY8B(to, from, from)
  |  |  ------------------
  |  |  |  |   24|     76|    HALFPTR(to)               \
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|     76|#define HALFPTR(x) ((HALF *)(x))
  |  |  |  |  ------------------
  |  |  |  |   25|     76|    [0] = HALFPTR(from)[0];   \
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|     76|#define HALFPTR(x) ((HALF *)(x))
  |  |  |  |  ------------------
  |  |  |  |   26|     76|    HALFPTR(to)               \
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|     76|#define HALFPTR(x) ((HALF *)(x))
  |  |  |  |  ------------------
  |  |  |  |   27|     76|    [1] = HALFPTR(from)[1];
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|     76|#define HALFPTR(x) ((HALF *)(x))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  175|     76|            cx->worker = encrypt ? &DES_CBCEn : &DES_CBCDe;
  ------------------
  |  Branch (175:26): [True: 38, False: 38]
  ------------------
  176|     76|            DES_MakeSchedule(cx->ks0, key, cx->direction);
  177|     76|            break;
  178|       |
  179|  1.01k|        case NSS_DES_EDE3_CBC: /* DES EDE CBC */
  ------------------
  |  |   28|  1.01k|#define NSS_DES_EDE3_CBC 3
  ------------------
  |  Branch (179:9): [True: 1.01k, False: 76]
  ------------------
  180|  1.01k|            COPY8BTOHALF(cx->iv, iv);
  ------------------
  |  |   31|  1.01k|#define COPY8BTOHALF(to, from) COPY8B(to, from, from)
  |  |  ------------------
  |  |  |  |   24|  1.01k|    HALFPTR(to)               \
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|  1.01k|#define HALFPTR(x) ((HALF *)(x))
  |  |  |  |  ------------------
  |  |  |  |   25|  1.01k|    [0] = HALFPTR(from)[0];   \
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|  1.01k|#define HALFPTR(x) ((HALF *)(x))
  |  |  |  |  ------------------
  |  |  |  |   26|  1.01k|    HALFPTR(to)               \
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|  1.01k|#define HALFPTR(x) ((HALF *)(x))
  |  |  |  |  ------------------
  |  |  |  |   27|  1.01k|    [1] = HALFPTR(from)[1];
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|  1.01k|#define HALFPTR(x) ((HALF *)(x))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  181|  1.01k|            if (encrypt) {
  ------------------
  |  Branch (181:17): [True: 507, False: 507]
  ------------------
  182|    507|                cx->worker = &DES_EDE3CBCEn;
  183|    507|                DES_MakeSchedule(cx->ks0, key, cx->direction);
  184|    507|                DES_MakeSchedule(cx->ks1, key + 8, opposite);
  185|    507|                DES_MakeSchedule(cx->ks2, key + 16, cx->direction);
  186|    507|            } else {
  187|    507|                cx->worker = &DES_EDE3CBCDe;
  188|    507|                DES_MakeSchedule(cx->ks2, key, cx->direction);
  189|    507|                DES_MakeSchedule(cx->ks1, key + 8, opposite);
  190|    507|                DES_MakeSchedule(cx->ks0, key + 16, cx->direction);
  191|    507|            }
  192|  1.01k|            break;
  193|       |
  194|      0|        default:
  ------------------
  |  Branch (194:9): [True: 0, False: 1.09k]
  ------------------
  195|      0|            PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  196|      0|            return SECFailure;
  197|  1.09k|    }
  198|  1.09k|    return SECSuccess;
  199|  1.09k|}
DES_CreateContext:
  203|  1.09k|{
  204|  1.09k|    DESContext *cx = PORT_ZNew(DESContext);
  ------------------
  |  |  148|  1.09k|#define PORT_ZNew(type) (type *)PORT_ZAlloc(sizeof(type))
  |  |  ------------------
  |  |  |  |   72|  1.09k|#define PORT_ZAlloc PORT_ZAlloc_Util
  |  |  ------------------
  ------------------
  205|  1.09k|    SECStatus rv = DES_InitContext(cx, key, 0, iv, mode, encrypt, 0);
  206|       |
  207|  1.09k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (207:9): [True: 0, False: 1.09k]
  ------------------
  208|      0|        PORT_ZFree(cx, sizeof *cx);
  ------------------
  |  |   75|      0|#define PORT_ZFree PORT_ZFree_Util
  ------------------
  209|      0|        cx = NULL;
  210|      0|    }
  211|  1.09k|    return cx;
  212|  1.09k|}
DES_DestroyContext:
  216|  1.09k|{
  217|  1.09k|    if (cx) {
  ------------------
  |  Branch (217:9): [True: 1.09k, False: 0]
  ------------------
  218|  1.09k|        memset(cx, 0, sizeof *cx);
  219|  1.09k|        if (freeit)
  ------------------
  |  Branch (219:13): [True: 1.09k, False: 0]
  ------------------
  220|  1.09k|            PORT_Free(cx);
  ------------------
  |  |   60|  1.09k|#define PORT_Free PORT_Free_Util
  ------------------
  221|  1.09k|    }
  222|  1.09k|}
DES_Encrypt:
  227|  1.11k|{
  228|       |
  229|  1.11k|    if ((inLen % 8) != 0 || maxOutLen < inLen || !cx ||
  ------------------
  |  Branch (229:9): [True: 0, False: 1.11k]
  |  Branch (229:29): [True: 0, False: 1.11k]
  |  Branch (229:50): [True: 0, False: 1.11k]
  ------------------
  230|  1.11k|        cx->direction != DES_ENCRYPT) {
  ------------------
  |  Branch (230:9): [True: 0, False: 1.11k]
  ------------------
  231|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  232|      0|        return SECFailure;
  233|      0|    }
  234|       |
  235|  1.11k|    cx->worker(cx, out, in, inLen);
  236|  1.11k|    if (outLen)
  ------------------
  |  Branch (236:9): [True: 1.11k, False: 0]
  ------------------
  237|  1.11k|        *outLen = inLen;
  238|  1.11k|    return SECSuccess;
  239|  1.11k|}
DES_Decrypt:
  244|  12.6k|{
  245|       |
  246|  12.6k|    if ((inLen % 8) != 0 || maxOutLen < inLen || !cx ||
  ------------------
  |  Branch (246:9): [True: 0, False: 12.6k]
  |  Branch (246:29): [True: 0, False: 12.6k]
  |  Branch (246:50): [True: 0, False: 12.6k]
  ------------------
  247|  12.6k|        cx->direction != DES_DECRYPT) {
  ------------------
  |  Branch (247:9): [True: 0, False: 12.6k]
  ------------------
  248|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  249|      0|        return SECFailure;
  250|      0|    }
  251|       |
  252|  12.6k|    cx->worker(cx, out, in, inLen);
  253|  12.6k|    if (outLen)
  ------------------
  |  Branch (253:9): [True: 12.6k, False: 0]
  ------------------
  254|  12.6k|        *outLen = inLen;
  255|  12.6k|    return SECSuccess;
  256|  12.6k|}
desblapi.c:DES_CBCEn:
   60|     80|{
   61|     80|    const BYTE *bufend = in + len;
   62|     80|    HALF vec[2];
   63|       |
   64|    354|    while (in != bufend) {
  ------------------
  |  Branch (64:12): [True: 274, False: 80]
  ------------------
   65|    274|        COPY8BTOHALF(vec, in);
  ------------------
  |  |   31|    274|#define COPY8BTOHALF(to, from) COPY8B(to, from, from)
  |  |  ------------------
  |  |  |  |   24|    274|    HALFPTR(to)               \
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|    274|#define HALFPTR(x) ((HALF *)(x))
  |  |  |  |  ------------------
  |  |  |  |   25|    274|    [0] = HALFPTR(from)[0];   \
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|    274|#define HALFPTR(x) ((HALF *)(x))
  |  |  |  |  ------------------
  |  |  |  |   26|    274|    HALFPTR(to)               \
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|    274|#define HALFPTR(x) ((HALF *)(x))
  |  |  |  |  ------------------
  |  |  |  |   27|    274|    [1] = HALFPTR(from)[1];
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|    274|#define HALFPTR(x) ((HALF *)(x))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   66|    274|        in += 8;
   67|    274|        vec[0] ^= cx->iv[0];
   68|    274|        vec[1] ^= cx->iv[1];
   69|    274|        DES_Do1Block(cx->ks0, (BYTE *)vec, (BYTE *)cx->iv);
   70|    274|        COPY8BFROMHALF(out, cx->iv);
  ------------------
  |  |   32|    274|#define COPY8BFROMHALF(to, from) COPY8B(to, from, to)
  |  |  ------------------
  |  |  |  |   24|    274|    HALFPTR(to)               \
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|    274|#define HALFPTR(x) ((HALF *)(x))
  |  |  |  |  ------------------
  |  |  |  |   25|    274|    [0] = HALFPTR(from)[0];   \
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|    274|#define HALFPTR(x) ((HALF *)(x))
  |  |  |  |  ------------------
  |  |  |  |   26|    274|    HALFPTR(to)               \
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|    274|#define HALFPTR(x) ((HALF *)(x))
  |  |  |  |  ------------------
  |  |  |  |   27|    274|    [1] = HALFPTR(from)[1];
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|    274|#define HALFPTR(x) ((HALF *)(x))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   71|    274|        out += 8;
   72|    274|    }
   73|     80|}
desblapi.c:DES_CBCDe:
   77|    304|{
   78|    304|    const BYTE *bufend;
   79|    304|    HALF oldciphertext[2];
   80|    304|    HALF plaintext[2];
   81|       |
   82|  5.20k|    for (bufend = in + len; in != bufend;) {
  ------------------
  |  Branch (82:29): [True: 4.90k, False: 304]
  ------------------
   83|  4.90k|        oldciphertext[0] = cx->iv[0];
   84|  4.90k|        oldciphertext[1] = cx->iv[1];
   85|  4.90k|        COPY8BTOHALF(cx->iv, in);
  ------------------
  |  |   31|  4.90k|#define COPY8BTOHALF(to, from) COPY8B(to, from, from)
  |  |  ------------------
  |  |  |  |   24|  4.90k|    HALFPTR(to)               \
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|  4.90k|#define HALFPTR(x) ((HALF *)(x))
  |  |  |  |  ------------------
  |  |  |  |   25|  4.90k|    [0] = HALFPTR(from)[0];   \
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|  4.90k|#define HALFPTR(x) ((HALF *)(x))
  |  |  |  |  ------------------
  |  |  |  |   26|  4.90k|    HALFPTR(to)               \
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|  4.90k|#define HALFPTR(x) ((HALF *)(x))
  |  |  |  |  ------------------
  |  |  |  |   27|  4.90k|    [1] = HALFPTR(from)[1];
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|  4.90k|#define HALFPTR(x) ((HALF *)(x))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   86|  4.90k|        in += 8;
   87|  4.90k|        DES_Do1Block(cx->ks0, (BYTE *)cx->iv, (BYTE *)plaintext);
   88|  4.90k|        plaintext[0] ^= oldciphertext[0];
   89|  4.90k|        plaintext[1] ^= oldciphertext[1];
   90|  4.90k|        COPY8BFROMHALF(out, plaintext);
  ------------------
  |  |   32|  4.90k|#define COPY8BFROMHALF(to, from) COPY8B(to, from, to)
  |  |  ------------------
  |  |  |  |   24|  4.90k|    HALFPTR(to)               \
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|  4.90k|#define HALFPTR(x) ((HALF *)(x))
  |  |  |  |  ------------------
  |  |  |  |   25|  4.90k|    [0] = HALFPTR(from)[0];   \
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|  4.90k|#define HALFPTR(x) ((HALF *)(x))
  |  |  |  |  ------------------
  |  |  |  |   26|  4.90k|    HALFPTR(to)               \
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|  4.90k|#define HALFPTR(x) ((HALF *)(x))
  |  |  |  |  ------------------
  |  |  |  |   27|  4.90k|    [1] = HALFPTR(from)[1];
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|  4.90k|#define HALFPTR(x) ((HALF *)(x))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   91|  4.90k|        out += 8;
   92|  4.90k|    }
   93|    304|}
desblapi.c:DES_EDE3CBCEn:
   97|  1.03k|{
   98|  1.03k|    const BYTE *bufend = in + len;
   99|  1.03k|    HALF vec[2];
  100|       |
  101|  4.62k|    while (in != bufend) {
  ------------------
  |  Branch (101:12): [True: 3.58k, False: 1.03k]
  ------------------
  102|  3.58k|        COPY8BTOHALF(vec, in);
  ------------------
  |  |   31|  3.58k|#define COPY8BTOHALF(to, from) COPY8B(to, from, from)
  |  |  ------------------
  |  |  |  |   24|  3.58k|    HALFPTR(to)               \
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|  3.58k|#define HALFPTR(x) ((HALF *)(x))
  |  |  |  |  ------------------
  |  |  |  |   25|  3.58k|    [0] = HALFPTR(from)[0];   \
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|  3.58k|#define HALFPTR(x) ((HALF *)(x))
  |  |  |  |  ------------------
  |  |  |  |   26|  3.58k|    HALFPTR(to)               \
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|  3.58k|#define HALFPTR(x) ((HALF *)(x))
  |  |  |  |  ------------------
  |  |  |  |   27|  3.58k|    [1] = HALFPTR(from)[1];
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|  3.58k|#define HALFPTR(x) ((HALF *)(x))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  103|  3.58k|        in += 8;
  104|  3.58k|        vec[0] ^= cx->iv[0];
  105|  3.58k|        vec[1] ^= cx->iv[1];
  106|  3.58k|        DES_Do1Block(cx->ks0, (BYTE *)vec, (BYTE *)cx->iv);
  107|  3.58k|        DES_Do1Block(cx->ks1, (BYTE *)cx->iv, (BYTE *)cx->iv);
  108|  3.58k|        DES_Do1Block(cx->ks2, (BYTE *)cx->iv, (BYTE *)cx->iv);
  109|  3.58k|        COPY8BFROMHALF(out, cx->iv);
  ------------------
  |  |   32|  3.58k|#define COPY8BFROMHALF(to, from) COPY8B(to, from, to)
  |  |  ------------------
  |  |  |  |   24|  3.58k|    HALFPTR(to)               \
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|  3.58k|#define HALFPTR(x) ((HALF *)(x))
  |  |  |  |  ------------------
  |  |  |  |   25|  3.58k|    [0] = HALFPTR(from)[0];   \
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|  3.58k|#define HALFPTR(x) ((HALF *)(x))
  |  |  |  |  ------------------
  |  |  |  |   26|  3.58k|    HALFPTR(to)               \
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|  3.58k|#define HALFPTR(x) ((HALF *)(x))
  |  |  |  |  ------------------
  |  |  |  |   27|  3.58k|    [1] = HALFPTR(from)[1];
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|  3.58k|#define HALFPTR(x) ((HALF *)(x))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  110|  3.58k|        out += 8;
  111|  3.58k|    }
  112|  1.03k|}
desblapi.c:DES_EDE3CBCDe:
  116|  12.3k|{
  117|  12.3k|    const BYTE *bufend;
  118|  12.3k|    HALF oldciphertext[2];
  119|  12.3k|    HALF plaintext[2];
  120|       |
  121|  66.7k|    for (bufend = in + len; in != bufend;) {
  ------------------
  |  Branch (121:29): [True: 54.4k, False: 12.3k]
  ------------------
  122|  54.4k|        oldciphertext[0] = cx->iv[0];
  123|  54.4k|        oldciphertext[1] = cx->iv[1];
  124|  54.4k|        COPY8BTOHALF(cx->iv, in);
  ------------------
  |  |   31|  54.4k|#define COPY8BTOHALF(to, from) COPY8B(to, from, from)
  |  |  ------------------
  |  |  |  |   24|  54.4k|    HALFPTR(to)               \
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|  54.4k|#define HALFPTR(x) ((HALF *)(x))
  |  |  |  |  ------------------
  |  |  |  |   25|  54.4k|    [0] = HALFPTR(from)[0];   \
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|  54.4k|#define HALFPTR(x) ((HALF *)(x))
  |  |  |  |  ------------------
  |  |  |  |   26|  54.4k|    HALFPTR(to)               \
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|  54.4k|#define HALFPTR(x) ((HALF *)(x))
  |  |  |  |  ------------------
  |  |  |  |   27|  54.4k|    [1] = HALFPTR(from)[1];
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|  54.4k|#define HALFPTR(x) ((HALF *)(x))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  125|  54.4k|        in += 8;
  126|  54.4k|        DES_Do1Block(cx->ks0, (BYTE *)cx->iv, (BYTE *)plaintext);
  127|  54.4k|        DES_Do1Block(cx->ks1, (BYTE *)plaintext, (BYTE *)plaintext);
  128|  54.4k|        DES_Do1Block(cx->ks2, (BYTE *)plaintext, (BYTE *)plaintext);
  129|  54.4k|        plaintext[0] ^= oldciphertext[0];
  130|  54.4k|        plaintext[1] ^= oldciphertext[1];
  131|  54.4k|        COPY8BFROMHALF(out, plaintext);
  ------------------
  |  |   32|  54.4k|#define COPY8BFROMHALF(to, from) COPY8B(to, from, to)
  |  |  ------------------
  |  |  |  |   24|  54.4k|    HALFPTR(to)               \
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|  54.4k|#define HALFPTR(x) ((HALF *)(x))
  |  |  |  |  ------------------
  |  |  |  |   25|  54.4k|    [0] = HALFPTR(from)[0];   \
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|  54.4k|#define HALFPTR(x) ((HALF *)(x))
  |  |  |  |  ------------------
  |  |  |  |   26|  54.4k|    HALFPTR(to)               \
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|  54.4k|#define HALFPTR(x) ((HALF *)(x))
  |  |  |  |  ------------------
  |  |  |  |   27|  54.4k|    [1] = HALFPTR(from)[1];
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|  54.4k|#define HALFPTR(x) ((HALF *)(x))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  132|  54.4k|        out += 8;
  133|  54.4k|    }
  134|  12.3k|}

RNG_RNGInit:
   39|      1|{
   40|       |    /* Allow only one call to initialize the context */
   41|      1|    if (PR_CallOnce(&coRNGInit, rng_init) != PR_SUCCESS) {
  ------------------
  |  Branch (41:9): [True: 0, False: 1]
  ------------------
   42|      0|        return SECFailure;
   43|      0|    }
   44|       |
   45|      1|    return SECSuccess;
   46|      1|}
RNG_RandomUpdate:
   52|  9.36k|{
   53|       |    /* Check for a valid RNG lock. */
   54|  9.36k|    PORT_Assert(rng_lock != NULL);
  ------------------
  |  |  120|  9.36k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  9.36k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 9.36k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   55|  9.36k|    if (rng_lock == NULL) {
  ------------------
  |  Branch (55:9): [True: 0, False: 9.36k]
  ------------------
   56|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
   57|      0|        return SECFailure;
   58|      0|    }
   59|       |
   60|       |    /* --- LOCKED --- */
   61|  9.36k|    PZ_Lock(rng_lock);
  ------------------
  |  |  245|  9.36k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
   62|  9.36k|    memset(globalBytes, 0, GLOBAL_BYTES_SIZE);
  ------------------
  |  |   13|  9.36k|#define GLOBAL_BYTES_SIZE 100
  ------------------
   63|  9.36k|    globalNumCalls = 0;
   64|  9.36k|    if (data) {
  ------------------
  |  Branch (64:9): [True: 0, False: 9.36k]
  ------------------
   65|      0|        memcpy(globalBytes, (PRUint8 *)data, PR_MIN(bytes, GLOBAL_BYTES_SIZE));
  ------------------
  |  |  158|      0|#define PR_MIN(x,y)     ((x)<(y)?(x):(y))
  |  |  ------------------
  |  |  |  Branch (158:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   66|      0|    }
   67|  9.36k|    PZ_Unlock(rng_lock);
  ------------------
  |  |  246|  9.36k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
   68|       |    /* --- UNLOCKED --- */
   69|       |
   70|  9.36k|    return SECSuccess;
   71|  9.36k|}
RNG_GenerateGlobalRandomBytes:
   75|  36.1k|{
   76|  36.1k|    static const uint8_t key[32] = { 0 };
   77|  36.1k|    uint8_t nonce[12] = { 0 };
   78|       |
   79|       |    /* Check for a valid RNG lock. */
   80|  36.1k|    PORT_Assert(rng_lock != NULL);
  ------------------
  |  |  120|  36.1k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  36.1k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 36.1k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   81|  36.1k|    if (rng_lock == NULL) {
  ------------------
  |  Branch (81:9): [True: 0, False: 36.1k]
  ------------------
   82|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
   83|      0|        return SECFailure;
   84|      0|    }
   85|       |
   86|       |    /* --- LOCKED --- */
   87|  36.1k|    PZ_Lock(rng_lock);
  ------------------
  |  |  245|  36.1k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
   88|       |
   89|  36.1k|    memcpy(nonce, &globalNumCalls, sizeof(globalNumCalls));
   90|  36.1k|    globalNumCalls++;
   91|       |
   92|  36.1k|    ChaCha20Poly1305Context *cx =
   93|  36.1k|        ChaCha20Poly1305_CreateContext(key, sizeof(key), 16);
   94|  36.1k|    if (!cx) {
  ------------------
  |  Branch (94:9): [True: 0, False: 36.1k]
  ------------------
   95|      0|        PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
   96|      0|        PZ_Unlock(rng_lock);
  ------------------
  |  |  246|      0|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
   97|      0|        return SECFailure;
   98|      0|    }
   99|       |
  100|  36.1k|    memset(dest, 0, len);
  101|  36.1k|    memcpy(dest, globalBytes, PR_MIN(len, GLOBAL_BYTES_SIZE));
  ------------------
  |  |  158|  36.1k|#define PR_MIN(x,y)     ((x)<(y)?(x):(y))
  |  |  ------------------
  |  |  |  Branch (158:26): [True: 34.8k, False: 1.26k]
  |  |  ------------------
  ------------------
  102|  36.1k|    Hacl_Chacha20_chacha20_encrypt(len, (uint8_t *)dest, (uint8_t *)dest,
  103|  36.1k|                                   (uint8_t *)key, nonce, 0);
  104|  36.1k|    ChaCha20Poly1305_DestroyContext(cx, PR_TRUE);
  ------------------
  |  |  437|  36.1k|#define PR_TRUE 1
  ------------------
  105|       |
  106|  36.1k|    PZ_Unlock(rng_lock);
  ------------------
  |  |  246|  36.1k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  107|       |    /* --- UNLOCKED --- */
  108|       |
  109|  36.1k|    return SECSuccess;
  110|  36.1k|}
RNG_RNGShutdown:
  114|      1|{
  115|      1|    if (rng_lock) {
  ------------------
  |  Branch (115:9): [True: 1, False: 0]
  ------------------
  116|      1|        PZ_DestroyLock(rng_lock);
  ------------------
  |  |  244|      1|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
  117|      1|        rng_lock = NULL;
  118|      1|    }
  119|      1|    coRNGInit = pristineCallOnce;
  120|      1|}
det_rng.c:rng_init:
   22|      1|{
   23|      1|    rng_lock = PZ_NewLock(nssILockOther);
  ------------------
  |  |  243|      1|#define PZ_NewLock(t) PR_NewLock()
  ------------------
   24|      1|    if (!rng_lock) {
  ------------------
  |  Branch (24:9): [True: 0, False: 1]
  ------------------
   25|      0|        PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
   26|      0|        return PR_FAILURE;
   27|      0|    }
   28|       |    /* --- LOCKED --- */
   29|      1|    PZ_Lock(rng_lock);
  ------------------
  |  |  245|      1|#define PZ_Lock(k) PR_Lock((k))
  ------------------
   30|      1|    memset(globalBytes, 0, GLOBAL_BYTES_SIZE);
  ------------------
  |  |   13|      1|#define GLOBAL_BYTES_SIZE 100
  ------------------
   31|      1|    PZ_Unlock(rng_lock);
  ------------------
  |  |  246|      1|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
   32|       |    /* --- UNLOCKED --- */
   33|       |
   34|      1|    return PR_SUCCESS;
   35|      1|}

DH_NewKey:
  137|  1.13k|{
  138|  1.13k|    PLArenaPool *arena;
  139|  1.13k|    DHPrivateKey *key;
  140|  1.13k|    mp_int g, xa, p, Ya;
  141|  1.13k|    mp_err err = MP_OKAY;
  ------------------
  |  |   39|  1.13k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  142|  1.13k|    SECStatus rv = SECSuccess;
  143|  1.13k|    if (!params || !privKey) {
  ------------------
  |  Branch (143:9): [True: 0, False: 1.13k]
  |  Branch (143:20): [True: 0, False: 1.13k]
  ------------------
  144|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  145|      0|        return SECFailure;
  146|      0|    }
  147|  1.13k|    arena = PORT_NewArena(NSS_FREEBL_DEFAULT_CHUNKSIZE);
  ------------------
  |  |   63|  1.13k|#define PORT_NewArena PORT_NewArena_Util
  ------------------
                  arena = PORT_NewArena(NSS_FREEBL_DEFAULT_CHUNKSIZE);
  ------------------
  |  |  143|  1.13k|#define NSS_FREEBL_DEFAULT_CHUNKSIZE 2048
  ------------------
  148|  1.13k|    if (!arena) {
  ------------------
  |  Branch (148:9): [True: 0, False: 1.13k]
  ------------------
  149|      0|        PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  150|      0|        return SECFailure;
  151|      0|    }
  152|  1.13k|    key = (DHPrivateKey *)PORT_ArenaZAlloc(arena, sizeof(DHPrivateKey));
  ------------------
  |  |   59|  1.13k|#define PORT_ArenaZAlloc PORT_ArenaZAlloc_Util
  ------------------
  153|  1.13k|    if (!key) {
  ------------------
  |  Branch (153:9): [True: 0, False: 1.13k]
  ------------------
  154|      0|        PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  155|      0|        PORT_FreeArena(arena, PR_TRUE);
  ------------------
  |  |   61|      0|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                      PORT_FreeArena(arena, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  156|      0|        return SECFailure;
  157|      0|    }
  158|  1.13k|    key->arena = arena;
  159|  1.13k|    MP_DIGITS(&g) = 0;
  ------------------
  |  |  152|  1.13k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
  160|  1.13k|    MP_DIGITS(&xa) = 0;
  ------------------
  |  |  152|  1.13k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
  161|  1.13k|    MP_DIGITS(&p) = 0;
  ------------------
  |  |  152|  1.13k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
  162|  1.13k|    MP_DIGITS(&Ya) = 0;
  ------------------
  |  |  152|  1.13k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
  163|  1.13k|    CHECK_MPI_OK(mp_init(&g));
  ------------------
  |  |   12|  1.13k|    if (MP_OKAY > (err = func)) \
  |  |  ------------------
  |  |  |  |   39|  1.13k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (12:9): [True: 0, False: 1.13k]
  |  |  ------------------
  |  |   13|  1.13k|    goto cleanup
  ------------------
  164|  1.13k|    CHECK_MPI_OK(mp_init(&xa));
  ------------------
  |  |   12|  1.13k|    if (MP_OKAY > (err = func)) \
  |  |  ------------------
  |  |  |  |   39|  1.13k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (12:9): [True: 0, False: 1.13k]
  |  |  ------------------
  |  |   13|  1.13k|    goto cleanup
  ------------------
  165|  1.13k|    CHECK_MPI_OK(mp_init(&p));
  ------------------
  |  |   12|  1.13k|    if (MP_OKAY > (err = func)) \
  |  |  ------------------
  |  |  |  |   39|  1.13k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (12:9): [True: 0, False: 1.13k]
  |  |  ------------------
  |  |   13|  1.13k|    goto cleanup
  ------------------
  166|  1.13k|    CHECK_MPI_OK(mp_init(&Ya));
  ------------------
  |  |   12|  1.13k|    if (MP_OKAY > (err = func)) \
  |  |  ------------------
  |  |  |  |   39|  1.13k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (12:9): [True: 0, False: 1.13k]
  |  |  ------------------
  |  |   13|  1.13k|    goto cleanup
  ------------------
  167|       |    /* Set private key's p */
  168|  1.13k|    CHECK_SEC_OK(SECITEM_CopyItem(arena, &key->prime, &params->prime));
  ------------------
  |  |    8|  1.13k|    if (SECSuccess != (rv = func)) \
  |  |  ------------------
  |  |  |  Branch (8:9): [True: 0, False: 1.13k]
  |  |  ------------------
  |  |    9|  1.13k|    goto cleanup
  ------------------
  169|  1.13k|    SECITEM_TO_MPINT(key->prime, &p);
  ------------------
  |  |   19|  1.13k|    CHECK_MPI_OK(mp_read_unsigned_octets((mp), (it).data, (it).len))
  |  |  ------------------
  |  |  |  |   12|  1.13k|    if (MP_OKAY > (err = func)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|  1.13k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (12:9): [True: 0, False: 1.13k]
  |  |  |  |  ------------------
  |  |  |  |   13|  1.13k|    goto cleanup
  |  |  ------------------
  ------------------
  170|       |    /* Set private key's g */
  171|  1.13k|    CHECK_SEC_OK(SECITEM_CopyItem(arena, &key->base, &params->base));
  ------------------
  |  |    8|  1.13k|    if (SECSuccess != (rv = func)) \
  |  |  ------------------
  |  |  |  Branch (8:9): [True: 0, False: 1.13k]
  |  |  ------------------
  |  |    9|  1.13k|    goto cleanup
  ------------------
  172|  1.13k|    SECITEM_TO_MPINT(key->base, &g);
  ------------------
  |  |   19|  1.13k|    CHECK_MPI_OK(mp_read_unsigned_octets((mp), (it).data, (it).len))
  |  |  ------------------
  |  |  |  |   12|  1.13k|    if (MP_OKAY > (err = func)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|  1.13k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (12:9): [True: 0, False: 1.13k]
  |  |  |  |  ------------------
  |  |  |  |   13|  1.13k|    goto cleanup
  |  |  ------------------
  ------------------
  173|       |    /* Generate private key xa */
  174|  1.13k|    SECITEM_AllocItem(arena, &key->privateValue,
  ------------------
  |  |  103|  1.13k|#define SECITEM_AllocItem SECITEM_AllocItem_Util
  ------------------
  175|  1.13k|                      dh_GetSecretKeyLen(params->prime.len));
  176|  1.13k|    CHECK_SEC_OK(RNG_GenerateGlobalRandomBytes(key->privateValue.data,
  ------------------
  |  |    8|  1.13k|    if (SECSuccess != (rv = func)) \
  |  |  ------------------
  |  |  |  Branch (8:9): [True: 0, False: 1.13k]
  |  |  ------------------
  |  |    9|  1.13k|    goto cleanup
  ------------------
  177|  1.13k|                                               key->privateValue.len));
  178|  1.13k|    SECITEM_TO_MPINT(key->privateValue, &xa);
  ------------------
  |  |   19|  1.13k|    CHECK_MPI_OK(mp_read_unsigned_octets((mp), (it).data, (it).len))
  |  |  ------------------
  |  |  |  |   12|  1.13k|    if (MP_OKAY > (err = func)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|  1.13k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (12:9): [True: 0, False: 1.13k]
  |  |  |  |  ------------------
  |  |  |  |   13|  1.13k|    goto cleanup
  |  |  ------------------
  ------------------
  179|       |    /* xa < p */
  180|  1.13k|    CHECK_MPI_OK(mp_mod(&xa, &p, &xa));
  ------------------
  |  |   12|  1.13k|    if (MP_OKAY > (err = func)) \
  |  |  ------------------
  |  |  |  |   39|  1.13k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (12:9): [True: 0, False: 1.13k]
  |  |  ------------------
  |  |   13|  1.13k|    goto cleanup
  ------------------
  181|       |    /* Compute public key Ya = g ** xa mod p */
  182|  1.13k|    CHECK_MPI_OK(mp_exptmod(&g, &xa, &p, &Ya));
  ------------------
  |  |   12|  1.13k|    if (MP_OKAY > (err = func)) \
  |  |  ------------------
  |  |  |  |   39|  1.13k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (12:9): [True: 0, False: 1.13k]
  |  |  ------------------
  |  |   13|  1.13k|    goto cleanup
  ------------------
  183|  1.13k|    MPINT_TO_SECITEM(&Ya, &key->publicValue, key->arena);
  ------------------
  |  |   22|  1.13k|    do {                                                        \
  |  |   23|  1.13k|        int mpintLen = mp_unsigned_octet_size(mp);              \
  |  |   24|  1.13k|        if (mpintLen <= 0) {                                    \
  |  |  ------------------
  |  |  |  Branch (24:13): [True: 0, False: 1.13k]
  |  |  ------------------
  |  |   25|      0|            err = MP_RANGE;                                     \
  |  |  ------------------
  |  |  |  |   43|      0|#define MP_RANGE -3  /* argument out of range */
  |  |  ------------------
  |  |   26|      0|            goto cleanup;                                       \
  |  |   27|      0|        }                                                       \
  |  |   28|  1.13k|        SECITEM_AllocItem(arena, (it), mpintLen);               \
  |  |  ------------------
  |  |  |  |  103|  1.13k|#define SECITEM_AllocItem SECITEM_AllocItem_Util
  |  |  ------------------
  |  |   29|  1.13k|        if ((it)->data == NULL) {                               \
  |  |  ------------------
  |  |  |  Branch (29:13): [True: 0, False: 1.13k]
  |  |  ------------------
  |  |   30|      0|            err = MP_MEM;                                       \
  |  |  ------------------
  |  |  |  |   42|      0|#define MP_MEM -2    /* out of memory         */
  |  |  ------------------
  |  |   31|      0|            goto cleanup;                                       \
  |  |   32|      0|        }                                                       \
  |  |   33|  1.13k|        err = mp_to_unsigned_octets(mp, (it)->data, (it)->len); \
  |  |   34|  1.13k|        if (err < 0)                                            \
  |  |  ------------------
  |  |  |  Branch (34:13): [True: 0, False: 1.13k]
  |  |  ------------------
  |  |   35|  1.13k|            goto cleanup;                                       \
  |  |   36|  1.13k|        else                                                    \
  |  |   37|  1.13k|            err = MP_OKAY;                                      \
  |  |  ------------------
  |  |  |  |   39|  1.13k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |   38|  1.13k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (38:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  184|  1.13k|    *privKey = key;
  185|  1.13k|cleanup:
  186|  1.13k|    mp_clear(&g);
  187|  1.13k|    mp_clear(&xa);
  188|  1.13k|    mp_clear(&p);
  189|  1.13k|    mp_clear(&Ya);
  190|  1.13k|    if (err) {
  ------------------
  |  Branch (190:9): [True: 0, False: 1.13k]
  ------------------
  191|      0|        MP_TO_SEC_ERROR(err);
  ------------------
  |  |   41|      0|    switch (err) {                                    \
  |  |   42|      0|        case MP_MEM:                                  \
  |  |  ------------------
  |  |  |  |   42|      0|#define MP_MEM -2    /* out of memory         */
  |  |  ------------------
  |  |  |  Branch (42:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   43|      0|            PORT_SetError(SEC_ERROR_NO_MEMORY);       \
  |  |  ------------------
  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  ------------------
  |  |   44|      0|            break;                                    \
  |  |   45|      0|        case MP_RANGE:                                \
  |  |  ------------------
  |  |  |  |   43|      0|#define MP_RANGE -3  /* argument out of range */
  |  |  ------------------
  |  |  |  Branch (45:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   46|      0|            PORT_SetError(SEC_ERROR_BAD_DATA);        \
  |  |  ------------------
  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  ------------------
  |  |   47|      0|            break;                                    \
  |  |   48|      0|        case MP_BADARG:                               \
  |  |  ------------------
  |  |  |  |   44|      0|#define MP_BADARG -4 /* invalid parameter     */
  |  |  ------------------
  |  |  |  Branch (48:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|            PORT_SetError(SEC_ERROR_INVALID_ARGS);    \
  |  |  ------------------
  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  ------------------
  |  |   50|      0|            break;                                    \
  |  |   51|      0|        default:                                      \
  |  |  ------------------
  |  |  |  Branch (51:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   52|      0|            PORT_SetError(SEC_ERROR_LIBRARY_FAILURE); \
  |  |  ------------------
  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  ------------------
  |  |   53|      0|            break;                                    \
  |  |   54|      0|    }
  ------------------
  192|      0|        rv = SECFailure;
  193|      0|    }
  194|  1.13k|    if (rv) {
  ------------------
  |  Branch (194:9): [True: 0, False: 1.13k]
  ------------------
  195|      0|        *privKey = NULL;
  196|      0|        PORT_FreeArena(arena, PR_TRUE);
  ------------------
  |  |   61|      0|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                      PORT_FreeArena(arena, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  197|      0|    }
  198|  1.13k|    return rv;
  199|  1.13k|}
DH_Derive:
  207|  2.07k|{
  208|  2.07k|    mp_int p, Xa, Yb, ZZ, psub1;
  209|  2.07k|    mp_err err = MP_OKAY;
  ------------------
  |  |   39|  2.07k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  210|  2.07k|    unsigned int len = 0;
  211|  2.07k|    unsigned int nb;
  212|  2.07k|    unsigned char *secret = NULL;
  213|  2.07k|    if (!publicValue || !publicValue->len || !prime || !prime->len ||
  ------------------
  |  Branch (213:9): [True: 0, False: 2.07k]
  |  Branch (213:25): [True: 0, False: 2.07k]
  |  Branch (213:46): [True: 0, False: 2.07k]
  |  Branch (213:56): [True: 0, False: 2.07k]
  ------------------
  214|  2.07k|        !privateValue || !privateValue->len || !derivedSecret) {
  ------------------
  |  Branch (214:9): [True: 0, False: 2.07k]
  |  Branch (214:26): [True: 0, False: 2.07k]
  |  Branch (214:48): [True: 0, False: 2.07k]
  ------------------
  215|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  216|      0|        return SECFailure;
  217|      0|    }
  218|  2.07k|    memset(derivedSecret, 0, sizeof *derivedSecret);
  219|  2.07k|    MP_DIGITS(&p) = 0;
  ------------------
  |  |  152|  2.07k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
  220|  2.07k|    MP_DIGITS(&Xa) = 0;
  ------------------
  |  |  152|  2.07k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
  221|  2.07k|    MP_DIGITS(&Yb) = 0;
  ------------------
  |  |  152|  2.07k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
  222|  2.07k|    MP_DIGITS(&ZZ) = 0;
  ------------------
  |  |  152|  2.07k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
  223|  2.07k|    MP_DIGITS(&psub1) = 0;
  ------------------
  |  |  152|  2.07k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
  224|  2.07k|    CHECK_MPI_OK(mp_init(&p));
  ------------------
  |  |   12|  2.07k|    if (MP_OKAY > (err = func)) \
  |  |  ------------------
  |  |  |  |   39|  2.07k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (12:9): [True: 0, False: 2.07k]
  |  |  ------------------
  |  |   13|  2.07k|    goto cleanup
  ------------------
  225|  2.07k|    CHECK_MPI_OK(mp_init(&Xa));
  ------------------
  |  |   12|  2.07k|    if (MP_OKAY > (err = func)) \
  |  |  ------------------
  |  |  |  |   39|  2.07k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (12:9): [True: 0, False: 2.07k]
  |  |  ------------------
  |  |   13|  2.07k|    goto cleanup
  ------------------
  226|  2.07k|    CHECK_MPI_OK(mp_init(&Yb));
  ------------------
  |  |   12|  2.07k|    if (MP_OKAY > (err = func)) \
  |  |  ------------------
  |  |  |  |   39|  2.07k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (12:9): [True: 0, False: 2.07k]
  |  |  ------------------
  |  |   13|  2.07k|    goto cleanup
  ------------------
  227|  2.07k|    CHECK_MPI_OK(mp_init(&ZZ));
  ------------------
  |  |   12|  2.07k|    if (MP_OKAY > (err = func)) \
  |  |  ------------------
  |  |  |  |   39|  2.07k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (12:9): [True: 0, False: 2.07k]
  |  |  ------------------
  |  |   13|  2.07k|    goto cleanup
  ------------------
  228|  2.07k|    CHECK_MPI_OK(mp_init(&psub1));
  ------------------
  |  |   12|  2.07k|    if (MP_OKAY > (err = func)) \
  |  |  ------------------
  |  |  |  |   39|  2.07k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (12:9): [True: 0, False: 2.07k]
  |  |  ------------------
  |  |   13|  2.07k|    goto cleanup
  ------------------
  229|  2.07k|    SECITEM_TO_MPINT(*publicValue, &Yb);
  ------------------
  |  |   19|  2.07k|    CHECK_MPI_OK(mp_read_unsigned_octets((mp), (it).data, (it).len))
  |  |  ------------------
  |  |  |  |   12|  2.07k|    if (MP_OKAY > (err = func)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|  2.07k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (12:9): [True: 0, False: 2.07k]
  |  |  |  |  ------------------
  |  |  |  |   13|  2.07k|    goto cleanup
  |  |  ------------------
  ------------------
  230|  2.07k|    SECITEM_TO_MPINT(*privateValue, &Xa);
  ------------------
  |  |   19|  2.07k|    CHECK_MPI_OK(mp_read_unsigned_octets((mp), (it).data, (it).len))
  |  |  ------------------
  |  |  |  |   12|  2.07k|    if (MP_OKAY > (err = func)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|  2.07k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (12:9): [True: 0, False: 2.07k]
  |  |  |  |  ------------------
  |  |  |  |   13|  2.07k|    goto cleanup
  |  |  ------------------
  ------------------
  231|  2.07k|    SECITEM_TO_MPINT(*prime, &p);
  ------------------
  |  |   19|  2.07k|    CHECK_MPI_OK(mp_read_unsigned_octets((mp), (it).data, (it).len))
  |  |  ------------------
  |  |  |  |   12|  2.07k|    if (MP_OKAY > (err = func)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|  2.07k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (12:9): [True: 0, False: 2.07k]
  |  |  |  |  ------------------
  |  |  |  |   13|  2.07k|    goto cleanup
  |  |  ------------------
  ------------------
  232|  2.07k|    CHECK_MPI_OK(mp_sub_d(&p, 1, &psub1));
  ------------------
  |  |   12|  2.07k|    if (MP_OKAY > (err = func)) \
  |  |  ------------------
  |  |  |  |   39|  2.07k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (12:9): [True: 0, False: 2.07k]
  |  |  ------------------
  |  |   13|  2.07k|    goto cleanup
  ------------------
  233|       |
  234|       |    /* We assume that the modulus, p, is a safe prime. That is, p = 2q+1 where
  235|       |     * q is also a prime. Thus the orders of the subgroups are factors of 2q:
  236|       |     * namely 1, 2, q and 2q.
  237|       |     *
  238|       |     * We check that the peer's public value isn't zero (which isn't in the
  239|       |     * group), one (subgroup of order one) or p-1 (subgroup of order 2). We
  240|       |     * also check that the public value is less than p, to avoid being fooled
  241|       |     * by values like p+1 or 2*p-1.
  242|       |     *
  243|       |     * Thus we must be operating in the subgroup of size q or 2q. */
  244|  2.07k|    if (mp_cmp_d(&Yb, 1) <= 0 ||
  ------------------
  |  Branch (244:9): [True: 0, False: 2.07k]
  ------------------
  245|  2.07k|        mp_cmp(&Yb, &psub1) >= 0) {
  ------------------
  |  Branch (245:9): [True: 0, False: 2.07k]
  ------------------
  246|      0|        err = MP_BADARG;
  ------------------
  |  |   44|      0|#define MP_BADARG -4 /* invalid parameter     */
  ------------------
  247|      0|        goto cleanup;
  248|      0|    }
  249|       |
  250|       |    /* ZZ = (Yb)**Xa mod p */
  251|  2.07k|    CHECK_MPI_OK(mp_exptmod(&Yb, &Xa, &p, &ZZ));
  ------------------
  |  |   12|  2.07k|    if (MP_OKAY > (err = func)) \
  |  |  ------------------
  |  |  |  |   39|  2.07k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (12:9): [True: 0, False: 2.07k]
  |  |  ------------------
  |  |   13|  2.07k|    goto cleanup
  ------------------
  252|       |    /* number of bytes in the derived secret */
  253|  2.07k|    len = mp_unsigned_octet_size(&ZZ);
  254|  2.07k|    if (len <= 0) {
  ------------------
  |  Branch (254:9): [True: 0, False: 2.07k]
  ------------------
  255|      0|        err = MP_BADARG;
  ------------------
  |  |   44|      0|#define MP_BADARG -4 /* invalid parameter     */
  ------------------
  256|      0|        goto cleanup;
  257|      0|    }
  258|       |
  259|       |    /*
  260|       |     * We check to make sure that ZZ is not equal to 0, 1 or -1 mod p.
  261|       |     * This helps guard against small subgroup attacks, since an attacker
  262|       |     * using a subgroup of size N will produce 0, 1 or -1 with probability 1/N.
  263|       |     * When the protocol is executed within a properly large subgroup, the
  264|       |     * probability of this result will be negligibly small.  For example,
  265|       |     * with a safe prime of the form 2q+1, the probability will be 1/q.
  266|       |     *
  267|       |     * We return MP_BADARG because this is probably the result of a bad
  268|       |     * public value or a bad prime having been provided.
  269|       |     */
  270|  2.07k|    if (mp_cmp_d(&ZZ, 0) == 0 || mp_cmp_d(&ZZ, 1) == 0 ||
  ------------------
  |  Branch (270:9): [True: 0, False: 2.07k]
  |  Branch (270:34): [True: 0, False: 2.07k]
  ------------------
  271|  2.07k|        mp_cmp(&ZZ, &psub1) == 0) {
  ------------------
  |  Branch (271:9): [True: 0, False: 2.07k]
  ------------------
  272|      0|        err = MP_BADARG;
  ------------------
  |  |   44|      0|#define MP_BADARG -4 /* invalid parameter     */
  ------------------
  273|      0|        goto cleanup;
  274|      0|    }
  275|       |
  276|       |    /* allocate a buffer which can hold the entire derived secret. */
  277|  2.07k|    secret = PORT_Alloc(len);
  ------------------
  |  |   52|  2.07k|#define PORT_Alloc PORT_Alloc_Util
  ------------------
  278|  2.07k|    if (secret == NULL) {
  ------------------
  |  Branch (278:9): [True: 0, False: 2.07k]
  ------------------
  279|      0|        err = MP_MEM;
  ------------------
  |  |   42|      0|#define MP_MEM -2    /* out of memory         */
  ------------------
  280|      0|        goto cleanup;
  281|      0|    }
  282|       |    /* grab the derived secret */
  283|  2.07k|    err = mp_to_unsigned_octets(&ZZ, secret, len);
  284|  2.07k|    if (err >= 0)
  ------------------
  |  Branch (284:9): [True: 2.07k, False: 0]
  ------------------
  285|  2.07k|        err = MP_OKAY;
  ------------------
  |  |   39|  2.07k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  286|       |    /*
  287|       |    ** if outBytes is 0 take all of the bytes from the derived secret.
  288|       |    ** if outBytes is not 0 take exactly outBytes from the derived secret, zero
  289|       |    ** pad at the beginning if necessary, and truncate beginning bytes
  290|       |    ** if necessary.
  291|       |    */
  292|  2.07k|    if (outBytes > 0)
  ------------------
  |  Branch (292:9): [True: 940, False: 1.13k]
  ------------------
  293|    940|        nb = outBytes;
  294|  1.13k|    else
  295|  1.13k|        nb = len;
  296|  2.07k|    if (SECITEM_AllocItem(NULL, derivedSecret, nb) == NULL) {
  ------------------
  |  |  103|  2.07k|#define SECITEM_AllocItem SECITEM_AllocItem_Util
  ------------------
  |  Branch (296:9): [True: 0, False: 2.07k]
  ------------------
  297|      0|        err = MP_MEM;
  ------------------
  |  |   42|      0|#define MP_MEM -2    /* out of memory         */
  ------------------
  298|      0|        goto cleanup;
  299|      0|    }
  300|  2.07k|    if (len < nb) {
  ------------------
  |  Branch (300:9): [True: 8, False: 2.06k]
  ------------------
  301|      8|        unsigned int offset = nb - len;
  302|      8|        memset(derivedSecret->data, 0, offset);
  303|      8|        memcpy(derivedSecret->data + offset, secret, len);
  304|  2.06k|    } else {
  305|  2.06k|        memcpy(derivedSecret->data, secret + len - nb, nb);
  306|  2.06k|    }
  307|  2.07k|cleanup:
  308|  2.07k|    mp_clear(&p);
  309|  2.07k|    mp_clear(&Xa);
  310|  2.07k|    mp_clear(&Yb);
  311|  2.07k|    mp_clear(&ZZ);
  312|  2.07k|    mp_clear(&psub1);
  313|  2.07k|    if (secret) {
  ------------------
  |  Branch (313:9): [True: 2.07k, False: 0]
  ------------------
  314|       |        /* free the buffer allocated for the full secret. */
  315|  2.07k|        PORT_ZFree(secret, len);
  ------------------
  |  |   75|  2.07k|#define PORT_ZFree PORT_ZFree_Util
  ------------------
  316|  2.07k|    }
  317|  2.07k|    if (err) {
  ------------------
  |  Branch (317:9): [True: 0, False: 2.07k]
  ------------------
  318|      0|        MP_TO_SEC_ERROR(err);
  ------------------
  |  |   41|      0|    switch (err) {                                    \
  |  |   42|      0|        case MP_MEM:                                  \
  |  |  ------------------
  |  |  |  |   42|      0|#define MP_MEM -2    /* out of memory         */
  |  |  ------------------
  |  |  |  Branch (42:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   43|      0|            PORT_SetError(SEC_ERROR_NO_MEMORY);       \
  |  |  ------------------
  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  ------------------
  |  |   44|      0|            break;                                    \
  |  |   45|      0|        case MP_RANGE:                                \
  |  |  ------------------
  |  |  |  |   43|      0|#define MP_RANGE -3  /* argument out of range */
  |  |  ------------------
  |  |  |  Branch (45:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   46|      0|            PORT_SetError(SEC_ERROR_BAD_DATA);        \
  |  |  ------------------
  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  ------------------
  |  |   47|      0|            break;                                    \
  |  |   48|      0|        case MP_BADARG:                               \
  |  |  ------------------
  |  |  |  |   44|      0|#define MP_BADARG -4 /* invalid parameter     */
  |  |  ------------------
  |  |  |  Branch (48:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|            PORT_SetError(SEC_ERROR_INVALID_ARGS);    \
  |  |  ------------------
  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  ------------------
  |  |   50|      0|            break;                                    \
  |  |   51|      0|        default:                                      \
  |  |  ------------------
  |  |  |  Branch (51:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   52|      0|            PORT_SetError(SEC_ERROR_LIBRARY_FAILURE); \
  |  |  ------------------
  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  ------------------
  |  |   53|      0|            break;                                    \
  |  |   54|      0|    }
  ------------------
  319|      0|        if (derivedSecret->data)
  ------------------
  |  Branch (319:13): [True: 0, False: 0]
  ------------------
  320|      0|            PORT_ZFree(derivedSecret->data, derivedSecret->len);
  ------------------
  |  |   75|      0|#define PORT_ZFree PORT_ZFree_Util
  ------------------
  321|      0|        return SECFailure;
  322|      0|    }
  323|  2.07k|    return SECSuccess;
  324|  2.07k|}
dh.c:dh_GetSecretKeyLen:
   27|  1.13k|{
   28|       |    /* Based on Table 2 in NIST SP 800-57. */
   29|  1.13k|    if (primeLen >= 1920) { /* 15360 bits */
  ------------------
  |  Branch (29:9): [True: 0, False: 1.13k]
  ------------------
   30|      0|        return 64;          /* 512 bits */
   31|      0|    }
   32|  1.13k|    if (primeLen >= 960) { /* 7680 bits */
  ------------------
  |  Branch (32:9): [True: 481, False: 649]
  ------------------
   33|    481|        return 48;         /* 384 bits */
   34|    481|    }
   35|    649|    if (primeLen >= 384) { /* 3072 bits */
  ------------------
  |  Branch (35:9): [True: 81, False: 568]
  ------------------
   36|     81|        return 32;         /* 256 bits */
   37|     81|    }
   38|    568|    if (primeLen >= 256) { /* 2048 bits */
  ------------------
  |  Branch (38:9): [True: 568, False: 0]
  ------------------
   39|    568|        return 28;         /* 224 bits */
   40|    568|    }
   41|      0|    return 20; /* 160 bits */
   42|    568|}

DSA_VerifyDigest:
  558|  1.13k|{
  559|       |    /* FIPS-compliance dictates that digest is a SHA hash. */
  560|  1.13k|    mp_int p, q, g;      /* PQG parameters */
  561|  1.13k|    mp_int r_, s_;       /* tuple (r', s') is received signature) */
  562|  1.13k|    mp_int u1, u2, v, w; /* intermediate values used in verification */
  563|  1.13k|    mp_int y;            /* public key */
  564|  1.13k|    mp_err err;
  565|  1.13k|    unsigned int dsa_subprime_len, dsa_signature_len, offset;
  566|  1.13k|    SECItem localDigest;
  567|  1.13k|    unsigned char localDigestData[DSA_MAX_SUBPRIME_LEN];
  568|  1.13k|    SECStatus verified = SECFailure;
  569|       |
  570|       |    /* Check args. */
  571|  1.13k|    if (!key || !signature || !digest) {
  ------------------
  |  Branch (571:9): [True: 0, False: 1.13k]
  |  Branch (571:17): [True: 0, False: 1.13k]
  |  Branch (571:31): [True: 0, False: 1.13k]
  ------------------
  572|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  573|      0|        return SECFailure;
  574|      0|    }
  575|       |
  576|  1.13k|    dsa_subprime_len = PQG_GetLength(&key->params.subPrime);
  577|  1.13k|    dsa_signature_len = dsa_subprime_len * 2;
  578|  1.13k|    if ((signature->len != dsa_signature_len) ||
  ------------------
  |  Branch (578:9): [True: 0, False: 1.13k]
  ------------------
  579|  1.13k|        (digest->len > HASH_LENGTH_MAX) ||
  ------------------
  |  |   48|  1.13k|#define HASH_LENGTH_MAX SHA512_LENGTH
  |  |  ------------------
  |  |  |  |   43|  1.13k|#define SHA512_LENGTH 64
  |  |  ------------------
  ------------------
  |  Branch (579:9): [True: 0, False: 1.13k]
  ------------------
  580|  1.13k|        (digest->len < SHA1_LENGTH)) {
  ------------------
  |  |   39|  1.13k|#define SHA1_LENGTH 20
  ------------------
  |  Branch (580:9): [True: 0, False: 1.13k]
  ------------------
  581|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  582|      0|        return SECFailure;
  583|      0|    }
  584|       |
  585|       |    /* DSA accepts digests not equal to dsa_subprime_len, if the
  586|       |     * digests are greater, than they are truncated to the size of
  587|       |     * dsa_subprime_len, using the left most bits. If they are less
  588|       |     * then they are padded on the left.*/
  589|  1.13k|    PORT_Memset(localDigestData, 0, dsa_subprime_len);
  ------------------
  |  |  182|  1.13k|#define PORT_Memset memset
  ------------------
  590|  1.13k|    offset = (digest->len < dsa_subprime_len) ? (dsa_subprime_len - digest->len) : 0;
  ------------------
  |  Branch (590:14): [True: 21, False: 1.11k]
  ------------------
  591|  1.13k|    PORT_Memcpy(localDigestData + offset, digest->data,
  ------------------
  |  |  180|  1.13k|#define PORT_Memcpy memcpy
  ------------------
  592|  1.13k|                dsa_subprime_len - offset);
  593|  1.13k|    localDigest.data = localDigestData;
  594|  1.13k|    localDigest.len = dsa_subprime_len;
  595|       |
  596|       |    /* Initialize MPI integers. */
  597|  1.13k|    MP_DIGITS(&p) = 0;
  ------------------
  |  |  152|  1.13k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
  598|  1.13k|    MP_DIGITS(&q) = 0;
  ------------------
  |  |  152|  1.13k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
  599|  1.13k|    MP_DIGITS(&g) = 0;
  ------------------
  |  |  152|  1.13k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
  600|  1.13k|    MP_DIGITS(&y) = 0;
  ------------------
  |  |  152|  1.13k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
  601|  1.13k|    MP_DIGITS(&r_) = 0;
  ------------------
  |  |  152|  1.13k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
  602|  1.13k|    MP_DIGITS(&s_) = 0;
  ------------------
  |  |  152|  1.13k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
  603|  1.13k|    MP_DIGITS(&u1) = 0;
  ------------------
  |  |  152|  1.13k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
  604|  1.13k|    MP_DIGITS(&u2) = 0;
  ------------------
  |  |  152|  1.13k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
  605|  1.13k|    MP_DIGITS(&v) = 0;
  ------------------
  |  |  152|  1.13k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
  606|  1.13k|    MP_DIGITS(&w) = 0;
  ------------------
  |  |  152|  1.13k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
  607|  1.13k|    CHECK_MPI_OK(mp_init(&p));
  ------------------
  |  |   12|  1.13k|    if (MP_OKAY > (err = func)) \
  |  |  ------------------
  |  |  |  |   39|  1.13k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (12:9): [True: 0, False: 1.13k]
  |  |  ------------------
  |  |   13|  1.13k|    goto cleanup
  ------------------
  608|  1.13k|    CHECK_MPI_OK(mp_init(&q));
  ------------------
  |  |   12|  1.13k|    if (MP_OKAY > (err = func)) \
  |  |  ------------------
  |  |  |  |   39|  1.13k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (12:9): [True: 0, False: 1.13k]
  |  |  ------------------
  |  |   13|  1.13k|    goto cleanup
  ------------------
  609|  1.13k|    CHECK_MPI_OK(mp_init(&g));
  ------------------
  |  |   12|  1.13k|    if (MP_OKAY > (err = func)) \
  |  |  ------------------
  |  |  |  |   39|  1.13k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (12:9): [True: 0, False: 1.13k]
  |  |  ------------------
  |  |   13|  1.13k|    goto cleanup
  ------------------
  610|  1.13k|    CHECK_MPI_OK(mp_init(&y));
  ------------------
  |  |   12|  1.13k|    if (MP_OKAY > (err = func)) \
  |  |  ------------------
  |  |  |  |   39|  1.13k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (12:9): [True: 0, False: 1.13k]
  |  |  ------------------
  |  |   13|  1.13k|    goto cleanup
  ------------------
  611|  1.13k|    CHECK_MPI_OK(mp_init(&r_));
  ------------------
  |  |   12|  1.13k|    if (MP_OKAY > (err = func)) \
  |  |  ------------------
  |  |  |  |   39|  1.13k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (12:9): [True: 0, False: 1.13k]
  |  |  ------------------
  |  |   13|  1.13k|    goto cleanup
  ------------------
  612|  1.13k|    CHECK_MPI_OK(mp_init(&s_));
  ------------------
  |  |   12|  1.13k|    if (MP_OKAY > (err = func)) \
  |  |  ------------------
  |  |  |  |   39|  1.13k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (12:9): [True: 0, False: 1.13k]
  |  |  ------------------
  |  |   13|  1.13k|    goto cleanup
  ------------------
  613|  1.13k|    CHECK_MPI_OK(mp_init(&u1));
  ------------------
  |  |   12|  1.13k|    if (MP_OKAY > (err = func)) \
  |  |  ------------------
  |  |  |  |   39|  1.13k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (12:9): [True: 0, False: 1.13k]
  |  |  ------------------
  |  |   13|  1.13k|    goto cleanup
  ------------------
  614|  1.13k|    CHECK_MPI_OK(mp_init(&u2));
  ------------------
  |  |   12|  1.13k|    if (MP_OKAY > (err = func)) \
  |  |  ------------------
  |  |  |  |   39|  1.13k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (12:9): [True: 0, False: 1.13k]
  |  |  ------------------
  |  |   13|  1.13k|    goto cleanup
  ------------------
  615|  1.13k|    CHECK_MPI_OK(mp_init(&v));
  ------------------
  |  |   12|  1.13k|    if (MP_OKAY > (err = func)) \
  |  |  ------------------
  |  |  |  |   39|  1.13k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (12:9): [True: 0, False: 1.13k]
  |  |  ------------------
  |  |   13|  1.13k|    goto cleanup
  ------------------
  616|  1.13k|    CHECK_MPI_OK(mp_init(&w));
  ------------------
  |  |   12|  1.13k|    if (MP_OKAY > (err = func)) \
  |  |  ------------------
  |  |  |  |   39|  1.13k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (12:9): [True: 0, False: 1.13k]
  |  |  ------------------
  |  |   13|  1.13k|    goto cleanup
  ------------------
  617|       |    /*
  618|       |    ** Convert stored PQG and public key into MPI integers.
  619|       |    */
  620|  1.13k|    SECITEM_TO_MPINT(key->params.prime, &p);
  ------------------
  |  |   19|  1.13k|    CHECK_MPI_OK(mp_read_unsigned_octets((mp), (it).data, (it).len))
  |  |  ------------------
  |  |  |  |   12|  1.13k|    if (MP_OKAY > (err = func)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|  1.13k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (12:9): [True: 0, False: 1.13k]
  |  |  |  |  ------------------
  |  |  |  |   13|  1.13k|    goto cleanup
  |  |  ------------------
  ------------------
  621|  1.13k|    SECITEM_TO_MPINT(key->params.subPrime, &q);
  ------------------
  |  |   19|  1.13k|    CHECK_MPI_OK(mp_read_unsigned_octets((mp), (it).data, (it).len))
  |  |  ------------------
  |  |  |  |   12|  1.13k|    if (MP_OKAY > (err = func)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|  1.13k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (12:9): [True: 0, False: 1.13k]
  |  |  |  |  ------------------
  |  |  |  |   13|  1.13k|    goto cleanup
  |  |  ------------------
  ------------------
  622|  1.13k|    SECITEM_TO_MPINT(key->params.base, &g);
  ------------------
  |  |   19|  1.13k|    CHECK_MPI_OK(mp_read_unsigned_octets((mp), (it).data, (it).len))
  |  |  ------------------
  |  |  |  |   12|  1.13k|    if (MP_OKAY > (err = func)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|  1.13k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (12:9): [True: 0, False: 1.13k]
  |  |  |  |  ------------------
  |  |  |  |   13|  1.13k|    goto cleanup
  |  |  ------------------
  ------------------
  623|  1.13k|    SECITEM_TO_MPINT(key->publicValue, &y);
  ------------------
  |  |   19|  1.13k|    CHECK_MPI_OK(mp_read_unsigned_octets((mp), (it).data, (it).len))
  |  |  ------------------
  |  |  |  |   12|  1.13k|    if (MP_OKAY > (err = func)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|  1.13k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (12:9): [True: 0, False: 1.13k]
  |  |  |  |  ------------------
  |  |  |  |   13|  1.13k|    goto cleanup
  |  |  ------------------
  ------------------
  624|       |    /*
  625|       |    ** Convert received signature (r', s') into MPI integers.
  626|       |    */
  627|  1.13k|    OCTETS_TO_MPINT(signature->data, &r_, dsa_subprime_len);
  ------------------
  |  |   16|  1.13k|    CHECK_MPI_OK(mp_read_unsigned_octets((mp), oc, len))
  |  |  ------------------
  |  |  |  |   12|  1.13k|    if (MP_OKAY > (err = func)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|  1.13k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (12:9): [True: 0, False: 1.13k]
  |  |  |  |  ------------------
  |  |  |  |   13|  1.13k|    goto cleanup
  |  |  ------------------
  ------------------
  628|  1.13k|    OCTETS_TO_MPINT(signature->data + dsa_subprime_len, &s_, dsa_subprime_len);
  ------------------
  |  |   16|  1.13k|    CHECK_MPI_OK(mp_read_unsigned_octets((mp), oc, len))
  |  |  ------------------
  |  |  |  |   12|  1.13k|    if (MP_OKAY > (err = func)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|  1.13k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (12:9): [True: 0, False: 1.13k]
  |  |  |  |  ------------------
  |  |  |  |   13|  1.13k|    goto cleanup
  |  |  ------------------
  ------------------
  629|       |    /*
  630|       |    ** Verify that 0 < r' < q and 0 < s' < q
  631|       |    */
  632|  1.13k|    if (mp_cmp_z(&r_) <= 0 || mp_cmp_z(&s_) <= 0 ||
  ------------------
  |  Branch (632:9): [True: 0, False: 1.13k]
  |  Branch (632:31): [True: 0, False: 1.13k]
  ------------------
  633|  1.13k|        mp_cmp(&r_, &q) >= 0 || mp_cmp(&s_, &q) >= 0) {
  ------------------
  |  Branch (633:9): [True: 1, False: 1.13k]
  |  Branch (633:33): [True: 2, False: 1.13k]
  ------------------
  634|       |        /* err is zero here. */
  635|      3|        PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
  ------------------
  |  |   65|      3|#define PORT_SetError PORT_SetError_Util
  ------------------
  636|      3|        goto cleanup; /* will return verified == SECFailure */
  637|      3|    }
  638|       |    /*
  639|       |    ** FIPS 186-1, Section 6, Step 1
  640|       |    **
  641|       |    ** w = (s')**-1 mod q
  642|       |    */
  643|  1.13k|    CHECK_MPI_OK(mp_invmod(&s_, &q, &w)); /* w = (s')**-1 mod q */
  ------------------
  |  |   12|  1.13k|    if (MP_OKAY > (err = func)) \
  |  |  ------------------
  |  |  |  |   39|  1.13k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (12:9): [True: 71, False: 1.06k]
  |  |  ------------------
  |  |   13|  1.13k|    goto cleanup
  ------------------
  644|       |    /*
  645|       |    ** FIPS 186-1, Section 6, Step 2
  646|       |    **
  647|       |    ** u1 = ((Hash(M')) * w) mod q
  648|       |    */
  649|  1.06k|    SECITEM_TO_MPINT(localDigest, &u1);        /* u1 = HASH(M')     */
  ------------------
  |  |   19|  1.06k|    CHECK_MPI_OK(mp_read_unsigned_octets((mp), (it).data, (it).len))
  |  |  ------------------
  |  |  |  |   12|  1.06k|    if (MP_OKAY > (err = func)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|  1.06k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (12:9): [True: 0, False: 1.06k]
  |  |  |  |  ------------------
  |  |  |  |   13|  1.06k|    goto cleanup
  |  |  ------------------
  ------------------
  650|  1.06k|    CHECK_MPI_OK(mp_mulmod(&u1, &w, &q, &u1)); /* u1 = u1 * w mod q */
  ------------------
  |  |   12|  1.06k|    if (MP_OKAY > (err = func)) \
  |  |  ------------------
  |  |  |  |   39|  1.06k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (12:9): [True: 0, False: 1.06k]
  |  |  ------------------
  |  |   13|  1.06k|    goto cleanup
  ------------------
  651|       |    /*
  652|       |    ** FIPS 186-1, Section 6, Step 3
  653|       |    **
  654|       |    ** u2 = ((r') * w) mod q
  655|       |    */
  656|  1.06k|    CHECK_MPI_OK(mp_mulmod(&r_, &w, &q, &u2));
  ------------------
  |  |   12|  1.06k|    if (MP_OKAY > (err = func)) \
  |  |  ------------------
  |  |  |  |   39|  1.06k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (12:9): [True: 0, False: 1.06k]
  |  |  ------------------
  |  |   13|  1.06k|    goto cleanup
  ------------------
  657|       |    /*
  658|       |    ** FIPS 186-1, Section 6, Step 4
  659|       |    **
  660|       |    ** v = ((g**u1 * y**u2) mod p) mod q
  661|       |    */
  662|  1.06k|    CHECK_MPI_OK(mp_exptmod(&g, &u1, &p, &g)); /* g = g**u1 mod p */
  ------------------
  |  |   12|  1.06k|    if (MP_OKAY > (err = func)) \
  |  |  ------------------
  |  |  |  |   39|  1.06k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (12:9): [True: 0, False: 1.06k]
  |  |  ------------------
  |  |   13|  1.06k|    goto cleanup
  ------------------
  663|  1.06k|    CHECK_MPI_OK(mp_exptmod(&y, &u2, &p, &y)); /* y = y**u2 mod p */
  ------------------
  |  |   12|  1.06k|    if (MP_OKAY > (err = func)) \
  |  |  ------------------
  |  |  |  |   39|  1.06k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (12:9): [True: 0, False: 1.06k]
  |  |  ------------------
  |  |   13|  1.06k|    goto cleanup
  ------------------
  664|  1.06k|    CHECK_MPI_OK(mp_mulmod(&g, &y, &p, &v));   /* v = g * y mod p */
  ------------------
  |  |   12|  1.06k|    if (MP_OKAY > (err = func)) \
  |  |  ------------------
  |  |  |  |   39|  1.06k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (12:9): [True: 0, False: 1.06k]
  |  |  ------------------
  |  |   13|  1.06k|    goto cleanup
  ------------------
  665|  1.06k|    CHECK_MPI_OK(mp_mod(&v, &q, &v));          /* v = v mod q     */
  ------------------
  |  |   12|  1.06k|    if (MP_OKAY > (err = func)) \
  |  |  ------------------
  |  |  |  |   39|  1.06k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (12:9): [True: 0, False: 1.06k]
  |  |  ------------------
  |  |   13|  1.06k|    goto cleanup
  ------------------
  666|       |    /*
  667|       |    ** Verification:  v == r'
  668|       |    */
  669|  1.06k|    if (mp_cmp(&v, &r_)) {
  ------------------
  |  Branch (669:9): [True: 1.06k, False: 0]
  ------------------
  670|  1.06k|        PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
  ------------------
  |  |   65|  1.06k|#define PORT_SetError PORT_SetError_Util
  ------------------
  671|  1.06k|        verified = SECFailure; /* Signature failed to verify. */
  672|  1.06k|    } else {
  673|      0|        verified = SECSuccess; /* Signature verified. */
  674|      0|    }
  675|  1.13k|cleanup:
  676|  1.13k|    PORT_SafeZero(localDigestData, sizeof localDigestData);
  677|  1.13k|    mp_clear(&p);
  678|  1.13k|    mp_clear(&q);
  679|  1.13k|    mp_clear(&g);
  680|  1.13k|    mp_clear(&y);
  681|  1.13k|    mp_clear(&r_);
  682|  1.13k|    mp_clear(&s_);
  683|  1.13k|    mp_clear(&u1);
  684|  1.13k|    mp_clear(&u2);
  685|  1.13k|    mp_clear(&v);
  686|  1.13k|    mp_clear(&w);
  687|  1.13k|    if (err) {
  ------------------
  |  Branch (687:9): [True: 71, False: 1.06k]
  ------------------
  688|     71|        translate_mpi_error(err);
  689|     71|    }
  690|  1.13k|    return verified;
  691|  1.06k|}
dsa.c:translate_mpi_error:
  149|     71|{
  150|     71|    MP_TO_SEC_ERROR(err);
  ------------------
  |  |   41|     71|    switch (err) {                                    \
  |  |   42|      0|        case MP_MEM:                                  \
  |  |  ------------------
  |  |  |  |   42|      0|#define MP_MEM -2    /* out of memory         */
  |  |  ------------------
  |  |  |  Branch (42:9): [True: 0, False: 71]
  |  |  ------------------
  |  |   43|      0|            PORT_SetError(SEC_ERROR_NO_MEMORY);       \
  |  |  ------------------
  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  ------------------
  |  |   44|      0|            break;                                    \
  |  |   45|      0|        case MP_RANGE:                                \
  |  |  ------------------
  |  |  |  |   43|      0|#define MP_RANGE -3  /* argument out of range */
  |  |  ------------------
  |  |  |  Branch (45:9): [True: 0, False: 71]
  |  |  ------------------
  |  |   46|      0|            PORT_SetError(SEC_ERROR_BAD_DATA);        \
  |  |  ------------------
  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  ------------------
  |  |   47|      0|            break;                                    \
  |  |   48|      0|        case MP_BADARG:                               \
  |  |  ------------------
  |  |  |  |   44|      0|#define MP_BADARG -4 /* invalid parameter     */
  |  |  ------------------
  |  |  |  Branch (48:9): [True: 0, False: 71]
  |  |  ------------------
  |  |   49|      0|            PORT_SetError(SEC_ERROR_INVALID_ARGS);    \
  |  |  ------------------
  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  ------------------
  |  |   50|      0|            break;                                    \
  |  |   51|     71|        default:                                      \
  |  |  ------------------
  |  |  |  Branch (51:9): [True: 71, False: 0]
  |  |  ------------------
  |  |   52|     71|            PORT_SetError(SEC_ERROR_LIBRARY_FAILURE); \
  |  |  ------------------
  |  |  |  |   65|     71|#define PORT_SetError PORT_SetError_Util
  |  |  ------------------
  |  |   53|     71|            break;                                    \
  |  |   54|     71|    }
  ------------------
  151|     71|}

ec_NewKey:
  104|  8.50k|{
  105|  8.50k|    SECStatus rv = SECFailure;
  106|  8.50k|    PLArenaPool *arena;
  107|  8.50k|    ECPrivateKey *key;
  108|  8.50k|    int len;
  109|       |
  110|  8.50k|    if (!ecParams || ecParams->name == ECCurve_noName ||
  ------------------
  |  Branch (110:9): [True: 0, False: 8.50k]
  |  Branch (110:22): [True: 0, False: 8.50k]
  ------------------
  111|  8.50k|        !privKey || !privKeyBytes || privKeyLen <= 0) {
  ------------------
  |  Branch (111:9): [True: 0, False: 8.50k]
  |  Branch (111:21): [True: 0, False: 8.50k]
  |  Branch (111:38): [True: 0, False: 8.50k]
  ------------------
  112|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  113|      0|        return SECFailure;
  114|      0|    }
  115|       |
  116|  8.50k|    if (ecParams->fieldID.type != ec_field_plain) {
  ------------------
  |  Branch (116:9): [True: 0, False: 8.50k]
  ------------------
  117|      0|        PORT_SetError(SEC_ERROR_UNSUPPORTED_ELLIPTIC_CURVE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  118|      0|        return SECFailure;
  119|      0|    }
  120|       |
  121|       |    /* Initialize an arena for the EC key. */
  122|  8.50k|    if (!(arena = PORT_NewArena(NSS_FREEBL_DEFAULT_CHUNKSIZE)))
  ------------------
  |  |   63|  8.50k|#define PORT_NewArena PORT_NewArena_Util
  ------------------
                  if (!(arena = PORT_NewArena(NSS_FREEBL_DEFAULT_CHUNKSIZE)))
  ------------------
  |  |  143|  8.50k|#define NSS_FREEBL_DEFAULT_CHUNKSIZE 2048
  ------------------
  |  Branch (122:9): [True: 0, False: 8.50k]
  ------------------
  123|      0|        return SECFailure;
  124|       |
  125|  8.50k|    key = (ECPrivateKey *)PORT_ArenaZAlloc(arena, sizeof(ECPrivateKey));
  ------------------
  |  |   59|  8.50k|#define PORT_ArenaZAlloc PORT_ArenaZAlloc_Util
  ------------------
  126|  8.50k|    if (!key) {
  ------------------
  |  Branch (126:9): [True: 0, False: 8.50k]
  ------------------
  127|      0|        goto cleanup;
  128|      0|    }
  129|       |
  130|       |    /* Set the version number (SEC 1 section C.4 says it should be 1) */
  131|  8.50k|    SECITEM_AllocItem(arena, &key->version, 1);
  ------------------
  |  |  103|  8.50k|#define SECITEM_AllocItem SECITEM_AllocItem_Util
  ------------------
  132|  8.50k|    key->version.data[0] = 1;
  133|       |
  134|       |    /* Copy all of the fields from the ECParams argument to the
  135|       |     * ECParams structure within the private key.
  136|       |     */
  137|  8.50k|    key->ecParams.arena = arena;
  138|  8.50k|    key->ecParams.type = ecParams->type;
  139|  8.50k|    key->ecParams.fieldID.size = ecParams->fieldID.size;
  140|  8.50k|    key->ecParams.fieldID.type = ecParams->fieldID.type;
  141|  8.50k|    CHECK_SEC_OK(SECITEM_CopyItem(arena, &key->ecParams.fieldID.u.prime,
  ------------------
  |  |    8|  8.50k|    if (SECSuccess != (rv = func)) \
  |  |  ------------------
  |  |  |  Branch (8:9): [True: 0, False: 8.50k]
  |  |  ------------------
  |  |    9|  8.50k|    goto cleanup
  ------------------
  142|  8.50k|                                  &ecParams->fieldID.u.prime));
  143|  8.50k|    key->ecParams.fieldID.k1 = ecParams->fieldID.k1;
  144|  8.50k|    key->ecParams.fieldID.k2 = ecParams->fieldID.k2;
  145|  8.50k|    key->ecParams.fieldID.k3 = ecParams->fieldID.k3;
  146|  8.50k|    CHECK_SEC_OK(SECITEM_CopyItem(arena, &key->ecParams.curve.a,
  ------------------
  |  |    8|  8.50k|    if (SECSuccess != (rv = func)) \
  |  |  ------------------
  |  |  |  Branch (8:9): [True: 0, False: 8.50k]
  |  |  ------------------
  |  |    9|  8.50k|    goto cleanup
  ------------------
  147|  8.50k|                                  &ecParams->curve.a));
  148|  8.50k|    CHECK_SEC_OK(SECITEM_CopyItem(arena, &key->ecParams.curve.b,
  ------------------
  |  |    8|  8.50k|    if (SECSuccess != (rv = func)) \
  |  |  ------------------
  |  |  |  Branch (8:9): [True: 0, False: 8.50k]
  |  |  ------------------
  |  |    9|  8.50k|    goto cleanup
  ------------------
  149|  8.50k|                                  &ecParams->curve.b));
  150|  8.50k|    CHECK_SEC_OK(SECITEM_CopyItem(arena, &key->ecParams.curve.seed,
  ------------------
  |  |    8|  8.50k|    if (SECSuccess != (rv = func)) \
  |  |  ------------------
  |  |  |  Branch (8:9): [True: 0, False: 8.50k]
  |  |  ------------------
  |  |    9|  8.50k|    goto cleanup
  ------------------
  151|  8.50k|                                  &ecParams->curve.seed));
  152|  8.50k|    CHECK_SEC_OK(SECITEM_CopyItem(arena, &key->ecParams.base,
  ------------------
  |  |    8|  8.50k|    if (SECSuccess != (rv = func)) \
  |  |  ------------------
  |  |  |  Branch (8:9): [True: 0, False: 8.50k]
  |  |  ------------------
  |  |    9|  8.50k|    goto cleanup
  ------------------
  153|  8.50k|                                  &ecParams->base));
  154|  8.50k|    CHECK_SEC_OK(SECITEM_CopyItem(arena, &key->ecParams.order,
  ------------------
  |  |    8|  8.50k|    if (SECSuccess != (rv = func)) \
  |  |  ------------------
  |  |  |  Branch (8:9): [True: 0, False: 8.50k]
  |  |  ------------------
  |  |    9|  8.50k|    goto cleanup
  ------------------
  155|  8.50k|                                  &ecParams->order));
  156|  8.50k|    key->ecParams.cofactor = ecParams->cofactor;
  157|  8.50k|    CHECK_SEC_OK(SECITEM_CopyItem(arena, &key->ecParams.DEREncoding,
  ------------------
  |  |    8|  8.50k|    if (SECSuccess != (rv = func)) \
  |  |  ------------------
  |  |  |  Branch (8:9): [True: 0, False: 8.50k]
  |  |  ------------------
  |  |    9|  8.50k|    goto cleanup
  ------------------
  158|  8.50k|                                  &ecParams->DEREncoding));
  159|  8.50k|    key->ecParams.name = ecParams->name;
  160|  8.50k|    CHECK_SEC_OK(SECITEM_CopyItem(arena, &key->ecParams.curveOID,
  ------------------
  |  |    8|  8.50k|    if (SECSuccess != (rv = func)) \
  |  |  ------------------
  |  |  |  Branch (8:9): [True: 0, False: 8.50k]
  |  |  ------------------
  |  |    9|  8.50k|    goto cleanup
  ------------------
  161|  8.50k|                                  &ecParams->curveOID));
  162|       |
  163|  8.50k|    SECITEM_AllocItem(arena, &key->publicValue, EC_GetPointSize(ecParams));
  ------------------
  |  |  103|  8.50k|#define SECITEM_AllocItem SECITEM_AllocItem_Util
  ------------------
  164|  8.50k|    len = ecParams->order.len;
  165|  8.50k|    SECITEM_AllocItem(arena, &key->privateValue, len);
  ------------------
  |  |  103|  8.50k|#define SECITEM_AllocItem SECITEM_AllocItem_Util
  ------------------
  166|       |
  167|       |    /* Copy private key */
  168|  8.50k|    if (privKeyLen >= len) {
  ------------------
  |  Branch (168:9): [True: 8.50k, False: 0]
  ------------------
  169|  8.50k|        memcpy(key->privateValue.data, privKeyBytes, len);
  170|  8.50k|    } else {
  171|      0|        memset(key->privateValue.data, 0, (len - privKeyLen));
  172|      0|        memcpy(key->privateValue.data + (len - privKeyLen), privKeyBytes, privKeyLen);
  173|      0|    }
  174|       |
  175|       |    /* Compute corresponding public key */
  176|       |
  177|       |    /* Use curve specific code for point multiplication */
  178|  8.50k|    if (ecParams->name == ECCurve_Ed25519) {
  ------------------
  |  Branch (178:9): [True: 0, False: 8.50k]
  ------------------
  179|      0|        CHECK_SEC_OK(ED_DerivePublicKey(&key->privateValue, &key->publicValue));
  ------------------
  |  |    8|      0|    if (SECSuccess != (rv = func)) \
  |  |  ------------------
  |  |  |  Branch (8:9): [True: 0, False: 0]
  |  |  ------------------
  |  |    9|      0|    goto cleanup
  ------------------
  180|  8.50k|    } else {
  181|  8.50k|        const ECMethod *method = ec_get_method_from_name(ecParams->name);
  182|  8.50k|        if (method == NULL || method->pt_mul == NULL) {
  ------------------
  |  Branch (182:13): [True: 0, False: 8.50k]
  |  Branch (182:31): [True: 0, False: 8.50k]
  ------------------
  183|      0|            PORT_SetError(SEC_ERROR_UNSUPPORTED_ELLIPTIC_CURVE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  184|      0|            rv = SECFailure;
  185|      0|            goto cleanup;
  186|      0|        }
  187|  8.50k|        CHECK_SEC_OK(method->pt_mul(&key->publicValue, &key->privateValue, NULL));
  ------------------
  |  |    8|  8.50k|    if (SECSuccess != (rv = func)) \
  |  |  ------------------
  |  |  |  Branch (8:9): [True: 0, False: 8.50k]
  |  |  ------------------
  |  |    9|  8.50k|    goto cleanup
  ------------------
  188|  8.50k|    }
  189|       |
  190|  8.50k|    NSS_DECLASSIFY(key->publicValue.data, key->publicValue.len); /* Declassifying public key to avoid false positive */
  191|  8.50k|    *privKey = key;
  192|  8.50k|    return SECSuccess;
  193|       |
  194|      0|cleanup:
  195|      0|    PORT_FreeArena(arena, PR_TRUE);
  ------------------
  |  |   61|      0|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                  PORT_FreeArena(arena, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  196|      0|    return rv;
  197|  8.50k|}
ec_GenerateRandomPrivateKey:
  218|  8.50k|{
  219|  8.50k|    SECStatus rv = SECFailure;
  220|       |
  221|  8.50k|    unsigned int len = EC_GetScalarSize(ecParams);
  222|       |
  223|  8.50k|    if (privKey->len != len || privKey->data == NULL) {
  ------------------
  |  Branch (223:9): [True: 0, False: 8.50k]
  |  Branch (223:32): [True: 0, False: 8.50k]
  ------------------
  224|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  225|      0|        return SECFailure;
  226|      0|    }
  227|       |
  228|  8.50k|    const ECMethod *method = ec_get_method_from_name(ecParams->name);
  229|  8.50k|    if (method == NULL || method->scalar_validate == NULL) {
  ------------------
  |  Branch (229:9): [True: 0, False: 8.50k]
  |  Branch (229:27): [True: 0, False: 8.50k]
  ------------------
  230|      0|        PORT_SetError(SEC_ERROR_UNSUPPORTED_ELLIPTIC_CURVE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  231|      0|        return SECFailure;
  232|      0|    }
  233|       |
  234|  8.50k|    uint8_t leading_coeff_mask;
  235|  8.50k|    switch (ecParams->name) {
  236|      0|        case ECCurve_Ed25519:
  ------------------
  |  Branch (236:9): [True: 0, False: 8.50k]
  ------------------
  237|  8.01k|        case ECCurve25519:
  ------------------
  |  Branch (237:9): [True: 8.01k, False: 490]
  ------------------
  238|  8.40k|        case ECCurve_NIST_P256:
  ------------------
  |  Branch (238:9): [True: 396, False: 8.10k]
  ------------------
  239|  8.46k|        case ECCurve_NIST_P384:
  ------------------
  |  Branch (239:9): [True: 54, False: 8.44k]
  ------------------
  240|  8.46k|            leading_coeff_mask = 0xff;
  241|  8.46k|            break;
  242|     40|        case ECCurve_NIST_P521:
  ------------------
  |  Branch (242:9): [True: 40, False: 8.46k]
  ------------------
  243|     40|            leading_coeff_mask = 0x01;
  244|     40|            break;
  245|      0|        default:
  ------------------
  |  Branch (245:9): [True: 0, False: 8.50k]
  ------------------
  246|      0|            PORT_SetError(SEC_ERROR_UNSUPPORTED_ELLIPTIC_CURVE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  247|      0|            return SECFailure;
  248|  8.50k|    }
  249|       |
  250|       |    /* The rejection sampling method from FIPS 186-5 A.4.2 */
  251|  8.50k|    int count = 100;
  252|  8.50k|    do {
  253|  8.50k|        rv = RNG_GenerateGlobalRandomBytes(privKey->data, len);
  254|  8.50k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (254:13): [True: 0, False: 8.50k]
  ------------------
  255|      0|            PORT_SetError(SEC_ERROR_NEED_RANDOM);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  256|      0|            return SECFailure;
  257|      0|        }
  258|  8.50k|        privKey->data[0] &= leading_coeff_mask;
  259|  8.50k|        NSS_CLASSIFY(privKey->data, privKey->len);
  260|  8.50k|        rv = method->scalar_validate(privKey);
  261|  8.50k|    } while (rv != SECSuccess && --count > 0);
  ------------------
  |  Branch (261:14): [True: 0, False: 8.50k]
  |  Branch (261:34): [True: 0, False: 0]
  ------------------
  262|       |
  263|  8.50k|    if (rv != SECSuccess) { // implies count == 0
  ------------------
  |  Branch (263:9): [True: 0, False: 8.50k]
  ------------------
  264|      0|        PORT_SetError(SEC_ERROR_BAD_KEY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  265|      0|    }
  266|       |
  267|  8.50k|    return rv;
  268|  8.50k|}
EC_NewKey:
  276|  8.50k|{
  277|  8.50k|    SECStatus rv = SECFailure;
  278|  8.50k|    SECItem privKeyRand = { siBuffer, NULL, 0 };
  279|       |
  280|  8.50k|    if (!ecParams || ecParams->name == ECCurve_noName || !privKey) {
  ------------------
  |  Branch (280:9): [True: 0, False: 8.50k]
  |  Branch (280:22): [True: 0, False: 8.50k]
  |  Branch (280:58): [True: 0, False: 8.50k]
  ------------------
  281|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  282|      0|        return SECFailure;
  283|      0|    }
  284|       |
  285|  8.50k|    SECITEM_AllocItem(NULL, &privKeyRand, EC_GetScalarSize(ecParams));
  ------------------
  |  |  103|  8.50k|#define SECITEM_AllocItem SECITEM_AllocItem_Util
  ------------------
  286|  8.50k|    if (privKeyRand.data == NULL) {
  ------------------
  |  Branch (286:9): [True: 0, False: 8.50k]
  ------------------
  287|      0|        PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  288|      0|        rv = SECFailure;
  289|      0|        goto cleanup;
  290|      0|    }
  291|  8.50k|    rv = ec_GenerateRandomPrivateKey(ecParams, &privKeyRand);
  292|  8.50k|    if (rv != SECSuccess || privKeyRand.data == NULL) {
  ------------------
  |  Branch (292:9): [True: 0, False: 8.50k]
  |  Branch (292:29): [True: 0, False: 8.50k]
  ------------------
  293|      0|        goto cleanup;
  294|      0|    }
  295|       |    /* generate public key */
  296|  8.50k|    CHECK_SEC_OK(ec_NewKey(ecParams, privKey, privKeyRand.data, privKeyRand.len));
  ------------------
  |  |    8|  8.50k|    if (SECSuccess != (rv = func)) \
  |  |  ------------------
  |  |  |  Branch (8:9): [True: 0, False: 8.50k]
  |  |  ------------------
  |  |    9|  8.50k|    goto cleanup
  ------------------
  297|       |
  298|  8.50k|cleanup:
  299|  8.50k|    if (privKeyRand.data) {
  ------------------
  |  Branch (299:9): [True: 8.50k, False: 0]
  ------------------
  300|  8.50k|        SECITEM_ZfreeItem(&privKeyRand, PR_FALSE);
  ------------------
  |  |  110|  8.50k|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                      SECITEM_ZfreeItem(&privKeyRand, PR_FALSE);
  ------------------
  |  |  438|  8.50k|#define PR_FALSE 0
  ------------------
  301|  8.50k|    }
  302|       |#if EC_DEBUG
  303|       |    printf("EC_NewKey returning %s\n",
  304|       |           (rv == SECSuccess) ? "success" : "failure");
  305|       |#endif
  306|       |
  307|  8.50k|    return rv;
  308|  8.50k|}
EC_ValidatePublicKey:
  318|  9.68k|{
  319|  9.68k|    if (!ecParams || ecParams->name == ECCurve_noName ||
  ------------------
  |  Branch (319:9): [True: 0, False: 9.68k]
  |  Branch (319:22): [True: 0, False: 9.68k]
  ------------------
  320|  9.68k|        !publicValue || !publicValue->len) {
  ------------------
  |  Branch (320:9): [True: 0, False: 9.68k]
  |  Branch (320:25): [True: 0, False: 9.68k]
  ------------------
  321|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  322|      0|        return SECFailure;
  323|      0|    }
  324|       |
  325|       |    /* Uses curve specific code for point validation. */
  326|  9.68k|    if (ecParams->fieldID.type != ec_field_plain) {
  ------------------
  |  Branch (326:9): [True: 0, False: 9.68k]
  ------------------
  327|      0|        PORT_SetError(SEC_ERROR_UNSUPPORTED_ELLIPTIC_CURVE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  328|      0|        return SECFailure;
  329|      0|    }
  330|       |
  331|  9.68k|    const ECMethod *method = ec_get_method_from_name(ecParams->name);
  332|  9.68k|    if (method == NULL || method->pt_validate == NULL) {
  ------------------
  |  Branch (332:9): [True: 0, False: 9.68k]
  |  Branch (332:27): [True: 0, False: 9.68k]
  ------------------
  333|       |        /* unknown curve */
  334|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  335|      0|        return SECFailure;
  336|      0|    }
  337|       |
  338|  9.68k|    SECStatus rv = method->pt_validate(publicValue);
  339|  9.68k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (339:9): [True: 179, False: 9.50k]
  ------------------
  340|    179|        PORT_SetError(SEC_ERROR_BAD_KEY);
  ------------------
  |  |   65|    179|#define PORT_SetError PORT_SetError_Util
  ------------------
  341|    179|    }
  342|  9.68k|    return rv;
  343|  9.68k|}
ECDH_Derive:
  361|  1.00k|{
  362|  1.00k|    if (!publicValue || !publicValue->len ||
  ------------------
  |  Branch (362:9): [True: 0, False: 1.00k]
  |  Branch (362:25): [True: 0, False: 1.00k]
  ------------------
  363|  1.00k|        !ecParams || ecParams->name == ECCurve_noName ||
  ------------------
  |  Branch (363:9): [True: 0, False: 1.00k]
  |  Branch (363:22): [True: 0, False: 1.00k]
  ------------------
  364|  1.00k|        !privateValue || !privateValue->len || !derivedSecret) {
  ------------------
  |  Branch (364:9): [True: 0, False: 1.00k]
  |  Branch (364:26): [True: 0, False: 1.00k]
  |  Branch (364:48): [True: 0, False: 1.00k]
  ------------------
  365|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  366|      0|        return SECFailure;
  367|      0|    }
  368|       |
  369|       |    /*
  370|       |     * Make sure the point is on the requested curve to avoid
  371|       |     * certain small subgroup attacks.
  372|       |     */
  373|  1.00k|    if (EC_ValidatePublicKey(ecParams, publicValue) != SECSuccess) {
  ------------------
  |  Branch (373:9): [True: 149, False: 852]
  ------------------
  374|    149|        PORT_SetError(SEC_ERROR_BAD_KEY);
  ------------------
  |  |   65|    149|#define PORT_SetError PORT_SetError_Util
  ------------------
  375|    149|        return SECFailure;
  376|    149|    }
  377|       |
  378|       |    /* Perform curve specific multiplication using ECMethod */
  379|    852|    if (ecParams->fieldID.type != ec_field_plain) {
  ------------------
  |  Branch (379:9): [True: 0, False: 852]
  ------------------
  380|      0|        PORT_SetError(SEC_ERROR_UNSUPPORTED_ELLIPTIC_CURVE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  381|      0|        return SECFailure;
  382|      0|    }
  383|       |
  384|    852|    const ECMethod *method = ec_get_method_from_name(ecParams->name);
  385|    852|    if (method == NULL || method->pt_validate == NULL ||
  ------------------
  |  Branch (385:9): [True: 0, False: 852]
  |  Branch (385:27): [True: 0, False: 852]
  ------------------
  386|    852|        method->pt_mul == NULL) {
  ------------------
  |  Branch (386:9): [True: 0, False: 852]
  ------------------
  387|      0|        PORT_SetError(SEC_ERROR_UNSUPPORTED_ELLIPTIC_CURVE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  388|      0|        return SECFailure;
  389|      0|    }
  390|       |
  391|    852|    memset(derivedSecret, 0, sizeof(*derivedSecret));
  392|    852|    derivedSecret = SECITEM_AllocItem(NULL, derivedSecret, EC_GetScalarSize(ecParams));
  ------------------
  |  |  103|    852|#define SECITEM_AllocItem SECITEM_AllocItem_Util
  ------------------
  393|    852|    if (derivedSecret == NULL) {
  ------------------
  |  Branch (393:9): [True: 0, False: 852]
  ------------------
  394|      0|        PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  395|      0|        return SECFailure;
  396|      0|    }
  397|       |
  398|    852|    SECStatus rv = method->pt_mul(derivedSecret, privateValue, publicValue);
  399|    852|    if (rv != SECSuccess) {
  ------------------
  |  Branch (399:9): [True: 1, False: 851]
  ------------------
  400|      1|        PORT_SetError(SEC_ERROR_BAD_KEY);
  ------------------
  |  |   65|      1|#define PORT_SetError PORT_SetError_Util
  ------------------
  401|      1|        SECITEM_ZfreeItem(derivedSecret, PR_FALSE);
  ------------------
  |  |  110|      1|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                      SECITEM_ZfreeItem(derivedSecret, PR_FALSE);
  ------------------
  |  |  438|      1|#define PR_FALSE 0
  ------------------
  402|      1|    }
  403|    852|    return rv;
  404|    852|}
ECDSA_VerifyDigest:
  540|    139|{
  541|    139|    SECStatus rv = SECFailure;
  542|    139|    ECParams *ecParams = NULL;
  543|       |
  544|       |    /* Check args */
  545|    139|    if (!key || !signature || !digest) {
  ------------------
  |  Branch (545:9): [True: 0, False: 139]
  |  Branch (545:17): [True: 0, False: 139]
  |  Branch (545:31): [True: 0, False: 139]
  ------------------
  546|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  547|      0|        return SECFailure;
  548|      0|    }
  549|       |
  550|    139|    ecParams = &(key->ecParams);
  551|       |
  552|       |    /* Perform curve specific signature verification using ECMethod */
  553|    139|    if (ecParams->fieldID.type != ec_field_plain) {
  ------------------
  |  Branch (553:9): [True: 0, False: 139]
  ------------------
  554|      0|        PORT_SetError(SEC_ERROR_UNSUPPORTED_ELLIPTIC_CURVE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  555|      0|        return SECFailure;
  556|      0|    }
  557|       |
  558|    139|    const ECMethod *method = ec_get_method_from_name(ecParams->name);
  559|    139|    if (method == NULL || method->verify_digest == NULL) {
  ------------------
  |  Branch (559:9): [True: 0, False: 139]
  |  Branch (559:27): [True: 0, False: 139]
  ------------------
  560|      0|        PORT_SetError(SEC_ERROR_UNSUPPORTED_ELLIPTIC_CURVE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  561|      0|        return SECFailure;
  562|      0|    }
  563|       |
  564|    139|    rv = method->verify_digest(key, signature, digest);
  565|    139|    if (rv != SECSuccess) {
  ------------------
  |  Branch (565:9): [True: 139, False: 0]
  ------------------
  566|    139|        PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
  ------------------
  |  |   65|    139|#define PORT_SetError PORT_SetError_Util
  ------------------
  567|    139|    }
  568|       |
  569|       |#if EC_DEBUG
  570|       |    printf("ECDSA verification %s\n",
  571|       |           (rv == SECSuccess) ? "succeeded" : "failed");
  572|       |#endif
  573|       |
  574|    139|    return rv;
  575|    139|}
ec.c:ec_get_method_from_name:
   87|  27.6k|{
   88|  27.6k|    unsigned long i;
   89|  31.1k|    for (i = 0; i < sizeof(kMethods) / sizeof(kMethods[0]); ++i) {
  ------------------
  |  Branch (89:17): [True: 31.1k, False: 0]
  ------------------
   90|  31.1k|        if (kMethods[i].name == name) {
  ------------------
  |  Branch (90:13): [True: 27.6k, False: 3.46k]
  ------------------
   91|  27.6k|            return &kMethods[i];
   92|  27.6k|        }
   93|  31.1k|    }
   94|      0|    return NULL;
   95|  27.6k|}

EC_FillParams:
  100|  25.8k|{
  101|  25.8k|    SECStatus rv = SECFailure;
  102|  25.8k|    SECOidTag tag;
  103|  25.8k|    SECItem oid = { siBuffer, NULL, 0 };
  104|       |
  105|       |#if EC_DEBUG
  106|       |    int i;
  107|       |
  108|       |    printf("Encoded params in EC_DecodeParams: ");
  109|       |    for (i = 0; i < encodedParams->len; i++) {
  110|       |        printf("%02x:", encodedParams->data[i]);
  111|       |    }
  112|       |    printf("\n");
  113|       |#endif
  114|       |
  115|  25.8k|    if ((encodedParams->len != ANSI_X962_CURVE_OID_TOTAL_LEN) &&
  ------------------
  |  |   10|  25.8k|#define ANSI_X962_CURVE_OID_TOTAL_LEN 10
  ------------------
  |  Branch (115:9): [True: 24.5k, False: 1.30k]
  ------------------
  116|  25.8k|        (encodedParams->len != SECG_CURVE_OID_TOTAL_LEN) &&
  ------------------
  |  |   11|  24.5k|#define SECG_CURVE_OID_TOTAL_LEN 7
  ------------------
  |  Branch (116:9): [True: 24.0k, False: 469]
  ------------------
  117|  25.8k|        (encodedParams->len != PKIX_NEWCURVES_OID_TOTAL_LEN) &&
  ------------------
  |  |   12|  24.0k|#define PKIX_NEWCURVES_OID_TOTAL_LEN 11
  ------------------
  |  Branch (117:9): [True: 0, False: 24.0k]
  ------------------
  118|  25.8k|        (encodedParams->len != ED25519_OID_TOTAL_LEN)) {
  ------------------
  |  |   13|      0|#define ED25519_OID_TOTAL_LEN 5
  ------------------
  |  Branch (118:9): [True: 0, False: 0]
  ------------------
  119|      0|        PORT_SetError(SEC_ERROR_UNSUPPORTED_ELLIPTIC_CURVE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  120|      0|        return SECFailure;
  121|  25.8k|    };
  122|       |
  123|  25.8k|    oid.len = encodedParams->len - 2;
  124|  25.8k|    oid.data = encodedParams->data + 2;
  125|  25.8k|    if ((encodedParams->data[0] != SEC_ASN1_OBJECT_ID) ||
  ------------------
  |  |   82|  25.8k|#define SEC_ASN1_OBJECT_ID 0x06
  ------------------
  |  Branch (125:9): [True: 0, False: 25.8k]
  ------------------
  126|  25.8k|        ((tag = SECOID_FindOIDTag(&oid)) == SEC_OID_UNKNOWN)) {
  ------------------
  |  |  117|  25.8k|#define SECOID_FindOIDTag SECOID_FindOIDTag_Util
  ------------------
  |  Branch (126:9): [True: 0, False: 25.8k]
  ------------------
  127|      0|        PORT_SetError(SEC_ERROR_UNSUPPORTED_ELLIPTIC_CURVE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  128|      0|        return SECFailure;
  129|      0|    }
  130|       |
  131|  25.8k|    params->arena = arena;
  132|  25.8k|    params->cofactor = 0;
  133|  25.8k|    params->type = ec_params_named;
  134|  25.8k|    params->name = ECCurve_noName;
  135|       |
  136|       |    /* Fill out curveOID */
  137|  25.8k|    params->curveOID.len = oid.len;
  138|  25.8k|    params->curveOID.data = (unsigned char *)PORT_ArenaAlloc(arena, oid.len);
  ------------------
  |  |   53|  25.8k|#define PORT_ArenaAlloc PORT_ArenaAlloc_Util
  ------------------
  139|  25.8k|    if (params->curveOID.data == NULL)
  ------------------
  |  Branch (139:9): [True: 0, False: 25.8k]
  ------------------
  140|      0|        goto cleanup;
  141|  25.8k|    memcpy(params->curveOID.data, oid.data, oid.len);
  142|       |
  143|       |#if EC_DEBUG
  144|       |    printf("Curve: %s\n", SECOID_FindOIDTagDescription(tag));
  145|       |#endif
  146|       |
  147|  25.8k|    switch (tag) {
  148|  1.27k|        case SEC_OID_ANSIX962_EC_PRIME256V1:
  ------------------
  |  Branch (148:9): [True: 1.27k, False: 24.5k]
  ------------------
  149|       |            /* Populate params for prime256v1 aka secp256r1
  150|       |             * (the NIST P-256 curve)
  151|       |             */
  152|  1.27k|            CHECK_SEC_OK(gf_populate_params_bytes(ECCurve_X9_62_PRIME_256V1,
  ------------------
  |  |   20|  1.27k|    if (SECSuccess != (rv = func)) \
  |  |  ------------------
  |  |  |  Branch (20:9): [True: 0, False: 1.27k]
  |  |  ------------------
  |  |   21|  1.27k|    goto cleanup
  ------------------
  153|  1.27k|                                                  ec_field_plain, params));
  154|  1.27k|            break;
  155|       |
  156|  1.27k|        case SEC_OID_SECG_EC_SECP384R1:
  ------------------
  |  Branch (156:9): [True: 207, False: 25.6k]
  ------------------
  157|       |            /* Populate params for secp384r1
  158|       |             * (the NIST P-384 curve)
  159|       |             */
  160|    207|            CHECK_SEC_OK(gf_populate_params_bytes(ECCurve_SECG_PRIME_384R1,
  ------------------
  |  |   20|    207|    if (SECSuccess != (rv = func)) \
  |  |  ------------------
  |  |  |  Branch (20:9): [True: 0, False: 207]
  |  |  ------------------
  |  |   21|    207|    goto cleanup
  ------------------
  161|    207|                                                  ec_field_plain, params));
  162|    207|            break;
  163|       |
  164|    207|        case SEC_OID_SECG_EC_SECP521R1:
  ------------------
  |  Branch (164:9): [True: 178, False: 25.6k]
  ------------------
  165|       |            /* Populate params for secp521r1
  166|       |             * (the NIST P-521 curve)
  167|       |             */
  168|    178|            CHECK_SEC_OK(gf_populate_params_bytes(ECCurve_SECG_PRIME_521R1,
  ------------------
  |  |   20|    178|    if (SECSuccess != (rv = func)) \
  |  |  ------------------
  |  |  |  Branch (20:9): [True: 0, False: 178]
  |  |  ------------------
  |  |   21|    178|    goto cleanup
  ------------------
  169|    178|                                                  ec_field_plain, params));
  170|    178|            break;
  171|       |
  172|    178|        case SEC_OID_ED25519_PUBLIC_KEY:
  ------------------
  |  Branch (172:9): [True: 0, False: 25.8k]
  ------------------
  173|      0|            params->type = ec_params_edwards_named;
  174|      0|            CHECK_SEC_OK(gf_populate_params_bytes(ECCurve_Ed25519,
  ------------------
  |  |   20|      0|    if (SECSuccess != (rv = func)) \
  |  |  ------------------
  |  |  |  Branch (20:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   21|      0|    goto cleanup
  ------------------
  175|      0|                                                  ec_field_plain, params));
  176|       |
  177|      0|            break;
  178|       |
  179|      0|        case SEC_OID_X25519:
  ------------------
  |  Branch (179:9): [True: 0, False: 25.8k]
  ------------------
  180|  24.0k|        case SEC_OID_CURVE25519:
  ------------------
  |  Branch (180:9): [True: 24.0k, False: 1.77k]
  ------------------
  181|       |            /* Populate params for Curve25519 */
  182|  24.0k|            params->type = ec_params_montgomery_named;
  183|  24.0k|            CHECK_SEC_OK(gf_populate_params_bytes(ECCurve25519,
  ------------------
  |  |   20|  24.0k|    if (SECSuccess != (rv = func)) \
  |  |  ------------------
  |  |  |  Branch (20:9): [True: 0, False: 24.0k]
  |  |  ------------------
  |  |   21|  24.0k|    goto cleanup
  ------------------
  184|  24.0k|                                                  ec_field_plain,
  185|  24.0k|                                                  params));
  186|  24.0k|            break;
  187|       |
  188|  24.0k|        default:
  ------------------
  |  Branch (188:9): [True: 111, False: 25.6k]
  ------------------
  189|    111|            break;
  190|  25.8k|    };
  191|       |
  192|  25.8k|cleanup:
  193|  25.8k|    if (!params->cofactor) {
  ------------------
  |  Branch (193:9): [True: 111, False: 25.6k]
  ------------------
  194|    111|        PORT_SetError(SEC_ERROR_UNSUPPORTED_ELLIPTIC_CURVE);
  ------------------
  |  |   65|    111|#define PORT_SetError PORT_SetError_Util
  ------------------
  195|       |#if EC_DEBUG
  196|       |        printf("Unrecognized curve, returning NULL params\n");
  197|       |#endif
  198|    111|    }
  199|       |
  200|  25.8k|    return rv;
  201|  25.8k|}
EC_DecodeParams:
  205|  8.55k|{
  206|  8.55k|    PLArenaPool *arena;
  207|  8.55k|    ECParams *params;
  208|  8.55k|    SECStatus rv = SECFailure;
  209|       |
  210|       |    /* Initialize an arena for the ECParams structure */
  211|  8.55k|    if (!(arena = PORT_NewArena(NSS_FREEBL_DEFAULT_CHUNKSIZE)))
  ------------------
  |  |   63|  8.55k|#define PORT_NewArena PORT_NewArena_Util
  ------------------
                  if (!(arena = PORT_NewArena(NSS_FREEBL_DEFAULT_CHUNKSIZE)))
  ------------------
  |  |  143|  8.55k|#define NSS_FREEBL_DEFAULT_CHUNKSIZE 2048
  ------------------
  |  Branch (211:9): [True: 0, False: 8.55k]
  ------------------
  212|      0|        return SECFailure;
  213|       |
  214|  8.55k|    params = (ECParams *)PORT_ArenaZAlloc(arena, sizeof(ECParams));
  ------------------
  |  |   59|  8.55k|#define PORT_ArenaZAlloc PORT_ArenaZAlloc_Util
  ------------------
  215|  8.55k|    if (!params) {
  ------------------
  |  Branch (215:9): [True: 0, False: 8.55k]
  ------------------
  216|      0|        PORT_FreeArena(arena, PR_TRUE);
  ------------------
  |  |   61|      0|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                      PORT_FreeArena(arena, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  217|      0|        return SECFailure;
  218|      0|    }
  219|       |
  220|       |    /* Copy the encoded params */
  221|  8.55k|    SECITEM_AllocItem(arena, &(params->DEREncoding),
  ------------------
  |  |  103|  8.55k|#define SECITEM_AllocItem SECITEM_AllocItem_Util
  ------------------
  222|  8.55k|                      encodedParams->len);
  223|  8.55k|    memcpy(params->DEREncoding.data, encodedParams->data, encodedParams->len);
  224|       |
  225|       |    /* Fill out the rest of the ECParams structure based on
  226|       |     * the encoded params
  227|       |     */
  228|  8.55k|    rv = EC_FillParams(arena, encodedParams, params);
  229|  8.55k|    if (rv == SECFailure) {
  ------------------
  |  Branch (229:9): [True: 56, False: 8.50k]
  ------------------
  230|     56|        PORT_FreeArena(arena, PR_TRUE);
  ------------------
  |  |   61|     56|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                      PORT_FreeArena(arena, PR_TRUE);
  ------------------
  |  |  437|     56|#define PR_TRUE 1
  ------------------
  231|     56|        return SECFailure;
  232|  8.50k|    } else {
  233|  8.50k|        *ecparams = params;
  234|  8.50k|        ;
  235|  8.50k|        return SECSuccess;
  236|  8.50k|    }
  237|  8.55k|}
EC_GetPointSize:
  241|  18.1k|{
  242|  18.1k|    ECCurveName name = params->name;
  243|  18.1k|    const ECCurveBytes *curveParams;
  244|       |
  245|  18.1k|    if ((name < ECCurve_noName) || (name > ECCurve_pastLastCurve) ||
  ------------------
  |  Branch (245:9): [True: 0, False: 18.1k]
  |  Branch (245:36): [True: 0, False: 18.1k]
  ------------------
  246|  18.1k|        ((curveParams = ecCurve_map[name]) == NULL)) {
  ------------------
  |  Branch (246:9): [True: 0, False: 18.1k]
  ------------------
  247|       |        /* unknown curve, calculate point size from params. assume standard curves with 2 points
  248|       |         * and a point compression indicator byte */
  249|      0|        int sizeInBytes = (params->fieldID.size + 7) / 8;
  250|      0|        return sizeInBytes * 2 + 1;
  251|      0|    }
  252|       |
  253|  18.1k|    if (params->type == ec_params_edwards_named || params->type == ec_params_montgomery_named) {
  ------------------
  |  Branch (253:9): [True: 0, False: 18.1k]
  |  Branch (253:52): [True: 16.5k, False: 1.68k]
  ------------------
  254|  16.5k|        return curveParams->scalarSize;
  255|  16.5k|    }
  256|       |
  257|  1.68k|    return curveParams->pointSize - 1;
  258|  18.1k|}
EC_GetScalarSize:
  262|  17.8k|{
  263|  17.8k|    ECCurveName name = params->name;
  264|  17.8k|    const ECCurveBytes *curveParams;
  265|       |
  266|  17.8k|    if ((name < ECCurve_noName) || (name > ECCurve_pastLastCurve) ||
  ------------------
  |  Branch (266:9): [True: 0, False: 17.8k]
  |  Branch (266:36): [True: 0, False: 17.8k]
  ------------------
  267|  17.8k|        ((curveParams = ecCurve_map[name]) == NULL)) {
  ------------------
  |  Branch (267:9): [True: 0, False: 17.8k]
  ------------------
  268|       |        /* unknown curve, calculate scalar size from field size in params */
  269|      0|        int sizeInBytes = (params->fieldID.size + 7) / 8;
  270|      0|        return sizeInBytes;
  271|      0|    }
  272|  17.8k|    return curveParams->scalarSize;
  273|  17.8k|}
ecdecode.c:gf_populate_params_bytes:
   65|  25.6k|{
   66|  25.6k|    SECStatus rv = SECFailure;
   67|  25.6k|    const ECCurveBytes *curveParams;
   68|       |
   69|  25.6k|    if ((name < ECCurve_noName) || (name > ECCurve_pastLastCurve))
  ------------------
  |  Branch (69:9): [True: 0, False: 25.6k]
  |  Branch (69:36): [True: 0, False: 25.6k]
  ------------------
   70|      0|        goto cleanup;
   71|  25.6k|    params->name = name;
   72|  25.6k|    curveParams = ecCurve_map[params->name];
   73|  25.6k|    CHECK_OK(curveParams);
  ------------------
  |  |   17|  25.6k|    if (func == NULL)  \
  |  |  ------------------
  |  |  |  Branch (17:9): [True: 0, False: 25.6k]
  |  |  ------------------
  |  |   18|  25.6k|    goto cleanup
  ------------------
   74|  25.6k|    params->fieldID.size = curveParams->size;
   75|  25.6k|    params->fieldID.type = field_type;
   76|  25.6k|    if (field_type != ec_field_plain) {
  ------------------
  |  Branch (76:9): [True: 0, False: 25.6k]
  ------------------
   77|      0|        return SECFailure;
   78|      0|    }
   79|  25.6k|    params->fieldID.u.prime.len = curveParams->scalarSize;
   80|  25.6k|    params->fieldID.u.prime.data = (unsigned char *)curveParams->irr;
   81|  25.6k|    params->curve.a.len = curveParams->scalarSize;
   82|  25.6k|    params->curve.a.data = (unsigned char *)curveParams->curvea;
   83|  25.6k|    params->curve.b.len = curveParams->scalarSize;
   84|  25.6k|    params->curve.b.data = (unsigned char *)curveParams->curveb;
   85|  25.6k|    params->base.len = curveParams->pointSize;
   86|  25.6k|    params->base.data = (unsigned char *)curveParams->base;
   87|  25.6k|    params->order.len = curveParams->scalarSize;
   88|  25.6k|    params->order.data = (unsigned char *)curveParams->order;
   89|  25.6k|    params->cofactor = curveParams->cofactor;
   90|       |
   91|  25.6k|    rv = SECSuccess;
   92|       |
   93|  25.6k|cleanup:
   94|  25.6k|    return rv;
   95|  25.6k|}

ec_Curve25519_mul:
   15|  8.50k|{
   16|       |// Note: this cast is safe because HaCl* state has a post-condition that only "mypublic" changed.
   17|       |#if defined HACL_CAN_COMPILE_INLINE_ASM
   18|       |    Hacl_Curve25519_64_ecdh(mypublic, (uint8_t *)secret, (uint8_t *)basepoint);
   19|       |#else
   20|  8.50k|    Hacl_Curve25519_51_ecdh(mypublic, (uint8_t *)secret, (uint8_t *)basepoint);
   21|  8.50k|#endif
   22|       |
   23|  8.50k|    return 0;
   24|  8.50k|}

ec_Curve25519_pt_validate:
   24|  8.50k|{
   25|  8.50k|    PRUint8 *p;
   26|  8.50k|    PRUint64 i;
   27|  8.50k|    PRUint8 forbiddenValues[12][32] = {
   28|  8.50k|        { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   29|  8.50k|          0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   30|  8.50k|          0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   31|  8.50k|          0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
   32|  8.50k|        { 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   33|  8.50k|          0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   34|  8.50k|          0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   35|  8.50k|          0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
   36|  8.50k|        { 0xe0, 0xeb, 0x7a, 0x7c, 0x3b, 0x41, 0xb8, 0xae,
   37|  8.50k|          0x16, 0x56, 0xe3, 0xfa, 0xf1, 0x9f, 0xc4, 0x6a,
   38|  8.50k|          0xda, 0x09, 0x8d, 0xeb, 0x9c, 0x32, 0xb1, 0xfd,
   39|  8.50k|          0x86, 0x62, 0x05, 0x16, 0x5f, 0x49, 0xb8, 0x00 },
   40|  8.50k|        { 0x5f, 0x9c, 0x95, 0xbc, 0xa3, 0x50, 0x8c, 0x24,
   41|  8.50k|          0xb1, 0xd0, 0xb1, 0x55, 0x9c, 0x83, 0xef, 0x5b,
   42|  8.50k|          0x04, 0x44, 0x5c, 0xc4, 0x58, 0x1c, 0x8e, 0x86,
   43|  8.50k|          0xd8, 0x22, 0x4e, 0xdd, 0xd0, 0x9f, 0x11, 0x57 },
   44|  8.50k|        { 0xec, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
   45|  8.50k|          0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
   46|  8.50k|          0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
   47|  8.50k|          0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f },
   48|  8.50k|        { 0xed, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
   49|  8.50k|          0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
   50|  8.50k|          0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
   51|  8.50k|          0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f },
   52|  8.50k|        { 0xee, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
   53|  8.50k|          0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
   54|  8.50k|          0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
   55|  8.50k|          0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f },
   56|  8.50k|        { 0xcd, 0xeb, 0x7a, 0x7c, 0x3b, 0x41, 0xb8, 0xae,
   57|  8.50k|          0x16, 0x56, 0xe3, 0xfa, 0xf1, 0x9f, 0xc4, 0x6a,
   58|  8.50k|          0xda, 0x09, 0x8d, 0xeb, 0x9c, 0x32, 0xb1, 0xfd,
   59|  8.50k|          0x86, 0x62, 0x05, 0x16, 0x5f, 0x49, 0xb8, 0x80 },
   60|  8.50k|        { 0x4c, 0x9c, 0x95, 0xbc, 0xa3, 0x50, 0x8c, 0x24,
   61|  8.50k|          0xb1, 0xd0, 0xb1, 0x55, 0x9c, 0x83, 0xef, 0x5b,
   62|  8.50k|          0x04, 0x44, 0x5c, 0xc4, 0x58, 0x1c, 0x8e, 0x86,
   63|  8.50k|          0xd8, 0x22, 0x4e, 0xdd, 0xd0, 0x9f, 0x11, 0xd7 },
   64|  8.50k|        { 0xd9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
   65|  8.50k|          0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
   66|  8.50k|          0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
   67|  8.50k|          0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
   68|  8.50k|        { 0xda, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
   69|  8.50k|          0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
   70|  8.50k|          0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
   71|  8.50k|          0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
   72|  8.50k|        { 0xdb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
   73|  8.50k|          0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
   74|  8.50k|          0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
   75|  8.50k|          0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
   76|  8.50k|    };
   77|       |
   78|  8.50k|    if (px->len == 32) {
  ------------------
  |  Branch (78:9): [True: 8.50k, False: 0]
  ------------------
   79|  8.50k|        p = px->data;
   80|  8.50k|    } else {
   81|      0|        return SECFailure;
   82|      0|    }
   83|       |
   84|   110k|    for (i = 0; i < PR_ARRAY_SIZE(forbiddenValues); ++i) {
  ------------------
  |  |  167|   110k|#define PR_ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
  ------------------
  |  Branch (84:17): [True: 102k, False: 8.50k]
  ------------------
   85|   102k|        if (NSS_SecureMemcmp(p, forbiddenValues[i], px->len) == 0) {
  ------------------
  |  Branch (85:13): [True: 2, False: 102k]
  ------------------
   86|      2|            return SECFailure;
   87|      2|        }
   88|   102k|    }
   89|       |
   90|  8.50k|    return SECSuccess;
   91|  8.50k|}
ec_Curve25519_scalar_validate:
   98|  8.01k|{
   99|  8.01k|    if (!scalar || !scalar->data) {
  ------------------
  |  Branch (99:9): [True: 0, False: 8.01k]
  |  Branch (99:20): [True: 0, False: 8.01k]
  ------------------
  100|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  101|      0|        return SECFailure;
  102|      0|    }
  103|       |
  104|  8.01k|    if (scalar->len != 32) {
  ------------------
  |  Branch (104:9): [True: 0, False: 8.01k]
  ------------------
  105|      0|        PORT_SetError(SEC_ERROR_BAD_KEY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  106|      0|        return SECFailure;
  107|      0|    }
  108|  8.01k|    return SECSuccess;
  109|  8.01k|}
ec_Curve25519_pt_mul:
  118|  8.50k|{
  119|  8.50k|    PRUint8 *px;
  120|  8.50k|    PRUint8 basePoint[32] = { 9 };
  121|       |
  122|  8.50k|    if (!P) {
  ------------------
  |  Branch (122:9): [True: 8.01k, False: 490]
  ------------------
  123|  8.01k|        px = basePoint;
  124|  8.01k|    } else {
  125|    490|        PORT_Assert(P->len == 32);
  ------------------
  |  |  120|    490|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    490|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 490, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  126|    490|        if (P->len != 32) {
  ------------------
  |  Branch (126:13): [True: 0, False: 490]
  ------------------
  127|      0|            return SECFailure;
  128|      0|        }
  129|    490|        px = P->data;
  130|    490|    }
  131|  8.50k|    if (k->len != 32) {
  ------------------
  |  Branch (131:9): [True: 0, False: 8.50k]
  ------------------
  132|      0|        return SECFailure;
  133|      0|    }
  134|       |
  135|  8.50k|    SECStatus rv = ec_Curve25519_mul(X->data, k->data, px);
  136|  8.50k|    if (NSS_SecureMemcmpZero(X->data, X->len) == 0) {
  ------------------
  |  Branch (136:9): [True: 1, False: 8.50k]
  ------------------
  137|      1|        return SECFailure;
  138|      1|    }
  139|  8.50k|    return rv;
  140|  8.50k|}

ec_secp256r1_pt_validate:
   19|    905|{
   20|    905|    SECStatus res = SECSuccess;
   21|    905|    if (!pt || !pt->data) {
  ------------------
  |  Branch (21:9): [True: 0, False: 905]
  |  Branch (21:16): [True: 0, False: 905]
  ------------------
   22|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
   23|      0|        res = SECFailure;
   24|      0|        return res;
   25|      0|    }
   26|       |
   27|    905|    if (pt->len != 65) {
  ------------------
  |  Branch (27:9): [True: 0, False: 905]
  ------------------
   28|      0|        PORT_SetError(SEC_ERROR_BAD_KEY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
   29|      0|        res = SECFailure;
   30|      0|        return res;
   31|      0|    }
   32|       |
   33|    905|    if (pt->data[0] != EC_POINT_FORM_UNCOMPRESSED) {
  ------------------
  |  |   92|    905|#define EC_POINT_FORM_UNCOMPRESSED 0x04
  ------------------
  |  Branch (33:9): [True: 14, False: 891]
  ------------------
   34|     14|        PORT_SetError(SEC_ERROR_UNSUPPORTED_EC_POINT_FORM);
  ------------------
  |  |   65|     14|#define PORT_SetError PORT_SetError_Util
  ------------------
   35|     14|        res = SECFailure;
   36|     14|        return res;
   37|     14|    }
   38|       |
   39|    891|    bool b = Hacl_P256_validate_public_key(pt->data + 1);
   40|       |
   41|    891|    if (!b) {
  ------------------
  |  Branch (41:9): [True: 75, False: 816]
  ------------------
   42|     75|        PORT_SetError(SEC_ERROR_BAD_KEY);
  ------------------
  |  |   65|     75|#define PORT_SetError PORT_SetError_Util
  ------------------
   43|     75|        res = SECFailure;
   44|     75|    }
   45|    891|    return res;
   46|    905|}
ec_secp256r1_scalar_validate:
   54|    396|{
   55|    396|    SECStatus res = SECSuccess;
   56|    396|    if (!scalar || !scalar->data) {
  ------------------
  |  Branch (56:9): [True: 0, False: 396]
  |  Branch (56:20): [True: 0, False: 396]
  ------------------
   57|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
   58|      0|        res = SECFailure;
   59|      0|        return res;
   60|      0|    }
   61|       |
   62|    396|    if (scalar->len != 32) {
  ------------------
  |  Branch (62:9): [True: 0, False: 396]
  ------------------
   63|      0|        PORT_SetError(SEC_ERROR_BAD_KEY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
   64|      0|        res = SECFailure;
   65|      0|        return res;
   66|      0|    }
   67|       |
   68|    396|    bool b = Hacl_P256_validate_private_key(scalar->data);
   69|       |
   70|    396|    if (!b) {
  ------------------
  |  Branch (70:9): [True: 0, False: 396]
  ------------------
   71|      0|        PORT_SetError(SEC_ERROR_BAD_KEY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
   72|      0|        res = SECFailure;
   73|      0|    }
   74|    396|    return res;
   75|    396|}
ec_secp256r1_pt_mul:
   85|    747|{
   86|    747|    SECStatus res = SECSuccess;
   87|    747|    if (!P) {
  ------------------
  |  Branch (87:9): [True: 396, False: 351]
  ------------------
   88|    396|        uint8_t derived[64] = { 0 };
   89|       |
   90|    396|        if (!X || !k || !X->data || !k->data ||
  ------------------
  |  Branch (90:13): [True: 0, False: 396]
  |  Branch (90:19): [True: 0, False: 396]
  |  Branch (90:25): [True: 0, False: 396]
  |  Branch (90:37): [True: 0, False: 396]
  ------------------
   91|    396|            X->len < 65 || k->len != 32) {
  ------------------
  |  Branch (91:13): [True: 0, False: 396]
  |  Branch (91:28): [True: 0, False: 396]
  ------------------
   92|      0|            PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
   93|      0|            res = SECFailure;
   94|      0|            return res;
   95|      0|        }
   96|       |
   97|    396|        bool b = Hacl_P256_dh_initiator(derived, k->data);
   98|       |
   99|    396|        if (!b) {
  ------------------
  |  Branch (99:13): [True: 0, False: 396]
  ------------------
  100|      0|            PORT_SetError(SEC_ERROR_BAD_KEY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  101|      0|            res = SECFailure;
  102|      0|            return res;
  103|      0|        }
  104|       |
  105|    396|        X->len = 65;
  106|    396|        X->data[0] = EC_POINT_FORM_UNCOMPRESSED;
  ------------------
  |  |   92|    396|#define EC_POINT_FORM_UNCOMPRESSED 0x04
  ------------------
  107|    396|        memcpy(X->data + 1, derived, 64);
  108|       |
  109|    396|    } else {
  110|    351|        uint8_t full_key[32] = { 0 };
  111|    351|        uint8_t *key;
  112|    351|        uint8_t derived[64] = { 0 };
  113|       |
  114|    351|        if (!X || !k || !P || !X->data || !k->data || !P->data ||
  ------------------
  |  Branch (114:13): [True: 0, False: 351]
  |  Branch (114:19): [True: 0, False: 351]
  |  Branch (114:25): [True: 0, False: 351]
  |  Branch (114:31): [True: 0, False: 351]
  |  Branch (114:43): [True: 0, False: 351]
  |  Branch (114:55): [True: 0, False: 351]
  ------------------
  115|    351|            X->len < 32 || P->len != 65 ||
  ------------------
  |  Branch (115:13): [True: 0, False: 351]
  |  Branch (115:28): [True: 0, False: 351]
  ------------------
  116|    351|            P->data[0] != EC_POINT_FORM_UNCOMPRESSED) {
  ------------------
  |  |   92|    351|#define EC_POINT_FORM_UNCOMPRESSED 0x04
  ------------------
  |  Branch (116:13): [True: 0, False: 351]
  ------------------
  117|      0|            PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  118|      0|            res = SECFailure;
  119|      0|            return res;
  120|      0|        }
  121|       |
  122|       |        /* We consider keys of up to size 32, or of size 33 with a single leading 0 */
  123|    351|        if (k->len < 32) {
  ------------------
  |  Branch (123:13): [True: 0, False: 351]
  ------------------
  124|      0|            memcpy(full_key + 32 - k->len, k->data, k->len);
  125|      0|            key = full_key;
  126|    351|        } else if (k->len == 32) {
  ------------------
  |  Branch (126:20): [True: 351, False: 0]
  ------------------
  127|    351|            key = k->data;
  128|    351|        } else if (k->len == 33 && k->data[0] == 0) {
  ------------------
  |  Branch (128:20): [True: 0, False: 0]
  |  Branch (128:36): [True: 0, False: 0]
  ------------------
  129|      0|            key = k->data + 1;
  130|      0|        } else {
  131|      0|            PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  132|      0|            res = SECFailure;
  133|      0|            return res;
  134|      0|        }
  135|       |
  136|    351|        bool b = Hacl_P256_dh_responder(derived, P->data + 1, key);
  137|       |
  138|    351|        if (!b) {
  ------------------
  |  Branch (138:13): [True: 0, False: 351]
  ------------------
  139|      0|            PORT_SetError(SEC_ERROR_BAD_KEY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  140|      0|            res = SECFailure;
  141|      0|            return res;
  142|      0|        }
  143|       |
  144|    351|        X->len = 32;
  145|    351|        memcpy(X->data, derived, 32);
  146|    351|    }
  147|       |
  148|    747|    return res;
  149|    747|}
ec_secp256r1_verify_digest:
  228|     62|{
  229|     62|    SECStatus res = SECSuccess;
  230|       |
  231|     62|    unsigned char _padded_sig_data[64] = { 0 };
  232|     62|    unsigned char *sig_r, *sig_s;
  233|       |
  234|     62|    if (!key || !signature || !digest ||
  ------------------
  |  Branch (234:9): [True: 0, False: 62]
  |  Branch (234:17): [True: 0, False: 62]
  |  Branch (234:31): [True: 0, False: 62]
  ------------------
  235|     62|        !key->publicValue.data ||
  ------------------
  |  Branch (235:9): [True: 0, False: 62]
  ------------------
  236|     62|        !signature->data || !digest->data ||
  ------------------
  |  Branch (236:9): [True: 0, False: 62]
  |  Branch (236:29): [True: 0, False: 62]
  ------------------
  237|     62|        key->ecParams.name != ECCurve_NIST_P256) {
  ------------------
  |  Branch (237:9): [True: 0, False: 62]
  ------------------
  238|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  239|      0|        res = SECFailure;
  240|      0|        return res;
  241|      0|    }
  242|       |
  243|     62|    unsigned int olen = key->ecParams.order.len;
  244|     62|    if (signature->len == 0 || signature->len % 2 != 0 ||
  ------------------
  |  Branch (244:9): [True: 0, False: 62]
  |  Branch (244:32): [True: 0, False: 62]
  ------------------
  245|     62|        signature->len > 2 * olen ||
  ------------------
  |  Branch (245:9): [True: 0, False: 62]
  ------------------
  246|     62|        digest->len == 0 || key->publicValue.len != 65) {
  ------------------
  |  Branch (246:9): [True: 0, False: 62]
  |  Branch (246:29): [True: 0, False: 62]
  ------------------
  247|      0|        PORT_SetError(SEC_ERROR_INPUT_LEN);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  248|      0|        res = SECFailure;
  249|      0|        return res;
  250|      0|    }
  251|       |
  252|     62|    if (key->publicValue.data[0] != EC_POINT_FORM_UNCOMPRESSED) {
  ------------------
  |  |   92|     62|#define EC_POINT_FORM_UNCOMPRESSED 0x04
  ------------------
  |  Branch (252:9): [True: 0, False: 62]
  ------------------
  253|      0|        PORT_SetError(SEC_ERROR_UNSUPPORTED_EC_POINT_FORM);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  254|      0|        res = SECFailure;
  255|      0|        return res;
  256|      0|    }
  257|       |
  258|       |    /* P-256 signature has to be 64 bytes long, pad it with 0s if it isn't */
  259|     62|    if (signature->len != 64) {
  ------------------
  |  Branch (259:9): [True: 0, False: 62]
  ------------------
  260|      0|        unsigned split = signature->len / 2;
  261|      0|        unsigned pad = 32 - split;
  262|       |
  263|      0|        unsigned char *o_sig = signature->data;
  264|      0|        unsigned char *p_sig = _padded_sig_data;
  265|       |
  266|      0|        memcpy(p_sig + pad, o_sig, split);
  267|      0|        memcpy(p_sig + 32 + pad, o_sig + split, split);
  268|       |
  269|      0|        sig_r = p_sig;
  270|      0|        sig_s = p_sig + 32;
  271|     62|    } else {
  272|     62|        sig_r = signature->data;
  273|     62|        sig_s = signature->data + 32;
  274|     62|    }
  275|       |
  276|     62|    uint8_t hash[32] = { 0 };
  277|     62|    if (digest->len < 32) {
  ------------------
  |  Branch (277:9): [True: 10, False: 52]
  ------------------
  278|     10|        memcpy(hash + 32 - digest->len, digest->data, digest->len);
  279|     52|    } else {
  280|     52|        memcpy(hash, digest->data, 32);
  281|     52|    }
  282|       |
  283|     62|    bool b = Hacl_P256_ecdsa_verif_without_hash(
  284|     62|        32, hash,
  285|     62|        key->publicValue.data + 1,
  286|     62|        sig_r, sig_s);
  287|     62|    if (!b) {
  ------------------
  |  Branch (287:9): [True: 62, False: 0]
  ------------------
  288|     62|        PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
  ------------------
  |  |   65|     62|#define PORT_SetError PORT_SetError_Util
  ------------------
  289|     62|        res = SECFailure;
  290|     62|        return res;
  291|     62|    }
  292|       |
  293|      0|    return res;
  294|     62|}

ec_secp384r1_pt_validate:
   21|    149|{
   22|    149|    SECStatus res = SECSuccess;
   23|    149|    if (!pt || !pt->data) {
  ------------------
  |  Branch (23:9): [True: 0, False: 149]
  |  Branch (23:16): [True: 0, False: 149]
  ------------------
   24|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
   25|      0|        res = SECFailure;
   26|      0|        return res;
   27|      0|    }
   28|       |
   29|    149|    if (pt->len != 97) {
  ------------------
  |  Branch (29:9): [True: 3, False: 146]
  ------------------
   30|      3|        PORT_SetError(SEC_ERROR_BAD_KEY);
  ------------------
  |  |   65|      3|#define PORT_SetError PORT_SetError_Util
  ------------------
   31|      3|        res = SECFailure;
   32|      3|        return res;
   33|      3|    }
   34|       |
   35|    146|    if (pt->data[0] != EC_POINT_FORM_UNCOMPRESSED) {
  ------------------
  |  |   92|    146|#define EC_POINT_FORM_UNCOMPRESSED 0x04
  ------------------
  |  Branch (35:9): [True: 4, False: 142]
  ------------------
   36|      4|        PORT_SetError(SEC_ERROR_UNSUPPORTED_EC_POINT_FORM);
  ------------------
  |  |   65|      4|#define PORT_SetError PORT_SetError_Util
  ------------------
   37|      4|        res = SECFailure;
   38|      4|        return res;
   39|      4|    }
   40|       |
   41|    142|    bool b = Hacl_P384_validate_public_key(pt->data + 1);
   42|       |
   43|    142|    if (!b) {
  ------------------
  |  Branch (43:9): [True: 49, False: 93]
  ------------------
   44|     49|        PORT_SetError(SEC_ERROR_BAD_KEY);
  ------------------
  |  |   65|     49|#define PORT_SetError PORT_SetError_Util
  ------------------
   45|     49|        res = SECFailure;
   46|     49|    }
   47|    142|    return res;
   48|    146|}
ec_secp384r1_scalar_validate:
   56|     54|{
   57|     54|    SECStatus res = SECSuccess;
   58|     54|    if (!scalar || !scalar->data) {
  ------------------
  |  Branch (58:9): [True: 0, False: 54]
  |  Branch (58:20): [True: 0, False: 54]
  ------------------
   59|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
   60|      0|        res = SECFailure;
   61|      0|        return res;
   62|      0|    }
   63|       |
   64|     54|    if (scalar->len != 48) {
  ------------------
  |  Branch (64:9): [True: 0, False: 54]
  ------------------
   65|      0|        PORT_SetError(SEC_ERROR_BAD_KEY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
   66|      0|        res = SECFailure;
   67|      0|        return res;
   68|      0|    }
   69|       |
   70|     54|    bool b = Hacl_P384_validate_private_key(scalar->data);
   71|       |
   72|     54|    if (!b) {
  ------------------
  |  Branch (72:9): [True: 0, False: 54]
  ------------------
   73|      0|        PORT_SetError(SEC_ERROR_BAD_KEY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
   74|      0|        res = SECFailure;
   75|      0|    }
   76|     54|    return res;
   77|     54|}
ec_secp384r1_pt_mul:
   87|     58|{
   88|     58|    SECStatus res = SECSuccess;
   89|     58|    if (!P) {
  ------------------
  |  Branch (89:9): [True: 54, False: 4]
  ------------------
   90|     54|        uint8_t derived[96] = { 0 };
   91|       |
   92|     54|        if (!X || !k || !X->data || !k->data ||
  ------------------
  |  Branch (92:13): [True: 0, False: 54]
  |  Branch (92:19): [True: 0, False: 54]
  |  Branch (92:25): [True: 0, False: 54]
  |  Branch (92:37): [True: 0, False: 54]
  ------------------
   93|     54|            X->len < 97 || k->len != 48) {
  ------------------
  |  Branch (93:13): [True: 0, False: 54]
  |  Branch (93:28): [True: 0, False: 54]
  ------------------
   94|      0|            PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
   95|      0|            res = SECFailure;
   96|      0|            return res;
   97|      0|        }
   98|       |
   99|     54|        bool b = Hacl_P384_dh_initiator(derived, k->data);
  100|       |
  101|     54|        if (!b) {
  ------------------
  |  Branch (101:13): [True: 0, False: 54]
  ------------------
  102|      0|            PORT_SetError(SEC_ERROR_BAD_KEY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  103|      0|            res = SECFailure;
  104|      0|            return res;
  105|      0|        }
  106|       |
  107|     54|        X->len = 97;
  108|     54|        X->data[0] = EC_POINT_FORM_UNCOMPRESSED;
  ------------------
  |  |   92|     54|#define EC_POINT_FORM_UNCOMPRESSED 0x04
  ------------------
  109|     54|        memcpy(X->data + 1, derived, 96);
  110|       |
  111|     54|    } else {
  112|      4|        uint8_t full_key[48] = { 0 };
  113|      4|        uint8_t *key;
  114|      4|        uint8_t derived[96] = { 0 };
  115|       |
  116|      4|        if (!X || !k || !P || !X->data || !k->data || !P->data ||
  ------------------
  |  Branch (116:13): [True: 0, False: 4]
  |  Branch (116:19): [True: 0, False: 4]
  |  Branch (116:25): [True: 0, False: 4]
  |  Branch (116:31): [True: 0, False: 4]
  |  Branch (116:43): [True: 0, False: 4]
  |  Branch (116:55): [True: 0, False: 4]
  ------------------
  117|      4|            X->len < 48 || P->len != 97 ||
  ------------------
  |  Branch (117:13): [True: 0, False: 4]
  |  Branch (117:28): [True: 0, False: 4]
  ------------------
  118|      4|            P->data[0] != EC_POINT_FORM_UNCOMPRESSED) {
  ------------------
  |  |   92|      4|#define EC_POINT_FORM_UNCOMPRESSED 0x04
  ------------------
  |  Branch (118:13): [True: 0, False: 4]
  ------------------
  119|      0|            PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  120|      0|            res = SECFailure;
  121|      0|            return res;
  122|      0|        }
  123|       |
  124|       |        /* We consider keys of up to size 48, or of size 49 with a single leading 0 */
  125|      4|        if (k->len < 48) {
  ------------------
  |  Branch (125:13): [True: 0, False: 4]
  ------------------
  126|      0|            memcpy(full_key + 48 - k->len, k->data, k->len);
  127|      0|            key = full_key;
  128|      4|        } else if (k->len == 48) {
  ------------------
  |  Branch (128:20): [True: 4, False: 0]
  ------------------
  129|      4|            key = k->data;
  130|      4|        } else if (k->len == 49 && k->data[0] == 0) {
  ------------------
  |  Branch (130:20): [True: 0, False: 0]
  |  Branch (130:36): [True: 0, False: 0]
  ------------------
  131|      0|            key = k->data + 1;
  132|      0|        } else {
  133|      0|            PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  134|      0|            res = SECFailure;
  135|      0|            return res;
  136|      0|        }
  137|       |
  138|      4|        bool b = Hacl_P384_dh_responder(derived, P->data + 1, key);
  139|       |
  140|      4|        if (!b) {
  ------------------
  |  Branch (140:13): [True: 0, False: 4]
  ------------------
  141|      0|            PORT_SetError(SEC_ERROR_BAD_KEY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  142|      0|            res = SECFailure;
  143|      0|            return res;
  144|      0|        }
  145|       |
  146|      4|        X->len = 48;
  147|      4|        memcpy(X->data, derived, 48);
  148|      4|    }
  149|       |
  150|     58|    return res;
  151|     58|}
ec_secp384r1_verify_digest:
  230|     33|{
  231|     33|    SECStatus res = SECSuccess;
  232|       |
  233|     33|    if (!key || !signature || !digest ||
  ------------------
  |  Branch (233:9): [True: 0, False: 33]
  |  Branch (233:17): [True: 0, False: 33]
  |  Branch (233:31): [True: 0, False: 33]
  ------------------
  234|     33|        !key->publicValue.data ||
  ------------------
  |  Branch (234:9): [True: 0, False: 33]
  ------------------
  235|     33|        !signature->data || !digest->data ||
  ------------------
  |  Branch (235:9): [True: 0, False: 33]
  |  Branch (235:29): [True: 0, False: 33]
  ------------------
  236|     33|        key->ecParams.name != ECCurve_NIST_P384) {
  ------------------
  |  Branch (236:9): [True: 0, False: 33]
  ------------------
  237|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  238|      0|        res = SECFailure;
  239|      0|        return res;
  240|      0|    }
  241|       |
  242|     33|    if (signature->len == 0 || signature->len % 2 != 0 ||
  ------------------
  |  Branch (242:9): [True: 0, False: 33]
  |  Branch (242:32): [True: 0, False: 33]
  ------------------
  243|     33|        signature->len > 96 || digest->len == 0 ||
  ------------------
  |  Branch (243:9): [True: 0, False: 33]
  |  Branch (243:32): [True: 0, False: 33]
  ------------------
  244|     33|        key->publicValue.len != 97) {
  ------------------
  |  Branch (244:9): [True: 0, False: 33]
  ------------------
  245|      0|        PORT_SetError(SEC_ERROR_INPUT_LEN);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  246|      0|        res = SECFailure;
  247|      0|        return res;
  248|      0|    }
  249|       |
  250|     33|    if (key->publicValue.data[0] != EC_POINT_FORM_UNCOMPRESSED) {
  ------------------
  |  |   92|     33|#define EC_POINT_FORM_UNCOMPRESSED 0x04
  ------------------
  |  Branch (250:9): [True: 0, False: 33]
  ------------------
  251|      0|        PORT_SetError(SEC_ERROR_UNSUPPORTED_EC_POINT_FORM);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  252|      0|        res = SECFailure;
  253|      0|        return res;
  254|      0|    }
  255|       |
  256|       |    // Signatures should be 96 bytes, but some software produces short signatures.
  257|       |    // Pad components with zeros if necessary.
  258|     33|    uint8_t paddedSigData[96] = { 0 };
  259|     33|    uint8_t *sig;
  260|     33|    if (signature->len != 96) {
  ------------------
  |  Branch (260:9): [True: 0, False: 33]
  ------------------
  261|      0|        size_t split = signature->len / 2;
  262|       |
  263|      0|        memcpy(paddedSigData + 48 - split, signature->data, split);
  264|      0|        memcpy(paddedSigData + 96 - split, signature->data + split, split);
  265|       |
  266|      0|        sig = paddedSigData;
  267|     33|    } else {
  268|     33|        sig = signature->data;
  269|     33|    }
  270|       |
  271|     33|    uint8_t hash[48] = { 0 };
  272|     33|    if (digest->len < 48) {
  ------------------
  |  Branch (272:9): [True: 18, False: 15]
  ------------------
  273|     18|        memcpy(hash + 48 - digest->len, digest->data, digest->len);
  274|     18|    } else {
  275|     15|        memcpy(hash, digest->data, 48);
  276|     15|    }
  277|       |
  278|     33|    bool b = Hacl_P384_ecdsa_verif_without_hash(
  279|     33|        48, hash, key->publicValue.data + 1, sig, sig + 48);
  280|     33|    if (!b) {
  ------------------
  |  Branch (280:9): [True: 33, False: 0]
  ------------------
  281|     33|        PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
  ------------------
  |  |   65|     33|#define PORT_SetError PORT_SetError_Util
  ------------------
  282|     33|        res = SECFailure;
  283|     33|        return res;
  284|     33|    }
  285|       |
  286|      0|    return res;
  287|     33|}

ec_secp521r1_pt_validate:
   21|    124|{
   22|    124|    SECStatus res = SECSuccess;
   23|    124|    if (!pt || !pt->data) {
  ------------------
  |  Branch (23:9): [True: 0, False: 124]
  |  Branch (23:16): [True: 0, False: 124]
  ------------------
   24|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
   25|      0|        res = SECFailure;
   26|      0|        return res;
   27|      0|    }
   28|       |
   29|    124|    if (pt->len != 133) {
  ------------------
  |  Branch (29:9): [True: 2, False: 122]
  ------------------
   30|      2|        PORT_SetError(SEC_ERROR_BAD_KEY);
  ------------------
  |  |   65|      2|#define PORT_SetError PORT_SetError_Util
  ------------------
   31|      2|        res = SECFailure;
   32|      2|        return res;
   33|      2|    }
   34|       |
   35|    122|    if (pt->data[0] != EC_POINT_FORM_UNCOMPRESSED) {
  ------------------
  |  |   92|    122|#define EC_POINT_FORM_UNCOMPRESSED 0x04
  ------------------
  |  Branch (35:9): [True: 6, False: 116]
  ------------------
   36|      6|        PORT_SetError(SEC_ERROR_UNSUPPORTED_EC_POINT_FORM);
  ------------------
  |  |   65|      6|#define PORT_SetError PORT_SetError_Util
  ------------------
   37|      6|        res = SECFailure;
   38|      6|        return res;
   39|      6|    }
   40|       |
   41|    116|    bool b = Hacl_P521_validate_public_key(pt->data + 1);
   42|       |
   43|    116|    if (!b) {
  ------------------
  |  Branch (43:9): [True: 24, False: 92]
  ------------------
   44|     24|        PORT_SetError(SEC_ERROR_BAD_KEY);
  ------------------
  |  |   65|     24|#define PORT_SetError PORT_SetError_Util
  ------------------
   45|     24|        res = SECFailure;
   46|     24|    }
   47|    116|    return res;
   48|    122|}
ec_secp521r1_scalar_validate:
   56|     40|{
   57|     40|    SECStatus res = SECSuccess;
   58|     40|    if (!scalar || !scalar->data) {
  ------------------
  |  Branch (58:9): [True: 0, False: 40]
  |  Branch (58:20): [True: 0, False: 40]
  ------------------
   59|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
   60|      0|        res = SECFailure;
   61|      0|        return res;
   62|      0|    }
   63|       |
   64|     40|    if (scalar->len != 66) {
  ------------------
  |  Branch (64:9): [True: 0, False: 40]
  ------------------
   65|      0|        PORT_SetError(SEC_ERROR_BAD_KEY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
   66|      0|        res = SECFailure;
   67|      0|        return res;
   68|      0|    }
   69|       |
   70|     40|    bool b = Hacl_P521_validate_private_key(scalar->data);
   71|       |
   72|     40|    if (!b) {
  ------------------
  |  Branch (72:9): [True: 0, False: 40]
  ------------------
   73|      0|        PORT_SetError(SEC_ERROR_BAD_KEY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
   74|      0|        res = SECFailure;
   75|      0|    }
   76|     40|    return res;
   77|     40|}
ec_secp521r1_pt_mul:
   87|     47|{
   88|     47|    SECStatus res = SECSuccess;
   89|     47|    if (!P) {
  ------------------
  |  Branch (89:9): [True: 40, False: 7]
  ------------------
   90|     40|        uint8_t derived[132] = { 0 };
   91|       |
   92|     40|        if (!X || !k || !X->data || !k->data ||
  ------------------
  |  Branch (92:13): [True: 0, False: 40]
  |  Branch (92:19): [True: 0, False: 40]
  |  Branch (92:25): [True: 0, False: 40]
  |  Branch (92:37): [True: 0, False: 40]
  ------------------
   93|     40|            X->len < 133 || k->len != 66) {
  ------------------
  |  Branch (93:13): [True: 0, False: 40]
  |  Branch (93:29): [True: 0, False: 40]
  ------------------
   94|      0|            PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
   95|      0|            res = SECFailure;
   96|      0|            return res;
   97|      0|        }
   98|       |
   99|     40|        bool b = Hacl_P521_dh_initiator(derived, k->data);
  100|       |
  101|     40|        if (!b) {
  ------------------
  |  Branch (101:13): [True: 0, False: 40]
  ------------------
  102|      0|            PORT_SetError(SEC_ERROR_BAD_KEY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  103|      0|            res = SECFailure;
  104|      0|            return res;
  105|      0|        }
  106|       |
  107|     40|        X->len = 133;
  108|     40|        X->data[0] = EC_POINT_FORM_UNCOMPRESSED;
  ------------------
  |  |   92|     40|#define EC_POINT_FORM_UNCOMPRESSED 0x04
  ------------------
  109|     40|        memcpy(X->data + 1, derived, 132);
  110|       |
  111|     40|    } else {
  112|      7|        uint8_t full_key[66] = { 0 };
  113|      7|        uint8_t *key;
  114|      7|        uint8_t derived[132] = { 0 };
  115|       |
  116|      7|        if (!X || !k || !P || !X->data || !k->data || !P->data ||
  ------------------
  |  Branch (116:13): [True: 0, False: 7]
  |  Branch (116:19): [True: 0, False: 7]
  |  Branch (116:25): [True: 0, False: 7]
  |  Branch (116:31): [True: 0, False: 7]
  |  Branch (116:43): [True: 0, False: 7]
  |  Branch (116:55): [True: 0, False: 7]
  ------------------
  117|      7|            X->len < 66 || P->len != 133 ||
  ------------------
  |  Branch (117:13): [True: 0, False: 7]
  |  Branch (117:28): [True: 0, False: 7]
  ------------------
  118|      7|            P->data[0] != EC_POINT_FORM_UNCOMPRESSED) {
  ------------------
  |  |   92|      7|#define EC_POINT_FORM_UNCOMPRESSED 0x04
  ------------------
  |  Branch (118:13): [True: 0, False: 7]
  ------------------
  119|      0|            PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  120|      0|            res = SECFailure;
  121|      0|            return res;
  122|      0|        }
  123|       |
  124|       |        /* We consider keys of up to size 66, or of size 67 with a single leading 0 */
  125|      7|        if (k->len < 66) {
  ------------------
  |  Branch (125:13): [True: 0, False: 7]
  ------------------
  126|      0|            memcpy(full_key + 66 - k->len, k->data, k->len);
  127|      0|            key = full_key;
  128|      7|        } else if (k->len == 66) {
  ------------------
  |  Branch (128:20): [True: 7, False: 0]
  ------------------
  129|      7|            key = k->data;
  130|      7|        } else if (k->len == 67 && k->data[0] == 0) {
  ------------------
  |  Branch (130:20): [True: 0, False: 0]
  |  Branch (130:36): [True: 0, False: 0]
  ------------------
  131|      0|            key = k->data + 1;
  132|      0|        } else {
  133|      0|            PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  134|      0|            res = SECFailure;
  135|      0|            return res;
  136|      0|        }
  137|       |
  138|      7|        bool b = Hacl_P521_dh_responder(derived, P->data + 1, key);
  139|       |
  140|      7|        if (!b) {
  ------------------
  |  Branch (140:13): [True: 0, False: 7]
  ------------------
  141|      0|            PORT_SetError(SEC_ERROR_BAD_KEY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  142|      0|            res = SECFailure;
  143|      0|            return res;
  144|      0|        }
  145|       |
  146|      7|        X->len = 66;
  147|      7|        memcpy(X->data, derived, 66);
  148|      7|    }
  149|       |
  150|     47|    return res;
  151|     47|}
ec_secp521r1_verify_digest:
  232|     44|{
  233|     44|    SECStatus res = SECSuccess;
  234|       |
  235|     44|    if (!key || !signature || !digest ||
  ------------------
  |  Branch (235:9): [True: 0, False: 44]
  |  Branch (235:17): [True: 0, False: 44]
  |  Branch (235:31): [True: 0, False: 44]
  ------------------
  236|     44|        !key->publicValue.data ||
  ------------------
  |  Branch (236:9): [True: 0, False: 44]
  ------------------
  237|     44|        !signature->data || !digest->data ||
  ------------------
  |  Branch (237:9): [True: 0, False: 44]
  |  Branch (237:29): [True: 0, False: 44]
  ------------------
  238|     44|        key->ecParams.name != ECCurve_NIST_P521) {
  ------------------
  |  Branch (238:9): [True: 0, False: 44]
  ------------------
  239|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  240|      0|        res = SECFailure;
  241|      0|        return res;
  242|      0|    }
  243|       |
  244|     44|    if (signature->len == 0 || signature->len % 2 != 0 ||
  ------------------
  |  Branch (244:9): [True: 0, False: 44]
  |  Branch (244:32): [True: 0, False: 44]
  ------------------
  245|     44|        signature->len > 132 || digest->len == 0 ||
  ------------------
  |  Branch (245:9): [True: 0, False: 44]
  |  Branch (245:33): [True: 0, False: 44]
  ------------------
  246|     44|        key->publicValue.len != 133) {
  ------------------
  |  Branch (246:9): [True: 0, False: 44]
  ------------------
  247|      0|        PORT_SetError(SEC_ERROR_INPUT_LEN);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  248|      0|        res = SECFailure;
  249|      0|        return res;
  250|      0|    }
  251|       |
  252|     44|    if (key->publicValue.data[0] != EC_POINT_FORM_UNCOMPRESSED) {
  ------------------
  |  |   92|     44|#define EC_POINT_FORM_UNCOMPRESSED 0x04
  ------------------
  |  Branch (252:9): [True: 0, False: 44]
  ------------------
  253|      0|        PORT_SetError(SEC_ERROR_UNSUPPORTED_EC_POINT_FORM);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  254|      0|        res = SECFailure;
  255|      0|        return res;
  256|      0|    }
  257|       |
  258|       |    // Signatures should be 132 bytes, but some software produces short signatures.
  259|       |    // Pad components with zeros if necessary.
  260|     44|    uint8_t paddedSigData[132] = { 0 };
  261|     44|    uint8_t *sig;
  262|     44|    if (signature->len != 132) {
  ------------------
  |  Branch (262:9): [True: 0, False: 44]
  ------------------
  263|      0|        size_t split = signature->len / 2;
  264|       |
  265|      0|        memcpy(paddedSigData + 66 - split, signature->data, split);
  266|      0|        memcpy(paddedSigData + 132 - split, signature->data + split, split);
  267|       |
  268|      0|        sig = paddedSigData;
  269|     44|    } else {
  270|     44|        sig = signature->data;
  271|     44|    }
  272|       |
  273|     44|    uint8_t hash[66] = { 0 };
  274|     44|    if (digest->len < 66) {
  ------------------
  |  Branch (274:9): [True: 44, False: 0]
  ------------------
  275|     44|        memcpy(hash + 66 - digest->len, digest->data, digest->len);
  276|     44|    } else {
  277|       |        // SEC 1 takes the most significant ceil(log(n)) bits of hash output when the hash output is longer than log(n).
  278|      0|        hash[0] = digest->data[0] >> 7;
  279|      0|        for (size_t i = 1; i < 66; i++) {
  ------------------
  |  Branch (279:28): [True: 0, False: 0]
  ------------------
  280|      0|            hash[i] = (digest->data[i - 1] << 1) | (digest->data[i] >> 7);
  281|      0|        }
  282|      0|    }
  283|       |
  284|     44|    bool b = Hacl_P521_ecdsa_verif_without_hash(
  285|     44|        66, hash, key->publicValue.data + 1, sig, sig + 66);
  286|     44|    if (!b) {
  ------------------
  |  Branch (286:9): [True: 44, False: 0]
  ------------------
  287|     44|        PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
  ------------------
  |  |   65|     44|#define PORT_SetError PORT_SetError_Util
  ------------------
  288|     44|        res = SECFailure;
  289|     44|        return res;
  290|     44|    }
  291|       |
  292|      0|    return res;
  293|     44|}

gcm_HashWrite_hw:
   25|  6.38k|{
   26|  6.38k|    uint64_t tmp_out[2];
   27|  6.38k|    _mm_storeu_si128((__m128i *)tmp_out, ghash->x);
   28|       |    /* maxout must be larger than 16 byte (checked by the caller). */
   29|  6.38k|    WRITE64(tmp_out[0], outbuf + 8);
  ------------------
  |  |   14|  6.38k|    (bytes)[0] = (x) >> 56; \
  |  |   15|  6.38k|    (bytes)[1] = (x) >> 48; \
  |  |   16|  6.38k|    (bytes)[2] = (x) >> 40; \
  |  |   17|  6.38k|    (bytes)[3] = (x) >> 32; \
  |  |   18|  6.38k|    (bytes)[4] = (x) >> 24; \
  |  |   19|  6.38k|    (bytes)[5] = (x) >> 16; \
  |  |   20|  6.38k|    (bytes)[6] = (x) >> 8;  \
  |  |   21|  6.38k|    (bytes)[7] = (x);
  ------------------
   30|  6.38k|    WRITE64(tmp_out[1], outbuf);
  ------------------
  |  |   14|  6.38k|    (bytes)[0] = (x) >> 56; \
  |  |   15|  6.38k|    (bytes)[1] = (x) >> 48; \
  |  |   16|  6.38k|    (bytes)[2] = (x) >> 40; \
  |  |   17|  6.38k|    (bytes)[3] = (x) >> 32; \
  |  |   18|  6.38k|    (bytes)[4] = (x) >> 24; \
  |  |   19|  6.38k|    (bytes)[5] = (x) >> 16; \
  |  |   20|  6.38k|    (bytes)[6] = (x) >> 8;  \
  |  |   21|  6.38k|    (bytes)[7] = (x);
  ------------------
   31|  6.38k|    return SECSuccess;
   32|  6.38k|}
gcm_HashMult_hw:
   37|  15.2k|{
   38|  15.2k|    size_t i;
   39|  15.2k|    pre_align __m128i z_high post_align;
   40|  15.2k|    pre_align __m128i z_low post_align;
   41|  15.2k|    pre_align __m128i C post_align;
   42|  15.2k|    pre_align __m128i D post_align;
   43|  15.2k|    pre_align __m128i E post_align;
   44|  15.2k|    pre_align __m128i F post_align;
   45|  15.2k|    pre_align __m128i bin post_align;
   46|  15.2k|    pre_align __m128i Ci post_align;
   47|  15.2k|    pre_align __m128i tmp post_align;
   48|       |
   49|  52.1k|    for (i = 0; i < count; i++, buf += 16) {
  ------------------
  |  Branch (49:17): [True: 36.9k, False: 15.2k]
  ------------------
   50|  36.9k|        bin = _mm_set_epi16(((uint16_t)buf[0] << 8) | buf[1],
   51|  36.9k|                            ((uint16_t)buf[2] << 8) | buf[3],
   52|  36.9k|                            ((uint16_t)buf[4] << 8) | buf[5],
   53|  36.9k|                            ((uint16_t)buf[6] << 8) | buf[7],
   54|  36.9k|                            ((uint16_t)buf[8] << 8) | buf[9],
   55|  36.9k|                            ((uint16_t)buf[10] << 8) | buf[11],
   56|  36.9k|                            ((uint16_t)buf[12] << 8) | buf[13],
   57|  36.9k|                            ((uint16_t)buf[14] << 8) | buf[15]);
   58|  36.9k|        Ci = _mm_xor_si128(bin, ghash->x);
   59|       |
   60|       |        /* Do binary mult ghash->X = Ci * ghash->H. */
   61|  36.9k|        C = _mm_clmulepi64_si128(Ci, ghash->h, 0x00);
   62|  36.9k|        D = _mm_clmulepi64_si128(Ci, ghash->h, 0x11);
   63|  36.9k|        E = _mm_clmulepi64_si128(Ci, ghash->h, 0x01);
   64|  36.9k|        F = _mm_clmulepi64_si128(Ci, ghash->h, 0x10);
   65|  36.9k|        tmp = _mm_xor_si128(E, F);
   66|  36.9k|        z_high = _mm_xor_si128(tmp, _mm_slli_si128(D, 8));
   67|  36.9k|        z_high = _mm_unpackhi_epi64(z_high, D);
   68|  36.9k|        z_low = _mm_xor_si128(_mm_slli_si128(tmp, 8), C);
   69|  36.9k|        z_low = _mm_unpackhi_epi64(_mm_slli_si128(C, 8), z_low);
   70|       |
   71|       |        /* Shift one to the left (multiply by x) as gcm spec is stupid. */
   72|  36.9k|        C = _mm_slli_si128(z_low, 8);
   73|  36.9k|        E = _mm_srli_epi64(C, 63);
   74|  36.9k|        D = _mm_slli_si128(z_high, 8);
   75|  36.9k|        F = _mm_srli_epi64(D, 63);
   76|       |        /* Carry over */
   77|  36.9k|        C = _mm_srli_si128(z_low, 8);
   78|  36.9k|        D = _mm_srli_epi64(C, 63);
   79|  36.9k|        z_low = _mm_or_si128(_mm_slli_epi64(z_low, 1), E);
   80|  36.9k|        z_high = _mm_or_si128(_mm_or_si128(_mm_slli_epi64(z_high, 1), F), D);
   81|       |
   82|       |        /* Reduce */
   83|  36.9k|        C = _mm_slli_si128(z_low, 8);
   84|       |        /* D = z_low << 127 */
   85|  36.9k|        D = _mm_slli_epi64(C, 63);
   86|       |        /* E = z_low << 126 */
   87|  36.9k|        E = _mm_slli_epi64(C, 62);
   88|       |        /* F = z_low << 121 */
   89|  36.9k|        F = _mm_slli_epi64(C, 57);
   90|       |        /* z_low ^= (z_low << 127) ^ (z_low << 126) ^ (z_low << 121); */
   91|  36.9k|        z_low = _mm_xor_si128(_mm_xor_si128(_mm_xor_si128(z_low, D), E), F);
   92|  36.9k|        C = _mm_srli_si128(z_low, 8);
   93|       |        /* D = z_low >> 1 */
   94|  36.9k|        D = _mm_slli_epi64(C, 63);
   95|  36.9k|        D = _mm_or_si128(_mm_srli_epi64(z_low, 1), D);
   96|       |        /* E = z_low >> 2 */
   97|  36.9k|        E = _mm_slli_epi64(C, 62);
   98|  36.9k|        E = _mm_or_si128(_mm_srli_epi64(z_low, 2), E);
   99|       |        /* F = z_low >> 7 */
  100|  36.9k|        F = _mm_slli_epi64(C, 57);
  101|  36.9k|        F = _mm_or_si128(_mm_srli_epi64(z_low, 7), F);
  102|       |        /* ghash->x ^= z_low ^ (z_low >> 1) ^ (z_low >> 2) ^ (z_low >> 7); */
  103|  36.9k|        ghash->x = _mm_xor_si128(_mm_xor_si128(
  104|  36.9k|                                     _mm_xor_si128(_mm_xor_si128(z_high, z_low), D), E),
  105|  36.9k|                                 F);
  106|  36.9k|    }
  107|  15.2k|    return SECSuccess;
  108|  15.2k|}
gcm_HashInit_hw:
  112|  1.63k|{
  113|  1.63k|    ghash->ghash_mul = gcm_HashMult_hw;
  114|  1.63k|    ghash->x = _mm_setzero_si128();
  115|       |    /* MSVC requires __m64 to load epi64. */
  116|  1.63k|    ghash->h = _mm_set_epi32(ghash->h_high >> 32, (uint32_t)ghash->h_high,
  117|  1.63k|                             ghash->h_low >> 32, (uint32_t)ghash->h_low);
  118|  1.63k|    ghash->hw = PR_TRUE;
  ------------------
  |  |  437|  1.63k|#define PR_TRUE 1
  ------------------
  119|  1.63k|    return SECSuccess;
  120|  1.63k|}
gcm_HashZeroX_hw:
  124|  6.38k|{
  125|  6.38k|    ghash->x = _mm_setzero_si128();
  126|  6.38k|    return SECSuccess;
  127|  6.38k|}

get64:
   81|  3.27k|{
   82|  3.27k|    return ((uint64_t)bytes[0]) << 56 |
   83|  3.27k|           ((uint64_t)bytes[1]) << 48 |
   84|  3.27k|           ((uint64_t)bytes[2]) << 40 |
   85|  3.27k|           ((uint64_t)bytes[3]) << 32 |
   86|  3.27k|           ((uint64_t)bytes[4]) << 24 |
   87|  3.27k|           ((uint64_t)bytes[5]) << 16 |
   88|  3.27k|           ((uint64_t)bytes[6]) << 8 |
   89|  3.27k|           ((uint64_t)bytes[7]);
   90|  3.27k|}
gcmHash_InitContext:
   95|  1.63k|{
   96|  1.63k|    SECStatus rv = SECSuccess;
   97|       |
   98|  1.63k|    ghash->cLen = 0;
   99|  1.63k|    ghash->bufLen = 0;
  100|  1.63k|    PORT_Memset(ghash->counterBuf, 0, sizeof(ghash->counterBuf));
  ------------------
  |  |  182|  1.63k|#define PORT_Memset memset
  ------------------
  101|       |
  102|  1.63k|    ghash->h_low = get64(H + 8);
  103|  1.63k|    ghash->h_high = get64(H);
  104|       |#ifdef USE_ARM_GCM
  105|       |#if defined(__aarch64__)
  106|       |    if (arm_pmull_support() && !sw) {
  107|       |#else
  108|       |    if (arm_neon_support() && !sw) {
  109|       |#endif
  110|       |#elif defined(USE_PPC_CRYPTO)
  111|       |    if (ppc_crypto_support() && !sw) {
  112|       |#else
  113|  1.63k|    if (clmul_support() && !sw) {
  ------------------
  |  Branch (113:9): [True: 1.63k, False: 0]
  |  Branch (113:28): [True: 1.63k, False: 0]
  ------------------
  114|  1.63k|#endif
  115|  1.63k|        rv = gcm_HashInit_hw(ghash);
  116|  1.63k|    } else {
  117|       |/* We fall back to the software implementation if we can't use / don't
  118|       | * want to use pclmul. */
  119|      0|#ifdef HAVE_INT128_SUPPORT
  120|      0|        ghash->ghash_mul = gcm_HashMult_sftw;
  121|       |#else
  122|       |        ghash->ghash_mul = gcm_HashMult_sftw32;
  123|       |#endif
  124|      0|        ghash->x_high = ghash->x_low = 0;
  125|      0|        ghash->hw = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  126|      0|    }
  127|  1.63k|    return rv;
  128|  1.63k|}
gcmHash_Update:
  356|  12.7k|{
  357|  12.7k|    unsigned int blocks;
  358|  12.7k|    SECStatus rv;
  359|       |
  360|  12.7k|    ghash->cLen += (len * PR_BITS_PER_BYTE);
  ------------------
  |  |  286|  12.7k|#define PR_BITS_PER_BYTE    8
  ------------------
  361|       |
  362|       |    /* first deal with the current buffer of data. Try to fill it out so
  363|       |     * we can hash it */
  364|  12.7k|    if (ghash->bufLen) {
  ------------------
  |  Branch (364:9): [True: 0, False: 12.7k]
  ------------------
  365|      0|        unsigned int needed = PR_MIN(len, AES_BLOCK_SIZE - ghash->bufLen);
  ------------------
  |  |  158|      0|#define PR_MIN(x,y)     ((x)<(y)?(x):(y))
  |  |  ------------------
  |  |  |  Branch (158:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  366|      0|        if (needed != 0) {
  ------------------
  |  Branch (366:13): [True: 0, False: 0]
  ------------------
  367|      0|            PORT_Memcpy(ghash->buffer + ghash->bufLen, buf, needed);
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
  368|      0|        }
  369|      0|        buf += needed;
  370|      0|        len -= needed;
  371|      0|        ghash->bufLen += needed;
  372|      0|        if (len == 0) {
  ------------------
  |  Branch (372:13): [True: 0, False: 0]
  ------------------
  373|       |            /* didn't add enough to hash the data, nothing more do do */
  374|      0|            return SECSuccess;
  375|      0|        }
  376|      0|        PORT_Assert(ghash->bufLen == AES_BLOCK_SIZE);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  377|       |        /* hash the buffer and clear it */
  378|      0|        rv = ghash->ghash_mul(ghash, ghash->buffer, 1);
  379|      0|        PORT_Memset(ghash->buffer, 0, AES_BLOCK_SIZE);
  ------------------
  |  |  182|      0|#define PORT_Memset memset
  ------------------
                      PORT_Memset(ghash->buffer, 0, AES_BLOCK_SIZE);
  ------------------
  |  |  130|      0|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  380|      0|        ghash->bufLen = 0;
  381|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (381:13): [True: 0, False: 0]
  ------------------
  382|      0|            return SECFailure;
  383|      0|        }
  384|      0|    }
  385|       |    /* now hash any full blocks remaining in the data stream */
  386|  12.7k|    blocks = len / AES_BLOCK_SIZE;
  ------------------
  |  |  130|  12.7k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  387|  12.7k|    if (blocks) {
  ------------------
  |  Branch (387:9): [True: 396, False: 12.3k]
  ------------------
  388|    396|        rv = ghash->ghash_mul(ghash, buf, blocks);
  389|    396|        if (rv != SECSuccess) {
  ------------------
  |  Branch (389:13): [True: 0, False: 396]
  ------------------
  390|      0|            return SECFailure;
  391|      0|        }
  392|    396|        buf += blocks * AES_BLOCK_SIZE;
  ------------------
  |  |  130|    396|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  393|    396|        len -= blocks * AES_BLOCK_SIZE;
  ------------------
  |  |  130|    396|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  394|    396|    }
  395|       |
  396|       |    /* save any remainder in the buffer to be hashed with the next call */
  397|  12.7k|    if (len != 0) {
  ------------------
  |  Branch (397:9): [True: 8.48k, False: 4.29k]
  ------------------
  398|  8.48k|        PORT_Memcpy(ghash->buffer, buf, len);
  ------------------
  |  |  180|  8.48k|#define PORT_Memcpy memcpy
  ------------------
  399|  8.48k|        ghash->bufLen = len;
  400|  8.48k|    }
  401|  12.7k|    return SECSuccess;
  402|  12.7k|}
gcmHash_Final:
  454|  6.38k|{
  455|  6.38k|    unsigned char T[MAX_BLOCK_SIZE];
  456|  6.38k|    SECStatus rv;
  457|       |
  458|  6.38k|    rv = gcmHash_Sync(ghash);
  459|  6.38k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (459:9): [True: 0, False: 6.38k]
  ------------------
  460|      0|        goto cleanup;
  461|      0|    }
  462|       |
  463|  6.38k|    rv = ghash->ghash_mul(ghash, ghash->counterBuf,
  464|  6.38k|                          (GCM_HASH_LEN_LEN * 2) / AES_BLOCK_SIZE);
  ------------------
  |  |   78|  6.38k|#define GCM_HASH_LEN_LEN 8 /* gcm hash defines lengths to be 64 bits */
  ------------------
                                        (GCM_HASH_LEN_LEN * 2) / AES_BLOCK_SIZE);
  ------------------
  |  |  130|  6.38k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  465|  6.38k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (465:9): [True: 0, False: 6.38k]
  ------------------
  466|      0|        goto cleanup;
  467|      0|    }
  468|       |
  469|  6.38k|    if (ghash->hw) {
  ------------------
  |  Branch (469:9): [True: 6.38k, False: 0]
  ------------------
  470|  6.38k|        rv = gcm_HashWrite_hw(ghash, T);
  471|  6.38k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (471:13): [True: 0, False: 6.38k]
  ------------------
  472|      0|            goto cleanup;
  473|      0|        }
  474|  6.38k|    } else {
  475|      0|        WRITE64(ghash->x_low, T + 8);
  ------------------
  |  |  438|      0|    (bytes)[0] = (x) >> 56; \
  |  |  439|      0|    (bytes)[1] = (x) >> 48; \
  |  |  440|      0|    (bytes)[2] = (x) >> 40; \
  |  |  441|      0|    (bytes)[3] = (x) >> 32; \
  |  |  442|      0|    (bytes)[4] = (x) >> 24; \
  |  |  443|      0|    (bytes)[5] = (x) >> 16; \
  |  |  444|      0|    (bytes)[6] = (x) >> 8;  \
  |  |  445|      0|    (bytes)[7] = (x);
  ------------------
  476|      0|        WRITE64(ghash->x_high, T);
  ------------------
  |  |  438|      0|    (bytes)[0] = (x) >> 56; \
  |  |  439|      0|    (bytes)[1] = (x) >> 48; \
  |  |  440|      0|    (bytes)[2] = (x) >> 40; \
  |  |  441|      0|    (bytes)[3] = (x) >> 32; \
  |  |  442|      0|    (bytes)[4] = (x) >> 24; \
  |  |  443|      0|    (bytes)[5] = (x) >> 16; \
  |  |  444|      0|    (bytes)[6] = (x) >> 8;  \
  |  |  445|      0|    (bytes)[7] = (x);
  ------------------
  477|      0|    }
  478|       |
  479|  6.38k|    if (maxout > AES_BLOCK_SIZE) {
  ------------------
  |  |  130|  6.38k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  |  Branch (479:9): [True: 0, False: 6.38k]
  ------------------
  480|      0|        maxout = AES_BLOCK_SIZE;
  ------------------
  |  |  130|      0|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  481|      0|    }
  482|  6.38k|    PORT_Memcpy(outbuf, T, maxout);
  ------------------
  |  |  180|  6.38k|#define PORT_Memcpy memcpy
  ------------------
  483|  6.38k|    *outlen = maxout;
  484|  6.38k|    rv = SECSuccess;
  485|       |
  486|  6.38k|cleanup:
  487|  6.38k|    PORT_SafeZero(T, sizeof(T));
  488|  6.38k|    return rv;
  489|  6.38k|}
gcmHash_Reset:
  494|  6.38k|{
  495|  6.38k|    SECStatus rv;
  496|       |
  497|       |    // Limit AADLen in accordance with SP800-38D
  498|  6.38k|    if (sizeof(AADLen) >= 8) {
  ------------------
  |  Branch (498:9): [Folded - Ignored]
  ------------------
  499|      0|        unsigned long long AADLen_ull = AADLen;
  500|      0|        if (AADLen_ull > (1ULL << 61) - 1) {
  ------------------
  |  Branch (500:13): [True: 0, False: 0]
  ------------------
  501|      0|            PORT_SetError(SEC_ERROR_INPUT_LEN);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  502|      0|            return SECFailure;
  503|      0|        }
  504|      0|    }
  505|       |
  506|  6.38k|    ghash->cLen = 0;
  507|  6.38k|    PORT_Memset(ghash->counterBuf, 0, GCM_HASH_LEN_LEN * 2);
  ------------------
  |  |  182|  6.38k|#define PORT_Memset memset
  ------------------
                  PORT_Memset(ghash->counterBuf, 0, GCM_HASH_LEN_LEN * 2);
  ------------------
  |  |   78|  6.38k|#define GCM_HASH_LEN_LEN 8 /* gcm hash defines lengths to be 64 bits */
  ------------------
  508|  6.38k|    ghash->bufLen = 0;
  509|  6.38k|    rv = gcm_zeroX(ghash);
  510|  6.38k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (510:9): [True: 0, False: 6.38k]
  ------------------
  511|      0|        return rv;
  512|      0|    }
  513|       |
  514|       |    /* now kick things off by hashing the Additional Authenticated Data */
  515|  6.38k|    if (AADLen != 0) {
  ------------------
  |  Branch (515:9): [True: 6.38k, False: 0]
  ------------------
  516|  6.38k|        rv = gcmHash_Update(ghash, AAD, AADLen);
  517|  6.38k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (517:13): [True: 0, False: 6.38k]
  ------------------
  518|      0|            return SECFailure;
  519|      0|        }
  520|  6.38k|        rv = gcmHash_Sync(ghash);
  521|  6.38k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (521:13): [True: 0, False: 6.38k]
  ------------------
  522|      0|            return SECFailure;
  523|      0|        }
  524|  6.38k|    }
  525|  6.38k|    return SECSuccess;
  526|  6.38k|}
GCM_CreateContext:
  551|  1.63k|{
  552|  1.63k|    GCMContext *gcm = NULL;
  553|  1.63k|    gcmHashContext *ghash = NULL;
  554|  1.63k|    unsigned char H[MAX_BLOCK_SIZE];
  555|  1.63k|    unsigned int tmp;
  556|  1.63k|    const CK_NSS_GCM_PARAMS *gcmParams = (const CK_NSS_GCM_PARAMS *)params;
  557|  1.63k|    SECStatus rv;
  558|       |#ifdef DISABLE_HW_GCM
  559|       |    const PRBool sw = PR_TRUE;
  560|       |#else
  561|  1.63k|    const PRBool sw = PR_FALSE;
  ------------------
  |  |  438|  1.63k|#define PR_FALSE 0
  ------------------
  562|  1.63k|#endif
  563|       |
  564|  1.63k|    gcm = PORT_ZNew(GCMContext);
  ------------------
  |  |  148|  1.63k|#define PORT_ZNew(type) (type *)PORT_ZAlloc(sizeof(type))
  |  |  ------------------
  |  |  |  |   72|  1.63k|#define PORT_ZAlloc PORT_ZAlloc_Util
  |  |  ------------------
  ------------------
  565|  1.63k|    if (gcm == NULL) {
  ------------------
  |  Branch (565:9): [True: 0, False: 1.63k]
  ------------------
  566|      0|        return NULL;
  567|      0|    }
  568|  1.63k|    gcm->cipher = cipher;
  569|  1.63k|    gcm->cipher_context = context;
  570|  1.63k|    ghash = PORT_ZNewAligned(gcmHashContext, 16, mem);
  ------------------
  |  |  150|  1.63k|    (type *)PORT_ZAllocAlignedOffset(sizeof(type), alignment, offsetof(type, mem))
  |  |  ------------------
  |  |  |  |   74|  1.63k|#define PORT_ZAllocAlignedOffset PORT_ZAllocAlignedOffset_Util
  |  |  ------------------
  ------------------
  571|       |
  572|       |    /* first plug in the ghash context */
  573|  1.63k|    gcm->ghash_context = ghash;
  574|  1.63k|    PORT_Memset(H, 0, AES_BLOCK_SIZE);
  ------------------
  |  |  182|  1.63k|#define PORT_Memset memset
  ------------------
                  PORT_Memset(H, 0, AES_BLOCK_SIZE);
  ------------------
  |  |  130|  1.63k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  575|  1.63k|    rv = (*cipher)(context, H, &tmp, AES_BLOCK_SIZE, H, AES_BLOCK_SIZE, AES_BLOCK_SIZE);
  ------------------
  |  |  130|  1.63k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
                  rv = (*cipher)(context, H, &tmp, AES_BLOCK_SIZE, H, AES_BLOCK_SIZE, AES_BLOCK_SIZE);
  ------------------
  |  |  130|  1.63k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
                  rv = (*cipher)(context, H, &tmp, AES_BLOCK_SIZE, H, AES_BLOCK_SIZE, AES_BLOCK_SIZE);
  ------------------
  |  |  130|  1.63k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  576|  1.63k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (576:9): [True: 0, False: 1.63k]
  ------------------
  577|      0|        goto loser;
  578|      0|    }
  579|  1.63k|    rv = gcmHash_InitContext(ghash, H, sw);
  580|  1.63k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (580:9): [True: 0, False: 1.63k]
  ------------------
  581|      0|        goto loser;
  582|      0|    }
  583|       |
  584|  1.63k|    gcm_InitIVContext(&gcm->gcm_iv);
  585|  1.63k|    gcm->ctr_context_init = PR_FALSE;
  ------------------
  |  |  438|  1.63k|#define PR_FALSE 0
  ------------------
  586|       |
  587|       |    /* if gcmPara/ms is NULL, then we are creating an PKCS #11 MESSAGE
  588|       |     * style context, in which we initialize the key once, then do separate
  589|       |     * iv/aad's for each message. In that case we only initialize the key
  590|       |     * and ghash. We initialize the counter in each separate message */
  591|  1.63k|    if (gcmParams == NULL) {
  ------------------
  |  Branch (591:9): [True: 1.63k, False: 0]
  ------------------
  592|       |        /* OK we are finished with init, if we are doing MESSAGE interface,
  593|       |         * return from here */
  594|  1.63k|        return gcm;
  595|  1.63k|    }
  596|       |
  597|      0|    rv = gcm_InitCounter(gcm, gcmParams->pIv, gcmParams->ulIvLen,
  598|      0|                         gcmParams->ulTagBits, gcmParams->pAAD,
  599|      0|                         gcmParams->ulAADLen);
  600|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (600:9): [True: 0, False: 0]
  ------------------
  601|      0|        goto loser;
  602|      0|    }
  603|      0|    PORT_SafeZero(H, AES_BLOCK_SIZE);
  ------------------
  |  |  130|      0|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  604|      0|    gcm->ctr_context_init = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  605|      0|    return gcm;
  606|       |
  607|      0|loser:
  608|      0|    PORT_SafeZero(H, AES_BLOCK_SIZE);
  ------------------
  |  |  130|      0|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  609|      0|    if (ghash && ghash->mem) {
  ------------------
  |  Branch (609:9): [True: 0, False: 0]
  |  Branch (609:18): [True: 0, False: 0]
  ------------------
  610|      0|        void *mem = ghash->mem;
  611|      0|        PORT_SafeZero(ghash, sizeof(gcmHashContext));
  612|      0|        PORT_Free(mem);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
  613|      0|    }
  614|      0|    if (gcm) {
  ------------------
  |  Branch (614:9): [True: 0, False: 0]
  ------------------
  615|      0|        PORT_ZFree(gcm, sizeof(GCMContext));
  ------------------
  |  |   75|      0|#define PORT_ZFree PORT_ZFree_Util
  ------------------
  616|      0|    }
  617|      0|    return NULL;
  618|      0|}
gcm_InitCounter:
  738|  6.38k|{
  739|  6.38k|    gcmHashContext *ghash = gcm->ghash_context;
  740|  6.38k|    unsigned int tmp;
  741|  6.38k|    PRBool freeCtr = PR_FALSE;
  ------------------
  |  |  438|  6.38k|#define PR_FALSE 0
  ------------------
  742|  6.38k|    CK_AES_CTR_PARAMS ctrParams;
  743|  6.38k|    SECStatus rv;
  744|       |
  745|       |    /* Verify our parameters here */
  746|  6.38k|    if (ivLen == 0) {
  ------------------
  |  Branch (746:9): [True: 0, False: 6.38k]
  ------------------
  747|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  748|      0|        goto loser;
  749|      0|    }
  750|       |
  751|  6.38k|    if (tagBits != 128 && tagBits != 120 &&
  ------------------
  |  Branch (751:9): [True: 0, False: 6.38k]
  |  Branch (751:27): [True: 0, False: 0]
  ------------------
  752|  6.38k|        tagBits != 112 && tagBits != 104 &&
  ------------------
  |  Branch (752:9): [True: 0, False: 0]
  |  Branch (752:27): [True: 0, False: 0]
  ------------------
  753|  6.38k|        tagBits != 96 && tagBits != 64 &&
  ------------------
  |  Branch (753:9): [True: 0, False: 0]
  |  Branch (753:26): [True: 0, False: 0]
  ------------------
  754|  6.38k|        tagBits != 32) {
  ------------------
  |  Branch (754:9): [True: 0, False: 0]
  ------------------
  755|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  756|      0|        goto loser;
  757|      0|    }
  758|       |
  759|       |    /* fill in the Counter context */
  760|  6.38k|    ctrParams.ulCounterBits = 32;
  761|  6.38k|    PORT_Memset(ctrParams.cb, 0, sizeof(ctrParams.cb));
  ------------------
  |  |  182|  6.38k|#define PORT_Memset memset
  ------------------
  762|  6.38k|    if (ivLen == 12) {
  ------------------
  |  Branch (762:9): [True: 6.38k, False: 0]
  ------------------
  763|  6.38k|        PORT_Memcpy(ctrParams.cb, iv, ivLen);
  ------------------
  |  |  180|  6.38k|#define PORT_Memcpy memcpy
  ------------------
  764|  6.38k|        ctrParams.cb[AES_BLOCK_SIZE - 1] = 1;
  ------------------
  |  |  130|  6.38k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  765|  6.38k|    } else {
  766|      0|        rv = gcmHash_Reset(ghash, NULL, 0);
  767|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (767:13): [True: 0, False: 0]
  ------------------
  768|      0|            goto loser;
  769|      0|        }
  770|      0|        rv = gcmHash_Update(ghash, iv, ivLen);
  771|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (771:13): [True: 0, False: 0]
  ------------------
  772|      0|            goto loser;
  773|      0|        }
  774|      0|        rv = gcmHash_Final(ghash, ctrParams.cb, &tmp, AES_BLOCK_SIZE);
  ------------------
  |  |  130|      0|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  775|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (775:13): [True: 0, False: 0]
  ------------------
  776|      0|            goto loser;
  777|      0|        }
  778|      0|    }
  779|  6.38k|    rv = CTR_InitContext(&gcm->ctr_context, gcm->cipher_context, gcm->cipher,
  780|  6.38k|                         (unsigned char *)&ctrParams);
  781|  6.38k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (781:9): [True: 0, False: 6.38k]
  ------------------
  782|      0|        goto loser;
  783|      0|    }
  784|  6.38k|    freeCtr = PR_TRUE;
  ------------------
  |  |  437|  6.38k|#define PR_TRUE 1
  ------------------
  785|       |
  786|       |    /* fill in the gcm structure */
  787|  6.38k|    gcm->tagBits = tagBits; /* save for final step */
  788|       |    /* calculate the final tag key. NOTE: gcm->tagKey is zero to start with.
  789|       |     * if this assumption changes, we would need to explicitly clear it here */
  790|  6.38k|    PORT_Memset(gcm->tagKey, 0, sizeof(gcm->tagKey));
  ------------------
  |  |  182|  6.38k|#define PORT_Memset memset
  ------------------
  791|  6.38k|    rv = gcm_CTR_Update(&gcm->ctr_context, gcm->tagKey, &tmp, AES_BLOCK_SIZE,
  ------------------
  |  |  130|  6.38k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  792|  6.38k|                        gcm->tagKey, AES_BLOCK_SIZE);
  ------------------
  |  |  130|  6.38k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  793|  6.38k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (793:9): [True: 0, False: 6.38k]
  ------------------
  794|      0|        goto loser;
  795|      0|    }
  796|       |
  797|       |    /* finally mix in the AAD data */
  798|  6.38k|    rv = gcmHash_Reset(ghash, aad, aadLen);
  799|  6.38k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (799:9): [True: 0, False: 6.38k]
  ------------------
  800|      0|        goto loser;
  801|      0|    }
  802|       |
  803|  6.38k|    PORT_SafeZero(&ctrParams, sizeof ctrParams);
  804|  6.38k|    return SECSuccess;
  805|       |
  806|      0|loser:
  807|      0|    PORT_SafeZero(&ctrParams, sizeof ctrParams);
  808|      0|    if (freeCtr) {
  ------------------
  |  Branch (808:9): [True: 0, False: 0]
  ------------------
  809|      0|        CTR_DestroyContext(&gcm->ctr_context, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  810|      0|    }
  811|      0|    return SECFailure;
  812|  6.38k|}
GCM_DestroyContext:
  816|  1.63k|{
  817|  1.63k|    void *mem = gcm->ghash_context->mem;
  818|       |    /* ctr_context is statically allocated and will be freed when we free
  819|       |     * gcm. call their destroy functions to free up any locally
  820|       |     * allocated data (like mp_int's) */
  821|  1.63k|    if (gcm->ctr_context_init) {
  ------------------
  |  Branch (821:9): [True: 0, False: 1.63k]
  ------------------
  822|      0|        CTR_DestroyContext(&gcm->ctr_context, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  823|      0|    }
  824|  1.63k|    PORT_Memset(gcm->ghash_context, 0, sizeof(gcmHashContext));
  ------------------
  |  |  182|  1.63k|#define PORT_Memset memset
  ------------------
  825|  1.63k|    PORT_Free(mem);
  ------------------
  |  |   60|  1.63k|#define PORT_Free PORT_Free_Util
  ------------------
  826|  1.63k|    PORT_Memset(&gcm->tagBits, 0, sizeof(gcm->tagBits));
  ------------------
  |  |  182|  1.63k|#define PORT_Memset memset
  ------------------
  827|  1.63k|    PORT_Memset(gcm->tagKey, 0, sizeof(gcm->tagKey));
  ------------------
  |  |  182|  1.63k|#define PORT_Memset memset
  ------------------
  828|  1.63k|    if (freeit) {
  ------------------
  |  Branch (828:9): [True: 1.63k, False: 0]
  ------------------
  829|  1.63k|        PORT_Free(gcm);
  ------------------
  |  |   60|  1.63k|#define PORT_Free PORT_Free_Util
  ------------------
  830|  1.63k|    }
  831|  1.63k|}
gcm_InitIVContext:
  998|  1.63k|{
  999|  1.63k|    gcmIv->counter = 0;
 1000|  1.63k|    gcmIv->max_count = 0;
 1001|  1.63k|    gcmIv->ivGen = CKG_GENERATE;
  ------------------
  |  | 1992|  1.63k|#define CKG_GENERATE 0x00000001UL
  ------------------
 1002|  1.63k|    gcmIv->ivLen = 0;
 1003|  1.63k|    gcmIv->fixedBits = 0;
 1004|  1.63k|}
gcm_GenerateIV:
 1033|    299|{
 1034|    299|    unsigned int i;
 1035|    299|    unsigned int flexBits;
 1036|    299|    unsigned int ivOffset;
 1037|    299|    unsigned int ivNewCount;
 1038|    299|    unsigned char ivMask;
 1039|    299|    unsigned char ivSave;
 1040|    299|    SECStatus rv;
 1041|       |
 1042|    299|    if (gcmIv->counter != 0) {
  ------------------
  |  Branch (1042:9): [True: 5, False: 294]
  ------------------
 1043|       |        /* If we've already generated a message, make sure all subsequent
 1044|       |         * messages are using the same generator */
 1045|      5|        if ((gcmIv->ivGen != ivGen) || (gcmIv->fixedBits != fixedBits) ||
  ------------------
  |  Branch (1045:13): [True: 0, False: 5]
  |  Branch (1045:40): [True: 0, False: 5]
  ------------------
 1046|      5|            (gcmIv->ivLen != ivLen)) {
  ------------------
  |  Branch (1046:13): [True: 0, False: 5]
  ------------------
 1047|      0|            PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1048|      0|            return SECFailure;
 1049|      0|        }
 1050|    294|    } else {
 1051|       |        /* remember these values */
 1052|    294|        gcmIv->ivGen = ivGen;
 1053|    294|        gcmIv->fixedBits = fixedBits;
 1054|    294|        gcmIv->ivLen = ivLen;
 1055|       |        /* now calculate how may bits of IV we have to supply */
 1056|    294|        flexBits = ivLen * PR_BITS_PER_BYTE; /* bytes->bits */
  ------------------
  |  |  286|    294|#define PR_BITS_PER_BYTE    8
  ------------------
 1057|       |        /* first make sure we aren't going to overflow */
 1058|    294|        if (flexBits < fixedBits) {
  ------------------
  |  Branch (1058:13): [True: 0, False: 294]
  ------------------
 1059|      0|            PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1060|      0|            return SECFailure;
 1061|      0|        }
 1062|    294|        flexBits -= fixedBits;
 1063|       |        /* if we are generating a random number reduce the acceptable bits to
 1064|       |         * avoid birthday attacks */
 1065|    294|        if (ivGen == CKG_GENERATE_RANDOM) {
  ------------------
  |  | 1994|    294|#define CKG_GENERATE_RANDOM 0x00000003UL
  ------------------
  |  Branch (1065:13): [True: 0, False: 294]
  ------------------
 1066|      0|            if (flexBits <= GCMIV_RANDOM_BIRTHDAY_BITS) {
  ------------------
  |  |  246|      0|#define GCMIV_RANDOM_BIRTHDAY_BITS 64
  ------------------
  |  Branch (1066:17): [True: 0, False: 0]
  ------------------
 1067|      0|                PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1068|      0|                return SECFailure;
 1069|      0|            }
 1070|       |            /* see freebl/blapit.h for how we calculate
 1071|       |             * GCMIV_RANDOM_BIRTHDAY_BITS */
 1072|      0|            flexBits -= GCMIV_RANDOM_BIRTHDAY_BITS;
  ------------------
  |  |  246|      0|#define GCMIV_RANDOM_BIRTHDAY_BITS 64
  ------------------
 1073|      0|            flexBits = flexBits >> 1;
 1074|      0|        }
 1075|    294|        if (flexBits == 0) {
  ------------------
  |  Branch (1075:13): [True: 0, False: 294]
  ------------------
 1076|      0|            PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1077|      0|            return SECFailure;
 1078|      0|        }
 1079|       |        /* Turn those bits into the number of IV's we can safely return */
 1080|    294|        if (flexBits >= sizeof(gcmIv->max_count) * PR_BITS_PER_BYTE) {
  ------------------
  |  |  286|    294|#define PR_BITS_PER_BYTE    8
  ------------------
  |  Branch (1080:13): [True: 169, False: 125]
  ------------------
 1081|    169|            gcmIv->max_count = PR_UINT64(0xffffffffffffffff);
  ------------------
  |  |  337|    169|#define PR_UINT64(x) x ## UL
  ------------------
 1082|    169|        } else {
 1083|    125|            gcmIv->max_count = PR_UINT64(1) << flexBits;
  ------------------
  |  |  337|    125|#define PR_UINT64(x) x ## UL
  ------------------
 1084|    125|        }
 1085|    294|    }
 1086|       |
 1087|       |    /* no generate, accept the IV from the source */
 1088|    299|    if (ivGen == CKG_NO_GENERATE) {
  ------------------
  |  | 1991|    299|#define CKG_NO_GENERATE 0x00000000UL
  ------------------
  |  Branch (1088:9): [True: 0, False: 299]
  ------------------
 1089|      0|        gcmIv->counter = 1;
 1090|      0|        return SECSuccess;
 1091|      0|    }
 1092|       |
 1093|       |    /* make sure we haven't exceeded the number of IVs we can return
 1094|       |     * for this key, generator, and IV size */
 1095|    299|    if (gcmIv->counter >= gcmIv->max_count) {
  ------------------
  |  Branch (1095:9): [True: 0, False: 299]
  ------------------
 1096|       |        /* use a unique error from just bad user input */
 1097|      0|        PORT_SetError(SEC_ERROR_EXTRA_INPUT);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1098|      0|        return SECFailure;
 1099|      0|    }
 1100|       |
 1101|       |    /* build to mask to handle the first byte of the IV */
 1102|    299|    ivOffset = fixedBits / PR_BITS_PER_BYTE;
  ------------------
  |  |  286|    299|#define PR_BITS_PER_BYTE    8
  ------------------
 1103|    299|    ivMask = 0xff >> ((8 - (fixedBits & 7)) & 7);
 1104|    299|    ivNewCount = ivLen - ivOffset;
 1105|       |
 1106|       |    /* finally generate the IV */
 1107|    299|    switch (ivGen) {
  ------------------
  |  Branch (1107:13): [True: 0, False: 299]
  ------------------
 1108|      0|        case CKG_GENERATE: /* default to counter */
  ------------------
  |  | 1992|      0|#define CKG_GENERATE 0x00000001UL
  ------------------
  |  Branch (1108:9): [True: 0, False: 299]
  ------------------
 1109|    130|        case CKG_GENERATE_COUNTER:
  ------------------
  |  | 1993|    130|#define CKG_GENERATE_COUNTER 0x00000002UL
  ------------------
  |  Branch (1109:9): [True: 130, False: 169]
  ------------------
 1110|    130|            iv[ivOffset] = (iv[ivOffset] & ~ivMask) |
 1111|    130|                           (PORT_GET_BYTE_BE(gcmIv->counter, 0, ivNewCount) & ivMask);
  ------------------
  |  |  131|    130|    ((unsigned char)(((len) - (offset)-1) >= sizeof(value) ? 0 : (((value) >> (((len) - (offset)-1) * PR_BITS_PER_BYTE)) & 0xff)))
  |  |  ------------------
  |  |  |  |  286|    130|#define PR_BITS_PER_BYTE    8
  |  |  ------------------
  |  |  |  Branch (131:22): [True: 0, False: 130]
  |  |  ------------------
  ------------------
 1112|    780|            for (i = 1; i < ivNewCount; i++) {
  ------------------
  |  Branch (1112:25): [True: 650, False: 130]
  ------------------
 1113|    650|                iv[ivOffset + i] = PORT_GET_BYTE_BE(gcmIv->counter, i, ivNewCount);
  ------------------
  |  |  131|    650|    ((unsigned char)(((len) - (offset)-1) >= sizeof(value) ? 0 : (((value) >> (((len) - (offset)-1) * PR_BITS_PER_BYTE)) & 0xff)))
  |  |  ------------------
  |  |  |  |  286|    650|#define PR_BITS_PER_BYTE    8
  |  |  ------------------
  |  |  |  Branch (131:22): [True: 0, False: 650]
  |  |  ------------------
  ------------------
 1114|    650|            }
 1115|    130|            break;
 1116|       |        /* for TLS 1.3 */
 1117|    169|        case CKG_GENERATE_COUNTER_XOR:
  ------------------
  |  | 1995|    169|#define CKG_GENERATE_COUNTER_XOR 0x00000004UL
  ------------------
  |  Branch (1117:9): [True: 169, False: 130]
  ------------------
 1118|    169|            iv[ivOffset] ^=
 1119|    169|                (PORT_GET_BYTE_BE(gcmIv->counter, 0, ivNewCount) & ivMask);
  ------------------
  |  |  131|    169|    ((unsigned char)(((len) - (offset)-1) >= sizeof(value) ? 0 : (((value) >> (((len) - (offset)-1) * PR_BITS_PER_BYTE)) & 0xff)))
  |  |  ------------------
  |  |  |  |  286|    169|#define PR_BITS_PER_BYTE    8
  |  |  ------------------
  |  |  |  Branch (131:22): [True: 0, False: 169]
  |  |  ------------------
  ------------------
 1120|  1.35k|            for (i = 1; i < ivNewCount; i++) {
  ------------------
  |  Branch (1120:25): [True: 1.18k, False: 169]
  ------------------
 1121|  1.18k|                iv[ivOffset + i] ^= PORT_GET_BYTE_BE(gcmIv->counter, i, ivNewCount);
  ------------------
  |  |  131|  1.18k|    ((unsigned char)(((len) - (offset)-1) >= sizeof(value) ? 0 : (((value) >> (((len) - (offset)-1) * PR_BITS_PER_BYTE)) & 0xff)))
  |  |  ------------------
  |  |  |  |  286|  1.18k|#define PR_BITS_PER_BYTE    8
  |  |  ------------------
  |  |  |  Branch (131:22): [True: 0, False: 1.18k]
  |  |  ------------------
  ------------------
 1122|  1.18k|            }
 1123|    169|            break;
 1124|      0|        case CKG_GENERATE_RANDOM:
  ------------------
  |  | 1994|      0|#define CKG_GENERATE_RANDOM 0x00000003UL
  ------------------
  |  Branch (1124:9): [True: 0, False: 299]
  ------------------
 1125|      0|            ivSave = iv[ivOffset] & ~ivMask;
 1126|      0|            rv = RNG_GenerateGlobalRandomBytes(iv + ivOffset, ivNewCount);
 1127|      0|            iv[ivOffset] = ivSave | (iv[ivOffset] & ivMask);
 1128|      0|            if (rv != SECSuccess) {
  ------------------
  |  Branch (1128:17): [True: 0, False: 0]
  ------------------
 1129|      0|                return rv;
 1130|      0|            }
 1131|      0|            break;
 1132|    299|    }
 1133|    299|    gcmIv->counter++;
 1134|    299|    return SECSuccess;
 1135|    299|}
GCM_EncryptAEAD:
 1144|    299|{
 1145|    299|    SECStatus rv;
 1146|    299|    unsigned int tagBytes;
 1147|    299|    unsigned int len;
 1148|    299|    const CK_GCM_MESSAGE_PARAMS *gcmParams =
 1149|    299|        (const CK_GCM_MESSAGE_PARAMS *)params;
 1150|       |
 1151|    299|    PORT_Assert(blocksize == AES_BLOCK_SIZE);
  ------------------
  |  |  120|    299|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    299|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 299, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1152|    299|    if (blocksize != AES_BLOCK_SIZE) {
  ------------------
  |  |  130|    299|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  |  Branch (1152:9): [True: 0, False: 299]
  ------------------
 1153|      0|        PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1154|      0|        return SECFailure;
 1155|      0|    }
 1156|       |
 1157|       |    /* paramLen comes all the way from the application layer, make sure
 1158|       |     * it's correct */
 1159|    299|    if (paramLen != sizeof(CK_GCM_MESSAGE_PARAMS)) {
  ------------------
  |  Branch (1159:9): [True: 0, False: 299]
  ------------------
 1160|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1161|      0|        return SECFailure;
 1162|      0|    }
 1163|       |    /* if we were initialized with the C_EncryptInit, we shouldn't be in this
 1164|       |     * function */
 1165|    299|    if (gcm->ctr_context_init) {
  ------------------
  |  Branch (1165:9): [True: 0, False: 299]
  ------------------
 1166|      0|        PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1167|      0|        return SECFailure;
 1168|      0|    }
 1169|       |
 1170|    299|    if (maxout < inlen) {
  ------------------
  |  Branch (1170:9): [True: 0, False: 299]
  ------------------
 1171|      0|        *outlen = inlen;
 1172|      0|        PORT_SetError(SEC_ERROR_OUTPUT_LEN);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1173|      0|        return SECFailure;
 1174|      0|    }
 1175|       |
 1176|    299|    rv = gcm_GenerateIV(&gcm->gcm_iv, gcmParams->pIv, gcmParams->ulIvLen,
 1177|    299|                        gcmParams->ulIvFixedBits, gcmParams->ivGenerator);
 1178|    299|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1178:9): [True: 0, False: 299]
  ------------------
 1179|      0|        return SECFailure;
 1180|      0|    }
 1181|       |
 1182|    299|    rv = gcm_InitCounter(gcm, gcmParams->pIv, gcmParams->ulIvLen,
 1183|    299|                         gcmParams->ulTagBits, aad, aadLen);
 1184|    299|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1184:9): [True: 0, False: 299]
  ------------------
 1185|      0|        return SECFailure;
 1186|      0|    }
 1187|       |
 1188|    299|    tagBytes = (gcm->tagBits + (PR_BITS_PER_BYTE - 1)) / PR_BITS_PER_BYTE;
  ------------------
  |  |  286|    299|#define PR_BITS_PER_BYTE    8
  ------------------
                  tagBytes = (gcm->tagBits + (PR_BITS_PER_BYTE - 1)) / PR_BITS_PER_BYTE;
  ------------------
  |  |  286|    299|#define PR_BITS_PER_BYTE    8
  ------------------
 1189|       |
 1190|    299|    rv = gcm_CTR_Update(&gcm->ctr_context, outbuf, outlen, maxout,
 1191|    299|                        inbuf, inlen);
 1192|    299|    CTR_DestroyContext(&gcm->ctr_context, PR_FALSE);
  ------------------
  |  |  438|    299|#define PR_FALSE 0
  ------------------
 1193|    299|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1193:9): [True: 0, False: 299]
  ------------------
 1194|      0|        return SECFailure;
 1195|      0|    }
 1196|    299|    rv = gcmHash_Update(gcm->ghash_context, outbuf, *outlen);
 1197|    299|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1197:9): [True: 0, False: 299]
  ------------------
 1198|      0|        PORT_Memset(outbuf, 0, *outlen); /* clear the output buffer */
  ------------------
  |  |  182|      0|#define PORT_Memset memset
  ------------------
 1199|      0|        *outlen = 0;
 1200|      0|        return SECFailure;
 1201|      0|    }
 1202|    299|    rv = gcm_GetTag(gcm, gcmParams->pTag, &len, tagBytes);
 1203|    299|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1203:9): [True: 0, False: 299]
  ------------------
 1204|      0|        PORT_Memset(outbuf, 0, *outlen); /* clear the output buffer */
  ------------------
  |  |  182|      0|#define PORT_Memset memset
  ------------------
 1205|      0|        *outlen = 0;
 1206|      0|        return SECFailure;
 1207|    299|    };
 1208|    299|    return SECSuccess;
 1209|    299|}
GCM_DecryptAEAD:
 1218|  6.09k|{
 1219|  6.09k|    SECStatus rv;
 1220|  6.09k|    unsigned int tagBytes;
 1221|  6.09k|    unsigned char tag[MAX_BLOCK_SIZE];
 1222|  6.09k|    const unsigned char *intag;
 1223|  6.09k|    unsigned int len;
 1224|  6.09k|    const CK_GCM_MESSAGE_PARAMS *gcmParams =
 1225|  6.09k|        (const CK_GCM_MESSAGE_PARAMS *)params;
 1226|       |
 1227|  6.09k|    PORT_Assert(blocksize == AES_BLOCK_SIZE);
  ------------------
  |  |  120|  6.09k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  6.09k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 6.09k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1228|  6.09k|    if (blocksize != AES_BLOCK_SIZE) {
  ------------------
  |  |  130|  6.09k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  |  Branch (1228:9): [True: 0, False: 6.09k]
  ------------------
 1229|      0|        PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1230|      0|        return SECFailure;
 1231|      0|    }
 1232|       |
 1233|       |    /* paramLen comes all the way from the application layer, make sure
 1234|       |     * it's correct */
 1235|  6.09k|    if (paramLen != sizeof(CK_GCM_MESSAGE_PARAMS)) {
  ------------------
  |  Branch (1235:9): [True: 0, False: 6.09k]
  ------------------
 1236|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1237|      0|        return SECFailure;
 1238|      0|    }
 1239|       |    /* if we were initialized with the C_DecryptInit, we shouldn't be in this
 1240|       |     * function */
 1241|  6.09k|    if (gcm->ctr_context_init) {
  ------------------
  |  Branch (1241:9): [True: 0, False: 6.09k]
  ------------------
 1242|      0|        PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1243|      0|        return SECFailure;
 1244|      0|    }
 1245|       |
 1246|  6.09k|    if (maxout < inlen) {
  ------------------
  |  Branch (1246:9): [True: 0, False: 6.09k]
  ------------------
 1247|      0|        *outlen = inlen;
 1248|      0|        PORT_SetError(SEC_ERROR_OUTPUT_LEN);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1249|      0|        return SECFailure;
 1250|      0|    }
 1251|       |
 1252|  6.09k|    rv = gcm_InitCounter(gcm, gcmParams->pIv, gcmParams->ulIvLen,
 1253|  6.09k|                         gcmParams->ulTagBits, aad, aadLen);
 1254|  6.09k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1254:9): [True: 0, False: 6.09k]
  ------------------
 1255|      0|        return SECFailure;
 1256|      0|    }
 1257|       |
 1258|  6.09k|    tagBytes = (gcm->tagBits + (PR_BITS_PER_BYTE - 1)) / PR_BITS_PER_BYTE;
  ------------------
  |  |  286|  6.09k|#define PR_BITS_PER_BYTE    8
  ------------------
                  tagBytes = (gcm->tagBits + (PR_BITS_PER_BYTE - 1)) / PR_BITS_PER_BYTE;
  ------------------
  |  |  286|  6.09k|#define PR_BITS_PER_BYTE    8
  ------------------
 1259|  6.09k|    intag = gcmParams->pTag;
 1260|  6.09k|    PORT_Assert(tagBytes != 0);
  ------------------
  |  |  120|  6.09k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  6.09k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 6.09k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1261|       |
 1262|       |    /* verify the block */
 1263|  6.09k|    rv = gcmHash_Update(gcm->ghash_context, inbuf, inlen);
 1264|  6.09k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1264:9): [True: 0, False: 6.09k]
  ------------------
 1265|      0|        CTR_DestroyContext(&gcm->ctr_context, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 1266|      0|        return SECFailure;
 1267|      0|    }
 1268|  6.09k|    rv = gcm_GetTag(gcm, tag, &len, AES_BLOCK_SIZE);
  ------------------
  |  |  130|  6.09k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
 1269|  6.09k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1269:9): [True: 0, False: 6.09k]
  ------------------
 1270|      0|        CTR_DestroyContext(&gcm->ctr_context, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 1271|      0|        return SECFailure;
 1272|      0|    }
 1273|       |    /* Don't decrypt if we can't authenticate the encrypted data!
 1274|       |     * This assumes that if tagBits is may not be a multiple of 8, intag will
 1275|       |     * preserve the masked off missing bits.  */
 1276|  6.09k|    if (NSS_SecureMemcmp(tag, intag, tagBytes) != 0) {
  ------------------
  |  Branch (1276:9): [True: 6.09k, False: 0]
  ------------------
 1277|       |        /* force a CKR_ENCRYPTED_DATA_INVALID error at in softoken */
 1278|  6.09k|        CTR_DestroyContext(&gcm->ctr_context, PR_FALSE);
  ------------------
  |  |  438|  6.09k|#define PR_FALSE 0
  ------------------
 1279|  6.09k|        PORT_SetError(SEC_ERROR_BAD_DATA);
  ------------------
  |  |   65|  6.09k|#define PORT_SetError PORT_SetError_Util
  ------------------
 1280|  6.09k|        PORT_SafeZero(tag, sizeof(tag));
 1281|  6.09k|        return SECFailure;
 1282|  6.09k|    }
 1283|      0|    PORT_SafeZero(tag, sizeof(tag));
 1284|       |    /* finish the decryption */
 1285|      0|    rv = gcm_CTR_Update(&gcm->ctr_context, outbuf, outlen, maxout,
 1286|      0|                        inbuf, inlen);
 1287|      0|    CTR_DestroyContext(&gcm->ctr_context, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 1288|      0|    return rv;
 1289|  6.09k|}
gcm.c:gcmHash_Sync:
  410|  12.7k|{
  411|  12.7k|    int i;
  412|  12.7k|    SECStatus rv;
  413|       |
  414|       |    /* copy the previous counter to the upper block */
  415|  12.7k|    PORT_Memcpy(ghash->counterBuf, &ghash->counterBuf[GCM_HASH_LEN_LEN],
  ------------------
  |  |  180|  12.7k|#define PORT_Memcpy memcpy
  ------------------
                  PORT_Memcpy(ghash->counterBuf, &ghash->counterBuf[GCM_HASH_LEN_LEN],
  ------------------
  |  |   78|  12.7k|#define GCM_HASH_LEN_LEN 8 /* gcm hash defines lengths to be 64 bits */
  ------------------
  416|  12.7k|                GCM_HASH_LEN_LEN);
  ------------------
  |  |   78|  12.7k|#define GCM_HASH_LEN_LEN 8 /* gcm hash defines lengths to be 64 bits */
  ------------------
  417|       |    /* copy the current counter in the lower block */
  418|   115k|    for (i = 0; i < GCM_HASH_LEN_LEN; i++) {
  ------------------
  |  |   78|   115k|#define GCM_HASH_LEN_LEN 8 /* gcm hash defines lengths to be 64 bits */
  ------------------
  |  Branch (418:17): [True: 102k, False: 12.7k]
  ------------------
  419|   102k|        ghash->counterBuf[GCM_HASH_LEN_LEN + i] =
  ------------------
  |  |   78|   102k|#define GCM_HASH_LEN_LEN 8 /* gcm hash defines lengths to be 64 bits */
  ------------------
  420|   102k|            (ghash->cLen >> ((GCM_HASH_LEN_LEN - 1 - i) * PR_BITS_PER_BYTE)) & 0xff;
  ------------------
  |  |   78|   102k|#define GCM_HASH_LEN_LEN 8 /* gcm hash defines lengths to be 64 bits */
  ------------------
                          (ghash->cLen >> ((GCM_HASH_LEN_LEN - 1 - i) * PR_BITS_PER_BYTE)) & 0xff;
  ------------------
  |  |  286|   102k|#define PR_BITS_PER_BYTE    8
  ------------------
  421|   102k|    }
  422|  12.7k|    ghash->cLen = 0;
  423|       |
  424|       |    /* now zero fill the buffer and hash the last block */
  425|  12.7k|    if (ghash->bufLen) {
  ------------------
  |  Branch (425:9): [True: 8.48k, False: 4.29k]
  ------------------
  426|  8.48k|        PORT_Memset(ghash->buffer + ghash->bufLen, 0, AES_BLOCK_SIZE - ghash->bufLen);
  ------------------
  |  |  182|  8.48k|#define PORT_Memset memset
  ------------------
                      PORT_Memset(ghash->buffer + ghash->bufLen, 0, AES_BLOCK_SIZE - ghash->bufLen);
  ------------------
  |  |  130|  8.48k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  427|  8.48k|        rv = ghash->ghash_mul(ghash, ghash->buffer, 1);
  428|  8.48k|        PORT_Memset(ghash->buffer, 0, AES_BLOCK_SIZE);
  ------------------
  |  |  182|  8.48k|#define PORT_Memset memset
  ------------------
                      PORT_Memset(ghash->buffer, 0, AES_BLOCK_SIZE);
  ------------------
  |  |  130|  8.48k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  429|  8.48k|        ghash->bufLen = 0;
  430|  8.48k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (430:13): [True: 0, False: 8.48k]
  ------------------
  431|      0|            return SECFailure;
  432|      0|        }
  433|  8.48k|    }
  434|  12.7k|    return SECSuccess;
  435|  12.7k|}
gcm.c:gcm_zeroX:
  337|  6.38k|{
  338|  6.38k|    SECStatus rv = SECSuccess;
  339|       |
  340|  6.38k|    if (ghash->hw) {
  ------------------
  |  Branch (340:9): [True: 6.38k, False: 0]
  ------------------
  341|  6.38k|        rv = gcm_HashZeroX_hw(ghash);
  342|  6.38k|    }
  343|       |
  344|  6.38k|    ghash->x_high = ghash->x_low = 0;
  345|  6.38k|    return rv;
  346|  6.38k|}
gcm.c:gcm_CTR_Update:
  659|  6.68k|{
  660|  6.68k|    PORT_Assert(ctr->counterBits == 32);
  ------------------
  |  |  120|  6.68k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  6.68k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 6.68k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  661|  6.68k|    PORT_Assert(0 < ctr->bufPtr && ctr->bufPtr <= AES_BLOCK_SIZE);
  ------------------
  |  |  120|  6.68k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  13.3k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 6.68k, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 6.68k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  662|       |
  663|       |    // The AES-GCM message length limit is 2^32 - 2 blocks.
  664|  6.68k|    const unsigned int blockLimit = 0xFFFFFFFEUL;
  665|       |
  666|  6.68k|    unsigned char *const pCounter = ctr->counter + AES_BLOCK_SIZE - 4;
  ------------------
  |  |  130|  6.68k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  667|  6.68k|    unsigned int counter = load32_be(pCounter);
  668|       |
  669|       |    // Calculate the number of times that the counter has already been incremented.
  670|  6.68k|    unsigned char *const pCounterFirst = ctr->counterFirst + AES_BLOCK_SIZE - 4;
  ------------------
  |  |  130|  6.68k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  671|  6.68k|    unsigned int ticks = (counter - load32_be(pCounterFirst)) & 0xFFFFFFFFUL;
  672|       |
  673|       |    // Get the number of bytes of keystream that are available in the internal buffer.
  674|  6.68k|    const unsigned int bufBytes = AES_BLOCK_SIZE - ctr->bufPtr;
  ------------------
  |  |  130|  6.68k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  675|       |
  676|       |    // Calculate the number of times that we will increment the counter while
  677|       |    // encrypting inbuf. We can encrypt bufBytes bytes of the input without
  678|       |    // incrementing the counter.
  679|  6.68k|    unsigned int newTicks;
  680|  6.68k|    if (inlen < bufBytes) {
  ------------------
  |  Branch (680:9): [True: 0, False: 6.68k]
  ------------------
  681|      0|        newTicks = 0;
  682|  6.68k|    } else if ((inlen - bufBytes) % AES_BLOCK_SIZE) {
  ------------------
  |  |  130|  6.68k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  |  Branch (682:16): [True: 299, False: 6.38k]
  ------------------
  683|    299|        newTicks = ((inlen - bufBytes) / AES_BLOCK_SIZE) + 1;
  ------------------
  |  |  130|    299|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  684|  6.38k|    } else {
  685|  6.38k|        newTicks = ((inlen - bufBytes) / AES_BLOCK_SIZE);
  ------------------
  |  |  130|  6.38k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  686|  6.38k|    }
  687|       |
  688|       |    // Ensure that the counter will not exceed the limit.
  689|  6.68k|    if (ticks > blockLimit - newTicks) {
  ------------------
  |  Branch (689:9): [True: 0, False: 6.68k]
  ------------------
  690|      0|        PORT_SetError(SEC_ERROR_INPUT_LEN);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  691|      0|        return SECFailure;
  692|      0|    }
  693|       |
  694|  6.68k|    *outlen = inlen;
  695|  6.68k|    if (maxout < inlen) {
  ------------------
  |  Branch (695:9): [True: 0, False: 6.68k]
  ------------------
  696|      0|        PORT_SetError(SEC_ERROR_OUTPUT_LEN);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  697|      0|        return SECFailure;
  698|      0|    }
  699|       |
  700|  6.68k|    if (bufBytes) {
  ------------------
  |  Branch (700:9): [True: 0, False: 6.68k]
  ------------------
  701|      0|        unsigned int needed = PR_MIN(bufBytes, inlen);
  ------------------
  |  |  158|      0|#define PR_MIN(x,y)     ((x)<(y)?(x):(y))
  |  |  ------------------
  |  |  |  Branch (158:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  702|      0|        gcm_ctr_xor(outbuf, inbuf, ctr->buffer + ctr->bufPtr, needed);
  703|      0|        ctr->bufPtr += needed;
  704|      0|        outbuf += needed;
  705|      0|        inbuf += needed;
  706|      0|        inlen -= needed;
  707|      0|        PORT_Assert(inlen == 0 || ctr->bufPtr == AES_BLOCK_SIZE);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  708|      0|    }
  709|  13.2k|    while (inlen >= AES_BLOCK_SIZE) {
  ------------------
  |  |  130|  13.2k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  |  Branch (709:12): [True: 6.51k, False: 6.68k]
  ------------------
  710|  6.51k|        unsigned int tmp;
  711|  6.51k|        SECStatus rv = (*ctr->cipher)(ctr->context, ctr->buffer, &tmp, AES_BLOCK_SIZE,
  ------------------
  |  |  130|  6.51k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  712|  6.51k|                                      ctr->counter, AES_BLOCK_SIZE, AES_BLOCK_SIZE);
  ------------------
  |  |  130|  6.51k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
                                                    ctr->counter, AES_BLOCK_SIZE, AES_BLOCK_SIZE);
  ------------------
  |  |  130|  6.51k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  713|  6.51k|        PORT_Assert(rv == SECSuccess);
  ------------------
  |  |  120|  6.51k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  6.51k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 6.51k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  714|  6.51k|        (void)rv;
  715|  6.51k|        store32_be(pCounter, ++counter);
  716|  6.51k|        gcm_ctr_xor_block(outbuf, inbuf, ctr->buffer);
  717|  6.51k|        outbuf += AES_BLOCK_SIZE;
  ------------------
  |  |  130|  6.51k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  718|  6.51k|        inbuf += AES_BLOCK_SIZE;
  ------------------
  |  |  130|  6.51k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  719|  6.51k|        inlen -= AES_BLOCK_SIZE;
  ------------------
  |  |  130|  6.51k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  720|  6.51k|    }
  721|  6.68k|    if (inlen) {
  ------------------
  |  Branch (721:9): [True: 299, False: 6.38k]
  ------------------
  722|    299|        unsigned int tmp;
  723|    299|        SECStatus rv = (*ctr->cipher)(ctr->context, ctr->buffer, &tmp, AES_BLOCK_SIZE,
  ------------------
  |  |  130|    299|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  724|    299|                                      ctr->counter, AES_BLOCK_SIZE, AES_BLOCK_SIZE);
  ------------------
  |  |  130|    299|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
                                                    ctr->counter, AES_BLOCK_SIZE, AES_BLOCK_SIZE);
  ------------------
  |  |  130|    299|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  725|    299|        PORT_Assert(rv == SECSuccess);
  ------------------
  |  |  120|    299|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    299|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 299, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  726|    299|        (void)rv;
  727|    299|        store32_be(pCounter, ++counter);
  728|    299|        gcm_ctr_xor(outbuf, inbuf, ctr->buffer, inlen);
  729|    299|        ctr->bufPtr = inlen;
  730|    299|    }
  731|  6.68k|    return SECSuccess;
  732|  6.68k|}
gcm.c:load32_be:
  622|  13.3k|{
  623|  13.3k|    return ((unsigned int)p[0]) << 24 | p[1] << 16 | p[2] << 8 | p[3];
  624|  13.3k|}
gcm.c:gcm_ctr_xor:
  638|  6.81k|{
  639|   112k|    for (unsigned int i = 0; i < count; i++) {
  ------------------
  |  Branch (639:30): [True: 105k, False: 6.81k]
  ------------------
  640|   105k|        target[i] = x[i] ^ y[i];
  641|   105k|    }
  642|  6.81k|}
gcm.c:store32_be:
  628|  6.81k|{
  629|  6.81k|    p[0] = (unsigned char)(c >> 24);
  630|  6.81k|    p[1] = (unsigned char)(c >> 16);
  631|  6.81k|    p[2] = (unsigned char)(c >> 8);
  632|  6.81k|    p[3] = (unsigned char)c;
  633|  6.81k|}
gcm.c:gcm_ctr_xor_block:
  647|  6.51k|{
  648|       |#if defined(__ARM_NEON) || defined(__ARM_NEON__)
  649|       |    vst1q_u8(target, veorq_u8(vld1q_u8(x), vld1q_u8(y)));
  650|       |#else
  651|  6.51k|    gcm_ctr_xor(target, x, y, AES_BLOCK_SIZE);
  ------------------
  |  |  130|  6.51k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  652|  6.51k|#endif
  653|  6.51k|}
gcm.c:gcm_GetTag:
  836|  6.38k|{
  837|  6.38k|    unsigned int tagBytes;
  838|  6.38k|    unsigned int extra;
  839|  6.38k|    unsigned int i;
  840|  6.38k|    SECStatus rv;
  841|       |
  842|  6.38k|    tagBytes = (gcm->tagBits + (PR_BITS_PER_BYTE - 1)) / PR_BITS_PER_BYTE;
  ------------------
  |  |  286|  6.38k|#define PR_BITS_PER_BYTE    8
  ------------------
                  tagBytes = (gcm->tagBits + (PR_BITS_PER_BYTE - 1)) / PR_BITS_PER_BYTE;
  ------------------
  |  |  286|  6.38k|#define PR_BITS_PER_BYTE    8
  ------------------
  843|  6.38k|    extra = tagBytes * PR_BITS_PER_BYTE - gcm->tagBits;
  ------------------
  |  |  286|  6.38k|#define PR_BITS_PER_BYTE    8
  ------------------
  844|       |
  845|  6.38k|    if (outbuf == NULL) {
  ------------------
  |  Branch (845:9): [True: 0, False: 6.38k]
  ------------------
  846|      0|        *outlen = tagBytes;
  847|      0|        PORT_SetError(SEC_ERROR_OUTPUT_LEN);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  848|      0|        return SECFailure;
  849|      0|    }
  850|       |
  851|  6.38k|    if (maxout < tagBytes) {
  ------------------
  |  Branch (851:9): [True: 0, False: 6.38k]
  ------------------
  852|      0|        *outlen = tagBytes;
  853|      0|        PORT_SetError(SEC_ERROR_OUTPUT_LEN);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  854|      0|        return SECFailure;
  855|      0|    }
  856|  6.38k|    maxout = tagBytes;
  857|  6.38k|    rv = gcmHash_Final(gcm->ghash_context, outbuf, outlen, maxout);
  858|  6.38k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (858:9): [True: 0, False: 6.38k]
  ------------------
  859|      0|        return SECFailure;
  860|      0|    }
  861|       |
  862|   108k|    for (i = 0; i < *outlen; i++) {
  ------------------
  |  Branch (862:17): [True: 102k, False: 6.38k]
  ------------------
  863|   102k|        outbuf[i] ^= gcm->tagKey[i];
  864|   102k|    }
  865|       |    /* mask off any extra bits we got */
  866|  6.38k|    if (extra) {
  ------------------
  |  Branch (866:9): [True: 0, False: 6.38k]
  ------------------
  867|      0|        outbuf[tagBytes - 1] &= ~((1 << extra) - 1);
  868|      0|    }
  869|  6.38k|    return SECSuccess;
  870|  6.38k|}

HMAC_ConstantTime:
  298|  8.99k|{
  299|  8.99k|    if (hashObj->end_raw == NULL)
  ------------------
  |  Branch (299:9): [True: 0, False: 8.99k]
  ------------------
  300|      0|        return SECFailure;
  301|  8.99k|    return MAC(result, resultLen, maxResultLen, hashObj, secret, secretLen,
  302|  8.99k|               header, headerLen, body, bodyLen, bodyTotalLen,
  303|  8.99k|               0 /* not SSLv3 */);
  304|  8.99k|}
hmacct.c:MAC:
   62|  8.99k|{
   63|  8.99k|    void *mdState = hashObj->create();
   64|  8.99k|    const unsigned int mdSize = hashObj->length;
   65|  8.99k|    const unsigned int mdBlockSize = hashObj->blocklength;
   66|       |    /* mdLengthSize is the number of bytes in the length field that terminates
   67|       |     * the hash.
   68|       |     *
   69|       |     * This assumes that hash functions with a 64 byte block size use a 64-bit
   70|       |     * length, and otherwise they use a 128-bit length. This is true of {MD5,
   71|       |     * SHA*} (which are all of the hash functions specified for use with TLS
   72|       |     * today). */
   73|  8.99k|    const unsigned int mdLengthSize = mdBlockSize == 64 ? 8 : 16;
  ------------------
  |  Branch (73:39): [True: 8.99k, False: 0]
  ------------------
   74|       |
   75|  8.99k|    const unsigned int sslv3PadLen = hashObj->type == HASH_AlgMD5 ? 48 : 40;
  ------------------
  |  Branch (75:38): [True: 0, False: 8.99k]
  ------------------
   76|       |
   77|       |    /* varianceBlocks is the number of blocks of the hash that we have to
   78|       |     * calculate in constant time because they could be altered by the
   79|       |     * padding value.
   80|       |     *
   81|       |     * In SSLv3, the padding must be minimal so the end of the plaintext
   82|       |     * varies by, at most, 15+20 = 35 bytes. (We conservatively assume that
   83|       |     * the MAC size varies from 0..20 bytes.) In case the 9 bytes of hash
   84|       |     * termination (0x80 + 64-bit length) don't fit in the final block, we
   85|       |     * say that the final two blocks can vary based on the padding.
   86|       |     *
   87|       |     * TLSv1 has MACs up to 48 bytes long (SHA-384) and the padding is not
   88|       |     * required to be minimal. Therefore we say that the final six blocks
   89|       |     * can vary based on the padding.
   90|       |     *
   91|       |     * Later in the function, if the message is short and there obviously
   92|       |     * cannot be this many blocks then varianceBlocks can be reduced. */
   93|  8.99k|    unsigned int varianceBlocks = isSSLv3 ? 2 : 6;
  ------------------
  |  Branch (93:35): [True: 0, False: 8.99k]
  ------------------
   94|       |    /* From now on we're dealing with the MAC, which conceptually has 13
   95|       |     * bytes of `header' before the start of the data (TLS) or 71/75 bytes
   96|       |     * (SSLv3) */
   97|  8.99k|    const unsigned int len = dataTotalLen + headerLen;
   98|       |    /* maxMACBytes contains the maximum bytes of bytes in the MAC, including
   99|       |     * |header|, assuming that there's no padding. */
  100|  8.99k|    const unsigned int maxMACBytes = len - mdSize - 1;
  101|       |    /* numBlocks is the maximum number of hash blocks. */
  102|  8.99k|    const unsigned int numBlocks =
  103|  8.99k|        (maxMACBytes + 1 + mdLengthSize + mdBlockSize - 1) / mdBlockSize;
  104|       |    /* macEndOffset is the index just past the end of the data to be
  105|       |     * MACed. */
  106|  8.99k|    const unsigned int macEndOffset = dataLen + headerLen - mdSize;
  107|       |    /* c is the index of the 0x80 byte in the final hash block that
  108|       |     * contains application data. */
  109|  8.99k|    const unsigned int c = macEndOffset % mdBlockSize;
  110|       |    /* indexA is the hash block number that contains the 0x80 terminating
  111|       |     * value. */
  112|  8.99k|    const unsigned int indexA = macEndOffset / mdBlockSize;
  113|       |    /* indexB is the hash block number that contains the 64-bit hash
  114|       |     * length, in bits. */
  115|  8.99k|    const unsigned int indexB = (macEndOffset + mdLengthSize) / mdBlockSize;
  116|       |    /* bits is the hash-length in bits. It includes the additional hash
  117|       |     * block for the masked HMAC key, or whole of |header| in the case of
  118|       |     * SSLv3. */
  119|  8.99k|    unsigned int bits;
  120|       |    /* In order to calculate the MAC in constant time we have to handle
  121|       |     * the final blocks specially because the padding value could cause the
  122|       |     * end to appear somewhere in the final |varianceBlocks| blocks and we
  123|       |     * can't leak where. However, |numStartingBlocks| worth of data can
  124|       |     * be hashed right away because no padding value can affect whether
  125|       |     * they are plaintext. */
  126|  8.99k|    unsigned int numStartingBlocks = 0;
  127|       |    /* k is the starting byte offset into the conceptual header||data where
  128|       |     * we start processing. */
  129|  8.99k|    unsigned int k = 0;
  130|  8.99k|    unsigned char lengthBytes[MAX_HASH_BIT_COUNT_BYTES];
  131|       |    /* hmacPad is the masked HMAC key. */
  132|  8.99k|    unsigned char hmacPad[HASH_BLOCK_LENGTH_MAX];
  133|  8.99k|    unsigned char firstBlock[HASH_BLOCK_LENGTH_MAX];
  134|  8.99k|    unsigned char macOut[HASH_LENGTH_MAX];
  135|  8.99k|    unsigned i, j;
  136|       |
  137|       |    /* For SSLv3, if we're going to have any starting blocks then we need
  138|       |     * at least two because the header is larger than a single block. */
  139|  8.99k|    if (numBlocks > varianceBlocks + (isSSLv3 ? 1 : 0)) {
  ------------------
  |  Branch (139:9): [True: 256, False: 8.73k]
  |  Branch (139:39): [True: 0, False: 8.99k]
  ------------------
  140|    256|        numStartingBlocks = numBlocks - varianceBlocks;
  141|    256|        k = mdBlockSize * numStartingBlocks;
  142|    256|    }
  143|       |
  144|  8.99k|    bits = 8 * macEndOffset;
  145|  8.99k|    hashObj->begin(mdState);
  146|  8.99k|    if (!isSSLv3) {
  ------------------
  |  Branch (146:9): [True: 8.99k, False: 0]
  ------------------
  147|       |        /* Compute the initial HMAC block. For SSLv3, the padding and
  148|       |         * secret bytes are included in |header| because they take more
  149|       |         * than a single block. */
  150|  8.99k|        bits += 8 * mdBlockSize;
  151|  8.99k|        memset(hmacPad, 0, mdBlockSize);
  152|  8.99k|        PORT_Assert(macSecretLen <= sizeof(hmacPad));
  ------------------
  |  |  120|  8.99k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  8.99k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 8.99k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  153|  8.99k|        memcpy(hmacPad, macSecret, macSecretLen);
  154|   584k|        for (i = 0; i < mdBlockSize; i++)
  ------------------
  |  Branch (154:21): [True: 575k, False: 8.99k]
  ------------------
  155|   575k|            hmacPad[i] ^= 0x36;
  156|  8.99k|        hashObj->update(mdState, hmacPad, mdBlockSize);
  157|  8.99k|    }
  158|       |
  159|  8.99k|    j = 0;
  160|  8.99k|    memset(lengthBytes, 0, sizeof(lengthBytes));
  161|  8.99k|    if (mdLengthSize == 16) {
  ------------------
  |  Branch (161:9): [True: 0, False: 8.99k]
  ------------------
  162|      0|        j = 8;
  163|      0|    }
  164|  8.99k|    if (hashObj->type == HASH_AlgMD5) {
  ------------------
  |  Branch (164:9): [True: 0, False: 8.99k]
  ------------------
  165|       |        /* MD5 appends a little-endian length. */
  166|      0|        for (i = 0; i < 4; i++) {
  ------------------
  |  Branch (166:21): [True: 0, False: 0]
  ------------------
  167|      0|            lengthBytes[i + j] = bits >> (8 * i);
  168|      0|        }
  169|  8.99k|    } else {
  170|       |        /* All other TLS hash functions use a big-endian length. */
  171|  44.9k|        for (i = 0; i < 4; i++) {
  ------------------
  |  Branch (171:21): [True: 35.9k, False: 8.99k]
  ------------------
  172|  35.9k|            lengthBytes[4 + i + j] = bits >> (8 * (3 - i));
  173|  35.9k|        }
  174|  8.99k|    }
  175|       |
  176|  8.99k|    if (k > 0) {
  ------------------
  |  Branch (176:9): [True: 256, False: 8.73k]
  ------------------
  177|    256|        if (isSSLv3) {
  ------------------
  |  Branch (177:13): [True: 0, False: 256]
  ------------------
  178|       |            /* The SSLv3 header is larger than a single block.
  179|       |             * overhang is the number of bytes beyond a single
  180|       |             * block that the header consumes: either 7 bytes
  181|       |             * (SHA1) or 11 bytes (MD5). */
  182|      0|            const unsigned int overhang = headerLen - mdBlockSize;
  183|      0|            hashObj->update(mdState, header, mdBlockSize);
  184|      0|            memcpy(firstBlock, header + mdBlockSize, overhang);
  185|      0|            memcpy(firstBlock + overhang, data, mdBlockSize - overhang);
  186|      0|            hashObj->update(mdState, firstBlock, mdBlockSize);
  187|      0|            for (i = 1; i < k / mdBlockSize - 1; i++) {
  ------------------
  |  Branch (187:25): [True: 0, False: 0]
  ------------------
  188|      0|                hashObj->update(mdState, data + mdBlockSize * i - overhang,
  189|      0|                                mdBlockSize);
  190|      0|            }
  191|    256|        } else {
  192|       |            /* k is a multiple of mdBlockSize. */
  193|    256|            memcpy(firstBlock, header, 13);
  194|    256|            memcpy(firstBlock + 13, data, mdBlockSize - 13);
  195|    256|            hashObj->update(mdState, firstBlock, mdBlockSize);
  196|  12.3k|            for (i = 1; i < k / mdBlockSize; i++) {
  ------------------
  |  Branch (196:25): [True: 12.1k, False: 256]
  ------------------
  197|  12.1k|                hashObj->update(mdState, data + mdBlockSize * i - 13,
  198|  12.1k|                                mdBlockSize);
  199|  12.1k|            }
  200|    256|        }
  201|    256|    }
  202|       |
  203|  8.99k|    memset(macOut, 0, sizeof(macOut));
  204|       |
  205|       |    /* We now process the final hash blocks. For each block, we construct
  206|       |     * it in constant time. If i == indexA then we'll include the 0x80
  207|       |     * bytes and zero pad etc. For each block we selectively copy it, in
  208|       |     * constant time, to |macOut|. */
  209|  71.9k|    for (i = numStartingBlocks; i <= numStartingBlocks + varianceBlocks; i++) {
  ------------------
  |  Branch (209:33): [True: 62.9k, False: 8.99k]
  ------------------
  210|  62.9k|        unsigned char block[HASH_BLOCK_LENGTH_MAX];
  211|  62.9k|        unsigned char isBlockA = constantTimeEQ(i, indexA);
  212|  62.9k|        unsigned char isBlockB = constantTimeEQ(i, indexB);
  213|  4.09M|        for (j = 0; j < mdBlockSize; j++) {
  ------------------
  |  Branch (213:21): [True: 4.02M, False: 62.9k]
  ------------------
  214|  4.02M|            unsigned char isPastC = isBlockA & constantTimeGE(j, c);
  215|  4.02M|            unsigned char isPastCPlus1 = isBlockA & constantTimeGE(j, c + 1);
  216|  4.02M|            unsigned char b = 0;
  217|  4.02M|            if (k < headerLen) {
  ------------------
  |  Branch (217:17): [True: 113k, False: 3.91M]
  ------------------
  218|   113k|                b = header[k];
  219|  3.91M|            } else if (k < dataTotalLen + headerLen) {
  ------------------
  |  Branch (219:24): [True: 421k, False: 3.49M]
  ------------------
  220|   421k|                b = data[k - headerLen];
  221|   421k|            }
  222|  4.02M|            k++;
  223|       |
  224|       |            /* If this is the block containing the end of the
  225|       |             * application data, and we are at the offset for the
  226|       |             * 0x80 value, then overwrite b with 0x80. */
  227|  4.02M|            b = (b & ~isPastC) | (0x80 & isPastC);
  228|       |            /* If this the the block containing the end of the
  229|       |             * application data and we're past the 0x80 value then
  230|       |             * just write zero. */
  231|  4.02M|            b = b & ~isPastCPlus1;
  232|       |            /* If this is indexB (the final block), but not
  233|       |             * indexA (the end of the data), then the 64-bit
  234|       |             * length didn't fit into indexA and we're having to
  235|       |             * add an extra block of zeros. */
  236|  4.02M|            b &= ~isBlockB | isBlockA;
  237|       |
  238|       |            /* The final bytes of one of the blocks contains the length. */
  239|  4.02M|            if (j >= mdBlockSize - mdLengthSize) {
  ------------------
  |  Branch (239:17): [True: 503k, False: 3.52M]
  ------------------
  240|       |                /* If this is indexB, write a length byte. */
  241|   503k|                b = (b & ~isBlockB) |
  242|   503k|                    (isBlockB & lengthBytes[j - (mdBlockSize - mdLengthSize)]);
  243|   503k|            }
  244|  4.02M|            block[j] = b;
  245|  4.02M|        }
  246|       |
  247|  62.9k|        hashObj->update(mdState, block, mdBlockSize);
  248|  62.9k|        hashObj->end_raw(mdState, block, NULL, mdSize);
  249|       |        /* If this is indexB, copy the hash value to |macOut|. */
  250|  1.41M|        for (j = 0; j < mdSize; j++) {
  ------------------
  |  Branch (250:21): [True: 1.35M, False: 62.9k]
  ------------------
  251|  1.35M|            macOut[j] |= block[j] & isBlockB;
  252|  1.35M|        }
  253|  62.9k|    }
  254|       |
  255|  8.99k|    hashObj->begin(mdState);
  256|       |
  257|  8.99k|    if (isSSLv3) {
  ------------------
  |  Branch (257:9): [True: 0, False: 8.99k]
  ------------------
  258|       |        /* We repurpose |hmacPad| to contain the SSLv3 pad2 block. */
  259|      0|        for (i = 0; i < sslv3PadLen; i++)
  ------------------
  |  Branch (259:21): [True: 0, False: 0]
  ------------------
  260|      0|            hmacPad[i] = 0x5c;
  261|       |
  262|      0|        hashObj->update(mdState, macSecret, macSecretLen);
  263|      0|        hashObj->update(mdState, hmacPad, sslv3PadLen);
  264|      0|        hashObj->update(mdState, macOut, mdSize);
  265|  8.99k|    } else {
  266|       |        /* Complete the HMAC in the standard manner. */
  267|   584k|        for (i = 0; i < mdBlockSize; i++)
  ------------------
  |  Branch (267:21): [True: 575k, False: 8.99k]
  ------------------
  268|   575k|            hmacPad[i] ^= 0x6a;
  269|       |
  270|  8.99k|        hashObj->update(mdState, hmacPad, mdBlockSize);
  271|  8.99k|        hashObj->update(mdState, macOut, mdSize);
  272|  8.99k|    }
  273|       |
  274|  8.99k|    hashObj->end(mdState, mdOut, mdOutLen, mdOutMax);
  275|  8.99k|    hashObj->destroy(mdState, PR_TRUE);
  ------------------
  |  |  437|  8.99k|#define PR_TRUE 1
  ------------------
  276|       |
  277|  8.99k|    PORT_SafeZero(lengthBytes, sizeof lengthBytes);
  278|  8.99k|    PORT_SafeZero(hmacPad, sizeof hmacPad);
  279|  8.99k|    PORT_SafeZero(firstBlock, sizeof firstBlock);
  280|  8.99k|    PORT_SafeZero(macOut, sizeof macOut);
  281|       |
  282|  8.99k|    return SECSuccess;
  283|  8.99k|}
hmacct.c:constantTimeEQ:
   30|   125k|{
   31|   125k|    return PORT_CT_EQ(a, b);
  ------------------
  |  |  360|   125k|#define PORT_CT_EQ(a, b) PORT_CT_ZERO(((a) - (b)))
  |  |  ------------------
  |  |  |  |  356|   125k|#define PORT_CT_ZERO(x) (~PORT_CT_DUPLICATE_MSB_TO_ALL(((x) | (0 - (x)))))
  |  |  |  |  ------------------
  |  |  |  |  |  |  344|   125k|#define PORT_CT_DUPLICATE_MSB_TO_ALL(x) ((PRUint32)((PRInt32)(x) >> (sizeof(PRInt32) * 8 - 1)))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   32|   125k|}
hmacct.c:constantTimeGE:
   23|  8.05M|{
   24|  8.05M|    return PORT_CT_GE(a, b);
  ------------------
  |  |  364|  8.05M|#define PORT_CT_GE(a, b) (~PORT_CT_LT(a, b))
  |  |  ------------------
  |  |  |  |  363|  8.05M|#define PORT_CT_LT(a, b) PORT_CT_DUPLICATE_MSB_TO_ALL((a) - (b))
  |  |  |  |  ------------------
  |  |  |  |  |  |  344|  8.05M|#define PORT_CT_DUPLICATE_MSB_TO_ALL(x) ((PRUint32)((PRInt32)(x) >> (sizeof(PRInt32) * 8 - 1)))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   25|  8.05M|}

Kyber_NewKey:
  138|     40|{
  139|     40|    if (!valid_params(params)) {
  ------------------
  |  Branch (139:9): [True: 0, False: 40]
  ------------------
  140|      0|        PORT_SetError(SEC_ERROR_INVALID_ALGORITHM);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  141|      0|        return SECFailure;
  142|      0|    }
  143|       |
  144|     40|    if (!(valid_keypair_seed(params, keypair_seed) && valid_privkey(params, privkey) && valid_pubkey(params, pubkey))) {
  ------------------
  |  Branch (144:11): [True: 40, False: 0]
  |  Branch (144:55): [True: 40, False: 0]
  |  Branch (144:89): [True: 40, False: 0]
  ------------------
  145|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  146|      0|        return SECFailure;
  147|      0|    }
  148|       |
  149|     40|    uint8_t randbuf[KYBER_KEYPAIR_COIN_BYTES];
  150|     40|    uint8_t *coins;
  151|     40|    if (keypair_seed) {
  ------------------
  |  Branch (151:9): [True: 0, False: 40]
  ------------------
  152|      0|        coins = keypair_seed->data;
  153|     40|    } else {
  154|     40|        if (RNG_GenerateGlobalRandomBytes(randbuf, sizeof randbuf) != SECSuccess) {
  ------------------
  |  Branch (154:13): [True: 0, False: 40]
  ------------------
  155|      0|            PORT_SetError(SEC_ERROR_NEED_RANDOM);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  156|      0|            return SECFailure;
  157|      0|        }
  158|     40|        coins = randbuf;
  159|     40|    }
  160|     40|    NSS_CLASSIFY(coins, KYBER_KEYPAIR_COIN_BYTES);
  161|     40|    if (params == params_kyber768_round3 || params == params_kyber768_round3_test_mode) {
  ------------------
  |  Branch (161:9): [True: 0, False: 40]
  |  Branch (161:45): [True: 0, False: 40]
  ------------------
  162|      0|        pqcrystals_kyber768_ref_keypair_derand(pubkey->data, privkey->data, coins);
  163|     40|    } else if (params == params_ml_kem768 || params == params_ml_kem768_test_mode) {
  ------------------
  |  Branch (163:16): [True: 40, False: 0]
  |  Branch (163:46): [True: 0, False: 0]
  ------------------
  164|     40|        libcrux_ml_kem_mlkem768_MlKem768KeyPair keys = libcrux_ml_kem_mlkem768_portable_generate_key_pair(coins);
  165|     40|        memcpy(pubkey->data, keys.pk.value, KYBER768_PUBLIC_KEY_BYTES);
  ------------------
  |  |    8|     40|#define KYBER768_PUBLIC_KEY_BYTES 1184U
  ------------------
  166|     40|        memcpy(privkey->data, keys.sk.value, KYBER768_PRIVATE_KEY_BYTES);
  ------------------
  |  |    9|     40|#define KYBER768_PRIVATE_KEY_BYTES 2400U
  ------------------
  167|     40|    } else {
  168|       |        /* unreachable */
  169|      0|        PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  170|      0|        return SECFailure;
  171|      0|    }
  172|     40|    NSS_DECLASSIFY(pubkey->data, pubkey->len);
  173|     40|    return SECSuccess;
  174|     40|}
kyber.c:valid_params:
   39|     40|{
   40|     40|    switch (params) {
   41|      0|        case params_kyber768_round3:
  ------------------
  |  Branch (41:9): [True: 0, False: 40]
  ------------------
   42|      0|        case params_kyber768_round3_test_mode:
  ------------------
  |  Branch (42:9): [True: 0, False: 40]
  ------------------
   43|     40|        case params_ml_kem768:
  ------------------
  |  Branch (43:9): [True: 40, False: 0]
  ------------------
   44|     40|        case params_ml_kem768_test_mode:
  ------------------
  |  Branch (44:9): [True: 0, False: 40]
  ------------------
   45|     40|            return true;
   46|      0|        default:
  ------------------
  |  Branch (46:9): [True: 0, False: 40]
  ------------------
   47|      0|            return false;
   48|     40|    }
   49|     40|}
kyber.c:valid_keypair_seed:
  109|     40|{
  110|     40|    switch (params) {
  111|      0|        case params_kyber768_round3:
  ------------------
  |  Branch (111:9): [True: 0, False: 40]
  ------------------
  112|      0|        case params_kyber768_round3_test_mode:
  ------------------
  |  Branch (112:9): [True: 0, False: 40]
  ------------------
  113|     40|        case params_ml_kem768:
  ------------------
  |  Branch (113:9): [True: 40, False: 0]
  ------------------
  114|     40|        case params_ml_kem768_test_mode:
  ------------------
  |  Branch (114:9): [True: 0, False: 40]
  ------------------
  115|     40|            return !seed || seed->len == KYBER_KEYPAIR_COIN_BYTES;
  ------------------
  |  |   13|     40|#define KYBER_KEYPAIR_COIN_BYTES 64U
  ------------------
  |  Branch (115:20): [True: 40, False: 0]
  |  Branch (115:29): [True: 0, False: 0]
  ------------------
  116|      0|        default:
  ------------------
  |  Branch (116:9): [True: 0, False: 40]
  ------------------
  117|      0|            return false;
  118|     40|    }
  119|     40|}
kyber.c:valid_privkey:
   67|     40|{
   68|     40|    switch (params) {
   69|      0|        case params_kyber768_round3:
  ------------------
  |  Branch (69:9): [True: 0, False: 40]
  ------------------
   70|      0|        case params_kyber768_round3_test_mode:
  ------------------
  |  Branch (70:9): [True: 0, False: 40]
  ------------------
   71|     40|        case params_ml_kem768:
  ------------------
  |  Branch (71:9): [True: 40, False: 0]
  ------------------
   72|     40|        case params_ml_kem768_test_mode:
  ------------------
  |  Branch (72:9): [True: 0, False: 40]
  ------------------
   73|     40|            return privkey && privkey->len == KYBER768_PRIVATE_KEY_BYTES;
  ------------------
  |  |    9|     80|#define KYBER768_PRIVATE_KEY_BYTES 2400U
  ------------------
  |  Branch (73:20): [True: 40, False: 0]
  |  Branch (73:31): [True: 40, False: 0]
  ------------------
   74|      0|        default:
  ------------------
  |  Branch (74:9): [True: 0, False: 40]
  ------------------
   75|      0|            return false;
   76|     40|    }
   77|     40|}
kyber.c:valid_pubkey:
   53|     40|{
   54|     40|    switch (params) {
   55|      0|        case params_kyber768_round3:
  ------------------
  |  Branch (55:9): [True: 0, False: 40]
  ------------------
   56|      0|        case params_kyber768_round3_test_mode:
  ------------------
  |  Branch (56:9): [True: 0, False: 40]
  ------------------
   57|     40|        case params_ml_kem768:
  ------------------
  |  Branch (57:9): [True: 40, False: 0]
  ------------------
   58|     40|        case params_ml_kem768_test_mode:
  ------------------
  |  Branch (58:9): [True: 0, False: 40]
  ------------------
   59|     40|            return pubkey && pubkey->len == KYBER768_PUBLIC_KEY_BYTES;
  ------------------
  |  |    8|     80|#define KYBER768_PUBLIC_KEY_BYTES 1184U
  ------------------
  |  Branch (59:20): [True: 40, False: 0]
  |  Branch (59:30): [True: 40, False: 0]
  ------------------
   60|      0|        default:
  ------------------
  |  Branch (60:9): [True: 0, False: 40]
  ------------------
   61|      0|            return false;
   62|     40|    }
   63|     40|}

MD5_NewContext:
  216|  36.2k|{
  217|       |    /* no need to ZAlloc, MD5_Begin will init the context */
  218|  36.2k|    MD5Context *cx = (MD5Context *)PORT_Alloc(sizeof(MD5Context));
  ------------------
  |  |   52|  36.2k|#define PORT_Alloc PORT_Alloc_Util
  ------------------
  219|  36.2k|    if (cx == NULL) {
  ------------------
  |  Branch (219:9): [True: 0, False: 36.2k]
  ------------------
  220|      0|        PORT_SetError(PR_OUT_OF_MEMORY_ERROR);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
                      PORT_SetError(PR_OUT_OF_MEMORY_ERROR);
  ------------------
  |  |   16|      0|#define PR_OUT_OF_MEMORY_ERROR                   (-6000L)
  ------------------
  221|      0|        return NULL;
  222|      0|    }
  223|  36.2k|    return cx;
  224|  36.2k|}
MD5_DestroyContext:
  228|  36.2k|{
  229|  36.2k|    memset(cx, 0, sizeof *cx);
  230|  36.2k|    if (freeit) {
  ------------------
  |  Branch (230:9): [True: 36.2k, False: 0]
  ------------------
  231|  36.2k|        PORT_Free(cx);
  ------------------
  |  |   60|  36.2k|#define PORT_Free PORT_Free_Util
  ------------------
  232|  36.2k|    }
  233|  36.2k|}
MD5_Begin:
  237|  70.8k|{
  238|  70.8k|    cx->lsbInput = 0;
  239|  70.8k|    cx->msbInput = 0;
  240|       |    /*  memset(cx->inBuf, 0, sizeof(cx->inBuf)); */
  241|  70.8k|    cx->cv[0] = CV0_1;
  ------------------
  |  |   22|  70.8k|#define CV0_1 0x67452301
  ------------------
  242|  70.8k|    cx->cv[1] = CV0_2;
  ------------------
  |  |   23|  70.8k|#define CV0_2 0xefcdab89
  ------------------
  243|  70.8k|    cx->cv[2] = CV0_3;
  ------------------
  |  |   24|  70.8k|#define CV0_3 0x98badcfe
  ------------------
  244|  70.8k|    cx->cv[3] = CV0_4;
  ------------------
  |  |   25|  70.8k|#define CV0_4 0x10325476
  ------------------
  245|  70.8k|}
MD5_Update:
  423|   243k|{
  424|   243k|    PRUint32 bytesToConsume;
  425|   243k|    PRUint32 inBufIndex = cx->lsbInput & 63;
  426|   243k|    const PRUint32 *wBuf;
  427|       |
  428|       |    /* Add the number of input bytes to the 64-bit input counter. */
  429|   243k|    addto64(cx->msbInput, cx->lsbInput, inputLen);
  ------------------
  |  |  255|   243k|    sumlow += addend;                    \
  |  |  256|   243k|    if (sumlow < addend)                 \
  |  |  ------------------
  |  |  |  Branch (256:9): [True: 0, False: 243k]
  |  |  ------------------
  |  |  257|   243k|        ++sumhigh;
  ------------------
  430|   243k|    if (inBufIndex) {
  ------------------
  |  Branch (430:9): [True: 102k, False: 141k]
  ------------------
  431|       |        /* There is already data in the buffer.  Fill with input. */
  432|   102k|        bytesToConsume = PR_MIN(inputLen, MD5_BUFFER_SIZE - inBufIndex);
  ------------------
  |  |  158|   102k|#define PR_MIN(x,y)     ((x)<(y)?(x):(y))
  |  |  ------------------
  |  |  |  Branch (158:26): [True: 100k, False: 1.85k]
  |  |  ------------------
  ------------------
  433|   102k|        memcpy(&cx->inBuf[inBufIndex], input, bytesToConsume);
  ------------------
  |  |  193|   102k|#define inBuf u.b
  ------------------
  434|   102k|        if (inBufIndex + bytesToConsume >= MD5_BUFFER_SIZE) {
  ------------------
  |  |   19|   102k|#define MD5_BUFFER_SIZE 64
  ------------------
  |  Branch (434:13): [True: 1.85k, False: 100k]
  ------------------
  435|       |/* The buffer is filled.  Run the compression function. */
  436|       |#ifndef IS_LITTLE_ENDIAN
  437|       |            md5_prep_state_le(cx);
  438|       |#endif
  439|  1.85k|            md5_compress(cx, cx->u.w);
  440|  1.85k|        }
  441|       |        /* Remaining input. */
  442|   102k|        inputLen -= bytesToConsume;
  443|   102k|        input += bytesToConsume;
  444|   102k|    }
  445|       |
  446|       |    /* Iterate over 64-byte chunks of the message. */
  447|   319k|    while (inputLen >= MD5_BUFFER_SIZE) {
  ------------------
  |  |   19|   319k|#define MD5_BUFFER_SIZE 64
  ------------------
  |  Branch (447:12): [True: 75.2k, False: 243k]
  ------------------
  448|  75.2k|#ifdef IS_LITTLE_ENDIAN
  449|  75.2k|#ifdef HAVE_UNALIGNED_ACCESS
  450|       |        /* x86 can handle arithmetic on non-word-aligned buffers */
  451|  75.2k|        wBuf = (PRUint32 *)input;
  452|       |#else
  453|       |        if ((ptrdiff_t)input & 0x3) {
  454|       |            /* buffer not aligned, copy it to force alignment */
  455|       |            memcpy(cx->inBuf, input, MD5_BUFFER_SIZE);
  456|       |            wBuf = cx->u.w;
  457|       |        } else {
  458|       |            /* buffer is aligned */
  459|       |            wBuf = (PRUint32 *)input;
  460|       |        }
  461|       |#endif
  462|       |#else
  463|       |        md5_prep_buffer_le(cx, input);
  464|       |        wBuf = cx->u.w;
  465|       |#endif
  466|  75.2k|        md5_compress(cx, wBuf);
  467|  75.2k|        inputLen -= MD5_BUFFER_SIZE;
  ------------------
  |  |   19|  75.2k|#define MD5_BUFFER_SIZE 64
  ------------------
  468|  75.2k|        input += MD5_BUFFER_SIZE;
  ------------------
  |  |   19|  75.2k|#define MD5_BUFFER_SIZE 64
  ------------------
  469|  75.2k|    }
  470|       |
  471|       |    /* Tail of message (message bytes mod 64). */
  472|   243k|    if (inputLen)
  ------------------
  |  Branch (472:9): [True: 72.3k, False: 171k]
  ------------------
  473|  72.3k|        memcpy(cx->inBuf, input, inputLen);
  ------------------
  |  |  193|  72.3k|#define inBuf u.b
  ------------------
  474|   243k|}
MD5_End:
  494|  70.3k|{
  495|       |#ifndef IS_LITTLE_ENDIAN
  496|       |    PRUint32 tmp;
  497|       |#endif
  498|  70.3k|    PRUint32 lowInput, highInput;
  499|  70.3k|    PRUint32 inBufIndex = cx->lsbInput & 63;
  500|       |
  501|  70.3k|    if (maxDigestLen < MD5_HASH_LEN) {
  ------------------
  |  |   18|  70.3k|#define MD5_HASH_LEN 16
  ------------------
  |  Branch (501:9): [True: 0, False: 70.3k]
  ------------------
  502|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  503|      0|        return;
  504|      0|    }
  505|       |
  506|       |    /* Copy out the length of bits input before padding. */
  507|  70.3k|    lowInput = cx->lsbInput;
  508|  70.3k|    highInput = (cx->msbInput << 3) | (lowInput >> 29);
  509|  70.3k|    lowInput <<= 3;
  510|       |
  511|  70.3k|    if (inBufIndex < MD5_END_BUFFER) {
  ------------------
  |  |   20|  70.3k|#define MD5_END_BUFFER (MD5_BUFFER_SIZE - 8)
  |  |  ------------------
  |  |  |  |   19|  70.3k|#define MD5_BUFFER_SIZE 64
  |  |  ------------------
  ------------------
  |  Branch (511:9): [True: 70.0k, False: 253]
  ------------------
  512|  70.0k|        MD5_Update(cx, padbytes, MD5_END_BUFFER - inBufIndex);
  ------------------
  |  |   20|  70.0k|#define MD5_END_BUFFER (MD5_BUFFER_SIZE - 8)
  |  |  ------------------
  |  |  |  |   19|  70.0k|#define MD5_BUFFER_SIZE 64
  |  |  ------------------
  ------------------
  513|  70.0k|    } else {
  514|    253|        MD5_Update(cx, padbytes,
  515|    253|                   MD5_END_BUFFER + MD5_BUFFER_SIZE - inBufIndex);
  ------------------
  |  |   20|    253|#define MD5_END_BUFFER (MD5_BUFFER_SIZE - 8)
  |  |  ------------------
  |  |  |  |   19|    253|#define MD5_BUFFER_SIZE 64
  |  |  ------------------
  ------------------
                                 MD5_END_BUFFER + MD5_BUFFER_SIZE - inBufIndex);
  ------------------
  |  |   19|    253|#define MD5_BUFFER_SIZE 64
  ------------------
  516|    253|    }
  517|       |
  518|       |    /* Store the number of bytes input (before padding) in final 64 bits. */
  519|  70.3k|    cx->u.w[14] = lendian(lowInput);
  ------------------
  |  |  263|  70.3k|    (i32)
  ------------------
  520|  70.3k|    cx->u.w[15] = lendian(highInput);
  ------------------
  |  |  263|  70.3k|    (i32)
  ------------------
  521|       |
  522|       |/* Final call to compress. */
  523|       |#ifndef IS_LITTLE_ENDIAN
  524|       |    md5_prep_state_le(cx);
  525|       |#endif
  526|  70.3k|    md5_compress(cx, cx->u.w);
  527|       |
  528|       |    /* Copy the resulting values out of the chain variables into return buf. */
  529|  70.3k|    if (digestLen)
  ------------------
  |  Branch (529:9): [True: 70.3k, False: 0]
  ------------------
  530|  70.3k|        *digestLen = MD5_HASH_LEN;
  ------------------
  |  |   18|  70.3k|#define MD5_HASH_LEN 16
  ------------------
  531|       |#ifndef IS_LITTLE_ENDIAN
  532|       |    cx->cv[0] = lendian(cx->cv[0]);
  533|       |    cx->cv[1] = lendian(cx->cv[1]);
  534|       |    cx->cv[2] = lendian(cx->cv[2]);
  535|       |    cx->cv[3] = lendian(cx->cv[3]);
  536|       |#endif
  537|  70.3k|    memcpy(digest, cx->cv, MD5_HASH_LEN);
  ------------------
  |  |   18|  70.3k|#define MD5_HASH_LEN 16
  ------------------
  538|  70.3k|}
MD5_FlattenSize:
  568|    335|{
  569|    335|    return sizeof(*cx);
  570|    335|}
md5.c:md5_compress:
  344|   147k|{
  345|   147k|    PRUint32 a, b, c, d;
  346|   147k|    PRUint32 tmp;
  347|   147k|    a = cx->cv[0];
  348|   147k|    b = cx->cv[1];
  349|   147k|    c = cx->cv[2];
  350|   147k|    d = cx->cv[3];
  351|   147k|    FF(a, b, c, d, wBuf[R1B0], S1_0, T1_0);
  ------------------
  |  |  331|   147k|    a = b + cls(a + F(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  352|   147k|    FF(d, a, b, c, wBuf[R1B1], S1_1, T1_1);
  ------------------
  |  |  331|   147k|    a = b + cls(a + F(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  353|   147k|    FF(c, d, a, b, wBuf[R1B2], S1_2, T1_2);
  ------------------
  |  |  331|   147k|    a = b + cls(a + F(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  354|   147k|    FF(b, c, d, a, wBuf[R1B3], S1_3, T1_3);
  ------------------
  |  |  331|   147k|    a = b + cls(a + F(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  355|   147k|    FF(a, b, c, d, wBuf[R1B4], S1_0, T1_4);
  ------------------
  |  |  331|   147k|    a = b + cls(a + F(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  356|   147k|    FF(d, a, b, c, wBuf[R1B5], S1_1, T1_5);
  ------------------
  |  |  331|   147k|    a = b + cls(a + F(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  357|   147k|    FF(c, d, a, b, wBuf[R1B6], S1_2, T1_6);
  ------------------
  |  |  331|   147k|    a = b + cls(a + F(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  358|   147k|    FF(b, c, d, a, wBuf[R1B7], S1_3, T1_7);
  ------------------
  |  |  331|   147k|    a = b + cls(a + F(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  359|   147k|    FF(a, b, c, d, wBuf[R1B8], S1_0, T1_8);
  ------------------
  |  |  331|   147k|    a = b + cls(a + F(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  360|   147k|    FF(d, a, b, c, wBuf[R1B9], S1_1, T1_9);
  ------------------
  |  |  331|   147k|    a = b + cls(a + F(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  361|   147k|    FF(c, d, a, b, wBuf[R1B10], S1_2, T1_10);
  ------------------
  |  |  331|   147k|    a = b + cls(a + F(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  362|   147k|    FF(b, c, d, a, wBuf[R1B11], S1_3, T1_11);
  ------------------
  |  |  331|   147k|    a = b + cls(a + F(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  363|   147k|    FF(a, b, c, d, wBuf[R1B12], S1_0, T1_12);
  ------------------
  |  |  331|   147k|    a = b + cls(a + F(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  364|   147k|    FF(d, a, b, c, wBuf[R1B13], S1_1, T1_13);
  ------------------
  |  |  331|   147k|    a = b + cls(a + F(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  365|   147k|    FF(c, d, a, b, wBuf[R1B14], S1_2, T1_14);
  ------------------
  |  |  331|   147k|    a = b + cls(a + F(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  366|   147k|    FF(b, c, d, a, wBuf[R1B15], S1_3, T1_15);
  ------------------
  |  |  331|   147k|    a = b + cls(a + F(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  367|   147k|    GG(a, b, c, d, wBuf[R2B0], S2_0, T2_0);
  ------------------
  |  |  334|   147k|    a = b + cls(a + G(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  368|   147k|    GG(d, a, b, c, wBuf[R2B1], S2_1, T2_1);
  ------------------
  |  |  334|   147k|    a = b + cls(a + G(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  369|   147k|    GG(c, d, a, b, wBuf[R2B2], S2_2, T2_2);
  ------------------
  |  |  334|   147k|    a = b + cls(a + G(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  370|   147k|    GG(b, c, d, a, wBuf[R2B3], S2_3, T2_3);
  ------------------
  |  |  334|   147k|    a = b + cls(a + G(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  371|   147k|    GG(a, b, c, d, wBuf[R2B4], S2_0, T2_4);
  ------------------
  |  |  334|   147k|    a = b + cls(a + G(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  372|   147k|    GG(d, a, b, c, wBuf[R2B5], S2_1, T2_5);
  ------------------
  |  |  334|   147k|    a = b + cls(a + G(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  373|   147k|    GG(c, d, a, b, wBuf[R2B6], S2_2, T2_6);
  ------------------
  |  |  334|   147k|    a = b + cls(a + G(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  374|   147k|    GG(b, c, d, a, wBuf[R2B7], S2_3, T2_7);
  ------------------
  |  |  334|   147k|    a = b + cls(a + G(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  375|   147k|    GG(a, b, c, d, wBuf[R2B8], S2_0, T2_8);
  ------------------
  |  |  334|   147k|    a = b + cls(a + G(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  376|   147k|    GG(d, a, b, c, wBuf[R2B9], S2_1, T2_9);
  ------------------
  |  |  334|   147k|    a = b + cls(a + G(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  377|   147k|    GG(c, d, a, b, wBuf[R2B10], S2_2, T2_10);
  ------------------
  |  |  334|   147k|    a = b + cls(a + G(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  378|   147k|    GG(b, c, d, a, wBuf[R2B11], S2_3, T2_11);
  ------------------
  |  |  334|   147k|    a = b + cls(a + G(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  379|   147k|    GG(a, b, c, d, wBuf[R2B12], S2_0, T2_12);
  ------------------
  |  |  334|   147k|    a = b + cls(a + G(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  380|   147k|    GG(d, a, b, c, wBuf[R2B13], S2_1, T2_13);
  ------------------
  |  |  334|   147k|    a = b + cls(a + G(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  381|   147k|    GG(c, d, a, b, wBuf[R2B14], S2_2, T2_14);
  ------------------
  |  |  334|   147k|    a = b + cls(a + G(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  382|   147k|    GG(b, c, d, a, wBuf[R2B15], S2_3, T2_15);
  ------------------
  |  |  334|   147k|    a = b + cls(a + G(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  383|   147k|    HH(a, b, c, d, wBuf[R3B0], S3_0, T3_0);
  ------------------
  |  |  337|   147k|    a = b + cls(a + H(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  384|   147k|    HH(d, a, b, c, wBuf[R3B1], S3_1, T3_1);
  ------------------
  |  |  337|   147k|    a = b + cls(a + H(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  385|   147k|    HH(c, d, a, b, wBuf[R3B2], S3_2, T3_2);
  ------------------
  |  |  337|   147k|    a = b + cls(a + H(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  386|   147k|    HH(b, c, d, a, wBuf[R3B3], S3_3, T3_3);
  ------------------
  |  |  337|   147k|    a = b + cls(a + H(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  387|   147k|    HH(a, b, c, d, wBuf[R3B4], S3_0, T3_4);
  ------------------
  |  |  337|   147k|    a = b + cls(a + H(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  388|   147k|    HH(d, a, b, c, wBuf[R3B5], S3_1, T3_5);
  ------------------
  |  |  337|   147k|    a = b + cls(a + H(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  389|   147k|    HH(c, d, a, b, wBuf[R3B6], S3_2, T3_6);
  ------------------
  |  |  337|   147k|    a = b + cls(a + H(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  390|   147k|    HH(b, c, d, a, wBuf[R3B7], S3_3, T3_7);
  ------------------
  |  |  337|   147k|    a = b + cls(a + H(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  391|   147k|    HH(a, b, c, d, wBuf[R3B8], S3_0, T3_8);
  ------------------
  |  |  337|   147k|    a = b + cls(a + H(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  392|   147k|    HH(d, a, b, c, wBuf[R3B9], S3_1, T3_9);
  ------------------
  |  |  337|   147k|    a = b + cls(a + H(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  393|   147k|    HH(c, d, a, b, wBuf[R3B10], S3_2, T3_10);
  ------------------
  |  |  337|   147k|    a = b + cls(a + H(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  394|   147k|    HH(b, c, d, a, wBuf[R3B11], S3_3, T3_11);
  ------------------
  |  |  337|   147k|    a = b + cls(a + H(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  395|   147k|    HH(a, b, c, d, wBuf[R3B12], S3_0, T3_12);
  ------------------
  |  |  337|   147k|    a = b + cls(a + H(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  396|   147k|    HH(d, a, b, c, wBuf[R3B13], S3_1, T3_13);
  ------------------
  |  |  337|   147k|    a = b + cls(a + H(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  397|   147k|    HH(c, d, a, b, wBuf[R3B14], S3_2, T3_14);
  ------------------
  |  |  337|   147k|    a = b + cls(a + H(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  398|   147k|    HH(b, c, d, a, wBuf[R3B15], S3_3, T3_15);
  ------------------
  |  |  337|   147k|    a = b + cls(a + H(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  399|   147k|    II(a, b, c, d, wBuf[R4B0], S4_0, T4_0);
  ------------------
  |  |  340|   147k|    a = b + cls(a + I(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  400|   147k|    II(d, a, b, c, wBuf[R4B1], S4_1, T4_1);
  ------------------
  |  |  340|   147k|    a = b + cls(a + I(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  401|   147k|    II(c, d, a, b, wBuf[R4B2], S4_2, T4_2);
  ------------------
  |  |  340|   147k|    a = b + cls(a + I(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  402|   147k|    II(b, c, d, a, wBuf[R4B3], S4_3, T4_3);
  ------------------
  |  |  340|   147k|    a = b + cls(a + I(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  403|   147k|    II(a, b, c, d, wBuf[R4B4], S4_0, T4_4);
  ------------------
  |  |  340|   147k|    a = b + cls(a + I(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  404|   147k|    II(d, a, b, c, wBuf[R4B5], S4_1, T4_5);
  ------------------
  |  |  340|   147k|    a = b + cls(a + I(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  405|   147k|    II(c, d, a, b, wBuf[R4B6], S4_2, T4_6);
  ------------------
  |  |  340|   147k|    a = b + cls(a + I(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  406|   147k|    II(b, c, d, a, wBuf[R4B7], S4_3, T4_7);
  ------------------
  |  |  340|   147k|    a = b + cls(a + I(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  407|   147k|    II(a, b, c, d, wBuf[R4B8], S4_0, T4_8);
  ------------------
  |  |  340|   147k|    a = b + cls(a + I(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  408|   147k|    II(d, a, b, c, wBuf[R4B9], S4_1, T4_9);
  ------------------
  |  |  340|   147k|    a = b + cls(a + I(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  409|   147k|    II(c, d, a, b, wBuf[R4B10], S4_2, T4_10);
  ------------------
  |  |  340|   147k|    a = b + cls(a + I(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  410|   147k|    II(b, c, d, a, wBuf[R4B11], S4_3, T4_11);
  ------------------
  |  |  340|   147k|    a = b + cls(a + I(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  411|   147k|    II(a, b, c, d, wBuf[R4B12], S4_0, T4_12);
  ------------------
  |  |  340|   147k|    a = b + cls(a + I(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  412|   147k|    II(d, a, b, c, wBuf[R4B13], S4_1, T4_13);
  ------------------
  |  |  340|   147k|    a = b + cls(a + I(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  413|   147k|    II(c, d, a, b, wBuf[R4B14], S4_2, T4_14);
  ------------------
  |  |  340|   147k|    a = b + cls(a + I(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  414|   147k|    II(b, c, d, a, wBuf[R4B15], S4_3, T4_15);
  ------------------
  |  |  340|   147k|    a = b + cls(a + I(b, c, d) + bufint + ti, s)
  |  |  ------------------
  |  |  |  |  247|   147k|#define cls(i32, s) (tmp = i32, tmp << s | tmp >> (32 - s))
  |  |  ------------------
  ------------------
  415|   147k|    cx->cv[0] += a;
  416|   147k|    cx->cv[1] += b;
  417|   147k|    cx->cv[2] += c;
  418|   147k|    cx->cv[3] += d;
  419|   147k|}

s_mp_mul_comba_4:
  142|  2.58k|{
  143|  2.58k|    mp_digit c0, c1, c2, at[8];
  144|       |
  145|  2.58k|    memcpy(at, A->dp, 4 * sizeof(mp_digit));
  146|  2.58k|    memcpy(at + 4, B->dp, 4 * sizeof(mp_digit));
  147|  2.58k|    COMBA_START;
  148|       |
  149|  2.58k|    COMBA_CLEAR;
  ------------------
  |  |   37|  2.58k|    c0 = c1 = c2 = 0;
  ------------------
  150|       |    /* 0 */
  151|  2.58k|    MULADD(at[0], at[4]);
  ------------------
  |  |   52|  2.58k|    __asm__(                                        \
  |  |   53|  2.58k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  2.58k|        "mulq  %7           \n\t"                   \
  |  |   55|  2.58k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  2.58k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  2.58k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  2.58k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  2.58k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  2.58k|        : "%rax", "%rdx", "cc");
  ------------------
  152|  2.58k|    COMBA_STORE(C->dp[0]);
  ------------------
  |  |   67|  2.58k|    x = c0;
  ------------------
  153|       |    /* 1 */
  154|  2.58k|    COMBA_FORWARD;
  ------------------
  |  |   41|  2.58k|    do {              \
  |  |   42|  2.58k|        c0 = c1;      \
  |  |   43|  2.58k|        c1 = c2;      \
  |  |   44|  2.58k|        c2 = 0;       \
  |  |   45|  2.58k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  155|  2.58k|    MULADD(at[0], at[5]);
  ------------------
  |  |   52|  2.58k|    __asm__(                                        \
  |  |   53|  2.58k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  2.58k|        "mulq  %7           \n\t"                   \
  |  |   55|  2.58k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  2.58k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  2.58k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  2.58k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  2.58k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  2.58k|        : "%rax", "%rdx", "cc");
  ------------------
  156|  2.58k|    MULADD(at[1], at[4]);
  ------------------
  |  |   52|  2.58k|    __asm__(                                        \
  |  |   53|  2.58k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  2.58k|        "mulq  %7           \n\t"                   \
  |  |   55|  2.58k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  2.58k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  2.58k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  2.58k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  2.58k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  2.58k|        : "%rax", "%rdx", "cc");
  ------------------
  157|  2.58k|    COMBA_STORE(C->dp[1]);
  ------------------
  |  |   67|  2.58k|    x = c0;
  ------------------
  158|       |    /* 2 */
  159|  2.58k|    COMBA_FORWARD;
  ------------------
  |  |   41|  2.58k|    do {              \
  |  |   42|  2.58k|        c0 = c1;      \
  |  |   43|  2.58k|        c1 = c2;      \
  |  |   44|  2.58k|        c2 = 0;       \
  |  |   45|  2.58k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  160|  2.58k|    MULADD(at[0], at[6]);
  ------------------
  |  |   52|  2.58k|    __asm__(                                        \
  |  |   53|  2.58k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  2.58k|        "mulq  %7           \n\t"                   \
  |  |   55|  2.58k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  2.58k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  2.58k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  2.58k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  2.58k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  2.58k|        : "%rax", "%rdx", "cc");
  ------------------
  161|  2.58k|    MULADD(at[1], at[5]);
  ------------------
  |  |   52|  2.58k|    __asm__(                                        \
  |  |   53|  2.58k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  2.58k|        "mulq  %7           \n\t"                   \
  |  |   55|  2.58k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  2.58k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  2.58k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  2.58k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  2.58k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  2.58k|        : "%rax", "%rdx", "cc");
  ------------------
  162|  2.58k|    MULADD(at[2], at[4]);
  ------------------
  |  |   52|  2.58k|    __asm__(                                        \
  |  |   53|  2.58k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  2.58k|        "mulq  %7           \n\t"                   \
  |  |   55|  2.58k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  2.58k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  2.58k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  2.58k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  2.58k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  2.58k|        : "%rax", "%rdx", "cc");
  ------------------
  163|  2.58k|    COMBA_STORE(C->dp[2]);
  ------------------
  |  |   67|  2.58k|    x = c0;
  ------------------
  164|       |    /* 3 */
  165|  2.58k|    COMBA_FORWARD;
  ------------------
  |  |   41|  2.58k|    do {              \
  |  |   42|  2.58k|        c0 = c1;      \
  |  |   43|  2.58k|        c1 = c2;      \
  |  |   44|  2.58k|        c2 = 0;       \
  |  |   45|  2.58k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  166|  2.58k|    MULADD(at[0], at[7]);
  ------------------
  |  |   52|  2.58k|    __asm__(                                        \
  |  |   53|  2.58k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  2.58k|        "mulq  %7           \n\t"                   \
  |  |   55|  2.58k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  2.58k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  2.58k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  2.58k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  2.58k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  2.58k|        : "%rax", "%rdx", "cc");
  ------------------
  167|  2.58k|    MULADD(at[1], at[6]);
  ------------------
  |  |   52|  2.58k|    __asm__(                                        \
  |  |   53|  2.58k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  2.58k|        "mulq  %7           \n\t"                   \
  |  |   55|  2.58k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  2.58k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  2.58k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  2.58k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  2.58k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  2.58k|        : "%rax", "%rdx", "cc");
  ------------------
  168|  2.58k|    MULADD(at[2], at[5]);
  ------------------
  |  |   52|  2.58k|    __asm__(                                        \
  |  |   53|  2.58k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  2.58k|        "mulq  %7           \n\t"                   \
  |  |   55|  2.58k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  2.58k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  2.58k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  2.58k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  2.58k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  2.58k|        : "%rax", "%rdx", "cc");
  ------------------
  169|  2.58k|    MULADD(at[3], at[4]);
  ------------------
  |  |   52|  2.58k|    __asm__(                                        \
  |  |   53|  2.58k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  2.58k|        "mulq  %7           \n\t"                   \
  |  |   55|  2.58k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  2.58k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  2.58k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  2.58k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  2.58k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  2.58k|        : "%rax", "%rdx", "cc");
  ------------------
  170|  2.58k|    COMBA_STORE(C->dp[3]);
  ------------------
  |  |   67|  2.58k|    x = c0;
  ------------------
  171|       |    /* 4 */
  172|  2.58k|    COMBA_FORWARD;
  ------------------
  |  |   41|  2.58k|    do {              \
  |  |   42|  2.58k|        c0 = c1;      \
  |  |   43|  2.58k|        c1 = c2;      \
  |  |   44|  2.58k|        c2 = 0;       \
  |  |   45|  2.58k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  173|  2.58k|    MULADD(at[1], at[7]);
  ------------------
  |  |   52|  2.58k|    __asm__(                                        \
  |  |   53|  2.58k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  2.58k|        "mulq  %7           \n\t"                   \
  |  |   55|  2.58k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  2.58k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  2.58k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  2.58k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  2.58k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  2.58k|        : "%rax", "%rdx", "cc");
  ------------------
  174|  2.58k|    MULADD(at[2], at[6]);
  ------------------
  |  |   52|  2.58k|    __asm__(                                        \
  |  |   53|  2.58k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  2.58k|        "mulq  %7           \n\t"                   \
  |  |   55|  2.58k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  2.58k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  2.58k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  2.58k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  2.58k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  2.58k|        : "%rax", "%rdx", "cc");
  ------------------
  175|  2.58k|    MULADD(at[3], at[5]);
  ------------------
  |  |   52|  2.58k|    __asm__(                                        \
  |  |   53|  2.58k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  2.58k|        "mulq  %7           \n\t"                   \
  |  |   55|  2.58k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  2.58k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  2.58k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  2.58k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  2.58k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  2.58k|        : "%rax", "%rdx", "cc");
  ------------------
  176|  2.58k|    COMBA_STORE(C->dp[4]);
  ------------------
  |  |   67|  2.58k|    x = c0;
  ------------------
  177|       |    /* 5 */
  178|  2.58k|    COMBA_FORWARD;
  ------------------
  |  |   41|  2.58k|    do {              \
  |  |   42|  2.58k|        c0 = c1;      \
  |  |   43|  2.58k|        c1 = c2;      \
  |  |   44|  2.58k|        c2 = 0;       \
  |  |   45|  2.58k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  179|  2.58k|    MULADD(at[2], at[7]);
  ------------------
  |  |   52|  2.58k|    __asm__(                                        \
  |  |   53|  2.58k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  2.58k|        "mulq  %7           \n\t"                   \
  |  |   55|  2.58k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  2.58k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  2.58k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  2.58k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  2.58k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  2.58k|        : "%rax", "%rdx", "cc");
  ------------------
  180|  2.58k|    MULADD(at[3], at[6]);
  ------------------
  |  |   52|  2.58k|    __asm__(                                        \
  |  |   53|  2.58k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  2.58k|        "mulq  %7           \n\t"                   \
  |  |   55|  2.58k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  2.58k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  2.58k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  2.58k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  2.58k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  2.58k|        : "%rax", "%rdx", "cc");
  ------------------
  181|  2.58k|    COMBA_STORE(C->dp[5]);
  ------------------
  |  |   67|  2.58k|    x = c0;
  ------------------
  182|       |    /* 6 */
  183|  2.58k|    COMBA_FORWARD;
  ------------------
  |  |   41|  2.58k|    do {              \
  |  |   42|  2.58k|        c0 = c1;      \
  |  |   43|  2.58k|        c1 = c2;      \
  |  |   44|  2.58k|        c2 = 0;       \
  |  |   45|  2.58k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  184|  2.58k|    MULADD(at[3], at[7]);
  ------------------
  |  |   52|  2.58k|    __asm__(                                        \
  |  |   53|  2.58k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  2.58k|        "mulq  %7           \n\t"                   \
  |  |   55|  2.58k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  2.58k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  2.58k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  2.58k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  2.58k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  2.58k|        : "%rax", "%rdx", "cc");
  ------------------
  185|  2.58k|    COMBA_STORE(C->dp[6]);
  ------------------
  |  |   67|  2.58k|    x = c0;
  ------------------
  186|  2.58k|    COMBA_STORE2(C->dp[7]);
  ------------------
  |  |   70|  2.58k|    x = c1;
  ------------------
  187|  2.58k|    C->used = 8;
  188|  2.58k|    C->sign = A->sign ^ B->sign;
  189|  2.58k|    mp_clamp(C);
  ------------------
  |  |   26|  2.58k|    {                                                    \
  |  |   27|  3.39k|        while ((a)->used && (a)->dp[(a)->used - 1] == 0) \
  |  |  ------------------
  |  |  |  Branch (27:16): [True: 3.39k, False: 0]
  |  |  |  Branch (27:29): [True: 813, False: 2.58k]
  |  |  ------------------
  |  |   28|  2.58k|            --((a)->used);                               \
  |  |   29|  2.58k|        (a)->sign = (a)->used ? (a)->sign : ZPOS;        \
  |  |  ------------------
  |  |  |  |  326|      0|#define ZPOS MP_ZPOS
  |  |  |  |  ------------------
  |  |  |  |  |  |   37|  2.58k|#define MP_ZPOS 0
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (29:21): [True: 2.58k, False: 0]
  |  |  ------------------
  |  |   30|  2.58k|    }
  ------------------
  190|  2.58k|    COMBA_FINI;
  191|  2.58k|}
s_mp_mul_comba_8:
  195|     55|{
  196|     55|    mp_digit c0, c1, c2, at[16];
  197|       |
  198|     55|    memcpy(at, A->dp, 8 * sizeof(mp_digit));
  199|     55|    memcpy(at + 8, B->dp, 8 * sizeof(mp_digit));
  200|     55|    COMBA_START;
  201|       |
  202|     55|    COMBA_CLEAR;
  ------------------
  |  |   37|     55|    c0 = c1 = c2 = 0;
  ------------------
  203|       |    /* 0 */
  204|     55|    MULADD(at[0], at[8]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  205|     55|    COMBA_STORE(C->dp[0]);
  ------------------
  |  |   67|     55|    x = c0;
  ------------------
  206|       |    /* 1 */
  207|     55|    COMBA_FORWARD;
  ------------------
  |  |   41|     55|    do {              \
  |  |   42|     55|        c0 = c1;      \
  |  |   43|     55|        c1 = c2;      \
  |  |   44|     55|        c2 = 0;       \
  |  |   45|     55|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  208|     55|    MULADD(at[0], at[9]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  209|     55|    MULADD(at[1], at[8]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  210|     55|    COMBA_STORE(C->dp[1]);
  ------------------
  |  |   67|     55|    x = c0;
  ------------------
  211|       |    /* 2 */
  212|     55|    COMBA_FORWARD;
  ------------------
  |  |   41|     55|    do {              \
  |  |   42|     55|        c0 = c1;      \
  |  |   43|     55|        c1 = c2;      \
  |  |   44|     55|        c2 = 0;       \
  |  |   45|     55|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  213|     55|    MULADD(at[0], at[10]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  214|     55|    MULADD(at[1], at[9]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  215|     55|    MULADD(at[2], at[8]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  216|     55|    COMBA_STORE(C->dp[2]);
  ------------------
  |  |   67|     55|    x = c0;
  ------------------
  217|       |    /* 3 */
  218|     55|    COMBA_FORWARD;
  ------------------
  |  |   41|     55|    do {              \
  |  |   42|     55|        c0 = c1;      \
  |  |   43|     55|        c1 = c2;      \
  |  |   44|     55|        c2 = 0;       \
  |  |   45|     55|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  219|     55|    MULADD(at[0], at[11]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  220|     55|    MULADD(at[1], at[10]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  221|     55|    MULADD(at[2], at[9]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  222|     55|    MULADD(at[3], at[8]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  223|     55|    COMBA_STORE(C->dp[3]);
  ------------------
  |  |   67|     55|    x = c0;
  ------------------
  224|       |    /* 4 */
  225|     55|    COMBA_FORWARD;
  ------------------
  |  |   41|     55|    do {              \
  |  |   42|     55|        c0 = c1;      \
  |  |   43|     55|        c1 = c2;      \
  |  |   44|     55|        c2 = 0;       \
  |  |   45|     55|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  226|     55|    MULADD(at[0], at[12]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  227|     55|    MULADD(at[1], at[11]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  228|     55|    MULADD(at[2], at[10]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  229|     55|    MULADD(at[3], at[9]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  230|     55|    MULADD(at[4], at[8]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  231|     55|    COMBA_STORE(C->dp[4]);
  ------------------
  |  |   67|     55|    x = c0;
  ------------------
  232|       |    /* 5 */
  233|     55|    COMBA_FORWARD;
  ------------------
  |  |   41|     55|    do {              \
  |  |   42|     55|        c0 = c1;      \
  |  |   43|     55|        c1 = c2;      \
  |  |   44|     55|        c2 = 0;       \
  |  |   45|     55|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  234|     55|    MULADD(at[0], at[13]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  235|     55|    MULADD(at[1], at[12]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  236|     55|    MULADD(at[2], at[11]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  237|     55|    MULADD(at[3], at[10]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  238|     55|    MULADD(at[4], at[9]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  239|     55|    MULADD(at[5], at[8]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  240|     55|    COMBA_STORE(C->dp[5]);
  ------------------
  |  |   67|     55|    x = c0;
  ------------------
  241|       |    /* 6 */
  242|     55|    COMBA_FORWARD;
  ------------------
  |  |   41|     55|    do {              \
  |  |   42|     55|        c0 = c1;      \
  |  |   43|     55|        c1 = c2;      \
  |  |   44|     55|        c2 = 0;       \
  |  |   45|     55|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  243|     55|    MULADD(at[0], at[14]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  244|     55|    MULADD(at[1], at[13]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  245|     55|    MULADD(at[2], at[12]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  246|     55|    MULADD(at[3], at[11]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  247|     55|    MULADD(at[4], at[10]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  248|     55|    MULADD(at[5], at[9]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  249|     55|    MULADD(at[6], at[8]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  250|     55|    COMBA_STORE(C->dp[6]);
  ------------------
  |  |   67|     55|    x = c0;
  ------------------
  251|       |    /* 7 */
  252|     55|    COMBA_FORWARD;
  ------------------
  |  |   41|     55|    do {              \
  |  |   42|     55|        c0 = c1;      \
  |  |   43|     55|        c1 = c2;      \
  |  |   44|     55|        c2 = 0;       \
  |  |   45|     55|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  253|     55|    MULADD(at[0], at[15]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  254|     55|    MULADD(at[1], at[14]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  255|     55|    MULADD(at[2], at[13]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  256|     55|    MULADD(at[3], at[12]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  257|     55|    MULADD(at[4], at[11]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  258|     55|    MULADD(at[5], at[10]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  259|     55|    MULADD(at[6], at[9]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  260|     55|    MULADD(at[7], at[8]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  261|     55|    COMBA_STORE(C->dp[7]);
  ------------------
  |  |   67|     55|    x = c0;
  ------------------
  262|       |    /* 8 */
  263|     55|    COMBA_FORWARD;
  ------------------
  |  |   41|     55|    do {              \
  |  |   42|     55|        c0 = c1;      \
  |  |   43|     55|        c1 = c2;      \
  |  |   44|     55|        c2 = 0;       \
  |  |   45|     55|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  264|     55|    MULADD(at[1], at[15]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  265|     55|    MULADD(at[2], at[14]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  266|     55|    MULADD(at[3], at[13]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  267|     55|    MULADD(at[4], at[12]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  268|     55|    MULADD(at[5], at[11]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  269|     55|    MULADD(at[6], at[10]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  270|     55|    MULADD(at[7], at[9]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  271|     55|    COMBA_STORE(C->dp[8]);
  ------------------
  |  |   67|     55|    x = c0;
  ------------------
  272|       |    /* 9 */
  273|     55|    COMBA_FORWARD;
  ------------------
  |  |   41|     55|    do {              \
  |  |   42|     55|        c0 = c1;      \
  |  |   43|     55|        c1 = c2;      \
  |  |   44|     55|        c2 = 0;       \
  |  |   45|     55|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  274|     55|    MULADD(at[2], at[15]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  275|     55|    MULADD(at[3], at[14]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  276|     55|    MULADD(at[4], at[13]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  277|     55|    MULADD(at[5], at[12]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  278|     55|    MULADD(at[6], at[11]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  279|     55|    MULADD(at[7], at[10]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  280|     55|    COMBA_STORE(C->dp[9]);
  ------------------
  |  |   67|     55|    x = c0;
  ------------------
  281|       |    /* 10 */
  282|     55|    COMBA_FORWARD;
  ------------------
  |  |   41|     55|    do {              \
  |  |   42|     55|        c0 = c1;      \
  |  |   43|     55|        c1 = c2;      \
  |  |   44|     55|        c2 = 0;       \
  |  |   45|     55|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  283|     55|    MULADD(at[3], at[15]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  284|     55|    MULADD(at[4], at[14]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  285|     55|    MULADD(at[5], at[13]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  286|     55|    MULADD(at[6], at[12]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  287|     55|    MULADD(at[7], at[11]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  288|     55|    COMBA_STORE(C->dp[10]);
  ------------------
  |  |   67|     55|    x = c0;
  ------------------
  289|       |    /* 11 */
  290|     55|    COMBA_FORWARD;
  ------------------
  |  |   41|     55|    do {              \
  |  |   42|     55|        c0 = c1;      \
  |  |   43|     55|        c1 = c2;      \
  |  |   44|     55|        c2 = 0;       \
  |  |   45|     55|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  291|     55|    MULADD(at[4], at[15]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  292|     55|    MULADD(at[5], at[14]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  293|     55|    MULADD(at[6], at[13]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  294|     55|    MULADD(at[7], at[12]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  295|     55|    COMBA_STORE(C->dp[11]);
  ------------------
  |  |   67|     55|    x = c0;
  ------------------
  296|       |    /* 12 */
  297|     55|    COMBA_FORWARD;
  ------------------
  |  |   41|     55|    do {              \
  |  |   42|     55|        c0 = c1;      \
  |  |   43|     55|        c1 = c2;      \
  |  |   44|     55|        c2 = 0;       \
  |  |   45|     55|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  298|     55|    MULADD(at[5], at[15]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  299|     55|    MULADD(at[6], at[14]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  300|     55|    MULADD(at[7], at[13]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  301|     55|    COMBA_STORE(C->dp[12]);
  ------------------
  |  |   67|     55|    x = c0;
  ------------------
  302|       |    /* 13 */
  303|     55|    COMBA_FORWARD;
  ------------------
  |  |   41|     55|    do {              \
  |  |   42|     55|        c0 = c1;      \
  |  |   43|     55|        c1 = c2;      \
  |  |   44|     55|        c2 = 0;       \
  |  |   45|     55|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  304|     55|    MULADD(at[6], at[15]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  305|     55|    MULADD(at[7], at[14]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  306|     55|    COMBA_STORE(C->dp[13]);
  ------------------
  |  |   67|     55|    x = c0;
  ------------------
  307|       |    /* 14 */
  308|     55|    COMBA_FORWARD;
  ------------------
  |  |   41|     55|    do {              \
  |  |   42|     55|        c0 = c1;      \
  |  |   43|     55|        c1 = c2;      \
  |  |   44|     55|        c2 = 0;       \
  |  |   45|     55|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  309|     55|    MULADD(at[7], at[15]);
  ------------------
  |  |   52|     55|    __asm__(                                        \
  |  |   53|     55|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|     55|        "mulq  %7           \n\t"                   \
  |  |   55|     55|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|     55|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|     55|        "adcq  $0,%2        \n\t"                   \
  |  |   58|     55|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|     55|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|     55|        : "%rax", "%rdx", "cc");
  ------------------
  310|     55|    COMBA_STORE(C->dp[14]);
  ------------------
  |  |   67|     55|    x = c0;
  ------------------
  311|     55|    COMBA_STORE2(C->dp[15]);
  ------------------
  |  |   70|     55|    x = c1;
  ------------------
  312|     55|    C->used = 16;
  313|     55|    C->sign = A->sign ^ B->sign;
  314|     55|    mp_clamp(C);
  ------------------
  |  |   26|     55|    {                                                    \
  |  |   27|     73|        while ((a)->used && (a)->dp[(a)->used - 1] == 0) \
  |  |  ------------------
  |  |  |  Branch (27:16): [True: 73, False: 0]
  |  |  |  Branch (27:29): [True: 18, False: 55]
  |  |  ------------------
  |  |   28|     55|            --((a)->used);                               \
  |  |   29|     55|        (a)->sign = (a)->used ? (a)->sign : ZPOS;        \
  |  |  ------------------
  |  |  |  |  326|      0|#define ZPOS MP_ZPOS
  |  |  |  |  ------------------
  |  |  |  |  |  |   37|     55|#define MP_ZPOS 0
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (29:21): [True: 55, False: 0]
  |  |  ------------------
  |  |   30|     55|    }
  ------------------
  315|     55|    COMBA_FINI;
  316|     55|}
s_mp_mul_comba_16:
  320|  43.9k|{
  321|  43.9k|    mp_digit c0, c1, c2, at[32];
  322|       |
  323|  43.9k|    memcpy(at, A->dp, 16 * sizeof(mp_digit));
  324|  43.9k|    memcpy(at + 16, B->dp, 16 * sizeof(mp_digit));
  325|  43.9k|    COMBA_START;
  326|       |
  327|  43.9k|    COMBA_CLEAR;
  ------------------
  |  |   37|  43.9k|    c0 = c1 = c2 = 0;
  ------------------
  328|       |    /* 0 */
  329|  43.9k|    MULADD(at[0], at[16]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  330|  43.9k|    COMBA_STORE(C->dp[0]);
  ------------------
  |  |   67|  43.9k|    x = c0;
  ------------------
  331|       |    /* 1 */
  332|  43.9k|    COMBA_FORWARD;
  ------------------
  |  |   41|  43.9k|    do {              \
  |  |   42|  43.9k|        c0 = c1;      \
  |  |   43|  43.9k|        c1 = c2;      \
  |  |   44|  43.9k|        c2 = 0;       \
  |  |   45|  43.9k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  333|  43.9k|    MULADD(at[0], at[17]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  334|  43.9k|    MULADD(at[1], at[16]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  335|  43.9k|    COMBA_STORE(C->dp[1]);
  ------------------
  |  |   67|  43.9k|    x = c0;
  ------------------
  336|       |    /* 2 */
  337|  43.9k|    COMBA_FORWARD;
  ------------------
  |  |   41|  43.9k|    do {              \
  |  |   42|  43.9k|        c0 = c1;      \
  |  |   43|  43.9k|        c1 = c2;      \
  |  |   44|  43.9k|        c2 = 0;       \
  |  |   45|  43.9k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  338|  43.9k|    MULADD(at[0], at[18]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  339|  43.9k|    MULADD(at[1], at[17]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  340|  43.9k|    MULADD(at[2], at[16]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  341|  43.9k|    COMBA_STORE(C->dp[2]);
  ------------------
  |  |   67|  43.9k|    x = c0;
  ------------------
  342|       |    /* 3 */
  343|  43.9k|    COMBA_FORWARD;
  ------------------
  |  |   41|  43.9k|    do {              \
  |  |   42|  43.9k|        c0 = c1;      \
  |  |   43|  43.9k|        c1 = c2;      \
  |  |   44|  43.9k|        c2 = 0;       \
  |  |   45|  43.9k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  344|  43.9k|    MULADD(at[0], at[19]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  345|  43.9k|    MULADD(at[1], at[18]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  346|  43.9k|    MULADD(at[2], at[17]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  347|  43.9k|    MULADD(at[3], at[16]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  348|  43.9k|    COMBA_STORE(C->dp[3]);
  ------------------
  |  |   67|  43.9k|    x = c0;
  ------------------
  349|       |    /* 4 */
  350|  43.9k|    COMBA_FORWARD;
  ------------------
  |  |   41|  43.9k|    do {              \
  |  |   42|  43.9k|        c0 = c1;      \
  |  |   43|  43.9k|        c1 = c2;      \
  |  |   44|  43.9k|        c2 = 0;       \
  |  |   45|  43.9k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  351|  43.9k|    MULADD(at[0], at[20]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  352|  43.9k|    MULADD(at[1], at[19]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  353|  43.9k|    MULADD(at[2], at[18]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  354|  43.9k|    MULADD(at[3], at[17]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  355|  43.9k|    MULADD(at[4], at[16]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  356|  43.9k|    COMBA_STORE(C->dp[4]);
  ------------------
  |  |   67|  43.9k|    x = c0;
  ------------------
  357|       |    /* 5 */
  358|  43.9k|    COMBA_FORWARD;
  ------------------
  |  |   41|  43.9k|    do {              \
  |  |   42|  43.9k|        c0 = c1;      \
  |  |   43|  43.9k|        c1 = c2;      \
  |  |   44|  43.9k|        c2 = 0;       \
  |  |   45|  43.9k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  359|  43.9k|    MULADD(at[0], at[21]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  360|  43.9k|    MULADD(at[1], at[20]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  361|  43.9k|    MULADD(at[2], at[19]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  362|  43.9k|    MULADD(at[3], at[18]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  363|  43.9k|    MULADD(at[4], at[17]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  364|  43.9k|    MULADD(at[5], at[16]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  365|  43.9k|    COMBA_STORE(C->dp[5]);
  ------------------
  |  |   67|  43.9k|    x = c0;
  ------------------
  366|       |    /* 6 */
  367|  43.9k|    COMBA_FORWARD;
  ------------------
  |  |   41|  43.9k|    do {              \
  |  |   42|  43.9k|        c0 = c1;      \
  |  |   43|  43.9k|        c1 = c2;      \
  |  |   44|  43.9k|        c2 = 0;       \
  |  |   45|  43.9k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  368|  43.9k|    MULADD(at[0], at[22]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  369|  43.9k|    MULADD(at[1], at[21]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  370|  43.9k|    MULADD(at[2], at[20]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  371|  43.9k|    MULADD(at[3], at[19]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  372|  43.9k|    MULADD(at[4], at[18]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  373|  43.9k|    MULADD(at[5], at[17]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  374|  43.9k|    MULADD(at[6], at[16]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  375|  43.9k|    COMBA_STORE(C->dp[6]);
  ------------------
  |  |   67|  43.9k|    x = c0;
  ------------------
  376|       |    /* 7 */
  377|  43.9k|    COMBA_FORWARD;
  ------------------
  |  |   41|  43.9k|    do {              \
  |  |   42|  43.9k|        c0 = c1;      \
  |  |   43|  43.9k|        c1 = c2;      \
  |  |   44|  43.9k|        c2 = 0;       \
  |  |   45|  43.9k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  378|  43.9k|    MULADD(at[0], at[23]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  379|  43.9k|    MULADD(at[1], at[22]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  380|  43.9k|    MULADD(at[2], at[21]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  381|  43.9k|    MULADD(at[3], at[20]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  382|  43.9k|    MULADD(at[4], at[19]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  383|  43.9k|    MULADD(at[5], at[18]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  384|  43.9k|    MULADD(at[6], at[17]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  385|  43.9k|    MULADD(at[7], at[16]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  386|  43.9k|    COMBA_STORE(C->dp[7]);
  ------------------
  |  |   67|  43.9k|    x = c0;
  ------------------
  387|       |    /* 8 */
  388|  43.9k|    COMBA_FORWARD;
  ------------------
  |  |   41|  43.9k|    do {              \
  |  |   42|  43.9k|        c0 = c1;      \
  |  |   43|  43.9k|        c1 = c2;      \
  |  |   44|  43.9k|        c2 = 0;       \
  |  |   45|  43.9k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  389|  43.9k|    MULADD(at[0], at[24]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  390|  43.9k|    MULADD(at[1], at[23]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  391|  43.9k|    MULADD(at[2], at[22]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  392|  43.9k|    MULADD(at[3], at[21]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  393|  43.9k|    MULADD(at[4], at[20]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  394|  43.9k|    MULADD(at[5], at[19]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  395|  43.9k|    MULADD(at[6], at[18]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  396|  43.9k|    MULADD(at[7], at[17]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  397|  43.9k|    MULADD(at[8], at[16]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  398|  43.9k|    COMBA_STORE(C->dp[8]);
  ------------------
  |  |   67|  43.9k|    x = c0;
  ------------------
  399|       |    /* 9 */
  400|  43.9k|    COMBA_FORWARD;
  ------------------
  |  |   41|  43.9k|    do {              \
  |  |   42|  43.9k|        c0 = c1;      \
  |  |   43|  43.9k|        c1 = c2;      \
  |  |   44|  43.9k|        c2 = 0;       \
  |  |   45|  43.9k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  401|  43.9k|    MULADD(at[0], at[25]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  402|  43.9k|    MULADD(at[1], at[24]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  403|  43.9k|    MULADD(at[2], at[23]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  404|  43.9k|    MULADD(at[3], at[22]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  405|  43.9k|    MULADD(at[4], at[21]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  406|  43.9k|    MULADD(at[5], at[20]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  407|  43.9k|    MULADD(at[6], at[19]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  408|  43.9k|    MULADD(at[7], at[18]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  409|  43.9k|    MULADD(at[8], at[17]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  410|  43.9k|    MULADD(at[9], at[16]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  411|  43.9k|    COMBA_STORE(C->dp[9]);
  ------------------
  |  |   67|  43.9k|    x = c0;
  ------------------
  412|       |    /* 10 */
  413|  43.9k|    COMBA_FORWARD;
  ------------------
  |  |   41|  43.9k|    do {              \
  |  |   42|  43.9k|        c0 = c1;      \
  |  |   43|  43.9k|        c1 = c2;      \
  |  |   44|  43.9k|        c2 = 0;       \
  |  |   45|  43.9k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  414|  43.9k|    MULADD(at[0], at[26]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  415|  43.9k|    MULADD(at[1], at[25]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  416|  43.9k|    MULADD(at[2], at[24]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  417|  43.9k|    MULADD(at[3], at[23]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  418|  43.9k|    MULADD(at[4], at[22]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  419|  43.9k|    MULADD(at[5], at[21]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  420|  43.9k|    MULADD(at[6], at[20]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  421|  43.9k|    MULADD(at[7], at[19]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  422|  43.9k|    MULADD(at[8], at[18]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  423|  43.9k|    MULADD(at[9], at[17]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  424|  43.9k|    MULADD(at[10], at[16]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  425|  43.9k|    COMBA_STORE(C->dp[10]);
  ------------------
  |  |   67|  43.9k|    x = c0;
  ------------------
  426|       |    /* 11 */
  427|  43.9k|    COMBA_FORWARD;
  ------------------
  |  |   41|  43.9k|    do {              \
  |  |   42|  43.9k|        c0 = c1;      \
  |  |   43|  43.9k|        c1 = c2;      \
  |  |   44|  43.9k|        c2 = 0;       \
  |  |   45|  43.9k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  428|  43.9k|    MULADD(at[0], at[27]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  429|  43.9k|    MULADD(at[1], at[26]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  430|  43.9k|    MULADD(at[2], at[25]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  431|  43.9k|    MULADD(at[3], at[24]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  432|  43.9k|    MULADD(at[4], at[23]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  433|  43.9k|    MULADD(at[5], at[22]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  434|  43.9k|    MULADD(at[6], at[21]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  435|  43.9k|    MULADD(at[7], at[20]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  436|  43.9k|    MULADD(at[8], at[19]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  437|  43.9k|    MULADD(at[9], at[18]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  438|  43.9k|    MULADD(at[10], at[17]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  439|  43.9k|    MULADD(at[11], at[16]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  440|  43.9k|    COMBA_STORE(C->dp[11]);
  ------------------
  |  |   67|  43.9k|    x = c0;
  ------------------
  441|       |    /* 12 */
  442|  43.9k|    COMBA_FORWARD;
  ------------------
  |  |   41|  43.9k|    do {              \
  |  |   42|  43.9k|        c0 = c1;      \
  |  |   43|  43.9k|        c1 = c2;      \
  |  |   44|  43.9k|        c2 = 0;       \
  |  |   45|  43.9k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  443|  43.9k|    MULADD(at[0], at[28]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  444|  43.9k|    MULADD(at[1], at[27]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  445|  43.9k|    MULADD(at[2], at[26]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  446|  43.9k|    MULADD(at[3], at[25]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  447|  43.9k|    MULADD(at[4], at[24]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  448|  43.9k|    MULADD(at[5], at[23]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  449|  43.9k|    MULADD(at[6], at[22]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  450|  43.9k|    MULADD(at[7], at[21]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  451|  43.9k|    MULADD(at[8], at[20]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  452|  43.9k|    MULADD(at[9], at[19]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  453|  43.9k|    MULADD(at[10], at[18]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  454|  43.9k|    MULADD(at[11], at[17]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  455|  43.9k|    MULADD(at[12], at[16]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  456|  43.9k|    COMBA_STORE(C->dp[12]);
  ------------------
  |  |   67|  43.9k|    x = c0;
  ------------------
  457|       |    /* 13 */
  458|  43.9k|    COMBA_FORWARD;
  ------------------
  |  |   41|  43.9k|    do {              \
  |  |   42|  43.9k|        c0 = c1;      \
  |  |   43|  43.9k|        c1 = c2;      \
  |  |   44|  43.9k|        c2 = 0;       \
  |  |   45|  43.9k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  459|  43.9k|    MULADD(at[0], at[29]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  460|  43.9k|    MULADD(at[1], at[28]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  461|  43.9k|    MULADD(at[2], at[27]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  462|  43.9k|    MULADD(at[3], at[26]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  463|  43.9k|    MULADD(at[4], at[25]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  464|  43.9k|    MULADD(at[5], at[24]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  465|  43.9k|    MULADD(at[6], at[23]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  466|  43.9k|    MULADD(at[7], at[22]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  467|  43.9k|    MULADD(at[8], at[21]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  468|  43.9k|    MULADD(at[9], at[20]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  469|  43.9k|    MULADD(at[10], at[19]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  470|  43.9k|    MULADD(at[11], at[18]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  471|  43.9k|    MULADD(at[12], at[17]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  472|  43.9k|    MULADD(at[13], at[16]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  473|  43.9k|    COMBA_STORE(C->dp[13]);
  ------------------
  |  |   67|  43.9k|    x = c0;
  ------------------
  474|       |    /* 14 */
  475|  43.9k|    COMBA_FORWARD;
  ------------------
  |  |   41|  43.9k|    do {              \
  |  |   42|  43.9k|        c0 = c1;      \
  |  |   43|  43.9k|        c1 = c2;      \
  |  |   44|  43.9k|        c2 = 0;       \
  |  |   45|  43.9k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  476|  43.9k|    MULADD(at[0], at[30]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  477|  43.9k|    MULADD(at[1], at[29]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  478|  43.9k|    MULADD(at[2], at[28]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  479|  43.9k|    MULADD(at[3], at[27]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  480|  43.9k|    MULADD(at[4], at[26]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  481|  43.9k|    MULADD(at[5], at[25]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  482|  43.9k|    MULADD(at[6], at[24]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  483|  43.9k|    MULADD(at[7], at[23]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  484|  43.9k|    MULADD(at[8], at[22]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  485|  43.9k|    MULADD(at[9], at[21]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  486|  43.9k|    MULADD(at[10], at[20]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  487|  43.9k|    MULADD(at[11], at[19]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  488|  43.9k|    MULADD(at[12], at[18]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  489|  43.9k|    MULADD(at[13], at[17]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  490|  43.9k|    MULADD(at[14], at[16]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  491|  43.9k|    COMBA_STORE(C->dp[14]);
  ------------------
  |  |   67|  43.9k|    x = c0;
  ------------------
  492|       |    /* 15 */
  493|  43.9k|    COMBA_FORWARD;
  ------------------
  |  |   41|  43.9k|    do {              \
  |  |   42|  43.9k|        c0 = c1;      \
  |  |   43|  43.9k|        c1 = c2;      \
  |  |   44|  43.9k|        c2 = 0;       \
  |  |   45|  43.9k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  494|  43.9k|    MULADD(at[0], at[31]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  495|  43.9k|    MULADD(at[1], at[30]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  496|  43.9k|    MULADD(at[2], at[29]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  497|  43.9k|    MULADD(at[3], at[28]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  498|  43.9k|    MULADD(at[4], at[27]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  499|  43.9k|    MULADD(at[5], at[26]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  500|  43.9k|    MULADD(at[6], at[25]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  501|  43.9k|    MULADD(at[7], at[24]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  502|  43.9k|    MULADD(at[8], at[23]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  503|  43.9k|    MULADD(at[9], at[22]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  504|  43.9k|    MULADD(at[10], at[21]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  505|  43.9k|    MULADD(at[11], at[20]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  506|  43.9k|    MULADD(at[12], at[19]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  507|  43.9k|    MULADD(at[13], at[18]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  508|  43.9k|    MULADD(at[14], at[17]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  509|  43.9k|    MULADD(at[15], at[16]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  510|  43.9k|    COMBA_STORE(C->dp[15]);
  ------------------
  |  |   67|  43.9k|    x = c0;
  ------------------
  511|       |    /* 16 */
  512|  43.9k|    COMBA_FORWARD;
  ------------------
  |  |   41|  43.9k|    do {              \
  |  |   42|  43.9k|        c0 = c1;      \
  |  |   43|  43.9k|        c1 = c2;      \
  |  |   44|  43.9k|        c2 = 0;       \
  |  |   45|  43.9k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  513|  43.9k|    MULADD(at[1], at[31]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  514|  43.9k|    MULADD(at[2], at[30]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  515|  43.9k|    MULADD(at[3], at[29]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  516|  43.9k|    MULADD(at[4], at[28]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  517|  43.9k|    MULADD(at[5], at[27]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  518|  43.9k|    MULADD(at[6], at[26]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  519|  43.9k|    MULADD(at[7], at[25]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  520|  43.9k|    MULADD(at[8], at[24]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  521|  43.9k|    MULADD(at[9], at[23]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  522|  43.9k|    MULADD(at[10], at[22]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  523|  43.9k|    MULADD(at[11], at[21]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  524|  43.9k|    MULADD(at[12], at[20]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  525|  43.9k|    MULADD(at[13], at[19]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  526|  43.9k|    MULADD(at[14], at[18]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  527|  43.9k|    MULADD(at[15], at[17]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  528|  43.9k|    COMBA_STORE(C->dp[16]);
  ------------------
  |  |   67|  43.9k|    x = c0;
  ------------------
  529|       |    /* 17 */
  530|  43.9k|    COMBA_FORWARD;
  ------------------
  |  |   41|  43.9k|    do {              \
  |  |   42|  43.9k|        c0 = c1;      \
  |  |   43|  43.9k|        c1 = c2;      \
  |  |   44|  43.9k|        c2 = 0;       \
  |  |   45|  43.9k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  531|  43.9k|    MULADD(at[2], at[31]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  532|  43.9k|    MULADD(at[3], at[30]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  533|  43.9k|    MULADD(at[4], at[29]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  534|  43.9k|    MULADD(at[5], at[28]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  535|  43.9k|    MULADD(at[6], at[27]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  536|  43.9k|    MULADD(at[7], at[26]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  537|  43.9k|    MULADD(at[8], at[25]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  538|  43.9k|    MULADD(at[9], at[24]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  539|  43.9k|    MULADD(at[10], at[23]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  540|  43.9k|    MULADD(at[11], at[22]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  541|  43.9k|    MULADD(at[12], at[21]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  542|  43.9k|    MULADD(at[13], at[20]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  543|  43.9k|    MULADD(at[14], at[19]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  544|  43.9k|    MULADD(at[15], at[18]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  545|  43.9k|    COMBA_STORE(C->dp[17]);
  ------------------
  |  |   67|  43.9k|    x = c0;
  ------------------
  546|       |    /* 18 */
  547|  43.9k|    COMBA_FORWARD;
  ------------------
  |  |   41|  43.9k|    do {              \
  |  |   42|  43.9k|        c0 = c1;      \
  |  |   43|  43.9k|        c1 = c2;      \
  |  |   44|  43.9k|        c2 = 0;       \
  |  |   45|  43.9k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  548|  43.9k|    MULADD(at[3], at[31]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  549|  43.9k|    MULADD(at[4], at[30]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  550|  43.9k|    MULADD(at[5], at[29]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  551|  43.9k|    MULADD(at[6], at[28]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  552|  43.9k|    MULADD(at[7], at[27]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  553|  43.9k|    MULADD(at[8], at[26]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  554|  43.9k|    MULADD(at[9], at[25]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  555|  43.9k|    MULADD(at[10], at[24]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  556|  43.9k|    MULADD(at[11], at[23]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  557|  43.9k|    MULADD(at[12], at[22]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  558|  43.9k|    MULADD(at[13], at[21]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  559|  43.9k|    MULADD(at[14], at[20]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  560|  43.9k|    MULADD(at[15], at[19]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  561|  43.9k|    COMBA_STORE(C->dp[18]);
  ------------------
  |  |   67|  43.9k|    x = c0;
  ------------------
  562|       |    /* 19 */
  563|  43.9k|    COMBA_FORWARD;
  ------------------
  |  |   41|  43.9k|    do {              \
  |  |   42|  43.9k|        c0 = c1;      \
  |  |   43|  43.9k|        c1 = c2;      \
  |  |   44|  43.9k|        c2 = 0;       \
  |  |   45|  43.9k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  564|  43.9k|    MULADD(at[4], at[31]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  565|  43.9k|    MULADD(at[5], at[30]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  566|  43.9k|    MULADD(at[6], at[29]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  567|  43.9k|    MULADD(at[7], at[28]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  568|  43.9k|    MULADD(at[8], at[27]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  569|  43.9k|    MULADD(at[9], at[26]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  570|  43.9k|    MULADD(at[10], at[25]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  571|  43.9k|    MULADD(at[11], at[24]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  572|  43.9k|    MULADD(at[12], at[23]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  573|  43.9k|    MULADD(at[13], at[22]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  574|  43.9k|    MULADD(at[14], at[21]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  575|  43.9k|    MULADD(at[15], at[20]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  576|  43.9k|    COMBA_STORE(C->dp[19]);
  ------------------
  |  |   67|  43.9k|    x = c0;
  ------------------
  577|       |    /* 20 */
  578|  43.9k|    COMBA_FORWARD;
  ------------------
  |  |   41|  43.9k|    do {              \
  |  |   42|  43.9k|        c0 = c1;      \
  |  |   43|  43.9k|        c1 = c2;      \
  |  |   44|  43.9k|        c2 = 0;       \
  |  |   45|  43.9k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  579|  43.9k|    MULADD(at[5], at[31]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  580|  43.9k|    MULADD(at[6], at[30]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  581|  43.9k|    MULADD(at[7], at[29]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  582|  43.9k|    MULADD(at[8], at[28]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  583|  43.9k|    MULADD(at[9], at[27]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  584|  43.9k|    MULADD(at[10], at[26]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  585|  43.9k|    MULADD(at[11], at[25]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  586|  43.9k|    MULADD(at[12], at[24]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  587|  43.9k|    MULADD(at[13], at[23]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  588|  43.9k|    MULADD(at[14], at[22]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  589|  43.9k|    MULADD(at[15], at[21]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  590|  43.9k|    COMBA_STORE(C->dp[20]);
  ------------------
  |  |   67|  43.9k|    x = c0;
  ------------------
  591|       |    /* 21 */
  592|  43.9k|    COMBA_FORWARD;
  ------------------
  |  |   41|  43.9k|    do {              \
  |  |   42|  43.9k|        c0 = c1;      \
  |  |   43|  43.9k|        c1 = c2;      \
  |  |   44|  43.9k|        c2 = 0;       \
  |  |   45|  43.9k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  593|  43.9k|    MULADD(at[6], at[31]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  594|  43.9k|    MULADD(at[7], at[30]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  595|  43.9k|    MULADD(at[8], at[29]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  596|  43.9k|    MULADD(at[9], at[28]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  597|  43.9k|    MULADD(at[10], at[27]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  598|  43.9k|    MULADD(at[11], at[26]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  599|  43.9k|    MULADD(at[12], at[25]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  600|  43.9k|    MULADD(at[13], at[24]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  601|  43.9k|    MULADD(at[14], at[23]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  602|  43.9k|    MULADD(at[15], at[22]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  603|  43.9k|    COMBA_STORE(C->dp[21]);
  ------------------
  |  |   67|  43.9k|    x = c0;
  ------------------
  604|       |    /* 22 */
  605|  43.9k|    COMBA_FORWARD;
  ------------------
  |  |   41|  43.9k|    do {              \
  |  |   42|  43.9k|        c0 = c1;      \
  |  |   43|  43.9k|        c1 = c2;      \
  |  |   44|  43.9k|        c2 = 0;       \
  |  |   45|  43.9k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  606|  43.9k|    MULADD(at[7], at[31]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  607|  43.9k|    MULADD(at[8], at[30]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  608|  43.9k|    MULADD(at[9], at[29]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  609|  43.9k|    MULADD(at[10], at[28]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  610|  43.9k|    MULADD(at[11], at[27]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  611|  43.9k|    MULADD(at[12], at[26]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  612|  43.9k|    MULADD(at[13], at[25]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  613|  43.9k|    MULADD(at[14], at[24]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  614|  43.9k|    MULADD(at[15], at[23]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  615|  43.9k|    COMBA_STORE(C->dp[22]);
  ------------------
  |  |   67|  43.9k|    x = c0;
  ------------------
  616|       |    /* 23 */
  617|  43.9k|    COMBA_FORWARD;
  ------------------
  |  |   41|  43.9k|    do {              \
  |  |   42|  43.9k|        c0 = c1;      \
  |  |   43|  43.9k|        c1 = c2;      \
  |  |   44|  43.9k|        c2 = 0;       \
  |  |   45|  43.9k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  618|  43.9k|    MULADD(at[8], at[31]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  619|  43.9k|    MULADD(at[9], at[30]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  620|  43.9k|    MULADD(at[10], at[29]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  621|  43.9k|    MULADD(at[11], at[28]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  622|  43.9k|    MULADD(at[12], at[27]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  623|  43.9k|    MULADD(at[13], at[26]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  624|  43.9k|    MULADD(at[14], at[25]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  625|  43.9k|    MULADD(at[15], at[24]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  626|  43.9k|    COMBA_STORE(C->dp[23]);
  ------------------
  |  |   67|  43.9k|    x = c0;
  ------------------
  627|       |    /* 24 */
  628|  43.9k|    COMBA_FORWARD;
  ------------------
  |  |   41|  43.9k|    do {              \
  |  |   42|  43.9k|        c0 = c1;      \
  |  |   43|  43.9k|        c1 = c2;      \
  |  |   44|  43.9k|        c2 = 0;       \
  |  |   45|  43.9k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  629|  43.9k|    MULADD(at[9], at[31]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  630|  43.9k|    MULADD(at[10], at[30]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  631|  43.9k|    MULADD(at[11], at[29]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  632|  43.9k|    MULADD(at[12], at[28]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  633|  43.9k|    MULADD(at[13], at[27]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  634|  43.9k|    MULADD(at[14], at[26]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  635|  43.9k|    MULADD(at[15], at[25]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  636|  43.9k|    COMBA_STORE(C->dp[24]);
  ------------------
  |  |   67|  43.9k|    x = c0;
  ------------------
  637|       |    /* 25 */
  638|  43.9k|    COMBA_FORWARD;
  ------------------
  |  |   41|  43.9k|    do {              \
  |  |   42|  43.9k|        c0 = c1;      \
  |  |   43|  43.9k|        c1 = c2;      \
  |  |   44|  43.9k|        c2 = 0;       \
  |  |   45|  43.9k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  639|  43.9k|    MULADD(at[10], at[31]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  640|  43.9k|    MULADD(at[11], at[30]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  641|  43.9k|    MULADD(at[12], at[29]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  642|  43.9k|    MULADD(at[13], at[28]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  643|  43.9k|    MULADD(at[14], at[27]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  644|  43.9k|    MULADD(at[15], at[26]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  645|  43.9k|    COMBA_STORE(C->dp[25]);
  ------------------
  |  |   67|  43.9k|    x = c0;
  ------------------
  646|       |    /* 26 */
  647|  43.9k|    COMBA_FORWARD;
  ------------------
  |  |   41|  43.9k|    do {              \
  |  |   42|  43.9k|        c0 = c1;      \
  |  |   43|  43.9k|        c1 = c2;      \
  |  |   44|  43.9k|        c2 = 0;       \
  |  |   45|  43.9k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  648|  43.9k|    MULADD(at[11], at[31]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  649|  43.9k|    MULADD(at[12], at[30]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  650|  43.9k|    MULADD(at[13], at[29]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  651|  43.9k|    MULADD(at[14], at[28]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  652|  43.9k|    MULADD(at[15], at[27]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  653|  43.9k|    COMBA_STORE(C->dp[26]);
  ------------------
  |  |   67|  43.9k|    x = c0;
  ------------------
  654|       |    /* 27 */
  655|  43.9k|    COMBA_FORWARD;
  ------------------
  |  |   41|  43.9k|    do {              \
  |  |   42|  43.9k|        c0 = c1;      \
  |  |   43|  43.9k|        c1 = c2;      \
  |  |   44|  43.9k|        c2 = 0;       \
  |  |   45|  43.9k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  656|  43.9k|    MULADD(at[12], at[31]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  657|  43.9k|    MULADD(at[13], at[30]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  658|  43.9k|    MULADD(at[14], at[29]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  659|  43.9k|    MULADD(at[15], at[28]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  660|  43.9k|    COMBA_STORE(C->dp[27]);
  ------------------
  |  |   67|  43.9k|    x = c0;
  ------------------
  661|       |    /* 28 */
  662|  43.9k|    COMBA_FORWARD;
  ------------------
  |  |   41|  43.9k|    do {              \
  |  |   42|  43.9k|        c0 = c1;      \
  |  |   43|  43.9k|        c1 = c2;      \
  |  |   44|  43.9k|        c2 = 0;       \
  |  |   45|  43.9k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  663|  43.9k|    MULADD(at[13], at[31]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  664|  43.9k|    MULADD(at[14], at[30]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  665|  43.9k|    MULADD(at[15], at[29]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  666|  43.9k|    COMBA_STORE(C->dp[28]);
  ------------------
  |  |   67|  43.9k|    x = c0;
  ------------------
  667|       |    /* 29 */
  668|  43.9k|    COMBA_FORWARD;
  ------------------
  |  |   41|  43.9k|    do {              \
  |  |   42|  43.9k|        c0 = c1;      \
  |  |   43|  43.9k|        c1 = c2;      \
  |  |   44|  43.9k|        c2 = 0;       \
  |  |   45|  43.9k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  669|  43.9k|    MULADD(at[14], at[31]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  670|  43.9k|    MULADD(at[15], at[30]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  671|  43.9k|    COMBA_STORE(C->dp[29]);
  ------------------
  |  |   67|  43.9k|    x = c0;
  ------------------
  672|       |    /* 30 */
  673|  43.9k|    COMBA_FORWARD;
  ------------------
  |  |   41|  43.9k|    do {              \
  |  |   42|  43.9k|        c0 = c1;      \
  |  |   43|  43.9k|        c1 = c2;      \
  |  |   44|  43.9k|        c2 = 0;       \
  |  |   45|  43.9k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  674|  43.9k|    MULADD(at[15], at[31]);
  ------------------
  |  |   52|  43.9k|    __asm__(                                        \
  |  |   53|  43.9k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|  43.9k|        "mulq  %7           \n\t"                   \
  |  |   55|  43.9k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|  43.9k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|  43.9k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|  43.9k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|  43.9k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|  43.9k|        : "%rax", "%rdx", "cc");
  ------------------
  675|  43.9k|    COMBA_STORE(C->dp[30]);
  ------------------
  |  |   67|  43.9k|    x = c0;
  ------------------
  676|  43.9k|    COMBA_STORE2(C->dp[31]);
  ------------------
  |  |   70|  43.9k|    x = c1;
  ------------------
  677|  43.9k|    C->used = 32;
  678|  43.9k|    C->sign = A->sign ^ B->sign;
  679|  43.9k|    mp_clamp(C);
  ------------------
  |  |   26|  43.9k|    {                                                    \
  |  |   27|  43.9k|        while ((a)->used && (a)->dp[(a)->used - 1] == 0) \
  |  |  ------------------
  |  |  |  Branch (27:16): [True: 43.9k, False: 0]
  |  |  |  Branch (27:29): [True: 56, False: 43.9k]
  |  |  ------------------
  |  |   28|  43.9k|            --((a)->used);                               \
  |  |   29|  43.9k|        (a)->sign = (a)->used ? (a)->sign : ZPOS;        \
  |  |  ------------------
  |  |  |  |  326|      0|#define ZPOS MP_ZPOS
  |  |  |  |  ------------------
  |  |  |  |  |  |   37|  43.9k|#define MP_ZPOS 0
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (29:21): [True: 43.9k, False: 0]
  |  |  ------------------
  |  |   30|  43.9k|    }
  ------------------
  680|  43.9k|    COMBA_FINI;
  681|  43.9k|}
s_mp_mul_comba_32:
  685|   404k|{
  686|   404k|    mp_digit c0, c1, c2, at[64];
  687|       |
  688|   404k|    memcpy(at, A->dp, 32 * sizeof(mp_digit));
  689|   404k|    memcpy(at + 32, B->dp, 32 * sizeof(mp_digit));
  690|   404k|    COMBA_START;
  691|       |
  692|   404k|    COMBA_CLEAR;
  ------------------
  |  |   37|   404k|    c0 = c1 = c2 = 0;
  ------------------
  693|       |    /* 0 */
  694|   404k|    MULADD(at[0], at[32]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  695|   404k|    COMBA_STORE(C->dp[0]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
  696|       |    /* 1 */
  697|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  698|   404k|    MULADD(at[0], at[33]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  699|   404k|    MULADD(at[1], at[32]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  700|   404k|    COMBA_STORE(C->dp[1]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
  701|       |    /* 2 */
  702|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  703|   404k|    MULADD(at[0], at[34]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  704|   404k|    MULADD(at[1], at[33]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  705|   404k|    MULADD(at[2], at[32]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  706|   404k|    COMBA_STORE(C->dp[2]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
  707|       |    /* 3 */
  708|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  709|   404k|    MULADD(at[0], at[35]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  710|   404k|    MULADD(at[1], at[34]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  711|   404k|    MULADD(at[2], at[33]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  712|   404k|    MULADD(at[3], at[32]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  713|   404k|    COMBA_STORE(C->dp[3]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
  714|       |    /* 4 */
  715|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  716|   404k|    MULADD(at[0], at[36]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  717|   404k|    MULADD(at[1], at[35]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  718|   404k|    MULADD(at[2], at[34]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  719|   404k|    MULADD(at[3], at[33]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  720|   404k|    MULADD(at[4], at[32]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  721|   404k|    COMBA_STORE(C->dp[4]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
  722|       |    /* 5 */
  723|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  724|   404k|    MULADD(at[0], at[37]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  725|   404k|    MULADD(at[1], at[36]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  726|   404k|    MULADD(at[2], at[35]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  727|   404k|    MULADD(at[3], at[34]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  728|   404k|    MULADD(at[4], at[33]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  729|   404k|    MULADD(at[5], at[32]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  730|   404k|    COMBA_STORE(C->dp[5]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
  731|       |    /* 6 */
  732|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  733|   404k|    MULADD(at[0], at[38]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  734|   404k|    MULADD(at[1], at[37]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  735|   404k|    MULADD(at[2], at[36]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  736|   404k|    MULADD(at[3], at[35]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  737|   404k|    MULADD(at[4], at[34]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  738|   404k|    MULADD(at[5], at[33]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  739|   404k|    MULADD(at[6], at[32]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  740|   404k|    COMBA_STORE(C->dp[6]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
  741|       |    /* 7 */
  742|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  743|   404k|    MULADD(at[0], at[39]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  744|   404k|    MULADD(at[1], at[38]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  745|   404k|    MULADD(at[2], at[37]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  746|   404k|    MULADD(at[3], at[36]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  747|   404k|    MULADD(at[4], at[35]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  748|   404k|    MULADD(at[5], at[34]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  749|   404k|    MULADD(at[6], at[33]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  750|   404k|    MULADD(at[7], at[32]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  751|   404k|    COMBA_STORE(C->dp[7]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
  752|       |    /* 8 */
  753|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  754|   404k|    MULADD(at[0], at[40]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  755|   404k|    MULADD(at[1], at[39]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  756|   404k|    MULADD(at[2], at[38]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  757|   404k|    MULADD(at[3], at[37]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  758|   404k|    MULADD(at[4], at[36]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  759|   404k|    MULADD(at[5], at[35]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  760|   404k|    MULADD(at[6], at[34]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  761|   404k|    MULADD(at[7], at[33]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  762|   404k|    MULADD(at[8], at[32]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  763|   404k|    COMBA_STORE(C->dp[8]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
  764|       |    /* 9 */
  765|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  766|   404k|    MULADD(at[0], at[41]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  767|   404k|    MULADD(at[1], at[40]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  768|   404k|    MULADD(at[2], at[39]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  769|   404k|    MULADD(at[3], at[38]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  770|   404k|    MULADD(at[4], at[37]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  771|   404k|    MULADD(at[5], at[36]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  772|   404k|    MULADD(at[6], at[35]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  773|   404k|    MULADD(at[7], at[34]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  774|   404k|    MULADD(at[8], at[33]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  775|   404k|    MULADD(at[9], at[32]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  776|   404k|    COMBA_STORE(C->dp[9]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
  777|       |    /* 10 */
  778|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  779|   404k|    MULADD(at[0], at[42]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  780|   404k|    MULADD(at[1], at[41]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  781|   404k|    MULADD(at[2], at[40]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  782|   404k|    MULADD(at[3], at[39]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  783|   404k|    MULADD(at[4], at[38]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  784|   404k|    MULADD(at[5], at[37]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  785|   404k|    MULADD(at[6], at[36]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  786|   404k|    MULADD(at[7], at[35]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  787|   404k|    MULADD(at[8], at[34]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  788|   404k|    MULADD(at[9], at[33]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  789|   404k|    MULADD(at[10], at[32]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  790|   404k|    COMBA_STORE(C->dp[10]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
  791|       |    /* 11 */
  792|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  793|   404k|    MULADD(at[0], at[43]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  794|   404k|    MULADD(at[1], at[42]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  795|   404k|    MULADD(at[2], at[41]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  796|   404k|    MULADD(at[3], at[40]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  797|   404k|    MULADD(at[4], at[39]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  798|   404k|    MULADD(at[5], at[38]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  799|   404k|    MULADD(at[6], at[37]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  800|   404k|    MULADD(at[7], at[36]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  801|   404k|    MULADD(at[8], at[35]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  802|   404k|    MULADD(at[9], at[34]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  803|   404k|    MULADD(at[10], at[33]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  804|   404k|    MULADD(at[11], at[32]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  805|   404k|    COMBA_STORE(C->dp[11]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
  806|       |    /* 12 */
  807|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  808|   404k|    MULADD(at[0], at[44]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  809|   404k|    MULADD(at[1], at[43]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  810|   404k|    MULADD(at[2], at[42]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  811|   404k|    MULADD(at[3], at[41]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  812|   404k|    MULADD(at[4], at[40]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  813|   404k|    MULADD(at[5], at[39]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  814|   404k|    MULADD(at[6], at[38]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  815|   404k|    MULADD(at[7], at[37]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  816|   404k|    MULADD(at[8], at[36]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  817|   404k|    MULADD(at[9], at[35]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  818|   404k|    MULADD(at[10], at[34]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  819|   404k|    MULADD(at[11], at[33]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  820|   404k|    MULADD(at[12], at[32]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  821|   404k|    COMBA_STORE(C->dp[12]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
  822|       |    /* 13 */
  823|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  824|   404k|    MULADD(at[0], at[45]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  825|   404k|    MULADD(at[1], at[44]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  826|   404k|    MULADD(at[2], at[43]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  827|   404k|    MULADD(at[3], at[42]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  828|   404k|    MULADD(at[4], at[41]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  829|   404k|    MULADD(at[5], at[40]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  830|   404k|    MULADD(at[6], at[39]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  831|   404k|    MULADD(at[7], at[38]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  832|   404k|    MULADD(at[8], at[37]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  833|   404k|    MULADD(at[9], at[36]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  834|   404k|    MULADD(at[10], at[35]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  835|   404k|    MULADD(at[11], at[34]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  836|   404k|    MULADD(at[12], at[33]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  837|   404k|    MULADD(at[13], at[32]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  838|   404k|    COMBA_STORE(C->dp[13]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
  839|       |    /* 14 */
  840|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  841|   404k|    MULADD(at[0], at[46]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  842|   404k|    MULADD(at[1], at[45]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  843|   404k|    MULADD(at[2], at[44]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  844|   404k|    MULADD(at[3], at[43]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  845|   404k|    MULADD(at[4], at[42]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  846|   404k|    MULADD(at[5], at[41]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  847|   404k|    MULADD(at[6], at[40]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  848|   404k|    MULADD(at[7], at[39]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  849|   404k|    MULADD(at[8], at[38]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  850|   404k|    MULADD(at[9], at[37]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  851|   404k|    MULADD(at[10], at[36]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  852|   404k|    MULADD(at[11], at[35]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  853|   404k|    MULADD(at[12], at[34]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  854|   404k|    MULADD(at[13], at[33]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  855|   404k|    MULADD(at[14], at[32]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  856|   404k|    COMBA_STORE(C->dp[14]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
  857|       |    /* 15 */
  858|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  859|   404k|    MULADD(at[0], at[47]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  860|   404k|    MULADD(at[1], at[46]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  861|   404k|    MULADD(at[2], at[45]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  862|   404k|    MULADD(at[3], at[44]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  863|   404k|    MULADD(at[4], at[43]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  864|   404k|    MULADD(at[5], at[42]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  865|   404k|    MULADD(at[6], at[41]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  866|   404k|    MULADD(at[7], at[40]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  867|   404k|    MULADD(at[8], at[39]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  868|   404k|    MULADD(at[9], at[38]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  869|   404k|    MULADD(at[10], at[37]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  870|   404k|    MULADD(at[11], at[36]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  871|   404k|    MULADD(at[12], at[35]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  872|   404k|    MULADD(at[13], at[34]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  873|   404k|    MULADD(at[14], at[33]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  874|   404k|    MULADD(at[15], at[32]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  875|   404k|    COMBA_STORE(C->dp[15]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
  876|       |    /* 16 */
  877|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  878|   404k|    MULADD(at[0], at[48]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  879|   404k|    MULADD(at[1], at[47]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  880|   404k|    MULADD(at[2], at[46]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  881|   404k|    MULADD(at[3], at[45]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  882|   404k|    MULADD(at[4], at[44]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  883|   404k|    MULADD(at[5], at[43]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  884|   404k|    MULADD(at[6], at[42]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  885|   404k|    MULADD(at[7], at[41]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  886|   404k|    MULADD(at[8], at[40]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  887|   404k|    MULADD(at[9], at[39]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  888|   404k|    MULADD(at[10], at[38]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  889|   404k|    MULADD(at[11], at[37]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  890|   404k|    MULADD(at[12], at[36]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  891|   404k|    MULADD(at[13], at[35]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  892|   404k|    MULADD(at[14], at[34]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  893|   404k|    MULADD(at[15], at[33]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  894|   404k|    MULADD(at[16], at[32]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  895|   404k|    COMBA_STORE(C->dp[16]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
  896|       |    /* 17 */
  897|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  898|   404k|    MULADD(at[0], at[49]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  899|   404k|    MULADD(at[1], at[48]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  900|   404k|    MULADD(at[2], at[47]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  901|   404k|    MULADD(at[3], at[46]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  902|   404k|    MULADD(at[4], at[45]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  903|   404k|    MULADD(at[5], at[44]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  904|   404k|    MULADD(at[6], at[43]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  905|   404k|    MULADD(at[7], at[42]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  906|   404k|    MULADD(at[8], at[41]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  907|   404k|    MULADD(at[9], at[40]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  908|   404k|    MULADD(at[10], at[39]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  909|   404k|    MULADD(at[11], at[38]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  910|   404k|    MULADD(at[12], at[37]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  911|   404k|    MULADD(at[13], at[36]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  912|   404k|    MULADD(at[14], at[35]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  913|   404k|    MULADD(at[15], at[34]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  914|   404k|    MULADD(at[16], at[33]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  915|   404k|    MULADD(at[17], at[32]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  916|   404k|    COMBA_STORE(C->dp[17]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
  917|       |    /* 18 */
  918|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  919|   404k|    MULADD(at[0], at[50]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  920|   404k|    MULADD(at[1], at[49]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  921|   404k|    MULADD(at[2], at[48]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  922|   404k|    MULADD(at[3], at[47]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  923|   404k|    MULADD(at[4], at[46]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  924|   404k|    MULADD(at[5], at[45]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  925|   404k|    MULADD(at[6], at[44]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  926|   404k|    MULADD(at[7], at[43]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  927|   404k|    MULADD(at[8], at[42]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  928|   404k|    MULADD(at[9], at[41]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  929|   404k|    MULADD(at[10], at[40]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  930|   404k|    MULADD(at[11], at[39]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  931|   404k|    MULADD(at[12], at[38]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  932|   404k|    MULADD(at[13], at[37]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  933|   404k|    MULADD(at[14], at[36]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  934|   404k|    MULADD(at[15], at[35]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  935|   404k|    MULADD(at[16], at[34]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  936|   404k|    MULADD(at[17], at[33]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  937|   404k|    MULADD(at[18], at[32]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  938|   404k|    COMBA_STORE(C->dp[18]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
  939|       |    /* 19 */
  940|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  941|   404k|    MULADD(at[0], at[51]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  942|   404k|    MULADD(at[1], at[50]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  943|   404k|    MULADD(at[2], at[49]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  944|   404k|    MULADD(at[3], at[48]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  945|   404k|    MULADD(at[4], at[47]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  946|   404k|    MULADD(at[5], at[46]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  947|   404k|    MULADD(at[6], at[45]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  948|   404k|    MULADD(at[7], at[44]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  949|   404k|    MULADD(at[8], at[43]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  950|   404k|    MULADD(at[9], at[42]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  951|   404k|    MULADD(at[10], at[41]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  952|   404k|    MULADD(at[11], at[40]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  953|   404k|    MULADD(at[12], at[39]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  954|   404k|    MULADD(at[13], at[38]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  955|   404k|    MULADD(at[14], at[37]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  956|   404k|    MULADD(at[15], at[36]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  957|   404k|    MULADD(at[16], at[35]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  958|   404k|    MULADD(at[17], at[34]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  959|   404k|    MULADD(at[18], at[33]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  960|   404k|    MULADD(at[19], at[32]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  961|   404k|    COMBA_STORE(C->dp[19]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
  962|       |    /* 20 */
  963|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  964|   404k|    MULADD(at[0], at[52]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  965|   404k|    MULADD(at[1], at[51]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  966|   404k|    MULADD(at[2], at[50]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  967|   404k|    MULADD(at[3], at[49]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  968|   404k|    MULADD(at[4], at[48]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  969|   404k|    MULADD(at[5], at[47]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  970|   404k|    MULADD(at[6], at[46]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  971|   404k|    MULADD(at[7], at[45]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  972|   404k|    MULADD(at[8], at[44]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  973|   404k|    MULADD(at[9], at[43]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  974|   404k|    MULADD(at[10], at[42]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  975|   404k|    MULADD(at[11], at[41]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  976|   404k|    MULADD(at[12], at[40]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  977|   404k|    MULADD(at[13], at[39]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  978|   404k|    MULADD(at[14], at[38]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  979|   404k|    MULADD(at[15], at[37]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  980|   404k|    MULADD(at[16], at[36]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  981|   404k|    MULADD(at[17], at[35]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  982|   404k|    MULADD(at[18], at[34]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  983|   404k|    MULADD(at[19], at[33]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  984|   404k|    MULADD(at[20], at[32]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  985|   404k|    COMBA_STORE(C->dp[20]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
  986|       |    /* 21 */
  987|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  988|   404k|    MULADD(at[0], at[53]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  989|   404k|    MULADD(at[1], at[52]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  990|   404k|    MULADD(at[2], at[51]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  991|   404k|    MULADD(at[3], at[50]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  992|   404k|    MULADD(at[4], at[49]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  993|   404k|    MULADD(at[5], at[48]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  994|   404k|    MULADD(at[6], at[47]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  995|   404k|    MULADD(at[7], at[46]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  996|   404k|    MULADD(at[8], at[45]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  997|   404k|    MULADD(at[9], at[44]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  998|   404k|    MULADD(at[10], at[43]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
  999|   404k|    MULADD(at[11], at[42]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1000|   404k|    MULADD(at[12], at[41]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1001|   404k|    MULADD(at[13], at[40]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1002|   404k|    MULADD(at[14], at[39]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1003|   404k|    MULADD(at[15], at[38]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1004|   404k|    MULADD(at[16], at[37]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1005|   404k|    MULADD(at[17], at[36]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1006|   404k|    MULADD(at[18], at[35]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1007|   404k|    MULADD(at[19], at[34]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1008|   404k|    MULADD(at[20], at[33]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1009|   404k|    MULADD(at[21], at[32]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1010|   404k|    COMBA_STORE(C->dp[21]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
 1011|       |    /* 22 */
 1012|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1013|   404k|    MULADD(at[0], at[54]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1014|   404k|    MULADD(at[1], at[53]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1015|   404k|    MULADD(at[2], at[52]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1016|   404k|    MULADD(at[3], at[51]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1017|   404k|    MULADD(at[4], at[50]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1018|   404k|    MULADD(at[5], at[49]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1019|   404k|    MULADD(at[6], at[48]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1020|   404k|    MULADD(at[7], at[47]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1021|   404k|    MULADD(at[8], at[46]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1022|   404k|    MULADD(at[9], at[45]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1023|   404k|    MULADD(at[10], at[44]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1024|   404k|    MULADD(at[11], at[43]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1025|   404k|    MULADD(at[12], at[42]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1026|   404k|    MULADD(at[13], at[41]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1027|   404k|    MULADD(at[14], at[40]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1028|   404k|    MULADD(at[15], at[39]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1029|   404k|    MULADD(at[16], at[38]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1030|   404k|    MULADD(at[17], at[37]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1031|   404k|    MULADD(at[18], at[36]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1032|   404k|    MULADD(at[19], at[35]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1033|   404k|    MULADD(at[20], at[34]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1034|   404k|    MULADD(at[21], at[33]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1035|   404k|    MULADD(at[22], at[32]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1036|   404k|    COMBA_STORE(C->dp[22]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
 1037|       |    /* 23 */
 1038|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1039|   404k|    MULADD(at[0], at[55]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1040|   404k|    MULADD(at[1], at[54]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1041|   404k|    MULADD(at[2], at[53]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1042|   404k|    MULADD(at[3], at[52]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1043|   404k|    MULADD(at[4], at[51]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1044|   404k|    MULADD(at[5], at[50]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1045|   404k|    MULADD(at[6], at[49]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1046|   404k|    MULADD(at[7], at[48]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1047|   404k|    MULADD(at[8], at[47]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1048|   404k|    MULADD(at[9], at[46]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1049|   404k|    MULADD(at[10], at[45]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1050|   404k|    MULADD(at[11], at[44]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1051|   404k|    MULADD(at[12], at[43]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1052|   404k|    MULADD(at[13], at[42]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1053|   404k|    MULADD(at[14], at[41]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1054|   404k|    MULADD(at[15], at[40]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1055|   404k|    MULADD(at[16], at[39]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1056|   404k|    MULADD(at[17], at[38]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1057|   404k|    MULADD(at[18], at[37]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1058|   404k|    MULADD(at[19], at[36]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1059|   404k|    MULADD(at[20], at[35]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1060|   404k|    MULADD(at[21], at[34]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1061|   404k|    MULADD(at[22], at[33]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1062|   404k|    MULADD(at[23], at[32]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1063|   404k|    COMBA_STORE(C->dp[23]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
 1064|       |    /* 24 */
 1065|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1066|   404k|    MULADD(at[0], at[56]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1067|   404k|    MULADD(at[1], at[55]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1068|   404k|    MULADD(at[2], at[54]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1069|   404k|    MULADD(at[3], at[53]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1070|   404k|    MULADD(at[4], at[52]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1071|   404k|    MULADD(at[5], at[51]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1072|   404k|    MULADD(at[6], at[50]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1073|   404k|    MULADD(at[7], at[49]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1074|   404k|    MULADD(at[8], at[48]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1075|   404k|    MULADD(at[9], at[47]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1076|   404k|    MULADD(at[10], at[46]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1077|   404k|    MULADD(at[11], at[45]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1078|   404k|    MULADD(at[12], at[44]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1079|   404k|    MULADD(at[13], at[43]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1080|   404k|    MULADD(at[14], at[42]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1081|   404k|    MULADD(at[15], at[41]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1082|   404k|    MULADD(at[16], at[40]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1083|   404k|    MULADD(at[17], at[39]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1084|   404k|    MULADD(at[18], at[38]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1085|   404k|    MULADD(at[19], at[37]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1086|   404k|    MULADD(at[20], at[36]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1087|   404k|    MULADD(at[21], at[35]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1088|   404k|    MULADD(at[22], at[34]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1089|   404k|    MULADD(at[23], at[33]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1090|   404k|    MULADD(at[24], at[32]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1091|   404k|    COMBA_STORE(C->dp[24]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
 1092|       |    /* 25 */
 1093|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1094|   404k|    MULADD(at[0], at[57]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1095|   404k|    MULADD(at[1], at[56]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1096|   404k|    MULADD(at[2], at[55]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1097|   404k|    MULADD(at[3], at[54]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1098|   404k|    MULADD(at[4], at[53]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1099|   404k|    MULADD(at[5], at[52]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1100|   404k|    MULADD(at[6], at[51]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1101|   404k|    MULADD(at[7], at[50]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1102|   404k|    MULADD(at[8], at[49]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1103|   404k|    MULADD(at[9], at[48]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1104|   404k|    MULADD(at[10], at[47]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1105|   404k|    MULADD(at[11], at[46]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1106|   404k|    MULADD(at[12], at[45]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1107|   404k|    MULADD(at[13], at[44]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1108|   404k|    MULADD(at[14], at[43]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1109|   404k|    MULADD(at[15], at[42]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1110|   404k|    MULADD(at[16], at[41]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1111|   404k|    MULADD(at[17], at[40]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1112|   404k|    MULADD(at[18], at[39]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1113|   404k|    MULADD(at[19], at[38]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1114|   404k|    MULADD(at[20], at[37]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1115|   404k|    MULADD(at[21], at[36]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1116|   404k|    MULADD(at[22], at[35]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1117|   404k|    MULADD(at[23], at[34]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1118|   404k|    MULADD(at[24], at[33]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1119|   404k|    MULADD(at[25], at[32]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1120|   404k|    COMBA_STORE(C->dp[25]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
 1121|       |    /* 26 */
 1122|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1123|   404k|    MULADD(at[0], at[58]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1124|   404k|    MULADD(at[1], at[57]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1125|   404k|    MULADD(at[2], at[56]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1126|   404k|    MULADD(at[3], at[55]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1127|   404k|    MULADD(at[4], at[54]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1128|   404k|    MULADD(at[5], at[53]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1129|   404k|    MULADD(at[6], at[52]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1130|   404k|    MULADD(at[7], at[51]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1131|   404k|    MULADD(at[8], at[50]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1132|   404k|    MULADD(at[9], at[49]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1133|   404k|    MULADD(at[10], at[48]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1134|   404k|    MULADD(at[11], at[47]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1135|   404k|    MULADD(at[12], at[46]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1136|   404k|    MULADD(at[13], at[45]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1137|   404k|    MULADD(at[14], at[44]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1138|   404k|    MULADD(at[15], at[43]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1139|   404k|    MULADD(at[16], at[42]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1140|   404k|    MULADD(at[17], at[41]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1141|   404k|    MULADD(at[18], at[40]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1142|   404k|    MULADD(at[19], at[39]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1143|   404k|    MULADD(at[20], at[38]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1144|   404k|    MULADD(at[21], at[37]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1145|   404k|    MULADD(at[22], at[36]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1146|   404k|    MULADD(at[23], at[35]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1147|   404k|    MULADD(at[24], at[34]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1148|   404k|    MULADD(at[25], at[33]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1149|   404k|    MULADD(at[26], at[32]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1150|   404k|    COMBA_STORE(C->dp[26]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
 1151|       |    /* 27 */
 1152|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1153|   404k|    MULADD(at[0], at[59]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1154|   404k|    MULADD(at[1], at[58]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1155|   404k|    MULADD(at[2], at[57]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1156|   404k|    MULADD(at[3], at[56]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1157|   404k|    MULADD(at[4], at[55]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1158|   404k|    MULADD(at[5], at[54]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1159|   404k|    MULADD(at[6], at[53]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1160|   404k|    MULADD(at[7], at[52]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1161|   404k|    MULADD(at[8], at[51]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1162|   404k|    MULADD(at[9], at[50]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1163|   404k|    MULADD(at[10], at[49]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1164|   404k|    MULADD(at[11], at[48]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1165|   404k|    MULADD(at[12], at[47]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1166|   404k|    MULADD(at[13], at[46]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1167|   404k|    MULADD(at[14], at[45]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1168|   404k|    MULADD(at[15], at[44]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1169|   404k|    MULADD(at[16], at[43]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1170|   404k|    MULADD(at[17], at[42]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1171|   404k|    MULADD(at[18], at[41]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1172|   404k|    MULADD(at[19], at[40]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1173|   404k|    MULADD(at[20], at[39]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1174|   404k|    MULADD(at[21], at[38]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1175|   404k|    MULADD(at[22], at[37]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1176|   404k|    MULADD(at[23], at[36]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1177|   404k|    MULADD(at[24], at[35]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1178|   404k|    MULADD(at[25], at[34]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1179|   404k|    MULADD(at[26], at[33]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1180|   404k|    MULADD(at[27], at[32]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1181|   404k|    COMBA_STORE(C->dp[27]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
 1182|       |    /* 28 */
 1183|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1184|   404k|    MULADD(at[0], at[60]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1185|   404k|    MULADD(at[1], at[59]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1186|   404k|    MULADD(at[2], at[58]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1187|   404k|    MULADD(at[3], at[57]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1188|   404k|    MULADD(at[4], at[56]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1189|   404k|    MULADD(at[5], at[55]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1190|   404k|    MULADD(at[6], at[54]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1191|   404k|    MULADD(at[7], at[53]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1192|   404k|    MULADD(at[8], at[52]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1193|   404k|    MULADD(at[9], at[51]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1194|   404k|    MULADD(at[10], at[50]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1195|   404k|    MULADD(at[11], at[49]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1196|   404k|    MULADD(at[12], at[48]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1197|   404k|    MULADD(at[13], at[47]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1198|   404k|    MULADD(at[14], at[46]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1199|   404k|    MULADD(at[15], at[45]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1200|   404k|    MULADD(at[16], at[44]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1201|   404k|    MULADD(at[17], at[43]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1202|   404k|    MULADD(at[18], at[42]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1203|   404k|    MULADD(at[19], at[41]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1204|   404k|    MULADD(at[20], at[40]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1205|   404k|    MULADD(at[21], at[39]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1206|   404k|    MULADD(at[22], at[38]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1207|   404k|    MULADD(at[23], at[37]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1208|   404k|    MULADD(at[24], at[36]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1209|   404k|    MULADD(at[25], at[35]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1210|   404k|    MULADD(at[26], at[34]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1211|   404k|    MULADD(at[27], at[33]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1212|   404k|    MULADD(at[28], at[32]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1213|   404k|    COMBA_STORE(C->dp[28]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
 1214|       |    /* 29 */
 1215|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1216|   404k|    MULADD(at[0], at[61]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1217|   404k|    MULADD(at[1], at[60]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1218|   404k|    MULADD(at[2], at[59]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1219|   404k|    MULADD(at[3], at[58]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1220|   404k|    MULADD(at[4], at[57]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1221|   404k|    MULADD(at[5], at[56]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1222|   404k|    MULADD(at[6], at[55]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1223|   404k|    MULADD(at[7], at[54]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1224|   404k|    MULADD(at[8], at[53]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1225|   404k|    MULADD(at[9], at[52]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1226|   404k|    MULADD(at[10], at[51]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1227|   404k|    MULADD(at[11], at[50]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1228|   404k|    MULADD(at[12], at[49]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1229|   404k|    MULADD(at[13], at[48]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1230|   404k|    MULADD(at[14], at[47]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1231|   404k|    MULADD(at[15], at[46]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1232|   404k|    MULADD(at[16], at[45]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1233|   404k|    MULADD(at[17], at[44]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1234|   404k|    MULADD(at[18], at[43]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1235|   404k|    MULADD(at[19], at[42]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1236|   404k|    MULADD(at[20], at[41]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1237|   404k|    MULADD(at[21], at[40]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1238|   404k|    MULADD(at[22], at[39]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1239|   404k|    MULADD(at[23], at[38]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1240|   404k|    MULADD(at[24], at[37]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1241|   404k|    MULADD(at[25], at[36]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1242|   404k|    MULADD(at[26], at[35]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1243|   404k|    MULADD(at[27], at[34]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1244|   404k|    MULADD(at[28], at[33]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1245|   404k|    MULADD(at[29], at[32]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1246|   404k|    COMBA_STORE(C->dp[29]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
 1247|       |    /* 30 */
 1248|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1249|   404k|    MULADD(at[0], at[62]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1250|   404k|    MULADD(at[1], at[61]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1251|   404k|    MULADD(at[2], at[60]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1252|   404k|    MULADD(at[3], at[59]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1253|   404k|    MULADD(at[4], at[58]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1254|   404k|    MULADD(at[5], at[57]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1255|   404k|    MULADD(at[6], at[56]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1256|   404k|    MULADD(at[7], at[55]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1257|   404k|    MULADD(at[8], at[54]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1258|   404k|    MULADD(at[9], at[53]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1259|   404k|    MULADD(at[10], at[52]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1260|   404k|    MULADD(at[11], at[51]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1261|   404k|    MULADD(at[12], at[50]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1262|   404k|    MULADD(at[13], at[49]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1263|   404k|    MULADD(at[14], at[48]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1264|   404k|    MULADD(at[15], at[47]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1265|   404k|    MULADD(at[16], at[46]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1266|   404k|    MULADD(at[17], at[45]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1267|   404k|    MULADD(at[18], at[44]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1268|   404k|    MULADD(at[19], at[43]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1269|   404k|    MULADD(at[20], at[42]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1270|   404k|    MULADD(at[21], at[41]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1271|   404k|    MULADD(at[22], at[40]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1272|   404k|    MULADD(at[23], at[39]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1273|   404k|    MULADD(at[24], at[38]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1274|   404k|    MULADD(at[25], at[37]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1275|   404k|    MULADD(at[26], at[36]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1276|   404k|    MULADD(at[27], at[35]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1277|   404k|    MULADD(at[28], at[34]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1278|   404k|    MULADD(at[29], at[33]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1279|   404k|    MULADD(at[30], at[32]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1280|   404k|    COMBA_STORE(C->dp[30]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
 1281|       |    /* 31 */
 1282|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1283|   404k|    MULADD(at[0], at[63]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1284|   404k|    MULADD(at[1], at[62]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1285|   404k|    MULADD(at[2], at[61]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1286|   404k|    MULADD(at[3], at[60]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1287|   404k|    MULADD(at[4], at[59]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1288|   404k|    MULADD(at[5], at[58]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1289|   404k|    MULADD(at[6], at[57]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1290|   404k|    MULADD(at[7], at[56]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1291|   404k|    MULADD(at[8], at[55]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1292|   404k|    MULADD(at[9], at[54]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1293|   404k|    MULADD(at[10], at[53]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1294|   404k|    MULADD(at[11], at[52]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1295|   404k|    MULADD(at[12], at[51]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1296|   404k|    MULADD(at[13], at[50]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1297|   404k|    MULADD(at[14], at[49]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1298|   404k|    MULADD(at[15], at[48]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1299|   404k|    MULADD(at[16], at[47]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1300|   404k|    MULADD(at[17], at[46]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1301|   404k|    MULADD(at[18], at[45]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1302|   404k|    MULADD(at[19], at[44]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1303|   404k|    MULADD(at[20], at[43]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1304|   404k|    MULADD(at[21], at[42]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1305|   404k|    MULADD(at[22], at[41]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1306|   404k|    MULADD(at[23], at[40]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1307|   404k|    MULADD(at[24], at[39]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1308|   404k|    MULADD(at[25], at[38]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1309|   404k|    MULADD(at[26], at[37]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1310|   404k|    MULADD(at[27], at[36]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1311|   404k|    MULADD(at[28], at[35]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1312|   404k|    MULADD(at[29], at[34]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1313|   404k|    MULADD(at[30], at[33]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1314|   404k|    MULADD(at[31], at[32]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1315|   404k|    COMBA_STORE(C->dp[31]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
 1316|       |    /* 32 */
 1317|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1318|   404k|    MULADD(at[1], at[63]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1319|   404k|    MULADD(at[2], at[62]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1320|   404k|    MULADD(at[3], at[61]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1321|   404k|    MULADD(at[4], at[60]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1322|   404k|    MULADD(at[5], at[59]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1323|   404k|    MULADD(at[6], at[58]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1324|   404k|    MULADD(at[7], at[57]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1325|   404k|    MULADD(at[8], at[56]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1326|   404k|    MULADD(at[9], at[55]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1327|   404k|    MULADD(at[10], at[54]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1328|   404k|    MULADD(at[11], at[53]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1329|   404k|    MULADD(at[12], at[52]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1330|   404k|    MULADD(at[13], at[51]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1331|   404k|    MULADD(at[14], at[50]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1332|   404k|    MULADD(at[15], at[49]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1333|   404k|    MULADD(at[16], at[48]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1334|   404k|    MULADD(at[17], at[47]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1335|   404k|    MULADD(at[18], at[46]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1336|   404k|    MULADD(at[19], at[45]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1337|   404k|    MULADD(at[20], at[44]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1338|   404k|    MULADD(at[21], at[43]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1339|   404k|    MULADD(at[22], at[42]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1340|   404k|    MULADD(at[23], at[41]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1341|   404k|    MULADD(at[24], at[40]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1342|   404k|    MULADD(at[25], at[39]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1343|   404k|    MULADD(at[26], at[38]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1344|   404k|    MULADD(at[27], at[37]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1345|   404k|    MULADD(at[28], at[36]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1346|   404k|    MULADD(at[29], at[35]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1347|   404k|    MULADD(at[30], at[34]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1348|   404k|    MULADD(at[31], at[33]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1349|   404k|    COMBA_STORE(C->dp[32]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
 1350|       |    /* 33 */
 1351|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1352|   404k|    MULADD(at[2], at[63]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1353|   404k|    MULADD(at[3], at[62]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1354|   404k|    MULADD(at[4], at[61]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1355|   404k|    MULADD(at[5], at[60]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1356|   404k|    MULADD(at[6], at[59]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1357|   404k|    MULADD(at[7], at[58]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1358|   404k|    MULADD(at[8], at[57]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1359|   404k|    MULADD(at[9], at[56]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1360|   404k|    MULADD(at[10], at[55]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1361|   404k|    MULADD(at[11], at[54]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1362|   404k|    MULADD(at[12], at[53]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1363|   404k|    MULADD(at[13], at[52]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1364|   404k|    MULADD(at[14], at[51]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1365|   404k|    MULADD(at[15], at[50]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1366|   404k|    MULADD(at[16], at[49]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1367|   404k|    MULADD(at[17], at[48]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1368|   404k|    MULADD(at[18], at[47]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1369|   404k|    MULADD(at[19], at[46]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1370|   404k|    MULADD(at[20], at[45]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1371|   404k|    MULADD(at[21], at[44]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1372|   404k|    MULADD(at[22], at[43]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1373|   404k|    MULADD(at[23], at[42]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1374|   404k|    MULADD(at[24], at[41]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1375|   404k|    MULADD(at[25], at[40]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1376|   404k|    MULADD(at[26], at[39]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1377|   404k|    MULADD(at[27], at[38]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1378|   404k|    MULADD(at[28], at[37]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1379|   404k|    MULADD(at[29], at[36]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1380|   404k|    MULADD(at[30], at[35]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1381|   404k|    MULADD(at[31], at[34]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1382|   404k|    COMBA_STORE(C->dp[33]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
 1383|       |    /* 34 */
 1384|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1385|   404k|    MULADD(at[3], at[63]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1386|   404k|    MULADD(at[4], at[62]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1387|   404k|    MULADD(at[5], at[61]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1388|   404k|    MULADD(at[6], at[60]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1389|   404k|    MULADD(at[7], at[59]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1390|   404k|    MULADD(at[8], at[58]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1391|   404k|    MULADD(at[9], at[57]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1392|   404k|    MULADD(at[10], at[56]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1393|   404k|    MULADD(at[11], at[55]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1394|   404k|    MULADD(at[12], at[54]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1395|   404k|    MULADD(at[13], at[53]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1396|   404k|    MULADD(at[14], at[52]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1397|   404k|    MULADD(at[15], at[51]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1398|   404k|    MULADD(at[16], at[50]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1399|   404k|    MULADD(at[17], at[49]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1400|   404k|    MULADD(at[18], at[48]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1401|   404k|    MULADD(at[19], at[47]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1402|   404k|    MULADD(at[20], at[46]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1403|   404k|    MULADD(at[21], at[45]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1404|   404k|    MULADD(at[22], at[44]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1405|   404k|    MULADD(at[23], at[43]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1406|   404k|    MULADD(at[24], at[42]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1407|   404k|    MULADD(at[25], at[41]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1408|   404k|    MULADD(at[26], at[40]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1409|   404k|    MULADD(at[27], at[39]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1410|   404k|    MULADD(at[28], at[38]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1411|   404k|    MULADD(at[29], at[37]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1412|   404k|    MULADD(at[30], at[36]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1413|   404k|    MULADD(at[31], at[35]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1414|   404k|    COMBA_STORE(C->dp[34]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
 1415|       |    /* 35 */
 1416|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1417|   404k|    MULADD(at[4], at[63]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1418|   404k|    MULADD(at[5], at[62]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1419|   404k|    MULADD(at[6], at[61]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1420|   404k|    MULADD(at[7], at[60]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1421|   404k|    MULADD(at[8], at[59]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1422|   404k|    MULADD(at[9], at[58]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1423|   404k|    MULADD(at[10], at[57]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1424|   404k|    MULADD(at[11], at[56]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1425|   404k|    MULADD(at[12], at[55]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1426|   404k|    MULADD(at[13], at[54]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1427|   404k|    MULADD(at[14], at[53]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1428|   404k|    MULADD(at[15], at[52]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1429|   404k|    MULADD(at[16], at[51]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1430|   404k|    MULADD(at[17], at[50]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1431|   404k|    MULADD(at[18], at[49]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1432|   404k|    MULADD(at[19], at[48]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1433|   404k|    MULADD(at[20], at[47]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1434|   404k|    MULADD(at[21], at[46]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1435|   404k|    MULADD(at[22], at[45]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1436|   404k|    MULADD(at[23], at[44]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1437|   404k|    MULADD(at[24], at[43]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1438|   404k|    MULADD(at[25], at[42]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1439|   404k|    MULADD(at[26], at[41]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1440|   404k|    MULADD(at[27], at[40]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1441|   404k|    MULADD(at[28], at[39]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1442|   404k|    MULADD(at[29], at[38]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1443|   404k|    MULADD(at[30], at[37]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1444|   404k|    MULADD(at[31], at[36]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1445|   404k|    COMBA_STORE(C->dp[35]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
 1446|       |    /* 36 */
 1447|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1448|   404k|    MULADD(at[5], at[63]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1449|   404k|    MULADD(at[6], at[62]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1450|   404k|    MULADD(at[7], at[61]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1451|   404k|    MULADD(at[8], at[60]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1452|   404k|    MULADD(at[9], at[59]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1453|   404k|    MULADD(at[10], at[58]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1454|   404k|    MULADD(at[11], at[57]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1455|   404k|    MULADD(at[12], at[56]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1456|   404k|    MULADD(at[13], at[55]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1457|   404k|    MULADD(at[14], at[54]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1458|   404k|    MULADD(at[15], at[53]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1459|   404k|    MULADD(at[16], at[52]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1460|   404k|    MULADD(at[17], at[51]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1461|   404k|    MULADD(at[18], at[50]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1462|   404k|    MULADD(at[19], at[49]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1463|   404k|    MULADD(at[20], at[48]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1464|   404k|    MULADD(at[21], at[47]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1465|   404k|    MULADD(at[22], at[46]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1466|   404k|    MULADD(at[23], at[45]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1467|   404k|    MULADD(at[24], at[44]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1468|   404k|    MULADD(at[25], at[43]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1469|   404k|    MULADD(at[26], at[42]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1470|   404k|    MULADD(at[27], at[41]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1471|   404k|    MULADD(at[28], at[40]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1472|   404k|    MULADD(at[29], at[39]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1473|   404k|    MULADD(at[30], at[38]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1474|   404k|    MULADD(at[31], at[37]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1475|   404k|    COMBA_STORE(C->dp[36]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
 1476|       |    /* 37 */
 1477|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1478|   404k|    MULADD(at[6], at[63]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1479|   404k|    MULADD(at[7], at[62]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1480|   404k|    MULADD(at[8], at[61]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1481|   404k|    MULADD(at[9], at[60]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1482|   404k|    MULADD(at[10], at[59]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1483|   404k|    MULADD(at[11], at[58]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1484|   404k|    MULADD(at[12], at[57]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1485|   404k|    MULADD(at[13], at[56]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1486|   404k|    MULADD(at[14], at[55]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1487|   404k|    MULADD(at[15], at[54]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1488|   404k|    MULADD(at[16], at[53]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1489|   404k|    MULADD(at[17], at[52]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1490|   404k|    MULADD(at[18], at[51]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1491|   404k|    MULADD(at[19], at[50]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1492|   404k|    MULADD(at[20], at[49]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1493|   404k|    MULADD(at[21], at[48]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1494|   404k|    MULADD(at[22], at[47]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1495|   404k|    MULADD(at[23], at[46]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1496|   404k|    MULADD(at[24], at[45]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1497|   404k|    MULADD(at[25], at[44]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1498|   404k|    MULADD(at[26], at[43]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1499|   404k|    MULADD(at[27], at[42]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1500|   404k|    MULADD(at[28], at[41]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1501|   404k|    MULADD(at[29], at[40]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1502|   404k|    MULADD(at[30], at[39]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1503|   404k|    MULADD(at[31], at[38]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1504|   404k|    COMBA_STORE(C->dp[37]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
 1505|       |    /* 38 */
 1506|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1507|   404k|    MULADD(at[7], at[63]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1508|   404k|    MULADD(at[8], at[62]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1509|   404k|    MULADD(at[9], at[61]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1510|   404k|    MULADD(at[10], at[60]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1511|   404k|    MULADD(at[11], at[59]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1512|   404k|    MULADD(at[12], at[58]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1513|   404k|    MULADD(at[13], at[57]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1514|   404k|    MULADD(at[14], at[56]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1515|   404k|    MULADD(at[15], at[55]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1516|   404k|    MULADD(at[16], at[54]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1517|   404k|    MULADD(at[17], at[53]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1518|   404k|    MULADD(at[18], at[52]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1519|   404k|    MULADD(at[19], at[51]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1520|   404k|    MULADD(at[20], at[50]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1521|   404k|    MULADD(at[21], at[49]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1522|   404k|    MULADD(at[22], at[48]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1523|   404k|    MULADD(at[23], at[47]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1524|   404k|    MULADD(at[24], at[46]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1525|   404k|    MULADD(at[25], at[45]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1526|   404k|    MULADD(at[26], at[44]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1527|   404k|    MULADD(at[27], at[43]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1528|   404k|    MULADD(at[28], at[42]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1529|   404k|    MULADD(at[29], at[41]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1530|   404k|    MULADD(at[30], at[40]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1531|   404k|    MULADD(at[31], at[39]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1532|   404k|    COMBA_STORE(C->dp[38]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
 1533|       |    /* 39 */
 1534|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1535|   404k|    MULADD(at[8], at[63]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1536|   404k|    MULADD(at[9], at[62]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1537|   404k|    MULADD(at[10], at[61]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1538|   404k|    MULADD(at[11], at[60]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1539|   404k|    MULADD(at[12], at[59]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1540|   404k|    MULADD(at[13], at[58]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1541|   404k|    MULADD(at[14], at[57]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1542|   404k|    MULADD(at[15], at[56]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1543|   404k|    MULADD(at[16], at[55]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1544|   404k|    MULADD(at[17], at[54]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1545|   404k|    MULADD(at[18], at[53]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1546|   404k|    MULADD(at[19], at[52]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1547|   404k|    MULADD(at[20], at[51]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1548|   404k|    MULADD(at[21], at[50]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1549|   404k|    MULADD(at[22], at[49]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1550|   404k|    MULADD(at[23], at[48]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1551|   404k|    MULADD(at[24], at[47]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1552|   404k|    MULADD(at[25], at[46]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1553|   404k|    MULADD(at[26], at[45]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1554|   404k|    MULADD(at[27], at[44]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1555|   404k|    MULADD(at[28], at[43]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1556|   404k|    MULADD(at[29], at[42]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1557|   404k|    MULADD(at[30], at[41]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1558|   404k|    MULADD(at[31], at[40]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1559|   404k|    COMBA_STORE(C->dp[39]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
 1560|       |    /* 40 */
 1561|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1562|   404k|    MULADD(at[9], at[63]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1563|   404k|    MULADD(at[10], at[62]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1564|   404k|    MULADD(at[11], at[61]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1565|   404k|    MULADD(at[12], at[60]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1566|   404k|    MULADD(at[13], at[59]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1567|   404k|    MULADD(at[14], at[58]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1568|   404k|    MULADD(at[15], at[57]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1569|   404k|    MULADD(at[16], at[56]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1570|   404k|    MULADD(at[17], at[55]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1571|   404k|    MULADD(at[18], at[54]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1572|   404k|    MULADD(at[19], at[53]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1573|   404k|    MULADD(at[20], at[52]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1574|   404k|    MULADD(at[21], at[51]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1575|   404k|    MULADD(at[22], at[50]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1576|   404k|    MULADD(at[23], at[49]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1577|   404k|    MULADD(at[24], at[48]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1578|   404k|    MULADD(at[25], at[47]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1579|   404k|    MULADD(at[26], at[46]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1580|   404k|    MULADD(at[27], at[45]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1581|   404k|    MULADD(at[28], at[44]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1582|   404k|    MULADD(at[29], at[43]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1583|   404k|    MULADD(at[30], at[42]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1584|   404k|    MULADD(at[31], at[41]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1585|   404k|    COMBA_STORE(C->dp[40]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
 1586|       |    /* 41 */
 1587|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1588|   404k|    MULADD(at[10], at[63]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1589|   404k|    MULADD(at[11], at[62]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1590|   404k|    MULADD(at[12], at[61]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1591|   404k|    MULADD(at[13], at[60]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1592|   404k|    MULADD(at[14], at[59]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1593|   404k|    MULADD(at[15], at[58]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1594|   404k|    MULADD(at[16], at[57]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1595|   404k|    MULADD(at[17], at[56]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1596|   404k|    MULADD(at[18], at[55]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1597|   404k|    MULADD(at[19], at[54]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1598|   404k|    MULADD(at[20], at[53]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1599|   404k|    MULADD(at[21], at[52]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1600|   404k|    MULADD(at[22], at[51]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1601|   404k|    MULADD(at[23], at[50]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1602|   404k|    MULADD(at[24], at[49]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1603|   404k|    MULADD(at[25], at[48]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1604|   404k|    MULADD(at[26], at[47]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1605|   404k|    MULADD(at[27], at[46]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1606|   404k|    MULADD(at[28], at[45]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1607|   404k|    MULADD(at[29], at[44]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1608|   404k|    MULADD(at[30], at[43]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1609|   404k|    MULADD(at[31], at[42]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1610|   404k|    COMBA_STORE(C->dp[41]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
 1611|       |    /* 42 */
 1612|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1613|   404k|    MULADD(at[11], at[63]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1614|   404k|    MULADD(at[12], at[62]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1615|   404k|    MULADD(at[13], at[61]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1616|   404k|    MULADD(at[14], at[60]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1617|   404k|    MULADD(at[15], at[59]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1618|   404k|    MULADD(at[16], at[58]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1619|   404k|    MULADD(at[17], at[57]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1620|   404k|    MULADD(at[18], at[56]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1621|   404k|    MULADD(at[19], at[55]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1622|   404k|    MULADD(at[20], at[54]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1623|   404k|    MULADD(at[21], at[53]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1624|   404k|    MULADD(at[22], at[52]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1625|   404k|    MULADD(at[23], at[51]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1626|   404k|    MULADD(at[24], at[50]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1627|   404k|    MULADD(at[25], at[49]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1628|   404k|    MULADD(at[26], at[48]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1629|   404k|    MULADD(at[27], at[47]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1630|   404k|    MULADD(at[28], at[46]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1631|   404k|    MULADD(at[29], at[45]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1632|   404k|    MULADD(at[30], at[44]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1633|   404k|    MULADD(at[31], at[43]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1634|   404k|    COMBA_STORE(C->dp[42]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
 1635|       |    /* 43 */
 1636|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1637|   404k|    MULADD(at[12], at[63]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1638|   404k|    MULADD(at[13], at[62]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1639|   404k|    MULADD(at[14], at[61]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1640|   404k|    MULADD(at[15], at[60]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1641|   404k|    MULADD(at[16], at[59]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1642|   404k|    MULADD(at[17], at[58]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1643|   404k|    MULADD(at[18], at[57]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1644|   404k|    MULADD(at[19], at[56]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1645|   404k|    MULADD(at[20], at[55]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1646|   404k|    MULADD(at[21], at[54]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1647|   404k|    MULADD(at[22], at[53]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1648|   404k|    MULADD(at[23], at[52]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1649|   404k|    MULADD(at[24], at[51]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1650|   404k|    MULADD(at[25], at[50]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1651|   404k|    MULADD(at[26], at[49]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1652|   404k|    MULADD(at[27], at[48]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1653|   404k|    MULADD(at[28], at[47]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1654|   404k|    MULADD(at[29], at[46]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1655|   404k|    MULADD(at[30], at[45]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1656|   404k|    MULADD(at[31], at[44]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1657|   404k|    COMBA_STORE(C->dp[43]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
 1658|       |    /* 44 */
 1659|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1660|   404k|    MULADD(at[13], at[63]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1661|   404k|    MULADD(at[14], at[62]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1662|   404k|    MULADD(at[15], at[61]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1663|   404k|    MULADD(at[16], at[60]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1664|   404k|    MULADD(at[17], at[59]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1665|   404k|    MULADD(at[18], at[58]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1666|   404k|    MULADD(at[19], at[57]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1667|   404k|    MULADD(at[20], at[56]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1668|   404k|    MULADD(at[21], at[55]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1669|   404k|    MULADD(at[22], at[54]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1670|   404k|    MULADD(at[23], at[53]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1671|   404k|    MULADD(at[24], at[52]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1672|   404k|    MULADD(at[25], at[51]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1673|   404k|    MULADD(at[26], at[50]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1674|   404k|    MULADD(at[27], at[49]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1675|   404k|    MULADD(at[28], at[48]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1676|   404k|    MULADD(at[29], at[47]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1677|   404k|    MULADD(at[30], at[46]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1678|   404k|    MULADD(at[31], at[45]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1679|   404k|    COMBA_STORE(C->dp[44]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
 1680|       |    /* 45 */
 1681|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1682|   404k|    MULADD(at[14], at[63]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1683|   404k|    MULADD(at[15], at[62]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1684|   404k|    MULADD(at[16], at[61]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1685|   404k|    MULADD(at[17], at[60]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1686|   404k|    MULADD(at[18], at[59]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1687|   404k|    MULADD(at[19], at[58]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1688|   404k|    MULADD(at[20], at[57]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1689|   404k|    MULADD(at[21], at[56]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1690|   404k|    MULADD(at[22], at[55]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1691|   404k|    MULADD(at[23], at[54]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1692|   404k|    MULADD(at[24], at[53]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1693|   404k|    MULADD(at[25], at[52]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1694|   404k|    MULADD(at[26], at[51]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1695|   404k|    MULADD(at[27], at[50]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1696|   404k|    MULADD(at[28], at[49]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1697|   404k|    MULADD(at[29], at[48]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1698|   404k|    MULADD(at[30], at[47]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1699|   404k|    MULADD(at[31], at[46]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1700|   404k|    COMBA_STORE(C->dp[45]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
 1701|       |    /* 46 */
 1702|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1703|   404k|    MULADD(at[15], at[63]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1704|   404k|    MULADD(at[16], at[62]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1705|   404k|    MULADD(at[17], at[61]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1706|   404k|    MULADD(at[18], at[60]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1707|   404k|    MULADD(at[19], at[59]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1708|   404k|    MULADD(at[20], at[58]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1709|   404k|    MULADD(at[21], at[57]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1710|   404k|    MULADD(at[22], at[56]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1711|   404k|    MULADD(at[23], at[55]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1712|   404k|    MULADD(at[24], at[54]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1713|   404k|    MULADD(at[25], at[53]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1714|   404k|    MULADD(at[26], at[52]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1715|   404k|    MULADD(at[27], at[51]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1716|   404k|    MULADD(at[28], at[50]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1717|   404k|    MULADD(at[29], at[49]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1718|   404k|    MULADD(at[30], at[48]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1719|   404k|    MULADD(at[31], at[47]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1720|   404k|    COMBA_STORE(C->dp[46]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
 1721|       |    /* 47 */
 1722|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1723|   404k|    MULADD(at[16], at[63]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1724|   404k|    MULADD(at[17], at[62]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1725|   404k|    MULADD(at[18], at[61]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1726|   404k|    MULADD(at[19], at[60]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1727|   404k|    MULADD(at[20], at[59]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1728|   404k|    MULADD(at[21], at[58]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1729|   404k|    MULADD(at[22], at[57]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1730|   404k|    MULADD(at[23], at[56]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1731|   404k|    MULADD(at[24], at[55]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1732|   404k|    MULADD(at[25], at[54]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1733|   404k|    MULADD(at[26], at[53]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1734|   404k|    MULADD(at[27], at[52]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1735|   404k|    MULADD(at[28], at[51]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1736|   404k|    MULADD(at[29], at[50]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1737|   404k|    MULADD(at[30], at[49]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1738|   404k|    MULADD(at[31], at[48]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1739|   404k|    COMBA_STORE(C->dp[47]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
 1740|       |    /* 48 */
 1741|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1742|   404k|    MULADD(at[17], at[63]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1743|   404k|    MULADD(at[18], at[62]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1744|   404k|    MULADD(at[19], at[61]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1745|   404k|    MULADD(at[20], at[60]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1746|   404k|    MULADD(at[21], at[59]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1747|   404k|    MULADD(at[22], at[58]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1748|   404k|    MULADD(at[23], at[57]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1749|   404k|    MULADD(at[24], at[56]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1750|   404k|    MULADD(at[25], at[55]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1751|   404k|    MULADD(at[26], at[54]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1752|   404k|    MULADD(at[27], at[53]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1753|   404k|    MULADD(at[28], at[52]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1754|   404k|    MULADD(at[29], at[51]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1755|   404k|    MULADD(at[30], at[50]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1756|   404k|    MULADD(at[31], at[49]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1757|   404k|    COMBA_STORE(C->dp[48]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
 1758|       |    /* 49 */
 1759|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1760|   404k|    MULADD(at[18], at[63]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1761|   404k|    MULADD(at[19], at[62]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1762|   404k|    MULADD(at[20], at[61]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1763|   404k|    MULADD(at[21], at[60]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1764|   404k|    MULADD(at[22], at[59]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1765|   404k|    MULADD(at[23], at[58]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1766|   404k|    MULADD(at[24], at[57]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1767|   404k|    MULADD(at[25], at[56]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1768|   404k|    MULADD(at[26], at[55]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1769|   404k|    MULADD(at[27], at[54]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1770|   404k|    MULADD(at[28], at[53]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1771|   404k|    MULADD(at[29], at[52]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1772|   404k|    MULADD(at[30], at[51]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1773|   404k|    MULADD(at[31], at[50]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1774|   404k|    COMBA_STORE(C->dp[49]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
 1775|       |    /* 50 */
 1776|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1777|   404k|    MULADD(at[19], at[63]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1778|   404k|    MULADD(at[20], at[62]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1779|   404k|    MULADD(at[21], at[61]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1780|   404k|    MULADD(at[22], at[60]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1781|   404k|    MULADD(at[23], at[59]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1782|   404k|    MULADD(at[24], at[58]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1783|   404k|    MULADD(at[25], at[57]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1784|   404k|    MULADD(at[26], at[56]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1785|   404k|    MULADD(at[27], at[55]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1786|   404k|    MULADD(at[28], at[54]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1787|   404k|    MULADD(at[29], at[53]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1788|   404k|    MULADD(at[30], at[52]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1789|   404k|    MULADD(at[31], at[51]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1790|   404k|    COMBA_STORE(C->dp[50]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
 1791|       |    /* 51 */
 1792|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1793|   404k|    MULADD(at[20], at[63]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1794|   404k|    MULADD(at[21], at[62]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1795|   404k|    MULADD(at[22], at[61]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1796|   404k|    MULADD(at[23], at[60]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1797|   404k|    MULADD(at[24], at[59]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1798|   404k|    MULADD(at[25], at[58]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1799|   404k|    MULADD(at[26], at[57]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1800|   404k|    MULADD(at[27], at[56]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1801|   404k|    MULADD(at[28], at[55]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1802|   404k|    MULADD(at[29], at[54]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1803|   404k|    MULADD(at[30], at[53]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1804|   404k|    MULADD(at[31], at[52]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1805|   404k|    COMBA_STORE(C->dp[51]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
 1806|       |    /* 52 */
 1807|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1808|   404k|    MULADD(at[21], at[63]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1809|   404k|    MULADD(at[22], at[62]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1810|   404k|    MULADD(at[23], at[61]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1811|   404k|    MULADD(at[24], at[60]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1812|   404k|    MULADD(at[25], at[59]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1813|   404k|    MULADD(at[26], at[58]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1814|   404k|    MULADD(at[27], at[57]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1815|   404k|    MULADD(at[28], at[56]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1816|   404k|    MULADD(at[29], at[55]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1817|   404k|    MULADD(at[30], at[54]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1818|   404k|    MULADD(at[31], at[53]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1819|   404k|    COMBA_STORE(C->dp[52]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
 1820|       |    /* 53 */
 1821|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1822|   404k|    MULADD(at[22], at[63]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1823|   404k|    MULADD(at[23], at[62]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1824|   404k|    MULADD(at[24], at[61]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1825|   404k|    MULADD(at[25], at[60]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1826|   404k|    MULADD(at[26], at[59]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1827|   404k|    MULADD(at[27], at[58]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1828|   404k|    MULADD(at[28], at[57]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1829|   404k|    MULADD(at[29], at[56]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1830|   404k|    MULADD(at[30], at[55]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1831|   404k|    MULADD(at[31], at[54]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1832|   404k|    COMBA_STORE(C->dp[53]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
 1833|       |    /* 54 */
 1834|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1835|   404k|    MULADD(at[23], at[63]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1836|   404k|    MULADD(at[24], at[62]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1837|   404k|    MULADD(at[25], at[61]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1838|   404k|    MULADD(at[26], at[60]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1839|   404k|    MULADD(at[27], at[59]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1840|   404k|    MULADD(at[28], at[58]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1841|   404k|    MULADD(at[29], at[57]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1842|   404k|    MULADD(at[30], at[56]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1843|   404k|    MULADD(at[31], at[55]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1844|   404k|    COMBA_STORE(C->dp[54]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
 1845|       |    /* 55 */
 1846|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1847|   404k|    MULADD(at[24], at[63]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1848|   404k|    MULADD(at[25], at[62]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1849|   404k|    MULADD(at[26], at[61]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1850|   404k|    MULADD(at[27], at[60]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1851|   404k|    MULADD(at[28], at[59]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1852|   404k|    MULADD(at[29], at[58]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1853|   404k|    MULADD(at[30], at[57]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1854|   404k|    MULADD(at[31], at[56]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1855|   404k|    COMBA_STORE(C->dp[55]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
 1856|       |    /* 56 */
 1857|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1858|   404k|    MULADD(at[25], at[63]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1859|   404k|    MULADD(at[26], at[62]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1860|   404k|    MULADD(at[27], at[61]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1861|   404k|    MULADD(at[28], at[60]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1862|   404k|    MULADD(at[29], at[59]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1863|   404k|    MULADD(at[30], at[58]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1864|   404k|    MULADD(at[31], at[57]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1865|   404k|    COMBA_STORE(C->dp[56]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
 1866|       |    /* 57 */
 1867|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1868|   404k|    MULADD(at[26], at[63]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1869|   404k|    MULADD(at[27], at[62]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1870|   404k|    MULADD(at[28], at[61]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1871|   404k|    MULADD(at[29], at[60]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1872|   404k|    MULADD(at[30], at[59]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1873|   404k|    MULADD(at[31], at[58]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1874|   404k|    COMBA_STORE(C->dp[57]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
 1875|       |    /* 58 */
 1876|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1877|   404k|    MULADD(at[27], at[63]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1878|   404k|    MULADD(at[28], at[62]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1879|   404k|    MULADD(at[29], at[61]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1880|   404k|    MULADD(at[30], at[60]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1881|   404k|    MULADD(at[31], at[59]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1882|   404k|    COMBA_STORE(C->dp[58]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
 1883|       |    /* 59 */
 1884|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1885|   404k|    MULADD(at[28], at[63]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1886|   404k|    MULADD(at[29], at[62]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1887|   404k|    MULADD(at[30], at[61]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1888|   404k|    MULADD(at[31], at[60]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1889|   404k|    COMBA_STORE(C->dp[59]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
 1890|       |    /* 60 */
 1891|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1892|   404k|    MULADD(at[29], at[63]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1893|   404k|    MULADD(at[30], at[62]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1894|   404k|    MULADD(at[31], at[61]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1895|   404k|    COMBA_STORE(C->dp[60]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
 1896|       |    /* 61 */
 1897|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1898|   404k|    MULADD(at[30], at[63]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1899|   404k|    MULADD(at[31], at[62]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1900|   404k|    COMBA_STORE(C->dp[61]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
 1901|       |    /* 62 */
 1902|   404k|    COMBA_FORWARD;
  ------------------
  |  |   41|   404k|    do {              \
  |  |   42|   404k|        c0 = c1;      \
  |  |   43|   404k|        c1 = c2;      \
  |  |   44|   404k|        c2 = 0;       \
  |  |   45|   404k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (45:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1903|   404k|    MULADD(at[31], at[63]);
  ------------------
  |  |   52|   404k|    __asm__(                                        \
  |  |   53|   404k|        "movq  %6,%%rax     \n\t"                   \
  |  |   54|   404k|        "mulq  %7           \n\t"                   \
  |  |   55|   404k|        "addq  %%rax,%0     \n\t"                   \
  |  |   56|   404k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   57|   404k|        "adcq  $0,%2        \n\t"                   \
  |  |   58|   404k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |   59|   404k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |   60|   404k|        : "%rax", "%rdx", "cc");
  ------------------
 1904|   404k|    COMBA_STORE(C->dp[62]);
  ------------------
  |  |   67|   404k|    x = c0;
  ------------------
 1905|   404k|    COMBA_STORE2(C->dp[63]);
  ------------------
  |  |   70|   404k|    x = c1;
  ------------------
 1906|   404k|    C->used = 64;
 1907|   404k|    C->sign = A->sign ^ B->sign;
 1908|   404k|    mp_clamp(C);
  ------------------
  |  |   26|   404k|    {                                                    \
  |  |   27|   404k|        while ((a)->used && (a)->dp[(a)->used - 1] == 0) \
  |  |  ------------------
  |  |  |  Branch (27:16): [True: 404k, False: 0]
  |  |  |  Branch (27:29): [True: 532, False: 404k]
  |  |  ------------------
  |  |   28|   404k|            --((a)->used);                               \
  |  |   29|   404k|        (a)->sign = (a)->used ? (a)->sign : ZPOS;        \
  |  |  ------------------
  |  |  |  |  326|      0|#define ZPOS MP_ZPOS
  |  |  |  |  ------------------
  |  |  |  |  |  |   37|   404k|#define MP_ZPOS 0
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (29:21): [True: 404k, False: 0]
  |  |  ------------------
  |  |   30|   404k|    }
  ------------------
 1909|   404k|    COMBA_FINI;
 1910|   404k|}
s_mp_sqr_comba_4:
 1914|    293|{
 1915|    293|    mp_digit *a, b[8], c0, c1, c2;
 1916|       |
 1917|    293|    a = A->dp;
 1918|    293|    COMBA_START;
 1919|       |
 1920|       |    /* clear carries */
 1921|    293|    CLEAR_CARRY;
  ------------------
  |  |   64|    293|    c0 = c1 = c2 = 0;
  ------------------
 1922|       |
 1923|       |    /* output 0 */
 1924|    293|    SQRADD(a[0], a[0]);
  ------------------
  |  |   82|    293|    __asm__(                                \
  |  |   83|    293|        "movq  %6,%%rax     \n\t"           \
  |  |   84|    293|        "mulq  %%rax        \n\t"           \
  |  |   85|    293|        "addq  %%rax,%0     \n\t"           \
  |  |   86|    293|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|    293|        "adcq  $0,%2        \n\t"           \
  |  |   88|    293|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|    293|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|    293|        : "%rax", "%rdx", "cc");
  ------------------
 1925|    293|    COMBA_STORE(b[0]);
  ------------------
  |  |   67|    293|    x = c0;
  ------------------
 1926|       |
 1927|       |    /* output 1 */
 1928|    293|    CARRY_FORWARD;
  ------------------
  |  |   73|    293|    do {              \
  |  |   74|    293|        c0 = c1;      \
  |  |   75|    293|        c1 = c2;      \
  |  |   76|    293|        c2 = 0;       \
  |  |   77|    293|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1929|    293|    SQRADD2(a[0], a[1]);
  ------------------
  |  |   93|    293|    __asm__(                                        \
  |  |   94|    293|        "movq  %6,%%rax     \n\t"                   \
  |  |   95|    293|        "mulq  %7           \n\t"                   \
  |  |   96|    293|        "addq  %%rax,%0     \n\t"                   \
  |  |   97|    293|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   98|    293|        "adcq  $0,%2        \n\t"                   \
  |  |   99|    293|        "addq  %%rax,%0     \n\t"                   \
  |  |  100|    293|        "adcq  %%rdx,%1     \n\t"                   \
  |  |  101|    293|        "adcq  $0,%2        \n\t"                   \
  |  |  102|    293|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |  103|    293|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |  104|    293|        : "%rax", "%rdx", "cc");
  ------------------
 1930|    293|    COMBA_STORE(b[1]);
  ------------------
  |  |   67|    293|    x = c0;
  ------------------
 1931|       |
 1932|       |    /* output 2 */
 1933|    293|    CARRY_FORWARD;
  ------------------
  |  |   73|    293|    do {              \
  |  |   74|    293|        c0 = c1;      \
  |  |   75|    293|        c1 = c2;      \
  |  |   76|    293|        c2 = 0;       \
  |  |   77|    293|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1934|    293|    SQRADD2(a[0], a[2]);
  ------------------
  |  |   93|    293|    __asm__(                                        \
  |  |   94|    293|        "movq  %6,%%rax     \n\t"                   \
  |  |   95|    293|        "mulq  %7           \n\t"                   \
  |  |   96|    293|        "addq  %%rax,%0     \n\t"                   \
  |  |   97|    293|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   98|    293|        "adcq  $0,%2        \n\t"                   \
  |  |   99|    293|        "addq  %%rax,%0     \n\t"                   \
  |  |  100|    293|        "adcq  %%rdx,%1     \n\t"                   \
  |  |  101|    293|        "adcq  $0,%2        \n\t"                   \
  |  |  102|    293|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |  103|    293|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |  104|    293|        : "%rax", "%rdx", "cc");
  ------------------
 1935|    293|    SQRADD(a[1], a[1]);
  ------------------
  |  |   82|    293|    __asm__(                                \
  |  |   83|    293|        "movq  %6,%%rax     \n\t"           \
  |  |   84|    293|        "mulq  %%rax        \n\t"           \
  |  |   85|    293|        "addq  %%rax,%0     \n\t"           \
  |  |   86|    293|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|    293|        "adcq  $0,%2        \n\t"           \
  |  |   88|    293|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|    293|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|    293|        : "%rax", "%rdx", "cc");
  ------------------
 1936|    293|    COMBA_STORE(b[2]);
  ------------------
  |  |   67|    293|    x = c0;
  ------------------
 1937|       |
 1938|       |    /* output 3 */
 1939|    293|    CARRY_FORWARD;
  ------------------
  |  |   73|    293|    do {              \
  |  |   74|    293|        c0 = c1;      \
  |  |   75|    293|        c1 = c2;      \
  |  |   76|    293|        c2 = 0;       \
  |  |   77|    293|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1940|    293|    SQRADD2(a[0], a[3]);
  ------------------
  |  |   93|    293|    __asm__(                                        \
  |  |   94|    293|        "movq  %6,%%rax     \n\t"                   \
  |  |   95|    293|        "mulq  %7           \n\t"                   \
  |  |   96|    293|        "addq  %%rax,%0     \n\t"                   \
  |  |   97|    293|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   98|    293|        "adcq  $0,%2        \n\t"                   \
  |  |   99|    293|        "addq  %%rax,%0     \n\t"                   \
  |  |  100|    293|        "adcq  %%rdx,%1     \n\t"                   \
  |  |  101|    293|        "adcq  $0,%2        \n\t"                   \
  |  |  102|    293|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |  103|    293|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |  104|    293|        : "%rax", "%rdx", "cc");
  ------------------
 1941|    293|    SQRADD2(a[1], a[2]);
  ------------------
  |  |   93|    293|    __asm__(                                        \
  |  |   94|    293|        "movq  %6,%%rax     \n\t"                   \
  |  |   95|    293|        "mulq  %7           \n\t"                   \
  |  |   96|    293|        "addq  %%rax,%0     \n\t"                   \
  |  |   97|    293|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   98|    293|        "adcq  $0,%2        \n\t"                   \
  |  |   99|    293|        "addq  %%rax,%0     \n\t"                   \
  |  |  100|    293|        "adcq  %%rdx,%1     \n\t"                   \
  |  |  101|    293|        "adcq  $0,%2        \n\t"                   \
  |  |  102|    293|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |  103|    293|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |  104|    293|        : "%rax", "%rdx", "cc");
  ------------------
 1942|    293|    COMBA_STORE(b[3]);
  ------------------
  |  |   67|    293|    x = c0;
  ------------------
 1943|       |
 1944|       |    /* output 4 */
 1945|    293|    CARRY_FORWARD;
  ------------------
  |  |   73|    293|    do {              \
  |  |   74|    293|        c0 = c1;      \
  |  |   75|    293|        c1 = c2;      \
  |  |   76|    293|        c2 = 0;       \
  |  |   77|    293|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1946|    293|    SQRADD2(a[1], a[3]);
  ------------------
  |  |   93|    293|    __asm__(                                        \
  |  |   94|    293|        "movq  %6,%%rax     \n\t"                   \
  |  |   95|    293|        "mulq  %7           \n\t"                   \
  |  |   96|    293|        "addq  %%rax,%0     \n\t"                   \
  |  |   97|    293|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   98|    293|        "adcq  $0,%2        \n\t"                   \
  |  |   99|    293|        "addq  %%rax,%0     \n\t"                   \
  |  |  100|    293|        "adcq  %%rdx,%1     \n\t"                   \
  |  |  101|    293|        "adcq  $0,%2        \n\t"                   \
  |  |  102|    293|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |  103|    293|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |  104|    293|        : "%rax", "%rdx", "cc");
  ------------------
 1947|    293|    SQRADD(a[2], a[2]);
  ------------------
  |  |   82|    293|    __asm__(                                \
  |  |   83|    293|        "movq  %6,%%rax     \n\t"           \
  |  |   84|    293|        "mulq  %%rax        \n\t"           \
  |  |   85|    293|        "addq  %%rax,%0     \n\t"           \
  |  |   86|    293|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|    293|        "adcq  $0,%2        \n\t"           \
  |  |   88|    293|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|    293|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|    293|        : "%rax", "%rdx", "cc");
  ------------------
 1948|    293|    COMBA_STORE(b[4]);
  ------------------
  |  |   67|    293|    x = c0;
  ------------------
 1949|       |
 1950|       |    /* output 5 */
 1951|    293|    CARRY_FORWARD;
  ------------------
  |  |   73|    293|    do {              \
  |  |   74|    293|        c0 = c1;      \
  |  |   75|    293|        c1 = c2;      \
  |  |   76|    293|        c2 = 0;       \
  |  |   77|    293|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1952|    293|    SQRADD2(a[2], a[3]);
  ------------------
  |  |   93|    293|    __asm__(                                        \
  |  |   94|    293|        "movq  %6,%%rax     \n\t"                   \
  |  |   95|    293|        "mulq  %7           \n\t"                   \
  |  |   96|    293|        "addq  %%rax,%0     \n\t"                   \
  |  |   97|    293|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   98|    293|        "adcq  $0,%2        \n\t"                   \
  |  |   99|    293|        "addq  %%rax,%0     \n\t"                   \
  |  |  100|    293|        "adcq  %%rdx,%1     \n\t"                   \
  |  |  101|    293|        "adcq  $0,%2        \n\t"                   \
  |  |  102|    293|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |  103|    293|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |  104|    293|        : "%rax", "%rdx", "cc");
  ------------------
 1953|    293|    COMBA_STORE(b[5]);
  ------------------
  |  |   67|    293|    x = c0;
  ------------------
 1954|       |
 1955|       |    /* output 6 */
 1956|    293|    CARRY_FORWARD;
  ------------------
  |  |   73|    293|    do {              \
  |  |   74|    293|        c0 = c1;      \
  |  |   75|    293|        c1 = c2;      \
  |  |   76|    293|        c2 = 0;       \
  |  |   77|    293|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1957|    293|    SQRADD(a[3], a[3]);
  ------------------
  |  |   82|    293|    __asm__(                                \
  |  |   83|    293|        "movq  %6,%%rax     \n\t"           \
  |  |   84|    293|        "mulq  %%rax        \n\t"           \
  |  |   85|    293|        "addq  %%rax,%0     \n\t"           \
  |  |   86|    293|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|    293|        "adcq  $0,%2        \n\t"           \
  |  |   88|    293|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|    293|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|    293|        : "%rax", "%rdx", "cc");
  ------------------
 1958|    293|    COMBA_STORE(b[6]);
  ------------------
  |  |   67|    293|    x = c0;
  ------------------
 1959|    293|    COMBA_STORE2(b[7]);
  ------------------
  |  |   70|    293|    x = c1;
  ------------------
 1960|    293|    COMBA_FINI;
 1961|       |
 1962|    293|    B->used = 8;
 1963|    293|    B->sign = ZPOS;
  ------------------
  |  |  326|    293|#define ZPOS MP_ZPOS
  |  |  ------------------
  |  |  |  |   37|    293|#define MP_ZPOS 0
  |  |  ------------------
  ------------------
 1964|    293|    memcpy(B->dp, b, 8 * sizeof(mp_digit));
 1965|    293|    mp_clamp(B);
  ------------------
  |  |   26|    293|    {                                                    \
  |  |   27|    410|        while ((a)->used && (a)->dp[(a)->used - 1] == 0) \
  |  |  ------------------
  |  |  |  Branch (27:16): [True: 410, False: 0]
  |  |  |  Branch (27:29): [True: 117, False: 293]
  |  |  ------------------
  |  |   28|    293|            --((a)->used);                               \
  |  |   29|    293|        (a)->sign = (a)->used ? (a)->sign : ZPOS;        \
  |  |  ------------------
  |  |  |  |  326|      0|#define ZPOS MP_ZPOS
  |  |  |  |  ------------------
  |  |  |  |  |  |   37|    293|#define MP_ZPOS 0
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (29:21): [True: 293, False: 0]
  |  |  ------------------
  |  |   30|    293|    }
  ------------------
 1966|    293|}
s_mp_sqr_comba_8:
 1970|    414|{
 1971|    414|    mp_digit *a, b[16], c0, c1, c2, sc0, sc1, sc2;
 1972|       |
 1973|    414|    a = A->dp;
 1974|    414|    COMBA_START;
 1975|       |
 1976|       |    /* clear carries */
 1977|    414|    CLEAR_CARRY;
  ------------------
  |  |   64|    414|    c0 = c1 = c2 = 0;
  ------------------
 1978|       |
 1979|       |    /* output 0 */
 1980|    414|    SQRADD(a[0], a[0]);
  ------------------
  |  |   82|    414|    __asm__(                                \
  |  |   83|    414|        "movq  %6,%%rax     \n\t"           \
  |  |   84|    414|        "mulq  %%rax        \n\t"           \
  |  |   85|    414|        "addq  %%rax,%0     \n\t"           \
  |  |   86|    414|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|    414|        "adcq  $0,%2        \n\t"           \
  |  |   88|    414|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|    414|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|    414|        : "%rax", "%rdx", "cc");
  ------------------
 1981|    414|    COMBA_STORE(b[0]);
  ------------------
  |  |   67|    414|    x = c0;
  ------------------
 1982|       |
 1983|       |    /* output 1 */
 1984|    414|    CARRY_FORWARD;
  ------------------
  |  |   73|    414|    do {              \
  |  |   74|    414|        c0 = c1;      \
  |  |   75|    414|        c1 = c2;      \
  |  |   76|    414|        c2 = 0;       \
  |  |   77|    414|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1985|    414|    SQRADD2(a[0], a[1]);
  ------------------
  |  |   93|    414|    __asm__(                                        \
  |  |   94|    414|        "movq  %6,%%rax     \n\t"                   \
  |  |   95|    414|        "mulq  %7           \n\t"                   \
  |  |   96|    414|        "addq  %%rax,%0     \n\t"                   \
  |  |   97|    414|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   98|    414|        "adcq  $0,%2        \n\t"                   \
  |  |   99|    414|        "addq  %%rax,%0     \n\t"                   \
  |  |  100|    414|        "adcq  %%rdx,%1     \n\t"                   \
  |  |  101|    414|        "adcq  $0,%2        \n\t"                   \
  |  |  102|    414|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |  103|    414|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |  104|    414|        : "%rax", "%rdx", "cc");
  ------------------
 1986|    414|    COMBA_STORE(b[1]);
  ------------------
  |  |   67|    414|    x = c0;
  ------------------
 1987|       |
 1988|       |    /* output 2 */
 1989|    414|    CARRY_FORWARD;
  ------------------
  |  |   73|    414|    do {              \
  |  |   74|    414|        c0 = c1;      \
  |  |   75|    414|        c1 = c2;      \
  |  |   76|    414|        c2 = 0;       \
  |  |   77|    414|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1990|    414|    SQRADD2(a[0], a[2]);
  ------------------
  |  |   93|    414|    __asm__(                                        \
  |  |   94|    414|        "movq  %6,%%rax     \n\t"                   \
  |  |   95|    414|        "mulq  %7           \n\t"                   \
  |  |   96|    414|        "addq  %%rax,%0     \n\t"                   \
  |  |   97|    414|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   98|    414|        "adcq  $0,%2        \n\t"                   \
  |  |   99|    414|        "addq  %%rax,%0     \n\t"                   \
  |  |  100|    414|        "adcq  %%rdx,%1     \n\t"                   \
  |  |  101|    414|        "adcq  $0,%2        \n\t"                   \
  |  |  102|    414|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |  103|    414|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |  104|    414|        : "%rax", "%rdx", "cc");
  ------------------
 1991|    414|    SQRADD(a[1], a[1]);
  ------------------
  |  |   82|    414|    __asm__(                                \
  |  |   83|    414|        "movq  %6,%%rax     \n\t"           \
  |  |   84|    414|        "mulq  %%rax        \n\t"           \
  |  |   85|    414|        "addq  %%rax,%0     \n\t"           \
  |  |   86|    414|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|    414|        "adcq  $0,%2        \n\t"           \
  |  |   88|    414|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|    414|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|    414|        : "%rax", "%rdx", "cc");
  ------------------
 1992|    414|    COMBA_STORE(b[2]);
  ------------------
  |  |   67|    414|    x = c0;
  ------------------
 1993|       |
 1994|       |    /* output 3 */
 1995|    414|    CARRY_FORWARD;
  ------------------
  |  |   73|    414|    do {              \
  |  |   74|    414|        c0 = c1;      \
  |  |   75|    414|        c1 = c2;      \
  |  |   76|    414|        c2 = 0;       \
  |  |   77|    414|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1996|    414|    SQRADD2(a[0], a[3]);
  ------------------
  |  |   93|    414|    __asm__(                                        \
  |  |   94|    414|        "movq  %6,%%rax     \n\t"                   \
  |  |   95|    414|        "mulq  %7           \n\t"                   \
  |  |   96|    414|        "addq  %%rax,%0     \n\t"                   \
  |  |   97|    414|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   98|    414|        "adcq  $0,%2        \n\t"                   \
  |  |   99|    414|        "addq  %%rax,%0     \n\t"                   \
  |  |  100|    414|        "adcq  %%rdx,%1     \n\t"                   \
  |  |  101|    414|        "adcq  $0,%2        \n\t"                   \
  |  |  102|    414|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |  103|    414|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |  104|    414|        : "%rax", "%rdx", "cc");
  ------------------
 1997|    414|    SQRADD2(a[1], a[2]);
  ------------------
  |  |   93|    414|    __asm__(                                        \
  |  |   94|    414|        "movq  %6,%%rax     \n\t"                   \
  |  |   95|    414|        "mulq  %7           \n\t"                   \
  |  |   96|    414|        "addq  %%rax,%0     \n\t"                   \
  |  |   97|    414|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   98|    414|        "adcq  $0,%2        \n\t"                   \
  |  |   99|    414|        "addq  %%rax,%0     \n\t"                   \
  |  |  100|    414|        "adcq  %%rdx,%1     \n\t"                   \
  |  |  101|    414|        "adcq  $0,%2        \n\t"                   \
  |  |  102|    414|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |  103|    414|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |  104|    414|        : "%rax", "%rdx", "cc");
  ------------------
 1998|    414|    COMBA_STORE(b[3]);
  ------------------
  |  |   67|    414|    x = c0;
  ------------------
 1999|       |
 2000|       |    /* output 4 */
 2001|    414|    CARRY_FORWARD;
  ------------------
  |  |   73|    414|    do {              \
  |  |   74|    414|        c0 = c1;      \
  |  |   75|    414|        c1 = c2;      \
  |  |   76|    414|        c2 = 0;       \
  |  |   77|    414|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2002|    414|    SQRADD2(a[0], a[4]);
  ------------------
  |  |   93|    414|    __asm__(                                        \
  |  |   94|    414|        "movq  %6,%%rax     \n\t"                   \
  |  |   95|    414|        "mulq  %7           \n\t"                   \
  |  |   96|    414|        "addq  %%rax,%0     \n\t"                   \
  |  |   97|    414|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   98|    414|        "adcq  $0,%2        \n\t"                   \
  |  |   99|    414|        "addq  %%rax,%0     \n\t"                   \
  |  |  100|    414|        "adcq  %%rdx,%1     \n\t"                   \
  |  |  101|    414|        "adcq  $0,%2        \n\t"                   \
  |  |  102|    414|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |  103|    414|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |  104|    414|        : "%rax", "%rdx", "cc");
  ------------------
 2003|    414|    SQRADD2(a[1], a[3]);
  ------------------
  |  |   93|    414|    __asm__(                                        \
  |  |   94|    414|        "movq  %6,%%rax     \n\t"                   \
  |  |   95|    414|        "mulq  %7           \n\t"                   \
  |  |   96|    414|        "addq  %%rax,%0     \n\t"                   \
  |  |   97|    414|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   98|    414|        "adcq  $0,%2        \n\t"                   \
  |  |   99|    414|        "addq  %%rax,%0     \n\t"                   \
  |  |  100|    414|        "adcq  %%rdx,%1     \n\t"                   \
  |  |  101|    414|        "adcq  $0,%2        \n\t"                   \
  |  |  102|    414|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |  103|    414|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |  104|    414|        : "%rax", "%rdx", "cc");
  ------------------
 2004|    414|    SQRADD(a[2], a[2]);
  ------------------
  |  |   82|    414|    __asm__(                                \
  |  |   83|    414|        "movq  %6,%%rax     \n\t"           \
  |  |   84|    414|        "mulq  %%rax        \n\t"           \
  |  |   85|    414|        "addq  %%rax,%0     \n\t"           \
  |  |   86|    414|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|    414|        "adcq  $0,%2        \n\t"           \
  |  |   88|    414|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|    414|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|    414|        : "%rax", "%rdx", "cc");
  ------------------
 2005|    414|    COMBA_STORE(b[4]);
  ------------------
  |  |   67|    414|    x = c0;
  ------------------
 2006|       |
 2007|       |    /* output 5 */
 2008|    414|    CARRY_FORWARD;
  ------------------
  |  |   73|    414|    do {              \
  |  |   74|    414|        c0 = c1;      \
  |  |   75|    414|        c1 = c2;      \
  |  |   76|    414|        c2 = 0;       \
  |  |   77|    414|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2009|    414|    SQRADDSC(a[0], a[5]);
  ------------------
  |  |  107|    414|    __asm__(                              \
  |  |  108|    414|        "movq  %3,%%rax     \n\t"         \
  |  |  109|    414|        "mulq  %4           \n\t"         \
  |  |  110|    414|        "movq  %%rax,%0     \n\t"         \
  |  |  111|    414|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|    414|        "xorq  %2,%2        \n\t"         \
  |  |  113|    414|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|    414|        : "g"(i), "g"(j)                  \
  |  |  115|    414|        : "%rax", "%rdx", "cc");
  ------------------
 2010|    414|    SQRADDAC(a[1], a[4]);
  ------------------
  |  |  118|    414|    __asm__(                                           \
  |  |  119|    414|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|    414|        "mulq  %7           \n\t"                      \
  |  |  121|    414|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|    414|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|    414|        "adcq  $0,%2        \n\t"                      \
  |  |  124|    414|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|    414|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|    414|        : "%rax", "%rdx", "cc");
  ------------------
 2011|    414|    SQRADDAC(a[2], a[3]);
  ------------------
  |  |  118|    414|    __asm__(                                           \
  |  |  119|    414|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|    414|        "mulq  %7           \n\t"                      \
  |  |  121|    414|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|    414|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|    414|        "adcq  $0,%2        \n\t"                      \
  |  |  124|    414|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|    414|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|    414|        : "%rax", "%rdx", "cc");
  ------------------
 2012|    414|    SQRADDDB;
  ------------------
  |  |  129|    414|    __asm__(                                                      \
  |  |  130|    414|        "addq %6,%0         \n\t"                                 \
  |  |  131|    414|        "adcq %7,%1         \n\t"                                 \
  |  |  132|    414|        "adcq %8,%2         \n\t"                                 \
  |  |  133|    414|        "addq %6,%0         \n\t"                                 \
  |  |  134|    414|        "adcq %7,%1         \n\t"                                 \
  |  |  135|    414|        "adcq %8,%2         \n\t"                                 \
  |  |  136|    414|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|    414|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|    414|        : "cc");
  ------------------
 2013|    414|    COMBA_STORE(b[5]);
  ------------------
  |  |   67|    414|    x = c0;
  ------------------
 2014|       |
 2015|       |    /* output 6 */
 2016|    414|    CARRY_FORWARD;
  ------------------
  |  |   73|    414|    do {              \
  |  |   74|    414|        c0 = c1;      \
  |  |   75|    414|        c1 = c2;      \
  |  |   76|    414|        c2 = 0;       \
  |  |   77|    414|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2017|    414|    SQRADDSC(a[0], a[6]);
  ------------------
  |  |  107|    414|    __asm__(                              \
  |  |  108|    414|        "movq  %3,%%rax     \n\t"         \
  |  |  109|    414|        "mulq  %4           \n\t"         \
  |  |  110|    414|        "movq  %%rax,%0     \n\t"         \
  |  |  111|    414|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|    414|        "xorq  %2,%2        \n\t"         \
  |  |  113|    414|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|    414|        : "g"(i), "g"(j)                  \
  |  |  115|    414|        : "%rax", "%rdx", "cc");
  ------------------
 2018|    414|    SQRADDAC(a[1], a[5]);
  ------------------
  |  |  118|    414|    __asm__(                                           \
  |  |  119|    414|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|    414|        "mulq  %7           \n\t"                      \
  |  |  121|    414|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|    414|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|    414|        "adcq  $0,%2        \n\t"                      \
  |  |  124|    414|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|    414|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|    414|        : "%rax", "%rdx", "cc");
  ------------------
 2019|    414|    SQRADDAC(a[2], a[4]);
  ------------------
  |  |  118|    414|    __asm__(                                           \
  |  |  119|    414|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|    414|        "mulq  %7           \n\t"                      \
  |  |  121|    414|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|    414|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|    414|        "adcq  $0,%2        \n\t"                      \
  |  |  124|    414|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|    414|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|    414|        : "%rax", "%rdx", "cc");
  ------------------
 2020|    414|    SQRADDDB;
  ------------------
  |  |  129|    414|    __asm__(                                                      \
  |  |  130|    414|        "addq %6,%0         \n\t"                                 \
  |  |  131|    414|        "adcq %7,%1         \n\t"                                 \
  |  |  132|    414|        "adcq %8,%2         \n\t"                                 \
  |  |  133|    414|        "addq %6,%0         \n\t"                                 \
  |  |  134|    414|        "adcq %7,%1         \n\t"                                 \
  |  |  135|    414|        "adcq %8,%2         \n\t"                                 \
  |  |  136|    414|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|    414|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|    414|        : "cc");
  ------------------
 2021|    414|    SQRADD(a[3], a[3]);
  ------------------
  |  |   82|    414|    __asm__(                                \
  |  |   83|    414|        "movq  %6,%%rax     \n\t"           \
  |  |   84|    414|        "mulq  %%rax        \n\t"           \
  |  |   85|    414|        "addq  %%rax,%0     \n\t"           \
  |  |   86|    414|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|    414|        "adcq  $0,%2        \n\t"           \
  |  |   88|    414|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|    414|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|    414|        : "%rax", "%rdx", "cc");
  ------------------
 2022|    414|    COMBA_STORE(b[6]);
  ------------------
  |  |   67|    414|    x = c0;
  ------------------
 2023|       |
 2024|       |    /* output 7 */
 2025|    414|    CARRY_FORWARD;
  ------------------
  |  |   73|    414|    do {              \
  |  |   74|    414|        c0 = c1;      \
  |  |   75|    414|        c1 = c2;      \
  |  |   76|    414|        c2 = 0;       \
  |  |   77|    414|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2026|    414|    SQRADDSC(a[0], a[7]);
  ------------------
  |  |  107|    414|    __asm__(                              \
  |  |  108|    414|        "movq  %3,%%rax     \n\t"         \
  |  |  109|    414|        "mulq  %4           \n\t"         \
  |  |  110|    414|        "movq  %%rax,%0     \n\t"         \
  |  |  111|    414|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|    414|        "xorq  %2,%2        \n\t"         \
  |  |  113|    414|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|    414|        : "g"(i), "g"(j)                  \
  |  |  115|    414|        : "%rax", "%rdx", "cc");
  ------------------
 2027|    414|    SQRADDAC(a[1], a[6]);
  ------------------
  |  |  118|    414|    __asm__(                                           \
  |  |  119|    414|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|    414|        "mulq  %7           \n\t"                      \
  |  |  121|    414|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|    414|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|    414|        "adcq  $0,%2        \n\t"                      \
  |  |  124|    414|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|    414|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|    414|        : "%rax", "%rdx", "cc");
  ------------------
 2028|    414|    SQRADDAC(a[2], a[5]);
  ------------------
  |  |  118|    414|    __asm__(                                           \
  |  |  119|    414|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|    414|        "mulq  %7           \n\t"                      \
  |  |  121|    414|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|    414|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|    414|        "adcq  $0,%2        \n\t"                      \
  |  |  124|    414|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|    414|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|    414|        : "%rax", "%rdx", "cc");
  ------------------
 2029|    414|    SQRADDAC(a[3], a[4]);
  ------------------
  |  |  118|    414|    __asm__(                                           \
  |  |  119|    414|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|    414|        "mulq  %7           \n\t"                      \
  |  |  121|    414|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|    414|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|    414|        "adcq  $0,%2        \n\t"                      \
  |  |  124|    414|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|    414|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|    414|        : "%rax", "%rdx", "cc");
  ------------------
 2030|    414|    SQRADDDB;
  ------------------
  |  |  129|    414|    __asm__(                                                      \
  |  |  130|    414|        "addq %6,%0         \n\t"                                 \
  |  |  131|    414|        "adcq %7,%1         \n\t"                                 \
  |  |  132|    414|        "adcq %8,%2         \n\t"                                 \
  |  |  133|    414|        "addq %6,%0         \n\t"                                 \
  |  |  134|    414|        "adcq %7,%1         \n\t"                                 \
  |  |  135|    414|        "adcq %8,%2         \n\t"                                 \
  |  |  136|    414|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|    414|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|    414|        : "cc");
  ------------------
 2031|    414|    COMBA_STORE(b[7]);
  ------------------
  |  |   67|    414|    x = c0;
  ------------------
 2032|       |
 2033|       |    /* output 8 */
 2034|    414|    CARRY_FORWARD;
  ------------------
  |  |   73|    414|    do {              \
  |  |   74|    414|        c0 = c1;      \
  |  |   75|    414|        c1 = c2;      \
  |  |   76|    414|        c2 = 0;       \
  |  |   77|    414|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2035|    414|    SQRADDSC(a[1], a[7]);
  ------------------
  |  |  107|    414|    __asm__(                              \
  |  |  108|    414|        "movq  %3,%%rax     \n\t"         \
  |  |  109|    414|        "mulq  %4           \n\t"         \
  |  |  110|    414|        "movq  %%rax,%0     \n\t"         \
  |  |  111|    414|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|    414|        "xorq  %2,%2        \n\t"         \
  |  |  113|    414|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|    414|        : "g"(i), "g"(j)                  \
  |  |  115|    414|        : "%rax", "%rdx", "cc");
  ------------------
 2036|    414|    SQRADDAC(a[2], a[6]);
  ------------------
  |  |  118|    414|    __asm__(                                           \
  |  |  119|    414|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|    414|        "mulq  %7           \n\t"                      \
  |  |  121|    414|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|    414|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|    414|        "adcq  $0,%2        \n\t"                      \
  |  |  124|    414|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|    414|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|    414|        : "%rax", "%rdx", "cc");
  ------------------
 2037|    414|    SQRADDAC(a[3], a[5]);
  ------------------
  |  |  118|    414|    __asm__(                                           \
  |  |  119|    414|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|    414|        "mulq  %7           \n\t"                      \
  |  |  121|    414|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|    414|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|    414|        "adcq  $0,%2        \n\t"                      \
  |  |  124|    414|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|    414|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|    414|        : "%rax", "%rdx", "cc");
  ------------------
 2038|    414|    SQRADDDB;
  ------------------
  |  |  129|    414|    __asm__(                                                      \
  |  |  130|    414|        "addq %6,%0         \n\t"                                 \
  |  |  131|    414|        "adcq %7,%1         \n\t"                                 \
  |  |  132|    414|        "adcq %8,%2         \n\t"                                 \
  |  |  133|    414|        "addq %6,%0         \n\t"                                 \
  |  |  134|    414|        "adcq %7,%1         \n\t"                                 \
  |  |  135|    414|        "adcq %8,%2         \n\t"                                 \
  |  |  136|    414|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|    414|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|    414|        : "cc");
  ------------------
 2039|    414|    SQRADD(a[4], a[4]);
  ------------------
  |  |   82|    414|    __asm__(                                \
  |  |   83|    414|        "movq  %6,%%rax     \n\t"           \
  |  |   84|    414|        "mulq  %%rax        \n\t"           \
  |  |   85|    414|        "addq  %%rax,%0     \n\t"           \
  |  |   86|    414|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|    414|        "adcq  $0,%2        \n\t"           \
  |  |   88|    414|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|    414|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|    414|        : "%rax", "%rdx", "cc");
  ------------------
 2040|    414|    COMBA_STORE(b[8]);
  ------------------
  |  |   67|    414|    x = c0;
  ------------------
 2041|       |
 2042|       |    /* output 9 */
 2043|    414|    CARRY_FORWARD;
  ------------------
  |  |   73|    414|    do {              \
  |  |   74|    414|        c0 = c1;      \
  |  |   75|    414|        c1 = c2;      \
  |  |   76|    414|        c2 = 0;       \
  |  |   77|    414|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2044|    414|    SQRADDSC(a[2], a[7]);
  ------------------
  |  |  107|    414|    __asm__(                              \
  |  |  108|    414|        "movq  %3,%%rax     \n\t"         \
  |  |  109|    414|        "mulq  %4           \n\t"         \
  |  |  110|    414|        "movq  %%rax,%0     \n\t"         \
  |  |  111|    414|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|    414|        "xorq  %2,%2        \n\t"         \
  |  |  113|    414|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|    414|        : "g"(i), "g"(j)                  \
  |  |  115|    414|        : "%rax", "%rdx", "cc");
  ------------------
 2045|    414|    SQRADDAC(a[3], a[6]);
  ------------------
  |  |  118|    414|    __asm__(                                           \
  |  |  119|    414|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|    414|        "mulq  %7           \n\t"                      \
  |  |  121|    414|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|    414|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|    414|        "adcq  $0,%2        \n\t"                      \
  |  |  124|    414|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|    414|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|    414|        : "%rax", "%rdx", "cc");
  ------------------
 2046|    414|    SQRADDAC(a[4], a[5]);
  ------------------
  |  |  118|    414|    __asm__(                                           \
  |  |  119|    414|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|    414|        "mulq  %7           \n\t"                      \
  |  |  121|    414|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|    414|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|    414|        "adcq  $0,%2        \n\t"                      \
  |  |  124|    414|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|    414|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|    414|        : "%rax", "%rdx", "cc");
  ------------------
 2047|    414|    SQRADDDB;
  ------------------
  |  |  129|    414|    __asm__(                                                      \
  |  |  130|    414|        "addq %6,%0         \n\t"                                 \
  |  |  131|    414|        "adcq %7,%1         \n\t"                                 \
  |  |  132|    414|        "adcq %8,%2         \n\t"                                 \
  |  |  133|    414|        "addq %6,%0         \n\t"                                 \
  |  |  134|    414|        "adcq %7,%1         \n\t"                                 \
  |  |  135|    414|        "adcq %8,%2         \n\t"                                 \
  |  |  136|    414|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|    414|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|    414|        : "cc");
  ------------------
 2048|    414|    COMBA_STORE(b[9]);
  ------------------
  |  |   67|    414|    x = c0;
  ------------------
 2049|       |
 2050|       |    /* output 10 */
 2051|    414|    CARRY_FORWARD;
  ------------------
  |  |   73|    414|    do {              \
  |  |   74|    414|        c0 = c1;      \
  |  |   75|    414|        c1 = c2;      \
  |  |   76|    414|        c2 = 0;       \
  |  |   77|    414|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2052|    414|    SQRADD2(a[3], a[7]);
  ------------------
  |  |   93|    414|    __asm__(                                        \
  |  |   94|    414|        "movq  %6,%%rax     \n\t"                   \
  |  |   95|    414|        "mulq  %7           \n\t"                   \
  |  |   96|    414|        "addq  %%rax,%0     \n\t"                   \
  |  |   97|    414|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   98|    414|        "adcq  $0,%2        \n\t"                   \
  |  |   99|    414|        "addq  %%rax,%0     \n\t"                   \
  |  |  100|    414|        "adcq  %%rdx,%1     \n\t"                   \
  |  |  101|    414|        "adcq  $0,%2        \n\t"                   \
  |  |  102|    414|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |  103|    414|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |  104|    414|        : "%rax", "%rdx", "cc");
  ------------------
 2053|    414|    SQRADD2(a[4], a[6]);
  ------------------
  |  |   93|    414|    __asm__(                                        \
  |  |   94|    414|        "movq  %6,%%rax     \n\t"                   \
  |  |   95|    414|        "mulq  %7           \n\t"                   \
  |  |   96|    414|        "addq  %%rax,%0     \n\t"                   \
  |  |   97|    414|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   98|    414|        "adcq  $0,%2        \n\t"                   \
  |  |   99|    414|        "addq  %%rax,%0     \n\t"                   \
  |  |  100|    414|        "adcq  %%rdx,%1     \n\t"                   \
  |  |  101|    414|        "adcq  $0,%2        \n\t"                   \
  |  |  102|    414|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |  103|    414|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |  104|    414|        : "%rax", "%rdx", "cc");
  ------------------
 2054|    414|    SQRADD(a[5], a[5]);
  ------------------
  |  |   82|    414|    __asm__(                                \
  |  |   83|    414|        "movq  %6,%%rax     \n\t"           \
  |  |   84|    414|        "mulq  %%rax        \n\t"           \
  |  |   85|    414|        "addq  %%rax,%0     \n\t"           \
  |  |   86|    414|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|    414|        "adcq  $0,%2        \n\t"           \
  |  |   88|    414|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|    414|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|    414|        : "%rax", "%rdx", "cc");
  ------------------
 2055|    414|    COMBA_STORE(b[10]);
  ------------------
  |  |   67|    414|    x = c0;
  ------------------
 2056|       |
 2057|       |    /* output 11 */
 2058|    414|    CARRY_FORWARD;
  ------------------
  |  |   73|    414|    do {              \
  |  |   74|    414|        c0 = c1;      \
  |  |   75|    414|        c1 = c2;      \
  |  |   76|    414|        c2 = 0;       \
  |  |   77|    414|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2059|    414|    SQRADD2(a[4], a[7]);
  ------------------
  |  |   93|    414|    __asm__(                                        \
  |  |   94|    414|        "movq  %6,%%rax     \n\t"                   \
  |  |   95|    414|        "mulq  %7           \n\t"                   \
  |  |   96|    414|        "addq  %%rax,%0     \n\t"                   \
  |  |   97|    414|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   98|    414|        "adcq  $0,%2        \n\t"                   \
  |  |   99|    414|        "addq  %%rax,%0     \n\t"                   \
  |  |  100|    414|        "adcq  %%rdx,%1     \n\t"                   \
  |  |  101|    414|        "adcq  $0,%2        \n\t"                   \
  |  |  102|    414|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |  103|    414|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |  104|    414|        : "%rax", "%rdx", "cc");
  ------------------
 2060|    414|    SQRADD2(a[5], a[6]);
  ------------------
  |  |   93|    414|    __asm__(                                        \
  |  |   94|    414|        "movq  %6,%%rax     \n\t"                   \
  |  |   95|    414|        "mulq  %7           \n\t"                   \
  |  |   96|    414|        "addq  %%rax,%0     \n\t"                   \
  |  |   97|    414|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   98|    414|        "adcq  $0,%2        \n\t"                   \
  |  |   99|    414|        "addq  %%rax,%0     \n\t"                   \
  |  |  100|    414|        "adcq  %%rdx,%1     \n\t"                   \
  |  |  101|    414|        "adcq  $0,%2        \n\t"                   \
  |  |  102|    414|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |  103|    414|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |  104|    414|        : "%rax", "%rdx", "cc");
  ------------------
 2061|    414|    COMBA_STORE(b[11]);
  ------------------
  |  |   67|    414|    x = c0;
  ------------------
 2062|       |
 2063|       |    /* output 12 */
 2064|    414|    CARRY_FORWARD;
  ------------------
  |  |   73|    414|    do {              \
  |  |   74|    414|        c0 = c1;      \
  |  |   75|    414|        c1 = c2;      \
  |  |   76|    414|        c2 = 0;       \
  |  |   77|    414|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2065|    414|    SQRADD2(a[5], a[7]);
  ------------------
  |  |   93|    414|    __asm__(                                        \
  |  |   94|    414|        "movq  %6,%%rax     \n\t"                   \
  |  |   95|    414|        "mulq  %7           \n\t"                   \
  |  |   96|    414|        "addq  %%rax,%0     \n\t"                   \
  |  |   97|    414|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   98|    414|        "adcq  $0,%2        \n\t"                   \
  |  |   99|    414|        "addq  %%rax,%0     \n\t"                   \
  |  |  100|    414|        "adcq  %%rdx,%1     \n\t"                   \
  |  |  101|    414|        "adcq  $0,%2        \n\t"                   \
  |  |  102|    414|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |  103|    414|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |  104|    414|        : "%rax", "%rdx", "cc");
  ------------------
 2066|    414|    SQRADD(a[6], a[6]);
  ------------------
  |  |   82|    414|    __asm__(                                \
  |  |   83|    414|        "movq  %6,%%rax     \n\t"           \
  |  |   84|    414|        "mulq  %%rax        \n\t"           \
  |  |   85|    414|        "addq  %%rax,%0     \n\t"           \
  |  |   86|    414|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|    414|        "adcq  $0,%2        \n\t"           \
  |  |   88|    414|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|    414|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|    414|        : "%rax", "%rdx", "cc");
  ------------------
 2067|    414|    COMBA_STORE(b[12]);
  ------------------
  |  |   67|    414|    x = c0;
  ------------------
 2068|       |
 2069|       |    /* output 13 */
 2070|    414|    CARRY_FORWARD;
  ------------------
  |  |   73|    414|    do {              \
  |  |   74|    414|        c0 = c1;      \
  |  |   75|    414|        c1 = c2;      \
  |  |   76|    414|        c2 = 0;       \
  |  |   77|    414|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2071|    414|    SQRADD2(a[6], a[7]);
  ------------------
  |  |   93|    414|    __asm__(                                        \
  |  |   94|    414|        "movq  %6,%%rax     \n\t"                   \
  |  |   95|    414|        "mulq  %7           \n\t"                   \
  |  |   96|    414|        "addq  %%rax,%0     \n\t"                   \
  |  |   97|    414|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   98|    414|        "adcq  $0,%2        \n\t"                   \
  |  |   99|    414|        "addq  %%rax,%0     \n\t"                   \
  |  |  100|    414|        "adcq  %%rdx,%1     \n\t"                   \
  |  |  101|    414|        "adcq  $0,%2        \n\t"                   \
  |  |  102|    414|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |  103|    414|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |  104|    414|        : "%rax", "%rdx", "cc");
  ------------------
 2072|    414|    COMBA_STORE(b[13]);
  ------------------
  |  |   67|    414|    x = c0;
  ------------------
 2073|       |
 2074|       |    /* output 14 */
 2075|    414|    CARRY_FORWARD;
  ------------------
  |  |   73|    414|    do {              \
  |  |   74|    414|        c0 = c1;      \
  |  |   75|    414|        c1 = c2;      \
  |  |   76|    414|        c2 = 0;       \
  |  |   77|    414|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2076|    414|    SQRADD(a[7], a[7]);
  ------------------
  |  |   82|    414|    __asm__(                                \
  |  |   83|    414|        "movq  %6,%%rax     \n\t"           \
  |  |   84|    414|        "mulq  %%rax        \n\t"           \
  |  |   85|    414|        "addq  %%rax,%0     \n\t"           \
  |  |   86|    414|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|    414|        "adcq  $0,%2        \n\t"           \
  |  |   88|    414|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|    414|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|    414|        : "%rax", "%rdx", "cc");
  ------------------
 2077|    414|    COMBA_STORE(b[14]);
  ------------------
  |  |   67|    414|    x = c0;
  ------------------
 2078|    414|    COMBA_STORE2(b[15]);
  ------------------
  |  |   70|    414|    x = c1;
  ------------------
 2079|    414|    COMBA_FINI;
 2080|       |
 2081|    414|    B->used = 16;
 2082|    414|    B->sign = ZPOS;
  ------------------
  |  |  326|    414|#define ZPOS MP_ZPOS
  |  |  ------------------
  |  |  |  |   37|    414|#define MP_ZPOS 0
  |  |  ------------------
  ------------------
 2083|    414|    memcpy(B->dp, b, 16 * sizeof(mp_digit));
 2084|    414|    mp_clamp(B);
  ------------------
  |  |   26|    414|    {                                                    \
  |  |   27|    529|        while ((a)->used && (a)->dp[(a)->used - 1] == 0) \
  |  |  ------------------
  |  |  |  Branch (27:16): [True: 529, False: 0]
  |  |  |  Branch (27:29): [True: 115, False: 414]
  |  |  ------------------
  |  |   28|    414|            --((a)->used);                               \
  |  |   29|    414|        (a)->sign = (a)->used ? (a)->sign : ZPOS;        \
  |  |  ------------------
  |  |  |  |  326|      0|#define ZPOS MP_ZPOS
  |  |  |  |  ------------------
  |  |  |  |  |  |   37|    414|#define MP_ZPOS 0
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (29:21): [True: 414, False: 0]
  |  |  ------------------
  |  |   30|    414|    }
  ------------------
 2085|    414|}
s_mp_sqr_comba_16:
 2089|  44.0k|{
 2090|  44.0k|    mp_digit *a, b[32], c0, c1, c2, sc0, sc1, sc2;
 2091|       |
 2092|  44.0k|    a = A->dp;
 2093|  44.0k|    COMBA_START;
 2094|       |
 2095|       |    /* clear carries */
 2096|  44.0k|    CLEAR_CARRY;
  ------------------
  |  |   64|  44.0k|    c0 = c1 = c2 = 0;
  ------------------
 2097|       |
 2098|       |    /* output 0 */
 2099|  44.0k|    SQRADD(a[0], a[0]);
  ------------------
  |  |   82|  44.0k|    __asm__(                                \
  |  |   83|  44.0k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|  44.0k|        "mulq  %%rax        \n\t"           \
  |  |   85|  44.0k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|  44.0k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|  44.0k|        "adcq  $0,%2        \n\t"           \
  |  |   88|  44.0k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2100|  44.0k|    COMBA_STORE(b[0]);
  ------------------
  |  |   67|  44.0k|    x = c0;
  ------------------
 2101|       |
 2102|       |    /* output 1 */
 2103|  44.0k|    CARRY_FORWARD;
  ------------------
  |  |   73|  44.0k|    do {              \
  |  |   74|  44.0k|        c0 = c1;      \
  |  |   75|  44.0k|        c1 = c2;      \
  |  |   76|  44.0k|        c2 = 0;       \
  |  |   77|  44.0k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2104|  44.0k|    SQRADD2(a[0], a[1]);
  ------------------
  |  |   93|  44.0k|    __asm__(                                        \
  |  |   94|  44.0k|        "movq  %6,%%rax     \n\t"                   \
  |  |   95|  44.0k|        "mulq  %7           \n\t"                   \
  |  |   96|  44.0k|        "addq  %%rax,%0     \n\t"                   \
  |  |   97|  44.0k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   98|  44.0k|        "adcq  $0,%2        \n\t"                   \
  |  |   99|  44.0k|        "addq  %%rax,%0     \n\t"                   \
  |  |  100|  44.0k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |  101|  44.0k|        "adcq  $0,%2        \n\t"                   \
  |  |  102|  44.0k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |  103|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |  104|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2105|  44.0k|    COMBA_STORE(b[1]);
  ------------------
  |  |   67|  44.0k|    x = c0;
  ------------------
 2106|       |
 2107|       |    /* output 2 */
 2108|  44.0k|    CARRY_FORWARD;
  ------------------
  |  |   73|  44.0k|    do {              \
  |  |   74|  44.0k|        c0 = c1;      \
  |  |   75|  44.0k|        c1 = c2;      \
  |  |   76|  44.0k|        c2 = 0;       \
  |  |   77|  44.0k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2109|  44.0k|    SQRADD2(a[0], a[2]);
  ------------------
  |  |   93|  44.0k|    __asm__(                                        \
  |  |   94|  44.0k|        "movq  %6,%%rax     \n\t"                   \
  |  |   95|  44.0k|        "mulq  %7           \n\t"                   \
  |  |   96|  44.0k|        "addq  %%rax,%0     \n\t"                   \
  |  |   97|  44.0k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   98|  44.0k|        "adcq  $0,%2        \n\t"                   \
  |  |   99|  44.0k|        "addq  %%rax,%0     \n\t"                   \
  |  |  100|  44.0k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |  101|  44.0k|        "adcq  $0,%2        \n\t"                   \
  |  |  102|  44.0k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |  103|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |  104|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2110|  44.0k|    SQRADD(a[1], a[1]);
  ------------------
  |  |   82|  44.0k|    __asm__(                                \
  |  |   83|  44.0k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|  44.0k|        "mulq  %%rax        \n\t"           \
  |  |   85|  44.0k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|  44.0k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|  44.0k|        "adcq  $0,%2        \n\t"           \
  |  |   88|  44.0k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2111|  44.0k|    COMBA_STORE(b[2]);
  ------------------
  |  |   67|  44.0k|    x = c0;
  ------------------
 2112|       |
 2113|       |    /* output 3 */
 2114|  44.0k|    CARRY_FORWARD;
  ------------------
  |  |   73|  44.0k|    do {              \
  |  |   74|  44.0k|        c0 = c1;      \
  |  |   75|  44.0k|        c1 = c2;      \
  |  |   76|  44.0k|        c2 = 0;       \
  |  |   77|  44.0k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2115|  44.0k|    SQRADD2(a[0], a[3]);
  ------------------
  |  |   93|  44.0k|    __asm__(                                        \
  |  |   94|  44.0k|        "movq  %6,%%rax     \n\t"                   \
  |  |   95|  44.0k|        "mulq  %7           \n\t"                   \
  |  |   96|  44.0k|        "addq  %%rax,%0     \n\t"                   \
  |  |   97|  44.0k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   98|  44.0k|        "adcq  $0,%2        \n\t"                   \
  |  |   99|  44.0k|        "addq  %%rax,%0     \n\t"                   \
  |  |  100|  44.0k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |  101|  44.0k|        "adcq  $0,%2        \n\t"                   \
  |  |  102|  44.0k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |  103|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |  104|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2116|  44.0k|    SQRADD2(a[1], a[2]);
  ------------------
  |  |   93|  44.0k|    __asm__(                                        \
  |  |   94|  44.0k|        "movq  %6,%%rax     \n\t"                   \
  |  |   95|  44.0k|        "mulq  %7           \n\t"                   \
  |  |   96|  44.0k|        "addq  %%rax,%0     \n\t"                   \
  |  |   97|  44.0k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   98|  44.0k|        "adcq  $0,%2        \n\t"                   \
  |  |   99|  44.0k|        "addq  %%rax,%0     \n\t"                   \
  |  |  100|  44.0k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |  101|  44.0k|        "adcq  $0,%2        \n\t"                   \
  |  |  102|  44.0k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |  103|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |  104|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2117|  44.0k|    COMBA_STORE(b[3]);
  ------------------
  |  |   67|  44.0k|    x = c0;
  ------------------
 2118|       |
 2119|       |    /* output 4 */
 2120|  44.0k|    CARRY_FORWARD;
  ------------------
  |  |   73|  44.0k|    do {              \
  |  |   74|  44.0k|        c0 = c1;      \
  |  |   75|  44.0k|        c1 = c2;      \
  |  |   76|  44.0k|        c2 = 0;       \
  |  |   77|  44.0k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2121|  44.0k|    SQRADD2(a[0], a[4]);
  ------------------
  |  |   93|  44.0k|    __asm__(                                        \
  |  |   94|  44.0k|        "movq  %6,%%rax     \n\t"                   \
  |  |   95|  44.0k|        "mulq  %7           \n\t"                   \
  |  |   96|  44.0k|        "addq  %%rax,%0     \n\t"                   \
  |  |   97|  44.0k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   98|  44.0k|        "adcq  $0,%2        \n\t"                   \
  |  |   99|  44.0k|        "addq  %%rax,%0     \n\t"                   \
  |  |  100|  44.0k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |  101|  44.0k|        "adcq  $0,%2        \n\t"                   \
  |  |  102|  44.0k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |  103|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |  104|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2122|  44.0k|    SQRADD2(a[1], a[3]);
  ------------------
  |  |   93|  44.0k|    __asm__(                                        \
  |  |   94|  44.0k|        "movq  %6,%%rax     \n\t"                   \
  |  |   95|  44.0k|        "mulq  %7           \n\t"                   \
  |  |   96|  44.0k|        "addq  %%rax,%0     \n\t"                   \
  |  |   97|  44.0k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   98|  44.0k|        "adcq  $0,%2        \n\t"                   \
  |  |   99|  44.0k|        "addq  %%rax,%0     \n\t"                   \
  |  |  100|  44.0k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |  101|  44.0k|        "adcq  $0,%2        \n\t"                   \
  |  |  102|  44.0k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |  103|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |  104|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2123|  44.0k|    SQRADD(a[2], a[2]);
  ------------------
  |  |   82|  44.0k|    __asm__(                                \
  |  |   83|  44.0k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|  44.0k|        "mulq  %%rax        \n\t"           \
  |  |   85|  44.0k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|  44.0k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|  44.0k|        "adcq  $0,%2        \n\t"           \
  |  |   88|  44.0k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2124|  44.0k|    COMBA_STORE(b[4]);
  ------------------
  |  |   67|  44.0k|    x = c0;
  ------------------
 2125|       |
 2126|       |    /* output 5 */
 2127|  44.0k|    CARRY_FORWARD;
  ------------------
  |  |   73|  44.0k|    do {              \
  |  |   74|  44.0k|        c0 = c1;      \
  |  |   75|  44.0k|        c1 = c2;      \
  |  |   76|  44.0k|        c2 = 0;       \
  |  |   77|  44.0k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2128|  44.0k|    SQRADDSC(a[0], a[5]);
  ------------------
  |  |  107|  44.0k|    __asm__(                              \
  |  |  108|  44.0k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|  44.0k|        "mulq  %4           \n\t"         \
  |  |  110|  44.0k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|  44.0k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|  44.0k|        "xorq  %2,%2        \n\t"         \
  |  |  113|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|  44.0k|        : "g"(i), "g"(j)                  \
  |  |  115|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2129|  44.0k|    SQRADDAC(a[1], a[4]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2130|  44.0k|    SQRADDAC(a[2], a[3]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2131|  44.0k|    SQRADDDB;
  ------------------
  |  |  129|  44.0k|    __asm__(                                                      \
  |  |  130|  44.0k|        "addq %6,%0         \n\t"                                 \
  |  |  131|  44.0k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|  44.0k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|  44.0k|        "addq %6,%0         \n\t"                                 \
  |  |  134|  44.0k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|  44.0k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|  44.0k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|  44.0k|        : "cc");
  ------------------
 2132|  44.0k|    COMBA_STORE(b[5]);
  ------------------
  |  |   67|  44.0k|    x = c0;
  ------------------
 2133|       |
 2134|       |    /* output 6 */
 2135|  44.0k|    CARRY_FORWARD;
  ------------------
  |  |   73|  44.0k|    do {              \
  |  |   74|  44.0k|        c0 = c1;      \
  |  |   75|  44.0k|        c1 = c2;      \
  |  |   76|  44.0k|        c2 = 0;       \
  |  |   77|  44.0k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2136|  44.0k|    SQRADDSC(a[0], a[6]);
  ------------------
  |  |  107|  44.0k|    __asm__(                              \
  |  |  108|  44.0k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|  44.0k|        "mulq  %4           \n\t"         \
  |  |  110|  44.0k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|  44.0k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|  44.0k|        "xorq  %2,%2        \n\t"         \
  |  |  113|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|  44.0k|        : "g"(i), "g"(j)                  \
  |  |  115|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2137|  44.0k|    SQRADDAC(a[1], a[5]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2138|  44.0k|    SQRADDAC(a[2], a[4]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2139|  44.0k|    SQRADDDB;
  ------------------
  |  |  129|  44.0k|    __asm__(                                                      \
  |  |  130|  44.0k|        "addq %6,%0         \n\t"                                 \
  |  |  131|  44.0k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|  44.0k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|  44.0k|        "addq %6,%0         \n\t"                                 \
  |  |  134|  44.0k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|  44.0k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|  44.0k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|  44.0k|        : "cc");
  ------------------
 2140|  44.0k|    SQRADD(a[3], a[3]);
  ------------------
  |  |   82|  44.0k|    __asm__(                                \
  |  |   83|  44.0k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|  44.0k|        "mulq  %%rax        \n\t"           \
  |  |   85|  44.0k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|  44.0k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|  44.0k|        "adcq  $0,%2        \n\t"           \
  |  |   88|  44.0k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2141|  44.0k|    COMBA_STORE(b[6]);
  ------------------
  |  |   67|  44.0k|    x = c0;
  ------------------
 2142|       |
 2143|       |    /* output 7 */
 2144|  44.0k|    CARRY_FORWARD;
  ------------------
  |  |   73|  44.0k|    do {              \
  |  |   74|  44.0k|        c0 = c1;      \
  |  |   75|  44.0k|        c1 = c2;      \
  |  |   76|  44.0k|        c2 = 0;       \
  |  |   77|  44.0k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2145|  44.0k|    SQRADDSC(a[0], a[7]);
  ------------------
  |  |  107|  44.0k|    __asm__(                              \
  |  |  108|  44.0k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|  44.0k|        "mulq  %4           \n\t"         \
  |  |  110|  44.0k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|  44.0k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|  44.0k|        "xorq  %2,%2        \n\t"         \
  |  |  113|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|  44.0k|        : "g"(i), "g"(j)                  \
  |  |  115|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2146|  44.0k|    SQRADDAC(a[1], a[6]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2147|  44.0k|    SQRADDAC(a[2], a[5]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2148|  44.0k|    SQRADDAC(a[3], a[4]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2149|  44.0k|    SQRADDDB;
  ------------------
  |  |  129|  44.0k|    __asm__(                                                      \
  |  |  130|  44.0k|        "addq %6,%0         \n\t"                                 \
  |  |  131|  44.0k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|  44.0k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|  44.0k|        "addq %6,%0         \n\t"                                 \
  |  |  134|  44.0k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|  44.0k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|  44.0k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|  44.0k|        : "cc");
  ------------------
 2150|  44.0k|    COMBA_STORE(b[7]);
  ------------------
  |  |   67|  44.0k|    x = c0;
  ------------------
 2151|       |
 2152|       |    /* output 8 */
 2153|  44.0k|    CARRY_FORWARD;
  ------------------
  |  |   73|  44.0k|    do {              \
  |  |   74|  44.0k|        c0 = c1;      \
  |  |   75|  44.0k|        c1 = c2;      \
  |  |   76|  44.0k|        c2 = 0;       \
  |  |   77|  44.0k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2154|  44.0k|    SQRADDSC(a[0], a[8]);
  ------------------
  |  |  107|  44.0k|    __asm__(                              \
  |  |  108|  44.0k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|  44.0k|        "mulq  %4           \n\t"         \
  |  |  110|  44.0k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|  44.0k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|  44.0k|        "xorq  %2,%2        \n\t"         \
  |  |  113|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|  44.0k|        : "g"(i), "g"(j)                  \
  |  |  115|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2155|  44.0k|    SQRADDAC(a[1], a[7]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2156|  44.0k|    SQRADDAC(a[2], a[6]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2157|  44.0k|    SQRADDAC(a[3], a[5]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2158|  44.0k|    SQRADDDB;
  ------------------
  |  |  129|  44.0k|    __asm__(                                                      \
  |  |  130|  44.0k|        "addq %6,%0         \n\t"                                 \
  |  |  131|  44.0k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|  44.0k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|  44.0k|        "addq %6,%0         \n\t"                                 \
  |  |  134|  44.0k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|  44.0k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|  44.0k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|  44.0k|        : "cc");
  ------------------
 2159|  44.0k|    SQRADD(a[4], a[4]);
  ------------------
  |  |   82|  44.0k|    __asm__(                                \
  |  |   83|  44.0k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|  44.0k|        "mulq  %%rax        \n\t"           \
  |  |   85|  44.0k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|  44.0k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|  44.0k|        "adcq  $0,%2        \n\t"           \
  |  |   88|  44.0k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2160|  44.0k|    COMBA_STORE(b[8]);
  ------------------
  |  |   67|  44.0k|    x = c0;
  ------------------
 2161|       |
 2162|       |    /* output 9 */
 2163|  44.0k|    CARRY_FORWARD;
  ------------------
  |  |   73|  44.0k|    do {              \
  |  |   74|  44.0k|        c0 = c1;      \
  |  |   75|  44.0k|        c1 = c2;      \
  |  |   76|  44.0k|        c2 = 0;       \
  |  |   77|  44.0k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2164|  44.0k|    SQRADDSC(a[0], a[9]);
  ------------------
  |  |  107|  44.0k|    __asm__(                              \
  |  |  108|  44.0k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|  44.0k|        "mulq  %4           \n\t"         \
  |  |  110|  44.0k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|  44.0k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|  44.0k|        "xorq  %2,%2        \n\t"         \
  |  |  113|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|  44.0k|        : "g"(i), "g"(j)                  \
  |  |  115|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2165|  44.0k|    SQRADDAC(a[1], a[8]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2166|  44.0k|    SQRADDAC(a[2], a[7]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2167|  44.0k|    SQRADDAC(a[3], a[6]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2168|  44.0k|    SQRADDAC(a[4], a[5]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2169|  44.0k|    SQRADDDB;
  ------------------
  |  |  129|  44.0k|    __asm__(                                                      \
  |  |  130|  44.0k|        "addq %6,%0         \n\t"                                 \
  |  |  131|  44.0k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|  44.0k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|  44.0k|        "addq %6,%0         \n\t"                                 \
  |  |  134|  44.0k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|  44.0k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|  44.0k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|  44.0k|        : "cc");
  ------------------
 2170|  44.0k|    COMBA_STORE(b[9]);
  ------------------
  |  |   67|  44.0k|    x = c0;
  ------------------
 2171|       |
 2172|       |    /* output 10 */
 2173|  44.0k|    CARRY_FORWARD;
  ------------------
  |  |   73|  44.0k|    do {              \
  |  |   74|  44.0k|        c0 = c1;      \
  |  |   75|  44.0k|        c1 = c2;      \
  |  |   76|  44.0k|        c2 = 0;       \
  |  |   77|  44.0k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2174|  44.0k|    SQRADDSC(a[0], a[10]);
  ------------------
  |  |  107|  44.0k|    __asm__(                              \
  |  |  108|  44.0k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|  44.0k|        "mulq  %4           \n\t"         \
  |  |  110|  44.0k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|  44.0k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|  44.0k|        "xorq  %2,%2        \n\t"         \
  |  |  113|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|  44.0k|        : "g"(i), "g"(j)                  \
  |  |  115|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2175|  44.0k|    SQRADDAC(a[1], a[9]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2176|  44.0k|    SQRADDAC(a[2], a[8]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2177|  44.0k|    SQRADDAC(a[3], a[7]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2178|  44.0k|    SQRADDAC(a[4], a[6]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2179|  44.0k|    SQRADDDB;
  ------------------
  |  |  129|  44.0k|    __asm__(                                                      \
  |  |  130|  44.0k|        "addq %6,%0         \n\t"                                 \
  |  |  131|  44.0k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|  44.0k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|  44.0k|        "addq %6,%0         \n\t"                                 \
  |  |  134|  44.0k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|  44.0k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|  44.0k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|  44.0k|        : "cc");
  ------------------
 2180|  44.0k|    SQRADD(a[5], a[5]);
  ------------------
  |  |   82|  44.0k|    __asm__(                                \
  |  |   83|  44.0k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|  44.0k|        "mulq  %%rax        \n\t"           \
  |  |   85|  44.0k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|  44.0k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|  44.0k|        "adcq  $0,%2        \n\t"           \
  |  |   88|  44.0k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2181|  44.0k|    COMBA_STORE(b[10]);
  ------------------
  |  |   67|  44.0k|    x = c0;
  ------------------
 2182|       |
 2183|       |    /* output 11 */
 2184|  44.0k|    CARRY_FORWARD;
  ------------------
  |  |   73|  44.0k|    do {              \
  |  |   74|  44.0k|        c0 = c1;      \
  |  |   75|  44.0k|        c1 = c2;      \
  |  |   76|  44.0k|        c2 = 0;       \
  |  |   77|  44.0k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2185|  44.0k|    SQRADDSC(a[0], a[11]);
  ------------------
  |  |  107|  44.0k|    __asm__(                              \
  |  |  108|  44.0k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|  44.0k|        "mulq  %4           \n\t"         \
  |  |  110|  44.0k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|  44.0k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|  44.0k|        "xorq  %2,%2        \n\t"         \
  |  |  113|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|  44.0k|        : "g"(i), "g"(j)                  \
  |  |  115|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2186|  44.0k|    SQRADDAC(a[1], a[10]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2187|  44.0k|    SQRADDAC(a[2], a[9]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2188|  44.0k|    SQRADDAC(a[3], a[8]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2189|  44.0k|    SQRADDAC(a[4], a[7]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2190|  44.0k|    SQRADDAC(a[5], a[6]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2191|  44.0k|    SQRADDDB;
  ------------------
  |  |  129|  44.0k|    __asm__(                                                      \
  |  |  130|  44.0k|        "addq %6,%0         \n\t"                                 \
  |  |  131|  44.0k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|  44.0k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|  44.0k|        "addq %6,%0         \n\t"                                 \
  |  |  134|  44.0k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|  44.0k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|  44.0k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|  44.0k|        : "cc");
  ------------------
 2192|  44.0k|    COMBA_STORE(b[11]);
  ------------------
  |  |   67|  44.0k|    x = c0;
  ------------------
 2193|       |
 2194|       |    /* output 12 */
 2195|  44.0k|    CARRY_FORWARD;
  ------------------
  |  |   73|  44.0k|    do {              \
  |  |   74|  44.0k|        c0 = c1;      \
  |  |   75|  44.0k|        c1 = c2;      \
  |  |   76|  44.0k|        c2 = 0;       \
  |  |   77|  44.0k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2196|  44.0k|    SQRADDSC(a[0], a[12]);
  ------------------
  |  |  107|  44.0k|    __asm__(                              \
  |  |  108|  44.0k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|  44.0k|        "mulq  %4           \n\t"         \
  |  |  110|  44.0k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|  44.0k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|  44.0k|        "xorq  %2,%2        \n\t"         \
  |  |  113|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|  44.0k|        : "g"(i), "g"(j)                  \
  |  |  115|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2197|  44.0k|    SQRADDAC(a[1], a[11]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2198|  44.0k|    SQRADDAC(a[2], a[10]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2199|  44.0k|    SQRADDAC(a[3], a[9]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2200|  44.0k|    SQRADDAC(a[4], a[8]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2201|  44.0k|    SQRADDAC(a[5], a[7]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2202|  44.0k|    SQRADDDB;
  ------------------
  |  |  129|  44.0k|    __asm__(                                                      \
  |  |  130|  44.0k|        "addq %6,%0         \n\t"                                 \
  |  |  131|  44.0k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|  44.0k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|  44.0k|        "addq %6,%0         \n\t"                                 \
  |  |  134|  44.0k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|  44.0k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|  44.0k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|  44.0k|        : "cc");
  ------------------
 2203|  44.0k|    SQRADD(a[6], a[6]);
  ------------------
  |  |   82|  44.0k|    __asm__(                                \
  |  |   83|  44.0k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|  44.0k|        "mulq  %%rax        \n\t"           \
  |  |   85|  44.0k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|  44.0k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|  44.0k|        "adcq  $0,%2        \n\t"           \
  |  |   88|  44.0k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2204|  44.0k|    COMBA_STORE(b[12]);
  ------------------
  |  |   67|  44.0k|    x = c0;
  ------------------
 2205|       |
 2206|       |    /* output 13 */
 2207|  44.0k|    CARRY_FORWARD;
  ------------------
  |  |   73|  44.0k|    do {              \
  |  |   74|  44.0k|        c0 = c1;      \
  |  |   75|  44.0k|        c1 = c2;      \
  |  |   76|  44.0k|        c2 = 0;       \
  |  |   77|  44.0k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2208|  44.0k|    SQRADDSC(a[0], a[13]);
  ------------------
  |  |  107|  44.0k|    __asm__(                              \
  |  |  108|  44.0k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|  44.0k|        "mulq  %4           \n\t"         \
  |  |  110|  44.0k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|  44.0k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|  44.0k|        "xorq  %2,%2        \n\t"         \
  |  |  113|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|  44.0k|        : "g"(i), "g"(j)                  \
  |  |  115|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2209|  44.0k|    SQRADDAC(a[1], a[12]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2210|  44.0k|    SQRADDAC(a[2], a[11]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2211|  44.0k|    SQRADDAC(a[3], a[10]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2212|  44.0k|    SQRADDAC(a[4], a[9]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2213|  44.0k|    SQRADDAC(a[5], a[8]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2214|  44.0k|    SQRADDAC(a[6], a[7]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2215|  44.0k|    SQRADDDB;
  ------------------
  |  |  129|  44.0k|    __asm__(                                                      \
  |  |  130|  44.0k|        "addq %6,%0         \n\t"                                 \
  |  |  131|  44.0k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|  44.0k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|  44.0k|        "addq %6,%0         \n\t"                                 \
  |  |  134|  44.0k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|  44.0k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|  44.0k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|  44.0k|        : "cc");
  ------------------
 2216|  44.0k|    COMBA_STORE(b[13]);
  ------------------
  |  |   67|  44.0k|    x = c0;
  ------------------
 2217|       |
 2218|       |    /* output 14 */
 2219|  44.0k|    CARRY_FORWARD;
  ------------------
  |  |   73|  44.0k|    do {              \
  |  |   74|  44.0k|        c0 = c1;      \
  |  |   75|  44.0k|        c1 = c2;      \
  |  |   76|  44.0k|        c2 = 0;       \
  |  |   77|  44.0k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2220|  44.0k|    SQRADDSC(a[0], a[14]);
  ------------------
  |  |  107|  44.0k|    __asm__(                              \
  |  |  108|  44.0k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|  44.0k|        "mulq  %4           \n\t"         \
  |  |  110|  44.0k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|  44.0k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|  44.0k|        "xorq  %2,%2        \n\t"         \
  |  |  113|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|  44.0k|        : "g"(i), "g"(j)                  \
  |  |  115|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2221|  44.0k|    SQRADDAC(a[1], a[13]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2222|  44.0k|    SQRADDAC(a[2], a[12]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2223|  44.0k|    SQRADDAC(a[3], a[11]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2224|  44.0k|    SQRADDAC(a[4], a[10]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2225|  44.0k|    SQRADDAC(a[5], a[9]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2226|  44.0k|    SQRADDAC(a[6], a[8]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2227|  44.0k|    SQRADDDB;
  ------------------
  |  |  129|  44.0k|    __asm__(                                                      \
  |  |  130|  44.0k|        "addq %6,%0         \n\t"                                 \
  |  |  131|  44.0k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|  44.0k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|  44.0k|        "addq %6,%0         \n\t"                                 \
  |  |  134|  44.0k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|  44.0k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|  44.0k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|  44.0k|        : "cc");
  ------------------
 2228|  44.0k|    SQRADD(a[7], a[7]);
  ------------------
  |  |   82|  44.0k|    __asm__(                                \
  |  |   83|  44.0k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|  44.0k|        "mulq  %%rax        \n\t"           \
  |  |   85|  44.0k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|  44.0k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|  44.0k|        "adcq  $0,%2        \n\t"           \
  |  |   88|  44.0k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2229|  44.0k|    COMBA_STORE(b[14]);
  ------------------
  |  |   67|  44.0k|    x = c0;
  ------------------
 2230|       |
 2231|       |    /* output 15 */
 2232|  44.0k|    CARRY_FORWARD;
  ------------------
  |  |   73|  44.0k|    do {              \
  |  |   74|  44.0k|        c0 = c1;      \
  |  |   75|  44.0k|        c1 = c2;      \
  |  |   76|  44.0k|        c2 = 0;       \
  |  |   77|  44.0k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2233|  44.0k|    SQRADDSC(a[0], a[15]);
  ------------------
  |  |  107|  44.0k|    __asm__(                              \
  |  |  108|  44.0k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|  44.0k|        "mulq  %4           \n\t"         \
  |  |  110|  44.0k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|  44.0k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|  44.0k|        "xorq  %2,%2        \n\t"         \
  |  |  113|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|  44.0k|        : "g"(i), "g"(j)                  \
  |  |  115|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2234|  44.0k|    SQRADDAC(a[1], a[14]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2235|  44.0k|    SQRADDAC(a[2], a[13]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2236|  44.0k|    SQRADDAC(a[3], a[12]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2237|  44.0k|    SQRADDAC(a[4], a[11]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2238|  44.0k|    SQRADDAC(a[5], a[10]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2239|  44.0k|    SQRADDAC(a[6], a[9]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2240|  44.0k|    SQRADDAC(a[7], a[8]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2241|  44.0k|    SQRADDDB;
  ------------------
  |  |  129|  44.0k|    __asm__(                                                      \
  |  |  130|  44.0k|        "addq %6,%0         \n\t"                                 \
  |  |  131|  44.0k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|  44.0k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|  44.0k|        "addq %6,%0         \n\t"                                 \
  |  |  134|  44.0k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|  44.0k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|  44.0k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|  44.0k|        : "cc");
  ------------------
 2242|  44.0k|    COMBA_STORE(b[15]);
  ------------------
  |  |   67|  44.0k|    x = c0;
  ------------------
 2243|       |
 2244|       |    /* output 16 */
 2245|  44.0k|    CARRY_FORWARD;
  ------------------
  |  |   73|  44.0k|    do {              \
  |  |   74|  44.0k|        c0 = c1;      \
  |  |   75|  44.0k|        c1 = c2;      \
  |  |   76|  44.0k|        c2 = 0;       \
  |  |   77|  44.0k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2246|  44.0k|    SQRADDSC(a[1], a[15]);
  ------------------
  |  |  107|  44.0k|    __asm__(                              \
  |  |  108|  44.0k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|  44.0k|        "mulq  %4           \n\t"         \
  |  |  110|  44.0k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|  44.0k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|  44.0k|        "xorq  %2,%2        \n\t"         \
  |  |  113|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|  44.0k|        : "g"(i), "g"(j)                  \
  |  |  115|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2247|  44.0k|    SQRADDAC(a[2], a[14]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2248|  44.0k|    SQRADDAC(a[3], a[13]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2249|  44.0k|    SQRADDAC(a[4], a[12]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2250|  44.0k|    SQRADDAC(a[5], a[11]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2251|  44.0k|    SQRADDAC(a[6], a[10]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2252|  44.0k|    SQRADDAC(a[7], a[9]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2253|  44.0k|    SQRADDDB;
  ------------------
  |  |  129|  44.0k|    __asm__(                                                      \
  |  |  130|  44.0k|        "addq %6,%0         \n\t"                                 \
  |  |  131|  44.0k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|  44.0k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|  44.0k|        "addq %6,%0         \n\t"                                 \
  |  |  134|  44.0k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|  44.0k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|  44.0k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|  44.0k|        : "cc");
  ------------------
 2254|  44.0k|    SQRADD(a[8], a[8]);
  ------------------
  |  |   82|  44.0k|    __asm__(                                \
  |  |   83|  44.0k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|  44.0k|        "mulq  %%rax        \n\t"           \
  |  |   85|  44.0k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|  44.0k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|  44.0k|        "adcq  $0,%2        \n\t"           \
  |  |   88|  44.0k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2255|  44.0k|    COMBA_STORE(b[16]);
  ------------------
  |  |   67|  44.0k|    x = c0;
  ------------------
 2256|       |
 2257|       |    /* output 17 */
 2258|  44.0k|    CARRY_FORWARD;
  ------------------
  |  |   73|  44.0k|    do {              \
  |  |   74|  44.0k|        c0 = c1;      \
  |  |   75|  44.0k|        c1 = c2;      \
  |  |   76|  44.0k|        c2 = 0;       \
  |  |   77|  44.0k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2259|  44.0k|    SQRADDSC(a[2], a[15]);
  ------------------
  |  |  107|  44.0k|    __asm__(                              \
  |  |  108|  44.0k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|  44.0k|        "mulq  %4           \n\t"         \
  |  |  110|  44.0k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|  44.0k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|  44.0k|        "xorq  %2,%2        \n\t"         \
  |  |  113|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|  44.0k|        : "g"(i), "g"(j)                  \
  |  |  115|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2260|  44.0k|    SQRADDAC(a[3], a[14]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2261|  44.0k|    SQRADDAC(a[4], a[13]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2262|  44.0k|    SQRADDAC(a[5], a[12]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2263|  44.0k|    SQRADDAC(a[6], a[11]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2264|  44.0k|    SQRADDAC(a[7], a[10]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2265|  44.0k|    SQRADDAC(a[8], a[9]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2266|  44.0k|    SQRADDDB;
  ------------------
  |  |  129|  44.0k|    __asm__(                                                      \
  |  |  130|  44.0k|        "addq %6,%0         \n\t"                                 \
  |  |  131|  44.0k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|  44.0k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|  44.0k|        "addq %6,%0         \n\t"                                 \
  |  |  134|  44.0k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|  44.0k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|  44.0k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|  44.0k|        : "cc");
  ------------------
 2267|  44.0k|    COMBA_STORE(b[17]);
  ------------------
  |  |   67|  44.0k|    x = c0;
  ------------------
 2268|       |
 2269|       |    /* output 18 */
 2270|  44.0k|    CARRY_FORWARD;
  ------------------
  |  |   73|  44.0k|    do {              \
  |  |   74|  44.0k|        c0 = c1;      \
  |  |   75|  44.0k|        c1 = c2;      \
  |  |   76|  44.0k|        c2 = 0;       \
  |  |   77|  44.0k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2271|  44.0k|    SQRADDSC(a[3], a[15]);
  ------------------
  |  |  107|  44.0k|    __asm__(                              \
  |  |  108|  44.0k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|  44.0k|        "mulq  %4           \n\t"         \
  |  |  110|  44.0k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|  44.0k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|  44.0k|        "xorq  %2,%2        \n\t"         \
  |  |  113|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|  44.0k|        : "g"(i), "g"(j)                  \
  |  |  115|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2272|  44.0k|    SQRADDAC(a[4], a[14]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2273|  44.0k|    SQRADDAC(a[5], a[13]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2274|  44.0k|    SQRADDAC(a[6], a[12]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2275|  44.0k|    SQRADDAC(a[7], a[11]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2276|  44.0k|    SQRADDAC(a[8], a[10]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2277|  44.0k|    SQRADDDB;
  ------------------
  |  |  129|  44.0k|    __asm__(                                                      \
  |  |  130|  44.0k|        "addq %6,%0         \n\t"                                 \
  |  |  131|  44.0k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|  44.0k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|  44.0k|        "addq %6,%0         \n\t"                                 \
  |  |  134|  44.0k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|  44.0k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|  44.0k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|  44.0k|        : "cc");
  ------------------
 2278|  44.0k|    SQRADD(a[9], a[9]);
  ------------------
  |  |   82|  44.0k|    __asm__(                                \
  |  |   83|  44.0k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|  44.0k|        "mulq  %%rax        \n\t"           \
  |  |   85|  44.0k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|  44.0k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|  44.0k|        "adcq  $0,%2        \n\t"           \
  |  |   88|  44.0k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2279|  44.0k|    COMBA_STORE(b[18]);
  ------------------
  |  |   67|  44.0k|    x = c0;
  ------------------
 2280|       |
 2281|       |    /* output 19 */
 2282|  44.0k|    CARRY_FORWARD;
  ------------------
  |  |   73|  44.0k|    do {              \
  |  |   74|  44.0k|        c0 = c1;      \
  |  |   75|  44.0k|        c1 = c2;      \
  |  |   76|  44.0k|        c2 = 0;       \
  |  |   77|  44.0k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2283|  44.0k|    SQRADDSC(a[4], a[15]);
  ------------------
  |  |  107|  44.0k|    __asm__(                              \
  |  |  108|  44.0k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|  44.0k|        "mulq  %4           \n\t"         \
  |  |  110|  44.0k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|  44.0k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|  44.0k|        "xorq  %2,%2        \n\t"         \
  |  |  113|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|  44.0k|        : "g"(i), "g"(j)                  \
  |  |  115|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2284|  44.0k|    SQRADDAC(a[5], a[14]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2285|  44.0k|    SQRADDAC(a[6], a[13]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2286|  44.0k|    SQRADDAC(a[7], a[12]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2287|  44.0k|    SQRADDAC(a[8], a[11]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2288|  44.0k|    SQRADDAC(a[9], a[10]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2289|  44.0k|    SQRADDDB;
  ------------------
  |  |  129|  44.0k|    __asm__(                                                      \
  |  |  130|  44.0k|        "addq %6,%0         \n\t"                                 \
  |  |  131|  44.0k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|  44.0k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|  44.0k|        "addq %6,%0         \n\t"                                 \
  |  |  134|  44.0k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|  44.0k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|  44.0k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|  44.0k|        : "cc");
  ------------------
 2290|  44.0k|    COMBA_STORE(b[19]);
  ------------------
  |  |   67|  44.0k|    x = c0;
  ------------------
 2291|       |
 2292|       |    /* output 20 */
 2293|  44.0k|    CARRY_FORWARD;
  ------------------
  |  |   73|  44.0k|    do {              \
  |  |   74|  44.0k|        c0 = c1;      \
  |  |   75|  44.0k|        c1 = c2;      \
  |  |   76|  44.0k|        c2 = 0;       \
  |  |   77|  44.0k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2294|  44.0k|    SQRADDSC(a[5], a[15]);
  ------------------
  |  |  107|  44.0k|    __asm__(                              \
  |  |  108|  44.0k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|  44.0k|        "mulq  %4           \n\t"         \
  |  |  110|  44.0k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|  44.0k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|  44.0k|        "xorq  %2,%2        \n\t"         \
  |  |  113|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|  44.0k|        : "g"(i), "g"(j)                  \
  |  |  115|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2295|  44.0k|    SQRADDAC(a[6], a[14]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2296|  44.0k|    SQRADDAC(a[7], a[13]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2297|  44.0k|    SQRADDAC(a[8], a[12]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2298|  44.0k|    SQRADDAC(a[9], a[11]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2299|  44.0k|    SQRADDDB;
  ------------------
  |  |  129|  44.0k|    __asm__(                                                      \
  |  |  130|  44.0k|        "addq %6,%0         \n\t"                                 \
  |  |  131|  44.0k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|  44.0k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|  44.0k|        "addq %6,%0         \n\t"                                 \
  |  |  134|  44.0k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|  44.0k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|  44.0k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|  44.0k|        : "cc");
  ------------------
 2300|  44.0k|    SQRADD(a[10], a[10]);
  ------------------
  |  |   82|  44.0k|    __asm__(                                \
  |  |   83|  44.0k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|  44.0k|        "mulq  %%rax        \n\t"           \
  |  |   85|  44.0k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|  44.0k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|  44.0k|        "adcq  $0,%2        \n\t"           \
  |  |   88|  44.0k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2301|  44.0k|    COMBA_STORE(b[20]);
  ------------------
  |  |   67|  44.0k|    x = c0;
  ------------------
 2302|       |
 2303|       |    /* output 21 */
 2304|  44.0k|    CARRY_FORWARD;
  ------------------
  |  |   73|  44.0k|    do {              \
  |  |   74|  44.0k|        c0 = c1;      \
  |  |   75|  44.0k|        c1 = c2;      \
  |  |   76|  44.0k|        c2 = 0;       \
  |  |   77|  44.0k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2305|  44.0k|    SQRADDSC(a[6], a[15]);
  ------------------
  |  |  107|  44.0k|    __asm__(                              \
  |  |  108|  44.0k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|  44.0k|        "mulq  %4           \n\t"         \
  |  |  110|  44.0k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|  44.0k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|  44.0k|        "xorq  %2,%2        \n\t"         \
  |  |  113|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|  44.0k|        : "g"(i), "g"(j)                  \
  |  |  115|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2306|  44.0k|    SQRADDAC(a[7], a[14]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2307|  44.0k|    SQRADDAC(a[8], a[13]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2308|  44.0k|    SQRADDAC(a[9], a[12]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2309|  44.0k|    SQRADDAC(a[10], a[11]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2310|  44.0k|    SQRADDDB;
  ------------------
  |  |  129|  44.0k|    __asm__(                                                      \
  |  |  130|  44.0k|        "addq %6,%0         \n\t"                                 \
  |  |  131|  44.0k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|  44.0k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|  44.0k|        "addq %6,%0         \n\t"                                 \
  |  |  134|  44.0k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|  44.0k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|  44.0k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|  44.0k|        : "cc");
  ------------------
 2311|  44.0k|    COMBA_STORE(b[21]);
  ------------------
  |  |   67|  44.0k|    x = c0;
  ------------------
 2312|       |
 2313|       |    /* output 22 */
 2314|  44.0k|    CARRY_FORWARD;
  ------------------
  |  |   73|  44.0k|    do {              \
  |  |   74|  44.0k|        c0 = c1;      \
  |  |   75|  44.0k|        c1 = c2;      \
  |  |   76|  44.0k|        c2 = 0;       \
  |  |   77|  44.0k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2315|  44.0k|    SQRADDSC(a[7], a[15]);
  ------------------
  |  |  107|  44.0k|    __asm__(                              \
  |  |  108|  44.0k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|  44.0k|        "mulq  %4           \n\t"         \
  |  |  110|  44.0k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|  44.0k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|  44.0k|        "xorq  %2,%2        \n\t"         \
  |  |  113|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|  44.0k|        : "g"(i), "g"(j)                  \
  |  |  115|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2316|  44.0k|    SQRADDAC(a[8], a[14]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2317|  44.0k|    SQRADDAC(a[9], a[13]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2318|  44.0k|    SQRADDAC(a[10], a[12]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2319|  44.0k|    SQRADDDB;
  ------------------
  |  |  129|  44.0k|    __asm__(                                                      \
  |  |  130|  44.0k|        "addq %6,%0         \n\t"                                 \
  |  |  131|  44.0k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|  44.0k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|  44.0k|        "addq %6,%0         \n\t"                                 \
  |  |  134|  44.0k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|  44.0k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|  44.0k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|  44.0k|        : "cc");
  ------------------
 2320|  44.0k|    SQRADD(a[11], a[11]);
  ------------------
  |  |   82|  44.0k|    __asm__(                                \
  |  |   83|  44.0k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|  44.0k|        "mulq  %%rax        \n\t"           \
  |  |   85|  44.0k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|  44.0k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|  44.0k|        "adcq  $0,%2        \n\t"           \
  |  |   88|  44.0k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2321|  44.0k|    COMBA_STORE(b[22]);
  ------------------
  |  |   67|  44.0k|    x = c0;
  ------------------
 2322|       |
 2323|       |    /* output 23 */
 2324|  44.0k|    CARRY_FORWARD;
  ------------------
  |  |   73|  44.0k|    do {              \
  |  |   74|  44.0k|        c0 = c1;      \
  |  |   75|  44.0k|        c1 = c2;      \
  |  |   76|  44.0k|        c2 = 0;       \
  |  |   77|  44.0k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2325|  44.0k|    SQRADDSC(a[8], a[15]);
  ------------------
  |  |  107|  44.0k|    __asm__(                              \
  |  |  108|  44.0k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|  44.0k|        "mulq  %4           \n\t"         \
  |  |  110|  44.0k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|  44.0k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|  44.0k|        "xorq  %2,%2        \n\t"         \
  |  |  113|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|  44.0k|        : "g"(i), "g"(j)                  \
  |  |  115|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2326|  44.0k|    SQRADDAC(a[9], a[14]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2327|  44.0k|    SQRADDAC(a[10], a[13]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2328|  44.0k|    SQRADDAC(a[11], a[12]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2329|  44.0k|    SQRADDDB;
  ------------------
  |  |  129|  44.0k|    __asm__(                                                      \
  |  |  130|  44.0k|        "addq %6,%0         \n\t"                                 \
  |  |  131|  44.0k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|  44.0k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|  44.0k|        "addq %6,%0         \n\t"                                 \
  |  |  134|  44.0k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|  44.0k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|  44.0k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|  44.0k|        : "cc");
  ------------------
 2330|  44.0k|    COMBA_STORE(b[23]);
  ------------------
  |  |   67|  44.0k|    x = c0;
  ------------------
 2331|       |
 2332|       |    /* output 24 */
 2333|  44.0k|    CARRY_FORWARD;
  ------------------
  |  |   73|  44.0k|    do {              \
  |  |   74|  44.0k|        c0 = c1;      \
  |  |   75|  44.0k|        c1 = c2;      \
  |  |   76|  44.0k|        c2 = 0;       \
  |  |   77|  44.0k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2334|  44.0k|    SQRADDSC(a[9], a[15]);
  ------------------
  |  |  107|  44.0k|    __asm__(                              \
  |  |  108|  44.0k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|  44.0k|        "mulq  %4           \n\t"         \
  |  |  110|  44.0k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|  44.0k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|  44.0k|        "xorq  %2,%2        \n\t"         \
  |  |  113|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|  44.0k|        : "g"(i), "g"(j)                  \
  |  |  115|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2335|  44.0k|    SQRADDAC(a[10], a[14]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2336|  44.0k|    SQRADDAC(a[11], a[13]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2337|  44.0k|    SQRADDDB;
  ------------------
  |  |  129|  44.0k|    __asm__(                                                      \
  |  |  130|  44.0k|        "addq %6,%0         \n\t"                                 \
  |  |  131|  44.0k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|  44.0k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|  44.0k|        "addq %6,%0         \n\t"                                 \
  |  |  134|  44.0k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|  44.0k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|  44.0k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|  44.0k|        : "cc");
  ------------------
 2338|  44.0k|    SQRADD(a[12], a[12]);
  ------------------
  |  |   82|  44.0k|    __asm__(                                \
  |  |   83|  44.0k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|  44.0k|        "mulq  %%rax        \n\t"           \
  |  |   85|  44.0k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|  44.0k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|  44.0k|        "adcq  $0,%2        \n\t"           \
  |  |   88|  44.0k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2339|  44.0k|    COMBA_STORE(b[24]);
  ------------------
  |  |   67|  44.0k|    x = c0;
  ------------------
 2340|       |
 2341|       |    /* output 25 */
 2342|  44.0k|    CARRY_FORWARD;
  ------------------
  |  |   73|  44.0k|    do {              \
  |  |   74|  44.0k|        c0 = c1;      \
  |  |   75|  44.0k|        c1 = c2;      \
  |  |   76|  44.0k|        c2 = 0;       \
  |  |   77|  44.0k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2343|  44.0k|    SQRADDSC(a[10], a[15]);
  ------------------
  |  |  107|  44.0k|    __asm__(                              \
  |  |  108|  44.0k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|  44.0k|        "mulq  %4           \n\t"         \
  |  |  110|  44.0k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|  44.0k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|  44.0k|        "xorq  %2,%2        \n\t"         \
  |  |  113|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|  44.0k|        : "g"(i), "g"(j)                  \
  |  |  115|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2344|  44.0k|    SQRADDAC(a[11], a[14]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2345|  44.0k|    SQRADDAC(a[12], a[13]);
  ------------------
  |  |  118|  44.0k|    __asm__(                                           \
  |  |  119|  44.0k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|  44.0k|        "mulq  %7           \n\t"                      \
  |  |  121|  44.0k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|  44.0k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|  44.0k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|  44.0k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|  44.0k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2346|  44.0k|    SQRADDDB;
  ------------------
  |  |  129|  44.0k|    __asm__(                                                      \
  |  |  130|  44.0k|        "addq %6,%0         \n\t"                                 \
  |  |  131|  44.0k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|  44.0k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|  44.0k|        "addq %6,%0         \n\t"                                 \
  |  |  134|  44.0k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|  44.0k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|  44.0k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|  44.0k|        : "cc");
  ------------------
 2347|  44.0k|    COMBA_STORE(b[25]);
  ------------------
  |  |   67|  44.0k|    x = c0;
  ------------------
 2348|       |
 2349|       |    /* output 26 */
 2350|  44.0k|    CARRY_FORWARD;
  ------------------
  |  |   73|  44.0k|    do {              \
  |  |   74|  44.0k|        c0 = c1;      \
  |  |   75|  44.0k|        c1 = c2;      \
  |  |   76|  44.0k|        c2 = 0;       \
  |  |   77|  44.0k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2351|  44.0k|    SQRADD2(a[11], a[15]);
  ------------------
  |  |   93|  44.0k|    __asm__(                                        \
  |  |   94|  44.0k|        "movq  %6,%%rax     \n\t"                   \
  |  |   95|  44.0k|        "mulq  %7           \n\t"                   \
  |  |   96|  44.0k|        "addq  %%rax,%0     \n\t"                   \
  |  |   97|  44.0k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   98|  44.0k|        "adcq  $0,%2        \n\t"                   \
  |  |   99|  44.0k|        "addq  %%rax,%0     \n\t"                   \
  |  |  100|  44.0k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |  101|  44.0k|        "adcq  $0,%2        \n\t"                   \
  |  |  102|  44.0k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |  103|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |  104|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2352|  44.0k|    SQRADD2(a[12], a[14]);
  ------------------
  |  |   93|  44.0k|    __asm__(                                        \
  |  |   94|  44.0k|        "movq  %6,%%rax     \n\t"                   \
  |  |   95|  44.0k|        "mulq  %7           \n\t"                   \
  |  |   96|  44.0k|        "addq  %%rax,%0     \n\t"                   \
  |  |   97|  44.0k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   98|  44.0k|        "adcq  $0,%2        \n\t"                   \
  |  |   99|  44.0k|        "addq  %%rax,%0     \n\t"                   \
  |  |  100|  44.0k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |  101|  44.0k|        "adcq  $0,%2        \n\t"                   \
  |  |  102|  44.0k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |  103|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |  104|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2353|  44.0k|    SQRADD(a[13], a[13]);
  ------------------
  |  |   82|  44.0k|    __asm__(                                \
  |  |   83|  44.0k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|  44.0k|        "mulq  %%rax        \n\t"           \
  |  |   85|  44.0k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|  44.0k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|  44.0k|        "adcq  $0,%2        \n\t"           \
  |  |   88|  44.0k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2354|  44.0k|    COMBA_STORE(b[26]);
  ------------------
  |  |   67|  44.0k|    x = c0;
  ------------------
 2355|       |
 2356|       |    /* output 27 */
 2357|  44.0k|    CARRY_FORWARD;
  ------------------
  |  |   73|  44.0k|    do {              \
  |  |   74|  44.0k|        c0 = c1;      \
  |  |   75|  44.0k|        c1 = c2;      \
  |  |   76|  44.0k|        c2 = 0;       \
  |  |   77|  44.0k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2358|  44.0k|    SQRADD2(a[12], a[15]);
  ------------------
  |  |   93|  44.0k|    __asm__(                                        \
  |  |   94|  44.0k|        "movq  %6,%%rax     \n\t"                   \
  |  |   95|  44.0k|        "mulq  %7           \n\t"                   \
  |  |   96|  44.0k|        "addq  %%rax,%0     \n\t"                   \
  |  |   97|  44.0k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   98|  44.0k|        "adcq  $0,%2        \n\t"                   \
  |  |   99|  44.0k|        "addq  %%rax,%0     \n\t"                   \
  |  |  100|  44.0k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |  101|  44.0k|        "adcq  $0,%2        \n\t"                   \
  |  |  102|  44.0k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |  103|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |  104|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2359|  44.0k|    SQRADD2(a[13], a[14]);
  ------------------
  |  |   93|  44.0k|    __asm__(                                        \
  |  |   94|  44.0k|        "movq  %6,%%rax     \n\t"                   \
  |  |   95|  44.0k|        "mulq  %7           \n\t"                   \
  |  |   96|  44.0k|        "addq  %%rax,%0     \n\t"                   \
  |  |   97|  44.0k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   98|  44.0k|        "adcq  $0,%2        \n\t"                   \
  |  |   99|  44.0k|        "addq  %%rax,%0     \n\t"                   \
  |  |  100|  44.0k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |  101|  44.0k|        "adcq  $0,%2        \n\t"                   \
  |  |  102|  44.0k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |  103|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |  104|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2360|  44.0k|    COMBA_STORE(b[27]);
  ------------------
  |  |   67|  44.0k|    x = c0;
  ------------------
 2361|       |
 2362|       |    /* output 28 */
 2363|  44.0k|    CARRY_FORWARD;
  ------------------
  |  |   73|  44.0k|    do {              \
  |  |   74|  44.0k|        c0 = c1;      \
  |  |   75|  44.0k|        c1 = c2;      \
  |  |   76|  44.0k|        c2 = 0;       \
  |  |   77|  44.0k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2364|  44.0k|    SQRADD2(a[13], a[15]);
  ------------------
  |  |   93|  44.0k|    __asm__(                                        \
  |  |   94|  44.0k|        "movq  %6,%%rax     \n\t"                   \
  |  |   95|  44.0k|        "mulq  %7           \n\t"                   \
  |  |   96|  44.0k|        "addq  %%rax,%0     \n\t"                   \
  |  |   97|  44.0k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   98|  44.0k|        "adcq  $0,%2        \n\t"                   \
  |  |   99|  44.0k|        "addq  %%rax,%0     \n\t"                   \
  |  |  100|  44.0k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |  101|  44.0k|        "adcq  $0,%2        \n\t"                   \
  |  |  102|  44.0k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |  103|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |  104|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2365|  44.0k|    SQRADD(a[14], a[14]);
  ------------------
  |  |   82|  44.0k|    __asm__(                                \
  |  |   83|  44.0k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|  44.0k|        "mulq  %%rax        \n\t"           \
  |  |   85|  44.0k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|  44.0k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|  44.0k|        "adcq  $0,%2        \n\t"           \
  |  |   88|  44.0k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2366|  44.0k|    COMBA_STORE(b[28]);
  ------------------
  |  |   67|  44.0k|    x = c0;
  ------------------
 2367|       |
 2368|       |    /* output 29 */
 2369|  44.0k|    CARRY_FORWARD;
  ------------------
  |  |   73|  44.0k|    do {              \
  |  |   74|  44.0k|        c0 = c1;      \
  |  |   75|  44.0k|        c1 = c2;      \
  |  |   76|  44.0k|        c2 = 0;       \
  |  |   77|  44.0k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2370|  44.0k|    SQRADD2(a[14], a[15]);
  ------------------
  |  |   93|  44.0k|    __asm__(                                        \
  |  |   94|  44.0k|        "movq  %6,%%rax     \n\t"                   \
  |  |   95|  44.0k|        "mulq  %7           \n\t"                   \
  |  |   96|  44.0k|        "addq  %%rax,%0     \n\t"                   \
  |  |   97|  44.0k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   98|  44.0k|        "adcq  $0,%2        \n\t"                   \
  |  |   99|  44.0k|        "addq  %%rax,%0     \n\t"                   \
  |  |  100|  44.0k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |  101|  44.0k|        "adcq  $0,%2        \n\t"                   \
  |  |  102|  44.0k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |  103|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |  104|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2371|  44.0k|    COMBA_STORE(b[29]);
  ------------------
  |  |   67|  44.0k|    x = c0;
  ------------------
 2372|       |
 2373|       |    /* output 30 */
 2374|  44.0k|    CARRY_FORWARD;
  ------------------
  |  |   73|  44.0k|    do {              \
  |  |   74|  44.0k|        c0 = c1;      \
  |  |   75|  44.0k|        c1 = c2;      \
  |  |   76|  44.0k|        c2 = 0;       \
  |  |   77|  44.0k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2375|  44.0k|    SQRADD(a[15], a[15]);
  ------------------
  |  |   82|  44.0k|    __asm__(                                \
  |  |   83|  44.0k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|  44.0k|        "mulq  %%rax        \n\t"           \
  |  |   85|  44.0k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|  44.0k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|  44.0k|        "adcq  $0,%2        \n\t"           \
  |  |   88|  44.0k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|  44.0k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|  44.0k|        : "%rax", "%rdx", "cc");
  ------------------
 2376|  44.0k|    COMBA_STORE(b[30]);
  ------------------
  |  |   67|  44.0k|    x = c0;
  ------------------
 2377|  44.0k|    COMBA_STORE2(b[31]);
  ------------------
  |  |   70|  44.0k|    x = c1;
  ------------------
 2378|  44.0k|    COMBA_FINI;
 2379|       |
 2380|  44.0k|    B->used = 32;
 2381|  44.0k|    B->sign = ZPOS;
  ------------------
  |  |  326|  44.0k|#define ZPOS MP_ZPOS
  |  |  ------------------
  |  |  |  |   37|  44.0k|#define MP_ZPOS 0
  |  |  ------------------
  ------------------
 2382|  44.0k|    memcpy(B->dp, b, 32 * sizeof(mp_digit));
 2383|  44.0k|    mp_clamp(B);
  ------------------
  |  |   26|  44.0k|    {                                                    \
  |  |   27|  44.4k|        while ((a)->used && (a)->dp[(a)->used - 1] == 0) \
  |  |  ------------------
  |  |  |  Branch (27:16): [True: 44.4k, False: 0]
  |  |  |  Branch (27:29): [True: 406, False: 44.0k]
  |  |  ------------------
  |  |   28|  44.0k|            --((a)->used);                               \
  |  |   29|  44.0k|        (a)->sign = (a)->used ? (a)->sign : ZPOS;        \
  |  |  ------------------
  |  |  |  |  326|      0|#define ZPOS MP_ZPOS
  |  |  |  |  ------------------
  |  |  |  |  |  |   37|  44.0k|#define MP_ZPOS 0
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (29:21): [True: 44.0k, False: 0]
  |  |  ------------------
  |  |   30|  44.0k|    }
  ------------------
 2384|  44.0k|}
s_mp_sqr_comba_32:
 2388|   846k|{
 2389|   846k|    mp_digit *a, b[64], c0, c1, c2, sc0, sc1, sc2;
 2390|       |
 2391|   846k|    a = A->dp;
 2392|   846k|    COMBA_START;
 2393|       |
 2394|       |    /* clear carries */
 2395|   846k|    CLEAR_CARRY;
  ------------------
  |  |   64|   846k|    c0 = c1 = c2 = 0;
  ------------------
 2396|       |
 2397|       |    /* output 0 */
 2398|   846k|    SQRADD(a[0], a[0]);
  ------------------
  |  |   82|   846k|    __asm__(                                \
  |  |   83|   846k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|   846k|        "mulq  %%rax        \n\t"           \
  |  |   85|   846k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|   846k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|   846k|        "adcq  $0,%2        \n\t"           \
  |  |   88|   846k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|   846k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2399|   846k|    COMBA_STORE(b[0]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 2400|       |
 2401|       |    /* output 1 */
 2402|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2403|   846k|    SQRADD2(a[0], a[1]);
  ------------------
  |  |   93|   846k|    __asm__(                                        \
  |  |   94|   846k|        "movq  %6,%%rax     \n\t"                   \
  |  |   95|   846k|        "mulq  %7           \n\t"                   \
  |  |   96|   846k|        "addq  %%rax,%0     \n\t"                   \
  |  |   97|   846k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   98|   846k|        "adcq  $0,%2        \n\t"                   \
  |  |   99|   846k|        "addq  %%rax,%0     \n\t"                   \
  |  |  100|   846k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |  101|   846k|        "adcq  $0,%2        \n\t"                   \
  |  |  102|   846k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |  103|   846k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |  104|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2404|   846k|    COMBA_STORE(b[1]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 2405|       |
 2406|       |    /* output 2 */
 2407|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2408|   846k|    SQRADD2(a[0], a[2]);
  ------------------
  |  |   93|   846k|    __asm__(                                        \
  |  |   94|   846k|        "movq  %6,%%rax     \n\t"                   \
  |  |   95|   846k|        "mulq  %7           \n\t"                   \
  |  |   96|   846k|        "addq  %%rax,%0     \n\t"                   \
  |  |   97|   846k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   98|   846k|        "adcq  $0,%2        \n\t"                   \
  |  |   99|   846k|        "addq  %%rax,%0     \n\t"                   \
  |  |  100|   846k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |  101|   846k|        "adcq  $0,%2        \n\t"                   \
  |  |  102|   846k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |  103|   846k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |  104|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2409|   846k|    SQRADD(a[1], a[1]);
  ------------------
  |  |   82|   846k|    __asm__(                                \
  |  |   83|   846k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|   846k|        "mulq  %%rax        \n\t"           \
  |  |   85|   846k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|   846k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|   846k|        "adcq  $0,%2        \n\t"           \
  |  |   88|   846k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|   846k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2410|   846k|    COMBA_STORE(b[2]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 2411|       |
 2412|       |    /* output 3 */
 2413|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2414|   846k|    SQRADD2(a[0], a[3]);
  ------------------
  |  |   93|   846k|    __asm__(                                        \
  |  |   94|   846k|        "movq  %6,%%rax     \n\t"                   \
  |  |   95|   846k|        "mulq  %7           \n\t"                   \
  |  |   96|   846k|        "addq  %%rax,%0     \n\t"                   \
  |  |   97|   846k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   98|   846k|        "adcq  $0,%2        \n\t"                   \
  |  |   99|   846k|        "addq  %%rax,%0     \n\t"                   \
  |  |  100|   846k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |  101|   846k|        "adcq  $0,%2        \n\t"                   \
  |  |  102|   846k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |  103|   846k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |  104|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2415|   846k|    SQRADD2(a[1], a[2]);
  ------------------
  |  |   93|   846k|    __asm__(                                        \
  |  |   94|   846k|        "movq  %6,%%rax     \n\t"                   \
  |  |   95|   846k|        "mulq  %7           \n\t"                   \
  |  |   96|   846k|        "addq  %%rax,%0     \n\t"                   \
  |  |   97|   846k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   98|   846k|        "adcq  $0,%2        \n\t"                   \
  |  |   99|   846k|        "addq  %%rax,%0     \n\t"                   \
  |  |  100|   846k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |  101|   846k|        "adcq  $0,%2        \n\t"                   \
  |  |  102|   846k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |  103|   846k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |  104|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2416|   846k|    COMBA_STORE(b[3]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 2417|       |
 2418|       |    /* output 4 */
 2419|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2420|   846k|    SQRADD2(a[0], a[4]);
  ------------------
  |  |   93|   846k|    __asm__(                                        \
  |  |   94|   846k|        "movq  %6,%%rax     \n\t"                   \
  |  |   95|   846k|        "mulq  %7           \n\t"                   \
  |  |   96|   846k|        "addq  %%rax,%0     \n\t"                   \
  |  |   97|   846k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   98|   846k|        "adcq  $0,%2        \n\t"                   \
  |  |   99|   846k|        "addq  %%rax,%0     \n\t"                   \
  |  |  100|   846k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |  101|   846k|        "adcq  $0,%2        \n\t"                   \
  |  |  102|   846k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |  103|   846k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |  104|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2421|   846k|    SQRADD2(a[1], a[3]);
  ------------------
  |  |   93|   846k|    __asm__(                                        \
  |  |   94|   846k|        "movq  %6,%%rax     \n\t"                   \
  |  |   95|   846k|        "mulq  %7           \n\t"                   \
  |  |   96|   846k|        "addq  %%rax,%0     \n\t"                   \
  |  |   97|   846k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   98|   846k|        "adcq  $0,%2        \n\t"                   \
  |  |   99|   846k|        "addq  %%rax,%0     \n\t"                   \
  |  |  100|   846k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |  101|   846k|        "adcq  $0,%2        \n\t"                   \
  |  |  102|   846k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |  103|   846k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |  104|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2422|   846k|    SQRADD(a[2], a[2]);
  ------------------
  |  |   82|   846k|    __asm__(                                \
  |  |   83|   846k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|   846k|        "mulq  %%rax        \n\t"           \
  |  |   85|   846k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|   846k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|   846k|        "adcq  $0,%2        \n\t"           \
  |  |   88|   846k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|   846k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2423|   846k|    COMBA_STORE(b[4]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 2424|       |
 2425|       |    /* output 5 */
 2426|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2427|   846k|    SQRADDSC(a[0], a[5]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2428|   846k|    SQRADDAC(a[1], a[4]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2429|   846k|    SQRADDAC(a[2], a[3]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2430|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 2431|   846k|    COMBA_STORE(b[5]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 2432|       |
 2433|       |    /* output 6 */
 2434|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2435|   846k|    SQRADDSC(a[0], a[6]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2436|   846k|    SQRADDAC(a[1], a[5]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2437|   846k|    SQRADDAC(a[2], a[4]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2438|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 2439|   846k|    SQRADD(a[3], a[3]);
  ------------------
  |  |   82|   846k|    __asm__(                                \
  |  |   83|   846k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|   846k|        "mulq  %%rax        \n\t"           \
  |  |   85|   846k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|   846k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|   846k|        "adcq  $0,%2        \n\t"           \
  |  |   88|   846k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|   846k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2440|   846k|    COMBA_STORE(b[6]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 2441|       |
 2442|       |    /* output 7 */
 2443|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2444|   846k|    SQRADDSC(a[0], a[7]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2445|   846k|    SQRADDAC(a[1], a[6]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2446|   846k|    SQRADDAC(a[2], a[5]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2447|   846k|    SQRADDAC(a[3], a[4]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2448|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 2449|   846k|    COMBA_STORE(b[7]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 2450|       |
 2451|       |    /* output 8 */
 2452|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2453|   846k|    SQRADDSC(a[0], a[8]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2454|   846k|    SQRADDAC(a[1], a[7]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2455|   846k|    SQRADDAC(a[2], a[6]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2456|   846k|    SQRADDAC(a[3], a[5]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2457|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 2458|   846k|    SQRADD(a[4], a[4]);
  ------------------
  |  |   82|   846k|    __asm__(                                \
  |  |   83|   846k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|   846k|        "mulq  %%rax        \n\t"           \
  |  |   85|   846k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|   846k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|   846k|        "adcq  $0,%2        \n\t"           \
  |  |   88|   846k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|   846k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2459|   846k|    COMBA_STORE(b[8]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 2460|       |
 2461|       |    /* output 9 */
 2462|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2463|   846k|    SQRADDSC(a[0], a[9]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2464|   846k|    SQRADDAC(a[1], a[8]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2465|   846k|    SQRADDAC(a[2], a[7]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2466|   846k|    SQRADDAC(a[3], a[6]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2467|   846k|    SQRADDAC(a[4], a[5]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2468|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 2469|   846k|    COMBA_STORE(b[9]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 2470|       |
 2471|       |    /* output 10 */
 2472|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2473|   846k|    SQRADDSC(a[0], a[10]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2474|   846k|    SQRADDAC(a[1], a[9]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2475|   846k|    SQRADDAC(a[2], a[8]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2476|   846k|    SQRADDAC(a[3], a[7]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2477|   846k|    SQRADDAC(a[4], a[6]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2478|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 2479|   846k|    SQRADD(a[5], a[5]);
  ------------------
  |  |   82|   846k|    __asm__(                                \
  |  |   83|   846k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|   846k|        "mulq  %%rax        \n\t"           \
  |  |   85|   846k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|   846k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|   846k|        "adcq  $0,%2        \n\t"           \
  |  |   88|   846k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|   846k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2480|   846k|    COMBA_STORE(b[10]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 2481|       |
 2482|       |    /* output 11 */
 2483|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2484|   846k|    SQRADDSC(a[0], a[11]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2485|   846k|    SQRADDAC(a[1], a[10]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2486|   846k|    SQRADDAC(a[2], a[9]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2487|   846k|    SQRADDAC(a[3], a[8]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2488|   846k|    SQRADDAC(a[4], a[7]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2489|   846k|    SQRADDAC(a[5], a[6]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2490|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 2491|   846k|    COMBA_STORE(b[11]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 2492|       |
 2493|       |    /* output 12 */
 2494|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2495|   846k|    SQRADDSC(a[0], a[12]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2496|   846k|    SQRADDAC(a[1], a[11]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2497|   846k|    SQRADDAC(a[2], a[10]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2498|   846k|    SQRADDAC(a[3], a[9]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2499|   846k|    SQRADDAC(a[4], a[8]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2500|   846k|    SQRADDAC(a[5], a[7]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2501|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 2502|   846k|    SQRADD(a[6], a[6]);
  ------------------
  |  |   82|   846k|    __asm__(                                \
  |  |   83|   846k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|   846k|        "mulq  %%rax        \n\t"           \
  |  |   85|   846k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|   846k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|   846k|        "adcq  $0,%2        \n\t"           \
  |  |   88|   846k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|   846k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2503|   846k|    COMBA_STORE(b[12]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 2504|       |
 2505|       |    /* output 13 */
 2506|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2507|   846k|    SQRADDSC(a[0], a[13]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2508|   846k|    SQRADDAC(a[1], a[12]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2509|   846k|    SQRADDAC(a[2], a[11]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2510|   846k|    SQRADDAC(a[3], a[10]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2511|   846k|    SQRADDAC(a[4], a[9]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2512|   846k|    SQRADDAC(a[5], a[8]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2513|   846k|    SQRADDAC(a[6], a[7]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2514|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 2515|   846k|    COMBA_STORE(b[13]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 2516|       |
 2517|       |    /* output 14 */
 2518|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2519|   846k|    SQRADDSC(a[0], a[14]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2520|   846k|    SQRADDAC(a[1], a[13]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2521|   846k|    SQRADDAC(a[2], a[12]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2522|   846k|    SQRADDAC(a[3], a[11]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2523|   846k|    SQRADDAC(a[4], a[10]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2524|   846k|    SQRADDAC(a[5], a[9]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2525|   846k|    SQRADDAC(a[6], a[8]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2526|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 2527|   846k|    SQRADD(a[7], a[7]);
  ------------------
  |  |   82|   846k|    __asm__(                                \
  |  |   83|   846k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|   846k|        "mulq  %%rax        \n\t"           \
  |  |   85|   846k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|   846k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|   846k|        "adcq  $0,%2        \n\t"           \
  |  |   88|   846k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|   846k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2528|   846k|    COMBA_STORE(b[14]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 2529|       |
 2530|       |    /* output 15 */
 2531|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2532|   846k|    SQRADDSC(a[0], a[15]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2533|   846k|    SQRADDAC(a[1], a[14]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2534|   846k|    SQRADDAC(a[2], a[13]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2535|   846k|    SQRADDAC(a[3], a[12]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2536|   846k|    SQRADDAC(a[4], a[11]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2537|   846k|    SQRADDAC(a[5], a[10]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2538|   846k|    SQRADDAC(a[6], a[9]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2539|   846k|    SQRADDAC(a[7], a[8]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2540|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 2541|   846k|    COMBA_STORE(b[15]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 2542|       |
 2543|       |    /* output 16 */
 2544|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2545|   846k|    SQRADDSC(a[0], a[16]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2546|   846k|    SQRADDAC(a[1], a[15]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2547|   846k|    SQRADDAC(a[2], a[14]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2548|   846k|    SQRADDAC(a[3], a[13]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2549|   846k|    SQRADDAC(a[4], a[12]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2550|   846k|    SQRADDAC(a[5], a[11]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2551|   846k|    SQRADDAC(a[6], a[10]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2552|   846k|    SQRADDAC(a[7], a[9]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2553|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 2554|   846k|    SQRADD(a[8], a[8]);
  ------------------
  |  |   82|   846k|    __asm__(                                \
  |  |   83|   846k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|   846k|        "mulq  %%rax        \n\t"           \
  |  |   85|   846k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|   846k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|   846k|        "adcq  $0,%2        \n\t"           \
  |  |   88|   846k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|   846k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2555|   846k|    COMBA_STORE(b[16]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 2556|       |
 2557|       |    /* output 17 */
 2558|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2559|   846k|    SQRADDSC(a[0], a[17]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2560|   846k|    SQRADDAC(a[1], a[16]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2561|   846k|    SQRADDAC(a[2], a[15]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2562|   846k|    SQRADDAC(a[3], a[14]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2563|   846k|    SQRADDAC(a[4], a[13]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2564|   846k|    SQRADDAC(a[5], a[12]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2565|   846k|    SQRADDAC(a[6], a[11]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2566|   846k|    SQRADDAC(a[7], a[10]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2567|   846k|    SQRADDAC(a[8], a[9]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2568|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 2569|   846k|    COMBA_STORE(b[17]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 2570|       |
 2571|       |    /* output 18 */
 2572|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2573|   846k|    SQRADDSC(a[0], a[18]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2574|   846k|    SQRADDAC(a[1], a[17]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2575|   846k|    SQRADDAC(a[2], a[16]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2576|   846k|    SQRADDAC(a[3], a[15]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2577|   846k|    SQRADDAC(a[4], a[14]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2578|   846k|    SQRADDAC(a[5], a[13]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2579|   846k|    SQRADDAC(a[6], a[12]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2580|   846k|    SQRADDAC(a[7], a[11]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2581|   846k|    SQRADDAC(a[8], a[10]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2582|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 2583|   846k|    SQRADD(a[9], a[9]);
  ------------------
  |  |   82|   846k|    __asm__(                                \
  |  |   83|   846k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|   846k|        "mulq  %%rax        \n\t"           \
  |  |   85|   846k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|   846k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|   846k|        "adcq  $0,%2        \n\t"           \
  |  |   88|   846k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|   846k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2584|   846k|    COMBA_STORE(b[18]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 2585|       |
 2586|       |    /* output 19 */
 2587|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2588|   846k|    SQRADDSC(a[0], a[19]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2589|   846k|    SQRADDAC(a[1], a[18]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2590|   846k|    SQRADDAC(a[2], a[17]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2591|   846k|    SQRADDAC(a[3], a[16]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2592|   846k|    SQRADDAC(a[4], a[15]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2593|   846k|    SQRADDAC(a[5], a[14]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2594|   846k|    SQRADDAC(a[6], a[13]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2595|   846k|    SQRADDAC(a[7], a[12]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2596|   846k|    SQRADDAC(a[8], a[11]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2597|   846k|    SQRADDAC(a[9], a[10]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2598|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 2599|   846k|    COMBA_STORE(b[19]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 2600|       |
 2601|       |    /* output 20 */
 2602|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2603|   846k|    SQRADDSC(a[0], a[20]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2604|   846k|    SQRADDAC(a[1], a[19]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2605|   846k|    SQRADDAC(a[2], a[18]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2606|   846k|    SQRADDAC(a[3], a[17]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2607|   846k|    SQRADDAC(a[4], a[16]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2608|   846k|    SQRADDAC(a[5], a[15]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2609|   846k|    SQRADDAC(a[6], a[14]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2610|   846k|    SQRADDAC(a[7], a[13]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2611|   846k|    SQRADDAC(a[8], a[12]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2612|   846k|    SQRADDAC(a[9], a[11]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2613|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 2614|   846k|    SQRADD(a[10], a[10]);
  ------------------
  |  |   82|   846k|    __asm__(                                \
  |  |   83|   846k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|   846k|        "mulq  %%rax        \n\t"           \
  |  |   85|   846k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|   846k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|   846k|        "adcq  $0,%2        \n\t"           \
  |  |   88|   846k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|   846k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2615|   846k|    COMBA_STORE(b[20]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 2616|       |
 2617|       |    /* output 21 */
 2618|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2619|   846k|    SQRADDSC(a[0], a[21]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2620|   846k|    SQRADDAC(a[1], a[20]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2621|   846k|    SQRADDAC(a[2], a[19]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2622|   846k|    SQRADDAC(a[3], a[18]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2623|   846k|    SQRADDAC(a[4], a[17]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2624|   846k|    SQRADDAC(a[5], a[16]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2625|   846k|    SQRADDAC(a[6], a[15]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2626|   846k|    SQRADDAC(a[7], a[14]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2627|   846k|    SQRADDAC(a[8], a[13]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2628|   846k|    SQRADDAC(a[9], a[12]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2629|   846k|    SQRADDAC(a[10], a[11]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2630|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 2631|   846k|    COMBA_STORE(b[21]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 2632|       |
 2633|       |    /* output 22 */
 2634|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2635|   846k|    SQRADDSC(a[0], a[22]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2636|   846k|    SQRADDAC(a[1], a[21]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2637|   846k|    SQRADDAC(a[2], a[20]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2638|   846k|    SQRADDAC(a[3], a[19]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2639|   846k|    SQRADDAC(a[4], a[18]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2640|   846k|    SQRADDAC(a[5], a[17]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2641|   846k|    SQRADDAC(a[6], a[16]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2642|   846k|    SQRADDAC(a[7], a[15]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2643|   846k|    SQRADDAC(a[8], a[14]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2644|   846k|    SQRADDAC(a[9], a[13]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2645|   846k|    SQRADDAC(a[10], a[12]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2646|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 2647|   846k|    SQRADD(a[11], a[11]);
  ------------------
  |  |   82|   846k|    __asm__(                                \
  |  |   83|   846k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|   846k|        "mulq  %%rax        \n\t"           \
  |  |   85|   846k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|   846k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|   846k|        "adcq  $0,%2        \n\t"           \
  |  |   88|   846k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|   846k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2648|   846k|    COMBA_STORE(b[22]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 2649|       |
 2650|       |    /* output 23 */
 2651|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2652|   846k|    SQRADDSC(a[0], a[23]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2653|   846k|    SQRADDAC(a[1], a[22]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2654|   846k|    SQRADDAC(a[2], a[21]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2655|   846k|    SQRADDAC(a[3], a[20]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2656|   846k|    SQRADDAC(a[4], a[19]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2657|   846k|    SQRADDAC(a[5], a[18]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2658|   846k|    SQRADDAC(a[6], a[17]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2659|   846k|    SQRADDAC(a[7], a[16]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2660|   846k|    SQRADDAC(a[8], a[15]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2661|   846k|    SQRADDAC(a[9], a[14]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2662|   846k|    SQRADDAC(a[10], a[13]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2663|   846k|    SQRADDAC(a[11], a[12]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2664|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 2665|   846k|    COMBA_STORE(b[23]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 2666|       |
 2667|       |    /* output 24 */
 2668|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2669|   846k|    SQRADDSC(a[0], a[24]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2670|   846k|    SQRADDAC(a[1], a[23]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2671|   846k|    SQRADDAC(a[2], a[22]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2672|   846k|    SQRADDAC(a[3], a[21]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2673|   846k|    SQRADDAC(a[4], a[20]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2674|   846k|    SQRADDAC(a[5], a[19]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2675|   846k|    SQRADDAC(a[6], a[18]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2676|   846k|    SQRADDAC(a[7], a[17]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2677|   846k|    SQRADDAC(a[8], a[16]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2678|   846k|    SQRADDAC(a[9], a[15]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2679|   846k|    SQRADDAC(a[10], a[14]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2680|   846k|    SQRADDAC(a[11], a[13]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2681|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 2682|   846k|    SQRADD(a[12], a[12]);
  ------------------
  |  |   82|   846k|    __asm__(                                \
  |  |   83|   846k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|   846k|        "mulq  %%rax        \n\t"           \
  |  |   85|   846k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|   846k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|   846k|        "adcq  $0,%2        \n\t"           \
  |  |   88|   846k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|   846k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2683|   846k|    COMBA_STORE(b[24]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 2684|       |
 2685|       |    /* output 25 */
 2686|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2687|   846k|    SQRADDSC(a[0], a[25]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2688|   846k|    SQRADDAC(a[1], a[24]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2689|   846k|    SQRADDAC(a[2], a[23]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2690|   846k|    SQRADDAC(a[3], a[22]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2691|   846k|    SQRADDAC(a[4], a[21]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2692|   846k|    SQRADDAC(a[5], a[20]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2693|   846k|    SQRADDAC(a[6], a[19]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2694|   846k|    SQRADDAC(a[7], a[18]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2695|   846k|    SQRADDAC(a[8], a[17]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2696|   846k|    SQRADDAC(a[9], a[16]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2697|   846k|    SQRADDAC(a[10], a[15]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2698|   846k|    SQRADDAC(a[11], a[14]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2699|   846k|    SQRADDAC(a[12], a[13]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2700|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 2701|   846k|    COMBA_STORE(b[25]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 2702|       |
 2703|       |    /* output 26 */
 2704|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2705|   846k|    SQRADDSC(a[0], a[26]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2706|   846k|    SQRADDAC(a[1], a[25]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2707|   846k|    SQRADDAC(a[2], a[24]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2708|   846k|    SQRADDAC(a[3], a[23]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2709|   846k|    SQRADDAC(a[4], a[22]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2710|   846k|    SQRADDAC(a[5], a[21]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2711|   846k|    SQRADDAC(a[6], a[20]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2712|   846k|    SQRADDAC(a[7], a[19]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2713|   846k|    SQRADDAC(a[8], a[18]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2714|   846k|    SQRADDAC(a[9], a[17]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2715|   846k|    SQRADDAC(a[10], a[16]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2716|   846k|    SQRADDAC(a[11], a[15]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2717|   846k|    SQRADDAC(a[12], a[14]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2718|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 2719|   846k|    SQRADD(a[13], a[13]);
  ------------------
  |  |   82|   846k|    __asm__(                                \
  |  |   83|   846k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|   846k|        "mulq  %%rax        \n\t"           \
  |  |   85|   846k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|   846k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|   846k|        "adcq  $0,%2        \n\t"           \
  |  |   88|   846k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|   846k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2720|   846k|    COMBA_STORE(b[26]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 2721|       |
 2722|       |    /* output 27 */
 2723|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2724|   846k|    SQRADDSC(a[0], a[27]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2725|   846k|    SQRADDAC(a[1], a[26]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2726|   846k|    SQRADDAC(a[2], a[25]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2727|   846k|    SQRADDAC(a[3], a[24]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2728|   846k|    SQRADDAC(a[4], a[23]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2729|   846k|    SQRADDAC(a[5], a[22]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2730|   846k|    SQRADDAC(a[6], a[21]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2731|   846k|    SQRADDAC(a[7], a[20]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2732|   846k|    SQRADDAC(a[8], a[19]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2733|   846k|    SQRADDAC(a[9], a[18]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2734|   846k|    SQRADDAC(a[10], a[17]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2735|   846k|    SQRADDAC(a[11], a[16]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2736|   846k|    SQRADDAC(a[12], a[15]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2737|   846k|    SQRADDAC(a[13], a[14]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2738|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 2739|   846k|    COMBA_STORE(b[27]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 2740|       |
 2741|       |    /* output 28 */
 2742|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2743|   846k|    SQRADDSC(a[0], a[28]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2744|   846k|    SQRADDAC(a[1], a[27]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2745|   846k|    SQRADDAC(a[2], a[26]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2746|   846k|    SQRADDAC(a[3], a[25]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2747|   846k|    SQRADDAC(a[4], a[24]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2748|   846k|    SQRADDAC(a[5], a[23]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2749|   846k|    SQRADDAC(a[6], a[22]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2750|   846k|    SQRADDAC(a[7], a[21]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2751|   846k|    SQRADDAC(a[8], a[20]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2752|   846k|    SQRADDAC(a[9], a[19]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2753|   846k|    SQRADDAC(a[10], a[18]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2754|   846k|    SQRADDAC(a[11], a[17]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2755|   846k|    SQRADDAC(a[12], a[16]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2756|   846k|    SQRADDAC(a[13], a[15]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2757|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 2758|   846k|    SQRADD(a[14], a[14]);
  ------------------
  |  |   82|   846k|    __asm__(                                \
  |  |   83|   846k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|   846k|        "mulq  %%rax        \n\t"           \
  |  |   85|   846k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|   846k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|   846k|        "adcq  $0,%2        \n\t"           \
  |  |   88|   846k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|   846k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2759|   846k|    COMBA_STORE(b[28]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 2760|       |
 2761|       |    /* output 29 */
 2762|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2763|   846k|    SQRADDSC(a[0], a[29]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2764|   846k|    SQRADDAC(a[1], a[28]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2765|   846k|    SQRADDAC(a[2], a[27]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2766|   846k|    SQRADDAC(a[3], a[26]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2767|   846k|    SQRADDAC(a[4], a[25]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2768|   846k|    SQRADDAC(a[5], a[24]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2769|   846k|    SQRADDAC(a[6], a[23]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2770|   846k|    SQRADDAC(a[7], a[22]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2771|   846k|    SQRADDAC(a[8], a[21]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2772|   846k|    SQRADDAC(a[9], a[20]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2773|   846k|    SQRADDAC(a[10], a[19]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2774|   846k|    SQRADDAC(a[11], a[18]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2775|   846k|    SQRADDAC(a[12], a[17]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2776|   846k|    SQRADDAC(a[13], a[16]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2777|   846k|    SQRADDAC(a[14], a[15]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2778|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 2779|   846k|    COMBA_STORE(b[29]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 2780|       |
 2781|       |    /* output 30 */
 2782|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2783|   846k|    SQRADDSC(a[0], a[30]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2784|   846k|    SQRADDAC(a[1], a[29]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2785|   846k|    SQRADDAC(a[2], a[28]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2786|   846k|    SQRADDAC(a[3], a[27]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2787|   846k|    SQRADDAC(a[4], a[26]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2788|   846k|    SQRADDAC(a[5], a[25]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2789|   846k|    SQRADDAC(a[6], a[24]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2790|   846k|    SQRADDAC(a[7], a[23]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2791|   846k|    SQRADDAC(a[8], a[22]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2792|   846k|    SQRADDAC(a[9], a[21]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2793|   846k|    SQRADDAC(a[10], a[20]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2794|   846k|    SQRADDAC(a[11], a[19]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2795|   846k|    SQRADDAC(a[12], a[18]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2796|   846k|    SQRADDAC(a[13], a[17]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2797|   846k|    SQRADDAC(a[14], a[16]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2798|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 2799|   846k|    SQRADD(a[15], a[15]);
  ------------------
  |  |   82|   846k|    __asm__(                                \
  |  |   83|   846k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|   846k|        "mulq  %%rax        \n\t"           \
  |  |   85|   846k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|   846k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|   846k|        "adcq  $0,%2        \n\t"           \
  |  |   88|   846k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|   846k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2800|   846k|    COMBA_STORE(b[30]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 2801|       |
 2802|       |    /* output 31 */
 2803|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2804|   846k|    SQRADDSC(a[0], a[31]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2805|   846k|    SQRADDAC(a[1], a[30]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2806|   846k|    SQRADDAC(a[2], a[29]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2807|   846k|    SQRADDAC(a[3], a[28]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2808|   846k|    SQRADDAC(a[4], a[27]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2809|   846k|    SQRADDAC(a[5], a[26]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2810|   846k|    SQRADDAC(a[6], a[25]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2811|   846k|    SQRADDAC(a[7], a[24]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2812|   846k|    SQRADDAC(a[8], a[23]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2813|   846k|    SQRADDAC(a[9], a[22]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2814|   846k|    SQRADDAC(a[10], a[21]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2815|   846k|    SQRADDAC(a[11], a[20]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2816|   846k|    SQRADDAC(a[12], a[19]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2817|   846k|    SQRADDAC(a[13], a[18]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2818|   846k|    SQRADDAC(a[14], a[17]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2819|   846k|    SQRADDAC(a[15], a[16]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2820|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 2821|   846k|    COMBA_STORE(b[31]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 2822|       |
 2823|       |    /* output 32 */
 2824|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2825|   846k|    SQRADDSC(a[1], a[31]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2826|   846k|    SQRADDAC(a[2], a[30]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2827|   846k|    SQRADDAC(a[3], a[29]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2828|   846k|    SQRADDAC(a[4], a[28]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2829|   846k|    SQRADDAC(a[5], a[27]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2830|   846k|    SQRADDAC(a[6], a[26]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2831|   846k|    SQRADDAC(a[7], a[25]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2832|   846k|    SQRADDAC(a[8], a[24]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2833|   846k|    SQRADDAC(a[9], a[23]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2834|   846k|    SQRADDAC(a[10], a[22]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2835|   846k|    SQRADDAC(a[11], a[21]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2836|   846k|    SQRADDAC(a[12], a[20]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2837|   846k|    SQRADDAC(a[13], a[19]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2838|   846k|    SQRADDAC(a[14], a[18]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2839|   846k|    SQRADDAC(a[15], a[17]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2840|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 2841|   846k|    SQRADD(a[16], a[16]);
  ------------------
  |  |   82|   846k|    __asm__(                                \
  |  |   83|   846k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|   846k|        "mulq  %%rax        \n\t"           \
  |  |   85|   846k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|   846k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|   846k|        "adcq  $0,%2        \n\t"           \
  |  |   88|   846k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|   846k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2842|   846k|    COMBA_STORE(b[32]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 2843|       |
 2844|       |    /* output 33 */
 2845|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2846|   846k|    SQRADDSC(a[2], a[31]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2847|   846k|    SQRADDAC(a[3], a[30]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2848|   846k|    SQRADDAC(a[4], a[29]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2849|   846k|    SQRADDAC(a[5], a[28]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2850|   846k|    SQRADDAC(a[6], a[27]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2851|   846k|    SQRADDAC(a[7], a[26]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2852|   846k|    SQRADDAC(a[8], a[25]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2853|   846k|    SQRADDAC(a[9], a[24]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2854|   846k|    SQRADDAC(a[10], a[23]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2855|   846k|    SQRADDAC(a[11], a[22]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2856|   846k|    SQRADDAC(a[12], a[21]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2857|   846k|    SQRADDAC(a[13], a[20]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2858|   846k|    SQRADDAC(a[14], a[19]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2859|   846k|    SQRADDAC(a[15], a[18]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2860|   846k|    SQRADDAC(a[16], a[17]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2861|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 2862|   846k|    COMBA_STORE(b[33]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 2863|       |
 2864|       |    /* output 34 */
 2865|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2866|   846k|    SQRADDSC(a[3], a[31]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2867|   846k|    SQRADDAC(a[4], a[30]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2868|   846k|    SQRADDAC(a[5], a[29]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2869|   846k|    SQRADDAC(a[6], a[28]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2870|   846k|    SQRADDAC(a[7], a[27]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2871|   846k|    SQRADDAC(a[8], a[26]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2872|   846k|    SQRADDAC(a[9], a[25]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2873|   846k|    SQRADDAC(a[10], a[24]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2874|   846k|    SQRADDAC(a[11], a[23]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2875|   846k|    SQRADDAC(a[12], a[22]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2876|   846k|    SQRADDAC(a[13], a[21]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2877|   846k|    SQRADDAC(a[14], a[20]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2878|   846k|    SQRADDAC(a[15], a[19]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2879|   846k|    SQRADDAC(a[16], a[18]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2880|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 2881|   846k|    SQRADD(a[17], a[17]);
  ------------------
  |  |   82|   846k|    __asm__(                                \
  |  |   83|   846k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|   846k|        "mulq  %%rax        \n\t"           \
  |  |   85|   846k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|   846k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|   846k|        "adcq  $0,%2        \n\t"           \
  |  |   88|   846k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|   846k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2882|   846k|    COMBA_STORE(b[34]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 2883|       |
 2884|       |    /* output 35 */
 2885|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2886|   846k|    SQRADDSC(a[4], a[31]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2887|   846k|    SQRADDAC(a[5], a[30]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2888|   846k|    SQRADDAC(a[6], a[29]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2889|   846k|    SQRADDAC(a[7], a[28]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2890|   846k|    SQRADDAC(a[8], a[27]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2891|   846k|    SQRADDAC(a[9], a[26]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2892|   846k|    SQRADDAC(a[10], a[25]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2893|   846k|    SQRADDAC(a[11], a[24]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2894|   846k|    SQRADDAC(a[12], a[23]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2895|   846k|    SQRADDAC(a[13], a[22]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2896|   846k|    SQRADDAC(a[14], a[21]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2897|   846k|    SQRADDAC(a[15], a[20]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2898|   846k|    SQRADDAC(a[16], a[19]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2899|   846k|    SQRADDAC(a[17], a[18]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2900|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 2901|   846k|    COMBA_STORE(b[35]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 2902|       |
 2903|       |    /* output 36 */
 2904|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2905|   846k|    SQRADDSC(a[5], a[31]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2906|   846k|    SQRADDAC(a[6], a[30]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2907|   846k|    SQRADDAC(a[7], a[29]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2908|   846k|    SQRADDAC(a[8], a[28]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2909|   846k|    SQRADDAC(a[9], a[27]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2910|   846k|    SQRADDAC(a[10], a[26]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2911|   846k|    SQRADDAC(a[11], a[25]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2912|   846k|    SQRADDAC(a[12], a[24]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2913|   846k|    SQRADDAC(a[13], a[23]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2914|   846k|    SQRADDAC(a[14], a[22]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2915|   846k|    SQRADDAC(a[15], a[21]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2916|   846k|    SQRADDAC(a[16], a[20]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2917|   846k|    SQRADDAC(a[17], a[19]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2918|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 2919|   846k|    SQRADD(a[18], a[18]);
  ------------------
  |  |   82|   846k|    __asm__(                                \
  |  |   83|   846k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|   846k|        "mulq  %%rax        \n\t"           \
  |  |   85|   846k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|   846k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|   846k|        "adcq  $0,%2        \n\t"           \
  |  |   88|   846k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|   846k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2920|   846k|    COMBA_STORE(b[36]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 2921|       |
 2922|       |    /* output 37 */
 2923|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2924|   846k|    SQRADDSC(a[6], a[31]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2925|   846k|    SQRADDAC(a[7], a[30]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2926|   846k|    SQRADDAC(a[8], a[29]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2927|   846k|    SQRADDAC(a[9], a[28]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2928|   846k|    SQRADDAC(a[10], a[27]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2929|   846k|    SQRADDAC(a[11], a[26]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2930|   846k|    SQRADDAC(a[12], a[25]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2931|   846k|    SQRADDAC(a[13], a[24]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2932|   846k|    SQRADDAC(a[14], a[23]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2933|   846k|    SQRADDAC(a[15], a[22]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2934|   846k|    SQRADDAC(a[16], a[21]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2935|   846k|    SQRADDAC(a[17], a[20]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2936|   846k|    SQRADDAC(a[18], a[19]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2937|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 2938|   846k|    COMBA_STORE(b[37]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 2939|       |
 2940|       |    /* output 38 */
 2941|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2942|   846k|    SQRADDSC(a[7], a[31]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2943|   846k|    SQRADDAC(a[8], a[30]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2944|   846k|    SQRADDAC(a[9], a[29]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2945|   846k|    SQRADDAC(a[10], a[28]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2946|   846k|    SQRADDAC(a[11], a[27]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2947|   846k|    SQRADDAC(a[12], a[26]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2948|   846k|    SQRADDAC(a[13], a[25]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2949|   846k|    SQRADDAC(a[14], a[24]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2950|   846k|    SQRADDAC(a[15], a[23]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2951|   846k|    SQRADDAC(a[16], a[22]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2952|   846k|    SQRADDAC(a[17], a[21]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2953|   846k|    SQRADDAC(a[18], a[20]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2954|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 2955|   846k|    SQRADD(a[19], a[19]);
  ------------------
  |  |   82|   846k|    __asm__(                                \
  |  |   83|   846k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|   846k|        "mulq  %%rax        \n\t"           \
  |  |   85|   846k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|   846k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|   846k|        "adcq  $0,%2        \n\t"           \
  |  |   88|   846k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|   846k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2956|   846k|    COMBA_STORE(b[38]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 2957|       |
 2958|       |    /* output 39 */
 2959|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2960|   846k|    SQRADDSC(a[8], a[31]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2961|   846k|    SQRADDAC(a[9], a[30]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2962|   846k|    SQRADDAC(a[10], a[29]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2963|   846k|    SQRADDAC(a[11], a[28]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2964|   846k|    SQRADDAC(a[12], a[27]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2965|   846k|    SQRADDAC(a[13], a[26]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2966|   846k|    SQRADDAC(a[14], a[25]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2967|   846k|    SQRADDAC(a[15], a[24]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2968|   846k|    SQRADDAC(a[16], a[23]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2969|   846k|    SQRADDAC(a[17], a[22]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2970|   846k|    SQRADDAC(a[18], a[21]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2971|   846k|    SQRADDAC(a[19], a[20]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2972|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 2973|   846k|    COMBA_STORE(b[39]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 2974|       |
 2975|       |    /* output 40 */
 2976|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2977|   846k|    SQRADDSC(a[9], a[31]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2978|   846k|    SQRADDAC(a[10], a[30]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2979|   846k|    SQRADDAC(a[11], a[29]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2980|   846k|    SQRADDAC(a[12], a[28]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2981|   846k|    SQRADDAC(a[13], a[27]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2982|   846k|    SQRADDAC(a[14], a[26]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2983|   846k|    SQRADDAC(a[15], a[25]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2984|   846k|    SQRADDAC(a[16], a[24]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2985|   846k|    SQRADDAC(a[17], a[23]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2986|   846k|    SQRADDAC(a[18], a[22]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2987|   846k|    SQRADDAC(a[19], a[21]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2988|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 2989|   846k|    SQRADD(a[20], a[20]);
  ------------------
  |  |   82|   846k|    __asm__(                                \
  |  |   83|   846k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|   846k|        "mulq  %%rax        \n\t"           \
  |  |   85|   846k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|   846k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|   846k|        "adcq  $0,%2        \n\t"           \
  |  |   88|   846k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|   846k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2990|   846k|    COMBA_STORE(b[40]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 2991|       |
 2992|       |    /* output 41 */
 2993|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2994|   846k|    SQRADDSC(a[10], a[31]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2995|   846k|    SQRADDAC(a[11], a[30]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2996|   846k|    SQRADDAC(a[12], a[29]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2997|   846k|    SQRADDAC(a[13], a[28]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2998|   846k|    SQRADDAC(a[14], a[27]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 2999|   846k|    SQRADDAC(a[15], a[26]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3000|   846k|    SQRADDAC(a[16], a[25]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3001|   846k|    SQRADDAC(a[17], a[24]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3002|   846k|    SQRADDAC(a[18], a[23]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3003|   846k|    SQRADDAC(a[19], a[22]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3004|   846k|    SQRADDAC(a[20], a[21]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3005|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 3006|   846k|    COMBA_STORE(b[41]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 3007|       |
 3008|       |    /* output 42 */
 3009|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3010|   846k|    SQRADDSC(a[11], a[31]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3011|   846k|    SQRADDAC(a[12], a[30]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3012|   846k|    SQRADDAC(a[13], a[29]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3013|   846k|    SQRADDAC(a[14], a[28]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3014|   846k|    SQRADDAC(a[15], a[27]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3015|   846k|    SQRADDAC(a[16], a[26]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3016|   846k|    SQRADDAC(a[17], a[25]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3017|   846k|    SQRADDAC(a[18], a[24]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3018|   846k|    SQRADDAC(a[19], a[23]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3019|   846k|    SQRADDAC(a[20], a[22]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3020|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 3021|   846k|    SQRADD(a[21], a[21]);
  ------------------
  |  |   82|   846k|    __asm__(                                \
  |  |   83|   846k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|   846k|        "mulq  %%rax        \n\t"           \
  |  |   85|   846k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|   846k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|   846k|        "adcq  $0,%2        \n\t"           \
  |  |   88|   846k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|   846k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3022|   846k|    COMBA_STORE(b[42]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 3023|       |
 3024|       |    /* output 43 */
 3025|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3026|   846k|    SQRADDSC(a[12], a[31]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3027|   846k|    SQRADDAC(a[13], a[30]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3028|   846k|    SQRADDAC(a[14], a[29]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3029|   846k|    SQRADDAC(a[15], a[28]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3030|   846k|    SQRADDAC(a[16], a[27]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3031|   846k|    SQRADDAC(a[17], a[26]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3032|   846k|    SQRADDAC(a[18], a[25]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3033|   846k|    SQRADDAC(a[19], a[24]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3034|   846k|    SQRADDAC(a[20], a[23]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3035|   846k|    SQRADDAC(a[21], a[22]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3036|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 3037|   846k|    COMBA_STORE(b[43]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 3038|       |
 3039|       |    /* output 44 */
 3040|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3041|   846k|    SQRADDSC(a[13], a[31]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3042|   846k|    SQRADDAC(a[14], a[30]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3043|   846k|    SQRADDAC(a[15], a[29]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3044|   846k|    SQRADDAC(a[16], a[28]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3045|   846k|    SQRADDAC(a[17], a[27]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3046|   846k|    SQRADDAC(a[18], a[26]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3047|   846k|    SQRADDAC(a[19], a[25]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3048|   846k|    SQRADDAC(a[20], a[24]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3049|   846k|    SQRADDAC(a[21], a[23]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3050|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 3051|   846k|    SQRADD(a[22], a[22]);
  ------------------
  |  |   82|   846k|    __asm__(                                \
  |  |   83|   846k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|   846k|        "mulq  %%rax        \n\t"           \
  |  |   85|   846k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|   846k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|   846k|        "adcq  $0,%2        \n\t"           \
  |  |   88|   846k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|   846k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3052|   846k|    COMBA_STORE(b[44]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 3053|       |
 3054|       |    /* output 45 */
 3055|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3056|   846k|    SQRADDSC(a[14], a[31]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3057|   846k|    SQRADDAC(a[15], a[30]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3058|   846k|    SQRADDAC(a[16], a[29]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3059|   846k|    SQRADDAC(a[17], a[28]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3060|   846k|    SQRADDAC(a[18], a[27]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3061|   846k|    SQRADDAC(a[19], a[26]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3062|   846k|    SQRADDAC(a[20], a[25]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3063|   846k|    SQRADDAC(a[21], a[24]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3064|   846k|    SQRADDAC(a[22], a[23]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3065|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 3066|   846k|    COMBA_STORE(b[45]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 3067|       |
 3068|       |    /* output 46 */
 3069|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3070|   846k|    SQRADDSC(a[15], a[31]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3071|   846k|    SQRADDAC(a[16], a[30]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3072|   846k|    SQRADDAC(a[17], a[29]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3073|   846k|    SQRADDAC(a[18], a[28]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3074|   846k|    SQRADDAC(a[19], a[27]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3075|   846k|    SQRADDAC(a[20], a[26]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3076|   846k|    SQRADDAC(a[21], a[25]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3077|   846k|    SQRADDAC(a[22], a[24]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3078|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 3079|   846k|    SQRADD(a[23], a[23]);
  ------------------
  |  |   82|   846k|    __asm__(                                \
  |  |   83|   846k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|   846k|        "mulq  %%rax        \n\t"           \
  |  |   85|   846k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|   846k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|   846k|        "adcq  $0,%2        \n\t"           \
  |  |   88|   846k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|   846k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3080|   846k|    COMBA_STORE(b[46]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 3081|       |
 3082|       |    /* output 47 */
 3083|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3084|   846k|    SQRADDSC(a[16], a[31]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3085|   846k|    SQRADDAC(a[17], a[30]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3086|   846k|    SQRADDAC(a[18], a[29]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3087|   846k|    SQRADDAC(a[19], a[28]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3088|   846k|    SQRADDAC(a[20], a[27]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3089|   846k|    SQRADDAC(a[21], a[26]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3090|   846k|    SQRADDAC(a[22], a[25]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3091|   846k|    SQRADDAC(a[23], a[24]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3092|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 3093|   846k|    COMBA_STORE(b[47]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 3094|       |
 3095|       |    /* output 48 */
 3096|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3097|   846k|    SQRADDSC(a[17], a[31]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3098|   846k|    SQRADDAC(a[18], a[30]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3099|   846k|    SQRADDAC(a[19], a[29]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3100|   846k|    SQRADDAC(a[20], a[28]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3101|   846k|    SQRADDAC(a[21], a[27]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3102|   846k|    SQRADDAC(a[22], a[26]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3103|   846k|    SQRADDAC(a[23], a[25]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3104|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 3105|   846k|    SQRADD(a[24], a[24]);
  ------------------
  |  |   82|   846k|    __asm__(                                \
  |  |   83|   846k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|   846k|        "mulq  %%rax        \n\t"           \
  |  |   85|   846k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|   846k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|   846k|        "adcq  $0,%2        \n\t"           \
  |  |   88|   846k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|   846k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3106|   846k|    COMBA_STORE(b[48]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 3107|       |
 3108|       |    /* output 49 */
 3109|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3110|   846k|    SQRADDSC(a[18], a[31]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3111|   846k|    SQRADDAC(a[19], a[30]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3112|   846k|    SQRADDAC(a[20], a[29]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3113|   846k|    SQRADDAC(a[21], a[28]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3114|   846k|    SQRADDAC(a[22], a[27]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3115|   846k|    SQRADDAC(a[23], a[26]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3116|   846k|    SQRADDAC(a[24], a[25]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3117|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 3118|   846k|    COMBA_STORE(b[49]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 3119|       |
 3120|       |    /* output 50 */
 3121|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3122|   846k|    SQRADDSC(a[19], a[31]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3123|   846k|    SQRADDAC(a[20], a[30]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3124|   846k|    SQRADDAC(a[21], a[29]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3125|   846k|    SQRADDAC(a[22], a[28]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3126|   846k|    SQRADDAC(a[23], a[27]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3127|   846k|    SQRADDAC(a[24], a[26]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3128|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 3129|   846k|    SQRADD(a[25], a[25]);
  ------------------
  |  |   82|   846k|    __asm__(                                \
  |  |   83|   846k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|   846k|        "mulq  %%rax        \n\t"           \
  |  |   85|   846k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|   846k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|   846k|        "adcq  $0,%2        \n\t"           \
  |  |   88|   846k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|   846k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3130|   846k|    COMBA_STORE(b[50]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 3131|       |
 3132|       |    /* output 51 */
 3133|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3134|   846k|    SQRADDSC(a[20], a[31]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3135|   846k|    SQRADDAC(a[21], a[30]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3136|   846k|    SQRADDAC(a[22], a[29]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3137|   846k|    SQRADDAC(a[23], a[28]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3138|   846k|    SQRADDAC(a[24], a[27]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3139|   846k|    SQRADDAC(a[25], a[26]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3140|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 3141|   846k|    COMBA_STORE(b[51]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 3142|       |
 3143|       |    /* output 52 */
 3144|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3145|   846k|    SQRADDSC(a[21], a[31]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3146|   846k|    SQRADDAC(a[22], a[30]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3147|   846k|    SQRADDAC(a[23], a[29]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3148|   846k|    SQRADDAC(a[24], a[28]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3149|   846k|    SQRADDAC(a[25], a[27]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3150|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 3151|   846k|    SQRADD(a[26], a[26]);
  ------------------
  |  |   82|   846k|    __asm__(                                \
  |  |   83|   846k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|   846k|        "mulq  %%rax        \n\t"           \
  |  |   85|   846k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|   846k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|   846k|        "adcq  $0,%2        \n\t"           \
  |  |   88|   846k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|   846k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3152|   846k|    COMBA_STORE(b[52]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 3153|       |
 3154|       |    /* output 53 */
 3155|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3156|   846k|    SQRADDSC(a[22], a[31]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3157|   846k|    SQRADDAC(a[23], a[30]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3158|   846k|    SQRADDAC(a[24], a[29]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3159|   846k|    SQRADDAC(a[25], a[28]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3160|   846k|    SQRADDAC(a[26], a[27]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3161|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 3162|   846k|    COMBA_STORE(b[53]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 3163|       |
 3164|       |    /* output 54 */
 3165|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3166|   846k|    SQRADDSC(a[23], a[31]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3167|   846k|    SQRADDAC(a[24], a[30]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3168|   846k|    SQRADDAC(a[25], a[29]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3169|   846k|    SQRADDAC(a[26], a[28]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3170|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 3171|   846k|    SQRADD(a[27], a[27]);
  ------------------
  |  |   82|   846k|    __asm__(                                \
  |  |   83|   846k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|   846k|        "mulq  %%rax        \n\t"           \
  |  |   85|   846k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|   846k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|   846k|        "adcq  $0,%2        \n\t"           \
  |  |   88|   846k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|   846k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3172|   846k|    COMBA_STORE(b[54]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 3173|       |
 3174|       |    /* output 55 */
 3175|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3176|   846k|    SQRADDSC(a[24], a[31]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3177|   846k|    SQRADDAC(a[25], a[30]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3178|   846k|    SQRADDAC(a[26], a[29]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3179|   846k|    SQRADDAC(a[27], a[28]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3180|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 3181|   846k|    COMBA_STORE(b[55]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 3182|       |
 3183|       |    /* output 56 */
 3184|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3185|   846k|    SQRADDSC(a[25], a[31]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3186|   846k|    SQRADDAC(a[26], a[30]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3187|   846k|    SQRADDAC(a[27], a[29]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3188|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 3189|   846k|    SQRADD(a[28], a[28]);
  ------------------
  |  |   82|   846k|    __asm__(                                \
  |  |   83|   846k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|   846k|        "mulq  %%rax        \n\t"           \
  |  |   85|   846k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|   846k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|   846k|        "adcq  $0,%2        \n\t"           \
  |  |   88|   846k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|   846k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3190|   846k|    COMBA_STORE(b[56]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 3191|       |
 3192|       |    /* output 57 */
 3193|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3194|   846k|    SQRADDSC(a[26], a[31]);
  ------------------
  |  |  107|   846k|    __asm__(                              \
  |  |  108|   846k|        "movq  %3,%%rax     \n\t"         \
  |  |  109|   846k|        "mulq  %4           \n\t"         \
  |  |  110|   846k|        "movq  %%rax,%0     \n\t"         \
  |  |  111|   846k|        "movq  %%rdx,%1     \n\t"         \
  |  |  112|   846k|        "xorq  %2,%2        \n\t"         \
  |  |  113|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2) \
  |  |  114|   846k|        : "g"(i), "g"(j)                  \
  |  |  115|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3195|   846k|    SQRADDAC(a[27], a[30]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3196|   846k|    SQRADDAC(a[28], a[29]);
  ------------------
  |  |  118|   846k|    __asm__(                                           \
  |  |  119|   846k|        "movq  %6,%%rax     \n\t"                      \
  |  |  120|   846k|        "mulq  %7           \n\t"                      \
  |  |  121|   846k|        "addq  %%rax,%0     \n\t"                      \
  |  |  122|   846k|        "adcq  %%rdx,%1     \n\t"                      \
  |  |  123|   846k|        "adcq  $0,%2        \n\t"                      \
  |  |  124|   846k|        : "=r"(sc0), "=r"(sc1), "=r"(sc2)              \
  |  |  125|   846k|        : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
  |  |  126|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3197|   846k|    SQRADDDB;
  ------------------
  |  |  129|   846k|    __asm__(                                                      \
  |  |  130|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  131|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  132|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  133|   846k|        "addq %6,%0         \n\t"                                 \
  |  |  134|   846k|        "adcq %7,%1         \n\t"                                 \
  |  |  135|   846k|        "adcq %8,%2         \n\t"                                 \
  |  |  136|   846k|        : "=&r"(c0), "=&r"(c1), "=&r"(c2)                         \
  |  |  137|   846k|        : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) \
  |  |  138|   846k|        : "cc");
  ------------------
 3198|   846k|    COMBA_STORE(b[57]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 3199|       |
 3200|       |    /* output 58 */
 3201|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3202|   846k|    SQRADD2(a[27], a[31]);
  ------------------
  |  |   93|   846k|    __asm__(                                        \
  |  |   94|   846k|        "movq  %6,%%rax     \n\t"                   \
  |  |   95|   846k|        "mulq  %7           \n\t"                   \
  |  |   96|   846k|        "addq  %%rax,%0     \n\t"                   \
  |  |   97|   846k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   98|   846k|        "adcq  $0,%2        \n\t"                   \
  |  |   99|   846k|        "addq  %%rax,%0     \n\t"                   \
  |  |  100|   846k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |  101|   846k|        "adcq  $0,%2        \n\t"                   \
  |  |  102|   846k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |  103|   846k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |  104|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3203|   846k|    SQRADD2(a[28], a[30]);
  ------------------
  |  |   93|   846k|    __asm__(                                        \
  |  |   94|   846k|        "movq  %6,%%rax     \n\t"                   \
  |  |   95|   846k|        "mulq  %7           \n\t"                   \
  |  |   96|   846k|        "addq  %%rax,%0     \n\t"                   \
  |  |   97|   846k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   98|   846k|        "adcq  $0,%2        \n\t"                   \
  |  |   99|   846k|        "addq  %%rax,%0     \n\t"                   \
  |  |  100|   846k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |  101|   846k|        "adcq  $0,%2        \n\t"                   \
  |  |  102|   846k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |  103|   846k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |  104|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3204|   846k|    SQRADD(a[29], a[29]);
  ------------------
  |  |   82|   846k|    __asm__(                                \
  |  |   83|   846k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|   846k|        "mulq  %%rax        \n\t"           \
  |  |   85|   846k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|   846k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|   846k|        "adcq  $0,%2        \n\t"           \
  |  |   88|   846k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|   846k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3205|   846k|    COMBA_STORE(b[58]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 3206|       |
 3207|       |    /* output 59 */
 3208|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3209|   846k|    SQRADD2(a[28], a[31]);
  ------------------
  |  |   93|   846k|    __asm__(                                        \
  |  |   94|   846k|        "movq  %6,%%rax     \n\t"                   \
  |  |   95|   846k|        "mulq  %7           \n\t"                   \
  |  |   96|   846k|        "addq  %%rax,%0     \n\t"                   \
  |  |   97|   846k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   98|   846k|        "adcq  $0,%2        \n\t"                   \
  |  |   99|   846k|        "addq  %%rax,%0     \n\t"                   \
  |  |  100|   846k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |  101|   846k|        "adcq  $0,%2        \n\t"                   \
  |  |  102|   846k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |  103|   846k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |  104|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3210|   846k|    SQRADD2(a[29], a[30]);
  ------------------
  |  |   93|   846k|    __asm__(                                        \
  |  |   94|   846k|        "movq  %6,%%rax     \n\t"                   \
  |  |   95|   846k|        "mulq  %7           \n\t"                   \
  |  |   96|   846k|        "addq  %%rax,%0     \n\t"                   \
  |  |   97|   846k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   98|   846k|        "adcq  $0,%2        \n\t"                   \
  |  |   99|   846k|        "addq  %%rax,%0     \n\t"                   \
  |  |  100|   846k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |  101|   846k|        "adcq  $0,%2        \n\t"                   \
  |  |  102|   846k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |  103|   846k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |  104|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3211|   846k|    COMBA_STORE(b[59]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 3212|       |
 3213|       |    /* output 60 */
 3214|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3215|   846k|    SQRADD2(a[29], a[31]);
  ------------------
  |  |   93|   846k|    __asm__(                                        \
  |  |   94|   846k|        "movq  %6,%%rax     \n\t"                   \
  |  |   95|   846k|        "mulq  %7           \n\t"                   \
  |  |   96|   846k|        "addq  %%rax,%0     \n\t"                   \
  |  |   97|   846k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   98|   846k|        "adcq  $0,%2        \n\t"                   \
  |  |   99|   846k|        "addq  %%rax,%0     \n\t"                   \
  |  |  100|   846k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |  101|   846k|        "adcq  $0,%2        \n\t"                   \
  |  |  102|   846k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |  103|   846k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |  104|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3216|   846k|    SQRADD(a[30], a[30]);
  ------------------
  |  |   82|   846k|    __asm__(                                \
  |  |   83|   846k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|   846k|        "mulq  %%rax        \n\t"           \
  |  |   85|   846k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|   846k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|   846k|        "adcq  $0,%2        \n\t"           \
  |  |   88|   846k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|   846k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3217|   846k|    COMBA_STORE(b[60]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 3218|       |
 3219|       |    /* output 61 */
 3220|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3221|   846k|    SQRADD2(a[30], a[31]);
  ------------------
  |  |   93|   846k|    __asm__(                                        \
  |  |   94|   846k|        "movq  %6,%%rax     \n\t"                   \
  |  |   95|   846k|        "mulq  %7           \n\t"                   \
  |  |   96|   846k|        "addq  %%rax,%0     \n\t"                   \
  |  |   97|   846k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |   98|   846k|        "adcq  $0,%2        \n\t"                   \
  |  |   99|   846k|        "addq  %%rax,%0     \n\t"                   \
  |  |  100|   846k|        "adcq  %%rdx,%1     \n\t"                   \
  |  |  101|   846k|        "adcq  $0,%2        \n\t"                   \
  |  |  102|   846k|        : "=r"(c0), "=r"(c1), "=r"(c2)              \
  |  |  103|   846k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i), "g"(j) \
  |  |  104|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3222|   846k|    COMBA_STORE(b[61]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 3223|       |
 3224|       |    /* output 62 */
 3225|   846k|    CARRY_FORWARD;
  ------------------
  |  |   73|   846k|    do {              \
  |  |   74|   846k|        c0 = c1;      \
  |  |   75|   846k|        c1 = c2;      \
  |  |   76|   846k|        c2 = 0;       \
  |  |   77|   846k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (77:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3226|   846k|    SQRADD(a[31], a[31]);
  ------------------
  |  |   82|   846k|    __asm__(                                \
  |  |   83|   846k|        "movq  %6,%%rax     \n\t"           \
  |  |   84|   846k|        "mulq  %%rax        \n\t"           \
  |  |   85|   846k|        "addq  %%rax,%0     \n\t"           \
  |  |   86|   846k|        "adcq  %%rdx,%1     \n\t"           \
  |  |   87|   846k|        "adcq  $0,%2        \n\t"           \
  |  |   88|   846k|        : "=r"(c0), "=r"(c1), "=r"(c2)      \
  |  |   89|   846k|        : "0"(c0), "1"(c1), "2"(c2), "g"(i) \
  |  |   90|   846k|        : "%rax", "%rdx", "cc");
  ------------------
 3227|   846k|    COMBA_STORE(b[62]);
  ------------------
  |  |   67|   846k|    x = c0;
  ------------------
 3228|   846k|    COMBA_STORE2(b[63]);
  ------------------
  |  |   70|   846k|    x = c1;
  ------------------
 3229|   846k|    COMBA_FINI;
 3230|       |
 3231|   846k|    B->used = 64;
 3232|   846k|    B->sign = ZPOS;
  ------------------
  |  |  326|   846k|#define ZPOS MP_ZPOS
  |  |  ------------------
  |  |  |  |   37|   846k|#define MP_ZPOS 0
  |  |  ------------------
  ------------------
 3233|   846k|    memcpy(B->dp, b, 64 * sizeof(mp_digit));
 3234|   846k|    mp_clamp(B);
  ------------------
  |  |   26|   846k|    {                                                    \
  |  |   27|   857k|        while ((a)->used && (a)->dp[(a)->used - 1] == 0) \
  |  |  ------------------
  |  |  |  Branch (27:16): [True: 857k, False: 0]
  |  |  |  Branch (27:29): [True: 11.8k, False: 846k]
  |  |  ------------------
  |  |   28|   846k|            --((a)->used);                               \
  |  |   29|   846k|        (a)->sign = (a)->used ? (a)->sign : ZPOS;        \
  |  |  ------------------
  |  |  |  |  326|      0|#define ZPOS MP_ZPOS
  |  |  |  |  ------------------
  |  |  |  |  |  |   37|   846k|#define MP_ZPOS 0
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (29:21): [True: 846k, False: 0]
  |  |  ------------------
  |  |   30|   846k|    }
  ------------------
 3235|   846k|}

freebl_cpuid:
   41|      5|{
   42|      5|    __asm__("xor %%ecx, %%ecx\n\t"
   43|      5|            "cpuid\n\t"
   44|      5|            : "=a"(*eax),
   45|      5|              "=b"(*ebx),
   46|      5|              "=c"(*ecx),
   47|      5|              "=d"(*edx)
   48|      5|            : "0"(op));
   49|      5|}
s_mpi_getProcessorLineSize:
  653|      1|{
  654|      1|    unsigned long eax, ebx, ecx, edx;
  655|      1|    PRUint32 cpuid[3];
  656|      1|    unsigned long cpuidLevel;
  657|      1|    unsigned long cacheLineSize = 0;
  658|      1|    int manufacturer = MAN_UNKNOWN;
  ------------------
  |  |  627|      1|#define MAN_UNKNOWN 9
  ------------------
  659|      1|    int i;
  660|      1|    char string[13];
  661|       |
  662|       |#if !defined(AMD_64)
  663|       |    if (is386()) {
  664|       |        return 0; /* 386 had no cache */
  665|       |    }
  666|       |    if (is486()) {
  667|       |        return 32; /* really? need more info */
  668|       |    }
  669|       |#endif
  670|       |
  671|       |    /* Pentium, cpuid command is available */
  672|      1|    freebl_cpuid(0, &eax, &ebx, &ecx, &edx);
  673|      1|    cpuidLevel = eax;
  674|       |    /* string holds the CPU's manufacturer ID string - a twelve
  675|       |     * character ASCII string stored in ebx, edx, ecx, and
  676|       |     * the 32-bit extended feature flags are in edx, ecx.
  677|       |     */
  678|      1|    cpuid[0] = ebx;
  679|      1|    cpuid[1] = ecx;
  680|      1|    cpuid[2] = edx;
  681|      1|    memcpy(string, cpuid, sizeof(cpuid));
  682|      1|    string[12] = 0;
  683|       |
  684|      1|    manufacturer = MAN_UNKNOWN;
  ------------------
  |  |  627|      1|#define MAN_UNKNOWN 9
  ------------------
  685|     11|    for (i = 0; i < n_manufacturers; i++) {
  ------------------
  |  Branch (685:17): [True: 10, False: 1]
  ------------------
  686|     10|        if (strcmp(manMap[i], string) == 0) {
  ------------------
  |  Branch (686:13): [True: 0, False: 10]
  ------------------
  687|      0|            manufacturer = i;
  688|      0|        }
  689|     10|    }
  690|       |
  691|      1|    if (manufacturer == INTEL) {
  ------------------
  |  |  603|      1|#define INTEL 0
  ------------------
  |  Branch (691:9): [True: 0, False: 1]
  ------------------
  692|      0|        cacheLineSize = getIntelCacheLineSize(cpuidLevel);
  693|      1|    } else {
  694|      1|        cacheLineSize = getOtherCacheLineSize(cpuidLevel);
  695|      1|    }
  696|       |    /* doesn't support cache info based on cpuid. This means
  697|       |     * an old pentium class processor, which have cache lines of
  698|       |     * 32. If we learn differently, we can use a switch based on
  699|       |     * the Manufacturer id  */
  700|      1|    if (cacheLineSize == 0) {
  ------------------
  |  Branch (700:9): [True: 0, False: 1]
  ------------------
  701|      0|        cacheLineSize = 32;
  702|      0|    }
  703|      1|    return cacheLineSize;
  704|      1|}
mpcpucache.c:getOtherCacheLineSize:
  587|      1|{
  588|      1|    unsigned long lineSize = 0;
  589|      1|    unsigned long eax, ebx, ecx, edx;
  590|       |
  591|       |    /* get the Extended CPUID level */
  592|      1|    freebl_cpuid(0x80000000, &eax, &ebx, &ecx, &edx);
  593|      1|    cpuidLevel = eax;
  594|       |
  595|      1|    if (cpuidLevel >= 0x80000005) {
  ------------------
  |  Branch (595:9): [True: 1, False: 0]
  ------------------
  596|      1|        freebl_cpuid(0x80000005, &eax, &ebx, &ecx, &edx);
  597|      1|        lineSize = ecx & 0xff; /* line Size, L1 Data Cache */
  598|      1|    }
  599|      1|    return lineSize;
  600|      1|}

mp_init:
  121|  52.4k|{
  122|  52.4k|    return mp_init_size(mp, s_mp_defprec);
  123|       |
  124|  52.4k|} /* end mp_init() */
mp_init_size:
  140|   380k|{
  141|   380k|    ARGCHK(mp != NULL && prec > 0, MP_BADARG);
  ------------------
  |  |  355|   380k|#define ARGCHK(X, Y) assert(X)
  ------------------
  142|       |
  143|   380k|    prec = MP_ROUNDUP(prec, s_mp_defprec);
  ------------------
  |  |   89|   380k|#define MP_ROUNDUP(a, b) (MP_HOWMANY(a, b) * (b))
  |  |  ------------------
  |  |  |  |   88|   380k|#define MP_HOWMANY(a, b) (((a) + (b)-1) / (b))
  |  |  ------------------
  ------------------
  144|   380k|    if ((DIGITS(mp) = s_mp_alloc(prec, sizeof(mp_digit))) == NULL)
  ------------------
  |  |  335|   380k|#define DIGITS(MP) MP_DIGITS(MP)
  |  |  ------------------
  |  |  |  |  152|   380k|#define MP_DIGITS(MP) ((MP)->dp)
  |  |  ------------------
  ------------------
  |  Branch (144:9): [True: 0, False: 380k]
  ------------------
  145|      0|        return MP_MEM;
  ------------------
  |  |   42|      0|#define MP_MEM -2    /* out of memory         */
  ------------------
  146|       |
  147|   380k|    SIGN(mp) = ZPOS;
  ------------------
  |  |  332|   380k|#define SIGN(MP) MP_SIGN(MP)
  |  |  ------------------
  |  |  |  |  149|   380k|#define MP_SIGN(MP) ((MP)->sign)
  |  |  ------------------
  ------------------
                  SIGN(mp) = ZPOS;
  ------------------
  |  |  326|   380k|#define ZPOS MP_ZPOS
  |  |  ------------------
  |  |  |  |   37|   380k|#define MP_ZPOS 0
  |  |  ------------------
  ------------------
  148|   380k|    USED(mp) = 1;
  ------------------
  |  |  333|   380k|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|   380k|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
  149|   380k|    ALLOC(mp) = prec;
  ------------------
  |  |  334|   380k|#define ALLOC(MP) MP_ALLOC(MP)
  |  |  ------------------
  |  |  |  |  151|   380k|#define MP_ALLOC(MP) ((MP)->alloc)
  |  |  ------------------
  ------------------
  150|       |
  151|   380k|    return MP_OKAY;
  ------------------
  |  |   39|   380k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  152|       |
  153|   380k|} /* end mp_init_size() */
mp_init_copy:
  169|  1.30M|{
  170|  1.30M|    ARGCHK(mp != NULL && from != NULL, MP_BADARG);
  ------------------
  |  |  355|  1.30M|#define ARGCHK(X, Y) assert(X)
  ------------------
  171|       |
  172|  1.30M|    if (mp == from)
  ------------------
  |  Branch (172:9): [True: 0, False: 1.30M]
  ------------------
  173|      0|        return MP_OKAY;
  ------------------
  |  |   39|      0|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  174|       |
  175|  1.30M|    if ((DIGITS(mp) = s_mp_alloc(ALLOC(from), sizeof(mp_digit))) == NULL)
  ------------------
  |  |  335|  1.30M|#define DIGITS(MP) MP_DIGITS(MP)
  |  |  ------------------
  |  |  |  |  152|  1.30M|#define MP_DIGITS(MP) ((MP)->dp)
  |  |  ------------------
  ------------------
                  if ((DIGITS(mp) = s_mp_alloc(ALLOC(from), sizeof(mp_digit))) == NULL)
  ------------------
  |  |  334|  1.30M|#define ALLOC(MP) MP_ALLOC(MP)
  |  |  ------------------
  |  |  |  |  151|  1.30M|#define MP_ALLOC(MP) ((MP)->alloc)
  |  |  ------------------
  ------------------
  |  Branch (175:9): [True: 0, False: 1.30M]
  ------------------
  176|      0|        return MP_MEM;
  ------------------
  |  |   42|      0|#define MP_MEM -2    /* out of memory         */
  ------------------
  177|       |
  178|  1.30M|    s_mp_copy(DIGITS(from), DIGITS(mp), USED(from));
  ------------------
  |  |  335|  1.30M|#define DIGITS(MP) MP_DIGITS(MP)
  |  |  ------------------
  |  |  |  |  152|  1.30M|#define MP_DIGITS(MP) ((MP)->dp)
  |  |  ------------------
  ------------------
                  s_mp_copy(DIGITS(from), DIGITS(mp), USED(from));
  ------------------
  |  |  335|  1.30M|#define DIGITS(MP) MP_DIGITS(MP)
  |  |  ------------------
  |  |  |  |  152|  1.30M|#define MP_DIGITS(MP) ((MP)->dp)
  |  |  ------------------
  ------------------
                  s_mp_copy(DIGITS(from), DIGITS(mp), USED(from));
  ------------------
  |  |  333|  1.30M|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|  1.30M|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
  179|  1.30M|    USED(mp) = USED(from);
  ------------------
  |  |  333|  1.30M|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|  1.30M|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
                  USED(mp) = USED(from);
  ------------------
  |  |  333|  1.30M|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|  1.30M|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
  180|  1.30M|    ALLOC(mp) = ALLOC(from);
  ------------------
  |  |  334|  1.30M|#define ALLOC(MP) MP_ALLOC(MP)
  |  |  ------------------
  |  |  |  |  151|  1.30M|#define MP_ALLOC(MP) ((MP)->alloc)
  |  |  ------------------
  ------------------
                  ALLOC(mp) = ALLOC(from);
  ------------------
  |  |  334|  1.30M|#define ALLOC(MP) MP_ALLOC(MP)
  |  |  ------------------
  |  |  |  |  151|  1.30M|#define MP_ALLOC(MP) ((MP)->alloc)
  |  |  ------------------
  ------------------
  181|  1.30M|    SIGN(mp) = SIGN(from);
  ------------------
  |  |  332|  1.30M|#define SIGN(MP) MP_SIGN(MP)
  |  |  ------------------
  |  |  |  |  149|  1.30M|#define MP_SIGN(MP) ((MP)->sign)
  |  |  ------------------
  ------------------
                  SIGN(mp) = SIGN(from);
  ------------------
  |  |  332|  1.30M|#define SIGN(MP) MP_SIGN(MP)
  |  |  ------------------
  |  |  |  |  149|  1.30M|#define MP_SIGN(MP) ((MP)->sign)
  |  |  ------------------
  ------------------
  182|       |
  183|  1.30M|    return MP_OKAY;
  ------------------
  |  |   39|  1.30M|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  184|       |
  185|  1.30M|} /* end mp_init_copy() */
mp_copy:
  201|   225k|{
  202|   225k|    ARGCHK(from != NULL && to != NULL, MP_BADARG);
  ------------------
  |  |  355|   225k|#define ARGCHK(X, Y) assert(X)
  ------------------
  203|       |
  204|   225k|    if (from == to)
  ------------------
  |  Branch (204:9): [True: 4.13k, False: 221k]
  ------------------
  205|  4.13k|        return MP_OKAY;
  ------------------
  |  |   39|  4.13k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  206|       |
  207|   221k|    { /* copy */
  208|   221k|        mp_digit *tmp;
  209|       |
  210|       |        /*
  211|       |          If the allocated buffer in 'to' already has enough space to hold
  212|       |          all the used digits of 'from', we'll re-use it to avoid hitting
  213|       |          the memory allocater more than necessary; otherwise, we'd have
  214|       |          to grow anyway, so we just allocate a hunk and make the copy as
  215|       |          usual
  216|       |         */
  217|   221k|        if (ALLOC(to) >= USED(from)) {
  ------------------
  |  |  334|   221k|#define ALLOC(MP) MP_ALLOC(MP)
  |  |  ------------------
  |  |  |  |  151|   221k|#define MP_ALLOC(MP) ((MP)->alloc)
  |  |  ------------------
  ------------------
                      if (ALLOC(to) >= USED(from)) {
  ------------------
  |  |  333|   221k|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|   221k|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
  |  Branch (217:13): [True: 221k, False: 0]
  ------------------
  218|   221k|            s_mp_setz(DIGITS(to) + USED(from), ALLOC(to) - USED(from));
  ------------------
  |  |  335|   221k|#define DIGITS(MP) MP_DIGITS(MP)
  |  |  ------------------
  |  |  |  |  152|   221k|#define MP_DIGITS(MP) ((MP)->dp)
  |  |  ------------------
  ------------------
                          s_mp_setz(DIGITS(to) + USED(from), ALLOC(to) - USED(from));
  ------------------
  |  |  333|   221k|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|   221k|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
                          s_mp_setz(DIGITS(to) + USED(from), ALLOC(to) - USED(from));
  ------------------
  |  |  334|   221k|#define ALLOC(MP) MP_ALLOC(MP)
  |  |  ------------------
  |  |  |  |  151|   221k|#define MP_ALLOC(MP) ((MP)->alloc)
  |  |  ------------------
  ------------------
                          s_mp_setz(DIGITS(to) + USED(from), ALLOC(to) - USED(from));
  ------------------
  |  |  333|   221k|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|   221k|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
  219|   221k|            s_mp_copy(DIGITS(from), DIGITS(to), USED(from));
  ------------------
  |  |  335|   221k|#define DIGITS(MP) MP_DIGITS(MP)
  |  |  ------------------
  |  |  |  |  152|   221k|#define MP_DIGITS(MP) ((MP)->dp)
  |  |  ------------------
  ------------------
                          s_mp_copy(DIGITS(from), DIGITS(to), USED(from));
  ------------------
  |  |  335|   221k|#define DIGITS(MP) MP_DIGITS(MP)
  |  |  ------------------
  |  |  |  |  152|   221k|#define MP_DIGITS(MP) ((MP)->dp)
  |  |  ------------------
  ------------------
                          s_mp_copy(DIGITS(from), DIGITS(to), USED(from));
  ------------------
  |  |  333|   221k|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|   221k|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
  220|       |
  221|   221k|        } else {
  222|      0|            if ((tmp = s_mp_alloc(ALLOC(from), sizeof(mp_digit))) == NULL)
  ------------------
  |  |  334|      0|#define ALLOC(MP) MP_ALLOC(MP)
  |  |  ------------------
  |  |  |  |  151|      0|#define MP_ALLOC(MP) ((MP)->alloc)
  |  |  ------------------
  ------------------
  |  Branch (222:17): [True: 0, False: 0]
  ------------------
  223|      0|                return MP_MEM;
  ------------------
  |  |   42|      0|#define MP_MEM -2    /* out of memory         */
  ------------------
  224|       |
  225|      0|            s_mp_copy(DIGITS(from), tmp, USED(from));
  ------------------
  |  |  335|      0|#define DIGITS(MP) MP_DIGITS(MP)
  |  |  ------------------
  |  |  |  |  152|      0|#define MP_DIGITS(MP) ((MP)->dp)
  |  |  ------------------
  ------------------
                          s_mp_copy(DIGITS(from), tmp, USED(from));
  ------------------
  |  |  333|      0|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|      0|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
  226|       |
  227|      0|            if (DIGITS(to) != NULL) {
  ------------------
  |  |  335|      0|#define DIGITS(MP) MP_DIGITS(MP)
  |  |  ------------------
  |  |  |  |  152|      0|#define MP_DIGITS(MP) ((MP)->dp)
  |  |  ------------------
  ------------------
  |  Branch (227:17): [True: 0, False: 0]
  ------------------
  228|      0|                s_mp_setz(DIGITS(to), ALLOC(to));
  ------------------
  |  |  335|      0|#define DIGITS(MP) MP_DIGITS(MP)
  |  |  ------------------
  |  |  |  |  152|      0|#define MP_DIGITS(MP) ((MP)->dp)
  |  |  ------------------
  ------------------
                              s_mp_setz(DIGITS(to), ALLOC(to));
  ------------------
  |  |  334|      0|#define ALLOC(MP) MP_ALLOC(MP)
  |  |  ------------------
  |  |  |  |  151|      0|#define MP_ALLOC(MP) ((MP)->alloc)
  |  |  ------------------
  ------------------
  229|      0|                s_mp_free(DIGITS(to));
  ------------------
  |  |  335|      0|#define DIGITS(MP) MP_DIGITS(MP)
  |  |  ------------------
  |  |  |  |  152|      0|#define MP_DIGITS(MP) ((MP)->dp)
  |  |  ------------------
  ------------------
  230|      0|            }
  231|       |
  232|      0|            DIGITS(to) = tmp;
  ------------------
  |  |  335|      0|#define DIGITS(MP) MP_DIGITS(MP)
  |  |  ------------------
  |  |  |  |  152|      0|#define MP_DIGITS(MP) ((MP)->dp)
  |  |  ------------------
  ------------------
  233|      0|            ALLOC(to) = ALLOC(from);
  ------------------
  |  |  334|      0|#define ALLOC(MP) MP_ALLOC(MP)
  |  |  ------------------
  |  |  |  |  151|      0|#define MP_ALLOC(MP) ((MP)->alloc)
  |  |  ------------------
  ------------------
                          ALLOC(to) = ALLOC(from);
  ------------------
  |  |  334|      0|#define ALLOC(MP) MP_ALLOC(MP)
  |  |  ------------------
  |  |  |  |  151|      0|#define MP_ALLOC(MP) ((MP)->alloc)
  |  |  ------------------
  ------------------
  234|      0|        }
  235|       |
  236|       |        /* Copy the precision and sign from the original */
  237|   221k|        USED(to) = USED(from);
  ------------------
  |  |  333|   221k|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|   221k|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
                      USED(to) = USED(from);
  ------------------
  |  |  333|   221k|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|   221k|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
  238|   221k|        SIGN(to) = SIGN(from);
  ------------------
  |  |  332|   221k|#define SIGN(MP) MP_SIGN(MP)
  |  |  ------------------
  |  |  |  |  149|   221k|#define MP_SIGN(MP) ((MP)->sign)
  |  |  ------------------
  ------------------
                      SIGN(to) = SIGN(from);
  ------------------
  |  |  332|   221k|#define SIGN(MP) MP_SIGN(MP)
  |  |  ------------------
  |  |  |  |  149|   221k|#define MP_SIGN(MP) ((MP)->sign)
  |  |  ------------------
  ------------------
  239|   221k|    } /* end copy */
  240|       |
  241|   221k|    return MP_OKAY;
  ------------------
  |  |   39|   221k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  242|       |
  243|   221k|} /* end mp_copy() */
mp_exch:
  259|  6.15k|{
  260|  6.15k|#if MP_ARGCHK == 2
  261|  6.15k|    assert(mp1 != NULL && mp2 != NULL);
  262|       |#else
  263|       |    if (mp1 == NULL || mp2 == NULL)
  264|       |        return;
  265|       |#endif
  266|       |
  267|  6.15k|    s_mp_exch(mp1, mp2);
  268|       |
  269|  6.15k|} /* end mp_exch() */
mp_clear:
  285|  3.20M|{
  286|  3.20M|    if (mp == NULL)
  ------------------
  |  Branch (286:9): [True: 0, False: 3.20M]
  ------------------
  287|      0|        return;
  288|       |
  289|  3.20M|    if (DIGITS(mp) != NULL) {
  ------------------
  |  |  335|  3.20M|#define DIGITS(MP) MP_DIGITS(MP)
  |  |  ------------------
  |  |  |  |  152|  3.20M|#define MP_DIGITS(MP) ((MP)->dp)
  |  |  ------------------
  ------------------
  |  Branch (289:9): [True: 1.68M, False: 1.52M]
  ------------------
  290|  1.68M|        s_mp_setz(DIGITS(mp), ALLOC(mp));
  ------------------
  |  |  335|  1.68M|#define DIGITS(MP) MP_DIGITS(MP)
  |  |  ------------------
  |  |  |  |  152|  1.68M|#define MP_DIGITS(MP) ((MP)->dp)
  |  |  ------------------
  ------------------
                      s_mp_setz(DIGITS(mp), ALLOC(mp));
  ------------------
  |  |  334|  1.68M|#define ALLOC(MP) MP_ALLOC(MP)
  |  |  ------------------
  |  |  |  |  151|  1.68M|#define MP_ALLOC(MP) ((MP)->alloc)
  |  |  ------------------
  ------------------
  291|  1.68M|        s_mp_free(DIGITS(mp));
  ------------------
  |  |  335|  1.68M|#define DIGITS(MP) MP_DIGITS(MP)
  |  |  ------------------
  |  |  |  |  152|  1.68M|#define MP_DIGITS(MP) ((MP)->dp)
  |  |  ------------------
  ------------------
  292|  1.68M|        DIGITS(mp) = NULL;
  ------------------
  |  |  335|  1.68M|#define DIGITS(MP) MP_DIGITS(MP)
  |  |  ------------------
  |  |  |  |  152|  1.68M|#define MP_DIGITS(MP) ((MP)->dp)
  |  |  ------------------
  ------------------
  293|  1.68M|    }
  294|       |
  295|  3.20M|    USED(mp) = 0;
  ------------------
  |  |  333|  3.20M|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|  3.20M|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
  296|  3.20M|    ALLOC(mp) = 0;
  ------------------
  |  |  334|  3.20M|#define ALLOC(MP) MP_ALLOC(MP)
  |  |  ------------------
  |  |  |  |  151|  3.20M|#define MP_ALLOC(MP) ((MP)->alloc)
  |  |  ------------------
  ------------------
  297|       |
  298|  3.20M|} /* end mp_clear() */
mp_zero:
  312|  80.5k|{
  313|  80.5k|    if (mp == NULL)
  ------------------
  |  Branch (313:9): [True: 0, False: 80.5k]
  ------------------
  314|      0|        return;
  315|       |
  316|  80.5k|    s_mp_setz(DIGITS(mp), ALLOC(mp));
  ------------------
  |  |  335|  80.5k|#define DIGITS(MP) MP_DIGITS(MP)
  |  |  ------------------
  |  |  |  |  152|  80.5k|#define MP_DIGITS(MP) ((MP)->dp)
  |  |  ------------------
  ------------------
                  s_mp_setz(DIGITS(mp), ALLOC(mp));
  ------------------
  |  |  334|  80.5k|#define ALLOC(MP) MP_ALLOC(MP)
  |  |  ------------------
  |  |  |  |  151|  80.5k|#define MP_ALLOC(MP) ((MP)->alloc)
  |  |  ------------------
  ------------------
  317|  80.5k|    USED(mp) = 1;
  ------------------
  |  |  333|  80.5k|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|  80.5k|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
  318|  80.5k|    SIGN(mp) = ZPOS;
  ------------------
  |  |  332|  80.5k|#define SIGN(MP) MP_SIGN(MP)
  |  |  ------------------
  |  |  |  |  149|  80.5k|#define MP_SIGN(MP) ((MP)->sign)
  |  |  ------------------
  ------------------
                  SIGN(mp) = ZPOS;
  ------------------
  |  |  326|  80.5k|#define ZPOS MP_ZPOS
  |  |  ------------------
  |  |  |  |   37|  80.5k|#define MP_ZPOS 0
  |  |  ------------------
  ------------------
  319|       |
  320|  80.5k|} /* end mp_zero() */
mp_set:
  328|  33.0k|{
  329|  33.0k|    if (mp == NULL)
  ------------------
  |  Branch (329:9): [True: 0, False: 33.0k]
  ------------------
  330|      0|        return;
  331|       |
  332|  33.0k|    mp_zero(mp);
  333|  33.0k|    DIGIT(mp, 0) = d;
  ------------------
  |  |  336|  33.0k|#define DIGIT(MP, N) MP_DIGIT(MP, N)
  |  |  ------------------
  |  |  |  |  153|  33.0k|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  |  |  ------------------
  ------------------
  334|       |
  335|  33.0k|} /* end mp_set() */
mp_sub_d:
  453|  2.07k|{
  454|  2.07k|    mp_int tmp;
  455|  2.07k|    mp_err res;
  456|       |
  457|  2.07k|    ARGCHK(a != NULL && b != NULL, MP_BADARG);
  ------------------
  |  |  355|  2.07k|#define ARGCHK(X, Y) assert(X)
  ------------------
  458|       |
  459|  2.07k|    if ((res = mp_init_copy(&tmp, a)) != MP_OKAY)
  ------------------
  |  |   39|  2.07k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (459:9): [True: 0, False: 2.07k]
  ------------------
  460|      0|        return res;
  461|       |
  462|  2.07k|    if (SIGN(&tmp) == NEG) {
  ------------------
  |  |  332|  2.07k|#define SIGN(MP) MP_SIGN(MP)
  |  |  ------------------
  |  |  |  |  149|  2.07k|#define MP_SIGN(MP) ((MP)->sign)
  |  |  ------------------
  ------------------
                  if (SIGN(&tmp) == NEG) {
  ------------------
  |  |  325|  2.07k|#define NEG MP_NEG
  |  |  ------------------
  |  |  |  |   36|  2.07k|#define MP_NEG 1
  |  |  ------------------
  ------------------
  |  Branch (462:9): [True: 0, False: 2.07k]
  ------------------
  463|      0|        if ((res = s_mp_add_d(&tmp, d)) != MP_OKAY)
  ------------------
  |  |   39|      0|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (463:13): [True: 0, False: 0]
  ------------------
  464|      0|            goto CLEANUP;
  465|  2.07k|    } else if (s_mp_cmp_d(&tmp, d) >= 0) {
  ------------------
  |  Branch (465:16): [True: 2.07k, False: 0]
  ------------------
  466|  2.07k|        if ((res = s_mp_sub_d(&tmp, d)) != MP_OKAY)
  ------------------
  |  |   39|  2.07k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (466:13): [True: 0, False: 2.07k]
  ------------------
  467|      0|            goto CLEANUP;
  468|  2.07k|    } else {
  469|      0|        mp_neg(&tmp, &tmp);
  470|       |
  471|      0|        DIGIT(&tmp, 0) = d - DIGIT(&tmp, 0);
  ------------------
  |  |  336|      0|#define DIGIT(MP, N) MP_DIGIT(MP, N)
  |  |  ------------------
  |  |  |  |  153|      0|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  |  |  ------------------
  ------------------
                      DIGIT(&tmp, 0) = d - DIGIT(&tmp, 0);
  ------------------
  |  |  336|      0|#define DIGIT(MP, N) MP_DIGIT(MP, N)
  |  |  ------------------
  |  |  |  |  153|      0|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  |  |  ------------------
  ------------------
  472|      0|        SIGN(&tmp) = NEG;
  ------------------
  |  |  332|      0|#define SIGN(MP) MP_SIGN(MP)
  |  |  ------------------
  |  |  |  |  149|      0|#define MP_SIGN(MP) ((MP)->sign)
  |  |  ------------------
  ------------------
                      SIGN(&tmp) = NEG;
  ------------------
  |  |  325|      0|#define NEG MP_NEG
  |  |  ------------------
  |  |  |  |   36|      0|#define MP_NEG 1
  |  |  ------------------
  ------------------
  473|      0|    }
  474|       |
  475|  2.07k|    if (s_mp_cmp_d(&tmp, 0) == 0)
  ------------------
  |  Branch (475:9): [True: 0, False: 2.07k]
  ------------------
  476|      0|        SIGN(&tmp) = ZPOS;
  ------------------
  |  |  332|      0|#define SIGN(MP) MP_SIGN(MP)
  |  |  ------------------
  |  |  |  |  149|      0|#define MP_SIGN(MP) ((MP)->sign)
  |  |  ------------------
  ------------------
                      SIGN(&tmp) = ZPOS;
  ------------------
  |  |  326|      0|#define ZPOS MP_ZPOS
  |  |  ------------------
  |  |  |  |   37|      0|#define MP_ZPOS 0
  |  |  ------------------
  ------------------
  477|       |
  478|  2.07k|    s_mp_exch(&tmp, b);
  479|       |
  480|  2.07k|CLEANUP:
  481|  2.07k|    mp_clear(&tmp);
  482|  2.07k|    return res;
  483|       |
  484|  2.07k|} /* end mp_sub_d() */
mp_add:
  741|  2.33M|{
  742|  2.33M|    mp_err res;
  743|       |
  744|  2.33M|    ARGCHK(a != NULL && b != NULL && c != NULL, MP_BADARG);
  ------------------
  |  |  355|  2.33M|#define ARGCHK(X, Y) assert(X)
  ------------------
  745|       |
  746|  2.33M|    if (SIGN(a) == SIGN(b)) { /* same sign:  add values, keep sign */
  ------------------
  |  |  332|  2.33M|#define SIGN(MP) MP_SIGN(MP)
  |  |  ------------------
  |  |  |  |  149|  2.33M|#define MP_SIGN(MP) ((MP)->sign)
  |  |  ------------------
  ------------------
                  if (SIGN(a) == SIGN(b)) { /* same sign:  add values, keep sign */
  ------------------
  |  |  332|  2.33M|#define SIGN(MP) MP_SIGN(MP)
  |  |  ------------------
  |  |  |  |  149|  2.33M|#define MP_SIGN(MP) ((MP)->sign)
  |  |  ------------------
  ------------------
  |  Branch (746:9): [True: 1.64M, False: 695k]
  ------------------
  747|  1.64M|        MP_CHECKOK(s_mp_add_3arg(a, b, c));
  ------------------
  |  |  319|  1.64M|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  1.64M|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 1.64M]
  |  |  ------------------
  |  |  320|  1.64M|    goto CLEANUP
  ------------------
  748|  1.64M|    } else if (s_mp_cmp(a, b) >= 0) { /* different sign: |a| >= |b|   */
  ------------------
  |  Branch (748:16): [True: 245k, False: 449k]
  ------------------
  749|   245k|        MP_CHECKOK(s_mp_sub_3arg(a, b, c));
  ------------------
  |  |  319|   245k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|   245k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 245k]
  |  |  ------------------
  |  |  320|   245k|    goto CLEANUP
  ------------------
  750|   449k|    } else { /* different sign: |a|  < |b|   */
  751|   449k|        MP_CHECKOK(s_mp_sub_3arg(b, a, c));
  ------------------
  |  |  319|   449k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|   449k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 449k]
  |  |  ------------------
  |  |  320|   449k|    goto CLEANUP
  ------------------
  752|   449k|    }
  753|       |
  754|  2.33M|    if (s_mp_cmp_d(c, 0) == MP_EQ)
  ------------------
  |  |   50|  2.33M|#define MP_EQ 0
  ------------------
  |  Branch (754:9): [True: 2.01k, False: 2.33M]
  ------------------
  755|  2.01k|        SIGN(c) = ZPOS;
  ------------------
  |  |  332|  2.01k|#define SIGN(MP) MP_SIGN(MP)
  |  |  ------------------
  |  |  |  |  149|  2.01k|#define MP_SIGN(MP) ((MP)->sign)
  |  |  ------------------
  ------------------
                      SIGN(c) = ZPOS;
  ------------------
  |  |  326|  2.01k|#define ZPOS MP_ZPOS
  |  |  ------------------
  |  |  |  |   37|  2.01k|#define MP_ZPOS 0
  |  |  ------------------
  ------------------
  756|       |
  757|  2.33M|CLEANUP:
  758|  2.33M|    return res;
  759|       |
  760|  2.33M|} /* end mp_add() */
mp_sub:
  774|   381k|{
  775|   381k|    mp_err res;
  776|   381k|    int magDiff;
  777|       |
  778|   381k|    ARGCHK(a != NULL && b != NULL && c != NULL, MP_BADARG);
  ------------------
  |  |  355|   381k|#define ARGCHK(X, Y) assert(X)
  ------------------
  779|       |
  780|   381k|    if (a == b) {
  ------------------
  |  Branch (780:9): [True: 0, False: 381k]
  ------------------
  781|      0|        mp_zero(c);
  782|      0|        return MP_OKAY;
  ------------------
  |  |   39|      0|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  783|      0|    }
  784|       |
  785|   381k|    if (MP_SIGN(a) != MP_SIGN(b)) {
  ------------------
  |  |  149|   381k|#define MP_SIGN(MP) ((MP)->sign)
  ------------------
                  if (MP_SIGN(a) != MP_SIGN(b)) {
  ------------------
  |  |  149|   381k|#define MP_SIGN(MP) ((MP)->sign)
  ------------------
  |  Branch (785:9): [True: 0, False: 381k]
  ------------------
  786|      0|        MP_CHECKOK(s_mp_add_3arg(a, b, c));
  ------------------
  |  |  319|      0|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|      0|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  320|      0|    goto CLEANUP
  ------------------
  787|   381k|    } else if (!(magDiff = s_mp_cmp(a, b))) {
  ------------------
  |  Branch (787:16): [True: 20.9k, False: 360k]
  ------------------
  788|  20.9k|        mp_zero(c);
  789|  20.9k|        res = MP_OKAY;
  ------------------
  |  |   39|  20.9k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  790|   360k|    } else if (magDiff > 0) {
  ------------------
  |  Branch (790:16): [True: 333k, False: 27.3k]
  ------------------
  791|   333k|        MP_CHECKOK(s_mp_sub_3arg(a, b, c));
  ------------------
  |  |  319|   333k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|   333k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 333k]
  |  |  ------------------
  |  |  320|   333k|    goto CLEANUP
  ------------------
  792|   333k|    } else {
  793|  27.3k|        MP_CHECKOK(s_mp_sub_3arg(b, a, c));
  ------------------
  |  |  319|  27.3k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  27.3k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 27.3k]
  |  |  ------------------
  |  |  320|  27.3k|    goto CLEANUP
  ------------------
  794|  27.3k|        MP_SIGN(c) = !MP_SIGN(a);
  ------------------
  |  |  149|  27.3k|#define MP_SIGN(MP) ((MP)->sign)
  ------------------
                      MP_SIGN(c) = !MP_SIGN(a);
  ------------------
  |  |  149|  27.3k|#define MP_SIGN(MP) ((MP)->sign)
  ------------------
  795|  27.3k|    }
  796|       |
  797|   381k|    if (s_mp_cmp_d(c, 0) == MP_EQ)
  ------------------
  |  |   50|   381k|#define MP_EQ 0
  ------------------
  |  Branch (797:9): [True: 20.9k, False: 360k]
  ------------------
  798|  20.9k|        MP_SIGN(c) = MP_ZPOS;
  ------------------
  |  |  149|  20.9k|#define MP_SIGN(MP) ((MP)->sign)
  ------------------
                      MP_SIGN(c) = MP_ZPOS;
  ------------------
  |  |   37|  20.9k|#define MP_ZPOS 0
  ------------------
  799|       |
  800|   381k|CLEANUP:
  801|   381k|    return res;
  802|       |
  803|   381k|} /* end mp_sub() */
s_mp_mulg:
  819|   892k|{
  820|   892k|    mp_digit *pb;
  821|   892k|    mp_int tmp;
  822|   892k|    mp_err res;
  823|   892k|    mp_size ib;
  824|   892k|    mp_size useda, usedb;
  825|       |
  826|   892k|    ARGCHK(a != NULL && b != NULL && c != NULL, MP_BADARG);
  ------------------
  |  |  355|   892k|#define ARGCHK(X, Y) assert(X)
  ------------------
  827|       |
  828|   892k|    if (a == c) {
  ------------------
  |  Branch (828:9): [True: 884k, False: 8.50k]
  ------------------
  829|   884k|        if ((res = mp_init_copy(&tmp, a)) != MP_OKAY)
  ------------------
  |  |   39|   884k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (829:13): [True: 0, False: 884k]
  ------------------
  830|      0|            return res;
  831|   884k|        if (a == b)
  ------------------
  |  Branch (831:13): [True: 0, False: 884k]
  ------------------
  832|      0|            b = &tmp;
  833|   884k|        a = &tmp;
  834|   884k|    } else if (b == c) {
  ------------------
  |  Branch (834:16): [True: 0, False: 8.50k]
  ------------------
  835|      0|        if ((res = mp_init_copy(&tmp, b)) != MP_OKAY)
  ------------------
  |  |   39|      0|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (835:13): [True: 0, False: 0]
  ------------------
  836|      0|            return res;
  837|      0|        b = &tmp;
  838|  8.50k|    } else {
  839|  8.50k|        MP_DIGITS(&tmp) = 0;
  ------------------
  |  |  152|  8.50k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
  840|  8.50k|    }
  841|       |
  842|   892k|    if (MP_USED(a) < MP_USED(b)) {
  ------------------
  |  |  150|   892k|#define MP_USED(MP) ((MP)->used)
  ------------------
                  if (MP_USED(a) < MP_USED(b)) {
  ------------------
  |  |  150|   892k|#define MP_USED(MP) ((MP)->used)
  ------------------
  |  Branch (842:9): [True: 89.5k, False: 803k]
  ------------------
  843|  89.5k|        const mp_int *xch = b; /* switch a and b, to do fewer outer loops */
  844|  89.5k|        b = a;
  845|  89.5k|        a = xch;
  846|  89.5k|    }
  847|       |
  848|   892k|    MP_USED(c) = 1;
  ------------------
  |  |  150|   892k|#define MP_USED(MP) ((MP)->used)
  ------------------
  849|   892k|    MP_DIGIT(c, 0) = 0;
  ------------------
  |  |  153|   892k|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  ------------------
  850|   892k|    if ((res = s_mp_pad(c, USED(a) + USED(b))) != MP_OKAY)
  ------------------
  |  |  333|   892k|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|   892k|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
                  if ((res = s_mp_pad(c, USED(a) + USED(b))) != MP_OKAY)
  ------------------
  |  |  333|   892k|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|   892k|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
                  if ((res = s_mp_pad(c, USED(a) + USED(b))) != MP_OKAY)
  ------------------
  |  |   39|   892k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (850:9): [True: 0, False: 892k]
  ------------------
  851|      0|        goto CLEANUP;
  852|       |
  853|   892k|#ifdef NSS_USE_COMBA
  854|       |    /* comba isn't constant time because it clamps! If we cared
  855|       |     * (we needed a constant time version of multiply that was 'faster'
  856|       |     * we could easily pass constantTime down to the comba code and
  857|       |     * get it to skip the clamp... but here are assembler versions
  858|       |     * which add comba to platforms that can't compile the normal
  859|       |     * comba's imbedded assembler which would also need to change, so
  860|       |     * for now we just skip comba when we are running constant time. */
  861|   892k|    if (!constantTime && (MP_USED(a) == MP_USED(b)) && IS_POWER_OF_2(MP_USED(b))) {
  ------------------
  |  |  150|   892k|#define MP_USED(MP) ((MP)->used)
  ------------------
                  if (!constantTime && (MP_USED(a) == MP_USED(b)) && IS_POWER_OF_2(MP_USED(b))) {
  ------------------
  |  |  150|   892k|#define MP_USED(MP) ((MP)->used)
  ------------------
                  if (!constantTime && (MP_USED(a) == MP_USED(b)) && IS_POWER_OF_2(MP_USED(b))) {
  ------------------
  |  |  153|   801k|#define IS_POWER_OF_2(a) ((a) && !((a) & ((a)-1)))
  |  |  ------------------
  |  |  |  Branch (153:27): [True: 801k, False: 0]
  |  |  |  Branch (153:34): [True: 460k, False: 340k]
  |  |  ------------------
  ------------------
  |  Branch (861:9): [True: 892k, False: 0]
  |  Branch (861:26): [True: 801k, False: 91.9k]
  ------------------
  862|   460k|        if (MP_USED(a) == 4) {
  ------------------
  |  |  150|   460k|#define MP_USED(MP) ((MP)->used)
  ------------------
  |  Branch (862:13): [True: 2.58k, False: 457k]
  ------------------
  863|  2.58k|            s_mp_mul_comba_4(a, b, c);
  864|  2.58k|            goto CLEANUP;
  865|  2.58k|        }
  866|   457k|        if (MP_USED(a) == 8) {
  ------------------
  |  |  150|   457k|#define MP_USED(MP) ((MP)->used)
  ------------------
  |  Branch (866:13): [True: 55, False: 457k]
  ------------------
  867|     55|            s_mp_mul_comba_8(a, b, c);
  868|     55|            goto CLEANUP;
  869|     55|        }
  870|   457k|        if (MP_USED(a) == 16) {
  ------------------
  |  |  150|   457k|#define MP_USED(MP) ((MP)->used)
  ------------------
  |  Branch (870:13): [True: 43.9k, False: 413k]
  ------------------
  871|  43.9k|            s_mp_mul_comba_16(a, b, c);
  872|  43.9k|            goto CLEANUP;
  873|  43.9k|        }
  874|   413k|        if (MP_USED(a) == 32) {
  ------------------
  |  |  150|   413k|#define MP_USED(MP) ((MP)->used)
  ------------------
  |  Branch (874:13): [True: 404k, False: 9.37k]
  ------------------
  875|   404k|            s_mp_mul_comba_32(a, b, c);
  876|   404k|            goto CLEANUP;
  877|   404k|        }
  878|   413k|    }
  879|   442k|#endif
  880|       |
  881|   442k|    pb = MP_DIGITS(b);
  ------------------
  |  |  152|   442k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
  882|   442k|    s_mpv_mul_d(MP_DIGITS(a), MP_USED(a), *pb++, MP_DIGITS(c));
  ------------------
  |  |  181|   442k|    ((mp_digit *)c)[a_len] = s_mpv_mul_set_vec64(c, a, a_len, b)
  ------------------
  883|       |
  884|       |    /* Outer loop:  Digits of b */
  885|   442k|    useda = MP_USED(a);
  ------------------
  |  |  150|   442k|#define MP_USED(MP) ((MP)->used)
  ------------------
  886|   442k|    usedb = MP_USED(b);
  ------------------
  |  |  150|   442k|#define MP_USED(MP) ((MP)->used)
  ------------------
  887|  11.2M|    for (ib = 1; ib < usedb; ib++) {
  ------------------
  |  Branch (887:18): [True: 10.8M, False: 442k]
  ------------------
  888|  10.8M|        mp_digit b_i = *pb++;
  889|       |
  890|       |        /* Inner product:  Digits of a */
  891|  10.8M|        if (constantTime || b_i)
  ------------------
  |  Branch (891:13): [True: 0, False: 10.8M]
  |  Branch (891:29): [True: 9.16M, False: 1.65M]
  ------------------
  892|  9.16M|            s_mpv_mul_d_add(MP_DIGITS(a), useda, b_i, MP_DIGITS(c) + ib);
  ------------------
  |  |  185|  9.16M|    ((mp_digit *)c)[a_len] = s_mpv_mul_add_vec64(c, a, a_len, b)
  ------------------
  893|  1.65M|        else
  894|  1.65M|            MP_DIGIT(c, ib + useda) = b_i;
  ------------------
  |  |  153|  1.65M|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  ------------------
  895|  10.8M|    }
  896|       |
  897|   442k|    if (!constantTime) {
  ------------------
  |  Branch (897:9): [True: 442k, False: 0]
  ------------------
  898|   442k|        s_mp_clamp(c);
  899|   442k|    }
  900|       |
  901|   442k|    if (SIGN(a) == SIGN(b) || s_mp_cmp_d(c, 0) == MP_EQ)
  ------------------
  |  |  332|   442k|#define SIGN(MP) MP_SIGN(MP)
  |  |  ------------------
  |  |  |  |  149|   442k|#define MP_SIGN(MP) ((MP)->sign)
  |  |  ------------------
  ------------------
                  if (SIGN(a) == SIGN(b) || s_mp_cmp_d(c, 0) == MP_EQ)
  ------------------
  |  |  332|   442k|#define SIGN(MP) MP_SIGN(MP)
  |  |  ------------------
  |  |  |  |  149|   884k|#define MP_SIGN(MP) ((MP)->sign)
  |  |  ------------------
  ------------------
                  if (SIGN(a) == SIGN(b) || s_mp_cmp_d(c, 0) == MP_EQ)
  ------------------
  |  |   50|  4.96k|#define MP_EQ 0
  ------------------
  |  Branch (901:9): [True: 437k, False: 4.96k]
  |  Branch (901:31): [True: 0, False: 4.96k]
  ------------------
  902|   437k|        SIGN(c) = ZPOS;
  ------------------
  |  |  332|   437k|#define SIGN(MP) MP_SIGN(MP)
  |  |  ------------------
  |  |  |  |  149|   437k|#define MP_SIGN(MP) ((MP)->sign)
  |  |  ------------------
  ------------------
                      SIGN(c) = ZPOS;
  ------------------
  |  |  326|   437k|#define ZPOS MP_ZPOS
  |  |  ------------------
  |  |  |  |   37|   437k|#define MP_ZPOS 0
  |  |  ------------------
  ------------------
  903|  4.96k|    else
  904|  4.96k|        SIGN(c) = NEG;
  ------------------
  |  |  332|  4.96k|#define SIGN(MP) MP_SIGN(MP)
  |  |  ------------------
  |  |  |  |  149|  4.96k|#define MP_SIGN(MP) ((MP)->sign)
  |  |  ------------------
  ------------------
                      SIGN(c) = NEG;
  ------------------
  |  |  325|  4.96k|#define NEG MP_NEG
  |  |  ------------------
  |  |  |  |   36|  4.96k|#define MP_NEG 1
  |  |  ------------------
  ------------------
  905|       |
  906|   892k|CLEANUP:
  907|   892k|    mp_clear(&tmp);
  908|   892k|    return res;
  909|   442k|} /* end smp_mulg() */
mp_mul:
  923|   892k|{
  924|   892k|    return s_mp_mulg(a, b, c, 0);
  925|   892k|} /* end mp_mul() */
mp_sqr:
  971|  1.50M|{
  972|  1.50M|    mp_digit *pa;
  973|  1.50M|    mp_digit d;
  974|  1.50M|    mp_err res;
  975|  1.50M|    mp_size ix;
  976|  1.50M|    mp_int tmp;
  977|  1.50M|    int count;
  978|       |
  979|  1.50M|    ARGCHK(a != NULL && sqr != NULL, MP_BADARG);
  ------------------
  |  |  355|  1.50M|#define ARGCHK(X, Y) assert(X)
  ------------------
  980|       |
  981|  1.50M|    if (a == sqr) {
  ------------------
  |  Branch (981:9): [True: 0, False: 1.50M]
  ------------------
  982|      0|        if ((res = mp_init_copy(&tmp, a)) != MP_OKAY)
  ------------------
  |  |   39|      0|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (982:13): [True: 0, False: 0]
  ------------------
  983|      0|            return res;
  984|      0|        a = &tmp;
  985|  1.50M|    } else {
  986|  1.50M|        DIGITS(&tmp) = 0;
  ------------------
  |  |  335|  1.50M|#define DIGITS(MP) MP_DIGITS(MP)
  |  |  ------------------
  |  |  |  |  152|  1.50M|#define MP_DIGITS(MP) ((MP)->dp)
  |  |  ------------------
  ------------------
  987|  1.50M|        res = MP_OKAY;
  ------------------
  |  |   39|  1.50M|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  988|  1.50M|    }
  989|       |
  990|  1.50M|    ix = 2 * MP_USED(a);
  ------------------
  |  |  150|  1.50M|#define MP_USED(MP) ((MP)->used)
  ------------------
  991|  1.50M|    if (ix > MP_ALLOC(sqr)) {
  ------------------
  |  |  151|  1.50M|#define MP_ALLOC(MP) ((MP)->alloc)
  ------------------
  |  Branch (991:9): [True: 0, False: 1.50M]
  ------------------
  992|      0|        MP_USED(sqr) = 1;
  ------------------
  |  |  150|      0|#define MP_USED(MP) ((MP)->used)
  ------------------
  993|      0|        MP_CHECKOK(s_mp_grow(sqr, ix));
  ------------------
  |  |  319|      0|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|      0|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  320|      0|    goto CLEANUP
  ------------------
  994|      0|    }
  995|  1.50M|    MP_USED(sqr) = ix;
  ------------------
  |  |  150|  1.50M|#define MP_USED(MP) ((MP)->used)
  ------------------
  996|  1.50M|    MP_DIGIT(sqr, 0) = 0;
  ------------------
  |  |  153|  1.50M|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  ------------------
  997|       |
  998|  1.50M|#ifdef NSS_USE_COMBA
  999|  1.50M|    if (IS_POWER_OF_2(MP_USED(a))) {
  ------------------
  |  |  153|  1.50M|#define IS_POWER_OF_2(a) ((a) && !((a) & ((a)-1)))
  |  |  ------------------
  |  |  |  Branch (153:27): [True: 1.50M, False: 0]
  |  |  |  Branch (153:34): [True: 1.46M, False: 42.9k]
  |  |  ------------------
  ------------------
 1000|  1.46M|        if (MP_USED(a) == 4) {
  ------------------
  |  |  150|  1.46M|#define MP_USED(MP) ((MP)->used)
  ------------------
  |  Branch (1000:13): [True: 293, False: 1.46M]
  ------------------
 1001|    293|            s_mp_sqr_comba_4(a, sqr);
 1002|    293|            goto CLEANUP;
 1003|    293|        }
 1004|  1.46M|        if (MP_USED(a) == 8) {
  ------------------
  |  |  150|  1.46M|#define MP_USED(MP) ((MP)->used)
  ------------------
  |  Branch (1004:13): [True: 414, False: 1.46M]
  ------------------
 1005|    414|            s_mp_sqr_comba_8(a, sqr);
 1006|    414|            goto CLEANUP;
 1007|    414|        }
 1008|  1.46M|        if (MP_USED(a) == 16) {
  ------------------
  |  |  150|  1.46M|#define MP_USED(MP) ((MP)->used)
  ------------------
  |  Branch (1008:13): [True: 44.0k, False: 1.41M]
  ------------------
 1009|  44.0k|            s_mp_sqr_comba_16(a, sqr);
 1010|  44.0k|            goto CLEANUP;
 1011|  44.0k|        }
 1012|  1.41M|        if (MP_USED(a) == 32) {
  ------------------
  |  |  150|  1.41M|#define MP_USED(MP) ((MP)->used)
  ------------------
  |  Branch (1012:13): [True: 846k, False: 573k]
  ------------------
 1013|   846k|            s_mp_sqr_comba_32(a, sqr);
 1014|   846k|            goto CLEANUP;
 1015|   846k|        }
 1016|  1.41M|    }
 1017|   616k|#endif
 1018|       |
 1019|   616k|    pa = MP_DIGITS(a);
  ------------------
  |  |  152|   616k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
 1020|   616k|    count = MP_USED(a) - 1;
  ------------------
  |  |  150|   616k|#define MP_USED(MP) ((MP)->used)
  ------------------
 1021|   616k|    if (count > 0) {
  ------------------
  |  Branch (1021:9): [True: 600k, False: 16.1k]
  ------------------
 1022|   600k|        d = *pa++;
 1023|   600k|        s_mpv_mul_d(pa, count, d, MP_DIGITS(sqr) + 1);
  ------------------
  |  |  181|   600k|    ((mp_digit *)c)[a_len] = s_mpv_mul_set_vec64(c, a, a_len, b)
  ------------------
 1024|  72.0M|        for (ix = 3; --count > 0; ix += 2) {
  ------------------
  |  Branch (1024:22): [True: 71.4M, False: 600k]
  ------------------
 1025|  71.4M|            d = *pa++;
 1026|  71.4M|            s_mpv_mul_d_add(pa, count, d, MP_DIGITS(sqr) + ix);
  ------------------
  |  |  185|  71.4M|    ((mp_digit *)c)[a_len] = s_mpv_mul_add_vec64(c, a, a_len, b)
  ------------------
 1027|  71.4M|        }                                    /* for(ix ...) */
 1028|   600k|        MP_DIGIT(sqr, MP_USED(sqr) - 1) = 0; /* above loop stopped short of this. */
  ------------------
  |  |  153|   600k|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  ------------------
 1029|       |
 1030|       |        /* now sqr *= 2 */
 1031|   600k|        s_mp_mul_2(sqr);
 1032|   600k|    } else {
 1033|  16.1k|        MP_DIGIT(sqr, 1) = 0;
  ------------------
  |  |  153|  16.1k|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  ------------------
 1034|  16.1k|    }
 1035|       |
 1036|       |    /* now add the squares of the digits of a to sqr. */
 1037|   616k|    s_mpv_sqr_add_prop(MP_DIGITS(a), MP_USED(a), MP_DIGITS(sqr));
  ------------------
  |  |  152|   616k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
                  s_mpv_sqr_add_prop(MP_DIGITS(a), MP_USED(a), MP_DIGITS(sqr));
  ------------------
  |  |  150|   616k|#define MP_USED(MP) ((MP)->used)
  ------------------
                  s_mpv_sqr_add_prop(MP_DIGITS(a), MP_USED(a), MP_DIGITS(sqr));
  ------------------
  |  |  152|   616k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
 1038|       |
 1039|   616k|    SIGN(sqr) = ZPOS;
  ------------------
  |  |  332|   616k|#define SIGN(MP) MP_SIGN(MP)
  |  |  ------------------
  |  |  |  |  149|   616k|#define MP_SIGN(MP) ((MP)->sign)
  |  |  ------------------
  ------------------
                  SIGN(sqr) = ZPOS;
  ------------------
  |  |  326|   616k|#define ZPOS MP_ZPOS
  |  |  ------------------
  |  |  |  |   37|   616k|#define MP_ZPOS 0
  |  |  ------------------
  ------------------
 1040|   616k|    s_mp_clamp(sqr);
 1041|       |
 1042|  1.50M|CLEANUP:
 1043|  1.50M|    mp_clear(&tmp);
 1044|  1.50M|    return res;
 1045|       |
 1046|   616k|} /* end mp_sqr() */
mp_div:
 1062|  18.2k|{
 1063|  18.2k|    mp_err res;
 1064|  18.2k|    mp_int *pQ, *pR;
 1065|  18.2k|    mp_int qtmp, rtmp, btmp;
 1066|  18.2k|    int cmp;
 1067|  18.2k|    mp_sign signA;
 1068|  18.2k|    mp_sign signB;
 1069|       |
 1070|  18.2k|    ARGCHK(a != NULL && b != NULL, MP_BADARG);
  ------------------
  |  |  355|  18.2k|#define ARGCHK(X, Y) assert(X)
  ------------------
 1071|       |
 1072|  18.2k|    signA = MP_SIGN(a);
  ------------------
  |  |  149|  18.2k|#define MP_SIGN(MP) ((MP)->sign)
  ------------------
 1073|  18.2k|    signB = MP_SIGN(b);
  ------------------
  |  |  149|  18.2k|#define MP_SIGN(MP) ((MP)->sign)
  ------------------
 1074|       |
 1075|  18.2k|    if (mp_cmp_z(b) == MP_EQ)
  ------------------
  |  |   50|  18.2k|#define MP_EQ 0
  ------------------
  |  Branch (1075:9): [True: 0, False: 18.2k]
  ------------------
 1076|      0|        return MP_RANGE;
  ------------------
  |  |   43|      0|#define MP_RANGE -3  /* argument out of range */
  ------------------
 1077|       |
 1078|  18.2k|    DIGITS(&qtmp) = 0;
  ------------------
  |  |  335|  18.2k|#define DIGITS(MP) MP_DIGITS(MP)
  |  |  ------------------
  |  |  |  |  152|  18.2k|#define MP_DIGITS(MP) ((MP)->dp)
  |  |  ------------------
  ------------------
 1079|  18.2k|    DIGITS(&rtmp) = 0;
  ------------------
  |  |  335|  18.2k|#define DIGITS(MP) MP_DIGITS(MP)
  |  |  ------------------
  |  |  |  |  152|  18.2k|#define MP_DIGITS(MP) ((MP)->dp)
  |  |  ------------------
  ------------------
 1080|  18.2k|    DIGITS(&btmp) = 0;
  ------------------
  |  |  335|  18.2k|#define DIGITS(MP) MP_DIGITS(MP)
  |  |  ------------------
  |  |  |  |  152|  18.2k|#define MP_DIGITS(MP) ((MP)->dp)
  |  |  ------------------
  ------------------
 1081|       |
 1082|       |    /* Set up some temporaries... */
 1083|  18.2k|    if (!r || r == a || r == b) {
  ------------------
  |  Branch (1083:9): [True: 2.40k, False: 15.7k]
  |  Branch (1083:15): [True: 15.0k, False: 790]
  |  Branch (1083:25): [True: 0, False: 790]
  ------------------
 1084|  17.4k|        MP_CHECKOK(mp_init_copy(&rtmp, a));
  ------------------
  |  |  319|  17.4k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  17.4k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 17.4k]
  |  |  ------------------
  |  |  320|  17.4k|    goto CLEANUP
  ------------------
 1085|  17.4k|        pR = &rtmp;
 1086|  17.4k|    } else {
 1087|    790|        MP_CHECKOK(mp_copy(a, r));
  ------------------
  |  |  319|    790|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|    790|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 790]
  |  |  ------------------
  |  |  320|    790|    goto CLEANUP
  ------------------
 1088|    790|        pR = r;
 1089|    790|    }
 1090|       |
 1091|  18.2k|    if (!q || q == a || q == b) {
  ------------------
  |  Branch (1091:9): [True: 15.7k, False: 2.40k]
  |  Branch (1091:15): [True: 2.40k, False: 0]
  |  Branch (1091:25): [True: 0, False: 0]
  ------------------
 1092|  18.2k|        MP_CHECKOK(mp_init_size(&qtmp, MP_USED(a)));
  ------------------
  |  |  319|  18.2k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  18.2k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 18.2k]
  |  |  ------------------
  |  |  320|  18.2k|    goto CLEANUP
  ------------------
 1093|  18.2k|        pQ = &qtmp;
 1094|  18.2k|    } else {
 1095|      0|        MP_CHECKOK(s_mp_pad(q, MP_USED(a)));
  ------------------
  |  |  319|      0|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|      0|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  320|      0|    goto CLEANUP
  ------------------
 1096|      0|        pQ = q;
 1097|      0|        mp_zero(pQ);
 1098|      0|    }
 1099|       |
 1100|       |    /*
 1101|       |      If |a| <= |b|, we can compute the solution without division;
 1102|       |      otherwise, we actually do the work required.
 1103|       |     */
 1104|  18.2k|    if ((cmp = s_mp_cmp(a, b)) <= 0) {
  ------------------
  |  Branch (1104:9): [True: 3, False: 18.1k]
  ------------------
 1105|      3|        if (cmp) {
  ------------------
  |  Branch (1105:13): [True: 3, False: 0]
  ------------------
 1106|       |            /* r was set to a above. */
 1107|      3|            mp_zero(pQ);
 1108|      3|        } else {
 1109|      0|            mp_set(pQ, 1);
 1110|      0|            mp_zero(pR);
 1111|      0|        }
 1112|  18.1k|    } else {
 1113|  18.1k|        MP_CHECKOK(mp_init_copy(&btmp, b));
  ------------------
  |  |  319|  18.1k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  18.1k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 18.1k]
  |  |  ------------------
  |  |  320|  18.1k|    goto CLEANUP
  ------------------
 1114|  18.1k|        MP_CHECKOK(s_mp_div(pR, &btmp, pQ));
  ------------------
  |  |  319|  18.1k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  18.1k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 18.1k]
  |  |  ------------------
  |  |  320|  18.1k|    goto CLEANUP
  ------------------
 1115|  18.1k|    }
 1116|       |
 1117|       |    /* Compute the signs for the output  */
 1118|  18.2k|    MP_SIGN(pR) = signA;        /* Sr = Sa              */
  ------------------
  |  |  149|  18.2k|#define MP_SIGN(MP) ((MP)->sign)
  ------------------
 1119|       |    /* Sq = ZPOS if Sa == Sb */ /* Sq = NEG if Sa != Sb */
 1120|  18.2k|    MP_SIGN(pQ) = (signA == signB) ? ZPOS : NEG;
  ------------------
  |  |  149|  18.2k|#define MP_SIGN(MP) ((MP)->sign)
  ------------------
                  MP_SIGN(pQ) = (signA == signB) ? ZPOS : NEG;
  ------------------
  |  |  326|  18.0k|#define ZPOS MP_ZPOS
  |  |  ------------------
  |  |  |  |   37|  18.0k|#define MP_ZPOS 0
  |  |  ------------------
  ------------------
                  MP_SIGN(pQ) = (signA == signB) ? ZPOS : NEG;
  ------------------
  |  |  325|    137|#define NEG MP_NEG
  |  |  ------------------
  |  |  |  |   36|  18.3k|#define MP_NEG 1
  |  |  ------------------
  ------------------
  |  Branch (1120:19): [True: 18.0k, False: 137]
  ------------------
 1121|       |
 1122|  18.2k|    if (s_mp_cmp_d(pQ, 0) == MP_EQ)
  ------------------
  |  |   50|  18.2k|#define MP_EQ 0
  ------------------
  |  Branch (1122:9): [True: 3, False: 18.1k]
  ------------------
 1123|      3|        SIGN(pQ) = ZPOS;
  ------------------
  |  |  332|      3|#define SIGN(MP) MP_SIGN(MP)
  |  |  ------------------
  |  |  |  |  149|      3|#define MP_SIGN(MP) ((MP)->sign)
  |  |  ------------------
  ------------------
                      SIGN(pQ) = ZPOS;
  ------------------
  |  |  326|      3|#define ZPOS MP_ZPOS
  |  |  ------------------
  |  |  |  |   37|      3|#define MP_ZPOS 0
  |  |  ------------------
  ------------------
 1124|  18.2k|    if (s_mp_cmp_d(pR, 0) == MP_EQ)
  ------------------
  |  |   50|  18.2k|#define MP_EQ 0
  ------------------
  |  Branch (1124:9): [True: 245, False: 17.9k]
  ------------------
 1125|    245|        SIGN(pR) = ZPOS;
  ------------------
  |  |  332|    245|#define SIGN(MP) MP_SIGN(MP)
  |  |  ------------------
  |  |  |  |  149|    245|#define MP_SIGN(MP) ((MP)->sign)
  |  |  ------------------
  ------------------
                      SIGN(pR) = ZPOS;
  ------------------
  |  |  326|    245|#define ZPOS MP_ZPOS
  |  |  ------------------
  |  |  |  |   37|    245|#define MP_ZPOS 0
  |  |  ------------------
  ------------------
 1126|       |
 1127|       |    /* Copy output, if it is needed      */
 1128|  18.2k|    if (q && q != pQ)
  ------------------
  |  Branch (1128:9): [True: 2.40k, False: 15.7k]
  |  Branch (1128:14): [True: 2.40k, False: 0]
  ------------------
 1129|  2.40k|        s_mp_exch(pQ, q);
 1130|       |
 1131|  18.2k|    if (r && r != pR)
  ------------------
  |  Branch (1131:9): [True: 15.7k, False: 2.40k]
  |  Branch (1131:14): [True: 15.0k, False: 790]
  ------------------
 1132|  15.0k|        s_mp_exch(pR, r);
 1133|       |
 1134|  18.2k|CLEANUP:
 1135|  18.2k|    mp_clear(&btmp);
 1136|  18.2k|    mp_clear(&rtmp);
 1137|  18.2k|    mp_clear(&qtmp);
 1138|       |
 1139|  18.2k|    return res;
 1140|       |
 1141|  18.2k|} /* end mp_div() */
mp_mod:
 1279|  10.3k|{
 1280|  10.3k|    mp_err res;
 1281|  10.3k|    int mag;
 1282|       |
 1283|  10.3k|    ARGCHK(a != NULL && m != NULL && c != NULL, MP_BADARG);
  ------------------
  |  |  355|  10.3k|#define ARGCHK(X, Y) assert(X)
  ------------------
 1284|       |
 1285|  10.3k|    if (SIGN(m) == NEG)
  ------------------
  |  |  332|  10.3k|#define SIGN(MP) MP_SIGN(MP)
  |  |  ------------------
  |  |  |  |  149|  10.3k|#define MP_SIGN(MP) ((MP)->sign)
  |  |  ------------------
  ------------------
                  if (SIGN(m) == NEG)
  ------------------
  |  |  325|  10.3k|#define NEG MP_NEG
  |  |  ------------------
  |  |  |  |   36|  10.3k|#define MP_NEG 1
  |  |  ------------------
  ------------------
  |  Branch (1285:9): [True: 0, False: 10.3k]
  ------------------
 1286|      0|        return MP_RANGE;
  ------------------
  |  |   43|      0|#define MP_RANGE -3  /* argument out of range */
  ------------------
 1287|       |
 1288|       |    /*
 1289|       |     If |a| > m, we need to divide to get the remainder and take the
 1290|       |     absolute value.
 1291|       |
 1292|       |     If |a| < m, we don't need to do any division, just copy and adjust
 1293|       |     the sign (if a is negative).
 1294|       |
 1295|       |     If |a| == m, we can simply set the result to zero.
 1296|       |
 1297|       |     This order is intended to minimize the average path length of the
 1298|       |     comparison chain on common workloads -- the most frequent cases are
 1299|       |     that |a| != m, so we do those first.
 1300|       |     */
 1301|  10.3k|    if ((mag = s_mp_cmp(a, m)) > 0) {
  ------------------
  |  Branch (1301:9): [True: 5.40k, False: 4.94k]
  ------------------
 1302|  5.40k|        if ((res = mp_div(a, m, NULL, c)) != MP_OKAY)
  ------------------
  |  |   39|  5.40k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (1302:13): [True: 0, False: 5.40k]
  ------------------
 1303|      0|            return res;
 1304|       |
 1305|  5.40k|        if (SIGN(c) == NEG) {
  ------------------
  |  |  332|  5.40k|#define SIGN(MP) MP_SIGN(MP)
  |  |  ------------------
  |  |  |  |  149|  5.40k|#define MP_SIGN(MP) ((MP)->sign)
  |  |  ------------------
  ------------------
                      if (SIGN(c) == NEG) {
  ------------------
  |  |  325|  5.40k|#define NEG MP_NEG
  |  |  ------------------
  |  |  |  |   36|  5.40k|#define MP_NEG 1
  |  |  ------------------
  ------------------
  |  Branch (1305:13): [True: 137, False: 5.26k]
  ------------------
 1306|    137|            if ((res = mp_add(c, m, c)) != MP_OKAY)
  ------------------
  |  |   39|    137|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (1306:17): [True: 0, False: 137]
  ------------------
 1307|      0|                return res;
 1308|    137|        }
 1309|       |
 1310|  5.40k|    } else if (mag < 0) {
  ------------------
  |  Branch (1310:16): [True: 4.94k, False: 1]
  ------------------
 1311|  4.94k|        if ((res = mp_copy(a, c)) != MP_OKAY)
  ------------------
  |  |   39|  4.94k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (1311:13): [True: 0, False: 4.94k]
  ------------------
 1312|      0|            return res;
 1313|       |
 1314|  4.94k|        if (mp_cmp_z(a) < 0) {
  ------------------
  |  Branch (1314:13): [True: 406, False: 4.53k]
  ------------------
 1315|    406|            if ((res = mp_add(c, m, c)) != MP_OKAY)
  ------------------
  |  |   39|    406|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (1315:17): [True: 0, False: 406]
  ------------------
 1316|      0|                return res;
 1317|    406|        }
 1318|       |
 1319|  4.94k|    } else {
 1320|      1|        mp_zero(c);
 1321|      1|    }
 1322|       |
 1323|  10.3k|    return MP_OKAY;
  ------------------
  |  |   39|  10.3k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
 1324|       |
 1325|  10.3k|} /* end mp_mod() */
mp_mulmod:
 1562|  3.18k|{
 1563|  3.18k|    mp_err res;
 1564|       |
 1565|  3.18k|    ARGCHK(a != NULL && b != NULL && m != NULL && c != NULL, MP_BADARG);
  ------------------
  |  |  355|  3.18k|#define ARGCHK(X, Y) assert(X)
  ------------------
 1566|       |
 1567|  3.18k|    if ((res = mp_mul(a, b, c)) != MP_OKAY)
  ------------------
  |  |   39|  3.18k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (1567:9): [True: 0, False: 3.18k]
  ------------------
 1568|      0|        return res;
 1569|  3.18k|    if ((res = mp_mod(c, m, c)) != MP_OKAY)
  ------------------
  |  |   39|  3.18k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (1569:9): [True: 0, False: 3.18k]
  ------------------
 1570|      0|        return res;
 1571|       |
 1572|  3.18k|    return MP_OKAY;
  ------------------
  |  |   39|  3.18k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
 1573|  3.18k|}
s_mp_exptmod:
 1645|  2.40k|{
 1646|  2.40k|    mp_int s, x, mu;
 1647|  2.40k|    mp_err res;
 1648|  2.40k|    mp_digit d;
 1649|  2.40k|    unsigned int dig, bit;
 1650|       |
 1651|  2.40k|    ARGCHK(a != NULL && b != NULL && c != NULL && m != NULL, MP_BADARG);
  ------------------
  |  |  355|  2.40k|#define ARGCHK(X, Y) assert(X)
  ------------------
 1652|       |
 1653|  2.40k|    if (mp_cmp_z(b) < 0 || mp_cmp_z(m) <= 0)
  ------------------
  |  Branch (1653:9): [True: 0, False: 2.40k]
  |  Branch (1653:28): [True: 0, False: 2.40k]
  ------------------
 1654|      0|        return MP_RANGE;
  ------------------
  |  |   43|      0|#define MP_RANGE -3  /* argument out of range */
  ------------------
 1655|       |
 1656|  2.40k|    if ((res = mp_init(&s)) != MP_OKAY)
  ------------------
  |  |   39|  2.40k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (1656:9): [True: 0, False: 2.40k]
  ------------------
 1657|      0|        return res;
 1658|  2.40k|    if ((res = mp_init_copy(&x, a)) != MP_OKAY ||
  ------------------
  |  |   39|  4.81k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (1658:9): [True: 0, False: 2.40k]
  ------------------
 1659|  2.40k|        (res = mp_mod(&x, m, &x)) != MP_OKAY)
  ------------------
  |  |   39|  2.40k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (1659:9): [True: 0, False: 2.40k]
  ------------------
 1660|      0|        goto X;
 1661|  2.40k|    if ((res = mp_init(&mu)) != MP_OKAY)
  ------------------
  |  |   39|  2.40k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (1661:9): [True: 0, False: 2.40k]
  ------------------
 1662|      0|        goto MU;
 1663|       |
 1664|  2.40k|    mp_set(&s, 1);
 1665|       |
 1666|       |    /* mu = b^2k / m */
 1667|  2.40k|    if ((res = s_mp_add_d(&mu, 1)) != MP_OKAY)
  ------------------
  |  |   39|  2.40k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (1667:9): [True: 0, False: 2.40k]
  ------------------
 1668|      0|        goto CLEANUP;
 1669|  2.40k|    if ((res = s_mp_lshd(&mu, 2 * USED(m))) != MP_OKAY)
  ------------------
  |  |  333|  2.40k|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|  2.40k|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
                  if ((res = s_mp_lshd(&mu, 2 * USED(m))) != MP_OKAY)
  ------------------
  |  |   39|  2.40k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (1669:9): [True: 0, False: 2.40k]
  ------------------
 1670|      0|        goto CLEANUP;
 1671|  2.40k|    if ((res = mp_div(&mu, m, &mu, NULL)) != MP_OKAY)
  ------------------
  |  |   39|  2.40k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (1671:9): [True: 0, False: 2.40k]
  ------------------
 1672|      0|        goto CLEANUP;
 1673|       |
 1674|       |    /* Loop over digits of b in ascending order, except highest order */
 1675|  5.26k|    for (dig = 0; dig < (USED(b) - 1); dig++) {
  ------------------
  |  |  333|  5.26k|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|  5.26k|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
  |  Branch (1675:19): [True: 2.85k, False: 2.40k]
  ------------------
 1676|  2.85k|        d = DIGIT(b, dig);
  ------------------
  |  |  336|  2.85k|#define DIGIT(MP, N) MP_DIGIT(MP, N)
  |  |  ------------------
  |  |  |  |  153|  2.85k|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  |  |  ------------------
  ------------------
 1677|       |
 1678|       |        /* Loop over the bits of the lower-order digits */
 1679|   185k|        for (bit = 0; bit < DIGIT_BIT; bit++) {
  ------------------
  |  |  328|   185k|#define DIGIT_BIT MP_DIGIT_BIT
  |  |  ------------------
  |  |  |  |  137|   185k|#define MP_DIGIT_BIT (CHAR_BIT * MP_DIGIT_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  136|   185k|#define MP_DIGIT_SIZE sizeof(mp_digit)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1679:23): [True: 182k, False: 2.85k]
  ------------------
 1680|   182k|            if (d & 1) {
  ------------------
  |  Branch (1680:17): [True: 92.2k, False: 90.7k]
  ------------------
 1681|  92.2k|                if ((res = s_mp_mul(&s, &x)) != MP_OKAY)
  ------------------
  |  |   39|  92.2k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (1681:21): [True: 0, False: 92.2k]
  ------------------
 1682|      0|                    goto CLEANUP;
 1683|  92.2k|                if ((res = s_mp_reduce(&s, m, &mu)) != MP_OKAY)
  ------------------
  |  |   39|  92.2k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (1683:21): [True: 0, False: 92.2k]
  ------------------
 1684|      0|                    goto CLEANUP;
 1685|  92.2k|            }
 1686|       |
 1687|   182k|            d >>= 1;
 1688|       |
 1689|   182k|            if ((res = s_mp_sqr(&x)) != MP_OKAY)
  ------------------
  |  |   39|   182k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (1689:17): [True: 0, False: 182k]
  ------------------
 1690|      0|                goto CLEANUP;
 1691|   182k|            if ((res = s_mp_reduce(&x, m, &mu)) != MP_OKAY)
  ------------------
  |  |   39|   182k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (1691:17): [True: 0, False: 182k]
  ------------------
 1692|      0|                goto CLEANUP;
 1693|   182k|        }
 1694|  2.85k|    }
 1695|       |
 1696|       |    /* Now do the last digit... */
 1697|  2.40k|    d = DIGIT(b, dig);
  ------------------
  |  |  336|  2.40k|#define DIGIT(MP, N) MP_DIGIT(MP, N)
  |  |  ------------------
  |  |  |  |  153|  2.40k|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  |  |  ------------------
  ------------------
 1698|       |
 1699|  69.8k|    while (d) {
  ------------------
  |  Branch (1699:12): [True: 67.4k, False: 2.40k]
  ------------------
 1700|  67.4k|        if (d & 1) {
  ------------------
  |  Branch (1700:13): [True: 33.7k, False: 33.6k]
  ------------------
 1701|  33.7k|            if ((res = s_mp_mul(&s, &x)) != MP_OKAY)
  ------------------
  |  |   39|  33.7k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (1701:17): [True: 0, False: 33.7k]
  ------------------
 1702|      0|                goto CLEANUP;
 1703|  33.7k|            if ((res = s_mp_reduce(&s, m, &mu)) != MP_OKAY)
  ------------------
  |  |   39|  33.7k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (1703:17): [True: 0, False: 33.7k]
  ------------------
 1704|      0|                goto CLEANUP;
 1705|  33.7k|        }
 1706|       |
 1707|  67.4k|        d >>= 1;
 1708|       |
 1709|  67.4k|        if ((res = s_mp_sqr(&x)) != MP_OKAY)
  ------------------
  |  |   39|  67.4k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (1709:13): [True: 0, False: 67.4k]
  ------------------
 1710|      0|            goto CLEANUP;
 1711|  67.4k|        if ((res = s_mp_reduce(&x, m, &mu)) != MP_OKAY)
  ------------------
  |  |   39|  67.4k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (1711:13): [True: 0, False: 67.4k]
  ------------------
 1712|      0|            goto CLEANUP;
 1713|  67.4k|    }
 1714|       |
 1715|  2.40k|    s_mp_exch(&s, c);
 1716|       |
 1717|  2.40k|CLEANUP:
 1718|  2.40k|    mp_clear(&mu);
 1719|  2.40k|MU:
 1720|  2.40k|    mp_clear(&x);
 1721|  2.40k|X:
 1722|  2.40k|    mp_clear(&s);
 1723|       |
 1724|  2.40k|    return res;
 1725|       |
 1726|  2.40k|} /* end s_mp_exptmod() */
mp_cmp_z:
 1790|   921k|{
 1791|   921k|    ARGMPCHK(a != NULL);
  ------------------
  |  |  354|   921k|#define ARGMPCHK(X) assert(X)
  ------------------
 1792|       |
 1793|   921k|    if (SIGN(a) == NEG)
  ------------------
  |  |  332|   921k|#define SIGN(MP) MP_SIGN(MP)
  |  |  ------------------
  |  |  |  |  149|   921k|#define MP_SIGN(MP) ((MP)->sign)
  |  |  ------------------
  ------------------
                  if (SIGN(a) == NEG)
  ------------------
  |  |  325|   921k|#define NEG MP_NEG
  |  |  ------------------
  |  |  |  |   36|   921k|#define MP_NEG 1
  |  |  ------------------
  ------------------
  |  Branch (1793:9): [True: 22.5k, False: 898k]
  ------------------
 1794|  22.5k|        return MP_LT;
  ------------------
  |  |   49|  22.5k|#define MP_LT -1
  ------------------
 1795|   898k|    else if (USED(a) == 1 && DIGIT(a, 0) == 0)
  ------------------
  |  |  333|   898k|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|   898k|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
                  else if (USED(a) == 1 && DIGIT(a, 0) == 0)
  ------------------
  |  |  336|  69.8k|#define DIGIT(MP, N) MP_DIGIT(MP, N)
  |  |  ------------------
  |  |  |  |  153|  69.8k|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  |  |  ------------------
  ------------------
  |  Branch (1795:14): [True: 69.8k, False: 828k]
  |  Branch (1795:30): [True: 44.0k, False: 25.7k]
  ------------------
 1796|  44.0k|        return MP_EQ;
  ------------------
  |  |   50|  44.0k|#define MP_EQ 0
  ------------------
 1797|   854k|    else
 1798|   854k|        return MP_GT;
  ------------------
  |  |   51|   854k|#define MP_GT 1
  ------------------
 1799|       |
 1800|   921k|} /* end mp_cmp_z() */
mp_cmp_d:
 1814|  8.46k|{
 1815|  8.46k|    ARGCHK(a != NULL, MP_EQ);
  ------------------
  |  |  355|  8.46k|#define ARGCHK(X, Y) assert(X)
  ------------------
 1816|       |
 1817|  8.46k|    if (SIGN(a) == NEG)
  ------------------
  |  |  332|  8.46k|#define SIGN(MP) MP_SIGN(MP)
  |  |  ------------------
  |  |  |  |  149|  8.46k|#define MP_SIGN(MP) ((MP)->sign)
  |  |  ------------------
  ------------------
                  if (SIGN(a) == NEG)
  ------------------
  |  |  325|  8.46k|#define NEG MP_NEG
  |  |  ------------------
  |  |  |  |   36|  8.46k|#define MP_NEG 1
  |  |  ------------------
  ------------------
  |  Branch (1817:9): [True: 0, False: 8.46k]
  ------------------
 1818|      0|        return MP_LT;
  ------------------
  |  |   49|      0|#define MP_LT -1
  ------------------
 1819|       |
 1820|  8.46k|    return s_mp_cmp_d(a, d);
 1821|       |
 1822|  8.46k|} /* end mp_cmp_d() */
mp_cmp:
 1830|   803k|{
 1831|   803k|    ARGCHK(a != NULL && b != NULL, MP_EQ);
  ------------------
  |  |  355|   803k|#define ARGCHK(X, Y) assert(X)
  ------------------
 1832|       |
 1833|   803k|    if (SIGN(a) == SIGN(b)) {
  ------------------
  |  |  332|   803k|#define SIGN(MP) MP_SIGN(MP)
  |  |  ------------------
  |  |  |  |  149|   803k|#define MP_SIGN(MP) ((MP)->sign)
  |  |  ------------------
  ------------------
                  if (SIGN(a) == SIGN(b)) {
  ------------------
  |  |  332|   803k|#define SIGN(MP) MP_SIGN(MP)
  |  |  ------------------
  |  |  |  |  149|   803k|#define MP_SIGN(MP) ((MP)->sign)
  |  |  ------------------
  ------------------
  |  Branch (1833:9): [True: 803k, False: 0]
  ------------------
 1834|   803k|        int mag;
 1835|       |
 1836|   803k|        if ((mag = s_mp_cmp(a, b)) == MP_EQ)
  ------------------
  |  |   50|   803k|#define MP_EQ 0
  ------------------
  |  Branch (1836:13): [True: 861, False: 802k]
  ------------------
 1837|    861|            return MP_EQ;
  ------------------
  |  |   50|    861|#define MP_EQ 0
  ------------------
 1838|       |
 1839|   802k|        if (SIGN(a) == ZPOS)
  ------------------
  |  |  332|   802k|#define SIGN(MP) MP_SIGN(MP)
  |  |  ------------------
  |  |  |  |  149|   802k|#define MP_SIGN(MP) ((MP)->sign)
  |  |  ------------------
  ------------------
                      if (SIGN(a) == ZPOS)
  ------------------
  |  |  326|   802k|#define ZPOS MP_ZPOS
  |  |  ------------------
  |  |  |  |   37|   802k|#define MP_ZPOS 0
  |  |  ------------------
  ------------------
  |  Branch (1839:13): [True: 802k, False: 0]
  ------------------
 1840|   802k|            return mag;
 1841|      0|        else
 1842|      0|            return -mag;
 1843|       |
 1844|   802k|    } else if (SIGN(a) == ZPOS) {
  ------------------
  |  |  332|      0|#define SIGN(MP) MP_SIGN(MP)
  |  |  ------------------
  |  |  |  |  149|      0|#define MP_SIGN(MP) ((MP)->sign)
  |  |  ------------------
  ------------------
                  } else if (SIGN(a) == ZPOS) {
  ------------------
  |  |  326|      0|#define ZPOS MP_ZPOS
  |  |  ------------------
  |  |  |  |   37|      0|#define MP_ZPOS 0
  |  |  ------------------
  ------------------
  |  Branch (1844:16): [True: 0, False: 0]
  ------------------
 1845|      0|        return MP_GT;
  ------------------
  |  |   51|      0|#define MP_GT 1
  ------------------
 1846|      0|    } else {
 1847|      0|        return MP_LT;
  ------------------
  |  |   49|      0|#define MP_LT -1
  ------------------
 1848|      0|    }
 1849|       |
 1850|   803k|} /* end mp_cmp() */
mp_isodd:
 1882|  12.9k|{
 1883|  12.9k|    ARGMPCHK(a != NULL);
  ------------------
  |  |  354|  12.9k|#define ARGMPCHK(X) assert(X)
  ------------------
 1884|       |
 1885|  12.9k|    return (int)(DIGIT(a, 0) & 1);
  ------------------
  |  |  336|  12.9k|#define DIGIT(MP, N) MP_DIGIT(MP, N)
  |  |  ------------------
  |  |  |  |  153|  12.9k|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  |  |  ------------------
  ------------------
 1886|       |
 1887|  12.9k|} /* end mp_isodd() */
mp_iseven:
 1895|  4.10k|{
 1896|  4.10k|    return !mp_isodd(a);
 1897|       |
 1898|  4.10k|} /* end mp_iseven() */
mp_trailing_zeros:
 2185|  1.03k|{
 2186|  1.03k|    mp_digit d;
 2187|  1.03k|    mp_size n = 0;
 2188|  1.03k|    unsigned int ix;
 2189|       |
 2190|  1.03k|    if (!mp || !MP_DIGITS(mp) || !mp_cmp_z(mp))
  ------------------
  |  |  152|  2.06k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
  |  Branch (2190:9): [True: 0, False: 1.03k]
  |  Branch (2190:16): [True: 0, False: 1.03k]
  |  Branch (2190:34): [True: 0, False: 1.03k]
  ------------------
 2191|      0|        return n;
 2192|       |
 2193|  1.75k|    for (ix = 0; !(d = MP_DIGIT(mp, ix)) && (ix < MP_USED(mp)); ++ix)
  ------------------
  |  |  153|  1.75k|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  ------------------
                  for (ix = 0; !(d = MP_DIGIT(mp, ix)) && (ix < MP_USED(mp)); ++ix)
  ------------------
  |  |  150|    721|#define MP_USED(MP) ((MP)->used)
  ------------------
  |  Branch (2193:18): [True: 721, False: 1.03k]
  |  Branch (2193:45): [True: 721, False: 0]
  ------------------
 2194|    721|        n += MP_DIGIT_BIT;
  ------------------
  |  |  137|  1.75k|#define MP_DIGIT_BIT (CHAR_BIT * MP_DIGIT_SIZE)
  |  |  ------------------
  |  |  |  |  136|    721|#define MP_DIGIT_SIZE sizeof(mp_digit)
  |  |  ------------------
  ------------------
 2195|  1.03k|    if (!d)
  ------------------
  |  Branch (2195:9): [True: 0, False: 1.03k]
  ------------------
 2196|      0|        return 0; /* shouldn't happen, but ... */
 2197|  1.03k|#if !defined(MP_USE_UINT_DIGIT)
 2198|  1.03k|    if (!(d & 0xffffffffU)) {
  ------------------
  |  Branch (2198:9): [True: 273, False: 760]
  ------------------
 2199|    273|        d >>= 32;
 2200|    273|        n += 32;
 2201|    273|    }
 2202|  1.03k|#endif
 2203|  1.03k|    if (!(d & 0xffffU)) {
  ------------------
  |  Branch (2203:9): [True: 169, False: 864]
  ------------------
 2204|    169|        d >>= 16;
 2205|    169|        n += 16;
 2206|    169|    }
 2207|  1.03k|    if (!(d & 0xffU)) {
  ------------------
  |  Branch (2207:9): [True: 284, False: 749]
  ------------------
 2208|    284|        d >>= 8;
 2209|    284|        n += 8;
 2210|    284|    }
 2211|  1.03k|    if (!(d & 0xfU)) {
  ------------------
  |  Branch (2211:9): [True: 78, False: 955]
  ------------------
 2212|     78|        d >>= 4;
 2213|     78|        n += 4;
 2214|     78|    }
 2215|  1.03k|    if (!(d & 0x3U)) {
  ------------------
  |  Branch (2215:9): [True: 425, False: 608]
  ------------------
 2216|    425|        d >>= 2;
 2217|    425|        n += 2;
 2218|    425|    }
 2219|  1.03k|    if (!(d & 0x1U)) {
  ------------------
  |  Branch (2219:9): [True: 255, False: 778]
  ------------------
 2220|    255|        d >>= 1;
 2221|    255|        n += 1;
 2222|    255|    }
 2223|  1.03k|#if MP_ARGCHK == 2
 2224|  1.03k|    assert(0 != (d & 1));
 2225|  1.03k|#endif
 2226|  1.03k|    return n;
 2227|  1.03k|}
s_mp_invmod_radix:
 2311|  6.41k|{
 2312|  6.41k|    mp_digit T = P;
 2313|  6.41k|    T *= 2 - (P * T);
 2314|  6.41k|    T *= 2 - (P * T);
 2315|  6.41k|    T *= 2 - (P * T);
 2316|  6.41k|    T *= 2 - (P * T);
 2317|  6.41k|#if !defined(MP_USE_UINT_DIGIT)
 2318|  6.41k|    T *= 2 - (P * T);
 2319|  6.41k|    T *= 2 - (P * T);
 2320|  6.41k|#endif
 2321|  6.41k|    return T;
 2322|  6.41k|}
s_mp_invmod_odd_m:
 2374|  1.12k|{
 2375|  1.12k|    mp_err res;
 2376|  1.12k|    mp_digit cond = 0;
 2377|  1.12k|    mp_int g, f, v, r, temp;
 2378|  1.12k|    int i, its, delta = 1, last = -1;
 2379|  1.12k|    mp_size top, flen, glen;
 2380|  1.12k|    mp_int *clear[6];
 2381|       |
 2382|  1.12k|    ARGCHK(a != NULL && m != NULL && c != NULL, MP_BADARG);
  ------------------
  |  |  355|  1.12k|#define ARGCHK(X, Y) assert(X)
  ------------------
 2383|       |    /* Check for invalid inputs. */
 2384|  1.12k|    if (mp_cmp_z(a) == MP_EQ || mp_cmp_d(m, 2) == MP_LT)
  ------------------
  |  |   50|  2.25k|#define MP_EQ 0
  ------------------
                  if (mp_cmp_z(a) == MP_EQ || mp_cmp_d(m, 2) == MP_LT)
  ------------------
  |  |   49|  1.12k|#define MP_LT -1
  ------------------
  |  Branch (2384:9): [True: 0, False: 1.12k]
  |  Branch (2384:33): [True: 0, False: 1.12k]
  ------------------
 2385|      0|        return MP_RANGE;
  ------------------
  |  |   43|      0|#define MP_RANGE -3  /* argument out of range */
  ------------------
 2386|       |
 2387|  1.12k|    if (a == m || mp_iseven(m))
  ------------------
  |  Branch (2387:9): [True: 0, False: 1.12k]
  |  Branch (2387:19): [True: 0, False: 1.12k]
  ------------------
 2388|      0|        return MP_UNDEF;
  ------------------
  |  |   45|      0|#define MP_UNDEF -5  /* answer is undefined   */
  ------------------
 2389|       |
 2390|  1.12k|    MP_CHECKOK(mp_init(&temp));
  ------------------
  |  |  319|  1.12k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  1.12k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 1.12k]
  |  |  ------------------
  |  |  320|  1.12k|    goto CLEANUP
  ------------------
 2391|  1.12k|    clear[++last] = &temp;
 2392|  1.12k|    MP_CHECKOK(mp_init(&v));
  ------------------
  |  |  319|  1.12k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  1.12k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 1.12k]
  |  |  ------------------
  |  |  320|  1.12k|    goto CLEANUP
  ------------------
 2393|  1.12k|    clear[++last] = &v;
 2394|  1.12k|    MP_CHECKOK(mp_init(&r));
  ------------------
  |  |  319|  1.12k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  1.12k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 1.12k]
  |  |  ------------------
  |  |  320|  1.12k|    goto CLEANUP
  ------------------
 2395|  1.12k|    clear[++last] = &r;
 2396|  1.12k|    MP_CHECKOK(mp_init_copy(&g, a));
  ------------------
  |  |  319|  1.12k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  1.12k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 1.12k]
  |  |  ------------------
  |  |  320|  1.12k|    goto CLEANUP
  ------------------
 2397|  1.12k|    clear[++last] = &g;
 2398|  1.12k|    MP_CHECKOK(mp_init_copy(&f, m));
  ------------------
  |  |  319|  1.12k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  1.12k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 1.12k]
  |  |  ------------------
  |  |  320|  1.12k|    goto CLEANUP
  ------------------
 2399|  1.12k|    clear[++last] = &f;
 2400|       |
 2401|  1.12k|    mp_set(&v, 0);
 2402|  1.12k|    mp_set(&r, 1);
 2403|       |
 2404|       |    /* Allocate to the size of largest mp_int. */
 2405|  1.12k|    top = (mp_size)1 + ((USED(&f) >= USED(&g)) ? USED(&f) : USED(&g));
  ------------------
  |  |  333|  1.12k|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|  1.12k|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
                  top = (mp_size)1 + ((USED(&f) >= USED(&g)) ? USED(&f) : USED(&g));
  ------------------
  |  |  333|  1.12k|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|  1.12k|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
                  top = (mp_size)1 + ((USED(&f) >= USED(&g)) ? USED(&f) : USED(&g));
  ------------------
  |  |  333|    606|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|    606|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
                  top = (mp_size)1 + ((USED(&f) >= USED(&g)) ? USED(&f) : USED(&g));
  ------------------
  |  |  333|    523|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|    523|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
  |  Branch (2405:25): [True: 606, False: 523]
  ------------------
 2406|  1.12k|    MP_CHECKOK(s_mp_grow(&f, top));
  ------------------
  |  |  319|  1.12k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  1.12k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 1.12k]
  |  |  ------------------
  |  |  320|  1.12k|    goto CLEANUP
  ------------------
 2407|  1.12k|    MP_CHECKOK(s_mp_grow(&g, top));
  ------------------
  |  |  319|  1.12k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  1.12k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 1.12k]
  |  |  ------------------
  |  |  320|  1.12k|    goto CLEANUP
  ------------------
 2408|  1.12k|    MP_CHECKOK(s_mp_grow(&temp, top));
  ------------------
  |  |  319|  1.12k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  1.12k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 1.12k]
  |  |  ------------------
  |  |  320|  1.12k|    goto CLEANUP
  ------------------
 2409|  1.12k|    MP_CHECKOK(s_mp_grow(&v, top));
  ------------------
  |  |  319|  1.12k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  1.12k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 1.12k]
  |  |  ------------------
  |  |  320|  1.12k|    goto CLEANUP
  ------------------
 2410|  1.12k|    MP_CHECKOK(s_mp_grow(&r, top));
  ------------------
  |  |  319|  1.12k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  1.12k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 1.12k]
  |  |  ------------------
  |  |  320|  1.12k|    goto CLEANUP
  ------------------
 2411|       |
 2412|       |    /* Upper bound for the total iterations. */
 2413|  1.12k|    flen = mpl_significant_bits(&f);
 2414|  1.12k|    glen = mpl_significant_bits(&g);
 2415|  1.12k|    its = 4 + 3 * ((flen >= glen) ? flen : glen);
  ------------------
  |  Branch (2415:20): [True: 529, False: 600]
  ------------------
 2416|       |
 2417|       |#if defined(_MSC_VER)
 2418|       |#pragma warning(push)
 2419|       |#pragma warning(disable : 4146) // Thanks MSVC, we know what we're negating an unsigned mp_digit
 2420|       |#endif
 2421|       |
 2422|   770k|    for (i = 0; i < its; i++) {
  ------------------
  |  Branch (2422:17): [True: 769k, False: 1.12k]
  ------------------
 2423|       |        /* Step 1: conditional swap. */
 2424|       |        /* Set cond if delta > 0 and g is odd. */
 2425|   769k|        cond = (-delta >> (8 * sizeof(delta) - 1)) & DIGIT(&g, 0) & 1;
  ------------------
  |  |  336|   769k|#define DIGIT(MP, N) MP_DIGIT(MP, N)
  |  |  ------------------
  |  |  |  |  153|   769k|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  |  |  ------------------
  ------------------
 2426|       |        /* If cond is set replace (delta,f,v) with (-delta,-f,-v). */
 2427|   769k|        delta = (-cond & -delta) | ((cond - 1) & delta);
 2428|   769k|        SIGN(&f) ^= cond;
  ------------------
  |  |  332|   769k|#define SIGN(MP) MP_SIGN(MP)
  |  |  ------------------
  |  |  |  |  149|   769k|#define MP_SIGN(MP) ((MP)->sign)
  |  |  ------------------
  ------------------
 2429|   769k|        SIGN(&v) ^= cond;
  ------------------
  |  |  332|   769k|#define SIGN(MP) MP_SIGN(MP)
  |  |  ------------------
  |  |  |  |  149|   769k|#define MP_SIGN(MP) ((MP)->sign)
  |  |  ------------------
  ------------------
 2430|       |        /* If cond is set swap (f,v) with (g,r). */
 2431|   769k|        MP_CHECKOK(mp_cswap(cond, &f, &g, top));
  ------------------
  |  |  319|   769k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|   769k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 769k]
  |  |  ------------------
  |  |  320|   769k|    goto CLEANUP
  ------------------
 2432|   769k|        MP_CHECKOK(mp_cswap(cond, &v, &r, top));
  ------------------
  |  |  319|   769k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|   769k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 769k]
  |  |  ------------------
  |  |  320|   769k|    goto CLEANUP
  ------------------
 2433|       |
 2434|       |        /* Step 2: elemination. */
 2435|       |        /* Update delta */
 2436|   769k|        delta++;
 2437|       |        /* If g is odd replace r with (r+v). */
 2438|   769k|        MP_CHECKOK(mp_add(&r, &v, &temp));
  ------------------
  |  |  319|   769k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|   769k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 769k]
  |  |  ------------------
  |  |  320|   769k|    goto CLEANUP
  ------------------
 2439|   769k|        MP_CHECKOK(mp_cswap((DIGIT(&g, 0) & 1), &r, &temp, top));
  ------------------
  |  |  319|   769k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|   769k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 769k]
  |  |  ------------------
  |  |  320|   769k|    goto CLEANUP
  ------------------
 2440|       |        /* If g is odd, right shift (g+f) else right shift g. */
 2441|   769k|        MP_CHECKOK(mp_add(&g, &f, &temp));
  ------------------
  |  |  319|   769k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|   769k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 769k]
  |  |  ------------------
  |  |  320|   769k|    goto CLEANUP
  ------------------
 2442|   769k|        MP_CHECKOK(mp_cswap((DIGIT(&g, 0) & 1), &g, &temp, top));
  ------------------
  |  |  319|   769k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|   769k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 769k]
  |  |  ------------------
  |  |  320|   769k|    goto CLEANUP
  ------------------
 2443|   769k|        s_mp_div_2(&g);
 2444|       |        /*
 2445|       |        If r is even, right shift it.
 2446|       |        If r is odd, right shift (r+m) which is even because m is odd.
 2447|       |        We want the result modulo m so adding in multiples of m here vanish.
 2448|       |        */
 2449|   769k|        MP_CHECKOK(mp_add(&r, m, &temp));
  ------------------
  |  |  319|   769k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|   769k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 769k]
  |  |  ------------------
  |  |  320|   769k|    goto CLEANUP
  ------------------
 2450|   769k|        MP_CHECKOK(mp_cswap((DIGIT(&r, 0) & 1), &r, &temp, top));
  ------------------
  |  |  319|   769k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|   769k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 769k]
  |  |  ------------------
  |  |  320|   769k|    goto CLEANUP
  ------------------
 2451|   769k|        s_mp_div_2(&r);
 2452|   769k|    }
 2453|       |
 2454|       |#if defined(_MSC_VER)
 2455|       |#pragma warning(pop)
 2456|       |#endif
 2457|       |
 2458|       |    /* We have the inverse in v, propagate sign from f. */
 2459|  1.12k|    SIGN(&v) ^= SIGN(&f);
  ------------------
  |  |  332|  1.12k|#define SIGN(MP) MP_SIGN(MP)
  |  |  ------------------
  |  |  |  |  149|  1.12k|#define MP_SIGN(MP) ((MP)->sign)
  |  |  ------------------
  ------------------
                  SIGN(&v) ^= SIGN(&f);
  ------------------
  |  |  332|  1.12k|#define SIGN(MP) MP_SIGN(MP)
  |  |  ------------------
  |  |  |  |  149|  1.12k|#define MP_SIGN(MP) ((MP)->sign)
  |  |  ------------------
  ------------------
 2460|       |    /* GCD is in f, take the absolute value. */
 2461|  1.12k|    SIGN(&f) = ZPOS;
  ------------------
  |  |  332|  1.12k|#define SIGN(MP) MP_SIGN(MP)
  |  |  ------------------
  |  |  |  |  149|  1.12k|#define MP_SIGN(MP) ((MP)->sign)
  |  |  ------------------
  ------------------
                  SIGN(&f) = ZPOS;
  ------------------
  |  |  326|  1.12k|#define ZPOS MP_ZPOS
  |  |  ------------------
  |  |  |  |   37|  1.12k|#define MP_ZPOS 0
  |  |  ------------------
  ------------------
 2462|       |
 2463|       |    /* If gcd != 1, not invertible. */
 2464|  1.12k|    if (mp_cmp_d(&f, 1) != MP_EQ) {
  ------------------
  |  |   50|  1.12k|#define MP_EQ 0
  ------------------
  |  Branch (2464:9): [True: 70, False: 1.05k]
  ------------------
 2465|     70|        res = MP_UNDEF;
  ------------------
  |  |   45|     70|#define MP_UNDEF -5  /* answer is undefined   */
  ------------------
 2466|     70|        goto CLEANUP;
 2467|     70|    }
 2468|       |
 2469|       |    /* Return inverse modulo m. */
 2470|  1.05k|    MP_CHECKOK(mp_mod(&v, m, c));
  ------------------
  |  |  319|  1.05k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  1.05k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 1.05k]
  |  |  ------------------
  |  |  320|  1.05k|    goto CLEANUP
  ------------------
 2471|       |
 2472|  1.12k|CLEANUP:
 2473|  6.77k|    while (last >= 0)
  ------------------
  |  Branch (2473:12): [True: 5.64k, False: 1.12k]
  ------------------
 2474|  5.64k|        mp_clear(clear[last--]);
 2475|  1.12k|    return res;
 2476|  1.05k|}
s_mp_invmod_2d:
 2516|  1.93k|{
 2517|  1.93k|    mp_err res;
 2518|  1.93k|    mp_size ix = k + 4;
 2519|  1.93k|    mp_int t0, t1, val, tmp, two2k;
 2520|       |
 2521|  1.93k|    static const mp_digit d2 = 2;
 2522|  1.93k|    static const mp_int two = { MP_ZPOS, 1, 1, (mp_digit *)&d2 };
  ------------------
  |  |   37|  1.93k|#define MP_ZPOS 0
  ------------------
 2523|       |
 2524|  1.93k|    if (mp_iseven(a))
  ------------------
  |  Branch (2524:9): [True: 0, False: 1.93k]
  ------------------
 2525|      0|        return MP_UNDEF;
  ------------------
  |  |   45|      0|#define MP_UNDEF -5  /* answer is undefined   */
  ------------------
 2526|       |
 2527|       |#if defined(_MSC_VER)
 2528|       |#pragma warning(push)
 2529|       |#pragma warning(disable : 4146) // Thanks MSVC, we know what we're negating an unsigned mp_digit
 2530|       |#endif
 2531|  1.93k|    if (k <= MP_DIGIT_BIT) {
  ------------------
  |  |  137|  1.93k|#define MP_DIGIT_BIT (CHAR_BIT * MP_DIGIT_SIZE)
  |  |  ------------------
  |  |  |  |  136|  1.93k|#define MP_DIGIT_SIZE sizeof(mp_digit)
  |  |  ------------------
  ------------------
  |  Branch (2531:9): [True: 1.09k, False: 840]
  ------------------
 2532|  1.09k|        mp_digit i = s_mp_invmod_radix(MP_DIGIT(a, 0));
  ------------------
  |  |  153|  1.09k|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  ------------------
 2533|       |        /* propagate the sign from mp_int */
 2534|  1.09k|        i = (i ^ -(mp_digit)SIGN(a)) + (mp_digit)SIGN(a);
  ------------------
  |  |  332|  1.09k|#define SIGN(MP) MP_SIGN(MP)
  |  |  ------------------
  |  |  |  |  149|  1.09k|#define MP_SIGN(MP) ((MP)->sign)
  |  |  ------------------
  ------------------
                      i = (i ^ -(mp_digit)SIGN(a)) + (mp_digit)SIGN(a);
  ------------------
  |  |  332|  1.09k|#define SIGN(MP) MP_SIGN(MP)
  |  |  ------------------
  |  |  |  |  149|  1.09k|#define MP_SIGN(MP) ((MP)->sign)
  |  |  ------------------
  ------------------
 2535|  1.09k|        if (k < MP_DIGIT_BIT)
  ------------------
  |  |  137|  1.09k|#define MP_DIGIT_BIT (CHAR_BIT * MP_DIGIT_SIZE)
  |  |  ------------------
  |  |  |  |  136|  1.09k|#define MP_DIGIT_SIZE sizeof(mp_digit)
  |  |  ------------------
  ------------------
  |  Branch (2535:13): [True: 1.07k, False: 22]
  ------------------
 2536|  1.07k|            i &= ((mp_digit)1 << k) - (mp_digit)1;
 2537|  1.09k|        mp_set(c, i);
 2538|  1.09k|        return MP_OKAY;
  ------------------
  |  |   39|  1.09k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
 2539|  1.09k|    }
 2540|       |#if defined(_MSC_VER)
 2541|       |#pragma warning(pop)
 2542|       |#endif
 2543|       |
 2544|    840|    MP_DIGITS(&t0) = 0;
  ------------------
  |  |  152|    840|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
 2545|    840|    MP_DIGITS(&t1) = 0;
  ------------------
  |  |  152|    840|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
 2546|    840|    MP_DIGITS(&val) = 0;
  ------------------
  |  |  152|    840|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
 2547|    840|    MP_DIGITS(&tmp) = 0;
  ------------------
  |  |  152|    840|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
 2548|    840|    MP_DIGITS(&two2k) = 0;
  ------------------
  |  |  152|    840|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
 2549|    840|    MP_CHECKOK(mp_init_copy(&val, a));
  ------------------
  |  |  319|    840|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|    840|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 840]
  |  |  ------------------
  |  |  320|    840|    goto CLEANUP
  ------------------
 2550|    840|    s_mp_mod_2d(&val, k);
 2551|    840|    MP_CHECKOK(mp_init_copy(&t0, &val));
  ------------------
  |  |  319|    840|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|    840|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 840]
  |  |  ------------------
  |  |  320|    840|    goto CLEANUP
  ------------------
 2552|    840|    MP_CHECKOK(mp_init_copy(&t1, &t0));
  ------------------
  |  |  319|    840|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|    840|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 840]
  |  |  ------------------
  |  |  320|    840|    goto CLEANUP
  ------------------
 2553|    840|    MP_CHECKOK(mp_init(&tmp));
  ------------------
  |  |  319|    840|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|    840|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 840]
  |  |  ------------------
  |  |  320|    840|    goto CLEANUP
  ------------------
 2554|    840|    MP_CHECKOK(mp_init(&two2k));
  ------------------
  |  |  319|    840|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|    840|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 840]
  |  |  ------------------
  |  |  320|    840|    goto CLEANUP
  ------------------
 2555|    840|    MP_CHECKOK(s_mp_2expt(&two2k, k));
  ------------------
  |  |  319|    840|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|    840|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 840]
  |  |  ------------------
  |  |  320|    840|    goto CLEANUP
  ------------------
 2556|  4.45k|    do {
 2557|  4.45k|        MP_CHECKOK(mp_mul(&val, &t1, &tmp));
  ------------------
  |  |  319|  4.45k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  4.45k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 4.45k]
  |  |  ------------------
  |  |  320|  4.45k|    goto CLEANUP
  ------------------
 2558|  4.45k|        MP_CHECKOK(mp_sub(&two, &tmp, &tmp));
  ------------------
  |  |  319|  4.45k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  4.45k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 4.45k]
  |  |  ------------------
  |  |  320|  4.45k|    goto CLEANUP
  ------------------
 2559|  4.45k|        MP_CHECKOK(mp_mul(&t1, &tmp, &t1));
  ------------------
  |  |  319|  4.45k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  4.45k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 4.45k]
  |  |  ------------------
  |  |  320|  4.45k|    goto CLEANUP
  ------------------
 2560|  4.45k|        s_mp_mod_2d(&t1, k);
 2561|  8.88k|        while (MP_SIGN(&t1) != MP_ZPOS) {
  ------------------
  |  |  149|  8.88k|#define MP_SIGN(MP) ((MP)->sign)
  ------------------
                      while (MP_SIGN(&t1) != MP_ZPOS) {
  ------------------
  |  |   37|  8.88k|#define MP_ZPOS 0
  ------------------
  |  Branch (2561:16): [True: 4.43k, False: 4.45k]
  ------------------
 2562|  4.43k|            MP_CHECKOK(mp_add(&t1, &two2k, &t1));
  ------------------
  |  |  319|  4.43k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  4.43k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 4.43k]
  |  |  ------------------
  |  |  320|  4.43k|    goto CLEANUP
  ------------------
 2563|  4.43k|        }
 2564|  4.45k|        if (mp_cmp(&t1, &t0) == MP_EQ)
  ------------------
  |  |   50|  4.45k|#define MP_EQ 0
  ------------------
  |  Branch (2564:13): [True: 840, False: 3.61k]
  ------------------
 2565|    840|            break;
 2566|  3.61k|        MP_CHECKOK(mp_copy(&t1, &t0));
  ------------------
  |  |  319|  3.61k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  3.61k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 3.61k]
  |  |  ------------------
  |  |  320|  3.61k|    goto CLEANUP
  ------------------
 2567|  3.61k|    } while (--ix > 0);
  ------------------
  |  Branch (2567:14): [True: 3.61k, False: 0]
  ------------------
 2568|    840|    if (!ix) {
  ------------------
  |  Branch (2568:9): [True: 0, False: 840]
  ------------------
 2569|      0|        res = MP_UNDEF;
  ------------------
  |  |   45|      0|#define MP_UNDEF -5  /* answer is undefined   */
  ------------------
 2570|    840|    } else {
 2571|    840|        mp_exch(c, &t1);
 2572|    840|    }
 2573|       |
 2574|    840|CLEANUP:
 2575|    840|    mp_clear(&t0);
 2576|    840|    mp_clear(&t1);
 2577|    840|    mp_clear(&val);
 2578|    840|    mp_clear(&tmp);
 2579|    840|    mp_clear(&two2k);
 2580|    840|    return res;
 2581|    840|}
s_mp_invmod_even_m:
 2585|  1.03k|{
 2586|  1.03k|    mp_err res;
 2587|  1.03k|    mp_size k;
 2588|  1.03k|    mp_int oddFactor, evenFactor; /* factors of the modulus */
 2589|  1.03k|    mp_int oddPart, evenPart;     /* parts to combine via CRT. */
 2590|  1.03k|    mp_int C2, tmp1, tmp2;
 2591|       |
 2592|  1.03k|    ARGCHK(a != NULL && m != NULL && c != NULL, MP_BADARG);
  ------------------
  |  |  355|  1.03k|#define ARGCHK(X, Y) assert(X)
  ------------------
 2593|       |
 2594|       |    /*static const mp_digit d1 = 1; */
 2595|       |    /*static const mp_int one = { MP_ZPOS, 1, 1, (mp_digit *)&d1 }; */
 2596|       |
 2597|  1.03k|    if ((res = s_mp_ispow2(m)) >= 0) {
  ------------------
  |  Branch (2597:9): [True: 2, False: 1.03k]
  ------------------
 2598|      2|        k = res;
 2599|      2|        return s_mp_invmod_2d(a, k, c);
 2600|      2|    }
 2601|  1.03k|    MP_DIGITS(&oddFactor) = 0;
  ------------------
  |  |  152|  1.03k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
 2602|  1.03k|    MP_DIGITS(&evenFactor) = 0;
  ------------------
  |  |  152|  1.03k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
 2603|  1.03k|    MP_DIGITS(&oddPart) = 0;
  ------------------
  |  |  152|  1.03k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
 2604|  1.03k|    MP_DIGITS(&evenPart) = 0;
  ------------------
  |  |  152|  1.03k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
 2605|  1.03k|    MP_DIGITS(&C2) = 0;
  ------------------
  |  |  152|  1.03k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
 2606|  1.03k|    MP_DIGITS(&tmp1) = 0;
  ------------------
  |  |  152|  1.03k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
 2607|  1.03k|    MP_DIGITS(&tmp2) = 0;
  ------------------
  |  |  152|  1.03k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
 2608|       |
 2609|  1.03k|    MP_CHECKOK(mp_init_copy(&oddFactor, m)); /* oddFactor = m */
  ------------------
  |  |  319|  1.03k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  1.03k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 1.03k]
  |  |  ------------------
  |  |  320|  1.03k|    goto CLEANUP
  ------------------
 2610|  1.03k|    MP_CHECKOK(mp_init(&evenFactor));
  ------------------
  |  |  319|  1.03k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  1.03k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 1.03k]
  |  |  ------------------
  |  |  320|  1.03k|    goto CLEANUP
  ------------------
 2611|  1.03k|    MP_CHECKOK(mp_init(&oddPart));
  ------------------
  |  |  319|  1.03k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  1.03k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 1.03k]
  |  |  ------------------
  |  |  320|  1.03k|    goto CLEANUP
  ------------------
 2612|  1.03k|    MP_CHECKOK(mp_init(&evenPart));
  ------------------
  |  |  319|  1.03k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  1.03k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 1.03k]
  |  |  ------------------
  |  |  320|  1.03k|    goto CLEANUP
  ------------------
 2613|  1.03k|    MP_CHECKOK(mp_init(&C2));
  ------------------
  |  |  319|  1.03k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  1.03k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 1.03k]
  |  |  ------------------
  |  |  320|  1.03k|    goto CLEANUP
  ------------------
 2614|  1.03k|    MP_CHECKOK(mp_init(&tmp1));
  ------------------
  |  |  319|  1.03k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  1.03k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 1.03k]
  |  |  ------------------
  |  |  320|  1.03k|    goto CLEANUP
  ------------------
 2615|  1.03k|    MP_CHECKOK(mp_init(&tmp2));
  ------------------
  |  |  319|  1.03k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  1.03k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 1.03k]
  |  |  ------------------
  |  |  320|  1.03k|    goto CLEANUP
  ------------------
 2616|       |
 2617|  1.03k|    k = mp_trailing_zeros(m);
 2618|  1.03k|    s_mp_div_2d(&oddFactor, k);
 2619|  1.03k|    MP_CHECKOK(s_mp_2expt(&evenFactor, k));
  ------------------
  |  |  319|  1.03k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  1.03k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 1.03k]
  |  |  ------------------
  |  |  320|  1.03k|    goto CLEANUP
  ------------------
 2620|       |
 2621|       |    /* compute a**-1 mod oddFactor. */
 2622|  1.03k|    MP_CHECKOK(s_mp_invmod_odd_m(a, &oddFactor, &oddPart));
  ------------------
  |  |  319|  1.03k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  1.03k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 65, False: 968]
  |  |  ------------------
  |  |  320|  1.03k|    goto CLEANUP
  ------------------
 2623|       |    /* compute a**-1 mod evenFactor, where evenFactor == 2**k. */
 2624|    968|    MP_CHECKOK(s_mp_invmod_2d(a, k, &evenPart));
  ------------------
  |  |  319|    968|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|    968|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 968]
  |  |  ------------------
  |  |  320|    968|    goto CLEANUP
  ------------------
 2625|       |
 2626|       |    /* Use Chinese Remainer theorem to compute a**-1 mod m. */
 2627|       |    /* let m1 = oddFactor,  v1 = oddPart,
 2628|       |     * let m2 = evenFactor, v2 = evenPart.
 2629|       |     */
 2630|       |
 2631|       |    /* Compute C2 = m1**-1 mod m2. */
 2632|    968|    MP_CHECKOK(s_mp_invmod_2d(&oddFactor, k, &C2));
  ------------------
  |  |  319|    968|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|    968|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 968]
  |  |  ------------------
  |  |  320|    968|    goto CLEANUP
  ------------------
 2633|       |
 2634|       |    /* compute u = (v2 - v1)*C2 mod m2 */
 2635|    968|    MP_CHECKOK(mp_sub(&evenPart, &oddPart, &tmp1));
  ------------------
  |  |  319|    968|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|    968|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 968]
  |  |  ------------------
  |  |  320|    968|    goto CLEANUP
  ------------------
 2636|    968|    MP_CHECKOK(mp_mul(&tmp1, &C2, &tmp2));
  ------------------
  |  |  319|    968|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|    968|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 968]
  |  |  ------------------
  |  |  320|    968|    goto CLEANUP
  ------------------
 2637|    968|    s_mp_mod_2d(&tmp2, k);
 2638|  1.64k|    while (MP_SIGN(&tmp2) != MP_ZPOS) {
  ------------------
  |  |  149|  1.64k|#define MP_SIGN(MP) ((MP)->sign)
  ------------------
                  while (MP_SIGN(&tmp2) != MP_ZPOS) {
  ------------------
  |  |   37|  1.64k|#define MP_ZPOS 0
  ------------------
  |  Branch (2638:12): [True: 673, False: 968]
  ------------------
 2639|    673|        MP_CHECKOK(mp_add(&tmp2, &evenFactor, &tmp2));
  ------------------
  |  |  319|    673|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|    673|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 673]
  |  |  ------------------
  |  |  320|    673|    goto CLEANUP
  ------------------
 2640|    673|    }
 2641|       |
 2642|       |    /* compute answer = v1 + u*m1 */
 2643|    968|    MP_CHECKOK(mp_mul(&tmp2, &oddFactor, c));
  ------------------
  |  |  319|    968|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|    968|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 968]
  |  |  ------------------
  |  |  320|    968|    goto CLEANUP
  ------------------
 2644|    968|    MP_CHECKOK(mp_add(&oddPart, c, c));
  ------------------
  |  |  319|    968|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|    968|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 968]
  |  |  ------------------
  |  |  320|    968|    goto CLEANUP
  ------------------
 2645|       |    /* not sure this is necessary, but it's low cost if not. */
 2646|    968|    MP_CHECKOK(mp_mod(c, m, c));
  ------------------
  |  |  319|    968|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|    968|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 968]
  |  |  ------------------
  |  |  320|    968|    goto CLEANUP
  ------------------
 2647|       |
 2648|  1.03k|CLEANUP:
 2649|  1.03k|    mp_clear(&oddFactor);
 2650|  1.03k|    mp_clear(&evenFactor);
 2651|  1.03k|    mp_clear(&oddPart);
 2652|  1.03k|    mp_clear(&evenPart);
 2653|  1.03k|    mp_clear(&C2);
 2654|  1.03k|    mp_clear(&tmp1);
 2655|  1.03k|    mp_clear(&tmp2);
 2656|  1.03k|    return res;
 2657|    968|}
mp_invmod:
 2671|  1.13k|{
 2672|  1.13k|    ARGCHK(a != NULL && m != NULL && c != NULL, MP_BADARG);
  ------------------
  |  |  355|  1.13k|#define ARGCHK(X, Y) assert(X)
  ------------------
 2673|       |
 2674|  1.13k|    if (mp_cmp_z(a) == 0 || mp_cmp_z(m) == 0)
  ------------------
  |  Branch (2674:9): [True: 0, False: 1.13k]
  |  Branch (2674:29): [True: 0, False: 1.13k]
  ------------------
 2675|      0|        return MP_RANGE;
  ------------------
  |  |   43|      0|#define MP_RANGE -3  /* argument out of range */
  ------------------
 2676|       |
 2677|  1.13k|    if (mp_isodd(m)) {
  ------------------
  |  Branch (2677:9): [True: 96, False: 1.03k]
  ------------------
 2678|     96|        return s_mp_invmod_odd_m(a, m, c);
 2679|     96|    }
 2680|  1.03k|    if (mp_iseven(a))
  ------------------
  |  Branch (2680:9): [True: 1, False: 1.03k]
  ------------------
 2681|      1|        return MP_UNDEF; /* not invertable */
  ------------------
  |  |   45|      1|#define MP_UNDEF -5  /* answer is undefined   */
  ------------------
 2682|       |
 2683|  1.03k|    return s_mp_invmod_even_m(a, m, c);
 2684|       |
 2685|  1.03k|} /* end mp_invmod() */
s_mp_grow:
 3038|   311k|{
 3039|   311k|    ARGCHK(mp != NULL, MP_BADARG);
  ------------------
  |  |  355|   311k|#define ARGCHK(X, Y) assert(X)
  ------------------
 3040|       |
 3041|   311k|    if (min > ALLOC(mp)) {
  ------------------
  |  |  334|   311k|#define ALLOC(MP) MP_ALLOC(MP)
  |  |  ------------------
  |  |  |  |  151|   311k|#define MP_ALLOC(MP) ((MP)->alloc)
  |  |  ------------------
  ------------------
  |  Branch (3041:9): [True: 306k, False: 5.64k]
  ------------------
 3042|   306k|        mp_digit *tmp;
 3043|       |
 3044|       |        /* Set min to next nearest default precision block size */
 3045|   306k|        min = MP_ROUNDUP(min, s_mp_defprec);
  ------------------
  |  |   89|   306k|#define MP_ROUNDUP(a, b) (MP_HOWMANY(a, b) * (b))
  |  |  ------------------
  |  |  |  |   88|   306k|#define MP_HOWMANY(a, b) (((a) + (b)-1) / (b))
  |  |  ------------------
  ------------------
 3046|       |
 3047|   306k|        if ((tmp = s_mp_alloc(min, sizeof(mp_digit))) == NULL)
  ------------------
  |  Branch (3047:13): [True: 0, False: 306k]
  ------------------
 3048|      0|            return MP_MEM;
  ------------------
  |  |   42|      0|#define MP_MEM -2    /* out of memory         */
  ------------------
 3049|       |
 3050|   306k|        s_mp_copy(DIGITS(mp), tmp, USED(mp));
  ------------------
  |  |  335|   306k|#define DIGITS(MP) MP_DIGITS(MP)
  |  |  ------------------
  |  |  |  |  152|   306k|#define MP_DIGITS(MP) ((MP)->dp)
  |  |  ------------------
  ------------------
                      s_mp_copy(DIGITS(mp), tmp, USED(mp));
  ------------------
  |  |  333|   306k|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|   306k|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
 3051|       |
 3052|   306k|        s_mp_setz(DIGITS(mp), ALLOC(mp));
  ------------------
  |  |  335|   306k|#define DIGITS(MP) MP_DIGITS(MP)
  |  |  ------------------
  |  |  |  |  152|   306k|#define MP_DIGITS(MP) ((MP)->dp)
  |  |  ------------------
  ------------------
                      s_mp_setz(DIGITS(mp), ALLOC(mp));
  ------------------
  |  |  334|   306k|#define ALLOC(MP) MP_ALLOC(MP)
  |  |  ------------------
  |  |  |  |  151|   306k|#define MP_ALLOC(MP) ((MP)->alloc)
  |  |  ------------------
  ------------------
 3053|   306k|        s_mp_free(DIGITS(mp));
  ------------------
  |  |  335|   306k|#define DIGITS(MP) MP_DIGITS(MP)
  |  |  ------------------
  |  |  |  |  152|   306k|#define MP_DIGITS(MP) ((MP)->dp)
  |  |  ------------------
  ------------------
 3054|   306k|        DIGITS(mp) = tmp;
  ------------------
  |  |  335|   306k|#define DIGITS(MP) MP_DIGITS(MP)
  |  |  ------------------
  |  |  |  |  152|   306k|#define MP_DIGITS(MP) ((MP)->dp)
  |  |  ------------------
  ------------------
 3055|   306k|        ALLOC(mp) = min;
  ------------------
  |  |  334|   306k|#define ALLOC(MP) MP_ALLOC(MP)
  |  |  ------------------
  |  |  |  |  151|   306k|#define MP_ALLOC(MP) ((MP)->alloc)
  |  |  ------------------
  ------------------
 3056|   306k|    }
 3057|       |
 3058|   311k|    return MP_OKAY;
  ------------------
  |  |   39|   311k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
 3059|       |
 3060|   311k|} /* end s_mp_grow() */
s_mp_pad:
 3069|  5.92M|{
 3070|  5.92M|    ARGCHK(mp != NULL, MP_BADARG);
  ------------------
  |  |  355|  5.92M|#define ARGCHK(X, Y) assert(X)
  ------------------
 3071|       |
 3072|  5.92M|    if (min > USED(mp)) {
  ------------------
  |  |  333|  5.92M|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|  5.92M|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
  |  Branch (3072:9): [True: 3.88M, False: 2.04M]
  ------------------
 3073|  3.88M|        mp_err res;
 3074|       |
 3075|       |        /* Make sure there is room to increase precision  */
 3076|  3.88M|        if (min > ALLOC(mp)) {
  ------------------
  |  |  334|  3.88M|#define ALLOC(MP) MP_ALLOC(MP)
  |  |  ------------------
  |  |  |  |  151|  3.88M|#define MP_ALLOC(MP) ((MP)->alloc)
  |  |  ------------------
  ------------------
  |  Branch (3076:13): [True: 306k, False: 3.57M]
  ------------------
 3077|   306k|            if ((res = s_mp_grow(mp, min)) != MP_OKAY)
  ------------------
  |  |   39|   306k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (3077:17): [True: 0, False: 306k]
  ------------------
 3078|      0|                return res;
 3079|  3.57M|        } else {
 3080|  3.57M|            s_mp_setz(DIGITS(mp) + USED(mp), min - USED(mp));
  ------------------
  |  |  335|  3.57M|#define DIGITS(MP) MP_DIGITS(MP)
  |  |  ------------------
  |  |  |  |  152|  3.57M|#define MP_DIGITS(MP) ((MP)->dp)
  |  |  ------------------
  ------------------
                          s_mp_setz(DIGITS(mp) + USED(mp), min - USED(mp));
  ------------------
  |  |  333|  3.57M|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|  3.57M|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
                          s_mp_setz(DIGITS(mp) + USED(mp), min - USED(mp));
  ------------------
  |  |  333|  3.57M|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|  3.57M|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
 3081|  3.57M|        }
 3082|       |
 3083|       |        /* Increase precision; should already be 0-filled */
 3084|  3.88M|        USED(mp) = min;
  ------------------
  |  |  333|  3.88M|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|  3.88M|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
 3085|  3.88M|    }
 3086|       |
 3087|  5.92M|    return MP_OKAY;
  ------------------
  |  |   39|  5.92M|#define MP_OKAY 0    /* no error, all is well */
  ------------------
 3088|       |
 3089|  5.92M|} /* end s_mp_pad() */
s_mp_setz:
 3098|  6.24M|{
 3099|  6.24M|    memset(dp, 0, count * sizeof(mp_digit));
 3100|  6.24M|} /* end s_mp_setz() */
s_mp_copy:
 3109|  1.83M|{
 3110|  1.83M|    memcpy(dp, sp, count * sizeof(mp_digit));
 3111|  1.83M|} /* end s_mp_copy() */
s_mp_alloc:
 3120|  1.99M|{
 3121|  1.99M|    return calloc(nb, ni);
 3122|       |
 3123|  1.99M|} /* end s_mp_alloc() */
s_mp_free:
 3132|  1.99M|{
 3133|  1.99M|    if (ptr) {
  ------------------
  |  Branch (3133:9): [True: 1.99M, False: 0]
  ------------------
 3134|  1.99M|        free(ptr);
 3135|  1.99M|    }
 3136|  1.99M|} /* end s_mp_free() */
s_mp_clamp:
 3145|  7.34M|{
 3146|  7.34M|    mp_size used = MP_USED(mp);
  ------------------
  |  |  150|  7.34M|#define MP_USED(MP) ((MP)->used)
  ------------------
 3147|  34.2M|    while (used > 1 && DIGIT(mp, used - 1) == 0)
  ------------------
  |  |  336|  33.2M|#define DIGIT(MP, N) MP_DIGIT(MP, N)
  |  |  ------------------
  |  |  |  |  153|  33.2M|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  |  |  ------------------
  ------------------
  |  Branch (3147:12): [True: 33.2M, False: 994k]
  |  Branch (3147:24): [True: 26.9M, False: 6.35M]
  ------------------
 3148|  26.9M|        --used;
 3149|  7.34M|    MP_USED(mp) = used;
  ------------------
  |  |  150|  7.34M|#define MP_USED(MP) ((MP)->used)
  ------------------
 3150|  7.34M|    if (used == 1 && DIGIT(mp, 0) == 0)
  ------------------
  |  |  336|   994k|#define DIGIT(MP, N) MP_DIGIT(MP, N)
  |  |  ------------------
  |  |  |  |  153|   994k|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  |  |  ------------------
  ------------------
  |  Branch (3150:9): [True: 994k, False: 6.35M]
  |  Branch (3150:22): [True: 472k, False: 521k]
  ------------------
 3151|   472k|        MP_SIGN(mp) = ZPOS;
  ------------------
  |  |  149|   472k|#define MP_SIGN(MP) ((MP)->sign)
  ------------------
                      MP_SIGN(mp) = ZPOS;
  ------------------
  |  |  326|   472k|#define ZPOS MP_ZPOS
  |  |  ------------------
  |  |  |  |   37|   472k|#define MP_ZPOS 0
  |  |  ------------------
  ------------------
 3152|  7.34M|} /* end s_mp_clamp() */
s_mp_exch:
 3161|   278k|{
 3162|   278k|    mp_int tmp;
 3163|   278k|    if (!a || !b) {
  ------------------
  |  Branch (3163:9): [True: 0, False: 278k]
  |  Branch (3163:15): [True: 0, False: 278k]
  ------------------
 3164|      0|        return;
 3165|      0|    }
 3166|       |
 3167|   278k|    tmp = *a;
 3168|   278k|    *a = *b;
 3169|   278k|    *b = tmp;
 3170|       |
 3171|   278k|} /* end s_mp_exch() */
s_mp_lshd:
 3189|   498k|{
 3190|   498k|    mp_err res;
 3191|   498k|    unsigned int ix;
 3192|       |
 3193|   498k|    ARGCHK(mp != NULL, MP_BADARG);
  ------------------
  |  |  355|   498k|#define ARGCHK(X, Y) assert(X)
  ------------------
 3194|       |
 3195|   498k|    if (p == 0)
  ------------------
  |  Branch (3195:9): [True: 0, False: 498k]
  ------------------
 3196|      0|        return MP_OKAY;
  ------------------
  |  |   39|      0|#define MP_OKAY 0    /* no error, all is well */
  ------------------
 3197|       |
 3198|   498k|    if (MP_USED(mp) == 1 && MP_DIGIT(mp, 0) == 0)
  ------------------
  |  |  150|   498k|#define MP_USED(MP) ((MP)->used)
  ------------------
                  if (MP_USED(mp) == 1 && MP_DIGIT(mp, 0) == 0)
  ------------------
  |  |  153|  51.8k|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  ------------------
  |  Branch (3198:9): [True: 51.8k, False: 446k]
  |  Branch (3198:29): [True: 3, False: 51.8k]
  ------------------
 3199|      3|        return MP_OKAY;
  ------------------
  |  |   39|      3|#define MP_OKAY 0    /* no error, all is well */
  ------------------
 3200|       |
 3201|   498k|    if ((res = s_mp_pad(mp, USED(mp) + p)) != MP_OKAY)
  ------------------
  |  |  333|   498k|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|   498k|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
                  if ((res = s_mp_pad(mp, USED(mp) + p)) != MP_OKAY)
  ------------------
  |  |   39|   498k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (3201:9): [True: 0, False: 498k]
  ------------------
 3202|      0|        return res;
 3203|       |
 3204|       |    /* Shift all the significant figures over as needed */
 3205|  15.7M|    for (ix = USED(mp) - p; ix-- > 0;) {
  ------------------
  |  |  333|   498k|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|   498k|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
  |  Branch (3205:29): [True: 15.2M, False: 498k]
  ------------------
 3206|  15.2M|        DIGIT(mp, ix + p) = DIGIT(mp, ix);
  ------------------
  |  |  336|  15.2M|#define DIGIT(MP, N) MP_DIGIT(MP, N)
  |  |  ------------------
  |  |  |  |  153|  15.2M|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  |  |  ------------------
  ------------------
                      DIGIT(mp, ix + p) = DIGIT(mp, ix);
  ------------------
  |  |  336|  15.2M|#define DIGIT(MP, N) MP_DIGIT(MP, N)
  |  |  ------------------
  |  |  |  |  153|  15.2M|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  |  |  ------------------
  ------------------
 3207|  15.2M|    }
 3208|       |
 3209|       |    /* Fill the bottom digits with zeroes */
 3210|  2.36M|    for (ix = 0; (mp_size)ix < p; ix++)
  ------------------
  |  Branch (3210:18): [True: 1.87M, False: 498k]
  ------------------
 3211|  1.87M|        DIGIT(mp, ix) = 0;
  ------------------
  |  |  336|  1.87M|#define DIGIT(MP, N) MP_DIGIT(MP, N)
  |  |  ------------------
  |  |  |  |  153|  1.87M|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  |  |  ------------------
  ------------------
 3212|       |
 3213|   498k|    return MP_OKAY;
  ------------------
  |  |   39|   498k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
 3214|       |
 3215|   498k|} /* end s_mp_lshd() */
s_mp_mul_2d:
 3227|  12.9k|{
 3228|  12.9k|    mp_err res;
 3229|  12.9k|    mp_digit dshift, rshift, mask, x, prev = 0;
 3230|  12.9k|    mp_digit *pa = NULL;
 3231|  12.9k|    int i;
 3232|       |
 3233|  12.9k|    ARGCHK(mp != NULL, MP_BADARG);
  ------------------
  |  |  355|  12.9k|#define ARGCHK(X, Y) assert(X)
  ------------------
 3234|       |
 3235|  12.9k|    dshift = d / MP_DIGIT_BIT;
  ------------------
  |  |  137|  12.9k|#define MP_DIGIT_BIT (CHAR_BIT * MP_DIGIT_SIZE)
  |  |  ------------------
  |  |  |  |  136|  12.9k|#define MP_DIGIT_SIZE sizeof(mp_digit)
  |  |  ------------------
  ------------------
 3236|  12.9k|    d %= MP_DIGIT_BIT;
  ------------------
  |  |  137|  12.9k|#define MP_DIGIT_BIT (CHAR_BIT * MP_DIGIT_SIZE)
  |  |  ------------------
  |  |  |  |  136|  12.9k|#define MP_DIGIT_SIZE sizeof(mp_digit)
  |  |  ------------------
  ------------------
 3237|       |    /* mp_digit >> rshift is undefined behavior for rshift >= MP_DIGIT_BIT */
 3238|       |    /* mod and corresponding mask logic avoid that when d = 0 */
 3239|  12.9k|    rshift = MP_DIGIT_BIT - d;
  ------------------
  |  |  137|  12.9k|#define MP_DIGIT_BIT (CHAR_BIT * MP_DIGIT_SIZE)
  |  |  ------------------
  |  |  |  |  136|  12.9k|#define MP_DIGIT_SIZE sizeof(mp_digit)
  |  |  ------------------
  ------------------
 3240|  12.9k|    rshift %= MP_DIGIT_BIT;
  ------------------
  |  |  137|  12.9k|#define MP_DIGIT_BIT (CHAR_BIT * MP_DIGIT_SIZE)
  |  |  ------------------
  |  |  |  |  136|  12.9k|#define MP_DIGIT_SIZE sizeof(mp_digit)
  |  |  ------------------
  ------------------
 3241|       |    /* mask = (2**d - 1) * 2**(w-d) mod 2**w */
 3242|  12.9k|    mask = (DIGIT_MAX << rshift) + 1;
  ------------------
  |  |  327|  12.9k|#define DIGIT_MAX MP_DIGIT_MAX
  |  |  ------------------
  |  |  |  |   79|  12.9k|#define MP_DIGIT_MAX ULONG_MAX
  |  |  ------------------
  ------------------
 3243|  12.9k|    mask &= DIGIT_MAX - 1;
  ------------------
  |  |  327|  12.9k|#define DIGIT_MAX MP_DIGIT_MAX
  |  |  ------------------
  |  |  |  |   79|  12.9k|#define MP_DIGIT_MAX ULONG_MAX
  |  |  ------------------
  ------------------
 3244|       |    /* bits to be shifted out of the top word */
 3245|  12.9k|    x = MP_DIGIT(mp, MP_USED(mp) - 1) & mask;
  ------------------
  |  |  153|  12.9k|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  ------------------
 3246|       |
 3247|  12.9k|    if (MP_OKAY != (res = s_mp_pad(mp, MP_USED(mp) + dshift + (x != 0))))
  ------------------
  |  |   39|  12.9k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
                  if (MP_OKAY != (res = s_mp_pad(mp, MP_USED(mp) + dshift + (x != 0))))
  ------------------
  |  |  150|  12.9k|#define MP_USED(MP) ((MP)->used)
  ------------------
  |  Branch (3247:9): [True: 0, False: 12.9k]
  ------------------
 3248|      0|        return res;
 3249|       |
 3250|  12.9k|    if (dshift && MP_OKAY != (res = s_mp_lshd(mp, dshift)))
  ------------------
  |  |   39|      0|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (3250:9): [True: 0, False: 12.9k]
  |  Branch (3250:19): [True: 0, False: 0]
  ------------------
 3251|      0|        return res;
 3252|       |
 3253|  12.9k|    pa = MP_DIGITS(mp) + dshift;
  ------------------
  |  |  152|  12.9k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
 3254|       |
 3255|   352k|    for (i = MP_USED(mp) - dshift; i > 0; i--) {
  ------------------
  |  |  150|  12.9k|#define MP_USED(MP) ((MP)->used)
  ------------------
  |  Branch (3255:36): [True: 339k, False: 12.9k]
  ------------------
 3256|   339k|        x = *pa;
 3257|   339k|        *pa++ = (x << d) | prev;
 3258|   339k|        prev = (x & mask) >> rshift;
 3259|   339k|    }
 3260|       |
 3261|  12.9k|    s_mp_clamp(mp);
 3262|  12.9k|    return MP_OKAY;
  ------------------
  |  |   39|  12.9k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
 3263|  12.9k|} /* end s_mp_mul_2d() */
s_mp_rshd:
 3275|  3.88M|{
 3276|  3.88M|    mp_size ix;
 3277|  3.88M|    mp_digit *src, *dst;
 3278|       |
 3279|  3.88M|    if (p == 0)
  ------------------
  |  Branch (3279:9): [True: 1.54M, False: 2.33M]
  ------------------
 3280|  1.54M|        return;
 3281|       |
 3282|       |    /* Shortcut when all digits are to be shifted off */
 3283|  2.33M|    if (p >= USED(mp)) {
  ------------------
  |  |  333|  2.33M|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|  2.33M|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
  |  Branch (3283:9): [True: 50.9k, False: 2.28M]
  ------------------
 3284|  50.9k|        s_mp_setz(DIGITS(mp), ALLOC(mp));
  ------------------
  |  |  335|  50.9k|#define DIGITS(MP) MP_DIGITS(MP)
  |  |  ------------------
  |  |  |  |  152|  50.9k|#define MP_DIGITS(MP) ((MP)->dp)
  |  |  ------------------
  ------------------
                      s_mp_setz(DIGITS(mp), ALLOC(mp));
  ------------------
  |  |  334|  50.9k|#define ALLOC(MP) MP_ALLOC(MP)
  |  |  ------------------
  |  |  |  |  151|  50.9k|#define MP_ALLOC(MP) ((MP)->alloc)
  |  |  ------------------
  ------------------
 3285|  50.9k|        USED(mp) = 1;
  ------------------
  |  |  333|  50.9k|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|  50.9k|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
 3286|  50.9k|        SIGN(mp) = ZPOS;
  ------------------
  |  |  332|  50.9k|#define SIGN(MP) MP_SIGN(MP)
  |  |  ------------------
  |  |  |  |  149|  50.9k|#define MP_SIGN(MP) ((MP)->sign)
  |  |  ------------------
  ------------------
                      SIGN(mp) = ZPOS;
  ------------------
  |  |  326|  50.9k|#define ZPOS MP_ZPOS
  |  |  ------------------
  |  |  |  |   37|  50.9k|#define MP_ZPOS 0
  |  |  ------------------
  ------------------
 3287|  50.9k|        return;
 3288|  50.9k|    }
 3289|       |
 3290|       |    /* Shift all the significant figures over as needed */
 3291|  2.28M|    dst = MP_DIGITS(mp);
  ------------------
  |  |  152|  2.28M|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
 3292|  2.28M|    src = dst + p;
 3293|   140M|    for (ix = USED(mp) - p; ix > 0; ix--)
  ------------------
  |  |  333|  2.28M|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|  2.28M|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
  |  Branch (3293:29): [True: 137M, False: 2.28M]
  ------------------
 3294|   137M|        *dst++ = *src++;
 3295|       |
 3296|  2.28M|    MP_USED(mp) -= p;
  ------------------
  |  |  150|  2.28M|#define MP_USED(MP) ((MP)->used)
  ------------------
 3297|       |    /* Fill the top digits with zeroes */
 3298|   139M|    while (p-- > 0)
  ------------------
  |  Branch (3298:12): [True: 137M, False: 2.28M]
  ------------------
 3299|   137M|        *dst++ = 0;
 3300|       |
 3301|  2.28M|} /* end s_mp_rshd() */
s_mp_div_2:
 3310|  1.53M|{
 3311|  1.53M|    s_mp_div_2d(mp, 1);
 3312|       |
 3313|  1.53M|} /* end s_mp_div_2() */
s_mp_mul_2:
 3321|   600k|{
 3322|   600k|    mp_digit *pd;
 3323|   600k|    unsigned int ix, used;
 3324|   600k|    mp_digit kin = 0;
 3325|       |
 3326|   600k|    ARGCHK(mp != NULL, MP_BADARG);
  ------------------
  |  |  355|   600k|#define ARGCHK(X, Y) assert(X)
  ------------------
 3327|       |
 3328|       |    /* Shift digits leftward by 1 bit */
 3329|   600k|    used = MP_USED(mp);
  ------------------
  |  |  150|   600k|#define MP_USED(MP) ((MP)->used)
  ------------------
 3330|   600k|    pd = MP_DIGITS(mp);
  ------------------
  |  |  152|   600k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
 3331|   145M|    for (ix = 0; ix < used; ix++) {
  ------------------
  |  Branch (3331:18): [True: 145M, False: 600k]
  ------------------
 3332|   145M|        mp_digit d = *pd;
 3333|   145M|        *pd++ = (d << 1) | kin;
 3334|   145M|        kin = (d >> (DIGIT_BIT - 1));
  ------------------
  |  |  328|   145M|#define DIGIT_BIT MP_DIGIT_BIT
  |  |  ------------------
  |  |  |  |  137|   145M|#define MP_DIGIT_BIT (CHAR_BIT * MP_DIGIT_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  136|   145M|#define MP_DIGIT_SIZE sizeof(mp_digit)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3335|   145M|    }
 3336|       |
 3337|       |    /* Deal with rollover from last digit */
 3338|   600k|    if (kin) {
  ------------------
  |  Branch (3338:9): [True: 0, False: 600k]
  ------------------
 3339|      0|        if (ix >= ALLOC(mp)) {
  ------------------
  |  |  334|      0|#define ALLOC(MP) MP_ALLOC(MP)
  |  |  ------------------
  |  |  |  |  151|      0|#define MP_ALLOC(MP) ((MP)->alloc)
  |  |  ------------------
  ------------------
  |  Branch (3339:13): [True: 0, False: 0]
  ------------------
 3340|      0|            mp_err res;
 3341|      0|            if ((res = s_mp_grow(mp, ALLOC(mp) + 1)) != MP_OKAY)
  ------------------
  |  |  334|      0|#define ALLOC(MP) MP_ALLOC(MP)
  |  |  ------------------
  |  |  |  |  151|      0|#define MP_ALLOC(MP) ((MP)->alloc)
  |  |  ------------------
  ------------------
                          if ((res = s_mp_grow(mp, ALLOC(mp) + 1)) != MP_OKAY)
  ------------------
  |  |   39|      0|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (3341:17): [True: 0, False: 0]
  ------------------
 3342|      0|                return res;
 3343|      0|        }
 3344|       |
 3345|      0|        DIGIT(mp, ix) = kin;
  ------------------
  |  |  336|      0|#define DIGIT(MP, N) MP_DIGIT(MP, N)
  |  |  ------------------
  |  |  |  |  153|      0|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  |  |  ------------------
  ------------------
 3346|      0|        USED(mp) += 1;
  ------------------
  |  |  333|      0|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|      0|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
 3347|      0|    }
 3348|       |
 3349|   600k|    return MP_OKAY;
  ------------------
  |  |   39|   600k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
 3350|       |
 3351|   600k|} /* end s_mp_mul_2() */
s_mp_mod_2d:
 3364|   759k|{
 3365|   759k|    mp_size ndig = (d / DIGIT_BIT), nbit = (d % DIGIT_BIT);
  ------------------
  |  |  328|   759k|#define DIGIT_BIT MP_DIGIT_BIT
  |  |  ------------------
  |  |  |  |  137|   759k|#define MP_DIGIT_BIT (CHAR_BIT * MP_DIGIT_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  136|   759k|#define MP_DIGIT_SIZE sizeof(mp_digit)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  mp_size ndig = (d / DIGIT_BIT), nbit = (d % DIGIT_BIT);
  ------------------
  |  |  328|   759k|#define DIGIT_BIT MP_DIGIT_BIT
  |  |  ------------------
  |  |  |  |  137|   759k|#define MP_DIGIT_BIT (CHAR_BIT * MP_DIGIT_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  136|   759k|#define MP_DIGIT_SIZE sizeof(mp_digit)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3366|   759k|    mp_size ix;
 3367|   759k|    mp_digit dmask;
 3368|       |
 3369|   759k|    if (ndig >= USED(mp))
  ------------------
  |  |  333|   759k|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|   759k|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
  |  Branch (3369:9): [True: 53.4k, False: 706k]
  ------------------
 3370|  53.4k|        return;
 3371|       |
 3372|       |    /* Flush all the bits above 2^d in its digit */
 3373|   706k|    dmask = ((mp_digit)1 << nbit) - 1;
 3374|   706k|    DIGIT(mp, ndig) &= dmask;
  ------------------
  |  |  336|   706k|#define DIGIT(MP, N) MP_DIGIT(MP, N)
  |  |  ------------------
  |  |  |  |  153|   706k|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  |  |  ------------------
  ------------------
 3375|       |
 3376|       |    /* Flush all digits above the one with 2^d in it */
 3377|  20.2M|    for (ix = ndig + 1; ix < USED(mp); ix++)
  ------------------
  |  |  333|  20.2M|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|  20.2M|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
  |  Branch (3377:25): [True: 19.5M, False: 706k]
  ------------------
 3378|  19.5M|        DIGIT(mp, ix) = 0;
  ------------------
  |  |  336|  19.5M|#define DIGIT(MP, N) MP_DIGIT(MP, N)
  |  |  ------------------
  |  |  |  |  153|  19.5M|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  |  |  ------------------
  ------------------
 3379|       |
 3380|   706k|    s_mp_clamp(mp);
 3381|       |
 3382|   706k|} /* end s_mp_mod_2d() */
s_mp_div_2d:
 3395|  1.54M|{
 3396|  1.54M|    int ix;
 3397|  1.54M|    mp_digit save, next, mask, lshift;
 3398|       |
 3399|  1.54M|    s_mp_rshd(mp, d / DIGIT_BIT);
  ------------------
  |  |  328|  1.54M|#define DIGIT_BIT MP_DIGIT_BIT
  |  |  ------------------
  |  |  |  |  137|  1.54M|#define MP_DIGIT_BIT (CHAR_BIT * MP_DIGIT_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  136|  1.54M|#define MP_DIGIT_SIZE sizeof(mp_digit)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3400|  1.54M|    d %= DIGIT_BIT;
  ------------------
  |  |  328|  1.54M|#define DIGIT_BIT MP_DIGIT_BIT
  |  |  ------------------
  |  |  |  |  137|  1.54M|#define MP_DIGIT_BIT (CHAR_BIT * MP_DIGIT_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  136|  1.54M|#define MP_DIGIT_SIZE sizeof(mp_digit)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3401|       |    /* mp_digit << lshift is undefined behavior for lshift >= MP_DIGIT_BIT */
 3402|       |    /* mod and corresponding mask logic avoid that when d = 0 */
 3403|  1.54M|    lshift = DIGIT_BIT - d;
  ------------------
  |  |  328|  1.54M|#define DIGIT_BIT MP_DIGIT_BIT
  |  |  ------------------
  |  |  |  |  137|  1.54M|#define MP_DIGIT_BIT (CHAR_BIT * MP_DIGIT_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  136|  1.54M|#define MP_DIGIT_SIZE sizeof(mp_digit)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3404|  1.54M|    lshift %= DIGIT_BIT;
  ------------------
  |  |  328|  1.54M|#define DIGIT_BIT MP_DIGIT_BIT
  |  |  ------------------
  |  |  |  |  137|  1.54M|#define MP_DIGIT_BIT (CHAR_BIT * MP_DIGIT_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  136|  1.54M|#define MP_DIGIT_SIZE sizeof(mp_digit)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3405|  1.54M|    mask = ((mp_digit)1 << d) - 1;
 3406|  1.54M|    save = 0;
 3407|  5.17M|    for (ix = USED(mp) - 1; ix >= 0; ix--) {
  ------------------
  |  |  333|  1.54M|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|  1.54M|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
  |  Branch (3407:29): [True: 3.63M, False: 1.54M]
  ------------------
 3408|  3.63M|        next = DIGIT(mp, ix) & mask;
  ------------------
  |  |  336|  3.63M|#define DIGIT(MP, N) MP_DIGIT(MP, N)
  |  |  ------------------
  |  |  |  |  153|  3.63M|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  |  |  ------------------
  ------------------
 3409|  3.63M|        DIGIT(mp, ix) = (save << lshift) | (DIGIT(mp, ix) >> d);
  ------------------
  |  |  336|  3.63M|#define DIGIT(MP, N) MP_DIGIT(MP, N)
  |  |  ------------------
  |  |  |  |  153|  3.63M|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  |  |  ------------------
  ------------------
                      DIGIT(mp, ix) = (save << lshift) | (DIGIT(mp, ix) >> d);
  ------------------
  |  |  336|  3.63M|#define DIGIT(MP, N) MP_DIGIT(MP, N)
  |  |  ------------------
  |  |  |  |  153|  3.63M|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  |  |  ------------------
  ------------------
 3410|  3.63M|        save = next;
 3411|  3.63M|    }
 3412|  1.54M|    s_mp_clamp(mp);
 3413|       |
 3414|  1.54M|} /* end s_mp_div_2d() */
s_mp_norm:
 3433|  17.7k|{
 3434|  17.7k|    mp_digit d;
 3435|  17.7k|    mp_digit mask;
 3436|  17.7k|    mp_digit b_msd;
 3437|  17.7k|    mp_err res = MP_OKAY;
  ------------------
  |  |   39|  17.7k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
 3438|       |
 3439|  17.7k|    ARGCHK(a != NULL && b != NULL && pd != NULL, MP_BADARG);
  ------------------
  |  |  355|  17.7k|#define ARGCHK(X, Y) assert(X)
  ------------------
 3440|       |
 3441|  17.7k|    d = 0;
 3442|  17.7k|    mask = DIGIT_MAX & ~(DIGIT_MAX >> 1); /* mask is msb of digit */
  ------------------
  |  |  327|  17.7k|#define DIGIT_MAX MP_DIGIT_MAX
  |  |  ------------------
  |  |  |  |   79|  17.7k|#define MP_DIGIT_MAX ULONG_MAX
  |  |  ------------------
  ------------------
                  mask = DIGIT_MAX & ~(DIGIT_MAX >> 1); /* mask is msb of digit */
  ------------------
  |  |  327|  17.7k|#define DIGIT_MAX MP_DIGIT_MAX
  |  |  ------------------
  |  |  |  |   79|  17.7k|#define MP_DIGIT_MAX ULONG_MAX
  |  |  ------------------
  ------------------
 3443|  17.7k|    b_msd = DIGIT(b, USED(b) - 1);
  ------------------
  |  |  336|  17.7k|#define DIGIT(MP, N) MP_DIGIT(MP, N)
  |  |  ------------------
  |  |  |  |  153|  17.7k|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  |  |  ------------------
  ------------------
 3444|   150k|    while (!(b_msd & mask)) {
  ------------------
  |  Branch (3444:12): [True: 132k, False: 17.7k]
  ------------------
 3445|   132k|        b_msd <<= 1;
 3446|   132k|        ++d;
 3447|   132k|    }
 3448|       |
 3449|  17.7k|    if (d) {
  ------------------
  |  Branch (3449:9): [True: 4.05k, False: 13.7k]
  ------------------
 3450|  4.05k|        MP_CHECKOK(s_mp_mul_2d(a, d));
  ------------------
  |  |  319|  4.05k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  4.05k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 4.05k]
  |  |  ------------------
  |  |  320|  4.05k|    goto CLEANUP
  ------------------
 3451|  4.05k|        MP_CHECKOK(s_mp_mul_2d(b, d));
  ------------------
  |  |  319|  4.05k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  4.05k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 4.05k]
  |  |  ------------------
  |  |  320|  4.05k|    goto CLEANUP
  ------------------
 3452|  4.05k|    }
 3453|       |
 3454|  17.7k|    *pd = d;
 3455|  17.7k|CLEANUP:
 3456|  17.7k|    return res;
 3457|       |
 3458|  17.7k|} /* end s_mp_norm() */
s_mp_add_d:
 3471|  2.40k|{
 3472|       |#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD)
 3473|       |    mp_word w, k = 0;
 3474|       |    mp_size ix = 1;
 3475|       |
 3476|       |    w = (mp_word)DIGIT(mp, 0) + d;
 3477|       |    DIGIT(mp, 0) = ACCUM(w);
 3478|       |    k = CARRYOUT(w);
 3479|       |
 3480|       |    while (ix < USED(mp) && k) {
 3481|       |        w = (mp_word)DIGIT(mp, ix) + k;
 3482|       |        DIGIT(mp, ix) = ACCUM(w);
 3483|       |        k = CARRYOUT(w);
 3484|       |        ++ix;
 3485|       |    }
 3486|       |
 3487|       |    if (k != 0) {
 3488|       |        mp_err res;
 3489|       |
 3490|       |        if ((res = s_mp_pad(mp, USED(mp) + 1)) != MP_OKAY)
 3491|       |            return res;
 3492|       |
 3493|       |        DIGIT(mp, ix) = (mp_digit)k;
 3494|       |    }
 3495|       |
 3496|       |    return MP_OKAY;
 3497|       |#else
 3498|  2.40k|    mp_digit *pmp = MP_DIGITS(mp);
  ------------------
  |  |  152|  2.40k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
 3499|  2.40k|    mp_digit sum, mp_i, carry = 0;
 3500|  2.40k|    mp_err res = MP_OKAY;
  ------------------
  |  |   39|  2.40k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
 3501|  2.40k|    int used = (int)MP_USED(mp);
  ------------------
  |  |  150|  2.40k|#define MP_USED(MP) ((MP)->used)
  ------------------
 3502|       |
 3503|  2.40k|    mp_i = *pmp;
 3504|  2.40k|    *pmp++ = sum = d + mp_i;
 3505|  2.40k|    carry = (sum < d);
 3506|  2.40k|    while (carry && --used > 0) {
  ------------------
  |  Branch (3506:12): [True: 0, False: 2.40k]
  |  Branch (3506:21): [True: 0, False: 0]
  ------------------
 3507|      0|        mp_i = *pmp;
 3508|      0|        *pmp++ = sum = carry + mp_i;
 3509|      0|        carry = !sum;
 3510|      0|    }
 3511|  2.40k|    if (carry && !used) {
  ------------------
  |  Branch (3511:9): [True: 0, False: 2.40k]
  |  Branch (3511:18): [True: 0, False: 0]
  ------------------
 3512|       |        /* mp is growing */
 3513|      0|        used = MP_USED(mp);
  ------------------
  |  |  150|      0|#define MP_USED(MP) ((MP)->used)
  ------------------
 3514|      0|        MP_CHECKOK(s_mp_pad(mp, used + 1));
  ------------------
  |  |  319|      0|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|      0|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  320|      0|    goto CLEANUP
  ------------------
 3515|      0|        MP_DIGIT(mp, used) = carry;
  ------------------
  |  |  153|      0|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  ------------------
 3516|      0|    }
 3517|  2.40k|CLEANUP:
 3518|  2.40k|    return res;
 3519|  2.40k|#endif
 3520|  2.40k|} /* end s_mp_add_d() */
s_mp_sub_d:
 3529|  2.07k|{
 3530|       |#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_SUB_WORD)
 3531|       |    mp_word w, b = 0;
 3532|       |    mp_size ix = 1;
 3533|       |
 3534|       |    /* Compute initial subtraction    */
 3535|       |    w = (RADIX + (mp_word)DIGIT(mp, 0)) - d;
 3536|       |    b = CARRYOUT(w) ? 0 : 1;
 3537|       |    DIGIT(mp, 0) = ACCUM(w);
 3538|       |
 3539|       |    /* Propagate borrows leftward     */
 3540|       |    while (b && ix < USED(mp)) {
 3541|       |        w = (RADIX + (mp_word)DIGIT(mp, ix)) - b;
 3542|       |        b = CARRYOUT(w) ? 0 : 1;
 3543|       |        DIGIT(mp, ix) = ACCUM(w);
 3544|       |        ++ix;
 3545|       |    }
 3546|       |
 3547|       |    /* Remove leading zeroes          */
 3548|       |    s_mp_clamp(mp);
 3549|       |
 3550|       |    /* If we have a borrow out, it's a violation of the input invariant */
 3551|       |    if (b)
 3552|       |        return MP_RANGE;
 3553|       |    else
 3554|       |        return MP_OKAY;
 3555|       |#else
 3556|  2.07k|    mp_digit *pmp = MP_DIGITS(mp);
  ------------------
  |  |  152|  2.07k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
 3557|  2.07k|    mp_digit mp_i, diff, borrow;
 3558|  2.07k|    mp_size used = MP_USED(mp);
  ------------------
  |  |  150|  2.07k|#define MP_USED(MP) ((MP)->used)
  ------------------
 3559|       |
 3560|  2.07k|    mp_i = *pmp;
 3561|  2.07k|    *pmp++ = diff = mp_i - d;
 3562|  2.07k|    borrow = (diff > mp_i);
 3563|  2.07k|    while (borrow && --used) {
  ------------------
  |  Branch (3563:12): [True: 0, False: 2.07k]
  |  Branch (3563:22): [True: 0, False: 0]
  ------------------
 3564|      0|        mp_i = *pmp;
 3565|      0|        *pmp++ = diff = mp_i - borrow;
 3566|      0|        borrow = (diff > mp_i);
 3567|      0|    }
 3568|  2.07k|    s_mp_clamp(mp);
 3569|  2.07k|    return (borrow && !used) ? MP_RANGE : MP_OKAY;
  ------------------
  |  |   43|      0|#define MP_RANGE -3  /* argument out of range */
  ------------------
                  return (borrow && !used) ? MP_RANGE : MP_OKAY;
  ------------------
  |  |   39|  2.07k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (3569:13): [True: 0, False: 2.07k]
  |  Branch (3569:23): [True: 0, False: 0]
  ------------------
 3570|  2.07k|#endif
 3571|  2.07k|} /* end s_mp_sub_d() */
s_mp_mul_d:
 3580|   195k|{
 3581|   195k|    mp_err res;
 3582|   195k|    mp_size used;
 3583|   195k|    int pow;
 3584|       |
 3585|   195k|    if (!d) {
  ------------------
  |  Branch (3585:9): [True: 0, False: 195k]
  ------------------
 3586|      0|        mp_zero(a);
 3587|      0|        return MP_OKAY;
  ------------------
  |  |   39|      0|#define MP_OKAY 0    /* no error, all is well */
  ------------------
 3588|      0|    }
 3589|   195k|    if (d == 1)
  ------------------
  |  Branch (3589:9): [True: 7.51k, False: 187k]
  ------------------
 3590|  7.51k|        return MP_OKAY;
  ------------------
  |  |   39|  7.51k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
 3591|   187k|    if (0 <= (pow = s_mp_ispow2d(d))) {
  ------------------
  |  Branch (3591:9): [True: 4.80k, False: 182k]
  ------------------
 3592|  4.80k|        return s_mp_mul_2d(a, (mp_digit)pow);
 3593|  4.80k|    }
 3594|       |
 3595|   182k|    used = MP_USED(a);
  ------------------
  |  |  150|   182k|#define MP_USED(MP) ((MP)->used)
  ------------------
 3596|   182k|    MP_CHECKOK(s_mp_pad(a, used + 1));
  ------------------
  |  |  319|   182k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|   182k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 182k]
  |  |  ------------------
  |  |  320|   182k|    goto CLEANUP
  ------------------
 3597|       |
 3598|   182k|    s_mpv_mul_d(MP_DIGITS(a), used, d, MP_DIGITS(a));
  ------------------
  |  |  181|   182k|    ((mp_digit *)c)[a_len] = s_mpv_mul_set_vec64(c, a, a_len, b)
  ------------------
 3599|       |
 3600|   182k|    s_mp_clamp(a);
 3601|       |
 3602|   182k|CLEANUP:
 3603|   182k|    return res;
 3604|       |
 3605|   182k|} /* end s_mp_mul_d() */
s_mp_add_3arg:
 3824|  1.64M|{
 3825|  1.64M|    mp_digit *pa, *pb, *pc;
 3826|       |#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD)
 3827|       |    mp_word w = 0;
 3828|       |#else
 3829|  1.64M|    mp_digit sum, carry = 0, d;
 3830|  1.64M|#endif
 3831|  1.64M|    mp_size ix;
 3832|  1.64M|    mp_size used;
 3833|  1.64M|    mp_err res;
 3834|       |
 3835|  1.64M|    MP_SIGN(c) = MP_SIGN(a);
  ------------------
  |  |  149|  1.64M|#define MP_SIGN(MP) ((MP)->sign)
  ------------------
                  MP_SIGN(c) = MP_SIGN(a);
  ------------------
  |  |  149|  1.64M|#define MP_SIGN(MP) ((MP)->sign)
  ------------------
 3836|  1.64M|    if (MP_USED(a) < MP_USED(b)) {
  ------------------
  |  |  150|  1.64M|#define MP_USED(MP) ((MP)->used)
  ------------------
                  if (MP_USED(a) < MP_USED(b)) {
  ------------------
  |  |  150|  1.64M|#define MP_USED(MP) ((MP)->used)
  ------------------
  |  Branch (3836:9): [True: 257k, False: 1.38M]
  ------------------
 3837|   257k|        const mp_int *xch = a;
 3838|   257k|        a = b;
 3839|   257k|        b = xch;
 3840|   257k|    }
 3841|       |
 3842|       |    /* Make sure a has enough precision for the output value */
 3843|  1.64M|    if (MP_OKAY != (res = s_mp_pad(c, MP_USED(a))))
  ------------------
  |  |   39|  1.64M|#define MP_OKAY 0    /* no error, all is well */
  ------------------
                  if (MP_OKAY != (res = s_mp_pad(c, MP_USED(a))))
  ------------------
  |  |  150|  1.64M|#define MP_USED(MP) ((MP)->used)
  ------------------
  |  Branch (3843:9): [True: 0, False: 1.64M]
  ------------------
 3844|      0|        return res;
 3845|       |
 3846|       |    /*
 3847|       |     Add up all digits up to the precision of b.  If b had initially
 3848|       |     the same precision as a, or greater, we took care of it by the
 3849|       |     exchange step above, so there is no problem.  If b had initially
 3850|       |     less precision, we'll have to make sure the carry out is duly
 3851|       |     propagated upward among the higher-order digits of the sum.
 3852|       |    */
 3853|  1.64M|    pa = MP_DIGITS(a);
  ------------------
  |  |  152|  1.64M|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
 3854|  1.64M|    pb = MP_DIGITS(b);
  ------------------
  |  |  152|  1.64M|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
 3855|  1.64M|    pc = MP_DIGITS(c);
  ------------------
  |  |  152|  1.64M|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
 3856|  1.64M|    used = MP_USED(b);
  ------------------
  |  |  150|  1.64M|#define MP_USED(MP) ((MP)->used)
  ------------------
 3857|  5.69M|    for (ix = 0; ix < used; ix++) {
  ------------------
  |  Branch (3857:18): [True: 4.05M, False: 1.64M]
  ------------------
 3858|       |#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD)
 3859|       |        w = w + *pa++ + *pb++;
 3860|       |        *pc++ = ACCUM(w);
 3861|       |        w = CARRYOUT(w);
 3862|       |#else
 3863|  4.05M|        d = *pa++;
 3864|  4.05M|        sum = d + *pb++;
 3865|  4.05M|        d = (sum < d); /* detect overflow */
 3866|  4.05M|        *pc++ = sum += carry;
 3867|  4.05M|        carry = d + (sum < carry); /* detect overflow */
 3868|  4.05M|#endif
 3869|  4.05M|    }
 3870|       |
 3871|       |    /* If we run out of 'b' digits before we're actually done, make
 3872|       |     sure the carries get propagated upward...
 3873|       |   */
 3874|  2.31M|    for (used = MP_USED(a); ix < used; ++ix) {
  ------------------
  |  |  150|  1.64M|#define MP_USED(MP) ((MP)->used)
  ------------------
  |  Branch (3874:29): [True: 677k, False: 1.64M]
  ------------------
 3875|       |#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD)
 3876|       |        w = w + *pa++;
 3877|       |        *pc++ = ACCUM(w);
 3878|       |        w = CARRYOUT(w);
 3879|       |#else
 3880|   677k|        *pc++ = sum = carry + *pa++;
 3881|   677k|        carry = (sum < carry);
 3882|   677k|#endif
 3883|   677k|    }
 3884|       |
 3885|       |/* If there's an overall carry out, increase precision and include
 3886|       |     it.  We could have done this initially, but why touch the memory
 3887|       |     allocator unless we're sure we have to?
 3888|       |   */
 3889|       |#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD)
 3890|       |    if (w) {
 3891|       |        if ((res = s_mp_pad(c, used + 1)) != MP_OKAY)
 3892|       |            return res;
 3893|       |
 3894|       |        DIGIT(c, used) = (mp_digit)w;
 3895|       |        ++used;
 3896|       |    }
 3897|       |#else
 3898|  1.64M|    if (carry) {
  ------------------
  |  Branch (3898:9): [True: 55.2k, False: 1.58M]
  ------------------
 3899|  55.2k|        if ((res = s_mp_pad(c, used + 1)) != MP_OKAY)
  ------------------
  |  |   39|  55.2k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (3899:13): [True: 0, False: 55.2k]
  ------------------
 3900|      0|            return res;
 3901|       |
 3902|  55.2k|        DIGIT(c, used) = carry;
  ------------------
  |  |  336|  55.2k|#define DIGIT(MP, N) MP_DIGIT(MP, N)
  |  |  ------------------
  |  |  |  |  153|  55.2k|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  |  |  ------------------
  ------------------
 3903|  55.2k|        ++used;
 3904|  55.2k|    }
 3905|  1.64M|#endif
 3906|  1.64M|    MP_USED(c) = used;
  ------------------
  |  |  150|  1.64M|#define MP_USED(MP) ((MP)->used)
  ------------------
 3907|  1.64M|    return MP_OKAY;
  ------------------
  |  |   39|  1.64M|#define MP_OKAY 0    /* no error, all is well */
  ------------------
 3908|  1.64M|}
s_mp_sub:
 4001|   687k|{
 4002|   687k|    mp_digit *pa, *pb, *limit;
 4003|       |#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_SUB_WORD)
 4004|       |    mp_sword w = 0;
 4005|       |#else
 4006|   687k|    mp_digit d, diff, borrow = 0;
 4007|   687k|#endif
 4008|       |
 4009|       |    /*
 4010|       |    Subtract and propagate borrow.  Up to the precision of b, this
 4011|       |    accounts for the digits of b; after that, we just make sure the
 4012|       |    carries get to the right place.  This saves having to pad b out to
 4013|       |    the precision of a just to make the loops work right...
 4014|       |   */
 4015|   687k|    pa = MP_DIGITS(a);
  ------------------
  |  |  152|   687k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
 4016|   687k|    pb = MP_DIGITS(b);
  ------------------
  |  |  152|   687k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
 4017|   687k|    limit = pb + MP_USED(b);
  ------------------
  |  |  150|   687k|#define MP_USED(MP) ((MP)->used)
  ------------------
 4018|  40.9M|    while (pb < limit) {
  ------------------
  |  Branch (4018:12): [True: 40.2M, False: 687k]
  ------------------
 4019|       |#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_SUB_WORD)
 4020|       |        w = w + *pa - *pb++;
 4021|       |        *pa++ = ACCUM(w);
 4022|       |        w >>= MP_DIGIT_BIT;
 4023|       |#else
 4024|  40.2M|        d = *pa;
 4025|  40.2M|        diff = d - *pb++;
 4026|  40.2M|        d = (diff > d); /* detect borrow */
 4027|  40.2M|        if (borrow && --diff == MP_DIGIT_MAX)
  ------------------
  |  |   79|  19.3M|#define MP_DIGIT_MAX ULONG_MAX
  ------------------
  |  Branch (4027:13): [True: 19.3M, False: 20.9M]
  |  Branch (4027:23): [True: 93.7k, False: 19.2M]
  ------------------
 4028|  93.7k|            ++d;
 4029|  40.2M|        *pa++ = diff;
 4030|  40.2M|        borrow = d;
 4031|  40.2M|#endif
 4032|  40.2M|    }
 4033|   687k|    limit = MP_DIGITS(a) + MP_USED(a);
  ------------------
  |  |  152|   687k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
                  limit = MP_DIGITS(a) + MP_USED(a);
  ------------------
  |  |  150|   687k|#define MP_USED(MP) ((MP)->used)
  ------------------
 4034|       |#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_SUB_WORD)
 4035|       |    while (w && pa < limit) {
 4036|       |        w = w + *pa;
 4037|       |        *pa++ = ACCUM(w);
 4038|       |        w >>= MP_DIGIT_BIT;
 4039|       |    }
 4040|       |#else
 4041|  1.10M|    while (borrow && pa < limit) {
  ------------------
  |  Branch (4041:12): [True: 417k, False: 687k]
  |  Branch (4041:22): [True: 417k, False: 0]
  ------------------
 4042|   417k|        d = *pa;
 4043|   417k|        *pa++ = diff = d - borrow;
 4044|   417k|        borrow = (diff > d);
 4045|   417k|    }
 4046|   687k|#endif
 4047|       |
 4048|       |    /* Clobber any leading zeroes we created    */
 4049|   687k|    s_mp_clamp(a);
 4050|       |
 4051|       |/*
 4052|       |     If there was a borrow out, then |b| > |a| in violation
 4053|       |     of our input invariant.  We've already done the work,
 4054|       |     but we'll at least complain about it...
 4055|       |   */
 4056|       |#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_SUB_WORD)
 4057|       |    return w ? MP_RANGE : MP_OKAY;
 4058|       |#else
 4059|   687k|    return borrow ? MP_RANGE : MP_OKAY;
  ------------------
  |  |   43|      0|#define MP_RANGE -3  /* argument out of range */
  ------------------
                  return borrow ? MP_RANGE : MP_OKAY;
  ------------------
  |  |   39|   687k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (4059:12): [True: 0, False: 687k]
  ------------------
 4060|   687k|#endif
 4061|   687k|} /* end s_mp_sub() */
s_mp_sub_3arg:
 4068|  1.05M|{
 4069|  1.05M|    mp_digit *pa, *pb, *pc;
 4070|       |#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_SUB_WORD)
 4071|       |    mp_sword w = 0;
 4072|       |#else
 4073|  1.05M|    mp_digit d, diff, borrow = 0;
 4074|  1.05M|#endif
 4075|  1.05M|    int ix, limit;
 4076|  1.05M|    mp_err res;
 4077|       |
 4078|  1.05M|    MP_SIGN(c) = MP_SIGN(a);
  ------------------
  |  |  149|  1.05M|#define MP_SIGN(MP) ((MP)->sign)
  ------------------
                  MP_SIGN(c) = MP_SIGN(a);
  ------------------
  |  |  149|  1.05M|#define MP_SIGN(MP) ((MP)->sign)
  ------------------
 4079|       |
 4080|       |    /* Make sure a has enough precision for the output value */
 4081|  1.05M|    if (MP_OKAY != (res = s_mp_pad(c, MP_USED(a))))
  ------------------
  |  |   39|  1.05M|#define MP_OKAY 0    /* no error, all is well */
  ------------------
                  if (MP_OKAY != (res = s_mp_pad(c, MP_USED(a))))
  ------------------
  |  |  150|  1.05M|#define MP_USED(MP) ((MP)->used)
  ------------------
  |  Branch (4081:9): [True: 0, False: 1.05M]
  ------------------
 4082|      0|        return res;
 4083|       |
 4084|       |    /*
 4085|       |    Subtract and propagate borrow.  Up to the precision of b, this
 4086|       |    accounts for the digits of b; after that, we just make sure the
 4087|       |    carries get to the right place.  This saves having to pad b out to
 4088|       |    the precision of a just to make the loops work right...
 4089|       |   */
 4090|  1.05M|    pa = MP_DIGITS(a);
  ------------------
  |  |  152|  1.05M|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
 4091|  1.05M|    pb = MP_DIGITS(b);
  ------------------
  |  |  152|  1.05M|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
 4092|  1.05M|    pc = MP_DIGITS(c);
  ------------------
  |  |  152|  1.05M|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
 4093|  1.05M|    limit = MP_USED(b);
  ------------------
  |  |  150|  1.05M|#define MP_USED(MP) ((MP)->used)
  ------------------
 4094|  14.0M|    for (ix = 0; ix < limit; ++ix) {
  ------------------
  |  Branch (4094:18): [True: 13.0M, False: 1.05M]
  ------------------
 4095|       |#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_SUB_WORD)
 4096|       |        w = w + *pa++ - *pb++;
 4097|       |        *pc++ = ACCUM(w);
 4098|       |        w >>= MP_DIGIT_BIT;
 4099|       |#else
 4100|  13.0M|        d = *pa++;
 4101|  13.0M|        diff = d - *pb++;
 4102|  13.0M|        d = (diff > d);
 4103|  13.0M|        if (borrow && --diff == MP_DIGIT_MAX)
  ------------------
  |  |   79|  4.64M|#define MP_DIGIT_MAX ULONG_MAX
  ------------------
  |  Branch (4103:13): [True: 4.64M, False: 8.39M]
  |  Branch (4103:23): [True: 34.6k, False: 4.60M]
  ------------------
 4104|  34.6k|            ++d;
 4105|  13.0M|        *pc++ = diff;
 4106|  13.0M|        borrow = d;
 4107|  13.0M|#endif
 4108|  13.0M|    }
 4109|  1.32M|    for (limit = MP_USED(a); ix < limit; ++ix) {
  ------------------
  |  |  150|  1.05M|#define MP_USED(MP) ((MP)->used)
  ------------------
  |  Branch (4109:30): [True: 267k, False: 1.05M]
  ------------------
 4110|       |#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_SUB_WORD)
 4111|       |        w = w + *pa++;
 4112|       |        *pc++ = ACCUM(w);
 4113|       |        w >>= MP_DIGIT_BIT;
 4114|       |#else
 4115|   267k|        d = *pa++;
 4116|   267k|        *pc++ = diff = d - borrow;
 4117|   267k|        borrow = (diff > d);
 4118|   267k|#endif
 4119|   267k|    }
 4120|       |
 4121|       |    /* Clobber any leading zeroes we created    */
 4122|  1.05M|    MP_USED(c) = ix;
  ------------------
  |  |  150|  1.05M|#define MP_USED(MP) ((MP)->used)
  ------------------
 4123|  1.05M|    s_mp_clamp(c);
 4124|       |
 4125|       |/*
 4126|       |     If there was a borrow out, then |b| > |a| in violation
 4127|       |     of our input invariant.  We've already done the work,
 4128|       |     but we'll at least complain about it...
 4129|       |   */
 4130|       |#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_SUB_WORD)
 4131|       |    return w ? MP_RANGE : MP_OKAY;
 4132|       |#else
 4133|  1.05M|    return borrow ? MP_RANGE : MP_OKAY;
  ------------------
  |  |   43|      0|#define MP_RANGE -3  /* argument out of range */
  ------------------
                  return borrow ? MP_RANGE : MP_OKAY;
  ------------------
  |  |   39|  1.05M|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (4133:12): [True: 0, False: 1.05M]
  ------------------
 4134|  1.05M|#endif
 4135|  1.05M|}
s_mp_mul:
 4141|   878k|{
 4142|   878k|    return mp_mul(a, b, a);
 4143|   878k|} /* end s_mp_mul() */
s_mpv_sqr_add_prop:
 4364|   616k|{
 4365|       |#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_MUL_WORD)
 4366|       |    mp_word w;
 4367|       |    mp_digit d;
 4368|       |    mp_size ix;
 4369|       |
 4370|       |    w = 0;
 4371|       |#define ADD_SQUARE(n)                     \
 4372|       |    d = pa[n];                            \
 4373|       |    w += (d * (mp_word)d) + ps[2 * n];    \
 4374|       |    ps[2 * n] = ACCUM(w);                 \
 4375|       |    w = (w >> DIGIT_BIT) + ps[2 * n + 1]; \
 4376|       |    ps[2 * n + 1] = ACCUM(w);             \
 4377|       |    w = (w >> DIGIT_BIT)
 4378|       |
 4379|       |    for (ix = a_len; ix >= 4; ix -= 4) {
 4380|       |        ADD_SQUARE(0);
 4381|       |        ADD_SQUARE(1);
 4382|       |        ADD_SQUARE(2);
 4383|       |        ADD_SQUARE(3);
 4384|       |        pa += 4;
 4385|       |        ps += 8;
 4386|       |    }
 4387|       |    if (ix) {
 4388|       |        ps += 2 * ix;
 4389|       |        pa += ix;
 4390|       |        switch (ix) {
 4391|       |            case 3:
 4392|       |                ADD_SQUARE(-3); /* FALLTHRU */
 4393|       |            case 2:
 4394|       |                ADD_SQUARE(-2); /* FALLTHRU */
 4395|       |            case 1:
 4396|       |                ADD_SQUARE(-1); /* FALLTHRU */
 4397|       |            case 0:
 4398|       |                break;
 4399|       |        }
 4400|       |    }
 4401|       |    while (w) {
 4402|       |        w += *ps;
 4403|       |        *ps++ = ACCUM(w);
 4404|       |        w = (w >> DIGIT_BIT);
 4405|       |    }
 4406|       |#else
 4407|   616k|    mp_digit carry = 0;
 4408|  73.2M|    while (a_len--) {
  ------------------
  |  Branch (4408:12): [True: 72.6M, False: 616k]
  ------------------
 4409|  72.6M|        mp_digit a_i = *pa++;
 4410|  72.6M|        mp_digit a0a0, a1a1;
 4411|       |
 4412|  72.6M|        MP_SQR_D(a_i, a1a1, a0a0);
  ------------------
  |  | 4347|  72.6M|    {                                                              \
  |  | 4348|  72.6M|        mp_digit Pmid;                                             \
  |  | 4349|  72.6M|        Plo = (a & MP_HALF_DIGIT_MAX) * (a & MP_HALF_DIGIT_MAX);   \
  |  |  ------------------
  |  |  |  |   81|  72.6M|#define MP_HALF_DIGIT_MAX UINT_MAX
  |  |  ------------------
  |  |                       Plo = (a & MP_HALF_DIGIT_MAX) * (a & MP_HALF_DIGIT_MAX);   \
  |  |  ------------------
  |  |  |  |   81|  72.6M|#define MP_HALF_DIGIT_MAX UINT_MAX
  |  |  ------------------
  |  | 4350|  72.6M|        Phi = (a >> MP_HALF_DIGIT_BIT) * (a >> MP_HALF_DIGIT_BIT); \
  |  |  ------------------
  |  |  |  |  141|  72.6M|#define MP_HALF_DIGIT_BIT (MP_DIGIT_BIT / 2)
  |  |  |  |  ------------------
  |  |  |  |  |  |  137|  72.6M|#define MP_DIGIT_BIT (CHAR_BIT * MP_DIGIT_SIZE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  136|  72.6M|#define MP_DIGIT_SIZE sizeof(mp_digit)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                       Phi = (a >> MP_HALF_DIGIT_BIT) * (a >> MP_HALF_DIGIT_BIT); \
  |  |  ------------------
  |  |  |  |  141|  72.6M|#define MP_HALF_DIGIT_BIT (MP_DIGIT_BIT / 2)
  |  |  |  |  ------------------
  |  |  |  |  |  |  137|  72.6M|#define MP_DIGIT_BIT (CHAR_BIT * MP_DIGIT_SIZE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  136|  72.6M|#define MP_DIGIT_SIZE sizeof(mp_digit)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 4351|  72.6M|        Pmid = (a & MP_HALF_DIGIT_MAX) * (a >> MP_HALF_DIGIT_BIT); \
  |  |  ------------------
  |  |  |  |   81|  72.6M|#define MP_HALF_DIGIT_MAX UINT_MAX
  |  |  ------------------
  |  |                       Pmid = (a & MP_HALF_DIGIT_MAX) * (a >> MP_HALF_DIGIT_BIT); \
  |  |  ------------------
  |  |  |  |  141|  72.6M|#define MP_HALF_DIGIT_BIT (MP_DIGIT_BIT / 2)
  |  |  |  |  ------------------
  |  |  |  |  |  |  137|  72.6M|#define MP_DIGIT_BIT (CHAR_BIT * MP_DIGIT_SIZE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  136|  72.6M|#define MP_DIGIT_SIZE sizeof(mp_digit)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 4352|  72.6M|        Phi += Pmid >> (MP_HALF_DIGIT_BIT - 1);                    \
  |  |  ------------------
  |  |  |  |  141|  72.6M|#define MP_HALF_DIGIT_BIT (MP_DIGIT_BIT / 2)
  |  |  |  |  ------------------
  |  |  |  |  |  |  137|  72.6M|#define MP_DIGIT_BIT (CHAR_BIT * MP_DIGIT_SIZE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  136|  72.6M|#define MP_DIGIT_SIZE sizeof(mp_digit)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 4353|  72.6M|        Pmid <<= (MP_HALF_DIGIT_BIT + 1);                          \
  |  |  ------------------
  |  |  |  |  141|  72.6M|#define MP_HALF_DIGIT_BIT (MP_DIGIT_BIT / 2)
  |  |  |  |  ------------------
  |  |  |  |  |  |  137|  72.6M|#define MP_DIGIT_BIT (CHAR_BIT * MP_DIGIT_SIZE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  136|  72.6M|#define MP_DIGIT_SIZE sizeof(mp_digit)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 4354|  72.6M|        Plo += Pmid;                                               \
  |  | 4355|  72.6M|        if (Plo < Pmid)                                            \
  |  |  ------------------
  |  |  |  Branch (4355:13): [True: 24.1M, False: 48.4M]
  |  |  ------------------
  |  | 4356|  72.6M|            ++Phi;                                                 \
  |  | 4357|  72.6M|    }
  ------------------
 4413|       |
 4414|       |        /* here a1a1 and a0a0 constitute a_i ** 2 */
 4415|  72.6M|        a0a0 += carry;
 4416|  72.6M|        if (a0a0 < carry)
  ------------------
  |  Branch (4416:13): [True: 0, False: 72.6M]
  ------------------
 4417|      0|            ++a1a1;
 4418|       |
 4419|       |        /* now add to ps */
 4420|  72.6M|        a0a0 += a_i = *ps;
 4421|  72.6M|        if (a0a0 < a_i)
  ------------------
  |  Branch (4421:13): [True: 35.8M, False: 36.7M]
  ------------------
 4422|  35.8M|            ++a1a1;
 4423|  72.6M|        *ps++ = a0a0;
 4424|  72.6M|        a1a1 += a_i = *ps;
 4425|  72.6M|        carry = (a1a1 < a_i);
 4426|  72.6M|        *ps++ = a1a1;
 4427|  72.6M|    }
 4428|   616k|    while (carry) {
  ------------------
  |  Branch (4428:12): [True: 0, False: 616k]
  ------------------
 4429|      0|        mp_digit s_i = *ps;
 4430|      0|        carry += s_i;
 4431|      0|        *ps++ = carry;
 4432|      0|        carry = carry < s_i;
 4433|      0|    }
 4434|   616k|#endif
 4435|   616k|}
s_mpv_div_2dx1d:
 4446|   190k|{
 4447|   190k|    mp_digit d1, d0, q1, q0;
 4448|   190k|    mp_digit r1, r0, m;
 4449|       |
 4450|   190k|    d1 = divisor >> MP_HALF_DIGIT_BIT;
  ------------------
  |  |  141|   190k|#define MP_HALF_DIGIT_BIT (MP_DIGIT_BIT / 2)
  |  |  ------------------
  |  |  |  |  137|   190k|#define MP_DIGIT_BIT (CHAR_BIT * MP_DIGIT_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  136|   190k|#define MP_DIGIT_SIZE sizeof(mp_digit)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4451|   190k|    d0 = divisor & MP_HALF_DIGIT_MAX;
  ------------------
  |  |   81|   190k|#define MP_HALF_DIGIT_MAX UINT_MAX
  ------------------
 4452|   190k|    r1 = Nhi % d1;
 4453|   190k|    q1 = Nhi / d1;
 4454|   190k|    m = q1 * d0;
 4455|   190k|    r1 = (r1 << MP_HALF_DIGIT_BIT) | (Nlo >> MP_HALF_DIGIT_BIT);
  ------------------
  |  |  141|   190k|#define MP_HALF_DIGIT_BIT (MP_DIGIT_BIT / 2)
  |  |  ------------------
  |  |  |  |  137|   190k|#define MP_DIGIT_BIT (CHAR_BIT * MP_DIGIT_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  136|   190k|#define MP_DIGIT_SIZE sizeof(mp_digit)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  r1 = (r1 << MP_HALF_DIGIT_BIT) | (Nlo >> MP_HALF_DIGIT_BIT);
  ------------------
  |  |  141|   190k|#define MP_HALF_DIGIT_BIT (MP_DIGIT_BIT / 2)
  |  |  ------------------
  |  |  |  |  137|   190k|#define MP_DIGIT_BIT (CHAR_BIT * MP_DIGIT_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  136|   190k|#define MP_DIGIT_SIZE sizeof(mp_digit)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4456|   190k|    if (r1 < m) {
  ------------------
  |  Branch (4456:9): [True: 62.1k, False: 127k]
  ------------------
 4457|  62.1k|        q1--, r1 += divisor;
 4458|  62.1k|        if (r1 >= divisor && r1 < m) {
  ------------------
  |  Branch (4458:13): [True: 27.6k, False: 34.5k]
  |  Branch (4458:30): [True: 5.04k, False: 22.5k]
  ------------------
 4459|  5.04k|            q1--, r1 += divisor;
 4460|  5.04k|        }
 4461|  62.1k|    }
 4462|   190k|    r1 -= m;
 4463|   190k|    r0 = r1 % d1;
 4464|   190k|    q0 = r1 / d1;
 4465|   190k|    m = q0 * d0;
 4466|   190k|    r0 = (r0 << MP_HALF_DIGIT_BIT) | (Nlo & MP_HALF_DIGIT_MAX);
  ------------------
  |  |  141|   190k|#define MP_HALF_DIGIT_BIT (MP_DIGIT_BIT / 2)
  |  |  ------------------
  |  |  |  |  137|   190k|#define MP_DIGIT_BIT (CHAR_BIT * MP_DIGIT_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  136|   190k|#define MP_DIGIT_SIZE sizeof(mp_digit)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  r0 = (r0 << MP_HALF_DIGIT_BIT) | (Nlo & MP_HALF_DIGIT_MAX);
  ------------------
  |  |   81|   190k|#define MP_HALF_DIGIT_MAX UINT_MAX
  ------------------
 4467|   190k|    if (r0 < m) {
  ------------------
  |  Branch (4467:9): [True: 63.3k, False: 126k]
  ------------------
 4468|  63.3k|        q0--, r0 += divisor;
 4469|  63.3k|        if (r0 >= divisor && r0 < m) {
  ------------------
  |  Branch (4469:13): [True: 28.3k, False: 34.9k]
  |  Branch (4469:30): [True: 5.52k, False: 22.8k]
  ------------------
 4470|  5.52k|            q0--, r0 += divisor;
 4471|  5.52k|        }
 4472|  63.3k|    }
 4473|   190k|    if (qp)
  ------------------
  |  Branch (4473:9): [True: 190k, False: 0]
  ------------------
 4474|   190k|        *qp = (q1 << MP_HALF_DIGIT_BIT) | q0;
  ------------------
  |  |  141|   190k|#define MP_HALF_DIGIT_BIT (MP_DIGIT_BIT / 2)
  |  |  ------------------
  |  |  |  |  137|   190k|#define MP_DIGIT_BIT (CHAR_BIT * MP_DIGIT_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  136|   190k|#define MP_DIGIT_SIZE sizeof(mp_digit)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4475|   190k|    if (rp)
  ------------------
  |  Branch (4475:9): [True: 190k, False: 0]
  ------------------
 4476|   190k|        *rp = r0 - m;
 4477|   190k|    return MP_OKAY;
  ------------------
  |  |   39|   190k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
 4478|   190k|}
s_mp_sqr:
 4486|   250k|{
 4487|   250k|    mp_err res;
 4488|   250k|    mp_int tmp;
 4489|       |
 4490|   250k|    if ((res = mp_init_size(&tmp, 2 * USED(a))) != MP_OKAY)
  ------------------
  |  |  333|   250k|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|   250k|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
                  if ((res = mp_init_size(&tmp, 2 * USED(a))) != MP_OKAY)
  ------------------
  |  |   39|   250k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (4490:9): [True: 0, False: 250k]
  ------------------
 4491|      0|        return res;
 4492|   250k|    res = mp_sqr(a, &tmp);
 4493|   250k|    if (res == MP_OKAY) {
  ------------------
  |  |   39|   250k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (4493:9): [True: 250k, False: 0]
  ------------------
 4494|   250k|        s_mp_exch(&tmp, a);
 4495|   250k|    }
 4496|   250k|    mp_clear(&tmp);
 4497|   250k|    return res;
 4498|   250k|}
s_mp_div:
 4515|  18.1k|{
 4516|  18.1k|    mp_int part, t;
 4517|  18.1k|    mp_digit q_msd;
 4518|  18.1k|    mp_err res;
 4519|  18.1k|    mp_digit d;
 4520|  18.1k|    mp_digit div_msd;
 4521|  18.1k|    int ix;
 4522|       |
 4523|  18.1k|    if (mp_cmp_z(div) == 0)
  ------------------
  |  Branch (4523:9): [True: 0, False: 18.1k]
  ------------------
 4524|      0|        return MP_RANGE;
  ------------------
  |  |   43|      0|#define MP_RANGE -3  /* argument out of range */
  ------------------
 4525|       |
 4526|  18.1k|    DIGITS(&t) = 0;
  ------------------
  |  |  335|  18.1k|#define DIGITS(MP) MP_DIGITS(MP)
  |  |  ------------------
  |  |  |  |  152|  18.1k|#define MP_DIGITS(MP) ((MP)->dp)
  |  |  ------------------
  ------------------
 4527|       |    /* Shortcut if divisor is power of two */
 4528|  18.1k|    if ((ix = s_mp_ispow2(div)) >= 0) {
  ------------------
  |  Branch (4528:9): [True: 428, False: 17.7k]
  ------------------
 4529|    428|        MP_CHECKOK(mp_copy(rem, quot));
  ------------------
  |  |  319|    428|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|    428|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 428]
  |  |  ------------------
  |  |  320|    428|    goto CLEANUP
  ------------------
 4530|    428|        s_mp_div_2d(quot, (mp_digit)ix);
 4531|    428|        s_mp_mod_2d(rem, (mp_digit)ix);
 4532|       |
 4533|    428|        return MP_OKAY;
  ------------------
  |  |   39|    428|#define MP_OKAY 0    /* no error, all is well */
  ------------------
 4534|    428|    }
 4535|       |
 4536|  17.7k|    MP_SIGN(rem) = ZPOS;
  ------------------
  |  |  149|  17.7k|#define MP_SIGN(MP) ((MP)->sign)
  ------------------
                  MP_SIGN(rem) = ZPOS;
  ------------------
  |  |  326|  17.7k|#define ZPOS MP_ZPOS
  |  |  ------------------
  |  |  |  |   37|  17.7k|#define MP_ZPOS 0
  |  |  ------------------
  ------------------
 4537|  17.7k|    MP_SIGN(div) = ZPOS;
  ------------------
  |  |  149|  17.7k|#define MP_SIGN(MP) ((MP)->sign)
  ------------------
                  MP_SIGN(div) = ZPOS;
  ------------------
  |  |  326|  17.7k|#define ZPOS MP_ZPOS
  |  |  ------------------
  |  |  |  |   37|  17.7k|#define MP_ZPOS 0
  |  |  ------------------
  ------------------
 4538|  17.7k|    MP_SIGN(&part) = ZPOS;
  ------------------
  |  |  149|  17.7k|#define MP_SIGN(MP) ((MP)->sign)
  ------------------
                  MP_SIGN(&part) = ZPOS;
  ------------------
  |  |  326|  17.7k|#define ZPOS MP_ZPOS
  |  |  ------------------
  |  |  |  |   37|  17.7k|#define MP_ZPOS 0
  |  |  ------------------
  ------------------
 4539|       |
 4540|       |    /* A working temporary for division     */
 4541|  17.7k|    MP_CHECKOK(mp_init_size(&t, MP_ALLOC(rem)));
  ------------------
  |  |  319|  17.7k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  17.7k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 17.7k]
  |  |  ------------------
  |  |  320|  17.7k|    goto CLEANUP
  ------------------
 4542|       |
 4543|       |    /* Normalize to optimize guessing       */
 4544|  17.7k|    MP_CHECKOK(s_mp_norm(rem, div, &d));
  ------------------
  |  |  319|  17.7k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  17.7k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 17.7k]
  |  |  ------------------
  |  |  320|  17.7k|    goto CLEANUP
  ------------------
 4545|       |
 4546|       |    /* Perform the division itself...woo!   */
 4547|  17.7k|    MP_USED(quot) = MP_ALLOC(quot);
  ------------------
  |  |  150|  17.7k|#define MP_USED(MP) ((MP)->used)
  ------------------
                  MP_USED(quot) = MP_ALLOC(quot);
  ------------------
  |  |  151|  17.7k|#define MP_ALLOC(MP) ((MP)->alloc)
  ------------------
 4548|       |
 4549|       |    /* Find a partial substring of rem which is at least div */
 4550|       |    /* If we didn't find one, we're finished dividing    */
 4551|   212k|    while (MP_USED(rem) > MP_USED(div) || s_mp_cmp(rem, div) >= 0) {
  ------------------
  |  |  150|   212k|#define MP_USED(MP) ((MP)->used)
  ------------------
                  while (MP_USED(rem) > MP_USED(div) || s_mp_cmp(rem, div) >= 0) {
  ------------------
  |  |  150|   425k|#define MP_USED(MP) ((MP)->used)
  ------------------
  |  Branch (4551:12): [True: 194k, False: 18.8k]
  |  Branch (4551:43): [True: 1.03k, False: 17.7k]
  ------------------
 4552|   195k|        int i;
 4553|   195k|        int unusedRem;
 4554|   195k|        int partExtended = 0; /* set to true if we need to extend part */
 4555|       |
 4556|   195k|        unusedRem = MP_USED(rem) - MP_USED(div);
  ------------------
  |  |  150|   195k|#define MP_USED(MP) ((MP)->used)
  ------------------
                      unusedRem = MP_USED(rem) - MP_USED(div);
  ------------------
  |  |  150|   195k|#define MP_USED(MP) ((MP)->used)
  ------------------
 4557|   195k|        MP_DIGITS(&part) = MP_DIGITS(rem) + unusedRem;
  ------------------
  |  |  152|   195k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
                      MP_DIGITS(&part) = MP_DIGITS(rem) + unusedRem;
  ------------------
  |  |  152|   195k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
 4558|   195k|        MP_ALLOC(&part) = MP_ALLOC(rem) - unusedRem;
  ------------------
  |  |  151|   195k|#define MP_ALLOC(MP) ((MP)->alloc)
  ------------------
                      MP_ALLOC(&part) = MP_ALLOC(rem) - unusedRem;
  ------------------
  |  |  151|   195k|#define MP_ALLOC(MP) ((MP)->alloc)
  ------------------
 4559|   195k|        MP_USED(&part) = MP_USED(div);
  ------------------
  |  |  150|   195k|#define MP_USED(MP) ((MP)->used)
  ------------------
                      MP_USED(&part) = MP_USED(div);
  ------------------
  |  |  150|   195k|#define MP_USED(MP) ((MP)->used)
  ------------------
 4560|       |
 4561|       |        /* We have now truncated the part of the remainder to the same length as
 4562|       |         * the divisor. If part is smaller than div, extend part by one digit. */
 4563|   195k|        if (s_mp_cmp(&part, div) < 0) {
  ------------------
  |  Branch (4563:13): [True: 193k, False: 1.38k]
  ------------------
 4564|   193k|            --unusedRem;
 4565|   193k|#if MP_ARGCHK == 2
 4566|   193k|            assert(unusedRem >= 0);
 4567|   193k|#endif
 4568|   193k|            --MP_DIGITS(&part);
  ------------------
  |  |  152|   193k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
 4569|   193k|            ++MP_USED(&part);
  ------------------
  |  |  150|   193k|#define MP_USED(MP) ((MP)->used)
  ------------------
 4570|   193k|            ++MP_ALLOC(&part);
  ------------------
  |  |  151|   193k|#define MP_ALLOC(MP) ((MP)->alloc)
  ------------------
 4571|   193k|            partExtended = 1;
 4572|   193k|        }
 4573|       |
 4574|       |        /* Compute a guess for the next quotient digit       */
 4575|   195k|        q_msd = MP_DIGIT(&part, MP_USED(&part) - 1);
  ------------------
  |  |  153|   195k|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  ------------------
 4576|   195k|        div_msd = MP_DIGIT(div, MP_USED(div) - 1);
  ------------------
  |  |  153|   195k|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  ------------------
 4577|   195k|        if (!partExtended) {
  ------------------
  |  Branch (4577:13): [True: 1.38k, False: 193k]
  ------------------
 4578|       |            /* In this case, q_msd /= div_msd is always 1. First, since div_msd is
 4579|       |             * normalized to have the high bit set, 2*div_msd > MP_DIGIT_MAX. Since
 4580|       |             * we didn't extend part, q_msd >= div_msd. Therefore we know that
 4581|       |             * div_msd <= q_msd <= MP_DIGIT_MAX < 2*div_msd. Dividing by div_msd we
 4582|       |             * get 1 <= q_msd/div_msd < 2. So q_msd /= div_msd must be 1. */
 4583|  1.38k|            q_msd = 1;
 4584|   193k|        } else {
 4585|   193k|            if (q_msd == div_msd) {
  ------------------
  |  Branch (4585:17): [True: 3.77k, False: 190k]
  ------------------
 4586|  3.77k|                q_msd = MP_DIGIT_MAX;
  ------------------
  |  |   79|  3.77k|#define MP_DIGIT_MAX ULONG_MAX
  ------------------
 4587|   190k|            } else {
 4588|   190k|                mp_digit r;
 4589|   190k|                MP_CHECKOK(s_mpv_div_2dx1d(q_msd, MP_DIGIT(&part, MP_USED(&part) - 2),
  ------------------
  |  |  319|   190k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|   190k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 190k]
  |  |  ------------------
  |  |  320|   190k|    goto CLEANUP
  ------------------
 4590|   190k|                                           div_msd, &q_msd, &r));
 4591|   190k|            }
 4592|   193k|        }
 4593|   195k|#if MP_ARGCHK == 2
 4594|   195k|        assert(q_msd > 0); /* This case should never occur any more. */
 4595|   195k|#endif
 4596|   195k|        if (q_msd <= 0)
  ------------------
  |  Branch (4596:13): [True: 0, False: 195k]
  ------------------
 4597|      0|            break;
 4598|       |
 4599|       |        /* See what that multiplies out to                   */
 4600|   195k|        mp_copy(div, &t);
 4601|   195k|        MP_CHECKOK(s_mp_mul_d(&t, q_msd));
  ------------------
  |  |  319|   195k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|   195k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 195k]
  |  |  ------------------
  |  |  320|   195k|    goto CLEANUP
  ------------------
 4602|       |
 4603|       |        /*
 4604|       |           If it's too big, back it off.  We should not have to do this
 4605|       |           more than once, or, in rare cases, twice.  Knuth describes a
 4606|       |           method by which this could be reduced to a maximum of once, but
 4607|       |           I didn't implement that here.
 4608|       |           When using s_mpv_div_2dx1d, we may have to do this 3 times.
 4609|       |         */
 4610|   248k|        for (i = 4; s_mp_cmp(&t, &part) > 0 && i > 0; --i) {
  ------------------
  |  Branch (4610:21): [True: 53.1k, False: 195k]
  |  Branch (4610:48): [True: 53.1k, False: 0]
  ------------------
 4611|  53.1k|            --q_msd;
 4612|  53.1k|            MP_CHECKOK(s_mp_sub(&t, div)); /* t -= div */
  ------------------
  |  |  319|  53.1k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  53.1k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 53.1k]
  |  |  ------------------
  |  |  320|  53.1k|    goto CLEANUP
  ------------------
 4613|  53.1k|        }
 4614|   195k|        if (i < 0) {
  ------------------
  |  Branch (4614:13): [True: 0, False: 195k]
  ------------------
 4615|      0|            res = MP_RANGE;
  ------------------
  |  |   43|      0|#define MP_RANGE -3  /* argument out of range */
  ------------------
 4616|      0|            goto CLEANUP;
 4617|      0|        }
 4618|       |
 4619|       |        /* At this point, q_msd should be the right next digit   */
 4620|   195k|        MP_CHECKOK(s_mp_sub(&part, &t)); /* part -= t */
  ------------------
  |  |  319|   195k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|   195k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 195k]
  |  |  ------------------
  |  |  320|   195k|    goto CLEANUP
  ------------------
 4621|   195k|        s_mp_clamp(rem);
 4622|       |
 4623|       |        /*
 4624|       |          Include the digit in the quotient.  We allocated enough memory
 4625|       |          for any quotient we could ever possibly get, so we should not
 4626|       |          have to check for failures here
 4627|       |         */
 4628|   195k|        MP_DIGIT(quot, unusedRem) = q_msd;
  ------------------
  |  |  153|   195k|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  ------------------
 4629|   195k|    }
 4630|       |
 4631|       |    /* Denormalize remainder                */
 4632|  17.7k|    if (d) {
  ------------------
  |  Branch (4632:9): [True: 4.05k, False: 13.7k]
  ------------------
 4633|  4.05k|        s_mp_div_2d(rem, d);
 4634|  4.05k|    }
 4635|       |
 4636|  17.7k|    s_mp_clamp(quot);
 4637|       |
 4638|  17.7k|CLEANUP:
 4639|  17.7k|    mp_clear(&t);
 4640|       |
 4641|  17.7k|    return res;
 4642|       |
 4643|  17.7k|} /* end s_mp_div() */
s_mp_2expt:
 4651|  1.87k|{
 4652|  1.87k|    mp_err res;
 4653|  1.87k|    mp_size dig, bit;
 4654|       |
 4655|  1.87k|    dig = k / DIGIT_BIT;
  ------------------
  |  |  328|  1.87k|#define DIGIT_BIT MP_DIGIT_BIT
  |  |  ------------------
  |  |  |  |  137|  1.87k|#define MP_DIGIT_BIT (CHAR_BIT * MP_DIGIT_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  136|  1.87k|#define MP_DIGIT_SIZE sizeof(mp_digit)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4656|  1.87k|    bit = k % DIGIT_BIT;
  ------------------
  |  |  328|  1.87k|#define DIGIT_BIT MP_DIGIT_BIT
  |  |  ------------------
  |  |  |  |  137|  1.87k|#define MP_DIGIT_BIT (CHAR_BIT * MP_DIGIT_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  136|  1.87k|#define MP_DIGIT_SIZE sizeof(mp_digit)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4657|       |
 4658|  1.87k|    mp_zero(a);
 4659|  1.87k|    if ((res = s_mp_pad(a, dig + 1)) != MP_OKAY)
  ------------------
  |  |   39|  1.87k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (4659:9): [True: 0, False: 1.87k]
  ------------------
 4660|      0|        return res;
 4661|       |
 4662|  1.87k|    DIGIT(a, dig) |= ((mp_digit)1 << bit);
  ------------------
  |  |  336|  1.87k|#define DIGIT(MP, N) MP_DIGIT(MP, N)
  |  |  ------------------
  |  |  |  |  153|  1.87k|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  |  |  ------------------
  ------------------
 4663|       |
 4664|  1.87k|    return MP_OKAY;
  ------------------
  |  |   39|  1.87k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
 4665|       |
 4666|  1.87k|} /* end s_mp_2expt() */
s_mp_reduce:
 4687|   376k|{
 4688|   376k|    mp_int q;
 4689|   376k|    mp_err res;
 4690|       |
 4691|   376k|    if ((res = mp_init_copy(&q, x)) != MP_OKAY)
  ------------------
  |  |   39|   376k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (4691:9): [True: 0, False: 376k]
  ------------------
 4692|      0|        return res;
 4693|       |
 4694|   376k|    s_mp_rshd(&q, USED(m) - 1); /* q1 = x / b^(k-1)  */
  ------------------
  |  |  333|   376k|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|   376k|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
 4695|   376k|    s_mp_mul(&q, mu);           /* q2 = q1 * mu      */
 4696|   376k|    s_mp_rshd(&q, USED(m) + 1); /* q3 = q2 / b^(k+1) */
  ------------------
  |  |  333|   376k|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|   376k|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
 4697|       |
 4698|       |    /* x = x mod b^(k+1), quick (no division) */
 4699|   376k|    s_mp_mod_2d(x, DIGIT_BIT * (USED(m) + 1));
  ------------------
  |  |  328|   376k|#define DIGIT_BIT MP_DIGIT_BIT
  |  |  ------------------
  |  |  |  |  137|   376k|#define MP_DIGIT_BIT (CHAR_BIT * MP_DIGIT_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  136|   376k|#define MP_DIGIT_SIZE sizeof(mp_digit)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  s_mp_mod_2d(x, DIGIT_BIT * (USED(m) + 1));
  ------------------
  |  |  333|   376k|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|   376k|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
 4700|       |
 4701|       |    /* q = q * m mod b^(k+1), quick (no division) */
 4702|   376k|    s_mp_mul(&q, m);
 4703|   376k|    s_mp_mod_2d(&q, DIGIT_BIT * (USED(m) + 1));
  ------------------
  |  |  328|   376k|#define DIGIT_BIT MP_DIGIT_BIT
  |  |  ------------------
  |  |  |  |  137|   376k|#define MP_DIGIT_BIT (CHAR_BIT * MP_DIGIT_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  136|   376k|#define MP_DIGIT_SIZE sizeof(mp_digit)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  s_mp_mod_2d(&q, DIGIT_BIT * (USED(m) + 1));
  ------------------
  |  |  333|   376k|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|   376k|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
 4704|       |
 4705|       |    /* x = x - q */
 4706|   376k|    if ((res = mp_sub(x, &q, x)) != MP_OKAY)
  ------------------
  |  |   39|   376k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (4706:9): [True: 0, False: 376k]
  ------------------
 4707|      0|        goto CLEANUP;
 4708|       |
 4709|       |    /* If x < 0, add b^(k+1) to it */
 4710|   376k|    if (mp_cmp_z(x) < 0) {
  ------------------
  |  Branch (4710:9): [True: 22.1k, False: 354k]
  ------------------
 4711|  22.1k|        mp_set(&q, 1);
 4712|  22.1k|        if ((res = s_mp_lshd(&q, USED(m) + 1)) != MP_OKAY)
  ------------------
  |  |  333|  22.1k|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|  22.1k|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
                      if ((res = s_mp_lshd(&q, USED(m) + 1)) != MP_OKAY)
  ------------------
  |  |   39|  22.1k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (4712:13): [True: 0, False: 22.1k]
  ------------------
 4713|      0|            goto CLEANUP;
 4714|  22.1k|        if ((res = mp_add(x, &q, x)) != MP_OKAY)
  ------------------
  |  |   39|  22.1k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (4714:13): [True: 0, False: 22.1k]
  ------------------
 4715|      0|            goto CLEANUP;
 4716|  22.1k|    }
 4717|       |
 4718|       |    /* Back off if it's too big */
 4719|   406k|    while (mp_cmp(x, m) >= 0) {
  ------------------
  |  Branch (4719:12): [True: 29.6k, False: 376k]
  ------------------
 4720|  29.6k|        if ((res = s_mp_sub(x, m)) != MP_OKAY)
  ------------------
  |  |   39|  29.6k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (4720:13): [True: 0, False: 29.6k]
  ------------------
 4721|      0|            break;
 4722|  29.6k|    }
 4723|       |
 4724|   376k|CLEANUP:
 4725|   376k|    mp_clear(&q);
 4726|       |
 4727|   376k|    return res;
 4728|       |
 4729|   376k|} /* end s_mp_reduce() */
s_mp_cmp:
 4742|  3.95M|{
 4743|  3.95M|    ARGMPCHK(a != NULL && b != NULL);
  ------------------
  |  |  354|  3.95M|#define ARGMPCHK(X) assert(X)
  ------------------
 4744|       |
 4745|  3.95M|    mp_size used_a = MP_USED(a);
  ------------------
  |  |  150|  3.95M|#define MP_USED(MP) ((MP)->used)
  ------------------
 4746|  3.95M|    {
 4747|  3.95M|        mp_size used_b = MP_USED(b);
  ------------------
  |  |  150|  3.95M|#define MP_USED(MP) ((MP)->used)
  ------------------
 4748|       |
 4749|  3.95M|        if (used_a > used_b)
  ------------------
  |  Branch (4749:13): [True: 421k, False: 3.53M]
  ------------------
 4750|   421k|            goto IS_GT;
 4751|  3.53M|        if (used_a < used_b)
  ------------------
  |  Branch (4751:13): [True: 139k, False: 3.39M]
  ------------------
 4752|   139k|            goto IS_LT;
 4753|  3.53M|    }
 4754|  3.39M|    {
 4755|  3.39M|        mp_digit *pa, *pb;
 4756|  3.39M|        mp_digit da = 0, db = 0;
 4757|       |
 4758|  3.39M|#define CMP_AB(n)                     \
 4759|  3.39M|    if ((da = pa[n]) != (db = pb[n])) \
 4760|  3.39M|    goto done
 4761|       |
 4762|  3.39M|        pa = MP_DIGITS(a) + used_a;
  ------------------
  |  |  152|  3.39M|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
 4763|  3.39M|        pb = MP_DIGITS(b) + used_a;
  ------------------
  |  |  152|  3.39M|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
 4764|  3.41M|        while (used_a >= 4) {
  ------------------
  |  Branch (4764:16): [True: 2.92M, False: 491k]
  ------------------
 4765|  2.92M|            pa -= 4;
 4766|  2.92M|            pb -= 4;
 4767|  2.92M|            used_a -= 4;
 4768|  2.92M|            CMP_AB(3);
  ------------------
  |  | 4759|  2.92M|    if ((da = pa[n]) != (db = pb[n])) \
  |  |  ------------------
  |  |  |  Branch (4759:9): [True: 2.53M, False: 381k]
  |  |  ------------------
  |  | 4760|  2.92M|    goto done
  ------------------
 4769|   381k|            CMP_AB(2);
  ------------------
  |  | 4759|   381k|    if ((da = pa[n]) != (db = pb[n])) \
  |  |  ------------------
  |  |  |  Branch (4759:9): [True: 354k, False: 26.1k]
  |  |  ------------------
  |  | 4760|   381k|    goto done
  ------------------
 4770|  26.1k|            CMP_AB(1);
  ------------------
  |  | 4759|  26.1k|    if ((da = pa[n]) != (db = pb[n])) \
  |  |  ------------------
  |  |  |  Branch (4759:9): [True: 4.74k, False: 21.4k]
  |  |  ------------------
  |  | 4760|  26.1k|    goto done
  ------------------
 4771|  21.4k|            CMP_AB(0);
  ------------------
  |  | 4759|  21.4k|    if ((da = pa[n]) != (db = pb[n])) \
  |  |  ------------------
  |  |  |  Branch (4759:9): [True: 4.55k, False: 16.8k]
  |  |  ------------------
  |  | 4760|  21.4k|    goto done
  ------------------
 4772|  21.4k|        }
 4773|   517k|        while (used_a-- > 0 && ((da = *--pa) == (db = *--pb)))
  ------------------
  |  Branch (4773:16): [True: 493k, False: 23.8k]
  |  Branch (4773:32): [True: 26.0k, False: 467k]
  ------------------
 4774|  26.0k|            /* do nothing */;
 4775|  3.39M|    done:
 4776|  3.39M|        if (da > db)
  ------------------
  |  Branch (4776:13): [True: 677k, False: 2.71M]
  ------------------
 4777|   677k|            goto IS_GT;
 4778|  2.71M|        if (da < db)
  ------------------
  |  Branch (4778:13): [True: 2.69M, False: 23.8k]
  ------------------
 4779|  2.69M|            goto IS_LT;
 4780|  2.71M|    }
 4781|  23.8k|    return MP_EQ;
  ------------------
  |  |   50|  23.8k|#define MP_EQ 0
  ------------------
 4782|  2.83M|IS_LT:
 4783|  2.83M|    return MP_LT;
  ------------------
  |  |   49|  2.83M|#define MP_LT -1
  ------------------
 4784|  1.09M|IS_GT:
 4785|  1.09M|    return MP_GT;
  ------------------
  |  |   51|  1.09M|#define MP_GT 1
  ------------------
 4786|  2.71M|} /* end s_mp_cmp() */
s_mp_cmp_d:
 4795|  2.77M|{
 4796|  2.77M|    ARGMPCHK(a != NULL);
  ------------------
  |  |  354|  2.77M|#define ARGMPCHK(X) assert(X)
  ------------------
 4797|       |
 4798|  2.77M|    if (USED(a) > 1)
  ------------------
  |  |  333|  2.77M|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|  2.77M|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
  |  Branch (4798:9): [True: 2.15M, False: 620k]
  ------------------
 4799|  2.15M|        return MP_GT;
  ------------------
  |  |   51|  2.15M|#define MP_GT 1
  ------------------
 4800|       |
 4801|   620k|    if (DIGIT(a, 0) < d)
  ------------------
  |  |  336|   620k|#define DIGIT(MP, N) MP_DIGIT(MP, N)
  |  |  ------------------
  |  |  |  |  153|   620k|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  |  |  ------------------
  ------------------
  |  Branch (4801:9): [True: 0, False: 620k]
  ------------------
 4802|      0|        return MP_LT;
  ------------------
  |  |   49|      0|#define MP_LT -1
  ------------------
 4803|   620k|    else if (DIGIT(a, 0) > d)
  ------------------
  |  |  336|   620k|#define DIGIT(MP, N) MP_DIGIT(MP, N)
  |  |  ------------------
  |  |  |  |  153|   620k|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  |  |  ------------------
  ------------------
  |  Branch (4803:14): [True: 596k, False: 24.2k]
  ------------------
 4804|   596k|        return MP_GT;
  ------------------
  |  |   51|   596k|#define MP_GT 1
  ------------------
 4805|  24.2k|    else
 4806|  24.2k|        return MP_EQ;
  ------------------
  |  |   50|  24.2k|#define MP_EQ 0
  ------------------
 4807|       |
 4808|   620k|} /* end s_mp_cmp_d() */
s_mp_ispow2:
 4820|  19.2k|{
 4821|  19.2k|    mp_digit d;
 4822|  19.2k|    int extra = 0, ix;
 4823|       |
 4824|  19.2k|    ARGMPCHK(v != NULL);
  ------------------
  |  |  354|  19.2k|#define ARGMPCHK(X) assert(X)
  ------------------
 4825|       |
 4826|  19.2k|    ix = MP_USED(v) - 1;
  ------------------
  |  |  150|  19.2k|#define MP_USED(MP) ((MP)->used)
  ------------------
 4827|  19.2k|    d = MP_DIGIT(v, ix); /* most significant digit of v */
  ------------------
  |  |  153|  19.2k|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  ------------------
 4828|       |
 4829|  19.2k|    extra = s_mp_ispow2d(d);
 4830|  19.2k|    if (extra < 0 || ix == 0)
  ------------------
  |  Branch (4830:9): [True: 15.8k, False: 3.42k]
  |  Branch (4830:22): [True: 0, False: 3.42k]
  ------------------
 4831|  15.8k|        return extra;
 4832|       |
 4833|  49.8k|    while (--ix >= 0) {
  ------------------
  |  Branch (4833:12): [True: 49.4k, False: 430]
  ------------------
 4834|  49.4k|        if (DIGIT(v, ix) != 0)
  ------------------
  |  |  336|  49.4k|#define DIGIT(MP, N) MP_DIGIT(MP, N)
  |  |  ------------------
  |  |  |  |  153|  49.4k|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  |  |  ------------------
  ------------------
  |  Branch (4834:13): [True: 2.99k, False: 46.4k]
  ------------------
 4835|  2.99k|            return -1; /* not a power of two */
 4836|  46.4k|        extra += MP_DIGIT_BIT;
  ------------------
  |  |  137|  46.4k|#define MP_DIGIT_BIT (CHAR_BIT * MP_DIGIT_SIZE)
  |  |  ------------------
  |  |  |  |  136|  46.4k|#define MP_DIGIT_SIZE sizeof(mp_digit)
  |  |  ------------------
  ------------------
 4837|  46.4k|    }
 4838|       |
 4839|    430|    return extra;
 4840|       |
 4841|  3.42k|} /* end s_mp_ispow2() */
s_mp_ispow2d:
 4849|   206k|{
 4850|   206k|    if ((d != 0) && ((d & (d - 1)) == 0)) { /* d is a power of 2 */
  ------------------
  |  Branch (4850:9): [True: 206k, False: 0]
  |  Branch (4850:21): [True: 8.23k, False: 198k]
  ------------------
 4851|  8.23k|        int pow = 0;
 4852|       |#if defined(MP_USE_UINT_DIGIT)
 4853|       |        if (d & 0xffff0000U)
 4854|       |            pow += 16;
 4855|       |        if (d & 0xff00ff00U)
 4856|       |            pow += 8;
 4857|       |        if (d & 0xf0f0f0f0U)
 4858|       |            pow += 4;
 4859|       |        if (d & 0xccccccccU)
 4860|       |            pow += 2;
 4861|       |        if (d & 0xaaaaaaaaU)
 4862|       |            pow += 1;
 4863|       |#elif defined(MP_USE_LONG_LONG_DIGIT)
 4864|       |        if (d & 0xffffffff00000000ULL)
 4865|       |            pow += 32;
 4866|       |        if (d & 0xffff0000ffff0000ULL)
 4867|       |            pow += 16;
 4868|       |        if (d & 0xff00ff00ff00ff00ULL)
 4869|       |            pow += 8;
 4870|       |        if (d & 0xf0f0f0f0f0f0f0f0ULL)
 4871|       |            pow += 4;
 4872|       |        if (d & 0xccccccccccccccccULL)
 4873|       |            pow += 2;
 4874|       |        if (d & 0xaaaaaaaaaaaaaaaaULL)
 4875|       |            pow += 1;
 4876|       |#elif defined(MP_USE_LONG_DIGIT)
 4877|  8.23k|        if (d & 0xffffffff00000000UL)
  ------------------
  |  Branch (4877:13): [True: 3.54k, False: 4.68k]
  ------------------
 4878|  3.54k|            pow += 32;
 4879|  8.23k|        if (d & 0xffff0000ffff0000UL)
  ------------------
  |  Branch (4879:13): [True: 3.33k, False: 4.89k]
  ------------------
 4880|  3.33k|            pow += 16;
 4881|  8.23k|        if (d & 0xff00ff00ff00ff00UL)
  ------------------
  |  Branch (4881:13): [True: 3.27k, False: 4.95k]
  ------------------
 4882|  3.27k|            pow += 8;
 4883|  8.23k|        if (d & 0xf0f0f0f0f0f0f0f0UL)
  ------------------
  |  Branch (4883:13): [True: 3.52k, False: 4.71k]
  ------------------
 4884|  3.52k|            pow += 4;
 4885|  8.23k|        if (d & 0xccccccccccccccccUL)
  ------------------
  |  Branch (4885:13): [True: 3.37k, False: 4.85k]
  ------------------
 4886|  3.37k|            pow += 2;
 4887|  8.23k|        if (d & 0xaaaaaaaaaaaaaaaaUL)
  ------------------
  |  Branch (4887:13): [True: 6.90k, False: 1.32k]
  ------------------
 4888|  6.90k|            pow += 1;
 4889|       |#else
 4890|       |#error "unknown type for mp_digit"
 4891|       |#endif
 4892|  8.23k|        return pow;
 4893|  8.23k|    }
 4894|   198k|    return -1;
 4895|       |
 4896|   206k|} /* end s_mp_ispow2d() */
mp_read_unsigned_octets:
 5002|  24.6k|{
 5003|  24.6k|    int count;
 5004|  24.6k|    mp_err res;
 5005|  24.6k|    mp_digit d;
 5006|       |
 5007|  24.6k|    ARGCHK(mp != NULL && str != NULL && len > 0, MP_BADARG);
  ------------------
  |  |  355|  24.6k|#define ARGCHK(X, Y) assert(X)
  ------------------
 5008|       |
 5009|  24.6k|    mp_zero(mp);
 5010|       |
 5011|  24.6k|    count = len % sizeof(mp_digit);
 5012|  24.6k|    if (count) {
  ------------------
  |  Branch (5012:9): [True: 12.0k, False: 12.6k]
  ------------------
 5013|  51.9k|        for (d = 0; count-- > 0; --len) {
  ------------------
  |  Branch (5013:21): [True: 39.9k, False: 12.0k]
  ------------------
 5014|  39.9k|            d = (d << 8) | *str++;
 5015|  39.9k|        }
 5016|  12.0k|        MP_DIGIT(mp, 0) = d;
  ------------------
  |  |  153|  12.0k|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  ------------------
 5017|  12.0k|    }
 5018|       |
 5019|       |    /* Read the rest of the digits */
 5020|   511k|    for (; len > 0; len -= sizeof(mp_digit)) {
  ------------------
  |  Branch (5020:12): [True: 486k, False: 24.6k]
  ------------------
 5021|  4.37M|        for (d = 0, count = sizeof(mp_digit); count > 0; --count) {
  ------------------
  |  Branch (5021:47): [True: 3.89M, False: 486k]
  ------------------
 5022|  3.89M|            d = (d << 8) | *str++;
 5023|  3.89M|        }
 5024|   486k|        if (MP_EQ == mp_cmp_z(mp)) {
  ------------------
  |  |   50|   486k|#define MP_EQ 0
  ------------------
  |  Branch (5024:13): [True: 23.0k, False: 463k]
  ------------------
 5025|  23.0k|            if (!d)
  ------------------
  |  Branch (5025:17): [True: 9.82k, False: 13.2k]
  ------------------
 5026|  9.82k|                continue;
 5027|   463k|        } else {
 5028|   463k|            if ((res = s_mp_lshd(mp, 1)) != MP_OKAY)
  ------------------
  |  |   39|   463k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (5028:17): [True: 0, False: 463k]
  ------------------
 5029|      0|                return res;
 5030|   463k|        }
 5031|   476k|        MP_DIGIT(mp, 0) = d;
  ------------------
  |  |  153|   476k|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  ------------------
 5032|   476k|    }
 5033|  24.6k|    return MP_OKAY;
  ------------------
  |  |   39|  24.6k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
 5034|  24.6k|} /* end mp_read_unsigned_octets() */
mp_unsigned_octet_size:
 5040|  6.40k|{
 5041|  6.40k|    unsigned int bytes;
 5042|  6.40k|    int ix;
 5043|  6.40k|    mp_digit d = 0;
 5044|       |
 5045|  6.40k|    ARGCHK(mp != NULL, MP_BADARG);
  ------------------
  |  |  355|  6.40k|#define ARGCHK(X, Y) assert(X)
  ------------------
 5046|  6.40k|    ARGCHK(MP_ZPOS == SIGN(mp), MP_BADARG);
  ------------------
  |  |  355|  6.40k|#define ARGCHK(X, Y) assert(X)
  ------------------
 5047|       |
 5048|  6.40k|    bytes = (USED(mp) * sizeof(mp_digit));
  ------------------
  |  |  333|  6.40k|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|  6.40k|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
 5049|       |
 5050|       |    /* subtract leading zeros. */
 5051|       |    /* Iterate over each digit... */
 5052|  6.40k|    for (ix = USED(mp) - 1; ix >= 0; ix--) {
  ------------------
  |  |  333|  6.40k|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|  6.40k|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
  |  Branch (5052:29): [True: 6.40k, False: 0]
  ------------------
 5053|  6.40k|        d = DIGIT(mp, ix);
  ------------------
  |  |  336|  6.40k|#define DIGIT(MP, N) MP_DIGIT(MP, N)
  |  |  ------------------
  |  |  |  |  153|  6.40k|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  |  |  ------------------
  ------------------
 5054|  6.40k|        if (d)
  ------------------
  |  Branch (5054:13): [True: 6.40k, False: 0]
  ------------------
 5055|  6.40k|            break;
 5056|      0|        bytes -= sizeof(d);
 5057|      0|    }
 5058|  6.40k|    if (!bytes)
  ------------------
  |  Branch (5058:9): [True: 0, False: 6.40k]
  ------------------
 5059|      0|        return 1;
 5060|       |
 5061|       |    /* Have MSD, check digit bytes, high order first */
 5062|  6.43k|    for (ix = sizeof(mp_digit) - 1; ix >= 0; ix--) {
  ------------------
  |  Branch (5062:37): [True: 6.43k, False: 0]
  ------------------
 5063|  6.43k|        unsigned char x = (unsigned char)(d >> (ix * CHAR_BIT));
 5064|  6.43k|        if (x)
  ------------------
  |  Branch (5064:13): [True: 6.40k, False: 38]
  ------------------
 5065|  6.40k|            break;
 5066|     38|        --bytes;
 5067|     38|    }
 5068|  6.40k|    return bytes;
 5069|  6.40k|} /* end mp_unsigned_octet_size() */
mp_to_unsigned_octets:
 5076|  3.20k|{
 5077|  3.20k|    int ix, pos = 0;
 5078|  3.20k|    unsigned int bytes;
 5079|       |
 5080|  3.20k|    ARGCHK(mp != NULL && str != NULL && !SIGN(mp), MP_BADARG);
  ------------------
  |  |  355|  3.20k|#define ARGCHK(X, Y) assert(X)
  ------------------
 5081|       |
 5082|  3.20k|    bytes = mp_unsigned_octet_size(mp);
 5083|  3.20k|    ARGCHK(bytes <= maxlen, MP_BADARG);
  ------------------
  |  |  355|  3.20k|#define ARGCHK(X, Y) assert(X)
  ------------------
 5084|       |
 5085|       |    /* Iterate over each digit... */
 5086|   243k|    for (ix = USED(mp) - 1; ix >= 0; ix--) {
  ------------------
  |  |  333|  3.20k|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|  3.20k|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
  |  Branch (5086:29): [True: 239k, False: 3.20k]
  ------------------
 5087|   239k|        mp_digit d = DIGIT(mp, ix);
  ------------------
  |  |  336|   239k|#define DIGIT(MP, N) MP_DIGIT(MP, N)
  |  |  ------------------
  |  |  |  |  153|   239k|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  |  |  ------------------
  ------------------
 5088|   239k|        int jx;
 5089|       |
 5090|       |        /* Unpack digit bytes, high order first */
 5091|  2.15M|        for (jx = sizeof(mp_digit) - 1; jx >= 0; jx--) {
  ------------------
  |  Branch (5091:41): [True: 1.91M, False: 239k]
  ------------------
 5092|  1.91M|            unsigned char x = (unsigned char)(d >> (jx * CHAR_BIT));
 5093|  1.91M|            if (!pos && !x) /* suppress leading zeros */
  ------------------
  |  Branch (5093:17): [True: 3.21k, False: 1.91M]
  |  Branch (5093:25): [True: 19, False: 3.20k]
  ------------------
 5094|     19|                continue;
 5095|  1.91M|            str[pos++] = x;
 5096|  1.91M|        }
 5097|   239k|    }
 5098|  3.20k|    if (!pos)
  ------------------
  |  Branch (5098:9): [True: 0, False: 3.20k]
  ------------------
 5099|      0|        str[pos++] = 0;
 5100|  3.20k|    return pos;
 5101|  3.20k|} /* end mp_to_unsigned_octets() */
mp_to_fixlen_octets:
 5149|  2.39k|{
 5150|  2.39k|    int ix, jx;
 5151|  2.39k|    unsigned int bytes;
 5152|       |
 5153|  2.39k|    ARGCHK(mp != NULL && str != NULL && !SIGN(mp) && length > 0, MP_BADARG);
  ------------------
  |  |  355|  2.39k|#define ARGCHK(X, Y) assert(X)
  ------------------
 5154|       |
 5155|       |    /* Constant time on the value of mp.  Don't use mp_unsigned_octet_size. */
 5156|  2.39k|    bytes = USED(mp) * MP_DIGIT_SIZE;
  ------------------
  |  |  333|  2.39k|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|  2.39k|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
                  bytes = USED(mp) * MP_DIGIT_SIZE;
  ------------------
  |  |  136|  2.39k|#define MP_DIGIT_SIZE sizeof(mp_digit)
  ------------------
 5157|       |
 5158|       |    /* If the output is shorter than the native size of mp, then check that any
 5159|       |     * bytes not written have zero values.  This check isn't constant time on
 5160|       |     * the assumption that timing-sensitive callers can guarantee that mp fits
 5161|       |     * in the allocated space. */
 5162|  2.39k|    ix = USED(mp) - 1;
  ------------------
  |  |  333|  2.39k|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|  2.39k|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
 5163|  2.39k|    if (bytes > length) {
  ------------------
  |  Branch (5163:9): [True: 306, False: 2.09k]
  ------------------
 5164|    306|        unsigned int zeros = bytes - length;
 5165|       |
 5166|    306|        while (zeros >= MP_DIGIT_SIZE) {
  ------------------
  |  |  136|    306|#define MP_DIGIT_SIZE sizeof(mp_digit)
  ------------------
  |  Branch (5166:16): [True: 0, False: 306]
  ------------------
 5167|      0|            ARGCHK(DIGIT(mp, ix) == 0, MP_BADARG);
  ------------------
  |  |  355|      0|#define ARGCHK(X, Y) assert(X)
  ------------------
 5168|      0|            zeros -= MP_DIGIT_SIZE;
  ------------------
  |  |  136|      0|#define MP_DIGIT_SIZE sizeof(mp_digit)
  ------------------
 5169|      0|            ix--;
 5170|      0|        }
 5171|       |
 5172|    306|        if (zeros > 0) {
  ------------------
  |  Branch (5172:13): [True: 306, False: 0]
  ------------------
 5173|    306|            mp_digit d = DIGIT(mp, ix);
  ------------------
  |  |  336|    306|#define DIGIT(MP, N) MP_DIGIT(MP, N)
  |  |  ------------------
  |  |  |  |  153|    306|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  |  |  ------------------
  ------------------
 5174|    306|            mp_digit m = ~0ULL << ((MP_DIGIT_SIZE - zeros) * CHAR_BIT);
  ------------------
  |  |  136|    306|#define MP_DIGIT_SIZE sizeof(mp_digit)
  ------------------
 5175|    306|            ARGCHK((d & m) == 0, MP_BADARG);
  ------------------
  |  |  355|    306|#define ARGCHK(X, Y) assert(X)
  ------------------
 5176|    663|            for (jx = MP_DIGIT_SIZE - zeros - 1; jx >= 0; jx--) {
  ------------------
  |  |  136|    306|#define MP_DIGIT_SIZE sizeof(mp_digit)
  ------------------
  |  Branch (5176:50): [True: 357, False: 306]
  ------------------
 5177|    357|                *str++ = d >> (jx * CHAR_BIT);
 5178|    357|            }
 5179|    306|            ix--;
 5180|    306|        }
 5181|  2.09k|    } else if (bytes < length) {
  ------------------
  |  Branch (5181:16): [True: 314, False: 1.77k]
  ------------------
 5182|       |        /* Place any needed leading zeros. */
 5183|    314|        unsigned int zeros = length - bytes;
 5184|    314|        memset(str, 0, zeros);
 5185|    314|        str += zeros;
 5186|    314|    }
 5187|       |
 5188|       |    /* Iterate over each whole digit... */
 5189|  41.6k|    for (; ix >= 0; ix--) {
  ------------------
  |  Branch (5189:12): [True: 39.2k, False: 2.39k]
  ------------------
 5190|  39.2k|        mp_digit d = DIGIT(mp, ix);
  ------------------
  |  |  336|  39.2k|#define DIGIT(MP, N) MP_DIGIT(MP, N)
  |  |  ------------------
  |  |  |  |  153|  39.2k|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  |  |  ------------------
  ------------------
 5191|       |
 5192|       |        /* Unpack digit bytes, high order first */
 5193|   353k|        for (jx = MP_DIGIT_SIZE - 1; jx >= 0; jx--) {
  ------------------
  |  |  136|  39.2k|#define MP_DIGIT_SIZE sizeof(mp_digit)
  ------------------
  |  Branch (5193:38): [True: 314k, False: 39.2k]
  ------------------
 5194|   314k|            *str++ = d >> (jx * CHAR_BIT);
 5195|   314k|        }
 5196|  39.2k|    }
 5197|  2.39k|    return MP_OKAY;
  ------------------
  |  |   39|  2.39k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
 5198|  2.39k|} /* end mp_to_fixlen_octets() */
mp_cswap:
 5205|  3.84M|{
 5206|  3.84M|    mp_digit x;
 5207|  3.84M|    unsigned int i;
 5208|  3.84M|    mp_err res = 0;
 5209|       |
 5210|       |    /* if pointers are equal return */
 5211|  3.84M|    if (a == b)
  ------------------
  |  Branch (5211:9): [True: 0, False: 3.84M]
  ------------------
 5212|      0|        return res;
 5213|       |
 5214|  3.84M|    if (MP_ALLOC(a) < numdigits || MP_ALLOC(b) < numdigits) {
  ------------------
  |  |  151|  3.84M|#define MP_ALLOC(MP) ((MP)->alloc)
  ------------------
                  if (MP_ALLOC(a) < numdigits || MP_ALLOC(b) < numdigits) {
  ------------------
  |  |  151|  3.84M|#define MP_ALLOC(MP) ((MP)->alloc)
  ------------------
  |  Branch (5214:9): [True: 0, False: 3.84M]
  |  Branch (5214:36): [True: 0, False: 3.84M]
  ------------------
 5215|      0|        MP_CHECKOK(s_mp_grow(a, numdigits));
  ------------------
  |  |  319|      0|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|      0|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  320|      0|    goto CLEANUP
  ------------------
 5216|      0|        MP_CHECKOK(s_mp_grow(b, numdigits));
  ------------------
  |  |  319|      0|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|      0|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  320|      0|    goto CLEANUP
  ------------------
 5217|      0|    }
 5218|       |
 5219|  3.84M|    condition = ((~condition & ((condition - 1))) >> (MP_DIGIT_BIT - 1)) - 1;
  ------------------
  |  |  137|  3.84M|#define MP_DIGIT_BIT (CHAR_BIT * MP_DIGIT_SIZE)
  |  |  ------------------
  |  |  |  |  136|  3.84M|#define MP_DIGIT_SIZE sizeof(mp_digit)
  |  |  ------------------
  ------------------
 5220|       |
 5221|  3.84M|    x = (USED(a) ^ USED(b)) & condition;
  ------------------
  |  |  333|  3.84M|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|  3.84M|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
                  x = (USED(a) ^ USED(b)) & condition;
  ------------------
  |  |  333|  3.84M|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|  3.84M|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
 5222|  3.84M|    USED(a) ^= x;
  ------------------
  |  |  333|  3.84M|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|  3.84M|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
 5223|  3.84M|    USED(b) ^= x;
  ------------------
  |  |  333|  3.84M|#define USED(MP) MP_USED(MP)
  |  |  ------------------
  |  |  |  |  150|  3.84M|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  ------------------
 5224|       |
 5225|  3.84M|    x = (SIGN(a) ^ SIGN(b)) & condition;
  ------------------
  |  |  332|  3.84M|#define SIGN(MP) MP_SIGN(MP)
  |  |  ------------------
  |  |  |  |  149|  3.84M|#define MP_SIGN(MP) ((MP)->sign)
  |  |  ------------------
  ------------------
                  x = (SIGN(a) ^ SIGN(b)) & condition;
  ------------------
  |  |  332|  3.84M|#define SIGN(MP) MP_SIGN(MP)
  |  |  ------------------
  |  |  |  |  149|  3.84M|#define MP_SIGN(MP) ((MP)->sign)
  |  |  ------------------
  ------------------
 5226|  3.84M|    SIGN(a) ^= x;
  ------------------
  |  |  332|  3.84M|#define SIGN(MP) MP_SIGN(MP)
  |  |  ------------------
  |  |  |  |  149|  3.84M|#define MP_SIGN(MP) ((MP)->sign)
  |  |  ------------------
  ------------------
 5227|  3.84M|    SIGN(b) ^= x;
  ------------------
  |  |  332|  3.84M|#define SIGN(MP) MP_SIGN(MP)
  |  |  ------------------
  |  |  |  |  149|  3.84M|#define MP_SIGN(MP) ((MP)->sign)
  |  |  ------------------
  ------------------
 5228|       |
 5229|  23.0M|    for (i = 0; i < numdigits; i++) {
  ------------------
  |  Branch (5229:17): [True: 19.2M, False: 3.84M]
  ------------------
 5230|  19.2M|        x = (DIGIT(a, i) ^ DIGIT(b, i)) & condition;
  ------------------
  |  |  336|  19.2M|#define DIGIT(MP, N) MP_DIGIT(MP, N)
  |  |  ------------------
  |  |  |  |  153|  19.2M|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  |  |  ------------------
  ------------------
                      x = (DIGIT(a, i) ^ DIGIT(b, i)) & condition;
  ------------------
  |  |  336|  19.2M|#define DIGIT(MP, N) MP_DIGIT(MP, N)
  |  |  ------------------
  |  |  |  |  153|  19.2M|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  |  |  ------------------
  ------------------
 5231|  19.2M|        DIGIT(a, i) ^= x;
  ------------------
  |  |  336|  19.2M|#define DIGIT(MP, N) MP_DIGIT(MP, N)
  |  |  ------------------
  |  |  |  |  153|  19.2M|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  |  |  ------------------
  ------------------
 5232|  19.2M|        DIGIT(b, i) ^= x;
  ------------------
  |  |  336|  19.2M|#define DIGIT(MP, N) MP_DIGIT(MP, N)
  |  |  ------------------
  |  |  |  |  153|  19.2M|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  |  |  ------------------
  ------------------
 5233|  19.2M|    }
 5234|       |
 5235|  3.84M|CLEANUP:
 5236|  3.84M|    return res;
 5237|  3.84M|} /* end mp_cswap() */

s_mpv_mul_d_add_prop:
   21|   138M|{
   22|   138M|    mp_digit w;
   23|   138M|    mp_digit d;
   24|       |
   25|   138M|    d = s_mpv_mul_add_vec64(c, a, a_len, b);
   26|   138M|    c += a_len;
   27|   326M|    while (d) {
  ------------------
  |  Branch (27:12): [True: 187M, False: 138M]
  ------------------
   28|   187M|        w = c[0] + d;
   29|   187M|        d = (w < c[0] || w < d);
  ------------------
  |  Branch (29:14): [True: 49.6M, False: 138M]
  |  Branch (29:26): [True: 0, False: 138M]
  ------------------
   30|   187M|        *c++ = w;
   31|   187M|    }
   32|   138M|}

mpl_get_bits:
  392|   284k|{
  393|   284k|    mp_size rshift = (lsbNum % MP_DIGIT_BIT);
  ------------------
  |  |  137|   284k|#define MP_DIGIT_BIT (CHAR_BIT * MP_DIGIT_SIZE)
  |  |  ------------------
  |  |  |  |  136|   284k|#define MP_DIGIT_SIZE sizeof(mp_digit)
  |  |  ------------------
  ------------------
  394|   284k|    mp_size lsWndx = (lsbNum / MP_DIGIT_BIT);
  ------------------
  |  |  137|   284k|#define MP_DIGIT_BIT (CHAR_BIT * MP_DIGIT_SIZE)
  |  |  ------------------
  |  |  |  |  136|   284k|#define MP_DIGIT_SIZE sizeof(mp_digit)
  |  |  ------------------
  ------------------
  395|   284k|    mp_digit *digit = MP_DIGITS(a) + lsWndx;
  ------------------
  |  |  152|   284k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
  396|   284k|    mp_digit mask = ((1 << numBits) - 1);
  397|       |
  398|   284k|    ARGCHK(numBits < CHAR_BIT * sizeof mask, MP_BADARG);
  ------------------
  |  |  355|   284k|#define ARGCHK(X, Y) assert(X)
  ------------------
  399|   284k|    ARGCHK(MP_HOWMANY(lsbNum, MP_DIGIT_BIT) <= MP_USED(a), MP_RANGE);
  ------------------
  |  |  355|   284k|#define ARGCHK(X, Y) assert(X)
  ------------------
  400|       |
  401|   284k|    if ((numBits + lsbNum % MP_DIGIT_BIT <= MP_DIGIT_BIT) ||
  ------------------
  |  |  137|   284k|#define MP_DIGIT_BIT (CHAR_BIT * MP_DIGIT_SIZE)
  |  |  ------------------
  |  |  |  |  136|   284k|#define MP_DIGIT_SIZE sizeof(mp_digit)
  |  |  ------------------
  ------------------
                  if ((numBits + lsbNum % MP_DIGIT_BIT <= MP_DIGIT_BIT) ||
  ------------------
  |  |  137|   284k|#define MP_DIGIT_BIT (CHAR_BIT * MP_DIGIT_SIZE)
  |  |  ------------------
  |  |  |  |  136|   284k|#define MP_DIGIT_SIZE sizeof(mp_digit)
  |  |  ------------------
  ------------------
  |  Branch (401:9): [True: 277k, False: 6.87k]
  ------------------
  402|   284k|        (lsWndx + 1 >= MP_USED(a))) {
  ------------------
  |  |  150|  6.87k|#define MP_USED(MP) ((MP)->used)
  ------------------
  |  Branch (402:9): [True: 1.37k, False: 5.49k]
  ------------------
  403|   279k|        mask &= (digit[0] >> rshift);
  404|   279k|    } else {
  405|  5.49k|        mask &= ((digit[0] >> rshift) | (digit[1] << (MP_DIGIT_BIT - rshift)));
  ------------------
  |  |  137|  5.49k|#define MP_DIGIT_BIT (CHAR_BIT * MP_DIGIT_SIZE)
  |  |  ------------------
  |  |  |  |  136|  5.49k|#define MP_DIGIT_SIZE sizeof(mp_digit)
  |  |  ------------------
  ------------------
  406|  5.49k|    }
  407|   284k|    return (mp_err)mask;
  408|   284k|}
mpl_significant_bits:
  427|  7.57k|{
  428|       |    /*
  429|       |      start bits at 1.
  430|       |      lg(0) = 0 => bits = 1 by function semantics.
  431|       |      below does a binary search for the _position_ of the top bit set,
  432|       |      which is floor(lg(abs(a))) for a != 0.
  433|       |     */
  434|  7.57k|    mp_size bits = 1;
  435|  7.57k|    int ix;
  436|       |
  437|  7.57k|    ARGCHK(a != NULL, MP_BADARG);
  ------------------
  |  |  355|  7.57k|#define ARGCHK(X, Y) assert(X)
  ------------------
  438|       |
  439|  7.57k|    for (ix = MP_USED(a); ix > 0;) {
  ------------------
  |  |  150|  7.57k|#define MP_USED(MP) ((MP)->used)
  ------------------
  |  Branch (439:27): [True: 7.57k, False: 0]
  ------------------
  440|  7.57k|        mp_digit d, x, mask;
  441|  7.57k|        if ((d = MP_DIGIT(a, --ix)) == 0)
  ------------------
  |  |  153|  7.57k|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  ------------------
  |  Branch (441:13): [True: 0, False: 7.57k]
  ------------------
  442|      0|            continue;
  443|  7.57k|#if !defined(MP_USE_UINT_DIGIT)
  444|  7.57k|        LZCNTLOOP(32);
  ------------------
  |  |  411|  7.57k|    do {                                           \
  |  |  412|  7.57k|        x = d >> (i);                              \
  |  |  413|  7.57k|        mask = (0 - x);                            \
  |  |  414|  7.57k|        mask = (0 - (mask >> (MP_DIGIT_BIT - 1))); \
  |  |  ------------------
  |  |  |  |  137|  7.57k|#define MP_DIGIT_BIT (CHAR_BIT * MP_DIGIT_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  136|  7.57k|#define MP_DIGIT_SIZE sizeof(mp_digit)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  415|  7.57k|        bits += (i)&mask;                          \
  |  |  416|  7.57k|        d ^= (x ^ d) & mask;                       \
  |  |  417|  7.57k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (417:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  445|  7.57k|#endif
  446|  7.57k|        LZCNTLOOP(16);
  ------------------
  |  |  411|  7.57k|    do {                                           \
  |  |  412|  7.57k|        x = d >> (i);                              \
  |  |  413|  7.57k|        mask = (0 - x);                            \
  |  |  414|  7.57k|        mask = (0 - (mask >> (MP_DIGIT_BIT - 1))); \
  |  |  ------------------
  |  |  |  |  137|  7.57k|#define MP_DIGIT_BIT (CHAR_BIT * MP_DIGIT_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  136|  7.57k|#define MP_DIGIT_SIZE sizeof(mp_digit)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  415|  7.57k|        bits += (i)&mask;                          \
  |  |  416|  7.57k|        d ^= (x ^ d) & mask;                       \
  |  |  417|  7.57k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (417:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  447|  7.57k|        LZCNTLOOP(8);
  ------------------
  |  |  411|  7.57k|    do {                                           \
  |  |  412|  7.57k|        x = d >> (i);                              \
  |  |  413|  7.57k|        mask = (0 - x);                            \
  |  |  414|  7.57k|        mask = (0 - (mask >> (MP_DIGIT_BIT - 1))); \
  |  |  ------------------
  |  |  |  |  137|  7.57k|#define MP_DIGIT_BIT (CHAR_BIT * MP_DIGIT_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  136|  7.57k|#define MP_DIGIT_SIZE sizeof(mp_digit)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  415|  7.57k|        bits += (i)&mask;                          \
  |  |  416|  7.57k|        d ^= (x ^ d) & mask;                       \
  |  |  417|  7.57k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (417:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  448|  7.57k|        LZCNTLOOP(4);
  ------------------
  |  |  411|  7.57k|    do {                                           \
  |  |  412|  7.57k|        x = d >> (i);                              \
  |  |  413|  7.57k|        mask = (0 - x);                            \
  |  |  414|  7.57k|        mask = (0 - (mask >> (MP_DIGIT_BIT - 1))); \
  |  |  ------------------
  |  |  |  |  137|  7.57k|#define MP_DIGIT_BIT (CHAR_BIT * MP_DIGIT_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  136|  7.57k|#define MP_DIGIT_SIZE sizeof(mp_digit)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  415|  7.57k|        bits += (i)&mask;                          \
  |  |  416|  7.57k|        d ^= (x ^ d) & mask;                       \
  |  |  417|  7.57k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (417:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  449|  7.57k|        LZCNTLOOP(2);
  ------------------
  |  |  411|  7.57k|    do {                                           \
  |  |  412|  7.57k|        x = d >> (i);                              \
  |  |  413|  7.57k|        mask = (0 - x);                            \
  |  |  414|  7.57k|        mask = (0 - (mask >> (MP_DIGIT_BIT - 1))); \
  |  |  ------------------
  |  |  |  |  137|  7.57k|#define MP_DIGIT_BIT (CHAR_BIT * MP_DIGIT_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  136|  7.57k|#define MP_DIGIT_SIZE sizeof(mp_digit)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  415|  7.57k|        bits += (i)&mask;                          \
  |  |  416|  7.57k|        d ^= (x ^ d) & mask;                       \
  |  |  417|  7.57k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (417:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  450|  7.57k|        LZCNTLOOP(1);
  ------------------
  |  |  411|  7.57k|    do {                                           \
  |  |  412|  7.57k|        x = d >> (i);                              \
  |  |  413|  7.57k|        mask = (0 - x);                            \
  |  |  414|  7.57k|        mask = (0 - (mask >> (MP_DIGIT_BIT - 1))); \
  |  |  ------------------
  |  |  |  |  137|  7.57k|#define MP_DIGIT_BIT (CHAR_BIT * MP_DIGIT_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  136|  7.57k|#define MP_DIGIT_SIZE sizeof(mp_digit)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  415|  7.57k|        bits += (i)&mask;                          \
  |  |  416|  7.57k|        d ^= (x ^ d) & mask;                       \
  |  |  417|  7.57k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (417:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  451|  7.57k|        break;
  452|  7.57k|    }
  453|  7.57k|    bits += ix * MP_DIGIT_BIT;
  ------------------
  |  |  137|  7.57k|#define MP_DIGIT_BIT (CHAR_BIT * MP_DIGIT_SIZE)
  |  |  ------------------
  |  |  |  |  136|  7.57k|#define MP_DIGIT_SIZE sizeof(mp_digit)
  |  |  ------------------
  ------------------
  454|  7.57k|    return bits;
  455|  7.57k|}

s_mp_redc:
   34|  1.26M|{
   35|  1.26M|    mp_err res;
   36|  1.26M|    mp_size i;
   37|       |
   38|  1.26M|    i = (MP_USED(&mmm->N) << 1) + 1;
  ------------------
  |  |  150|  1.26M|#define MP_USED(MP) ((MP)->used)
  ------------------
   39|  1.26M|    MP_CHECKOK(s_mp_pad(T, i));
  ------------------
  |  |  319|  1.26M|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  1.26M|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 1.26M]
  |  |  ------------------
  |  |  320|  1.26M|    goto CLEANUP
  ------------------
   40|  94.9M|    for (i = 0; i < MP_USED(&mmm->N); ++i) {
  ------------------
  |  |  150|  94.9M|#define MP_USED(MP) ((MP)->used)
  ------------------
  |  Branch (40:17): [True: 93.7M, False: 1.26M]
  ------------------
   41|  93.7M|        mp_digit m_i = MP_DIGIT(T, i) * mmm->n0prime;
  ------------------
  |  |  153|  93.7M|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  ------------------
   42|       |        /* T += N * m_i * (MP_RADIX ** i); */
   43|  93.7M|        s_mp_mul_d_add_offset(&mmm->N, m_i, T, i);
  ------------------
  |  |  213|  93.7M|    s_mpv_mul_d_add_prop(MP_DIGITS(a), MP_USED(a), b, MP_DIGITS(c) + off)
  |  |  ------------------
  |  |  |  |  152|  93.7M|#define MP_DIGITS(MP) ((MP)->dp)
  |  |  ------------------
  |  |                   s_mpv_mul_d_add_prop(MP_DIGITS(a), MP_USED(a), b, MP_DIGITS(c) + off)
  |  |  ------------------
  |  |  |  |  150|  93.7M|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  |  |                   s_mpv_mul_d_add_prop(MP_DIGITS(a), MP_USED(a), b, MP_DIGITS(c) + off)
  |  |  ------------------
  |  |  |  |  152|  93.7M|#define MP_DIGITS(MP) ((MP)->dp)
  |  |  ------------------
  ------------------
   44|  93.7M|    }
   45|  1.26M|    s_mp_clamp(T);
   46|       |
   47|       |    /* T /= R */
   48|  1.26M|    s_mp_rshd(T, MP_USED(&mmm->N));
  ------------------
  |  |  150|  1.26M|#define MP_USED(MP) ((MP)->used)
  ------------------
   49|       |
   50|  1.26M|    if (s_mp_cmp(T, &mmm->N) >= 0) {
  ------------------
  |  Branch (50:9): [True: 379k, False: 882k]
  ------------------
   51|       |        /* T = T - N */
   52|   379k|        MP_CHECKOK(s_mp_sub(T, &mmm->N));
  ------------------
  |  |  319|   379k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|   379k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 379k]
  |  |  ------------------
  |  |  320|   379k|    goto CLEANUP
  ------------------
   53|   379k|#ifdef DEBUG
   54|   379k|        if (mp_cmp(T, &mmm->N) >= 0) {
  ------------------
  |  Branch (54:13): [True: 0, False: 379k]
  ------------------
   55|      0|            res = MP_UNDEF;
  ------------------
  |  |   45|      0|#define MP_UNDEF -5  /* answer is undefined   */
  ------------------
   56|      0|            goto CLEANUP;
   57|      0|        }
   58|   379k|#endif
   59|   379k|    }
   60|  1.26M|    res = MP_OKAY;
  ------------------
  |  |   39|  1.26M|#define MP_OKAY 0    /* no error, all is well */
  ------------------
   61|  1.26M|CLEANUP:
   62|  1.26M|    return res;
   63|  1.26M|}
s_mp_mul_mont:
   75|   323k|{
   76|   323k|    mp_digit *pb;
   77|   323k|    mp_digit m_i;
   78|   323k|    mp_err res;
   79|   323k|    mp_size ib; /* "index b": index of current digit of B */
   80|   323k|    mp_size useda, usedb;
   81|       |
   82|   323k|    ARGCHK(a != NULL && b != NULL && c != NULL, MP_BADARG);
  ------------------
  |  |  355|   323k|#define ARGCHK(X, Y) assert(X)
  ------------------
   83|       |
   84|   323k|    if (MP_USED(a) < MP_USED(b)) {
  ------------------
  |  |  150|   323k|#define MP_USED(MP) ((MP)->used)
  ------------------
                  if (MP_USED(a) < MP_USED(b)) {
  ------------------
  |  |  150|   323k|#define MP_USED(MP) ((MP)->used)
  ------------------
  |  Branch (84:9): [True: 1.01k, False: 321k]
  ------------------
   85|  1.01k|        const mp_int *xch = b; /* switch a and b, to do fewer outer loops */
   86|  1.01k|        b = a;
   87|  1.01k|        a = xch;
   88|  1.01k|    }
   89|       |
   90|   323k|    MP_USED(c) = 1;
  ------------------
  |  |  150|   323k|#define MP_USED(MP) ((MP)->used)
  ------------------
   91|   323k|    MP_DIGIT(c, 0) = 0;
  ------------------
  |  |  153|   323k|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  ------------------
   92|   323k|    ib = (MP_USED(&mmm->N) << 1) + 1;
  ------------------
  |  |  150|   323k|#define MP_USED(MP) ((MP)->used)
  ------------------
   93|   323k|    if ((res = s_mp_pad(c, ib)) != MP_OKAY)
  ------------------
  |  |   39|   323k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  |  Branch (93:9): [True: 0, False: 323k]
  ------------------
   94|      0|        goto CLEANUP;
   95|       |
   96|   323k|    useda = MP_USED(a);
  ------------------
  |  |  150|   323k|#define MP_USED(MP) ((MP)->used)
  ------------------
   97|   323k|    pb = MP_DIGITS(b);
  ------------------
  |  |  152|   323k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
   98|   323k|    s_mpv_mul_d(MP_DIGITS(a), useda, *pb++, MP_DIGITS(c));
  ------------------
  |  |  181|   323k|    ((mp_digit *)c)[a_len] = s_mpv_mul_set_vec64(c, a, a_len, b)
  ------------------
   99|   323k|    s_mp_setz(MP_DIGITS(c) + useda + 1, ib - (useda + 1));
  ------------------
  |  |  152|   323k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
  100|   323k|    m_i = MP_DIGIT(c, 0) * mmm->n0prime;
  ------------------
  |  |  153|   323k|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  ------------------
  101|   323k|    s_mp_mul_d_add_offset(&mmm->N, m_i, c, 0);
  ------------------
  |  |  213|   323k|    s_mpv_mul_d_add_prop(MP_DIGITS(a), MP_USED(a), b, MP_DIGITS(c) + off)
  |  |  ------------------
  |  |  |  |  152|   323k|#define MP_DIGITS(MP) ((MP)->dp)
  |  |  ------------------
  |  |                   s_mpv_mul_d_add_prop(MP_DIGITS(a), MP_USED(a), b, MP_DIGITS(c) + off)
  |  |  ------------------
  |  |  |  |  150|   323k|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  |  |                   s_mpv_mul_d_add_prop(MP_DIGITS(a), MP_USED(a), b, MP_DIGITS(c) + off)
  |  |  ------------------
  |  |  |  |  152|   323k|#define MP_DIGITS(MP) ((MP)->dp)
  |  |  ------------------
  ------------------
  102|       |
  103|       |    /* Outer loop:  Digits of b */
  104|   323k|    usedb = MP_USED(b);
  ------------------
  |  |  150|   323k|#define MP_USED(MP) ((MP)->used)
  ------------------
  105|  22.5M|    for (ib = 1; ib < usedb; ib++) {
  ------------------
  |  Branch (105:18): [True: 22.1M, False: 323k]
  ------------------
  106|  22.1M|        mp_digit b_i = *pb++;
  107|       |
  108|       |        /* Inner product:  Digits of a */
  109|  22.1M|        if (b_i)
  ------------------
  |  Branch (109:13): [True: 22.1M, False: 43.9k]
  ------------------
  110|  22.1M|            s_mpv_mul_d_add_prop(MP_DIGITS(a), useda, b_i, MP_DIGITS(c) + ib);
  ------------------
  |  |  152|  22.1M|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
                          s_mpv_mul_d_add_prop(MP_DIGITS(a), useda, b_i, MP_DIGITS(c) + ib);
  ------------------
  |  |  152|  22.1M|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
  111|  22.1M|        m_i = MP_DIGIT(c, ib) * mmm->n0prime;
  ------------------
  |  |  153|  22.1M|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  ------------------
  112|  22.1M|        s_mp_mul_d_add_offset(&mmm->N, m_i, c, ib);
  ------------------
  |  |  213|  22.1M|    s_mpv_mul_d_add_prop(MP_DIGITS(a), MP_USED(a), b, MP_DIGITS(c) + off)
  |  |  ------------------
  |  |  |  |  152|  22.1M|#define MP_DIGITS(MP) ((MP)->dp)
  |  |  ------------------
  |  |                   s_mpv_mul_d_add_prop(MP_DIGITS(a), MP_USED(a), b, MP_DIGITS(c) + off)
  |  |  ------------------
  |  |  |  |  150|  22.1M|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  |  |                   s_mpv_mul_d_add_prop(MP_DIGITS(a), MP_USED(a), b, MP_DIGITS(c) + off)
  |  |  ------------------
  |  |  |  |  152|  22.1M|#define MP_DIGITS(MP) ((MP)->dp)
  |  |  ------------------
  ------------------
  113|  22.1M|    }
  114|   323k|    if (usedb < MP_USED(&mmm->N)) {
  ------------------
  |  |  150|   323k|#define MP_USED(MP) ((MP)->used)
  ------------------
  |  Branch (114:9): [True: 43.1k, False: 279k]
  ------------------
  115|   113k|        for (usedb = MP_USED(&mmm->N); ib < usedb; ++ib) {
  ------------------
  |  |  150|  43.1k|#define MP_USED(MP) ((MP)->used)
  ------------------
  |  Branch (115:40): [True: 70.2k, False: 43.1k]
  ------------------
  116|  70.2k|            m_i = MP_DIGIT(c, ib) * mmm->n0prime;
  ------------------
  |  |  153|  70.2k|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  ------------------
  117|  70.2k|            s_mp_mul_d_add_offset(&mmm->N, m_i, c, ib);
  ------------------
  |  |  213|  70.2k|    s_mpv_mul_d_add_prop(MP_DIGITS(a), MP_USED(a), b, MP_DIGITS(c) + off)
  |  |  ------------------
  |  |  |  |  152|  70.2k|#define MP_DIGITS(MP) ((MP)->dp)
  |  |  ------------------
  |  |                   s_mpv_mul_d_add_prop(MP_DIGITS(a), MP_USED(a), b, MP_DIGITS(c) + off)
  |  |  ------------------
  |  |  |  |  150|  70.2k|#define MP_USED(MP) ((MP)->used)
  |  |  ------------------
  |  |                   s_mpv_mul_d_add_prop(MP_DIGITS(a), MP_USED(a), b, MP_DIGITS(c) + off)
  |  |  ------------------
  |  |  |  |  152|  70.2k|#define MP_DIGITS(MP) ((MP)->dp)
  |  |  ------------------
  ------------------
  118|  70.2k|        }
  119|  43.1k|    }
  120|   323k|    s_mp_clamp(c);
  121|   323k|    s_mp_rshd(c, MP_USED(&mmm->N)); /* c /= R */
  ------------------
  |  |  150|   323k|#define MP_USED(MP) ((MP)->used)
  ------------------
  122|   323k|    if (s_mp_cmp(c, &mmm->N) >= 0) {
  ------------------
  |  Branch (122:9): [True: 29.5k, False: 293k]
  ------------------
  123|  29.5k|        MP_CHECKOK(s_mp_sub(c, &mmm->N));
  ------------------
  |  |  319|  29.5k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  29.5k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 29.5k]
  |  |  ------------------
  |  |  320|  29.5k|    goto CLEANUP
  ------------------
  124|  29.5k|    }
  125|   323k|    res = MP_OKAY;
  ------------------
  |  |   39|   323k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  126|       |
  127|   323k|CLEANUP:
  128|   323k|    return res;
  129|   323k|}
mp_to_mont:
  134|  10.3k|{
  135|  10.3k|    mp_err res;
  136|       |
  137|       |    /* xMont = x * R mod N   where  N is modulus */
  138|  10.3k|    if (x != xMont) {
  ------------------
  |  Branch (138:9): [True: 5.31k, False: 5.07k]
  ------------------
  139|  5.31k|        MP_CHECKOK(mp_copy(x, xMont));
  ------------------
  |  |  319|  5.31k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  5.31k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 5.31k]
  |  |  ------------------
  |  |  320|  5.31k|    goto CLEANUP
  ------------------
  140|  5.31k|    }
  141|  10.3k|    MP_CHECKOK(s_mp_lshd(xMont, MP_USED(N))); /* xMont = x << b */
  ------------------
  |  |  319|  10.3k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  10.3k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 10.3k]
  |  |  ------------------
  |  |  320|  10.3k|    goto CLEANUP
  ------------------
  142|  10.3k|    MP_CHECKOK(mp_div(xMont, N, 0, xMont));   /*         mod N */
  ------------------
  |  |  319|  10.3k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  10.3k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 10.3k]
  |  |  ------------------
  |  |  320|  10.3k|    goto CLEANUP
  ------------------
  143|  10.3k|CLEANUP:
  144|  10.3k|    return res;
  145|  10.3k|}
mp_calculate_mont_n0i:
  149|  5.31k|{
  150|  5.31k|    return 0 - s_mp_invmod_radix(MP_DIGIT(N, 0));
  ------------------
  |  |  153|  5.31k|#define MP_DIGIT(MP, N) (MP)->dp[(N)]
  ------------------
  151|  5.31k|}
mpi_to_weave:
  738|  25.7k|{
  739|  25.7k|    mp_size i;
  740|  25.7k|    mp_digit *endDest = weaved + (nDigits * nBignums);
  741|       |
  742|   128k|    for (i = 0; i < WEAVE_WORD_SIZE; i++) {
  ------------------
  |  |  694|   128k|#define WEAVE_WORD_SIZE 4
  ------------------
  |  Branch (742:17): [True: 103k, False: 25.7k]
  ------------------
  743|   103k|        mp_size used = MP_USED(&bignums[i]);
  ------------------
  |  |  150|   103k|#define MP_USED(MP) ((MP)->used)
  ------------------
  744|   103k|        mp_digit *pSrc = MP_DIGITS(&bignums[i]);
  ------------------
  |  |  152|   103k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
  745|   103k|        mp_digit *endSrc = pSrc + used;
  746|   103k|        mp_digit *pDest = weaved + i;
  747|       |
  748|   103k|        ARGCHK(MP_SIGN(&bignums[i]) == MP_ZPOS, MP_BADARG);
  ------------------
  |  |  355|   103k|#define ARGCHK(X, Y) assert(X)
  ------------------
  749|   103k|        ARGCHK(used <= nDigits, MP_BADARG);
  ------------------
  |  |  355|   103k|#define ARGCHK(X, Y) assert(X)
  ------------------
  750|       |
  751|  7.51M|        for (; pSrc < endSrc; pSrc++) {
  ------------------
  |  Branch (751:16): [True: 7.41M, False: 103k]
  ------------------
  752|  7.41M|            *pDest = *pSrc;
  753|  7.41M|            pDest += nBignums;
  754|  7.41M|        }
  755|   126k|        while (pDest < endDest) {
  ------------------
  |  Branch (755:16): [True: 22.8k, False: 103k]
  ------------------
  756|  22.8k|            *pDest = 0;
  757|  22.8k|            pDest += nBignums;
  758|  22.8k|        }
  759|   103k|    }
  760|       |
  761|  25.7k|    return MP_OKAY;
  ------------------
  |  |   39|  25.7k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  762|  25.7k|}
weave_to_mpi:
  782|   301k|{
  783|       |    /* these are indices, but need to be the same size as mp_digit
  784|       |     * because of the CONST_TIME operations */
  785|   301k|    mp_digit i, j;
  786|   301k|    mp_digit d;
  787|   301k|    mp_digit *pDest = MP_DIGITS(a);
  ------------------
  |  |  152|   301k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
  788|       |
  789|   301k|    MP_SIGN(a) = MP_ZPOS;
  ------------------
  |  |  149|   301k|#define MP_SIGN(MP) ((MP)->sign)
  ------------------
                  MP_SIGN(a) = MP_ZPOS;
  ------------------
  |  |   37|   301k|#define MP_ZPOS 0
  ------------------
  790|   301k|    MP_USED(a) = nDigits;
  ------------------
  |  |  150|   301k|#define MP_USED(MP) ((MP)->used)
  ------------------
  791|       |
  792|   301k|    assert(weaved != NULL);
  793|       |
  794|       |    /* Fetch the proper column in constant time, indexing over the whole array */
  795|  21.7M|    for (i = 0; i < nDigits; ++i) {
  ------------------
  |  Branch (795:17): [True: 21.4M, False: 301k]
  ------------------
  796|  21.4M|        d = 0;
  797|   608M|        for (j = 0; j < nBignums; ++j) {
  ------------------
  |  Branch (797:21): [True: 587M, False: 21.4M]
  ------------------
  798|   587M|            d |= weaved[i * nBignums + j] & CONST_TIME_EQ(j, index);
  ------------------
  |  |  769|   587M|#define CONST_TIME_EQ(a, b) CONST_TIME_EQ_Z((a) ^ (b))
  |  |  ------------------
  |  |  |  |  768|   587M|#define CONST_TIME_EQ_Z(x) CONST_TIME_MSB(~(x) & ((x)-1))
  |  |  |  |  ------------------
  |  |  |  |  |  |  767|   587M|#define CONST_TIME_MSB(x) (0L - ((x) >> (8 * sizeof(x) - 1)))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  799|   587M|        }
  800|  21.4M|        pDest[i] = d;
  801|  21.4M|    }
  802|       |
  803|   301k|    s_mp_clamp(a);
  804|   301k|    return MP_OKAY;
  ------------------
  |  |   39|   301k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  805|   301k|}
mp_exptmod_safe_i:
  841|  5.31k|{
  842|  5.31k|    mp_int *pa1, *pa2, *ptmp;
  843|  5.31k|    mp_size i;
  844|  5.31k|    mp_size first_window;
  845|  5.31k|    mp_err res;
  846|  5.31k|    int expOff;
  847|  5.31k|    mp_int accum1, accum2, accum[WEAVE_WORD_SIZE];
  848|  5.31k|    mp_int tmp;
  849|  5.31k|    mp_digit *powersArray = NULL;
  850|  5.31k|    mp_digit *powers = NULL;
  851|       |
  852|  5.31k|    MP_DIGITS(&accum1) = 0;
  ------------------
  |  |  152|  5.31k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
  853|  5.31k|    MP_DIGITS(&accum2) = 0;
  ------------------
  |  |  152|  5.31k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
  854|  5.31k|    MP_DIGITS(&accum[0]) = 0;
  ------------------
  |  |  152|  5.31k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
  855|  5.31k|    MP_DIGITS(&accum[1]) = 0;
  ------------------
  |  |  152|  5.31k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
  856|  5.31k|    MP_DIGITS(&accum[2]) = 0;
  ------------------
  |  |  152|  5.31k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
  857|  5.31k|    MP_DIGITS(&accum[3]) = 0;
  ------------------
  |  |  152|  5.31k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
  858|  5.31k|    MP_DIGITS(&tmp) = 0;
  ------------------
  |  |  152|  5.31k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
  859|       |
  860|       |    /* grab the first window value. This allows us to preload accumulator1
  861|       |     * and save a conversion, some squares and a multiple*/
  862|  5.31k|    MP_CHECKOK(mpl_get_bits(exponent,
  ------------------
  |  |  319|  5.31k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  5.31k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 5.31k]
  |  |  ------------------
  |  |  320|  5.31k|    goto CLEANUP
  ------------------
  863|  5.31k|                            bits_in_exponent - window_bits, window_bits));
  864|  5.31k|    first_window = (mp_size)res;
  865|       |
  866|  5.31k|    MP_CHECKOK(mp_init_size(&accum1, 3 * nLen + 2));
  ------------------
  |  |  319|  5.31k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  5.31k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 5.31k]
  |  |  ------------------
  |  |  320|  5.31k|    goto CLEANUP
  ------------------
  867|  5.31k|    MP_CHECKOK(mp_init_size(&accum2, 3 * nLen + 2));
  ------------------
  |  |  319|  5.31k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  5.31k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 5.31k]
  |  |  ------------------
  |  |  320|  5.31k|    goto CLEANUP
  ------------------
  868|       |
  869|       |    /* build the first WEAVE_WORD powers inline */
  870|       |    /* if WEAVE_WORD_SIZE is not 4, this code will have to change */
  871|  5.31k|    if (num_powers > 2) {
  ------------------
  |  Branch (871:9): [True: 5.07k, False: 239]
  ------------------
  872|  5.07k|        MP_CHECKOK(mp_init_size(&accum[0], 3 * nLen + 2));
  ------------------
  |  |  319|  5.07k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  5.07k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 5.07k]
  |  |  ------------------
  |  |  320|  5.07k|    goto CLEANUP
  ------------------
  873|  5.07k|        MP_CHECKOK(mp_init_size(&accum[1], 3 * nLen + 2));
  ------------------
  |  |  319|  5.07k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  5.07k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 5.07k]
  |  |  ------------------
  |  |  320|  5.07k|    goto CLEANUP
  ------------------
  874|  5.07k|        MP_CHECKOK(mp_init_size(&accum[2], 3 * nLen + 2));
  ------------------
  |  |  319|  5.07k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  5.07k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 5.07k]
  |  |  ------------------
  |  |  320|  5.07k|    goto CLEANUP
  ------------------
  875|  5.07k|        MP_CHECKOK(mp_init_size(&accum[3], 3 * nLen + 2));
  ------------------
  |  |  319|  5.07k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  5.07k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 5.07k]
  |  |  ------------------
  |  |  320|  5.07k|    goto CLEANUP
  ------------------
  876|  5.07k|        mp_set(&accum[0], 1);
  877|  5.07k|        MP_CHECKOK(mp_to_mont(&accum[0], &(mmm->N), &accum[0]));
  ------------------
  |  |  319|  5.07k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  5.07k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 5.07k]
  |  |  ------------------
  |  |  320|  5.07k|    goto CLEANUP
  ------------------
  878|  5.07k|        MP_CHECKOK(mp_copy(montBase, &accum[1]));
  ------------------
  |  |  319|  5.07k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  5.07k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 5.07k]
  |  |  ------------------
  |  |  320|  5.07k|    goto CLEANUP
  ------------------
  879|  10.1k|        SQR(montBase, &accum[2]);
  ------------------
  |  |  808|  5.07k|    MP_CHECKOK(mp_sqr(a, b)); \
  |  |  ------------------
  |  |  |  |  319|  5.07k|    if (MP_OKAY > (res = (x))) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|  5.07k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:9): [True: 0, False: 5.07k]
  |  |  |  |  ------------------
  |  |  |  |  320|  5.07k|    goto CLEANUP
  |  |  ------------------
  |  |  809|  5.07k|    MP_CHECKOK(s_mp_redc(b, mmm))
  |  |  ------------------
  |  |  |  |  319|  5.07k|    if (MP_OKAY > (res = (x))) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|  5.07k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:9): [True: 0, False: 5.07k]
  |  |  |  |  ------------------
  |  |  |  |  320|  5.07k|    goto CLEANUP
  |  |  ------------------
  ------------------
  880|  5.07k|        MUL_NOWEAVE(montBase, &accum[2], &accum[3]);
  ------------------
  |  |  817|  5.07k|    MP_CHECKOK(s_mp_mul_mont(a, x, b, mmm))
  |  |  ------------------
  |  |  |  |  319|  5.07k|    if (MP_OKAY > (res = (x))) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|  5.07k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:9): [True: 0, False: 5.07k]
  |  |  |  |  ------------------
  |  |  |  |  320|  5.07k|    goto CLEANUP
  |  |  ------------------
  ------------------
  881|  5.07k|        powersArray = (mp_digit *)malloc(num_powers * (nLen * sizeof(mp_digit) + 1));
  882|  5.07k|        if (!powersArray) {
  ------------------
  |  Branch (882:13): [True: 0, False: 5.07k]
  ------------------
  883|      0|            res = MP_MEM;
  ------------------
  |  |   42|      0|#define MP_MEM -2    /* out of memory         */
  ------------------
  884|      0|            goto CLEANUP;
  885|      0|        }
  886|       |        /* powers[i] = base ** (i); */
  887|  5.07k|        powers = (mp_digit *)MP_ALIGN(powersArray, num_powers);
  ------------------
  |  |  828|  5.07k|#define MP_ALIGN(x, y) ((((ptrdiff_t)(x)) + ((y)-1)) & (((ptrdiff_t)0) - (y)))
  ------------------
  888|  5.07k|        MP_CHECKOK(mpi_to_weave(accum, powers, nLen, num_powers));
  ------------------
  |  |  319|  5.07k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  5.07k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 5.07k]
  |  |  ------------------
  |  |  320|  5.07k|    goto CLEANUP
  ------------------
  889|  5.07k|        if (first_window < 4) {
  ------------------
  |  Branch (889:13): [True: 1.13k, False: 3.93k]
  ------------------
  890|  1.13k|            MP_CHECKOK(mp_copy(&accum[first_window], &accum1));
  ------------------
  |  |  319|  1.13k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  1.13k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 1.13k]
  |  |  ------------------
  |  |  320|  1.13k|    goto CLEANUP
  ------------------
  891|  1.13k|            first_window = num_powers;
  892|  1.13k|        }
  893|  5.07k|    } else {
  894|    239|        if (first_window == 0) {
  ------------------
  |  Branch (894:13): [True: 0, False: 239]
  ------------------
  895|      0|            mp_set(&accum1, 1);
  896|      0|            MP_CHECKOK(mp_to_mont(&accum1, &(mmm->N), &accum1));
  ------------------
  |  |  319|      0|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|      0|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  320|      0|    goto CLEANUP
  ------------------
  897|    239|        } else {
  898|       |            /* assert first_window == 1? */
  899|    239|            MP_CHECKOK(mp_copy(montBase, &accum1));
  ------------------
  |  |  319|    239|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|    239|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 239]
  |  |  ------------------
  |  |  320|    239|    goto CLEANUP
  ------------------
  900|    239|        }
  901|    239|    }
  902|       |
  903|       |    /*
  904|       |     * calculate all the powers in the powers array.
  905|       |     * this adds 2**(k-1)-2 square operations over just calculating the
  906|       |     * odd powers where k is the window size in the two other mp_modexpt
  907|       |     * implementations in this file. We will get some of that
  908|       |     * back by not needing the first 'k' squares and one multiply for the
  909|       |     * first window.
  910|       |     * Given the value of 4 for WEAVE_WORD_SIZE, this loop will only execute if
  911|       |     * num_powers > 2, in which case powers will have been allocated.
  912|       |     */
  913|  88.1k|    for (i = WEAVE_WORD_SIZE; i < num_powers; i++) {
  ------------------
  |  |  694|  5.31k|#define WEAVE_WORD_SIZE 4
  ------------------
  |  Branch (913:31): [True: 82.8k, False: 5.31k]
  ------------------
  914|  82.8k|        int acc_index = i & (WEAVE_WORD_SIZE - 1); /* i % WEAVE_WORD_SIZE */
  ------------------
  |  |  694|  82.8k|#define WEAVE_WORD_SIZE 4
  ------------------
  915|  82.8k|        if (i & 1) {
  ------------------
  |  Branch (915:13): [True: 41.4k, False: 41.4k]
  ------------------
  916|  41.4k|            MUL_NOWEAVE(montBase, &accum[acc_index - 1], &accum[acc_index]);
  ------------------
  |  |  817|  41.4k|    MP_CHECKOK(s_mp_mul_mont(a, x, b, mmm))
  |  |  ------------------
  |  |  |  |  319|  41.4k|    if (MP_OKAY > (res = (x))) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|  41.4k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:9): [True: 0, False: 41.4k]
  |  |  |  |  ------------------
  |  |  |  |  320|  41.4k|    goto CLEANUP
  |  |  ------------------
  ------------------
  917|       |            /* we've filled the array do our 'per array' processing */
  918|  41.4k|            if (acc_index == (WEAVE_WORD_SIZE - 1)) {
  ------------------
  |  |  694|  41.4k|#define WEAVE_WORD_SIZE 4
  ------------------
  |  Branch (918:17): [True: 20.7k, False: 20.7k]
  ------------------
  919|  20.7k|                MP_CHECKOK(mpi_to_weave(accum, powers + i - (WEAVE_WORD_SIZE - 1),
  ------------------
  |  |  319|  20.7k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  20.7k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 20.7k]
  |  |  ------------------
  |  |  320|  20.7k|    goto CLEANUP
  ------------------
  920|  20.7k|                                        nLen, num_powers));
  921|       |
  922|  20.7k|                if (first_window <= i) {
  ------------------
  |  Branch (922:21): [True: 3.93k, False: 16.7k]
  ------------------
  923|  3.93k|                    MP_CHECKOK(mp_copy(&accum[first_window & (WEAVE_WORD_SIZE - 1)],
  ------------------
  |  |  319|  3.93k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  3.93k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 3.93k]
  |  |  ------------------
  |  |  320|  3.93k|    goto CLEANUP
  ------------------
  924|  3.93k|                                       &accum1));
  925|  3.93k|                    first_window = num_powers;
  926|  3.93k|                }
  927|  20.7k|            }
  928|  41.4k|        } else {
  929|       |            /* up to 8 we can find 2^i-1 in the accum array, but at 8 we our source
  930|       |             * and target are the same so we need to copy.. After that, the
  931|       |             * value is overwritten, so we need to fetch it from the stored
  932|       |             * weave array */
  933|  41.4k|            if (i > 2 * WEAVE_WORD_SIZE) {
  ------------------
  |  |  694|  41.4k|#define WEAVE_WORD_SIZE 4
  ------------------
  |  Branch (933:17): [True: 26.2k, False: 15.2k]
  ------------------
  934|  26.2k|                MP_CHECKOK(weave_to_mpi(&accum2, powers, i / 2, nLen, num_powers));
  ------------------
  |  |  319|  26.2k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  26.2k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 26.2k]
  |  |  ------------------
  |  |  320|  26.2k|    goto CLEANUP
  ------------------
  935|  52.4k|                SQR(&accum2, &accum[acc_index]);
  ------------------
  |  |  808|  26.2k|    MP_CHECKOK(mp_sqr(a, b)); \
  |  |  ------------------
  |  |  |  |  319|  26.2k|    if (MP_OKAY > (res = (x))) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|  26.2k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:9): [True: 0, False: 26.2k]
  |  |  |  |  ------------------
  |  |  |  |  320|  26.2k|    goto CLEANUP
  |  |  ------------------
  |  |  809|  26.2k|    MP_CHECKOK(s_mp_redc(b, mmm))
  |  |  ------------------
  |  |  |  |  319|  26.2k|    if (MP_OKAY > (res = (x))) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|  26.2k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:9): [True: 0, False: 26.2k]
  |  |  |  |  ------------------
  |  |  |  |  320|  26.2k|    goto CLEANUP
  |  |  ------------------
  ------------------
  936|  52.4k|            } else {
  937|  15.2k|                int half_power_index = (i / 2) & (WEAVE_WORD_SIZE - 1);
  ------------------
  |  |  694|  15.2k|#define WEAVE_WORD_SIZE 4
  ------------------
  938|  15.2k|                if (half_power_index == acc_index) {
  ------------------
  |  Branch (938:21): [True: 5.07k, False: 10.1k]
  ------------------
  939|       |                    /* copy is cheaper than weave_to_mpi */
  940|  5.07k|                    MP_CHECKOK(mp_copy(&accum[half_power_index], &accum2));
  ------------------
  |  |  319|  5.07k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  5.07k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 5.07k]
  |  |  ------------------
  |  |  320|  5.07k|    goto CLEANUP
  ------------------
  941|  10.1k|                    SQR(&accum2, &accum[acc_index]);
  ------------------
  |  |  808|  5.07k|    MP_CHECKOK(mp_sqr(a, b)); \
  |  |  ------------------
  |  |  |  |  319|  5.07k|    if (MP_OKAY > (res = (x))) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|  5.07k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:9): [True: 0, False: 5.07k]
  |  |  |  |  ------------------
  |  |  |  |  320|  5.07k|    goto CLEANUP
  |  |  ------------------
  |  |  809|  5.07k|    MP_CHECKOK(s_mp_redc(b, mmm))
  |  |  ------------------
  |  |  |  |  319|  5.07k|    if (MP_OKAY > (res = (x))) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|  5.07k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:9): [True: 0, False: 5.07k]
  |  |  |  |  ------------------
  |  |  |  |  320|  5.07k|    goto CLEANUP
  |  |  ------------------
  ------------------
  942|  10.1k|                } else {
  943|  10.1k|                    SQR(&accum[half_power_index], &accum[acc_index]);
  ------------------
  |  |  808|  10.1k|    MP_CHECKOK(mp_sqr(a, b)); \
  |  |  ------------------
  |  |  |  |  319|  10.1k|    if (MP_OKAY > (res = (x))) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|  10.1k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:9): [True: 0, False: 10.1k]
  |  |  |  |  ------------------
  |  |  |  |  320|  10.1k|    goto CLEANUP
  |  |  ------------------
  |  |  809|  10.1k|    MP_CHECKOK(s_mp_redc(b, mmm))
  |  |  ------------------
  |  |  |  |  319|  10.1k|    if (MP_OKAY > (res = (x))) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|  10.1k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:9): [True: 0, False: 10.1k]
  |  |  |  |  ------------------
  |  |  |  |  320|  10.1k|    goto CLEANUP
  |  |  ------------------
  ------------------
  944|  10.1k|                }
  945|  15.2k|            }
  946|  41.4k|        }
  947|  82.8k|    }
  948|       |/* if the accum1 isn't set, Then there is something wrong with our logic
  949|       | * above and is an internal programming error.
  950|       | */
  951|  5.31k|#if MP_ARGCHK == 2
  952|  5.31k|    assert(MP_USED(&accum1) != 0);
  953|  5.31k|#endif
  954|       |
  955|       |    /* set accumulator to montgomery residue of 1 */
  956|  5.31k|    pa1 = &accum1;
  957|  5.31k|    pa2 = &accum2;
  958|       |
  959|       |    /* tmp is not used if window_bits == 1. */
  960|  5.31k|    if (window_bits != 1) {
  ------------------
  |  Branch (960:9): [True: 5.07k, False: 239]
  ------------------
  961|  5.07k|        MP_CHECKOK(mp_init_size(&tmp, 3 * nLen + 2));
  ------------------
  |  |  319|  5.07k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  5.07k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 5.07k]
  |  |  ------------------
  |  |  320|  5.07k|    goto CLEANUP
  ------------------
  962|  5.07k|    }
  963|       |
  964|   284k|    for (expOff = bits_in_exponent - window_bits * 2; expOff >= 0; expOff -= window_bits) {
  ------------------
  |  Branch (964:55): [True: 279k, False: 5.31k]
  ------------------
  965|   279k|        mp_size smallExp;
  966|   279k|        MP_CHECKOK(mpl_get_bits(exponent, expOff, window_bits));
  ------------------
  |  |  319|   279k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|   279k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 279k]
  |  |  ------------------
  |  |  320|   279k|    goto CLEANUP
  ------------------
  967|   279k|        smallExp = (mp_size)res;
  968|       |
  969|       |        /* handle unroll the loops */
  970|   279k|        switch (window_bits) {
  971|  3.85k|            case 1:
  ------------------
  |  Branch (971:13): [True: 3.85k, False: 275k]
  ------------------
  972|  3.85k|                if (!smallExp) {
  ------------------
  |  Branch (972:21): [True: 2.89k, False: 958]
  ------------------
  973|  2.89k|                    SQR(pa1, pa2);
  ------------------
  |  |  808|  2.89k|    MP_CHECKOK(mp_sqr(a, b)); \
  |  |  ------------------
  |  |  |  |  319|  2.89k|    if (MP_OKAY > (res = (x))) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|  2.89k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:9): [True: 0, False: 2.89k]
  |  |  |  |  ------------------
  |  |  |  |  320|  2.89k|    goto CLEANUP
  |  |  ------------------
  |  |  809|  2.89k|    MP_CHECKOK(s_mp_redc(b, mmm))
  |  |  ------------------
  |  |  |  |  319|  2.89k|    if (MP_OKAY > (res = (x))) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|  2.89k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:9): [True: 0, False: 2.89k]
  |  |  |  |  ------------------
  |  |  |  |  320|  2.89k|    goto CLEANUP
  |  |  ------------------
  ------------------
  974|  2.89k|                    SWAPPA;
  ------------------
  |  |  825|  2.89k|    ptmp = pa1; \
  |  |  826|  2.89k|    pa1 = pa2;  \
  |  |  827|  2.89k|    pa2 = ptmp
  ------------------
  975|  2.89k|                } else if (smallExp & 1) {
  ------------------
  |  Branch (975:28): [True: 958, False: 0]
  ------------------
  976|    958|                    SQR(pa1, pa2);
  ------------------
  |  |  808|    958|    MP_CHECKOK(mp_sqr(a, b)); \
  |  |  ------------------
  |  |  |  |  319|    958|    if (MP_OKAY > (res = (x))) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|    958|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:9): [True: 0, False: 958]
  |  |  |  |  ------------------
  |  |  |  |  320|    958|    goto CLEANUP
  |  |  ------------------
  |  |  809|    958|    MP_CHECKOK(s_mp_redc(b, mmm))
  |  |  ------------------
  |  |  |  |  319|    958|    if (MP_OKAY > (res = (x))) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|    958|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:9): [True: 0, False: 958]
  |  |  |  |  ------------------
  |  |  |  |  320|    958|    goto CLEANUP
  |  |  ------------------
  ------------------
  977|    958|                    MUL_NOWEAVE(montBase, pa2, pa1);
  ------------------
  |  |  817|    958|    MP_CHECKOK(s_mp_mul_mont(a, x, b, mmm))
  |  |  ------------------
  |  |  |  |  319|    958|    if (MP_OKAY > (res = (x))) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|    958|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:9): [True: 0, False: 958]
  |  |  |  |  ------------------
  |  |  |  |  320|    958|    goto CLEANUP
  |  |  ------------------
  ------------------
  978|    958|                } else {
  979|      0|                    abort();
  980|      0|                }
  981|  3.85k|                break;
  982|  3.85k|            case 6:
  ------------------
  |  Branch (982:13): [True: 0, False: 279k]
  ------------------
  983|      0|                SQR(pa1, pa2);
  ------------------
  |  |  808|      0|    MP_CHECKOK(mp_sqr(a, b)); \
  |  |  ------------------
  |  |  |  |  319|      0|    if (MP_OKAY > (res = (x))) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|      0|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|    goto CLEANUP
  |  |  ------------------
  |  |  809|      0|    MP_CHECKOK(s_mp_redc(b, mmm))
  |  |  ------------------
  |  |  |  |  319|      0|    if (MP_OKAY > (res = (x))) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|      0|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|    goto CLEANUP
  |  |  ------------------
  ------------------
  984|      0|                SQR(pa2, pa1);
  ------------------
  |  |  808|      0|    MP_CHECKOK(mp_sqr(a, b)); \
  |  |  ------------------
  |  |  |  |  319|      0|    if (MP_OKAY > (res = (x))) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|      0|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|    goto CLEANUP
  |  |  ------------------
  |  |  809|      0|    MP_CHECKOK(s_mp_redc(b, mmm))
  |  |  ------------------
  |  |  |  |  319|      0|    if (MP_OKAY > (res = (x))) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|      0|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|    goto CLEANUP
  |  |  ------------------
  ------------------
  985|       |            /* fall through */
  986|   171k|            case 4:
  ------------------
  |  Branch (986:13): [True: 171k, False: 108k]
  ------------------
  987|   171k|                SQR(pa1, pa2);
  ------------------
  |  |  808|   171k|    MP_CHECKOK(mp_sqr(a, b)); \
  |  |  ------------------
  |  |  |  |  319|   171k|    if (MP_OKAY > (res = (x))) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|   171k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:9): [True: 0, False: 171k]
  |  |  |  |  ------------------
  |  |  |  |  320|   171k|    goto CLEANUP
  |  |  ------------------
  |  |  809|   171k|    MP_CHECKOK(s_mp_redc(b, mmm))
  |  |  ------------------
  |  |  |  |  319|   171k|    if (MP_OKAY > (res = (x))) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|   171k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:9): [True: 0, False: 171k]
  |  |  |  |  ------------------
  |  |  |  |  320|   171k|    goto CLEANUP
  |  |  ------------------
  ------------------
  988|   342k|                SQR(pa2, pa1);
  ------------------
  |  |  808|   171k|    MP_CHECKOK(mp_sqr(a, b)); \
  |  |  ------------------
  |  |  |  |  319|   171k|    if (MP_OKAY > (res = (x))) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|   171k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:9): [True: 0, False: 171k]
  |  |  |  |  ------------------
  |  |  |  |  320|   171k|    goto CLEANUP
  |  |  ------------------
  |  |  809|   171k|    MP_CHECKOK(s_mp_redc(b, mmm))
  |  |  ------------------
  |  |  |  |  319|   171k|    if (MP_OKAY > (res = (x))) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|   171k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:9): [True: 0, False: 171k]
  |  |  |  |  ------------------
  |  |  |  |  320|   171k|    goto CLEANUP
  |  |  ------------------
  ------------------
  989|   342k|                SQR(pa1, pa2);
  ------------------
  |  |  808|   171k|    MP_CHECKOK(mp_sqr(a, b)); \
  |  |  ------------------
  |  |  |  |  319|   171k|    if (MP_OKAY > (res = (x))) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|   171k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:9): [True: 0, False: 171k]
  |  |  |  |  ------------------
  |  |  |  |  320|   171k|    goto CLEANUP
  |  |  ------------------
  |  |  809|   171k|    MP_CHECKOK(s_mp_redc(b, mmm))
  |  |  ------------------
  |  |  |  |  319|   171k|    if (MP_OKAY > (res = (x))) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|   171k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:9): [True: 0, False: 171k]
  |  |  |  |  ------------------
  |  |  |  |  320|   171k|    goto CLEANUP
  |  |  ------------------
  ------------------
  990|   342k|                SQR(pa2, pa1);
  ------------------
  |  |  808|   171k|    MP_CHECKOK(mp_sqr(a, b)); \
  |  |  ------------------
  |  |  |  |  319|   171k|    if (MP_OKAY > (res = (x))) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|   171k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:9): [True: 0, False: 171k]
  |  |  |  |  ------------------
  |  |  |  |  320|   171k|    goto CLEANUP
  |  |  ------------------
  |  |  809|   171k|    MP_CHECKOK(s_mp_redc(b, mmm))
  |  |  ------------------
  |  |  |  |  319|   171k|    if (MP_OKAY > (res = (x))) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|   171k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:9): [True: 0, False: 171k]
  |  |  |  |  ------------------
  |  |  |  |  320|   171k|    goto CLEANUP
  |  |  ------------------
  ------------------
  991|   342k|                MUL(smallExp, pa1, pa2);
  ------------------
  |  |  821|   171k|    MP_CHECKOK(weave_to_mpi(&tmp, powers, (x), nLen, num_powers)); \
  |  |  ------------------
  |  |  |  |  319|   171k|    if (MP_OKAY > (res = (x))) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|   171k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:9): [True: 0, False: 171k]
  |  |  |  |  ------------------
  |  |  |  |  320|   171k|    goto CLEANUP
  |  |  ------------------
  |  |  822|   171k|    MUL_NOWEAVE(&tmp, a, b)
  |  |  ------------------
  |  |  |  |  817|   171k|    MP_CHECKOK(s_mp_mul_mont(a, x, b, mmm))
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|   171k|    if (MP_OKAY > (res = (x))) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   39|   171k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:9): [True: 0, False: 171k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|   171k|    goto CLEANUP
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  992|   171k|                SWAPPA;
  ------------------
  |  |  825|   171k|    ptmp = pa1; \
  |  |  826|   171k|    pa1 = pa2;  \
  |  |  827|   171k|    pa2 = ptmp
  ------------------
  993|   171k|                break;
  994|   104k|            case 5:
  ------------------
  |  Branch (994:13): [True: 104k, False: 174k]
  ------------------
  995|   104k|                SQR(pa1, pa2);
  ------------------
  |  |  808|   104k|    MP_CHECKOK(mp_sqr(a, b)); \
  |  |  ------------------
  |  |  |  |  319|   104k|    if (MP_OKAY > (res = (x))) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|   104k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:9): [True: 0, False: 104k]
  |  |  |  |  ------------------
  |  |  |  |  320|   104k|    goto CLEANUP
  |  |  ------------------
  |  |  809|   104k|    MP_CHECKOK(s_mp_redc(b, mmm))
  |  |  ------------------
  |  |  |  |  319|   104k|    if (MP_OKAY > (res = (x))) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|   104k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:9): [True: 0, False: 104k]
  |  |  |  |  ------------------
  |  |  |  |  320|   104k|    goto CLEANUP
  |  |  ------------------
  ------------------
  996|   208k|                SQR(pa2, pa1);
  ------------------
  |  |  808|   104k|    MP_CHECKOK(mp_sqr(a, b)); \
  |  |  ------------------
  |  |  |  |  319|   104k|    if (MP_OKAY > (res = (x))) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|   104k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:9): [True: 0, False: 104k]
  |  |  |  |  ------------------
  |  |  |  |  320|   104k|    goto CLEANUP
  |  |  ------------------
  |  |  809|   104k|    MP_CHECKOK(s_mp_redc(b, mmm))
  |  |  ------------------
  |  |  |  |  319|   104k|    if (MP_OKAY > (res = (x))) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|   104k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:9): [True: 0, False: 104k]
  |  |  |  |  ------------------
  |  |  |  |  320|   104k|    goto CLEANUP
  |  |  ------------------
  ------------------
  997|   208k|                SQR(pa1, pa2);
  ------------------
  |  |  808|   104k|    MP_CHECKOK(mp_sqr(a, b)); \
  |  |  ------------------
  |  |  |  |  319|   104k|    if (MP_OKAY > (res = (x))) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|   104k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:9): [True: 0, False: 104k]
  |  |  |  |  ------------------
  |  |  |  |  320|   104k|    goto CLEANUP
  |  |  ------------------
  |  |  809|   104k|    MP_CHECKOK(s_mp_redc(b, mmm))
  |  |  ------------------
  |  |  |  |  319|   104k|    if (MP_OKAY > (res = (x))) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|   104k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:9): [True: 0, False: 104k]
  |  |  |  |  ------------------
  |  |  |  |  320|   104k|    goto CLEANUP
  |  |  ------------------
  ------------------
  998|   208k|                SQR(pa2, pa1);
  ------------------
  |  |  808|   104k|    MP_CHECKOK(mp_sqr(a, b)); \
  |  |  ------------------
  |  |  |  |  319|   104k|    if (MP_OKAY > (res = (x))) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|   104k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:9): [True: 0, False: 104k]
  |  |  |  |  ------------------
  |  |  |  |  320|   104k|    goto CLEANUP
  |  |  ------------------
  |  |  809|   104k|    MP_CHECKOK(s_mp_redc(b, mmm))
  |  |  ------------------
  |  |  |  |  319|   104k|    if (MP_OKAY > (res = (x))) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|   104k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:9): [True: 0, False: 104k]
  |  |  |  |  ------------------
  |  |  |  |  320|   104k|    goto CLEANUP
  |  |  ------------------
  ------------------
  999|   208k|                SQR(pa1, pa2);
  ------------------
  |  |  808|   104k|    MP_CHECKOK(mp_sqr(a, b)); \
  |  |  ------------------
  |  |  |  |  319|   104k|    if (MP_OKAY > (res = (x))) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|   104k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:9): [True: 0, False: 104k]
  |  |  |  |  ------------------
  |  |  |  |  320|   104k|    goto CLEANUP
  |  |  ------------------
  |  |  809|   104k|    MP_CHECKOK(s_mp_redc(b, mmm))
  |  |  ------------------
  |  |  |  |  319|   104k|    if (MP_OKAY > (res = (x))) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|   104k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:9): [True: 0, False: 104k]
  |  |  |  |  ------------------
  |  |  |  |  320|   104k|    goto CLEANUP
  |  |  ------------------
  ------------------
 1000|   208k|                MUL(smallExp, pa2, pa1);
  ------------------
  |  |  821|   104k|    MP_CHECKOK(weave_to_mpi(&tmp, powers, (x), nLen, num_powers)); \
  |  |  ------------------
  |  |  |  |  319|   104k|    if (MP_OKAY > (res = (x))) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|   104k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:9): [True: 0, False: 104k]
  |  |  |  |  ------------------
  |  |  |  |  320|   104k|    goto CLEANUP
  |  |  ------------------
  |  |  822|   104k|    MUL_NOWEAVE(&tmp, a, b)
  |  |  ------------------
  |  |  |  |  817|   104k|    MP_CHECKOK(s_mp_mul_mont(a, x, b, mmm))
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|   104k|    if (MP_OKAY > (res = (x))) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   39|   104k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:9): [True: 0, False: 104k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|   104k|    goto CLEANUP
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1001|   104k|                break;
 1002|   104k|            default:
  ------------------
  |  Branch (1002:13): [True: 0, False: 279k]
  ------------------
 1003|      0|                abort(); /* could do a loop? */
 1004|   279k|        }
 1005|   279k|    }
 1006|       |
 1007|  5.31k|    res = s_mp_redc(pa1, mmm);
 1008|  5.31k|    mp_exch(pa1, result);
 1009|       |
 1010|  5.31k|CLEANUP:
 1011|  5.31k|    mp_clear(&accum1);
 1012|  5.31k|    mp_clear(&accum2);
 1013|  5.31k|    mp_clear(&accum[0]);
 1014|  5.31k|    mp_clear(&accum[1]);
 1015|  5.31k|    mp_clear(&accum[2]);
 1016|  5.31k|    mp_clear(&accum[3]);
 1017|  5.31k|    mp_clear(&tmp);
 1018|       |    /* zero required by FIPS here, can't use PORT_ZFree
 1019|       |     * because mpi doesn't link with util */
 1020|  5.31k|    if (powers) {
  ------------------
  |  Branch (1020:9): [True: 5.07k, False: 239]
  ------------------
 1021|  5.07k|        PORT_Memset(powers, 0, num_powers * sizeof(mp_digit));
  ------------------
  |  |  182|  5.07k|#define PORT_Memset memset
  ------------------
 1022|  5.07k|    }
 1023|  5.31k|    free(powersArray);
 1024|  5.31k|    return res;
 1025|  5.31k|}
mp_exptmod:
 1033|  7.72k|{
 1034|  7.72k|    const mp_int *base;
 1035|  7.72k|    mp_size bits_in_exponent, i, window_bits, odd_ints;
 1036|  7.72k|    mp_err res;
 1037|  7.72k|    int nLen;
 1038|  7.72k|    mp_int montBase, goodBase;
 1039|  7.72k|    mp_mont_modulus mmm;
 1040|  7.72k|#ifdef MP_USING_CACHE_SAFE_MOD_EXP
 1041|  7.72k|    static unsigned int max_window_bits;
 1042|  7.72k|#endif
 1043|       |
 1044|       |    /* function for computing n0prime only works if n0 is odd */
 1045|  7.72k|    if (!mp_isodd(modulus))
  ------------------
  |  Branch (1045:9): [True: 2.40k, False: 5.31k]
  ------------------
 1046|  2.40k|        return s_mp_exptmod(inBase, exponent, modulus, result);
 1047|       |
 1048|  5.31k|    if (mp_cmp_z(inBase) == MP_LT)
  ------------------
  |  |   49|  5.31k|#define MP_LT -1
  ------------------
  |  Branch (1048:9): [True: 0, False: 5.31k]
  ------------------
 1049|      0|        return MP_RANGE;
  ------------------
  |  |   43|      0|#define MP_RANGE -3  /* argument out of range */
  ------------------
 1050|  5.31k|    MP_DIGITS(&montBase) = 0;
  ------------------
  |  |  152|  5.31k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
 1051|  5.31k|    MP_DIGITS(&goodBase) = 0;
  ------------------
  |  |  152|  5.31k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
 1052|       |
 1053|  5.31k|    if (mp_cmp(inBase, modulus) < 0) {
  ------------------
  |  Branch (1053:9): [True: 4.77k, False: 539]
  ------------------
 1054|  4.77k|        base = inBase;
 1055|  4.77k|    } else {
 1056|    539|        MP_CHECKOK(mp_init(&goodBase));
  ------------------
  |  |  319|    539|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|    539|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 539]
  |  |  ------------------
  |  |  320|    539|    goto CLEANUP
  ------------------
 1057|    539|        base = &goodBase;
 1058|    539|        MP_CHECKOK(mp_mod(inBase, modulus, &goodBase));
  ------------------
  |  |  319|    539|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|    539|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 539]
  |  |  ------------------
  |  |  320|    539|    goto CLEANUP
  ------------------
 1059|    539|    }
 1060|       |
 1061|  5.31k|    nLen = MP_USED(modulus);
  ------------------
  |  |  150|  5.31k|#define MP_USED(MP) ((MP)->used)
  ------------------
 1062|  5.31k|    MP_CHECKOK(mp_init_size(&montBase, 2 * nLen + 2));
  ------------------
  |  |  319|  5.31k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  5.31k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 5.31k]
  |  |  ------------------
  |  |  320|  5.31k|    goto CLEANUP
  ------------------
 1063|       |
 1064|  5.31k|    mmm.N = *modulus; /* a copy of the mp_int struct */
 1065|       |
 1066|       |    /* compute n0', given n0, n0' = -(n0 ** -1) mod MP_RADIX
 1067|       |    **        where n0 = least significant mp_digit of N, the modulus.
 1068|       |    */
 1069|  5.31k|    mmm.n0prime = mp_calculate_mont_n0i(modulus);
 1070|       |
 1071|  5.31k|    MP_CHECKOK(mp_to_mont(base, modulus, &montBase));
  ------------------
  |  |  319|  5.31k|    if (MP_OKAY > (res = (x))) \
  |  |  ------------------
  |  |  |  |   39|  5.31k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (319:9): [True: 0, False: 5.31k]
  |  |  ------------------
  |  |  320|  5.31k|    goto CLEANUP
  ------------------
 1072|       |
 1073|  5.31k|    bits_in_exponent = mpl_significant_bits(exponent);
 1074|  5.31k|#ifdef MP_USING_CACHE_SAFE_MOD_EXP
 1075|  5.31k|    if (mp_using_cache_safe_exp) {
  ------------------
  |  Branch (1075:9): [True: 5.31k, False: 0]
  ------------------
 1076|  5.31k|        if (bits_in_exponent > 780)
  ------------------
  |  Branch (1076:13): [True: 0, False: 5.31k]
  ------------------
 1077|      0|            window_bits = 6;
 1078|  5.31k|        else if (bits_in_exponent > 256)
  ------------------
  |  Branch (1078:18): [True: 1.37k, False: 3.94k]
  ------------------
 1079|  1.37k|            window_bits = 5;
 1080|  3.94k|        else if (bits_in_exponent > 20)
  ------------------
  |  Branch (1080:18): [True: 3.70k, False: 239]
  ------------------
 1081|  3.70k|            window_bits = 4;
 1082|       |        /* RSA public key exponents are typically under 20 bits (common values
 1083|       |         * are: 3, 17, 65537) and a 4-bit window is inefficient
 1084|       |         */
 1085|    239|        else
 1086|    239|            window_bits = 1;
 1087|  5.31k|    } else
 1088|      0|#endif
 1089|      0|        if (bits_in_exponent > 480)
  ------------------
  |  Branch (1089:13): [True: 0, False: 0]
  ------------------
 1090|      0|        window_bits = 6;
 1091|      0|    else if (bits_in_exponent > 160)
  ------------------
  |  Branch (1091:14): [True: 0, False: 0]
  ------------------
 1092|      0|        window_bits = 5;
 1093|      0|    else if (bits_in_exponent > 20)
  ------------------
  |  Branch (1093:14): [True: 0, False: 0]
  ------------------
 1094|      0|        window_bits = 4;
 1095|       |    /* RSA public key exponents are typically under 20 bits (common values
 1096|       |     * are: 3, 17, 65537) and a 4-bit window is inefficient
 1097|       |     */
 1098|      0|    else
 1099|      0|        window_bits = 1;
 1100|       |
 1101|  5.31k|#ifdef MP_USING_CACHE_SAFE_MOD_EXP
 1102|       |    /*
 1103|       |     * clamp the window size based on
 1104|       |     * the cache line size.
 1105|       |     */
 1106|  5.31k|    if (!max_window_bits) {
  ------------------
  |  Branch (1106:9): [True: 1, False: 5.31k]
  ------------------
 1107|      1|        unsigned long cache_size = s_mpi_getProcessorLineSize();
 1108|       |        /* processor has no cache, use 'fast' code always */
 1109|      1|        if (cache_size == 0) {
  ------------------
  |  Branch (1109:13): [True: 0, False: 1]
  ------------------
 1110|      0|            mp_using_cache_safe_exp = 0;
 1111|      0|        }
 1112|      1|        if ((cache_size == 0) || (cache_size >= 64)) {
  ------------------
  |  Branch (1112:13): [True: 0, False: 1]
  |  Branch (1112:34): [True: 1, False: 0]
  ------------------
 1113|      1|            max_window_bits = 6;
 1114|      1|        } else if (cache_size >= 32) {
  ------------------
  |  Branch (1114:20): [True: 0, False: 0]
  ------------------
 1115|      0|            max_window_bits = 5;
 1116|      0|        } else if (cache_size >= 16) {
  ------------------
  |  Branch (1116:20): [True: 0, False: 0]
  ------------------
 1117|      0|            max_window_bits = 4;
 1118|      0|        } else
 1119|      0|            max_window_bits = 1; /* should this be an assert? */
 1120|      1|    }
 1121|       |
 1122|       |    /* clamp the window size down before we caclulate bits_in_exponent */
 1123|  5.31k|    if (mp_using_cache_safe_exp) {
  ------------------
  |  Branch (1123:9): [True: 5.31k, False: 0]
  ------------------
 1124|  5.31k|        if (window_bits > max_window_bits) {
  ------------------
  |  Branch (1124:13): [True: 0, False: 5.31k]
  ------------------
 1125|      0|            window_bits = max_window_bits;
 1126|      0|        }
 1127|  5.31k|    }
 1128|  5.31k|#endif
 1129|       |
 1130|  5.31k|    odd_ints = 1 << (window_bits - 1);
 1131|  5.31k|    i = bits_in_exponent % window_bits;
 1132|  5.31k|    if (i != 0) {
  ------------------
  |  Branch (1132:9): [True: 4.31k, False: 1.00k]
  ------------------
 1133|  4.31k|        bits_in_exponent += window_bits - i;
 1134|  4.31k|    }
 1135|       |
 1136|       |#ifdef MP_USING_MONT_MULF
 1137|       |    if (mp_using_mont_mulf) {
 1138|       |        MP_CHECKOK(s_mp_pad(&montBase, nLen));
 1139|       |        res = mp_exptmod_f(&montBase, exponent, modulus, result, &mmm, nLen,
 1140|       |                           bits_in_exponent, window_bits, odd_ints);
 1141|       |    } else
 1142|       |#endif
 1143|  5.31k|#ifdef MP_USING_CACHE_SAFE_MOD_EXP
 1144|  5.31k|        if (mp_using_cache_safe_exp) {
  ------------------
  |  Branch (1144:13): [True: 5.31k, False: 0]
  ------------------
 1145|  5.31k|        res = mp_exptmod_safe_i(&montBase, exponent, modulus, result, &mmm, nLen,
 1146|  5.31k|                                bits_in_exponent, window_bits, 1 << window_bits);
 1147|  5.31k|    } else
 1148|      0|#endif
 1149|      0|        res = mp_exptmod_i(&montBase, exponent, modulus, result, &mmm, nLen,
 1150|      0|                           bits_in_exponent, window_bits, odd_ints);
 1151|       |
 1152|  5.31k|CLEANUP:
 1153|  5.31k|    mp_clear(&montBase);
 1154|  5.31k|    mp_clear(&goodBase);
 1155|       |    /* Don't mp_clear mmm.N because it is merely a copy of modulus.
 1156|       |    ** Just zap it.
 1157|       |    */
 1158|  5.31k|    memset(&mmm, 0, sizeof mmm);
 1159|  5.31k|    return res;
 1160|  5.31k|}

PQG_GetLength:
  214|  1.13k|{
  215|  1.13k|    unsigned int len = obj->len;
  216|       |
  217|  1.13k|    if (obj->data == NULL) {
  ------------------
  |  Branch (217:9): [True: 0, False: 1.13k]
  ------------------
  218|      0|        return 0;
  219|      0|    }
  220|  1.13k|    if (len > 1 && obj->data[0] == 0) {
  ------------------
  |  Branch (220:9): [True: 1.13k, False: 0]
  |  Branch (220:20): [True: 0, False: 1.13k]
  ------------------
  221|      0|        len--;
  222|      0|    }
  223|  1.13k|    return len;
  224|  1.13k|}

HASH_GetRawHashObject:
  238|  86.9k|{
  239|  86.9k|    if (hashType <= HASH_AlgNULL || hashType >= HASH_AlgTOTAL) {
  ------------------
  |  Branch (239:9): [True: 0, False: 86.9k]
  |  Branch (239:37): [True: 0, False: 86.9k]
  ------------------
  240|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  241|      0|        return NULL;
  242|      0|    }
  243|  86.9k|    return &SECRawHashObjects[hashType];
  244|  86.9k|}
rawhash.c:RawHash_MD5_NewContext:
   17|  34.2k|    {                                                                                    \
   18|  34.2k|        ctxtype *ctx = mmm##_NewContext();                                               \
   19|  34.2k|        return ctx;                                                                      \
   20|  34.2k|    }                                                                                    \
rawhash.c:RawHash_MD5_DestroyContext:
   42|  34.2k|    {                                                                                    \
   43|  34.2k|        ctxtype *ctx = vctx;                                                             \
   44|  34.2k|        mmm##_DestroyContext(ctx, freeit);                                               \
   45|  34.2k|    }
rawhash.c:RawHash_MD5_Begin:
   23|  70.5k|    {                                                                                    \
   24|  70.5k|        ctxtype *ctx = vctx;                                                             \
   25|  70.5k|        mmm##_Begin(ctx);                                                                \
   26|  70.5k|    }                                                                                    \
rawhash.c:RawHash_MD5_Update:
   29|   170k|    {                                                                                    \
   30|   170k|        ctxtype *ctx = vctx;                                                             \
   31|   170k|        mmm##_Update(ctx, input, len);                                                   \
   32|   170k|    }                                                                                    \
rawhash.c:RawHash_MD5_End:
   36|  70.2k|    {                                                                                    \
   37|  70.2k|        ctxtype *ctx = vctx;                                                             \
   38|  70.2k|        mmm##_End(ctx, digest, len, maxLen);                                             \
   39|  70.2k|    }                                                                                    \
rawhash.c:RawHash_SHA1_NewContext:
   17|  12.0k|    {                                                                                    \
   18|  12.0k|        ctxtype *ctx = mmm##_NewContext();                                               \
   19|  12.0k|        return ctx;                                                                      \
   20|  12.0k|    }                                                                                    \
rawhash.c:RawHash_SHA1_DestroyContext:
   42|  12.0k|    {                                                                                    \
   43|  12.0k|        ctxtype *ctx = vctx;                                                             \
   44|  12.0k|        mmm##_DestroyContext(ctx, freeit);                                               \
   45|  12.0k|    }
rawhash.c:RawHash_SHA1_Begin:
   23|  25.2k|    {                                                                                    \
   24|  25.2k|        ctxtype *ctx = vctx;                                                             \
   25|  25.2k|        mmm##_Begin(ctx);                                                                \
   26|  25.2k|    }                                                                                    \
rawhash.c:RawHash_SHA1_Update:
   29|   111k|    {                                                                                    \
   30|   111k|        ctxtype *ctx = vctx;                                                             \
   31|   111k|        mmm##_Update(ctx, input, len);                                                   \
   32|   111k|    }                                                                                    \
rawhash.c:RawHash_SHA1_End:
   36|  16.3k|    {                                                                                    \
   37|  16.3k|        ctxtype *ctx = vctx;                                                             \
   38|  16.3k|        mmm##_End(ctx, digest, len, maxLen);                                             \
   39|  16.3k|    }                                                                                    \
rawhash.c:RawHash_SHA1_EndRaw:
   63|  55.3k|    {                                                                  \
   64|  55.3k|        ctxtype *ctx = vctx;                                           \
   65|  55.3k|        mmm##_EndRaw(ctx, digest, len, maxLen);                        \
   66|  55.3k|    }
rawhash.c:RawHash_SHA256_NewContext:
   17|  26.2k|    {                                                                                    \
   18|  26.2k|        ctxtype *ctx = mmm##_NewContext();                                               \
   19|  26.2k|        return ctx;                                                                      \
   20|  26.2k|    }                                                                                    \
rawhash.c:RawHash_SHA256_DestroyContext:
   42|  26.2k|    {                                                                                    \
   43|  26.2k|        ctxtype *ctx = vctx;                                                             \
   44|  26.2k|        mmm##_DestroyContext(ctx, freeit);                                               \
   45|  26.2k|    }
rawhash.c:RawHash_SHA256_Begin:
   23|  88.4k|    {                                                                                    \
   24|  88.4k|        ctxtype *ctx = vctx;                                                             \
   25|  88.4k|        mmm##_Begin(ctx);                                                                \
   26|  88.4k|    }                                                                                    \
rawhash.c:RawHash_SHA256_Update:
   29|   217k|    {                                                                                    \
   30|   217k|        ctxtype *ctx = vctx;                                                             \
   31|   217k|        mmm##_Update(ctx, input, len);                                                   \
   32|   217k|    }                                                                                    \
rawhash.c:RawHash_SHA256_End:
   36|  87.2k|    {                                                                                    \
   37|  87.2k|        ctxtype *ctx = vctx;                                                             \
   38|  87.2k|        mmm##_End(ctx, digest, len, maxLen);                                             \
   39|  87.2k|    }                                                                                    \
rawhash.c:RawHash_SHA256_EndRaw:
   63|  7.61k|    {                                                                  \
   64|  7.61k|        ctxtype *ctx = vctx;                                           \
   65|  7.61k|        mmm##_EndRaw(ctx, digest, len, maxLen);                        \
   66|  7.61k|    }
rawhash.c:RawHash_SHA384_NewContext:
   17|  13.3k|    {                                                                                    \
   18|  13.3k|        ctxtype *ctx = mmm##_NewContext();                                               \
   19|  13.3k|        return ctx;                                                                      \
   20|  13.3k|    }                                                                                    \
rawhash.c:RawHash_SHA384_DestroyContext:
   42|  13.3k|    {                                                                                    \
   43|  13.3k|        ctxtype *ctx = vctx;                                                             \
   44|  13.3k|        mmm##_DestroyContext(ctx, freeit);                                               \
   45|  13.3k|    }
rawhash.c:RawHash_SHA384_Begin:
   23|  28.1k|    {                                                                                    \
   24|  28.1k|        ctxtype *ctx = vctx;                                                             \
   25|  28.1k|        mmm##_Begin(ctx);                                                                \
   26|  28.1k|    }                                                                                    \
rawhash.c:RawHash_SHA384_Update:
   29|  63.8k|    {                                                                                    \
   30|  63.8k|        ctxtype *ctx = vctx;                                                             \
   31|  63.8k|        mmm##_Update(ctx, input, len);                                                   \
   32|  63.8k|    }                                                                                    \
rawhash.c:RawHash_SHA384_End:
   36|  28.1k|    {                                                                                    \
   37|  28.1k|        ctxtype *ctx = vctx;                                                             \
   38|  28.1k|        mmm##_End(ctx, digest, len, maxLen);                                             \
   39|  28.1k|    }                                                                                    \
rawhash.c:RawHash_SHA512_NewContext:
   17|      3|    {                                                                                    \
   18|      3|        ctxtype *ctx = mmm##_NewContext();                                               \
   19|      3|        return ctx;                                                                      \
   20|      3|    }                                                                                    \
rawhash.c:RawHash_SHA512_DestroyContext:
   42|      3|    {                                                                                    \
   43|      3|        ctxtype *ctx = vctx;                                                             \
   44|      3|        mmm##_DestroyContext(ctx, freeit);                                               \
   45|      3|    }
rawhash.c:RawHash_SHA512_Begin:
   23|      7|    {                                                                                    \
   24|      7|        ctxtype *ctx = vctx;                                                             \
   25|      7|        mmm##_Begin(ctx);                                                                \
   26|      7|    }                                                                                    \
rawhash.c:RawHash_SHA512_Update:
   29|     15|    {                                                                                    \
   30|     15|        ctxtype *ctx = vctx;                                                             \
   31|     15|        mmm##_Update(ctx, input, len);                                                   \
   32|     15|    }                                                                                    \
rawhash.c:RawHash_SHA512_End:
   36|      7|    {                                                                                    \
   37|      7|        ctxtype *ctx = vctx;                                                             \
   38|      7|        mmm##_End(ctx, digest, len, maxLen);                                             \
   39|      7|    }                                                                                    \

AES_AllocateContext:
 1009|  8.35k|{
 1010|  8.35k|    return PORT_ZNewAligned(AESContext, 16, mem);
  ------------------
  |  |  150|  8.35k|    (type *)PORT_ZAllocAlignedOffset(sizeof(type), alignment, offsetof(type, mem))
  |  |  ------------------
  |  |  |  |   74|  8.35k|#define PORT_ZAllocAlignedOffset PORT_ZAllocAlignedOffset_Util
  |  |  ------------------
  ------------------
 1011|  8.35k|}
AES_InitContext:
 1116|  8.35k|{
 1117|  8.35k|    int basemode = mode;
 1118|  8.35k|    PRBool baseencrypt = encrypt;
 1119|  8.35k|    SECStatus rv;
 1120|       |
 1121|  8.35k|    if (blocksize != AES_BLOCK_SIZE) {
  ------------------
  |  |  130|  8.35k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  |  Branch (1121:9): [True: 0, False: 8.35k]
  ------------------
 1122|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1123|      0|        return SECFailure;
 1124|      0|    }
 1125|       |
 1126|  8.35k|    switch (mode) {
  ------------------
  |  Branch (1126:13): [True: 6.71k, False: 1.63k]
  ------------------
 1127|      0|        case NSS_AES_CTS:
  ------------------
  |  |   37|      0|#define NSS_AES_CTS 2
  ------------------
  |  Branch (1127:9): [True: 0, False: 8.35k]
  ------------------
 1128|      0|            basemode = NSS_AES_CBC;
  ------------------
  |  |   36|      0|#define NSS_AES_CBC 1
  ------------------
 1129|      0|            break;
 1130|  1.63k|        case NSS_AES_GCM:
  ------------------
  |  |   39|  1.63k|#define NSS_AES_GCM 4
  ------------------
  |  Branch (1130:9): [True: 1.63k, False: 6.71k]
  ------------------
 1131|  1.63k|        case NSS_AES_CTR:
  ------------------
  |  |   38|  1.63k|#define NSS_AES_CTR 3
  ------------------
  |  Branch (1131:9): [True: 0, False: 8.35k]
  ------------------
 1132|  1.63k|            basemode = NSS_AES;
  ------------------
  |  |   35|  1.63k|#define NSS_AES 0
  ------------------
 1133|  1.63k|            baseencrypt = PR_TRUE;
  ------------------
  |  |  437|  1.63k|#define PR_TRUE 1
  ------------------
 1134|  1.63k|            break;
 1135|  8.35k|    }
 1136|       |    /* Make sure enough is initialized so we can safely call Destroy. */
 1137|  8.35k|    cx->worker_cx = NULL;
 1138|  8.35k|    cx->destroy = NULL;
 1139|  8.35k|    cx->mode = mode;
 1140|  8.35k|    rv = aes_InitContext(cx, key, keysize, iv, basemode, baseencrypt);
 1141|  8.35k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1141:9): [True: 0, False: 8.35k]
  ------------------
 1142|      0|        AES_DestroyContext(cx, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 1143|      0|        return rv;
 1144|      0|    }
 1145|       |
 1146|       |    /* finally, set up any mode specific contexts */
 1147|  8.35k|    cx->worker_aead = 0;
 1148|  8.35k|    switch (mode) {
 1149|      0|        case NSS_AES_CTS:
  ------------------
  |  |   37|      0|#define NSS_AES_CTS 2
  ------------------
  |  Branch (1149:9): [True: 0, False: 8.35k]
  ------------------
 1150|      0|            cx->worker_cx = CTS_CreateContext(cx, cx->worker, iv);
 1151|      0|            cx->worker = encrypt ? freeblCipher_CTS_EncryptUpdate : freeblCipher_CTS_DecryptUpdate;
  ------------------
  |  Branch (1151:26): [True: 0, False: 0]
  ------------------
 1152|      0|            cx->destroy = freeblDestroy_CTS_DestroyContext;
 1153|      0|            cx->isBlock = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 1154|      0|            break;
 1155|  1.63k|        case NSS_AES_GCM:
  ------------------
  |  |   39|  1.63k|#define NSS_AES_GCM 4
  ------------------
  |  Branch (1155:9): [True: 1.63k, False: 6.71k]
  ------------------
 1156|       |#if defined(INTEL_GCM) && defined(USE_HW_AES)
 1157|       |            if (aesni_support() && (keysize % 8) == 0 && avx_support() &&
 1158|       |                clmul_support()) {
 1159|       |                cx->worker_cx = intel_AES_GCM_CreateContext(cx, cx->worker, iv);
 1160|       |                cx->worker = encrypt ? freeblCipher_intel_AES_GCM_EncryptUpdate
 1161|       |                                     : freeblCipher_intel_AES_GCM_DecryptUpdate;
 1162|       |                cx->worker_aead = encrypt ? freeblAead_intel_AES_GCM_EncryptAEAD
 1163|       |                                          : freeblAead_intel_AES_GCM_DecryptAEAD;
 1164|       |                cx->destroy = freeblDestroy_intel_AES_GCM_DestroyContext;
 1165|       |                cx->isBlock = PR_FALSE;
 1166|       |            } else
 1167|       |#elif defined(USE_PPC_CRYPTO) && defined(PPC_GCM)
 1168|       |            if (ppc_crypto_support() && (keysize % 8) == 0) {
 1169|       |                cx->worker_cx = ppc_AES_GCM_CreateContext(cx, cx->worker, iv);
 1170|       |                cx->worker = encrypt ? freeblCipher_ppc_AES_GCM_EncryptUpdate
 1171|       |                                     : freeblCipher_ppc_AES_GCM_DecryptUpdate;
 1172|       |                cx->worker_aead = encrypt ? freeblAead_ppc_AES_GCM_EncryptAEAD
 1173|       |                                          : freeblAead_ppc_AES_GCM_DecryptAEAD;
 1174|       |                cx->destroy = freeblDestroy_ppc_AES_GCM_DestroyContext;
 1175|       |                cx->isBlock = PR_FALSE;
 1176|       |            } else
 1177|       |#endif
 1178|  1.63k|            {
 1179|  1.63k|                cx->worker_cx = GCM_CreateContext(cx, cx->worker, iv);
 1180|  1.63k|                cx->worker = encrypt ? freeblCipher_GCM_EncryptUpdate
  ------------------
  |  Branch (1180:30): [True: 294, False: 1.34k]
  ------------------
 1181|  1.63k|                                     : freeblCipher_GCM_DecryptUpdate;
 1182|  1.63k|                cx->worker_aead = encrypt ? freeblAead_GCM_EncryptAEAD
  ------------------
  |  Branch (1182:35): [True: 294, False: 1.34k]
  ------------------
 1183|  1.63k|                                          : freeblAead_GCM_DecryptAEAD;
 1184|       |
 1185|  1.63k|                cx->destroy = freeblDestroy_GCM_DestroyContext;
 1186|  1.63k|                cx->isBlock = PR_FALSE;
  ------------------
  |  |  438|  1.63k|#define PR_FALSE 0
  ------------------
 1187|  1.63k|            }
 1188|  1.63k|            break;
 1189|      0|        case NSS_AES_CTR:
  ------------------
  |  |   38|      0|#define NSS_AES_CTR 3
  ------------------
  |  Branch (1189:9): [True: 0, False: 8.35k]
  ------------------
 1190|      0|            cx->worker_cx = CTR_CreateContext(cx, cx->worker, iv);
 1191|       |#if defined(USE_HW_AES) && defined(_MSC_VER) && defined(NSS_X86_OR_X64)
 1192|       |            if (aesni_support() && (keysize % 8) == 0) {
 1193|       |                cx->worker = freeblCipher_CTR_Update_HW_AES;
 1194|       |            } else
 1195|       |#endif
 1196|      0|            {
 1197|      0|                cx->worker = freeblCipher_CTR_Update;
 1198|      0|            }
 1199|      0|            cx->destroy = freeblDestroy_CTR_DestroyContext;
 1200|      0|            cx->isBlock = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 1201|      0|            break;
 1202|  6.71k|        default:
  ------------------
  |  Branch (1202:9): [True: 6.71k, False: 1.63k]
  ------------------
 1203|       |            /* everything has already been set up by aes_InitContext, just
 1204|       |             * return */
 1205|  6.71k|            return SECSuccess;
 1206|  8.35k|    }
 1207|       |    /* check to see if we succeeded in getting the worker context */
 1208|  1.63k|    if (cx->worker_cx == NULL) {
  ------------------
  |  Branch (1208:9): [True: 0, False: 1.63k]
  ------------------
 1209|       |        /* no, just destroy the existing context */
 1210|      0|        cx->destroy = NULL; /* paranoia, though you can see a dozen lines */
 1211|       |                            /* below that this isn't necessary */
 1212|      0|        AES_DestroyContext(cx, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 1213|      0|        return SECFailure;
 1214|      0|    }
 1215|  1.63k|    return SECSuccess;
 1216|  1.63k|}
AES_CreateContext:
 1226|  8.35k|{
 1227|  8.35k|    AESContext *cx = AES_AllocateContext();
 1228|  8.35k|    if (cx) {
  ------------------
  |  Branch (1228:9): [True: 8.35k, False: 0]
  ------------------
 1229|  8.35k|        SECStatus rv = AES_InitContext(cx, key, keysize, iv, mode, encrypt,
 1230|  8.35k|                                       blocksize);
 1231|  8.35k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (1231:13): [True: 0, False: 8.35k]
  ------------------
 1232|      0|            AES_DestroyContext(cx, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 1233|      0|            cx = NULL;
 1234|      0|        }
 1235|  8.35k|    }
 1236|  8.35k|    return cx;
 1237|  8.35k|}
AES_DestroyContext:
 1247|  8.35k|{
 1248|  8.35k|    void *mem = cx->mem;
 1249|  8.35k|    if (cx->worker_cx && cx->destroy) {
  ------------------
  |  Branch (1249:9): [True: 8.35k, False: 0]
  |  Branch (1249:26): [True: 1.63k, False: 6.71k]
  ------------------
 1250|  1.63k|        (*cx->destroy)(cx->worker_cx, PR_TRUE);
  ------------------
  |  |  437|  1.63k|#define PR_TRUE 1
  ------------------
 1251|  1.63k|        cx->worker_cx = NULL;
 1252|  1.63k|        cx->destroy = NULL;
 1253|  1.63k|    }
 1254|  8.35k|    PORT_SafeZero(cx, sizeof(AESContext));
 1255|  8.35k|    if (freeit) {
  ------------------
  |  Branch (1255:9): [True: 8.35k, False: 0]
  ------------------
 1256|  8.35k|        PORT_Free(mem);
  ------------------
  |  |   60|  8.35k|#define PORT_Free PORT_Free_Util
  ------------------
 1257|  8.35k|    } else {
 1258|       |        /* if we are not freeing the context, restore mem, We may get called
 1259|       |         * again to actually free the context */
 1260|      0|        cx->mem = mem;
 1261|      0|    }
 1262|  8.35k|}
AES_Encrypt:
 1274|  6.73k|{
 1275|       |    /* Check args */
 1276|  6.73k|    SECStatus rv;
 1277|  6.73k|    if (cx == NULL || output == NULL || (input == NULL && inputLen != 0)) {
  ------------------
  |  Branch (1277:9): [True: 0, False: 6.73k]
  |  Branch (1277:23): [True: 0, False: 6.73k]
  |  Branch (1277:42): [True: 0, False: 6.73k]
  |  Branch (1277:59): [True: 0, False: 0]
  ------------------
 1278|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1279|      0|        return SECFailure;
 1280|      0|    }
 1281|  6.73k|    if (cx->isBlock && (inputLen % AES_BLOCK_SIZE != 0)) {
  ------------------
  |  |  130|  6.73k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  |  Branch (1281:9): [True: 6.73k, False: 0]
  |  Branch (1281:24): [True: 0, False: 6.73k]
  ------------------
 1282|      0|        PORT_SetError(SEC_ERROR_INPUT_LEN);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1283|      0|        return SECFailure;
 1284|      0|    }
 1285|  6.73k|    if (maxOutputLen < inputLen) {
  ------------------
  |  Branch (1285:9): [True: 0, False: 6.73k]
  ------------------
 1286|      0|        PORT_SetError(SEC_ERROR_OUTPUT_LEN);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1287|      0|        return SECFailure;
 1288|      0|    }
 1289|  6.73k|    *outputLen = inputLen;
 1290|       |#if UINT_MAX > MP_32BIT_MAX
 1291|       |    /*
 1292|       |     * we can guarentee that GSM won't overlfow if we limit the input to
 1293|       |     * 2^36 bytes. For simplicity, we are limiting it to 2^32 for now.
 1294|       |     *
 1295|       |     * We do it here to cover both hardware and software GCM operations.
 1296|       |     */
 1297|       |    {
 1298|       |        PR_STATIC_ASSERT(sizeof(unsigned int) > 4);
 1299|       |    }
 1300|       |    if ((cx->mode == NSS_AES_GCM) && (inputLen > MP_32BIT_MAX)) {
 1301|       |        PORT_SetError(SEC_ERROR_OUTPUT_LEN);
 1302|       |        return SECFailure;
 1303|       |    }
 1304|       |#else
 1305|       |    /* if we can't pass in a 32_bit number, then no such check needed */
 1306|  6.73k|    {
 1307|  6.73k|        PR_STATIC_ASSERT(sizeof(unsigned int) <= 4);
  ------------------
  |  |  554|  6.73k|    extern void pr_static_assert(int arg[(condition) ? 1 : -1])
  ------------------
 1308|  6.73k|    }
 1309|  6.73k|#endif
 1310|       |
 1311|  6.73k|    rv = (*cx->worker)(cx->worker_cx, output, outputLen, maxOutputLen,
 1312|  6.73k|                       input, inputLen, AES_BLOCK_SIZE);
  ------------------
  |  |  130|  6.73k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
 1313|  6.73k|    BLAPI_CLEAR_STACK(256)
 1314|  6.73k|    return rv;
 1315|  6.73k|}
AES_Decrypt:
 1327|  3.04k|{
 1328|  3.04k|    SECStatus rv;
 1329|       |    /* Check args */
 1330|  3.04k|    if (cx == NULL || output == NULL || (input == NULL && inputLen != 0)) {
  ------------------
  |  Branch (1330:9): [True: 0, False: 3.04k]
  |  Branch (1330:23): [True: 0, False: 3.04k]
  |  Branch (1330:42): [True: 0, False: 3.04k]
  |  Branch (1330:59): [True: 0, False: 0]
  ------------------
 1331|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1332|      0|        return SECFailure;
 1333|      0|    }
 1334|  3.04k|    if (cx->isBlock && (inputLen % AES_BLOCK_SIZE != 0)) {
  ------------------
  |  |  130|  3.04k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  |  Branch (1334:9): [True: 3.04k, False: 0]
  |  Branch (1334:24): [True: 0, False: 3.04k]
  ------------------
 1335|      0|        PORT_SetError(SEC_ERROR_INPUT_LEN);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1336|      0|        return SECFailure;
 1337|      0|    }
 1338|  3.04k|    if ((cx->mode != NSS_AES_GCM) && (maxOutputLen < inputLen)) {
  ------------------
  |  |   39|  3.04k|#define NSS_AES_GCM 4
  ------------------
  |  Branch (1338:9): [True: 3.04k, False: 0]
  |  Branch (1338:38): [True: 0, False: 3.04k]
  ------------------
 1339|      0|        PORT_SetError(SEC_ERROR_OUTPUT_LEN);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1340|      0|        return SECFailure;
 1341|      0|    }
 1342|  3.04k|    *outputLen = inputLen;
 1343|  3.04k|    rv = (*cx->worker)(cx->worker_cx, output, outputLen, maxOutputLen,
 1344|  3.04k|                       input, inputLen, AES_BLOCK_SIZE);
  ------------------
  |  |  130|  3.04k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
 1345|  3.04k|    BLAPI_CLEAR_STACK(256)
 1346|  3.04k|    return rv;
 1347|  3.04k|}
AES_AEAD:
 1360|  6.38k|{
 1361|  6.38k|    SECStatus rv;
 1362|       |    /* Check args */
 1363|  6.38k|    if (cx == NULL || output == NULL || (input == NULL && inputLen != 0) || (aad == NULL && aadLen != 0) || params == NULL) {
  ------------------
  |  Branch (1363:9): [True: 0, False: 6.38k]
  |  Branch (1363:23): [True: 0, False: 6.38k]
  |  Branch (1363:42): [True: 0, False: 6.38k]
  |  Branch (1363:59): [True: 0, False: 0]
  |  Branch (1363:78): [True: 0, False: 6.38k]
  |  Branch (1363:93): [True: 0, False: 0]
  |  Branch (1363:109): [True: 0, False: 6.38k]
  ------------------
 1364|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1365|      0|        return SECFailure;
 1366|      0|    }
 1367|  6.38k|    if (cx->worker_aead == NULL) {
  ------------------
  |  Branch (1367:9): [True: 0, False: 6.38k]
  ------------------
 1368|      0|        PORT_SetError(SEC_ERROR_NOT_INITIALIZED);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1369|      0|        return SECFailure;
 1370|      0|    }
 1371|  6.38k|    if (maxOutputLen < inputLen) {
  ------------------
  |  Branch (1371:9): [True: 0, False: 6.38k]
  ------------------
 1372|      0|        PORT_SetError(SEC_ERROR_OUTPUT_LEN);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1373|      0|        return SECFailure;
 1374|      0|    }
 1375|  6.38k|    *outputLen = inputLen;
 1376|       |#if UINT_MAX > MP_32BIT_MAX
 1377|       |    /*
 1378|       |     * we can guarentee that GSM won't overlfow if we limit the input to
 1379|       |     * 2^36 bytes. For simplicity, we are limiting it to 2^32 for now.
 1380|       |     *
 1381|       |     * We do it here to cover both hardware and software GCM operations.
 1382|       |     */
 1383|       |    {
 1384|       |        PR_STATIC_ASSERT(sizeof(unsigned int) > 4);
 1385|       |    }
 1386|       |    if (inputLen > MP_32BIT_MAX) {
 1387|       |        PORT_SetError(SEC_ERROR_OUTPUT_LEN);
 1388|       |        return SECFailure;
 1389|       |    }
 1390|       |#else
 1391|       |    /* if we can't pass in a 32_bit number, then no such check needed */
 1392|  6.38k|    {
 1393|  6.38k|        PR_STATIC_ASSERT(sizeof(unsigned int) <= 4);
  ------------------
  |  |  554|  6.38k|    extern void pr_static_assert(int arg[(condition) ? 1 : -1])
  ------------------
 1394|  6.38k|    }
 1395|  6.38k|#endif
 1396|       |
 1397|  6.38k|    rv = (*cx->worker_aead)(cx->worker_cx, output, outputLen, maxOutputLen,
 1398|  6.38k|                            input, inputLen, params, paramsLen, aad, aadLen,
 1399|  6.38k|                            AES_BLOCK_SIZE);
  ------------------
  |  |  130|  6.38k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
 1400|  6.38k|    BLAPI_CLEAR_STACK(256)
 1401|  6.38k|    return rv;
 1402|  6.38k|}
rijndael.c:aes_InitContext:
 1021|  8.35k|{
 1022|  8.35k|    unsigned int Nk;
 1023|  8.35k|    PRBool use_hw_aes;
 1024|       |    /* According to AES, block lengths are 128 and key lengths are 128, 192, or
 1025|       |     * 256 bits. We support other key sizes as well [128, 256] as long as the
 1026|       |     * length in bytes is divisible by 4.
 1027|       |     */
 1028|       |
 1029|  8.35k|    if (key == NULL ||
  ------------------
  |  Branch (1029:9): [True: 0, False: 8.35k]
  ------------------
 1030|  8.35k|        keysize < AES_BLOCK_SIZE ||
  ------------------
  |  |  130|  16.7k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  |  Branch (1030:9): [True: 0, False: 8.35k]
  ------------------
 1031|  8.35k|        keysize > 32 ||
  ------------------
  |  Branch (1031:9): [True: 0, False: 8.35k]
  ------------------
 1032|  8.35k|        keysize % 4 != 0) {
  ------------------
  |  Branch (1032:9): [True: 0, False: 8.35k]
  ------------------
 1033|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1034|      0|        return SECFailure;
 1035|      0|    }
 1036|  8.35k|    if (mode != NSS_AES && mode != NSS_AES_CBC) {
  ------------------
  |  |   35|  16.7k|#define NSS_AES 0
  ------------------
                  if (mode != NSS_AES && mode != NSS_AES_CBC) {
  ------------------
  |  |   36|    418|#define NSS_AES_CBC 1
  ------------------
  |  Branch (1036:9): [True: 418, False: 7.93k]
  |  Branch (1036:28): [True: 0, False: 418]
  ------------------
 1037|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1038|      0|        return SECFailure;
 1039|      0|    }
 1040|  8.35k|    if (mode == NSS_AES_CBC && iv == NULL) {
  ------------------
  |  |   36|  16.7k|#define NSS_AES_CBC 1
  ------------------
  |  Branch (1040:9): [True: 418, False: 7.93k]
  |  Branch (1040:32): [True: 0, False: 418]
  ------------------
 1041|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1042|      0|        return SECFailure;
 1043|      0|    }
 1044|  8.35k|    if (!cx) {
  ------------------
  |  Branch (1044:9): [True: 0, False: 8.35k]
  ------------------
 1045|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1046|      0|        return SECFailure;
 1047|      0|    }
 1048|  8.35k|#if defined(NSS_X86_OR_X64) || defined(USE_HW_AES)
 1049|  8.35k|    use_hw_aes = (aesni_support() || arm_aes_support()) && (keysize % 8) == 0;
  ------------------
  |  Branch (1049:19): [True: 8.35k, False: 0]
  |  Branch (1049:38): [True: 0, False: 0]
  |  Branch (1049:60): [True: 8.35k, False: 0]
  ------------------
 1050|       |#else
 1051|       |    use_hw_aes = PR_FALSE;
 1052|       |#endif
 1053|       |    /* Nb = (block size in bits) / 32 */
 1054|  8.35k|    cx->Nb = AES_BLOCK_SIZE / 4;
  ------------------
  |  |  130|  8.35k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
 1055|       |    /* Nk = (key size in bits) / 32 */
 1056|  8.35k|    Nk = keysize / 4;
 1057|       |    /* Obtain number of rounds from "table" */
 1058|  8.35k|    cx->Nr = RIJNDAEL_NUM_ROUNDS(Nk, cx->Nb);
  ------------------
  |  |   36|  8.35k|    (PR_MAX(Nk, Nb) + 6)
  |  |  ------------------
  |  |  |  |  159|  8.35k|#define PR_MAX(x,y)     ((x)>(y)?(x):(y))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (159:26): [True: 4.75k, False: 3.59k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1059|       |    /* copy in the iv, if neccessary */
 1060|  8.35k|    if (mode == NSS_AES_CBC) {
  ------------------
  |  |   36|  8.35k|#define NSS_AES_CBC 1
  ------------------
  |  Branch (1060:9): [True: 418, False: 7.93k]
  ------------------
 1061|    418|        memcpy(cx->iv, iv, AES_BLOCK_SIZE);
  ------------------
  |  |  130|    418|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
 1062|       |#ifdef USE_HW_AES
 1063|       |        if (use_hw_aes) {
 1064|       |            cx->worker = freeblCipher_native_aes_cbc_worker(encrypt, keysize);
 1065|       |        } else
 1066|       |#endif
 1067|    418|        {
 1068|    418|            cx->worker = encrypt ? freeblCipher_rijndael_encryptCBC : freeblCipher_rijndael_decryptCBC;
  ------------------
  |  Branch (1068:26): [True: 209, False: 209]
  ------------------
 1069|    418|        }
 1070|  7.93k|    } else {
 1071|       |#ifdef USE_HW_AES
 1072|       |        if (use_hw_aes) {
 1073|       |            cx->worker = freeblCipher_native_aes_ecb_worker(encrypt, keysize);
 1074|       |        } else
 1075|       |#endif
 1076|  7.93k|        {
 1077|  7.93k|            cx->worker = encrypt ? freeblCipher_rijndael_encryptECB : freeblCipher_rijndael_decryptECB;
  ------------------
  |  Branch (1077:26): [True: 7.93k, False: 0]
  ------------------
 1078|  7.93k|        }
 1079|  7.93k|    }
 1080|  8.35k|    PORT_Assert((cx->Nb * (cx->Nr + 1)) <= RIJNDAEL_MAX_EXP_KEY_SIZE);
  ------------------
  |  |  120|  8.35k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  8.35k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 8.35k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1081|  8.35k|    if ((cx->Nb * (cx->Nr + 1)) > RIJNDAEL_MAX_EXP_KEY_SIZE) {
  ------------------
  |  |   43|  8.35k|#define RIJNDAEL_MAX_EXP_KEY_SIZE (4 * 15)
  ------------------
  |  Branch (1081:9): [True: 0, False: 8.35k]
  ------------------
 1082|      0|        PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1083|      0|        return SECFailure;
 1084|      0|    }
 1085|       |#ifdef USE_HW_AES
 1086|       |    if (use_hw_aes) {
 1087|       |        native_aes_init(encrypt, keysize);
 1088|       |    } else
 1089|       |#endif
 1090|  8.35k|    {
 1091|       |        /* Generate expanded key */
 1092|  8.35k|        if (encrypt) {
  ------------------
  |  Branch (1092:13): [True: 8.14k, False: 209]
  ------------------
 1093|  8.14k|            if (use_hw_aes && (cx->mode == NSS_AES_GCM || cx->mode == NSS_AES ||
  ------------------
  |  |   39|  16.2k|#define NSS_AES_GCM 4
  ------------------
                          if (use_hw_aes && (cx->mode == NSS_AES_GCM || cx->mode == NSS_AES ||
  ------------------
  |  |   35|  14.6k|#define NSS_AES 0
  ------------------
  |  Branch (1093:17): [True: 8.14k, False: 0]
  |  Branch (1093:32): [True: 1.63k, False: 6.50k]
  |  Branch (1093:59): [True: 6.29k, False: 209]
  ------------------
 1094|  8.14k|                               cx->mode == NSS_AES_CTR)) {
  ------------------
  |  |   38|    209|#define NSS_AES_CTR 3
  ------------------
  |  Branch (1094:32): [True: 0, False: 209]
  ------------------
 1095|  7.93k|                PORT_Assert(keysize == 16 || keysize == 24 || keysize == 32);
  ------------------
  |  |  120|  7.93k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  24.6k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 3.53k, False: 4.39k]
  |  |  |  |  |  Branch (208:7): [True: 0, False: 4.39k]
  |  |  |  |  |  Branch (208:7): [True: 4.39k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1096|       |                /* Prepare hardware key for normal AES parameters. */
 1097|  7.93k|                rijndael_native_key_expansion(cx, key, Nk);
 1098|  7.93k|            } else {
 1099|    209|                rijndael_key_expansion(cx, key, Nk);
 1100|    209|            }
 1101|  8.14k|        } else {
 1102|    209|            rijndael_invkey_expansion(cx, key, Nk);
 1103|    209|        }
 1104|  8.35k|        BLAPI_CLEAR_STACK(256)
 1105|  8.35k|    }
 1106|  8.35k|    cx->worker_cx = cx;
 1107|  8.35k|    cx->destroy = NULL;
 1108|  8.35k|    cx->isBlock = PR_TRUE;
  ------------------
  |  |  437|  8.35k|#define PR_TRUE 1
  ------------------
 1109|  8.35k|    return SECSuccess;
 1110|  8.35k|}
rijndael.c:freeblCipher_rijndael_encryptCBC:
  865|    442|    {                                                                                       \
  866|    442|        ctxtype *ctx = vctx;                                                                \
  867|    442|        return mmm(ctx, output, outputLen, maxOutputLen, input, inputLen, blocksize);       \
  868|    442|    }
rijndael.c:rijndael_encryptCBC:
  768|    442|{
  769|    442|    PORT_Assert(blocksize == AES_BLOCK_SIZE);
  ------------------
  |  |  120|    442|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    442|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 442, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  770|    442|    unsigned char *lastblock = cx->iv;
  771|    442|    unsigned char inblock[AES_BLOCK_SIZE * 8];
  772|    442|    PRBool aesni = aesni_support();
  773|       |
  774|    442|    if (!inputLen)
  ------------------
  |  Branch (774:9): [True: 0, False: 442]
  ------------------
  775|      0|        return SECSuccess;
  776|  1.41k|    while (inputLen > 0) {
  ------------------
  |  Branch (776:12): [True: 968, False: 442]
  ------------------
  777|    968|        if (aesni) {
  ------------------
  |  Branch (777:13): [True: 968, False: 0]
  ------------------
  778|       |            /* XOR with the last block (IV if first block) */
  779|    968|            native_xorBlock(inblock, input, lastblock);
  780|       |            /* encrypt */
  781|    968|            rijndael_native_encryptBlock(cx, output, inblock);
  782|    968|        } else {
  783|      0|            xorBlock(inblock, input, lastblock);
  784|      0|            rijndael_encryptBlock128(cx, output, inblock);
  785|      0|        }
  786|       |
  787|       |        /* move to the next block */
  788|    968|        lastblock = output;
  789|    968|        output += AES_BLOCK_SIZE;
  ------------------
  |  |  130|    968|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  790|    968|        input += AES_BLOCK_SIZE;
  ------------------
  |  |  130|    968|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  791|    968|        inputLen -= AES_BLOCK_SIZE;
  ------------------
  |  |  130|    968|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  792|    968|    }
  793|    442|    memcpy(cx->iv, lastblock, AES_BLOCK_SIZE);
  ------------------
  |  |  130|    442|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  794|    442|    return SECSuccess;
  795|    442|}
rijndael.c:freeblCipher_rijndael_decryptCBC:
  865|  3.04k|    {                                                                                       \
  866|  3.04k|        ctxtype *ctx = vctx;                                                                \
  867|  3.04k|        return mmm(ctx, output, outputLen, maxOutputLen, input, inputLen, blocksize);       \
  868|  3.04k|    }
rijndael.c:rijndael_decryptCBC:
  821|  3.04k|{
  822|  3.04k|    PORT_Assert(blocksize == AES_BLOCK_SIZE);
  ------------------
  |  |  120|  3.04k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  3.04k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 3.04k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  823|  3.04k|    const unsigned char *in;
  824|  3.04k|    unsigned char *out;
  825|  3.04k|    unsigned char newIV[AES_BLOCK_SIZE];
  826|  3.04k|    PRBool aesni = aesni_support();
  827|       |
  828|  3.04k|    if (!inputLen)
  ------------------
  |  Branch (828:9): [True: 0, False: 3.04k]
  ------------------
  829|      0|        return SECSuccess;
  830|  3.04k|    PORT_Assert(output - input >= 0 || input - output >= (int)inputLen);
  ------------------
  |  |  120|  3.04k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  4.03k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 2.05k, False: 990]
  |  |  |  |  |  Branch (208:7): [True: 990, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  831|  3.04k|    in = input + (inputLen - AES_BLOCK_SIZE);
  ------------------
  |  |  130|  3.04k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  832|  3.04k|    memcpy(newIV, in, AES_BLOCK_SIZE);
  ------------------
  |  |  130|  3.04k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  833|  3.04k|    out = output + (inputLen - AES_BLOCK_SIZE);
  ------------------
  |  |  130|  3.04k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  834|  15.2k|    while (inputLen > AES_BLOCK_SIZE) {
  ------------------
  |  |  130|  15.2k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  |  Branch (834:12): [True: 12.2k, False: 3.04k]
  ------------------
  835|  12.2k|        if (aesni) {
  ------------------
  |  Branch (835:13): [True: 12.2k, False: 0]
  ------------------
  836|       |            // Use hardware acceleration for normal AES parameters.
  837|  12.2k|            rijndael_native_decryptBlock(cx, out, in);
  838|  12.2k|            native_xorBlock(out, out, &in[-AES_BLOCK_SIZE]);
  ------------------
  |  |  130|  12.2k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  839|  12.2k|        } else {
  840|      0|            rijndael_decryptBlock128(cx, out, in);
  841|      0|            xorBlock(out, out, &in[-AES_BLOCK_SIZE]);
  ------------------
  |  |  130|      0|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  842|      0|        }
  843|  12.2k|        out -= AES_BLOCK_SIZE;
  ------------------
  |  |  130|  12.2k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  844|  12.2k|        in -= AES_BLOCK_SIZE;
  ------------------
  |  |  130|  12.2k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  845|  12.2k|        inputLen -= AES_BLOCK_SIZE;
  ------------------
  |  |  130|  12.2k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  846|  12.2k|    }
  847|  3.04k|    if (in == input) {
  ------------------
  |  Branch (847:9): [True: 3.04k, False: 0]
  ------------------
  848|  3.04k|        if (aesni) {
  ------------------
  |  Branch (848:13): [True: 3.04k, False: 0]
  ------------------
  849|  3.04k|            rijndael_native_decryptBlock(cx, out, in);
  850|  3.04k|            native_xorBlock(out, out, cx->iv);
  851|  3.04k|        } else {
  852|      0|            rijndael_decryptBlock128(cx, out, in);
  853|      0|            xorBlock(out, out, cx->iv);
  854|      0|        }
  855|  3.04k|    }
  856|  3.04k|    memcpy(cx->iv, newIV, AES_BLOCK_SIZE);
  ------------------
  |  |  130|  3.04k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  857|  3.04k|    return SECSuccess;
  858|  3.04k|}
rijndael.c:freeblCipher_rijndael_encryptECB:
  865|  14.7k|    {                                                                                       \
  866|  14.7k|        ctxtype *ctx = vctx;                                                                \
  867|  14.7k|        return mmm(ctx, output, outputLen, maxOutputLen, input, inputLen, blocksize);       \
  868|  14.7k|    }
rijndael.c:rijndael_encryptECB:
  748|  14.7k|{
  749|  14.7k|    PORT_Assert(blocksize == AES_BLOCK_SIZE);
  ------------------
  |  |  120|  14.7k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  14.7k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 14.7k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  750|  14.7k|    PRBool aesni = aesni_support();
  751|  29.4k|    while (inputLen > 0) {
  ------------------
  |  Branch (751:12): [True: 14.7k, False: 14.7k]
  ------------------
  752|  14.7k|        if (aesni) {
  ------------------
  |  Branch (752:13): [True: 14.7k, False: 0]
  ------------------
  753|  14.7k|            rijndael_native_encryptBlock(cx, output, input);
  754|  14.7k|        } else {
  755|      0|            rijndael_encryptBlock128(cx, output, input);
  756|      0|        }
  757|  14.7k|        output += AES_BLOCK_SIZE;
  ------------------
  |  |  130|  14.7k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  758|  14.7k|        input += AES_BLOCK_SIZE;
  ------------------
  |  |  130|  14.7k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  759|  14.7k|        inputLen -= AES_BLOCK_SIZE;
  ------------------
  |  |  130|  14.7k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  760|  14.7k|    }
  761|  14.7k|    return SECSuccess;
  762|  14.7k|}
rijndael.c:rijndael_key_expansion:
  386|    418|{
  387|    418|    unsigned int i;
  388|    418|    PRUint32 *W;
  389|    418|    PRUint32 *pW;
  390|    418|    PRUint32 tmp;
  391|    418|    unsigned int round_key_words = cx->Nb * (cx->Nr + 1);
  392|    418|    if (Nk == 7) {
  ------------------
  |  Branch (392:9): [True: 0, False: 418]
  ------------------
  393|      0|        rijndael_key_expansion7(cx, key, Nk);
  394|      0|        return;
  395|      0|    }
  396|    418|    W = cx->k.expandedKey;
  397|       |    /* The first Nk words contain the input cipher key */
  398|    418|    memcpy(W, key, Nk * 4);
  399|    418|    i = Nk;
  400|    418|    pW = W + i - 1;
  401|       |    /* Loop over all sets of Nk words, except the last */
  402|  3.11k|    while (i < round_key_words - Nk) {
  ------------------
  |  Branch (402:12): [True: 2.70k, False: 418]
  ------------------
  403|  2.70k|        tmp = *pW++;
  404|  2.70k|        tmp = SUBBYTE(ROTBYTE(tmp)) ^ Rcon[i / Nk - 1];
  ------------------
  |  |  334|  2.70k|    ((((PRUint32)SBOX((w >> 24) & 0xff)) << 24) | \
  |  |  ------------------
  |  |  |  |  135|  2.70k|#define SBOX(b) ((PRUint8)_T3[b])
  |  |  ------------------
  |  |  335|  2.70k|     (((PRUint32)SBOX((w >> 16) & 0xff)) << 16) | \
  |  |  ------------------
  |  |  |  |  135|  2.70k|#define SBOX(b) ((PRUint8)_T3[b])
  |  |  ------------------
  |  |  336|  2.70k|     (((PRUint32)SBOX((w >> 8) & 0xff)) << 8) |   \
  |  |  ------------------
  |  |  |  |  135|  2.70k|#define SBOX(b) ((PRUint8)_T3[b])
  |  |  ------------------
  |  |  337|  2.70k|     (((PRUint32)SBOX((w)&0xff))))
  |  |  ------------------
  |  |  |  |  135|  2.70k|#define SBOX(b) ((PRUint8)_T3[b])
  |  |  ------------------
  ------------------
  405|  2.70k|        *pW = W[i++ - Nk] ^ tmp;
  406|  2.70k|        tmp = *pW++;
  407|  2.70k|        *pW = W[i++ - Nk] ^ tmp;
  408|  2.70k|        tmp = *pW++;
  409|  2.70k|        *pW = W[i++ - Nk] ^ tmp;
  410|  2.70k|        tmp = *pW++;
  411|  2.70k|        *pW = W[i++ - Nk] ^ tmp;
  412|  2.70k|        if (Nk == 4)
  ------------------
  |  Branch (412:13): [True: 576, False: 2.12k]
  ------------------
  413|    576|            continue;
  414|  2.12k|        switch (Nk) {
  ------------------
  |  Branch (414:17): [True: 0, False: 2.12k]
  ------------------
  415|  2.12k|            case 8:
  ------------------
  |  Branch (415:13): [True: 2.12k, False: 0]
  ------------------
  416|  2.12k|                tmp = *pW++;
  417|  2.12k|                tmp = SUBBYTE(tmp);
  ------------------
  |  |  334|  2.12k|    ((((PRUint32)SBOX((w >> 24) & 0xff)) << 24) | \
  |  |  ------------------
  |  |  |  |  135|  2.12k|#define SBOX(b) ((PRUint8)_T3[b])
  |  |  ------------------
  |  |  335|  2.12k|     (((PRUint32)SBOX((w >> 16) & 0xff)) << 16) | \
  |  |  ------------------
  |  |  |  |  135|  2.12k|#define SBOX(b) ((PRUint8)_T3[b])
  |  |  ------------------
  |  |  336|  2.12k|     (((PRUint32)SBOX((w >> 8) & 0xff)) << 8) |   \
  |  |  ------------------
  |  |  |  |  135|  2.12k|#define SBOX(b) ((PRUint8)_T3[b])
  |  |  ------------------
  |  |  337|  2.12k|     (((PRUint32)SBOX((w)&0xff))))
  |  |  ------------------
  |  |  |  |  135|  2.12k|#define SBOX(b) ((PRUint8)_T3[b])
  |  |  ------------------
  ------------------
  418|  2.12k|                *pW = W[i++ - Nk] ^ tmp;
  419|  2.12k|            case 7:
  ------------------
  |  Branch (419:13): [True: 0, False: 2.12k]
  ------------------
  420|  2.12k|                tmp = *pW++;
  421|  2.12k|                *pW = W[i++ - Nk] ^ tmp;
  422|  2.12k|            case 6:
  ------------------
  |  Branch (422:13): [True: 0, False: 2.12k]
  ------------------
  423|  2.12k|                tmp = *pW++;
  424|  2.12k|                *pW = W[i++ - Nk] ^ tmp;
  425|  2.12k|            case 5:
  ------------------
  |  Branch (425:13): [True: 0, False: 2.12k]
  ------------------
  426|  2.12k|                tmp = *pW++;
  427|  2.12k|                *pW = W[i++ - Nk] ^ tmp;
  428|  2.12k|        }
  429|  2.12k|    }
  430|       |    /* Generate the last word */
  431|    418|    tmp = *pW++;
  432|    418|    tmp = SUBBYTE(ROTBYTE(tmp)) ^ Rcon[i / Nk - 1];
  ------------------
  |  |  334|    418|    ((((PRUint32)SBOX((w >> 24) & 0xff)) << 24) | \
  |  |  ------------------
  |  |  |  |  135|    418|#define SBOX(b) ((PRUint8)_T3[b])
  |  |  ------------------
  |  |  335|    418|     (((PRUint32)SBOX((w >> 16) & 0xff)) << 16) | \
  |  |  ------------------
  |  |  |  |  135|    418|#define SBOX(b) ((PRUint8)_T3[b])
  |  |  ------------------
  |  |  336|    418|     (((PRUint32)SBOX((w >> 8) & 0xff)) << 8) |   \
  |  |  ------------------
  |  |  |  |  135|    418|#define SBOX(b) ((PRUint8)_T3[b])
  |  |  ------------------
  |  |  337|    418|     (((PRUint32)SBOX((w)&0xff))))
  |  |  ------------------
  |  |  |  |  135|    418|#define SBOX(b) ((PRUint8)_T3[b])
  |  |  ------------------
  ------------------
  433|    418|    *pW = W[i++ - Nk] ^ tmp;
  434|       |    /* There may be overflow here, if Nk % (Nb * (Nr + 1)) > 0.  However,
  435|       |     * since the above loop generated all but the last Nk key words, there
  436|       |     * is no more need for the SubByte transformation.
  437|       |     */
  438|    418|    if (Nk < 8) {
  ------------------
  |  Branch (438:9): [True: 64, False: 354]
  ------------------
  439|    256|        for (; i < round_key_words; ++i) {
  ------------------
  |  Branch (439:16): [True: 192, False: 64]
  ------------------
  440|    192|            tmp = *pW++;
  441|    192|            *pW = W[i - Nk] ^ tmp;
  442|    192|        }
  443|    354|    } else {
  444|       |        /* except in the case when Nk == 8.  Then one more SubByte may have
  445|       |         * to be performed, at i % Nk == 4.
  446|       |         */
  447|  1.41k|        for (; i < round_key_words; ++i) {
  ------------------
  |  Branch (447:16): [True: 1.06k, False: 354]
  ------------------
  448|  1.06k|            tmp = *pW++;
  449|  1.06k|            if (i % Nk == 4)
  ------------------
  |  Branch (449:17): [True: 0, False: 1.06k]
  ------------------
  450|      0|                tmp = SUBBYTE(tmp);
  ------------------
  |  |  334|      0|    ((((PRUint32)SBOX((w >> 24) & 0xff)) << 24) | \
  |  |  ------------------
  |  |  |  |  135|      0|#define SBOX(b) ((PRUint8)_T3[b])
  |  |  ------------------
  |  |  335|      0|     (((PRUint32)SBOX((w >> 16) & 0xff)) << 16) | \
  |  |  ------------------
  |  |  |  |  135|      0|#define SBOX(b) ((PRUint8)_T3[b])
  |  |  ------------------
  |  |  336|      0|     (((PRUint32)SBOX((w >> 8) & 0xff)) << 8) |   \
  |  |  ------------------
  |  |  |  |  135|      0|#define SBOX(b) ((PRUint8)_T3[b])
  |  |  ------------------
  |  |  337|      0|     (((PRUint32)SBOX((w)&0xff))))
  |  |  ------------------
  |  |  |  |  135|      0|#define SBOX(b) ((PRUint8)_T3[b])
  |  |  ------------------
  ------------------
  451|  1.06k|            *pW = W[i - Nk] ^ tmp;
  452|  1.06k|        }
  453|    354|    }
  454|    418|}
rijndael.c:rijndael_invkey_expansion:
  463|    209|{
  464|    209|    unsigned int r;
  465|    209|    PRUint32 *roundkeyw;
  466|    209|    PRUint8 *b;
  467|    209|    int Nb = cx->Nb;
  468|       |    /* begins like usual key expansion ... */
  469|    209|    rijndael_key_expansion(cx, key, Nk);
  470|       |    /* ... but has the additional step of InvMixColumn,
  471|       |     * excepting the first and last round keys.
  472|       |     */
  473|    209|    roundkeyw = cx->k.expandedKey + cx->Nb;
  474|  2.79k|    for (r = 1; r < cx->Nr; ++r) {
  ------------------
  |  Branch (474:17): [True: 2.58k, False: 209]
  ------------------
  475|       |        /* each key word, roundkeyw, represents a column in the key
  476|       |         * matrix.  Each column is multiplied by the InvMixColumn matrix.
  477|       |         *   [ 0E 0B 0D 09 ]   [ b0 ]
  478|       |         *   [ 09 0E 0B 0D ] * [ b1 ]
  479|       |         *   [ 0D 09 0E 0B ]   [ b2 ]
  480|       |         *   [ 0B 0D 09 0E ]   [ b3 ]
  481|       |         */
  482|  2.58k|        b = (PRUint8 *)roundkeyw;
  483|  2.58k|        *roundkeyw++ = IMXC0(b[0]) ^ IMXC1(b[1]) ^ IMXC2(b[2]) ^ IMXC3(b[3]);
  ------------------
  |  |  129|  2.58k|#define IMXC0(b) _IMXC0[b]
  ------------------
                      *roundkeyw++ = IMXC0(b[0]) ^ IMXC1(b[1]) ^ IMXC2(b[2]) ^ IMXC3(b[3]);
  ------------------
  |  |  130|  2.58k|#define IMXC1(b) _IMXC1[b]
  ------------------
                      *roundkeyw++ = IMXC0(b[0]) ^ IMXC1(b[1]) ^ IMXC2(b[2]) ^ IMXC3(b[3]);
  ------------------
  |  |  131|  2.58k|#define IMXC2(b) _IMXC2[b]
  ------------------
                      *roundkeyw++ = IMXC0(b[0]) ^ IMXC1(b[1]) ^ IMXC2(b[2]) ^ IMXC3(b[3]);
  ------------------
  |  |  132|  2.58k|#define IMXC3(b) _IMXC3[b]
  ------------------
  484|  2.58k|        b = (PRUint8 *)roundkeyw;
  485|  2.58k|        *roundkeyw++ = IMXC0(b[0]) ^ IMXC1(b[1]) ^ IMXC2(b[2]) ^ IMXC3(b[3]);
  ------------------
  |  |  129|  2.58k|#define IMXC0(b) _IMXC0[b]
  ------------------
                      *roundkeyw++ = IMXC0(b[0]) ^ IMXC1(b[1]) ^ IMXC2(b[2]) ^ IMXC3(b[3]);
  ------------------
  |  |  130|  2.58k|#define IMXC1(b) _IMXC1[b]
  ------------------
                      *roundkeyw++ = IMXC0(b[0]) ^ IMXC1(b[1]) ^ IMXC2(b[2]) ^ IMXC3(b[3]);
  ------------------
  |  |  131|  2.58k|#define IMXC2(b) _IMXC2[b]
  ------------------
                      *roundkeyw++ = IMXC0(b[0]) ^ IMXC1(b[1]) ^ IMXC2(b[2]) ^ IMXC3(b[3]);
  ------------------
  |  |  132|  2.58k|#define IMXC3(b) _IMXC3[b]
  ------------------
  486|  2.58k|        b = (PRUint8 *)roundkeyw;
  487|  2.58k|        *roundkeyw++ = IMXC0(b[0]) ^ IMXC1(b[1]) ^ IMXC2(b[2]) ^ IMXC3(b[3]);
  ------------------
  |  |  129|  2.58k|#define IMXC0(b) _IMXC0[b]
  ------------------
                      *roundkeyw++ = IMXC0(b[0]) ^ IMXC1(b[1]) ^ IMXC2(b[2]) ^ IMXC3(b[3]);
  ------------------
  |  |  130|  2.58k|#define IMXC1(b) _IMXC1[b]
  ------------------
                      *roundkeyw++ = IMXC0(b[0]) ^ IMXC1(b[1]) ^ IMXC2(b[2]) ^ IMXC3(b[3]);
  ------------------
  |  |  131|  2.58k|#define IMXC2(b) _IMXC2[b]
  ------------------
                      *roundkeyw++ = IMXC0(b[0]) ^ IMXC1(b[1]) ^ IMXC2(b[2]) ^ IMXC3(b[3]);
  ------------------
  |  |  132|  2.58k|#define IMXC3(b) _IMXC3[b]
  ------------------
  488|  2.58k|        b = (PRUint8 *)roundkeyw;
  489|  2.58k|        *roundkeyw++ = IMXC0(b[0]) ^ IMXC1(b[1]) ^ IMXC2(b[2]) ^ IMXC3(b[3]);
  ------------------
  |  |  129|  2.58k|#define IMXC0(b) _IMXC0[b]
  ------------------
                      *roundkeyw++ = IMXC0(b[0]) ^ IMXC1(b[1]) ^ IMXC2(b[2]) ^ IMXC3(b[3]);
  ------------------
  |  |  130|  2.58k|#define IMXC1(b) _IMXC1[b]
  ------------------
                      *roundkeyw++ = IMXC0(b[0]) ^ IMXC1(b[1]) ^ IMXC2(b[2]) ^ IMXC3(b[3]);
  ------------------
  |  |  131|  2.58k|#define IMXC2(b) _IMXC2[b]
  ------------------
                      *roundkeyw++ = IMXC0(b[0]) ^ IMXC1(b[1]) ^ IMXC2(b[2]) ^ IMXC3(b[3]);
  ------------------
  |  |  132|  2.58k|#define IMXC3(b) _IMXC3[b]
  ------------------
  490|  2.58k|        if (Nb <= 4)
  ------------------
  |  Branch (490:13): [True: 2.58k, False: 0]
  ------------------
  491|  2.58k|            continue;
  492|      0|        switch (Nb) {
  ------------------
  |  Branch (492:17): [True: 0, False: 0]
  ------------------
  493|      0|            case 8:
  ------------------
  |  Branch (493:13): [True: 0, False: 0]
  ------------------
  494|      0|                b = (PRUint8 *)roundkeyw;
  495|      0|                *roundkeyw++ = IMXC0(b[0]) ^ IMXC1(b[1]) ^
  ------------------
  |  |  129|      0|#define IMXC0(b) _IMXC0[b]
  ------------------
                              *roundkeyw++ = IMXC0(b[0]) ^ IMXC1(b[1]) ^
  ------------------
  |  |  130|      0|#define IMXC1(b) _IMXC1[b]
  ------------------
  496|      0|                               IMXC2(b[2]) ^ IMXC3(b[3]);
  ------------------
  |  |  131|      0|#define IMXC2(b) _IMXC2[b]
  ------------------
                                             IMXC2(b[2]) ^ IMXC3(b[3]);
  ------------------
  |  |  132|      0|#define IMXC3(b) _IMXC3[b]
  ------------------
  497|      0|            case 7:
  ------------------
  |  Branch (497:13): [True: 0, False: 0]
  ------------------
  498|      0|                b = (PRUint8 *)roundkeyw;
  499|      0|                *roundkeyw++ = IMXC0(b[0]) ^ IMXC1(b[1]) ^
  ------------------
  |  |  129|      0|#define IMXC0(b) _IMXC0[b]
  ------------------
                              *roundkeyw++ = IMXC0(b[0]) ^ IMXC1(b[1]) ^
  ------------------
  |  |  130|      0|#define IMXC1(b) _IMXC1[b]
  ------------------
  500|      0|                               IMXC2(b[2]) ^ IMXC3(b[3]);
  ------------------
  |  |  131|      0|#define IMXC2(b) _IMXC2[b]
  ------------------
                                             IMXC2(b[2]) ^ IMXC3(b[3]);
  ------------------
  |  |  132|      0|#define IMXC3(b) _IMXC3[b]
  ------------------
  501|      0|            case 6:
  ------------------
  |  Branch (501:13): [True: 0, False: 0]
  ------------------
  502|      0|                b = (PRUint8 *)roundkeyw;
  503|      0|                *roundkeyw++ = IMXC0(b[0]) ^ IMXC1(b[1]) ^
  ------------------
  |  |  129|      0|#define IMXC0(b) _IMXC0[b]
  ------------------
                              *roundkeyw++ = IMXC0(b[0]) ^ IMXC1(b[1]) ^
  ------------------
  |  |  130|      0|#define IMXC1(b) _IMXC1[b]
  ------------------
  504|      0|                               IMXC2(b[2]) ^ IMXC3(b[3]);
  ------------------
  |  |  131|      0|#define IMXC2(b) _IMXC2[b]
  ------------------
                                             IMXC2(b[2]) ^ IMXC3(b[3]);
  ------------------
  |  |  132|      0|#define IMXC3(b) _IMXC3[b]
  ------------------
  505|      0|            case 5:
  ------------------
  |  Branch (505:13): [True: 0, False: 0]
  ------------------
  506|      0|                b = (PRUint8 *)roundkeyw;
  507|      0|                *roundkeyw++ = IMXC0(b[0]) ^ IMXC1(b[1]) ^
  ------------------
  |  |  129|      0|#define IMXC0(b) _IMXC0[b]
  ------------------
                              *roundkeyw++ = IMXC0(b[0]) ^ IMXC1(b[1]) ^
  ------------------
  |  |  130|      0|#define IMXC1(b) _IMXC1[b]
  ------------------
  508|      0|                               IMXC2(b[2]) ^ IMXC3(b[3]);
  ------------------
  |  |  131|      0|#define IMXC2(b) _IMXC2[b]
  ------------------
                                             IMXC2(b[2]) ^ IMXC3(b[3]);
  ------------------
  |  |  132|      0|#define IMXC3(b) _IMXC3[b]
  ------------------
  509|      0|        }
  510|      0|    }
  511|    209|}
rijndael.c:freeblAead_GCM_EncryptAEAD:
  965|    299|    {                                                                                                                 \
  966|    299|        ctxtype *ctx = vctx;                                                                                          \
  967|    299|        return mmm(ctx, output, outputLen, maxOutputLen, input, inputLen, params, paramsLen, aad, aadLen, blocksize); \
  968|    299|    }
rijndael.c:freeblAead_GCM_DecryptAEAD:
  965|  6.09k|    {                                                                                                                 \
  966|  6.09k|        ctxtype *ctx = vctx;                                                                                          \
  967|  6.09k|        return mmm(ctx, output, outputLen, maxOutputLen, input, inputLen, params, paramsLen, aad, aadLen, blocksize); \
  968|  6.09k|    }
rijndael.c:freeblDestroy_GCM_DestroyContext:
  983|  1.63k|    {                                                          \
  984|  1.63k|        ctxtype *ctx = vctx;                                   \
  985|  1.63k|        mmm(ctx, freeit);                                      \
  986|  1.63k|    }

RSA_PublicKeyOp:
  934|  2.41k|{
  935|  2.41k|    unsigned int modLen, expLen, offset;
  936|  2.41k|    mp_int n, e, m, c;
  937|  2.41k|    mp_err err = MP_OKAY;
  ------------------
  |  |   39|  2.41k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  938|  2.41k|    SECStatus rv = SECSuccess;
  939|  2.41k|    if (!key || !output || !input) {
  ------------------
  |  Branch (939:9): [True: 0, False: 2.41k]
  |  Branch (939:17): [True: 0, False: 2.41k]
  |  Branch (939:28): [True: 0, False: 2.41k]
  ------------------
  940|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  941|      0|        return SECFailure;
  942|      0|    }
  943|  2.41k|    MP_DIGITS(&n) = 0;
  ------------------
  |  |  152|  2.41k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
  944|  2.41k|    MP_DIGITS(&e) = 0;
  ------------------
  |  |  152|  2.41k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
  945|  2.41k|    MP_DIGITS(&m) = 0;
  ------------------
  |  |  152|  2.41k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
  946|  2.41k|    MP_DIGITS(&c) = 0;
  ------------------
  |  |  152|  2.41k|#define MP_DIGITS(MP) ((MP)->dp)
  ------------------
  947|  2.41k|    CHECK_MPI_OK(mp_init(&n));
  ------------------
  |  |   12|  2.41k|    if (MP_OKAY > (err = func)) \
  |  |  ------------------
  |  |  |  |   39|  2.41k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (12:9): [True: 0, False: 2.41k]
  |  |  ------------------
  |  |   13|  2.41k|    goto cleanup
  ------------------
  948|  2.41k|    CHECK_MPI_OK(mp_init(&e));
  ------------------
  |  |   12|  2.41k|    if (MP_OKAY > (err = func)) \
  |  |  ------------------
  |  |  |  |   39|  2.41k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (12:9): [True: 0, False: 2.41k]
  |  |  ------------------
  |  |   13|  2.41k|    goto cleanup
  ------------------
  949|  2.41k|    CHECK_MPI_OK(mp_init(&m));
  ------------------
  |  |   12|  2.41k|    if (MP_OKAY > (err = func)) \
  |  |  ------------------
  |  |  |  |   39|  2.41k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (12:9): [True: 0, False: 2.41k]
  |  |  ------------------
  |  |   13|  2.41k|    goto cleanup
  ------------------
  950|  2.41k|    CHECK_MPI_OK(mp_init(&c));
  ------------------
  |  |   12|  2.41k|    if (MP_OKAY > (err = func)) \
  |  |  ------------------
  |  |  |  |   39|  2.41k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (12:9): [True: 0, False: 2.41k]
  |  |  ------------------
  |  |   13|  2.41k|    goto cleanup
  ------------------
  951|  2.41k|    modLen = rsa_modulusLen(&key->modulus);
  952|  2.41k|    expLen = rsa_modulusLen(&key->publicExponent);
  953|       |
  954|  2.41k|    if (modLen == 0) {
  ------------------
  |  Branch (954:9): [True: 0, False: 2.41k]
  ------------------
  955|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  956|      0|        rv = SECFailure;
  957|      0|        goto cleanup;
  958|      0|    }
  959|       |
  960|       |    /* 1.  Obtain public key (n, e) */
  961|  2.41k|    if (BAD_RSA_KEY_SIZE(modLen, expLen)) {
  ------------------
  |  |   47|  2.41k|    ((expLen) > (modLen) || (modLen) > RSA_MAX_MODULUS_BITS / 8 || \
  |  |  ------------------
  |  |  |  |  152|  2.41k|#define RSA_MAX_MODULUS_BITS 16384
  |  |  ------------------
  |  |  |  Branch (47:6): [True: 0, False: 2.41k]
  |  |  |  Branch (47:29): [True: 0, False: 2.41k]
  |  |  ------------------
  |  |   48|  2.41k|     (expLen) > RSA_MAX_EXPONENT_BITS / 8)
  |  |  ------------------
  |  |  |  |  153|  2.41k|#define RSA_MAX_EXPONENT_BITS 64
  |  |  ------------------
  |  |  |  Branch (48:6): [True: 0, False: 2.41k]
  |  |  ------------------
  ------------------
  962|      0|        PORT_SetError(SEC_ERROR_INVALID_KEY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  963|      0|        rv = SECFailure;
  964|      0|        goto cleanup;
  965|      0|    }
  966|  2.41k|    SECITEM_TO_MPINT(key->modulus, &n);
  ------------------
  |  |   19|  2.41k|    CHECK_MPI_OK(mp_read_unsigned_octets((mp), (it).data, (it).len))
  |  |  ------------------
  |  |  |  |   12|  2.41k|    if (MP_OKAY > (err = func)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|  2.41k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (12:9): [True: 0, False: 2.41k]
  |  |  |  |  ------------------
  |  |  |  |   13|  2.41k|    goto cleanup
  |  |  ------------------
  ------------------
  967|  2.41k|    SECITEM_TO_MPINT(key->publicExponent, &e);
  ------------------
  |  |   19|  2.41k|    CHECK_MPI_OK(mp_read_unsigned_octets((mp), (it).data, (it).len))
  |  |  ------------------
  |  |  |  |   12|  2.41k|    if (MP_OKAY > (err = func)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|  2.41k|#define MP_OKAY 0    /* no error, all is well */
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (12:9): [True: 0, False: 2.41k]
  |  |  |  |  ------------------
  |  |  |  |   13|  2.41k|    goto cleanup
  |  |  ------------------
  ------------------
  968|  2.41k|    if (e.used > n.used) {
  ------------------
  |  Branch (968:9): [True: 0, False: 2.41k]
  ------------------
  969|       |        /* exponent should not be greater than modulus */
  970|      0|        PORT_SetError(SEC_ERROR_INVALID_KEY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  971|      0|        rv = SECFailure;
  972|      0|        goto cleanup;
  973|      0|    }
  974|       |    /* 2. check input out of range (needs to be in range [0..n-1]) */
  975|  2.41k|    offset = (key->modulus.data[0] == 0) ? 1 : 0; /* may be leading 0 */
  ------------------
  |  Branch (975:14): [True: 0, False: 2.41k]
  ------------------
  976|  2.41k|    if (memcmp(input, key->modulus.data + offset, modLen) >= 0) {
  ------------------
  |  Branch (976:9): [True: 13, False: 2.39k]
  ------------------
  977|     13|        PORT_SetError(SEC_ERROR_INPUT_LEN);
  ------------------
  |  |   65|     13|#define PORT_SetError PORT_SetError_Util
  ------------------
  978|     13|        rv = SECFailure;
  979|     13|        goto cleanup;
  980|     13|    }
  981|       |    /* 2 bis.  Represent message as integer in range [0..n-1] */
  982|  2.39k|    CHECK_MPI_OK(mp_read_unsigned_octets(&m, input, modLen));
  ------------------
  |  |   12|  2.39k|    if (MP_OKAY > (err = func)) \
  |  |  ------------------
  |  |  |  |   39|  2.39k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (12:9): [True: 0, False: 2.39k]
  |  |  ------------------
  |  |   13|  2.39k|    goto cleanup
  ------------------
  983|       |/* 3.  Compute c = m**e mod n */
  984|       |#ifdef USE_MPI_EXPT_D
  985|       |    /* XXX see which is faster */
  986|       |    if (MP_USED(&e) == 1) {
  987|       |        CHECK_MPI_OK(mp_exptmod_d(&m, MP_DIGIT(&e, 0), &n, &c));
  988|       |    } else
  989|       |#endif
  990|  2.39k|        CHECK_MPI_OK(mp_exptmod(&m, &e, &n, &c));
  ------------------
  |  |   12|  2.39k|    if (MP_OKAY > (err = func)) \
  |  |  ------------------
  |  |  |  |   39|  2.39k|#define MP_OKAY 0    /* no error, all is well */
  |  |  ------------------
  |  |  |  Branch (12:9): [True: 0, False: 2.39k]
  |  |  ------------------
  |  |   13|  2.39k|    goto cleanup
  ------------------
  991|       |    /* 4.  result c is ciphertext */
  992|  2.39k|    err = mp_to_fixlen_octets(&c, output, modLen);
  993|  2.39k|    if (err >= 0)
  ------------------
  |  Branch (993:9): [True: 2.39k, False: 0]
  ------------------
  994|  2.39k|        err = MP_OKAY;
  ------------------
  |  |   39|  2.39k|#define MP_OKAY 0    /* no error, all is well */
  ------------------
  995|  2.41k|cleanup:
  996|  2.41k|    mp_clear(&n);
  997|  2.41k|    mp_clear(&e);
  998|  2.41k|    mp_clear(&m);
  999|  2.41k|    mp_clear(&c);
 1000|  2.41k|    if (err) {
  ------------------
  |  Branch (1000:9): [True: 0, False: 2.41k]
  ------------------
 1001|      0|        MP_TO_SEC_ERROR(err);
  ------------------
  |  |   41|      0|    switch (err) {                                    \
  |  |   42|      0|        case MP_MEM:                                  \
  |  |  ------------------
  |  |  |  |   42|      0|#define MP_MEM -2    /* out of memory         */
  |  |  ------------------
  |  |  |  Branch (42:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   43|      0|            PORT_SetError(SEC_ERROR_NO_MEMORY);       \
  |  |  ------------------
  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  ------------------
  |  |   44|      0|            break;                                    \
  |  |   45|      0|        case MP_RANGE:                                \
  |  |  ------------------
  |  |  |  |   43|      0|#define MP_RANGE -3  /* argument out of range */
  |  |  ------------------
  |  |  |  Branch (45:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   46|      0|            PORT_SetError(SEC_ERROR_BAD_DATA);        \
  |  |  ------------------
  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  ------------------
  |  |   47|      0|            break;                                    \
  |  |   48|      0|        case MP_BADARG:                               \
  |  |  ------------------
  |  |  |  |   44|      0|#define MP_BADARG -4 /* invalid parameter     */
  |  |  ------------------
  |  |  |  Branch (48:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|            PORT_SetError(SEC_ERROR_INVALID_ARGS);    \
  |  |  ------------------
  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  ------------------
  |  |   50|      0|            break;                                    \
  |  |   51|      0|        default:                                      \
  |  |  ------------------
  |  |  |  Branch (51:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   52|      0|            PORT_SetError(SEC_ERROR_LIBRARY_FAILURE); \
  |  |  ------------------
  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  ------------------
  |  |   53|      0|            break;                                    \
  |  |   54|      0|    }
  ------------------
 1002|      0|        rv = SECFailure;
 1003|      0|    }
 1004|  2.41k|    return rv;
 1005|  2.41k|}
RSA_Init:
 1670|      1|{
 1671|      1|    if (PR_CallOnce(&coBPInit, init_blinding_params_list) != PR_SUCCESS) {
  ------------------
  |  Branch (1671:9): [True: 0, False: 1]
  ------------------
 1672|      0|        PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1673|      0|        return SECFailure;
 1674|      0|    }
 1675|      1|    return SECSuccess;
 1676|      1|}
RSA_Cleanup:
 1681|      1|{
 1682|      1|    blindingParams *bp = NULL;
 1683|      1|    if (!coBPInit.initialized)
  ------------------
  |  Branch (1683:9): [True: 0, False: 1]
  ------------------
 1684|      0|        return;
 1685|       |
 1686|      1|    while (!PR_CLIST_IS_EMPTY(&blindingParamsList.head)) {
  ------------------
  |  |   94|      1|    ((_l)->next == (_l))
  ------------------
  |  Branch (1686:12): [True: 0, False: 1]
  ------------------
 1687|      0|        RSABlindingParams *rsabp =
 1688|      0|            (RSABlindingParams *)PR_LIST_HEAD(&blindingParamsList.head);
  ------------------
  |  |   65|      0|#define PR_LIST_HEAD(_l) (_l)->next
  ------------------
 1689|      0|        PR_REMOVE_LINK(&rsabp->link);
  ------------------
  |  |   72|      0|    PR_BEGIN_MACRO             \
  |  |  ------------------
  |  |  |  |  123|      0|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |   73|      0|    (_e)->prev->next = (_e)->next; \
  |  |   74|      0|    (_e)->next->prev = (_e)->prev; \
  |  |   75|      0|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|      0|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1690|       |        /* clear parameters cache */
 1691|      0|        while (rsabp->bp != NULL) {
  ------------------
  |  Branch (1691:16): [True: 0, False: 0]
  ------------------
 1692|      0|            bp = rsabp->bp;
 1693|      0|            rsabp->bp = rsabp->bp->next;
 1694|      0|            mp_clear(&bp->f);
 1695|      0|            mp_clear(&bp->g);
 1696|      0|        }
 1697|      0|        SECITEM_ZfreeItem(&rsabp->modulus, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                      SECITEM_ZfreeItem(&rsabp->modulus, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 1698|      0|        PORT_Free(rsabp);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 1699|      0|    }
 1700|       |
 1701|      1|    if (blindingParamsList.cVar) {
  ------------------
  |  Branch (1701:9): [True: 1, False: 0]
  ------------------
 1702|      1|        PR_DestroyCondVar(blindingParamsList.cVar);
 1703|      1|        blindingParamsList.cVar = NULL;
 1704|      1|    }
 1705|       |
 1706|      1|    if (blindingParamsList.lock) {
  ------------------
  |  Branch (1706:9): [True: 1, False: 0]
  ------------------
 1707|      1|        SKIP_AFTER_FORK(PZ_DestroyLock(blindingParamsList.lock));
  ------------------
  |  |   42|      1|    if (!bl_parentForkedAfterC_Initialize) \
  |  |  ------------------
  |  |  |  Branch (42:9): [True: 1, False: 0]
  |  |  ------------------
  |  |   43|      1|    x
  ------------------
 1708|      1|        blindingParamsList.lock = NULL;
 1709|      1|    }
 1710|       |
 1711|      1|    coBPInit.initialized = 0;
 1712|      1|    coBPInit.inProgress = 0;
 1713|      1|    coBPInit.status = 0;
 1714|      1|}
BL_Cleanup:
 1723|      1|{
 1724|      1|    RSA_Cleanup();
 1725|      1|}
BL_SetForkState:
 1734|      2|{
 1735|      2|    bl_parentForkedAfterC_Initialize = forked;
 1736|      2|}
rsa.c:rsa_modulusLen:
  917|  4.82k|{
  918|  4.82k|    if (modulus->len == 0) {
  ------------------
  |  Branch (918:9): [True: 0, False: 4.82k]
  ------------------
  919|      0|        return 0;
  920|  4.82k|    };
  921|  4.82k|    unsigned char byteZero = modulus->data[0];
  922|  4.82k|    unsigned int modLen = modulus->len - !byteZero;
  923|  4.82k|    return modLen;
  924|  4.82k|}
rsa.c:init_blinding_params_list:
 1187|      1|{
 1188|      1|    blindingParamsList.lock = PZ_NewLock(nssILockOther);
  ------------------
  |  |  243|      1|#define PZ_NewLock(t) PR_NewLock()
  ------------------
 1189|      1|    if (!blindingParamsList.lock) {
  ------------------
  |  Branch (1189:9): [True: 0, False: 1]
  ------------------
 1190|      0|        PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1191|      0|        return PR_FAILURE;
 1192|      0|    }
 1193|      1|    blindingParamsList.cVar = PR_NewCondVar(blindingParamsList.lock);
 1194|      1|    if (!blindingParamsList.cVar) {
  ------------------
  |  Branch (1194:9): [True: 0, False: 1]
  ------------------
 1195|      0|        PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1196|      0|        return PR_FAILURE;
 1197|      0|    }
 1198|      1|    blindingParamsList.waitCount = 0;
 1199|      1|    PR_INIT_CLIST(&blindingParamsList.head);
  ------------------
  |  |  100|      1|    PR_BEGIN_MACRO     \
  |  |  ------------------
  |  |  |  |  123|      1|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |  101|      1|    (_l)->next = (_l); \
  |  |  102|      1|    (_l)->prev = (_l); \
  |  |  103|      1|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|      1|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1200|      1|    return PR_SUCCESS;
 1201|      1|}

RSA_EncryptBlock:
  916|  1.26k|{
  917|  1.26k|    SECStatus rv;
  918|  1.26k|    unsigned int modulusLen = rsa_modulusLen(&key->modulus);
  919|  1.26k|    SECItem formatted;
  920|  1.26k|    SECItem unformatted;
  921|       |
  922|  1.26k|    formatted.data = NULL;
  923|  1.26k|    if (maxOutputLen < modulusLen)
  ------------------
  |  Branch (923:9): [True: 0, False: 1.26k]
  ------------------
  924|      0|        goto failure;
  925|       |
  926|  1.26k|    unformatted.len = inputLen;
  927|  1.26k|    unformatted.data = (unsigned char *)input;
  928|  1.26k|    formatted.data = NULL;
  929|  1.26k|    rv = rsa_FormatBlock(&formatted, modulusLen, RSA_BlockPublic,
  930|  1.26k|                         &unformatted);
  931|  1.26k|    if (rv != SECSuccess)
  ------------------
  |  Branch (931:9): [True: 0, False: 1.26k]
  ------------------
  932|      0|        goto failure;
  933|       |
  934|  1.26k|    rv = RSA_PublicKeyOp(key, output, formatted.data);
  935|  1.26k|    if (rv != SECSuccess)
  ------------------
  |  Branch (935:9): [True: 0, False: 1.26k]
  ------------------
  936|      0|        goto failure;
  937|       |
  938|  1.26k|    PORT_ZFree(formatted.data, modulusLen);
  ------------------
  |  |   75|  1.26k|#define PORT_ZFree PORT_ZFree_Util
  ------------------
  939|  1.26k|    *outputLen = modulusLen;
  940|  1.26k|    return SECSuccess;
  941|       |
  942|      0|failure:
  943|      0|    if (formatted.data != NULL)
  ------------------
  |  Branch (943:9): [True: 0, False: 0]
  ------------------
  944|      0|        PORT_ZFree(formatted.data, modulusLen);
  ------------------
  |  |   75|      0|#define PORT_ZFree PORT_ZFree_Util
  ------------------
  945|      0|    return SECFailure;
  946|  1.26k|}
RSA_CheckSignPSS:
 1484|  1.11k|{
 1485|  1.11k|    SECStatus rv;
 1486|  1.11k|    unsigned int modulusLen = rsa_modulusLen(&key->modulus);
 1487|  1.11k|    unsigned int modulusBits = rsa_modulusBits(&key->modulus);
 1488|  1.11k|    unsigned int emLen = modulusLen;
 1489|  1.11k|    unsigned char *buffer, *em;
 1490|       |
 1491|  1.11k|    if (sigLen != modulusLen) {
  ------------------
  |  Branch (1491:9): [True: 6, False: 1.10k]
  ------------------
 1492|      6|        PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
  ------------------
  |  |   65|      6|#define PORT_SetError PORT_SetError_Util
  ------------------
 1493|      6|        return SECFailure;
 1494|      6|    }
 1495|       |
 1496|  1.10k|    if ((hashAlg == HASH_AlgNULL) || (maskHashAlg == HASH_AlgNULL)) {
  ------------------
  |  Branch (1496:9): [True: 0, False: 1.10k]
  |  Branch (1496:38): [True: 0, False: 1.10k]
  ------------------
 1497|      0|        PORT_SetError(SEC_ERROR_INVALID_ALGORITHM);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1498|      0|        return SECFailure;
 1499|      0|    }
 1500|       |
 1501|  1.10k|    buffer = em = (unsigned char *)PORT_Alloc(modulusLen);
  ------------------
  |  |   52|  1.10k|#define PORT_Alloc PORT_Alloc_Util
  ------------------
 1502|  1.10k|    if (!buffer) {
  ------------------
  |  Branch (1502:9): [True: 0, False: 1.10k]
  ------------------
 1503|      0|        PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1504|      0|        return SECFailure;
 1505|      0|    }
 1506|       |
 1507|  1.10k|    rv = RSA_PublicKeyOp(key, buffer, sig);
 1508|  1.10k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1508:9): [True: 9, False: 1.09k]
  ------------------
 1509|      9|        PORT_Free(buffer);
  ------------------
  |  |   60|      9|#define PORT_Free PORT_Free_Util
  ------------------
 1510|      9|        PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
  ------------------
  |  |   65|      9|#define PORT_SetError PORT_SetError_Util
  ------------------
 1511|      9|        return SECFailure;
 1512|      9|    }
 1513|       |
 1514|       |    /* len(em) == ceil((modulusBits - 1) / 8). */
 1515|  1.09k|    if (modulusBits % 8 == 1) {
  ------------------
  |  Branch (1515:9): [True: 0, False: 1.09k]
  ------------------
 1516|      0|        emLen--;
 1517|      0|        em++;
 1518|      0|    }
 1519|  1.09k|    rv = emsa_pss_verify(hash, em, emLen, modulusBits - 1, hashAlg,
 1520|  1.09k|                         maskHashAlg, saltLength);
 1521|       |
 1522|  1.09k|    PORT_Free(buffer);
  ------------------
  |  |   60|  1.09k|#define PORT_Free PORT_Free_Util
  ------------------
 1523|  1.09k|    return rv;
 1524|  1.10k|}
RSA_CheckSign:
 1568|     26|{
 1569|     26|    SECStatus rv = SECFailure;
 1570|     26|    unsigned int modulusLen = rsa_modulusLen(&key->modulus);
 1571|     26|    unsigned int i;
 1572|     26|    unsigned char *buffer = NULL;
 1573|       |
 1574|     26|    if (sigLen != modulusLen) {
  ------------------
  |  Branch (1574:9): [True: 2, False: 24]
  ------------------
 1575|      2|        PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
  ------------------
  |  |   65|      2|#define PORT_SetError PORT_SetError_Util
  ------------------
 1576|      2|        goto done;
 1577|      2|    }
 1578|       |
 1579|       |    /*
 1580|       |     * 0x00 || BT || Pad || 0x00 || ActualData
 1581|       |     *
 1582|       |     * The "3" below is the first octet + the second octet + the 0x00
 1583|       |     * octet that always comes just before the ActualData.
 1584|       |     */
 1585|     24|    if (dataLen > modulusLen - (3 + RSA_BLOCK_MIN_PAD_LEN)) {
  ------------------
  |  |   19|     24|#define RSA_BLOCK_MIN_PAD_LEN 8
  ------------------
  |  Branch (1585:9): [True: 0, False: 24]
  ------------------
 1586|      0|        PORT_SetError(SEC_ERROR_BAD_DATA);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1587|      0|        goto done;
 1588|      0|    }
 1589|       |
 1590|     24|    buffer = (unsigned char *)PORT_Alloc(modulusLen + 1);
  ------------------
  |  |   52|     24|#define PORT_Alloc PORT_Alloc_Util
  ------------------
 1591|     24|    if (!buffer) {
  ------------------
  |  Branch (1591:9): [True: 0, False: 24]
  ------------------
 1592|      0|        PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1593|      0|        goto done;
 1594|      0|    }
 1595|       |
 1596|     24|    if (RSA_PublicKeyOp(key, buffer, sig) != SECSuccess) {
  ------------------
  |  Branch (1596:9): [True: 1, False: 23]
  ------------------
 1597|      1|        PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
  ------------------
  |  |   65|      1|#define PORT_SetError PORT_SetError_Util
  ------------------
 1598|      1|        goto done;
 1599|      1|    }
 1600|       |
 1601|       |    /*
 1602|       |     * check the padding that was used
 1603|       |     */
 1604|     23|    if (buffer[0] != RSA_BLOCK_FIRST_OCTET ||
  ------------------
  |  |   20|     46|#define RSA_BLOCK_FIRST_OCTET 0x00
  ------------------
  |  Branch (1604:9): [True: 6, False: 17]
  ------------------
 1605|     23|        buffer[1] != (unsigned char)RSA_BlockPrivate) {
  ------------------
  |  Branch (1605:9): [True: 1, False: 16]
  ------------------
 1606|      7|        PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
  ------------------
  |  |   65|      7|#define PORT_SetError PORT_SetError_Util
  ------------------
 1607|      7|        goto done;
 1608|      7|    }
 1609|  2.24k|    for (i = 2; i < modulusLen - dataLen - 1; i++) {
  ------------------
  |  Branch (1609:17): [True: 2.23k, False: 15]
  ------------------
 1610|  2.23k|        if (buffer[i] != RSA_BLOCK_PRIVATE_PAD_OCTET) {
  ------------------
  |  |   21|  2.23k|#define RSA_BLOCK_PRIVATE_PAD_OCTET 0xff
  ------------------
  |  Branch (1610:13): [True: 1, False: 2.23k]
  ------------------
 1611|      1|            PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
  ------------------
  |  |   65|      1|#define PORT_SetError PORT_SetError_Util
  ------------------
 1612|      1|            goto done;
 1613|      1|        }
 1614|  2.23k|    }
 1615|     15|    if (buffer[i] != RSA_BLOCK_AFTER_PAD_OCTET) {
  ------------------
  |  |   22|     15|#define RSA_BLOCK_AFTER_PAD_OCTET 0x00
  ------------------
  |  Branch (1615:9): [True: 1, False: 14]
  ------------------
 1616|      1|        PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
  ------------------
  |  |   65|      1|#define PORT_SetError PORT_SetError_Util
  ------------------
 1617|      1|        goto done;
 1618|      1|    }
 1619|       |
 1620|       |    /*
 1621|       |     * make sure we get the same results
 1622|       |     */
 1623|     14|    if (PORT_Memcmp(buffer + modulusLen - dataLen, data, dataLen) == 0) {
  ------------------
  |  |  179|     14|#define PORT_Memcmp memcmp
  ------------------
  |  Branch (1623:9): [True: 0, False: 14]
  ------------------
 1624|      0|        rv = SECSuccess;
 1625|      0|    }
 1626|       |
 1627|     26|done:
 1628|     26|    if (buffer) {
  ------------------
  |  Branch (1628:9): [True: 24, False: 2]
  ------------------
 1629|     24|        PORT_Free(buffer);
  ------------------
  |  |   60|     24|#define PORT_Free PORT_Free_Util
  ------------------
 1630|     24|    }
 1631|     26|    return rv;
 1632|     14|}
RSA_CheckSignRecover:
 1641|     16|{
 1642|     16|    SECStatus rv = SECFailure;
 1643|     16|    unsigned int modulusLen = rsa_modulusLen(&key->modulus);
 1644|     16|    unsigned int i;
 1645|     16|    unsigned char *buffer = NULL;
 1646|     16|    unsigned int padLen;
 1647|       |
 1648|     16|    if (sigLen != modulusLen) {
  ------------------
  |  Branch (1648:9): [True: 3, False: 13]
  ------------------
 1649|      3|        PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
  ------------------
  |  |   65|      3|#define PORT_SetError PORT_SetError_Util
  ------------------
 1650|      3|        goto done;
 1651|      3|    }
 1652|       |
 1653|     13|    buffer = (unsigned char *)PORT_Alloc(modulusLen + 1);
  ------------------
  |  |   52|     13|#define PORT_Alloc PORT_Alloc_Util
  ------------------
 1654|     13|    if (!buffer) {
  ------------------
  |  Branch (1654:9): [True: 0, False: 13]
  ------------------
 1655|      0|        PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1656|      0|        goto done;
 1657|      0|    }
 1658|       |
 1659|     13|    if (RSA_PublicKeyOp(key, buffer, sig) != SECSuccess) {
  ------------------
  |  Branch (1659:9): [True: 3, False: 10]
  ------------------
 1660|      3|        PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
  ------------------
  |  |   65|      3|#define PORT_SetError PORT_SetError_Util
  ------------------
 1661|      3|        goto done;
 1662|      3|    }
 1663|       |
 1664|     10|    *outputLen = 0;
 1665|       |
 1666|       |    /*
 1667|       |     * check the padding that was used
 1668|       |     */
 1669|     10|    if (buffer[0] != RSA_BLOCK_FIRST_OCTET ||
  ------------------
  |  |   20|     20|#define RSA_BLOCK_FIRST_OCTET 0x00
  ------------------
  |  Branch (1669:9): [True: 3, False: 7]
  ------------------
 1670|     10|        buffer[1] != (unsigned char)RSA_BlockPrivate) {
  ------------------
  |  Branch (1670:9): [True: 1, False: 6]
  ------------------
 1671|      4|        PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
  ------------------
  |  |   65|      4|#define PORT_SetError PORT_SetError_Util
  ------------------
 1672|      4|        goto done;
 1673|      4|    }
 1674|    229|    for (i = 2; i < modulusLen; i++) {
  ------------------
  |  Branch (1674:17): [True: 229, False: 0]
  ------------------
 1675|    229|        if (buffer[i] == RSA_BLOCK_AFTER_PAD_OCTET) {
  ------------------
  |  |   22|    229|#define RSA_BLOCK_AFTER_PAD_OCTET 0x00
  ------------------
  |  Branch (1675:13): [True: 3, False: 226]
  ------------------
 1676|      3|            *outputLen = modulusLen - i - 1;
 1677|      3|            break;
 1678|      3|        }
 1679|    226|        if (buffer[i] != RSA_BLOCK_PRIVATE_PAD_OCTET) {
  ------------------
  |  |   21|    226|#define RSA_BLOCK_PRIVATE_PAD_OCTET 0xff
  ------------------
  |  Branch (1679:13): [True: 3, False: 223]
  ------------------
 1680|      3|            PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
  ------------------
  |  |   65|      3|#define PORT_SetError PORT_SetError_Util
  ------------------
 1681|      3|            goto done;
 1682|      3|        }
 1683|    226|    }
 1684|      3|    padLen = i - 2;
 1685|      3|    if (padLen < RSA_BLOCK_MIN_PAD_LEN) {
  ------------------
  |  |   19|      3|#define RSA_BLOCK_MIN_PAD_LEN 8
  ------------------
  |  Branch (1685:9): [True: 0, False: 3]
  ------------------
 1686|      0|        PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1687|      0|        goto done;
 1688|      0|    }
 1689|      3|    if (*outputLen == 0) {
  ------------------
  |  Branch (1689:9): [True: 0, False: 3]
  ------------------
 1690|      0|        PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1691|      0|        goto done;
 1692|      0|    }
 1693|      3|    if (*outputLen > maxOutputLen) {
  ------------------
  |  Branch (1693:9): [True: 0, False: 3]
  ------------------
 1694|      0|        PORT_SetError(SEC_ERROR_OUTPUT_LEN);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1695|      0|        goto done;
 1696|      0|    }
 1697|       |
 1698|      3|    PORT_Memcpy(output, buffer + modulusLen - *outputLen, *outputLen);
  ------------------
  |  |  180|      3|#define PORT_Memcpy memcpy
  ------------------
 1699|      3|    rv = SECSuccess;
 1700|       |
 1701|     16|done:
 1702|     16|    if (buffer) {
  ------------------
  |  Branch (1702:9): [True: 13, False: 3]
  ------------------
 1703|     13|        PORT_Free(buffer);
  ------------------
  |  |   60|     13|#define PORT_Free PORT_Free_Util
  ------------------
 1704|     13|    }
 1705|     16|    return rv;
 1706|      3|}
rsapkcs.c:rsa_modulusLen:
   82|  2.42k|{
   83|  2.42k|    if (modulus->len == 0) {
  ------------------
  |  Branch (83:9): [True: 0, False: 2.42k]
  ------------------
   84|      0|        return 0;
   85|      0|    }
   86|       |
   87|  2.42k|    unsigned char byteZero = modulus->data[0];
   88|  2.42k|    unsigned int modLen = modulus->len - !byteZero;
   89|  2.42k|    return modLen;
   90|  2.42k|}
rsapkcs.c:rsa_FormatBlock:
  244|  1.26k|{
  245|  1.26k|    switch (blockType) {
  246|      0|        case RSA_BlockPrivate:
  ------------------
  |  Branch (246:9): [True: 0, False: 1.26k]
  ------------------
  247|  1.26k|        case RSA_BlockPublic:
  ------------------
  |  Branch (247:9): [True: 1.26k, False: 0]
  ------------------
  248|       |            /*
  249|       |             * 0x00 || BT || Pad || 0x00 || ActualData
  250|       |             *
  251|       |             * The "3" below is the first octet + the second octet + the 0x00
  252|       |             * octet that always comes just before the ActualData.
  253|       |             */
  254|  1.26k|            if (modulusLen < (3 + RSA_BLOCK_MIN_PAD_LEN) || data->len > (modulusLen - (3 + RSA_BLOCK_MIN_PAD_LEN))) {
  ------------------
  |  |   19|  1.26k|#define RSA_BLOCK_MIN_PAD_LEN 8
  ------------------
                          if (modulusLen < (3 + RSA_BLOCK_MIN_PAD_LEN) || data->len > (modulusLen - (3 + RSA_BLOCK_MIN_PAD_LEN))) {
  ------------------
  |  |   19|  1.26k|#define RSA_BLOCK_MIN_PAD_LEN 8
  ------------------
  |  Branch (254:17): [True: 0, False: 1.26k]
  |  Branch (254:61): [True: 0, False: 1.26k]
  ------------------
  255|      0|                return SECFailure;
  256|      0|            }
  257|  1.26k|            result->data = rsa_FormatOneBlock(modulusLen, blockType, data);
  258|  1.26k|            if (result->data == NULL) {
  ------------------
  |  Branch (258:17): [True: 0, False: 1.26k]
  ------------------
  259|      0|                result->len = 0;
  260|      0|                return SECFailure;
  261|      0|            }
  262|  1.26k|            result->len = modulusLen;
  263|       |
  264|  1.26k|            break;
  265|       |
  266|      0|        case RSA_BlockRaw:
  ------------------
  |  Branch (266:9): [True: 0, False: 1.26k]
  ------------------
  267|       |            /*
  268|       |             * Pad || ActualData
  269|       |             * Pad is zeros. The application is responsible for recovering
  270|       |             * the actual data.
  271|       |             */
  272|      0|            if (data->len > modulusLen) {
  ------------------
  |  Branch (272:17): [True: 0, False: 0]
  ------------------
  273|      0|                return SECFailure;
  274|      0|            }
  275|      0|            result->data = (unsigned char *)PORT_ZAlloc(modulusLen);
  ------------------
  |  |   72|      0|#define PORT_ZAlloc PORT_ZAlloc_Util
  ------------------
  276|      0|            result->len = modulusLen;
  277|      0|            PORT_Memcpy(result->data + (modulusLen - data->len),
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
  278|      0|                        data->data, data->len);
  279|      0|            break;
  280|       |
  281|      0|        default:
  ------------------
  |  Branch (281:9): [True: 0, False: 1.26k]
  ------------------
  282|      0|            PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  283|      0|            result->data = NULL;
  284|      0|            result->len = 0;
  285|      0|            return SECFailure;
  286|  1.26k|    }
  287|       |
  288|  1.26k|    return SECSuccess;
  289|  1.26k|}
rsapkcs.c:rsa_FormatOneBlock:
  127|  1.26k|{
  128|  1.26k|    unsigned char *block;
  129|  1.26k|    unsigned char *bp;
  130|  1.26k|    unsigned int padLen;
  131|  1.26k|    unsigned int i, j;
  132|  1.26k|    SECStatus rv;
  133|       |
  134|  1.26k|    block = (unsigned char *)PORT_Alloc(modulusLen);
  ------------------
  |  |   52|  1.26k|#define PORT_Alloc PORT_Alloc_Util
  ------------------
  135|  1.26k|    if (block == NULL)
  ------------------
  |  Branch (135:9): [True: 0, False: 1.26k]
  ------------------
  136|      0|        return NULL;
  137|       |
  138|  1.26k|    bp = block;
  139|       |
  140|       |    /*
  141|       |     * All RSA blocks start with two octets:
  142|       |     *  0x00 || BlockType
  143|       |     */
  144|  1.26k|    *bp++ = RSA_BLOCK_FIRST_OCTET;
  ------------------
  |  |   20|  1.26k|#define RSA_BLOCK_FIRST_OCTET 0x00
  ------------------
  145|  1.26k|    *bp++ = (unsigned char)blockType;
  146|       |
  147|  1.26k|    switch (blockType) {
  148|       |
  149|       |        /*
  150|       |         * Blocks intended for private-key operation.
  151|       |         */
  152|      0|        case RSA_BlockPrivate: /* preferred method */
  ------------------
  |  Branch (152:9): [True: 0, False: 1.26k]
  ------------------
  153|       |            /*
  154|       |             * 0x00 || BT || Pad || 0x00 || ActualData
  155|       |             *   1      1   padLen    1      data->len
  156|       |             * padLen must be at least RSA_BLOCK_MIN_PAD_LEN (8) bytes.
  157|       |             * Pad is either all 0x00 or all 0xff bytes, depending on blockType.
  158|       |             */
  159|      0|            padLen = modulusLen - data->len - 3;
  160|      0|            PORT_Assert(padLen >= RSA_BLOCK_MIN_PAD_LEN);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  161|      0|            if (padLen < RSA_BLOCK_MIN_PAD_LEN) {
  ------------------
  |  |   19|      0|#define RSA_BLOCK_MIN_PAD_LEN 8
  ------------------
  |  Branch (161:17): [True: 0, False: 0]
  ------------------
  162|      0|                PORT_ZFree(block, modulusLen);
  ------------------
  |  |   75|      0|#define PORT_ZFree PORT_ZFree_Util
  ------------------
  163|      0|                return NULL;
  164|      0|            }
  165|      0|            PORT_Memset(bp, RSA_BLOCK_PRIVATE_PAD_OCTET, padLen);
  ------------------
  |  |  182|      0|#define PORT_Memset memset
  ------------------
                          PORT_Memset(bp, RSA_BLOCK_PRIVATE_PAD_OCTET, padLen);
  ------------------
  |  |   21|      0|#define RSA_BLOCK_PRIVATE_PAD_OCTET 0xff
  ------------------
  166|      0|            bp += padLen;
  167|      0|            *bp++ = RSA_BLOCK_AFTER_PAD_OCTET;
  ------------------
  |  |   22|      0|#define RSA_BLOCK_AFTER_PAD_OCTET 0x00
  ------------------
  168|      0|            PORT_Memcpy(bp, data->data, data->len);
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
  169|      0|            break;
  170|       |
  171|       |        /*
  172|       |         * Blocks intended for public-key operation.
  173|       |         */
  174|  1.26k|        case RSA_BlockPublic:
  ------------------
  |  Branch (174:9): [True: 1.26k, False: 0]
  ------------------
  175|       |            /*
  176|       |             * 0x00 || BT || Pad || 0x00 || ActualData
  177|       |             *   1      1   padLen    1      data->len
  178|       |             * Pad is 8 or more non-zero random bytes.
  179|       |             *
  180|       |             * Build the block left to right.
  181|       |             * Fill the entire block from Pad to the end with random bytes.
  182|       |             * Use the bytes after Pad as a supply of extra random bytes from
  183|       |             * which to find replacements for the zero bytes in Pad.
  184|       |             * If we need more than that, refill the bytes after Pad with
  185|       |             * new random bytes as necessary.
  186|       |             */
  187|       |
  188|  1.26k|            padLen = modulusLen - (data->len + 3);
  189|  1.26k|            PORT_Assert(padLen >= RSA_BLOCK_MIN_PAD_LEN);
  ------------------
  |  |  120|  1.26k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.26k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.26k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  190|  1.26k|            if (padLen < RSA_BLOCK_MIN_PAD_LEN) {
  ------------------
  |  |   19|  1.26k|#define RSA_BLOCK_MIN_PAD_LEN 8
  ------------------
  |  Branch (190:17): [True: 0, False: 1.26k]
  ------------------
  191|      0|                PORT_ZFree(block, modulusLen);
  ------------------
  |  |   75|      0|#define PORT_ZFree PORT_ZFree_Util
  ------------------
  192|      0|                return NULL;
  193|      0|            }
  194|  1.26k|            j = modulusLen - 2;
  195|  1.26k|            rv = RNG_GenerateGlobalRandomBytes(bp, j);
  196|  1.26k|            if (rv == SECSuccess) {
  ------------------
  |  Branch (196:17): [True: 1.26k, False: 0]
  ------------------
  197|   107k|                for (i = 0; i < padLen;) {
  ------------------
  |  Branch (197:29): [True: 105k, False: 1.26k]
  ------------------
  198|   105k|                    unsigned char repl;
  199|       |                    /* Pad with non-zero random data. */
  200|   105k|                    if (bp[i] != RSA_BLOCK_AFTER_PAD_OCTET) {
  ------------------
  |  |   22|   105k|#define RSA_BLOCK_AFTER_PAD_OCTET 0x00
  ------------------
  |  Branch (200:25): [True: 105k, False: 99]
  ------------------
  201|   105k|                        ++i;
  202|   105k|                        continue;
  203|   105k|                    }
  204|     99|                    if (j <= padLen) {
  ------------------
  |  Branch (204:25): [True: 0, False: 99]
  ------------------
  205|      0|                        rv = RNG_GenerateGlobalRandomBytes(bp + padLen,
  206|      0|                                                           modulusLen - (2 + padLen));
  207|      0|                        if (rv != SECSuccess)
  ------------------
  |  Branch (207:29): [True: 0, False: 0]
  ------------------
  208|      0|                            break;
  209|      0|                        j = modulusLen - 2;
  210|      0|                    }
  211|     99|                    do {
  212|     99|                        repl = bp[--j];
  213|     99|                    } while (repl == RSA_BLOCK_AFTER_PAD_OCTET && j > padLen);
  ------------------
  |  |   22|    198|#define RSA_BLOCK_AFTER_PAD_OCTET 0x00
  ------------------
  |  Branch (213:30): [True: 0, False: 99]
  |  Branch (213:67): [True: 0, False: 0]
  ------------------
  214|     99|                    if (repl != RSA_BLOCK_AFTER_PAD_OCTET) {
  ------------------
  |  |   22|     99|#define RSA_BLOCK_AFTER_PAD_OCTET 0x00
  ------------------
  |  Branch (214:25): [True: 99, False: 0]
  ------------------
  215|     99|                        bp[i++] = repl;
  216|     99|                    }
  217|     99|                }
  218|  1.26k|            }
  219|  1.26k|            if (rv != SECSuccess) {
  ------------------
  |  Branch (219:17): [True: 0, False: 1.26k]
  ------------------
  220|      0|                PORT_ZFree(block, modulusLen);
  ------------------
  |  |   75|      0|#define PORT_ZFree PORT_ZFree_Util
  ------------------
  221|      0|                PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  222|      0|                return NULL;
  223|      0|            }
  224|  1.26k|            bp += padLen;
  225|  1.26k|            *bp++ = RSA_BLOCK_AFTER_PAD_OCTET;
  ------------------
  |  |   22|  1.26k|#define RSA_BLOCK_AFTER_PAD_OCTET 0x00
  ------------------
  226|  1.26k|            PORT_Memcpy(bp, data->data, data->len);
  ------------------
  |  |  180|  1.26k|#define PORT_Memcpy memcpy
  ------------------
  227|  1.26k|            break;
  228|       |
  229|      0|        default:
  ------------------
  |  Branch (229:9): [True: 0, False: 1.26k]
  ------------------
  230|      0|            PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  231|      0|            PORT_ZFree(block, modulusLen);
  ------------------
  |  |   75|      0|#define PORT_ZFree PORT_ZFree_Util
  ------------------
  232|      0|            return NULL;
  233|  1.26k|    }
  234|       |
  235|  1.26k|    return block;
  236|  1.26k|}
rsapkcs.c:MGF1:
  300|     31|{
  301|     31|    unsigned int digestLen;
  302|     31|    PRUint32 counter;
  303|     31|    PRUint32 rounds;
  304|     31|    unsigned char *tempHash;
  305|     31|    unsigned char *temp;
  306|     31|    const SECHashObject *hash;
  307|     31|    void *hashContext;
  308|     31|    unsigned char C[4];
  309|     31|    SECStatus rv = SECSuccess;
  310|       |
  311|     31|    hash = HASH_GetRawHashObject(hashAlg);
  312|     31|    if (hash == NULL) {
  ------------------
  |  Branch (312:9): [True: 0, False: 31]
  ------------------
  313|      0|        return SECFailure;
  314|      0|    }
  315|       |
  316|     31|    hashContext = (*hash->create)();
  317|     31|    rounds = (maskLen + hash->length - 1) / hash->length;
  318|    167|    for (counter = 0; counter < rounds; counter++) {
  ------------------
  |  Branch (318:23): [True: 136, False: 31]
  ------------------
  319|    136|        C[0] = (unsigned char)((counter >> 24) & 0xff);
  320|    136|        C[1] = (unsigned char)((counter >> 16) & 0xff);
  321|    136|        C[2] = (unsigned char)((counter >> 8) & 0xff);
  322|    136|        C[3] = (unsigned char)(counter & 0xff);
  323|       |
  324|       |        /* This could be optimized when the clone functions in
  325|       |         * rawhash.c are implemented. */
  326|    136|        (*hash->begin)(hashContext);
  327|    136|        (*hash->update)(hashContext, mgfSeed, mgfSeedLen);
  328|    136|        (*hash->update)(hashContext, C, sizeof C);
  329|       |
  330|    136|        tempHash = mask + counter * hash->length;
  331|    136|        if (counter != (rounds - 1)) {
  ------------------
  |  Branch (331:13): [True: 105, False: 31]
  ------------------
  332|    105|            (*hash->end)(hashContext, tempHash, &digestLen, hash->length);
  333|    105|        } else { /* we're in the last round and need to cut the hash */
  334|     31|            temp = (unsigned char *)PORT_Alloc(hash->length);
  ------------------
  |  |   52|     31|#define PORT_Alloc PORT_Alloc_Util
  ------------------
  335|     31|            if (!temp) {
  ------------------
  |  Branch (335:17): [True: 0, False: 31]
  ------------------
  336|      0|                rv = SECFailure;
  337|      0|                goto done;
  338|      0|            }
  339|     31|            (*hash->end)(hashContext, temp, &digestLen, hash->length);
  340|     31|            PORT_Memcpy(tempHash, temp, maskLen - counter * hash->length);
  ------------------
  |  |  180|     31|#define PORT_Memcpy memcpy
  ------------------
  341|     31|            PORT_Free(temp);
  ------------------
  |  |   60|     31|#define PORT_Free PORT_Free_Util
  ------------------
  342|     31|        }
  343|    136|    }
  344|       |
  345|     31|done:
  346|     31|    (*hash->destroy)(hashContext, PR_TRUE);
  ------------------
  |  |  437|     31|#define PR_TRUE 1
  ------------------
  347|     31|    return rv;
  348|     31|}
rsapkcs.c:rsa_modulusBits:
   94|  1.11k|{
   95|  1.11k|    if (modulus->len == 0) {
  ------------------
  |  Branch (95:9): [True: 0, False: 1.11k]
  ------------------
   96|      0|        return 0;
   97|      0|    }
   98|       |
   99|  1.11k|    unsigned char byteZero = modulus->data[0];
  100|  1.11k|    unsigned int numBits = (modulus->len - 1) * 8;
  101|       |
  102|  1.11k|    if (byteZero == 0 && modulus->len == 1) {
  ------------------
  |  Branch (102:9): [True: 0, False: 1.11k]
  |  Branch (102:26): [True: 0, False: 0]
  ------------------
  103|      0|        return 0;
  104|      0|    }
  105|       |
  106|  1.11k|    if (byteZero == 0) {
  ------------------
  |  Branch (106:9): [True: 0, False: 1.11k]
  ------------------
  107|      0|        numBits -= 8;
  108|      0|        byteZero = modulus->data[1];
  109|      0|    }
  110|       |
  111|  9.98k|    while (byteZero > 0) {
  ------------------
  |  Branch (111:12): [True: 8.87k, False: 1.11k]
  ------------------
  112|  8.87k|        numBits++;
  113|  8.87k|        byteZero >>= 1;
  114|  8.87k|    }
  115|       |
  116|  1.11k|    return numBits;
  117|  1.11k|}
rsapkcs.c:emsa_pss_verify:
 1328|  1.09k|{
 1329|  1.09k|    const SECHashObject *hash;
 1330|  1.09k|    void *hash_context;
 1331|  1.09k|    unsigned char *db;
 1332|  1.09k|    unsigned char *H_; /* H' from the RFC */
 1333|  1.09k|    unsigned int i;
 1334|  1.09k|    unsigned int dbMaskLen;
 1335|  1.09k|    unsigned int zeroBits;
 1336|  1.09k|    SECStatus rv;
 1337|       |
 1338|  1.09k|    hash = HASH_GetRawHashObject(hashAlg);
 1339|  1.09k|    dbMaskLen = emLen - hash->length - 1;
 1340|       |
 1341|       |    /* Step 3 + 4 */
 1342|  1.09k|    if ((emLen < (hash->length + saltLen + 2)) ||
  ------------------
  |  Branch (1342:9): [True: 83, False: 1.01k]
  ------------------
 1343|  1.09k|        (em[emLen - 1] != 0xbc)) {
  ------------------
  |  Branch (1343:9): [True: 976, False: 39]
  ------------------
 1344|  1.05k|        PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
  ------------------
  |  |   65|  1.05k|#define PORT_SetError PORT_SetError_Util
  ------------------
 1345|  1.05k|        return SECFailure;
 1346|  1.05k|    }
 1347|       |
 1348|       |    /* Step 6 */
 1349|     39|    zeroBits = 8 * emLen - emBits;
 1350|     39|    if (em[0] >> (8 - zeroBits)) {
  ------------------
  |  Branch (1350:9): [True: 8, False: 31]
  ------------------
 1351|      8|        PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
  ------------------
  |  |   65|      8|#define PORT_SetError PORT_SetError_Util
  ------------------
 1352|      8|        return SECFailure;
 1353|      8|    }
 1354|       |
 1355|       |    /* Step 7 */
 1356|     31|    db = (unsigned char *)PORT_Alloc(dbMaskLen);
  ------------------
  |  |   52|     31|#define PORT_Alloc PORT_Alloc_Util
  ------------------
 1357|     31|    if (db == NULL) {
  ------------------
  |  Branch (1357:9): [True: 0, False: 31]
  ------------------
 1358|      0|        PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1359|      0|        return SECFailure;
 1360|      0|    }
 1361|       |    /* &em[dbMaskLen] points to H, used as mgfSeed */
 1362|     31|    MGF1(maskHashAlg, db, dbMaskLen, &em[dbMaskLen], hash->length);
 1363|       |
 1364|       |    /* Step 8 */
 1365|  4.83k|    for (i = 0; i < dbMaskLen; i++) {
  ------------------
  |  Branch (1365:17): [True: 4.80k, False: 31]
  ------------------
 1366|  4.80k|        db[i] ^= em[i];
 1367|  4.80k|    }
 1368|       |
 1369|       |    /* Step 9 */
 1370|     31|    db[0] &= 0xff >> zeroBits;
 1371|       |
 1372|       |    /* Step 10 */
 1373|  1.92k|    for (i = 0; i < (dbMaskLen - saltLen - 1); i++) {
  ------------------
  |  Branch (1373:17): [True: 1.91k, False: 14]
  ------------------
 1374|  1.91k|        if (db[i] != 0) {
  ------------------
  |  Branch (1374:13): [True: 17, False: 1.89k]
  ------------------
 1375|     17|            PORT_Free(db);
  ------------------
  |  |   60|     17|#define PORT_Free PORT_Free_Util
  ------------------
 1376|     17|            PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
  ------------------
  |  |   65|     17|#define PORT_SetError PORT_SetError_Util
  ------------------
 1377|     17|            return SECFailure;
 1378|     17|        }
 1379|  1.91k|    }
 1380|     14|    if (db[dbMaskLen - saltLen - 1] != 0x01) {
  ------------------
  |  Branch (1380:9): [True: 0, False: 14]
  ------------------
 1381|      0|        PORT_Free(db);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 1382|      0|        PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1383|      0|        return SECFailure;
 1384|      0|    }
 1385|       |
 1386|       |    /* Step 12 + 13 */
 1387|     14|    H_ = (unsigned char *)PORT_Alloc(hash->length);
  ------------------
  |  |   52|     14|#define PORT_Alloc PORT_Alloc_Util
  ------------------
 1388|     14|    if (H_ == NULL) {
  ------------------
  |  Branch (1388:9): [True: 0, False: 14]
  ------------------
 1389|      0|        PORT_Free(db);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 1390|      0|        PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1391|      0|        return SECFailure;
 1392|      0|    }
 1393|     14|    hash_context = (*hash->create)();
 1394|     14|    if (hash_context == NULL) {
  ------------------
  |  Branch (1394:9): [True: 0, False: 14]
  ------------------
 1395|      0|        PORT_Free(db);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 1396|      0|        PORT_Free(H_);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 1397|      0|        PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1398|      0|        return SECFailure;
 1399|      0|    }
 1400|     14|    (*hash->begin)(hash_context);
 1401|     14|    (*hash->update)(hash_context, eightZeros, 8);
 1402|     14|    (*hash->update)(hash_context, mHash, hash->length);
 1403|     14|    (*hash->update)(hash_context, &db[dbMaskLen - saltLen], saltLen);
 1404|     14|    (*hash->end)(hash_context, H_, &i, hash->length);
 1405|     14|    (*hash->destroy)(hash_context, PR_TRUE);
  ------------------
  |  |  437|     14|#define PR_TRUE 1
  ------------------
 1406|       |
 1407|     14|    PORT_Free(db);
  ------------------
  |  |   60|     14|#define PORT_Free PORT_Free_Util
  ------------------
 1408|       |
 1409|       |    /* Step 14 */
 1410|     14|    if (PORT_Memcmp(H_, &em[dbMaskLen], hash->length) != 0) {
  ------------------
  |  |  179|     14|#define PORT_Memcmp memcmp
  ------------------
  |  Branch (1410:9): [True: 14, False: 0]
  ------------------
 1411|     14|        PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
  ------------------
  |  |   65|     14|#define PORT_SetError PORT_SetError_Util
  ------------------
 1412|     14|        rv = SECFailure;
 1413|     14|    } else {
 1414|      0|        rv = SECSuccess;
 1415|      0|    }
 1416|       |
 1417|     14|    PORT_Free(H_);
  ------------------
  |  |   60|     14|#define PORT_Free PORT_Free_Util
  ------------------
 1418|     14|    return rv;
 1419|     14|}

SHA256_Compress_Native:
   55|   115k|{
   56|   115k|    __m128i h0, h1, th;
   57|   115k|    __m128i a, b, c, d;
   58|   115k|    __m128i w0, w1;
   59|   115k|    const __m128i shuffle = _mm_set_epi8(12, 13, 14, 15, 8, 9, 10, 11, 4, 5, 6, 7, 0, 1, 2, 3);
   60|       |
   61|   115k|    const __m128i *K = (__m128i *)K256;
   62|   115k|    const __m128i k0 = _mm_load_si128(K);
   63|   115k|    const __m128i k1 = _mm_load_si128(K + 1);
   64|   115k|    const __m128i k2 = _mm_load_si128(K + 2);
   65|   115k|    const __m128i k3 = _mm_load_si128(K + 3);
   66|   115k|    const __m128i k4 = _mm_load_si128(K + 4);
   67|   115k|    const __m128i k5 = _mm_load_si128(K + 5);
   68|   115k|    const __m128i k6 = _mm_load_si128(K + 6);
   69|   115k|    const __m128i k7 = _mm_load_si128(K + 7);
   70|   115k|    const __m128i k8 = _mm_load_si128(K + 8);
   71|   115k|    const __m128i k9 = _mm_load_si128(K + 9);
   72|   115k|    const __m128i k10 = _mm_load_si128(K + 10);
   73|   115k|    const __m128i k11 = _mm_load_si128(K + 11);
   74|   115k|    const __m128i k12 = _mm_load_si128(K + 12);
   75|   115k|    const __m128i k13 = _mm_load_si128(K + 13);
   76|   115k|    const __m128i k14 = _mm_load_si128(K + 14);
   77|   115k|    const __m128i k15 = _mm_load_si128(K + 15);
   78|       |
   79|   115k|    const __m128i *input = (__m128i *)ctx->u.b;
   80|       |
   81|   115k|    h0 = _mm_loadu_si128((__m128i *)(ctx->h));
   82|   115k|    h1 = _mm_loadu_si128((__m128i *)(ctx->h + 4));
   83|       |
   84|       |    /* H0123:4567 -> H01256:H2367 */
   85|   115k|    th = _mm_shuffle_epi32(h0, 0xb1);
   86|   115k|    h1 = _mm_shuffle_epi32(h1, 0x1b);
   87|   115k|    h0 = _mm_alignr_epi8(th, h1, 8);
   88|   115k|    h1 = _mm_blend_epi16(h1, th, 0xf0);
   89|       |
   90|   115k|    a = _mm_shuffle_epi8(_mm_loadu_si128(input), shuffle);
   91|   115k|    b = _mm_shuffle_epi8(_mm_loadu_si128(input + 1), shuffle);
   92|   115k|    c = _mm_shuffle_epi8(_mm_loadu_si128(input + 2), shuffle);
   93|   115k|    d = _mm_shuffle_epi8(_mm_loadu_si128(input + 3), shuffle);
   94|       |
   95|   115k|    w0 = h0;
   96|   115k|    w1 = h1;
   97|       |
   98|   115k|    ROUND(0, a, b, c, d)
  ------------------
  |  |   41|   115k|    {                                                       \
  |  |   42|   115k|        __m128i t = _mm_add_epi32(a, k##n);                 \
  |  |   43|   115k|        w1 = _mm_sha256rnds2_epu32(w1, w0, t);              \
  |  |   44|   115k|        t = _mm_shuffle_epi32(t, 0x0e);                     \
  |  |   45|   115k|        w0 = _mm_sha256rnds2_epu32(w0, w1, t);              \
  |  |   46|   115k|        if (n < 12) {                                       \
  |  |  ------------------
  |  |  |  Branch (46:13): [Folded - Ignored]
  |  |  ------------------
  |  |   47|   115k|            a = _mm_sha256msg1_epu32(a, b);                 \
  |  |   48|   115k|            a = _mm_add_epi32(a, _mm_alignr_epi8(d, c, 4)); \
  |  |   49|   115k|            a = _mm_sha256msg2_epu32(a, d);                 \
  |  |   50|   115k|        }                                                   \
  |  |   51|   115k|    }
  ------------------
   99|   115k|    ROUND(1, b, c, d, a)
  ------------------
  |  |   41|   115k|    {                                                       \
  |  |   42|   115k|        __m128i t = _mm_add_epi32(a, k##n);                 \
  |  |   43|   115k|        w1 = _mm_sha256rnds2_epu32(w1, w0, t);              \
  |  |   44|   115k|        t = _mm_shuffle_epi32(t, 0x0e);                     \
  |  |   45|   115k|        w0 = _mm_sha256rnds2_epu32(w0, w1, t);              \
  |  |   46|   115k|        if (n < 12) {                                       \
  |  |  ------------------
  |  |  |  Branch (46:13): [Folded - Ignored]
  |  |  ------------------
  |  |   47|   115k|            a = _mm_sha256msg1_epu32(a, b);                 \
  |  |   48|   115k|            a = _mm_add_epi32(a, _mm_alignr_epi8(d, c, 4)); \
  |  |   49|   115k|            a = _mm_sha256msg2_epu32(a, d);                 \
  |  |   50|   115k|        }                                                   \
  |  |   51|   115k|    }
  ------------------
  100|   115k|    ROUND(2, c, d, a, b)
  ------------------
  |  |   41|   115k|    {                                                       \
  |  |   42|   115k|        __m128i t = _mm_add_epi32(a, k##n);                 \
  |  |   43|   115k|        w1 = _mm_sha256rnds2_epu32(w1, w0, t);              \
  |  |   44|   115k|        t = _mm_shuffle_epi32(t, 0x0e);                     \
  |  |   45|   115k|        w0 = _mm_sha256rnds2_epu32(w0, w1, t);              \
  |  |   46|   115k|        if (n < 12) {                                       \
  |  |  ------------------
  |  |  |  Branch (46:13): [Folded - Ignored]
  |  |  ------------------
  |  |   47|   115k|            a = _mm_sha256msg1_epu32(a, b);                 \
  |  |   48|   115k|            a = _mm_add_epi32(a, _mm_alignr_epi8(d, c, 4)); \
  |  |   49|   115k|            a = _mm_sha256msg2_epu32(a, d);                 \
  |  |   50|   115k|        }                                                   \
  |  |   51|   115k|    }
  ------------------
  101|   115k|    ROUND(3, d, a, b, c)
  ------------------
  |  |   41|   115k|    {                                                       \
  |  |   42|   115k|        __m128i t = _mm_add_epi32(a, k##n);                 \
  |  |   43|   115k|        w1 = _mm_sha256rnds2_epu32(w1, w0, t);              \
  |  |   44|   115k|        t = _mm_shuffle_epi32(t, 0x0e);                     \
  |  |   45|   115k|        w0 = _mm_sha256rnds2_epu32(w0, w1, t);              \
  |  |   46|   115k|        if (n < 12) {                                       \
  |  |  ------------------
  |  |  |  Branch (46:13): [Folded - Ignored]
  |  |  ------------------
  |  |   47|   115k|            a = _mm_sha256msg1_epu32(a, b);                 \
  |  |   48|   115k|            a = _mm_add_epi32(a, _mm_alignr_epi8(d, c, 4)); \
  |  |   49|   115k|            a = _mm_sha256msg2_epu32(a, d);                 \
  |  |   50|   115k|        }                                                   \
  |  |   51|   115k|    }
  ------------------
  102|   115k|    ROUND(4, a, b, c, d)
  ------------------
  |  |   41|   115k|    {                                                       \
  |  |   42|   115k|        __m128i t = _mm_add_epi32(a, k##n);                 \
  |  |   43|   115k|        w1 = _mm_sha256rnds2_epu32(w1, w0, t);              \
  |  |   44|   115k|        t = _mm_shuffle_epi32(t, 0x0e);                     \
  |  |   45|   115k|        w0 = _mm_sha256rnds2_epu32(w0, w1, t);              \
  |  |   46|   115k|        if (n < 12) {                                       \
  |  |  ------------------
  |  |  |  Branch (46:13): [Folded - Ignored]
  |  |  ------------------
  |  |   47|   115k|            a = _mm_sha256msg1_epu32(a, b);                 \
  |  |   48|   115k|            a = _mm_add_epi32(a, _mm_alignr_epi8(d, c, 4)); \
  |  |   49|   115k|            a = _mm_sha256msg2_epu32(a, d);                 \
  |  |   50|   115k|        }                                                   \
  |  |   51|   115k|    }
  ------------------
  103|   115k|    ROUND(5, b, c, d, a)
  ------------------
  |  |   41|   115k|    {                                                       \
  |  |   42|   115k|        __m128i t = _mm_add_epi32(a, k##n);                 \
  |  |   43|   115k|        w1 = _mm_sha256rnds2_epu32(w1, w0, t);              \
  |  |   44|   115k|        t = _mm_shuffle_epi32(t, 0x0e);                     \
  |  |   45|   115k|        w0 = _mm_sha256rnds2_epu32(w0, w1, t);              \
  |  |   46|   115k|        if (n < 12) {                                       \
  |  |  ------------------
  |  |  |  Branch (46:13): [Folded - Ignored]
  |  |  ------------------
  |  |   47|   115k|            a = _mm_sha256msg1_epu32(a, b);                 \
  |  |   48|   115k|            a = _mm_add_epi32(a, _mm_alignr_epi8(d, c, 4)); \
  |  |   49|   115k|            a = _mm_sha256msg2_epu32(a, d);                 \
  |  |   50|   115k|        }                                                   \
  |  |   51|   115k|    }
  ------------------
  104|   115k|    ROUND(6, c, d, a, b)
  ------------------
  |  |   41|   115k|    {                                                       \
  |  |   42|   115k|        __m128i t = _mm_add_epi32(a, k##n);                 \
  |  |   43|   115k|        w1 = _mm_sha256rnds2_epu32(w1, w0, t);              \
  |  |   44|   115k|        t = _mm_shuffle_epi32(t, 0x0e);                     \
  |  |   45|   115k|        w0 = _mm_sha256rnds2_epu32(w0, w1, t);              \
  |  |   46|   115k|        if (n < 12) {                                       \
  |  |  ------------------
  |  |  |  Branch (46:13): [Folded - Ignored]
  |  |  ------------------
  |  |   47|   115k|            a = _mm_sha256msg1_epu32(a, b);                 \
  |  |   48|   115k|            a = _mm_add_epi32(a, _mm_alignr_epi8(d, c, 4)); \
  |  |   49|   115k|            a = _mm_sha256msg2_epu32(a, d);                 \
  |  |   50|   115k|        }                                                   \
  |  |   51|   115k|    }
  ------------------
  105|   115k|    ROUND(7, d, a, b, c)
  ------------------
  |  |   41|   115k|    {                                                       \
  |  |   42|   115k|        __m128i t = _mm_add_epi32(a, k##n);                 \
  |  |   43|   115k|        w1 = _mm_sha256rnds2_epu32(w1, w0, t);              \
  |  |   44|   115k|        t = _mm_shuffle_epi32(t, 0x0e);                     \
  |  |   45|   115k|        w0 = _mm_sha256rnds2_epu32(w0, w1, t);              \
  |  |   46|   115k|        if (n < 12) {                                       \
  |  |  ------------------
  |  |  |  Branch (46:13): [Folded - Ignored]
  |  |  ------------------
  |  |   47|   115k|            a = _mm_sha256msg1_epu32(a, b);                 \
  |  |   48|   115k|            a = _mm_add_epi32(a, _mm_alignr_epi8(d, c, 4)); \
  |  |   49|   115k|            a = _mm_sha256msg2_epu32(a, d);                 \
  |  |   50|   115k|        }                                                   \
  |  |   51|   115k|    }
  ------------------
  106|   115k|    ROUND(8, a, b, c, d)
  ------------------
  |  |   41|   115k|    {                                                       \
  |  |   42|   115k|        __m128i t = _mm_add_epi32(a, k##n);                 \
  |  |   43|   115k|        w1 = _mm_sha256rnds2_epu32(w1, w0, t);              \
  |  |   44|   115k|        t = _mm_shuffle_epi32(t, 0x0e);                     \
  |  |   45|   115k|        w0 = _mm_sha256rnds2_epu32(w0, w1, t);              \
  |  |   46|   115k|        if (n < 12) {                                       \
  |  |  ------------------
  |  |  |  Branch (46:13): [Folded - Ignored]
  |  |  ------------------
  |  |   47|   115k|            a = _mm_sha256msg1_epu32(a, b);                 \
  |  |   48|   115k|            a = _mm_add_epi32(a, _mm_alignr_epi8(d, c, 4)); \
  |  |   49|   115k|            a = _mm_sha256msg2_epu32(a, d);                 \
  |  |   50|   115k|        }                                                   \
  |  |   51|   115k|    }
  ------------------
  107|   115k|    ROUND(9, b, c, d, a)
  ------------------
  |  |   41|   115k|    {                                                       \
  |  |   42|   115k|        __m128i t = _mm_add_epi32(a, k##n);                 \
  |  |   43|   115k|        w1 = _mm_sha256rnds2_epu32(w1, w0, t);              \
  |  |   44|   115k|        t = _mm_shuffle_epi32(t, 0x0e);                     \
  |  |   45|   115k|        w0 = _mm_sha256rnds2_epu32(w0, w1, t);              \
  |  |   46|   115k|        if (n < 12) {                                       \
  |  |  ------------------
  |  |  |  Branch (46:13): [Folded - Ignored]
  |  |  ------------------
  |  |   47|   115k|            a = _mm_sha256msg1_epu32(a, b);                 \
  |  |   48|   115k|            a = _mm_add_epi32(a, _mm_alignr_epi8(d, c, 4)); \
  |  |   49|   115k|            a = _mm_sha256msg2_epu32(a, d);                 \
  |  |   50|   115k|        }                                                   \
  |  |   51|   115k|    }
  ------------------
  108|   115k|    ROUND(10, c, d, a, b)
  ------------------
  |  |   41|   115k|    {                                                       \
  |  |   42|   115k|        __m128i t = _mm_add_epi32(a, k##n);                 \
  |  |   43|   115k|        w1 = _mm_sha256rnds2_epu32(w1, w0, t);              \
  |  |   44|   115k|        t = _mm_shuffle_epi32(t, 0x0e);                     \
  |  |   45|   115k|        w0 = _mm_sha256rnds2_epu32(w0, w1, t);              \
  |  |   46|   115k|        if (n < 12) {                                       \
  |  |  ------------------
  |  |  |  Branch (46:13): [Folded - Ignored]
  |  |  ------------------
  |  |   47|   115k|            a = _mm_sha256msg1_epu32(a, b);                 \
  |  |   48|   115k|            a = _mm_add_epi32(a, _mm_alignr_epi8(d, c, 4)); \
  |  |   49|   115k|            a = _mm_sha256msg2_epu32(a, d);                 \
  |  |   50|   115k|        }                                                   \
  |  |   51|   115k|    }
  ------------------
  109|   115k|    ROUND(11, d, a, b, c)
  ------------------
  |  |   41|   115k|    {                                                       \
  |  |   42|   115k|        __m128i t = _mm_add_epi32(a, k##n);                 \
  |  |   43|   115k|        w1 = _mm_sha256rnds2_epu32(w1, w0, t);              \
  |  |   44|   115k|        t = _mm_shuffle_epi32(t, 0x0e);                     \
  |  |   45|   115k|        w0 = _mm_sha256rnds2_epu32(w0, w1, t);              \
  |  |   46|   115k|        if (n < 12) {                                       \
  |  |  ------------------
  |  |  |  Branch (46:13): [Folded - Ignored]
  |  |  ------------------
  |  |   47|   115k|            a = _mm_sha256msg1_epu32(a, b);                 \
  |  |   48|   115k|            a = _mm_add_epi32(a, _mm_alignr_epi8(d, c, 4)); \
  |  |   49|   115k|            a = _mm_sha256msg2_epu32(a, d);                 \
  |  |   50|   115k|        }                                                   \
  |  |   51|   115k|    }
  ------------------
  110|   115k|    ROUND(12, a, b, c, d)
  ------------------
  |  |   41|   115k|    {                                                       \
  |  |   42|   115k|        __m128i t = _mm_add_epi32(a, k##n);                 \
  |  |   43|   115k|        w1 = _mm_sha256rnds2_epu32(w1, w0, t);              \
  |  |   44|   115k|        t = _mm_shuffle_epi32(t, 0x0e);                     \
  |  |   45|   115k|        w0 = _mm_sha256rnds2_epu32(w0, w1, t);              \
  |  |   46|   115k|        if (n < 12) {                                       \
  |  |  ------------------
  |  |  |  Branch (46:13): [Folded - Ignored]
  |  |  ------------------
  |  |   47|      0|            a = _mm_sha256msg1_epu32(a, b);                 \
  |  |   48|      0|            a = _mm_add_epi32(a, _mm_alignr_epi8(d, c, 4)); \
  |  |   49|      0|            a = _mm_sha256msg2_epu32(a, d);                 \
  |  |   50|      0|        }                                                   \
  |  |   51|   115k|    }
  ------------------
  111|   115k|    ROUND(13, b, c, d, a)
  ------------------
  |  |   41|   115k|    {                                                       \
  |  |   42|   115k|        __m128i t = _mm_add_epi32(a, k##n);                 \
  |  |   43|   115k|        w1 = _mm_sha256rnds2_epu32(w1, w0, t);              \
  |  |   44|   115k|        t = _mm_shuffle_epi32(t, 0x0e);                     \
  |  |   45|   115k|        w0 = _mm_sha256rnds2_epu32(w0, w1, t);              \
  |  |   46|   115k|        if (n < 12) {                                       \
  |  |  ------------------
  |  |  |  Branch (46:13): [Folded - Ignored]
  |  |  ------------------
  |  |   47|      0|            a = _mm_sha256msg1_epu32(a, b);                 \
  |  |   48|      0|            a = _mm_add_epi32(a, _mm_alignr_epi8(d, c, 4)); \
  |  |   49|      0|            a = _mm_sha256msg2_epu32(a, d);                 \
  |  |   50|      0|        }                                                   \
  |  |   51|   115k|    }
  ------------------
  112|   115k|    ROUND(14, c, d, a, b)
  ------------------
  |  |   41|   115k|    {                                                       \
  |  |   42|   115k|        __m128i t = _mm_add_epi32(a, k##n);                 \
  |  |   43|   115k|        w1 = _mm_sha256rnds2_epu32(w1, w0, t);              \
  |  |   44|   115k|        t = _mm_shuffle_epi32(t, 0x0e);                     \
  |  |   45|   115k|        w0 = _mm_sha256rnds2_epu32(w0, w1, t);              \
  |  |   46|   115k|        if (n < 12) {                                       \
  |  |  ------------------
  |  |  |  Branch (46:13): [Folded - Ignored]
  |  |  ------------------
  |  |   47|      0|            a = _mm_sha256msg1_epu32(a, b);                 \
  |  |   48|      0|            a = _mm_add_epi32(a, _mm_alignr_epi8(d, c, 4)); \
  |  |   49|      0|            a = _mm_sha256msg2_epu32(a, d);                 \
  |  |   50|      0|        }                                                   \
  |  |   51|   115k|    }
  ------------------
  113|   115k|    ROUND(15, d, a, b, c)
  ------------------
  |  |   41|   115k|    {                                                       \
  |  |   42|   115k|        __m128i t = _mm_add_epi32(a, k##n);                 \
  |  |   43|   115k|        w1 = _mm_sha256rnds2_epu32(w1, w0, t);              \
  |  |   44|   115k|        t = _mm_shuffle_epi32(t, 0x0e);                     \
  |  |   45|   115k|        w0 = _mm_sha256rnds2_epu32(w0, w1, t);              \
  |  |   46|   115k|        if (n < 12) {                                       \
  |  |  ------------------
  |  |  |  Branch (46:13): [Folded - Ignored]
  |  |  ------------------
  |  |   47|      0|            a = _mm_sha256msg1_epu32(a, b);                 \
  |  |   48|      0|            a = _mm_add_epi32(a, _mm_alignr_epi8(d, c, 4)); \
  |  |   49|      0|            a = _mm_sha256msg2_epu32(a, d);                 \
  |  |   50|      0|        }                                                   \
  |  |   51|   115k|    }
  ------------------
  114|       |
  115|   115k|    h0 = _mm_add_epi32(h0, w0);
  116|   115k|    h1 = _mm_add_epi32(h1, w1);
  117|       |
  118|       |    /* H0145:2367 -> H0123:4567 */
  119|   115k|    th = _mm_shuffle_epi32(h0, 0x1b);
  120|   115k|    h1 = _mm_shuffle_epi32(h1, 0xb1);
  121|   115k|    h0 = _mm_blend_epi16(th, h1, 0xf0);
  122|   115k|    h1 = _mm_alignr_epi8(h1, th, 8);
  123|       |
  124|   115k|    _mm_storeu_si128((__m128i *)ctx->h, h0);
  125|   115k|    _mm_storeu_si128((__m128i *)(ctx->h + 4), h1);
  126|   115k|}
SHA256_Update_Native:
  131|   329k|{
  132|   329k|    __m128i h0, h1, th;
  133|   329k|    const __m128i shuffle = _mm_set_epi8(12, 13, 14, 15, 8, 9, 10, 11, 4, 5, 6, 7, 0, 1, 2, 3);
  134|       |
  135|   329k|    const __m128i *K = (__m128i *)K256;
  136|   329k|    const __m128i k0 = _mm_load_si128(K);
  137|   329k|    const __m128i k1 = _mm_load_si128(K + 1);
  138|   329k|    const __m128i k2 = _mm_load_si128(K + 2);
  139|   329k|    const __m128i k3 = _mm_load_si128(K + 3);
  140|   329k|    const __m128i k4 = _mm_load_si128(K + 4);
  141|   329k|    const __m128i k5 = _mm_load_si128(K + 5);
  142|   329k|    const __m128i k6 = _mm_load_si128(K + 6);
  143|   329k|    const __m128i k7 = _mm_load_si128(K + 7);
  144|   329k|    const __m128i k8 = _mm_load_si128(K + 8);
  145|   329k|    const __m128i k9 = _mm_load_si128(K + 9);
  146|   329k|    const __m128i k10 = _mm_load_si128(K + 10);
  147|   329k|    const __m128i k11 = _mm_load_si128(K + 11);
  148|   329k|    const __m128i k12 = _mm_load_si128(K + 12);
  149|   329k|    const __m128i k13 = _mm_load_si128(K + 13);
  150|   329k|    const __m128i k14 = _mm_load_si128(K + 14);
  151|   329k|    const __m128i k15 = _mm_load_si128(K + 15);
  152|       |
  153|   329k|    unsigned int inBuf = ctx->sizeLo & 0x3f;
  154|   329k|    if (!inputLen) {
  ------------------
  |  Branch (154:9): [True: 1.46k, False: 327k]
  ------------------
  155|  1.46k|        return;
  156|  1.46k|    }
  157|       |
  158|       |    /* Add inputLen into the count of bytes processed, before processing */
  159|   327k|    if ((ctx->sizeLo += inputLen) < inputLen) {
  ------------------
  |  Branch (159:9): [True: 0, False: 327k]
  ------------------
  160|      0|        ctx->sizeHi++;
  161|      0|    }
  162|       |
  163|       |    /* if data already in buffer, attempt to fill rest of buffer */
  164|   327k|    if (inBuf) {
  ------------------
  |  Branch (164:9): [True: 132k, False: 195k]
  ------------------
  165|   132k|        unsigned int todo = SHA256_BLOCK_LENGTH - inBuf;
  ------------------
  |  |  120|   132k|#define SHA256_BLOCK_LENGTH 64    /* bytes */
  ------------------
  166|   132k|        if (inputLen < todo) {
  ------------------
  |  Branch (166:13): [True: 116k, False: 16.0k]
  ------------------
  167|   116k|            todo = inputLen;
  168|   116k|        }
  169|   132k|        memcpy(ctx->u.b + inBuf, input, todo);
  170|   132k|        input += todo;
  171|   132k|        inputLen -= todo;
  172|   132k|        if (inBuf + todo == SHA256_BLOCK_LENGTH) {
  ------------------
  |  |  120|   132k|#define SHA256_BLOCK_LENGTH 64    /* bytes */
  ------------------
  |  Branch (172:13): [True: 16.0k, False: 116k]
  ------------------
  173|  16.0k|            SHA256_Compress_Native(ctx);
  174|  16.0k|        }
  175|   132k|    }
  176|       |
  177|   327k|    h0 = _mm_loadu_si128((__m128i *)(ctx->h));
  178|   327k|    h1 = _mm_loadu_si128((__m128i *)(ctx->h + 4));
  179|       |
  180|       |    /* H0123:4567 -> H01256:H2367 */
  181|   327k|    th = _mm_shuffle_epi32(h0, 0xb1);
  182|   327k|    h1 = _mm_shuffle_epi32(h1, 0x1b);
  183|   327k|    h0 = _mm_alignr_epi8(th, h1, 8);
  184|   327k|    h1 = _mm_blend_epi16(h1, th, 0xf0);
  185|       |
  186|       |    /* if enough data to fill one or more whole buffers, process them. */
  187|   495k|    while (inputLen >= SHA256_BLOCK_LENGTH) {
  ------------------
  |  |  120|   495k|#define SHA256_BLOCK_LENGTH 64    /* bytes */
  ------------------
  |  Branch (187:12): [True: 168k, False: 327k]
  ------------------
  188|   168k|        __m128i a, b, c, d;
  189|   168k|        __m128i w0, w1;
  190|   168k|        a = _mm_shuffle_epi8(_mm_loadu_si128((__m128i *)input), shuffle);
  191|   168k|        b = _mm_shuffle_epi8(_mm_loadu_si128((__m128i *)(input + 16)), shuffle);
  192|   168k|        c = _mm_shuffle_epi8(_mm_loadu_si128((__m128i *)(input + 32)), shuffle);
  193|   168k|        d = _mm_shuffle_epi8(_mm_loadu_si128((__m128i *)(input + 48)), shuffle);
  194|   168k|        input += SHA256_BLOCK_LENGTH;
  ------------------
  |  |  120|   168k|#define SHA256_BLOCK_LENGTH 64    /* bytes */
  ------------------
  195|   168k|        inputLen -= SHA256_BLOCK_LENGTH;
  ------------------
  |  |  120|   168k|#define SHA256_BLOCK_LENGTH 64    /* bytes */
  ------------------
  196|       |
  197|   168k|        w0 = h0;
  198|   168k|        w1 = h1;
  199|       |
  200|   168k|        ROUND(0, a, b, c, d)
  ------------------
  |  |   41|   168k|    {                                                       \
  |  |   42|   168k|        __m128i t = _mm_add_epi32(a, k##n);                 \
  |  |   43|   168k|        w1 = _mm_sha256rnds2_epu32(w1, w0, t);              \
  |  |   44|   168k|        t = _mm_shuffle_epi32(t, 0x0e);                     \
  |  |   45|   168k|        w0 = _mm_sha256rnds2_epu32(w0, w1, t);              \
  |  |   46|   168k|        if (n < 12) {                                       \
  |  |  ------------------
  |  |  |  Branch (46:13): [Folded - Ignored]
  |  |  ------------------
  |  |   47|   168k|            a = _mm_sha256msg1_epu32(a, b);                 \
  |  |   48|   168k|            a = _mm_add_epi32(a, _mm_alignr_epi8(d, c, 4)); \
  |  |   49|   168k|            a = _mm_sha256msg2_epu32(a, d);                 \
  |  |   50|   168k|        }                                                   \
  |  |   51|   168k|    }
  ------------------
  201|   168k|        ROUND(1, b, c, d, a)
  ------------------
  |  |   41|   168k|    {                                                       \
  |  |   42|   168k|        __m128i t = _mm_add_epi32(a, k##n);                 \
  |  |   43|   168k|        w1 = _mm_sha256rnds2_epu32(w1, w0, t);              \
  |  |   44|   168k|        t = _mm_shuffle_epi32(t, 0x0e);                     \
  |  |   45|   168k|        w0 = _mm_sha256rnds2_epu32(w0, w1, t);              \
  |  |   46|   168k|        if (n < 12) {                                       \
  |  |  ------------------
  |  |  |  Branch (46:13): [Folded - Ignored]
  |  |  ------------------
  |  |   47|   168k|            a = _mm_sha256msg1_epu32(a, b);                 \
  |  |   48|   168k|            a = _mm_add_epi32(a, _mm_alignr_epi8(d, c, 4)); \
  |  |   49|   168k|            a = _mm_sha256msg2_epu32(a, d);                 \
  |  |   50|   168k|        }                                                   \
  |  |   51|   168k|    }
  ------------------
  202|   168k|        ROUND(2, c, d, a, b)
  ------------------
  |  |   41|   168k|    {                                                       \
  |  |   42|   168k|        __m128i t = _mm_add_epi32(a, k##n);                 \
  |  |   43|   168k|        w1 = _mm_sha256rnds2_epu32(w1, w0, t);              \
  |  |   44|   168k|        t = _mm_shuffle_epi32(t, 0x0e);                     \
  |  |   45|   168k|        w0 = _mm_sha256rnds2_epu32(w0, w1, t);              \
  |  |   46|   168k|        if (n < 12) {                                       \
  |  |  ------------------
  |  |  |  Branch (46:13): [Folded - Ignored]
  |  |  ------------------
  |  |   47|   168k|            a = _mm_sha256msg1_epu32(a, b);                 \
  |  |   48|   168k|            a = _mm_add_epi32(a, _mm_alignr_epi8(d, c, 4)); \
  |  |   49|   168k|            a = _mm_sha256msg2_epu32(a, d);                 \
  |  |   50|   168k|        }                                                   \
  |  |   51|   168k|    }
  ------------------
  203|   168k|        ROUND(3, d, a, b, c)
  ------------------
  |  |   41|   168k|    {                                                       \
  |  |   42|   168k|        __m128i t = _mm_add_epi32(a, k##n);                 \
  |  |   43|   168k|        w1 = _mm_sha256rnds2_epu32(w1, w0, t);              \
  |  |   44|   168k|        t = _mm_shuffle_epi32(t, 0x0e);                     \
  |  |   45|   168k|        w0 = _mm_sha256rnds2_epu32(w0, w1, t);              \
  |  |   46|   168k|        if (n < 12) {                                       \
  |  |  ------------------
  |  |  |  Branch (46:13): [Folded - Ignored]
  |  |  ------------------
  |  |   47|   168k|            a = _mm_sha256msg1_epu32(a, b);                 \
  |  |   48|   168k|            a = _mm_add_epi32(a, _mm_alignr_epi8(d, c, 4)); \
  |  |   49|   168k|            a = _mm_sha256msg2_epu32(a, d);                 \
  |  |   50|   168k|        }                                                   \
  |  |   51|   168k|    }
  ------------------
  204|   168k|        ROUND(4, a, b, c, d)
  ------------------
  |  |   41|   168k|    {                                                       \
  |  |   42|   168k|        __m128i t = _mm_add_epi32(a, k##n);                 \
  |  |   43|   168k|        w1 = _mm_sha256rnds2_epu32(w1, w0, t);              \
  |  |   44|   168k|        t = _mm_shuffle_epi32(t, 0x0e);                     \
  |  |   45|   168k|        w0 = _mm_sha256rnds2_epu32(w0, w1, t);              \
  |  |   46|   168k|        if (n < 12) {                                       \
  |  |  ------------------
  |  |  |  Branch (46:13): [Folded - Ignored]
  |  |  ------------------
  |  |   47|   168k|            a = _mm_sha256msg1_epu32(a, b);                 \
  |  |   48|   168k|            a = _mm_add_epi32(a, _mm_alignr_epi8(d, c, 4)); \
  |  |   49|   168k|            a = _mm_sha256msg2_epu32(a, d);                 \
  |  |   50|   168k|        }                                                   \
  |  |   51|   168k|    }
  ------------------
  205|   168k|        ROUND(5, b, c, d, a)
  ------------------
  |  |   41|   168k|    {                                                       \
  |  |   42|   168k|        __m128i t = _mm_add_epi32(a, k##n);                 \
  |  |   43|   168k|        w1 = _mm_sha256rnds2_epu32(w1, w0, t);              \
  |  |   44|   168k|        t = _mm_shuffle_epi32(t, 0x0e);                     \
  |  |   45|   168k|        w0 = _mm_sha256rnds2_epu32(w0, w1, t);              \
  |  |   46|   168k|        if (n < 12) {                                       \
  |  |  ------------------
  |  |  |  Branch (46:13): [Folded - Ignored]
  |  |  ------------------
  |  |   47|   168k|            a = _mm_sha256msg1_epu32(a, b);                 \
  |  |   48|   168k|            a = _mm_add_epi32(a, _mm_alignr_epi8(d, c, 4)); \
  |  |   49|   168k|            a = _mm_sha256msg2_epu32(a, d);                 \
  |  |   50|   168k|        }                                                   \
  |  |   51|   168k|    }
  ------------------
  206|   168k|        ROUND(6, c, d, a, b)
  ------------------
  |  |   41|   168k|    {                                                       \
  |  |   42|   168k|        __m128i t = _mm_add_epi32(a, k##n);                 \
  |  |   43|   168k|        w1 = _mm_sha256rnds2_epu32(w1, w0, t);              \
  |  |   44|   168k|        t = _mm_shuffle_epi32(t, 0x0e);                     \
  |  |   45|   168k|        w0 = _mm_sha256rnds2_epu32(w0, w1, t);              \
  |  |   46|   168k|        if (n < 12) {                                       \
  |  |  ------------------
  |  |  |  Branch (46:13): [Folded - Ignored]
  |  |  ------------------
  |  |   47|   168k|            a = _mm_sha256msg1_epu32(a, b);                 \
  |  |   48|   168k|            a = _mm_add_epi32(a, _mm_alignr_epi8(d, c, 4)); \
  |  |   49|   168k|            a = _mm_sha256msg2_epu32(a, d);                 \
  |  |   50|   168k|        }                                                   \
  |  |   51|   168k|    }
  ------------------
  207|   168k|        ROUND(7, d, a, b, c)
  ------------------
  |  |   41|   168k|    {                                                       \
  |  |   42|   168k|        __m128i t = _mm_add_epi32(a, k##n);                 \
  |  |   43|   168k|        w1 = _mm_sha256rnds2_epu32(w1, w0, t);              \
  |  |   44|   168k|        t = _mm_shuffle_epi32(t, 0x0e);                     \
  |  |   45|   168k|        w0 = _mm_sha256rnds2_epu32(w0, w1, t);              \
  |  |   46|   168k|        if (n < 12) {                                       \
  |  |  ------------------
  |  |  |  Branch (46:13): [Folded - Ignored]
  |  |  ------------------
  |  |   47|   168k|            a = _mm_sha256msg1_epu32(a, b);                 \
  |  |   48|   168k|            a = _mm_add_epi32(a, _mm_alignr_epi8(d, c, 4)); \
  |  |   49|   168k|            a = _mm_sha256msg2_epu32(a, d);                 \
  |  |   50|   168k|        }                                                   \
  |  |   51|   168k|    }
  ------------------
  208|   168k|        ROUND(8, a, b, c, d)
  ------------------
  |  |   41|   168k|    {                                                       \
  |  |   42|   168k|        __m128i t = _mm_add_epi32(a, k##n);                 \
  |  |   43|   168k|        w1 = _mm_sha256rnds2_epu32(w1, w0, t);              \
  |  |   44|   168k|        t = _mm_shuffle_epi32(t, 0x0e);                     \
  |  |   45|   168k|        w0 = _mm_sha256rnds2_epu32(w0, w1, t);              \
  |  |   46|   168k|        if (n < 12) {                                       \
  |  |  ------------------
  |  |  |  Branch (46:13): [Folded - Ignored]
  |  |  ------------------
  |  |   47|   168k|            a = _mm_sha256msg1_epu32(a, b);                 \
  |  |   48|   168k|            a = _mm_add_epi32(a, _mm_alignr_epi8(d, c, 4)); \
  |  |   49|   168k|            a = _mm_sha256msg2_epu32(a, d);                 \
  |  |   50|   168k|        }                                                   \
  |  |   51|   168k|    }
  ------------------
  209|   168k|        ROUND(9, b, c, d, a)
  ------------------
  |  |   41|   168k|    {                                                       \
  |  |   42|   168k|        __m128i t = _mm_add_epi32(a, k##n);                 \
  |  |   43|   168k|        w1 = _mm_sha256rnds2_epu32(w1, w0, t);              \
  |  |   44|   168k|        t = _mm_shuffle_epi32(t, 0x0e);                     \
  |  |   45|   168k|        w0 = _mm_sha256rnds2_epu32(w0, w1, t);              \
  |  |   46|   168k|        if (n < 12) {                                       \
  |  |  ------------------
  |  |  |  Branch (46:13): [Folded - Ignored]
  |  |  ------------------
  |  |   47|   168k|            a = _mm_sha256msg1_epu32(a, b);                 \
  |  |   48|   168k|            a = _mm_add_epi32(a, _mm_alignr_epi8(d, c, 4)); \
  |  |   49|   168k|            a = _mm_sha256msg2_epu32(a, d);                 \
  |  |   50|   168k|        }                                                   \
  |  |   51|   168k|    }
  ------------------
  210|   168k|        ROUND(10, c, d, a, b)
  ------------------
  |  |   41|   168k|    {                                                       \
  |  |   42|   168k|        __m128i t = _mm_add_epi32(a, k##n);                 \
  |  |   43|   168k|        w1 = _mm_sha256rnds2_epu32(w1, w0, t);              \
  |  |   44|   168k|        t = _mm_shuffle_epi32(t, 0x0e);                     \
  |  |   45|   168k|        w0 = _mm_sha256rnds2_epu32(w0, w1, t);              \
  |  |   46|   168k|        if (n < 12) {                                       \
  |  |  ------------------
  |  |  |  Branch (46:13): [Folded - Ignored]
  |  |  ------------------
  |  |   47|   168k|            a = _mm_sha256msg1_epu32(a, b);                 \
  |  |   48|   168k|            a = _mm_add_epi32(a, _mm_alignr_epi8(d, c, 4)); \
  |  |   49|   168k|            a = _mm_sha256msg2_epu32(a, d);                 \
  |  |   50|   168k|        }                                                   \
  |  |   51|   168k|    }
  ------------------
  211|   168k|        ROUND(11, d, a, b, c)
  ------------------
  |  |   41|   168k|    {                                                       \
  |  |   42|   168k|        __m128i t = _mm_add_epi32(a, k##n);                 \
  |  |   43|   168k|        w1 = _mm_sha256rnds2_epu32(w1, w0, t);              \
  |  |   44|   168k|        t = _mm_shuffle_epi32(t, 0x0e);                     \
  |  |   45|   168k|        w0 = _mm_sha256rnds2_epu32(w0, w1, t);              \
  |  |   46|   168k|        if (n < 12) {                                       \
  |  |  ------------------
  |  |  |  Branch (46:13): [Folded - Ignored]
  |  |  ------------------
  |  |   47|   168k|            a = _mm_sha256msg1_epu32(a, b);                 \
  |  |   48|   168k|            a = _mm_add_epi32(a, _mm_alignr_epi8(d, c, 4)); \
  |  |   49|   168k|            a = _mm_sha256msg2_epu32(a, d);                 \
  |  |   50|   168k|        }                                                   \
  |  |   51|   168k|    }
  ------------------
  212|   168k|        ROUND(12, a, b, c, d)
  ------------------
  |  |   41|   168k|    {                                                       \
  |  |   42|   168k|        __m128i t = _mm_add_epi32(a, k##n);                 \
  |  |   43|   168k|        w1 = _mm_sha256rnds2_epu32(w1, w0, t);              \
  |  |   44|   168k|        t = _mm_shuffle_epi32(t, 0x0e);                     \
  |  |   45|   168k|        w0 = _mm_sha256rnds2_epu32(w0, w1, t);              \
  |  |   46|   168k|        if (n < 12) {                                       \
  |  |  ------------------
  |  |  |  Branch (46:13): [Folded - Ignored]
  |  |  ------------------
  |  |   47|      0|            a = _mm_sha256msg1_epu32(a, b);                 \
  |  |   48|      0|            a = _mm_add_epi32(a, _mm_alignr_epi8(d, c, 4)); \
  |  |   49|      0|            a = _mm_sha256msg2_epu32(a, d);                 \
  |  |   50|      0|        }                                                   \
  |  |   51|   168k|    }
  ------------------
  213|   168k|        ROUND(13, b, c, d, a)
  ------------------
  |  |   41|   168k|    {                                                       \
  |  |   42|   168k|        __m128i t = _mm_add_epi32(a, k##n);                 \
  |  |   43|   168k|        w1 = _mm_sha256rnds2_epu32(w1, w0, t);              \
  |  |   44|   168k|        t = _mm_shuffle_epi32(t, 0x0e);                     \
  |  |   45|   168k|        w0 = _mm_sha256rnds2_epu32(w0, w1, t);              \
  |  |   46|   168k|        if (n < 12) {                                       \
  |  |  ------------------
  |  |  |  Branch (46:13): [Folded - Ignored]
  |  |  ------------------
  |  |   47|      0|            a = _mm_sha256msg1_epu32(a, b);                 \
  |  |   48|      0|            a = _mm_add_epi32(a, _mm_alignr_epi8(d, c, 4)); \
  |  |   49|      0|            a = _mm_sha256msg2_epu32(a, d);                 \
  |  |   50|      0|        }                                                   \
  |  |   51|   168k|    }
  ------------------
  214|   168k|        ROUND(14, c, d, a, b)
  ------------------
  |  |   41|   168k|    {                                                       \
  |  |   42|   168k|        __m128i t = _mm_add_epi32(a, k##n);                 \
  |  |   43|   168k|        w1 = _mm_sha256rnds2_epu32(w1, w0, t);              \
  |  |   44|   168k|        t = _mm_shuffle_epi32(t, 0x0e);                     \
  |  |   45|   168k|        w0 = _mm_sha256rnds2_epu32(w0, w1, t);              \
  |  |   46|   168k|        if (n < 12) {                                       \
  |  |  ------------------
  |  |  |  Branch (46:13): [Folded - Ignored]
  |  |  ------------------
  |  |   47|      0|            a = _mm_sha256msg1_epu32(a, b);                 \
  |  |   48|      0|            a = _mm_add_epi32(a, _mm_alignr_epi8(d, c, 4)); \
  |  |   49|      0|            a = _mm_sha256msg2_epu32(a, d);                 \
  |  |   50|      0|        }                                                   \
  |  |   51|   168k|    }
  ------------------
  215|   168k|        ROUND(15, d, a, b, c)
  ------------------
  |  |   41|   168k|    {                                                       \
  |  |   42|   168k|        __m128i t = _mm_add_epi32(a, k##n);                 \
  |  |   43|   168k|        w1 = _mm_sha256rnds2_epu32(w1, w0, t);              \
  |  |   44|   168k|        t = _mm_shuffle_epi32(t, 0x0e);                     \
  |  |   45|   168k|        w0 = _mm_sha256rnds2_epu32(w0, w1, t);              \
  |  |   46|   168k|        if (n < 12) {                                       \
  |  |  ------------------
  |  |  |  Branch (46:13): [Folded - Ignored]
  |  |  ------------------
  |  |   47|      0|            a = _mm_sha256msg1_epu32(a, b);                 \
  |  |   48|      0|            a = _mm_add_epi32(a, _mm_alignr_epi8(d, c, 4)); \
  |  |   49|      0|            a = _mm_sha256msg2_epu32(a, d);                 \
  |  |   50|      0|        }                                                   \
  |  |   51|   168k|    }
  ------------------
  216|       |
  217|   168k|        h0 = _mm_add_epi32(h0, w0);
  218|   168k|        h1 = _mm_add_epi32(h1, w1);
  219|   168k|    }
  220|       |
  221|       |    // H01234567 -> H01256 and H2367
  222|   327k|    th = _mm_shuffle_epi32(h0, 0x1b);
  223|   327k|    h1 = _mm_shuffle_epi32(h1, 0xb1);
  224|   327k|    h0 = _mm_blend_epi16(th, h1, 0xf0);
  225|   327k|    h1 = _mm_alignr_epi8(h1, th, 8);
  226|       |
  227|   327k|    _mm_storeu_si128((__m128i *)ctx->h, h0);
  228|   327k|    _mm_storeu_si128((__m128i *)(ctx->h + 4), h1);
  229|       |
  230|       |    /* if data left over, fill it into buffer */
  231|   327k|    if (inputLen) {
  ------------------
  |  Branch (231:9): [True: 114k, False: 213k]
  ------------------
  232|   114k|        memcpy(ctx->u.b, input, inputLen);
  233|   114k|    }
  234|   327k|}

SHA256_NewContext:
  186|  42.6k|{
  187|  42.6k|    SHA256Context *ctx = PORT_New(SHA256Context);
  ------------------
  |  |  151|  42.6k|#define PORT_New(type) (type *)PORT_Alloc(sizeof(type))
  |  |  ------------------
  |  |  |  |   52|  42.6k|#define PORT_Alloc PORT_Alloc_Util
  |  |  ------------------
  ------------------
  188|  42.6k|    return ctx;
  189|  42.6k|}
SHA256_DestroyContext:
  193|  42.6k|{
  194|  42.6k|    memset(ctx, 0, sizeof *ctx);
  195|  42.6k|    if (freeit) {
  ------------------
  |  Branch (195:9): [True: 42.6k, False: 0]
  ------------------
  196|  42.6k|        PORT_Free(ctx);
  ------------------
  |  |   60|  42.6k|#define PORT_Free PORT_Free_Util
  ------------------
  197|  42.6k|    }
  198|  42.6k|}
SHA256_Begin:
  202|   104k|{
  203|   104k|    PRBool use_hw_sha2 = PR_FALSE;
  ------------------
  |  |  438|   104k|#define PR_FALSE 0
  ------------------
  204|       |
  205|   104k|    memset(ctx, 0, sizeof *ctx);
  206|   104k|    memcpy(H, H256, sizeof H256);
  ------------------
  |  |   31|   104k|#define H ctx->h
  ------------------
  207|       |
  208|   104k|#if defined(USE_HW_SHA2) && defined(IS_LITTLE_ENDIAN)
  209|       |    /* arm's implementation is tested on little endian only */
  210|   104k|    use_hw_sha2 = arm_sha2_support() || (sha_support() && ssse3_support() && sse4_1_support());
  ------------------
  |  Branch (210:19): [True: 0, False: 104k]
  |  Branch (210:42): [True: 104k, False: 0]
  |  Branch (210:59): [True: 104k, False: 0]
  |  Branch (210:78): [True: 104k, False: 0]
  ------------------
  211|   104k|#endif
  212|       |
  213|   104k|    if (use_hw_sha2) {
  ------------------
  |  Branch (213:9): [True: 104k, False: 0]
  ------------------
  214|   104k|        ctx->compress = SHA256_Compress_Native;
  215|   104k|        ctx->update = SHA256_Update_Native;
  216|   104k|    } else {
  217|      0|        ctx->compress = SHA256_Compress_Generic;
  218|      0|        ctx->update = SHA256_Update_Generic;
  219|      0|    }
  220|   104k|}
SHA256_Update:
  517|   229k|{
  518|   229k|    ctx->update(ctx, input, inputLen);
  519|   229k|}
SHA256_End:
  560|  99.5k|{
  561|  99.5k|    unsigned int inBuf = ctx->sizeLo & 0x3f;
  562|  99.5k|    unsigned int padLen = (inBuf < 56) ? (56 - inBuf) : (56 + 64 - inBuf);
  ------------------
  |  Branch (562:27): [True: 98.3k, False: 1.15k]
  ------------------
  563|  99.5k|    PRUint32 hi, lo;
  564|       |
  565|  99.5k|    hi = (ctx->sizeHi << 3) | (ctx->sizeLo >> 29);
  566|  99.5k|    lo = (ctx->sizeLo << 3);
  567|       |
  568|  99.5k|    ctx->update(ctx, pad, padLen);
  569|       |
  570|  99.5k|#if defined(IS_LITTLE_ENDIAN)
  571|  99.5k|    W[14] = SHA_HTONL(hi);
  ------------------
  |  |   29|  99.5k|#define W ctx->u.w
  ------------------
                  W[14] = SHA_HTONL(hi);
  ------------------
  |  |  108|  99.5k|#define SHA_HTONL(x) swap4b(x)
  ------------------
  572|  99.5k|    W[15] = SHA_HTONL(lo);
  ------------------
  |  |   29|  99.5k|#define W ctx->u.w
  ------------------
                  W[15] = SHA_HTONL(lo);
  ------------------
  |  |  108|  99.5k|#define SHA_HTONL(x) swap4b(x)
  ------------------
  573|       |#else
  574|       |    W[14] = hi;
  575|       |    W[15] = lo;
  576|       |#endif
  577|  99.5k|    ctx->compress(ctx);
  578|       |
  579|       |/* now output the answer */
  580|  99.5k|#if defined(IS_LITTLE_ENDIAN)
  581|  99.5k|    BYTESWAP4(H[0]);
  ------------------
  |  |  142|  99.5k|#define BYTESWAP4(x) x = SHA_HTONL(x)
  |  |  ------------------
  |  |  |  |  108|  99.5k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
  582|  99.5k|    BYTESWAP4(H[1]);
  ------------------
  |  |  142|  99.5k|#define BYTESWAP4(x) x = SHA_HTONL(x)
  |  |  ------------------
  |  |  |  |  108|  99.5k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
  583|  99.5k|    BYTESWAP4(H[2]);
  ------------------
  |  |  142|  99.5k|#define BYTESWAP4(x) x = SHA_HTONL(x)
  |  |  ------------------
  |  |  |  |  108|  99.5k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
  584|  99.5k|    BYTESWAP4(H[3]);
  ------------------
  |  |  142|  99.5k|#define BYTESWAP4(x) x = SHA_HTONL(x)
  |  |  ------------------
  |  |  |  |  108|  99.5k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
  585|  99.5k|    BYTESWAP4(H[4]);
  ------------------
  |  |  142|  99.5k|#define BYTESWAP4(x) x = SHA_HTONL(x)
  |  |  ------------------
  |  |  |  |  108|  99.5k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
  586|  99.5k|    BYTESWAP4(H[5]);
  ------------------
  |  |  142|  99.5k|#define BYTESWAP4(x) x = SHA_HTONL(x)
  |  |  ------------------
  |  |  |  |  108|  99.5k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
  587|  99.5k|    BYTESWAP4(H[6]);
  ------------------
  |  |  142|  99.5k|#define BYTESWAP4(x) x = SHA_HTONL(x)
  |  |  ------------------
  |  |  |  |  108|  99.5k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
  588|  99.5k|    BYTESWAP4(H[7]);
  ------------------
  |  |  142|  99.5k|#define BYTESWAP4(x) x = SHA_HTONL(x)
  |  |  ------------------
  |  |  |  |  108|  99.5k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
  589|  99.5k|#endif
  590|  99.5k|    padLen = PR_MIN(SHA256_LENGTH, maxDigestLen);
  ------------------
  |  |  158|  99.5k|#define PR_MIN(x,y)     ((x)<(y)?(x):(y))
  |  |  ------------------
  |  |  |  Branch (158:26): [True: 68.1k, False: 31.4k]
  |  |  ------------------
  ------------------
  591|  99.5k|    memcpy(digest, H, padLen);
  ------------------
  |  |   31|  99.5k|#define H ctx->h
  ------------------
  592|  99.5k|    if (digestLen)
  ------------------
  |  Branch (592:9): [True: 98.4k, False: 1.08k]
  ------------------
  593|  98.4k|        *digestLen = padLen;
  594|  99.5k|}
SHA256_EndRaw:
  599|  7.61k|{
  600|  7.61k|    PRUint32 h[8];
  601|  7.61k|    unsigned int len;
  602|       |
  603|  7.61k|    memcpy(h, ctx->h, sizeof(h));
  604|       |
  605|  7.61k|#if defined(IS_LITTLE_ENDIAN)
  606|  7.61k|    BYTESWAP4(h[0]);
  ------------------
  |  |  142|  7.61k|#define BYTESWAP4(x) x = SHA_HTONL(x)
  |  |  ------------------
  |  |  |  |  108|  7.61k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
  607|  7.61k|    BYTESWAP4(h[1]);
  ------------------
  |  |  142|  7.61k|#define BYTESWAP4(x) x = SHA_HTONL(x)
  |  |  ------------------
  |  |  |  |  108|  7.61k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
  608|  7.61k|    BYTESWAP4(h[2]);
  ------------------
  |  |  142|  7.61k|#define BYTESWAP4(x) x = SHA_HTONL(x)
  |  |  ------------------
  |  |  |  |  108|  7.61k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
  609|  7.61k|    BYTESWAP4(h[3]);
  ------------------
  |  |  142|  7.61k|#define BYTESWAP4(x) x = SHA_HTONL(x)
  |  |  ------------------
  |  |  |  |  108|  7.61k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
  610|  7.61k|    BYTESWAP4(h[4]);
  ------------------
  |  |  142|  7.61k|#define BYTESWAP4(x) x = SHA_HTONL(x)
  |  |  ------------------
  |  |  |  |  108|  7.61k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
  611|  7.61k|    BYTESWAP4(h[5]);
  ------------------
  |  |  142|  7.61k|#define BYTESWAP4(x) x = SHA_HTONL(x)
  |  |  ------------------
  |  |  |  |  108|  7.61k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
  612|  7.61k|    BYTESWAP4(h[6]);
  ------------------
  |  |  142|  7.61k|#define BYTESWAP4(x) x = SHA_HTONL(x)
  |  |  ------------------
  |  |  |  |  108|  7.61k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
  613|  7.61k|    BYTESWAP4(h[7]);
  ------------------
  |  |  142|  7.61k|#define BYTESWAP4(x) x = SHA_HTONL(x)
  |  |  ------------------
  |  |  |  |  108|  7.61k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
  614|  7.61k|#endif
  615|       |
  616|  7.61k|    len = PR_MIN(SHA256_LENGTH, maxDigestLen);
  ------------------
  |  |  158|  7.61k|#define PR_MIN(x,y)     ((x)<(y)?(x):(y))
  |  |  ------------------
  |  |  |  Branch (158:26): [True: 0, False: 7.61k]
  |  |  ------------------
  ------------------
  617|  7.61k|    memcpy(digest, h, len);
  618|  7.61k|    if (digestLen)
  ------------------
  |  Branch (618:9): [True: 0, False: 7.61k]
  ------------------
  619|      0|        *digestLen = len;
  620|  7.61k|}
SHA256_FlattenSize:
  650|  16.3k|{
  651|  16.3k|    return sizeof *ctx;
  652|  16.3k|}
SHA512_NewContext:
  962|  20.8k|{
  963|  20.8k|    SHA512Context *ctx = PORT_New(SHA512Context);
  ------------------
  |  |  151|  20.8k|#define PORT_New(type) (type *)PORT_Alloc(sizeof(type))
  |  |  ------------------
  |  |  |  |   52|  20.8k|#define PORT_Alloc PORT_Alloc_Util
  |  |  ------------------
  ------------------
  964|  20.8k|    return ctx;
  965|  20.8k|}
SHA512_DestroyContext:
  969|  20.8k|{
  970|  20.8k|    memset(ctx, 0, sizeof *ctx);
  971|  20.8k|    if (freeit) {
  ------------------
  |  Branch (971:9): [True: 20.8k, False: 0]
  ------------------
  972|  20.8k|        PORT_Free(ctx);
  ------------------
  |  |   60|  20.8k|#define PORT_Free PORT_Free_Util
  ------------------
  973|  20.8k|    }
  974|  20.8k|}
SHA512_Begin:
  978|    596|{
  979|    596|    memset(ctx, 0, sizeof *ctx);
  980|    596|    memcpy(H, H512, sizeof H512);
  ------------------
  |  |   31|    596|#define H ctx->h
  ------------------
  981|    596|}
SHA512_Update:
 1340|   106k|{
 1341|   106k|    unsigned int inBuf;
 1342|   106k|    if (!inputLen)
  ------------------
  |  Branch (1342:9): [True: 92, False: 106k]
  ------------------
 1343|     92|        return;
 1344|       |
 1345|   106k|#if defined(HAVE_LONG_LONG)
 1346|   106k|    inBuf = (unsigned int)ctx->sizeLo & 0x7f;
 1347|       |    /* Add inputLen into the count of bytes processed, before processing */
 1348|   106k|    ctx->sizeLo += inputLen;
 1349|       |#else
 1350|       |    inBuf = (unsigned int)ctx->sizeLo.lo & 0x7f;
 1351|       |    ctx->sizeLo.lo += inputLen;
 1352|       |    if (ctx->sizeLo.lo < inputLen)
 1353|       |        ctx->sizeLo.hi++;
 1354|       |#endif
 1355|       |
 1356|       |    /* if data already in buffer, attemp to fill rest of buffer */
 1357|   106k|    if (inBuf) {
  ------------------
  |  Branch (1357:9): [True: 42.9k, False: 63.3k]
  ------------------
 1358|  42.9k|        unsigned int todo = SHA512_BLOCK_LENGTH - inBuf;
  ------------------
  |  |  122|  42.9k|#define SHA512_BLOCK_LENGTH 128   /* bytes */
  ------------------
 1359|  42.9k|        if (inputLen < todo)
  ------------------
  |  Branch (1359:13): [True: 38.7k, False: 4.26k]
  ------------------
 1360|  38.7k|            todo = inputLen;
 1361|  42.9k|        memcpy(B + inBuf, input, todo);
  ------------------
  |  |   30|  42.9k|#define B ctx->u.b
  ------------------
 1362|  42.9k|        input += todo;
 1363|  42.9k|        inputLen -= todo;
 1364|  42.9k|        if (inBuf + todo == SHA512_BLOCK_LENGTH)
  ------------------
  |  |  122|  42.9k|#define SHA512_BLOCK_LENGTH 128   /* bytes */
  ------------------
  |  Branch (1364:13): [True: 4.26k, False: 38.7k]
  ------------------
 1365|  4.26k|            SHA512_Compress(ctx);
 1366|  42.9k|    }
 1367|       |
 1368|       |    /* if enough data to fill one or more whole buffers, process them. */
 1369|   142k|    while (inputLen >= SHA512_BLOCK_LENGTH) {
  ------------------
  |  |  122|   142k|#define SHA512_BLOCK_LENGTH 128   /* bytes */
  ------------------
  |  Branch (1369:12): [True: 36.1k, False: 106k]
  ------------------
 1370|  36.1k|        memcpy(B, input, SHA512_BLOCK_LENGTH);
  ------------------
  |  |   30|  36.1k|#define B ctx->u.b
  ------------------
                      memcpy(B, input, SHA512_BLOCK_LENGTH);
  ------------------
  |  |  122|  36.1k|#define SHA512_BLOCK_LENGTH 128   /* bytes */
  ------------------
 1371|  36.1k|        input += SHA512_BLOCK_LENGTH;
  ------------------
  |  |  122|  36.1k|#define SHA512_BLOCK_LENGTH 128   /* bytes */
  ------------------
 1372|  36.1k|        inputLen -= SHA512_BLOCK_LENGTH;
  ------------------
  |  |  122|  36.1k|#define SHA512_BLOCK_LENGTH 128   /* bytes */
  ------------------
 1373|  36.1k|        SHA512_Compress(ctx);
 1374|  36.1k|    }
 1375|       |    /* if data left over, fill it into buffer */
 1376|   106k|    if (inputLen)
  ------------------
  |  Branch (1376:9): [True: 39.4k, False: 66.8k]
  ------------------
 1377|  39.4k|        memcpy(B, input, inputLen);
  ------------------
  |  |   30|  39.4k|#define B ctx->u.b
  ------------------
 1378|   106k|}
SHA512_End:
 1383|  35.3k|{
 1384|  35.3k|#if defined(HAVE_LONG_LONG)
 1385|  35.3k|    unsigned int inBuf = (unsigned int)ctx->sizeLo & 0x7f;
 1386|       |#else
 1387|       |    unsigned int inBuf = (unsigned int)ctx->sizeLo.lo & 0x7f;
 1388|       |#endif
 1389|  35.3k|    unsigned int padLen = (inBuf < 112) ? (112 - inBuf) : (112 + 128 - inBuf);
  ------------------
  |  Branch (1389:27): [True: 34.1k, False: 1.13k]
  ------------------
 1390|  35.3k|    PRUint64 lo;
 1391|  35.3k|    LL_SHL(lo, ctx->sizeLo, 3);
  ------------------
  |  |  127|  35.3k|#define LL_SHL(r, a, b)     ((r) = (PRInt64)(a) << (b))
  ------------------
 1392|       |
 1393|  35.3k|    SHA512_Update(ctx, pad, padLen);
 1394|       |
 1395|  35.3k|#if defined(HAVE_LONG_LONG)
 1396|  35.3k|    W[14] = 0;
  ------------------
  |  |   29|  35.3k|#define W ctx->u.w
  ------------------
 1397|       |#else
 1398|       |    W[14].lo = 0;
 1399|       |    W[14].hi = 0;
 1400|       |#endif
 1401|       |
 1402|  35.3k|    W[15] = lo;
  ------------------
  |  |   29|  35.3k|#define W ctx->u.w
  ------------------
 1403|  35.3k|#if defined(IS_LITTLE_ENDIAN)
 1404|  35.3k|    BYTESWAP8(W[15]);
  ------------------
  |  |  810|  35.3k|#define BYTESWAP8(x) x = FREEBL_HTONLL(x)
  |  |  ------------------
  |  |  |  |   46|  35.3k|#define FREEBL_HTONLL(x) __builtin_bswap64(x)
  |  |  ------------------
  ------------------
 1405|  35.3k|#endif
 1406|  35.3k|    SHA512_Compress(ctx);
 1407|       |
 1408|       |/* now output the answer */
 1409|  35.3k|#if defined(IS_LITTLE_ENDIAN)
 1410|  35.3k|    BYTESWAP8(H[0]);
  ------------------
  |  |  810|  35.3k|#define BYTESWAP8(x) x = FREEBL_HTONLL(x)
  |  |  ------------------
  |  |  |  |   46|  35.3k|#define FREEBL_HTONLL(x) __builtin_bswap64(x)
  |  |  ------------------
  ------------------
 1411|  35.3k|    BYTESWAP8(H[1]);
  ------------------
  |  |  810|  35.3k|#define BYTESWAP8(x) x = FREEBL_HTONLL(x)
  |  |  ------------------
  |  |  |  |   46|  35.3k|#define FREEBL_HTONLL(x) __builtin_bswap64(x)
  |  |  ------------------
  ------------------
 1412|  35.3k|    BYTESWAP8(H[2]);
  ------------------
  |  |  810|  35.3k|#define BYTESWAP8(x) x = FREEBL_HTONLL(x)
  |  |  ------------------
  |  |  |  |   46|  35.3k|#define FREEBL_HTONLL(x) __builtin_bswap64(x)
  |  |  ------------------
  ------------------
 1413|  35.3k|    BYTESWAP8(H[3]);
  ------------------
  |  |  810|  35.3k|#define BYTESWAP8(x) x = FREEBL_HTONLL(x)
  |  |  ------------------
  |  |  |  |   46|  35.3k|#define FREEBL_HTONLL(x) __builtin_bswap64(x)
  |  |  ------------------
  ------------------
 1414|  35.3k|    BYTESWAP8(H[4]);
  ------------------
  |  |  810|  35.3k|#define BYTESWAP8(x) x = FREEBL_HTONLL(x)
  |  |  ------------------
  |  |  |  |   46|  35.3k|#define FREEBL_HTONLL(x) __builtin_bswap64(x)
  |  |  ------------------
  ------------------
 1415|  35.3k|    BYTESWAP8(H[5]);
  ------------------
  |  |  810|  35.3k|#define BYTESWAP8(x) x = FREEBL_HTONLL(x)
  |  |  ------------------
  |  |  |  |   46|  35.3k|#define FREEBL_HTONLL(x) __builtin_bswap64(x)
  |  |  ------------------
  ------------------
 1416|  35.3k|    BYTESWAP8(H[6]);
  ------------------
  |  |  810|  35.3k|#define BYTESWAP8(x) x = FREEBL_HTONLL(x)
  |  |  ------------------
  |  |  |  |   46|  35.3k|#define FREEBL_HTONLL(x) __builtin_bswap64(x)
  |  |  ------------------
  ------------------
 1417|  35.3k|    BYTESWAP8(H[7]);
  ------------------
  |  |  810|  35.3k|#define BYTESWAP8(x) x = FREEBL_HTONLL(x)
  |  |  ------------------
  |  |  |  |   46|  35.3k|#define FREEBL_HTONLL(x) __builtin_bswap64(x)
  |  |  ------------------
  ------------------
 1418|  35.3k|#endif
 1419|  35.3k|    padLen = PR_MIN(SHA512_LENGTH, maxDigestLen);
  ------------------
  |  |  158|  35.3k|#define PR_MIN(x,y)     ((x)<(y)?(x):(y))
  |  |  ------------------
  |  |  |  Branch (158:26): [True: 0, False: 35.3k]
  |  |  ------------------
  ------------------
 1420|  35.3k|    memcpy(digest, H, padLen);
  ------------------
  |  |   31|  35.3k|#define H ctx->h
  ------------------
 1421|  35.3k|    if (digestLen)
  ------------------
  |  Branch (1421:9): [True: 35.3k, False: 0]
  ------------------
 1422|  35.3k|        *digestLen = padLen;
 1423|  35.3k|}
SHA512_FlattenSize:
 1478|    589|{
 1479|    589|    return sizeof *ctx;
 1480|    589|}
SHA384_NewContext:
 1528|  20.2k|{
 1529|  20.2k|    return SHA512_NewContext();
 1530|  20.2k|}
SHA384_DestroyContext:
 1534|  20.2k|{
 1535|  20.2k|    SHA512_DestroyContext(ctx, freeit);
 1536|  20.2k|}
SHA384_Begin:
 1540|  35.0k|{
 1541|  35.0k|    memset(ctx, 0, sizeof *ctx);
 1542|  35.0k|    memcpy(H, H384, sizeof H384);
  ------------------
  |  |   31|  35.0k|#define H ctx->h
  ------------------
 1543|  35.0k|}
SHA384_Update:
 1548|  70.5k|{
 1549|  70.5k|    SHA512_Update(ctx, input, inputLen);
 1550|  70.5k|}
SHA384_End:
 1555|  34.7k|{
 1556|  34.7k|    unsigned int maxLen = SHA_MIN(maxDigestLen, SHA384_LENGTH);
  ------------------
  |  |   37|  34.7k|#define SHA_MIN(a, b) (a < b ? a : b)
  |  |  ------------------
  |  |  |  Branch (37:24): [True: 0, False: 34.7k]
  |  |  ------------------
  ------------------
 1557|  34.7k|    SHA512_End(ctx, digest, digestLen, maxLen);
 1558|  34.7k|}
SHA384_FlattenSize:
 1596|  6.97k|{
 1597|  6.97k|    return sizeof(SHA384Context);
 1598|  6.97k|}
sha512.c:swap4b:
  103|  1.05M|{
  104|  1.05M|    __asm__("bswap %0"
  105|  1.05M|            : "+r"(value));
  106|  1.05M|    return (value);
  107|  1.05M|}
sha512.c:SHA512_Compress:
 1086|  75.6k|{
 1087|       |#if defined(USE_PPC_CRYPTO)
 1088|       |    sha512_block_p8(&H[0], &W[0], 1);
 1089|       |#else /* USE_PPC_CRYPTO */
 1090|       |
 1091|  75.6k|#if defined(IS_LITTLE_ENDIAN)
 1092|  75.6k|    {
 1093|  75.6k|        BYTESWAP8(W[0]);
  ------------------
  |  |  810|  75.6k|#define BYTESWAP8(x) x = FREEBL_HTONLL(x)
  |  |  ------------------
  |  |  |  |   46|  75.6k|#define FREEBL_HTONLL(x) __builtin_bswap64(x)
  |  |  ------------------
  ------------------
 1094|  75.6k|        BYTESWAP8(W[1]);
  ------------------
  |  |  810|  75.6k|#define BYTESWAP8(x) x = FREEBL_HTONLL(x)
  |  |  ------------------
  |  |  |  |   46|  75.6k|#define FREEBL_HTONLL(x) __builtin_bswap64(x)
  |  |  ------------------
  ------------------
 1095|  75.6k|        BYTESWAP8(W[2]);
  ------------------
  |  |  810|  75.6k|#define BYTESWAP8(x) x = FREEBL_HTONLL(x)
  |  |  ------------------
  |  |  |  |   46|  75.6k|#define FREEBL_HTONLL(x) __builtin_bswap64(x)
  |  |  ------------------
  ------------------
 1096|  75.6k|        BYTESWAP8(W[3]);
  ------------------
  |  |  810|  75.6k|#define BYTESWAP8(x) x = FREEBL_HTONLL(x)
  |  |  ------------------
  |  |  |  |   46|  75.6k|#define FREEBL_HTONLL(x) __builtin_bswap64(x)
  |  |  ------------------
  ------------------
 1097|  75.6k|        BYTESWAP8(W[4]);
  ------------------
  |  |  810|  75.6k|#define BYTESWAP8(x) x = FREEBL_HTONLL(x)
  |  |  ------------------
  |  |  |  |   46|  75.6k|#define FREEBL_HTONLL(x) __builtin_bswap64(x)
  |  |  ------------------
  ------------------
 1098|  75.6k|        BYTESWAP8(W[5]);
  ------------------
  |  |  810|  75.6k|#define BYTESWAP8(x) x = FREEBL_HTONLL(x)
  |  |  ------------------
  |  |  |  |   46|  75.6k|#define FREEBL_HTONLL(x) __builtin_bswap64(x)
  |  |  ------------------
  ------------------
 1099|  75.6k|        BYTESWAP8(W[6]);
  ------------------
  |  |  810|  75.6k|#define BYTESWAP8(x) x = FREEBL_HTONLL(x)
  |  |  ------------------
  |  |  |  |   46|  75.6k|#define FREEBL_HTONLL(x) __builtin_bswap64(x)
  |  |  ------------------
  ------------------
 1100|  75.6k|        BYTESWAP8(W[7]);
  ------------------
  |  |  810|  75.6k|#define BYTESWAP8(x) x = FREEBL_HTONLL(x)
  |  |  ------------------
  |  |  |  |   46|  75.6k|#define FREEBL_HTONLL(x) __builtin_bswap64(x)
  |  |  ------------------
  ------------------
 1101|  75.6k|        BYTESWAP8(W[8]);
  ------------------
  |  |  810|  75.6k|#define BYTESWAP8(x) x = FREEBL_HTONLL(x)
  |  |  ------------------
  |  |  |  |   46|  75.6k|#define FREEBL_HTONLL(x) __builtin_bswap64(x)
  |  |  ------------------
  ------------------
 1102|  75.6k|        BYTESWAP8(W[9]);
  ------------------
  |  |  810|  75.6k|#define BYTESWAP8(x) x = FREEBL_HTONLL(x)
  |  |  ------------------
  |  |  |  |   46|  75.6k|#define FREEBL_HTONLL(x) __builtin_bswap64(x)
  |  |  ------------------
  ------------------
 1103|  75.6k|        BYTESWAP8(W[10]);
  ------------------
  |  |  810|  75.6k|#define BYTESWAP8(x) x = FREEBL_HTONLL(x)
  |  |  ------------------
  |  |  |  |   46|  75.6k|#define FREEBL_HTONLL(x) __builtin_bswap64(x)
  |  |  ------------------
  ------------------
 1104|  75.6k|        BYTESWAP8(W[11]);
  ------------------
  |  |  810|  75.6k|#define BYTESWAP8(x) x = FREEBL_HTONLL(x)
  |  |  ------------------
  |  |  |  |   46|  75.6k|#define FREEBL_HTONLL(x) __builtin_bswap64(x)
  |  |  ------------------
  ------------------
 1105|  75.6k|        BYTESWAP8(W[12]);
  ------------------
  |  |  810|  75.6k|#define BYTESWAP8(x) x = FREEBL_HTONLL(x)
  |  |  ------------------
  |  |  |  |   46|  75.6k|#define FREEBL_HTONLL(x) __builtin_bswap64(x)
  |  |  ------------------
  ------------------
 1106|  75.6k|        BYTESWAP8(W[13]);
  ------------------
  |  |  810|  75.6k|#define BYTESWAP8(x) x = FREEBL_HTONLL(x)
  |  |  ------------------
  |  |  |  |   46|  75.6k|#define FREEBL_HTONLL(x) __builtin_bswap64(x)
  |  |  ------------------
  ------------------
 1107|  75.6k|        BYTESWAP8(W[14]);
  ------------------
  |  |  810|  75.6k|#define BYTESWAP8(x) x = FREEBL_HTONLL(x)
  |  |  ------------------
  |  |  |  |   46|  75.6k|#define FREEBL_HTONLL(x) __builtin_bswap64(x)
  |  |  ------------------
  ------------------
 1108|  75.6k|        BYTESWAP8(W[15]);
  ------------------
  |  |  810|  75.6k|#define BYTESWAP8(x) x = FREEBL_HTONLL(x)
  |  |  ------------------
  |  |  |  |   46|  75.6k|#define FREEBL_HTONLL(x) __builtin_bswap64(x)
  |  |  ------------------
  ------------------
 1109|  75.6k|    }
 1110|  75.6k|#endif
 1111|       |
 1112|  75.6k|    {
 1113|       |#ifdef NOUNROLL512
 1114|       |        {
 1115|       |            /* prepare the "message schedule"   */
 1116|       |            int t;
 1117|       |            for (t = 16; t < 80; ++t) {
 1118|       |                INITW(t);
 1119|       |            }
 1120|       |        }
 1121|       |#else
 1122|  75.6k|        INITW(16);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1123|  75.6k|        INITW(17);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1124|  75.6k|        INITW(18);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1125|  75.6k|        INITW(19);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1126|       |
 1127|  75.6k|        INITW(20);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1128|  75.6k|        INITW(21);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1129|  75.6k|        INITW(22);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1130|  75.6k|        INITW(23);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1131|  75.6k|        INITW(24);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1132|  75.6k|        INITW(25);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1133|  75.6k|        INITW(26);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1134|  75.6k|        INITW(27);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1135|  75.6k|        INITW(28);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1136|  75.6k|        INITW(29);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1137|       |
 1138|  75.6k|        INITW(30);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1139|  75.6k|        INITW(31);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1140|  75.6k|        INITW(32);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1141|  75.6k|        INITW(33);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1142|  75.6k|        INITW(34);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1143|  75.6k|        INITW(35);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1144|  75.6k|        INITW(36);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1145|  75.6k|        INITW(37);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1146|  75.6k|        INITW(38);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1147|  75.6k|        INITW(39);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1148|       |
 1149|  75.6k|        INITW(40);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1150|  75.6k|        INITW(41);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1151|  75.6k|        INITW(42);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1152|  75.6k|        INITW(43);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1153|  75.6k|        INITW(44);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1154|  75.6k|        INITW(45);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1155|  75.6k|        INITW(46);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1156|  75.6k|        INITW(47);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1157|  75.6k|        INITW(48);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1158|  75.6k|        INITW(49);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1159|       |
 1160|  75.6k|        INITW(50);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1161|  75.6k|        INITW(51);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1162|  75.6k|        INITW(52);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1163|  75.6k|        INITW(53);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1164|  75.6k|        INITW(54);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1165|  75.6k|        INITW(55);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1166|  75.6k|        INITW(56);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1167|  75.6k|        INITW(57);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1168|  75.6k|        INITW(58);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1169|  75.6k|        INITW(59);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1170|       |
 1171|  75.6k|        INITW(60);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1172|  75.6k|        INITW(61);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1173|  75.6k|        INITW(62);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1174|  75.6k|        INITW(63);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1175|  75.6k|        INITW(64);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1176|  75.6k|        INITW(65);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1177|  75.6k|        INITW(66);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1178|  75.6k|        INITW(67);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1179|  75.6k|        INITW(68);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1180|  75.6k|        INITW(69);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1181|       |
 1182|  75.6k|        INITW(70);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1183|  75.6k|        INITW(71);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1184|  75.6k|        INITW(72);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1185|  75.6k|        INITW(73);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1186|  75.6k|        INITW(74);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1187|  75.6k|        INITW(75);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1188|  75.6k|        INITW(76);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1189|  75.6k|        INITW(77);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1190|  75.6k|        INITW(78);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1191|  75.6k|        INITW(79);
  ------------------
  |  |  999|  75.6k|#define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  800|  75.6k|#define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s1(x) (ROTR64(x, 19) ^ ROTR64(x, 61) ^ SHR(x, 6))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |  799|  75.6k|#define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define s0(x) (ROTR64(x, 1) ^ ROTR64(x, 8) ^ SHR(x, 7))
  |  |  |  |  ------------------
  |  |  |  |  |  |   33|  75.6k|#define SHR(x, n) (x >> n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define INITW(t) W[t] = (s1(W[t - 2]) + W[t - 7] + s0(W[t - 15]) + W[t - 16])
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  ------------------
 1192|  75.6k|#endif
 1193|  75.6k|    }
 1194|       |#ifdef SHA512_TRACE
 1195|       |    {
 1196|       |        int i;
 1197|       |        for (i = 0; i < 80; ++i) {
 1198|       |#ifdef HAVE_LONG_LONG
 1199|       |            printf("W[%2d] = %016lx\n", i, W[i]);
 1200|       |#else
 1201|       |            printf("W[%2d] = %08x%08x\n", i, W[i].hi, W[i].lo);
 1202|       |#endif
 1203|       |        }
 1204|       |    }
 1205|       |#endif
 1206|  75.6k|    {
 1207|  75.6k|        PRUint64 a, b, c, d, e, f, g, h;
 1208|       |
 1209|  75.6k|        a = H[0];
  ------------------
  |  |   31|  75.6k|#define H ctx->h
  ------------------
 1210|  75.6k|        b = H[1];
  ------------------
  |  |   31|  75.6k|#define H ctx->h
  ------------------
 1211|  75.6k|        c = H[2];
  ------------------
  |  |   31|  75.6k|#define H ctx->h
  ------------------
 1212|  75.6k|        d = H[3];
  ------------------
  |  |   31|  75.6k|#define H ctx->h
  ------------------
 1213|  75.6k|        e = H[4];
  ------------------
  |  |   31|  75.6k|#define H ctx->h
  ------------------
 1214|  75.6k|        f = H[5];
  ------------------
  |  |   31|  75.6k|#define H ctx->h
  ------------------
 1215|  75.6k|        g = H[6];
  ------------------
  |  |   31|  75.6k|#define H ctx->h
  ------------------
 1216|  75.6k|        h = H[7];
  ------------------
  |  |   31|  75.6k|#define H ctx->h
  ------------------
 1217|       |
 1218|       |#ifdef NOUNROLL512
 1219|       |        {
 1220|       |            int t;
 1221|       |            for (t = 0; t < 80; t += 8) {
 1222|       |                ROUND(t + 0, a, b, c, d, e, f, g, h)
 1223|       |                ROUND(t + 1, h, a, b, c, d, e, f, g)
 1224|       |                ROUND(t + 2, g, h, a, b, c, d, e, f)
 1225|       |                ROUND(t + 3, f, g, h, a, b, c, d, e)
 1226|       |                ROUND(t + 4, e, f, g, h, a, b, c, d)
 1227|       |                ROUND(t + 5, d, e, f, g, h, a, b, c)
 1228|       |                ROUND(t + 6, c, d, e, f, g, h, a, b)
 1229|       |                ROUND(t + 7, b, c, d, e, f, g, h, a)
 1230|       |            }
 1231|       |        }
 1232|       |#else
 1233|  75.6k|        ROUND(0, a, b, c, d, e, f, g, h)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1234|  75.6k|        ROUND(1, h, a, b, c, d, e, f, g)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1235|  75.6k|        ROUND(2, g, h, a, b, c, d, e, f)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1236|  75.6k|        ROUND(3, f, g, h, a, b, c, d, e)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1237|  75.6k|        ROUND(4, e, f, g, h, a, b, c, d)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1238|  75.6k|        ROUND(5, d, e, f, g, h, a, b, c)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1239|  75.6k|        ROUND(6, c, d, e, f, g, h, a, b)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1240|  75.6k|        ROUND(7, b, c, d, e, f, g, h, a)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1241|       |
 1242|  75.6k|        ROUND(8, a, b, c, d, e, f, g, h)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1243|  75.6k|        ROUND(9, h, a, b, c, d, e, f, g)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1244|  75.6k|        ROUND(10, g, h, a, b, c, d, e, f)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1245|  75.6k|        ROUND(11, f, g, h, a, b, c, d, e)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1246|  75.6k|        ROUND(12, e, f, g, h, a, b, c, d)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1247|  75.6k|        ROUND(13, d, e, f, g, h, a, b, c)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1248|  75.6k|        ROUND(14, c, d, e, f, g, h, a, b)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1249|  75.6k|        ROUND(15, b, c, d, e, f, g, h, a)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1250|       |
 1251|  75.6k|        ROUND(16, a, b, c, d, e, f, g, h)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1252|  75.6k|        ROUND(17, h, a, b, c, d, e, f, g)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1253|  75.6k|        ROUND(18, g, h, a, b, c, d, e, f)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1254|  75.6k|        ROUND(19, f, g, h, a, b, c, d, e)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1255|  75.6k|        ROUND(20, e, f, g, h, a, b, c, d)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1256|  75.6k|        ROUND(21, d, e, f, g, h, a, b, c)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1257|  75.6k|        ROUND(22, c, d, e, f, g, h, a, b)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1258|  75.6k|        ROUND(23, b, c, d, e, f, g, h, a)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1259|       |
 1260|  75.6k|        ROUND(24, a, b, c, d, e, f, g, h)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1261|  75.6k|        ROUND(25, h, a, b, c, d, e, f, g)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1262|  75.6k|        ROUND(26, g, h, a, b, c, d, e, f)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1263|  75.6k|        ROUND(27, f, g, h, a, b, c, d, e)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1264|  75.6k|        ROUND(28, e, f, g, h, a, b, c, d)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1265|  75.6k|        ROUND(29, d, e, f, g, h, a, b, c)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1266|  75.6k|        ROUND(30, c, d, e, f, g, h, a, b)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1267|  75.6k|        ROUND(31, b, c, d, e, f, g, h, a)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1268|       |
 1269|  75.6k|        ROUND(32, a, b, c, d, e, f, g, h)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1270|  75.6k|        ROUND(33, h, a, b, c, d, e, f, g)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1271|  75.6k|        ROUND(34, g, h, a, b, c, d, e, f)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1272|  75.6k|        ROUND(35, f, g, h, a, b, c, d, e)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1273|  75.6k|        ROUND(36, e, f, g, h, a, b, c, d)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1274|  75.6k|        ROUND(37, d, e, f, g, h, a, b, c)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1275|  75.6k|        ROUND(38, c, d, e, f, g, h, a, b)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1276|  75.6k|        ROUND(39, b, c, d, e, f, g, h, a)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1277|       |
 1278|  75.6k|        ROUND(40, a, b, c, d, e, f, g, h)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1279|  75.6k|        ROUND(41, h, a, b, c, d, e, f, g)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1280|  75.6k|        ROUND(42, g, h, a, b, c, d, e, f)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1281|  75.6k|        ROUND(43, f, g, h, a, b, c, d, e)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1282|  75.6k|        ROUND(44, e, f, g, h, a, b, c, d)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1283|  75.6k|        ROUND(45, d, e, f, g, h, a, b, c)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1284|  75.6k|        ROUND(46, c, d, e, f, g, h, a, b)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1285|  75.6k|        ROUND(47, b, c, d, e, f, g, h, a)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1286|       |
 1287|  75.6k|        ROUND(48, a, b, c, d, e, f, g, h)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1288|  75.6k|        ROUND(49, h, a, b, c, d, e, f, g)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1289|  75.6k|        ROUND(50, g, h, a, b, c, d, e, f)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1290|  75.6k|        ROUND(51, f, g, h, a, b, c, d, e)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1291|  75.6k|        ROUND(52, e, f, g, h, a, b, c, d)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1292|  75.6k|        ROUND(53, d, e, f, g, h, a, b, c)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1293|  75.6k|        ROUND(54, c, d, e, f, g, h, a, b)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1294|  75.6k|        ROUND(55, b, c, d, e, f, g, h, a)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1295|       |
 1296|  75.6k|        ROUND(56, a, b, c, d, e, f, g, h)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1297|  75.6k|        ROUND(57, h, a, b, c, d, e, f, g)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1298|  75.6k|        ROUND(58, g, h, a, b, c, d, e, f)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1299|  75.6k|        ROUND(59, f, g, h, a, b, c, d, e)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1300|  75.6k|        ROUND(60, e, f, g, h, a, b, c, d)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1301|  75.6k|        ROUND(61, d, e, f, g, h, a, b, c)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1302|  75.6k|        ROUND(62, c, d, e, f, g, h, a, b)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1303|  75.6k|        ROUND(63, b, c, d, e, f, g, h, a)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1304|       |
 1305|  75.6k|        ROUND(64, a, b, c, d, e, f, g, h)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1306|  75.6k|        ROUND(65, h, a, b, c, d, e, f, g)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1307|  75.6k|        ROUND(66, g, h, a, b, c, d, e, f)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1308|  75.6k|        ROUND(67, f, g, h, a, b, c, d, e)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1309|  75.6k|        ROUND(68, e, f, g, h, a, b, c, d)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1310|  75.6k|        ROUND(69, d, e, f, g, h, a, b, c)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1311|  75.6k|        ROUND(70, c, d, e, f, g, h, a, b)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1312|  75.6k|        ROUND(71, b, c, d, e, f, g, h, a)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1313|       |
 1314|  75.6k|        ROUND(72, a, b, c, d, e, f, g, h)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1315|  75.6k|        ROUND(73, h, a, b, c, d, e, f, g)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1316|  75.6k|        ROUND(74, g, h, a, b, c, d, e, f)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1317|  75.6k|        ROUND(75, f, g, h, a, b, c, d, e)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1318|  75.6k|        ROUND(76, e, f, g, h, a, b, c, d)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1319|  75.6k|        ROUND(77, d, e, f, g, h, a, b, c)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1320|  75.6k|        ROUND(78, c, d, e, f, g, h, a, b)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1321|  75.6k|        ROUND(79, b, c, d, e, f, g, h, a)
  ------------------
  |  | 1002|  75.6k|    h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |  798|  75.6k|#define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S1(x) (ROTR64(x, 14) ^ ROTR64(x, 18) ^ ROTR64(x, 41))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   35|  75.6k|#define Ch(x, y, z) ((x & y) ^ (~x & z))
  |  |  ------------------
  |  |                   h += S1(e) + Ch(e, f, g) + K512[n] + W[n]; \
  |  |  ------------------
  |  |  |  |   29|  75.6k|#define W ctx->u.w
  |  |  ------------------
  |  | 1003|  75.6k|    d += h;                                    \
  |  | 1004|  75.6k|    h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |  797|  75.6k|#define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  |  |               #define S0(x) (ROTR64(x, 28) ^ ROTR64(x, 34) ^ ROTR64(x, 39))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  75.6k|#define ROTR64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   h += S0(a) + Maj(a, b, c);                 \
  |  |  ------------------
  |  |  |  |   36|  75.6k|#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
  |  |  ------------------
  |  | 1005|  75.6k|    DUMP(n, a, d, e, h)
  ------------------
 1322|  75.6k|#endif
 1323|       |
 1324|  75.6k|        ADDTO(a, H[0]);
  ------------------
  |  |  997|  75.6k|#define ADDTO(x, y) y += x
  ------------------
 1325|  75.6k|        ADDTO(b, H[1]);
  ------------------
  |  |  997|  75.6k|#define ADDTO(x, y) y += x
  ------------------
 1326|  75.6k|        ADDTO(c, H[2]);
  ------------------
  |  |  997|  75.6k|#define ADDTO(x, y) y += x
  ------------------
 1327|  75.6k|        ADDTO(d, H[3]);
  ------------------
  |  |  997|  75.6k|#define ADDTO(x, y) y += x
  ------------------
 1328|  75.6k|        ADDTO(e, H[4]);
  ------------------
  |  |  997|  75.6k|#define ADDTO(x, y) y += x
  ------------------
 1329|  75.6k|        ADDTO(f, H[5]);
  ------------------
  |  |  997|  75.6k|#define ADDTO(x, y) y += x
  ------------------
 1330|  75.6k|        ADDTO(g, H[6]);
  ------------------
  |  |  997|  75.6k|#define ADDTO(x, y) y += x
  ------------------
 1331|  75.6k|        ADDTO(h, H[7]);
  ------------------
  |  |  997|  75.6k|#define ADDTO(x, y) y += x
  ------------------
 1332|  75.6k|    }
 1333|       |
 1334|  75.6k|#endif /* !USE_PPC_CRYPTO */
 1335|  75.6k|}

SHA1_Begin:
   59|  40.3k|{
   60|  40.3k|    ctx->size = 0;
   61|       |    /*
   62|       |     *  Initialize H with constants from FIPS180-1.
   63|       |     */
   64|  40.3k|    ctx->H[0] = 0x67452301L;
   65|  40.3k|    ctx->H[1] = 0xefcdab89L;
   66|  40.3k|    ctx->H[2] = 0x98badcfeL;
   67|  40.3k|    ctx->H[3] = 0x10325476L;
   68|  40.3k|    ctx->H[4] = 0xc3d2e1f0L;
   69|       |
   70|       |#if defined(USE_HW_SHA1) && defined(IS_LITTLE_ENDIAN)
   71|       |    /* arm's implementation is tested on little endian only */
   72|       |    if (arm_sha1_support()) {
   73|       |        ctx->compress = SHA1_Compress_Native;
   74|       |        ctx->update = SHA1_Update_Native;
   75|       |    } else
   76|       |#endif
   77|  40.3k|    {
   78|  40.3k|        ctx->compress = SHA1_Compress_Generic;
   79|  40.3k|        ctx->update = SHA1_Update_Generic;
   80|  40.3k|    }
   81|  40.3k|}
SHA1_Update:
  126|   160k|{
  127|   160k|    ctx->update(ctx, dataIn, len);
  128|   160k|}
SHA1_End:
  187|  31.3k|{
  188|  31.3k|    register PRUint64 size;
  189|  31.3k|    register PRUint32 lenB;
  190|       |
  191|  31.3k|    static const unsigned char bulk_pad[64] = { 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  192|  31.3k|                                                0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  193|  31.3k|                                                0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
  194|  31.3k|#define tmp lenB
  195|       |
  196|  31.3k|    PORT_Assert(maxDigestLen >= SHA1_LENGTH);
  ------------------
  |  |  120|  31.3k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  31.3k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 31.3k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  197|       |
  198|       |    /*
  199|       |     *  Pad with a binary 1 (e.g. 0x80), then zeroes, then length in bits
  200|       |     */
  201|  31.3k|    size = ctx->size;
  202|       |
  203|  31.3k|    lenB = (PRUint32)size & 63;
  204|  31.3k|    SHA1_Update(ctx, bulk_pad, (((55 + 64) - lenB) & 63) + 1);
  205|  31.3k|    PORT_Assert(((PRUint32)ctx->size & 63) == 56);
  ------------------
  |  |  120|  31.3k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  31.3k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 31.3k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  206|       |    /* Convert size from bytes to bits. */
  207|  31.3k|    size <<= 3;
  208|  31.3k|    ctx->W[14] = SHA_HTONL((PRUint32)(size >> 32));
  ------------------
  |  |   22|  31.3k|#define W u.w
  ------------------
                  ctx->W[14] = SHA_HTONL((PRUint32)(size >> 32));
  ------------------
  |  |   97|  31.3k|#define SHA_HTONL(x) swap4b(x)
  ------------------
  209|  31.3k|    ctx->W[15] = SHA_HTONL((PRUint32)size);
  ------------------
  |  |   22|  31.3k|#define W u.w
  ------------------
                  ctx->W[15] = SHA_HTONL((PRUint32)size);
  ------------------
  |  |   97|  31.3k|#define SHA_HTONL(x) swap4b(x)
  ------------------
  210|  31.3k|    ctx->compress(ctx);
  211|       |
  212|       |    /*
  213|       |     *  Output hash
  214|       |     */
  215|  31.3k|    SHA_STORE_RESULT;
  ------------------
  |  |  149|  31.3k|    SHA_STORE(0);        \
  |  |  ------------------
  |  |  |  |  146|  31.3k|#define SHA_STORE(n) ((PRUint32 *)hashout)[n] = SHA_HTONL(ctx->H[n])
  |  |  |  |  ------------------
  |  |  |  |  |  |   97|  31.3k|#define SHA_HTONL(x) swap4b(x)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  31.3k|    SHA_STORE(1);        \
  |  |  ------------------
  |  |  |  |  146|  31.3k|#define SHA_STORE(n) ((PRUint32 *)hashout)[n] = SHA_HTONL(ctx->H[n])
  |  |  |  |  ------------------
  |  |  |  |  |  |   97|  31.3k|#define SHA_HTONL(x) swap4b(x)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  151|  31.3k|    SHA_STORE(2);        \
  |  |  ------------------
  |  |  |  |  146|  31.3k|#define SHA_STORE(n) ((PRUint32 *)hashout)[n] = SHA_HTONL(ctx->H[n])
  |  |  |  |  ------------------
  |  |  |  |  |  |   97|  31.3k|#define SHA_HTONL(x) swap4b(x)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  152|  31.3k|    SHA_STORE(3);        \
  |  |  ------------------
  |  |  |  |  146|  31.3k|#define SHA_STORE(n) ((PRUint32 *)hashout)[n] = SHA_HTONL(ctx->H[n])
  |  |  |  |  ------------------
  |  |  |  |  |  |   97|  31.3k|#define SHA_HTONL(x) swap4b(x)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  153|  31.3k|    SHA_STORE(4);
  |  |  ------------------
  |  |  |  |  146|  31.3k|#define SHA_STORE(n) ((PRUint32 *)hashout)[n] = SHA_HTONL(ctx->H[n])
  |  |  |  |  ------------------
  |  |  |  |  |  |   97|  31.3k|#define SHA_HTONL(x) swap4b(x)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  216|  31.3k|    if (pDigestLen) {
  ------------------
  |  Branch (216:9): [True: 23.4k, False: 7.90k]
  ------------------
  217|  23.4k|        *pDigestLen = SHA1_LENGTH;
  ------------------
  |  |   39|  23.4k|#define SHA1_LENGTH 20
  ------------------
  218|  23.4k|    }
  219|  31.3k|#undef tmp
  220|  31.3k|}
SHA1_EndRaw:
  225|  55.3k|{
  226|       |#if defined(SHA_NEED_TMP_VARIABLE)
  227|       |    register PRUint32 tmp;
  228|       |#endif
  229|  55.3k|    PORT_Assert(maxDigestLen >= SHA1_LENGTH);
  ------------------
  |  |  120|  55.3k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  55.3k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 55.3k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  230|       |
  231|  55.3k|    SHA_STORE_RESULT;
  ------------------
  |  |  149|  55.3k|    SHA_STORE(0);        \
  |  |  ------------------
  |  |  |  |  146|  55.3k|#define SHA_STORE(n) ((PRUint32 *)hashout)[n] = SHA_HTONL(ctx->H[n])
  |  |  |  |  ------------------
  |  |  |  |  |  |   97|  55.3k|#define SHA_HTONL(x) swap4b(x)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  55.3k|    SHA_STORE(1);        \
  |  |  ------------------
  |  |  |  |  146|  55.3k|#define SHA_STORE(n) ((PRUint32 *)hashout)[n] = SHA_HTONL(ctx->H[n])
  |  |  |  |  ------------------
  |  |  |  |  |  |   97|  55.3k|#define SHA_HTONL(x) swap4b(x)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  151|  55.3k|    SHA_STORE(2);        \
  |  |  ------------------
  |  |  |  |  146|  55.3k|#define SHA_STORE(n) ((PRUint32 *)hashout)[n] = SHA_HTONL(ctx->H[n])
  |  |  |  |  ------------------
  |  |  |  |  |  |   97|  55.3k|#define SHA_HTONL(x) swap4b(x)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  152|  55.3k|    SHA_STORE(3);        \
  |  |  ------------------
  |  |  |  |  146|  55.3k|#define SHA_STORE(n) ((PRUint32 *)hashout)[n] = SHA_HTONL(ctx->H[n])
  |  |  |  |  ------------------
  |  |  |  |  |  |   97|  55.3k|#define SHA_HTONL(x) swap4b(x)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  153|  55.3k|    SHA_STORE(4);
  |  |  ------------------
  |  |  |  |  146|  55.3k|#define SHA_STORE(n) ((PRUint32 *)hashout)[n] = SHA_HTONL(ctx->H[n])
  |  |  |  |  ------------------
  |  |  |  |  |  |   97|  55.3k|#define SHA_HTONL(x) swap4b(x)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  232|  55.3k|    if (pDigestLen)
  ------------------
  |  Branch (232:9): [True: 0, False: 55.3k]
  ------------------
  233|      0|        *pDigestLen = SHA1_LENGTH;
  ------------------
  |  |   39|      0|#define SHA1_LENGTH 20
  ------------------
  234|  55.3k|}
SHA1_NewContext:
  516|  28.7k|{
  517|  28.7k|    SHA1Context *cx;
  518|       |
  519|       |    /* no need to ZNew, SHA1_Begin will init the context */
  520|  28.7k|    cx = PORT_New(SHA1Context);
  ------------------
  |  |  151|  28.7k|#define PORT_New(type) (type *)PORT_Alloc(sizeof(type))
  |  |  ------------------
  |  |  |  |   52|  28.7k|#define PORT_Alloc PORT_Alloc_Util
  |  |  ------------------
  ------------------
  521|  28.7k|    return cx;
  522|  28.7k|}
SHA1_DestroyContext:
  527|  28.7k|{
  528|  28.7k|    memset(cx, 0, sizeof *cx);
  529|  28.7k|    if (freeit) {
  ------------------
  |  Branch (529:9): [True: 28.7k, False: 0]
  ------------------
  530|  28.7k|        PORT_Free(cx);
  ------------------
  |  |   60|  28.7k|#define PORT_Free PORT_Free_Util
  ------------------
  531|  28.7k|    }
  532|  28.7k|}
SHA1_FlattenSize:
  560|  15.1k|{
  561|  15.1k|    return sizeof(SHA1Context);
  562|  15.1k|}
sha_fast.c:SHA1_Update_Generic:
  132|   160k|{
  133|   160k|    register unsigned int lenB;
  134|   160k|    register unsigned int togo;
  135|       |
  136|   160k|    if (!len)
  ------------------
  |  Branch (136:9): [True: 66, False: 160k]
  ------------------
  137|     66|        return;
  138|       |
  139|       |    /* accumulate the byte count. */
  140|   160k|    lenB = (unsigned int)(ctx->size) & 63U;
  141|       |
  142|   160k|    ctx->size += len;
  143|       |
  144|       |    /*
  145|       |     *  Read the data into W and process blocks as they get full
  146|       |     */
  147|   160k|    if (lenB > 0) {
  ------------------
  |  Branch (147:9): [True: 35.3k, False: 125k]
  ------------------
  148|  35.3k|        togo = 64U - lenB;
  149|  35.3k|        if (len < togo)
  ------------------
  |  Branch (149:13): [True: 33.7k, False: 1.62k]
  ------------------
  150|  33.7k|            togo = len;
  151|  35.3k|        memcpy(ctx->B + lenB, dataIn, togo);
  ------------------
  |  |   23|  35.3k|#define B u.b
  ------------------
  152|  35.3k|        len -= togo;
  153|  35.3k|        dataIn += togo;
  154|  35.3k|        lenB = (lenB + togo) & 63U;
  155|  35.3k|        if (!lenB) {
  ------------------
  |  Branch (155:13): [True: 1.62k, False: 33.7k]
  ------------------
  156|  1.62k|            shaCompress(&ctx->H[H2X], ctx->W);
  ------------------
  |  |  115|  1.62k|#define H2X 11 /* X[0] is H[11], and H[0] is X[-11] */
  ------------------
                          shaCompress(&ctx->H[H2X], ctx->W);
  ------------------
  |  |   22|  1.62k|#define W u.w
  ------------------
  157|  1.62k|        }
  158|  35.3k|    }
  159|       |#if !defined(HAVE_UNALIGNED_ACCESS)
  160|       |    if ((ptrdiff_t)dataIn % sizeof(PRUint32)) {
  161|       |        while (len >= 64U) {
  162|       |            memcpy(ctx->B, dataIn, 64);
  163|       |            len -= 64U;
  164|       |            shaCompress(&ctx->H[H2X], ctx->W);
  165|       |            dataIn += 64U;
  166|       |        }
  167|       |    } else
  168|       |#endif
  169|   160k|    {
  170|   291k|        while (len >= 64U) {
  ------------------
  |  Branch (170:16): [True: 131k, False: 160k]
  ------------------
  171|   131k|            len -= 64U;
  172|   131k|            shaCompress(&ctx->H[H2X], (PRUint32 *)dataIn);
  ------------------
  |  |  115|   131k|#define H2X 11 /* X[0] is H[11], and H[0] is X[-11] */
  ------------------
  173|   131k|            dataIn += 64U;
  174|   131k|        }
  175|   160k|    }
  176|   160k|    if (len) {
  ------------------
  |  Branch (176:9): [True: 33.0k, False: 127k]
  ------------------
  177|  33.0k|        memcpy(ctx->B, dataIn, len);
  ------------------
  |  |   23|  33.0k|#define B u.b
  ------------------
  178|  33.0k|    }
  179|   160k|}
sha_fast.c:shaCompress:
  286|   164k|{
  287|   164k|    register SHA_HW_t A, B, C, D, E;
  288|       |
  289|       |#if defined(SHA_NEED_TMP_VARIABLE)
  290|       |    register PRUint32 tmp;
  291|       |#endif
  292|       |
  293|   164k|#if !defined(SHA_PUT_W_IN_STACK)
  294|   164k|#define XH(n) X[n - H2X]
  295|   164k|#define XW(n) X[n - W2X]
  296|       |#else
  297|       |    SHA_HW_t w_0, w_1, w_2, w_3, w_4, w_5, w_6, w_7,
  298|       |        w_8, w_9, w_10, w_11, w_12, w_13, w_14, w_15;
  299|       |#define XW(n) w_##n
  300|       |#define XH(n) X[n]
  301|       |#endif
  302|       |
  303|   164k|#define K0 0x5a827999L
  304|   164k|#define K1 0x6ed9eba1L
  305|   164k|#define K2 0x8f1bbcdcL
  306|   164k|#define K3 0xca62c1d6L
  307|       |
  308|   164k|#define SHA_RND1(a, b, c, d, e, n)                         \
  309|   164k|    a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  310|   164k|    c = SHA_ROTL(c, 30)
  311|   164k|#define SHA_RND2(a, b, c, d, e, n)                         \
  312|   164k|    a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  313|   164k|    c = SHA_ROTL(c, 30)
  314|   164k|#define SHA_RND3(a, b, c, d, e, n)                         \
  315|   164k|    a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  316|   164k|    c = SHA_ROTL(c, 30)
  317|   164k|#define SHA_RND4(a, b, c, d, e, n)                         \
  318|   164k|    a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  319|   164k|    c = SHA_ROTL(c, 30)
  320|       |
  321|   164k|#define LOAD(n) XW(n) = SHA_HTONL(inbuf[n])
  322|       |
  323|   164k|    A = XH(0);
  ------------------
  |  |  294|   164k|#define XH(n) X[n - H2X]
  |  |  ------------------
  |  |  |  |  115|   164k|#define H2X 11 /* X[0] is H[11], and H[0] is X[-11] */
  |  |  ------------------
  ------------------
  324|   164k|    B = XH(1);
  ------------------
  |  |  294|   164k|#define XH(n) X[n - H2X]
  |  |  ------------------
  |  |  |  |  115|   164k|#define H2X 11 /* X[0] is H[11], and H[0] is X[-11] */
  |  |  ------------------
  ------------------
  325|   164k|    C = XH(2);
  ------------------
  |  |  294|   164k|#define XH(n) X[n - H2X]
  |  |  ------------------
  |  |  |  |  115|   164k|#define H2X 11 /* X[0] is H[11], and H[0] is X[-11] */
  |  |  ------------------
  ------------------
  326|   164k|    D = XH(3);
  ------------------
  |  |  294|   164k|#define XH(n) X[n - H2X]
  |  |  ------------------
  |  |  |  |  115|   164k|#define H2X 11 /* X[0] is H[11], and H[0] is X[-11] */
  |  |  ------------------
  ------------------
  327|   164k|    E = XH(4);
  ------------------
  |  |  294|   164k|#define XH(n) X[n - H2X]
  |  |  ------------------
  |  |  |  |  115|   164k|#define H2X 11 /* X[0] is H[11], and H[0] is X[-11] */
  |  |  ------------------
  ------------------
  328|       |
  329|   164k|    LOAD(0);
  ------------------
  |  |  321|   164k|#define LOAD(n) XW(n) = SHA_HTONL(inbuf[n])
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define LOAD(n) XW(n) = SHA_HTONL(inbuf[n])
  |  |  ------------------
  |  |  |  |   97|   164k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
  330|   164k|    SHA_RND1(E, A, B, C, D, 0);
  ------------------
  |  |  309|   164k|    a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |   25|   164k|#define SHA_F1(X, Y, Z) ((((Y) ^ (Z)) & (X)) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |  303|   164k|#define K0 0x5a827999L
  |  |  ------------------
  |  |  310|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  331|   164k|    LOAD(1);
  ------------------
  |  |  321|   164k|#define LOAD(n) XW(n) = SHA_HTONL(inbuf[n])
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define LOAD(n) XW(n) = SHA_HTONL(inbuf[n])
  |  |  ------------------
  |  |  |  |   97|   164k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
  332|   164k|    SHA_RND1(D, E, A, B, C, 1);
  ------------------
  |  |  309|   164k|    a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |   25|   164k|#define SHA_F1(X, Y, Z) ((((Y) ^ (Z)) & (X)) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |  303|   164k|#define K0 0x5a827999L
  |  |  ------------------
  |  |  310|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  333|   164k|    LOAD(2);
  ------------------
  |  |  321|   164k|#define LOAD(n) XW(n) = SHA_HTONL(inbuf[n])
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define LOAD(n) XW(n) = SHA_HTONL(inbuf[n])
  |  |  ------------------
  |  |  |  |   97|   164k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
  334|   164k|    SHA_RND1(C, D, E, A, B, 2);
  ------------------
  |  |  309|   164k|    a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |   25|   164k|#define SHA_F1(X, Y, Z) ((((Y) ^ (Z)) & (X)) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |  303|   164k|#define K0 0x5a827999L
  |  |  ------------------
  |  |  310|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  335|   164k|    LOAD(3);
  ------------------
  |  |  321|   164k|#define LOAD(n) XW(n) = SHA_HTONL(inbuf[n])
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define LOAD(n) XW(n) = SHA_HTONL(inbuf[n])
  |  |  ------------------
  |  |  |  |   97|   164k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
  336|   164k|    SHA_RND1(B, C, D, E, A, 3);
  ------------------
  |  |  309|   164k|    a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |   25|   164k|#define SHA_F1(X, Y, Z) ((((Y) ^ (Z)) & (X)) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |  303|   164k|#define K0 0x5a827999L
  |  |  ------------------
  |  |  310|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  337|   164k|    LOAD(4);
  ------------------
  |  |  321|   164k|#define LOAD(n) XW(n) = SHA_HTONL(inbuf[n])
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define LOAD(n) XW(n) = SHA_HTONL(inbuf[n])
  |  |  ------------------
  |  |  |  |   97|   164k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
  338|   164k|    SHA_RND1(A, B, C, D, E, 4);
  ------------------
  |  |  309|   164k|    a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |   25|   164k|#define SHA_F1(X, Y, Z) ((((Y) ^ (Z)) & (X)) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |  303|   164k|#define K0 0x5a827999L
  |  |  ------------------
  |  |  310|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  339|   164k|    LOAD(5);
  ------------------
  |  |  321|   164k|#define LOAD(n) XW(n) = SHA_HTONL(inbuf[n])
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define LOAD(n) XW(n) = SHA_HTONL(inbuf[n])
  |  |  ------------------
  |  |  |  |   97|   164k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
  340|   164k|    SHA_RND1(E, A, B, C, D, 5);
  ------------------
  |  |  309|   164k|    a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |   25|   164k|#define SHA_F1(X, Y, Z) ((((Y) ^ (Z)) & (X)) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |  303|   164k|#define K0 0x5a827999L
  |  |  ------------------
  |  |  310|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  341|   164k|    LOAD(6);
  ------------------
  |  |  321|   164k|#define LOAD(n) XW(n) = SHA_HTONL(inbuf[n])
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define LOAD(n) XW(n) = SHA_HTONL(inbuf[n])
  |  |  ------------------
  |  |  |  |   97|   164k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
  342|   164k|    SHA_RND1(D, E, A, B, C, 6);
  ------------------
  |  |  309|   164k|    a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |   25|   164k|#define SHA_F1(X, Y, Z) ((((Y) ^ (Z)) & (X)) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |  303|   164k|#define K0 0x5a827999L
  |  |  ------------------
  |  |  310|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  343|   164k|    LOAD(7);
  ------------------
  |  |  321|   164k|#define LOAD(n) XW(n) = SHA_HTONL(inbuf[n])
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define LOAD(n) XW(n) = SHA_HTONL(inbuf[n])
  |  |  ------------------
  |  |  |  |   97|   164k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
  344|   164k|    SHA_RND1(C, D, E, A, B, 7);
  ------------------
  |  |  309|   164k|    a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |   25|   164k|#define SHA_F1(X, Y, Z) ((((Y) ^ (Z)) & (X)) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |  303|   164k|#define K0 0x5a827999L
  |  |  ------------------
  |  |  310|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  345|   164k|    LOAD(8);
  ------------------
  |  |  321|   164k|#define LOAD(n) XW(n) = SHA_HTONL(inbuf[n])
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define LOAD(n) XW(n) = SHA_HTONL(inbuf[n])
  |  |  ------------------
  |  |  |  |   97|   164k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
  346|   164k|    SHA_RND1(B, C, D, E, A, 8);
  ------------------
  |  |  309|   164k|    a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |   25|   164k|#define SHA_F1(X, Y, Z) ((((Y) ^ (Z)) & (X)) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |  303|   164k|#define K0 0x5a827999L
  |  |  ------------------
  |  |  310|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  347|   164k|    LOAD(9);
  ------------------
  |  |  321|   164k|#define LOAD(n) XW(n) = SHA_HTONL(inbuf[n])
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define LOAD(n) XW(n) = SHA_HTONL(inbuf[n])
  |  |  ------------------
  |  |  |  |   97|   164k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
  348|   164k|    SHA_RND1(A, B, C, D, E, 9);
  ------------------
  |  |  309|   164k|    a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |   25|   164k|#define SHA_F1(X, Y, Z) ((((Y) ^ (Z)) & (X)) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |  303|   164k|#define K0 0x5a827999L
  |  |  ------------------
  |  |  310|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  349|   164k|    LOAD(10);
  ------------------
  |  |  321|   164k|#define LOAD(n) XW(n) = SHA_HTONL(inbuf[n])
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define LOAD(n) XW(n) = SHA_HTONL(inbuf[n])
  |  |  ------------------
  |  |  |  |   97|   164k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
  350|   164k|    SHA_RND1(E, A, B, C, D, 10);
  ------------------
  |  |  309|   164k|    a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |   25|   164k|#define SHA_F1(X, Y, Z) ((((Y) ^ (Z)) & (X)) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |  303|   164k|#define K0 0x5a827999L
  |  |  ------------------
  |  |  310|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  351|   164k|    LOAD(11);
  ------------------
  |  |  321|   164k|#define LOAD(n) XW(n) = SHA_HTONL(inbuf[n])
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define LOAD(n) XW(n) = SHA_HTONL(inbuf[n])
  |  |  ------------------
  |  |  |  |   97|   164k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
  352|   164k|    SHA_RND1(D, E, A, B, C, 11);
  ------------------
  |  |  309|   164k|    a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |   25|   164k|#define SHA_F1(X, Y, Z) ((((Y) ^ (Z)) & (X)) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |  303|   164k|#define K0 0x5a827999L
  |  |  ------------------
  |  |  310|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  353|   164k|    LOAD(12);
  ------------------
  |  |  321|   164k|#define LOAD(n) XW(n) = SHA_HTONL(inbuf[n])
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define LOAD(n) XW(n) = SHA_HTONL(inbuf[n])
  |  |  ------------------
  |  |  |  |   97|   164k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
  354|   164k|    SHA_RND1(C, D, E, A, B, 12);
  ------------------
  |  |  309|   164k|    a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |   25|   164k|#define SHA_F1(X, Y, Z) ((((Y) ^ (Z)) & (X)) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |  303|   164k|#define K0 0x5a827999L
  |  |  ------------------
  |  |  310|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  355|   164k|    LOAD(13);
  ------------------
  |  |  321|   164k|#define LOAD(n) XW(n) = SHA_HTONL(inbuf[n])
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define LOAD(n) XW(n) = SHA_HTONL(inbuf[n])
  |  |  ------------------
  |  |  |  |   97|   164k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
  356|   164k|    SHA_RND1(B, C, D, E, A, 13);
  ------------------
  |  |  309|   164k|    a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |   25|   164k|#define SHA_F1(X, Y, Z) ((((Y) ^ (Z)) & (X)) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |  303|   164k|#define K0 0x5a827999L
  |  |  ------------------
  |  |  310|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  357|   164k|    LOAD(14);
  ------------------
  |  |  321|   164k|#define LOAD(n) XW(n) = SHA_HTONL(inbuf[n])
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define LOAD(n) XW(n) = SHA_HTONL(inbuf[n])
  |  |  ------------------
  |  |  |  |   97|   164k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
  358|   164k|    SHA_RND1(A, B, C, D, E, 14);
  ------------------
  |  |  309|   164k|    a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |   25|   164k|#define SHA_F1(X, Y, Z) ((((Y) ^ (Z)) & (X)) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |  303|   164k|#define K0 0x5a827999L
  |  |  ------------------
  |  |  310|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  359|   164k|    LOAD(15);
  ------------------
  |  |  321|   164k|#define LOAD(n) XW(n) = SHA_HTONL(inbuf[n])
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define LOAD(n) XW(n) = SHA_HTONL(inbuf[n])
  |  |  ------------------
  |  |  |  |   97|   164k|#define SHA_HTONL(x) swap4b(x)
  |  |  ------------------
  ------------------
  360|   164k|    SHA_RND1(E, A, B, C, D, 15);
  ------------------
  |  |  309|   164k|    a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |   25|   164k|#define SHA_F1(X, Y, Z) ((((Y) ^ (Z)) & (X)) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |  303|   164k|#define K0 0x5a827999L
  |  |  ------------------
  |  |  310|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  361|       |
  362|   164k|    SHA_MIX(0, 13, 8, 2);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  363|   164k|    SHA_RND1(D, E, A, B, C, 0);
  ------------------
  |  |  309|   164k|    a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |   25|   164k|#define SHA_F1(X, Y, Z) ((((Y) ^ (Z)) & (X)) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |  303|   164k|#define K0 0x5a827999L
  |  |  ------------------
  |  |  310|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  364|   164k|    SHA_MIX(1, 14, 9, 3);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  365|   164k|    SHA_RND1(C, D, E, A, B, 1);
  ------------------
  |  |  309|   164k|    a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |   25|   164k|#define SHA_F1(X, Y, Z) ((((Y) ^ (Z)) & (X)) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |  303|   164k|#define K0 0x5a827999L
  |  |  ------------------
  |  |  310|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  366|   164k|    SHA_MIX(2, 15, 10, 4);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  367|   164k|    SHA_RND1(B, C, D, E, A, 2);
  ------------------
  |  |  309|   164k|    a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |   25|   164k|#define SHA_F1(X, Y, Z) ((((Y) ^ (Z)) & (X)) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |  303|   164k|#define K0 0x5a827999L
  |  |  ------------------
  |  |  310|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  368|   164k|    SHA_MIX(3, 0, 11, 5);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  369|   164k|    SHA_RND1(A, B, C, D, E, 3);
  ------------------
  |  |  309|   164k|    a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |   25|   164k|#define SHA_F1(X, Y, Z) ((((Y) ^ (Z)) & (X)) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F1(c, d, e) + a + XW(n) + K0; \
  |  |  ------------------
  |  |  |  |  303|   164k|#define K0 0x5a827999L
  |  |  ------------------
  |  |  310|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  370|       |
  371|   164k|    SHA_MIX(4, 1, 12, 6);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  372|   164k|    SHA_RND2(E, A, B, C, D, 4);
  ------------------
  |  |  312|   164k|    a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |   26|   164k|#define SHA_F2(X, Y, Z) ((X) ^ (Y) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |  304|   164k|#define K1 0x6ed9eba1L
  |  |  ------------------
  |  |  313|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  373|   164k|    SHA_MIX(5, 2, 13, 7);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  374|   164k|    SHA_RND2(D, E, A, B, C, 5);
  ------------------
  |  |  312|   164k|    a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |   26|   164k|#define SHA_F2(X, Y, Z) ((X) ^ (Y) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |  304|   164k|#define K1 0x6ed9eba1L
  |  |  ------------------
  |  |  313|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  375|   164k|    SHA_MIX(6, 3, 14, 8);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  376|   164k|    SHA_RND2(C, D, E, A, B, 6);
  ------------------
  |  |  312|   164k|    a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |   26|   164k|#define SHA_F2(X, Y, Z) ((X) ^ (Y) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |  304|   164k|#define K1 0x6ed9eba1L
  |  |  ------------------
  |  |  313|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  377|   164k|    SHA_MIX(7, 4, 15, 9);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  378|   164k|    SHA_RND2(B, C, D, E, A, 7);
  ------------------
  |  |  312|   164k|    a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |   26|   164k|#define SHA_F2(X, Y, Z) ((X) ^ (Y) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |  304|   164k|#define K1 0x6ed9eba1L
  |  |  ------------------
  |  |  313|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  379|   164k|    SHA_MIX(8, 5, 0, 10);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  380|   164k|    SHA_RND2(A, B, C, D, E, 8);
  ------------------
  |  |  312|   164k|    a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |   26|   164k|#define SHA_F2(X, Y, Z) ((X) ^ (Y) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |  304|   164k|#define K1 0x6ed9eba1L
  |  |  ------------------
  |  |  313|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  381|   164k|    SHA_MIX(9, 6, 1, 11);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  382|   164k|    SHA_RND2(E, A, B, C, D, 9);
  ------------------
  |  |  312|   164k|    a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |   26|   164k|#define SHA_F2(X, Y, Z) ((X) ^ (Y) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |  304|   164k|#define K1 0x6ed9eba1L
  |  |  ------------------
  |  |  313|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  383|   164k|    SHA_MIX(10, 7, 2, 12);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  384|   164k|    SHA_RND2(D, E, A, B, C, 10);
  ------------------
  |  |  312|   164k|    a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |   26|   164k|#define SHA_F2(X, Y, Z) ((X) ^ (Y) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |  304|   164k|#define K1 0x6ed9eba1L
  |  |  ------------------
  |  |  313|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  385|   164k|    SHA_MIX(11, 8, 3, 13);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  386|   164k|    SHA_RND2(C, D, E, A, B, 11);
  ------------------
  |  |  312|   164k|    a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |   26|   164k|#define SHA_F2(X, Y, Z) ((X) ^ (Y) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |  304|   164k|#define K1 0x6ed9eba1L
  |  |  ------------------
  |  |  313|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  387|   164k|    SHA_MIX(12, 9, 4, 14);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  388|   164k|    SHA_RND2(B, C, D, E, A, 12);
  ------------------
  |  |  312|   164k|    a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |   26|   164k|#define SHA_F2(X, Y, Z) ((X) ^ (Y) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |  304|   164k|#define K1 0x6ed9eba1L
  |  |  ------------------
  |  |  313|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  389|   164k|    SHA_MIX(13, 10, 5, 15);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  390|   164k|    SHA_RND2(A, B, C, D, E, 13);
  ------------------
  |  |  312|   164k|    a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |   26|   164k|#define SHA_F2(X, Y, Z) ((X) ^ (Y) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |  304|   164k|#define K1 0x6ed9eba1L
  |  |  ------------------
  |  |  313|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  391|   164k|    SHA_MIX(14, 11, 6, 0);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  392|   164k|    SHA_RND2(E, A, B, C, D, 14);
  ------------------
  |  |  312|   164k|    a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |   26|   164k|#define SHA_F2(X, Y, Z) ((X) ^ (Y) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |  304|   164k|#define K1 0x6ed9eba1L
  |  |  ------------------
  |  |  313|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  393|   164k|    SHA_MIX(15, 12, 7, 1);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  394|   164k|    SHA_RND2(D, E, A, B, C, 15);
  ------------------
  |  |  312|   164k|    a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |   26|   164k|#define SHA_F2(X, Y, Z) ((X) ^ (Y) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |  304|   164k|#define K1 0x6ed9eba1L
  |  |  ------------------
  |  |  313|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  395|       |
  396|   164k|    SHA_MIX(0, 13, 8, 2);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  397|   164k|    SHA_RND2(C, D, E, A, B, 0);
  ------------------
  |  |  312|   164k|    a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |   26|   164k|#define SHA_F2(X, Y, Z) ((X) ^ (Y) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |  304|   164k|#define K1 0x6ed9eba1L
  |  |  ------------------
  |  |  313|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  398|   164k|    SHA_MIX(1, 14, 9, 3);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  399|   164k|    SHA_RND2(B, C, D, E, A, 1);
  ------------------
  |  |  312|   164k|    a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |   26|   164k|#define SHA_F2(X, Y, Z) ((X) ^ (Y) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |  304|   164k|#define K1 0x6ed9eba1L
  |  |  ------------------
  |  |  313|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  400|   164k|    SHA_MIX(2, 15, 10, 4);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  401|   164k|    SHA_RND2(A, B, C, D, E, 2);
  ------------------
  |  |  312|   164k|    a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |   26|   164k|#define SHA_F2(X, Y, Z) ((X) ^ (Y) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |  304|   164k|#define K1 0x6ed9eba1L
  |  |  ------------------
  |  |  313|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  402|   164k|    SHA_MIX(3, 0, 11, 5);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  403|   164k|    SHA_RND2(E, A, B, C, D, 3);
  ------------------
  |  |  312|   164k|    a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |   26|   164k|#define SHA_F2(X, Y, Z) ((X) ^ (Y) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |  304|   164k|#define K1 0x6ed9eba1L
  |  |  ------------------
  |  |  313|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  404|   164k|    SHA_MIX(4, 1, 12, 6);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  405|   164k|    SHA_RND2(D, E, A, B, C, 4);
  ------------------
  |  |  312|   164k|    a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |   26|   164k|#define SHA_F2(X, Y, Z) ((X) ^ (Y) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |  304|   164k|#define K1 0x6ed9eba1L
  |  |  ------------------
  |  |  313|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  406|   164k|    SHA_MIX(5, 2, 13, 7);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  407|   164k|    SHA_RND2(C, D, E, A, B, 5);
  ------------------
  |  |  312|   164k|    a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |   26|   164k|#define SHA_F2(X, Y, Z) ((X) ^ (Y) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |  304|   164k|#define K1 0x6ed9eba1L
  |  |  ------------------
  |  |  313|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  408|   164k|    SHA_MIX(6, 3, 14, 8);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  409|   164k|    SHA_RND2(B, C, D, E, A, 6);
  ------------------
  |  |  312|   164k|    a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |   26|   164k|#define SHA_F2(X, Y, Z) ((X) ^ (Y) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |  304|   164k|#define K1 0x6ed9eba1L
  |  |  ------------------
  |  |  313|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  410|   164k|    SHA_MIX(7, 4, 15, 9);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  411|   164k|    SHA_RND2(A, B, C, D, E, 7);
  ------------------
  |  |  312|   164k|    a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |   26|   164k|#define SHA_F2(X, Y, Z) ((X) ^ (Y) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F2(c, d, e) + a + XW(n) + K1; \
  |  |  ------------------
  |  |  |  |  304|   164k|#define K1 0x6ed9eba1L
  |  |  ------------------
  |  |  313|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  412|       |
  413|   164k|    SHA_MIX(8, 5, 0, 10);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  414|   164k|    SHA_RND3(E, A, B, C, D, 8);
  ------------------
  |  |  315|   164k|    a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |   27|   164k|#define SHA_F3(X, Y, Z) (((X) & (Y)) | ((Z) & ((X) | (Y))))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |  305|   164k|#define K2 0x8f1bbcdcL
  |  |  ------------------
  |  |  316|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  415|   164k|    SHA_MIX(9, 6, 1, 11);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  416|   164k|    SHA_RND3(D, E, A, B, C, 9);
  ------------------
  |  |  315|   164k|    a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |   27|   164k|#define SHA_F3(X, Y, Z) (((X) & (Y)) | ((Z) & ((X) | (Y))))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |  305|   164k|#define K2 0x8f1bbcdcL
  |  |  ------------------
  |  |  316|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  417|   164k|    SHA_MIX(10, 7, 2, 12);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  418|   164k|    SHA_RND3(C, D, E, A, B, 10);
  ------------------
  |  |  315|   164k|    a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |   27|   164k|#define SHA_F3(X, Y, Z) (((X) & (Y)) | ((Z) & ((X) | (Y))))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |  305|   164k|#define K2 0x8f1bbcdcL
  |  |  ------------------
  |  |  316|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  419|   164k|    SHA_MIX(11, 8, 3, 13);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  420|   164k|    SHA_RND3(B, C, D, E, A, 11);
  ------------------
  |  |  315|   164k|    a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |   27|   164k|#define SHA_F3(X, Y, Z) (((X) & (Y)) | ((Z) & ((X) | (Y))))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |  305|   164k|#define K2 0x8f1bbcdcL
  |  |  ------------------
  |  |  316|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  421|   164k|    SHA_MIX(12, 9, 4, 14);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  422|   164k|    SHA_RND3(A, B, C, D, E, 12);
  ------------------
  |  |  315|   164k|    a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |   27|   164k|#define SHA_F3(X, Y, Z) (((X) & (Y)) | ((Z) & ((X) | (Y))))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |  305|   164k|#define K2 0x8f1bbcdcL
  |  |  ------------------
  |  |  316|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  423|   164k|    SHA_MIX(13, 10, 5, 15);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  424|   164k|    SHA_RND3(E, A, B, C, D, 13);
  ------------------
  |  |  315|   164k|    a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |   27|   164k|#define SHA_F3(X, Y, Z) (((X) & (Y)) | ((Z) & ((X) | (Y))))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |  305|   164k|#define K2 0x8f1bbcdcL
  |  |  ------------------
  |  |  316|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  425|   164k|    SHA_MIX(14, 11, 6, 0);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  426|   164k|    SHA_RND3(D, E, A, B, C, 14);
  ------------------
  |  |  315|   164k|    a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |   27|   164k|#define SHA_F3(X, Y, Z) (((X) & (Y)) | ((Z) & ((X) | (Y))))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |  305|   164k|#define K2 0x8f1bbcdcL
  |  |  ------------------
  |  |  316|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  427|   164k|    SHA_MIX(15, 12, 7, 1);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  428|   164k|    SHA_RND3(C, D, E, A, B, 15);
  ------------------
  |  |  315|   164k|    a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |   27|   164k|#define SHA_F3(X, Y, Z) (((X) & (Y)) | ((Z) & ((X) | (Y))))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |  305|   164k|#define K2 0x8f1bbcdcL
  |  |  ------------------
  |  |  316|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  429|       |
  430|   164k|    SHA_MIX(0, 13, 8, 2);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  431|   164k|    SHA_RND3(B, C, D, E, A, 0);
  ------------------
  |  |  315|   164k|    a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |   27|   164k|#define SHA_F3(X, Y, Z) (((X) & (Y)) | ((Z) & ((X) | (Y))))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |  305|   164k|#define K2 0x8f1bbcdcL
  |  |  ------------------
  |  |  316|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  432|   164k|    SHA_MIX(1, 14, 9, 3);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  433|   164k|    SHA_RND3(A, B, C, D, E, 1);
  ------------------
  |  |  315|   164k|    a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |   27|   164k|#define SHA_F3(X, Y, Z) (((X) & (Y)) | ((Z) & ((X) | (Y))))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |  305|   164k|#define K2 0x8f1bbcdcL
  |  |  ------------------
  |  |  316|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  434|   164k|    SHA_MIX(2, 15, 10, 4);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  435|   164k|    SHA_RND3(E, A, B, C, D, 2);
  ------------------
  |  |  315|   164k|    a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |   27|   164k|#define SHA_F3(X, Y, Z) (((X) & (Y)) | ((Z) & ((X) | (Y))))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |  305|   164k|#define K2 0x8f1bbcdcL
  |  |  ------------------
  |  |  316|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  436|   164k|    SHA_MIX(3, 0, 11, 5);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  437|   164k|    SHA_RND3(D, E, A, B, C, 3);
  ------------------
  |  |  315|   164k|    a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |   27|   164k|#define SHA_F3(X, Y, Z) (((X) & (Y)) | ((Z) & ((X) | (Y))))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |  305|   164k|#define K2 0x8f1bbcdcL
  |  |  ------------------
  |  |  316|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  438|   164k|    SHA_MIX(4, 1, 12, 6);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  439|   164k|    SHA_RND3(C, D, E, A, B, 4);
  ------------------
  |  |  315|   164k|    a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |   27|   164k|#define SHA_F3(X, Y, Z) (((X) & (Y)) | ((Z) & ((X) | (Y))))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |  305|   164k|#define K2 0x8f1bbcdcL
  |  |  ------------------
  |  |  316|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  440|   164k|    SHA_MIX(5, 2, 13, 7);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  441|   164k|    SHA_RND3(B, C, D, E, A, 5);
  ------------------
  |  |  315|   164k|    a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |   27|   164k|#define SHA_F3(X, Y, Z) (((X) & (Y)) | ((Z) & ((X) | (Y))))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |  305|   164k|#define K2 0x8f1bbcdcL
  |  |  ------------------
  |  |  316|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  442|   164k|    SHA_MIX(6, 3, 14, 8);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  443|   164k|    SHA_RND3(A, B, C, D, E, 6);
  ------------------
  |  |  315|   164k|    a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |   27|   164k|#define SHA_F3(X, Y, Z) (((X) & (Y)) | ((Z) & ((X) | (Y))))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |  305|   164k|#define K2 0x8f1bbcdcL
  |  |  ------------------
  |  |  316|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  444|   164k|    SHA_MIX(7, 4, 15, 9);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  445|   164k|    SHA_RND3(E, A, B, C, D, 7);
  ------------------
  |  |  315|   164k|    a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |   27|   164k|#define SHA_F3(X, Y, Z) (((X) & (Y)) | ((Z) & ((X) | (Y))))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |  305|   164k|#define K2 0x8f1bbcdcL
  |  |  ------------------
  |  |  316|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  446|   164k|    SHA_MIX(8, 5, 0, 10);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  447|   164k|    SHA_RND3(D, E, A, B, C, 8);
  ------------------
  |  |  315|   164k|    a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |   27|   164k|#define SHA_F3(X, Y, Z) (((X) & (Y)) | ((Z) & ((X) | (Y))))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |  305|   164k|#define K2 0x8f1bbcdcL
  |  |  ------------------
  |  |  316|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  448|   164k|    SHA_MIX(9, 6, 1, 11);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  449|   164k|    SHA_RND3(C, D, E, A, B, 9);
  ------------------
  |  |  315|   164k|    a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |   27|   164k|#define SHA_F3(X, Y, Z) (((X) & (Y)) | ((Z) & ((X) | (Y))))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |  305|   164k|#define K2 0x8f1bbcdcL
  |  |  ------------------
  |  |  316|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  450|   164k|    SHA_MIX(10, 7, 2, 12);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  451|   164k|    SHA_RND3(B, C, D, E, A, 10);
  ------------------
  |  |  315|   164k|    a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |   27|   164k|#define SHA_F3(X, Y, Z) (((X) & (Y)) | ((Z) & ((X) | (Y))))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |  305|   164k|#define K2 0x8f1bbcdcL
  |  |  ------------------
  |  |  316|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  452|   164k|    SHA_MIX(11, 8, 3, 13);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  453|   164k|    SHA_RND3(A, B, C, D, E, 11);
  ------------------
  |  |  315|   164k|    a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |   27|   164k|#define SHA_F3(X, Y, Z) (((X) & (Y)) | ((Z) & ((X) | (Y))))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F3(c, d, e) + a + XW(n) + K2; \
  |  |  ------------------
  |  |  |  |  305|   164k|#define K2 0x8f1bbcdcL
  |  |  ------------------
  |  |  316|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  454|       |
  455|   164k|    SHA_MIX(12, 9, 4, 14);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  456|   164k|    SHA_RND4(E, A, B, C, D, 12);
  ------------------
  |  |  318|   164k|    a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |   28|   164k|#define SHA_F4(X, Y, Z) ((X) ^ (Y) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |  306|   164k|#define K3 0xca62c1d6L
  |  |  ------------------
  |  |  319|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  457|   164k|    SHA_MIX(13, 10, 5, 15);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  458|   164k|    SHA_RND4(D, E, A, B, C, 13);
  ------------------
  |  |  318|   164k|    a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |   28|   164k|#define SHA_F4(X, Y, Z) ((X) ^ (Y) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |  306|   164k|#define K3 0xca62c1d6L
  |  |  ------------------
  |  |  319|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  459|   164k|    SHA_MIX(14, 11, 6, 0);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  460|   164k|    SHA_RND4(C, D, E, A, B, 14);
  ------------------
  |  |  318|   164k|    a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |   28|   164k|#define SHA_F4(X, Y, Z) ((X) ^ (Y) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |  306|   164k|#define K3 0xca62c1d6L
  |  |  ------------------
  |  |  319|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  461|   164k|    SHA_MIX(15, 12, 7, 1);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  462|   164k|    SHA_RND4(B, C, D, E, A, 15);
  ------------------
  |  |  318|   164k|    a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |   28|   164k|#define SHA_F4(X, Y, Z) ((X) ^ (Y) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |  306|   164k|#define K3 0xca62c1d6L
  |  |  ------------------
  |  |  319|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  463|       |
  464|   164k|    SHA_MIX(0, 13, 8, 2);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  465|   164k|    SHA_RND4(A, B, C, D, E, 0);
  ------------------
  |  |  318|   164k|    a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |   28|   164k|#define SHA_F4(X, Y, Z) ((X) ^ (Y) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |  306|   164k|#define K3 0xca62c1d6L
  |  |  ------------------
  |  |  319|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  466|   164k|    SHA_MIX(1, 14, 9, 3);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  467|   164k|    SHA_RND4(E, A, B, C, D, 1);
  ------------------
  |  |  318|   164k|    a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |   28|   164k|#define SHA_F4(X, Y, Z) ((X) ^ (Y) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |  306|   164k|#define K3 0xca62c1d6L
  |  |  ------------------
  |  |  319|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  468|   164k|    SHA_MIX(2, 15, 10, 4);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  469|   164k|    SHA_RND4(D, E, A, B, C, 2);
  ------------------
  |  |  318|   164k|    a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |   28|   164k|#define SHA_F4(X, Y, Z) ((X) ^ (Y) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |  306|   164k|#define K3 0xca62c1d6L
  |  |  ------------------
  |  |  319|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  470|   164k|    SHA_MIX(3, 0, 11, 5);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  471|   164k|    SHA_RND4(C, D, E, A, B, 3);
  ------------------
  |  |  318|   164k|    a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |   28|   164k|#define SHA_F4(X, Y, Z) ((X) ^ (Y) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |  306|   164k|#define K3 0xca62c1d6L
  |  |  ------------------
  |  |  319|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  472|   164k|    SHA_MIX(4, 1, 12, 6);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  473|   164k|    SHA_RND4(B, C, D, E, A, 4);
  ------------------
  |  |  318|   164k|    a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |   28|   164k|#define SHA_F4(X, Y, Z) ((X) ^ (Y) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |  306|   164k|#define K3 0xca62c1d6L
  |  |  ------------------
  |  |  319|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  474|   164k|    SHA_MIX(5, 2, 13, 7);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  475|   164k|    SHA_RND4(A, B, C, D, E, 5);
  ------------------
  |  |  318|   164k|    a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |   28|   164k|#define SHA_F4(X, Y, Z) ((X) ^ (Y) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |  306|   164k|#define K3 0xca62c1d6L
  |  |  ------------------
  |  |  319|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  476|   164k|    SHA_MIX(6, 3, 14, 8);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  477|   164k|    SHA_RND4(E, A, B, C, D, 6);
  ------------------
  |  |  318|   164k|    a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |   28|   164k|#define SHA_F4(X, Y, Z) ((X) ^ (Y) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |  306|   164k|#define K3 0xca62c1d6L
  |  |  ------------------
  |  |  319|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  478|   164k|    SHA_MIX(7, 4, 15, 9);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  479|   164k|    SHA_RND4(D, E, A, B, C, 7);
  ------------------
  |  |  318|   164k|    a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |   28|   164k|#define SHA_F4(X, Y, Z) ((X) ^ (Y) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |  306|   164k|#define K3 0xca62c1d6L
  |  |  ------------------
  |  |  319|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  480|   164k|    SHA_MIX(8, 5, 0, 10);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  481|   164k|    SHA_RND4(C, D, E, A, B, 8);
  ------------------
  |  |  318|   164k|    a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |   28|   164k|#define SHA_F4(X, Y, Z) ((X) ^ (Y) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |  306|   164k|#define K3 0xca62c1d6L
  |  |  ------------------
  |  |  319|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  482|   164k|    SHA_MIX(9, 6, 1, 11);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  483|   164k|    SHA_RND4(B, C, D, E, A, 9);
  ------------------
  |  |  318|   164k|    a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |   28|   164k|#define SHA_F4(X, Y, Z) ((X) ^ (Y) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |  306|   164k|#define K3 0xca62c1d6L
  |  |  ------------------
  |  |  319|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  484|   164k|    SHA_MIX(10, 7, 2, 12);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  485|   164k|    SHA_RND4(A, B, C, D, E, 10);
  ------------------
  |  |  318|   164k|    a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |   28|   164k|#define SHA_F4(X, Y, Z) ((X) ^ (Y) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |  306|   164k|#define K3 0xca62c1d6L
  |  |  ------------------
  |  |  319|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  486|   164k|    SHA_MIX(11, 8, 3, 13);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  487|   164k|    SHA_RND4(E, A, B, C, D, 11);
  ------------------
  |  |  318|   164k|    a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |   28|   164k|#define SHA_F4(X, Y, Z) ((X) ^ (Y) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |  306|   164k|#define K3 0xca62c1d6L
  |  |  ------------------
  |  |  319|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  488|   164k|    SHA_MIX(12, 9, 4, 14);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  489|   164k|    SHA_RND4(D, E, A, B, C, 12);
  ------------------
  |  |  318|   164k|    a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |   28|   164k|#define SHA_F4(X, Y, Z) ((X) ^ (Y) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |  306|   164k|#define K3 0xca62c1d6L
  |  |  ------------------
  |  |  319|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  490|   164k|    SHA_MIX(13, 10, 5, 15);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  491|   164k|    SHA_RND4(C, D, E, A, B, 13);
  ------------------
  |  |  318|   164k|    a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |   28|   164k|#define SHA_F4(X, Y, Z) ((X) ^ (Y) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |  306|   164k|#define K3 0xca62c1d6L
  |  |  ------------------
  |  |  319|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  492|   164k|    SHA_MIX(14, 11, 6, 0);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  493|   164k|    SHA_RND4(B, C, D, E, A, 14);
  ------------------
  |  |  318|   164k|    a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |   28|   164k|#define SHA_F4(X, Y, Z) ((X) ^ (Y) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |  306|   164k|#define K3 0xca62c1d6L
  |  |  ------------------
  |  |  319|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  494|   164k|    SHA_MIX(15, 12, 7, 1);
  ------------------
  |  |   30|   164k|#define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SHA_MIX(n, a, b, c) XW(n) = SHA_ROTL(XW(a) ^ XW(b) ^ XW(c) ^ XW(n), 1)
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  495|   164k|    SHA_RND4(A, B, C, D, E, 15);
  ------------------
  |  |  318|   164k|    a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |   28|   164k|#define SHA_F4(X, Y, Z) ((X) ^ (Y) ^ (Z))
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |  295|   164k|#define XW(n) X[n - W2X]
  |  |  |  |  ------------------
  |  |  |  |  |  |  116|   164k|#define W2X 6  /* X[0] is W[6],  and W[0] is X[-6]  */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
  |  |  ------------------
  |  |  |  |  306|   164k|#define K3 0xca62c1d6L
  |  |  ------------------
  |  |  319|   164k|    c = SHA_ROTL(c, 30)
  ------------------
  496|       |
  497|   164k|    XH(0) += A;
  ------------------
  |  |  294|   164k|#define XH(n) X[n - H2X]
  |  |  ------------------
  |  |  |  |  115|   164k|#define H2X 11 /* X[0] is H[11], and H[0] is X[-11] */
  |  |  ------------------
  ------------------
  498|   164k|    XH(1) += B;
  ------------------
  |  |  294|   164k|#define XH(n) X[n - H2X]
  |  |  ------------------
  |  |  |  |  115|   164k|#define H2X 11 /* X[0] is H[11], and H[0] is X[-11] */
  |  |  ------------------
  ------------------
  499|   164k|    XH(2) += C;
  ------------------
  |  |  294|   164k|#define XH(n) X[n - H2X]
  |  |  ------------------
  |  |  |  |  115|   164k|#define H2X 11 /* X[0] is H[11], and H[0] is X[-11] */
  |  |  ------------------
  ------------------
  500|   164k|    XH(3) += D;
  ------------------
  |  |  294|   164k|#define XH(n) X[n - H2X]
  |  |  ------------------
  |  |  |  |  115|   164k|#define H2X 11 /* X[0] is H[11], and H[0] is X[-11] */
  |  |  ------------------
  ------------------
  501|   164k|    XH(4) += E;
  ------------------
  |  |  294|   164k|#define XH(n) X[n - H2X]
  |  |  ------------------
  |  |  |  |  115|   164k|#define H2X 11 /* X[0] is H[11], and H[0] is X[-11] */
  |  |  ------------------
  ------------------
  502|   164k|}
sha_fast.c:SHA1_Compress_Generic:
  506|  31.3k|{
  507|  31.3k|    shaCompress(&ctx->H[H2X], ctx->u.w);
  ------------------
  |  |  115|  31.3k|#define H2X 11 /* X[0] is H[11], and H[0] is X[-11] */
  ------------------
  508|  31.3k|}

camellia.c:swap4b:
   92|   246k|{
   93|   246k|    __asm__("bswap %0"
   94|   246k|            : "+r"(value));
   95|   246k|    return (value);
   96|   246k|}
sha_fast.c:SHA_ROTL:
   76|  36.7M|{
   77|  36.7M|    PRUint32 t = (PRUint32)x;
   78|  36.7M|    return ((t << n) | (t >> (32 - n)));
   79|  36.7M|}
sha_fast.c:swap4b:
   92|  3.12M|{
   93|  3.12M|    __asm__("bswap %0"
   94|  3.12M|            : "+r"(value));
   95|  3.12M|    return (value);
   96|  3.12M|}

TLS_P_hash:
   21|  5.07k|{
   22|  5.07k|    unsigned char state[PHASH_STATE_MAX_LEN];
   23|  5.07k|    unsigned char outbuf[PHASH_STATE_MAX_LEN];
   24|  5.07k|    unsigned int state_len = 0, label_len = 0, outbuf_len = 0, chunk_size;
   25|  5.07k|    unsigned int remaining;
   26|  5.07k|    unsigned char *res;
   27|  5.07k|    SECStatus status;
   28|  5.07k|    HMACContext *cx;
   29|  5.07k|    SECStatus rv = SECFailure;
   30|  5.07k|    const SECHashObject *hashObj = HASH_GetRawHashObject(hashType);
   31|       |
   32|  5.07k|    PORT_Assert((secret != NULL) && (secret->data != NULL || !secret->len));
  ------------------
  |  |  120|  5.07k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  15.2k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 5.07k, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 5.07k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   33|  5.07k|    PORT_Assert((seed != NULL) && (seed->data != NULL));
  ------------------
  |  |  120|  5.07k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  10.1k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 5.07k, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 5.07k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   34|  5.07k|    PORT_Assert((result != NULL) && (result->data != NULL));
  ------------------
  |  |  120|  5.07k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  10.1k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 5.07k, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 5.07k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   35|       |
   36|  5.07k|    remaining = result->len;
   37|  5.07k|    res = result->data;
   38|       |
   39|  5.07k|    if (label != NULL)
  ------------------
  |  Branch (39:9): [True: 3.38k, False: 1.69k]
  ------------------
   40|  3.38k|        label_len = PORT_Strlen(label);
  ------------------
  |  |  190|  3.38k|#define PORT_Strlen(s) strlen(s)
  ------------------
   41|       |
   42|  5.07k|    cx = HMAC_Create(hashObj, secret->data, secret->len, isFIPS);
   43|  5.07k|    if (cx == NULL)
  ------------------
  |  Branch (43:9): [True: 0, False: 5.07k]
  ------------------
   44|      0|        goto loser;
   45|       |
   46|       |    /* initialize the state = A(1) = HMAC_hash(secret, seed) */
   47|  5.07k|    HMAC_Begin(cx);
   48|  5.07k|    HMAC_Update(cx, (unsigned char *)label, label_len);
   49|  5.07k|    HMAC_Update(cx, seed->data, seed->len);
   50|  5.07k|    status = HMAC_Finish(cx, state, &state_len, sizeof(state));
   51|  5.07k|    if (status != SECSuccess)
  ------------------
  |  Branch (51:9): [True: 0, False: 5.07k]
  ------------------
   52|      0|        goto loser;
   53|       |
   54|       |    /* generate a block at a time until we're done */
   55|  15.5k|    while (remaining > 0) {
  ------------------
  |  Branch (55:12): [True: 10.4k, False: 5.07k]
  ------------------
   56|       |
   57|  10.4k|        HMAC_Begin(cx);
   58|  10.4k|        HMAC_Update(cx, state, state_len);
   59|  10.4k|        if (label_len)
  ------------------
  |  Branch (59:13): [True: 8.76k, False: 1.69k]
  ------------------
   60|  8.76k|            HMAC_Update(cx, (unsigned char *)label, label_len);
   61|  10.4k|        HMAC_Update(cx, seed->data, seed->len);
   62|  10.4k|        status = HMAC_Finish(cx, outbuf, &outbuf_len, sizeof(outbuf));
   63|  10.4k|        if (status != SECSuccess)
  ------------------
  |  Branch (63:13): [True: 0, False: 10.4k]
  ------------------
   64|      0|            goto loser;
   65|       |
   66|       |        /* Update the state = A(i) = HMAC_hash(secret, A(i-1)) */
   67|  10.4k|        HMAC_Begin(cx);
   68|  10.4k|        HMAC_Update(cx, state, state_len);
   69|  10.4k|        status = HMAC_Finish(cx, state, &state_len, sizeof(state));
   70|  10.4k|        if (status != SECSuccess)
  ------------------
  |  Branch (70:13): [True: 0, False: 10.4k]
  ------------------
   71|      0|            goto loser;
   72|       |
   73|  10.4k|        chunk_size = PR_MIN(outbuf_len, remaining);
  ------------------
  |  |  158|  10.4k|#define PR_MIN(x,y)     ((x)<(y)?(x):(y))
  |  |  ------------------
  |  |  |  Branch (158:26): [True: 5.38k, False: 5.07k]
  |  |  ------------------
  ------------------
   74|  10.4k|        PORT_Memcpy(res, &outbuf, chunk_size);
  ------------------
  |  |  180|  10.4k|#define PORT_Memcpy memcpy
  ------------------
   75|  10.4k|        res += chunk_size;
   76|  10.4k|        remaining -= chunk_size;
   77|  10.4k|    }
   78|       |
   79|  5.07k|    rv = SECSuccess;
   80|       |
   81|  5.07k|loser:
   82|       |    /* clear out state so it's not left on the stack */
   83|  5.07k|    if (cx)
  ------------------
  |  Branch (83:9): [True: 5.07k, False: 0]
  ------------------
   84|  5.07k|        HMAC_Destroy(cx, PR_TRUE);
  ------------------
  |  |  437|  5.07k|#define PR_TRUE 1
  ------------------
   85|  5.07k|    PORT_SafeZero(state, sizeof(state));
   86|  5.07k|    PORT_SafeZero(outbuf, sizeof(outbuf));
   87|  5.07k|    return rv;
   88|  5.07k|}
TLS_PRF:
   93|    198|{
   94|    198|    SECStatus rv = SECFailure, status;
   95|    198|    unsigned int i;
   96|    198|    SECItem tmp = { siBuffer, NULL, 0 };
   97|    198|    SECItem S1;
   98|    198|    SECItem S2;
   99|       |
  100|    198|    PORT_Assert((secret != NULL) && (secret->data != NULL || !secret->len));
  ------------------
  |  |  120|    198|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    594|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 198, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 198, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  101|    198|    PORT_Assert((seed != NULL) && (seed->data != NULL));
  ------------------
  |  |  120|    198|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    396|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 198, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 198, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  102|    198|    PORT_Assert((result != NULL) && (result->data != NULL));
  ------------------
  |  |  120|    198|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    396|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 198, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 198, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  103|       |
  104|    198|    S1.type = siBuffer;
  105|    198|    S1.len = (secret->len / 2) + (secret->len & 1);
  106|    198|    S1.data = secret->data;
  107|       |
  108|    198|    S2.type = siBuffer;
  109|    198|    S2.len = S1.len;
  110|    198|    S2.data = secret->data + (secret->len - S2.len);
  111|       |
  112|    198|    tmp.data = (unsigned char *)PORT_Alloc(result->len);
  ------------------
  |  |   52|    198|#define PORT_Alloc PORT_Alloc_Util
  ------------------
  113|    198|    if (tmp.data == NULL)
  ------------------
  |  Branch (113:9): [True: 0, False: 198]
  ------------------
  114|      0|        goto loser;
  115|    198|    tmp.len = result->len;
  116|       |
  117|    198|    status = TLS_P_hash(HASH_AlgMD5, &S1, label, seed, result, isFIPS);
  118|    198|    if (status != SECSuccess)
  ------------------
  |  Branch (118:9): [True: 0, False: 198]
  ------------------
  119|      0|        goto loser;
  120|       |
  121|    198|    status = TLS_P_hash(HASH_AlgSHA1, &S2, label, seed, &tmp, isFIPS);
  122|    198|    if (status != SECSuccess)
  ------------------
  |  Branch (122:9): [True: 0, False: 198]
  ------------------
  123|      0|        goto loser;
  124|       |
  125|  8.78k|    for (i = 0; i < result->len; i++)
  ------------------
  |  Branch (125:17): [True: 8.58k, False: 198]
  ------------------
  126|  8.58k|        result->data[i] ^= tmp.data[i];
  127|       |
  128|    198|    rv = SECSuccess;
  129|       |
  130|    198|loser:
  131|    198|    if (tmp.data != NULL)
  ------------------
  |  Branch (131:9): [True: 198, False: 0]
  ------------------
  132|    198|        PORT_ZFree(tmp.data, tmp.len);
  ------------------
  |  |   75|    198|#define PORT_ZFree PORT_ZFree_Util
  ------------------
  133|    198|    return rv;
  134|    198|}

Hacl_Impl_Chacha20_chacha20_init:
  117|  36.1k|{
  118|  36.1k|    KRML_MAYBE_FOR4(i,
  ------------------
  |  |  330|  36.1k|#define KRML_MAYBE_FOR4(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 4, k, x)
  |  |  ------------------
  |  |  |  |  288|  36.1k|    do {                               \
  |  |  |  |  289|  36.1k|        uint32_t i = z;                \
  |  |  |  |  290|  36.1k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  36.1k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  119|  36.1k|                    (uint32_t)0U,
  120|  36.1k|                    (uint32_t)4U,
  121|  36.1k|                    (uint32_t)1U,
  122|  36.1k|                    uint32_t *os = ctx;
  123|  36.1k|                    uint32_t x = chacha20_constants[i];
  124|  36.1k|                    os[i] = x;);
  125|  36.1k|    KRML_MAYBE_FOR8(i,
  ------------------
  |  |  354|  36.1k|#define KRML_MAYBE_FOR8(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 8, k, x)
  |  |  ------------------
  |  |  |  |  288|  36.1k|    do {                               \
  |  |  |  |  289|  36.1k|        uint32_t i = z;                \
  |  |  |  |  290|  36.1k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  36.1k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  126|  36.1k|                    (uint32_t)0U,
  127|  36.1k|                    (uint32_t)8U,
  128|  36.1k|                    (uint32_t)1U,
  129|  36.1k|                    uint32_t *os = ctx + (uint32_t)4U;
  130|  36.1k|                    uint8_t *bj = k + i * (uint32_t)4U;
  131|  36.1k|                    uint32_t u = load32_le(bj);
  132|  36.1k|                    uint32_t r = u;
  133|  36.1k|                    uint32_t x = r;
  134|  36.1k|                    os[i] = x;);
  135|  36.1k|    ctx[12U] = ctr;
  136|  36.1k|    KRML_MAYBE_FOR3(i,
  ------------------
  |  |  324|  36.1k|#define KRML_MAYBE_FOR3(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 3, k, x)
  |  |  ------------------
  |  |  |  |  288|  36.1k|    do {                               \
  |  |  |  |  289|  36.1k|        uint32_t i = z;                \
  |  |  |  |  290|  36.1k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  36.1k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  137|  36.1k|                    (uint32_t)0U,
  138|  36.1k|                    (uint32_t)3U,
  139|  36.1k|                    (uint32_t)1U,
  140|  36.1k|                    uint32_t *os = ctx + (uint32_t)13U;
  141|  36.1k|                    uint8_t *bj = n + i * (uint32_t)4U;
  142|  36.1k|                    uint32_t u = load32_le(bj);
  143|  36.1k|                    uint32_t r = u;
  144|  36.1k|                    uint32_t x = r;
  145|  36.1k|                    os[i] = x;);
  146|  36.1k|}
Hacl_Impl_Chacha20_chacha20_update:
  189|  36.1k|{
  190|  36.1k|    uint32_t rem = len % (uint32_t)64U;
  191|  36.1k|    uint32_t nb = len / (uint32_t)64U;
  192|  36.1k|    uint32_t rem1 = len % (uint32_t)64U;
  193|  37.6k|    for (uint32_t i = (uint32_t)0U; i < nb; i++) {
  ------------------
  |  Branch (193:37): [True: 1.49k, False: 36.1k]
  ------------------
  194|  1.49k|        chacha20_encrypt_block(ctx, out + i * (uint32_t)64U, i, text + i * (uint32_t)64U);
  195|  1.49k|    }
  196|  36.1k|    if (rem1 > (uint32_t)0U) {
  ------------------
  |  Branch (196:9): [True: 36.0k, False: 45]
  ------------------
  197|  36.0k|        chacha20_encrypt_last(ctx, rem, out + nb * (uint32_t)64U, nb, text + nb * (uint32_t)64U);
  198|  36.0k|    }
  199|  36.1k|}
Hacl_Chacha20_chacha20_encrypt:
  209|  36.1k|{
  210|  36.1k|    uint32_t ctx[16U] = { 0U };
  211|  36.1k|    Hacl_Impl_Chacha20_chacha20_init(ctx, key, n, ctr);
  212|  36.1k|    Hacl_Impl_Chacha20_chacha20_update(ctx, len, out, text);
  213|  36.1k|}
Hacl_Chacha20.c:chacha20_encrypt_block:
  150|  37.5k|{
  151|  37.5k|    uint32_t k[16U] = { 0U };
  152|  37.5k|    chacha20_core(k, ctx, incr);
  153|  37.5k|    uint32_t bl[16U] = { 0U };
  154|  37.5k|    KRML_MAYBE_FOR16(i,
  ------------------
  |  |  402|  37.5k|#define KRML_MAYBE_FOR16(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 16, k, x)
  |  |  ------------------
  |  |  |  |  288|  37.5k|    do {                               \
  |  |  |  |  289|  37.5k|        uint32_t i = z;                \
  |  |  |  |  290|  37.5k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  37.5k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  155|  37.5k|                     (uint32_t)0U,
  156|  37.5k|                     (uint32_t)16U,
  157|  37.5k|                     (uint32_t)1U,
  158|  37.5k|                     uint32_t *os = bl;
  159|  37.5k|                     uint8_t *bj = text + i * (uint32_t)4U;
  160|  37.5k|                     uint32_t u = load32_le(bj);
  161|  37.5k|                     uint32_t r = u;
  162|  37.5k|                     uint32_t x = r;
  163|  37.5k|                     os[i] = x;);
  164|  37.5k|    KRML_MAYBE_FOR16(i,
  ------------------
  |  |  402|  37.5k|#define KRML_MAYBE_FOR16(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 16, k, x)
  |  |  ------------------
  |  |  |  |  288|  37.5k|    do {                               \
  |  |  |  |  289|  37.5k|        uint32_t i = z;                \
  |  |  |  |  290|  37.5k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  37.5k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  165|  37.5k|                     (uint32_t)0U,
  166|  37.5k|                     (uint32_t)16U,
  167|  37.5k|                     (uint32_t)1U,
  168|  37.5k|                     uint32_t *os = bl;
  169|  37.5k|                     uint32_t x = bl[i] ^ k[i];
  170|  37.5k|                     os[i] = x;);
  171|  37.5k|    KRML_MAYBE_FOR16(i,
  ------------------
  |  |  402|  37.5k|#define KRML_MAYBE_FOR16(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 16, k, x)
  |  |  ------------------
  |  |  |  |  288|  37.5k|    do {                               \
  |  |  |  |  289|  37.5k|        uint32_t i = z;                \
  |  |  |  |  290|  37.5k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  37.5k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  172|  37.5k|                     (uint32_t)0U,
  173|  37.5k|                     (uint32_t)16U,
  174|  37.5k|                     (uint32_t)1U,
  175|  37.5k|                     store32_le(out + i * (uint32_t)4U, bl[i]););
  176|  37.5k|}
Hacl_Chacha20.c:chacha20_core:
   97|  37.5k|{
   98|  37.5k|    memcpy(k, ctx, (uint32_t)16U * sizeof(uint32_t));
   99|  37.5k|    uint32_t ctr_u32 = ctr;
  100|  37.5k|    k[12U] = k[12U] + ctr_u32;
  101|  37.5k|    rounds(k);
  102|  37.5k|    KRML_MAYBE_FOR16(i,
  ------------------
  |  |  402|  37.5k|#define KRML_MAYBE_FOR16(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 16, k, x)
  |  |  ------------------
  |  |  |  |  288|  37.5k|    do {                               \
  |  |  |  |  289|  37.5k|        uint32_t i = z;                \
  |  |  |  |  290|  37.5k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  37.5k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  103|  37.5k|                     (uint32_t)0U,
  104|  37.5k|                     (uint32_t)16U,
  105|  37.5k|                     (uint32_t)1U,
  106|  37.5k|                     uint32_t *os = k;
  107|  37.5k|                     uint32_t x = k[i] + ctx[i];
  108|  37.5k|                     os[i] = x;);
  109|  37.5k|    k[12U] = k[12U] + ctr_u32;
  110|  37.5k|}
Hacl_Chacha20.c:rounds:
   82|  37.5k|{
   83|  37.5k|    double_round(st);
   84|  37.5k|    double_round(st);
   85|  37.5k|    double_round(st);
   86|  37.5k|    double_round(st);
   87|  37.5k|    double_round(st);
   88|  37.5k|    double_round(st);
   89|  37.5k|    double_round(st);
   90|  37.5k|    double_round(st);
   91|  37.5k|    double_round(st);
   92|  37.5k|    double_round(st);
   93|  37.5k|}
Hacl_Chacha20.c:double_round:
   69|   375k|{
   70|   375k|    quarter_round(st, (uint32_t)0U, (uint32_t)4U, (uint32_t)8U, (uint32_t)12U);
   71|   375k|    quarter_round(st, (uint32_t)1U, (uint32_t)5U, (uint32_t)9U, (uint32_t)13U);
   72|   375k|    quarter_round(st, (uint32_t)2U, (uint32_t)6U, (uint32_t)10U, (uint32_t)14U);
   73|   375k|    quarter_round(st, (uint32_t)3U, (uint32_t)7U, (uint32_t)11U, (uint32_t)15U);
   74|   375k|    quarter_round(st, (uint32_t)0U, (uint32_t)5U, (uint32_t)10U, (uint32_t)15U);
   75|   375k|    quarter_round(st, (uint32_t)1U, (uint32_t)6U, (uint32_t)11U, (uint32_t)12U);
   76|   375k|    quarter_round(st, (uint32_t)2U, (uint32_t)7U, (uint32_t)8U, (uint32_t)13U);
   77|   375k|    quarter_round(st, (uint32_t)3U, (uint32_t)4U, (uint32_t)9U, (uint32_t)14U);
   78|   375k|}
Hacl_Chacha20.c:quarter_round:
   32|  3.00M|{
   33|  3.00M|    uint32_t sta = st[a];
   34|  3.00M|    uint32_t stb0 = st[b];
   35|  3.00M|    uint32_t std0 = st[d];
   36|  3.00M|    uint32_t sta10 = sta + stb0;
   37|  3.00M|    uint32_t std10 = std0 ^ sta10;
   38|  3.00M|    uint32_t std2 = std10 << (uint32_t)16U | std10 >> (uint32_t)16U;
   39|  3.00M|    st[a] = sta10;
   40|  3.00M|    st[d] = std2;
   41|  3.00M|    uint32_t sta0 = st[c];
   42|  3.00M|    uint32_t stb1 = st[d];
   43|  3.00M|    uint32_t std3 = st[b];
   44|  3.00M|    uint32_t sta11 = sta0 + stb1;
   45|  3.00M|    uint32_t std11 = std3 ^ sta11;
   46|  3.00M|    uint32_t std20 = std11 << (uint32_t)12U | std11 >> (uint32_t)20U;
   47|  3.00M|    st[c] = sta11;
   48|  3.00M|    st[b] = std20;
   49|  3.00M|    uint32_t sta2 = st[a];
   50|  3.00M|    uint32_t stb2 = st[b];
   51|  3.00M|    uint32_t std4 = st[d];
   52|  3.00M|    uint32_t sta12 = sta2 + stb2;
   53|  3.00M|    uint32_t std12 = std4 ^ sta12;
   54|  3.00M|    uint32_t std21 = std12 << (uint32_t)8U | std12 >> (uint32_t)24U;
   55|  3.00M|    st[a] = sta12;
   56|  3.00M|    st[d] = std21;
   57|  3.00M|    uint32_t sta3 = st[c];
   58|  3.00M|    uint32_t stb = st[d];
   59|  3.00M|    uint32_t std = st[b];
   60|  3.00M|    uint32_t sta1 = sta3 + stb;
   61|  3.00M|    uint32_t std1 = std ^ sta1;
   62|  3.00M|    uint32_t std22 = std1 << (uint32_t)7U | std1 >> (uint32_t)25U;
   63|  3.00M|    st[c] = sta1;
   64|  3.00M|    st[b] = std22;
   65|  3.00M|}
Hacl_Chacha20.c:chacha20_encrypt_last:
  180|  36.0k|{
  181|  36.0k|    uint8_t plain[64U] = { 0U };
  182|  36.0k|    memcpy(plain, text, len * sizeof(uint8_t));
  183|  36.0k|    chacha20_encrypt_block(ctx, plain, incr, plain);
  184|  36.0k|    memcpy(out, plain, len * sizeof(uint8_t));
  185|  36.0k|}

Hacl_Chacha20Poly1305_256_aead_encrypt:
 1160|      4|{
 1161|      4|    Hacl_Chacha20_Vec256_chacha20_encrypt_256(mlen, cipher, m, k, n, (uint32_t)1U);
 1162|      4|    uint8_t tmp[64U] = { 0U };
 1163|      4|    Hacl_Chacha20_Vec256_chacha20_encrypt_256((uint32_t)64U, tmp, tmp, k, n, (uint32_t)0U);
 1164|      4|    uint8_t *key = tmp;
 1165|      4|    poly1305_do_256(key, aadlen, aad, mlen, cipher, mac);
 1166|      4|}
Hacl_Chacha20Poly1305_256_aead_decrypt:
 1199|  4.84k|{
 1200|  4.84k|    uint8_t computed_mac[16U] = { 0U };
 1201|  4.84k|    uint8_t tmp[64U] = { 0U };
 1202|  4.84k|    Hacl_Chacha20_Vec256_chacha20_encrypt_256((uint32_t)64U, tmp, tmp, k, n, (uint32_t)0U);
 1203|  4.84k|    uint8_t *key = tmp;
 1204|  4.84k|    poly1305_do_256(key, aadlen, aad, mlen, cipher, computed_mac);
 1205|  4.84k|    uint8_t res = (uint8_t)255U;
 1206|  4.84k|    KRML_MAYBE_FOR16(i,
  ------------------
  |  |  402|  4.84k|#define KRML_MAYBE_FOR16(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 16, k, x)
  |  |  ------------------
  |  |  |  |  288|  4.84k|    do {                               \
  |  |  |  |  289|  4.84k|        uint32_t i = z;                \
  |  |  |  |  290|  4.84k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  4.84k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1207|  4.84k|                     (uint32_t)0U,
 1208|  4.84k|                     (uint32_t)16U,
 1209|  4.84k|                     (uint32_t)1U,
 1210|  4.84k|                     uint8_t uu____0 = FStar_UInt8_eq_mask(computed_mac[i], mac[i]);
 1211|  4.84k|                     res = uu____0 & res;);
 1212|  4.84k|    uint8_t z = res;
 1213|  4.84k|    if (z == (uint8_t)255U) {
  ------------------
  |  Branch (1213:9): [True: 0, False: 4.84k]
  ------------------
 1214|      0|        Hacl_Chacha20_Vec256_chacha20_encrypt_256(mlen, m, cipher, k, n, (uint32_t)1U);
 1215|      0|        return (uint32_t)0U;
 1216|      0|    }
 1217|  4.84k|    return (uint32_t)1U;
 1218|  4.84k|}
Hacl_Chacha20Poly1305_256.c:poly1305_do_256:
  912|  4.84k|{
  913|  4.84k|    KRML_PRE_ALIGN(32)
  914|  4.84k|    Lib_IntVector_Intrinsics_vec256 ctx[25U] KRML_POST_ALIGN(32) = { 0U };
  915|  4.84k|    uint8_t block[16U] = { 0U };
  916|  4.84k|    Hacl_Poly1305_256_poly1305_init(ctx, k);
  917|  4.84k|    if (aadlen != (uint32_t)0U) {
  ------------------
  |  Branch (917:9): [True: 4.84k, False: 0]
  ------------------
  918|  4.84k|        poly1305_padded_256(ctx, aadlen, aad);
  919|  4.84k|    }
  920|  4.84k|    if (mlen != (uint32_t)0U) {
  ------------------
  |  Branch (920:9): [True: 914, False: 3.93k]
  ------------------
  921|    914|        poly1305_padded_256(ctx, mlen, m);
  922|    914|    }
  923|  4.84k|    store64_le(block, (uint64_t)aadlen);
  ------------------
  |  |  215|  4.84k|#define store64_le(b, i) (store64(b, htole64(i)))
  ------------------
  924|  4.84k|    store64_le(block + (uint32_t)8U, (uint64_t)mlen);
  ------------------
  |  |  215|  4.84k|#define store64_le(b, i) (store64(b, htole64(i)))
  ------------------
  925|  4.84k|    Lib_IntVector_Intrinsics_vec256 *pre = ctx + (uint32_t)5U;
  926|  4.84k|    Lib_IntVector_Intrinsics_vec256 *acc = ctx;
  927|  4.84k|    KRML_PRE_ALIGN(32)
  928|  4.84k|    Lib_IntVector_Intrinsics_vec256 e[5U] KRML_POST_ALIGN(32) = { 0U };
  929|  4.84k|    uint64_t u0 = load64_le(block);
  ------------------
  |  |  214|  4.84k|#define load64_le(b) (le64toh(load64(b)))
  ------------------
  930|  4.84k|    uint64_t lo = u0;
  931|  4.84k|    uint64_t u = load64_le(block + (uint32_t)8U);
  ------------------
  |  |  214|  4.84k|#define load64_le(b) (le64toh(load64(b)))
  ------------------
  932|  4.84k|    uint64_t hi = u;
  933|  4.84k|    Lib_IntVector_Intrinsics_vec256 f0 = Lib_IntVector_Intrinsics_vec256_load64(lo);
  ------------------
  |  |  389|  4.84k|    (_mm256_set1_epi64x(x1)) /* hi lo */
  ------------------
  934|  4.84k|    Lib_IntVector_Intrinsics_vec256 f1 = Lib_IntVector_Intrinsics_vec256_load64(hi);
  ------------------
  |  |  389|  4.84k|    (_mm256_set1_epi64x(x1)) /* hi lo */
  ------------------
  935|  4.84k|    Lib_IntVector_Intrinsics_vec256
  936|  4.84k|        f010 =
  937|  4.84k|            Lib_IntVector_Intrinsics_vec256_and(f0,
  ------------------
  |  |  242|  4.84k|    (_mm256_and_si256(x0, x1))
  ------------------
  938|  4.84k|                                                Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3ffffffU));
  939|  4.84k|    Lib_IntVector_Intrinsics_vec256
  940|  4.84k|        f110 =
  941|  4.84k|            Lib_IntVector_Intrinsics_vec256_and(Lib_IntVector_Intrinsics_vec256_shift_right64(f0,
  ------------------
  |  |  242|  4.84k|    (_mm256_and_si256(x0, x1))
  ------------------
  942|  4.84k|                                                                                              (uint32_t)26U),
  943|  4.84k|                                                Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3ffffffU));
  944|  4.84k|    Lib_IntVector_Intrinsics_vec256
  945|  4.84k|        f20 =
  946|  4.84k|            Lib_IntVector_Intrinsics_vec256_or(Lib_IntVector_Intrinsics_vec256_shift_right64(f0,
  ------------------
  |  |  239|  4.84k|    (_mm256_or_si256(x0, x1))
  ------------------
  947|  4.84k|                                                                                             (uint32_t)52U),
  948|  4.84k|                                               Lib_IntVector_Intrinsics_vec256_shift_left64(Lib_IntVector_Intrinsics_vec256_and(f1,
  949|  4.84k|                                                                                                                                Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3fffU)),
  950|  4.84k|                                                                                            (uint32_t)12U));
  951|  4.84k|    Lib_IntVector_Intrinsics_vec256
  952|  4.84k|        f30 =
  953|  4.84k|            Lib_IntVector_Intrinsics_vec256_and(Lib_IntVector_Intrinsics_vec256_shift_right64(f1,
  ------------------
  |  |  242|  4.84k|    (_mm256_and_si256(x0, x1))
  ------------------
  954|  4.84k|                                                                                              (uint32_t)14U),
  955|  4.84k|                                                Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3ffffffU));
  956|  4.84k|    Lib_IntVector_Intrinsics_vec256
  957|  4.84k|        f40 = Lib_IntVector_Intrinsics_vec256_shift_right64(f1, (uint32_t)40U);
  ------------------
  |  |  257|  4.84k|    (_mm256_srli_epi64(x0, x1))
  ------------------
  958|  4.84k|    Lib_IntVector_Intrinsics_vec256 f01 = f010;
  959|  4.84k|    Lib_IntVector_Intrinsics_vec256 f111 = f110;
  960|  4.84k|    Lib_IntVector_Intrinsics_vec256 f2 = f20;
  961|  4.84k|    Lib_IntVector_Intrinsics_vec256 f3 = f30;
  962|  4.84k|    Lib_IntVector_Intrinsics_vec256 f41 = f40;
  963|  4.84k|    e[0U] = f01;
  964|  4.84k|    e[1U] = f111;
  965|  4.84k|    e[2U] = f2;
  966|  4.84k|    e[3U] = f3;
  967|  4.84k|    e[4U] = f41;
  968|  4.84k|    uint64_t b = (uint64_t)0x1000000U;
  969|  4.84k|    Lib_IntVector_Intrinsics_vec256 mask = Lib_IntVector_Intrinsics_vec256_load64(b);
  ------------------
  |  |  389|  4.84k|    (_mm256_set1_epi64x(x1)) /* hi lo */
  ------------------
  970|  4.84k|    Lib_IntVector_Intrinsics_vec256 f4 = e[4U];
  971|  4.84k|    e[4U] = Lib_IntVector_Intrinsics_vec256_or(f4, mask);
  ------------------
  |  |  239|  4.84k|    (_mm256_or_si256(x0, x1))
  ------------------
  972|  4.84k|    Lib_IntVector_Intrinsics_vec256 *r = pre;
  973|  4.84k|    Lib_IntVector_Intrinsics_vec256 *r5 = pre + (uint32_t)5U;
  974|  4.84k|    Lib_IntVector_Intrinsics_vec256 r0 = r[0U];
  975|  4.84k|    Lib_IntVector_Intrinsics_vec256 r1 = r[1U];
  976|  4.84k|    Lib_IntVector_Intrinsics_vec256 r2 = r[2U];
  977|  4.84k|    Lib_IntVector_Intrinsics_vec256 r3 = r[3U];
  978|  4.84k|    Lib_IntVector_Intrinsics_vec256 r4 = r[4U];
  979|  4.84k|    Lib_IntVector_Intrinsics_vec256 r51 = r5[1U];
  980|  4.84k|    Lib_IntVector_Intrinsics_vec256 r52 = r5[2U];
  981|  4.84k|    Lib_IntVector_Intrinsics_vec256 r53 = r5[3U];
  982|  4.84k|    Lib_IntVector_Intrinsics_vec256 r54 = r5[4U];
  983|  4.84k|    Lib_IntVector_Intrinsics_vec256 f10 = e[0U];
  984|  4.84k|    Lib_IntVector_Intrinsics_vec256 f11 = e[1U];
  985|  4.84k|    Lib_IntVector_Intrinsics_vec256 f12 = e[2U];
  986|  4.84k|    Lib_IntVector_Intrinsics_vec256 f13 = e[3U];
  987|  4.84k|    Lib_IntVector_Intrinsics_vec256 f14 = e[4U];
  988|  4.84k|    Lib_IntVector_Intrinsics_vec256 a0 = acc[0U];
  989|  4.84k|    Lib_IntVector_Intrinsics_vec256 a1 = acc[1U];
  990|  4.84k|    Lib_IntVector_Intrinsics_vec256 a2 = acc[2U];
  991|  4.84k|    Lib_IntVector_Intrinsics_vec256 a3 = acc[3U];
  992|  4.84k|    Lib_IntVector_Intrinsics_vec256 a4 = acc[4U];
  993|  4.84k|    Lib_IntVector_Intrinsics_vec256 a01 = Lib_IntVector_Intrinsics_vec256_add64(a0, f10);
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  994|  4.84k|    Lib_IntVector_Intrinsics_vec256 a11 = Lib_IntVector_Intrinsics_vec256_add64(a1, f11);
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  995|  4.84k|    Lib_IntVector_Intrinsics_vec256 a21 = Lib_IntVector_Intrinsics_vec256_add64(a2, f12);
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  996|  4.84k|    Lib_IntVector_Intrinsics_vec256 a31 = Lib_IntVector_Intrinsics_vec256_add64(a3, f13);
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  997|  4.84k|    Lib_IntVector_Intrinsics_vec256 a41 = Lib_IntVector_Intrinsics_vec256_add64(a4, f14);
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  998|  4.84k|    Lib_IntVector_Intrinsics_vec256 a02 = Lib_IntVector_Intrinsics_vec256_mul64(r0, a01);
  ------------------
  |  |  371|  4.84k|    (_mm256_mul_epu32(x0, x1))
  ------------------
  999|  4.84k|    Lib_IntVector_Intrinsics_vec256 a12 = Lib_IntVector_Intrinsics_vec256_mul64(r1, a01);
  ------------------
  |  |  371|  4.84k|    (_mm256_mul_epu32(x0, x1))
  ------------------
 1000|  4.84k|    Lib_IntVector_Intrinsics_vec256 a22 = Lib_IntVector_Intrinsics_vec256_mul64(r2, a01);
  ------------------
  |  |  371|  4.84k|    (_mm256_mul_epu32(x0, x1))
  ------------------
 1001|  4.84k|    Lib_IntVector_Intrinsics_vec256 a32 = Lib_IntVector_Intrinsics_vec256_mul64(r3, a01);
  ------------------
  |  |  371|  4.84k|    (_mm256_mul_epu32(x0, x1))
  ------------------
 1002|  4.84k|    Lib_IntVector_Intrinsics_vec256 a42 = Lib_IntVector_Intrinsics_vec256_mul64(r4, a01);
  ------------------
  |  |  371|  4.84k|    (_mm256_mul_epu32(x0, x1))
  ------------------
 1003|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1004|  4.84k|        a03 =
 1005|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a02,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 1006|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r54, a11));
 1007|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1008|  4.84k|        a13 =
 1009|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a12,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 1010|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r0, a11));
 1011|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1012|  4.84k|        a23 =
 1013|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a22,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 1014|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r1, a11));
 1015|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1016|  4.84k|        a33 =
 1017|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a32,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 1018|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r2, a11));
 1019|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1020|  4.84k|        a43 =
 1021|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a42,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 1022|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r3, a11));
 1023|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1024|  4.84k|        a04 =
 1025|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a03,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 1026|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r53, a21));
 1027|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1028|  4.84k|        a14 =
 1029|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a13,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 1030|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r54, a21));
 1031|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1032|  4.84k|        a24 =
 1033|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a23,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 1034|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r0, a21));
 1035|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1036|  4.84k|        a34 =
 1037|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a33,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 1038|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r1, a21));
 1039|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1040|  4.84k|        a44 =
 1041|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a43,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 1042|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r2, a21));
 1043|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1044|  4.84k|        a05 =
 1045|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a04,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 1046|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r52, a31));
 1047|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1048|  4.84k|        a15 =
 1049|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a14,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 1050|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r53, a31));
 1051|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1052|  4.84k|        a25 =
 1053|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a24,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 1054|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r54, a31));
 1055|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1056|  4.84k|        a35 =
 1057|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a34,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 1058|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r0, a31));
 1059|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1060|  4.84k|        a45 =
 1061|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a44,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 1062|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r1, a31));
 1063|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1064|  4.84k|        a06 =
 1065|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a05,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 1066|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r51, a41));
 1067|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1068|  4.84k|        a16 =
 1069|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a15,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 1070|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r52, a41));
 1071|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1072|  4.84k|        a26 =
 1073|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a25,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 1074|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r53, a41));
 1075|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1076|  4.84k|        a36 =
 1077|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a35,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 1078|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r54, a41));
 1079|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1080|  4.84k|        a46 =
 1081|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a45,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 1082|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r0, a41));
 1083|  4.84k|    Lib_IntVector_Intrinsics_vec256 t0 = a06;
 1084|  4.84k|    Lib_IntVector_Intrinsics_vec256 t1 = a16;
 1085|  4.84k|    Lib_IntVector_Intrinsics_vec256 t2 = a26;
 1086|  4.84k|    Lib_IntVector_Intrinsics_vec256 t3 = a36;
 1087|  4.84k|    Lib_IntVector_Intrinsics_vec256 t4 = a46;
 1088|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1089|  4.84k|        mask26 = Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3ffffffU);
  ------------------
  |  |  389|  4.84k|    (_mm256_set1_epi64x(x1)) /* hi lo */
  ------------------
 1090|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1091|  4.84k|        z0 = Lib_IntVector_Intrinsics_vec256_shift_right64(t0, (uint32_t)26U);
  ------------------
  |  |  257|  4.84k|    (_mm256_srli_epi64(x0, x1))
  ------------------
 1092|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1093|  4.84k|        z1 = Lib_IntVector_Intrinsics_vec256_shift_right64(t3, (uint32_t)26U);
  ------------------
  |  |  257|  4.84k|    (_mm256_srli_epi64(x0, x1))
  ------------------
 1094|  4.84k|    Lib_IntVector_Intrinsics_vec256 x0 = Lib_IntVector_Intrinsics_vec256_and(t0, mask26);
  ------------------
  |  |  242|  4.84k|    (_mm256_and_si256(x0, x1))
  ------------------
 1095|  4.84k|    Lib_IntVector_Intrinsics_vec256 x3 = Lib_IntVector_Intrinsics_vec256_and(t3, mask26);
  ------------------
  |  |  242|  4.84k|    (_mm256_and_si256(x0, x1))
  ------------------
 1096|  4.84k|    Lib_IntVector_Intrinsics_vec256 x1 = Lib_IntVector_Intrinsics_vec256_add64(t1, z0);
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 1097|  4.84k|    Lib_IntVector_Intrinsics_vec256 x4 = Lib_IntVector_Intrinsics_vec256_add64(t4, z1);
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 1098|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1099|  4.84k|        z01 = Lib_IntVector_Intrinsics_vec256_shift_right64(x1, (uint32_t)26U);
  ------------------
  |  |  257|  4.84k|    (_mm256_srli_epi64(x0, x1))
  ------------------
 1100|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1101|  4.84k|        z11 = Lib_IntVector_Intrinsics_vec256_shift_right64(x4, (uint32_t)26U);
  ------------------
  |  |  257|  4.84k|    (_mm256_srli_epi64(x0, x1))
  ------------------
 1102|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1103|  4.84k|        t = Lib_IntVector_Intrinsics_vec256_shift_left64(z11, (uint32_t)2U);
  ------------------
  |  |  254|  4.84k|    (_mm256_slli_epi64(x0, x1))
  ------------------
 1104|  4.84k|    Lib_IntVector_Intrinsics_vec256 z12 = Lib_IntVector_Intrinsics_vec256_add64(z11, t);
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 1105|  4.84k|    Lib_IntVector_Intrinsics_vec256 x11 = Lib_IntVector_Intrinsics_vec256_and(x1, mask26);
  ------------------
  |  |  242|  4.84k|    (_mm256_and_si256(x0, x1))
  ------------------
 1106|  4.84k|    Lib_IntVector_Intrinsics_vec256 x41 = Lib_IntVector_Intrinsics_vec256_and(x4, mask26);
  ------------------
  |  |  242|  4.84k|    (_mm256_and_si256(x0, x1))
  ------------------
 1107|  4.84k|    Lib_IntVector_Intrinsics_vec256 x2 = Lib_IntVector_Intrinsics_vec256_add64(t2, z01);
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 1108|  4.84k|    Lib_IntVector_Intrinsics_vec256 x01 = Lib_IntVector_Intrinsics_vec256_add64(x0, z12);
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 1109|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1110|  4.84k|        z02 = Lib_IntVector_Intrinsics_vec256_shift_right64(x2, (uint32_t)26U);
  ------------------
  |  |  257|  4.84k|    (_mm256_srli_epi64(x0, x1))
  ------------------
 1111|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1112|  4.84k|        z13 = Lib_IntVector_Intrinsics_vec256_shift_right64(x01, (uint32_t)26U);
  ------------------
  |  |  257|  4.84k|    (_mm256_srli_epi64(x0, x1))
  ------------------
 1113|  4.84k|    Lib_IntVector_Intrinsics_vec256 x21 = Lib_IntVector_Intrinsics_vec256_and(x2, mask26);
  ------------------
  |  |  242|  4.84k|    (_mm256_and_si256(x0, x1))
  ------------------
 1114|  4.84k|    Lib_IntVector_Intrinsics_vec256 x02 = Lib_IntVector_Intrinsics_vec256_and(x01, mask26);
  ------------------
  |  |  242|  4.84k|    (_mm256_and_si256(x0, x1))
  ------------------
 1115|  4.84k|    Lib_IntVector_Intrinsics_vec256 x31 = Lib_IntVector_Intrinsics_vec256_add64(x3, z02);
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 1116|  4.84k|    Lib_IntVector_Intrinsics_vec256 x12 = Lib_IntVector_Intrinsics_vec256_add64(x11, z13);
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 1117|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1118|  4.84k|        z03 = Lib_IntVector_Intrinsics_vec256_shift_right64(x31, (uint32_t)26U);
  ------------------
  |  |  257|  4.84k|    (_mm256_srli_epi64(x0, x1))
  ------------------
 1119|  4.84k|    Lib_IntVector_Intrinsics_vec256 x32 = Lib_IntVector_Intrinsics_vec256_and(x31, mask26);
  ------------------
  |  |  242|  4.84k|    (_mm256_and_si256(x0, x1))
  ------------------
 1120|  4.84k|    Lib_IntVector_Intrinsics_vec256 x42 = Lib_IntVector_Intrinsics_vec256_add64(x41, z03);
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 1121|  4.84k|    Lib_IntVector_Intrinsics_vec256 o0 = x02;
 1122|  4.84k|    Lib_IntVector_Intrinsics_vec256 o1 = x12;
 1123|  4.84k|    Lib_IntVector_Intrinsics_vec256 o2 = x21;
 1124|  4.84k|    Lib_IntVector_Intrinsics_vec256 o3 = x32;
 1125|  4.84k|    Lib_IntVector_Intrinsics_vec256 o4 = x42;
 1126|  4.84k|    acc[0U] = o0;
 1127|  4.84k|    acc[1U] = o1;
 1128|  4.84k|    acc[2U] = o2;
 1129|  4.84k|    acc[3U] = o3;
 1130|  4.84k|    acc[4U] = o4;
 1131|  4.84k|    Hacl_Poly1305_256_poly1305_finish(out, k, ctx);
 1132|  4.84k|}
Hacl_Chacha20Poly1305_256.c:poly1305_padded_256:
   33|  5.76k|{
   34|  5.76k|    uint32_t n = len / (uint32_t)16U;
   35|  5.76k|    uint32_t r = len % (uint32_t)16U;
   36|  5.76k|    uint8_t *blocks = text;
   37|  5.76k|    uint8_t *rem = text + n * (uint32_t)16U;
   38|  5.76k|    Lib_IntVector_Intrinsics_vec256 *pre0 = ctx + (uint32_t)5U;
   39|  5.76k|    Lib_IntVector_Intrinsics_vec256 *acc0 = ctx;
   40|  5.76k|    uint32_t sz_block = (uint32_t)64U;
   41|  5.76k|    uint32_t len0 = n * (uint32_t)16U / sz_block * sz_block;
   42|  5.76k|    uint8_t *t00 = blocks;
   43|  5.76k|    if (len0 > (uint32_t)0U) {
  ------------------
  |  Branch (43:9): [True: 327, False: 5.43k]
  ------------------
   44|    327|        uint32_t bs = (uint32_t)64U;
   45|    327|        uint8_t *text0 = t00;
   46|    327|        Hacl_Impl_Poly1305_Field32xN_256_load_acc4(acc0, text0);
   47|    327|        uint32_t len1 = len0 - bs;
   48|    327|        uint8_t *text1 = t00 + bs;
   49|    327|        uint32_t nb = len1 / bs;
   50|  24.1k|        for (uint32_t i = (uint32_t)0U; i < nb; i++) {
  ------------------
  |  Branch (50:41): [True: 23.8k, False: 327]
  ------------------
   51|  23.8k|            uint8_t *block = text1 + i * bs;
   52|  23.8k|            KRML_PRE_ALIGN(32)
   53|  23.8k|            Lib_IntVector_Intrinsics_vec256 e[5U] KRML_POST_ALIGN(32) = { 0U };
   54|  23.8k|            Lib_IntVector_Intrinsics_vec256 lo = Lib_IntVector_Intrinsics_vec256_load64_le(block);
  ------------------
  |  |  323|  23.8k|    (_mm256_loadu_si256((__m256i*)(x0)))
  ------------------
   55|  23.8k|            Lib_IntVector_Intrinsics_vec256
   56|  23.8k|                hi = Lib_IntVector_Intrinsics_vec256_load64_le(block + (uint32_t)32U);
  ------------------
  |  |  323|  23.8k|    (_mm256_loadu_si256((__m256i*)(x0)))
  ------------------
   57|  23.8k|            Lib_IntVector_Intrinsics_vec256
   58|  23.8k|                mask260 = Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3ffffffU);
  ------------------
  |  |  389|  23.8k|    (_mm256_set1_epi64x(x1)) /* hi lo */
  ------------------
   59|  23.8k|            Lib_IntVector_Intrinsics_vec256
   60|  23.8k|                m0 = Lib_IntVector_Intrinsics_vec256_interleave_low128(lo, hi);
  ------------------
  |  |  419|  23.8k|    (_mm256_permute2x128_si256(x1, x2, 0x20))
  ------------------
   61|  23.8k|            Lib_IntVector_Intrinsics_vec256
   62|  23.8k|                m1 = Lib_IntVector_Intrinsics_vec256_interleave_high128(lo, hi);
  ------------------
  |  |  422|  23.8k|    (_mm256_permute2x128_si256(x1, x2, 0x31))
  ------------------
   63|  23.8k|            Lib_IntVector_Intrinsics_vec256
   64|  23.8k|                m2 = Lib_IntVector_Intrinsics_vec256_shift_right(m0, (uint32_t)48U);
  ------------------
  |  |  251|  23.8k|    (_mm256_srli_si256(x0, (x1) / 8))
  ------------------
   65|  23.8k|            Lib_IntVector_Intrinsics_vec256
   66|  23.8k|                m3 = Lib_IntVector_Intrinsics_vec256_shift_right(m1, (uint32_t)48U);
  ------------------
  |  |  251|  23.8k|    (_mm256_srli_si256(x0, (x1) / 8))
  ------------------
   67|  23.8k|            Lib_IntVector_Intrinsics_vec256
   68|  23.8k|                m4 = Lib_IntVector_Intrinsics_vec256_interleave_high64(m0, m1);
  ------------------
  |  |  416|  23.8k|    (_mm256_unpackhi_epi64(x1, x2))
  ------------------
   69|  23.8k|            Lib_IntVector_Intrinsics_vec256
   70|  23.8k|                t010 = Lib_IntVector_Intrinsics_vec256_interleave_low64(m0, m1);
  ------------------
  |  |  413|  23.8k|    (_mm256_unpacklo_epi64(x1, x2))
  ------------------
   71|  23.8k|            Lib_IntVector_Intrinsics_vec256
   72|  23.8k|                t30 = Lib_IntVector_Intrinsics_vec256_interleave_low64(m2, m3);
  ------------------
  |  |  413|  23.8k|    (_mm256_unpacklo_epi64(x1, x2))
  ------------------
   73|  23.8k|            Lib_IntVector_Intrinsics_vec256
   74|  23.8k|                t20 = Lib_IntVector_Intrinsics_vec256_shift_right64(t30, (uint32_t)4U);
  ------------------
  |  |  257|  23.8k|    (_mm256_srli_epi64(x0, x1))
  ------------------
   75|  23.8k|            Lib_IntVector_Intrinsics_vec256 o20 = Lib_IntVector_Intrinsics_vec256_and(t20, mask260);
  ------------------
  |  |  242|  23.8k|    (_mm256_and_si256(x0, x1))
  ------------------
   76|  23.8k|            Lib_IntVector_Intrinsics_vec256
   77|  23.8k|                t10 = Lib_IntVector_Intrinsics_vec256_shift_right64(t010, (uint32_t)26U);
  ------------------
  |  |  257|  23.8k|    (_mm256_srli_epi64(x0, x1))
  ------------------
   78|  23.8k|            Lib_IntVector_Intrinsics_vec256 o10 = Lib_IntVector_Intrinsics_vec256_and(t10, mask260);
  ------------------
  |  |  242|  23.8k|    (_mm256_and_si256(x0, x1))
  ------------------
   79|  23.8k|            Lib_IntVector_Intrinsics_vec256 o5 = Lib_IntVector_Intrinsics_vec256_and(t010, mask260);
  ------------------
  |  |  242|  23.8k|    (_mm256_and_si256(x0, x1))
  ------------------
   80|  23.8k|            Lib_IntVector_Intrinsics_vec256
   81|  23.8k|                t31 = Lib_IntVector_Intrinsics_vec256_shift_right64(t30, (uint32_t)30U);
  ------------------
  |  |  257|  23.8k|    (_mm256_srli_epi64(x0, x1))
  ------------------
   82|  23.8k|            Lib_IntVector_Intrinsics_vec256 o30 = Lib_IntVector_Intrinsics_vec256_and(t31, mask260);
  ------------------
  |  |  242|  23.8k|    (_mm256_and_si256(x0, x1))
  ------------------
   83|  23.8k|            Lib_IntVector_Intrinsics_vec256
   84|  23.8k|                o40 = Lib_IntVector_Intrinsics_vec256_shift_right64(m4, (uint32_t)40U);
  ------------------
  |  |  257|  23.8k|    (_mm256_srli_epi64(x0, x1))
  ------------------
   85|  23.8k|            Lib_IntVector_Intrinsics_vec256 o00 = o5;
   86|  23.8k|            Lib_IntVector_Intrinsics_vec256 o11 = o10;
   87|  23.8k|            Lib_IntVector_Intrinsics_vec256 o21 = o20;
   88|  23.8k|            Lib_IntVector_Intrinsics_vec256 o31 = o30;
   89|  23.8k|            Lib_IntVector_Intrinsics_vec256 o41 = o40;
   90|  23.8k|            e[0U] = o00;
   91|  23.8k|            e[1U] = o11;
   92|  23.8k|            e[2U] = o21;
   93|  23.8k|            e[3U] = o31;
   94|  23.8k|            e[4U] = o41;
   95|  23.8k|            uint64_t b = (uint64_t)0x1000000U;
   96|  23.8k|            Lib_IntVector_Intrinsics_vec256 mask = Lib_IntVector_Intrinsics_vec256_load64(b);
  ------------------
  |  |  389|  23.8k|    (_mm256_set1_epi64x(x1)) /* hi lo */
  ------------------
   97|  23.8k|            Lib_IntVector_Intrinsics_vec256 f4 = e[4U];
   98|  23.8k|            e[4U] = Lib_IntVector_Intrinsics_vec256_or(f4, mask);
  ------------------
  |  |  239|  23.8k|    (_mm256_or_si256(x0, x1))
  ------------------
   99|  23.8k|            Lib_IntVector_Intrinsics_vec256 *rn = pre0 + (uint32_t)10U;
  100|  23.8k|            Lib_IntVector_Intrinsics_vec256 *rn5 = pre0 + (uint32_t)15U;
  101|  23.8k|            Lib_IntVector_Intrinsics_vec256 r0 = rn[0U];
  102|  23.8k|            Lib_IntVector_Intrinsics_vec256 r1 = rn[1U];
  103|  23.8k|            Lib_IntVector_Intrinsics_vec256 r2 = rn[2U];
  104|  23.8k|            Lib_IntVector_Intrinsics_vec256 r3 = rn[3U];
  105|  23.8k|            Lib_IntVector_Intrinsics_vec256 r4 = rn[4U];
  106|  23.8k|            Lib_IntVector_Intrinsics_vec256 r51 = rn5[1U];
  107|  23.8k|            Lib_IntVector_Intrinsics_vec256 r52 = rn5[2U];
  108|  23.8k|            Lib_IntVector_Intrinsics_vec256 r53 = rn5[3U];
  109|  23.8k|            Lib_IntVector_Intrinsics_vec256 r54 = rn5[4U];
  110|  23.8k|            Lib_IntVector_Intrinsics_vec256 f10 = acc0[0U];
  111|  23.8k|            Lib_IntVector_Intrinsics_vec256 f110 = acc0[1U];
  112|  23.8k|            Lib_IntVector_Intrinsics_vec256 f120 = acc0[2U];
  113|  23.8k|            Lib_IntVector_Intrinsics_vec256 f130 = acc0[3U];
  114|  23.8k|            Lib_IntVector_Intrinsics_vec256 f140 = acc0[4U];
  115|  23.8k|            Lib_IntVector_Intrinsics_vec256 a0 = Lib_IntVector_Intrinsics_vec256_mul64(r0, f10);
  ------------------
  |  |  371|  23.8k|    (_mm256_mul_epu32(x0, x1))
  ------------------
  116|  23.8k|            Lib_IntVector_Intrinsics_vec256 a1 = Lib_IntVector_Intrinsics_vec256_mul64(r1, f10);
  ------------------
  |  |  371|  23.8k|    (_mm256_mul_epu32(x0, x1))
  ------------------
  117|  23.8k|            Lib_IntVector_Intrinsics_vec256 a2 = Lib_IntVector_Intrinsics_vec256_mul64(r2, f10);
  ------------------
  |  |  371|  23.8k|    (_mm256_mul_epu32(x0, x1))
  ------------------
  118|  23.8k|            Lib_IntVector_Intrinsics_vec256 a3 = Lib_IntVector_Intrinsics_vec256_mul64(r3, f10);
  ------------------
  |  |  371|  23.8k|    (_mm256_mul_epu32(x0, x1))
  ------------------
  119|  23.8k|            Lib_IntVector_Intrinsics_vec256 a4 = Lib_IntVector_Intrinsics_vec256_mul64(r4, f10);
  ------------------
  |  |  371|  23.8k|    (_mm256_mul_epu32(x0, x1))
  ------------------
  120|  23.8k|            Lib_IntVector_Intrinsics_vec256
  121|  23.8k|                a01 =
  122|  23.8k|                    Lib_IntVector_Intrinsics_vec256_add64(a0,
  ------------------
  |  |  365|  23.8k|    (_mm256_add_epi64(x0, x1))
  ------------------
  123|  23.8k|                                                          Lib_IntVector_Intrinsics_vec256_mul64(r54, f110));
  124|  23.8k|            Lib_IntVector_Intrinsics_vec256
  125|  23.8k|                a11 =
  126|  23.8k|                    Lib_IntVector_Intrinsics_vec256_add64(a1,
  ------------------
  |  |  365|  23.8k|    (_mm256_add_epi64(x0, x1))
  ------------------
  127|  23.8k|                                                          Lib_IntVector_Intrinsics_vec256_mul64(r0, f110));
  128|  23.8k|            Lib_IntVector_Intrinsics_vec256
  129|  23.8k|                a21 =
  130|  23.8k|                    Lib_IntVector_Intrinsics_vec256_add64(a2,
  ------------------
  |  |  365|  23.8k|    (_mm256_add_epi64(x0, x1))
  ------------------
  131|  23.8k|                                                          Lib_IntVector_Intrinsics_vec256_mul64(r1, f110));
  132|  23.8k|            Lib_IntVector_Intrinsics_vec256
  133|  23.8k|                a31 =
  134|  23.8k|                    Lib_IntVector_Intrinsics_vec256_add64(a3,
  ------------------
  |  |  365|  23.8k|    (_mm256_add_epi64(x0, x1))
  ------------------
  135|  23.8k|                                                          Lib_IntVector_Intrinsics_vec256_mul64(r2, f110));
  136|  23.8k|            Lib_IntVector_Intrinsics_vec256
  137|  23.8k|                a41 =
  138|  23.8k|                    Lib_IntVector_Intrinsics_vec256_add64(a4,
  ------------------
  |  |  365|  23.8k|    (_mm256_add_epi64(x0, x1))
  ------------------
  139|  23.8k|                                                          Lib_IntVector_Intrinsics_vec256_mul64(r3, f110));
  140|  23.8k|            Lib_IntVector_Intrinsics_vec256
  141|  23.8k|                a02 =
  142|  23.8k|                    Lib_IntVector_Intrinsics_vec256_add64(a01,
  ------------------
  |  |  365|  23.8k|    (_mm256_add_epi64(x0, x1))
  ------------------
  143|  23.8k|                                                          Lib_IntVector_Intrinsics_vec256_mul64(r53, f120));
  144|  23.8k|            Lib_IntVector_Intrinsics_vec256
  145|  23.8k|                a12 =
  146|  23.8k|                    Lib_IntVector_Intrinsics_vec256_add64(a11,
  ------------------
  |  |  365|  23.8k|    (_mm256_add_epi64(x0, x1))
  ------------------
  147|  23.8k|                                                          Lib_IntVector_Intrinsics_vec256_mul64(r54, f120));
  148|  23.8k|            Lib_IntVector_Intrinsics_vec256
  149|  23.8k|                a22 =
  150|  23.8k|                    Lib_IntVector_Intrinsics_vec256_add64(a21,
  ------------------
  |  |  365|  23.8k|    (_mm256_add_epi64(x0, x1))
  ------------------
  151|  23.8k|                                                          Lib_IntVector_Intrinsics_vec256_mul64(r0, f120));
  152|  23.8k|            Lib_IntVector_Intrinsics_vec256
  153|  23.8k|                a32 =
  154|  23.8k|                    Lib_IntVector_Intrinsics_vec256_add64(a31,
  ------------------
  |  |  365|  23.8k|    (_mm256_add_epi64(x0, x1))
  ------------------
  155|  23.8k|                                                          Lib_IntVector_Intrinsics_vec256_mul64(r1, f120));
  156|  23.8k|            Lib_IntVector_Intrinsics_vec256
  157|  23.8k|                a42 =
  158|  23.8k|                    Lib_IntVector_Intrinsics_vec256_add64(a41,
  ------------------
  |  |  365|  23.8k|    (_mm256_add_epi64(x0, x1))
  ------------------
  159|  23.8k|                                                          Lib_IntVector_Intrinsics_vec256_mul64(r2, f120));
  160|  23.8k|            Lib_IntVector_Intrinsics_vec256
  161|  23.8k|                a03 =
  162|  23.8k|                    Lib_IntVector_Intrinsics_vec256_add64(a02,
  ------------------
  |  |  365|  23.8k|    (_mm256_add_epi64(x0, x1))
  ------------------
  163|  23.8k|                                                          Lib_IntVector_Intrinsics_vec256_mul64(r52, f130));
  164|  23.8k|            Lib_IntVector_Intrinsics_vec256
  165|  23.8k|                a13 =
  166|  23.8k|                    Lib_IntVector_Intrinsics_vec256_add64(a12,
  ------------------
  |  |  365|  23.8k|    (_mm256_add_epi64(x0, x1))
  ------------------
  167|  23.8k|                                                          Lib_IntVector_Intrinsics_vec256_mul64(r53, f130));
  168|  23.8k|            Lib_IntVector_Intrinsics_vec256
  169|  23.8k|                a23 =
  170|  23.8k|                    Lib_IntVector_Intrinsics_vec256_add64(a22,
  ------------------
  |  |  365|  23.8k|    (_mm256_add_epi64(x0, x1))
  ------------------
  171|  23.8k|                                                          Lib_IntVector_Intrinsics_vec256_mul64(r54, f130));
  172|  23.8k|            Lib_IntVector_Intrinsics_vec256
  173|  23.8k|                a33 =
  174|  23.8k|                    Lib_IntVector_Intrinsics_vec256_add64(a32,
  ------------------
  |  |  365|  23.8k|    (_mm256_add_epi64(x0, x1))
  ------------------
  175|  23.8k|                                                          Lib_IntVector_Intrinsics_vec256_mul64(r0, f130));
  176|  23.8k|            Lib_IntVector_Intrinsics_vec256
  177|  23.8k|                a43 =
  178|  23.8k|                    Lib_IntVector_Intrinsics_vec256_add64(a42,
  ------------------
  |  |  365|  23.8k|    (_mm256_add_epi64(x0, x1))
  ------------------
  179|  23.8k|                                                          Lib_IntVector_Intrinsics_vec256_mul64(r1, f130));
  180|  23.8k|            Lib_IntVector_Intrinsics_vec256
  181|  23.8k|                a04 =
  182|  23.8k|                    Lib_IntVector_Intrinsics_vec256_add64(a03,
  ------------------
  |  |  365|  23.8k|    (_mm256_add_epi64(x0, x1))
  ------------------
  183|  23.8k|                                                          Lib_IntVector_Intrinsics_vec256_mul64(r51, f140));
  184|  23.8k|            Lib_IntVector_Intrinsics_vec256
  185|  23.8k|                a14 =
  186|  23.8k|                    Lib_IntVector_Intrinsics_vec256_add64(a13,
  ------------------
  |  |  365|  23.8k|    (_mm256_add_epi64(x0, x1))
  ------------------
  187|  23.8k|                                                          Lib_IntVector_Intrinsics_vec256_mul64(r52, f140));
  188|  23.8k|            Lib_IntVector_Intrinsics_vec256
  189|  23.8k|                a24 =
  190|  23.8k|                    Lib_IntVector_Intrinsics_vec256_add64(a23,
  ------------------
  |  |  365|  23.8k|    (_mm256_add_epi64(x0, x1))
  ------------------
  191|  23.8k|                                                          Lib_IntVector_Intrinsics_vec256_mul64(r53, f140));
  192|  23.8k|            Lib_IntVector_Intrinsics_vec256
  193|  23.8k|                a34 =
  194|  23.8k|                    Lib_IntVector_Intrinsics_vec256_add64(a33,
  ------------------
  |  |  365|  23.8k|    (_mm256_add_epi64(x0, x1))
  ------------------
  195|  23.8k|                                                          Lib_IntVector_Intrinsics_vec256_mul64(r54, f140));
  196|  23.8k|            Lib_IntVector_Intrinsics_vec256
  197|  23.8k|                a44 =
  198|  23.8k|                    Lib_IntVector_Intrinsics_vec256_add64(a43,
  ------------------
  |  |  365|  23.8k|    (_mm256_add_epi64(x0, x1))
  ------------------
  199|  23.8k|                                                          Lib_IntVector_Intrinsics_vec256_mul64(r0, f140));
  200|  23.8k|            Lib_IntVector_Intrinsics_vec256 t01 = a04;
  201|  23.8k|            Lib_IntVector_Intrinsics_vec256 t1 = a14;
  202|  23.8k|            Lib_IntVector_Intrinsics_vec256 t2 = a24;
  203|  23.8k|            Lib_IntVector_Intrinsics_vec256 t3 = a34;
  204|  23.8k|            Lib_IntVector_Intrinsics_vec256 t4 = a44;
  205|  23.8k|            Lib_IntVector_Intrinsics_vec256
  206|  23.8k|                mask26 = Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3ffffffU);
  ------------------
  |  |  389|  23.8k|    (_mm256_set1_epi64x(x1)) /* hi lo */
  ------------------
  207|  23.8k|            Lib_IntVector_Intrinsics_vec256
  208|  23.8k|                z0 = Lib_IntVector_Intrinsics_vec256_shift_right64(t01, (uint32_t)26U);
  ------------------
  |  |  257|  23.8k|    (_mm256_srli_epi64(x0, x1))
  ------------------
  209|  23.8k|            Lib_IntVector_Intrinsics_vec256
  210|  23.8k|                z1 = Lib_IntVector_Intrinsics_vec256_shift_right64(t3, (uint32_t)26U);
  ------------------
  |  |  257|  23.8k|    (_mm256_srli_epi64(x0, x1))
  ------------------
  211|  23.8k|            Lib_IntVector_Intrinsics_vec256 x0 = Lib_IntVector_Intrinsics_vec256_and(t01, mask26);
  ------------------
  |  |  242|  23.8k|    (_mm256_and_si256(x0, x1))
  ------------------
  212|  23.8k|            Lib_IntVector_Intrinsics_vec256 x3 = Lib_IntVector_Intrinsics_vec256_and(t3, mask26);
  ------------------
  |  |  242|  23.8k|    (_mm256_and_si256(x0, x1))
  ------------------
  213|  23.8k|            Lib_IntVector_Intrinsics_vec256 x1 = Lib_IntVector_Intrinsics_vec256_add64(t1, z0);
  ------------------
  |  |  365|  23.8k|    (_mm256_add_epi64(x0, x1))
  ------------------
  214|  23.8k|            Lib_IntVector_Intrinsics_vec256 x4 = Lib_IntVector_Intrinsics_vec256_add64(t4, z1);
  ------------------
  |  |  365|  23.8k|    (_mm256_add_epi64(x0, x1))
  ------------------
  215|  23.8k|            Lib_IntVector_Intrinsics_vec256
  216|  23.8k|                z01 = Lib_IntVector_Intrinsics_vec256_shift_right64(x1, (uint32_t)26U);
  ------------------
  |  |  257|  23.8k|    (_mm256_srli_epi64(x0, x1))
  ------------------
  217|  23.8k|            Lib_IntVector_Intrinsics_vec256
  218|  23.8k|                z11 = Lib_IntVector_Intrinsics_vec256_shift_right64(x4, (uint32_t)26U);
  ------------------
  |  |  257|  23.8k|    (_mm256_srli_epi64(x0, x1))
  ------------------
  219|  23.8k|            Lib_IntVector_Intrinsics_vec256
  220|  23.8k|                t = Lib_IntVector_Intrinsics_vec256_shift_left64(z11, (uint32_t)2U);
  ------------------
  |  |  254|  23.8k|    (_mm256_slli_epi64(x0, x1))
  ------------------
  221|  23.8k|            Lib_IntVector_Intrinsics_vec256 z12 = Lib_IntVector_Intrinsics_vec256_add64(z11, t);
  ------------------
  |  |  365|  23.8k|    (_mm256_add_epi64(x0, x1))
  ------------------
  222|  23.8k|            Lib_IntVector_Intrinsics_vec256 x11 = Lib_IntVector_Intrinsics_vec256_and(x1, mask26);
  ------------------
  |  |  242|  23.8k|    (_mm256_and_si256(x0, x1))
  ------------------
  223|  23.8k|            Lib_IntVector_Intrinsics_vec256 x41 = Lib_IntVector_Intrinsics_vec256_and(x4, mask26);
  ------------------
  |  |  242|  23.8k|    (_mm256_and_si256(x0, x1))
  ------------------
  224|  23.8k|            Lib_IntVector_Intrinsics_vec256 x2 = Lib_IntVector_Intrinsics_vec256_add64(t2, z01);
  ------------------
  |  |  365|  23.8k|    (_mm256_add_epi64(x0, x1))
  ------------------
  225|  23.8k|            Lib_IntVector_Intrinsics_vec256 x01 = Lib_IntVector_Intrinsics_vec256_add64(x0, z12);
  ------------------
  |  |  365|  23.8k|    (_mm256_add_epi64(x0, x1))
  ------------------
  226|  23.8k|            Lib_IntVector_Intrinsics_vec256
  227|  23.8k|                z02 = Lib_IntVector_Intrinsics_vec256_shift_right64(x2, (uint32_t)26U);
  ------------------
  |  |  257|  23.8k|    (_mm256_srli_epi64(x0, x1))
  ------------------
  228|  23.8k|            Lib_IntVector_Intrinsics_vec256
  229|  23.8k|                z13 = Lib_IntVector_Intrinsics_vec256_shift_right64(x01, (uint32_t)26U);
  ------------------
  |  |  257|  23.8k|    (_mm256_srli_epi64(x0, x1))
  ------------------
  230|  23.8k|            Lib_IntVector_Intrinsics_vec256 x21 = Lib_IntVector_Intrinsics_vec256_and(x2, mask26);
  ------------------
  |  |  242|  23.8k|    (_mm256_and_si256(x0, x1))
  ------------------
  231|  23.8k|            Lib_IntVector_Intrinsics_vec256 x02 = Lib_IntVector_Intrinsics_vec256_and(x01, mask26);
  ------------------
  |  |  242|  23.8k|    (_mm256_and_si256(x0, x1))
  ------------------
  232|  23.8k|            Lib_IntVector_Intrinsics_vec256 x31 = Lib_IntVector_Intrinsics_vec256_add64(x3, z02);
  ------------------
  |  |  365|  23.8k|    (_mm256_add_epi64(x0, x1))
  ------------------
  233|  23.8k|            Lib_IntVector_Intrinsics_vec256 x12 = Lib_IntVector_Intrinsics_vec256_add64(x11, z13);
  ------------------
  |  |  365|  23.8k|    (_mm256_add_epi64(x0, x1))
  ------------------
  234|  23.8k|            Lib_IntVector_Intrinsics_vec256
  235|  23.8k|                z03 = Lib_IntVector_Intrinsics_vec256_shift_right64(x31, (uint32_t)26U);
  ------------------
  |  |  257|  23.8k|    (_mm256_srli_epi64(x0, x1))
  ------------------
  236|  23.8k|            Lib_IntVector_Intrinsics_vec256 x32 = Lib_IntVector_Intrinsics_vec256_and(x31, mask26);
  ------------------
  |  |  242|  23.8k|    (_mm256_and_si256(x0, x1))
  ------------------
  237|  23.8k|            Lib_IntVector_Intrinsics_vec256 x42 = Lib_IntVector_Intrinsics_vec256_add64(x41, z03);
  ------------------
  |  |  365|  23.8k|    (_mm256_add_epi64(x0, x1))
  ------------------
  238|  23.8k|            Lib_IntVector_Intrinsics_vec256 o01 = x02;
  239|  23.8k|            Lib_IntVector_Intrinsics_vec256 o12 = x12;
  240|  23.8k|            Lib_IntVector_Intrinsics_vec256 o22 = x21;
  241|  23.8k|            Lib_IntVector_Intrinsics_vec256 o32 = x32;
  242|  23.8k|            Lib_IntVector_Intrinsics_vec256 o42 = x42;
  243|  23.8k|            acc0[0U] = o01;
  244|  23.8k|            acc0[1U] = o12;
  245|  23.8k|            acc0[2U] = o22;
  246|  23.8k|            acc0[3U] = o32;
  247|  23.8k|            acc0[4U] = o42;
  248|  23.8k|            Lib_IntVector_Intrinsics_vec256 f100 = acc0[0U];
  249|  23.8k|            Lib_IntVector_Intrinsics_vec256 f11 = acc0[1U];
  250|  23.8k|            Lib_IntVector_Intrinsics_vec256 f12 = acc0[2U];
  251|  23.8k|            Lib_IntVector_Intrinsics_vec256 f13 = acc0[3U];
  252|  23.8k|            Lib_IntVector_Intrinsics_vec256 f14 = acc0[4U];
  253|  23.8k|            Lib_IntVector_Intrinsics_vec256 f20 = e[0U];
  254|  23.8k|            Lib_IntVector_Intrinsics_vec256 f21 = e[1U];
  255|  23.8k|            Lib_IntVector_Intrinsics_vec256 f22 = e[2U];
  256|  23.8k|            Lib_IntVector_Intrinsics_vec256 f23 = e[3U];
  257|  23.8k|            Lib_IntVector_Intrinsics_vec256 f24 = e[4U];
  258|  23.8k|            Lib_IntVector_Intrinsics_vec256 o0 = Lib_IntVector_Intrinsics_vec256_add64(f100, f20);
  ------------------
  |  |  365|  23.8k|    (_mm256_add_epi64(x0, x1))
  ------------------
  259|  23.8k|            Lib_IntVector_Intrinsics_vec256 o1 = Lib_IntVector_Intrinsics_vec256_add64(f11, f21);
  ------------------
  |  |  365|  23.8k|    (_mm256_add_epi64(x0, x1))
  ------------------
  260|  23.8k|            Lib_IntVector_Intrinsics_vec256 o2 = Lib_IntVector_Intrinsics_vec256_add64(f12, f22);
  ------------------
  |  |  365|  23.8k|    (_mm256_add_epi64(x0, x1))
  ------------------
  261|  23.8k|            Lib_IntVector_Intrinsics_vec256 o3 = Lib_IntVector_Intrinsics_vec256_add64(f13, f23);
  ------------------
  |  |  365|  23.8k|    (_mm256_add_epi64(x0, x1))
  ------------------
  262|  23.8k|            Lib_IntVector_Intrinsics_vec256 o4 = Lib_IntVector_Intrinsics_vec256_add64(f14, f24);
  ------------------
  |  |  365|  23.8k|    (_mm256_add_epi64(x0, x1))
  ------------------
  263|  23.8k|            acc0[0U] = o0;
  264|  23.8k|            acc0[1U] = o1;
  265|  23.8k|            acc0[2U] = o2;
  266|  23.8k|            acc0[3U] = o3;
  267|  23.8k|            acc0[4U] = o4;
  268|  23.8k|        }
  269|    327|        Hacl_Impl_Poly1305_Field32xN_256_fmul_r4_normalize(acc0, pre0);
  270|    327|    }
  271|  5.76k|    uint32_t len1 = n * (uint32_t)16U - len0;
  272|  5.76k|    uint8_t *t10 = blocks + len0;
  273|  5.76k|    uint32_t nb = len1 / (uint32_t)16U;
  274|  5.76k|    uint32_t rem1 = len1 % (uint32_t)16U;
  275|  6.87k|    for (uint32_t i = (uint32_t)0U; i < nb; i++) {
  ------------------
  |  Branch (275:37): [True: 1.11k, False: 5.76k]
  ------------------
  276|  1.11k|        uint8_t *block = t10 + i * (uint32_t)16U;
  277|  1.11k|        KRML_PRE_ALIGN(32)
  278|  1.11k|        Lib_IntVector_Intrinsics_vec256 e[5U] KRML_POST_ALIGN(32) = { 0U };
  279|  1.11k|        uint64_t u0 = load64_le(block);
  ------------------
  |  |  214|  1.11k|#define load64_le(b) (le64toh(load64(b)))
  ------------------
  280|  1.11k|        uint64_t lo = u0;
  281|  1.11k|        uint64_t u = load64_le(block + (uint32_t)8U);
  ------------------
  |  |  214|  1.11k|#define load64_le(b) (le64toh(load64(b)))
  ------------------
  282|  1.11k|        uint64_t hi = u;
  283|  1.11k|        Lib_IntVector_Intrinsics_vec256 f0 = Lib_IntVector_Intrinsics_vec256_load64(lo);
  ------------------
  |  |  389|  1.11k|    (_mm256_set1_epi64x(x1)) /* hi lo */
  ------------------
  284|  1.11k|        Lib_IntVector_Intrinsics_vec256 f1 = Lib_IntVector_Intrinsics_vec256_load64(hi);
  ------------------
  |  |  389|  1.11k|    (_mm256_set1_epi64x(x1)) /* hi lo */
  ------------------
  285|  1.11k|        Lib_IntVector_Intrinsics_vec256
  286|  1.11k|            f010 =
  287|  1.11k|                Lib_IntVector_Intrinsics_vec256_and(f0,
  ------------------
  |  |  242|  1.11k|    (_mm256_and_si256(x0, x1))
  ------------------
  288|  1.11k|                                                    Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3ffffffU));
  289|  1.11k|        Lib_IntVector_Intrinsics_vec256
  290|  1.11k|            f110 =
  291|  1.11k|                Lib_IntVector_Intrinsics_vec256_and(Lib_IntVector_Intrinsics_vec256_shift_right64(f0,
  ------------------
  |  |  242|  1.11k|    (_mm256_and_si256(x0, x1))
  ------------------
  292|  1.11k|                                                                                                  (uint32_t)26U),
  293|  1.11k|                                                    Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3ffffffU));
  294|  1.11k|        Lib_IntVector_Intrinsics_vec256
  295|  1.11k|            f20 =
  296|  1.11k|                Lib_IntVector_Intrinsics_vec256_or(Lib_IntVector_Intrinsics_vec256_shift_right64(f0,
  ------------------
  |  |  239|  1.11k|    (_mm256_or_si256(x0, x1))
  ------------------
  297|  1.11k|                                                                                                 (uint32_t)52U),
  298|  1.11k|                                                   Lib_IntVector_Intrinsics_vec256_shift_left64(Lib_IntVector_Intrinsics_vec256_and(f1,
  299|  1.11k|                                                                                                                                    Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3fffU)),
  300|  1.11k|                                                                                                (uint32_t)12U));
  301|  1.11k|        Lib_IntVector_Intrinsics_vec256
  302|  1.11k|            f30 =
  303|  1.11k|                Lib_IntVector_Intrinsics_vec256_and(Lib_IntVector_Intrinsics_vec256_shift_right64(f1,
  ------------------
  |  |  242|  1.11k|    (_mm256_and_si256(x0, x1))
  ------------------
  304|  1.11k|                                                                                                  (uint32_t)14U),
  305|  1.11k|                                                    Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3ffffffU));
  306|  1.11k|        Lib_IntVector_Intrinsics_vec256
  307|  1.11k|            f40 = Lib_IntVector_Intrinsics_vec256_shift_right64(f1, (uint32_t)40U);
  ------------------
  |  |  257|  1.11k|    (_mm256_srli_epi64(x0, x1))
  ------------------
  308|  1.11k|        Lib_IntVector_Intrinsics_vec256 f01 = f010;
  309|  1.11k|        Lib_IntVector_Intrinsics_vec256 f111 = f110;
  310|  1.11k|        Lib_IntVector_Intrinsics_vec256 f2 = f20;
  311|  1.11k|        Lib_IntVector_Intrinsics_vec256 f3 = f30;
  312|  1.11k|        Lib_IntVector_Intrinsics_vec256 f41 = f40;
  313|  1.11k|        e[0U] = f01;
  314|  1.11k|        e[1U] = f111;
  315|  1.11k|        e[2U] = f2;
  316|  1.11k|        e[3U] = f3;
  317|  1.11k|        e[4U] = f41;
  318|  1.11k|        uint64_t b = (uint64_t)0x1000000U;
  319|  1.11k|        Lib_IntVector_Intrinsics_vec256 mask = Lib_IntVector_Intrinsics_vec256_load64(b);
  ------------------
  |  |  389|  1.11k|    (_mm256_set1_epi64x(x1)) /* hi lo */
  ------------------
  320|  1.11k|        Lib_IntVector_Intrinsics_vec256 f4 = e[4U];
  321|  1.11k|        e[4U] = Lib_IntVector_Intrinsics_vec256_or(f4, mask);
  ------------------
  |  |  239|  1.11k|    (_mm256_or_si256(x0, x1))
  ------------------
  322|  1.11k|        Lib_IntVector_Intrinsics_vec256 *r1 = pre0;
  323|  1.11k|        Lib_IntVector_Intrinsics_vec256 *r5 = pre0 + (uint32_t)5U;
  324|  1.11k|        Lib_IntVector_Intrinsics_vec256 r0 = r1[0U];
  325|  1.11k|        Lib_IntVector_Intrinsics_vec256 r11 = r1[1U];
  326|  1.11k|        Lib_IntVector_Intrinsics_vec256 r2 = r1[2U];
  327|  1.11k|        Lib_IntVector_Intrinsics_vec256 r3 = r1[3U];
  328|  1.11k|        Lib_IntVector_Intrinsics_vec256 r4 = r1[4U];
  329|  1.11k|        Lib_IntVector_Intrinsics_vec256 r51 = r5[1U];
  330|  1.11k|        Lib_IntVector_Intrinsics_vec256 r52 = r5[2U];
  331|  1.11k|        Lib_IntVector_Intrinsics_vec256 r53 = r5[3U];
  332|  1.11k|        Lib_IntVector_Intrinsics_vec256 r54 = r5[4U];
  333|  1.11k|        Lib_IntVector_Intrinsics_vec256 f10 = e[0U];
  334|  1.11k|        Lib_IntVector_Intrinsics_vec256 f11 = e[1U];
  335|  1.11k|        Lib_IntVector_Intrinsics_vec256 f12 = e[2U];
  336|  1.11k|        Lib_IntVector_Intrinsics_vec256 f13 = e[3U];
  337|  1.11k|        Lib_IntVector_Intrinsics_vec256 f14 = e[4U];
  338|  1.11k|        Lib_IntVector_Intrinsics_vec256 a0 = acc0[0U];
  339|  1.11k|        Lib_IntVector_Intrinsics_vec256 a1 = acc0[1U];
  340|  1.11k|        Lib_IntVector_Intrinsics_vec256 a2 = acc0[2U];
  341|  1.11k|        Lib_IntVector_Intrinsics_vec256 a3 = acc0[3U];
  342|  1.11k|        Lib_IntVector_Intrinsics_vec256 a4 = acc0[4U];
  343|  1.11k|        Lib_IntVector_Intrinsics_vec256 a01 = Lib_IntVector_Intrinsics_vec256_add64(a0, f10);
  ------------------
  |  |  365|  1.11k|    (_mm256_add_epi64(x0, x1))
  ------------------
  344|  1.11k|        Lib_IntVector_Intrinsics_vec256 a11 = Lib_IntVector_Intrinsics_vec256_add64(a1, f11);
  ------------------
  |  |  365|  1.11k|    (_mm256_add_epi64(x0, x1))
  ------------------
  345|  1.11k|        Lib_IntVector_Intrinsics_vec256 a21 = Lib_IntVector_Intrinsics_vec256_add64(a2, f12);
  ------------------
  |  |  365|  1.11k|    (_mm256_add_epi64(x0, x1))
  ------------------
  346|  1.11k|        Lib_IntVector_Intrinsics_vec256 a31 = Lib_IntVector_Intrinsics_vec256_add64(a3, f13);
  ------------------
  |  |  365|  1.11k|    (_mm256_add_epi64(x0, x1))
  ------------------
  347|  1.11k|        Lib_IntVector_Intrinsics_vec256 a41 = Lib_IntVector_Intrinsics_vec256_add64(a4, f14);
  ------------------
  |  |  365|  1.11k|    (_mm256_add_epi64(x0, x1))
  ------------------
  348|  1.11k|        Lib_IntVector_Intrinsics_vec256 a02 = Lib_IntVector_Intrinsics_vec256_mul64(r0, a01);
  ------------------
  |  |  371|  1.11k|    (_mm256_mul_epu32(x0, x1))
  ------------------
  349|  1.11k|        Lib_IntVector_Intrinsics_vec256 a12 = Lib_IntVector_Intrinsics_vec256_mul64(r11, a01);
  ------------------
  |  |  371|  1.11k|    (_mm256_mul_epu32(x0, x1))
  ------------------
  350|  1.11k|        Lib_IntVector_Intrinsics_vec256 a22 = Lib_IntVector_Intrinsics_vec256_mul64(r2, a01);
  ------------------
  |  |  371|  1.11k|    (_mm256_mul_epu32(x0, x1))
  ------------------
  351|  1.11k|        Lib_IntVector_Intrinsics_vec256 a32 = Lib_IntVector_Intrinsics_vec256_mul64(r3, a01);
  ------------------
  |  |  371|  1.11k|    (_mm256_mul_epu32(x0, x1))
  ------------------
  352|  1.11k|        Lib_IntVector_Intrinsics_vec256 a42 = Lib_IntVector_Intrinsics_vec256_mul64(r4, a01);
  ------------------
  |  |  371|  1.11k|    (_mm256_mul_epu32(x0, x1))
  ------------------
  353|  1.11k|        Lib_IntVector_Intrinsics_vec256
  354|  1.11k|            a03 =
  355|  1.11k|                Lib_IntVector_Intrinsics_vec256_add64(a02,
  ------------------
  |  |  365|  1.11k|    (_mm256_add_epi64(x0, x1))
  ------------------
  356|  1.11k|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r54, a11));
  357|  1.11k|        Lib_IntVector_Intrinsics_vec256
  358|  1.11k|            a13 =
  359|  1.11k|                Lib_IntVector_Intrinsics_vec256_add64(a12,
  ------------------
  |  |  365|  1.11k|    (_mm256_add_epi64(x0, x1))
  ------------------
  360|  1.11k|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r0, a11));
  361|  1.11k|        Lib_IntVector_Intrinsics_vec256
  362|  1.11k|            a23 =
  363|  1.11k|                Lib_IntVector_Intrinsics_vec256_add64(a22,
  ------------------
  |  |  365|  1.11k|    (_mm256_add_epi64(x0, x1))
  ------------------
  364|  1.11k|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r11, a11));
  365|  1.11k|        Lib_IntVector_Intrinsics_vec256
  366|  1.11k|            a33 =
  367|  1.11k|                Lib_IntVector_Intrinsics_vec256_add64(a32,
  ------------------
  |  |  365|  1.11k|    (_mm256_add_epi64(x0, x1))
  ------------------
  368|  1.11k|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r2, a11));
  369|  1.11k|        Lib_IntVector_Intrinsics_vec256
  370|  1.11k|            a43 =
  371|  1.11k|                Lib_IntVector_Intrinsics_vec256_add64(a42,
  ------------------
  |  |  365|  1.11k|    (_mm256_add_epi64(x0, x1))
  ------------------
  372|  1.11k|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r3, a11));
  373|  1.11k|        Lib_IntVector_Intrinsics_vec256
  374|  1.11k|            a04 =
  375|  1.11k|                Lib_IntVector_Intrinsics_vec256_add64(a03,
  ------------------
  |  |  365|  1.11k|    (_mm256_add_epi64(x0, x1))
  ------------------
  376|  1.11k|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r53, a21));
  377|  1.11k|        Lib_IntVector_Intrinsics_vec256
  378|  1.11k|            a14 =
  379|  1.11k|                Lib_IntVector_Intrinsics_vec256_add64(a13,
  ------------------
  |  |  365|  1.11k|    (_mm256_add_epi64(x0, x1))
  ------------------
  380|  1.11k|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r54, a21));
  381|  1.11k|        Lib_IntVector_Intrinsics_vec256
  382|  1.11k|            a24 =
  383|  1.11k|                Lib_IntVector_Intrinsics_vec256_add64(a23,
  ------------------
  |  |  365|  1.11k|    (_mm256_add_epi64(x0, x1))
  ------------------
  384|  1.11k|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r0, a21));
  385|  1.11k|        Lib_IntVector_Intrinsics_vec256
  386|  1.11k|            a34 =
  387|  1.11k|                Lib_IntVector_Intrinsics_vec256_add64(a33,
  ------------------
  |  |  365|  1.11k|    (_mm256_add_epi64(x0, x1))
  ------------------
  388|  1.11k|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r11, a21));
  389|  1.11k|        Lib_IntVector_Intrinsics_vec256
  390|  1.11k|            a44 =
  391|  1.11k|                Lib_IntVector_Intrinsics_vec256_add64(a43,
  ------------------
  |  |  365|  1.11k|    (_mm256_add_epi64(x0, x1))
  ------------------
  392|  1.11k|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r2, a21));
  393|  1.11k|        Lib_IntVector_Intrinsics_vec256
  394|  1.11k|            a05 =
  395|  1.11k|                Lib_IntVector_Intrinsics_vec256_add64(a04,
  ------------------
  |  |  365|  1.11k|    (_mm256_add_epi64(x0, x1))
  ------------------
  396|  1.11k|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r52, a31));
  397|  1.11k|        Lib_IntVector_Intrinsics_vec256
  398|  1.11k|            a15 =
  399|  1.11k|                Lib_IntVector_Intrinsics_vec256_add64(a14,
  ------------------
  |  |  365|  1.11k|    (_mm256_add_epi64(x0, x1))
  ------------------
  400|  1.11k|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r53, a31));
  401|  1.11k|        Lib_IntVector_Intrinsics_vec256
  402|  1.11k|            a25 =
  403|  1.11k|                Lib_IntVector_Intrinsics_vec256_add64(a24,
  ------------------
  |  |  365|  1.11k|    (_mm256_add_epi64(x0, x1))
  ------------------
  404|  1.11k|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r54, a31));
  405|  1.11k|        Lib_IntVector_Intrinsics_vec256
  406|  1.11k|            a35 =
  407|  1.11k|                Lib_IntVector_Intrinsics_vec256_add64(a34,
  ------------------
  |  |  365|  1.11k|    (_mm256_add_epi64(x0, x1))
  ------------------
  408|  1.11k|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r0, a31));
  409|  1.11k|        Lib_IntVector_Intrinsics_vec256
  410|  1.11k|            a45 =
  411|  1.11k|                Lib_IntVector_Intrinsics_vec256_add64(a44,
  ------------------
  |  |  365|  1.11k|    (_mm256_add_epi64(x0, x1))
  ------------------
  412|  1.11k|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r11, a31));
  413|  1.11k|        Lib_IntVector_Intrinsics_vec256
  414|  1.11k|            a06 =
  415|  1.11k|                Lib_IntVector_Intrinsics_vec256_add64(a05,
  ------------------
  |  |  365|  1.11k|    (_mm256_add_epi64(x0, x1))
  ------------------
  416|  1.11k|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r51, a41));
  417|  1.11k|        Lib_IntVector_Intrinsics_vec256
  418|  1.11k|            a16 =
  419|  1.11k|                Lib_IntVector_Intrinsics_vec256_add64(a15,
  ------------------
  |  |  365|  1.11k|    (_mm256_add_epi64(x0, x1))
  ------------------
  420|  1.11k|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r52, a41));
  421|  1.11k|        Lib_IntVector_Intrinsics_vec256
  422|  1.11k|            a26 =
  423|  1.11k|                Lib_IntVector_Intrinsics_vec256_add64(a25,
  ------------------
  |  |  365|  1.11k|    (_mm256_add_epi64(x0, x1))
  ------------------
  424|  1.11k|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r53, a41));
  425|  1.11k|        Lib_IntVector_Intrinsics_vec256
  426|  1.11k|            a36 =
  427|  1.11k|                Lib_IntVector_Intrinsics_vec256_add64(a35,
  ------------------
  |  |  365|  1.11k|    (_mm256_add_epi64(x0, x1))
  ------------------
  428|  1.11k|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r54, a41));
  429|  1.11k|        Lib_IntVector_Intrinsics_vec256
  430|  1.11k|            a46 =
  431|  1.11k|                Lib_IntVector_Intrinsics_vec256_add64(a45,
  ------------------
  |  |  365|  1.11k|    (_mm256_add_epi64(x0, x1))
  ------------------
  432|  1.11k|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r0, a41));
  433|  1.11k|        Lib_IntVector_Intrinsics_vec256 t01 = a06;
  434|  1.11k|        Lib_IntVector_Intrinsics_vec256 t11 = a16;
  435|  1.11k|        Lib_IntVector_Intrinsics_vec256 t2 = a26;
  436|  1.11k|        Lib_IntVector_Intrinsics_vec256 t3 = a36;
  437|  1.11k|        Lib_IntVector_Intrinsics_vec256 t4 = a46;
  438|  1.11k|        Lib_IntVector_Intrinsics_vec256
  439|  1.11k|            mask26 = Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3ffffffU);
  ------------------
  |  |  389|  1.11k|    (_mm256_set1_epi64x(x1)) /* hi lo */
  ------------------
  440|  1.11k|        Lib_IntVector_Intrinsics_vec256
  441|  1.11k|            z0 = Lib_IntVector_Intrinsics_vec256_shift_right64(t01, (uint32_t)26U);
  ------------------
  |  |  257|  1.11k|    (_mm256_srli_epi64(x0, x1))
  ------------------
  442|  1.11k|        Lib_IntVector_Intrinsics_vec256
  443|  1.11k|            z1 = Lib_IntVector_Intrinsics_vec256_shift_right64(t3, (uint32_t)26U);
  ------------------
  |  |  257|  1.11k|    (_mm256_srli_epi64(x0, x1))
  ------------------
  444|  1.11k|        Lib_IntVector_Intrinsics_vec256 x0 = Lib_IntVector_Intrinsics_vec256_and(t01, mask26);
  ------------------
  |  |  242|  1.11k|    (_mm256_and_si256(x0, x1))
  ------------------
  445|  1.11k|        Lib_IntVector_Intrinsics_vec256 x3 = Lib_IntVector_Intrinsics_vec256_and(t3, mask26);
  ------------------
  |  |  242|  1.11k|    (_mm256_and_si256(x0, x1))
  ------------------
  446|  1.11k|        Lib_IntVector_Intrinsics_vec256 x1 = Lib_IntVector_Intrinsics_vec256_add64(t11, z0);
  ------------------
  |  |  365|  1.11k|    (_mm256_add_epi64(x0, x1))
  ------------------
  447|  1.11k|        Lib_IntVector_Intrinsics_vec256 x4 = Lib_IntVector_Intrinsics_vec256_add64(t4, z1);
  ------------------
  |  |  365|  1.11k|    (_mm256_add_epi64(x0, x1))
  ------------------
  448|  1.11k|        Lib_IntVector_Intrinsics_vec256
  449|  1.11k|            z01 = Lib_IntVector_Intrinsics_vec256_shift_right64(x1, (uint32_t)26U);
  ------------------
  |  |  257|  1.11k|    (_mm256_srli_epi64(x0, x1))
  ------------------
  450|  1.11k|        Lib_IntVector_Intrinsics_vec256
  451|  1.11k|            z11 = Lib_IntVector_Intrinsics_vec256_shift_right64(x4, (uint32_t)26U);
  ------------------
  |  |  257|  1.11k|    (_mm256_srli_epi64(x0, x1))
  ------------------
  452|  1.11k|        Lib_IntVector_Intrinsics_vec256
  453|  1.11k|            t = Lib_IntVector_Intrinsics_vec256_shift_left64(z11, (uint32_t)2U);
  ------------------
  |  |  254|  1.11k|    (_mm256_slli_epi64(x0, x1))
  ------------------
  454|  1.11k|        Lib_IntVector_Intrinsics_vec256 z12 = Lib_IntVector_Intrinsics_vec256_add64(z11, t);
  ------------------
  |  |  365|  1.11k|    (_mm256_add_epi64(x0, x1))
  ------------------
  455|  1.11k|        Lib_IntVector_Intrinsics_vec256 x11 = Lib_IntVector_Intrinsics_vec256_and(x1, mask26);
  ------------------
  |  |  242|  1.11k|    (_mm256_and_si256(x0, x1))
  ------------------
  456|  1.11k|        Lib_IntVector_Intrinsics_vec256 x41 = Lib_IntVector_Intrinsics_vec256_and(x4, mask26);
  ------------------
  |  |  242|  1.11k|    (_mm256_and_si256(x0, x1))
  ------------------
  457|  1.11k|        Lib_IntVector_Intrinsics_vec256 x2 = Lib_IntVector_Intrinsics_vec256_add64(t2, z01);
  ------------------
  |  |  365|  1.11k|    (_mm256_add_epi64(x0, x1))
  ------------------
  458|  1.11k|        Lib_IntVector_Intrinsics_vec256 x01 = Lib_IntVector_Intrinsics_vec256_add64(x0, z12);
  ------------------
  |  |  365|  1.11k|    (_mm256_add_epi64(x0, x1))
  ------------------
  459|  1.11k|        Lib_IntVector_Intrinsics_vec256
  460|  1.11k|            z02 = Lib_IntVector_Intrinsics_vec256_shift_right64(x2, (uint32_t)26U);
  ------------------
  |  |  257|  1.11k|    (_mm256_srli_epi64(x0, x1))
  ------------------
  461|  1.11k|        Lib_IntVector_Intrinsics_vec256
  462|  1.11k|            z13 = Lib_IntVector_Intrinsics_vec256_shift_right64(x01, (uint32_t)26U);
  ------------------
  |  |  257|  1.11k|    (_mm256_srli_epi64(x0, x1))
  ------------------
  463|  1.11k|        Lib_IntVector_Intrinsics_vec256 x21 = Lib_IntVector_Intrinsics_vec256_and(x2, mask26);
  ------------------
  |  |  242|  1.11k|    (_mm256_and_si256(x0, x1))
  ------------------
  464|  1.11k|        Lib_IntVector_Intrinsics_vec256 x02 = Lib_IntVector_Intrinsics_vec256_and(x01, mask26);
  ------------------
  |  |  242|  1.11k|    (_mm256_and_si256(x0, x1))
  ------------------
  465|  1.11k|        Lib_IntVector_Intrinsics_vec256 x31 = Lib_IntVector_Intrinsics_vec256_add64(x3, z02);
  ------------------
  |  |  365|  1.11k|    (_mm256_add_epi64(x0, x1))
  ------------------
  466|  1.11k|        Lib_IntVector_Intrinsics_vec256 x12 = Lib_IntVector_Intrinsics_vec256_add64(x11, z13);
  ------------------
  |  |  365|  1.11k|    (_mm256_add_epi64(x0, x1))
  ------------------
  467|  1.11k|        Lib_IntVector_Intrinsics_vec256
  468|  1.11k|            z03 = Lib_IntVector_Intrinsics_vec256_shift_right64(x31, (uint32_t)26U);
  ------------------
  |  |  257|  1.11k|    (_mm256_srli_epi64(x0, x1))
  ------------------
  469|  1.11k|        Lib_IntVector_Intrinsics_vec256 x32 = Lib_IntVector_Intrinsics_vec256_and(x31, mask26);
  ------------------
  |  |  242|  1.11k|    (_mm256_and_si256(x0, x1))
  ------------------
  470|  1.11k|        Lib_IntVector_Intrinsics_vec256 x42 = Lib_IntVector_Intrinsics_vec256_add64(x41, z03);
  ------------------
  |  |  365|  1.11k|    (_mm256_add_epi64(x0, x1))
  ------------------
  471|  1.11k|        Lib_IntVector_Intrinsics_vec256 o0 = x02;
  472|  1.11k|        Lib_IntVector_Intrinsics_vec256 o1 = x12;
  473|  1.11k|        Lib_IntVector_Intrinsics_vec256 o2 = x21;
  474|  1.11k|        Lib_IntVector_Intrinsics_vec256 o3 = x32;
  475|  1.11k|        Lib_IntVector_Intrinsics_vec256 o4 = x42;
  476|  1.11k|        acc0[0U] = o0;
  477|  1.11k|        acc0[1U] = o1;
  478|  1.11k|        acc0[2U] = o2;
  479|  1.11k|        acc0[3U] = o3;
  480|  1.11k|        acc0[4U] = o4;
  481|  1.11k|    }
  482|  5.76k|    if (rem1 > (uint32_t)0U) {
  ------------------
  |  Branch (482:9): [True: 0, False: 5.76k]
  ------------------
  483|      0|        uint8_t *last = t10 + nb * (uint32_t)16U;
  484|      0|        KRML_PRE_ALIGN(32)
  485|      0|        Lib_IntVector_Intrinsics_vec256 e[5U] KRML_POST_ALIGN(32) = { 0U };
  486|      0|        uint8_t tmp[16U] = { 0U };
  487|      0|        memcpy(tmp, last, rem1 * sizeof(uint8_t));
  488|      0|        uint64_t u0 = load64_le(tmp);
  ------------------
  |  |  214|      0|#define load64_le(b) (le64toh(load64(b)))
  ------------------
  489|      0|        uint64_t lo = u0;
  490|      0|        uint64_t u = load64_le(tmp + (uint32_t)8U);
  ------------------
  |  |  214|      0|#define load64_le(b) (le64toh(load64(b)))
  ------------------
  491|      0|        uint64_t hi = u;
  492|      0|        Lib_IntVector_Intrinsics_vec256 f0 = Lib_IntVector_Intrinsics_vec256_load64(lo);
  ------------------
  |  |  389|      0|    (_mm256_set1_epi64x(x1)) /* hi lo */
  ------------------
  493|      0|        Lib_IntVector_Intrinsics_vec256 f1 = Lib_IntVector_Intrinsics_vec256_load64(hi);
  ------------------
  |  |  389|      0|    (_mm256_set1_epi64x(x1)) /* hi lo */
  ------------------
  494|      0|        Lib_IntVector_Intrinsics_vec256
  495|      0|            f010 =
  496|      0|                Lib_IntVector_Intrinsics_vec256_and(f0,
  ------------------
  |  |  242|      0|    (_mm256_and_si256(x0, x1))
  ------------------
  497|      0|                                                    Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3ffffffU));
  498|      0|        Lib_IntVector_Intrinsics_vec256
  499|      0|            f110 =
  500|      0|                Lib_IntVector_Intrinsics_vec256_and(Lib_IntVector_Intrinsics_vec256_shift_right64(f0,
  ------------------
  |  |  242|      0|    (_mm256_and_si256(x0, x1))
  ------------------
  501|      0|                                                                                                  (uint32_t)26U),
  502|      0|                                                    Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3ffffffU));
  503|      0|        Lib_IntVector_Intrinsics_vec256
  504|      0|            f20 =
  505|      0|                Lib_IntVector_Intrinsics_vec256_or(Lib_IntVector_Intrinsics_vec256_shift_right64(f0,
  ------------------
  |  |  239|      0|    (_mm256_or_si256(x0, x1))
  ------------------
  506|      0|                                                                                                 (uint32_t)52U),
  507|      0|                                                   Lib_IntVector_Intrinsics_vec256_shift_left64(Lib_IntVector_Intrinsics_vec256_and(f1,
  508|      0|                                                                                                                                    Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3fffU)),
  509|      0|                                                                                                (uint32_t)12U));
  510|      0|        Lib_IntVector_Intrinsics_vec256
  511|      0|            f30 =
  512|      0|                Lib_IntVector_Intrinsics_vec256_and(Lib_IntVector_Intrinsics_vec256_shift_right64(f1,
  ------------------
  |  |  242|      0|    (_mm256_and_si256(x0, x1))
  ------------------
  513|      0|                                                                                                  (uint32_t)14U),
  514|      0|                                                    Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3ffffffU));
  515|      0|        Lib_IntVector_Intrinsics_vec256
  516|      0|            f40 = Lib_IntVector_Intrinsics_vec256_shift_right64(f1, (uint32_t)40U);
  ------------------
  |  |  257|      0|    (_mm256_srli_epi64(x0, x1))
  ------------------
  517|      0|        Lib_IntVector_Intrinsics_vec256 f01 = f010;
  518|      0|        Lib_IntVector_Intrinsics_vec256 f111 = f110;
  519|      0|        Lib_IntVector_Intrinsics_vec256 f2 = f20;
  520|      0|        Lib_IntVector_Intrinsics_vec256 f3 = f30;
  521|      0|        Lib_IntVector_Intrinsics_vec256 f4 = f40;
  522|      0|        e[0U] = f01;
  523|      0|        e[1U] = f111;
  524|      0|        e[2U] = f2;
  525|      0|        e[3U] = f3;
  526|      0|        e[4U] = f4;
  527|      0|        uint64_t b = (uint64_t)1U << rem1 * (uint32_t)8U % (uint32_t)26U;
  528|      0|        Lib_IntVector_Intrinsics_vec256 mask = Lib_IntVector_Intrinsics_vec256_load64(b);
  ------------------
  |  |  389|      0|    (_mm256_set1_epi64x(x1)) /* hi lo */
  ------------------
  529|      0|        Lib_IntVector_Intrinsics_vec256 fi = e[rem1 * (uint32_t)8U / (uint32_t)26U];
  530|      0|        e[rem1 * (uint32_t)8U / (uint32_t)26U] = Lib_IntVector_Intrinsics_vec256_or(fi, mask);
  ------------------
  |  |  239|      0|    (_mm256_or_si256(x0, x1))
  ------------------
  531|      0|        Lib_IntVector_Intrinsics_vec256 *r1 = pre0;
  532|      0|        Lib_IntVector_Intrinsics_vec256 *r5 = pre0 + (uint32_t)5U;
  533|      0|        Lib_IntVector_Intrinsics_vec256 r0 = r1[0U];
  534|      0|        Lib_IntVector_Intrinsics_vec256 r11 = r1[1U];
  535|      0|        Lib_IntVector_Intrinsics_vec256 r2 = r1[2U];
  536|      0|        Lib_IntVector_Intrinsics_vec256 r3 = r1[3U];
  537|      0|        Lib_IntVector_Intrinsics_vec256 r4 = r1[4U];
  538|      0|        Lib_IntVector_Intrinsics_vec256 r51 = r5[1U];
  539|      0|        Lib_IntVector_Intrinsics_vec256 r52 = r5[2U];
  540|      0|        Lib_IntVector_Intrinsics_vec256 r53 = r5[3U];
  541|      0|        Lib_IntVector_Intrinsics_vec256 r54 = r5[4U];
  542|      0|        Lib_IntVector_Intrinsics_vec256 f10 = e[0U];
  543|      0|        Lib_IntVector_Intrinsics_vec256 f11 = e[1U];
  544|      0|        Lib_IntVector_Intrinsics_vec256 f12 = e[2U];
  545|      0|        Lib_IntVector_Intrinsics_vec256 f13 = e[3U];
  546|      0|        Lib_IntVector_Intrinsics_vec256 f14 = e[4U];
  547|      0|        Lib_IntVector_Intrinsics_vec256 a0 = acc0[0U];
  548|      0|        Lib_IntVector_Intrinsics_vec256 a1 = acc0[1U];
  549|      0|        Lib_IntVector_Intrinsics_vec256 a2 = acc0[2U];
  550|      0|        Lib_IntVector_Intrinsics_vec256 a3 = acc0[3U];
  551|      0|        Lib_IntVector_Intrinsics_vec256 a4 = acc0[4U];
  552|      0|        Lib_IntVector_Intrinsics_vec256 a01 = Lib_IntVector_Intrinsics_vec256_add64(a0, f10);
  ------------------
  |  |  365|      0|    (_mm256_add_epi64(x0, x1))
  ------------------
  553|      0|        Lib_IntVector_Intrinsics_vec256 a11 = Lib_IntVector_Intrinsics_vec256_add64(a1, f11);
  ------------------
  |  |  365|      0|    (_mm256_add_epi64(x0, x1))
  ------------------
  554|      0|        Lib_IntVector_Intrinsics_vec256 a21 = Lib_IntVector_Intrinsics_vec256_add64(a2, f12);
  ------------------
  |  |  365|      0|    (_mm256_add_epi64(x0, x1))
  ------------------
  555|      0|        Lib_IntVector_Intrinsics_vec256 a31 = Lib_IntVector_Intrinsics_vec256_add64(a3, f13);
  ------------------
  |  |  365|      0|    (_mm256_add_epi64(x0, x1))
  ------------------
  556|      0|        Lib_IntVector_Intrinsics_vec256 a41 = Lib_IntVector_Intrinsics_vec256_add64(a4, f14);
  ------------------
  |  |  365|      0|    (_mm256_add_epi64(x0, x1))
  ------------------
  557|      0|        Lib_IntVector_Intrinsics_vec256 a02 = Lib_IntVector_Intrinsics_vec256_mul64(r0, a01);
  ------------------
  |  |  371|      0|    (_mm256_mul_epu32(x0, x1))
  ------------------
  558|      0|        Lib_IntVector_Intrinsics_vec256 a12 = Lib_IntVector_Intrinsics_vec256_mul64(r11, a01);
  ------------------
  |  |  371|      0|    (_mm256_mul_epu32(x0, x1))
  ------------------
  559|      0|        Lib_IntVector_Intrinsics_vec256 a22 = Lib_IntVector_Intrinsics_vec256_mul64(r2, a01);
  ------------------
  |  |  371|      0|    (_mm256_mul_epu32(x0, x1))
  ------------------
  560|      0|        Lib_IntVector_Intrinsics_vec256 a32 = Lib_IntVector_Intrinsics_vec256_mul64(r3, a01);
  ------------------
  |  |  371|      0|    (_mm256_mul_epu32(x0, x1))
  ------------------
  561|      0|        Lib_IntVector_Intrinsics_vec256 a42 = Lib_IntVector_Intrinsics_vec256_mul64(r4, a01);
  ------------------
  |  |  371|      0|    (_mm256_mul_epu32(x0, x1))
  ------------------
  562|      0|        Lib_IntVector_Intrinsics_vec256
  563|      0|            a03 =
  564|      0|                Lib_IntVector_Intrinsics_vec256_add64(a02,
  ------------------
  |  |  365|      0|    (_mm256_add_epi64(x0, x1))
  ------------------
  565|      0|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r54, a11));
  566|      0|        Lib_IntVector_Intrinsics_vec256
  567|      0|            a13 =
  568|      0|                Lib_IntVector_Intrinsics_vec256_add64(a12,
  ------------------
  |  |  365|      0|    (_mm256_add_epi64(x0, x1))
  ------------------
  569|      0|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r0, a11));
  570|      0|        Lib_IntVector_Intrinsics_vec256
  571|      0|            a23 =
  572|      0|                Lib_IntVector_Intrinsics_vec256_add64(a22,
  ------------------
  |  |  365|      0|    (_mm256_add_epi64(x0, x1))
  ------------------
  573|      0|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r11, a11));
  574|      0|        Lib_IntVector_Intrinsics_vec256
  575|      0|            a33 =
  576|      0|                Lib_IntVector_Intrinsics_vec256_add64(a32,
  ------------------
  |  |  365|      0|    (_mm256_add_epi64(x0, x1))
  ------------------
  577|      0|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r2, a11));
  578|      0|        Lib_IntVector_Intrinsics_vec256
  579|      0|            a43 =
  580|      0|                Lib_IntVector_Intrinsics_vec256_add64(a42,
  ------------------
  |  |  365|      0|    (_mm256_add_epi64(x0, x1))
  ------------------
  581|      0|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r3, a11));
  582|      0|        Lib_IntVector_Intrinsics_vec256
  583|      0|            a04 =
  584|      0|                Lib_IntVector_Intrinsics_vec256_add64(a03,
  ------------------
  |  |  365|      0|    (_mm256_add_epi64(x0, x1))
  ------------------
  585|      0|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r53, a21));
  586|      0|        Lib_IntVector_Intrinsics_vec256
  587|      0|            a14 =
  588|      0|                Lib_IntVector_Intrinsics_vec256_add64(a13,
  ------------------
  |  |  365|      0|    (_mm256_add_epi64(x0, x1))
  ------------------
  589|      0|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r54, a21));
  590|      0|        Lib_IntVector_Intrinsics_vec256
  591|      0|            a24 =
  592|      0|                Lib_IntVector_Intrinsics_vec256_add64(a23,
  ------------------
  |  |  365|      0|    (_mm256_add_epi64(x0, x1))
  ------------------
  593|      0|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r0, a21));
  594|      0|        Lib_IntVector_Intrinsics_vec256
  595|      0|            a34 =
  596|      0|                Lib_IntVector_Intrinsics_vec256_add64(a33,
  ------------------
  |  |  365|      0|    (_mm256_add_epi64(x0, x1))
  ------------------
  597|      0|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r11, a21));
  598|      0|        Lib_IntVector_Intrinsics_vec256
  599|      0|            a44 =
  600|      0|                Lib_IntVector_Intrinsics_vec256_add64(a43,
  ------------------
  |  |  365|      0|    (_mm256_add_epi64(x0, x1))
  ------------------
  601|      0|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r2, a21));
  602|      0|        Lib_IntVector_Intrinsics_vec256
  603|      0|            a05 =
  604|      0|                Lib_IntVector_Intrinsics_vec256_add64(a04,
  ------------------
  |  |  365|      0|    (_mm256_add_epi64(x0, x1))
  ------------------
  605|      0|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r52, a31));
  606|      0|        Lib_IntVector_Intrinsics_vec256
  607|      0|            a15 =
  608|      0|                Lib_IntVector_Intrinsics_vec256_add64(a14,
  ------------------
  |  |  365|      0|    (_mm256_add_epi64(x0, x1))
  ------------------
  609|      0|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r53, a31));
  610|      0|        Lib_IntVector_Intrinsics_vec256
  611|      0|            a25 =
  612|      0|                Lib_IntVector_Intrinsics_vec256_add64(a24,
  ------------------
  |  |  365|      0|    (_mm256_add_epi64(x0, x1))
  ------------------
  613|      0|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r54, a31));
  614|      0|        Lib_IntVector_Intrinsics_vec256
  615|      0|            a35 =
  616|      0|                Lib_IntVector_Intrinsics_vec256_add64(a34,
  ------------------
  |  |  365|      0|    (_mm256_add_epi64(x0, x1))
  ------------------
  617|      0|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r0, a31));
  618|      0|        Lib_IntVector_Intrinsics_vec256
  619|      0|            a45 =
  620|      0|                Lib_IntVector_Intrinsics_vec256_add64(a44,
  ------------------
  |  |  365|      0|    (_mm256_add_epi64(x0, x1))
  ------------------
  621|      0|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r11, a31));
  622|      0|        Lib_IntVector_Intrinsics_vec256
  623|      0|            a06 =
  624|      0|                Lib_IntVector_Intrinsics_vec256_add64(a05,
  ------------------
  |  |  365|      0|    (_mm256_add_epi64(x0, x1))
  ------------------
  625|      0|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r51, a41));
  626|      0|        Lib_IntVector_Intrinsics_vec256
  627|      0|            a16 =
  628|      0|                Lib_IntVector_Intrinsics_vec256_add64(a15,
  ------------------
  |  |  365|      0|    (_mm256_add_epi64(x0, x1))
  ------------------
  629|      0|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r52, a41));
  630|      0|        Lib_IntVector_Intrinsics_vec256
  631|      0|            a26 =
  632|      0|                Lib_IntVector_Intrinsics_vec256_add64(a25,
  ------------------
  |  |  365|      0|    (_mm256_add_epi64(x0, x1))
  ------------------
  633|      0|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r53, a41));
  634|      0|        Lib_IntVector_Intrinsics_vec256
  635|      0|            a36 =
  636|      0|                Lib_IntVector_Intrinsics_vec256_add64(a35,
  ------------------
  |  |  365|      0|    (_mm256_add_epi64(x0, x1))
  ------------------
  637|      0|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r54, a41));
  638|      0|        Lib_IntVector_Intrinsics_vec256
  639|      0|            a46 =
  640|      0|                Lib_IntVector_Intrinsics_vec256_add64(a45,
  ------------------
  |  |  365|      0|    (_mm256_add_epi64(x0, x1))
  ------------------
  641|      0|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r0, a41));
  642|      0|        Lib_IntVector_Intrinsics_vec256 t01 = a06;
  643|      0|        Lib_IntVector_Intrinsics_vec256 t11 = a16;
  644|      0|        Lib_IntVector_Intrinsics_vec256 t2 = a26;
  645|      0|        Lib_IntVector_Intrinsics_vec256 t3 = a36;
  646|      0|        Lib_IntVector_Intrinsics_vec256 t4 = a46;
  647|      0|        Lib_IntVector_Intrinsics_vec256
  648|      0|            mask26 = Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3ffffffU);
  ------------------
  |  |  389|      0|    (_mm256_set1_epi64x(x1)) /* hi lo */
  ------------------
  649|      0|        Lib_IntVector_Intrinsics_vec256
  650|      0|            z0 = Lib_IntVector_Intrinsics_vec256_shift_right64(t01, (uint32_t)26U);
  ------------------
  |  |  257|      0|    (_mm256_srli_epi64(x0, x1))
  ------------------
  651|      0|        Lib_IntVector_Intrinsics_vec256
  652|      0|            z1 = Lib_IntVector_Intrinsics_vec256_shift_right64(t3, (uint32_t)26U);
  ------------------
  |  |  257|      0|    (_mm256_srli_epi64(x0, x1))
  ------------------
  653|      0|        Lib_IntVector_Intrinsics_vec256 x0 = Lib_IntVector_Intrinsics_vec256_and(t01, mask26);
  ------------------
  |  |  242|      0|    (_mm256_and_si256(x0, x1))
  ------------------
  654|      0|        Lib_IntVector_Intrinsics_vec256 x3 = Lib_IntVector_Intrinsics_vec256_and(t3, mask26);
  ------------------
  |  |  242|      0|    (_mm256_and_si256(x0, x1))
  ------------------
  655|      0|        Lib_IntVector_Intrinsics_vec256 x1 = Lib_IntVector_Intrinsics_vec256_add64(t11, z0);
  ------------------
  |  |  365|      0|    (_mm256_add_epi64(x0, x1))
  ------------------
  656|      0|        Lib_IntVector_Intrinsics_vec256 x4 = Lib_IntVector_Intrinsics_vec256_add64(t4, z1);
  ------------------
  |  |  365|      0|    (_mm256_add_epi64(x0, x1))
  ------------------
  657|      0|        Lib_IntVector_Intrinsics_vec256
  658|      0|            z01 = Lib_IntVector_Intrinsics_vec256_shift_right64(x1, (uint32_t)26U);
  ------------------
  |  |  257|      0|    (_mm256_srli_epi64(x0, x1))
  ------------------
  659|      0|        Lib_IntVector_Intrinsics_vec256
  660|      0|            z11 = Lib_IntVector_Intrinsics_vec256_shift_right64(x4, (uint32_t)26U);
  ------------------
  |  |  257|      0|    (_mm256_srli_epi64(x0, x1))
  ------------------
  661|      0|        Lib_IntVector_Intrinsics_vec256
  662|      0|            t = Lib_IntVector_Intrinsics_vec256_shift_left64(z11, (uint32_t)2U);
  ------------------
  |  |  254|      0|    (_mm256_slli_epi64(x0, x1))
  ------------------
  663|      0|        Lib_IntVector_Intrinsics_vec256 z12 = Lib_IntVector_Intrinsics_vec256_add64(z11, t);
  ------------------
  |  |  365|      0|    (_mm256_add_epi64(x0, x1))
  ------------------
  664|      0|        Lib_IntVector_Intrinsics_vec256 x11 = Lib_IntVector_Intrinsics_vec256_and(x1, mask26);
  ------------------
  |  |  242|      0|    (_mm256_and_si256(x0, x1))
  ------------------
  665|      0|        Lib_IntVector_Intrinsics_vec256 x41 = Lib_IntVector_Intrinsics_vec256_and(x4, mask26);
  ------------------
  |  |  242|      0|    (_mm256_and_si256(x0, x1))
  ------------------
  666|      0|        Lib_IntVector_Intrinsics_vec256 x2 = Lib_IntVector_Intrinsics_vec256_add64(t2, z01);
  ------------------
  |  |  365|      0|    (_mm256_add_epi64(x0, x1))
  ------------------
  667|      0|        Lib_IntVector_Intrinsics_vec256 x01 = Lib_IntVector_Intrinsics_vec256_add64(x0, z12);
  ------------------
  |  |  365|      0|    (_mm256_add_epi64(x0, x1))
  ------------------
  668|      0|        Lib_IntVector_Intrinsics_vec256
  669|      0|            z02 = Lib_IntVector_Intrinsics_vec256_shift_right64(x2, (uint32_t)26U);
  ------------------
  |  |  257|      0|    (_mm256_srli_epi64(x0, x1))
  ------------------
  670|      0|        Lib_IntVector_Intrinsics_vec256
  671|      0|            z13 = Lib_IntVector_Intrinsics_vec256_shift_right64(x01, (uint32_t)26U);
  ------------------
  |  |  257|      0|    (_mm256_srli_epi64(x0, x1))
  ------------------
  672|      0|        Lib_IntVector_Intrinsics_vec256 x21 = Lib_IntVector_Intrinsics_vec256_and(x2, mask26);
  ------------------
  |  |  242|      0|    (_mm256_and_si256(x0, x1))
  ------------------
  673|      0|        Lib_IntVector_Intrinsics_vec256 x02 = Lib_IntVector_Intrinsics_vec256_and(x01, mask26);
  ------------------
  |  |  242|      0|    (_mm256_and_si256(x0, x1))
  ------------------
  674|      0|        Lib_IntVector_Intrinsics_vec256 x31 = Lib_IntVector_Intrinsics_vec256_add64(x3, z02);
  ------------------
  |  |  365|      0|    (_mm256_add_epi64(x0, x1))
  ------------------
  675|      0|        Lib_IntVector_Intrinsics_vec256 x12 = Lib_IntVector_Intrinsics_vec256_add64(x11, z13);
  ------------------
  |  |  365|      0|    (_mm256_add_epi64(x0, x1))
  ------------------
  676|      0|        Lib_IntVector_Intrinsics_vec256
  677|      0|            z03 = Lib_IntVector_Intrinsics_vec256_shift_right64(x31, (uint32_t)26U);
  ------------------
  |  |  257|      0|    (_mm256_srli_epi64(x0, x1))
  ------------------
  678|      0|        Lib_IntVector_Intrinsics_vec256 x32 = Lib_IntVector_Intrinsics_vec256_and(x31, mask26);
  ------------------
  |  |  242|      0|    (_mm256_and_si256(x0, x1))
  ------------------
  679|      0|        Lib_IntVector_Intrinsics_vec256 x42 = Lib_IntVector_Intrinsics_vec256_add64(x41, z03);
  ------------------
  |  |  365|      0|    (_mm256_add_epi64(x0, x1))
  ------------------
  680|      0|        Lib_IntVector_Intrinsics_vec256 o0 = x02;
  681|      0|        Lib_IntVector_Intrinsics_vec256 o1 = x12;
  682|      0|        Lib_IntVector_Intrinsics_vec256 o2 = x21;
  683|      0|        Lib_IntVector_Intrinsics_vec256 o3 = x32;
  684|      0|        Lib_IntVector_Intrinsics_vec256 o4 = x42;
  685|      0|        acc0[0U] = o0;
  686|      0|        acc0[1U] = o1;
  687|      0|        acc0[2U] = o2;
  688|      0|        acc0[3U] = o3;
  689|      0|        acc0[4U] = o4;
  690|      0|    }
  691|  5.76k|    uint8_t tmp[16U] = { 0U };
  692|  5.76k|    memcpy(tmp, rem, r * sizeof(uint8_t));
  693|  5.76k|    if (r > (uint32_t)0U) {
  ------------------
  |  Branch (693:9): [True: 5.62k, False: 135]
  ------------------
  694|  5.62k|        Lib_IntVector_Intrinsics_vec256 *pre = ctx + (uint32_t)5U;
  695|  5.62k|        Lib_IntVector_Intrinsics_vec256 *acc = ctx;
  696|  5.62k|        KRML_PRE_ALIGN(32)
  697|  5.62k|        Lib_IntVector_Intrinsics_vec256 e[5U] KRML_POST_ALIGN(32) = { 0U };
  698|  5.62k|        uint64_t u0 = load64_le(tmp);
  ------------------
  |  |  214|  5.62k|#define load64_le(b) (le64toh(load64(b)))
  ------------------
  699|  5.62k|        uint64_t lo = u0;
  700|  5.62k|        uint64_t u = load64_le(tmp + (uint32_t)8U);
  ------------------
  |  |  214|  5.62k|#define load64_le(b) (le64toh(load64(b)))
  ------------------
  701|  5.62k|        uint64_t hi = u;
  702|  5.62k|        Lib_IntVector_Intrinsics_vec256 f0 = Lib_IntVector_Intrinsics_vec256_load64(lo);
  ------------------
  |  |  389|  5.62k|    (_mm256_set1_epi64x(x1)) /* hi lo */
  ------------------
  703|  5.62k|        Lib_IntVector_Intrinsics_vec256 f1 = Lib_IntVector_Intrinsics_vec256_load64(hi);
  ------------------
  |  |  389|  5.62k|    (_mm256_set1_epi64x(x1)) /* hi lo */
  ------------------
  704|  5.62k|        Lib_IntVector_Intrinsics_vec256
  705|  5.62k|            f010 =
  706|  5.62k|                Lib_IntVector_Intrinsics_vec256_and(f0,
  ------------------
  |  |  242|  5.62k|    (_mm256_and_si256(x0, x1))
  ------------------
  707|  5.62k|                                                    Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3ffffffU));
  708|  5.62k|        Lib_IntVector_Intrinsics_vec256
  709|  5.62k|            f110 =
  710|  5.62k|                Lib_IntVector_Intrinsics_vec256_and(Lib_IntVector_Intrinsics_vec256_shift_right64(f0,
  ------------------
  |  |  242|  5.62k|    (_mm256_and_si256(x0, x1))
  ------------------
  711|  5.62k|                                                                                                  (uint32_t)26U),
  712|  5.62k|                                                    Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3ffffffU));
  713|  5.62k|        Lib_IntVector_Intrinsics_vec256
  714|  5.62k|            f20 =
  715|  5.62k|                Lib_IntVector_Intrinsics_vec256_or(Lib_IntVector_Intrinsics_vec256_shift_right64(f0,
  ------------------
  |  |  239|  5.62k|    (_mm256_or_si256(x0, x1))
  ------------------
  716|  5.62k|                                                                                                 (uint32_t)52U),
  717|  5.62k|                                                   Lib_IntVector_Intrinsics_vec256_shift_left64(Lib_IntVector_Intrinsics_vec256_and(f1,
  718|  5.62k|                                                                                                                                    Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3fffU)),
  719|  5.62k|                                                                                                (uint32_t)12U));
  720|  5.62k|        Lib_IntVector_Intrinsics_vec256
  721|  5.62k|            f30 =
  722|  5.62k|                Lib_IntVector_Intrinsics_vec256_and(Lib_IntVector_Intrinsics_vec256_shift_right64(f1,
  ------------------
  |  |  242|  5.62k|    (_mm256_and_si256(x0, x1))
  ------------------
  723|  5.62k|                                                                                                  (uint32_t)14U),
  724|  5.62k|                                                    Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3ffffffU));
  725|  5.62k|        Lib_IntVector_Intrinsics_vec256
  726|  5.62k|            f40 = Lib_IntVector_Intrinsics_vec256_shift_right64(f1, (uint32_t)40U);
  ------------------
  |  |  257|  5.62k|    (_mm256_srli_epi64(x0, x1))
  ------------------
  727|  5.62k|        Lib_IntVector_Intrinsics_vec256 f01 = f010;
  728|  5.62k|        Lib_IntVector_Intrinsics_vec256 f111 = f110;
  729|  5.62k|        Lib_IntVector_Intrinsics_vec256 f2 = f20;
  730|  5.62k|        Lib_IntVector_Intrinsics_vec256 f3 = f30;
  731|  5.62k|        Lib_IntVector_Intrinsics_vec256 f41 = f40;
  732|  5.62k|        e[0U] = f01;
  733|  5.62k|        e[1U] = f111;
  734|  5.62k|        e[2U] = f2;
  735|  5.62k|        e[3U] = f3;
  736|  5.62k|        e[4U] = f41;
  737|  5.62k|        uint64_t b = (uint64_t)0x1000000U;
  738|  5.62k|        Lib_IntVector_Intrinsics_vec256 mask = Lib_IntVector_Intrinsics_vec256_load64(b);
  ------------------
  |  |  389|  5.62k|    (_mm256_set1_epi64x(x1)) /* hi lo */
  ------------------
  739|  5.62k|        Lib_IntVector_Intrinsics_vec256 f4 = e[4U];
  740|  5.62k|        e[4U] = Lib_IntVector_Intrinsics_vec256_or(f4, mask);
  ------------------
  |  |  239|  5.62k|    (_mm256_or_si256(x0, x1))
  ------------------
  741|  5.62k|        Lib_IntVector_Intrinsics_vec256 *r1 = pre;
  742|  5.62k|        Lib_IntVector_Intrinsics_vec256 *r5 = pre + (uint32_t)5U;
  743|  5.62k|        Lib_IntVector_Intrinsics_vec256 r0 = r1[0U];
  744|  5.62k|        Lib_IntVector_Intrinsics_vec256 r11 = r1[1U];
  745|  5.62k|        Lib_IntVector_Intrinsics_vec256 r2 = r1[2U];
  746|  5.62k|        Lib_IntVector_Intrinsics_vec256 r3 = r1[3U];
  747|  5.62k|        Lib_IntVector_Intrinsics_vec256 r4 = r1[4U];
  748|  5.62k|        Lib_IntVector_Intrinsics_vec256 r51 = r5[1U];
  749|  5.62k|        Lib_IntVector_Intrinsics_vec256 r52 = r5[2U];
  750|  5.62k|        Lib_IntVector_Intrinsics_vec256 r53 = r5[3U];
  751|  5.62k|        Lib_IntVector_Intrinsics_vec256 r54 = r5[4U];
  752|  5.62k|        Lib_IntVector_Intrinsics_vec256 f10 = e[0U];
  753|  5.62k|        Lib_IntVector_Intrinsics_vec256 f11 = e[1U];
  754|  5.62k|        Lib_IntVector_Intrinsics_vec256 f12 = e[2U];
  755|  5.62k|        Lib_IntVector_Intrinsics_vec256 f13 = e[3U];
  756|  5.62k|        Lib_IntVector_Intrinsics_vec256 f14 = e[4U];
  757|  5.62k|        Lib_IntVector_Intrinsics_vec256 a0 = acc[0U];
  758|  5.62k|        Lib_IntVector_Intrinsics_vec256 a1 = acc[1U];
  759|  5.62k|        Lib_IntVector_Intrinsics_vec256 a2 = acc[2U];
  760|  5.62k|        Lib_IntVector_Intrinsics_vec256 a3 = acc[3U];
  761|  5.62k|        Lib_IntVector_Intrinsics_vec256 a4 = acc[4U];
  762|  5.62k|        Lib_IntVector_Intrinsics_vec256 a01 = Lib_IntVector_Intrinsics_vec256_add64(a0, f10);
  ------------------
  |  |  365|  5.62k|    (_mm256_add_epi64(x0, x1))
  ------------------
  763|  5.62k|        Lib_IntVector_Intrinsics_vec256 a11 = Lib_IntVector_Intrinsics_vec256_add64(a1, f11);
  ------------------
  |  |  365|  5.62k|    (_mm256_add_epi64(x0, x1))
  ------------------
  764|  5.62k|        Lib_IntVector_Intrinsics_vec256 a21 = Lib_IntVector_Intrinsics_vec256_add64(a2, f12);
  ------------------
  |  |  365|  5.62k|    (_mm256_add_epi64(x0, x1))
  ------------------
  765|  5.62k|        Lib_IntVector_Intrinsics_vec256 a31 = Lib_IntVector_Intrinsics_vec256_add64(a3, f13);
  ------------------
  |  |  365|  5.62k|    (_mm256_add_epi64(x0, x1))
  ------------------
  766|  5.62k|        Lib_IntVector_Intrinsics_vec256 a41 = Lib_IntVector_Intrinsics_vec256_add64(a4, f14);
  ------------------
  |  |  365|  5.62k|    (_mm256_add_epi64(x0, x1))
  ------------------
  767|  5.62k|        Lib_IntVector_Intrinsics_vec256 a02 = Lib_IntVector_Intrinsics_vec256_mul64(r0, a01);
  ------------------
  |  |  371|  5.62k|    (_mm256_mul_epu32(x0, x1))
  ------------------
  768|  5.62k|        Lib_IntVector_Intrinsics_vec256 a12 = Lib_IntVector_Intrinsics_vec256_mul64(r11, a01);
  ------------------
  |  |  371|  5.62k|    (_mm256_mul_epu32(x0, x1))
  ------------------
  769|  5.62k|        Lib_IntVector_Intrinsics_vec256 a22 = Lib_IntVector_Intrinsics_vec256_mul64(r2, a01);
  ------------------
  |  |  371|  5.62k|    (_mm256_mul_epu32(x0, x1))
  ------------------
  770|  5.62k|        Lib_IntVector_Intrinsics_vec256 a32 = Lib_IntVector_Intrinsics_vec256_mul64(r3, a01);
  ------------------
  |  |  371|  5.62k|    (_mm256_mul_epu32(x0, x1))
  ------------------
  771|  5.62k|        Lib_IntVector_Intrinsics_vec256 a42 = Lib_IntVector_Intrinsics_vec256_mul64(r4, a01);
  ------------------
  |  |  371|  5.62k|    (_mm256_mul_epu32(x0, x1))
  ------------------
  772|  5.62k|        Lib_IntVector_Intrinsics_vec256
  773|  5.62k|            a03 =
  774|  5.62k|                Lib_IntVector_Intrinsics_vec256_add64(a02,
  ------------------
  |  |  365|  5.62k|    (_mm256_add_epi64(x0, x1))
  ------------------
  775|  5.62k|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r54, a11));
  776|  5.62k|        Lib_IntVector_Intrinsics_vec256
  777|  5.62k|            a13 =
  778|  5.62k|                Lib_IntVector_Intrinsics_vec256_add64(a12,
  ------------------
  |  |  365|  5.62k|    (_mm256_add_epi64(x0, x1))
  ------------------
  779|  5.62k|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r0, a11));
  780|  5.62k|        Lib_IntVector_Intrinsics_vec256
  781|  5.62k|            a23 =
  782|  5.62k|                Lib_IntVector_Intrinsics_vec256_add64(a22,
  ------------------
  |  |  365|  5.62k|    (_mm256_add_epi64(x0, x1))
  ------------------
  783|  5.62k|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r11, a11));
  784|  5.62k|        Lib_IntVector_Intrinsics_vec256
  785|  5.62k|            a33 =
  786|  5.62k|                Lib_IntVector_Intrinsics_vec256_add64(a32,
  ------------------
  |  |  365|  5.62k|    (_mm256_add_epi64(x0, x1))
  ------------------
  787|  5.62k|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r2, a11));
  788|  5.62k|        Lib_IntVector_Intrinsics_vec256
  789|  5.62k|            a43 =
  790|  5.62k|                Lib_IntVector_Intrinsics_vec256_add64(a42,
  ------------------
  |  |  365|  5.62k|    (_mm256_add_epi64(x0, x1))
  ------------------
  791|  5.62k|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r3, a11));
  792|  5.62k|        Lib_IntVector_Intrinsics_vec256
  793|  5.62k|            a04 =
  794|  5.62k|                Lib_IntVector_Intrinsics_vec256_add64(a03,
  ------------------
  |  |  365|  5.62k|    (_mm256_add_epi64(x0, x1))
  ------------------
  795|  5.62k|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r53, a21));
  796|  5.62k|        Lib_IntVector_Intrinsics_vec256
  797|  5.62k|            a14 =
  798|  5.62k|                Lib_IntVector_Intrinsics_vec256_add64(a13,
  ------------------
  |  |  365|  5.62k|    (_mm256_add_epi64(x0, x1))
  ------------------
  799|  5.62k|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r54, a21));
  800|  5.62k|        Lib_IntVector_Intrinsics_vec256
  801|  5.62k|            a24 =
  802|  5.62k|                Lib_IntVector_Intrinsics_vec256_add64(a23,
  ------------------
  |  |  365|  5.62k|    (_mm256_add_epi64(x0, x1))
  ------------------
  803|  5.62k|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r0, a21));
  804|  5.62k|        Lib_IntVector_Intrinsics_vec256
  805|  5.62k|            a34 =
  806|  5.62k|                Lib_IntVector_Intrinsics_vec256_add64(a33,
  ------------------
  |  |  365|  5.62k|    (_mm256_add_epi64(x0, x1))
  ------------------
  807|  5.62k|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r11, a21));
  808|  5.62k|        Lib_IntVector_Intrinsics_vec256
  809|  5.62k|            a44 =
  810|  5.62k|                Lib_IntVector_Intrinsics_vec256_add64(a43,
  ------------------
  |  |  365|  5.62k|    (_mm256_add_epi64(x0, x1))
  ------------------
  811|  5.62k|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r2, a21));
  812|  5.62k|        Lib_IntVector_Intrinsics_vec256
  813|  5.62k|            a05 =
  814|  5.62k|                Lib_IntVector_Intrinsics_vec256_add64(a04,
  ------------------
  |  |  365|  5.62k|    (_mm256_add_epi64(x0, x1))
  ------------------
  815|  5.62k|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r52, a31));
  816|  5.62k|        Lib_IntVector_Intrinsics_vec256
  817|  5.62k|            a15 =
  818|  5.62k|                Lib_IntVector_Intrinsics_vec256_add64(a14,
  ------------------
  |  |  365|  5.62k|    (_mm256_add_epi64(x0, x1))
  ------------------
  819|  5.62k|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r53, a31));
  820|  5.62k|        Lib_IntVector_Intrinsics_vec256
  821|  5.62k|            a25 =
  822|  5.62k|                Lib_IntVector_Intrinsics_vec256_add64(a24,
  ------------------
  |  |  365|  5.62k|    (_mm256_add_epi64(x0, x1))
  ------------------
  823|  5.62k|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r54, a31));
  824|  5.62k|        Lib_IntVector_Intrinsics_vec256
  825|  5.62k|            a35 =
  826|  5.62k|                Lib_IntVector_Intrinsics_vec256_add64(a34,
  ------------------
  |  |  365|  5.62k|    (_mm256_add_epi64(x0, x1))
  ------------------
  827|  5.62k|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r0, a31));
  828|  5.62k|        Lib_IntVector_Intrinsics_vec256
  829|  5.62k|            a45 =
  830|  5.62k|                Lib_IntVector_Intrinsics_vec256_add64(a44,
  ------------------
  |  |  365|  5.62k|    (_mm256_add_epi64(x0, x1))
  ------------------
  831|  5.62k|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r11, a31));
  832|  5.62k|        Lib_IntVector_Intrinsics_vec256
  833|  5.62k|            a06 =
  834|  5.62k|                Lib_IntVector_Intrinsics_vec256_add64(a05,
  ------------------
  |  |  365|  5.62k|    (_mm256_add_epi64(x0, x1))
  ------------------
  835|  5.62k|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r51, a41));
  836|  5.62k|        Lib_IntVector_Intrinsics_vec256
  837|  5.62k|            a16 =
  838|  5.62k|                Lib_IntVector_Intrinsics_vec256_add64(a15,
  ------------------
  |  |  365|  5.62k|    (_mm256_add_epi64(x0, x1))
  ------------------
  839|  5.62k|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r52, a41));
  840|  5.62k|        Lib_IntVector_Intrinsics_vec256
  841|  5.62k|            a26 =
  842|  5.62k|                Lib_IntVector_Intrinsics_vec256_add64(a25,
  ------------------
  |  |  365|  5.62k|    (_mm256_add_epi64(x0, x1))
  ------------------
  843|  5.62k|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r53, a41));
  844|  5.62k|        Lib_IntVector_Intrinsics_vec256
  845|  5.62k|            a36 =
  846|  5.62k|                Lib_IntVector_Intrinsics_vec256_add64(a35,
  ------------------
  |  |  365|  5.62k|    (_mm256_add_epi64(x0, x1))
  ------------------
  847|  5.62k|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r54, a41));
  848|  5.62k|        Lib_IntVector_Intrinsics_vec256
  849|  5.62k|            a46 =
  850|  5.62k|                Lib_IntVector_Intrinsics_vec256_add64(a45,
  ------------------
  |  |  365|  5.62k|    (_mm256_add_epi64(x0, x1))
  ------------------
  851|  5.62k|                                                      Lib_IntVector_Intrinsics_vec256_mul64(r0, a41));
  852|  5.62k|        Lib_IntVector_Intrinsics_vec256 t0 = a06;
  853|  5.62k|        Lib_IntVector_Intrinsics_vec256 t1 = a16;
  854|  5.62k|        Lib_IntVector_Intrinsics_vec256 t2 = a26;
  855|  5.62k|        Lib_IntVector_Intrinsics_vec256 t3 = a36;
  856|  5.62k|        Lib_IntVector_Intrinsics_vec256 t4 = a46;
  857|  5.62k|        Lib_IntVector_Intrinsics_vec256
  858|  5.62k|            mask26 = Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3ffffffU);
  ------------------
  |  |  389|  5.62k|    (_mm256_set1_epi64x(x1)) /* hi lo */
  ------------------
  859|  5.62k|        Lib_IntVector_Intrinsics_vec256
  860|  5.62k|            z0 = Lib_IntVector_Intrinsics_vec256_shift_right64(t0, (uint32_t)26U);
  ------------------
  |  |  257|  5.62k|    (_mm256_srli_epi64(x0, x1))
  ------------------
  861|  5.62k|        Lib_IntVector_Intrinsics_vec256
  862|  5.62k|            z1 = Lib_IntVector_Intrinsics_vec256_shift_right64(t3, (uint32_t)26U);
  ------------------
  |  |  257|  5.62k|    (_mm256_srli_epi64(x0, x1))
  ------------------
  863|  5.62k|        Lib_IntVector_Intrinsics_vec256 x0 = Lib_IntVector_Intrinsics_vec256_and(t0, mask26);
  ------------------
  |  |  242|  5.62k|    (_mm256_and_si256(x0, x1))
  ------------------
  864|  5.62k|        Lib_IntVector_Intrinsics_vec256 x3 = Lib_IntVector_Intrinsics_vec256_and(t3, mask26);
  ------------------
  |  |  242|  5.62k|    (_mm256_and_si256(x0, x1))
  ------------------
  865|  5.62k|        Lib_IntVector_Intrinsics_vec256 x1 = Lib_IntVector_Intrinsics_vec256_add64(t1, z0);
  ------------------
  |  |  365|  5.62k|    (_mm256_add_epi64(x0, x1))
  ------------------
  866|  5.62k|        Lib_IntVector_Intrinsics_vec256 x4 = Lib_IntVector_Intrinsics_vec256_add64(t4, z1);
  ------------------
  |  |  365|  5.62k|    (_mm256_add_epi64(x0, x1))
  ------------------
  867|  5.62k|        Lib_IntVector_Intrinsics_vec256
  868|  5.62k|            z01 = Lib_IntVector_Intrinsics_vec256_shift_right64(x1, (uint32_t)26U);
  ------------------
  |  |  257|  5.62k|    (_mm256_srli_epi64(x0, x1))
  ------------------
  869|  5.62k|        Lib_IntVector_Intrinsics_vec256
  870|  5.62k|            z11 = Lib_IntVector_Intrinsics_vec256_shift_right64(x4, (uint32_t)26U);
  ------------------
  |  |  257|  5.62k|    (_mm256_srli_epi64(x0, x1))
  ------------------
  871|  5.62k|        Lib_IntVector_Intrinsics_vec256
  872|  5.62k|            t = Lib_IntVector_Intrinsics_vec256_shift_left64(z11, (uint32_t)2U);
  ------------------
  |  |  254|  5.62k|    (_mm256_slli_epi64(x0, x1))
  ------------------
  873|  5.62k|        Lib_IntVector_Intrinsics_vec256 z12 = Lib_IntVector_Intrinsics_vec256_add64(z11, t);
  ------------------
  |  |  365|  5.62k|    (_mm256_add_epi64(x0, x1))
  ------------------
  874|  5.62k|        Lib_IntVector_Intrinsics_vec256 x11 = Lib_IntVector_Intrinsics_vec256_and(x1, mask26);
  ------------------
  |  |  242|  5.62k|    (_mm256_and_si256(x0, x1))
  ------------------
  875|  5.62k|        Lib_IntVector_Intrinsics_vec256 x41 = Lib_IntVector_Intrinsics_vec256_and(x4, mask26);
  ------------------
  |  |  242|  5.62k|    (_mm256_and_si256(x0, x1))
  ------------------
  876|  5.62k|        Lib_IntVector_Intrinsics_vec256 x2 = Lib_IntVector_Intrinsics_vec256_add64(t2, z01);
  ------------------
  |  |  365|  5.62k|    (_mm256_add_epi64(x0, x1))
  ------------------
  877|  5.62k|        Lib_IntVector_Intrinsics_vec256 x01 = Lib_IntVector_Intrinsics_vec256_add64(x0, z12);
  ------------------
  |  |  365|  5.62k|    (_mm256_add_epi64(x0, x1))
  ------------------
  878|  5.62k|        Lib_IntVector_Intrinsics_vec256
  879|  5.62k|            z02 = Lib_IntVector_Intrinsics_vec256_shift_right64(x2, (uint32_t)26U);
  ------------------
  |  |  257|  5.62k|    (_mm256_srli_epi64(x0, x1))
  ------------------
  880|  5.62k|        Lib_IntVector_Intrinsics_vec256
  881|  5.62k|            z13 = Lib_IntVector_Intrinsics_vec256_shift_right64(x01, (uint32_t)26U);
  ------------------
  |  |  257|  5.62k|    (_mm256_srli_epi64(x0, x1))
  ------------------
  882|  5.62k|        Lib_IntVector_Intrinsics_vec256 x21 = Lib_IntVector_Intrinsics_vec256_and(x2, mask26);
  ------------------
  |  |  242|  5.62k|    (_mm256_and_si256(x0, x1))
  ------------------
  883|  5.62k|        Lib_IntVector_Intrinsics_vec256 x02 = Lib_IntVector_Intrinsics_vec256_and(x01, mask26);
  ------------------
  |  |  242|  5.62k|    (_mm256_and_si256(x0, x1))
  ------------------
  884|  5.62k|        Lib_IntVector_Intrinsics_vec256 x31 = Lib_IntVector_Intrinsics_vec256_add64(x3, z02);
  ------------------
  |  |  365|  5.62k|    (_mm256_add_epi64(x0, x1))
  ------------------
  885|  5.62k|        Lib_IntVector_Intrinsics_vec256 x12 = Lib_IntVector_Intrinsics_vec256_add64(x11, z13);
  ------------------
  |  |  365|  5.62k|    (_mm256_add_epi64(x0, x1))
  ------------------
  886|  5.62k|        Lib_IntVector_Intrinsics_vec256
  887|  5.62k|            z03 = Lib_IntVector_Intrinsics_vec256_shift_right64(x31, (uint32_t)26U);
  ------------------
  |  |  257|  5.62k|    (_mm256_srli_epi64(x0, x1))
  ------------------
  888|  5.62k|        Lib_IntVector_Intrinsics_vec256 x32 = Lib_IntVector_Intrinsics_vec256_and(x31, mask26);
  ------------------
  |  |  242|  5.62k|    (_mm256_and_si256(x0, x1))
  ------------------
  889|  5.62k|        Lib_IntVector_Intrinsics_vec256 x42 = Lib_IntVector_Intrinsics_vec256_add64(x41, z03);
  ------------------
  |  |  365|  5.62k|    (_mm256_add_epi64(x0, x1))
  ------------------
  890|  5.62k|        Lib_IntVector_Intrinsics_vec256 o0 = x02;
  891|  5.62k|        Lib_IntVector_Intrinsics_vec256 o1 = x12;
  892|  5.62k|        Lib_IntVector_Intrinsics_vec256 o2 = x21;
  893|  5.62k|        Lib_IntVector_Intrinsics_vec256 o3 = x32;
  894|  5.62k|        Lib_IntVector_Intrinsics_vec256 o4 = x42;
  895|  5.62k|        acc[0U] = o0;
  896|  5.62k|        acc[1U] = o1;
  897|  5.62k|        acc[2U] = o2;
  898|  5.62k|        acc[3U] = o3;
  899|  5.62k|        acc[4U] = o4;
  900|  5.62k|        return;
  901|  5.62k|    }
  902|  5.76k|}

Hacl_Chacha20_Vec256_chacha20_encrypt_256:
  223|  10.1k|{
  224|  10.1k|    KRML_PRE_ALIGN(32)
  225|  10.1k|    Lib_IntVector_Intrinsics_vec256 ctx[16U] KRML_POST_ALIGN(32) = { 0U };
  226|  10.1k|    chacha20_init_256(ctx, key, n, ctr);
  227|  10.1k|    uint32_t rem = len % (uint32_t)512U;
  228|  10.1k|    uint32_t nb = len / (uint32_t)512U;
  229|  10.1k|    uint32_t rem1 = len % (uint32_t)512U;
  230|  10.1k|    for (uint32_t i = (uint32_t)0U; i < nb; i++) {
  ------------------
  |  Branch (230:37): [True: 0, False: 10.1k]
  ------------------
  231|      0|        uint8_t *uu____0 = out + i * (uint32_t)512U;
  232|      0|        uint8_t *uu____1 = text + i * (uint32_t)512U;
  233|      0|        KRML_PRE_ALIGN(32)
  234|      0|        Lib_IntVector_Intrinsics_vec256 k[16U] KRML_POST_ALIGN(32) = { 0U };
  235|      0|        chacha20_core_256(k, ctx, i);
  236|      0|        Lib_IntVector_Intrinsics_vec256 st0 = k[0U];
  237|      0|        Lib_IntVector_Intrinsics_vec256 st1 = k[1U];
  238|      0|        Lib_IntVector_Intrinsics_vec256 st2 = k[2U];
  239|      0|        Lib_IntVector_Intrinsics_vec256 st3 = k[3U];
  240|      0|        Lib_IntVector_Intrinsics_vec256 st4 = k[4U];
  241|      0|        Lib_IntVector_Intrinsics_vec256 st5 = k[5U];
  242|      0|        Lib_IntVector_Intrinsics_vec256 st6 = k[6U];
  243|      0|        Lib_IntVector_Intrinsics_vec256 st7 = k[7U];
  244|      0|        Lib_IntVector_Intrinsics_vec256 st8 = k[8U];
  245|      0|        Lib_IntVector_Intrinsics_vec256 st9 = k[9U];
  246|      0|        Lib_IntVector_Intrinsics_vec256 st10 = k[10U];
  247|      0|        Lib_IntVector_Intrinsics_vec256 st11 = k[11U];
  248|      0|        Lib_IntVector_Intrinsics_vec256 st12 = k[12U];
  249|      0|        Lib_IntVector_Intrinsics_vec256 st13 = k[13U];
  250|      0|        Lib_IntVector_Intrinsics_vec256 st14 = k[14U];
  251|      0|        Lib_IntVector_Intrinsics_vec256 st15 = k[15U];
  252|      0|        Lib_IntVector_Intrinsics_vec256 v00 = st0;
  253|      0|        Lib_IntVector_Intrinsics_vec256 v16 = st1;
  254|      0|        Lib_IntVector_Intrinsics_vec256 v20 = st2;
  255|      0|        Lib_IntVector_Intrinsics_vec256 v30 = st3;
  256|      0|        Lib_IntVector_Intrinsics_vec256 v40 = st4;
  257|      0|        Lib_IntVector_Intrinsics_vec256 v50 = st5;
  258|      0|        Lib_IntVector_Intrinsics_vec256 v60 = st6;
  259|      0|        Lib_IntVector_Intrinsics_vec256 v70 = st7;
  260|      0|        Lib_IntVector_Intrinsics_vec256
  261|      0|            v0_ = Lib_IntVector_Intrinsics_vec256_interleave_low32(v00, v16);
  ------------------
  |  |  407|      0|    (_mm256_unpacklo_epi32(x1, x2))
  ------------------
  262|      0|        Lib_IntVector_Intrinsics_vec256
  263|      0|            v1_ = Lib_IntVector_Intrinsics_vec256_interleave_high32(v00, v16);
  ------------------
  |  |  410|      0|    (_mm256_unpackhi_epi32(x1, x2))
  ------------------
  264|      0|        Lib_IntVector_Intrinsics_vec256
  265|      0|            v2_ = Lib_IntVector_Intrinsics_vec256_interleave_low32(v20, v30);
  ------------------
  |  |  407|      0|    (_mm256_unpacklo_epi32(x1, x2))
  ------------------
  266|      0|        Lib_IntVector_Intrinsics_vec256
  267|      0|            v3_ = Lib_IntVector_Intrinsics_vec256_interleave_high32(v20, v30);
  ------------------
  |  |  410|      0|    (_mm256_unpackhi_epi32(x1, x2))
  ------------------
  268|      0|        Lib_IntVector_Intrinsics_vec256
  269|      0|            v4_ = Lib_IntVector_Intrinsics_vec256_interleave_low32(v40, v50);
  ------------------
  |  |  407|      0|    (_mm256_unpacklo_epi32(x1, x2))
  ------------------
  270|      0|        Lib_IntVector_Intrinsics_vec256
  271|      0|            v5_ = Lib_IntVector_Intrinsics_vec256_interleave_high32(v40, v50);
  ------------------
  |  |  410|      0|    (_mm256_unpackhi_epi32(x1, x2))
  ------------------
  272|      0|        Lib_IntVector_Intrinsics_vec256
  273|      0|            v6_ = Lib_IntVector_Intrinsics_vec256_interleave_low32(v60, v70);
  ------------------
  |  |  407|      0|    (_mm256_unpacklo_epi32(x1, x2))
  ------------------
  274|      0|        Lib_IntVector_Intrinsics_vec256
  275|      0|            v7_ = Lib_IntVector_Intrinsics_vec256_interleave_high32(v60, v70);
  ------------------
  |  |  410|      0|    (_mm256_unpackhi_epi32(x1, x2))
  ------------------
  276|      0|        Lib_IntVector_Intrinsics_vec256 v0_0 = v0_;
  277|      0|        Lib_IntVector_Intrinsics_vec256 v1_0 = v1_;
  278|      0|        Lib_IntVector_Intrinsics_vec256 v2_0 = v2_;
  279|      0|        Lib_IntVector_Intrinsics_vec256 v3_0 = v3_;
  280|      0|        Lib_IntVector_Intrinsics_vec256 v4_0 = v4_;
  281|      0|        Lib_IntVector_Intrinsics_vec256 v5_0 = v5_;
  282|      0|        Lib_IntVector_Intrinsics_vec256 v6_0 = v6_;
  283|      0|        Lib_IntVector_Intrinsics_vec256 v7_0 = v7_;
  284|      0|        Lib_IntVector_Intrinsics_vec256
  285|      0|            v0_1 = Lib_IntVector_Intrinsics_vec256_interleave_low64(v0_0, v2_0);
  ------------------
  |  |  413|      0|    (_mm256_unpacklo_epi64(x1, x2))
  ------------------
  286|      0|        Lib_IntVector_Intrinsics_vec256
  287|      0|            v2_1 = Lib_IntVector_Intrinsics_vec256_interleave_high64(v0_0, v2_0);
  ------------------
  |  |  416|      0|    (_mm256_unpackhi_epi64(x1, x2))
  ------------------
  288|      0|        Lib_IntVector_Intrinsics_vec256
  289|      0|            v1_1 = Lib_IntVector_Intrinsics_vec256_interleave_low64(v1_0, v3_0);
  ------------------
  |  |  413|      0|    (_mm256_unpacklo_epi64(x1, x2))
  ------------------
  290|      0|        Lib_IntVector_Intrinsics_vec256
  291|      0|            v3_1 = Lib_IntVector_Intrinsics_vec256_interleave_high64(v1_0, v3_0);
  ------------------
  |  |  416|      0|    (_mm256_unpackhi_epi64(x1, x2))
  ------------------
  292|      0|        Lib_IntVector_Intrinsics_vec256
  293|      0|            v4_1 = Lib_IntVector_Intrinsics_vec256_interleave_low64(v4_0, v6_0);
  ------------------
  |  |  413|      0|    (_mm256_unpacklo_epi64(x1, x2))
  ------------------
  294|      0|        Lib_IntVector_Intrinsics_vec256
  295|      0|            v6_1 = Lib_IntVector_Intrinsics_vec256_interleave_high64(v4_0, v6_0);
  ------------------
  |  |  416|      0|    (_mm256_unpackhi_epi64(x1, x2))
  ------------------
  296|      0|        Lib_IntVector_Intrinsics_vec256
  297|      0|            v5_1 = Lib_IntVector_Intrinsics_vec256_interleave_low64(v5_0, v7_0);
  ------------------
  |  |  413|      0|    (_mm256_unpacklo_epi64(x1, x2))
  ------------------
  298|      0|        Lib_IntVector_Intrinsics_vec256
  299|      0|            v7_1 = Lib_IntVector_Intrinsics_vec256_interleave_high64(v5_0, v7_0);
  ------------------
  |  |  416|      0|    (_mm256_unpackhi_epi64(x1, x2))
  ------------------
  300|      0|        Lib_IntVector_Intrinsics_vec256 v0_10 = v0_1;
  301|      0|        Lib_IntVector_Intrinsics_vec256 v1_10 = v1_1;
  302|      0|        Lib_IntVector_Intrinsics_vec256 v2_10 = v2_1;
  303|      0|        Lib_IntVector_Intrinsics_vec256 v3_10 = v3_1;
  304|      0|        Lib_IntVector_Intrinsics_vec256 v4_10 = v4_1;
  305|      0|        Lib_IntVector_Intrinsics_vec256 v5_10 = v5_1;
  306|      0|        Lib_IntVector_Intrinsics_vec256 v6_10 = v6_1;
  307|      0|        Lib_IntVector_Intrinsics_vec256 v7_10 = v7_1;
  308|      0|        Lib_IntVector_Intrinsics_vec256
  309|      0|            v0_2 = Lib_IntVector_Intrinsics_vec256_interleave_low128(v0_10, v4_10);
  ------------------
  |  |  419|      0|    (_mm256_permute2x128_si256(x1, x2, 0x20))
  ------------------
  310|      0|        Lib_IntVector_Intrinsics_vec256
  311|      0|            v4_2 = Lib_IntVector_Intrinsics_vec256_interleave_high128(v0_10, v4_10);
  ------------------
  |  |  422|      0|    (_mm256_permute2x128_si256(x1, x2, 0x31))
  ------------------
  312|      0|        Lib_IntVector_Intrinsics_vec256
  313|      0|            v1_2 = Lib_IntVector_Intrinsics_vec256_interleave_low128(v1_10, v5_10);
  ------------------
  |  |  419|      0|    (_mm256_permute2x128_si256(x1, x2, 0x20))
  ------------------
  314|      0|        Lib_IntVector_Intrinsics_vec256
  315|      0|            v5_2 = Lib_IntVector_Intrinsics_vec256_interleave_high128(v1_10, v5_10);
  ------------------
  |  |  422|      0|    (_mm256_permute2x128_si256(x1, x2, 0x31))
  ------------------
  316|      0|        Lib_IntVector_Intrinsics_vec256
  317|      0|            v2_2 = Lib_IntVector_Intrinsics_vec256_interleave_low128(v2_10, v6_10);
  ------------------
  |  |  419|      0|    (_mm256_permute2x128_si256(x1, x2, 0x20))
  ------------------
  318|      0|        Lib_IntVector_Intrinsics_vec256
  319|      0|            v6_2 = Lib_IntVector_Intrinsics_vec256_interleave_high128(v2_10, v6_10);
  ------------------
  |  |  422|      0|    (_mm256_permute2x128_si256(x1, x2, 0x31))
  ------------------
  320|      0|        Lib_IntVector_Intrinsics_vec256
  321|      0|            v3_2 = Lib_IntVector_Intrinsics_vec256_interleave_low128(v3_10, v7_10);
  ------------------
  |  |  419|      0|    (_mm256_permute2x128_si256(x1, x2, 0x20))
  ------------------
  322|      0|        Lib_IntVector_Intrinsics_vec256
  323|      0|            v7_2 = Lib_IntVector_Intrinsics_vec256_interleave_high128(v3_10, v7_10);
  ------------------
  |  |  422|      0|    (_mm256_permute2x128_si256(x1, x2, 0x31))
  ------------------
  324|      0|        Lib_IntVector_Intrinsics_vec256 v0_20 = v0_2;
  325|      0|        Lib_IntVector_Intrinsics_vec256 v1_20 = v1_2;
  326|      0|        Lib_IntVector_Intrinsics_vec256 v2_20 = v2_2;
  327|      0|        Lib_IntVector_Intrinsics_vec256 v3_20 = v3_2;
  328|      0|        Lib_IntVector_Intrinsics_vec256 v4_20 = v4_2;
  329|      0|        Lib_IntVector_Intrinsics_vec256 v5_20 = v5_2;
  330|      0|        Lib_IntVector_Intrinsics_vec256 v6_20 = v6_2;
  331|      0|        Lib_IntVector_Intrinsics_vec256 v7_20 = v7_2;
  332|      0|        Lib_IntVector_Intrinsics_vec256 v0_3 = v0_20;
  333|      0|        Lib_IntVector_Intrinsics_vec256 v1_3 = v1_20;
  334|      0|        Lib_IntVector_Intrinsics_vec256 v2_3 = v2_20;
  335|      0|        Lib_IntVector_Intrinsics_vec256 v3_3 = v3_20;
  336|      0|        Lib_IntVector_Intrinsics_vec256 v4_3 = v4_20;
  337|      0|        Lib_IntVector_Intrinsics_vec256 v5_3 = v5_20;
  338|      0|        Lib_IntVector_Intrinsics_vec256 v6_3 = v6_20;
  339|      0|        Lib_IntVector_Intrinsics_vec256 v7_3 = v7_20;
  340|      0|        Lib_IntVector_Intrinsics_vec256 v0 = v0_3;
  341|      0|        Lib_IntVector_Intrinsics_vec256 v1 = v2_3;
  342|      0|        Lib_IntVector_Intrinsics_vec256 v2 = v1_3;
  343|      0|        Lib_IntVector_Intrinsics_vec256 v3 = v3_3;
  344|      0|        Lib_IntVector_Intrinsics_vec256 v4 = v4_3;
  345|      0|        Lib_IntVector_Intrinsics_vec256 v5 = v6_3;
  346|      0|        Lib_IntVector_Intrinsics_vec256 v6 = v5_3;
  347|      0|        Lib_IntVector_Intrinsics_vec256 v7 = v7_3;
  348|      0|        Lib_IntVector_Intrinsics_vec256 v01 = st8;
  349|      0|        Lib_IntVector_Intrinsics_vec256 v110 = st9;
  350|      0|        Lib_IntVector_Intrinsics_vec256 v21 = st10;
  351|      0|        Lib_IntVector_Intrinsics_vec256 v31 = st11;
  352|      0|        Lib_IntVector_Intrinsics_vec256 v41 = st12;
  353|      0|        Lib_IntVector_Intrinsics_vec256 v51 = st13;
  354|      0|        Lib_IntVector_Intrinsics_vec256 v61 = st14;
  355|      0|        Lib_IntVector_Intrinsics_vec256 v71 = st15;
  356|      0|        Lib_IntVector_Intrinsics_vec256
  357|      0|            v0_4 = Lib_IntVector_Intrinsics_vec256_interleave_low32(v01, v110);
  ------------------
  |  |  407|      0|    (_mm256_unpacklo_epi32(x1, x2))
  ------------------
  358|      0|        Lib_IntVector_Intrinsics_vec256
  359|      0|            v1_4 = Lib_IntVector_Intrinsics_vec256_interleave_high32(v01, v110);
  ------------------
  |  |  410|      0|    (_mm256_unpackhi_epi32(x1, x2))
  ------------------
  360|      0|        Lib_IntVector_Intrinsics_vec256
  361|      0|            v2_4 = Lib_IntVector_Intrinsics_vec256_interleave_low32(v21, v31);
  ------------------
  |  |  407|      0|    (_mm256_unpacklo_epi32(x1, x2))
  ------------------
  362|      0|        Lib_IntVector_Intrinsics_vec256
  363|      0|            v3_4 = Lib_IntVector_Intrinsics_vec256_interleave_high32(v21, v31);
  ------------------
  |  |  410|      0|    (_mm256_unpackhi_epi32(x1, x2))
  ------------------
  364|      0|        Lib_IntVector_Intrinsics_vec256
  365|      0|            v4_4 = Lib_IntVector_Intrinsics_vec256_interleave_low32(v41, v51);
  ------------------
  |  |  407|      0|    (_mm256_unpacklo_epi32(x1, x2))
  ------------------
  366|      0|        Lib_IntVector_Intrinsics_vec256
  367|      0|            v5_4 = Lib_IntVector_Intrinsics_vec256_interleave_high32(v41, v51);
  ------------------
  |  |  410|      0|    (_mm256_unpackhi_epi32(x1, x2))
  ------------------
  368|      0|        Lib_IntVector_Intrinsics_vec256
  369|      0|            v6_4 = Lib_IntVector_Intrinsics_vec256_interleave_low32(v61, v71);
  ------------------
  |  |  407|      0|    (_mm256_unpacklo_epi32(x1, x2))
  ------------------
  370|      0|        Lib_IntVector_Intrinsics_vec256
  371|      0|            v7_4 = Lib_IntVector_Intrinsics_vec256_interleave_high32(v61, v71);
  ------------------
  |  |  410|      0|    (_mm256_unpackhi_epi32(x1, x2))
  ------------------
  372|      0|        Lib_IntVector_Intrinsics_vec256 v0_5 = v0_4;
  373|      0|        Lib_IntVector_Intrinsics_vec256 v1_5 = v1_4;
  374|      0|        Lib_IntVector_Intrinsics_vec256 v2_5 = v2_4;
  375|      0|        Lib_IntVector_Intrinsics_vec256 v3_5 = v3_4;
  376|      0|        Lib_IntVector_Intrinsics_vec256 v4_5 = v4_4;
  377|      0|        Lib_IntVector_Intrinsics_vec256 v5_5 = v5_4;
  378|      0|        Lib_IntVector_Intrinsics_vec256 v6_5 = v6_4;
  379|      0|        Lib_IntVector_Intrinsics_vec256 v7_5 = v7_4;
  380|      0|        Lib_IntVector_Intrinsics_vec256
  381|      0|            v0_11 = Lib_IntVector_Intrinsics_vec256_interleave_low64(v0_5, v2_5);
  ------------------
  |  |  413|      0|    (_mm256_unpacklo_epi64(x1, x2))
  ------------------
  382|      0|        Lib_IntVector_Intrinsics_vec256
  383|      0|            v2_11 = Lib_IntVector_Intrinsics_vec256_interleave_high64(v0_5, v2_5);
  ------------------
  |  |  416|      0|    (_mm256_unpackhi_epi64(x1, x2))
  ------------------
  384|      0|        Lib_IntVector_Intrinsics_vec256
  385|      0|            v1_11 = Lib_IntVector_Intrinsics_vec256_interleave_low64(v1_5, v3_5);
  ------------------
  |  |  413|      0|    (_mm256_unpacklo_epi64(x1, x2))
  ------------------
  386|      0|        Lib_IntVector_Intrinsics_vec256
  387|      0|            v3_11 = Lib_IntVector_Intrinsics_vec256_interleave_high64(v1_5, v3_5);
  ------------------
  |  |  416|      0|    (_mm256_unpackhi_epi64(x1, x2))
  ------------------
  388|      0|        Lib_IntVector_Intrinsics_vec256
  389|      0|            v4_11 = Lib_IntVector_Intrinsics_vec256_interleave_low64(v4_5, v6_5);
  ------------------
  |  |  413|      0|    (_mm256_unpacklo_epi64(x1, x2))
  ------------------
  390|      0|        Lib_IntVector_Intrinsics_vec256
  391|      0|            v6_11 = Lib_IntVector_Intrinsics_vec256_interleave_high64(v4_5, v6_5);
  ------------------
  |  |  416|      0|    (_mm256_unpackhi_epi64(x1, x2))
  ------------------
  392|      0|        Lib_IntVector_Intrinsics_vec256
  393|      0|            v5_11 = Lib_IntVector_Intrinsics_vec256_interleave_low64(v5_5, v7_5);
  ------------------
  |  |  413|      0|    (_mm256_unpacklo_epi64(x1, x2))
  ------------------
  394|      0|        Lib_IntVector_Intrinsics_vec256
  395|      0|            v7_11 = Lib_IntVector_Intrinsics_vec256_interleave_high64(v5_5, v7_5);
  ------------------
  |  |  416|      0|    (_mm256_unpackhi_epi64(x1, x2))
  ------------------
  396|      0|        Lib_IntVector_Intrinsics_vec256 v0_12 = v0_11;
  397|      0|        Lib_IntVector_Intrinsics_vec256 v1_12 = v1_11;
  398|      0|        Lib_IntVector_Intrinsics_vec256 v2_12 = v2_11;
  399|      0|        Lib_IntVector_Intrinsics_vec256 v3_12 = v3_11;
  400|      0|        Lib_IntVector_Intrinsics_vec256 v4_12 = v4_11;
  401|      0|        Lib_IntVector_Intrinsics_vec256 v5_12 = v5_11;
  402|      0|        Lib_IntVector_Intrinsics_vec256 v6_12 = v6_11;
  403|      0|        Lib_IntVector_Intrinsics_vec256 v7_12 = v7_11;
  404|      0|        Lib_IntVector_Intrinsics_vec256
  405|      0|            v0_21 = Lib_IntVector_Intrinsics_vec256_interleave_low128(v0_12, v4_12);
  ------------------
  |  |  419|      0|    (_mm256_permute2x128_si256(x1, x2, 0x20))
  ------------------
  406|      0|        Lib_IntVector_Intrinsics_vec256
  407|      0|            v4_21 = Lib_IntVector_Intrinsics_vec256_interleave_high128(v0_12, v4_12);
  ------------------
  |  |  422|      0|    (_mm256_permute2x128_si256(x1, x2, 0x31))
  ------------------
  408|      0|        Lib_IntVector_Intrinsics_vec256
  409|      0|            v1_21 = Lib_IntVector_Intrinsics_vec256_interleave_low128(v1_12, v5_12);
  ------------------
  |  |  419|      0|    (_mm256_permute2x128_si256(x1, x2, 0x20))
  ------------------
  410|      0|        Lib_IntVector_Intrinsics_vec256
  411|      0|            v5_21 = Lib_IntVector_Intrinsics_vec256_interleave_high128(v1_12, v5_12);
  ------------------
  |  |  422|      0|    (_mm256_permute2x128_si256(x1, x2, 0x31))
  ------------------
  412|      0|        Lib_IntVector_Intrinsics_vec256
  413|      0|            v2_21 = Lib_IntVector_Intrinsics_vec256_interleave_low128(v2_12, v6_12);
  ------------------
  |  |  419|      0|    (_mm256_permute2x128_si256(x1, x2, 0x20))
  ------------------
  414|      0|        Lib_IntVector_Intrinsics_vec256
  415|      0|            v6_21 = Lib_IntVector_Intrinsics_vec256_interleave_high128(v2_12, v6_12);
  ------------------
  |  |  422|      0|    (_mm256_permute2x128_si256(x1, x2, 0x31))
  ------------------
  416|      0|        Lib_IntVector_Intrinsics_vec256
  417|      0|            v3_21 = Lib_IntVector_Intrinsics_vec256_interleave_low128(v3_12, v7_12);
  ------------------
  |  |  419|      0|    (_mm256_permute2x128_si256(x1, x2, 0x20))
  ------------------
  418|      0|        Lib_IntVector_Intrinsics_vec256
  419|      0|            v7_21 = Lib_IntVector_Intrinsics_vec256_interleave_high128(v3_12, v7_12);
  ------------------
  |  |  422|      0|    (_mm256_permute2x128_si256(x1, x2, 0x31))
  ------------------
  420|      0|        Lib_IntVector_Intrinsics_vec256 v0_22 = v0_21;
  421|      0|        Lib_IntVector_Intrinsics_vec256 v1_22 = v1_21;
  422|      0|        Lib_IntVector_Intrinsics_vec256 v2_22 = v2_21;
  423|      0|        Lib_IntVector_Intrinsics_vec256 v3_22 = v3_21;
  424|      0|        Lib_IntVector_Intrinsics_vec256 v4_22 = v4_21;
  425|      0|        Lib_IntVector_Intrinsics_vec256 v5_22 = v5_21;
  426|      0|        Lib_IntVector_Intrinsics_vec256 v6_22 = v6_21;
  427|      0|        Lib_IntVector_Intrinsics_vec256 v7_22 = v7_21;
  428|      0|        Lib_IntVector_Intrinsics_vec256 v0_6 = v0_22;
  429|      0|        Lib_IntVector_Intrinsics_vec256 v1_6 = v1_22;
  430|      0|        Lib_IntVector_Intrinsics_vec256 v2_6 = v2_22;
  431|      0|        Lib_IntVector_Intrinsics_vec256 v3_6 = v3_22;
  432|      0|        Lib_IntVector_Intrinsics_vec256 v4_6 = v4_22;
  433|      0|        Lib_IntVector_Intrinsics_vec256 v5_6 = v5_22;
  434|      0|        Lib_IntVector_Intrinsics_vec256 v6_6 = v6_22;
  435|      0|        Lib_IntVector_Intrinsics_vec256 v7_6 = v7_22;
  436|      0|        Lib_IntVector_Intrinsics_vec256 v8 = v0_6;
  437|      0|        Lib_IntVector_Intrinsics_vec256 v9 = v2_6;
  438|      0|        Lib_IntVector_Intrinsics_vec256 v10 = v1_6;
  439|      0|        Lib_IntVector_Intrinsics_vec256 v11 = v3_6;
  440|      0|        Lib_IntVector_Intrinsics_vec256 v12 = v4_6;
  441|      0|        Lib_IntVector_Intrinsics_vec256 v13 = v6_6;
  442|      0|        Lib_IntVector_Intrinsics_vec256 v14 = v5_6;
  443|      0|        Lib_IntVector_Intrinsics_vec256 v15 = v7_6;
  444|      0|        k[0U] = v0;
  445|      0|        k[1U] = v8;
  446|      0|        k[2U] = v1;
  447|      0|        k[3U] = v9;
  448|      0|        k[4U] = v2;
  449|      0|        k[5U] = v10;
  450|      0|        k[6U] = v3;
  451|      0|        k[7U] = v11;
  452|      0|        k[8U] = v4;
  453|      0|        k[9U] = v12;
  454|      0|        k[10U] = v5;
  455|      0|        k[11U] = v13;
  456|      0|        k[12U] = v6;
  457|      0|        k[13U] = v14;
  458|      0|        k[14U] = v7;
  459|      0|        k[15U] = v15;
  460|      0|        KRML_MAYBE_FOR16(i0,
  ------------------
  |  |  402|      0|#define KRML_MAYBE_FOR16(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 16, k, x)
  |  |  ------------------
  |  |  |  |  288|      0|    do {                               \
  |  |  |  |  289|      0|        uint32_t i = z;                \
  |  |  |  |  290|      0|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  461|      0|                         (uint32_t)0U,
  462|      0|                         (uint32_t)16U,
  463|      0|                         (uint32_t)1U,
  464|      0|                         Lib_IntVector_Intrinsics_vec256
  465|      0|                             x = Lib_IntVector_Intrinsics_vec256_load32_le(uu____1 + i0 * (uint32_t)32U);
  466|      0|                         Lib_IntVector_Intrinsics_vec256 y = Lib_IntVector_Intrinsics_vec256_xor(x, k[i0]);
  467|      0|                         Lib_IntVector_Intrinsics_vec256_store32_le(uu____0 + i0 * (uint32_t)32U, y););
  468|      0|    }
  469|  10.1k|    if (rem1 > (uint32_t)0U) {
  ------------------
  |  Branch (469:9): [True: 10.1k, False: 0]
  ------------------
  470|  10.1k|        uint8_t *uu____2 = out + nb * (uint32_t)512U;
  471|  10.1k|        uint8_t plain[512U] = { 0U };
  472|  10.1k|        memcpy(plain, text + nb * (uint32_t)512U, rem * sizeof(uint8_t));
  473|  10.1k|        KRML_PRE_ALIGN(32)
  474|  10.1k|        Lib_IntVector_Intrinsics_vec256 k[16U] KRML_POST_ALIGN(32) = { 0U };
  475|  10.1k|        chacha20_core_256(k, ctx, nb);
  476|  10.1k|        Lib_IntVector_Intrinsics_vec256 st0 = k[0U];
  477|  10.1k|        Lib_IntVector_Intrinsics_vec256 st1 = k[1U];
  478|  10.1k|        Lib_IntVector_Intrinsics_vec256 st2 = k[2U];
  479|  10.1k|        Lib_IntVector_Intrinsics_vec256 st3 = k[3U];
  480|  10.1k|        Lib_IntVector_Intrinsics_vec256 st4 = k[4U];
  481|  10.1k|        Lib_IntVector_Intrinsics_vec256 st5 = k[5U];
  482|  10.1k|        Lib_IntVector_Intrinsics_vec256 st6 = k[6U];
  483|  10.1k|        Lib_IntVector_Intrinsics_vec256 st7 = k[7U];
  484|  10.1k|        Lib_IntVector_Intrinsics_vec256 st8 = k[8U];
  485|  10.1k|        Lib_IntVector_Intrinsics_vec256 st9 = k[9U];
  486|  10.1k|        Lib_IntVector_Intrinsics_vec256 st10 = k[10U];
  487|  10.1k|        Lib_IntVector_Intrinsics_vec256 st11 = k[11U];
  488|  10.1k|        Lib_IntVector_Intrinsics_vec256 st12 = k[12U];
  489|  10.1k|        Lib_IntVector_Intrinsics_vec256 st13 = k[13U];
  490|  10.1k|        Lib_IntVector_Intrinsics_vec256 st14 = k[14U];
  491|  10.1k|        Lib_IntVector_Intrinsics_vec256 st15 = k[15U];
  492|  10.1k|        Lib_IntVector_Intrinsics_vec256 v00 = st0;
  493|  10.1k|        Lib_IntVector_Intrinsics_vec256 v16 = st1;
  494|  10.1k|        Lib_IntVector_Intrinsics_vec256 v20 = st2;
  495|  10.1k|        Lib_IntVector_Intrinsics_vec256 v30 = st3;
  496|  10.1k|        Lib_IntVector_Intrinsics_vec256 v40 = st4;
  497|  10.1k|        Lib_IntVector_Intrinsics_vec256 v50 = st5;
  498|  10.1k|        Lib_IntVector_Intrinsics_vec256 v60 = st6;
  499|  10.1k|        Lib_IntVector_Intrinsics_vec256 v70 = st7;
  500|  10.1k|        Lib_IntVector_Intrinsics_vec256
  501|  10.1k|            v0_ = Lib_IntVector_Intrinsics_vec256_interleave_low32(v00, v16);
  ------------------
  |  |  407|  10.1k|    (_mm256_unpacklo_epi32(x1, x2))
  ------------------
  502|  10.1k|        Lib_IntVector_Intrinsics_vec256
  503|  10.1k|            v1_ = Lib_IntVector_Intrinsics_vec256_interleave_high32(v00, v16);
  ------------------
  |  |  410|  10.1k|    (_mm256_unpackhi_epi32(x1, x2))
  ------------------
  504|  10.1k|        Lib_IntVector_Intrinsics_vec256
  505|  10.1k|            v2_ = Lib_IntVector_Intrinsics_vec256_interleave_low32(v20, v30);
  ------------------
  |  |  407|  10.1k|    (_mm256_unpacklo_epi32(x1, x2))
  ------------------
  506|  10.1k|        Lib_IntVector_Intrinsics_vec256
  507|  10.1k|            v3_ = Lib_IntVector_Intrinsics_vec256_interleave_high32(v20, v30);
  ------------------
  |  |  410|  10.1k|    (_mm256_unpackhi_epi32(x1, x2))
  ------------------
  508|  10.1k|        Lib_IntVector_Intrinsics_vec256
  509|  10.1k|            v4_ = Lib_IntVector_Intrinsics_vec256_interleave_low32(v40, v50);
  ------------------
  |  |  407|  10.1k|    (_mm256_unpacklo_epi32(x1, x2))
  ------------------
  510|  10.1k|        Lib_IntVector_Intrinsics_vec256
  511|  10.1k|            v5_ = Lib_IntVector_Intrinsics_vec256_interleave_high32(v40, v50);
  ------------------
  |  |  410|  10.1k|    (_mm256_unpackhi_epi32(x1, x2))
  ------------------
  512|  10.1k|        Lib_IntVector_Intrinsics_vec256
  513|  10.1k|            v6_ = Lib_IntVector_Intrinsics_vec256_interleave_low32(v60, v70);
  ------------------
  |  |  407|  10.1k|    (_mm256_unpacklo_epi32(x1, x2))
  ------------------
  514|  10.1k|        Lib_IntVector_Intrinsics_vec256
  515|  10.1k|            v7_ = Lib_IntVector_Intrinsics_vec256_interleave_high32(v60, v70);
  ------------------
  |  |  410|  10.1k|    (_mm256_unpackhi_epi32(x1, x2))
  ------------------
  516|  10.1k|        Lib_IntVector_Intrinsics_vec256 v0_0 = v0_;
  517|  10.1k|        Lib_IntVector_Intrinsics_vec256 v1_0 = v1_;
  518|  10.1k|        Lib_IntVector_Intrinsics_vec256 v2_0 = v2_;
  519|  10.1k|        Lib_IntVector_Intrinsics_vec256 v3_0 = v3_;
  520|  10.1k|        Lib_IntVector_Intrinsics_vec256 v4_0 = v4_;
  521|  10.1k|        Lib_IntVector_Intrinsics_vec256 v5_0 = v5_;
  522|  10.1k|        Lib_IntVector_Intrinsics_vec256 v6_0 = v6_;
  523|  10.1k|        Lib_IntVector_Intrinsics_vec256 v7_0 = v7_;
  524|  10.1k|        Lib_IntVector_Intrinsics_vec256
  525|  10.1k|            v0_1 = Lib_IntVector_Intrinsics_vec256_interleave_low64(v0_0, v2_0);
  ------------------
  |  |  413|  10.1k|    (_mm256_unpacklo_epi64(x1, x2))
  ------------------
  526|  10.1k|        Lib_IntVector_Intrinsics_vec256
  527|  10.1k|            v2_1 = Lib_IntVector_Intrinsics_vec256_interleave_high64(v0_0, v2_0);
  ------------------
  |  |  416|  10.1k|    (_mm256_unpackhi_epi64(x1, x2))
  ------------------
  528|  10.1k|        Lib_IntVector_Intrinsics_vec256
  529|  10.1k|            v1_1 = Lib_IntVector_Intrinsics_vec256_interleave_low64(v1_0, v3_0);
  ------------------
  |  |  413|  10.1k|    (_mm256_unpacklo_epi64(x1, x2))
  ------------------
  530|  10.1k|        Lib_IntVector_Intrinsics_vec256
  531|  10.1k|            v3_1 = Lib_IntVector_Intrinsics_vec256_interleave_high64(v1_0, v3_0);
  ------------------
  |  |  416|  10.1k|    (_mm256_unpackhi_epi64(x1, x2))
  ------------------
  532|  10.1k|        Lib_IntVector_Intrinsics_vec256
  533|  10.1k|            v4_1 = Lib_IntVector_Intrinsics_vec256_interleave_low64(v4_0, v6_0);
  ------------------
  |  |  413|  10.1k|    (_mm256_unpacklo_epi64(x1, x2))
  ------------------
  534|  10.1k|        Lib_IntVector_Intrinsics_vec256
  535|  10.1k|            v6_1 = Lib_IntVector_Intrinsics_vec256_interleave_high64(v4_0, v6_0);
  ------------------
  |  |  416|  10.1k|    (_mm256_unpackhi_epi64(x1, x2))
  ------------------
  536|  10.1k|        Lib_IntVector_Intrinsics_vec256
  537|  10.1k|            v5_1 = Lib_IntVector_Intrinsics_vec256_interleave_low64(v5_0, v7_0);
  ------------------
  |  |  413|  10.1k|    (_mm256_unpacklo_epi64(x1, x2))
  ------------------
  538|  10.1k|        Lib_IntVector_Intrinsics_vec256
  539|  10.1k|            v7_1 = Lib_IntVector_Intrinsics_vec256_interleave_high64(v5_0, v7_0);
  ------------------
  |  |  416|  10.1k|    (_mm256_unpackhi_epi64(x1, x2))
  ------------------
  540|  10.1k|        Lib_IntVector_Intrinsics_vec256 v0_10 = v0_1;
  541|  10.1k|        Lib_IntVector_Intrinsics_vec256 v1_10 = v1_1;
  542|  10.1k|        Lib_IntVector_Intrinsics_vec256 v2_10 = v2_1;
  543|  10.1k|        Lib_IntVector_Intrinsics_vec256 v3_10 = v3_1;
  544|  10.1k|        Lib_IntVector_Intrinsics_vec256 v4_10 = v4_1;
  545|  10.1k|        Lib_IntVector_Intrinsics_vec256 v5_10 = v5_1;
  546|  10.1k|        Lib_IntVector_Intrinsics_vec256 v6_10 = v6_1;
  547|  10.1k|        Lib_IntVector_Intrinsics_vec256 v7_10 = v7_1;
  548|  10.1k|        Lib_IntVector_Intrinsics_vec256
  549|  10.1k|            v0_2 = Lib_IntVector_Intrinsics_vec256_interleave_low128(v0_10, v4_10);
  ------------------
  |  |  419|  10.1k|    (_mm256_permute2x128_si256(x1, x2, 0x20))
  ------------------
  550|  10.1k|        Lib_IntVector_Intrinsics_vec256
  551|  10.1k|            v4_2 = Lib_IntVector_Intrinsics_vec256_interleave_high128(v0_10, v4_10);
  ------------------
  |  |  422|  10.1k|    (_mm256_permute2x128_si256(x1, x2, 0x31))
  ------------------
  552|  10.1k|        Lib_IntVector_Intrinsics_vec256
  553|  10.1k|            v1_2 = Lib_IntVector_Intrinsics_vec256_interleave_low128(v1_10, v5_10);
  ------------------
  |  |  419|  10.1k|    (_mm256_permute2x128_si256(x1, x2, 0x20))
  ------------------
  554|  10.1k|        Lib_IntVector_Intrinsics_vec256
  555|  10.1k|            v5_2 = Lib_IntVector_Intrinsics_vec256_interleave_high128(v1_10, v5_10);
  ------------------
  |  |  422|  10.1k|    (_mm256_permute2x128_si256(x1, x2, 0x31))
  ------------------
  556|  10.1k|        Lib_IntVector_Intrinsics_vec256
  557|  10.1k|            v2_2 = Lib_IntVector_Intrinsics_vec256_interleave_low128(v2_10, v6_10);
  ------------------
  |  |  419|  10.1k|    (_mm256_permute2x128_si256(x1, x2, 0x20))
  ------------------
  558|  10.1k|        Lib_IntVector_Intrinsics_vec256
  559|  10.1k|            v6_2 = Lib_IntVector_Intrinsics_vec256_interleave_high128(v2_10, v6_10);
  ------------------
  |  |  422|  10.1k|    (_mm256_permute2x128_si256(x1, x2, 0x31))
  ------------------
  560|  10.1k|        Lib_IntVector_Intrinsics_vec256
  561|  10.1k|            v3_2 = Lib_IntVector_Intrinsics_vec256_interleave_low128(v3_10, v7_10);
  ------------------
  |  |  419|  10.1k|    (_mm256_permute2x128_si256(x1, x2, 0x20))
  ------------------
  562|  10.1k|        Lib_IntVector_Intrinsics_vec256
  563|  10.1k|            v7_2 = Lib_IntVector_Intrinsics_vec256_interleave_high128(v3_10, v7_10);
  ------------------
  |  |  422|  10.1k|    (_mm256_permute2x128_si256(x1, x2, 0x31))
  ------------------
  564|  10.1k|        Lib_IntVector_Intrinsics_vec256 v0_20 = v0_2;
  565|  10.1k|        Lib_IntVector_Intrinsics_vec256 v1_20 = v1_2;
  566|  10.1k|        Lib_IntVector_Intrinsics_vec256 v2_20 = v2_2;
  567|  10.1k|        Lib_IntVector_Intrinsics_vec256 v3_20 = v3_2;
  568|  10.1k|        Lib_IntVector_Intrinsics_vec256 v4_20 = v4_2;
  569|  10.1k|        Lib_IntVector_Intrinsics_vec256 v5_20 = v5_2;
  570|  10.1k|        Lib_IntVector_Intrinsics_vec256 v6_20 = v6_2;
  571|  10.1k|        Lib_IntVector_Intrinsics_vec256 v7_20 = v7_2;
  572|  10.1k|        Lib_IntVector_Intrinsics_vec256 v0_3 = v0_20;
  573|  10.1k|        Lib_IntVector_Intrinsics_vec256 v1_3 = v1_20;
  574|  10.1k|        Lib_IntVector_Intrinsics_vec256 v2_3 = v2_20;
  575|  10.1k|        Lib_IntVector_Intrinsics_vec256 v3_3 = v3_20;
  576|  10.1k|        Lib_IntVector_Intrinsics_vec256 v4_3 = v4_20;
  577|  10.1k|        Lib_IntVector_Intrinsics_vec256 v5_3 = v5_20;
  578|  10.1k|        Lib_IntVector_Intrinsics_vec256 v6_3 = v6_20;
  579|  10.1k|        Lib_IntVector_Intrinsics_vec256 v7_3 = v7_20;
  580|  10.1k|        Lib_IntVector_Intrinsics_vec256 v0 = v0_3;
  581|  10.1k|        Lib_IntVector_Intrinsics_vec256 v1 = v2_3;
  582|  10.1k|        Lib_IntVector_Intrinsics_vec256 v2 = v1_3;
  583|  10.1k|        Lib_IntVector_Intrinsics_vec256 v3 = v3_3;
  584|  10.1k|        Lib_IntVector_Intrinsics_vec256 v4 = v4_3;
  585|  10.1k|        Lib_IntVector_Intrinsics_vec256 v5 = v6_3;
  586|  10.1k|        Lib_IntVector_Intrinsics_vec256 v6 = v5_3;
  587|  10.1k|        Lib_IntVector_Intrinsics_vec256 v7 = v7_3;
  588|  10.1k|        Lib_IntVector_Intrinsics_vec256 v01 = st8;
  589|  10.1k|        Lib_IntVector_Intrinsics_vec256 v110 = st9;
  590|  10.1k|        Lib_IntVector_Intrinsics_vec256 v21 = st10;
  591|  10.1k|        Lib_IntVector_Intrinsics_vec256 v31 = st11;
  592|  10.1k|        Lib_IntVector_Intrinsics_vec256 v41 = st12;
  593|  10.1k|        Lib_IntVector_Intrinsics_vec256 v51 = st13;
  594|  10.1k|        Lib_IntVector_Intrinsics_vec256 v61 = st14;
  595|  10.1k|        Lib_IntVector_Intrinsics_vec256 v71 = st15;
  596|  10.1k|        Lib_IntVector_Intrinsics_vec256
  597|  10.1k|            v0_4 = Lib_IntVector_Intrinsics_vec256_interleave_low32(v01, v110);
  ------------------
  |  |  407|  10.1k|    (_mm256_unpacklo_epi32(x1, x2))
  ------------------
  598|  10.1k|        Lib_IntVector_Intrinsics_vec256
  599|  10.1k|            v1_4 = Lib_IntVector_Intrinsics_vec256_interleave_high32(v01, v110);
  ------------------
  |  |  410|  10.1k|    (_mm256_unpackhi_epi32(x1, x2))
  ------------------
  600|  10.1k|        Lib_IntVector_Intrinsics_vec256
  601|  10.1k|            v2_4 = Lib_IntVector_Intrinsics_vec256_interleave_low32(v21, v31);
  ------------------
  |  |  407|  10.1k|    (_mm256_unpacklo_epi32(x1, x2))
  ------------------
  602|  10.1k|        Lib_IntVector_Intrinsics_vec256
  603|  10.1k|            v3_4 = Lib_IntVector_Intrinsics_vec256_interleave_high32(v21, v31);
  ------------------
  |  |  410|  10.1k|    (_mm256_unpackhi_epi32(x1, x2))
  ------------------
  604|  10.1k|        Lib_IntVector_Intrinsics_vec256
  605|  10.1k|            v4_4 = Lib_IntVector_Intrinsics_vec256_interleave_low32(v41, v51);
  ------------------
  |  |  407|  10.1k|    (_mm256_unpacklo_epi32(x1, x2))
  ------------------
  606|  10.1k|        Lib_IntVector_Intrinsics_vec256
  607|  10.1k|            v5_4 = Lib_IntVector_Intrinsics_vec256_interleave_high32(v41, v51);
  ------------------
  |  |  410|  10.1k|    (_mm256_unpackhi_epi32(x1, x2))
  ------------------
  608|  10.1k|        Lib_IntVector_Intrinsics_vec256
  609|  10.1k|            v6_4 = Lib_IntVector_Intrinsics_vec256_interleave_low32(v61, v71);
  ------------------
  |  |  407|  10.1k|    (_mm256_unpacklo_epi32(x1, x2))
  ------------------
  610|  10.1k|        Lib_IntVector_Intrinsics_vec256
  611|  10.1k|            v7_4 = Lib_IntVector_Intrinsics_vec256_interleave_high32(v61, v71);
  ------------------
  |  |  410|  10.1k|    (_mm256_unpackhi_epi32(x1, x2))
  ------------------
  612|  10.1k|        Lib_IntVector_Intrinsics_vec256 v0_5 = v0_4;
  613|  10.1k|        Lib_IntVector_Intrinsics_vec256 v1_5 = v1_4;
  614|  10.1k|        Lib_IntVector_Intrinsics_vec256 v2_5 = v2_4;
  615|  10.1k|        Lib_IntVector_Intrinsics_vec256 v3_5 = v3_4;
  616|  10.1k|        Lib_IntVector_Intrinsics_vec256 v4_5 = v4_4;
  617|  10.1k|        Lib_IntVector_Intrinsics_vec256 v5_5 = v5_4;
  618|  10.1k|        Lib_IntVector_Intrinsics_vec256 v6_5 = v6_4;
  619|  10.1k|        Lib_IntVector_Intrinsics_vec256 v7_5 = v7_4;
  620|  10.1k|        Lib_IntVector_Intrinsics_vec256
  621|  10.1k|            v0_11 = Lib_IntVector_Intrinsics_vec256_interleave_low64(v0_5, v2_5);
  ------------------
  |  |  413|  10.1k|    (_mm256_unpacklo_epi64(x1, x2))
  ------------------
  622|  10.1k|        Lib_IntVector_Intrinsics_vec256
  623|  10.1k|            v2_11 = Lib_IntVector_Intrinsics_vec256_interleave_high64(v0_5, v2_5);
  ------------------
  |  |  416|  10.1k|    (_mm256_unpackhi_epi64(x1, x2))
  ------------------
  624|  10.1k|        Lib_IntVector_Intrinsics_vec256
  625|  10.1k|            v1_11 = Lib_IntVector_Intrinsics_vec256_interleave_low64(v1_5, v3_5);
  ------------------
  |  |  413|  10.1k|    (_mm256_unpacklo_epi64(x1, x2))
  ------------------
  626|  10.1k|        Lib_IntVector_Intrinsics_vec256
  627|  10.1k|            v3_11 = Lib_IntVector_Intrinsics_vec256_interleave_high64(v1_5, v3_5);
  ------------------
  |  |  416|  10.1k|    (_mm256_unpackhi_epi64(x1, x2))
  ------------------
  628|  10.1k|        Lib_IntVector_Intrinsics_vec256
  629|  10.1k|            v4_11 = Lib_IntVector_Intrinsics_vec256_interleave_low64(v4_5, v6_5);
  ------------------
  |  |  413|  10.1k|    (_mm256_unpacklo_epi64(x1, x2))
  ------------------
  630|  10.1k|        Lib_IntVector_Intrinsics_vec256
  631|  10.1k|            v6_11 = Lib_IntVector_Intrinsics_vec256_interleave_high64(v4_5, v6_5);
  ------------------
  |  |  416|  10.1k|    (_mm256_unpackhi_epi64(x1, x2))
  ------------------
  632|  10.1k|        Lib_IntVector_Intrinsics_vec256
  633|  10.1k|            v5_11 = Lib_IntVector_Intrinsics_vec256_interleave_low64(v5_5, v7_5);
  ------------------
  |  |  413|  10.1k|    (_mm256_unpacklo_epi64(x1, x2))
  ------------------
  634|  10.1k|        Lib_IntVector_Intrinsics_vec256
  635|  10.1k|            v7_11 = Lib_IntVector_Intrinsics_vec256_interleave_high64(v5_5, v7_5);
  ------------------
  |  |  416|  10.1k|    (_mm256_unpackhi_epi64(x1, x2))
  ------------------
  636|  10.1k|        Lib_IntVector_Intrinsics_vec256 v0_12 = v0_11;
  637|  10.1k|        Lib_IntVector_Intrinsics_vec256 v1_12 = v1_11;
  638|  10.1k|        Lib_IntVector_Intrinsics_vec256 v2_12 = v2_11;
  639|  10.1k|        Lib_IntVector_Intrinsics_vec256 v3_12 = v3_11;
  640|  10.1k|        Lib_IntVector_Intrinsics_vec256 v4_12 = v4_11;
  641|  10.1k|        Lib_IntVector_Intrinsics_vec256 v5_12 = v5_11;
  642|  10.1k|        Lib_IntVector_Intrinsics_vec256 v6_12 = v6_11;
  643|  10.1k|        Lib_IntVector_Intrinsics_vec256 v7_12 = v7_11;
  644|  10.1k|        Lib_IntVector_Intrinsics_vec256
  645|  10.1k|            v0_21 = Lib_IntVector_Intrinsics_vec256_interleave_low128(v0_12, v4_12);
  ------------------
  |  |  419|  10.1k|    (_mm256_permute2x128_si256(x1, x2, 0x20))
  ------------------
  646|  10.1k|        Lib_IntVector_Intrinsics_vec256
  647|  10.1k|            v4_21 = Lib_IntVector_Intrinsics_vec256_interleave_high128(v0_12, v4_12);
  ------------------
  |  |  422|  10.1k|    (_mm256_permute2x128_si256(x1, x2, 0x31))
  ------------------
  648|  10.1k|        Lib_IntVector_Intrinsics_vec256
  649|  10.1k|            v1_21 = Lib_IntVector_Intrinsics_vec256_interleave_low128(v1_12, v5_12);
  ------------------
  |  |  419|  10.1k|    (_mm256_permute2x128_si256(x1, x2, 0x20))
  ------------------
  650|  10.1k|        Lib_IntVector_Intrinsics_vec256
  651|  10.1k|            v5_21 = Lib_IntVector_Intrinsics_vec256_interleave_high128(v1_12, v5_12);
  ------------------
  |  |  422|  10.1k|    (_mm256_permute2x128_si256(x1, x2, 0x31))
  ------------------
  652|  10.1k|        Lib_IntVector_Intrinsics_vec256
  653|  10.1k|            v2_21 = Lib_IntVector_Intrinsics_vec256_interleave_low128(v2_12, v6_12);
  ------------------
  |  |  419|  10.1k|    (_mm256_permute2x128_si256(x1, x2, 0x20))
  ------------------
  654|  10.1k|        Lib_IntVector_Intrinsics_vec256
  655|  10.1k|            v6_21 = Lib_IntVector_Intrinsics_vec256_interleave_high128(v2_12, v6_12);
  ------------------
  |  |  422|  10.1k|    (_mm256_permute2x128_si256(x1, x2, 0x31))
  ------------------
  656|  10.1k|        Lib_IntVector_Intrinsics_vec256
  657|  10.1k|            v3_21 = Lib_IntVector_Intrinsics_vec256_interleave_low128(v3_12, v7_12);
  ------------------
  |  |  419|  10.1k|    (_mm256_permute2x128_si256(x1, x2, 0x20))
  ------------------
  658|  10.1k|        Lib_IntVector_Intrinsics_vec256
  659|  10.1k|            v7_21 = Lib_IntVector_Intrinsics_vec256_interleave_high128(v3_12, v7_12);
  ------------------
  |  |  422|  10.1k|    (_mm256_permute2x128_si256(x1, x2, 0x31))
  ------------------
  660|  10.1k|        Lib_IntVector_Intrinsics_vec256 v0_22 = v0_21;
  661|  10.1k|        Lib_IntVector_Intrinsics_vec256 v1_22 = v1_21;
  662|  10.1k|        Lib_IntVector_Intrinsics_vec256 v2_22 = v2_21;
  663|  10.1k|        Lib_IntVector_Intrinsics_vec256 v3_22 = v3_21;
  664|  10.1k|        Lib_IntVector_Intrinsics_vec256 v4_22 = v4_21;
  665|  10.1k|        Lib_IntVector_Intrinsics_vec256 v5_22 = v5_21;
  666|  10.1k|        Lib_IntVector_Intrinsics_vec256 v6_22 = v6_21;
  667|  10.1k|        Lib_IntVector_Intrinsics_vec256 v7_22 = v7_21;
  668|  10.1k|        Lib_IntVector_Intrinsics_vec256 v0_6 = v0_22;
  669|  10.1k|        Lib_IntVector_Intrinsics_vec256 v1_6 = v1_22;
  670|  10.1k|        Lib_IntVector_Intrinsics_vec256 v2_6 = v2_22;
  671|  10.1k|        Lib_IntVector_Intrinsics_vec256 v3_6 = v3_22;
  672|  10.1k|        Lib_IntVector_Intrinsics_vec256 v4_6 = v4_22;
  673|  10.1k|        Lib_IntVector_Intrinsics_vec256 v5_6 = v5_22;
  674|  10.1k|        Lib_IntVector_Intrinsics_vec256 v6_6 = v6_22;
  675|  10.1k|        Lib_IntVector_Intrinsics_vec256 v7_6 = v7_22;
  676|  10.1k|        Lib_IntVector_Intrinsics_vec256 v8 = v0_6;
  677|  10.1k|        Lib_IntVector_Intrinsics_vec256 v9 = v2_6;
  678|  10.1k|        Lib_IntVector_Intrinsics_vec256 v10 = v1_6;
  679|  10.1k|        Lib_IntVector_Intrinsics_vec256 v11 = v3_6;
  680|  10.1k|        Lib_IntVector_Intrinsics_vec256 v12 = v4_6;
  681|  10.1k|        Lib_IntVector_Intrinsics_vec256 v13 = v6_6;
  682|  10.1k|        Lib_IntVector_Intrinsics_vec256 v14 = v5_6;
  683|  10.1k|        Lib_IntVector_Intrinsics_vec256 v15 = v7_6;
  684|  10.1k|        k[0U] = v0;
  685|  10.1k|        k[1U] = v8;
  686|  10.1k|        k[2U] = v1;
  687|  10.1k|        k[3U] = v9;
  688|  10.1k|        k[4U] = v2;
  689|  10.1k|        k[5U] = v10;
  690|  10.1k|        k[6U] = v3;
  691|  10.1k|        k[7U] = v11;
  692|  10.1k|        k[8U] = v4;
  693|  10.1k|        k[9U] = v12;
  694|  10.1k|        k[10U] = v5;
  695|  10.1k|        k[11U] = v13;
  696|  10.1k|        k[12U] = v6;
  697|  10.1k|        k[13U] = v14;
  698|  10.1k|        k[14U] = v7;
  699|  10.1k|        k[15U] = v15;
  700|  10.1k|        KRML_MAYBE_FOR16(i,
  ------------------
  |  |  402|  10.1k|#define KRML_MAYBE_FOR16(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 16, k, x)
  |  |  ------------------
  |  |  |  |  288|  10.1k|    do {                               \
  |  |  |  |  289|  10.1k|        uint32_t i = z;                \
  |  |  |  |  290|  10.1k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  10.1k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  701|  10.1k|                         (uint32_t)0U,
  702|  10.1k|                         (uint32_t)16U,
  703|  10.1k|                         (uint32_t)1U,
  704|  10.1k|                         Lib_IntVector_Intrinsics_vec256
  705|  10.1k|                             x = Lib_IntVector_Intrinsics_vec256_load32_le(plain + i * (uint32_t)32U);
  706|  10.1k|                         Lib_IntVector_Intrinsics_vec256 y = Lib_IntVector_Intrinsics_vec256_xor(x, k[i]);
  707|  10.1k|                         Lib_IntVector_Intrinsics_vec256_store32_le(plain + i * (uint32_t)32U, y););
  708|  10.1k|        memcpy(uu____2, plain, rem * sizeof(uint8_t));
  709|  10.1k|    }
  710|  10.1k|}
Hacl_Chacha20_Vec256.c:chacha20_init_256:
  163|  10.1k|{
  164|  10.1k|    uint32_t ctx1[16U] = { 0U };
  165|  10.1k|    KRML_MAYBE_FOR4(i,
  ------------------
  |  |  330|  10.1k|#define KRML_MAYBE_FOR4(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 4, k, x)
  |  |  ------------------
  |  |  |  |  288|  10.1k|    do {                               \
  |  |  |  |  289|  10.1k|        uint32_t i = z;                \
  |  |  |  |  290|  10.1k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  10.1k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  166|  10.1k|                    (uint32_t)0U,
  167|  10.1k|                    (uint32_t)4U,
  168|  10.1k|                    (uint32_t)1U,
  169|  10.1k|                    uint32_t *os = ctx1;
  170|  10.1k|                    uint32_t x = Hacl_Impl_Chacha20_Vec_chacha20_constants[i];
  171|  10.1k|                    os[i] = x;);
  172|  10.1k|    KRML_MAYBE_FOR8(i,
  ------------------
  |  |  354|  10.1k|#define KRML_MAYBE_FOR8(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 8, k, x)
  |  |  ------------------
  |  |  |  |  288|  10.1k|    do {                               \
  |  |  |  |  289|  10.1k|        uint32_t i = z;                \
  |  |  |  |  290|  10.1k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  10.1k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  173|  10.1k|                    (uint32_t)0U,
  174|  10.1k|                    (uint32_t)8U,
  175|  10.1k|                    (uint32_t)1U,
  176|  10.1k|                    uint32_t *os = ctx1 + (uint32_t)4U;
  177|  10.1k|                    uint8_t *bj = k + i * (uint32_t)4U;
  178|  10.1k|                    uint32_t u = load32_le(bj);
  179|  10.1k|                    uint32_t r = u;
  180|  10.1k|                    uint32_t x = r;
  181|  10.1k|                    os[i] = x;);
  182|  10.1k|    ctx1[12U] = ctr;
  183|  10.1k|    KRML_MAYBE_FOR3(i,
  ------------------
  |  |  324|  10.1k|#define KRML_MAYBE_FOR3(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 3, k, x)
  |  |  ------------------
  |  |  |  |  288|  10.1k|    do {                               \
  |  |  |  |  289|  10.1k|        uint32_t i = z;                \
  |  |  |  |  290|  10.1k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  10.1k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  184|  10.1k|                    (uint32_t)0U,
  185|  10.1k|                    (uint32_t)3U,
  186|  10.1k|                    (uint32_t)1U,
  187|  10.1k|                    uint32_t *os = ctx1 + (uint32_t)13U;
  188|  10.1k|                    uint8_t *bj = n + i * (uint32_t)4U;
  189|  10.1k|                    uint32_t u = load32_le(bj);
  190|  10.1k|                    uint32_t r = u;
  191|  10.1k|                    uint32_t x = r;
  192|  10.1k|                    os[i] = x;);
  193|  10.1k|    KRML_MAYBE_FOR16(i,
  ------------------
  |  |  402|  10.1k|#define KRML_MAYBE_FOR16(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 16, k, x)
  |  |  ------------------
  |  |  |  |  288|  10.1k|    do {                               \
  |  |  |  |  289|  10.1k|        uint32_t i = z;                \
  |  |  |  |  290|  10.1k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  10.1k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  194|  10.1k|                     (uint32_t)0U,
  195|  10.1k|                     (uint32_t)16U,
  196|  10.1k|                     (uint32_t)1U,
  197|  10.1k|                     Lib_IntVector_Intrinsics_vec256 *os = ctx;
  198|  10.1k|                     uint32_t x = ctx1[i];
  199|  10.1k|                     Lib_IntVector_Intrinsics_vec256 x0 = Lib_IntVector_Intrinsics_vec256_load32(x);
  200|  10.1k|                     os[i] = x0;);
  201|  10.1k|    Lib_IntVector_Intrinsics_vec256
  202|  10.1k|        ctr1 =
  203|  10.1k|            Lib_IntVector_Intrinsics_vec256_load32s((uint32_t)0U,
  ------------------
  |  |  398|  10.1k|    (_mm256_set_epi32(x7, x6, x5, x4, x3, x2, x1, x0)) /* hi lo */
  ------------------
  204|  10.1k|                                                    (uint32_t)1U,
  205|  10.1k|                                                    (uint32_t)2U,
  206|  10.1k|                                                    (uint32_t)3U,
  207|  10.1k|                                                    (uint32_t)4U,
  208|  10.1k|                                                    (uint32_t)5U,
  209|  10.1k|                                                    (uint32_t)6U,
  210|  10.1k|                                                    (uint32_t)7U);
  211|  10.1k|    Lib_IntVector_Intrinsics_vec256 c12 = ctx[12U];
  212|  10.1k|    ctx[12U] = Lib_IntVector_Intrinsics_vec256_add32(c12, ctr1);
  ------------------
  |  |  377|  10.1k|    (_mm256_add_epi32(x0, x1))
  ------------------
  213|  10.1k|}
Hacl_Chacha20_Vec256.c:chacha20_core_256:
  136|  10.1k|{
  137|  10.1k|    memcpy(k, ctx, (uint32_t)16U * sizeof(Lib_IntVector_Intrinsics_vec256));
  138|  10.1k|    uint32_t ctr_u32 = (uint32_t)8U * ctr;
  139|  10.1k|    Lib_IntVector_Intrinsics_vec256 cv = Lib_IntVector_Intrinsics_vec256_load32(ctr_u32);
  ------------------
  |  |  395|  10.1k|    (_mm256_set1_epi32(x))
  ------------------
  140|  10.1k|    k[12U] = Lib_IntVector_Intrinsics_vec256_add32(k[12U], cv);
  ------------------
  |  |  377|  10.1k|    (_mm256_add_epi32(x0, x1))
  ------------------
  141|  10.1k|    double_round_256(k);
  142|  10.1k|    double_round_256(k);
  143|  10.1k|    double_round_256(k);
  144|  10.1k|    double_round_256(k);
  145|  10.1k|    double_round_256(k);
  146|  10.1k|    double_round_256(k);
  147|  10.1k|    double_round_256(k);
  148|  10.1k|    double_round_256(k);
  149|  10.1k|    double_round_256(k);
  150|  10.1k|    double_round_256(k);
  151|  10.1k|    KRML_MAYBE_FOR16(i,
  ------------------
  |  |  402|  10.1k|#define KRML_MAYBE_FOR16(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 16, k, x)
  |  |  ------------------
  |  |  |  |  288|  10.1k|    do {                               \
  |  |  |  |  289|  10.1k|        uint32_t i = z;                \
  |  |  |  |  290|  10.1k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  10.1k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  152|  10.1k|                     (uint32_t)0U,
  153|  10.1k|                     (uint32_t)16U,
  154|  10.1k|                     (uint32_t)1U,
  155|  10.1k|                     Lib_IntVector_Intrinsics_vec256 *os = k;
  156|  10.1k|                     Lib_IntVector_Intrinsics_vec256 x = Lib_IntVector_Intrinsics_vec256_add32(k[i], ctx[i]);
  157|  10.1k|                     os[i] = x;);
  158|  10.1k|    k[12U] = Lib_IntVector_Intrinsics_vec256_add32(k[12U], cv);
  ------------------
  |  |  377|  10.1k|    (_mm256_add_epi32(x0, x1))
  ------------------
  159|  10.1k|}
Hacl_Chacha20_Vec256.c:double_round_256:
   32|   101k|{
   33|   101k|    st[0U] = Lib_IntVector_Intrinsics_vec256_add32(st[0U], st[4U]);
  ------------------
  |  |  377|   101k|    (_mm256_add_epi32(x0, x1))
  ------------------
   34|   101k|    Lib_IntVector_Intrinsics_vec256 std = Lib_IntVector_Intrinsics_vec256_xor(st[12U], st[0U]);
  ------------------
  |  |  236|   101k|    (_mm256_xor_si256(x0, x1))
  ------------------
   35|   101k|    st[12U] = Lib_IntVector_Intrinsics_vec256_rotate_left32(std, (uint32_t)16U);
  ------------------
  |  |  275|   101k|    ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  266|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3, 14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  269|   101k|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  272|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1, 12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1)))
  |  |  ------------------
  |  |  |  Branch (275:7): [Folded - Ignored]
  |  |  |  Branch (275:72): [Folded - Ignored]
  |  |  |  Branch (275:139): [Folded - Ignored]
  |  |  ------------------
  ------------------
   36|   101k|    st[8U] = Lib_IntVector_Intrinsics_vec256_add32(st[8U], st[12U]);
  ------------------
  |  |  377|   101k|    (_mm256_add_epi32(x0, x1))
  ------------------
   37|   101k|    Lib_IntVector_Intrinsics_vec256 std0 = Lib_IntVector_Intrinsics_vec256_xor(st[4U], st[8U]);
  ------------------
  |  |  236|   101k|    (_mm256_xor_si256(x0, x1))
  ------------------
   38|   101k|    st[4U] = Lib_IntVector_Intrinsics_vec256_rotate_left32(std0, (uint32_t)12U);
  ------------------
  |  |  275|   101k|    ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  266|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3, 14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  269|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  272|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1, 12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1)))
  |  |  ------------------
  |  |  |  Branch (275:7): [Folded - Ignored]
  |  |  |  Branch (275:72): [Folded - Ignored]
  |  |  |  Branch (275:139): [Folded - Ignored]
  |  |  ------------------
  ------------------
   39|   101k|    st[0U] = Lib_IntVector_Intrinsics_vec256_add32(st[0U], st[4U]);
  ------------------
  |  |  377|   101k|    (_mm256_add_epi32(x0, x1))
  ------------------
   40|   101k|    Lib_IntVector_Intrinsics_vec256 std1 = Lib_IntVector_Intrinsics_vec256_xor(st[12U], st[0U]);
  ------------------
  |  |  236|   101k|    (_mm256_xor_si256(x0, x1))
  ------------------
   41|   101k|    st[12U] = Lib_IntVector_Intrinsics_vec256_rotate_left32(std1, (uint32_t)8U);
  ------------------
  |  |  275|   101k|    ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  266|   101k|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3, 14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  269|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  272|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1, 12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1)))
  |  |  ------------------
  |  |  |  Branch (275:7): [Folded - Ignored]
  |  |  |  Branch (275:72): [Folded - Ignored]
  |  |  |  Branch (275:139): [Folded - Ignored]
  |  |  ------------------
  ------------------
   42|   101k|    st[8U] = Lib_IntVector_Intrinsics_vec256_add32(st[8U], st[12U]);
  ------------------
  |  |  377|   101k|    (_mm256_add_epi32(x0, x1))
  ------------------
   43|   101k|    Lib_IntVector_Intrinsics_vec256 std2 = Lib_IntVector_Intrinsics_vec256_xor(st[4U], st[8U]);
  ------------------
  |  |  236|   101k|    (_mm256_xor_si256(x0, x1))
  ------------------
   44|   101k|    st[4U] = Lib_IntVector_Intrinsics_vec256_rotate_left32(std2, (uint32_t)7U);
  ------------------
  |  |  275|   101k|    ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  266|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3, 14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  269|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  272|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1, 12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1)))
  |  |  ------------------
  |  |  |  Branch (275:7): [Folded - Ignored]
  |  |  |  Branch (275:72): [Folded - Ignored]
  |  |  |  Branch (275:139): [Folded - Ignored]
  |  |  ------------------
  ------------------
   45|   101k|    st[1U] = Lib_IntVector_Intrinsics_vec256_add32(st[1U], st[5U]);
  ------------------
  |  |  377|   101k|    (_mm256_add_epi32(x0, x1))
  ------------------
   46|   101k|    Lib_IntVector_Intrinsics_vec256 std3 = Lib_IntVector_Intrinsics_vec256_xor(st[13U], st[1U]);
  ------------------
  |  |  236|   101k|    (_mm256_xor_si256(x0, x1))
  ------------------
   47|   101k|    st[13U] = Lib_IntVector_Intrinsics_vec256_rotate_left32(std3, (uint32_t)16U);
  ------------------
  |  |  275|   101k|    ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  266|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3, 14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  269|   101k|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  272|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1, 12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1)))
  |  |  ------------------
  |  |  |  Branch (275:7): [Folded - Ignored]
  |  |  |  Branch (275:72): [Folded - Ignored]
  |  |  |  Branch (275:139): [Folded - Ignored]
  |  |  ------------------
  ------------------
   48|   101k|    st[9U] = Lib_IntVector_Intrinsics_vec256_add32(st[9U], st[13U]);
  ------------------
  |  |  377|   101k|    (_mm256_add_epi32(x0, x1))
  ------------------
   49|   101k|    Lib_IntVector_Intrinsics_vec256 std4 = Lib_IntVector_Intrinsics_vec256_xor(st[5U], st[9U]);
  ------------------
  |  |  236|   101k|    (_mm256_xor_si256(x0, x1))
  ------------------
   50|   101k|    st[5U] = Lib_IntVector_Intrinsics_vec256_rotate_left32(std4, (uint32_t)12U);
  ------------------
  |  |  275|   101k|    ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  266|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3, 14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  269|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  272|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1, 12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1)))
  |  |  ------------------
  |  |  |  Branch (275:7): [Folded - Ignored]
  |  |  |  Branch (275:72): [Folded - Ignored]
  |  |  |  Branch (275:139): [Folded - Ignored]
  |  |  ------------------
  ------------------
   51|   101k|    st[1U] = Lib_IntVector_Intrinsics_vec256_add32(st[1U], st[5U]);
  ------------------
  |  |  377|   101k|    (_mm256_add_epi32(x0, x1))
  ------------------
   52|   101k|    Lib_IntVector_Intrinsics_vec256 std5 = Lib_IntVector_Intrinsics_vec256_xor(st[13U], st[1U]);
  ------------------
  |  |  236|   101k|    (_mm256_xor_si256(x0, x1))
  ------------------
   53|   101k|    st[13U] = Lib_IntVector_Intrinsics_vec256_rotate_left32(std5, (uint32_t)8U);
  ------------------
  |  |  275|   101k|    ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  266|   101k|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3, 14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  269|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  272|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1, 12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1)))
  |  |  ------------------
  |  |  |  Branch (275:7): [Folded - Ignored]
  |  |  |  Branch (275:72): [Folded - Ignored]
  |  |  |  Branch (275:139): [Folded - Ignored]
  |  |  ------------------
  ------------------
   54|   101k|    st[9U] = Lib_IntVector_Intrinsics_vec256_add32(st[9U], st[13U]);
  ------------------
  |  |  377|   101k|    (_mm256_add_epi32(x0, x1))
  ------------------
   55|   101k|    Lib_IntVector_Intrinsics_vec256 std6 = Lib_IntVector_Intrinsics_vec256_xor(st[5U], st[9U]);
  ------------------
  |  |  236|   101k|    (_mm256_xor_si256(x0, x1))
  ------------------
   56|   101k|    st[5U] = Lib_IntVector_Intrinsics_vec256_rotate_left32(std6, (uint32_t)7U);
  ------------------
  |  |  275|   101k|    ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  266|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3, 14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  269|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  272|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1, 12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1)))
  |  |  ------------------
  |  |  |  Branch (275:7): [Folded - Ignored]
  |  |  |  Branch (275:72): [Folded - Ignored]
  |  |  |  Branch (275:139): [Folded - Ignored]
  |  |  ------------------
  ------------------
   57|   101k|    st[2U] = Lib_IntVector_Intrinsics_vec256_add32(st[2U], st[6U]);
  ------------------
  |  |  377|   101k|    (_mm256_add_epi32(x0, x1))
  ------------------
   58|   101k|    Lib_IntVector_Intrinsics_vec256 std7 = Lib_IntVector_Intrinsics_vec256_xor(st[14U], st[2U]);
  ------------------
  |  |  236|   101k|    (_mm256_xor_si256(x0, x1))
  ------------------
   59|   101k|    st[14U] = Lib_IntVector_Intrinsics_vec256_rotate_left32(std7, (uint32_t)16U);
  ------------------
  |  |  275|   101k|    ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  266|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3, 14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  269|   101k|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  272|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1, 12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1)))
  |  |  ------------------
  |  |  |  Branch (275:7): [Folded - Ignored]
  |  |  |  Branch (275:72): [Folded - Ignored]
  |  |  |  Branch (275:139): [Folded - Ignored]
  |  |  ------------------
  ------------------
   60|   101k|    st[10U] = Lib_IntVector_Intrinsics_vec256_add32(st[10U], st[14U]);
  ------------------
  |  |  377|   101k|    (_mm256_add_epi32(x0, x1))
  ------------------
   61|   101k|    Lib_IntVector_Intrinsics_vec256 std8 = Lib_IntVector_Intrinsics_vec256_xor(st[6U], st[10U]);
  ------------------
  |  |  236|   101k|    (_mm256_xor_si256(x0, x1))
  ------------------
   62|   101k|    st[6U] = Lib_IntVector_Intrinsics_vec256_rotate_left32(std8, (uint32_t)12U);
  ------------------
  |  |  275|   101k|    ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  266|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3, 14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  269|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  272|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1, 12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1)))
  |  |  ------------------
  |  |  |  Branch (275:7): [Folded - Ignored]
  |  |  |  Branch (275:72): [Folded - Ignored]
  |  |  |  Branch (275:139): [Folded - Ignored]
  |  |  ------------------
  ------------------
   63|   101k|    st[2U] = Lib_IntVector_Intrinsics_vec256_add32(st[2U], st[6U]);
  ------------------
  |  |  377|   101k|    (_mm256_add_epi32(x0, x1))
  ------------------
   64|   101k|    Lib_IntVector_Intrinsics_vec256 std9 = Lib_IntVector_Intrinsics_vec256_xor(st[14U], st[2U]);
  ------------------
  |  |  236|   101k|    (_mm256_xor_si256(x0, x1))
  ------------------
   65|   101k|    st[14U] = Lib_IntVector_Intrinsics_vec256_rotate_left32(std9, (uint32_t)8U);
  ------------------
  |  |  275|   101k|    ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  266|   101k|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3, 14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  269|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  272|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1, 12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1)))
  |  |  ------------------
  |  |  |  Branch (275:7): [Folded - Ignored]
  |  |  |  Branch (275:72): [Folded - Ignored]
  |  |  |  Branch (275:139): [Folded - Ignored]
  |  |  ------------------
  ------------------
   66|   101k|    st[10U] = Lib_IntVector_Intrinsics_vec256_add32(st[10U], st[14U]);
  ------------------
  |  |  377|   101k|    (_mm256_add_epi32(x0, x1))
  ------------------
   67|   101k|    Lib_IntVector_Intrinsics_vec256 std10 = Lib_IntVector_Intrinsics_vec256_xor(st[6U], st[10U]);
  ------------------
  |  |  236|   101k|    (_mm256_xor_si256(x0, x1))
  ------------------
   68|   101k|    st[6U] = Lib_IntVector_Intrinsics_vec256_rotate_left32(std10, (uint32_t)7U);
  ------------------
  |  |  275|   101k|    ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  266|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3, 14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  269|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  272|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1, 12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1)))
  |  |  ------------------
  |  |  |  Branch (275:7): [Folded - Ignored]
  |  |  |  Branch (275:72): [Folded - Ignored]
  |  |  |  Branch (275:139): [Folded - Ignored]
  |  |  ------------------
  ------------------
   69|   101k|    st[3U] = Lib_IntVector_Intrinsics_vec256_add32(st[3U], st[7U]);
  ------------------
  |  |  377|   101k|    (_mm256_add_epi32(x0, x1))
  ------------------
   70|   101k|    Lib_IntVector_Intrinsics_vec256 std11 = Lib_IntVector_Intrinsics_vec256_xor(st[15U], st[3U]);
  ------------------
  |  |  236|   101k|    (_mm256_xor_si256(x0, x1))
  ------------------
   71|   101k|    st[15U] = Lib_IntVector_Intrinsics_vec256_rotate_left32(std11, (uint32_t)16U);
  ------------------
  |  |  275|   101k|    ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  266|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3, 14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  269|   101k|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  272|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1, 12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1)))
  |  |  ------------------
  |  |  |  Branch (275:7): [Folded - Ignored]
  |  |  |  Branch (275:72): [Folded - Ignored]
  |  |  |  Branch (275:139): [Folded - Ignored]
  |  |  ------------------
  ------------------
   72|   101k|    st[11U] = Lib_IntVector_Intrinsics_vec256_add32(st[11U], st[15U]);
  ------------------
  |  |  377|   101k|    (_mm256_add_epi32(x0, x1))
  ------------------
   73|   101k|    Lib_IntVector_Intrinsics_vec256 std12 = Lib_IntVector_Intrinsics_vec256_xor(st[7U], st[11U]);
  ------------------
  |  |  236|   101k|    (_mm256_xor_si256(x0, x1))
  ------------------
   74|   101k|    st[7U] = Lib_IntVector_Intrinsics_vec256_rotate_left32(std12, (uint32_t)12U);
  ------------------
  |  |  275|   101k|    ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  266|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3, 14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  269|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  272|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1, 12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1)))
  |  |  ------------------
  |  |  |  Branch (275:7): [Folded - Ignored]
  |  |  |  Branch (275:72): [Folded - Ignored]
  |  |  |  Branch (275:139): [Folded - Ignored]
  |  |  ------------------
  ------------------
   75|   101k|    st[3U] = Lib_IntVector_Intrinsics_vec256_add32(st[3U], st[7U]);
  ------------------
  |  |  377|   101k|    (_mm256_add_epi32(x0, x1))
  ------------------
   76|   101k|    Lib_IntVector_Intrinsics_vec256 std13 = Lib_IntVector_Intrinsics_vec256_xor(st[15U], st[3U]);
  ------------------
  |  |  236|   101k|    (_mm256_xor_si256(x0, x1))
  ------------------
   77|   101k|    st[15U] = Lib_IntVector_Intrinsics_vec256_rotate_left32(std13, (uint32_t)8U);
  ------------------
  |  |  275|   101k|    ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  266|   101k|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3, 14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  269|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  272|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1, 12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1)))
  |  |  ------------------
  |  |  |  Branch (275:7): [Folded - Ignored]
  |  |  |  Branch (275:72): [Folded - Ignored]
  |  |  |  Branch (275:139): [Folded - Ignored]
  |  |  ------------------
  ------------------
   78|   101k|    st[11U] = Lib_IntVector_Intrinsics_vec256_add32(st[11U], st[15U]);
  ------------------
  |  |  377|   101k|    (_mm256_add_epi32(x0, x1))
  ------------------
   79|   101k|    Lib_IntVector_Intrinsics_vec256 std14 = Lib_IntVector_Intrinsics_vec256_xor(st[7U], st[11U]);
  ------------------
  |  |  236|   101k|    (_mm256_xor_si256(x0, x1))
  ------------------
   80|   101k|    st[7U] = Lib_IntVector_Intrinsics_vec256_rotate_left32(std14, (uint32_t)7U);
  ------------------
  |  |  275|   101k|    ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  266|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3, 14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  269|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  272|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1, 12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1)))
  |  |  ------------------
  |  |  |  Branch (275:7): [Folded - Ignored]
  |  |  |  Branch (275:72): [Folded - Ignored]
  |  |  |  Branch (275:139): [Folded - Ignored]
  |  |  ------------------
  ------------------
   81|   101k|    st[0U] = Lib_IntVector_Intrinsics_vec256_add32(st[0U], st[5U]);
  ------------------
  |  |  377|   101k|    (_mm256_add_epi32(x0, x1))
  ------------------
   82|   101k|    Lib_IntVector_Intrinsics_vec256 std15 = Lib_IntVector_Intrinsics_vec256_xor(st[15U], st[0U]);
  ------------------
  |  |  236|   101k|    (_mm256_xor_si256(x0, x1))
  ------------------
   83|   101k|    st[15U] = Lib_IntVector_Intrinsics_vec256_rotate_left32(std15, (uint32_t)16U);
  ------------------
  |  |  275|   101k|    ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  266|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3, 14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  269|   101k|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  272|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1, 12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1)))
  |  |  ------------------
  |  |  |  Branch (275:7): [Folded - Ignored]
  |  |  |  Branch (275:72): [Folded - Ignored]
  |  |  |  Branch (275:139): [Folded - Ignored]
  |  |  ------------------
  ------------------
   84|   101k|    st[10U] = Lib_IntVector_Intrinsics_vec256_add32(st[10U], st[15U]);
  ------------------
  |  |  377|   101k|    (_mm256_add_epi32(x0, x1))
  ------------------
   85|   101k|    Lib_IntVector_Intrinsics_vec256 std16 = Lib_IntVector_Intrinsics_vec256_xor(st[5U], st[10U]);
  ------------------
  |  |  236|   101k|    (_mm256_xor_si256(x0, x1))
  ------------------
   86|   101k|    st[5U] = Lib_IntVector_Intrinsics_vec256_rotate_left32(std16, (uint32_t)12U);
  ------------------
  |  |  275|   101k|    ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  266|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3, 14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  269|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  272|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1, 12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1)))
  |  |  ------------------
  |  |  |  Branch (275:7): [Folded - Ignored]
  |  |  |  Branch (275:72): [Folded - Ignored]
  |  |  |  Branch (275:139): [Folded - Ignored]
  |  |  ------------------
  ------------------
   87|   101k|    st[0U] = Lib_IntVector_Intrinsics_vec256_add32(st[0U], st[5U]);
  ------------------
  |  |  377|   101k|    (_mm256_add_epi32(x0, x1))
  ------------------
   88|   101k|    Lib_IntVector_Intrinsics_vec256 std17 = Lib_IntVector_Intrinsics_vec256_xor(st[15U], st[0U]);
  ------------------
  |  |  236|   101k|    (_mm256_xor_si256(x0, x1))
  ------------------
   89|   101k|    st[15U] = Lib_IntVector_Intrinsics_vec256_rotate_left32(std17, (uint32_t)8U);
  ------------------
  |  |  275|   101k|    ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  266|   101k|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3, 14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  269|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  272|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1, 12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1)))
  |  |  ------------------
  |  |  |  Branch (275:7): [Folded - Ignored]
  |  |  |  Branch (275:72): [Folded - Ignored]
  |  |  |  Branch (275:139): [Folded - Ignored]
  |  |  ------------------
  ------------------
   90|   101k|    st[10U] = Lib_IntVector_Intrinsics_vec256_add32(st[10U], st[15U]);
  ------------------
  |  |  377|   101k|    (_mm256_add_epi32(x0, x1))
  ------------------
   91|   101k|    Lib_IntVector_Intrinsics_vec256 std18 = Lib_IntVector_Intrinsics_vec256_xor(st[5U], st[10U]);
  ------------------
  |  |  236|   101k|    (_mm256_xor_si256(x0, x1))
  ------------------
   92|   101k|    st[5U] = Lib_IntVector_Intrinsics_vec256_rotate_left32(std18, (uint32_t)7U);
  ------------------
  |  |  275|   101k|    ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  266|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3, 14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  269|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  272|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1, 12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1)))
  |  |  ------------------
  |  |  |  Branch (275:7): [Folded - Ignored]
  |  |  |  Branch (275:72): [Folded - Ignored]
  |  |  |  Branch (275:139): [Folded - Ignored]
  |  |  ------------------
  ------------------
   93|   101k|    st[1U] = Lib_IntVector_Intrinsics_vec256_add32(st[1U], st[6U]);
  ------------------
  |  |  377|   101k|    (_mm256_add_epi32(x0, x1))
  ------------------
   94|   101k|    Lib_IntVector_Intrinsics_vec256 std19 = Lib_IntVector_Intrinsics_vec256_xor(st[12U], st[1U]);
  ------------------
  |  |  236|   101k|    (_mm256_xor_si256(x0, x1))
  ------------------
   95|   101k|    st[12U] = Lib_IntVector_Intrinsics_vec256_rotate_left32(std19, (uint32_t)16U);
  ------------------
  |  |  275|   101k|    ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  266|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3, 14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  269|   101k|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  272|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1, 12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1)))
  |  |  ------------------
  |  |  |  Branch (275:7): [Folded - Ignored]
  |  |  |  Branch (275:72): [Folded - Ignored]
  |  |  |  Branch (275:139): [Folded - Ignored]
  |  |  ------------------
  ------------------
   96|   101k|    st[11U] = Lib_IntVector_Intrinsics_vec256_add32(st[11U], st[12U]);
  ------------------
  |  |  377|   101k|    (_mm256_add_epi32(x0, x1))
  ------------------
   97|   101k|    Lib_IntVector_Intrinsics_vec256 std20 = Lib_IntVector_Intrinsics_vec256_xor(st[6U], st[11U]);
  ------------------
  |  |  236|   101k|    (_mm256_xor_si256(x0, x1))
  ------------------
   98|   101k|    st[6U] = Lib_IntVector_Intrinsics_vec256_rotate_left32(std20, (uint32_t)12U);
  ------------------
  |  |  275|   101k|    ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  266|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3, 14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  269|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  272|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1, 12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1)))
  |  |  ------------------
  |  |  |  Branch (275:7): [Folded - Ignored]
  |  |  |  Branch (275:72): [Folded - Ignored]
  |  |  |  Branch (275:139): [Folded - Ignored]
  |  |  ------------------
  ------------------
   99|   101k|    st[1U] = Lib_IntVector_Intrinsics_vec256_add32(st[1U], st[6U]);
  ------------------
  |  |  377|   101k|    (_mm256_add_epi32(x0, x1))
  ------------------
  100|   101k|    Lib_IntVector_Intrinsics_vec256 std21 = Lib_IntVector_Intrinsics_vec256_xor(st[12U], st[1U]);
  ------------------
  |  |  236|   101k|    (_mm256_xor_si256(x0, x1))
  ------------------
  101|   101k|    st[12U] = Lib_IntVector_Intrinsics_vec256_rotate_left32(std21, (uint32_t)8U);
  ------------------
  |  |  275|   101k|    ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  266|   101k|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3, 14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  269|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  272|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1, 12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1)))
  |  |  ------------------
  |  |  |  Branch (275:7): [Folded - Ignored]
  |  |  |  Branch (275:72): [Folded - Ignored]
  |  |  |  Branch (275:139): [Folded - Ignored]
  |  |  ------------------
  ------------------
  102|   101k|    st[11U] = Lib_IntVector_Intrinsics_vec256_add32(st[11U], st[12U]);
  ------------------
  |  |  377|   101k|    (_mm256_add_epi32(x0, x1))
  ------------------
  103|   101k|    Lib_IntVector_Intrinsics_vec256 std22 = Lib_IntVector_Intrinsics_vec256_xor(st[6U], st[11U]);
  ------------------
  |  |  236|   101k|    (_mm256_xor_si256(x0, x1))
  ------------------
  104|   101k|    st[6U] = Lib_IntVector_Intrinsics_vec256_rotate_left32(std22, (uint32_t)7U);
  ------------------
  |  |  275|   101k|    ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  266|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3, 14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  269|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  272|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1, 12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1)))
  |  |  ------------------
  |  |  |  Branch (275:7): [Folded - Ignored]
  |  |  |  Branch (275:72): [Folded - Ignored]
  |  |  |  Branch (275:139): [Folded - Ignored]
  |  |  ------------------
  ------------------
  105|   101k|    st[2U] = Lib_IntVector_Intrinsics_vec256_add32(st[2U], st[7U]);
  ------------------
  |  |  377|   101k|    (_mm256_add_epi32(x0, x1))
  ------------------
  106|   101k|    Lib_IntVector_Intrinsics_vec256 std23 = Lib_IntVector_Intrinsics_vec256_xor(st[13U], st[2U]);
  ------------------
  |  |  236|   101k|    (_mm256_xor_si256(x0, x1))
  ------------------
  107|   101k|    st[13U] = Lib_IntVector_Intrinsics_vec256_rotate_left32(std23, (uint32_t)16U);
  ------------------
  |  |  275|   101k|    ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  266|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3, 14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  269|   101k|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  272|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1, 12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1)))
  |  |  ------------------
  |  |  |  Branch (275:7): [Folded - Ignored]
  |  |  |  Branch (275:72): [Folded - Ignored]
  |  |  |  Branch (275:139): [Folded - Ignored]
  |  |  ------------------
  ------------------
  108|   101k|    st[8U] = Lib_IntVector_Intrinsics_vec256_add32(st[8U], st[13U]);
  ------------------
  |  |  377|   101k|    (_mm256_add_epi32(x0, x1))
  ------------------
  109|   101k|    Lib_IntVector_Intrinsics_vec256 std24 = Lib_IntVector_Intrinsics_vec256_xor(st[7U], st[8U]);
  ------------------
  |  |  236|   101k|    (_mm256_xor_si256(x0, x1))
  ------------------
  110|   101k|    st[7U] = Lib_IntVector_Intrinsics_vec256_rotate_left32(std24, (uint32_t)12U);
  ------------------
  |  |  275|   101k|    ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  266|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3, 14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  269|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  272|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1, 12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1)))
  |  |  ------------------
  |  |  |  Branch (275:7): [Folded - Ignored]
  |  |  |  Branch (275:72): [Folded - Ignored]
  |  |  |  Branch (275:139): [Folded - Ignored]
  |  |  ------------------
  ------------------
  111|   101k|    st[2U] = Lib_IntVector_Intrinsics_vec256_add32(st[2U], st[7U]);
  ------------------
  |  |  377|   101k|    (_mm256_add_epi32(x0, x1))
  ------------------
  112|   101k|    Lib_IntVector_Intrinsics_vec256 std25 = Lib_IntVector_Intrinsics_vec256_xor(st[13U], st[2U]);
  ------------------
  |  |  236|   101k|    (_mm256_xor_si256(x0, x1))
  ------------------
  113|   101k|    st[13U] = Lib_IntVector_Intrinsics_vec256_rotate_left32(std25, (uint32_t)8U);
  ------------------
  |  |  275|   101k|    ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  266|   101k|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3, 14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  269|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  272|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1, 12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1)))
  |  |  ------------------
  |  |  |  Branch (275:7): [Folded - Ignored]
  |  |  |  Branch (275:72): [Folded - Ignored]
  |  |  |  Branch (275:139): [Folded - Ignored]
  |  |  ------------------
  ------------------
  114|   101k|    st[8U] = Lib_IntVector_Intrinsics_vec256_add32(st[8U], st[13U]);
  ------------------
  |  |  377|   101k|    (_mm256_add_epi32(x0, x1))
  ------------------
  115|   101k|    Lib_IntVector_Intrinsics_vec256 std26 = Lib_IntVector_Intrinsics_vec256_xor(st[7U], st[8U]);
  ------------------
  |  |  236|   101k|    (_mm256_xor_si256(x0, x1))
  ------------------
  116|   101k|    st[7U] = Lib_IntVector_Intrinsics_vec256_rotate_left32(std26, (uint32_t)7U);
  ------------------
  |  |  275|   101k|    ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  266|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3, 14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  269|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  272|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1, 12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1)))
  |  |  ------------------
  |  |  |  Branch (275:7): [Folded - Ignored]
  |  |  |  Branch (275:72): [Folded - Ignored]
  |  |  |  Branch (275:139): [Folded - Ignored]
  |  |  ------------------
  ------------------
  117|   101k|    st[3U] = Lib_IntVector_Intrinsics_vec256_add32(st[3U], st[4U]);
  ------------------
  |  |  377|   101k|    (_mm256_add_epi32(x0, x1))
  ------------------
  118|   101k|    Lib_IntVector_Intrinsics_vec256 std27 = Lib_IntVector_Intrinsics_vec256_xor(st[14U], st[3U]);
  ------------------
  |  |  236|   101k|    (_mm256_xor_si256(x0, x1))
  ------------------
  119|   101k|    st[14U] = Lib_IntVector_Intrinsics_vec256_rotate_left32(std27, (uint32_t)16U);
  ------------------
  |  |  275|   101k|    ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  266|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3, 14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  269|   101k|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  272|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1, 12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1)))
  |  |  ------------------
  |  |  |  Branch (275:7): [Folded - Ignored]
  |  |  |  Branch (275:72): [Folded - Ignored]
  |  |  |  Branch (275:139): [Folded - Ignored]
  |  |  ------------------
  ------------------
  120|   101k|    st[9U] = Lib_IntVector_Intrinsics_vec256_add32(st[9U], st[14U]);
  ------------------
  |  |  377|   101k|    (_mm256_add_epi32(x0, x1))
  ------------------
  121|   101k|    Lib_IntVector_Intrinsics_vec256 std28 = Lib_IntVector_Intrinsics_vec256_xor(st[4U], st[9U]);
  ------------------
  |  |  236|   101k|    (_mm256_xor_si256(x0, x1))
  ------------------
  122|   101k|    st[4U] = Lib_IntVector_Intrinsics_vec256_rotate_left32(std28, (uint32_t)12U);
  ------------------
  |  |  275|   101k|    ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  266|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3, 14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  269|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  272|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1, 12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1)))
  |  |  ------------------
  |  |  |  Branch (275:7): [Folded - Ignored]
  |  |  |  Branch (275:72): [Folded - Ignored]
  |  |  |  Branch (275:139): [Folded - Ignored]
  |  |  ------------------
  ------------------
  123|   101k|    st[3U] = Lib_IntVector_Intrinsics_vec256_add32(st[3U], st[4U]);
  ------------------
  |  |  377|   101k|    (_mm256_add_epi32(x0, x1))
  ------------------
  124|   101k|    Lib_IntVector_Intrinsics_vec256 std29 = Lib_IntVector_Intrinsics_vec256_xor(st[14U], st[3U]);
  ------------------
  |  |  236|   101k|    (_mm256_xor_si256(x0, x1))
  ------------------
  125|   101k|    st[14U] = Lib_IntVector_Intrinsics_vec256_rotate_left32(std29, (uint32_t)8U);
  ------------------
  |  |  275|   101k|    ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  266|   101k|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3, 14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  269|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  272|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1, 12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1)))
  |  |  ------------------
  |  |  |  Branch (275:7): [Folded - Ignored]
  |  |  |  Branch (275:72): [Folded - Ignored]
  |  |  |  Branch (275:139): [Folded - Ignored]
  |  |  ------------------
  ------------------
  126|   101k|    st[9U] = Lib_IntVector_Intrinsics_vec256_add32(st[9U], st[14U]);
  ------------------
  |  |  377|   101k|    (_mm256_add_epi32(x0, x1))
  ------------------
  127|   101k|    Lib_IntVector_Intrinsics_vec256 std30 = Lib_IntVector_Intrinsics_vec256_xor(st[4U], st[9U]);
  ------------------
  |  |  236|   101k|    (_mm256_xor_si256(x0, x1))
  ------------------
  128|   101k|    st[4U] = Lib_IntVector_Intrinsics_vec256_rotate_left32(std30, (uint32_t)7U);
  ------------------
  |  |  275|   101k|    ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  266|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3, 14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  269|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2)))
  |  |  ------------------
  |  |                   ((x1 == 8 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_8(x0) : (x1 == 16 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_16(x0) : (x1 == 24 ? Lib_IntVector_Intrinsics_vec256_rotate_left32_24(x0) : _mm256_or_si256(_mm256_slli_epi32(x0, x1), _mm256_srli_epi32(x0, 32 - (x1)))))))
  |  |  ------------------
  |  |  |  |  272|      0|    (_mm256_shuffle_epi8(x0, _mm256_set_epi8(12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1, 12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1)))
  |  |  ------------------
  |  |  |  Branch (275:7): [Folded - Ignored]
  |  |  |  Branch (275:72): [Folded - Ignored]
  |  |  |  Branch (275:139): [Folded - Ignored]
  |  |  ------------------
  ------------------
  129|   101k|}

Hacl_Curve25519_51_fsquare_times:
  163|  93.5k|{
  164|  93.5k|    Hacl_Impl_Curve25519_Field51_fsqr(o, inp, tmp);
  165|  2.15M|    for (uint32_t i = (uint32_t)0U; i < n - (uint32_t)1U; i++) {
  ------------------
  |  Branch (165:37): [True: 2.06M, False: 93.5k]
  ------------------
  166|  2.06M|        Hacl_Impl_Curve25519_Field51_fsqr(o, o, tmp);
  167|  2.06M|    }
  168|  93.5k|}
Hacl_Curve25519_51_finv:
  172|  8.50k|{
  173|  8.50k|    uint64_t t1[20U] = { 0U };
  174|  8.50k|    uint64_t *a1 = t1;
  175|  8.50k|    uint64_t *b1 = t1 + (uint32_t)5U;
  176|  8.50k|    uint64_t *t010 = t1 + (uint32_t)15U;
  177|  8.50k|    FStar_UInt128_uint128 *tmp10 = tmp;
  178|  8.50k|    Hacl_Curve25519_51_fsquare_times(a1, i, tmp10, (uint32_t)1U);
  179|  8.50k|    Hacl_Curve25519_51_fsquare_times(t010, a1, tmp10, (uint32_t)2U);
  180|  8.50k|    Hacl_Impl_Curve25519_Field51_fmul(b1, t010, i, tmp);
  181|  8.50k|    Hacl_Impl_Curve25519_Field51_fmul(a1, b1, a1, tmp);
  182|  8.50k|    Hacl_Curve25519_51_fsquare_times(t010, a1, tmp10, (uint32_t)1U);
  183|  8.50k|    Hacl_Impl_Curve25519_Field51_fmul(b1, t010, b1, tmp);
  184|  8.50k|    Hacl_Curve25519_51_fsquare_times(t010, b1, tmp10, (uint32_t)5U);
  185|  8.50k|    Hacl_Impl_Curve25519_Field51_fmul(b1, t010, b1, tmp);
  186|  8.50k|    uint64_t *b10 = t1 + (uint32_t)5U;
  187|  8.50k|    uint64_t *c10 = t1 + (uint32_t)10U;
  188|  8.50k|    uint64_t *t011 = t1 + (uint32_t)15U;
  189|  8.50k|    FStar_UInt128_uint128 *tmp11 = tmp;
  190|  8.50k|    Hacl_Curve25519_51_fsquare_times(t011, b10, tmp11, (uint32_t)10U);
  191|  8.50k|    Hacl_Impl_Curve25519_Field51_fmul(c10, t011, b10, tmp);
  192|  8.50k|    Hacl_Curve25519_51_fsquare_times(t011, c10, tmp11, (uint32_t)20U);
  193|  8.50k|    Hacl_Impl_Curve25519_Field51_fmul(t011, t011, c10, tmp);
  194|  8.50k|    Hacl_Curve25519_51_fsquare_times(t011, t011, tmp11, (uint32_t)10U);
  195|  8.50k|    Hacl_Impl_Curve25519_Field51_fmul(b10, t011, b10, tmp);
  196|  8.50k|    Hacl_Curve25519_51_fsquare_times(t011, b10, tmp11, (uint32_t)50U);
  197|  8.50k|    Hacl_Impl_Curve25519_Field51_fmul(c10, t011, b10, tmp);
  198|  8.50k|    uint64_t *b11 = t1 + (uint32_t)5U;
  199|  8.50k|    uint64_t *c1 = t1 + (uint32_t)10U;
  200|  8.50k|    uint64_t *t01 = t1 + (uint32_t)15U;
  201|  8.50k|    FStar_UInt128_uint128 *tmp1 = tmp;
  202|  8.50k|    Hacl_Curve25519_51_fsquare_times(t01, c1, tmp1, (uint32_t)100U);
  203|  8.50k|    Hacl_Impl_Curve25519_Field51_fmul(t01, t01, c1, tmp);
  204|  8.50k|    Hacl_Curve25519_51_fsquare_times(t01, t01, tmp1, (uint32_t)50U);
  205|  8.50k|    Hacl_Impl_Curve25519_Field51_fmul(t01, t01, b11, tmp);
  206|  8.50k|    Hacl_Curve25519_51_fsquare_times(t01, t01, tmp1, (uint32_t)5U);
  207|  8.50k|    uint64_t *a = t1;
  208|  8.50k|    uint64_t *t0 = t1 + (uint32_t)15U;
  209|  8.50k|    Hacl_Impl_Curve25519_Field51_fmul(o, t0, a, tmp);
  210|  8.50k|}
Hacl_Curve25519_51_scalarmult:
  241|  8.50k|{
  242|  8.50k|    uint64_t init[10U] = { 0U };
  243|  8.50k|    uint64_t tmp[4U] = { 0U };
  244|  8.50k|    KRML_MAYBE_FOR4(i,
  ------------------
  |  |  330|  8.50k|#define KRML_MAYBE_FOR4(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 4, k, x)
  |  |  ------------------
  |  |  |  |  288|  8.50k|    do {                               \
  |  |  |  |  289|  8.50k|        uint32_t i = z;                \
  |  |  |  |  290|  8.50k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  8.50k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  245|  8.50k|                    (uint32_t)0U,
  246|  8.50k|                    (uint32_t)4U,
  247|  8.50k|                    (uint32_t)1U,
  248|  8.50k|                    uint64_t *os = tmp;
  249|  8.50k|                    uint8_t *bj = pub + i * (uint32_t)8U;
  250|  8.50k|                    uint64_t u = load64_le(bj);
  251|  8.50k|                    uint64_t r = u;
  252|  8.50k|                    uint64_t x = r;
  253|  8.50k|                    os[i] = x;);
  254|  8.50k|    uint64_t tmp3 = tmp[3U];
  255|  8.50k|    tmp[3U] = tmp3 & (uint64_t)0x7fffffffffffffffU;
  256|  8.50k|    uint64_t *x = init;
  257|  8.50k|    uint64_t *z = init + (uint32_t)5U;
  258|  8.50k|    z[0U] = (uint64_t)1U;
  259|  8.50k|    z[1U] = (uint64_t)0U;
  260|  8.50k|    z[2U] = (uint64_t)0U;
  261|  8.50k|    z[3U] = (uint64_t)0U;
  262|  8.50k|    z[4U] = (uint64_t)0U;
  263|  8.50k|    uint64_t f0l = tmp[0U] & (uint64_t)0x7ffffffffffffU;
  264|  8.50k|    uint64_t f0h = tmp[0U] >> (uint32_t)51U;
  265|  8.50k|    uint64_t f1l = (tmp[1U] & (uint64_t)0x3fffffffffU) << (uint32_t)13U;
  266|  8.50k|    uint64_t f1h = tmp[1U] >> (uint32_t)38U;
  267|  8.50k|    uint64_t f2l = (tmp[2U] & (uint64_t)0x1ffffffU) << (uint32_t)26U;
  268|  8.50k|    uint64_t f2h = tmp[2U] >> (uint32_t)25U;
  269|  8.50k|    uint64_t f3l = (tmp[3U] & (uint64_t)0xfffU) << (uint32_t)39U;
  270|  8.50k|    uint64_t f3h = tmp[3U] >> (uint32_t)12U;
  271|  8.50k|    x[0U] = f0l;
  272|  8.50k|    x[1U] = f0h | f1l;
  273|  8.50k|    x[2U] = f1h | f2l;
  274|  8.50k|    x[3U] = f2h | f3l;
  275|  8.50k|    x[4U] = f3h;
  276|  8.50k|    montgomery_ladder(init, priv, init);
  277|  8.50k|    encode_point(out, init);
  278|  8.50k|}
Hacl_Curve25519_51_ecdh:
  309|  8.50k|{
  310|  8.50k|    uint8_t zeros[32U] = { 0U };
  311|  8.50k|    Hacl_Curve25519_51_scalarmult(out, priv, pub);
  312|  8.50k|    uint8_t res = (uint8_t)255U;
  313|   280k|    for (uint32_t i = (uint32_t)0U; i < (uint32_t)32U; i++) {
  ------------------
  |  Branch (313:37): [True: 272k, False: 8.50k]
  ------------------
  314|   272k|        uint8_t uu____0 = FStar_UInt8_eq_mask(out[i], zeros[i]);
  315|   272k|        res = uu____0 & res;
  316|   272k|    }
  317|  8.50k|    uint8_t z = res;
  318|  8.50k|    bool r = z == (uint8_t)255U;
  319|  8.50k|    return !r;
  320|  8.50k|}
Hacl_Curve25519_51.c:montgomery_ladder:
  104|  8.50k|{
  105|  8.50k|    FStar_UInt128_uint128 tmp2[10U];
  106|  93.5k|    for (uint32_t _i = 0U; _i < (uint32_t)10U; ++_i)
  ------------------
  |  Branch (106:28): [True: 85.0k, False: 8.50k]
  ------------------
  107|  85.0k|        tmp2[_i] = FStar_UInt128_uint64_to_uint128((uint64_t)0U);
  108|  8.50k|    uint64_t p01_tmp1_swap[41U] = { 0U };
  109|  8.50k|    uint64_t *p0 = p01_tmp1_swap;
  110|  8.50k|    uint64_t *p01 = p01_tmp1_swap;
  111|  8.50k|    uint64_t *p03 = p01;
  112|  8.50k|    uint64_t *p11 = p01 + (uint32_t)10U;
  113|  8.50k|    memcpy(p11, init, (uint32_t)10U * sizeof(uint64_t));
  114|  8.50k|    uint64_t *x0 = p03;
  115|  8.50k|    uint64_t *z0 = p03 + (uint32_t)5U;
  116|  8.50k|    x0[0U] = (uint64_t)1U;
  117|  8.50k|    x0[1U] = (uint64_t)0U;
  118|  8.50k|    x0[2U] = (uint64_t)0U;
  119|  8.50k|    x0[3U] = (uint64_t)0U;
  120|  8.50k|    x0[4U] = (uint64_t)0U;
  121|  8.50k|    z0[0U] = (uint64_t)0U;
  122|  8.50k|    z0[1U] = (uint64_t)0U;
  123|  8.50k|    z0[2U] = (uint64_t)0U;
  124|  8.50k|    z0[3U] = (uint64_t)0U;
  125|  8.50k|    z0[4U] = (uint64_t)0U;
  126|  8.50k|    uint64_t *p01_tmp1 = p01_tmp1_swap;
  127|  8.50k|    uint64_t *p01_tmp11 = p01_tmp1_swap;
  128|  8.50k|    uint64_t *nq1 = p01_tmp1_swap;
  129|  8.50k|    uint64_t *nq_p11 = p01_tmp1_swap + (uint32_t)10U;
  130|  8.50k|    uint64_t *swap = p01_tmp1_swap + (uint32_t)40U;
  131|  8.50k|    Hacl_Impl_Curve25519_Field51_cswap2((uint64_t)1U, nq1, nq_p11);
  132|  8.50k|    point_add_and_double(init, p01_tmp11, tmp2);
  133|  8.50k|    swap[0U] = (uint64_t)1U;
  134|  2.14M|    for (uint32_t i = (uint32_t)0U; i < (uint32_t)251U; i++) {
  ------------------
  |  Branch (134:37): [True: 2.13M, False: 8.50k]
  ------------------
  135|  2.13M|        uint64_t *p01_tmp12 = p01_tmp1_swap;
  136|  2.13M|        uint64_t *swap1 = p01_tmp1_swap + (uint32_t)40U;
  137|  2.13M|        uint64_t *nq2 = p01_tmp12;
  138|  2.13M|        uint64_t *nq_p12 = p01_tmp12 + (uint32_t)10U;
  139|  2.13M|        uint64_t
  140|  2.13M|            bit =
  141|  2.13M|                (uint64_t)(key[((uint32_t)253U - i) / (uint32_t)8U] >> ((uint32_t)253U - i) % (uint32_t)8U & (uint8_t)1U);
  142|  2.13M|        uint64_t sw = swap1[0U] ^ bit;
  143|  2.13M|        Hacl_Impl_Curve25519_Field51_cswap2(sw, nq2, nq_p12);
  144|  2.13M|        point_add_and_double(init, p01_tmp12, tmp2);
  145|  2.13M|        swap1[0U] = bit;
  146|  2.13M|    }
  147|  8.50k|    uint64_t sw = swap[0U];
  148|  8.50k|    Hacl_Impl_Curve25519_Field51_cswap2(sw, nq1, nq_p11);
  149|  8.50k|    uint64_t *nq10 = p01_tmp1;
  150|  8.50k|    uint64_t *tmp1 = p01_tmp1 + (uint32_t)20U;
  151|  8.50k|    point_double(nq10, tmp1, tmp2);
  152|  8.50k|    point_double(nq10, tmp1, tmp2);
  153|  8.50k|    point_double(nq10, tmp1, tmp2);
  154|  8.50k|    memcpy(out, p0, (uint32_t)10U * sizeof(uint64_t));
  155|  8.50k|}
Hacl_Curve25519_51.c:point_add_and_double:
   34|  2.14M|{
   35|  2.14M|    uint64_t *nq = p01_tmp1;
   36|  2.14M|    uint64_t *nq_p1 = p01_tmp1 + (uint32_t)10U;
   37|  2.14M|    uint64_t *tmp1 = p01_tmp1 + (uint32_t)20U;
   38|  2.14M|    uint64_t *x1 = q;
   39|  2.14M|    uint64_t *x2 = nq;
   40|  2.14M|    uint64_t *z2 = nq + (uint32_t)5U;
   41|  2.14M|    uint64_t *z3 = nq_p1 + (uint32_t)5U;
   42|  2.14M|    uint64_t *a = tmp1;
   43|  2.14M|    uint64_t *b = tmp1 + (uint32_t)5U;
   44|  2.14M|    uint64_t *ab = tmp1;
   45|  2.14M|    uint64_t *dc = tmp1 + (uint32_t)10U;
   46|  2.14M|    Hacl_Impl_Curve25519_Field51_fadd(a, x2, z2);
   47|  2.14M|    Hacl_Impl_Curve25519_Field51_fsub(b, x2, z2);
   48|  2.14M|    uint64_t *x3 = nq_p1;
   49|  2.14M|    uint64_t *z31 = nq_p1 + (uint32_t)5U;
   50|  2.14M|    uint64_t *d0 = dc;
   51|  2.14M|    uint64_t *c0 = dc + (uint32_t)5U;
   52|  2.14M|    Hacl_Impl_Curve25519_Field51_fadd(c0, x3, z31);
   53|  2.14M|    Hacl_Impl_Curve25519_Field51_fsub(d0, x3, z31);
   54|  2.14M|    Hacl_Impl_Curve25519_Field51_fmul2(dc, dc, ab, tmp2);
   55|  2.14M|    Hacl_Impl_Curve25519_Field51_fadd(x3, d0, c0);
   56|  2.14M|    Hacl_Impl_Curve25519_Field51_fsub(z31, d0, c0);
   57|  2.14M|    uint64_t *a1 = tmp1;
   58|  2.14M|    uint64_t *b1 = tmp1 + (uint32_t)5U;
   59|  2.14M|    uint64_t *d = tmp1 + (uint32_t)10U;
   60|  2.14M|    uint64_t *c = tmp1 + (uint32_t)15U;
   61|  2.14M|    uint64_t *ab1 = tmp1;
   62|  2.14M|    uint64_t *dc1 = tmp1 + (uint32_t)10U;
   63|  2.14M|    Hacl_Impl_Curve25519_Field51_fsqr2(dc1, ab1, tmp2);
   64|  2.14M|    Hacl_Impl_Curve25519_Field51_fsqr2(nq_p1, nq_p1, tmp2);
   65|  2.14M|    a1[0U] = c[0U];
   66|  2.14M|    a1[1U] = c[1U];
   67|  2.14M|    a1[2U] = c[2U];
   68|  2.14M|    a1[3U] = c[3U];
   69|  2.14M|    a1[4U] = c[4U];
   70|  2.14M|    Hacl_Impl_Curve25519_Field51_fsub(c, d, c);
   71|  2.14M|    Hacl_Impl_Curve25519_Field51_fmul1(b1, c, (uint64_t)121665U);
   72|  2.14M|    Hacl_Impl_Curve25519_Field51_fadd(b1, b1, d);
   73|  2.14M|    Hacl_Impl_Curve25519_Field51_fmul2(nq, dc1, ab1, tmp2);
   74|  2.14M|    Hacl_Impl_Curve25519_Field51_fmul(z3, z3, x1, tmp2);
   75|  2.14M|}
Hacl_Curve25519_51.c:point_double:
   79|  25.5k|{
   80|  25.5k|    uint64_t *x2 = nq;
   81|  25.5k|    uint64_t *z2 = nq + (uint32_t)5U;
   82|  25.5k|    uint64_t *a = tmp1;
   83|  25.5k|    uint64_t *b = tmp1 + (uint32_t)5U;
   84|  25.5k|    uint64_t *d = tmp1 + (uint32_t)10U;
   85|  25.5k|    uint64_t *c = tmp1 + (uint32_t)15U;
   86|  25.5k|    uint64_t *ab = tmp1;
   87|  25.5k|    uint64_t *dc = tmp1 + (uint32_t)10U;
   88|  25.5k|    Hacl_Impl_Curve25519_Field51_fadd(a, x2, z2);
   89|  25.5k|    Hacl_Impl_Curve25519_Field51_fsub(b, x2, z2);
   90|  25.5k|    Hacl_Impl_Curve25519_Field51_fsqr2(dc, ab, tmp2);
   91|  25.5k|    a[0U] = c[0U];
   92|  25.5k|    a[1U] = c[1U];
   93|  25.5k|    a[2U] = c[2U];
   94|  25.5k|    a[3U] = c[3U];
   95|  25.5k|    a[4U] = c[4U];
   96|  25.5k|    Hacl_Impl_Curve25519_Field51_fsub(c, d, c);
   97|  25.5k|    Hacl_Impl_Curve25519_Field51_fmul1(b, c, (uint64_t)121665U);
   98|  25.5k|    Hacl_Impl_Curve25519_Field51_fadd(b, b, d);
   99|  25.5k|    Hacl_Impl_Curve25519_Field51_fmul2(nq, dc, ab, tmp2);
  100|  25.5k|}
Hacl_Curve25519_51.c:encode_point:
  214|  8.50k|{
  215|  8.50k|    uint64_t *x = i;
  216|  8.50k|    uint64_t *z = i + (uint32_t)5U;
  217|  8.50k|    uint64_t tmp[5U] = { 0U };
  218|  8.50k|    uint64_t u64s[4U] = { 0U };
  219|  8.50k|    FStar_UInt128_uint128 tmp_w[10U];
  220|  93.5k|    for (uint32_t _i = 0U; _i < (uint32_t)10U; ++_i)
  ------------------
  |  Branch (220:28): [True: 85.0k, False: 8.50k]
  ------------------
  221|  85.0k|        tmp_w[_i] = FStar_UInt128_uint64_to_uint128((uint64_t)0U);
  222|  8.50k|    Hacl_Curve25519_51_finv(tmp, z, tmp_w);
  223|  8.50k|    Hacl_Impl_Curve25519_Field51_fmul(tmp, tmp, x, tmp_w);
  224|  8.50k|    Hacl_Impl_Curve25519_Field51_store_felem(u64s, tmp);
  225|  8.50k|    KRML_MAYBE_FOR4(i0,
  ------------------
  |  |  330|  8.50k|#define KRML_MAYBE_FOR4(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 4, k, x)
  |  |  ------------------
  |  |  |  |  288|  8.50k|    do {                               \
  |  |  |  |  289|  8.50k|        uint32_t i = z;                \
  |  |  |  |  290|  8.50k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  8.50k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  226|  8.50k|                    (uint32_t)0U,
  227|  8.50k|                    (uint32_t)4U,
  228|  8.50k|                    (uint32_t)1U,
  229|  8.50k|                    store64_le(o + i0 * (uint32_t)8U, u64s[i0]););
  230|  8.50k|}

Hacl_Impl_P256_DH_ecp256dh_i:
 1284|    396|{
 1285|    396|    uint64_t tmp[16U] = { 0U };
 1286|    396|    uint64_t *sk = tmp;
 1287|    396|    uint64_t *pk = tmp + (uint32_t)4U;
 1288|    396|    bn_from_bytes_be4(sk, private_key);
 1289|    396|    uint64_t is_b_valid = bn_is_lt_order_and_gt_zero_mask4(sk);
 1290|    396|    uint64_t oneq[4U] = { 0U };
 1291|    396|    oneq[0U] = (uint64_t)1U;
 1292|    396|    oneq[1U] = (uint64_t)0U;
 1293|    396|    oneq[2U] = (uint64_t)0U;
 1294|    396|    oneq[3U] = (uint64_t)0U;
 1295|    396|    KRML_MAYBE_FOR4(i,
  ------------------
  |  |  330|    396|#define KRML_MAYBE_FOR4(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 4, k, x)
  |  |  ------------------
  |  |  |  |  288|    396|    do {                               \
  |  |  |  |  289|    396|        uint32_t i = z;                \
  |  |  |  |  290|    396|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|    396|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1296|    396|                    (uint32_t)0U,
 1297|    396|                    (uint32_t)4U,
 1298|    396|                    (uint32_t)1U,
 1299|    396|                    uint64_t *os = sk;
 1300|    396|                    uint64_t uu____0 = oneq[i];
 1301|    396|                    uint64_t x = uu____0 ^ (is_b_valid & (sk[i] ^ uu____0));
 1302|    396|                    os[i] = x;);
 1303|    396|    uint64_t is_sk_valid = is_b_valid;
 1304|    396|    point_mul_g(pk, sk);
 1305|    396|    point_store(public_key, pk);
 1306|    396|    return is_sk_valid == (uint64_t)0xFFFFFFFFFFFFFFFFU;
 1307|    396|}
Hacl_Impl_P256_DH_ecp256dh_r:
 1314|    351|{
 1315|    351|    uint64_t tmp[16U] = { 0U };
 1316|    351|    uint64_t *sk = tmp;
 1317|    351|    uint64_t *pk = tmp + (uint32_t)4U;
 1318|    351|    bool is_pk_valid = load_point_vartime(pk, their_pubkey);
 1319|    351|    bn_from_bytes_be4(sk, private_key);
 1320|    351|    uint64_t is_b_valid = bn_is_lt_order_and_gt_zero_mask4(sk);
 1321|    351|    uint64_t oneq[4U] = { 0U };
 1322|    351|    oneq[0U] = (uint64_t)1U;
 1323|    351|    oneq[1U] = (uint64_t)0U;
 1324|    351|    oneq[2U] = (uint64_t)0U;
 1325|    351|    oneq[3U] = (uint64_t)0U;
 1326|    351|    KRML_MAYBE_FOR4(i,
  ------------------
  |  |  330|    351|#define KRML_MAYBE_FOR4(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 4, k, x)
  |  |  ------------------
  |  |  |  |  288|    351|    do {                               \
  |  |  |  |  289|    351|        uint32_t i = z;                \
  |  |  |  |  290|    351|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|    351|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1327|    351|                    (uint32_t)0U,
 1328|    351|                    (uint32_t)4U,
 1329|    351|                    (uint32_t)1U,
 1330|    351|                    uint64_t *os = sk;
 1331|    351|                    uint64_t uu____0 = oneq[i];
 1332|    351|                    uint64_t x = uu____0 ^ (is_b_valid & (sk[i] ^ uu____0));
 1333|    351|                    os[i] = x;);
 1334|    351|    uint64_t is_sk_valid = is_b_valid;
 1335|    351|    uint64_t ss_proj[12U] = { 0U };
 1336|    351|    if (is_pk_valid) {
  ------------------
  |  Branch (1336:9): [True: 351, False: 0]
  ------------------
 1337|    351|        point_mul(ss_proj, sk, pk);
 1338|    351|        point_store(shared_secret, ss_proj);
 1339|    351|    }
 1340|    351|    return is_sk_valid == (uint64_t)0xFFFFFFFFFFFFFFFFU && is_pk_valid;
  ------------------
  |  Branch (1340:12): [True: 351, False: 0]
  |  Branch (1340:60): [True: 351, False: 0]
  ------------------
 1341|    351|}
Hacl_P256_ecdsa_verif_without_hash:
 1643|     62|{
 1644|     62|    uint64_t m_q[4U] = { 0U };
 1645|     62|    uint8_t mHash[32U] = { 0U };
 1646|     62|    memcpy(mHash, msg, (uint32_t)32U * sizeof(uint8_t));
 1647|     62|    KRML_HOST_IGNORE(msg_len);
  ------------------
  |  |   56|     62|#define KRML_HOST_IGNORE(x) (void)(x)
  ------------------
 1648|     62|    uint8_t *mHash32 = mHash;
 1649|     62|    bn_from_bytes_be4(m_q, mHash32);
 1650|     62|    qmod_short(m_q, m_q);
 1651|     62|    bool res = ecdsa_verify_msg_as_qelem(m_q, public_key, signature_r, signature_s);
 1652|     62|    return res;
 1653|     62|}
Hacl_P256_validate_public_key:
 1675|    891|{
 1676|    891|    uint64_t point_jac[12U] = { 0U };
 1677|    891|    bool res = load_point_vartime(point_jac, public_key);
 1678|    891|    return res;
 1679|    891|}
Hacl_P256_validate_private_key:
 1693|    396|{
 1694|    396|    uint64_t bn_sk[4U] = { 0U };
 1695|    396|    bn_from_bytes_be4(bn_sk, private_key);
 1696|    396|    uint64_t res = bn_is_lt_order_and_gt_zero_mask4(bn_sk);
 1697|    396|    return res == (uint64_t)0xFFFFFFFFFFFFFFFFU;
 1698|    396|}
Hacl_P256_dh_initiator:
 1809|    396|{
 1810|    396|    return Hacl_Impl_P256_DH_ecp256dh_i(public_key, private_key);
 1811|    396|}
Hacl_P256_dh_responder:
 1827|    351|{
 1828|    351|    return Hacl_Impl_P256_DH_ecp256dh_r(shared_secret, their_pubkey, private_key);
 1829|    351|}
Hacl_P256.c:bn_from_bytes_be4:
  316|  3.93k|{
  317|  3.93k|    KRML_MAYBE_FOR4(i,
  ------------------
  |  |  330|  3.93k|#define KRML_MAYBE_FOR4(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 4, k, x)
  |  |  ------------------
  |  |  |  |  288|  3.93k|    do {                               \
  |  |  |  |  289|  3.93k|        uint32_t i = z;                \
  |  |  |  |  290|  3.93k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  3.93k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  318|  3.93k|                    (uint32_t)0U,
  319|  3.93k|                    (uint32_t)4U,
  320|  3.93k|                    (uint32_t)1U,
  321|  3.93k|                    uint64_t *os = res;
  322|  3.93k|                    uint64_t u = load64_be(b + ((uint32_t)4U - i - (uint32_t)1U) * (uint32_t)8U);
  323|  3.93k|                    uint64_t x = u;
  324|  3.93k|                    os[i] = x;);
  325|  3.93k|}
Hacl_P256.c:bn_is_lt_order_and_gt_zero_mask4:
 1170|  1.26k|{
 1171|  1.26k|    uint64_t is_lt_order = bn_is_lt_order_mask4(f);
 1172|  1.26k|    uint64_t is_eq_zero = bn_is_zero_mask4(f);
 1173|  1.26k|    return is_lt_order & ~is_eq_zero;
 1174|  1.26k|}
Hacl_P256.c:bn_is_lt_order_mask4:
 1161|  1.26k|{
 1162|  1.26k|    uint64_t tmp[4U] = { 0U };
 1163|  1.26k|    make_order(tmp);
 1164|  1.26k|    uint64_t c = bn_sub4(tmp, f, tmp);
 1165|  1.26k|    return (uint64_t)0U - c;
 1166|  1.26k|}
Hacl_P256.c:make_order:
  345|  19.1k|{
  346|  19.1k|    n[0U] = (uint64_t)0xf3b9cac2fc632551U;
  347|  19.1k|    n[1U] = (uint64_t)0xbce6faada7179e84U;
  348|  19.1k|    n[2U] = (uint64_t)0xffffffffffffffffU;
  349|  19.1k|    n[3U] = (uint64_t)0xffffffff00000000U;
  350|  19.1k|}
Hacl_P256.c:bn_sub4:
  146|  3.99k|{
  147|  3.99k|    uint64_t c = (uint64_t)0U;
  148|  3.99k|    {
  149|  3.99k|        uint64_t t1 = x[(uint32_t)4U * (uint32_t)0U];
  150|  3.99k|        uint64_t t20 = y[(uint32_t)4U * (uint32_t)0U];
  151|  3.99k|        uint64_t *res_i0 = res + (uint32_t)4U * (uint32_t)0U;
  152|  3.99k|        c = Lib_IntTypes_Intrinsics_sub_borrow_u64(c, t1, t20, res_i0);
  ------------------
  |  |   89|  3.99k|    (_subborrow_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  153|  3.99k|        uint64_t t10 = x[(uint32_t)4U * (uint32_t)0U + (uint32_t)1U];
  154|  3.99k|        uint64_t t21 = y[(uint32_t)4U * (uint32_t)0U + (uint32_t)1U];
  155|  3.99k|        uint64_t *res_i1 = res + (uint32_t)4U * (uint32_t)0U + (uint32_t)1U;
  156|  3.99k|        c = Lib_IntTypes_Intrinsics_sub_borrow_u64(c, t10, t21, res_i1);
  ------------------
  |  |   89|  3.99k|    (_subborrow_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  157|  3.99k|        uint64_t t11 = x[(uint32_t)4U * (uint32_t)0U + (uint32_t)2U];
  158|  3.99k|        uint64_t t22 = y[(uint32_t)4U * (uint32_t)0U + (uint32_t)2U];
  159|  3.99k|        uint64_t *res_i2 = res + (uint32_t)4U * (uint32_t)0U + (uint32_t)2U;
  160|  3.99k|        c = Lib_IntTypes_Intrinsics_sub_borrow_u64(c, t11, t22, res_i2);
  ------------------
  |  |   89|  3.99k|    (_subborrow_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  161|  3.99k|        uint64_t t12 = x[(uint32_t)4U * (uint32_t)0U + (uint32_t)3U];
  162|  3.99k|        uint64_t t2 = y[(uint32_t)4U * (uint32_t)0U + (uint32_t)3U];
  163|  3.99k|        uint64_t *res_i = res + (uint32_t)4U * (uint32_t)0U + (uint32_t)3U;
  164|  3.99k|        c = Lib_IntTypes_Intrinsics_sub_borrow_u64(c, t12, t2, res_i);
  ------------------
  |  |   89|  3.99k|    (_subborrow_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  165|  3.99k|    }
  166|  3.99k|    uint64_t c0 = c;
  167|  3.99k|    return c0;
  168|  3.99k|}
Hacl_P256.c:bn_is_zero_mask4:
   34|  1.32k|{
   35|  1.32k|    uint64_t bn_zero[4U] = { 0U };
   36|  1.32k|    uint64_t mask = (uint64_t)0xFFFFFFFFFFFFFFFFU;
   37|  1.32k|    KRML_MAYBE_FOR4(i,
  ------------------
  |  |  330|  1.32k|#define KRML_MAYBE_FOR4(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 4, k, x)
  |  |  ------------------
  |  |  |  |  288|  1.32k|    do {                               \
  |  |  |  |  289|  1.32k|        uint32_t i = z;                \
  |  |  |  |  290|  1.32k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  1.32k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   38|  1.32k|                    (uint32_t)0U,
   39|  1.32k|                    (uint32_t)4U,
   40|  1.32k|                    (uint32_t)1U,
   41|  1.32k|                    uint64_t uu____0 = FStar_UInt64_eq_mask(f[i], bn_zero[i]);
   42|  1.32k|                    mask = uu____0 & mask;);
   43|  1.32k|    uint64_t mask1 = mask;
   44|  1.32k|    uint64_t res = mask1;
   45|  1.32k|    return res;
   46|  1.32k|}
Hacl_P256.c:point_mul_g:
 1039|    396|{
 1040|    396|    uint64_t q1[12U] = { 0U };
 1041|    396|    make_base_point(q1);
 1042|    396|    uint64_t
 1043|    396|        q2[12U] = {
 1044|    396|            (uint64_t)1499621593102562565U, (uint64_t)16692369783039433128U,
 1045|    396|            (uint64_t)15337520135922861848U, (uint64_t)5455737214495366228U,
 1046|    396|            (uint64_t)17827017231032529600U, (uint64_t)12413621606240782649U,
 1047|    396|            (uint64_t)2290483008028286132U, (uint64_t)15752017553340844820U,
 1048|    396|            (uint64_t)4846430910634234874U, (uint64_t)10861682798464583253U,
 1049|    396|            (uint64_t)15404737222404363049U, (uint64_t)363586619281562022U
 1050|    396|        };
 1051|    396|    uint64_t
 1052|    396|        q3[12U] = {
 1053|    396|            (uint64_t)14619254753077084366U, (uint64_t)13913835116514008593U,
 1054|    396|            (uint64_t)15060744674088488145U, (uint64_t)17668414598203068685U,
 1055|    396|            (uint64_t)10761169236902342334U, (uint64_t)15467027479157446221U,
 1056|    396|            (uint64_t)14989185522423469618U, (uint64_t)14354539272510107003U,
 1057|    396|            (uint64_t)14298211796392133693U, (uint64_t)13270323784253711450U,
 1058|    396|            (uint64_t)13380964971965046957U, (uint64_t)8686204248456909699U
 1059|    396|        };
 1060|    396|    uint64_t
 1061|    396|        q4[12U] = {
 1062|    396|            (uint64_t)7870395003430845958U, (uint64_t)18001862936410067720U,
 1063|    396|            (uint64_t)8006461232116967215U, (uint64_t)5921313779532424762U,
 1064|    396|            (uint64_t)10702113371959864307U, (uint64_t)8070517410642379879U,
 1065|    396|            (uint64_t)7139806720777708306U, (uint64_t)8253938546650739833U,
 1066|    396|            (uint64_t)17490482834545705718U, (uint64_t)1065249776797037500U,
 1067|    396|            (uint64_t)5018258455937968775U, (uint64_t)14100621120178668337U
 1068|    396|        };
 1069|    396|    uint64_t *r1 = scalar;
 1070|    396|    uint64_t *r2 = scalar + (uint32_t)1U;
 1071|    396|    uint64_t *r3 = scalar + (uint32_t)2U;
 1072|    396|    uint64_t *r4 = scalar + (uint32_t)3U;
 1073|    396|    make_point_at_inf(res);
 1074|    396|    uint64_t tmp[12U] = { 0U };
 1075|    396|    KRML_MAYBE_FOR16(i,
  ------------------
  |  |  402|    396|#define KRML_MAYBE_FOR16(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 16, k, x)
  |  |  ------------------
  |  |  |  |  288|    396|    do {                               \
  |  |  |  |  289|    396|        uint32_t i = z;                \
  |  |  |  |  290|    396|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|    396|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1076|    396|                     (uint32_t)0U,
 1077|    396|                     (uint32_t)16U,
 1078|    396|                     (uint32_t)1U,
 1079|    396|                     KRML_MAYBE_FOR4(i0, (uint32_t)0U, (uint32_t)4U, (uint32_t)1U, point_double(res, res););
 1080|    396|                     uint32_t k = (uint32_t)64U - (uint32_t)4U * i - (uint32_t)4U;
 1081|    396|                     uint64_t bits_l = Hacl_Bignum_Lib_bn_get_bits_u64((uint32_t)1U, r4, k, (uint32_t)4U);
 1082|    396|                     precomp_get_consttime(Hacl_P256_PrecompTable_precomp_g_pow2_192_table_w4, bits_l, tmp);
 1083|    396|                     point_add(res, res, tmp);
 1084|    396|                     uint32_t k0 = (uint32_t)64U - (uint32_t)4U * i - (uint32_t)4U;
 1085|    396|                     uint64_t bits_l0 = Hacl_Bignum_Lib_bn_get_bits_u64((uint32_t)1U, r3, k0, (uint32_t)4U);
 1086|    396|                     precomp_get_consttime(Hacl_P256_PrecompTable_precomp_g_pow2_128_table_w4, bits_l0, tmp);
 1087|    396|                     point_add(res, res, tmp);
 1088|    396|                     uint32_t k1 = (uint32_t)64U - (uint32_t)4U * i - (uint32_t)4U;
 1089|    396|                     uint64_t bits_l1 = Hacl_Bignum_Lib_bn_get_bits_u64((uint32_t)1U, r2, k1, (uint32_t)4U);
 1090|    396|                     precomp_get_consttime(Hacl_P256_PrecompTable_precomp_g_pow2_64_table_w4, bits_l1, tmp);
 1091|    396|                     point_add(res, res, tmp);
 1092|    396|                     uint32_t k2 = (uint32_t)64U - (uint32_t)4U * i - (uint32_t)4U;
 1093|    396|                     uint64_t bits_l2 = Hacl_Bignum_Lib_bn_get_bits_u64((uint32_t)1U, r1, k2, (uint32_t)4U);
 1094|    396|                     precomp_get_consttime(Hacl_P256_PrecompTable_precomp_basepoint_table_w4, bits_l2, tmp);
 1095|    396|                     point_add(res, res, tmp););
 1096|    396|    KRML_HOST_IGNORE(q1);
  ------------------
  |  |   56|    396|#define KRML_HOST_IGNORE(x) (void)(x)
  ------------------
 1097|    396|    KRML_HOST_IGNORE(q2);
  ------------------
  |  |   56|    396|#define KRML_HOST_IGNORE(x) (void)(x)
  ------------------
 1098|    396|    KRML_HOST_IGNORE(q3);
  ------------------
  |  |   56|    396|#define KRML_HOST_IGNORE(x) (void)(x)
  ------------------
 1099|    396|    KRML_HOST_IGNORE(q4);
  ------------------
  |  |   56|    396|#define KRML_HOST_IGNORE(x) (void)(x)
  ------------------
 1100|    396|}
Hacl_P256.c:make_base_point:
  663|    456|{
  664|    456|    uint64_t *x = p;
  665|    456|    uint64_t *y = p + (uint32_t)4U;
  666|    456|    uint64_t *z = p + (uint32_t)8U;
  667|    456|    make_g_x(x);
  668|    456|    make_g_y(y);
  669|    456|    make_fone(z);
  670|    456|}
Hacl_P256.c:make_g_x:
  372|    456|{
  373|    456|    n[0U] = (uint64_t)0x79e730d418a9143cU;
  374|    456|    n[1U] = (uint64_t)0x75ba95fc5fedb601U;
  375|    456|    n[2U] = (uint64_t)0x79fb732b77622510U;
  376|    456|    n[3U] = (uint64_t)0x18905f76a53755c6U;
  377|    456|}
Hacl_P256.c:make_g_y:
  381|    456|{
  382|    456|    n[0U] = (uint64_t)0xddf25357ce95560aU;
  383|    456|    n[1U] = (uint64_t)0x8b4ab8e4ba19e45cU;
  384|    456|    n[2U] = (uint64_t)0xd2e88688dd21f325U;
  385|    456|    n[3U] = (uint64_t)0x8571ff1825885d85U;
  386|    456|}
Hacl_P256.c:make_fone:
  408|  2.84k|{
  409|  2.84k|    n[0U] = (uint64_t)0x1U;
  410|  2.84k|    n[1U] = (uint64_t)0xffffffff00000000U;
  411|  2.84k|    n[2U] = (uint64_t)0xffffffffffffffffU;
  412|  2.84k|    n[3U] = (uint64_t)0xfffffffeU;
  413|  2.84k|}
Hacl_P256.c:make_point_at_inf:
  674|  1.15k|{
  675|  1.15k|    uint64_t *x = p;
  676|  1.15k|    uint64_t *y = p + (uint32_t)4U;
  677|  1.15k|    uint64_t *z = p + (uint32_t)8U;
  678|  1.15k|    make_fzero(x);
  679|  1.15k|    make_fone(y);
  680|  1.15k|    make_fzero(z);
  681|  1.15k|}
Hacl_P256.c:make_fzero:
  399|  2.31k|{
  400|  2.31k|    n[0U] = (uint64_t)0U;
  401|  2.31k|    n[1U] = (uint64_t)0U;
  402|  2.31k|    n[2U] = (uint64_t)0U;
  403|  2.31k|    n[3U] = (uint64_t)0U;
  404|  2.31k|}
Hacl_P256.c:point_double:
  845|   133k|{
  846|   133k|    uint64_t tmp[20U] = { 0U };
  847|   133k|    uint64_t *x = p;
  848|   133k|    uint64_t *z = p + (uint32_t)8U;
  849|   133k|    uint64_t *x3 = res;
  850|   133k|    uint64_t *y3 = res + (uint32_t)4U;
  851|   133k|    uint64_t *z3 = res + (uint32_t)8U;
  852|   133k|    uint64_t *t0 = tmp;
  853|   133k|    uint64_t *t1 = tmp + (uint32_t)4U;
  854|   133k|    uint64_t *t2 = tmp + (uint32_t)8U;
  855|   133k|    uint64_t *t3 = tmp + (uint32_t)12U;
  856|   133k|    uint64_t *t4 = tmp + (uint32_t)16U;
  857|   133k|    uint64_t *x1 = p;
  858|   133k|    uint64_t *y = p + (uint32_t)4U;
  859|   133k|    uint64_t *z1 = p + (uint32_t)8U;
  860|   133k|    fsqr0(t0, x1);
  861|   133k|    fsqr0(t1, y);
  862|   133k|    fsqr0(t2, z1);
  863|   133k|    fmul0(t3, x1, y);
  864|   133k|    fadd0(t3, t3, t3);
  865|   133k|    fmul0(t4, y, z1);
  866|   133k|    fmul0(z3, x, z);
  867|   133k|    fadd0(z3, z3, z3);
  868|   133k|    fmul_by_b_coeff(y3, t2);
  869|   133k|    fsub0(y3, y3, z3);
  870|   133k|    fadd0(x3, y3, y3);
  871|   133k|    fadd0(y3, x3, y3);
  872|   133k|    fsub0(x3, t1, y3);
  873|   133k|    fadd0(y3, t1, y3);
  874|   133k|    fmul0(y3, x3, y3);
  875|   133k|    fmul0(x3, x3, t3);
  876|   133k|    fadd0(t3, t2, t2);
  877|   133k|    fadd0(t2, t2, t3);
  878|   133k|    fmul_by_b_coeff(z3, z3);
  879|   133k|    fsub0(z3, z3, t2);
  880|   133k|    fsub0(z3, z3, t0);
  881|   133k|    fadd0(t3, z3, z3);
  882|   133k|    fadd0(z3, z3, t3);
  883|   133k|    fadd0(t3, t0, t0);
  884|   133k|    fadd0(t0, t3, t0);
  885|   133k|    fsub0(t0, t0, t2);
  886|   133k|    fmul0(t0, t0, z3);
  887|   133k|    fadd0(y3, y3, t0);
  888|   133k|    fadd0(t0, t4, t4);
  889|   133k|    fmul0(z3, t0, z3);
  890|   133k|    fsub0(x3, x3, z3);
  891|   133k|    fmul0(z3, t0, t1);
  892|   133k|    fadd0(z3, z3, z3);
  893|   133k|    fadd0(z3, z3, z3);
  894|   133k|}
Hacl_P256.c:fsqr0:
  531|   609k|{
  532|   609k|    uint64_t tmp[8U] = { 0U };
  533|   609k|    bn_sqr4(tmp, x);
  534|   609k|    mont_reduction(res, tmp);
  535|   609k|}
Hacl_P256.c:bn_sqr4:
  256|   625k|{
  257|   625k|    memset(res, 0U, (uint32_t)8U * sizeof(uint64_t));
  258|   625k|    KRML_MAYBE_FOR4(
  ------------------
  |  |  330|   625k|#define KRML_MAYBE_FOR4(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 4, k, x)
  |  |  ------------------
  |  |  |  |  288|   625k|    do {                               \
  |  |  |  |  289|   625k|        uint32_t i = z;                \
  |  |  |  |  290|   625k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|   625k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  259|   625k|        i0,
  260|   625k|        (uint32_t)0U,
  261|   625k|        (uint32_t)4U,
  262|   625k|        (uint32_t)1U,
  263|   625k|        uint64_t *ab = x;
  264|   625k|        uint64_t a_j = x[i0];
  265|   625k|        uint64_t *res_j = res + i0;
  266|   625k|        uint64_t c = (uint64_t)0U;
  267|   625k|        for (uint32_t i = (uint32_t)0U; i < i0 / (uint32_t)4U; i++) {
  268|   625k|            uint64_t a_i = ab[(uint32_t)4U * i];
  269|   625k|            uint64_t *res_i0 = res_j + (uint32_t)4U * i;
  270|   625k|            c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i, a_j, c, res_i0);
  271|   625k|            uint64_t a_i0 = ab[(uint32_t)4U * i + (uint32_t)1U];
  272|   625k|            uint64_t *res_i1 = res_j + (uint32_t)4U * i + (uint32_t)1U;
  273|   625k|            c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i0, a_j, c, res_i1);
  274|   625k|            uint64_t a_i1 = ab[(uint32_t)4U * i + (uint32_t)2U];
  275|   625k|            uint64_t *res_i2 = res_j + (uint32_t)4U * i + (uint32_t)2U;
  276|   625k|            c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i1, a_j, c, res_i2);
  277|   625k|            uint64_t a_i2 = ab[(uint32_t)4U * i + (uint32_t)3U];
  278|   625k|            uint64_t *res_i = res_j + (uint32_t)4U * i + (uint32_t)3U;
  279|   625k|            c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i2, a_j, c, res_i);
  280|   625k|        } for (uint32_t i = i0 / (uint32_t)4U * (uint32_t)4U; i < i0; i++) {
  281|   625k|            uint64_t a_i = ab[i];
  282|   625k|            uint64_t *res_i = res_j + i;
  283|   625k|            c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i, a_j, c, res_i);
  284|   625k|        } uint64_t r = c;
  285|   625k|        res[i0 + i0] = r;);
  286|   625k|    uint64_t c0 = Hacl_Bignum_Addition_bn_add_eq_len_u64((uint32_t)8U, res, res, res);
  287|   625k|    KRML_HOST_IGNORE(c0);
  ------------------
  |  |   56|   625k|#define KRML_HOST_IGNORE(x) (void)(x)
  ------------------
  288|   625k|    uint64_t tmp[8U] = { 0U };
  289|   625k|    KRML_MAYBE_FOR4(i,
  ------------------
  |  |  330|   625k|#define KRML_MAYBE_FOR4(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 4, k, x)
  |  |  ------------------
  |  |  |  |  288|   625k|    do {                               \
  |  |  |  |  289|   625k|        uint32_t i = z;                \
  |  |  |  |  290|   625k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|   625k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  290|   625k|                    (uint32_t)0U,
  291|   625k|                    (uint32_t)4U,
  292|   625k|                    (uint32_t)1U,
  293|   625k|                    FStar_UInt128_uint128 res1 = FStar_UInt128_mul_wide(x[i], x[i]);
  294|   625k|                    uint64_t hi = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(res1, (uint32_t)64U));
  295|   625k|                    uint64_t lo = FStar_UInt128_uint128_to_uint64(res1);
  296|   625k|                    tmp[(uint32_t)2U * i] = lo;
  297|   625k|                    tmp[(uint32_t)2U * i + (uint32_t)1U] = hi;);
  298|   625k|    uint64_t c1 = Hacl_Bignum_Addition_bn_add_eq_len_u64((uint32_t)8U, res, tmp, res);
  299|   625k|    KRML_HOST_IGNORE(c1);
  ------------------
  |  |   56|   625k|#define KRML_HOST_IGNORE(x) (void)(x)
  ------------------
  300|   625k|}
Hacl_P256.c:mont_reduction:
  458|  2.77M|{
  459|  2.77M|    uint64_t n[4U] = { 0U };
  460|  2.77M|    make_prime(n);
  461|  2.77M|    uint64_t c0 = (uint64_t)0U;
  462|  2.77M|    KRML_MAYBE_FOR4(
  ------------------
  |  |  330|  2.77M|#define KRML_MAYBE_FOR4(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 4, k, x)
  |  |  ------------------
  |  |  |  |  288|  2.77M|    do {                               \
  |  |  |  |  289|  2.77M|        uint32_t i = z;                \
  |  |  |  |  290|  2.77M|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  2.77M|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  463|  2.77M|        i0,
  464|  2.77M|        (uint32_t)0U,
  465|  2.77M|        (uint32_t)4U,
  466|  2.77M|        (uint32_t)1U,
  467|  2.77M|        uint64_t qj = (uint64_t)1U * x[i0];
  468|  2.77M|        uint64_t *res_j0 = x + i0;
  469|  2.77M|        uint64_t c = (uint64_t)0U;
  470|  2.77M|        {
  471|  2.77M|            uint64_t a_i = n[(uint32_t)4U * (uint32_t)0U];
  472|  2.77M|            uint64_t *res_i0 = res_j0 + (uint32_t)4U * (uint32_t)0U;
  473|  2.77M|            c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i, qj, c, res_i0);
  474|  2.77M|            uint64_t a_i0 = n[(uint32_t)4U * (uint32_t)0U + (uint32_t)1U];
  475|  2.77M|            uint64_t *res_i1 = res_j0 + (uint32_t)4U * (uint32_t)0U + (uint32_t)1U;
  476|  2.77M|            c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i0, qj, c, res_i1);
  477|  2.77M|            uint64_t a_i1 = n[(uint32_t)4U * (uint32_t)0U + (uint32_t)2U];
  478|  2.77M|            uint64_t *res_i2 = res_j0 + (uint32_t)4U * (uint32_t)0U + (uint32_t)2U;
  479|  2.77M|            c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i1, qj, c, res_i2);
  480|  2.77M|            uint64_t a_i2 = n[(uint32_t)4U * (uint32_t)0U + (uint32_t)3U];
  481|  2.77M|            uint64_t *res_i = res_j0 + (uint32_t)4U * (uint32_t)0U + (uint32_t)3U;
  482|  2.77M|            c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i2, qj, c, res_i);
  483|  2.77M|        } uint64_t r = c;
  484|  2.77M|        uint64_t c1 = r;
  485|  2.77M|        uint64_t *resb = x + (uint32_t)4U + i0;
  486|  2.77M|        uint64_t res_j = x[(uint32_t)4U + i0];
  487|  2.77M|        c0 = Lib_IntTypes_Intrinsics_add_carry_u64(c0, c1, res_j, resb););
  488|  2.77M|    memcpy(res, x + (uint32_t)4U, (uint32_t)4U * sizeof(uint64_t));
  489|  2.77M|    uint64_t c00 = c0;
  490|  2.77M|    uint64_t tmp[4U] = { 0U };
  491|  2.77M|    uint64_t c = (uint64_t)0U;
  492|  2.77M|    {
  493|  2.77M|        uint64_t t1 = res[(uint32_t)4U * (uint32_t)0U];
  494|  2.77M|        uint64_t t20 = n[(uint32_t)4U * (uint32_t)0U];
  495|  2.77M|        uint64_t *res_i0 = tmp + (uint32_t)4U * (uint32_t)0U;
  496|  2.77M|        c = Lib_IntTypes_Intrinsics_sub_borrow_u64(c, t1, t20, res_i0);
  ------------------
  |  |   89|  2.77M|    (_subborrow_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  497|  2.77M|        uint64_t t10 = res[(uint32_t)4U * (uint32_t)0U + (uint32_t)1U];
  498|  2.77M|        uint64_t t21 = n[(uint32_t)4U * (uint32_t)0U + (uint32_t)1U];
  499|  2.77M|        uint64_t *res_i1 = tmp + (uint32_t)4U * (uint32_t)0U + (uint32_t)1U;
  500|  2.77M|        c = Lib_IntTypes_Intrinsics_sub_borrow_u64(c, t10, t21, res_i1);
  ------------------
  |  |   89|  2.77M|    (_subborrow_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  501|  2.77M|        uint64_t t11 = res[(uint32_t)4U * (uint32_t)0U + (uint32_t)2U];
  502|  2.77M|        uint64_t t22 = n[(uint32_t)4U * (uint32_t)0U + (uint32_t)2U];
  503|  2.77M|        uint64_t *res_i2 = tmp + (uint32_t)4U * (uint32_t)0U + (uint32_t)2U;
  504|  2.77M|        c = Lib_IntTypes_Intrinsics_sub_borrow_u64(c, t11, t22, res_i2);
  ------------------
  |  |   89|  2.77M|    (_subborrow_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  505|  2.77M|        uint64_t t12 = res[(uint32_t)4U * (uint32_t)0U + (uint32_t)3U];
  506|  2.77M|        uint64_t t2 = n[(uint32_t)4U * (uint32_t)0U + (uint32_t)3U];
  507|  2.77M|        uint64_t *res_i = tmp + (uint32_t)4U * (uint32_t)0U + (uint32_t)3U;
  508|  2.77M|        c = Lib_IntTypes_Intrinsics_sub_borrow_u64(c, t12, t2, res_i);
  ------------------
  |  |   89|  2.77M|    (_subborrow_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  509|  2.77M|    }
  510|  2.77M|    uint64_t c1 = c;
  511|  2.77M|    uint64_t c2 = c00 - c1;
  512|  2.77M|    KRML_MAYBE_FOR4(i,
  ------------------
  |  |  330|  2.77M|#define KRML_MAYBE_FOR4(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 4, k, x)
  |  |  ------------------
  |  |  |  |  288|  2.77M|    do {                               \
  |  |  |  |  289|  2.77M|        uint32_t i = z;                \
  |  |  |  |  290|  2.77M|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  2.77M|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  513|  2.77M|                    (uint32_t)0U,
  514|  2.77M|                    (uint32_t)4U,
  515|  2.77M|                    (uint32_t)1U,
  516|  2.77M|                    uint64_t *os = res;
  517|  2.77M|                    uint64_t x1 = (c2 & res[i]) | (~c2 & tmp[i]);
  518|  2.77M|                    os[i] = x1;);
  519|  2.77M|}
Hacl_P256.c:make_prime:
  336|  7.25M|{
  337|  7.25M|    n[0U] = (uint64_t)0xffffffffffffffffU;
  338|  7.25M|    n[1U] = (uint64_t)0xffffffffU;
  339|  7.25M|    n[2U] = (uint64_t)0x0U;
  340|  7.25M|    n[3U] = (uint64_t)0xffffffff00000001U;
  341|  7.25M|}
Hacl_P256.c:fmul0:
  523|  2.16M|{
  524|  2.16M|    uint64_t tmp[8U] = { 0U };
  525|  2.16M|    bn_mul4(tmp, x, y);
  526|  2.16M|    mont_reduction(res, tmp);
  527|  2.16M|}
Hacl_P256.c:bn_mul4:
  227|  2.16M|{
  228|  2.16M|    memset(res, 0U, (uint32_t)8U * sizeof(uint64_t));
  229|  2.16M|    KRML_MAYBE_FOR4(
  ------------------
  |  |  330|  2.16M|#define KRML_MAYBE_FOR4(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 4, k, x)
  |  |  ------------------
  |  |  |  |  288|  2.16M|    do {                               \
  |  |  |  |  289|  2.16M|        uint32_t i = z;                \
  |  |  |  |  290|  2.16M|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  2.16M|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  230|  2.16M|        i0,
  231|  2.16M|        (uint32_t)0U,
  232|  2.16M|        (uint32_t)4U,
  233|  2.16M|        (uint32_t)1U,
  234|  2.16M|        uint64_t bj = y[i0];
  235|  2.16M|        uint64_t *res_j = res + i0;
  236|  2.16M|        uint64_t c = (uint64_t)0U;
  237|  2.16M|        {
  238|  2.16M|            uint64_t a_i = x[(uint32_t)4U * (uint32_t)0U];
  239|  2.16M|            uint64_t *res_i0 = res_j + (uint32_t)4U * (uint32_t)0U;
  240|  2.16M|            c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i, bj, c, res_i0);
  241|  2.16M|            uint64_t a_i0 = x[(uint32_t)4U * (uint32_t)0U + (uint32_t)1U];
  242|  2.16M|            uint64_t *res_i1 = res_j + (uint32_t)4U * (uint32_t)0U + (uint32_t)1U;
  243|  2.16M|            c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i0, bj, c, res_i1);
  244|  2.16M|            uint64_t a_i1 = x[(uint32_t)4U * (uint32_t)0U + (uint32_t)2U];
  245|  2.16M|            uint64_t *res_i2 = res_j + (uint32_t)4U * (uint32_t)0U + (uint32_t)2U;
  246|  2.16M|            c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i1, bj, c, res_i2);
  247|  2.16M|            uint64_t a_i2 = x[(uint32_t)4U * (uint32_t)0U + (uint32_t)3U];
  248|  2.16M|            uint64_t *res_i = res_j + (uint32_t)4U * (uint32_t)0U + (uint32_t)3U;
  249|  2.16M|            c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i2, bj, c, res_i);
  250|  2.16M|        } uint64_t r = c;
  251|  2.16M|        res[(uint32_t)4U + i0] = r;);
  252|  2.16M|}
Hacl_P256.c:fadd0:
  433|  3.15M|{
  434|  3.15M|    uint64_t n[4U] = { 0U };
  435|  3.15M|    make_prime(n);
  436|  3.15M|    bn_add_mod4(res, n, x, y);
  437|  3.15M|}
Hacl_P256.c:bn_add_mod4:
   92|  3.15M|{
   93|  3.15M|    uint64_t c0 = (uint64_t)0U;
   94|  3.15M|    {
   95|  3.15M|        uint64_t t1 = x[(uint32_t)4U * (uint32_t)0U];
   96|  3.15M|        uint64_t t20 = y[(uint32_t)4U * (uint32_t)0U];
   97|  3.15M|        uint64_t *res_i0 = res + (uint32_t)4U * (uint32_t)0U;
   98|  3.15M|        c0 = Lib_IntTypes_Intrinsics_add_carry_u64(c0, t1, t20, res_i0);
  ------------------
  |  |   66|  3.15M|    (_addcarry_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
   99|  3.15M|        uint64_t t10 = x[(uint32_t)4U * (uint32_t)0U + (uint32_t)1U];
  100|  3.15M|        uint64_t t21 = y[(uint32_t)4U * (uint32_t)0U + (uint32_t)1U];
  101|  3.15M|        uint64_t *res_i1 = res + (uint32_t)4U * (uint32_t)0U + (uint32_t)1U;
  102|  3.15M|        c0 = Lib_IntTypes_Intrinsics_add_carry_u64(c0, t10, t21, res_i1);
  ------------------
  |  |   66|  3.15M|    (_addcarry_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  103|  3.15M|        uint64_t t11 = x[(uint32_t)4U * (uint32_t)0U + (uint32_t)2U];
  104|  3.15M|        uint64_t t22 = y[(uint32_t)4U * (uint32_t)0U + (uint32_t)2U];
  105|  3.15M|        uint64_t *res_i2 = res + (uint32_t)4U * (uint32_t)0U + (uint32_t)2U;
  106|  3.15M|        c0 = Lib_IntTypes_Intrinsics_add_carry_u64(c0, t11, t22, res_i2);
  ------------------
  |  |   66|  3.15M|    (_addcarry_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  107|  3.15M|        uint64_t t12 = x[(uint32_t)4U * (uint32_t)0U + (uint32_t)3U];
  108|  3.15M|        uint64_t t2 = y[(uint32_t)4U * (uint32_t)0U + (uint32_t)3U];
  109|  3.15M|        uint64_t *res_i = res + (uint32_t)4U * (uint32_t)0U + (uint32_t)3U;
  110|  3.15M|        c0 = Lib_IntTypes_Intrinsics_add_carry_u64(c0, t12, t2, res_i);
  ------------------
  |  |   66|  3.15M|    (_addcarry_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  111|  3.15M|    }
  112|  3.15M|    uint64_t c00 = c0;
  113|  3.15M|    uint64_t tmp[4U] = { 0U };
  114|  3.15M|    uint64_t c = (uint64_t)0U;
  115|  3.15M|    {
  116|  3.15M|        uint64_t t1 = res[(uint32_t)4U * (uint32_t)0U];
  117|  3.15M|        uint64_t t20 = n[(uint32_t)4U * (uint32_t)0U];
  118|  3.15M|        uint64_t *res_i0 = tmp + (uint32_t)4U * (uint32_t)0U;
  119|  3.15M|        c = Lib_IntTypes_Intrinsics_sub_borrow_u64(c, t1, t20, res_i0);
  ------------------
  |  |   89|  3.15M|    (_subborrow_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  120|  3.15M|        uint64_t t10 = res[(uint32_t)4U * (uint32_t)0U + (uint32_t)1U];
  121|  3.15M|        uint64_t t21 = n[(uint32_t)4U * (uint32_t)0U + (uint32_t)1U];
  122|  3.15M|        uint64_t *res_i1 = tmp + (uint32_t)4U * (uint32_t)0U + (uint32_t)1U;
  123|  3.15M|        c = Lib_IntTypes_Intrinsics_sub_borrow_u64(c, t10, t21, res_i1);
  ------------------
  |  |   89|  3.15M|    (_subborrow_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  124|  3.15M|        uint64_t t11 = res[(uint32_t)4U * (uint32_t)0U + (uint32_t)2U];
  125|  3.15M|        uint64_t t22 = n[(uint32_t)4U * (uint32_t)0U + (uint32_t)2U];
  126|  3.15M|        uint64_t *res_i2 = tmp + (uint32_t)4U * (uint32_t)0U + (uint32_t)2U;
  127|  3.15M|        c = Lib_IntTypes_Intrinsics_sub_borrow_u64(c, t11, t22, res_i2);
  ------------------
  |  |   89|  3.15M|    (_subborrow_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  128|  3.15M|        uint64_t t12 = res[(uint32_t)4U * (uint32_t)0U + (uint32_t)3U];
  129|  3.15M|        uint64_t t2 = n[(uint32_t)4U * (uint32_t)0U + (uint32_t)3U];
  130|  3.15M|        uint64_t *res_i = tmp + (uint32_t)4U * (uint32_t)0U + (uint32_t)3U;
  131|  3.15M|        c = Lib_IntTypes_Intrinsics_sub_borrow_u64(c, t12, t2, res_i);
  ------------------
  |  |   89|  3.15M|    (_subborrow_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  132|  3.15M|    }
  133|  3.15M|    uint64_t c1 = c;
  134|  3.15M|    uint64_t c2 = c00 - c1;
  135|  3.15M|    KRML_MAYBE_FOR4(i,
  ------------------
  |  |  330|  3.15M|#define KRML_MAYBE_FOR4(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 4, k, x)
  |  |  ------------------
  |  |  |  |  288|  3.15M|    do {                               \
  |  |  |  |  289|  3.15M|        uint32_t i = z;                \
  |  |  |  |  290|  3.15M|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  3.15M|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  136|  3.15M|                    (uint32_t)0U,
  137|  3.15M|                    (uint32_t)4U,
  138|  3.15M|                    (uint32_t)1U,
  139|  3.15M|                    uint64_t *os = res;
  140|  3.15M|                    uint64_t x1 = (c2 & res[i]) | (~c2 & tmp[i]);
  141|  3.15M|                    os[i] = x1;);
  142|  3.15M|}
Hacl_P256.c:fmul_by_b_coeff:
  555|   382k|{
  556|   382k|    uint64_t b_coeff[4U] = { 0U };
  557|   382k|    make_b_coeff(b_coeff);
  558|   382k|    fmul0(res, b_coeff, x);
  559|   382k|}
Hacl_P256.c:make_b_coeff:
  363|   383k|{
  364|   383k|    b[0U] = (uint64_t)0xd89cdf6229c4bddfU;
  365|   383k|    b[1U] = (uint64_t)0xacf005cd78843090U;
  366|   383k|    b[2U] = (uint64_t)0xe5a220abf7212ed6U;
  367|   383k|    b[3U] = (uint64_t)0xdc30061d04874834U;
  368|   383k|}
Hacl_P256.c:fsub0:
  441|  1.31M|{
  442|  1.31M|    uint64_t n[4U] = { 0U };
  443|  1.31M|    make_prime(n);
  444|  1.31M|    bn_sub_mod4(res, n, x, y);
  445|  1.31M|}
Hacl_P256.c:bn_sub_mod4:
  172|  1.31M|{
  173|  1.31M|    uint64_t c0 = (uint64_t)0U;
  174|  1.31M|    {
  175|  1.31M|        uint64_t t1 = x[(uint32_t)4U * (uint32_t)0U];
  176|  1.31M|        uint64_t t20 = y[(uint32_t)4U * (uint32_t)0U];
  177|  1.31M|        uint64_t *res_i0 = res + (uint32_t)4U * (uint32_t)0U;
  178|  1.31M|        c0 = Lib_IntTypes_Intrinsics_sub_borrow_u64(c0, t1, t20, res_i0);
  ------------------
  |  |   89|  1.31M|    (_subborrow_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  179|  1.31M|        uint64_t t10 = x[(uint32_t)4U * (uint32_t)0U + (uint32_t)1U];
  180|  1.31M|        uint64_t t21 = y[(uint32_t)4U * (uint32_t)0U + (uint32_t)1U];
  181|  1.31M|        uint64_t *res_i1 = res + (uint32_t)4U * (uint32_t)0U + (uint32_t)1U;
  182|  1.31M|        c0 = Lib_IntTypes_Intrinsics_sub_borrow_u64(c0, t10, t21, res_i1);
  ------------------
  |  |   89|  1.31M|    (_subborrow_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  183|  1.31M|        uint64_t t11 = x[(uint32_t)4U * (uint32_t)0U + (uint32_t)2U];
  184|  1.31M|        uint64_t t22 = y[(uint32_t)4U * (uint32_t)0U + (uint32_t)2U];
  185|  1.31M|        uint64_t *res_i2 = res + (uint32_t)4U * (uint32_t)0U + (uint32_t)2U;
  186|  1.31M|        c0 = Lib_IntTypes_Intrinsics_sub_borrow_u64(c0, t11, t22, res_i2);
  ------------------
  |  |   89|  1.31M|    (_subborrow_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  187|  1.31M|        uint64_t t12 = x[(uint32_t)4U * (uint32_t)0U + (uint32_t)3U];
  188|  1.31M|        uint64_t t2 = y[(uint32_t)4U * (uint32_t)0U + (uint32_t)3U];
  189|  1.31M|        uint64_t *res_i = res + (uint32_t)4U * (uint32_t)0U + (uint32_t)3U;
  190|  1.31M|        c0 = Lib_IntTypes_Intrinsics_sub_borrow_u64(c0, t12, t2, res_i);
  ------------------
  |  |   89|  1.31M|    (_subborrow_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  191|  1.31M|    }
  192|  1.31M|    uint64_t c00 = c0;
  193|  1.31M|    uint64_t tmp[4U] = { 0U };
  194|  1.31M|    uint64_t c = (uint64_t)0U;
  195|  1.31M|    {
  196|  1.31M|        uint64_t t1 = res[(uint32_t)4U * (uint32_t)0U];
  197|  1.31M|        uint64_t t20 = n[(uint32_t)4U * (uint32_t)0U];
  198|  1.31M|        uint64_t *res_i0 = tmp + (uint32_t)4U * (uint32_t)0U;
  199|  1.31M|        c = Lib_IntTypes_Intrinsics_add_carry_u64(c, t1, t20, res_i0);
  ------------------
  |  |   66|  1.31M|    (_addcarry_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  200|  1.31M|        uint64_t t10 = res[(uint32_t)4U * (uint32_t)0U + (uint32_t)1U];
  201|  1.31M|        uint64_t t21 = n[(uint32_t)4U * (uint32_t)0U + (uint32_t)1U];
  202|  1.31M|        uint64_t *res_i1 = tmp + (uint32_t)4U * (uint32_t)0U + (uint32_t)1U;
  203|  1.31M|        c = Lib_IntTypes_Intrinsics_add_carry_u64(c, t10, t21, res_i1);
  ------------------
  |  |   66|  1.31M|    (_addcarry_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  204|  1.31M|        uint64_t t11 = res[(uint32_t)4U * (uint32_t)0U + (uint32_t)2U];
  205|  1.31M|        uint64_t t22 = n[(uint32_t)4U * (uint32_t)0U + (uint32_t)2U];
  206|  1.31M|        uint64_t *res_i2 = tmp + (uint32_t)4U * (uint32_t)0U + (uint32_t)2U;
  207|  1.31M|        c = Lib_IntTypes_Intrinsics_add_carry_u64(c, t11, t22, res_i2);
  ------------------
  |  |   66|  1.31M|    (_addcarry_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  208|  1.31M|        uint64_t t12 = res[(uint32_t)4U * (uint32_t)0U + (uint32_t)3U];
  209|  1.31M|        uint64_t t2 = n[(uint32_t)4U * (uint32_t)0U + (uint32_t)3U];
  210|  1.31M|        uint64_t *res_i = tmp + (uint32_t)4U * (uint32_t)0U + (uint32_t)3U;
  211|  1.31M|        c = Lib_IntTypes_Intrinsics_add_carry_u64(c, t12, t2, res_i);
  ------------------
  |  |   66|  1.31M|    (_addcarry_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  212|  1.31M|    }
  213|  1.31M|    uint64_t c1 = c;
  214|  1.31M|    KRML_HOST_IGNORE(c1);
  ------------------
  |  |   56|  1.31M|#define KRML_HOST_IGNORE(x) (void)(x)
  ------------------
  215|  1.31M|    uint64_t c2 = (uint64_t)0U - c00;
  216|  1.31M|    KRML_MAYBE_FOR4(i,
  ------------------
  |  |  330|  1.31M|#define KRML_MAYBE_FOR4(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 4, k, x)
  |  |  ------------------
  |  |  |  |  288|  1.31M|    do {                               \
  |  |  |  |  289|  1.31M|        uint32_t i = z;                \
  |  |  |  |  290|  1.31M|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  1.31M|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  217|  1.31M|                    (uint32_t)0U,
  218|  1.31M|                    (uint32_t)4U,
  219|  1.31M|                    (uint32_t)1U,
  220|  1.31M|                    uint64_t *os = res;
  221|  1.31M|                    uint64_t x1 = (c2 & tmp[i]) | (~c2 & res[i]);
  222|  1.31M|                    os[i] = x1;);
  223|  1.31M|}
Hacl_P256.c:precomp_get_consttime:
 1020|  25.3k|{
 1021|  25.3k|    memcpy(tmp, (uint64_t *)table, (uint32_t)12U * sizeof(uint64_t));
 1022|  25.3k|    KRML_MAYBE_FOR15(i0,
  ------------------
  |  |  396|  25.3k|#define KRML_MAYBE_FOR15(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 15, k, x)
  |  |  ------------------
  |  |  |  |  288|  25.3k|    do {                               \
  |  |  |  |  289|  25.3k|        uint32_t i = z;                \
  |  |  |  |  290|  25.3k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  25.3k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1023|  25.3k|                     (uint32_t)0U,
 1024|  25.3k|                     (uint32_t)15U,
 1025|  25.3k|                     (uint32_t)1U,
 1026|  25.3k|                     uint64_t c = FStar_UInt64_eq_mask(bits_l, (uint64_t)(i0 + (uint32_t)1U));
 1027|  25.3k|                     const uint64_t *res_j = table + (i0 + (uint32_t)1U) * (uint32_t)12U;
 1028|  25.3k|                     KRML_MAYBE_FOR12(i,
 1029|  25.3k|                                      (uint32_t)0U,
 1030|  25.3k|                                      (uint32_t)12U,
 1031|  25.3k|                                      (uint32_t)1U,
 1032|  25.3k|                                      uint64_t *os = tmp;
 1033|  25.3k|                                      uint64_t x = (c & res_j[i]) | (~c & tmp[i]);
 1034|  25.3k|                                      os[i] = x;););
 1035|  25.3k|}
Hacl_P256.c:point_add:
  898|  57.3k|{
  899|  57.3k|    uint64_t tmp[36U] = { 0U };
  900|  57.3k|    uint64_t *t0 = tmp;
  901|  57.3k|    uint64_t *t1 = tmp + (uint32_t)24U;
  902|  57.3k|    uint64_t *x3 = t1;
  903|  57.3k|    uint64_t *y3 = t1 + (uint32_t)4U;
  904|  57.3k|    uint64_t *z3 = t1 + (uint32_t)8U;
  905|  57.3k|    uint64_t *t01 = t0;
  906|  57.3k|    uint64_t *t11 = t0 + (uint32_t)4U;
  907|  57.3k|    uint64_t *t2 = t0 + (uint32_t)8U;
  908|  57.3k|    uint64_t *t3 = t0 + (uint32_t)12U;
  909|  57.3k|    uint64_t *t4 = t0 + (uint32_t)16U;
  910|  57.3k|    uint64_t *t5 = t0 + (uint32_t)20U;
  911|  57.3k|    uint64_t *x1 = p;
  912|  57.3k|    uint64_t *y1 = p + (uint32_t)4U;
  913|  57.3k|    uint64_t *z10 = p + (uint32_t)8U;
  914|  57.3k|    uint64_t *x20 = q;
  915|  57.3k|    uint64_t *y20 = q + (uint32_t)4U;
  916|  57.3k|    uint64_t *z20 = q + (uint32_t)8U;
  917|  57.3k|    fmul0(t01, x1, x20);
  918|  57.3k|    fmul0(t11, y1, y20);
  919|  57.3k|    fmul0(t2, z10, z20);
  920|  57.3k|    fadd0(t3, x1, y1);
  921|  57.3k|    fadd0(t4, x20, y20);
  922|  57.3k|    fmul0(t3, t3, t4);
  923|  57.3k|    fadd0(t4, t01, t11);
  924|  57.3k|    uint64_t *y10 = p + (uint32_t)4U;
  925|  57.3k|    uint64_t *z11 = p + (uint32_t)8U;
  926|  57.3k|    uint64_t *y2 = q + (uint32_t)4U;
  927|  57.3k|    uint64_t *z21 = q + (uint32_t)8U;
  928|  57.3k|    fsub0(t3, t3, t4);
  929|  57.3k|    fadd0(t4, y10, z11);
  930|  57.3k|    fadd0(t5, y2, z21);
  931|  57.3k|    fmul0(t4, t4, t5);
  932|  57.3k|    fadd0(t5, t11, t2);
  933|  57.3k|    fsub0(t4, t4, t5);
  934|  57.3k|    uint64_t *x10 = p;
  935|  57.3k|    uint64_t *z1 = p + (uint32_t)8U;
  936|  57.3k|    uint64_t *x2 = q;
  937|  57.3k|    uint64_t *z2 = q + (uint32_t)8U;
  938|  57.3k|    fadd0(x3, x10, z1);
  939|  57.3k|    fadd0(y3, x2, z2);
  940|  57.3k|    fmul0(x3, x3, y3);
  941|  57.3k|    fadd0(y3, t01, t2);
  942|  57.3k|    fsub0(y3, x3, y3);
  943|  57.3k|    fmul_by_b_coeff(z3, t2);
  944|  57.3k|    fsub0(x3, y3, z3);
  945|  57.3k|    fadd0(z3, x3, x3);
  946|  57.3k|    fadd0(x3, x3, z3);
  947|  57.3k|    fsub0(z3, t11, x3);
  948|  57.3k|    fadd0(x3, t11, x3);
  949|  57.3k|    fmul_by_b_coeff(y3, y3);
  950|  57.3k|    fadd0(t11, t2, t2);
  951|  57.3k|    fadd0(t2, t11, t2);
  952|  57.3k|    fsub0(y3, y3, t2);
  953|  57.3k|    fsub0(y3, y3, t01);
  954|  57.3k|    fadd0(t11, y3, y3);
  955|  57.3k|    fadd0(y3, t11, y3);
  956|  57.3k|    fadd0(t11, t01, t01);
  957|  57.3k|    fadd0(t01, t11, t01);
  958|  57.3k|    fsub0(t01, t01, t2);
  959|  57.3k|    fmul0(t11, t4, y3);
  960|  57.3k|    fmul0(t2, t01, y3);
  961|  57.3k|    fmul0(y3, x3, z3);
  962|  57.3k|    fadd0(y3, y3, t2);
  963|  57.3k|    fmul0(x3, t3, x3);
  964|  57.3k|    fsub0(x3, x3, t11);
  965|  57.3k|    fmul0(z3, t4, z3);
  966|  57.3k|    fmul0(t11, t3, t01);
  967|  57.3k|    fadd0(z3, z3, t11);
  968|  57.3k|    memcpy(res, t1, (uint32_t)12U * sizeof(uint64_t));
  969|  57.3k|}
Hacl_P256.c:point_store:
  763|    747|{
  764|    747|    uint64_t aff_p[8U] = { 0U };
  765|    747|    to_aff_point(aff_p, p);
  766|    747|    aff_point_store(res, aff_p);
  767|    747|}
Hacl_P256.c:to_aff_point:
  692|    747|{
  693|    747|    uint64_t zinv[4U] = { 0U };
  694|    747|    uint64_t *px = p;
  695|    747|    uint64_t *py = p + (uint32_t)4U;
  696|    747|    uint64_t *pz = p + (uint32_t)8U;
  697|    747|    uint64_t *x = res;
  698|    747|    uint64_t *y = res + (uint32_t)4U;
  699|    747|    finv(zinv, pz);
  700|    747|    fmul0(x, px, zinv);
  701|    747|    fmul0(y, py, zinv);
  702|    747|    from_mont(x, x);
  703|    747|    from_mont(y, y);
  704|    747|}
Hacl_P256.c:finv:
  570|    807|{
  571|    807|    uint64_t tmp[16U] = { 0U };
  572|    807|    uint64_t *x30 = tmp;
  573|    807|    uint64_t *x2 = tmp + (uint32_t)4U;
  574|    807|    uint64_t *tmp1 = tmp + (uint32_t)8U;
  575|    807|    uint64_t *tmp2 = tmp + (uint32_t)12U;
  576|    807|    memcpy(x2, a, (uint32_t)4U * sizeof(uint64_t));
  577|    807|    {
  578|    807|        fsqr0(x2, x2);
  579|    807|    }
  580|    807|    fmul0(x2, x2, a);
  581|    807|    memcpy(x30, x2, (uint32_t)4U * sizeof(uint64_t));
  582|    807|    {
  583|    807|        fsqr0(x30, x30);
  584|    807|    }
  585|    807|    fmul0(x30, x30, a);
  586|    807|    memcpy(tmp1, x30, (uint32_t)4U * sizeof(uint64_t));
  587|    807|    KRML_MAYBE_FOR3(i, (uint32_t)0U, (uint32_t)3U, (uint32_t)1U, fsqr0(tmp1, tmp1););
  ------------------
  |  |  324|    807|#define KRML_MAYBE_FOR3(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 3, k, x)
  |  |  ------------------
  |  |  |  |  288|    807|    do {                               \
  |  |  |  |  289|    807|        uint32_t i = z;                \
  |  |  |  |  290|    807|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|    807|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  588|    807|    fmul0(tmp1, tmp1, x30);
  589|    807|    memcpy(tmp2, tmp1, (uint32_t)4U * sizeof(uint64_t));
  590|    807|    KRML_MAYBE_FOR6(i, (uint32_t)0U, (uint32_t)6U, (uint32_t)1U, fsqr0(tmp2, tmp2););
  ------------------
  |  |  342|    807|#define KRML_MAYBE_FOR6(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 6, k, x)
  |  |  ------------------
  |  |  |  |  288|    807|    do {                               \
  |  |  |  |  289|    807|        uint32_t i = z;                \
  |  |  |  |  290|    807|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|    807|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  591|    807|    fmul0(tmp2, tmp2, tmp1);
  592|    807|    memcpy(tmp1, tmp2, (uint32_t)4U * sizeof(uint64_t));
  593|    807|    KRML_MAYBE_FOR3(i, (uint32_t)0U, (uint32_t)3U, (uint32_t)1U, fsqr0(tmp1, tmp1););
  ------------------
  |  |  324|    807|#define KRML_MAYBE_FOR3(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 3, k, x)
  |  |  ------------------
  |  |  |  |  288|    807|    do {                               \
  |  |  |  |  289|    807|        uint32_t i = z;                \
  |  |  |  |  290|    807|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|    807|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  594|    807|    fmul0(tmp1, tmp1, x30);
  595|    807|    memcpy(x30, tmp1, (uint32_t)4U * sizeof(uint64_t));
  596|    807|    KRML_MAYBE_FOR15(i, (uint32_t)0U, (uint32_t)15U, (uint32_t)1U, fsqr0(x30, x30););
  ------------------
  |  |  396|    807|#define KRML_MAYBE_FOR15(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 15, k, x)
  |  |  ------------------
  |  |  |  |  288|    807|    do {                               \
  |  |  |  |  289|    807|        uint32_t i = z;                \
  |  |  |  |  290|    807|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|    807|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  597|    807|    fmul0(x30, x30, tmp1);
  598|    807|    memcpy(tmp1, x30, (uint32_t)4U * sizeof(uint64_t));
  599|    807|    KRML_MAYBE_FOR2(i, (uint32_t)0U, (uint32_t)2U, (uint32_t)1U, fsqr0(tmp1, tmp1););
  ------------------
  |  |  318|    807|#define KRML_MAYBE_FOR2(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 2, k, x)
  |  |  ------------------
  |  |  |  |  288|    807|    do {                               \
  |  |  |  |  289|    807|        uint32_t i = z;                \
  |  |  |  |  290|    807|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|    807|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  600|    807|    fmul0(tmp1, tmp1, x2);
  601|    807|    memcpy(x2, tmp1, (uint32_t)4U * sizeof(uint64_t));
  602|  26.6k|    for (uint32_t i = (uint32_t)0U; i < (uint32_t)32U; i++) {
  ------------------
  |  Branch (602:37): [True: 25.8k, False: 807]
  ------------------
  603|  25.8k|        fsqr0(x2, x2);
  604|  25.8k|    }
  605|    807|    fmul0(x2, x2, a);
  606|   104k|    for (uint32_t i = (uint32_t)0U; i < (uint32_t)128U; i++) {
  ------------------
  |  Branch (606:37): [True: 103k, False: 807]
  ------------------
  607|   103k|        fsqr0(x2, x2);
  608|   103k|    }
  609|    807|    fmul0(x2, x2, tmp1);
  610|  26.6k|    for (uint32_t i = (uint32_t)0U; i < (uint32_t)32U; i++) {
  ------------------
  |  Branch (610:37): [True: 25.8k, False: 807]
  ------------------
  611|  25.8k|        fsqr0(x2, x2);
  612|  25.8k|    }
  613|    807|    fmul0(x2, x2, tmp1);
  614|  25.0k|    for (uint32_t i = (uint32_t)0U; i < (uint32_t)30U; i++) {
  ------------------
  |  Branch (614:37): [True: 24.2k, False: 807]
  ------------------
  615|  24.2k|        fsqr0(x2, x2);
  616|  24.2k|    }
  617|    807|    fmul0(x2, x2, x30);
  618|    807|    KRML_MAYBE_FOR2(i, (uint32_t)0U, (uint32_t)2U, (uint32_t)1U, fsqr0(x2, x2););
  ------------------
  |  |  318|    807|#define KRML_MAYBE_FOR2(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 2, k, x)
  |  |  ------------------
  |  |  |  |  288|    807|    do {                               \
  |  |  |  |  289|    807|        uint32_t i = z;                \
  |  |  |  |  290|    807|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|    807|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  619|    807|    fmul0(tmp1, x2, a);
  620|    807|    memcpy(res, tmp1, (uint32_t)4U * sizeof(uint64_t));
  621|    807|}
Hacl_P256.c:from_mont:
  539|  1.55k|{
  540|  1.55k|    uint64_t tmp[8U] = { 0U };
  541|  1.55k|    memcpy(tmp, a, (uint32_t)4U * sizeof(uint64_t));
  542|  1.55k|    mont_reduction(res, tmp);
  543|  1.55k|}
Hacl_P256.c:aff_point_store:
  755|    747|{
  756|    747|    uint64_t *px = p;
  757|    747|    uint64_t *py = p + (uint32_t)4U;
  758|    747|    bn2_to_bytes_be4(res, px, py);
  759|    747|}
Hacl_P256.c:bn2_to_bytes_be4:
  329|    747|{
  330|    747|    bn_to_bytes_be4(res, x);
  331|    747|    bn_to_bytes_be4(res + (uint32_t)32U, y);
  332|    747|}
Hacl_P256.c:load_point_vartime:
  792|  1.30k|{
  793|  1.30k|    uint64_t p_aff[8U] = { 0U };
  794|  1.30k|    bool res = aff_point_load_vartime(p_aff, b);
  795|  1.30k|    if (res) {
  ------------------
  |  Branch (795:9): [True: 1.22k, False: 75]
  ------------------
  796|  1.22k|        to_proj_point(p, p_aff);
  797|  1.22k|    }
  798|  1.30k|    return res;
  799|  1.30k|}
Hacl_P256.c:aff_point_load_vartime:
  771|  1.30k|{
  772|  1.30k|    uint8_t *p_x = b;
  773|  1.30k|    uint8_t *p_y = b + (uint32_t)32U;
  774|  1.30k|    uint64_t *bn_p_x = p;
  775|  1.30k|    uint64_t *bn_p_y = p + (uint32_t)4U;
  776|  1.30k|    bn_from_bytes_be4(bn_p_x, p_x);
  777|  1.30k|    bn_from_bytes_be4(bn_p_y, p_y);
  778|  1.30k|    uint64_t *px = p;
  779|  1.30k|    uint64_t *py = p + (uint32_t)4U;
  780|  1.30k|    uint64_t lessX = bn_is_lt_prime_mask4(px);
  781|  1.30k|    uint64_t lessY = bn_is_lt_prime_mask4(py);
  782|  1.30k|    uint64_t res = lessX & lessY;
  783|  1.30k|    bool is_xy_valid = res == (uint64_t)0xFFFFFFFFFFFFFFFFU;
  784|  1.30k|    if (!is_xy_valid) {
  ------------------
  |  Branch (784:9): [True: 8, False: 1.29k]
  ------------------
  785|      8|        return false;
  786|      8|    }
  787|  1.29k|    return is_on_curve_vartime(p);
  788|  1.30k|}
Hacl_P256.c:bn_is_lt_prime_mask4:
  417|  2.60k|{
  418|  2.60k|    uint64_t tmp[4U] = { 0U };
  419|  2.60k|    make_prime(tmp);
  420|  2.60k|    uint64_t c = bn_sub4(tmp, f, tmp);
  421|  2.60k|    return (uint64_t)0U - c;
  422|  2.60k|}
Hacl_P256.c:is_on_curve_vartime:
  732|  1.29k|{
  733|  1.29k|    uint64_t rp[4U] = { 0U };
  734|  1.29k|    uint64_t tx[4U] = { 0U };
  735|  1.29k|    uint64_t ty[4U] = { 0U };
  736|  1.29k|    uint64_t *px = p;
  737|  1.29k|    uint64_t *py = p + (uint32_t)4U;
  738|  1.29k|    to_mont(tx, px);
  739|  1.29k|    to_mont(ty, py);
  740|  1.29k|    uint64_t tmp[4U] = { 0U };
  741|  1.29k|    fcube(rp, tx);
  742|  1.29k|    make_a_coeff(tmp);
  743|  1.29k|    fmul0(tmp, tmp, tx);
  744|  1.29k|    fadd0(rp, tmp, rp);
  745|  1.29k|    make_b_coeff(tmp);
  746|  1.29k|    fadd0(rp, tmp, rp);
  747|  1.29k|    fsqr0(ty, ty);
  748|  1.29k|    uint64_t r = feq_mask(ty, rp);
  749|  1.29k|    bool r0 = r == (uint64_t)0xFFFFFFFFFFFFFFFFU;
  750|  1.29k|    return r0;
  751|  1.29k|}
Hacl_P256.c:to_mont:
  547|  5.05k|{
  548|  5.05k|    uint64_t r2modn[4U] = { 0U };
  549|  5.05k|    make_fmont_R2(r2modn);
  550|  5.05k|    fmul0(res, a, r2modn);
  551|  5.05k|}
Hacl_P256.c:make_fmont_R2:
  390|  5.05k|{
  391|  5.05k|    n[0U] = (uint64_t)0x3U;
  392|  5.05k|    n[1U] = (uint64_t)0xfffffffbffffffffU;
  393|  5.05k|    n[2U] = (uint64_t)0xfffffffffffffffeU;
  394|  5.05k|    n[3U] = (uint64_t)0x4fffffffdU;
  395|  5.05k|}
Hacl_P256.c:fcube:
  563|  1.29k|{
  564|  1.29k|    fsqr0(res, x);
  565|  1.29k|    fmul0(res, res, x);
  566|  1.29k|}
Hacl_P256.c:make_a_coeff:
  354|  1.29k|{
  355|  1.29k|    a[0U] = (uint64_t)0xfffffffffffffffcU;
  356|  1.29k|    a[1U] = (uint64_t)0x3ffffffffU;
  357|  1.29k|    a[2U] = (uint64_t)0x0U;
  358|  1.29k|    a[3U] = (uint64_t)0xfffffffc00000004U;
  359|  1.29k|}
Hacl_P256.c:feq_mask:
  426|  1.29k|{
  427|  1.29k|    uint64_t r = bn_is_eq_mask4(a, b);
  428|  1.29k|    return r;
  429|  1.29k|}
Hacl_P256.c:bn_is_eq_mask4:
   57|  1.35k|{
   58|  1.35k|    uint64_t mask = (uint64_t)0xFFFFFFFFFFFFFFFFU;
   59|  1.35k|    KRML_MAYBE_FOR4(i,
  ------------------
  |  |  330|  1.35k|#define KRML_MAYBE_FOR4(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 4, k, x)
  |  |  ------------------
  |  |  |  |  288|  1.35k|    do {                               \
  |  |  |  |  289|  1.35k|        uint32_t i = z;                \
  |  |  |  |  290|  1.35k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  1.35k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   60|  1.35k|                    (uint32_t)0U,
   61|  1.35k|                    (uint32_t)4U,
   62|  1.35k|                    (uint32_t)1U,
   63|  1.35k|                    uint64_t uu____0 = FStar_UInt64_eq_mask(a[i], b[i]);
   64|  1.35k|                    mask = uu____0 & mask;);
   65|  1.35k|    uint64_t mask1 = mask;
   66|  1.35k|    return mask1;
   67|  1.35k|}
Hacl_P256.c:to_proj_point:
  719|  1.22k|{
  720|  1.22k|    uint64_t *px = p;
  721|  1.22k|    uint64_t *py = p + (uint32_t)4U;
  722|  1.22k|    uint64_t *rx = res;
  723|  1.22k|    uint64_t *ry = res + (uint32_t)4U;
  724|  1.22k|    uint64_t *rz = res + (uint32_t)8U;
  725|  1.22k|    to_mont(rx, px);
  726|  1.22k|    to_mont(ry, py);
  727|  1.22k|    make_fone(rz);
  728|  1.22k|}
Hacl_P256.c:point_mul:
  973|    351|{
  974|    351|    uint64_t table[192U] = { 0U };
  975|    351|    uint64_t tmp[12U] = { 0U };
  976|    351|    uint64_t *t0 = table;
  977|    351|    uint64_t *t1 = table + (uint32_t)12U;
  978|    351|    make_point_at_inf(t0);
  979|    351|    memcpy(t1, p, (uint32_t)12U * sizeof(uint64_t));
  980|    351|    KRML_MAYBE_FOR7(i,
  ------------------
  |  |  348|    351|#define KRML_MAYBE_FOR7(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 7, k, x)
  |  |  ------------------
  |  |  |  |  288|    351|    do {                               \
  |  |  |  |  289|    351|        uint32_t i = z;                \
  |  |  |  |  290|    351|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|    351|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  981|    351|                    (uint32_t)0U,
  982|    351|                    (uint32_t)7U,
  983|    351|                    (uint32_t)1U,
  984|    351|                    uint64_t *t11 = table + (i + (uint32_t)1U) * (uint32_t)12U;
  985|    351|                    point_double(tmp, t11);
  986|    351|                    memcpy(table + ((uint32_t)2U * i + (uint32_t)2U) * (uint32_t)12U,
  987|    351|                           tmp,
  988|    351|                           (uint32_t)12U * sizeof(uint64_t));
  989|    351|                    uint64_t *t2 = table + ((uint32_t)2U * i + (uint32_t)2U) * (uint32_t)12U;
  990|    351|                    point_add(tmp, p, t2);
  991|    351|                    memcpy(table + ((uint32_t)2U * i + (uint32_t)3U) * (uint32_t)12U,
  992|    351|                           tmp,
  993|    351|                           (uint32_t)12U * sizeof(uint64_t)););
  994|    351|    make_point_at_inf(res);
  995|    351|    uint64_t tmp0[12U] = { 0U };
  996|  22.8k|    for (uint32_t i0 = (uint32_t)0U; i0 < (uint32_t)64U; i0++) {
  ------------------
  |  Branch (996:38): [True: 22.4k, False: 351]
  ------------------
  997|  22.4k|        KRML_MAYBE_FOR4(i, (uint32_t)0U, (uint32_t)4U, (uint32_t)1U, point_double(res, res););
  ------------------
  |  |  330|  22.4k|#define KRML_MAYBE_FOR4(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 4, k, x)
  |  |  ------------------
  |  |  |  |  288|  22.4k|    do {                               \
  |  |  |  |  289|  22.4k|        uint32_t i = z;                \
  |  |  |  |  290|  22.4k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  22.4k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  998|  22.4k|        uint32_t k = (uint32_t)256U - (uint32_t)4U * i0 - (uint32_t)4U;
  999|  22.4k|        uint64_t bits_l = Hacl_Bignum_Lib_bn_get_bits_u64((uint32_t)4U, scalar, k, (uint32_t)4U);
 1000|  22.4k|        memcpy(tmp0, (uint64_t *)table, (uint32_t)12U * sizeof(uint64_t));
 1001|  22.4k|        KRML_MAYBE_FOR15(i1,
  ------------------
  |  |  396|  22.4k|#define KRML_MAYBE_FOR15(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 15, k, x)
  |  |  ------------------
  |  |  |  |  288|  22.4k|    do {                               \
  |  |  |  |  289|  22.4k|        uint32_t i = z;                \
  |  |  |  |  290|  22.4k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  22.4k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1002|  22.4k|                         (uint32_t)0U,
 1003|  22.4k|                         (uint32_t)15U,
 1004|  22.4k|                         (uint32_t)1U,
 1005|  22.4k|                         uint64_t c = FStar_UInt64_eq_mask(bits_l, (uint64_t)(i1 + (uint32_t)1U));
 1006|  22.4k|                         const uint64_t *res_j = table + (i1 + (uint32_t)1U) * (uint32_t)12U;
 1007|  22.4k|                         KRML_MAYBE_FOR12(i,
 1008|  22.4k|                                          (uint32_t)0U,
 1009|  22.4k|                                          (uint32_t)12U,
 1010|  22.4k|                                          (uint32_t)1U,
 1011|  22.4k|                                          uint64_t *os = tmp0;
 1012|  22.4k|                                          uint64_t x = (c & res_j[i]) | (~c & tmp0[i]);
 1013|  22.4k|                                          os[i] = x;););
 1014|  22.4k|        point_add(res, res, tmp0);
 1015|  22.4k|    }
 1016|    351|}
Hacl_P256.c:qmod_short:
 1178|    122|{
 1179|    122|    uint64_t tmp[4U] = { 0U };
 1180|    122|    make_order(tmp);
 1181|    122|    uint64_t c = bn_sub4(tmp, x, tmp);
 1182|    122|    bn_cmovznz4(res, c, tmp, x);
 1183|    122|}
Hacl_P256.c:bn_cmovznz4:
   78|    122|{
   79|    122|    uint64_t mask = ~FStar_UInt64_eq_mask(cin, (uint64_t)0U);
   80|    122|    KRML_MAYBE_FOR4(i,
  ------------------
  |  |  330|    122|#define KRML_MAYBE_FOR4(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 4, k, x)
  |  |  ------------------
  |  |  |  |  288|    122|    do {                               \
  |  |  |  |  289|    122|        uint32_t i = z;                \
  |  |  |  |  290|    122|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|    122|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   81|    122|                    (uint32_t)0U,
   82|    122|                    (uint32_t)4U,
   83|    122|                    (uint32_t)1U,
   84|    122|                    uint64_t *os = res;
   85|    122|                    uint64_t uu____0 = x[i];
   86|    122|                    uint64_t x1 = uu____0 ^ (mask & (y[i] ^ uu____0));
   87|    122|                    os[i] = x1;);
   88|    122|}
Hacl_P256.c:to_aff_point_x:
  708|     60|{
  709|     60|    uint64_t zinv[4U] = { 0U };
  710|     60|    uint64_t *px = p;
  711|     60|    uint64_t *pz = p + (uint32_t)8U;
  712|     60|    finv(zinv, pz);
  713|     60|    fmul0(res, px, zinv);
  714|     60|    from_mont(res, res);
  715|     60|}
Hacl_P256.c:qinv:
 1345|     60|{
 1346|     60|    uint64_t tmp[28U] = { 0U };
 1347|     60|    uint64_t *x6 = tmp;
 1348|     60|    uint64_t *x_11 = tmp + (uint32_t)4U;
 1349|     60|    uint64_t *x_101 = tmp + (uint32_t)8U;
 1350|     60|    uint64_t *x_111 = tmp + (uint32_t)12U;
 1351|     60|    uint64_t *x_1111 = tmp + (uint32_t)16U;
 1352|     60|    uint64_t *x_10101 = tmp + (uint32_t)20U;
 1353|     60|    uint64_t *x_101111 = tmp + (uint32_t)24U;
 1354|     60|    memcpy(x6, r, (uint32_t)4U * sizeof(uint64_t));
 1355|     60|    {
 1356|     60|        qsqr(x6, x6);
 1357|     60|    }
 1358|     60|    qmul(x_11, x6, r);
 1359|     60|    qmul(x_101, x6, x_11);
 1360|     60|    qmul(x_111, x6, x_101);
 1361|     60|    memcpy(x6, x_101, (uint32_t)4U * sizeof(uint64_t));
 1362|     60|    {
 1363|     60|        qsqr(x6, x6);
 1364|     60|    }
 1365|     60|    qmul(x_1111, x_101, x6);
 1366|     60|    {
 1367|     60|        qsqr(x6, x6);
 1368|     60|    }
 1369|     60|    qmul(x_10101, x6, r);
 1370|     60|    memcpy(x6, x_10101, (uint32_t)4U * sizeof(uint64_t));
 1371|     60|    {
 1372|     60|        qsqr(x6, x6);
 1373|     60|    }
 1374|     60|    qmul(x_101111, x_101, x6);
 1375|     60|    qmul(x6, x_10101, x6);
 1376|     60|    uint64_t tmp1[4U] = { 0U };
 1377|     60|    KRML_MAYBE_FOR2(i, (uint32_t)0U, (uint32_t)2U, (uint32_t)1U, qsqr(x6, x6););
  ------------------
  |  |  318|     60|#define KRML_MAYBE_FOR2(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 2, k, x)
  |  |  ------------------
  |  |  |  |  288|     60|    do {                               \
  |  |  |  |  289|     60|        uint32_t i = z;                \
  |  |  |  |  290|     60|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     60|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1378|     60|    qmul(x6, x6, x_11);
 1379|     60|    memcpy(tmp1, x6, (uint32_t)4U * sizeof(uint64_t));
 1380|     60|    KRML_MAYBE_FOR8(i, (uint32_t)0U, (uint32_t)8U, (uint32_t)1U, qsqr(tmp1, tmp1););
  ------------------
  |  |  354|     60|#define KRML_MAYBE_FOR8(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 8, k, x)
  |  |  ------------------
  |  |  |  |  288|     60|    do {                               \
  |  |  |  |  289|     60|        uint32_t i = z;                \
  |  |  |  |  290|     60|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     60|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1381|     60|    qmul(tmp1, tmp1, x6);
 1382|     60|    memcpy(x6, tmp1, (uint32_t)4U * sizeof(uint64_t));
 1383|     60|    KRML_MAYBE_FOR16(i, (uint32_t)0U, (uint32_t)16U, (uint32_t)1U, qsqr(x6, x6););
  ------------------
  |  |  402|     60|#define KRML_MAYBE_FOR16(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 16, k, x)
  |  |  ------------------
  |  |  |  |  288|     60|    do {                               \
  |  |  |  |  289|     60|        uint32_t i = z;                \
  |  |  |  |  290|     60|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     60|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1384|     60|    qmul(x6, x6, tmp1);
 1385|     60|    memcpy(tmp1, x6, (uint32_t)4U * sizeof(uint64_t));
 1386|  3.90k|    for (uint32_t i = (uint32_t)0U; i < (uint32_t)64U; i++) {
  ------------------
  |  Branch (1386:37): [True: 3.84k, False: 60]
  ------------------
 1387|  3.84k|        qsqr(tmp1, tmp1);
 1388|  3.84k|    }
 1389|     60|    qmul(tmp1, tmp1, x6);
 1390|  1.98k|    for (uint32_t i = (uint32_t)0U; i < (uint32_t)32U; i++) {
  ------------------
  |  Branch (1390:37): [True: 1.92k, False: 60]
  ------------------
 1391|  1.92k|        qsqr(tmp1, tmp1);
 1392|  1.92k|    }
 1393|     60|    qmul(tmp1, tmp1, x6);
 1394|     60|    KRML_MAYBE_FOR6(i, (uint32_t)0U, (uint32_t)6U, (uint32_t)1U, qsqr(tmp1, tmp1););
  ------------------
  |  |  342|     60|#define KRML_MAYBE_FOR6(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 6, k, x)
  |  |  ------------------
  |  |  |  |  288|     60|    do {                               \
  |  |  |  |  289|     60|        uint32_t i = z;                \
  |  |  |  |  290|     60|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     60|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1395|     60|    qmul(tmp1, tmp1, x_101111);
 1396|     60|    KRML_MAYBE_FOR5(i, (uint32_t)0U, (uint32_t)5U, (uint32_t)1U, qsqr(tmp1, tmp1););
  ------------------
  |  |  336|     60|#define KRML_MAYBE_FOR5(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 5, k, x)
  |  |  ------------------
  |  |  |  |  288|     60|    do {                               \
  |  |  |  |  289|     60|        uint32_t i = z;                \
  |  |  |  |  290|     60|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     60|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1397|     60|    qmul(tmp1, tmp1, x_111);
 1398|     60|    KRML_MAYBE_FOR4(i, (uint32_t)0U, (uint32_t)4U, (uint32_t)1U, qsqr(tmp1, tmp1););
  ------------------
  |  |  330|     60|#define KRML_MAYBE_FOR4(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 4, k, x)
  |  |  ------------------
  |  |  |  |  288|     60|    do {                               \
  |  |  |  |  289|     60|        uint32_t i = z;                \
  |  |  |  |  290|     60|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     60|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1399|     60|    qmul(tmp1, tmp1, x_11);
 1400|     60|    KRML_MAYBE_FOR5(i, (uint32_t)0U, (uint32_t)5U, (uint32_t)1U, qsqr(tmp1, tmp1););
  ------------------
  |  |  336|     60|#define KRML_MAYBE_FOR5(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 5, k, x)
  |  |  ------------------
  |  |  |  |  288|     60|    do {                               \
  |  |  |  |  289|     60|        uint32_t i = z;                \
  |  |  |  |  290|     60|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     60|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1401|     60|    qmul(tmp1, tmp1, x_1111);
 1402|     60|    KRML_MAYBE_FOR5(i, (uint32_t)0U, (uint32_t)5U, (uint32_t)1U, qsqr(tmp1, tmp1););
  ------------------
  |  |  336|     60|#define KRML_MAYBE_FOR5(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 5, k, x)
  |  |  ------------------
  |  |  |  |  288|     60|    do {                               \
  |  |  |  |  289|     60|        uint32_t i = z;                \
  |  |  |  |  290|     60|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     60|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1403|     60|    qmul(tmp1, tmp1, x_10101);
 1404|     60|    KRML_MAYBE_FOR4(i, (uint32_t)0U, (uint32_t)4U, (uint32_t)1U, qsqr(tmp1, tmp1););
  ------------------
  |  |  330|     60|#define KRML_MAYBE_FOR4(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 4, k, x)
  |  |  ------------------
  |  |  |  |  288|     60|    do {                               \
  |  |  |  |  289|     60|        uint32_t i = z;                \
  |  |  |  |  290|     60|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     60|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1405|     60|    qmul(tmp1, tmp1, x_101);
 1406|     60|    KRML_MAYBE_FOR3(i, (uint32_t)0U, (uint32_t)3U, (uint32_t)1U, qsqr(tmp1, tmp1););
  ------------------
  |  |  324|     60|#define KRML_MAYBE_FOR3(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 3, k, x)
  |  |  ------------------
  |  |  |  |  288|     60|    do {                               \
  |  |  |  |  289|     60|        uint32_t i = z;                \
  |  |  |  |  290|     60|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     60|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1407|     60|    qmul(tmp1, tmp1, x_101);
 1408|     60|    KRML_MAYBE_FOR3(i, (uint32_t)0U, (uint32_t)3U, (uint32_t)1U, qsqr(tmp1, tmp1););
  ------------------
  |  |  324|     60|#define KRML_MAYBE_FOR3(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 3, k, x)
  |  |  ------------------
  |  |  |  |  288|     60|    do {                               \
  |  |  |  |  289|     60|        uint32_t i = z;                \
  |  |  |  |  290|     60|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     60|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1409|     60|    qmul(tmp1, tmp1, x_101);
 1410|     60|    KRML_MAYBE_FOR5(i, (uint32_t)0U, (uint32_t)5U, (uint32_t)1U, qsqr(tmp1, tmp1););
  ------------------
  |  |  336|     60|#define KRML_MAYBE_FOR5(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 5, k, x)
  |  |  ------------------
  |  |  |  |  288|     60|    do {                               \
  |  |  |  |  289|     60|        uint32_t i = z;                \
  |  |  |  |  290|     60|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     60|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1411|     60|    qmul(tmp1, tmp1, x_111);
 1412|     60|    KRML_MAYBE_FOR9(i, (uint32_t)0U, (uint32_t)9U, (uint32_t)1U, qsqr(tmp1, tmp1););
  ------------------
  |  |  360|     60|#define KRML_MAYBE_FOR9(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 9, k, x)
  |  |  ------------------
  |  |  |  |  288|     60|    do {                               \
  |  |  |  |  289|     60|        uint32_t i = z;                \
  |  |  |  |  290|     60|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     60|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1413|     60|    qmul(tmp1, tmp1, x_101111);
 1414|     60|    KRML_MAYBE_FOR6(i, (uint32_t)0U, (uint32_t)6U, (uint32_t)1U, qsqr(tmp1, tmp1););
  ------------------
  |  |  342|     60|#define KRML_MAYBE_FOR6(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 6, k, x)
  |  |  ------------------
  |  |  |  |  288|     60|    do {                               \
  |  |  |  |  289|     60|        uint32_t i = z;                \
  |  |  |  |  290|     60|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     60|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1415|     60|    qmul(tmp1, tmp1, x_1111);
 1416|     60|    KRML_MAYBE_FOR2(i, (uint32_t)0U, (uint32_t)2U, (uint32_t)1U, qsqr(tmp1, tmp1););
  ------------------
  |  |  318|     60|#define KRML_MAYBE_FOR2(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 2, k, x)
  |  |  ------------------
  |  |  |  |  288|     60|    do {                               \
  |  |  |  |  289|     60|        uint32_t i = z;                \
  |  |  |  |  290|     60|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     60|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1417|     60|    qmul(tmp1, tmp1, r);
 1418|     60|    KRML_MAYBE_FOR5(i, (uint32_t)0U, (uint32_t)5U, (uint32_t)1U, qsqr(tmp1, tmp1););
  ------------------
  |  |  336|     60|#define KRML_MAYBE_FOR5(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 5, k, x)
  |  |  ------------------
  |  |  |  |  288|     60|    do {                               \
  |  |  |  |  289|     60|        uint32_t i = z;                \
  |  |  |  |  290|     60|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     60|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1419|     60|    qmul(tmp1, tmp1, r);
 1420|     60|    KRML_MAYBE_FOR6(i, (uint32_t)0U, (uint32_t)6U, (uint32_t)1U, qsqr(tmp1, tmp1););
  ------------------
  |  |  342|     60|#define KRML_MAYBE_FOR6(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 6, k, x)
  |  |  ------------------
  |  |  |  |  288|     60|    do {                               \
  |  |  |  |  289|     60|        uint32_t i = z;                \
  |  |  |  |  290|     60|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     60|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1421|     60|    qmul(tmp1, tmp1, x_1111);
 1422|     60|    KRML_MAYBE_FOR5(i, (uint32_t)0U, (uint32_t)5U, (uint32_t)1U, qsqr(tmp1, tmp1););
  ------------------
  |  |  336|     60|#define KRML_MAYBE_FOR5(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 5, k, x)
  |  |  ------------------
  |  |  |  |  288|     60|    do {                               \
  |  |  |  |  289|     60|        uint32_t i = z;                \
  |  |  |  |  290|     60|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     60|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1423|     60|    qmul(tmp1, tmp1, x_111);
 1424|     60|    KRML_MAYBE_FOR4(i, (uint32_t)0U, (uint32_t)4U, (uint32_t)1U, qsqr(tmp1, tmp1););
  ------------------
  |  |  330|     60|#define KRML_MAYBE_FOR4(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 4, k, x)
  |  |  ------------------
  |  |  |  |  288|     60|    do {                               \
  |  |  |  |  289|     60|        uint32_t i = z;                \
  |  |  |  |  290|     60|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     60|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1425|     60|    qmul(tmp1, tmp1, x_111);
 1426|     60|    KRML_MAYBE_FOR5(i, (uint32_t)0U, (uint32_t)5U, (uint32_t)1U, qsqr(tmp1, tmp1););
  ------------------
  |  |  336|     60|#define KRML_MAYBE_FOR5(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 5, k, x)
  |  |  ------------------
  |  |  |  |  288|     60|    do {                               \
  |  |  |  |  289|     60|        uint32_t i = z;                \
  |  |  |  |  290|     60|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     60|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1427|     60|    qmul(tmp1, tmp1, x_111);
 1428|     60|    KRML_MAYBE_FOR5(i, (uint32_t)0U, (uint32_t)5U, (uint32_t)1U, qsqr(tmp1, tmp1););
  ------------------
  |  |  336|     60|#define KRML_MAYBE_FOR5(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 5, k, x)
  |  |  ------------------
  |  |  |  |  288|     60|    do {                               \
  |  |  |  |  289|     60|        uint32_t i = z;                \
  |  |  |  |  290|     60|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     60|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1429|     60|    qmul(tmp1, tmp1, x_101);
 1430|     60|    KRML_MAYBE_FOR3(i, (uint32_t)0U, (uint32_t)3U, (uint32_t)1U, qsqr(tmp1, tmp1););
  ------------------
  |  |  324|     60|#define KRML_MAYBE_FOR3(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 3, k, x)
  |  |  ------------------
  |  |  |  |  288|     60|    do {                               \
  |  |  |  |  289|     60|        uint32_t i = z;                \
  |  |  |  |  290|     60|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     60|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1431|     60|    qmul(tmp1, tmp1, x_11);
 1432|     60|    KRML_MAYBE_FOR10(i, (uint32_t)0U, (uint32_t)10U, (uint32_t)1U, qsqr(tmp1, tmp1););
  ------------------
  |  |  366|     60|#define KRML_MAYBE_FOR10(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 10, k, x)
  |  |  ------------------
  |  |  |  |  288|     60|    do {                               \
  |  |  |  |  289|     60|        uint32_t i = z;                \
  |  |  |  |  290|     60|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     60|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1433|     60|    qmul(tmp1, tmp1, x_101111);
 1434|     60|    KRML_MAYBE_FOR2(i, (uint32_t)0U, (uint32_t)2U, (uint32_t)1U, qsqr(tmp1, tmp1););
  ------------------
  |  |  318|     60|#define KRML_MAYBE_FOR2(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 2, k, x)
  |  |  ------------------
  |  |  |  |  288|     60|    do {                               \
  |  |  |  |  289|     60|        uint32_t i = z;                \
  |  |  |  |  290|     60|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     60|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1435|     60|    qmul(tmp1, tmp1, x_11);
 1436|     60|    KRML_MAYBE_FOR5(i, (uint32_t)0U, (uint32_t)5U, (uint32_t)1U, qsqr(tmp1, tmp1););
  ------------------
  |  |  336|     60|#define KRML_MAYBE_FOR5(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 5, k, x)
  |  |  ------------------
  |  |  |  |  288|     60|    do {                               \
  |  |  |  |  289|     60|        uint32_t i = z;                \
  |  |  |  |  290|     60|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     60|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1437|     60|    qmul(tmp1, tmp1, x_11);
 1438|     60|    KRML_MAYBE_FOR5(i, (uint32_t)0U, (uint32_t)5U, (uint32_t)1U, qsqr(tmp1, tmp1););
  ------------------
  |  |  336|     60|#define KRML_MAYBE_FOR5(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 5, k, x)
  |  |  ------------------
  |  |  |  |  288|     60|    do {                               \
  |  |  |  |  289|     60|        uint32_t i = z;                \
  |  |  |  |  290|     60|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     60|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1439|     60|    qmul(tmp1, tmp1, x_11);
 1440|     60|    KRML_MAYBE_FOR3(i, (uint32_t)0U, (uint32_t)3U, (uint32_t)1U, qsqr(tmp1, tmp1););
  ------------------
  |  |  324|     60|#define KRML_MAYBE_FOR3(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 3, k, x)
  |  |  ------------------
  |  |  |  |  288|     60|    do {                               \
  |  |  |  |  289|     60|        uint32_t i = z;                \
  |  |  |  |  290|     60|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     60|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1441|     60|    qmul(tmp1, tmp1, r);
 1442|     60|    KRML_MAYBE_FOR7(i, (uint32_t)0U, (uint32_t)7U, (uint32_t)1U, qsqr(tmp1, tmp1););
  ------------------
  |  |  348|     60|#define KRML_MAYBE_FOR7(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 7, k, x)
  |  |  ------------------
  |  |  |  |  288|     60|    do {                               \
  |  |  |  |  289|     60|        uint32_t i = z;                \
  |  |  |  |  290|     60|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     60|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1443|     60|    qmul(tmp1, tmp1, x_10101);
 1444|     60|    KRML_MAYBE_FOR6(i, (uint32_t)0U, (uint32_t)6U, (uint32_t)1U, qsqr(tmp1, tmp1););
  ------------------
  |  |  342|     60|#define KRML_MAYBE_FOR6(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 6, k, x)
  |  |  ------------------
  |  |  |  |  288|     60|    do {                               \
  |  |  |  |  289|     60|        uint32_t i = z;                \
  |  |  |  |  290|     60|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     60|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1445|     60|    qmul(tmp1, tmp1, x_1111);
 1446|     60|    memcpy(x6, tmp1, (uint32_t)4U * sizeof(uint64_t));
 1447|     60|    memcpy(res, x6, (uint32_t)4U * sizeof(uint64_t));
 1448|     60|}
Hacl_P256.c:qsqr:
 1276|  15.2k|{
 1277|  15.2k|    uint64_t tmp[8U] = { 0U };
 1278|  15.2k|    bn_sqr4(tmp, x);
 1279|  15.2k|    qmont_reduction(res, tmp);
 1280|  15.2k|}
Hacl_P256.c:qmont_reduction:
 1195|  17.7k|{
 1196|  17.7k|    uint64_t n[4U] = { 0U };
 1197|  17.7k|    make_order(n);
 1198|  17.7k|    uint64_t c0 = (uint64_t)0U;
 1199|  17.7k|    KRML_MAYBE_FOR4(
  ------------------
  |  |  330|  17.7k|#define KRML_MAYBE_FOR4(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 4, k, x)
  |  |  ------------------
  |  |  |  |  288|  17.7k|    do {                               \
  |  |  |  |  289|  17.7k|        uint32_t i = z;                \
  |  |  |  |  290|  17.7k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  17.7k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1200|  17.7k|        i0,
 1201|  17.7k|        (uint32_t)0U,
 1202|  17.7k|        (uint32_t)4U,
 1203|  17.7k|        (uint32_t)1U,
 1204|  17.7k|        uint64_t qj = (uint64_t)0xccd1c8aaee00bc4fU * x[i0];
 1205|  17.7k|        uint64_t *res_j0 = x + i0;
 1206|  17.7k|        uint64_t c = (uint64_t)0U;
 1207|  17.7k|        {
 1208|  17.7k|            uint64_t a_i = n[(uint32_t)4U * (uint32_t)0U];
 1209|  17.7k|            uint64_t *res_i0 = res_j0 + (uint32_t)4U * (uint32_t)0U;
 1210|  17.7k|            c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i, qj, c, res_i0);
 1211|  17.7k|            uint64_t a_i0 = n[(uint32_t)4U * (uint32_t)0U + (uint32_t)1U];
 1212|  17.7k|            uint64_t *res_i1 = res_j0 + (uint32_t)4U * (uint32_t)0U + (uint32_t)1U;
 1213|  17.7k|            c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i0, qj, c, res_i1);
 1214|  17.7k|            uint64_t a_i1 = n[(uint32_t)4U * (uint32_t)0U + (uint32_t)2U];
 1215|  17.7k|            uint64_t *res_i2 = res_j0 + (uint32_t)4U * (uint32_t)0U + (uint32_t)2U;
 1216|  17.7k|            c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i1, qj, c, res_i2);
 1217|  17.7k|            uint64_t a_i2 = n[(uint32_t)4U * (uint32_t)0U + (uint32_t)3U];
 1218|  17.7k|            uint64_t *res_i = res_j0 + (uint32_t)4U * (uint32_t)0U + (uint32_t)3U;
 1219|  17.7k|            c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i2, qj, c, res_i);
 1220|  17.7k|        } uint64_t r = c;
 1221|  17.7k|        uint64_t c1 = r;
 1222|  17.7k|        uint64_t *resb = x + (uint32_t)4U + i0;
 1223|  17.7k|        uint64_t res_j = x[(uint32_t)4U + i0];
 1224|  17.7k|        c0 = Lib_IntTypes_Intrinsics_add_carry_u64(c0, c1, res_j, resb););
 1225|  17.7k|    memcpy(res, x + (uint32_t)4U, (uint32_t)4U * sizeof(uint64_t));
 1226|  17.7k|    uint64_t c00 = c0;
 1227|  17.7k|    uint64_t tmp[4U] = { 0U };
 1228|  17.7k|    uint64_t c = (uint64_t)0U;
 1229|  17.7k|    {
 1230|  17.7k|        uint64_t t1 = res[(uint32_t)4U * (uint32_t)0U];
 1231|  17.7k|        uint64_t t20 = n[(uint32_t)4U * (uint32_t)0U];
 1232|  17.7k|        uint64_t *res_i0 = tmp + (uint32_t)4U * (uint32_t)0U;
 1233|  17.7k|        c = Lib_IntTypes_Intrinsics_sub_borrow_u64(c, t1, t20, res_i0);
  ------------------
  |  |   89|  17.7k|    (_subborrow_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
 1234|  17.7k|        uint64_t t10 = res[(uint32_t)4U * (uint32_t)0U + (uint32_t)1U];
 1235|  17.7k|        uint64_t t21 = n[(uint32_t)4U * (uint32_t)0U + (uint32_t)1U];
 1236|  17.7k|        uint64_t *res_i1 = tmp + (uint32_t)4U * (uint32_t)0U + (uint32_t)1U;
 1237|  17.7k|        c = Lib_IntTypes_Intrinsics_sub_borrow_u64(c, t10, t21, res_i1);
  ------------------
  |  |   89|  17.7k|    (_subborrow_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
 1238|  17.7k|        uint64_t t11 = res[(uint32_t)4U * (uint32_t)0U + (uint32_t)2U];
 1239|  17.7k|        uint64_t t22 = n[(uint32_t)4U * (uint32_t)0U + (uint32_t)2U];
 1240|  17.7k|        uint64_t *res_i2 = tmp + (uint32_t)4U * (uint32_t)0U + (uint32_t)2U;
 1241|  17.7k|        c = Lib_IntTypes_Intrinsics_sub_borrow_u64(c, t11, t22, res_i2);
  ------------------
  |  |   89|  17.7k|    (_subborrow_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
 1242|  17.7k|        uint64_t t12 = res[(uint32_t)4U * (uint32_t)0U + (uint32_t)3U];
 1243|  17.7k|        uint64_t t2 = n[(uint32_t)4U * (uint32_t)0U + (uint32_t)3U];
 1244|  17.7k|        uint64_t *res_i = tmp + (uint32_t)4U * (uint32_t)0U + (uint32_t)3U;
 1245|  17.7k|        c = Lib_IntTypes_Intrinsics_sub_borrow_u64(c, t12, t2, res_i);
  ------------------
  |  |   89|  17.7k|    (_subborrow_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
 1246|  17.7k|    }
 1247|  17.7k|    uint64_t c1 = c;
 1248|  17.7k|    uint64_t c2 = c00 - c1;
 1249|  17.7k|    KRML_MAYBE_FOR4(i,
  ------------------
  |  |  330|  17.7k|#define KRML_MAYBE_FOR4(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 4, k, x)
  |  |  ------------------
  |  |  |  |  288|  17.7k|    do {                               \
  |  |  |  |  289|  17.7k|        uint32_t i = z;                \
  |  |  |  |  290|  17.7k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  17.7k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1250|  17.7k|                    (uint32_t)0U,
 1251|  17.7k|                    (uint32_t)4U,
 1252|  17.7k|                    (uint32_t)1U,
 1253|  17.7k|                    uint64_t *os = res;
 1254|  17.7k|                    uint64_t x1 = (c2 & res[i]) | (~c2 & tmp[i]);
 1255|  17.7k|                    os[i] = x1;);
 1256|  17.7k|}
Hacl_P256.c:qmul:
 1268|  2.40k|{
 1269|  2.40k|    uint64_t tmp[8U] = { 0U };
 1270|  2.40k|    bn_mul4(tmp, x, y);
 1271|  2.40k|    qmont_reduction(res, tmp);
 1272|  2.40k|}
Hacl_P256.c:from_qmont:
 1260|    120|{
 1261|    120|    uint64_t tmp[8U] = { 0U };
 1262|    120|    memcpy(tmp, x, (uint32_t)4U * sizeof(uint64_t));
 1263|    120|    qmont_reduction(res, tmp);
 1264|    120|}
Hacl_P256.c:ecdsa_verify_msg_as_qelem:
 1464|     62|{
 1465|     62|    uint64_t tmp[28U] = { 0U };
 1466|     62|    uint64_t *pk = tmp;
 1467|     62|    uint64_t *r_q = tmp + (uint32_t)12U;
 1468|     62|    uint64_t *s_q = tmp + (uint32_t)16U;
 1469|     62|    uint64_t *u1 = tmp + (uint32_t)20U;
 1470|     62|    uint64_t *u2 = tmp + (uint32_t)24U;
 1471|     62|    bool is_pk_valid = load_point_vartime(pk, public_key);
 1472|     62|    bn_from_bytes_be4(r_q, signature_r);
 1473|     62|    bn_from_bytes_be4(s_q, signature_s);
 1474|     62|    uint64_t is_r_valid = bn_is_lt_order_and_gt_zero_mask4(r_q);
 1475|     62|    uint64_t is_s_valid = bn_is_lt_order_and_gt_zero_mask4(s_q);
 1476|     62|    bool
 1477|     62|        is_rs_valid =
 1478|     62|            is_r_valid == (uint64_t)0xFFFFFFFFFFFFFFFFU && is_s_valid == (uint64_t)0xFFFFFFFFFFFFFFFFU;
  ------------------
  |  Branch (1478:13): [True: 61, False: 1]
  |  Branch (1478:60): [True: 60, False: 1]
  ------------------
 1479|     62|    if (!(is_pk_valid && is_rs_valid)) {
  ------------------
  |  Branch (1479:11): [True: 62, False: 0]
  |  Branch (1479:26): [True: 60, False: 2]
  ------------------
 1480|      2|        return false;
 1481|      2|    }
 1482|     60|    uint64_t sinv[4U] = { 0U };
 1483|     60|    qinv(sinv, s_q);
 1484|     60|    qmul_mont(sinv, m_q, u1);
 1485|     60|    qmul_mont(sinv, r_q, u2);
 1486|     60|    uint64_t res[12U] = { 0U };
 1487|     60|    point_mul_double_g(res, u1, u2, pk);
 1488|     60|    if (is_point_at_inf_vartime(res)) {
  ------------------
  |  Branch (1488:9): [True: 0, False: 60]
  ------------------
 1489|      0|        return false;
 1490|      0|    }
 1491|     60|    uint64_t x[4U] = { 0U };
 1492|     60|    to_aff_point_x(x, res);
 1493|     60|    qmod_short(x, x);
 1494|     60|    bool res1 = bn_is_eq_vartime4(x, r_q);
 1495|     60|    return res1;
 1496|     60|}
Hacl_P256.c:qmul_mont:
 1452|    120|{
 1453|    120|    uint64_t tmp[4U] = { 0U };
 1454|    120|    from_qmont(tmp, b);
 1455|    120|    qmul(res, sinv, tmp);
 1456|    120|}
Hacl_P256.c:point_mul_double_g:
 1104|     60|{
 1105|     60|    uint64_t q1[12U] = { 0U };
 1106|     60|    make_base_point(q1);
 1107|     60|    uint64_t table2[384U] = { 0U };
 1108|     60|    uint64_t tmp[12U] = { 0U };
 1109|     60|    uint64_t *t0 = table2;
 1110|     60|    uint64_t *t1 = table2 + (uint32_t)12U;
 1111|     60|    make_point_at_inf(t0);
 1112|     60|    memcpy(t1, q2, (uint32_t)12U * sizeof(uint64_t));
 1113|     60|    KRML_MAYBE_FOR15(i,
  ------------------
  |  |  396|     60|#define KRML_MAYBE_FOR15(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 15, k, x)
  |  |  ------------------
  |  |  |  |  288|     60|    do {                               \
  |  |  |  |  289|     60|        uint32_t i = z;                \
  |  |  |  |  290|     60|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     60|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1114|     60|                     (uint32_t)0U,
 1115|     60|                     (uint32_t)15U,
 1116|     60|                     (uint32_t)1U,
 1117|     60|                     uint64_t *t11 = table2 + (i + (uint32_t)1U) * (uint32_t)12U;
 1118|     60|                     point_double(tmp, t11);
 1119|     60|                     memcpy(table2 + ((uint32_t)2U * i + (uint32_t)2U) * (uint32_t)12U,
 1120|     60|                            tmp,
 1121|     60|                            (uint32_t)12U * sizeof(uint64_t));
 1122|     60|                     uint64_t *t2 = table2 + ((uint32_t)2U * i + (uint32_t)2U) * (uint32_t)12U;
 1123|     60|                     point_add(tmp, q2, t2);
 1124|     60|                     memcpy(table2 + ((uint32_t)2U * i + (uint32_t)3U) * (uint32_t)12U,
 1125|     60|                            tmp,
 1126|     60|                            (uint32_t)12U * sizeof(uint64_t)););
 1127|     60|    uint64_t tmp0[12U] = { 0U };
 1128|     60|    uint32_t i0 = (uint32_t)255U;
 1129|     60|    uint64_t bits_c = Hacl_Bignum_Lib_bn_get_bits_u64((uint32_t)4U, scalar1, i0, (uint32_t)5U);
 1130|     60|    uint32_t bits_l32 = (uint32_t)bits_c;
 1131|     60|    const uint64_t
 1132|     60|        *a_bits_l = Hacl_P256_PrecompTable_precomp_basepoint_table_w5 + bits_l32 * (uint32_t)12U;
 1133|     60|    memcpy(res, (uint64_t *)a_bits_l, (uint32_t)12U * sizeof(uint64_t));
 1134|     60|    uint32_t i1 = (uint32_t)255U;
 1135|     60|    uint64_t bits_c0 = Hacl_Bignum_Lib_bn_get_bits_u64((uint32_t)4U, scalar2, i1, (uint32_t)5U);
 1136|     60|    uint32_t bits_l320 = (uint32_t)bits_c0;
 1137|     60|    const uint64_t *a_bits_l0 = table2 + bits_l320 * (uint32_t)12U;
 1138|     60|    memcpy(tmp0, (uint64_t *)a_bits_l0, (uint32_t)12U * sizeof(uint64_t));
 1139|     60|    point_add(res, res, tmp0);
 1140|     60|    uint64_t tmp1[12U] = { 0U };
 1141|  3.12k|    for (uint32_t i = (uint32_t)0U; i < (uint32_t)51U; i++) {
  ------------------
  |  Branch (1141:37): [True: 3.06k, False: 60]
  ------------------
 1142|  3.06k|        KRML_MAYBE_FOR5(i2, (uint32_t)0U, (uint32_t)5U, (uint32_t)1U, point_double(res, res););
  ------------------
  |  |  336|  3.06k|#define KRML_MAYBE_FOR5(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 5, k, x)
  |  |  ------------------
  |  |  |  |  288|  3.06k|    do {                               \
  |  |  |  |  289|  3.06k|        uint32_t i = z;                \
  |  |  |  |  290|  3.06k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  3.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1143|  3.06k|        uint32_t k = (uint32_t)255U - (uint32_t)5U * i - (uint32_t)5U;
 1144|  3.06k|        uint64_t bits_l = Hacl_Bignum_Lib_bn_get_bits_u64((uint32_t)4U, scalar2, k, (uint32_t)5U);
 1145|  3.06k|        uint32_t bits_l321 = (uint32_t)bits_l;
 1146|  3.06k|        const uint64_t *a_bits_l1 = table2 + bits_l321 * (uint32_t)12U;
 1147|  3.06k|        memcpy(tmp1, (uint64_t *)a_bits_l1, (uint32_t)12U * sizeof(uint64_t));
 1148|  3.06k|        point_add(res, res, tmp1);
 1149|  3.06k|        uint32_t k0 = (uint32_t)255U - (uint32_t)5U * i - (uint32_t)5U;
 1150|  3.06k|        uint64_t bits_l0 = Hacl_Bignum_Lib_bn_get_bits_u64((uint32_t)4U, scalar1, k0, (uint32_t)5U);
 1151|  3.06k|        uint32_t bits_l322 = (uint32_t)bits_l0;
 1152|  3.06k|        const uint64_t
 1153|  3.06k|            *a_bits_l2 = Hacl_P256_PrecompTable_precomp_basepoint_table_w5 + bits_l322 * (uint32_t)12U;
 1154|  3.06k|        memcpy(tmp1, (uint64_t *)a_bits_l2, (uint32_t)12U * sizeof(uint64_t));
 1155|  3.06k|        point_add(res, res, tmp1);
 1156|  3.06k|    }
 1157|     60|}
Hacl_P256.c:is_point_at_inf_vartime:
  685|     60|{
  686|     60|    uint64_t *pz = p + (uint32_t)8U;
  687|     60|    return bn_is_zero_vartime4(pz);
  688|     60|}
Hacl_P256.c:bn_is_zero_vartime4:
   50|     60|{
   51|     60|    uint64_t m = bn_is_zero_mask4(f);
   52|     60|    return m == (uint64_t)0xFFFFFFFFFFFFFFFFU;
   53|     60|}
Hacl_P256.c:bn_is_eq_vartime4:
   71|     60|{
   72|     60|    uint64_t m = bn_is_eq_mask4(a, b);
   73|     60|    return m == (uint64_t)0xFFFFFFFFFFFFFFFFU;
   74|     60|}
Hacl_P256.c:bn_to_bytes_be4:
  304|  1.49k|{
  305|  1.49k|    uint8_t tmp[32U] = { 0U };
  306|  1.49k|    KRML_HOST_IGNORE(tmp);
  ------------------
  |  |   56|  1.49k|#define KRML_HOST_IGNORE(x) (void)(x)
  ------------------
  307|  1.49k|    KRML_MAYBE_FOR4(i,
  ------------------
  |  |  330|  1.49k|#define KRML_MAYBE_FOR4(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 4, k, x)
  |  |  ------------------
  |  |  |  |  288|  1.49k|    do {                               \
  |  |  |  |  289|  1.49k|        uint32_t i = z;                \
  |  |  |  |  290|  1.49k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  1.49k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  308|  1.49k|                    (uint32_t)0U,
  309|  1.49k|                    (uint32_t)4U,
  310|  1.49k|                    (uint32_t)1U,
  311|  1.49k|                    store64_be(res + i * (uint32_t)8U, f[(uint32_t)4U - i - (uint32_t)1U]););
  312|  1.49k|}

Hacl_P384_ecdsa_verif_without_hash:
 1328|     33|{
 1329|     33|    uint64_t m_q[6U] = { 0U };
 1330|     33|    uint8_t mHash[48U] = { 0U };
 1331|     33|    memcpy(mHash, msg, 48U * sizeof(uint8_t));
 1332|     33|    KRML_MAYBE_UNUSED_VAR(msg_len);
  ------------------
  |  |   60|     33|#define KRML_MAYBE_UNUSED_VAR(x) KRML_HOST_IGNORE(x)
  |  |  ------------------
  |  |  |  |   56|     33|#define KRML_HOST_IGNORE(x) (void)(x)
  |  |  ------------------
  ------------------
 1333|     33|    uint8_t *mHash48 = mHash;
 1334|     33|    bn_from_bytes_be(m_q, mHash48);
 1335|     33|    qmod_short(m_q, m_q);
 1336|     33|    bool res = ecdsa_verify_msg_as_qelem(m_q, public_key, signature_r, signature_s);
 1337|     33|    return res;
 1338|     33|}
Hacl_P384_validate_public_key:
 1360|    142|{
 1361|    142|    uint64_t point_jac[18U] = { 0U };
 1362|    142|    uint64_t p_aff[12U] = { 0U };
 1363|    142|    uint8_t *p_x = public_key;
 1364|    142|    uint8_t *p_y = public_key + 48U;
 1365|    142|    uint64_t *bn_p_x = p_aff;
 1366|    142|    uint64_t *bn_p_y = p_aff + 6U;
 1367|    142|    bn_from_bytes_be(bn_p_x, p_x);
 1368|    142|    bn_from_bytes_be(bn_p_y, p_y);
 1369|    142|    uint64_t *px0 = p_aff;
 1370|    142|    uint64_t *py0 = p_aff + 6U;
 1371|    142|    uint64_t lessX = bn_is_lt_prime_mask(px0);
 1372|    142|    uint64_t lessY = bn_is_lt_prime_mask(py0);
 1373|    142|    uint64_t res0 = lessX & lessY;
 1374|    142|    bool is_xy_valid = res0 == 0xFFFFFFFFFFFFFFFFULL;
 1375|    142|    bool res;
 1376|    142|    if (!is_xy_valid) {
  ------------------
  |  Branch (1376:9): [True: 5, False: 137]
  ------------------
 1377|      5|        res = false;
 1378|    137|    } else {
 1379|    137|        uint64_t rp[6U] = { 0U };
 1380|    137|        uint64_t tx[6U] = { 0U };
 1381|    137|        uint64_t ty[6U] = { 0U };
 1382|    137|        uint64_t *px = p_aff;
 1383|    137|        uint64_t *py = p_aff + 6U;
 1384|    137|        to_mont(tx, px);
 1385|    137|        to_mont(ty, py);
 1386|    137|        uint64_t tmp[6U] = { 0U };
 1387|    137|        fsqr0(rp, tx);
 1388|    137|        fmul0(rp, rp, tx);
 1389|    137|        p384_make_a_coeff(tmp);
 1390|    137|        fmul0(tmp, tmp, tx);
 1391|    137|        fadd0(rp, tmp, rp);
 1392|    137|        p384_make_b_coeff(tmp);
 1393|    137|        fadd0(rp, tmp, rp);
 1394|    137|        fsqr0(ty, ty);
 1395|    137|        uint64_t r = bn_is_eq_mask(ty, rp);
 1396|    137|        uint64_t r0 = r;
 1397|    137|        bool r1 = r0 == 0xFFFFFFFFFFFFFFFFULL;
 1398|    137|        res = r1;
 1399|    137|    }
 1400|    142|    if (res) {
  ------------------
  |  Branch (1400:9): [True: 93, False: 49]
  ------------------
 1401|     93|        uint64_t *px = p_aff;
 1402|     93|        uint64_t *py = p_aff + 6U;
 1403|     93|        uint64_t *rx = point_jac;
 1404|     93|        uint64_t *ry = point_jac + 6U;
 1405|     93|        uint64_t *rz = point_jac + 12U;
 1406|     93|        to_mont(rx, px);
 1407|     93|        to_mont(ry, py);
 1408|     93|        p384_make_fone(rz);
 1409|     93|    }
 1410|    142|    bool res1 = res;
 1411|    142|    return res1;
 1412|    142|}
Hacl_P384_validate_private_key:
 1426|     54|{
 1427|     54|    uint64_t bn_sk[6U] = { 0U };
 1428|     54|    bn_from_bytes_be(bn_sk, private_key);
 1429|     54|    uint64_t tmp[6U] = { 0U };
 1430|     54|    p384_make_order(tmp);
 1431|     54|    uint64_t c = bn_sub(tmp, bn_sk, tmp);
 1432|     54|    uint64_t is_lt_order = FStar_UInt64_gte_mask(c, 0ULL) & ~FStar_UInt64_eq_mask(c, 0ULL);
 1433|     54|    uint64_t bn_zero[6U] = { 0U };
 1434|     54|    uint64_t res = bn_is_eq_mask(bn_sk, bn_zero);
 1435|     54|    uint64_t is_eq_zero = res;
 1436|     54|    uint64_t res0 = is_lt_order & ~is_eq_zero;
 1437|     54|    return res0 == 0xFFFFFFFFFFFFFFFFULL;
 1438|     54|}
Hacl_P384_dh_initiator:
 1594|     54|{
 1595|     54|    uint64_t tmp[24U] = { 0U };
 1596|     54|    uint64_t *sk = tmp;
 1597|     54|    uint64_t *pk = tmp + 6U;
 1598|     54|    uint64_t is_sk_valid = load_qelem_conditional(sk, private_key);
 1599|     54|    point_mul_g(pk, sk);
 1600|     54|    uint64_t aff_p[12U] = { 0U };
 1601|     54|    uint64_t zinv[6U] = { 0U };
 1602|     54|    uint64_t *px = pk;
 1603|     54|    uint64_t *py0 = pk + 6U;
 1604|     54|    uint64_t *pz = pk + 12U;
 1605|     54|    uint64_t *x = aff_p;
 1606|     54|    uint64_t *y = aff_p + 6U;
 1607|     54|    p384_finv(zinv, pz);
 1608|     54|    fmul0(x, px, zinv);
 1609|     54|    fmul0(y, py0, zinv);
 1610|     54|    from_mont(x, x);
 1611|     54|    from_mont(y, y);
 1612|     54|    uint64_t *px0 = aff_p;
 1613|     54|    uint64_t *py = aff_p + 6U;
 1614|     54|    bn_to_bytes_be(public_key, px0);
 1615|     54|    bn_to_bytes_be(public_key + 48U, py);
 1616|     54|    return is_sk_valid == 0xFFFFFFFFFFFFFFFFULL;
 1617|     54|}
Hacl_P384_dh_responder:
 1633|      4|{
 1634|      4|    uint64_t tmp[192U] = { 0U };
 1635|      4|    uint64_t *sk = tmp;
 1636|      4|    uint64_t *pk = tmp + 6U;
 1637|      4|    uint64_t p_aff[12U] = { 0U };
 1638|      4|    uint8_t *p_x = their_pubkey;
 1639|      4|    uint8_t *p_y = their_pubkey + 48U;
 1640|      4|    uint64_t *bn_p_x = p_aff;
 1641|      4|    uint64_t *bn_p_y = p_aff + 6U;
 1642|      4|    bn_from_bytes_be(bn_p_x, p_x);
 1643|      4|    bn_from_bytes_be(bn_p_y, p_y);
 1644|      4|    uint64_t *px0 = p_aff;
 1645|      4|    uint64_t *py0 = p_aff + 6U;
 1646|      4|    uint64_t lessX = bn_is_lt_prime_mask(px0);
 1647|      4|    uint64_t lessY = bn_is_lt_prime_mask(py0);
 1648|      4|    uint64_t res0 = lessX & lessY;
 1649|      4|    bool is_xy_valid = res0 == 0xFFFFFFFFFFFFFFFFULL;
 1650|      4|    bool res;
 1651|      4|    if (!is_xy_valid) {
  ------------------
  |  Branch (1651:9): [True: 0, False: 4]
  ------------------
 1652|      0|        res = false;
 1653|      4|    } else {
 1654|      4|        uint64_t rp[6U] = { 0U };
 1655|      4|        uint64_t tx[6U] = { 0U };
 1656|      4|        uint64_t ty[6U] = { 0U };
 1657|      4|        uint64_t *px = p_aff;
 1658|      4|        uint64_t *py = p_aff + 6U;
 1659|      4|        to_mont(tx, px);
 1660|      4|        to_mont(ty, py);
 1661|      4|        uint64_t tmp1[6U] = { 0U };
 1662|      4|        fsqr0(rp, tx);
 1663|      4|        fmul0(rp, rp, tx);
 1664|      4|        p384_make_a_coeff(tmp1);
 1665|      4|        fmul0(tmp1, tmp1, tx);
 1666|      4|        fadd0(rp, tmp1, rp);
 1667|      4|        p384_make_b_coeff(tmp1);
 1668|      4|        fadd0(rp, tmp1, rp);
 1669|      4|        fsqr0(ty, ty);
 1670|      4|        uint64_t r = bn_is_eq_mask(ty, rp);
 1671|      4|        uint64_t r0 = r;
 1672|      4|        bool r1 = r0 == 0xFFFFFFFFFFFFFFFFULL;
 1673|      4|        res = r1;
 1674|      4|    }
 1675|      4|    if (res) {
  ------------------
  |  Branch (1675:9): [True: 4, False: 0]
  ------------------
 1676|      4|        uint64_t *px = p_aff;
 1677|      4|        uint64_t *py = p_aff + 6U;
 1678|      4|        uint64_t *rx = pk;
 1679|      4|        uint64_t *ry = pk + 6U;
 1680|      4|        uint64_t *rz = pk + 12U;
 1681|      4|        to_mont(rx, px);
 1682|      4|        to_mont(ry, py);
 1683|      4|        p384_make_fone(rz);
 1684|      4|    }
 1685|      4|    bool is_pk_valid = res;
 1686|      4|    uint64_t is_sk_valid = load_qelem_conditional(sk, private_key);
 1687|      4|    uint64_t ss_proj[18U] = { 0U };
 1688|      4|    if (is_pk_valid) {
  ------------------
  |  Branch (1688:9): [True: 4, False: 0]
  ------------------
 1689|      4|        point_mul(ss_proj, sk, pk);
 1690|      4|        uint64_t aff_p[12U] = { 0U };
 1691|      4|        uint64_t zinv[6U] = { 0U };
 1692|      4|        uint64_t *px = ss_proj;
 1693|      4|        uint64_t *py1 = ss_proj + 6U;
 1694|      4|        uint64_t *pz = ss_proj + 12U;
 1695|      4|        uint64_t *x = aff_p;
 1696|      4|        uint64_t *y = aff_p + 6U;
 1697|      4|        p384_finv(zinv, pz);
 1698|      4|        fmul0(x, px, zinv);
 1699|      4|        fmul0(y, py1, zinv);
 1700|      4|        from_mont(x, x);
 1701|      4|        from_mont(y, y);
 1702|      4|        uint64_t *px1 = aff_p;
 1703|      4|        uint64_t *py = aff_p + 6U;
 1704|      4|        bn_to_bytes_be(shared_secret, px1);
 1705|      4|        bn_to_bytes_be(shared_secret + 48U, py);
 1706|      4|    }
 1707|      4|    return is_sk_valid == 0xFFFFFFFFFFFFFFFFULL && is_pk_valid;
  ------------------
  |  Branch (1707:12): [True: 4, False: 0]
  |  Branch (1707:52): [True: 4, False: 0]
  ------------------
 1708|      4|}
Hacl_P384.c:bn_from_bytes_be:
  327|    569|{
  328|    569|    KRML_MAYBE_FOR6(i,
  ------------------
  |  |  342|    569|#define KRML_MAYBE_FOR6(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 6, k, x)
  |  |  ------------------
  |  |  |  |  288|    569|    do {                               \
  |  |  |  |  289|    569|        uint32_t i = z;                \
  |  |  |  |  290|    569|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|    569|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  329|    569|                    0U,
  330|    569|                    6U,
  331|    569|                    1U,
  332|    569|                    uint64_t *os = a;
  333|    569|                    uint64_t u = load64_be(b + (6U - i - 1U) * 8U);
  334|    569|                    uint64_t x = u;
  335|    569|                    os[i] = x;);
  336|    569|}
Hacl_P384.c:qmod_short:
  772|     65|{
  773|     65|    uint64_t tmp[6U] = { 0U };
  774|     65|    p384_make_order(tmp);
  775|     65|    uint64_t c = bn_sub(tmp, b, tmp);
  776|     65|    bn_cmovznz(a, c, tmp, b);
  777|     65|}
Hacl_P384.c:bn_cmovznz:
   46|     65|{
   47|     65|    uint64_t mask = ~FStar_UInt64_eq_mask(b, 0ULL);
   48|     65|    KRML_MAYBE_FOR6(i,
  ------------------
  |  |  342|     65|#define KRML_MAYBE_FOR6(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 6, k, x)
  |  |  ------------------
  |  |  |  |  288|     65|    do {                               \
  |  |  |  |  289|     65|        uint32_t i = z;                \
  |  |  |  |  290|     65|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     65|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   49|     65|                    0U,
   50|     65|                    6U,
   51|     65|                    1U,
   52|     65|                    uint64_t *os = a;
   53|     65|                    uint64_t uu____0 = c[i];
   54|     65|                    uint64_t x = uu____0 ^ (mask & (d[i] ^ uu____0));
   55|     65|                    os[i] = x;);
   56|     65|}
Hacl_P384.c:p384_qinv:
  867|     32|{
  868|     32|    uint64_t b[6U] = { 0U };
  869|     32|    b[0U] = 0xecec196accc52971ULL;
  870|     32|    b[1U] = 0x581a0db248b0a77aULL;
  871|     32|    b[2U] = 0xc7634d81f4372ddfULL;
  872|     32|    b[3U] = 0xffffffffffffffffULL;
  873|     32|    b[4U] = 0xffffffffffffffffULL;
  874|     32|    b[5U] = 0xffffffffffffffffULL;
  875|     32|    qexp_consttime(res, a, b);
  876|     32|}
Hacl_P384.c:qexp_consttime:
  813|     32|{
  814|     32|    uint64_t table[192U] = { 0U };
  815|     32|    uint64_t tmp[6U] = { 0U };
  816|     32|    uint64_t *t0 = table;
  817|     32|    uint64_t *t1 = table + 6U;
  818|     32|    p384_make_qone(t0);
  819|     32|    memcpy(t1, a, 6U * sizeof(uint64_t));
  820|     32|    KRML_MAYBE_FOR15(i,
  ------------------
  |  |  396|     32|#define KRML_MAYBE_FOR15(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 15, k, x)
  |  |  ------------------
  |  |  |  |  288|     32|    do {                               \
  |  |  |  |  289|     32|        uint32_t i = z;                \
  |  |  |  |  290|     32|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     32|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  821|     32|                     0U,
  822|     32|                     15U,
  823|     32|                     1U,
  824|     32|                     uint64_t *t11 = table + (i + 1U) * 6U;
  825|     32|                     qsqr(tmp, t11);
  826|     32|                     memcpy(table + (2U * i + 2U) * 6U, tmp, 6U * sizeof(uint64_t));
  827|     32|                     uint64_t *t2 = table + (2U * i + 2U) * 6U;
  828|     32|                     qmul(tmp, a, t2);
  829|     32|                     memcpy(table + (2U * i + 3U) * 6U, tmp, 6U * sizeof(uint64_t)););
  830|     32|    uint32_t i0 = 380U;
  831|     32|    uint64_t bits_c = Hacl_Bignum_Lib_bn_get_bits_u64(6U, b, i0, 5U);
  832|     32|    memcpy(out, (uint64_t *)table, 6U * sizeof(uint64_t));
  833|  1.02k|    for (uint32_t i1 = 0U; i1 < 31U; i1++) {
  ------------------
  |  Branch (833:28): [True: 992, False: 32]
  ------------------
  834|    992|        uint64_t c = FStar_UInt64_eq_mask(bits_c, (uint64_t)(i1 + 1U));
  835|    992|        const uint64_t *res_j = table + (i1 + 1U) * 6U;
  836|    992|        KRML_MAYBE_FOR6(i,
  ------------------
  |  |  342|    992|#define KRML_MAYBE_FOR6(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 6, k, x)
  |  |  ------------------
  |  |  |  |  288|    992|    do {                               \
  |  |  |  |  289|    992|        uint32_t i = z;                \
  |  |  |  |  290|    992|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|    992|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  837|    992|                        0U,
  838|    992|                        6U,
  839|    992|                        1U,
  840|    992|                        uint64_t *os = out;
  841|    992|                        uint64_t x = (c & res_j[i]) | (~c & out[i]);
  842|    992|                        os[i] = x;);
  843|    992|    }
  844|     32|    uint64_t tmp0[6U] = { 0U };
  845|  2.46k|    for (uint32_t i1 = 0U; i1 < 76U; i1++) {
  ------------------
  |  Branch (845:28): [True: 2.43k, False: 32]
  ------------------
  846|  2.43k|        KRML_MAYBE_FOR5(i, 0U, 5U, 1U, qsqr(out, out););
  ------------------
  |  |  336|  2.43k|#define KRML_MAYBE_FOR5(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 5, k, x)
  |  |  ------------------
  |  |  |  |  288|  2.43k|    do {                               \
  |  |  |  |  289|  2.43k|        uint32_t i = z;                \
  |  |  |  |  290|  2.43k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  2.43k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  847|  2.43k|        uint32_t k = 380U - 5U * i1 - 5U;
  848|  2.43k|        uint64_t bits_l = Hacl_Bignum_Lib_bn_get_bits_u64(6U, b, k, 5U);
  849|  2.43k|        memcpy(tmp0, (uint64_t *)table, 6U * sizeof(uint64_t));
  850|  77.8k|        for (uint32_t i2 = 0U; i2 < 31U; i2++) {
  ------------------
  |  Branch (850:32): [True: 75.3k, False: 2.43k]
  ------------------
  851|  75.3k|            uint64_t c = FStar_UInt64_eq_mask(bits_l, (uint64_t)(i2 + 1U));
  852|  75.3k|            const uint64_t *res_j = table + (i2 + 1U) * 6U;
  853|  75.3k|            KRML_MAYBE_FOR6(i,
  ------------------
  |  |  342|  75.3k|#define KRML_MAYBE_FOR6(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 6, k, x)
  |  |  ------------------
  |  |  |  |  288|  75.3k|    do {                               \
  |  |  |  |  289|  75.3k|        uint32_t i = z;                \
  |  |  |  |  290|  75.3k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  75.3k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  854|  75.3k|                            0U,
  855|  75.3k|                            6U,
  856|  75.3k|                            1U,
  857|  75.3k|                            uint64_t *os = tmp0;
  858|  75.3k|                            uint64_t x = (c & res_j[i]) | (~c & tmp0[i]);
  859|  75.3k|                            os[i] = x;);
  860|  75.3k|        }
  861|  2.43k|        qmul(out, out, tmp0);
  862|  2.43k|    }
  863|     32|}
Hacl_P384.c:p384_make_qone:
  435|     32|{
  436|     32|    f[0U] = 0x1313e695333ad68dULL;
  437|     32|    f[1U] = 0xa7e5f24db74f5885ULL;
  438|     32|    f[2U] = 0x389cb27e0bc8d220ULL;
  439|     32|    f[3U] = 0x0ULL;
  440|     32|    f[4U] = 0x0ULL;
  441|     32|    f[5U] = 0x0ULL;
  442|     32|}
Hacl_P384.c:qsqr:
  797|  12.6k|{
  798|  12.6k|    uint64_t tmp[12U] = { 0U };
  799|  12.6k|    bn_sqr(tmp, b);
  800|  12.6k|    qmont_reduction(a, tmp);
  801|  12.6k|}
Hacl_P384.c:bn_sqr:
  271|   191k|{
  272|   191k|    memset(a, 0U, 12U * sizeof(uint64_t));
  273|   191k|    KRML_MAYBE_FOR6(
  ------------------
  |  |  342|   191k|#define KRML_MAYBE_FOR6(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 6, k, x)
  |  |  ------------------
  |  |  |  |  288|   191k|    do {                               \
  |  |  |  |  289|   191k|        uint32_t i = z;                \
  |  |  |  |  290|   191k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|   191k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  274|   191k|        i0,
  275|   191k|        0U,
  276|   191k|        6U,
  277|   191k|        1U,
  278|   191k|        uint64_t *ab = b;
  279|   191k|        uint64_t a_j = b[i0];
  280|   191k|        uint64_t *res_j = a + i0;
  281|   191k|        uint64_t c = 0ULL;
  282|   191k|        for (uint32_t i = 0U; i < i0 / 4U; i++) {
  283|   191k|            uint64_t a_i = ab[4U * i];
  284|   191k|            uint64_t *res_i0 = res_j + 4U * i;
  285|   191k|            c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i, a_j, c, res_i0);
  286|   191k|            uint64_t a_i0 = ab[4U * i + 1U];
  287|   191k|            uint64_t *res_i1 = res_j + 4U * i + 1U;
  288|   191k|            c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i0, a_j, c, res_i1);
  289|   191k|            uint64_t a_i1 = ab[4U * i + 2U];
  290|   191k|            uint64_t *res_i2 = res_j + 4U * i + 2U;
  291|   191k|            c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i1, a_j, c, res_i2);
  292|   191k|            uint64_t a_i2 = ab[4U * i + 3U];
  293|   191k|            uint64_t *res_i = res_j + 4U * i + 3U;
  294|   191k|            c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i2, a_j, c, res_i);
  295|   191k|        } for (uint32_t i = i0 / 4U * 4U; i < i0; i++) {
  296|   191k|            uint64_t a_i = ab[i];
  297|   191k|            uint64_t *res_i = res_j + i;
  298|   191k|            c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i, a_j, c, res_i);
  299|   191k|        } uint64_t r = c;
  300|   191k|        a[i0 + i0] = r;);
  301|   191k|    uint64_t c0 = Hacl_Bignum_Addition_bn_add_eq_len_u64(12U, a, a, a);
  302|   191k|    KRML_MAYBE_UNUSED_VAR(c0);
  ------------------
  |  |   60|   191k|#define KRML_MAYBE_UNUSED_VAR(x) KRML_HOST_IGNORE(x)
  |  |  ------------------
  |  |  |  |   56|   191k|#define KRML_HOST_IGNORE(x) (void)(x)
  |  |  ------------------
  ------------------
  303|   191k|    uint64_t tmp[12U] = { 0U };
  304|   191k|    KRML_MAYBE_FOR6(i,
  ------------------
  |  |  342|   191k|#define KRML_MAYBE_FOR6(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 6, k, x)
  |  |  ------------------
  |  |  |  |  288|   191k|    do {                               \
  |  |  |  |  289|   191k|        uint32_t i = z;                \
  |  |  |  |  290|   191k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|   191k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  305|   191k|                    0U,
  306|   191k|                    6U,
  307|   191k|                    1U,
  308|   191k|                    FStar_UInt128_uint128 res = FStar_UInt128_mul_wide(b[i], b[i]);
  309|   191k|                    uint64_t hi = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(res, 64U));
  310|   191k|                    uint64_t lo = FStar_UInt128_uint128_to_uint64(res);
  311|   191k|                    tmp[2U * i] = lo;
  312|   191k|                    tmp[2U * i + 1U] = hi;);
  313|   191k|    uint64_t c1 = Hacl_Bignum_Addition_bn_add_eq_len_u64(12U, a, tmp, a);
  314|   191k|    KRML_MAYBE_UNUSED_VAR(c1);
  ------------------
  |  |   60|   191k|#define KRML_MAYBE_UNUSED_VAR(x) KRML_HOST_IGNORE(x)
  |  |  ------------------
  |  |  |  |   56|   191k|#define KRML_HOST_IGNORE(x) (void)(x)
  |  |  ------------------
  ------------------
  315|   191k|}
Hacl_P384.c:qmont_reduction:
  526|  15.6k|{
  527|  15.6k|    uint64_t n[6U] = { 0U };
  528|  15.6k|    p384_make_order(n);
  529|  15.6k|    uint64_t c0 = 0ULL;
  530|  15.6k|    KRML_MAYBE_FOR6(
  ------------------
  |  |  342|  15.6k|#define KRML_MAYBE_FOR6(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 6, k, x)
  |  |  ------------------
  |  |  |  |  288|  15.6k|    do {                               \
  |  |  |  |  289|  15.6k|        uint32_t i = z;                \
  |  |  |  |  290|  15.6k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  15.6k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  531|  15.6k|        i0,
  532|  15.6k|        0U,
  533|  15.6k|        6U,
  534|  15.6k|        1U,
  535|  15.6k|        uint64_t qj = 7986114184663260229ULL * x[i0];
  536|  15.6k|        uint64_t *res_j0 = x + i0;
  537|  15.6k|        uint64_t c = 0ULL;
  538|  15.6k|        {
  539|  15.6k|            uint64_t a_i = n[4U * 0U];
  540|  15.6k|            uint64_t *res_i0 = res_j0 + 4U * 0U;
  541|  15.6k|            c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i, qj, c, res_i0);
  542|  15.6k|            uint64_t a_i0 = n[4U * 0U + 1U];
  543|  15.6k|            uint64_t *res_i1 = res_j0 + 4U * 0U + 1U;
  544|  15.6k|            c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i0, qj, c, res_i1);
  545|  15.6k|            uint64_t a_i1 = n[4U * 0U + 2U];
  546|  15.6k|            uint64_t *res_i2 = res_j0 + 4U * 0U + 2U;
  547|  15.6k|            c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i1, qj, c, res_i2);
  548|  15.6k|            uint64_t a_i2 = n[4U * 0U + 3U];
  549|  15.6k|            uint64_t *res_i = res_j0 + 4U * 0U + 3U;
  550|  15.6k|            c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i2, qj, c, res_i);
  551|  15.6k|        } KRML_MAYBE_FOR2(i,
  552|  15.6k|                          4U,
  553|  15.6k|                          6U,
  554|  15.6k|                          1U,
  555|  15.6k|                          uint64_t a_i = n[i];
  556|  15.6k|                          uint64_t *res_i = res_j0 + i;
  557|  15.6k|                          c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i, qj, c, res_i););
  558|  15.6k|        uint64_t r = c;
  559|  15.6k|        uint64_t c1 = r;
  560|  15.6k|        uint64_t *resb = x + 6U + i0;
  561|  15.6k|        uint64_t res_j = x[6U + i0];
  562|  15.6k|        c0 = Lib_IntTypes_Intrinsics_add_carry_u64(c0, c1, res_j, resb););
  563|  15.6k|    memcpy(res, x + 6U, 6U * sizeof(uint64_t));
  564|  15.6k|    uint64_t c00 = c0;
  565|  15.6k|    uint64_t tmp[6U] = { 0U };
  566|  15.6k|    uint64_t c = 0ULL;
  567|  15.6k|    {
  568|  15.6k|        uint64_t t1 = res[4U * 0U];
  569|  15.6k|        uint64_t t20 = n[4U * 0U];
  570|  15.6k|        uint64_t *res_i0 = tmp + 4U * 0U;
  571|  15.6k|        c = Lib_IntTypes_Intrinsics_sub_borrow_u64(c, t1, t20, res_i0);
  ------------------
  |  |   89|  15.6k|    (_subborrow_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  572|  15.6k|        uint64_t t10 = res[4U * 0U + 1U];
  573|  15.6k|        uint64_t t21 = n[4U * 0U + 1U];
  574|  15.6k|        uint64_t *res_i1 = tmp + 4U * 0U + 1U;
  575|  15.6k|        c = Lib_IntTypes_Intrinsics_sub_borrow_u64(c, t10, t21, res_i1);
  ------------------
  |  |   89|  15.6k|    (_subborrow_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  576|  15.6k|        uint64_t t11 = res[4U * 0U + 2U];
  577|  15.6k|        uint64_t t22 = n[4U * 0U + 2U];
  578|  15.6k|        uint64_t *res_i2 = tmp + 4U * 0U + 2U;
  579|  15.6k|        c = Lib_IntTypes_Intrinsics_sub_borrow_u64(c, t11, t22, res_i2);
  ------------------
  |  |   89|  15.6k|    (_subborrow_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  580|  15.6k|        uint64_t t12 = res[4U * 0U + 3U];
  581|  15.6k|        uint64_t t2 = n[4U * 0U + 3U];
  582|  15.6k|        uint64_t *res_i = tmp + 4U * 0U + 3U;
  583|  15.6k|        c = Lib_IntTypes_Intrinsics_sub_borrow_u64(c, t12, t2, res_i);
  ------------------
  |  |   89|  15.6k|    (_subborrow_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  584|  15.6k|    }
  585|  15.6k|    KRML_MAYBE_FOR2(i,
  ------------------
  |  |  318|  15.6k|#define KRML_MAYBE_FOR2(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 2, k, x)
  |  |  ------------------
  |  |  |  |  288|  15.6k|    do {                               \
  |  |  |  |  289|  15.6k|        uint32_t i = z;                \
  |  |  |  |  290|  15.6k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  15.6k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  586|  15.6k|                    4U,
  587|  15.6k|                    6U,
  588|  15.6k|                    1U,
  589|  15.6k|                    uint64_t t1 = res[i];
  590|  15.6k|                    uint64_t t2 = n[i];
  591|  15.6k|                    uint64_t *res_i = tmp + i;
  592|  15.6k|                    c = Lib_IntTypes_Intrinsics_sub_borrow_u64(c, t1, t2, res_i););
  593|  15.6k|    uint64_t c1 = c;
  594|  15.6k|    uint64_t c2 = c00 - c1;
  595|  15.6k|    KRML_MAYBE_FOR6(i,
  ------------------
  |  |  342|  15.6k|#define KRML_MAYBE_FOR6(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 6, k, x)
  |  |  ------------------
  |  |  |  |  288|  15.6k|    do {                               \
  |  |  |  |  289|  15.6k|        uint32_t i = z;                \
  |  |  |  |  290|  15.6k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  15.6k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  596|  15.6k|                    0U,
  597|  15.6k|                    6U,
  598|  15.6k|                    1U,
  599|  15.6k|                    uint64_t *os = res;
  600|  15.6k|                    uint64_t x1 = (c2 & res[i]) | (~c2 & tmp[i]);
  601|  15.6k|                    os[i] = x1;);
  602|  15.6k|}
Hacl_P384.c:qmul:
  789|  2.97k|{
  790|  2.97k|    uint64_t tmp[12U] = { 0U };
  791|  2.97k|    bn_mul(tmp, b, c);
  792|  2.97k|    qmont_reduction(a, tmp);
  793|  2.97k|}
Hacl_P384.c:bn_mul:
  235|   665k|{
  236|   665k|    memset(a, 0U, 12U * sizeof(uint64_t));
  237|   665k|    KRML_MAYBE_FOR6(
  ------------------
  |  |  342|   665k|#define KRML_MAYBE_FOR6(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 6, k, x)
  |  |  ------------------
  |  |  |  |  288|   665k|    do {                               \
  |  |  |  |  289|   665k|        uint32_t i = z;                \
  |  |  |  |  290|   665k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|   665k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  238|   665k|        i0,
  239|   665k|        0U,
  240|   665k|        6U,
  241|   665k|        1U,
  242|   665k|        uint64_t bj = c[i0];
  243|   665k|        uint64_t *res_j = a + i0;
  244|   665k|        uint64_t c1 = 0ULL;
  245|   665k|        {
  246|   665k|            uint64_t a_i = b[4U * 0U];
  247|   665k|            uint64_t *res_i0 = res_j + 4U * 0U;
  248|   665k|            c1 = Hacl_Bignum_Base_mul_wide_add2_u64(a_i, bj, c1, res_i0);
  249|   665k|            uint64_t a_i0 = b[4U * 0U + 1U];
  250|   665k|            uint64_t *res_i1 = res_j + 4U * 0U + 1U;
  251|   665k|            c1 = Hacl_Bignum_Base_mul_wide_add2_u64(a_i0, bj, c1, res_i1);
  252|   665k|            uint64_t a_i1 = b[4U * 0U + 2U];
  253|   665k|            uint64_t *res_i2 = res_j + 4U * 0U + 2U;
  254|   665k|            c1 = Hacl_Bignum_Base_mul_wide_add2_u64(a_i1, bj, c1, res_i2);
  255|   665k|            uint64_t a_i2 = b[4U * 0U + 3U];
  256|   665k|            uint64_t *res_i = res_j + 4U * 0U + 3U;
  257|   665k|            c1 = Hacl_Bignum_Base_mul_wide_add2_u64(a_i2, bj, c1, res_i);
  258|   665k|        } KRML_MAYBE_FOR2(i,
  259|   665k|                          4U,
  260|   665k|                          6U,
  261|   665k|                          1U,
  262|   665k|                          uint64_t a_i = b[i];
  263|   665k|                          uint64_t *res_i = res_j + i;
  264|   665k|                          c1 = Hacl_Bignum_Base_mul_wide_add2_u64(a_i, bj, c1, res_i););
  265|   665k|        uint64_t r = c1;
  266|   665k|        a[6U + i0] = r;);
  267|   665k|}
Hacl_P384.c:from_qmont:
  805|     64|{
  806|     64|    uint64_t tmp[12U] = { 0U };
  807|     64|    memcpy(tmp, b, 6U * sizeof(uint64_t));
  808|     64|    qmont_reduction(a, tmp);
  809|     64|}
Hacl_P384.c:bn_add_mod:
   60|   967k|{
   61|   967k|    uint64_t c10 = 0ULL;
   62|   967k|    {
   63|   967k|        uint64_t t1 = c[4U * 0U];
   64|   967k|        uint64_t t20 = d[4U * 0U];
   65|   967k|        uint64_t *res_i0 = a + 4U * 0U;
   66|   967k|        c10 = Lib_IntTypes_Intrinsics_add_carry_u64(c10, t1, t20, res_i0);
  ------------------
  |  |   66|   967k|    (_addcarry_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
   67|   967k|        uint64_t t10 = c[4U * 0U + 1U];
   68|   967k|        uint64_t t21 = d[4U * 0U + 1U];
   69|   967k|        uint64_t *res_i1 = a + 4U * 0U + 1U;
   70|   967k|        c10 = Lib_IntTypes_Intrinsics_add_carry_u64(c10, t10, t21, res_i1);
  ------------------
  |  |   66|   967k|    (_addcarry_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
   71|   967k|        uint64_t t11 = c[4U * 0U + 2U];
   72|   967k|        uint64_t t22 = d[4U * 0U + 2U];
   73|   967k|        uint64_t *res_i2 = a + 4U * 0U + 2U;
   74|   967k|        c10 = Lib_IntTypes_Intrinsics_add_carry_u64(c10, t11, t22, res_i2);
  ------------------
  |  |   66|   967k|    (_addcarry_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
   75|   967k|        uint64_t t12 = c[4U * 0U + 3U];
   76|   967k|        uint64_t t2 = d[4U * 0U + 3U];
   77|   967k|        uint64_t *res_i = a + 4U * 0U + 3U;
   78|   967k|        c10 = Lib_IntTypes_Intrinsics_add_carry_u64(c10, t12, t2, res_i);
  ------------------
  |  |   66|   967k|    (_addcarry_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
   79|   967k|    }
   80|   967k|    KRML_MAYBE_FOR2(i,
  ------------------
  |  |  318|   967k|#define KRML_MAYBE_FOR2(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 2, k, x)
  |  |  ------------------
  |  |  |  |  288|   967k|    do {                               \
  |  |  |  |  289|   967k|        uint32_t i = z;                \
  |  |  |  |  290|   967k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|   967k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   81|   967k|                    4U,
   82|   967k|                    6U,
   83|   967k|                    1U,
   84|   967k|                    uint64_t t1 = c[i];
   85|   967k|                    uint64_t t2 = d[i];
   86|   967k|                    uint64_t *res_i = a + i;
   87|   967k|                    c10 = Lib_IntTypes_Intrinsics_add_carry_u64(c10, t1, t2, res_i););
   88|   967k|    uint64_t c0 = c10;
   89|   967k|    uint64_t tmp[6U] = { 0U };
   90|   967k|    uint64_t c1 = 0ULL;
   91|   967k|    {
   92|   967k|        uint64_t t1 = a[4U * 0U];
   93|   967k|        uint64_t t20 = b[4U * 0U];
   94|   967k|        uint64_t *res_i0 = tmp + 4U * 0U;
   95|   967k|        c1 = Lib_IntTypes_Intrinsics_sub_borrow_u64(c1, t1, t20, res_i0);
  ------------------
  |  |   89|   967k|    (_subborrow_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
   96|   967k|        uint64_t t10 = a[4U * 0U + 1U];
   97|   967k|        uint64_t t21 = b[4U * 0U + 1U];
   98|   967k|        uint64_t *res_i1 = tmp + 4U * 0U + 1U;
   99|   967k|        c1 = Lib_IntTypes_Intrinsics_sub_borrow_u64(c1, t10, t21, res_i1);
  ------------------
  |  |   89|   967k|    (_subborrow_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  100|   967k|        uint64_t t11 = a[4U * 0U + 2U];
  101|   967k|        uint64_t t22 = b[4U * 0U + 2U];
  102|   967k|        uint64_t *res_i2 = tmp + 4U * 0U + 2U;
  103|   967k|        c1 = Lib_IntTypes_Intrinsics_sub_borrow_u64(c1, t11, t22, res_i2);
  ------------------
  |  |   89|   967k|    (_subborrow_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  104|   967k|        uint64_t t12 = a[4U * 0U + 3U];
  105|   967k|        uint64_t t2 = b[4U * 0U + 3U];
  106|   967k|        uint64_t *res_i = tmp + 4U * 0U + 3U;
  107|   967k|        c1 = Lib_IntTypes_Intrinsics_sub_borrow_u64(c1, t12, t2, res_i);
  ------------------
  |  |   89|   967k|    (_subborrow_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  108|   967k|    }
  109|   967k|    KRML_MAYBE_FOR2(i,
  ------------------
  |  |  318|   967k|#define KRML_MAYBE_FOR2(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 2, k, x)
  |  |  ------------------
  |  |  |  |  288|   967k|    do {                               \
  |  |  |  |  289|   967k|        uint32_t i = z;                \
  |  |  |  |  290|   967k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|   967k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  110|   967k|                    4U,
  111|   967k|                    6U,
  112|   967k|                    1U,
  113|   967k|                    uint64_t t1 = a[i];
  114|   967k|                    uint64_t t2 = b[i];
  115|   967k|                    uint64_t *res_i = tmp + i;
  116|   967k|                    c1 = Lib_IntTypes_Intrinsics_sub_borrow_u64(c1, t1, t2, res_i););
  117|   967k|    uint64_t c11 = c1;
  118|   967k|    uint64_t c2 = c0 - c11;
  119|   967k|    KRML_MAYBE_FOR6(i,
  ------------------
  |  |  342|   967k|#define KRML_MAYBE_FOR6(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 6, k, x)
  |  |  ------------------
  |  |  |  |  288|   967k|    do {                               \
  |  |  |  |  289|   967k|        uint32_t i = z;                \
  |  |  |  |  290|   967k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|   967k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  120|   967k|                    0U,
  121|   967k|                    6U,
  122|   967k|                    1U,
  123|   967k|                    uint64_t *os = a;
  124|   967k|                    uint64_t x = (c2 & a[i]) | (~c2 & tmp[i]);
  125|   967k|                    os[i] = x;);
  126|   967k|}
Hacl_P384.c:ecdsa_verify_msg_as_qelem:
 1138|     33|{
 1139|     33|    uint64_t tmp[42U] = { 0U };
 1140|     33|    uint64_t *pk = tmp;
 1141|     33|    uint64_t *r_q = tmp + 18U;
 1142|     33|    uint64_t *s_q = tmp + 24U;
 1143|     33|    uint64_t *u1 = tmp + 30U;
 1144|     33|    uint64_t *u2 = tmp + 36U;
 1145|     33|    uint64_t p_aff[12U] = { 0U };
 1146|     33|    uint8_t *p_x = public_key;
 1147|     33|    uint8_t *p_y = public_key + 48U;
 1148|     33|    uint64_t *bn_p_x = p_aff;
 1149|     33|    uint64_t *bn_p_y = p_aff + 6U;
 1150|     33|    bn_from_bytes_be(bn_p_x, p_x);
 1151|     33|    bn_from_bytes_be(bn_p_y, p_y);
 1152|     33|    uint64_t *px0 = p_aff;
 1153|     33|    uint64_t *py0 = p_aff + 6U;
 1154|     33|    uint64_t lessX = bn_is_lt_prime_mask(px0);
 1155|     33|    uint64_t lessY = bn_is_lt_prime_mask(py0);
 1156|     33|    uint64_t res0 = lessX & lessY;
 1157|     33|    bool is_xy_valid = res0 == 0xFFFFFFFFFFFFFFFFULL;
 1158|     33|    bool res;
 1159|     33|    if (!is_xy_valid) {
  ------------------
  |  Branch (1159:9): [True: 0, False: 33]
  ------------------
 1160|      0|        res = false;
 1161|     33|    } else {
 1162|     33|        uint64_t rp[6U] = { 0U };
 1163|     33|        uint64_t tx[6U] = { 0U };
 1164|     33|        uint64_t ty[6U] = { 0U };
 1165|     33|        uint64_t *px = p_aff;
 1166|     33|        uint64_t *py = p_aff + 6U;
 1167|     33|        to_mont(tx, px);
 1168|     33|        to_mont(ty, py);
 1169|     33|        uint64_t tmp1[6U] = { 0U };
 1170|     33|        fsqr0(rp, tx);
 1171|     33|        fmul0(rp, rp, tx);
 1172|     33|        p384_make_a_coeff(tmp1);
 1173|     33|        fmul0(tmp1, tmp1, tx);
 1174|     33|        fadd0(rp, tmp1, rp);
 1175|     33|        p384_make_b_coeff(tmp1);
 1176|     33|        fadd0(rp, tmp1, rp);
 1177|     33|        fsqr0(ty, ty);
 1178|     33|        uint64_t r = bn_is_eq_mask(ty, rp);
 1179|     33|        uint64_t r0 = r;
 1180|     33|        bool r1 = r0 == 0xFFFFFFFFFFFFFFFFULL;
 1181|     33|        res = r1;
 1182|     33|    }
 1183|     33|    if (res) {
  ------------------
  |  Branch (1183:9): [True: 33, False: 0]
  ------------------
 1184|     33|        uint64_t *px = p_aff;
 1185|     33|        uint64_t *py = p_aff + 6U;
 1186|     33|        uint64_t *rx = pk;
 1187|     33|        uint64_t *ry = pk + 6U;
 1188|     33|        uint64_t *rz = pk + 12U;
 1189|     33|        to_mont(rx, px);
 1190|     33|        to_mont(ry, py);
 1191|     33|        p384_make_fone(rz);
 1192|     33|    }
 1193|     33|    bool is_pk_valid = res;
 1194|     33|    bn_from_bytes_be(r_q, signature_r);
 1195|     33|    bn_from_bytes_be(s_q, signature_s);
 1196|     33|    uint64_t tmp10[6U] = { 0U };
 1197|     33|    p384_make_order(tmp10);
 1198|     33|    uint64_t c = bn_sub(tmp10, r_q, tmp10);
 1199|     33|    uint64_t is_lt_order = FStar_UInt64_gte_mask(c, 0ULL) & ~FStar_UInt64_eq_mask(c, 0ULL);
 1200|     33|    uint64_t bn_zero0[6U] = { 0U };
 1201|     33|    uint64_t res1 = bn_is_eq_mask(r_q, bn_zero0);
 1202|     33|    uint64_t is_eq_zero = res1;
 1203|     33|    uint64_t is_r_valid = is_lt_order & ~is_eq_zero;
 1204|     33|    uint64_t tmp11[6U] = { 0U };
 1205|     33|    p384_make_order(tmp11);
 1206|     33|    uint64_t c0 = bn_sub(tmp11, s_q, tmp11);
 1207|     33|    uint64_t is_lt_order0 = FStar_UInt64_gte_mask(c0, 0ULL) & ~FStar_UInt64_eq_mask(c0, 0ULL);
 1208|     33|    uint64_t bn_zero1[6U] = { 0U };
 1209|     33|    uint64_t res2 = bn_is_eq_mask(s_q, bn_zero1);
 1210|     33|    uint64_t is_eq_zero0 = res2;
 1211|     33|    uint64_t is_s_valid = is_lt_order0 & ~is_eq_zero0;
 1212|     33|    bool is_rs_valid = is_r_valid == 0xFFFFFFFFFFFFFFFFULL && is_s_valid == 0xFFFFFFFFFFFFFFFFULL;
  ------------------
  |  Branch (1212:24): [True: 33, False: 0]
  |  Branch (1212:63): [True: 32, False: 1]
  ------------------
 1213|     33|    if (!(is_pk_valid && is_rs_valid)) {
  ------------------
  |  Branch (1213:11): [True: 33, False: 0]
  |  Branch (1213:26): [True: 32, False: 1]
  ------------------
 1214|      1|        return false;
 1215|      1|    }
 1216|     32|    uint64_t sinv[6U] = { 0U };
 1217|     32|    p384_qinv(sinv, s_q);
 1218|     32|    uint64_t tmp1[6U] = { 0U };
 1219|     32|    from_qmont(tmp1, m_q);
 1220|     32|    qmul(u1, sinv, tmp1);
 1221|     32|    uint64_t tmp12[6U] = { 0U };
 1222|     32|    from_qmont(tmp12, r_q);
 1223|     32|    qmul(u2, sinv, tmp12);
 1224|     32|    uint64_t res3[18U] = { 0U };
 1225|     32|    point_mul_double_g(res3, u1, u2, pk);
 1226|     32|    uint64_t *pz0 = res3 + 12U;
 1227|     32|    uint64_t bn_zero[6U] = { 0U };
 1228|     32|    uint64_t res10 = bn_is_eq_mask(pz0, bn_zero);
 1229|     32|    uint64_t m = res10;
 1230|     32|    if (m == 0xFFFFFFFFFFFFFFFFULL) {
  ------------------
  |  Branch (1230:9): [True: 0, False: 32]
  ------------------
 1231|      0|        return false;
 1232|      0|    }
 1233|     32|    uint64_t x[6U] = { 0U };
 1234|     32|    uint64_t zinv[6U] = { 0U };
 1235|     32|    uint64_t *px = res3;
 1236|     32|    uint64_t *pz = res3 + 12U;
 1237|     32|    p384_finv(zinv, pz);
 1238|     32|    fmul0(x, px, zinv);
 1239|     32|    from_mont(x, x);
 1240|     32|    qmod_short(x, x);
 1241|     32|    uint64_t m0 = bn_is_eq_mask(x, r_q);
 1242|     32|    bool res11 = m0 == 0xFFFFFFFFFFFFFFFFULL;
 1243|     32|    return res11;
 1244|     32|}
Hacl_P384.c:point_mul_double_g:
 1082|     32|{
 1083|     32|    uint64_t tmp[18U] = { 0U };
 1084|     32|    point_mul_g(tmp, scalar1);
 1085|     32|    point_mul(res, scalar2, p);
 1086|     32|    point_add(res, tmp, res);
 1087|     32|}
Hacl_P384.c:point_add:
  880|  12.5k|{
  881|  12.5k|    uint64_t tmp[54U] = { 0U };
  882|  12.5k|    uint64_t *t0 = tmp;
  883|  12.5k|    uint64_t *t1 = tmp + 36U;
  884|  12.5k|    uint64_t *x3 = t1;
  885|  12.5k|    uint64_t *y3 = t1 + 6U;
  886|  12.5k|    uint64_t *z3 = t1 + 12U;
  887|  12.5k|    uint64_t *t01 = t0;
  888|  12.5k|    uint64_t *t11 = t0 + 6U;
  889|  12.5k|    uint64_t *t2 = t0 + 12U;
  890|  12.5k|    uint64_t *t3 = t0 + 18U;
  891|  12.5k|    uint64_t *t4 = t0 + 24U;
  892|  12.5k|    uint64_t *t5 = t0 + 30U;
  893|  12.5k|    uint64_t *x1 = x;
  894|  12.5k|    uint64_t *y1 = x + 6U;
  895|  12.5k|    uint64_t *z10 = x + 12U;
  896|  12.5k|    uint64_t *x20 = y;
  897|  12.5k|    uint64_t *y20 = y + 6U;
  898|  12.5k|    uint64_t *z20 = y + 12U;
  899|  12.5k|    fmul0(t01, x1, x20);
  900|  12.5k|    fmul0(t11, y1, y20);
  901|  12.5k|    fmul0(t2, z10, z20);
  902|  12.5k|    fadd0(t3, x1, y1);
  903|  12.5k|    fadd0(t4, x20, y20);
  904|  12.5k|    fmul0(t3, t3, t4);
  905|  12.5k|    fadd0(t4, t01, t11);
  906|  12.5k|    uint64_t *y10 = x + 6U;
  907|  12.5k|    uint64_t *z11 = x + 12U;
  908|  12.5k|    uint64_t *y2 = y + 6U;
  909|  12.5k|    uint64_t *z21 = y + 12U;
  910|  12.5k|    fsub0(t3, t3, t4);
  911|  12.5k|    fadd0(t4, y10, z11);
  912|  12.5k|    fadd0(t5, y2, z21);
  913|  12.5k|    fmul0(t4, t4, t5);
  914|  12.5k|    fadd0(t5, t11, t2);
  915|  12.5k|    fsub0(t4, t4, t5);
  916|  12.5k|    uint64_t *x10 = x;
  917|  12.5k|    uint64_t *z1 = x + 12U;
  918|  12.5k|    uint64_t *x2 = y;
  919|  12.5k|    uint64_t *z2 = y + 12U;
  920|  12.5k|    fadd0(x3, x10, z1);
  921|  12.5k|    fadd0(y3, x2, z2);
  922|  12.5k|    fmul0(x3, x3, y3);
  923|  12.5k|    fadd0(y3, t01, t2);
  924|  12.5k|    fsub0(y3, x3, y3);
  925|  12.5k|    uint64_t b_coeff[6U] = { 0U };
  926|  12.5k|    p384_make_b_coeff(b_coeff);
  927|  12.5k|    fmul0(z3, b_coeff, t2);
  928|  12.5k|    fsub0(x3, y3, z3);
  929|  12.5k|    fadd0(z3, x3, x3);
  930|  12.5k|    fadd0(x3, x3, z3);
  931|  12.5k|    fsub0(z3, t11, x3);
  932|  12.5k|    fadd0(x3, t11, x3);
  933|  12.5k|    uint64_t b_coeff0[6U] = { 0U };
  934|  12.5k|    p384_make_b_coeff(b_coeff0);
  935|  12.5k|    fmul0(y3, b_coeff0, y3);
  936|  12.5k|    fadd0(t11, t2, t2);
  937|  12.5k|    fadd0(t2, t11, t2);
  938|  12.5k|    fsub0(y3, y3, t2);
  939|  12.5k|    fsub0(y3, y3, t01);
  940|  12.5k|    fadd0(t11, y3, y3);
  941|  12.5k|    fadd0(y3, t11, y3);
  942|  12.5k|    fadd0(t11, t01, t01);
  943|  12.5k|    fadd0(t01, t11, t01);
  944|  12.5k|    fsub0(t01, t01, t2);
  945|  12.5k|    fmul0(t11, t4, y3);
  946|  12.5k|    fmul0(t2, t01, y3);
  947|  12.5k|    fmul0(y3, x3, z3);
  948|  12.5k|    fadd0(y3, y3, t2);
  949|  12.5k|    fmul0(x3, t3, x3);
  950|  12.5k|    fsub0(x3, x3, t11);
  951|  12.5k|    fmul0(z3, t4, z3);
  952|  12.5k|    fmul0(t11, t3, t01);
  953|  12.5k|    fadd0(z3, z3, t11);
  954|  12.5k|    memcpy(xy, t1, 18U * sizeof(uint64_t));
  955|  12.5k|}
Hacl_P384.c:bn_is_lt_prime_mask:
  606|    358|{
  607|    358|    uint64_t tmp[6U] = { 0U };
  608|    358|    p384_make_prime(tmp);
  609|    358|    uint64_t c = bn_sub(tmp, f, tmp);
  610|    358|    uint64_t m = FStar_UInt64_gte_mask(c, 0ULL) & ~FStar_UInt64_eq_mask(c, 0ULL);
  611|    358|    return m;
  612|    358|}
Hacl_P384.c:p384_make_prime:
  340|  2.20M|{
  341|  2.20M|    n[0U] = 0x00000000ffffffffULL;
  342|  2.20M|    n[1U] = 0xffffffff00000000ULL;
  343|  2.20M|    n[2U] = 0xfffffffffffffffeULL;
  344|  2.20M|    n[3U] = 0xffffffffffffffffULL;
  345|  2.20M|    n[4U] = 0xffffffffffffffffULL;
  346|  2.20M|    n[5U] = 0xffffffffffffffffULL;
  347|  2.20M|}
Hacl_P384.c:to_mont:
  656|    608|{
  657|    608|    uint64_t r2modn[6U] = { 0U };
  658|    608|    p384_make_fmont_R2(r2modn);
  659|    608|    uint64_t tmp[12U] = { 0U };
  660|    608|    bn_mul(tmp, b, r2modn);
  661|    608|    fmont_reduction(a, tmp);
  662|    608|}
Hacl_P384.c:p384_make_fmont_R2:
  406|    608|{
  407|    608|    n[0U] = 0xfffffffe00000001ULL;
  408|    608|    n[1U] = 0x0000000200000000ULL;
  409|    608|    n[2U] = 0xfffffffe00000000ULL;
  410|    608|    n[3U] = 0x0000000200000000ULL;
  411|    608|    n[4U] = 0x0000000000000001ULL;
  412|    608|    n[5U] = 0x0ULL;
  413|    608|}
Hacl_P384.c:fmont_reduction:
  446|   841k|{
  447|   841k|    uint64_t n[6U] = { 0U };
  448|   841k|    p384_make_prime(n);
  449|   841k|    uint64_t c0 = 0ULL;
  450|   841k|    KRML_MAYBE_FOR6(
  ------------------
  |  |  342|   841k|#define KRML_MAYBE_FOR6(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 6, k, x)
  |  |  ------------------
  |  |  |  |  288|   841k|    do {                               \
  |  |  |  |  289|   841k|        uint32_t i = z;                \
  |  |  |  |  290|   841k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|   841k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  451|   841k|        i0,
  452|   841k|        0U,
  453|   841k|        6U,
  454|   841k|        1U,
  455|   841k|        uint64_t qj = 4294967297ULL * x[i0];
  456|   841k|        uint64_t *res_j0 = x + i0;
  457|   841k|        uint64_t c = 0ULL;
  458|   841k|        {
  459|   841k|            uint64_t a_i = n[4U * 0U];
  460|   841k|            uint64_t *res_i0 = res_j0 + 4U * 0U;
  461|   841k|            c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i, qj, c, res_i0);
  462|   841k|            uint64_t a_i0 = n[4U * 0U + 1U];
  463|   841k|            uint64_t *res_i1 = res_j0 + 4U * 0U + 1U;
  464|   841k|            c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i0, qj, c, res_i1);
  465|   841k|            uint64_t a_i1 = n[4U * 0U + 2U];
  466|   841k|            uint64_t *res_i2 = res_j0 + 4U * 0U + 2U;
  467|   841k|            c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i1, qj, c, res_i2);
  468|   841k|            uint64_t a_i2 = n[4U * 0U + 3U];
  469|   841k|            uint64_t *res_i = res_j0 + 4U * 0U + 3U;
  470|   841k|            c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i2, qj, c, res_i);
  471|   841k|        } KRML_MAYBE_FOR2(i,
  472|   841k|                          4U,
  473|   841k|                          6U,
  474|   841k|                          1U,
  475|   841k|                          uint64_t a_i = n[i];
  476|   841k|                          uint64_t *res_i = res_j0 + i;
  477|   841k|                          c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i, qj, c, res_i););
  478|   841k|        uint64_t r = c;
  479|   841k|        uint64_t c1 = r;
  480|   841k|        uint64_t *resb = x + 6U + i0;
  481|   841k|        uint64_t res_j = x[6U + i0];
  482|   841k|        c0 = Lib_IntTypes_Intrinsics_add_carry_u64(c0, c1, res_j, resb););
  483|   841k|    memcpy(res, x + 6U, 6U * sizeof(uint64_t));
  484|   841k|    uint64_t c00 = c0;
  485|   841k|    uint64_t tmp[6U] = { 0U };
  486|   841k|    uint64_t c = 0ULL;
  487|   841k|    {
  488|   841k|        uint64_t t1 = res[4U * 0U];
  489|   841k|        uint64_t t20 = n[4U * 0U];
  490|   841k|        uint64_t *res_i0 = tmp + 4U * 0U;
  491|   841k|        c = Lib_IntTypes_Intrinsics_sub_borrow_u64(c, t1, t20, res_i0);
  ------------------
  |  |   89|   841k|    (_subborrow_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  492|   841k|        uint64_t t10 = res[4U * 0U + 1U];
  493|   841k|        uint64_t t21 = n[4U * 0U + 1U];
  494|   841k|        uint64_t *res_i1 = tmp + 4U * 0U + 1U;
  495|   841k|        c = Lib_IntTypes_Intrinsics_sub_borrow_u64(c, t10, t21, res_i1);
  ------------------
  |  |   89|   841k|    (_subborrow_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  496|   841k|        uint64_t t11 = res[4U * 0U + 2U];
  497|   841k|        uint64_t t22 = n[4U * 0U + 2U];
  498|   841k|        uint64_t *res_i2 = tmp + 4U * 0U + 2U;
  499|   841k|        c = Lib_IntTypes_Intrinsics_sub_borrow_u64(c, t11, t22, res_i2);
  ------------------
  |  |   89|   841k|    (_subborrow_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  500|   841k|        uint64_t t12 = res[4U * 0U + 3U];
  501|   841k|        uint64_t t2 = n[4U * 0U + 3U];
  502|   841k|        uint64_t *res_i = tmp + 4U * 0U + 3U;
  503|   841k|        c = Lib_IntTypes_Intrinsics_sub_borrow_u64(c, t12, t2, res_i);
  ------------------
  |  |   89|   841k|    (_subborrow_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  504|   841k|    }
  505|   841k|    KRML_MAYBE_FOR2(i,
  ------------------
  |  |  318|   841k|#define KRML_MAYBE_FOR2(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 2, k, x)
  |  |  ------------------
  |  |  |  |  288|   841k|    do {                               \
  |  |  |  |  289|   841k|        uint32_t i = z;                \
  |  |  |  |  290|   841k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|   841k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  506|   841k|                    4U,
  507|   841k|                    6U,
  508|   841k|                    1U,
  509|   841k|                    uint64_t t1 = res[i];
  510|   841k|                    uint64_t t2 = n[i];
  511|   841k|                    uint64_t *res_i = tmp + i;
  512|   841k|                    c = Lib_IntTypes_Intrinsics_sub_borrow_u64(c, t1, t2, res_i););
  513|   841k|    uint64_t c1 = c;
  514|   841k|    uint64_t c2 = c00 - c1;
  515|   841k|    KRML_MAYBE_FOR6(i,
  ------------------
  |  |  342|   841k|#define KRML_MAYBE_FOR6(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 6, k, x)
  |  |  ------------------
  |  |  |  |  288|   841k|    do {                               \
  |  |  |  |  289|   841k|        uint32_t i = z;                \
  |  |  |  |  290|   841k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|   841k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  516|   841k|                    0U,
  517|   841k|                    6U,
  518|   841k|                    1U,
  519|   841k|                    uint64_t *os = res;
  520|   841k|                    uint64_t x1 = (c2 & res[i]) | (~c2 & tmp[i]);
  521|   841k|                    os[i] = x1;);
  522|   841k|}
Hacl_P384.c:fsqr0:
  640|   179k|{
  641|   179k|    uint64_t tmp[12U] = { 0U };
  642|   179k|    bn_sqr(tmp, b);
  643|   179k|    fmont_reduction(a, tmp);
  644|   179k|}
Hacl_P384.c:fmul0:
  632|   662k|{
  633|   662k|    uint64_t tmp[12U] = { 0U };
  634|   662k|    bn_mul(tmp, b, c);
  635|   662k|    fmont_reduction(a, tmp);
  636|   662k|}
Hacl_P384.c:p384_make_a_coeff:
  362|    174|{
  363|    174|    a[0U] = 0x00000003fffffffcULL;
  364|    174|    a[1U] = 0xfffffffc00000000ULL;
  365|    174|    a[2U] = 0xfffffffffffffffbULL;
  366|    174|    a[3U] = 0xffffffffffffffffULL;
  367|    174|    a[4U] = 0xffffffffffffffffULL;
  368|    174|    a[5U] = 0xffffffffffffffffULL;
  369|    174|}
Hacl_P384.c:fadd0:
  616|   967k|{
  617|   967k|    uint64_t n[6U] = { 0U };
  618|   967k|    p384_make_prime(n);
  619|   967k|    bn_add_mod(a, n, b, c);
  620|   967k|}
Hacl_P384.c:p384_make_b_coeff:
  373|   120k|{
  374|   120k|    b[0U] = 0x081188719d412dccULL;
  375|   120k|    b[1U] = 0xf729add87a4c32ecULL;
  376|   120k|    b[2U] = 0x77f2209b1920022eULL;
  377|   120k|    b[3U] = 0xe3374bee94938ae2ULL;
  378|   120k|    b[4U] = 0xb62b21f41f022094ULL;
  379|   120k|    b[5U] = 0xcd08114b604fbff9ULL;
  380|   120k|}
Hacl_P384.c:bn_is_eq_mask:
   32|    416|{
   33|    416|    uint64_t mask = 0xFFFFFFFFFFFFFFFFULL;
   34|    416|    KRML_MAYBE_FOR6(i,
  ------------------
  |  |  342|    416|#define KRML_MAYBE_FOR6(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 6, k, x)
  |  |  ------------------
  |  |  |  |  288|    416|    do {                               \
  |  |  |  |  289|    416|        uint32_t i = z;                \
  |  |  |  |  290|    416|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|    416|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   35|    416|                    0U,
   36|    416|                    6U,
   37|    416|                    1U,
   38|    416|                    uint64_t uu____0 = FStar_UInt64_eq_mask(x[i], y[i]);
   39|    416|                    mask = uu____0 & mask;);
   40|    416|    uint64_t mask1 = mask;
   41|    416|    return mask1;
   42|    416|}
Hacl_P384.c:p384_make_fone:
  424|    550|{
  425|    550|    n[0U] = 0xffffffff00000001ULL;
  426|    550|    n[1U] = 0x00000000ffffffffULL;
  427|    550|    n[2U] = 0x1ULL;
  428|    550|    n[3U] = 0x0ULL;
  429|    550|    n[4U] = 0x0ULL;
  430|    550|    n[5U] = 0x0ULL;
  431|    550|}
Hacl_P384.c:p384_make_order:
  351|  15.9k|{
  352|  15.9k|    n[0U] = 0xecec196accc52973ULL;
  353|  15.9k|    n[1U] = 0x581a0db248b0a77aULL;
  354|  15.9k|    n[2U] = 0xc7634d81f4372ddfULL;
  355|  15.9k|    n[3U] = 0xffffffffffffffffULL;
  356|  15.9k|    n[4U] = 0xffffffffffffffffULL;
  357|  15.9k|    n[5U] = 0xffffffffffffffffULL;
  358|  15.9k|}
Hacl_P384.c:bn_sub:
  130|    601|{
  131|    601|    uint64_t c1 = 0ULL;
  132|    601|    {
  133|    601|        uint64_t t1 = b[4U * 0U];
  134|    601|        uint64_t t20 = c[4U * 0U];
  135|    601|        uint64_t *res_i0 = a + 4U * 0U;
  136|    601|        c1 = Lib_IntTypes_Intrinsics_sub_borrow_u64(c1, t1, t20, res_i0);
  ------------------
  |  |   89|    601|    (_subborrow_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  137|    601|        uint64_t t10 = b[4U * 0U + 1U];
  138|    601|        uint64_t t21 = c[4U * 0U + 1U];
  139|    601|        uint64_t *res_i1 = a + 4U * 0U + 1U;
  140|    601|        c1 = Lib_IntTypes_Intrinsics_sub_borrow_u64(c1, t10, t21, res_i1);
  ------------------
  |  |   89|    601|    (_subborrow_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  141|    601|        uint64_t t11 = b[4U * 0U + 2U];
  142|    601|        uint64_t t22 = c[4U * 0U + 2U];
  143|    601|        uint64_t *res_i2 = a + 4U * 0U + 2U;
  144|    601|        c1 = Lib_IntTypes_Intrinsics_sub_borrow_u64(c1, t11, t22, res_i2);
  ------------------
  |  |   89|    601|    (_subborrow_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  145|    601|        uint64_t t12 = b[4U * 0U + 3U];
  146|    601|        uint64_t t2 = c[4U * 0U + 3U];
  147|    601|        uint64_t *res_i = a + 4U * 0U + 3U;
  148|    601|        c1 = Lib_IntTypes_Intrinsics_sub_borrow_u64(c1, t12, t2, res_i);
  ------------------
  |  |   89|    601|    (_subborrow_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  149|    601|    }
  150|    601|    KRML_MAYBE_FOR2(i,
  ------------------
  |  |  318|    601|#define KRML_MAYBE_FOR2(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 2, k, x)
  |  |  ------------------
  |  |  |  |  288|    601|    do {                               \
  |  |  |  |  289|    601|        uint32_t i = z;                \
  |  |  |  |  290|    601|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|    601|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  151|    601|                    4U,
  152|    601|                    6U,
  153|    601|                    1U,
  154|    601|                    uint64_t t1 = b[i];
  155|    601|                    uint64_t t2 = c[i];
  156|    601|                    uint64_t *res_i = a + i;
  157|    601|                    c1 = Lib_IntTypes_Intrinsics_sub_borrow_u64(c1, t1, t2, res_i););
  158|    601|    uint64_t c10 = c1;
  159|    601|    return c10;
  160|    601|}
Hacl_P384.c:fexp_consttime:
  666|     90|{
  667|     90|    uint64_t table[192U] = { 0U };
  668|     90|    uint64_t tmp[6U] = { 0U };
  669|     90|    uint64_t *t0 = table;
  670|     90|    uint64_t *t1 = table + 6U;
  671|     90|    p384_make_fone(t0);
  672|     90|    memcpy(t1, a, 6U * sizeof(uint64_t));
  673|     90|    KRML_MAYBE_FOR15(i,
  ------------------
  |  |  396|     90|#define KRML_MAYBE_FOR15(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 15, k, x)
  |  |  ------------------
  |  |  |  |  288|     90|    do {                               \
  |  |  |  |  289|     90|        uint32_t i = z;                \
  |  |  |  |  290|     90|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     90|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  674|     90|                     0U,
  675|     90|                     15U,
  676|     90|                     1U,
  677|     90|                     uint64_t *t11 = table + (i + 1U) * 6U;
  678|     90|                     fsqr0(tmp, t11);
  679|     90|                     memcpy(table + (2U * i + 2U) * 6U, tmp, 6U * sizeof(uint64_t));
  680|     90|                     uint64_t *t2 = table + (2U * i + 2U) * 6U;
  681|     90|                     fmul0(tmp, a, t2);
  682|     90|                     memcpy(table + (2U * i + 3U) * 6U, tmp, 6U * sizeof(uint64_t)););
  683|     90|    uint32_t i0 = 380U;
  684|     90|    uint64_t bits_c = Hacl_Bignum_Lib_bn_get_bits_u64(6U, b, i0, 5U);
  685|     90|    memcpy(out, (uint64_t *)table, 6U * sizeof(uint64_t));
  686|  2.88k|    for (uint32_t i1 = 0U; i1 < 31U; i1++) {
  ------------------
  |  Branch (686:28): [True: 2.79k, False: 90]
  ------------------
  687|  2.79k|        uint64_t c = FStar_UInt64_eq_mask(bits_c, (uint64_t)(i1 + 1U));
  688|  2.79k|        const uint64_t *res_j = table + (i1 + 1U) * 6U;
  689|  2.79k|        KRML_MAYBE_FOR6(i,
  ------------------
  |  |  342|  2.79k|#define KRML_MAYBE_FOR6(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 6, k, x)
  |  |  ------------------
  |  |  |  |  288|  2.79k|    do {                               \
  |  |  |  |  289|  2.79k|        uint32_t i = z;                \
  |  |  |  |  290|  2.79k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  2.79k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  690|  2.79k|                        0U,
  691|  2.79k|                        6U,
  692|  2.79k|                        1U,
  693|  2.79k|                        uint64_t *os = out;
  694|  2.79k|                        uint64_t x = (c & res_j[i]) | (~c & out[i]);
  695|  2.79k|                        os[i] = x;);
  696|  2.79k|    }
  697|     90|    uint64_t tmp0[6U] = { 0U };
  698|  6.93k|    for (uint32_t i1 = 0U; i1 < 76U; i1++) {
  ------------------
  |  Branch (698:28): [True: 6.84k, False: 90]
  ------------------
  699|  6.84k|        KRML_MAYBE_FOR5(i, 0U, 5U, 1U, fsqr0(out, out););
  ------------------
  |  |  336|  6.84k|#define KRML_MAYBE_FOR5(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 5, k, x)
  |  |  ------------------
  |  |  |  |  288|  6.84k|    do {                               \
  |  |  |  |  289|  6.84k|        uint32_t i = z;                \
  |  |  |  |  290|  6.84k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  6.84k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  700|  6.84k|        uint32_t k = 380U - 5U * i1 - 5U;
  701|  6.84k|        uint64_t bits_l = Hacl_Bignum_Lib_bn_get_bits_u64(6U, b, k, 5U);
  702|  6.84k|        memcpy(tmp0, (uint64_t *)table, 6U * sizeof(uint64_t));
  703|   218k|        for (uint32_t i2 = 0U; i2 < 31U; i2++) {
  ------------------
  |  Branch (703:32): [True: 212k, False: 6.84k]
  ------------------
  704|   212k|            uint64_t c = FStar_UInt64_eq_mask(bits_l, (uint64_t)(i2 + 1U));
  705|   212k|            const uint64_t *res_j = table + (i2 + 1U) * 6U;
  706|   212k|            KRML_MAYBE_FOR6(i,
  ------------------
  |  |  342|   212k|#define KRML_MAYBE_FOR6(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 6, k, x)
  |  |  ------------------
  |  |  |  |  288|   212k|    do {                               \
  |  |  |  |  289|   212k|        uint32_t i = z;                \
  |  |  |  |  290|   212k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|   212k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  707|   212k|                            0U,
  708|   212k|                            6U,
  709|   212k|                            1U,
  710|   212k|                            uint64_t *os = tmp0;
  711|   212k|                            uint64_t x = (c & res_j[i]) | (~c & tmp0[i]);
  712|   212k|                            os[i] = x;);
  713|   212k|        }
  714|  6.84k|        fmul0(out, out, tmp0);
  715|  6.84k|    }
  716|     90|}
Hacl_P384.c:from_mont:
  648|    148|{
  649|    148|    uint64_t tmp[12U] = { 0U };
  650|    148|    memcpy(tmp, b, 6U * sizeof(uint64_t));
  651|    148|    fmont_reduction(a, tmp);
  652|    148|}
Hacl_P384.c:fsub0:
  624|   399k|{
  625|   399k|    uint64_t n[6U] = { 0U };
  626|   399k|    p384_make_prime(n);
  627|   399k|    bn_sub_mod(a, n, b, c);
  628|   399k|}
Hacl_P384.c:bn_sub_mod:
  164|   399k|{
  165|   399k|    uint64_t c10 = 0ULL;
  166|   399k|    {
  167|   399k|        uint64_t t1 = c[4U * 0U];
  168|   399k|        uint64_t t20 = d[4U * 0U];
  169|   399k|        uint64_t *res_i0 = a + 4U * 0U;
  170|   399k|        c10 = Lib_IntTypes_Intrinsics_sub_borrow_u64(c10, t1, t20, res_i0);
  ------------------
  |  |   89|   399k|    (_subborrow_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  171|   399k|        uint64_t t10 = c[4U * 0U + 1U];
  172|   399k|        uint64_t t21 = d[4U * 0U + 1U];
  173|   399k|        uint64_t *res_i1 = a + 4U * 0U + 1U;
  174|   399k|        c10 = Lib_IntTypes_Intrinsics_sub_borrow_u64(c10, t10, t21, res_i1);
  ------------------
  |  |   89|   399k|    (_subborrow_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  175|   399k|        uint64_t t11 = c[4U * 0U + 2U];
  176|   399k|        uint64_t t22 = d[4U * 0U + 2U];
  177|   399k|        uint64_t *res_i2 = a + 4U * 0U + 2U;
  178|   399k|        c10 = Lib_IntTypes_Intrinsics_sub_borrow_u64(c10, t11, t22, res_i2);
  ------------------
  |  |   89|   399k|    (_subborrow_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  179|   399k|        uint64_t t12 = c[4U * 0U + 3U];
  180|   399k|        uint64_t t2 = d[4U * 0U + 3U];
  181|   399k|        uint64_t *res_i = a + 4U * 0U + 3U;
  182|   399k|        c10 = Lib_IntTypes_Intrinsics_sub_borrow_u64(c10, t12, t2, res_i);
  ------------------
  |  |   89|   399k|    (_subborrow_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  183|   399k|    }
  184|   399k|    KRML_MAYBE_FOR2(i,
  ------------------
  |  |  318|   399k|#define KRML_MAYBE_FOR2(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 2, k, x)
  |  |  ------------------
  |  |  |  |  288|   399k|    do {                               \
  |  |  |  |  289|   399k|        uint32_t i = z;                \
  |  |  |  |  290|   399k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|   399k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  185|   399k|                    4U,
  186|   399k|                    6U,
  187|   399k|                    1U,
  188|   399k|                    uint64_t t1 = c[i];
  189|   399k|                    uint64_t t2 = d[i];
  190|   399k|                    uint64_t *res_i = a + i;
  191|   399k|                    c10 = Lib_IntTypes_Intrinsics_sub_borrow_u64(c10, t1, t2, res_i););
  192|   399k|    uint64_t c0 = c10;
  193|   399k|    uint64_t tmp[6U] = { 0U };
  194|   399k|    uint64_t c1 = 0ULL;
  195|   399k|    {
  196|   399k|        uint64_t t1 = a[4U * 0U];
  197|   399k|        uint64_t t20 = b[4U * 0U];
  198|   399k|        uint64_t *res_i0 = tmp + 4U * 0U;
  199|   399k|        c1 = Lib_IntTypes_Intrinsics_add_carry_u64(c1, t1, t20, res_i0);
  ------------------
  |  |   66|   399k|    (_addcarry_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  200|   399k|        uint64_t t10 = a[4U * 0U + 1U];
  201|   399k|        uint64_t t21 = b[4U * 0U + 1U];
  202|   399k|        uint64_t *res_i1 = tmp + 4U * 0U + 1U;
  203|   399k|        c1 = Lib_IntTypes_Intrinsics_add_carry_u64(c1, t10, t21, res_i1);
  ------------------
  |  |   66|   399k|    (_addcarry_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  204|   399k|        uint64_t t11 = a[4U * 0U + 2U];
  205|   399k|        uint64_t t22 = b[4U * 0U + 2U];
  206|   399k|        uint64_t *res_i2 = tmp + 4U * 0U + 2U;
  207|   399k|        c1 = Lib_IntTypes_Intrinsics_add_carry_u64(c1, t11, t22, res_i2);
  ------------------
  |  |   66|   399k|    (_addcarry_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  208|   399k|        uint64_t t12 = a[4U * 0U + 3U];
  209|   399k|        uint64_t t2 = b[4U * 0U + 3U];
  210|   399k|        uint64_t *res_i = tmp + 4U * 0U + 3U;
  211|   399k|        c1 = Lib_IntTypes_Intrinsics_add_carry_u64(c1, t12, t2, res_i);
  ------------------
  |  |   66|   399k|    (_addcarry_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  212|   399k|    }
  213|   399k|    KRML_MAYBE_FOR2(i,
  ------------------
  |  |  318|   399k|#define KRML_MAYBE_FOR2(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 2, k, x)
  |  |  ------------------
  |  |  |  |  288|   399k|    do {                               \
  |  |  |  |  289|   399k|        uint32_t i = z;                \
  |  |  |  |  290|   399k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|   399k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  214|   399k|                    4U,
  215|   399k|                    6U,
  216|   399k|                    1U,
  217|   399k|                    uint64_t t1 = a[i];
  218|   399k|                    uint64_t t2 = b[i];
  219|   399k|                    uint64_t *res_i = tmp + i;
  220|   399k|                    c1 = Lib_IntTypes_Intrinsics_add_carry_u64(c1, t1, t2, res_i););
  221|   399k|    uint64_t c11 = c1;
  222|   399k|    KRML_MAYBE_UNUSED_VAR(c11);
  ------------------
  |  |   60|   399k|#define KRML_MAYBE_UNUSED_VAR(x) KRML_HOST_IGNORE(x)
  |  |  ------------------
  |  |  |  |   56|   399k|#define KRML_HOST_IGNORE(x) (void)(x)
  |  |  ------------------
  ------------------
  223|   399k|    uint64_t c2 = 0ULL - c0;
  224|   399k|    KRML_MAYBE_FOR6(i,
  ------------------
  |  |  342|   399k|#define KRML_MAYBE_FOR6(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 6, k, x)
  |  |  ------------------
  |  |  |  |  288|   399k|    do {                               \
  |  |  |  |  289|   399k|        uint32_t i = z;                \
  |  |  |  |  290|   399k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|   399k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  225|   399k|                    0U,
  226|   399k|                    6U,
  227|   399k|                    1U,
  228|   399k|                    uint64_t *os = a;
  229|   399k|                    uint64_t x = (c2 & tmp[i]) | (~c2 & a[i]);
  230|   399k|                    os[i] = x;);
  231|   399k|}
Hacl_P384.c:bn_to_bytes_be:
  319|    116|{
  320|    116|    uint8_t tmp[48U] = { 0U };
  321|    116|    KRML_MAYBE_UNUSED_VAR(tmp);
  ------------------
  |  |   60|    116|#define KRML_MAYBE_UNUSED_VAR(x) KRML_HOST_IGNORE(x)
  |  |  ------------------
  |  |  |  |   56|    116|#define KRML_HOST_IGNORE(x) (void)(x)
  |  |  ------------------
  ------------------
  322|    116|    KRML_MAYBE_FOR6(i, 0U, 6U, 1U, store64_be(a + i * 8U, b[6U - i - 1U]););
  ------------------
  |  |  342|    116|#define KRML_MAYBE_FOR6(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 6, k, x)
  |  |  ------------------
  |  |  |  |  288|    116|    do {                               \
  |  |  |  |  289|    116|        uint32_t i = z;                \
  |  |  |  |  290|    116|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|    116|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  323|    116|}
Hacl_P384.c:load_qelem_conditional:
  746|     58|{
  747|     58|    bn_from_bytes_be(a, b);
  748|     58|    uint64_t tmp[6U] = { 0U };
  749|     58|    p384_make_order(tmp);
  750|     58|    uint64_t c = bn_sub(tmp, a, tmp);
  751|     58|    uint64_t is_lt_order = FStar_UInt64_gte_mask(c, 0ULL) & ~FStar_UInt64_eq_mask(c, 0ULL);
  752|     58|    uint64_t bn_zero[6U] = { 0U };
  753|     58|    uint64_t res = bn_is_eq_mask(a, bn_zero);
  754|     58|    uint64_t is_eq_zero = res;
  755|     58|    uint64_t is_b_valid = is_lt_order & ~is_eq_zero;
  756|     58|    uint64_t oneq[6U] = { 0U };
  757|     58|    memset(oneq, 0U, 6U * sizeof(uint64_t));
  758|     58|    oneq[0U] = 1ULL;
  759|     58|    KRML_MAYBE_FOR6(i,
  ------------------
  |  |  342|     58|#define KRML_MAYBE_FOR6(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 6, k, x)
  |  |  ------------------
  |  |  |  |  288|     58|    do {                               \
  |  |  |  |  289|     58|        uint32_t i = z;                \
  |  |  |  |  290|     58|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     58|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  760|     58|                    0U,
  761|     58|                    6U,
  762|     58|                    1U,
  763|     58|                    uint64_t *os = a;
  764|     58|                    uint64_t uu____0 = oneq[i];
  765|     58|                    uint64_t x = uu____0 ^ (is_b_valid & (a[i] ^ uu____0));
  766|     58|                    os[i] = x;);
  767|     58|    return is_b_valid;
  768|     58|}
Hacl_P384.c:point_mul_g:
 1069|     86|{
 1070|     86|    uint64_t g[18U] = { 0U };
 1071|     86|    uint64_t *x = g;
 1072|     86|    uint64_t *y = g + 6U;
 1073|     86|    uint64_t *z = g + 12U;
 1074|     86|    p384_make_g_x(x);
 1075|     86|    p384_make_g_y(y);
 1076|     86|    p384_make_fone(z);
 1077|     86|    point_mul(res, scalar, g);
 1078|     86|}
Hacl_P384.c:p384_make_g_x:
  384|     86|{
  385|     86|    n[0U] = 0x3dd0756649c0b528ULL;
  386|     86|    n[1U] = 0x20e378e2a0d6ce38ULL;
  387|     86|    n[2U] = 0x879c3afc541b4d6eULL;
  388|     86|    n[3U] = 0x6454868459a30effULL;
  389|     86|    n[4U] = 0x812ff723614ede2bULL;
  390|     86|    n[5U] = 0x4d3aadc2299e1513ULL;
  391|     86|}
Hacl_P384.c:p384_make_g_y:
  395|     86|{
  396|     86|    n[0U] = 0x23043dad4b03a4feULL;
  397|     86|    n[1U] = 0xa1bfa8bf7bb4a9acULL;
  398|     86|    n[2U] = 0x8bade7562e83b050ULL;
  399|     86|    n[3U] = 0xc6c3521968f4ffd9ULL;
  400|     86|    n[4U] = 0xdd8002263969a840ULL;
  401|     86|    n[5U] = 0x2b78abc25a15c5e9ULL;
  402|     86|}
Hacl_P384.c:p384_finv:
  720|     90|{
  721|     90|    uint64_t b[6U] = { 0U };
  722|     90|    b[0U] = 0x00000000fffffffdULL;
  723|     90|    b[1U] = 0xffffffff00000000ULL;
  724|     90|    b[2U] = 0xfffffffffffffffeULL;
  725|     90|    b[3U] = 0xffffffffffffffffULL;
  726|     90|    b[4U] = 0xffffffffffffffffULL;
  727|     90|    b[5U] = 0xffffffffffffffffULL;
  728|     90|    fexp_consttime(res, a, b);
  729|     90|}
Hacl_P384.c:point_mul:
 1027|    122|{
 1028|    122|    uint64_t table[288U] = { 0U };
 1029|    122|    uint64_t tmp[18U] = { 0U };
 1030|    122|    uint64_t *t0 = table;
 1031|    122|    uint64_t *t1 = table + 18U;
 1032|    122|    point_zero(t0);
 1033|    122|    memcpy(t1, p, 18U * sizeof(uint64_t));
 1034|    122|    KRML_MAYBE_FOR7(i,
  ------------------
  |  |  348|    122|#define KRML_MAYBE_FOR7(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 7, k, x)
  |  |  ------------------
  |  |  |  |  288|    122|    do {                               \
  |  |  |  |  289|    122|        uint32_t i = z;                \
  |  |  |  |  290|    122|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|    122|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1035|    122|                    0U,
 1036|    122|                    7U,
 1037|    122|                    1U,
 1038|    122|                    uint64_t *t11 = table + (i + 1U) * 18U;
 1039|    122|                    point_double(t11, tmp);
 1040|    122|                    memcpy(table + (2U * i + 2U) * 18U, tmp, 18U * sizeof(uint64_t));
 1041|    122|                    uint64_t *t2 = table + (2U * i + 2U) * 18U;
 1042|    122|                    point_add(p, t2, tmp);
 1043|    122|                    memcpy(table + (2U * i + 3U) * 18U, tmp, 18U * sizeof(uint64_t)););
 1044|    122|    point_zero(res);
 1045|    122|    uint64_t tmp0[18U] = { 0U };
 1046|  11.8k|    for (uint32_t i0 = 0U; i0 < 96U; i0++) {
  ------------------
  |  Branch (1046:28): [True: 11.7k, False: 122]
  ------------------
 1047|  11.7k|        KRML_MAYBE_FOR4(i, 0U, 4U, 1U, point_double(res, res););
  ------------------
  |  |  330|  11.7k|#define KRML_MAYBE_FOR4(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 4, k, x)
  |  |  ------------------
  |  |  |  |  288|  11.7k|    do {                               \
  |  |  |  |  289|  11.7k|        uint32_t i = z;                \
  |  |  |  |  290|  11.7k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  11.7k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1048|  11.7k|        uint32_t k = 384U - 4U * i0 - 4U;
 1049|  11.7k|        uint64_t bits_l = Hacl_Bignum_Lib_bn_get_bits_u64(6U, scalar, k, 4U);
 1050|  11.7k|        memcpy(tmp0, (uint64_t *)table, 18U * sizeof(uint64_t));
 1051|  11.7k|        KRML_MAYBE_FOR15(
  ------------------
  |  |  396|  11.7k|#define KRML_MAYBE_FOR15(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 15, k, x)
  |  |  ------------------
  |  |  |  |  288|  11.7k|    do {                               \
  |  |  |  |  289|  11.7k|        uint32_t i = z;                \
  |  |  |  |  290|  11.7k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  11.7k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1052|  11.7k|            i1,
 1053|  11.7k|            0U,
 1054|  11.7k|            15U,
 1055|  11.7k|            1U,
 1056|  11.7k|            uint64_t c = FStar_UInt64_eq_mask(bits_l, (uint64_t)(i1 + 1U));
 1057|  11.7k|            const uint64_t *res_j = table + (i1 + 1U) * 18U;
 1058|  11.7k|            for (uint32_t i = 0U; i < 18U; i++) {
 1059|  11.7k|                uint64_t *os = tmp0;
 1060|  11.7k|                uint64_t x = (c & res_j[i]) | (~c & tmp0[i]);
 1061|  11.7k|                os[i] = x;
 1062|  11.7k|            });
 1063|  11.7k|        point_add(res, tmp0, res);
 1064|  11.7k|    }
 1065|    122|}
Hacl_P384.c:point_zero:
 1016|    244|{
 1017|    244|    uint64_t *x = one;
 1018|    244|    uint64_t *y = one + 6U;
 1019|    244|    uint64_t *z = one + 12U;
 1020|    244|    p384_make_fzero(x);
 1021|    244|    p384_make_fone(y);
 1022|    244|    p384_make_fzero(z);
 1023|    244|}
Hacl_P384.c:p384_make_fzero:
  417|    488|{
  418|    488|    memset(n, 0U, 6U * sizeof(uint64_t));
  419|    488|    n[0U] = 0ULL;
  420|    488|}
Hacl_P384.c:point_double:
  959|  47.7k|{
  960|  47.7k|    uint64_t tmp[30U] = { 0U };
  961|  47.7k|    uint64_t *x1 = x;
  962|  47.7k|    uint64_t *z = x + 12U;
  963|  47.7k|    uint64_t *x3 = xx;
  964|  47.7k|    uint64_t *y3 = xx + 6U;
  965|  47.7k|    uint64_t *z3 = xx + 12U;
  966|  47.7k|    uint64_t *t0 = tmp;
  967|  47.7k|    uint64_t *t1 = tmp + 6U;
  968|  47.7k|    uint64_t *t2 = tmp + 12U;
  969|  47.7k|    uint64_t *t3 = tmp + 18U;
  970|  47.7k|    uint64_t *t4 = tmp + 24U;
  971|  47.7k|    uint64_t *x2 = x;
  972|  47.7k|    uint64_t *y = x + 6U;
  973|  47.7k|    uint64_t *z1 = x + 12U;
  974|  47.7k|    fsqr0(t0, x2);
  975|  47.7k|    fsqr0(t1, y);
  976|  47.7k|    fsqr0(t2, z1);
  977|  47.7k|    fmul0(t3, x2, y);
  978|  47.7k|    fadd0(t3, t3, t3);
  979|  47.7k|    fmul0(t4, y, z1);
  980|  47.7k|    fmul0(z3, x1, z);
  981|  47.7k|    fadd0(z3, z3, z3);
  982|  47.7k|    uint64_t b_coeff[6U] = { 0U };
  983|  47.7k|    p384_make_b_coeff(b_coeff);
  984|  47.7k|    fmul0(y3, b_coeff, t2);
  985|  47.7k|    fsub0(y3, y3, z3);
  986|  47.7k|    fadd0(x3, y3, y3);
  987|  47.7k|    fadd0(y3, x3, y3);
  988|  47.7k|    fsub0(x3, t1, y3);
  989|  47.7k|    fadd0(y3, t1, y3);
  990|  47.7k|    fmul0(y3, x3, y3);
  991|  47.7k|    fmul0(x3, x3, t3);
  992|  47.7k|    fadd0(t3, t2, t2);
  993|  47.7k|    fadd0(t2, t2, t3);
  994|  47.7k|    uint64_t b_coeff0[6U] = { 0U };
  995|  47.7k|    p384_make_b_coeff(b_coeff0);
  996|  47.7k|    fmul0(z3, b_coeff0, z3);
  997|  47.7k|    fsub0(z3, z3, t2);
  998|  47.7k|    fsub0(z3, z3, t0);
  999|  47.7k|    fadd0(t3, z3, z3);
 1000|  47.7k|    fadd0(z3, z3, t3);
 1001|  47.7k|    fadd0(t3, t0, t0);
 1002|  47.7k|    fadd0(t0, t3, t0);
 1003|  47.7k|    fsub0(t0, t0, t2);
 1004|  47.7k|    fmul0(t0, t0, z3);
 1005|  47.7k|    fadd0(y3, y3, t0);
 1006|  47.7k|    fadd0(t0, t4, t4);
 1007|  47.7k|    fmul0(z3, t0, z3);
 1008|  47.7k|    fsub0(x3, x3, z3);
 1009|  47.7k|    fmul0(z3, t0, t1);
 1010|  47.7k|    fadd0(z3, z3, z3);
 1011|  47.7k|    fadd0(z3, z3, z3);
 1012|  47.7k|}

Hacl_P521_ecdsa_verif_without_hash:
 1421|     44|{
 1422|     44|    uint64_t m_q[9U] = { 0U };
 1423|     44|    uint8_t mHash[66U] = { 0U };
 1424|     44|    memcpy(mHash, msg, 66U * sizeof(uint8_t));
 1425|     44|    KRML_MAYBE_UNUSED_VAR(msg_len);
  ------------------
  |  |   60|     44|#define KRML_MAYBE_UNUSED_VAR(x) KRML_HOST_IGNORE(x)
  |  |  ------------------
  |  |  |  |   56|     44|#define KRML_HOST_IGNORE(x) (void)(x)
  |  |  ------------------
  ------------------
 1426|     44|    bn_from_bytes_be(m_q, mHash);
 1427|     44|    qmod_short(m_q, m_q);
 1428|     44|    bool res = ecdsa_verify_msg_as_qelem(m_q, public_key, signature_r, signature_s);
 1429|     44|    return res;
 1430|     44|}
Hacl_P521_validate_public_key:
 1452|    116|{
 1453|    116|    uint64_t point_jac[27U] = { 0U };
 1454|    116|    uint64_t p_aff[18U] = { 0U };
 1455|    116|    uint8_t *p_x = public_key;
 1456|    116|    uint8_t *p_y = public_key + 66U;
 1457|    116|    uint64_t *bn_p_x = p_aff;
 1458|    116|    uint64_t *bn_p_y = p_aff + 9U;
 1459|    116|    bn_from_bytes_be(bn_p_x, p_x);
 1460|    116|    bn_from_bytes_be(bn_p_y, p_y);
 1461|    116|    uint64_t *px0 = p_aff;
 1462|    116|    uint64_t *py0 = p_aff + 9U;
 1463|    116|    uint64_t lessX = bn_is_lt_prime_mask(px0);
 1464|    116|    uint64_t lessY = bn_is_lt_prime_mask(py0);
 1465|    116|    uint64_t res0 = lessX & lessY;
 1466|    116|    bool is_xy_valid = res0 == 0xFFFFFFFFFFFFFFFFULL;
 1467|    116|    bool res;
 1468|    116|    if (!is_xy_valid) {
  ------------------
  |  Branch (1468:9): [True: 3, False: 113]
  ------------------
 1469|      3|        res = false;
 1470|    113|    } else {
 1471|    113|        uint64_t rp[9U] = { 0U };
 1472|    113|        uint64_t tx[9U] = { 0U };
 1473|    113|        uint64_t ty[9U] = { 0U };
 1474|    113|        uint64_t *px = p_aff;
 1475|    113|        uint64_t *py = p_aff + 9U;
 1476|    113|        to_mont(tx, px);
 1477|    113|        to_mont(ty, py);
 1478|    113|        uint64_t tmp[9U] = { 0U };
 1479|    113|        fsqr0(rp, tx);
 1480|    113|        fmul0(rp, rp, tx);
 1481|    113|        p521_make_a_coeff(tmp);
 1482|    113|        fmul0(tmp, tmp, tx);
 1483|    113|        fadd0(rp, tmp, rp);
 1484|    113|        p521_make_b_coeff(tmp);
 1485|    113|        fadd0(rp, tmp, rp);
 1486|    113|        fsqr0(ty, ty);
 1487|    113|        uint64_t r = bn_is_eq_mask(ty, rp);
 1488|    113|        uint64_t r0 = r;
 1489|    113|        bool r1 = r0 == 0xFFFFFFFFFFFFFFFFULL;
 1490|    113|        res = r1;
 1491|    113|    }
 1492|    116|    if (res) {
  ------------------
  |  Branch (1492:9): [True: 92, False: 24]
  ------------------
 1493|     92|        uint64_t *px = p_aff;
 1494|     92|        uint64_t *py = p_aff + 9U;
 1495|     92|        uint64_t *rx = point_jac;
 1496|     92|        uint64_t *ry = point_jac + 9U;
 1497|     92|        uint64_t *rz = point_jac + 18U;
 1498|     92|        to_mont(rx, px);
 1499|     92|        to_mont(ry, py);
 1500|     92|        p521_make_fone(rz);
 1501|     92|    }
 1502|    116|    bool res1 = res;
 1503|    116|    return res1;
 1504|    116|}
Hacl_P521_validate_private_key:
 1518|     40|{
 1519|     40|    uint64_t bn_sk[9U] = { 0U };
 1520|     40|    bn_from_bytes_be(bn_sk, private_key);
 1521|     40|    uint64_t tmp[9U] = { 0U };
 1522|     40|    p521_make_order(tmp);
 1523|     40|    uint64_t c = bn_sub(tmp, bn_sk, tmp);
 1524|     40|    uint64_t is_lt_order = FStar_UInt64_gte_mask(c, 0ULL) & ~FStar_UInt64_eq_mask(c, 0ULL);
 1525|     40|    uint64_t bn_zero[9U] = { 0U };
 1526|     40|    uint64_t res = bn_is_eq_mask(bn_sk, bn_zero);
 1527|     40|    uint64_t is_eq_zero = res;
 1528|     40|    uint64_t res0 = is_lt_order & ~is_eq_zero;
 1529|     40|    return res0 == 0xFFFFFFFFFFFFFFFFULL;
 1530|     40|}
Hacl_P521_dh_initiator:
 1686|     40|{
 1687|     40|    uint64_t tmp[36U] = { 0U };
 1688|     40|    uint64_t *sk = tmp;
 1689|     40|    uint64_t *pk = tmp + 9U;
 1690|     40|    uint64_t is_sk_valid = load_qelem_conditional(sk, private_key);
 1691|     40|    point_mul_g(pk, sk);
 1692|     40|    uint64_t aff_p[18U] = { 0U };
 1693|     40|    uint64_t zinv[9U] = { 0U };
 1694|     40|    uint64_t *px = pk;
 1695|     40|    uint64_t *py0 = pk + 9U;
 1696|     40|    uint64_t *pz = pk + 18U;
 1697|     40|    uint64_t *x = aff_p;
 1698|     40|    uint64_t *y = aff_p + 9U;
 1699|     40|    p521_finv(zinv, pz);
 1700|     40|    fmul0(x, px, zinv);
 1701|     40|    fmul0(y, py0, zinv);
 1702|     40|    from_mont(x, x);
 1703|     40|    from_mont(y, y);
 1704|     40|    uint64_t *px0 = aff_p;
 1705|     40|    uint64_t *py = aff_p + 9U;
 1706|     40|    bn_to_bytes_be(public_key, px0);
 1707|     40|    bn_to_bytes_be(public_key + 66U, py);
 1708|     40|    return is_sk_valid == 0xFFFFFFFFFFFFFFFFULL;
 1709|     40|}
Hacl_P521_dh_responder:
 1725|      7|{
 1726|      7|    uint64_t tmp[264U] = { 0U };
 1727|      7|    uint64_t *sk = tmp;
 1728|      7|    uint64_t *pk = tmp + 9U;
 1729|      7|    uint64_t p_aff[18U] = { 0U };
 1730|      7|    uint8_t *p_x = their_pubkey;
 1731|      7|    uint8_t *p_y = their_pubkey + 66U;
 1732|      7|    uint64_t *bn_p_x = p_aff;
 1733|      7|    uint64_t *bn_p_y = p_aff + 9U;
 1734|      7|    bn_from_bytes_be(bn_p_x, p_x);
 1735|      7|    bn_from_bytes_be(bn_p_y, p_y);
 1736|      7|    uint64_t *px0 = p_aff;
 1737|      7|    uint64_t *py0 = p_aff + 9U;
 1738|      7|    uint64_t lessX = bn_is_lt_prime_mask(px0);
 1739|      7|    uint64_t lessY = bn_is_lt_prime_mask(py0);
 1740|      7|    uint64_t res0 = lessX & lessY;
 1741|      7|    bool is_xy_valid = res0 == 0xFFFFFFFFFFFFFFFFULL;
 1742|      7|    bool res;
 1743|      7|    if (!is_xy_valid) {
  ------------------
  |  Branch (1743:9): [True: 0, False: 7]
  ------------------
 1744|      0|        res = false;
 1745|      7|    } else {
 1746|      7|        uint64_t rp[9U] = { 0U };
 1747|      7|        uint64_t tx[9U] = { 0U };
 1748|      7|        uint64_t ty[9U] = { 0U };
 1749|      7|        uint64_t *px = p_aff;
 1750|      7|        uint64_t *py = p_aff + 9U;
 1751|      7|        to_mont(tx, px);
 1752|      7|        to_mont(ty, py);
 1753|      7|        uint64_t tmp1[9U] = { 0U };
 1754|      7|        fsqr0(rp, tx);
 1755|      7|        fmul0(rp, rp, tx);
 1756|      7|        p521_make_a_coeff(tmp1);
 1757|      7|        fmul0(tmp1, tmp1, tx);
 1758|      7|        fadd0(rp, tmp1, rp);
 1759|      7|        p521_make_b_coeff(tmp1);
 1760|      7|        fadd0(rp, tmp1, rp);
 1761|      7|        fsqr0(ty, ty);
 1762|      7|        uint64_t r = bn_is_eq_mask(ty, rp);
 1763|      7|        uint64_t r0 = r;
 1764|      7|        bool r1 = r0 == 0xFFFFFFFFFFFFFFFFULL;
 1765|      7|        res = r1;
 1766|      7|    }
 1767|      7|    if (res) {
  ------------------
  |  Branch (1767:9): [True: 7, False: 0]
  ------------------
 1768|      7|        uint64_t *px = p_aff;
 1769|      7|        uint64_t *py = p_aff + 9U;
 1770|      7|        uint64_t *rx = pk;
 1771|      7|        uint64_t *ry = pk + 9U;
 1772|      7|        uint64_t *rz = pk + 18U;
 1773|      7|        to_mont(rx, px);
 1774|      7|        to_mont(ry, py);
 1775|      7|        p521_make_fone(rz);
 1776|      7|    }
 1777|      7|    bool is_pk_valid = res;
 1778|      7|    uint64_t is_sk_valid = load_qelem_conditional(sk, private_key);
 1779|      7|    uint64_t ss_proj[27U] = { 0U };
 1780|      7|    if (is_pk_valid) {
  ------------------
  |  Branch (1780:9): [True: 7, False: 0]
  ------------------
 1781|      7|        point_mul(ss_proj, sk, pk);
 1782|      7|        uint64_t aff_p[18U] = { 0U };
 1783|      7|        uint64_t zinv[9U] = { 0U };
 1784|      7|        uint64_t *px = ss_proj;
 1785|      7|        uint64_t *py1 = ss_proj + 9U;
 1786|      7|        uint64_t *pz = ss_proj + 18U;
 1787|      7|        uint64_t *x = aff_p;
 1788|      7|        uint64_t *y = aff_p + 9U;
 1789|      7|        p521_finv(zinv, pz);
 1790|      7|        fmul0(x, px, zinv);
 1791|      7|        fmul0(y, py1, zinv);
 1792|      7|        from_mont(x, x);
 1793|      7|        from_mont(y, y);
 1794|      7|        uint64_t *px1 = aff_p;
 1795|      7|        uint64_t *py = aff_p + 9U;
 1796|      7|        bn_to_bytes_be(shared_secret, px1);
 1797|      7|        bn_to_bytes_be(shared_secret + 66U, py);
 1798|      7|    }
 1799|      7|    return is_sk_valid == 0xFFFFFFFFFFFFFFFFULL && is_pk_valid;
  ------------------
  |  Branch (1799:12): [True: 7, False: 0]
  |  Branch (1799:52): [True: 7, False: 0]
  ------------------
 1800|      7|}
Hacl_P521.c:bn_from_bytes_be:
  327|    553|{
  328|    553|    uint8_t tmp[72U] = { 0U };
  329|    553|    memcpy(tmp + 6U, b, 66U * sizeof(uint8_t));
  330|    553|    KRML_MAYBE_FOR9(i,
  ------------------
  |  |  360|    553|#define KRML_MAYBE_FOR9(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 9, k, x)
  |  |  ------------------
  |  |  |  |  288|    553|    do {                               \
  |  |  |  |  289|    553|        uint32_t i = z;                \
  |  |  |  |  290|    553|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|    553|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  331|    553|                    0U,
  332|    553|                    9U,
  333|    553|                    1U,
  334|    553|                    uint64_t *os = a;
  335|    553|                    uint64_t u = load64_be(tmp + (9U - i - 1U) * 8U);
  336|    553|                    uint64_t x = u;
  337|    553|                    os[i] = x;);
  338|    553|}
Hacl_P521.c:qmod_short:
  853|     87|{
  854|     87|    uint64_t tmp[9U] = { 0U };
  855|     87|    p521_make_order(tmp);
  856|     87|    uint64_t c = bn_sub(tmp, b, tmp);
  857|     87|    bn_cmovznz(a, c, tmp, b);
  858|     87|}
Hacl_P521.c:bn_cmovznz:
   46|     87|{
   47|     87|    uint64_t mask = ~FStar_UInt64_eq_mask(b, 0ULL);
   48|     87|    KRML_MAYBE_FOR9(i,
  ------------------
  |  |  360|     87|#define KRML_MAYBE_FOR9(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 9, k, x)
  |  |  ------------------
  |  |  |  |  288|     87|    do {                               \
  |  |  |  |  289|     87|        uint32_t i = z;                \
  |  |  |  |  290|     87|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     87|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   49|     87|                    0U,
   50|     87|                    9U,
   51|     87|                    1U,
   52|     87|                    uint64_t *os = a;
   53|     87|                    uint64_t uu____0 = c[i];
   54|     87|                    uint64_t x = uu____0 ^ (mask & (d[i] ^ uu____0));
   55|     87|                    os[i] = x;);
   56|     87|}
Hacl_P521.c:p521_qinv:
  894|     43|{
  895|     43|    uint64_t b[9U] = { 0U };
  896|     43|    b[0U] = 0xbb6fb71e91386407ULL;
  897|     43|    b[1U] = 0x3bb5c9b8899c47aeULL;
  898|     43|    b[2U] = 0x7fcc0148f709a5d0ULL;
  899|     43|    b[3U] = 0x51868783bf2f966bULL;
  900|     43|    b[4U] = 0xfffffffffffffffaULL;
  901|     43|    b[5U] = 0xffffffffffffffffULL;
  902|     43|    b[6U] = 0xffffffffffffffffULL;
  903|     43|    b[7U] = 0xffffffffffffffffULL;
  904|     43|    b[8U] = 0x1ffULL;
  905|     43|    uint64_t tmp[9U] = { 0U };
  906|     43|    memcpy(tmp, a, 9U * sizeof(uint64_t));
  907|     43|    uint64_t table[288U] = { 0U };
  908|     43|    uint64_t tmp1[9U] = { 0U };
  909|     43|    uint64_t *t0 = table;
  910|     43|    uint64_t *t1 = table + 9U;
  911|     43|    p521_make_qone(t0);
  912|     43|    memcpy(t1, tmp, 9U * sizeof(uint64_t));
  913|     43|    KRML_MAYBE_FOR15(i,
  ------------------
  |  |  396|     43|#define KRML_MAYBE_FOR15(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 15, k, x)
  |  |  ------------------
  |  |  |  |  288|     43|    do {                               \
  |  |  |  |  289|     43|        uint32_t i = z;                \
  |  |  |  |  290|     43|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     43|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  914|     43|                     0U,
  915|     43|                     15U,
  916|     43|                     1U,
  917|     43|                     uint64_t *t11 = table + (i + 1U) * 9U;
  918|     43|                     qsqr(tmp1, t11);
  919|     43|                     memcpy(table + (2U * i + 2U) * 9U, tmp1, 9U * sizeof(uint64_t));
  920|     43|                     uint64_t *t2 = table + (2U * i + 2U) * 9U;
  921|     43|                     qmul(tmp1, tmp, t2);
  922|     43|                     memcpy(table + (2U * i + 3U) * 9U, tmp1, 9U * sizeof(uint64_t)););
  923|     43|    uint32_t i0 = 520U;
  924|     43|    uint64_t bits_c = Hacl_Bignum_Lib_bn_get_bits_u64(9U, b, i0, 5U);
  925|     43|    memcpy(res, (uint64_t *)table, 9U * sizeof(uint64_t));
  926|  1.37k|    for (uint32_t i1 = 0U; i1 < 31U; i1++) {
  ------------------
  |  Branch (926:28): [True: 1.33k, False: 43]
  ------------------
  927|  1.33k|        uint64_t c = FStar_UInt64_eq_mask(bits_c, (uint64_t)(i1 + 1U));
  928|  1.33k|        const uint64_t *res_j = table + (i1 + 1U) * 9U;
  929|  1.33k|        KRML_MAYBE_FOR9(i,
  ------------------
  |  |  360|  1.33k|#define KRML_MAYBE_FOR9(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 9, k, x)
  |  |  ------------------
  |  |  |  |  288|  1.33k|    do {                               \
  |  |  |  |  289|  1.33k|        uint32_t i = z;                \
  |  |  |  |  290|  1.33k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  1.33k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  930|  1.33k|                        0U,
  931|  1.33k|                        9U,
  932|  1.33k|                        1U,
  933|  1.33k|                        uint64_t *os = res;
  934|  1.33k|                        uint64_t x = (c & res_j[i]) | (~c & res[i]);
  935|  1.33k|                        os[i] = x;);
  936|  1.33k|    }
  937|     43|    uint64_t tmp10[9U] = { 0U };
  938|  4.51k|    for (uint32_t i1 = 0U; i1 < 104U; i1++) {
  ------------------
  |  Branch (938:28): [True: 4.47k, False: 43]
  ------------------
  939|  4.47k|        KRML_MAYBE_FOR5(i, 0U, 5U, 1U, qsqr(res, res););
  ------------------
  |  |  336|  4.47k|#define KRML_MAYBE_FOR5(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 5, k, x)
  |  |  ------------------
  |  |  |  |  288|  4.47k|    do {                               \
  |  |  |  |  289|  4.47k|        uint32_t i = z;                \
  |  |  |  |  290|  4.47k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  4.47k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  940|  4.47k|        uint32_t k = 520U - 5U * i1 - 5U;
  941|  4.47k|        uint64_t bits_l = Hacl_Bignum_Lib_bn_get_bits_u64(9U, b, k, 5U);
  942|  4.47k|        memcpy(tmp10, (uint64_t *)table, 9U * sizeof(uint64_t));
  943|   143k|        for (uint32_t i2 = 0U; i2 < 31U; i2++) {
  ------------------
  |  Branch (943:32): [True: 138k, False: 4.47k]
  ------------------
  944|   138k|            uint64_t c = FStar_UInt64_eq_mask(bits_l, (uint64_t)(i2 + 1U));
  945|   138k|            const uint64_t *res_j = table + (i2 + 1U) * 9U;
  946|   138k|            KRML_MAYBE_FOR9(i,
  ------------------
  |  |  360|   138k|#define KRML_MAYBE_FOR9(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 9, k, x)
  |  |  ------------------
  |  |  |  |  288|   138k|    do {                               \
  |  |  |  |  289|   138k|        uint32_t i = z;                \
  |  |  |  |  290|   138k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|   138k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  947|   138k|                            0U,
  948|   138k|                            9U,
  949|   138k|                            1U,
  950|   138k|                            uint64_t *os = tmp10;
  951|   138k|                            uint64_t x = (c & res_j[i]) | (~c & tmp10[i]);
  952|   138k|                            os[i] = x;);
  953|   138k|        }
  954|  4.47k|        qmul(res, res, tmp10);
  955|  4.47k|    }
  956|     43|}
Hacl_P521.c:p521_make_qone:
  461|     43|{
  462|     43|    f[0U] = 0xfb80000000000000ULL;
  463|     43|    f[1U] = 0x28a2482470b763cdULL;
  464|     43|    f[2U] = 0x17e2251b23bb31dcULL;
  465|     43|    f[3U] = 0xca4019ff5b847b2dULL;
  466|     43|    f[4U] = 0x2d73cbc3e206834ULL;
  467|     43|    f[5U] = 0x0ULL;
  468|     43|    f[6U] = 0x0ULL;
  469|     43|    f[7U] = 0x0ULL;
  470|     43|    f[8U] = 0x0ULL;
  471|     43|}
Hacl_P521.c:qsqr:
  878|  23.0k|{
  879|  23.0k|    uint64_t tmp[18U] = { 0U };
  880|  23.0k|    bn_sqr(tmp, b);
  881|  23.0k|    qmont_reduction(a, tmp);
  882|  23.0k|}
Hacl_P521.c:bn_sqr:
  271|   281k|{
  272|   281k|    memset(a, 0U, 18U * sizeof(uint64_t));
  273|   281k|    KRML_MAYBE_FOR9(
  ------------------
  |  |  360|   281k|#define KRML_MAYBE_FOR9(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 9, k, x)
  |  |  ------------------
  |  |  |  |  288|   281k|    do {                               \
  |  |  |  |  289|   281k|        uint32_t i = z;                \
  |  |  |  |  290|   281k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|   281k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  274|   281k|        i0,
  275|   281k|        0U,
  276|   281k|        9U,
  277|   281k|        1U,
  278|   281k|        uint64_t *ab = b;
  279|   281k|        uint64_t a_j = b[i0];
  280|   281k|        uint64_t *res_j = a + i0;
  281|   281k|        uint64_t c = 0ULL;
  282|   281k|        for (uint32_t i = 0U; i < i0 / 4U; i++) {
  283|   281k|            uint64_t a_i = ab[4U * i];
  284|   281k|            uint64_t *res_i0 = res_j + 4U * i;
  285|   281k|            c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i, a_j, c, res_i0);
  286|   281k|            uint64_t a_i0 = ab[4U * i + 1U];
  287|   281k|            uint64_t *res_i1 = res_j + 4U * i + 1U;
  288|   281k|            c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i0, a_j, c, res_i1);
  289|   281k|            uint64_t a_i1 = ab[4U * i + 2U];
  290|   281k|            uint64_t *res_i2 = res_j + 4U * i + 2U;
  291|   281k|            c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i1, a_j, c, res_i2);
  292|   281k|            uint64_t a_i2 = ab[4U * i + 3U];
  293|   281k|            uint64_t *res_i = res_j + 4U * i + 3U;
  294|   281k|            c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i2, a_j, c, res_i);
  295|   281k|        } for (uint32_t i = i0 / 4U * 4U; i < i0; i++) {
  296|   281k|            uint64_t a_i = ab[i];
  297|   281k|            uint64_t *res_i = res_j + i;
  298|   281k|            c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i, a_j, c, res_i);
  299|   281k|        } uint64_t r = c;
  300|   281k|        a[i0 + i0] = r;);
  301|   281k|    uint64_t c0 = Hacl_Bignum_Addition_bn_add_eq_len_u64(18U, a, a, a);
  302|   281k|    KRML_MAYBE_UNUSED_VAR(c0);
  ------------------
  |  |   60|   281k|#define KRML_MAYBE_UNUSED_VAR(x) KRML_HOST_IGNORE(x)
  |  |  ------------------
  |  |  |  |   56|   281k|#define KRML_HOST_IGNORE(x) (void)(x)
  |  |  ------------------
  ------------------
  303|   281k|    uint64_t tmp[18U] = { 0U };
  304|   281k|    KRML_MAYBE_FOR9(i,
  ------------------
  |  |  360|   281k|#define KRML_MAYBE_FOR9(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 9, k, x)
  |  |  ------------------
  |  |  |  |  288|   281k|    do {                               \
  |  |  |  |  289|   281k|        uint32_t i = z;                \
  |  |  |  |  290|   281k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|   281k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  305|   281k|                    0U,
  306|   281k|                    9U,
  307|   281k|                    1U,
  308|   281k|                    FStar_UInt128_uint128 res = FStar_UInt128_mul_wide(b[i], b[i]);
  309|   281k|                    uint64_t hi = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(res, 64U));
  310|   281k|                    uint64_t lo = FStar_UInt128_uint128_to_uint64(res);
  311|   281k|                    tmp[2U * i] = lo;
  312|   281k|                    tmp[2U * i + 1U] = hi;);
  313|   281k|    uint64_t c1 = Hacl_Bignum_Addition_bn_add_eq_len_u64(18U, a, tmp, a);
  314|   281k|    KRML_MAYBE_UNUSED_VAR(c1);
  ------------------
  |  |   60|   281k|#define KRML_MAYBE_UNUSED_VAR(x) KRML_HOST_IGNORE(x)
  |  |  ------------------
  |  |  |  |   56|   281k|#define KRML_HOST_IGNORE(x) (void)(x)
  |  |  ------------------
  ------------------
  315|   281k|}
Hacl_P521.c:qmont_reduction:
  555|  28.2k|{
  556|  28.2k|    uint64_t n[9U] = { 0U };
  557|  28.2k|    p521_make_order(n);
  558|  28.2k|    uint64_t c0 = 0ULL;
  559|  28.2k|    KRML_MAYBE_FOR9(
  ------------------
  |  |  360|  28.2k|#define KRML_MAYBE_FOR9(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 9, k, x)
  |  |  ------------------
  |  |  |  |  288|  28.2k|    do {                               \
  |  |  |  |  289|  28.2k|        uint32_t i = z;                \
  |  |  |  |  290|  28.2k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  28.2k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  560|  28.2k|        i0,
  561|  28.2k|        0U,
  562|  28.2k|        9U,
  563|  28.2k|        1U,
  564|  28.2k|        uint64_t qj = 2103001588584519111ULL * x[i0];
  565|  28.2k|        uint64_t *res_j0 = x + i0;
  566|  28.2k|        uint64_t c = 0ULL;
  567|  28.2k|        KRML_MAYBE_FOR2(i,
  568|  28.2k|                        0U,
  569|  28.2k|                        2U,
  570|  28.2k|                        1U,
  571|  28.2k|                        uint64_t a_i = n[4U * i];
  572|  28.2k|                        uint64_t *res_i0 = res_j0 + 4U * i;
  573|  28.2k|                        c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i, qj, c, res_i0);
  574|  28.2k|                        uint64_t a_i0 = n[4U * i + 1U];
  575|  28.2k|                        uint64_t *res_i1 = res_j0 + 4U * i + 1U;
  576|  28.2k|                        c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i0, qj, c, res_i1);
  577|  28.2k|                        uint64_t a_i1 = n[4U * i + 2U];
  578|  28.2k|                        uint64_t *res_i2 = res_j0 + 4U * i + 2U;
  579|  28.2k|                        c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i1, qj, c, res_i2);
  580|  28.2k|                        uint64_t a_i2 = n[4U * i + 3U];
  581|  28.2k|                        uint64_t *res_i = res_j0 + 4U * i + 3U;
  582|  28.2k|                        c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i2, qj, c, res_i););
  583|  28.2k|        {
  584|  28.2k|            uint64_t a_i = n[8U];
  585|  28.2k|            uint64_t *res_i = res_j0 + 8U;
  586|  28.2k|            c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i, qj, c, res_i);
  587|  28.2k|        } uint64_t r = c;
  588|  28.2k|        uint64_t c1 = r;
  589|  28.2k|        uint64_t *resb = x + 9U + i0;
  590|  28.2k|        uint64_t res_j = x[9U + i0];
  591|  28.2k|        c0 = Lib_IntTypes_Intrinsics_add_carry_u64(c0, c1, res_j, resb););
  592|  28.2k|    memcpy(res, x + 9U, 9U * sizeof(uint64_t));
  593|  28.2k|    uint64_t c00 = c0;
  594|  28.2k|    uint64_t tmp[9U] = { 0U };
  595|  28.2k|    uint64_t c = 0ULL;
  596|  28.2k|    KRML_MAYBE_FOR2(i,
  ------------------
  |  |  318|  28.2k|#define KRML_MAYBE_FOR2(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 2, k, x)
  |  |  ------------------
  |  |  |  |  288|  28.2k|    do {                               \
  |  |  |  |  289|  28.2k|        uint32_t i = z;                \
  |  |  |  |  290|  28.2k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  28.2k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  597|  28.2k|                    0U,
  598|  28.2k|                    2U,
  599|  28.2k|                    1U,
  600|  28.2k|                    uint64_t t1 = res[4U * i];
  601|  28.2k|                    uint64_t t20 = n[4U * i];
  602|  28.2k|                    uint64_t *res_i0 = tmp + 4U * i;
  603|  28.2k|                    c = Lib_IntTypes_Intrinsics_sub_borrow_u64(c, t1, t20, res_i0);
  604|  28.2k|                    uint64_t t10 = res[4U * i + 1U];
  605|  28.2k|                    uint64_t t21 = n[4U * i + 1U];
  606|  28.2k|                    uint64_t *res_i1 = tmp + 4U * i + 1U;
  607|  28.2k|                    c = Lib_IntTypes_Intrinsics_sub_borrow_u64(c, t10, t21, res_i1);
  608|  28.2k|                    uint64_t t11 = res[4U * i + 2U];
  609|  28.2k|                    uint64_t t22 = n[4U * i + 2U];
  610|  28.2k|                    uint64_t *res_i2 = tmp + 4U * i + 2U;
  611|  28.2k|                    c = Lib_IntTypes_Intrinsics_sub_borrow_u64(c, t11, t22, res_i2);
  612|  28.2k|                    uint64_t t12 = res[4U * i + 3U];
  613|  28.2k|                    uint64_t t2 = n[4U * i + 3U];
  614|  28.2k|                    uint64_t *res_i = tmp + 4U * i + 3U;
  615|  28.2k|                    c = Lib_IntTypes_Intrinsics_sub_borrow_u64(c, t12, t2, res_i););
  616|  28.2k|    {
  617|  28.2k|        uint64_t t1 = res[8U];
  618|  28.2k|        uint64_t t2 = n[8U];
  619|  28.2k|        uint64_t *res_i = tmp + 8U;
  620|  28.2k|        c = Lib_IntTypes_Intrinsics_sub_borrow_u64(c, t1, t2, res_i);
  ------------------
  |  |   89|  28.2k|    (_subborrow_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  621|  28.2k|    }
  622|  28.2k|    uint64_t c1 = c;
  623|  28.2k|    uint64_t c2 = c00 - c1;
  624|  28.2k|    KRML_MAYBE_FOR9(i,
  ------------------
  |  |  360|  28.2k|#define KRML_MAYBE_FOR9(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 9, k, x)
  |  |  ------------------
  |  |  |  |  288|  28.2k|    do {                               \
  |  |  |  |  289|  28.2k|        uint32_t i = z;                \
  |  |  |  |  290|  28.2k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  28.2k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  625|  28.2k|                    0U,
  626|  28.2k|                    9U,
  627|  28.2k|                    1U,
  628|  28.2k|                    uint64_t *os = res;
  629|  28.2k|                    uint64_t x1 = (c2 & res[i]) | (~c2 & tmp[i]);
  630|  28.2k|                    os[i] = x1;);
  631|  28.2k|}
Hacl_P521.c:qmul:
  870|  5.20k|{
  871|  5.20k|    uint64_t tmp[18U] = { 0U };
  872|  5.20k|    bn_mul(tmp, b, c);
  873|  5.20k|    qmont_reduction(a, tmp);
  874|  5.20k|}
Hacl_P521.c:bn_mul:
  235|   973k|{
  236|   973k|    memset(a, 0U, 18U * sizeof(uint64_t));
  237|   973k|    KRML_MAYBE_FOR9(
  ------------------
  |  |  360|   973k|#define KRML_MAYBE_FOR9(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 9, k, x)
  |  |  ------------------
  |  |  |  |  288|   973k|    do {                               \
  |  |  |  |  289|   973k|        uint32_t i = z;                \
  |  |  |  |  290|   973k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|   973k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  238|   973k|        i0,
  239|   973k|        0U,
  240|   973k|        9U,
  241|   973k|        1U,
  242|   973k|        uint64_t bj = c[i0];
  243|   973k|        uint64_t *res_j = a + i0;
  244|   973k|        uint64_t c1 = 0ULL;
  245|   973k|        KRML_MAYBE_FOR2(i,
  246|   973k|                        0U,
  247|   973k|                        2U,
  248|   973k|                        1U,
  249|   973k|                        uint64_t a_i = b[4U * i];
  250|   973k|                        uint64_t *res_i0 = res_j + 4U * i;
  251|   973k|                        c1 = Hacl_Bignum_Base_mul_wide_add2_u64(a_i, bj, c1, res_i0);
  252|   973k|                        uint64_t a_i0 = b[4U * i + 1U];
  253|   973k|                        uint64_t *res_i1 = res_j + 4U * i + 1U;
  254|   973k|                        c1 = Hacl_Bignum_Base_mul_wide_add2_u64(a_i0, bj, c1, res_i1);
  255|   973k|                        uint64_t a_i1 = b[4U * i + 2U];
  256|   973k|                        uint64_t *res_i2 = res_j + 4U * i + 2U;
  257|   973k|                        c1 = Hacl_Bignum_Base_mul_wide_add2_u64(a_i1, bj, c1, res_i2);
  258|   973k|                        uint64_t a_i2 = b[4U * i + 3U];
  259|   973k|                        uint64_t *res_i = res_j + 4U * i + 3U;
  260|   973k|                        c1 = Hacl_Bignum_Base_mul_wide_add2_u64(a_i2, bj, c1, res_i););
  261|   973k|        {
  262|   973k|            uint64_t a_i = b[8U];
  263|   973k|            uint64_t *res_i = res_j + 8U;
  264|   973k|            c1 = Hacl_Bignum_Base_mul_wide_add2_u64(a_i, bj, c1, res_i);
  265|   973k|        } uint64_t r = c1;
  266|   973k|        a[9U + i0] = r;);
  267|   973k|}
Hacl_P521.c:from_qmont:
  886|     86|{
  887|     86|    uint64_t tmp[18U] = { 0U };
  888|     86|    memcpy(tmp, b, 9U * sizeof(uint64_t));
  889|     86|    qmont_reduction(a, tmp);
  890|     86|}
Hacl_P521.c:bn_add_mod:
   60|  1.41M|{
   61|  1.41M|    uint64_t c10 = 0ULL;
   62|  1.41M|    KRML_MAYBE_FOR2(i,
  ------------------
  |  |  318|  1.41M|#define KRML_MAYBE_FOR2(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 2, k, x)
  |  |  ------------------
  |  |  |  |  288|  1.41M|    do {                               \
  |  |  |  |  289|  1.41M|        uint32_t i = z;                \
  |  |  |  |  290|  1.41M|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  1.41M|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   63|  1.41M|                    0U,
   64|  1.41M|                    2U,
   65|  1.41M|                    1U,
   66|  1.41M|                    uint64_t t1 = c[4U * i];
   67|  1.41M|                    uint64_t t20 = d[4U * i];
   68|  1.41M|                    uint64_t *res_i0 = a + 4U * i;
   69|  1.41M|                    c10 = Lib_IntTypes_Intrinsics_add_carry_u64(c10, t1, t20, res_i0);
   70|  1.41M|                    uint64_t t10 = c[4U * i + 1U];
   71|  1.41M|                    uint64_t t21 = d[4U * i + 1U];
   72|  1.41M|                    uint64_t *res_i1 = a + 4U * i + 1U;
   73|  1.41M|                    c10 = Lib_IntTypes_Intrinsics_add_carry_u64(c10, t10, t21, res_i1);
   74|  1.41M|                    uint64_t t11 = c[4U * i + 2U];
   75|  1.41M|                    uint64_t t22 = d[4U * i + 2U];
   76|  1.41M|                    uint64_t *res_i2 = a + 4U * i + 2U;
   77|  1.41M|                    c10 = Lib_IntTypes_Intrinsics_add_carry_u64(c10, t11, t22, res_i2);
   78|  1.41M|                    uint64_t t12 = c[4U * i + 3U];
   79|  1.41M|                    uint64_t t2 = d[4U * i + 3U];
   80|  1.41M|                    uint64_t *res_i = a + 4U * i + 3U;
   81|  1.41M|                    c10 = Lib_IntTypes_Intrinsics_add_carry_u64(c10, t12, t2, res_i););
   82|  1.41M|    {
   83|  1.41M|        uint64_t t1 = c[8U];
   84|  1.41M|        uint64_t t2 = d[8U];
   85|  1.41M|        uint64_t *res_i = a + 8U;
   86|  1.41M|        c10 = Lib_IntTypes_Intrinsics_add_carry_u64(c10, t1, t2, res_i);
  ------------------
  |  |   66|  1.41M|    (_addcarry_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
   87|  1.41M|    }
   88|  1.41M|    uint64_t c0 = c10;
   89|  1.41M|    uint64_t tmp[9U] = { 0U };
   90|  1.41M|    uint64_t c1 = 0ULL;
   91|  1.41M|    KRML_MAYBE_FOR2(i,
  ------------------
  |  |  318|  1.41M|#define KRML_MAYBE_FOR2(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 2, k, x)
  |  |  ------------------
  |  |  |  |  288|  1.41M|    do {                               \
  |  |  |  |  289|  1.41M|        uint32_t i = z;                \
  |  |  |  |  290|  1.41M|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  1.41M|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   92|  1.41M|                    0U,
   93|  1.41M|                    2U,
   94|  1.41M|                    1U,
   95|  1.41M|                    uint64_t t1 = a[4U * i];
   96|  1.41M|                    uint64_t t20 = b[4U * i];
   97|  1.41M|                    uint64_t *res_i0 = tmp + 4U * i;
   98|  1.41M|                    c1 = Lib_IntTypes_Intrinsics_sub_borrow_u64(c1, t1, t20, res_i0);
   99|  1.41M|                    uint64_t t10 = a[4U * i + 1U];
  100|  1.41M|                    uint64_t t21 = b[4U * i + 1U];
  101|  1.41M|                    uint64_t *res_i1 = tmp + 4U * i + 1U;
  102|  1.41M|                    c1 = Lib_IntTypes_Intrinsics_sub_borrow_u64(c1, t10, t21, res_i1);
  103|  1.41M|                    uint64_t t11 = a[4U * i + 2U];
  104|  1.41M|                    uint64_t t22 = b[4U * i + 2U];
  105|  1.41M|                    uint64_t *res_i2 = tmp + 4U * i + 2U;
  106|  1.41M|                    c1 = Lib_IntTypes_Intrinsics_sub_borrow_u64(c1, t11, t22, res_i2);
  107|  1.41M|                    uint64_t t12 = a[4U * i + 3U];
  108|  1.41M|                    uint64_t t2 = b[4U * i + 3U];
  109|  1.41M|                    uint64_t *res_i = tmp + 4U * i + 3U;
  110|  1.41M|                    c1 = Lib_IntTypes_Intrinsics_sub_borrow_u64(c1, t12, t2, res_i););
  111|  1.41M|    {
  112|  1.41M|        uint64_t t1 = a[8U];
  113|  1.41M|        uint64_t t2 = b[8U];
  114|  1.41M|        uint64_t *res_i = tmp + 8U;
  115|  1.41M|        c1 = Lib_IntTypes_Intrinsics_sub_borrow_u64(c1, t1, t2, res_i);
  ------------------
  |  |   89|  1.41M|    (_subborrow_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  116|  1.41M|    }
  117|  1.41M|    uint64_t c11 = c1;
  118|  1.41M|    uint64_t c2 = c0 - c11;
  119|  1.41M|    KRML_MAYBE_FOR9(i,
  ------------------
  |  |  360|  1.41M|#define KRML_MAYBE_FOR9(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 9, k, x)
  |  |  ------------------
  |  |  |  |  288|  1.41M|    do {                               \
  |  |  |  |  289|  1.41M|        uint32_t i = z;                \
  |  |  |  |  290|  1.41M|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  1.41M|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  120|  1.41M|                    0U,
  121|  1.41M|                    9U,
  122|  1.41M|                    1U,
  123|  1.41M|                    uint64_t *os = a;
  124|  1.41M|                    uint64_t x = (c2 & a[i]) | (~c2 & tmp[i]);
  125|  1.41M|                    os[i] = x;);
  126|  1.41M|}
Hacl_P521.c:ecdsa_verify_msg_as_qelem:
 1232|     44|{
 1233|     44|    uint64_t tmp[63U] = { 0U };
 1234|     44|    uint64_t *pk = tmp;
 1235|     44|    uint64_t *r_q = tmp + 27U;
 1236|     44|    uint64_t *s_q = tmp + 36U;
 1237|     44|    uint64_t *u1 = tmp + 45U;
 1238|     44|    uint64_t *u2 = tmp + 54U;
 1239|     44|    uint64_t p_aff[18U] = { 0U };
 1240|     44|    uint8_t *p_x = public_key;
 1241|     44|    uint8_t *p_y = public_key + 66U;
 1242|     44|    uint64_t *bn_p_x = p_aff;
 1243|     44|    uint64_t *bn_p_y = p_aff + 9U;
 1244|     44|    bn_from_bytes_be(bn_p_x, p_x);
 1245|     44|    bn_from_bytes_be(bn_p_y, p_y);
 1246|     44|    uint64_t *px0 = p_aff;
 1247|     44|    uint64_t *py0 = p_aff + 9U;
 1248|     44|    uint64_t lessX = bn_is_lt_prime_mask(px0);
 1249|     44|    uint64_t lessY = bn_is_lt_prime_mask(py0);
 1250|     44|    uint64_t res0 = lessX & lessY;
 1251|     44|    bool is_xy_valid = res0 == 0xFFFFFFFFFFFFFFFFULL;
 1252|     44|    bool res;
 1253|     44|    if (!is_xy_valid) {
  ------------------
  |  Branch (1253:9): [True: 0, False: 44]
  ------------------
 1254|      0|        res = false;
 1255|     44|    } else {
 1256|     44|        uint64_t rp[9U] = { 0U };
 1257|     44|        uint64_t tx[9U] = { 0U };
 1258|     44|        uint64_t ty[9U] = { 0U };
 1259|     44|        uint64_t *px = p_aff;
 1260|     44|        uint64_t *py = p_aff + 9U;
 1261|     44|        to_mont(tx, px);
 1262|     44|        to_mont(ty, py);
 1263|     44|        uint64_t tmp1[9U] = { 0U };
 1264|     44|        fsqr0(rp, tx);
 1265|     44|        fmul0(rp, rp, tx);
 1266|     44|        p521_make_a_coeff(tmp1);
 1267|     44|        fmul0(tmp1, tmp1, tx);
 1268|     44|        fadd0(rp, tmp1, rp);
 1269|     44|        p521_make_b_coeff(tmp1);
 1270|     44|        fadd0(rp, tmp1, rp);
 1271|     44|        fsqr0(ty, ty);
 1272|     44|        uint64_t r = bn_is_eq_mask(ty, rp);
 1273|     44|        uint64_t r0 = r;
 1274|     44|        bool r1 = r0 == 0xFFFFFFFFFFFFFFFFULL;
 1275|     44|        res = r1;
 1276|     44|    }
 1277|     44|    if (res) {
  ------------------
  |  Branch (1277:9): [True: 44, False: 0]
  ------------------
 1278|     44|        uint64_t *px = p_aff;
 1279|     44|        uint64_t *py = p_aff + 9U;
 1280|     44|        uint64_t *rx = pk;
 1281|     44|        uint64_t *ry = pk + 9U;
 1282|     44|        uint64_t *rz = pk + 18U;
 1283|     44|        to_mont(rx, px);
 1284|     44|        to_mont(ry, py);
 1285|     44|        p521_make_fone(rz);
 1286|     44|    }
 1287|     44|    bool is_pk_valid = res;
 1288|     44|    bn_from_bytes_be(r_q, signature_r);
 1289|     44|    bn_from_bytes_be(s_q, signature_s);
 1290|     44|    uint64_t tmp10[9U] = { 0U };
 1291|     44|    p521_make_order(tmp10);
 1292|     44|    uint64_t c = bn_sub(tmp10, r_q, tmp10);
 1293|     44|    uint64_t is_lt_order = FStar_UInt64_gte_mask(c, 0ULL) & ~FStar_UInt64_eq_mask(c, 0ULL);
 1294|     44|    uint64_t bn_zero0[9U] = { 0U };
 1295|     44|    uint64_t res1 = bn_is_eq_mask(r_q, bn_zero0);
 1296|     44|    uint64_t is_eq_zero = res1;
 1297|     44|    uint64_t is_r_valid = is_lt_order & ~is_eq_zero;
 1298|     44|    uint64_t tmp11[9U] = { 0U };
 1299|     44|    p521_make_order(tmp11);
 1300|     44|    uint64_t c0 = bn_sub(tmp11, s_q, tmp11);
 1301|     44|    uint64_t is_lt_order0 = FStar_UInt64_gte_mask(c0, 0ULL) & ~FStar_UInt64_eq_mask(c0, 0ULL);
 1302|     44|    uint64_t bn_zero1[9U] = { 0U };
 1303|     44|    uint64_t res2 = bn_is_eq_mask(s_q, bn_zero1);
 1304|     44|    uint64_t is_eq_zero0 = res2;
 1305|     44|    uint64_t is_s_valid = is_lt_order0 & ~is_eq_zero0;
 1306|     44|    bool is_rs_valid = is_r_valid == 0xFFFFFFFFFFFFFFFFULL && is_s_valid == 0xFFFFFFFFFFFFFFFFULL;
  ------------------
  |  Branch (1306:24): [True: 44, False: 0]
  |  Branch (1306:63): [True: 43, False: 1]
  ------------------
 1307|     44|    if (!(is_pk_valid && is_rs_valid)) {
  ------------------
  |  Branch (1307:11): [True: 44, False: 0]
  |  Branch (1307:26): [True: 43, False: 1]
  ------------------
 1308|      1|        return false;
 1309|      1|    }
 1310|     43|    uint64_t sinv[9U] = { 0U };
 1311|     43|    p521_qinv(sinv, s_q);
 1312|     43|    uint64_t tmp1[9U] = { 0U };
 1313|     43|    from_qmont(tmp1, m_q);
 1314|     43|    qmul(u1, sinv, tmp1);
 1315|     43|    uint64_t tmp12[9U] = { 0U };
 1316|     43|    from_qmont(tmp12, r_q);
 1317|     43|    qmul(u2, sinv, tmp12);
 1318|     43|    uint64_t res3[27U] = { 0U };
 1319|     43|    point_mul_double_g(res3, u1, u2, pk);
 1320|     43|    uint64_t *pz0 = res3 + 18U;
 1321|     43|    uint64_t bn_zero[9U] = { 0U };
 1322|     43|    uint64_t res10 = bn_is_eq_mask(pz0, bn_zero);
 1323|     43|    uint64_t m = res10;
 1324|     43|    if (m == 0xFFFFFFFFFFFFFFFFULL) {
  ------------------
  |  Branch (1324:9): [True: 0, False: 43]
  ------------------
 1325|      0|        return false;
 1326|      0|    }
 1327|     43|    uint64_t x[9U] = { 0U };
 1328|     43|    uint64_t zinv[9U] = { 0U };
 1329|     43|    uint64_t *px = res3;
 1330|     43|    uint64_t *pz = res3 + 18U;
 1331|     43|    p521_finv(zinv, pz);
 1332|     43|    fmul0(x, px, zinv);
 1333|     43|    from_mont(x, x);
 1334|     43|    qmod_short(x, x);
 1335|     43|    uint64_t m0 = bn_is_eq_mask(x, r_q);
 1336|     43|    bool res11 = m0 == 0xFFFFFFFFFFFFFFFFULL;
 1337|     43|    return res11;
 1338|     43|}
Hacl_P521.c:point_mul_double_g:
 1176|     43|{
 1177|     43|    uint64_t tmp[27U] = { 0U };
 1178|     43|    point_mul_g(tmp, scalar1);
 1179|     43|    point_mul(res, scalar2, p);
 1180|     43|    point_add(res, tmp, res);
 1181|     43|}
Hacl_P521.c:point_add:
  960|  18.2k|{
  961|  18.2k|    uint64_t tmp[81U] = { 0U };
  962|  18.2k|    uint64_t *t0 = tmp;
  963|  18.2k|    uint64_t *t1 = tmp + 54U;
  964|  18.2k|    uint64_t *x3 = t1;
  965|  18.2k|    uint64_t *y3 = t1 + 9U;
  966|  18.2k|    uint64_t *z3 = t1 + 18U;
  967|  18.2k|    uint64_t *t01 = t0;
  968|  18.2k|    uint64_t *t11 = t0 + 9U;
  969|  18.2k|    uint64_t *t2 = t0 + 18U;
  970|  18.2k|    uint64_t *t3 = t0 + 27U;
  971|  18.2k|    uint64_t *t4 = t0 + 36U;
  972|  18.2k|    uint64_t *t5 = t0 + 45U;
  973|  18.2k|    uint64_t *x1 = x;
  974|  18.2k|    uint64_t *y1 = x + 9U;
  975|  18.2k|    uint64_t *z10 = x + 18U;
  976|  18.2k|    uint64_t *x20 = y;
  977|  18.2k|    uint64_t *y20 = y + 9U;
  978|  18.2k|    uint64_t *z20 = y + 18U;
  979|  18.2k|    fmul0(t01, x1, x20);
  980|  18.2k|    fmul0(t11, y1, y20);
  981|  18.2k|    fmul0(t2, z10, z20);
  982|  18.2k|    fadd0(t3, x1, y1);
  983|  18.2k|    fadd0(t4, x20, y20);
  984|  18.2k|    fmul0(t3, t3, t4);
  985|  18.2k|    fadd0(t4, t01, t11);
  986|  18.2k|    uint64_t *y10 = x + 9U;
  987|  18.2k|    uint64_t *z11 = x + 18U;
  988|  18.2k|    uint64_t *y2 = y + 9U;
  989|  18.2k|    uint64_t *z21 = y + 18U;
  990|  18.2k|    fsub0(t3, t3, t4);
  991|  18.2k|    fadd0(t4, y10, z11);
  992|  18.2k|    fadd0(t5, y2, z21);
  993|  18.2k|    fmul0(t4, t4, t5);
  994|  18.2k|    fadd0(t5, t11, t2);
  995|  18.2k|    fsub0(t4, t4, t5);
  996|  18.2k|    uint64_t *x10 = x;
  997|  18.2k|    uint64_t *z1 = x + 18U;
  998|  18.2k|    uint64_t *x2 = y;
  999|  18.2k|    uint64_t *z2 = y + 18U;
 1000|  18.2k|    fadd0(x3, x10, z1);
 1001|  18.2k|    fadd0(y3, x2, z2);
 1002|  18.2k|    fmul0(x3, x3, y3);
 1003|  18.2k|    fadd0(y3, t01, t2);
 1004|  18.2k|    fsub0(y3, x3, y3);
 1005|  18.2k|    uint64_t b_coeff[9U] = { 0U };
 1006|  18.2k|    p521_make_b_coeff(b_coeff);
 1007|  18.2k|    fmul0(z3, b_coeff, t2);
 1008|  18.2k|    fsub0(x3, y3, z3);
 1009|  18.2k|    fadd0(z3, x3, x3);
 1010|  18.2k|    fadd0(x3, x3, z3);
 1011|  18.2k|    fsub0(z3, t11, x3);
 1012|  18.2k|    fadd0(x3, t11, x3);
 1013|  18.2k|    uint64_t b_coeff0[9U] = { 0U };
 1014|  18.2k|    p521_make_b_coeff(b_coeff0);
 1015|  18.2k|    fmul0(y3, b_coeff0, y3);
 1016|  18.2k|    fadd0(t11, t2, t2);
 1017|  18.2k|    fadd0(t2, t11, t2);
 1018|  18.2k|    fsub0(y3, y3, t2);
 1019|  18.2k|    fsub0(y3, y3, t01);
 1020|  18.2k|    fadd0(t11, y3, y3);
 1021|  18.2k|    fadd0(y3, t11, y3);
 1022|  18.2k|    fadd0(t11, t01, t01);
 1023|  18.2k|    fadd0(t01, t11, t01);
 1024|  18.2k|    fsub0(t01, t01, t2);
 1025|  18.2k|    fmul0(t11, t4, y3);
 1026|  18.2k|    fmul0(t2, t01, y3);
 1027|  18.2k|    fmul0(y3, x3, z3);
 1028|  18.2k|    fadd0(y3, y3, t2);
 1029|  18.2k|    fmul0(x3, t3, x3);
 1030|  18.2k|    fsub0(x3, x3, t11);
 1031|  18.2k|    fmul0(z3, t4, z3);
 1032|  18.2k|    fmul0(t11, t3, t01);
 1033|  18.2k|    fadd0(z3, z3, t11);
 1034|  18.2k|    memcpy(xy, t1, 27U * sizeof(uint64_t));
 1035|  18.2k|}
Hacl_P521.c:bn_is_lt_prime_mask:
  635|    334|{
  636|    334|    uint64_t tmp[9U] = { 0U };
  637|    334|    p521_make_prime(tmp);
  638|    334|    uint64_t c = bn_sub(tmp, f, tmp);
  639|    334|    uint64_t m = FStar_UInt64_gte_mask(c, 0ULL) & ~FStar_UInt64_eq_mask(c, 0ULL);
  640|    334|    return m;
  641|    334|}
Hacl_P521.c:p521_make_prime:
  342|  3.22M|{
  343|  3.22M|    n[0U] = 0xffffffffffffffffULL;
  344|  3.22M|    n[1U] = 0xffffffffffffffffULL;
  345|  3.22M|    n[2U] = 0xffffffffffffffffULL;
  346|  3.22M|    n[3U] = 0xffffffffffffffffULL;
  347|  3.22M|    n[4U] = 0xffffffffffffffffULL;
  348|  3.22M|    n[5U] = 0xffffffffffffffffULL;
  349|  3.22M|    n[6U] = 0xffffffffffffffffULL;
  350|  3.22M|    n[7U] = 0xffffffffffffffffULL;
  351|  3.22M|    n[8U] = 0x1ffULL;
  352|  3.22M|}
Hacl_P521.c:to_mont:
  685|    614|{
  686|    614|    uint64_t r2modn[9U] = { 0U };
  687|    614|    p521_make_fmont_R2(r2modn);
  688|    614|    uint64_t tmp[18U] = { 0U };
  689|    614|    bn_mul(tmp, b, r2modn);
  690|    614|    fmont_reduction(a, tmp);
  691|    614|}
Hacl_P521.c:p521_make_fmont_R2:
  426|    614|{
  427|    614|    n[0U] = 0x0ULL;
  428|    614|    n[1U] = 0x400000000000ULL;
  429|    614|    n[2U] = 0x0ULL;
  430|    614|    n[3U] = 0x0ULL;
  431|    614|    n[4U] = 0x0ULL;
  432|    614|    n[5U] = 0x0ULL;
  433|    614|    n[6U] = 0x0ULL;
  434|    614|    n[7U] = 0x0ULL;
  435|    614|    n[8U] = 0x0ULL;
  436|    614|}
Hacl_P521.c:fmont_reduction:
  475|  1.22M|{
  476|  1.22M|    uint64_t n[9U] = { 0U };
  477|  1.22M|    p521_make_prime(n);
  478|  1.22M|    uint64_t c0 = 0ULL;
  479|  1.22M|    KRML_MAYBE_FOR9(
  ------------------
  |  |  360|  1.22M|#define KRML_MAYBE_FOR9(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 9, k, x)
  |  |  ------------------
  |  |  |  |  288|  1.22M|    do {                               \
  |  |  |  |  289|  1.22M|        uint32_t i = z;                \
  |  |  |  |  290|  1.22M|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  1.22M|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  480|  1.22M|        i0,
  481|  1.22M|        0U,
  482|  1.22M|        9U,
  483|  1.22M|        1U,
  484|  1.22M|        uint64_t qj = 1ULL * x[i0];
  485|  1.22M|        uint64_t *res_j0 = x + i0;
  486|  1.22M|        uint64_t c = 0ULL;
  487|  1.22M|        KRML_MAYBE_FOR2(i,
  488|  1.22M|                        0U,
  489|  1.22M|                        2U,
  490|  1.22M|                        1U,
  491|  1.22M|                        uint64_t a_i = n[4U * i];
  492|  1.22M|                        uint64_t *res_i0 = res_j0 + 4U * i;
  493|  1.22M|                        c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i, qj, c, res_i0);
  494|  1.22M|                        uint64_t a_i0 = n[4U * i + 1U];
  495|  1.22M|                        uint64_t *res_i1 = res_j0 + 4U * i + 1U;
  496|  1.22M|                        c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i0, qj, c, res_i1);
  497|  1.22M|                        uint64_t a_i1 = n[4U * i + 2U];
  498|  1.22M|                        uint64_t *res_i2 = res_j0 + 4U * i + 2U;
  499|  1.22M|                        c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i1, qj, c, res_i2);
  500|  1.22M|                        uint64_t a_i2 = n[4U * i + 3U];
  501|  1.22M|                        uint64_t *res_i = res_j0 + 4U * i + 3U;
  502|  1.22M|                        c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i2, qj, c, res_i););
  503|  1.22M|        {
  504|  1.22M|            uint64_t a_i = n[8U];
  505|  1.22M|            uint64_t *res_i = res_j0 + 8U;
  506|  1.22M|            c = Hacl_Bignum_Base_mul_wide_add2_u64(a_i, qj, c, res_i);
  507|  1.22M|        } uint64_t r = c;
  508|  1.22M|        uint64_t c1 = r;
  509|  1.22M|        uint64_t *resb = x + 9U + i0;
  510|  1.22M|        uint64_t res_j = x[9U + i0];
  511|  1.22M|        c0 = Lib_IntTypes_Intrinsics_add_carry_u64(c0, c1, res_j, resb););
  512|  1.22M|    memcpy(res, x + 9U, 9U * sizeof(uint64_t));
  513|  1.22M|    uint64_t c00 = c0;
  514|  1.22M|    uint64_t tmp[9U] = { 0U };
  515|  1.22M|    uint64_t c = 0ULL;
  516|  1.22M|    KRML_MAYBE_FOR2(i,
  ------------------
  |  |  318|  1.22M|#define KRML_MAYBE_FOR2(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 2, k, x)
  |  |  ------------------
  |  |  |  |  288|  1.22M|    do {                               \
  |  |  |  |  289|  1.22M|        uint32_t i = z;                \
  |  |  |  |  290|  1.22M|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  1.22M|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  517|  1.22M|                    0U,
  518|  1.22M|                    2U,
  519|  1.22M|                    1U,
  520|  1.22M|                    uint64_t t1 = res[4U * i];
  521|  1.22M|                    uint64_t t20 = n[4U * i];
  522|  1.22M|                    uint64_t *res_i0 = tmp + 4U * i;
  523|  1.22M|                    c = Lib_IntTypes_Intrinsics_sub_borrow_u64(c, t1, t20, res_i0);
  524|  1.22M|                    uint64_t t10 = res[4U * i + 1U];
  525|  1.22M|                    uint64_t t21 = n[4U * i + 1U];
  526|  1.22M|                    uint64_t *res_i1 = tmp + 4U * i + 1U;
  527|  1.22M|                    c = Lib_IntTypes_Intrinsics_sub_borrow_u64(c, t10, t21, res_i1);
  528|  1.22M|                    uint64_t t11 = res[4U * i + 2U];
  529|  1.22M|                    uint64_t t22 = n[4U * i + 2U];
  530|  1.22M|                    uint64_t *res_i2 = tmp + 4U * i + 2U;
  531|  1.22M|                    c = Lib_IntTypes_Intrinsics_sub_borrow_u64(c, t11, t22, res_i2);
  532|  1.22M|                    uint64_t t12 = res[4U * i + 3U];
  533|  1.22M|                    uint64_t t2 = n[4U * i + 3U];
  534|  1.22M|                    uint64_t *res_i = tmp + 4U * i + 3U;
  535|  1.22M|                    c = Lib_IntTypes_Intrinsics_sub_borrow_u64(c, t12, t2, res_i););
  536|  1.22M|    {
  537|  1.22M|        uint64_t t1 = res[8U];
  538|  1.22M|        uint64_t t2 = n[8U];
  539|  1.22M|        uint64_t *res_i = tmp + 8U;
  540|  1.22M|        c = Lib_IntTypes_Intrinsics_sub_borrow_u64(c, t1, t2, res_i);
  ------------------
  |  |   89|  1.22M|    (_subborrow_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  541|  1.22M|    }
  542|  1.22M|    uint64_t c1 = c;
  543|  1.22M|    uint64_t c2 = c00 - c1;
  544|  1.22M|    KRML_MAYBE_FOR9(i,
  ------------------
  |  |  360|  1.22M|#define KRML_MAYBE_FOR9(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 9, k, x)
  |  |  ------------------
  |  |  |  |  288|  1.22M|    do {                               \
  |  |  |  |  289|  1.22M|        uint32_t i = z;                \
  |  |  |  |  290|  1.22M|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  1.22M|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  545|  1.22M|                    0U,
  546|  1.22M|                    9U,
  547|  1.22M|                    1U,
  548|  1.22M|                    uint64_t *os = res;
  549|  1.22M|                    uint64_t x1 = (c2 & res[i]) | (~c2 & tmp[i]);
  550|  1.22M|                    os[i] = x1;);
  551|  1.22M|}
Hacl_P521.c:fsqr0:
  669|   258k|{
  670|   258k|    uint64_t tmp[18U] = { 0U };
  671|   258k|    bn_sqr(tmp, b);
  672|   258k|    fmont_reduction(a, tmp);
  673|   258k|}
Hacl_P521.c:fmul0:
  661|   967k|{
  662|   967k|    uint64_t tmp[18U] = { 0U };
  663|   967k|    bn_mul(tmp, b, c);
  664|   967k|    fmont_reduction(a, tmp);
  665|   967k|}
Hacl_P521.c:p521_make_a_coeff:
  370|    164|{
  371|    164|    a[0U] = 0xfe7fffffffffffffULL;
  372|    164|    a[1U] = 0xffffffffffffffffULL;
  373|    164|    a[2U] = 0xffffffffffffffffULL;
  374|    164|    a[3U] = 0xffffffffffffffffULL;
  375|    164|    a[4U] = 0xffffffffffffffffULL;
  376|    164|    a[5U] = 0xffffffffffffffffULL;
  377|    164|    a[6U] = 0xffffffffffffffffULL;
  378|    164|    a[7U] = 0xffffffffffffffffULL;
  379|    164|    a[8U] = 0x01ffULL;
  380|    164|}
Hacl_P521.c:fadd0:
  645|  1.41M|{
  646|  1.41M|    uint64_t n[9U] = { 0U };
  647|  1.41M|    p521_make_prime(n);
  648|  1.41M|    bn_add_mod(a, n, b, c);
  649|  1.41M|}
Hacl_P521.c:p521_make_b_coeff:
  384|   176k|{
  385|   176k|    b[0U] = 0x8014654fae586387ULL;
  386|   176k|    b[1U] = 0x78f7a28fea35a81fULL;
  387|   176k|    b[2U] = 0x839ab9efc41e961aULL;
  388|   176k|    b[3U] = 0xbd8b29605e9dd8dfULL;
  389|   176k|    b[4U] = 0xf0ab0c9ca8f63f49ULL;
  390|   176k|    b[5U] = 0xf9dc5a44c8c77884ULL;
  391|   176k|    b[6U] = 0x77516d392dccd98aULL;
  392|   176k|    b[7U] = 0x0fc94d10d05b42a0ULL;
  393|   176k|    b[8U] = 0x4dULL;
  394|   176k|}
Hacl_P521.c:bn_is_eq_mask:
   32|    425|{
   33|    425|    uint64_t mask = 0xFFFFFFFFFFFFFFFFULL;
   34|    425|    KRML_MAYBE_FOR9(i,
  ------------------
  |  |  360|    425|#define KRML_MAYBE_FOR9(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 9, k, x)
  |  |  ------------------
  |  |  |  |  288|    425|    do {                               \
  |  |  |  |  289|    425|        uint32_t i = z;                \
  |  |  |  |  290|    425|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|    425|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   35|    425|                    0U,
   36|    425|                    9U,
   37|    425|                    1U,
   38|    425|                    uint64_t uu____0 = FStar_UInt64_eq_mask(x[i], y[i]);
   39|    425|                    mask = uu____0 & mask;);
   40|    425|    uint64_t mask1 = mask;
   41|    425|    return mask1;
   42|    425|}
Hacl_P521.c:p521_make_fone:
  447|    449|{
  448|    449|    n[0U] = 0x80000000000000ULL;
  449|    449|    n[1U] = 0x0ULL;
  450|    449|    n[2U] = 0x0ULL;
  451|    449|    n[3U] = 0x0ULL;
  452|    449|    n[4U] = 0x0ULL;
  453|    449|    n[5U] = 0x0ULL;
  454|    449|    n[6U] = 0x0ULL;
  455|    449|    n[7U] = 0x0ULL;
  456|    449|    n[8U] = 0x0ULL;
  457|    449|}
Hacl_P521.c:p521_make_order:
  356|  28.5k|{
  357|  28.5k|    n[0U] = 0xbb6fb71e91386409ULL;
  358|  28.5k|    n[1U] = 0x3bb5c9b8899c47aeULL;
  359|  28.5k|    n[2U] = 0x7fcc0148f709a5d0ULL;
  360|  28.5k|    n[3U] = 0x51868783bf2f966bULL;
  361|  28.5k|    n[4U] = 0xfffffffffffffffaULL;
  362|  28.5k|    n[5U] = 0xffffffffffffffffULL;
  363|  28.5k|    n[6U] = 0xffffffffffffffffULL;
  364|  28.5k|    n[7U] = 0xffffffffffffffffULL;
  365|  28.5k|    n[8U] = 0x1ffULL;
  366|  28.5k|}
Hacl_P521.c:bn_sub:
  130|    596|{
  131|    596|    uint64_t c1 = 0ULL;
  132|    596|    KRML_MAYBE_FOR2(i,
  ------------------
  |  |  318|    596|#define KRML_MAYBE_FOR2(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 2, k, x)
  |  |  ------------------
  |  |  |  |  288|    596|    do {                               \
  |  |  |  |  289|    596|        uint32_t i = z;                \
  |  |  |  |  290|    596|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|    596|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  133|    596|                    0U,
  134|    596|                    2U,
  135|    596|                    1U,
  136|    596|                    uint64_t t1 = b[4U * i];
  137|    596|                    uint64_t t20 = c[4U * i];
  138|    596|                    uint64_t *res_i0 = a + 4U * i;
  139|    596|                    c1 = Lib_IntTypes_Intrinsics_sub_borrow_u64(c1, t1, t20, res_i0);
  140|    596|                    uint64_t t10 = b[4U * i + 1U];
  141|    596|                    uint64_t t21 = c[4U * i + 1U];
  142|    596|                    uint64_t *res_i1 = a + 4U * i + 1U;
  143|    596|                    c1 = Lib_IntTypes_Intrinsics_sub_borrow_u64(c1, t10, t21, res_i1);
  144|    596|                    uint64_t t11 = b[4U * i + 2U];
  145|    596|                    uint64_t t22 = c[4U * i + 2U];
  146|    596|                    uint64_t *res_i2 = a + 4U * i + 2U;
  147|    596|                    c1 = Lib_IntTypes_Intrinsics_sub_borrow_u64(c1, t11, t22, res_i2);
  148|    596|                    uint64_t t12 = b[4U * i + 3U];
  149|    596|                    uint64_t t2 = c[4U * i + 3U];
  150|    596|                    uint64_t *res_i = a + 4U * i + 3U;
  151|    596|                    c1 = Lib_IntTypes_Intrinsics_sub_borrow_u64(c1, t12, t2, res_i););
  152|    596|    {
  153|    596|        uint64_t t1 = b[8U];
  154|    596|        uint64_t t2 = c[8U];
  155|    596|        uint64_t *res_i = a + 8U;
  156|    596|        c1 = Lib_IntTypes_Intrinsics_sub_borrow_u64(c1, t1, t2, res_i);
  ------------------
  |  |   89|    596|    (_subborrow_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  157|    596|    }
  158|    596|    uint64_t c10 = c1;
  159|    596|    return c10;
  160|    596|}
Hacl_P521.c:from_mont:
  677|    137|{
  678|    137|    uint64_t tmp[18U] = { 0U };
  679|    137|    memcpy(tmp, b, 9U * sizeof(uint64_t));
  680|    137|    fmont_reduction(a, tmp);
  681|    137|}
Hacl_P521.c:fsub0:
  653|   584k|{
  654|   584k|    uint64_t n[9U] = { 0U };
  655|   584k|    p521_make_prime(n);
  656|   584k|    bn_sub_mod(a, n, b, c);
  657|   584k|}
Hacl_P521.c:bn_sub_mod:
  164|   584k|{
  165|   584k|    uint64_t c10 = 0ULL;
  166|   584k|    KRML_MAYBE_FOR2(i,
  ------------------
  |  |  318|   584k|#define KRML_MAYBE_FOR2(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 2, k, x)
  |  |  ------------------
  |  |  |  |  288|   584k|    do {                               \
  |  |  |  |  289|   584k|        uint32_t i = z;                \
  |  |  |  |  290|   584k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|   584k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  167|   584k|                    0U,
  168|   584k|                    2U,
  169|   584k|                    1U,
  170|   584k|                    uint64_t t1 = c[4U * i];
  171|   584k|                    uint64_t t20 = d[4U * i];
  172|   584k|                    uint64_t *res_i0 = a + 4U * i;
  173|   584k|                    c10 = Lib_IntTypes_Intrinsics_sub_borrow_u64(c10, t1, t20, res_i0);
  174|   584k|                    uint64_t t10 = c[4U * i + 1U];
  175|   584k|                    uint64_t t21 = d[4U * i + 1U];
  176|   584k|                    uint64_t *res_i1 = a + 4U * i + 1U;
  177|   584k|                    c10 = Lib_IntTypes_Intrinsics_sub_borrow_u64(c10, t10, t21, res_i1);
  178|   584k|                    uint64_t t11 = c[4U * i + 2U];
  179|   584k|                    uint64_t t22 = d[4U * i + 2U];
  180|   584k|                    uint64_t *res_i2 = a + 4U * i + 2U;
  181|   584k|                    c10 = Lib_IntTypes_Intrinsics_sub_borrow_u64(c10, t11, t22, res_i2);
  182|   584k|                    uint64_t t12 = c[4U * i + 3U];
  183|   584k|                    uint64_t t2 = d[4U * i + 3U];
  184|   584k|                    uint64_t *res_i = a + 4U * i + 3U;
  185|   584k|                    c10 = Lib_IntTypes_Intrinsics_sub_borrow_u64(c10, t12, t2, res_i););
  186|   584k|    {
  187|   584k|        uint64_t t1 = c[8U];
  188|   584k|        uint64_t t2 = d[8U];
  189|   584k|        uint64_t *res_i = a + 8U;
  190|   584k|        c10 = Lib_IntTypes_Intrinsics_sub_borrow_u64(c10, t1, t2, res_i);
  ------------------
  |  |   89|   584k|    (_subborrow_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  191|   584k|    }
  192|   584k|    uint64_t c0 = c10;
  193|   584k|    uint64_t tmp[9U] = { 0U };
  194|   584k|    uint64_t c1 = 0ULL;
  195|   584k|    KRML_MAYBE_FOR2(i,
  ------------------
  |  |  318|   584k|#define KRML_MAYBE_FOR2(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 2, k, x)
  |  |  ------------------
  |  |  |  |  288|   584k|    do {                               \
  |  |  |  |  289|   584k|        uint32_t i = z;                \
  |  |  |  |  290|   584k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|   584k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  196|   584k|                    0U,
  197|   584k|                    2U,
  198|   584k|                    1U,
  199|   584k|                    uint64_t t1 = a[4U * i];
  200|   584k|                    uint64_t t20 = b[4U * i];
  201|   584k|                    uint64_t *res_i0 = tmp + 4U * i;
  202|   584k|                    c1 = Lib_IntTypes_Intrinsics_add_carry_u64(c1, t1, t20, res_i0);
  203|   584k|                    uint64_t t10 = a[4U * i + 1U];
  204|   584k|                    uint64_t t21 = b[4U * i + 1U];
  205|   584k|                    uint64_t *res_i1 = tmp + 4U * i + 1U;
  206|   584k|                    c1 = Lib_IntTypes_Intrinsics_add_carry_u64(c1, t10, t21, res_i1);
  207|   584k|                    uint64_t t11 = a[4U * i + 2U];
  208|   584k|                    uint64_t t22 = b[4U * i + 2U];
  209|   584k|                    uint64_t *res_i2 = tmp + 4U * i + 2U;
  210|   584k|                    c1 = Lib_IntTypes_Intrinsics_add_carry_u64(c1, t11, t22, res_i2);
  211|   584k|                    uint64_t t12 = a[4U * i + 3U];
  212|   584k|                    uint64_t t2 = b[4U * i + 3U];
  213|   584k|                    uint64_t *res_i = tmp + 4U * i + 3U;
  214|   584k|                    c1 = Lib_IntTypes_Intrinsics_add_carry_u64(c1, t12, t2, res_i););
  215|   584k|    {
  216|   584k|        uint64_t t1 = a[8U];
  217|   584k|        uint64_t t2 = b[8U];
  218|   584k|        uint64_t *res_i = tmp + 8U;
  219|   584k|        c1 = Lib_IntTypes_Intrinsics_add_carry_u64(c1, t1, t2, res_i);
  ------------------
  |  |   66|   584k|    (_addcarry_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  220|   584k|    }
  221|   584k|    uint64_t c11 = c1;
  222|   584k|    KRML_MAYBE_UNUSED_VAR(c11);
  ------------------
  |  |   60|   584k|#define KRML_MAYBE_UNUSED_VAR(x) KRML_HOST_IGNORE(x)
  |  |  ------------------
  |  |  |  |   56|   584k|#define KRML_HOST_IGNORE(x) (void)(x)
  |  |  ------------------
  ------------------
  223|   584k|    uint64_t c2 = 0ULL - c0;
  224|   584k|    KRML_MAYBE_FOR9(i,
  ------------------
  |  |  360|   584k|#define KRML_MAYBE_FOR9(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 9, k, x)
  |  |  ------------------
  |  |  |  |  288|   584k|    do {                               \
  |  |  |  |  289|   584k|        uint32_t i = z;                \
  |  |  |  |  290|   584k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|   584k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  225|   584k|                    0U,
  226|   584k|                    9U,
  227|   584k|                    1U,
  228|   584k|                    uint64_t *os = a;
  229|   584k|                    uint64_t x = (c2 & tmp[i]) | (~c2 & a[i]);
  230|   584k|                    os[i] = x;);
  231|   584k|}
Hacl_P521.c:bn_to_bytes_be:
  319|     94|{
  320|     94|    uint8_t tmp[72U] = { 0U };
  321|     94|    KRML_MAYBE_FOR9(i, 0U, 9U, 1U, store64_be(tmp + i * 8U, b[9U - i - 1U]););
  ------------------
  |  |  360|     94|#define KRML_MAYBE_FOR9(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 9, k, x)
  |  |  ------------------
  |  |  |  |  288|     94|    do {                               \
  |  |  |  |  289|     94|        uint32_t i = z;                \
  |  |  |  |  290|     94|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     94|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  322|     94|    memcpy(a, tmp + 6U, 66U * sizeof(uint8_t));
  323|     94|}
Hacl_P521.c:load_qelem_conditional:
  827|     47|{
  828|     47|    bn_from_bytes_be(a, b);
  829|     47|    uint64_t tmp[9U] = { 0U };
  830|     47|    p521_make_order(tmp);
  831|     47|    uint64_t c = bn_sub(tmp, a, tmp);
  832|     47|    uint64_t is_lt_order = FStar_UInt64_gte_mask(c, 0ULL) & ~FStar_UInt64_eq_mask(c, 0ULL);
  833|     47|    uint64_t bn_zero[9U] = { 0U };
  834|     47|    uint64_t res = bn_is_eq_mask(a, bn_zero);
  835|     47|    uint64_t is_eq_zero = res;
  836|     47|    uint64_t is_b_valid = is_lt_order & ~is_eq_zero;
  837|     47|    uint64_t oneq[9U] = { 0U };
  838|     47|    memset(oneq, 0U, 9U * sizeof(uint64_t));
  839|     47|    oneq[0U] = 1ULL;
  840|     47|    KRML_MAYBE_FOR9(i,
  ------------------
  |  |  360|     47|#define KRML_MAYBE_FOR9(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 9, k, x)
  |  |  ------------------
  |  |  |  |  288|     47|    do {                               \
  |  |  |  |  289|     47|        uint32_t i = z;                \
  |  |  |  |  290|     47|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     47|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  841|     47|                    0U,
  842|     47|                    9U,
  843|     47|                    1U,
  844|     47|                    uint64_t *os = a;
  845|     47|                    uint64_t uu____0 = oneq[i];
  846|     47|                    uint64_t x = uu____0 ^ (is_b_valid & (a[i] ^ uu____0));
  847|     47|                    os[i] = x;);
  848|     47|    return is_b_valid;
  849|     47|}
Hacl_P521.c:point_mul_g:
 1163|     83|{
 1164|     83|    uint64_t g[27U] = { 0U };
 1165|     83|    uint64_t *x = g;
 1166|     83|    uint64_t *y = g + 9U;
 1167|     83|    uint64_t *z = g + 18U;
 1168|     83|    p521_make_g_x(x);
 1169|     83|    p521_make_g_y(y);
 1170|     83|    p521_make_fone(z);
 1171|     83|    point_mul(res, scalar, g);
 1172|     83|}
Hacl_P521.c:p521_make_g_x:
  398|     83|{
  399|     83|    n[0U] = 0xb331a16381adc101ULL;
  400|     83|    n[1U] = 0x4dfcbf3f18e172deULL;
  401|     83|    n[2U] = 0x6f19a459e0c2b521ULL;
  402|     83|    n[3U] = 0x947f0ee093d17fd4ULL;
  403|     83|    n[4U] = 0xdd50a5af3bf7f3acULL;
  404|     83|    n[5U] = 0x90fc1457b035a69eULL;
  405|     83|    n[6U] = 0x214e32409c829fdaULL;
  406|     83|    n[7U] = 0xe6cf1f65b311cadaULL;
  407|     83|    n[8U] = 0x74ULL;
  408|     83|}
Hacl_P521.c:p521_make_g_y:
  412|     83|{
  413|     83|    n[0U] = 0x28460e4a5a9e268eULL;
  414|     83|    n[1U] = 0x20445f4a3b4fe8b3ULL;
  415|     83|    n[2U] = 0xb09a9e3843513961ULL;
  416|     83|    n[3U] = 0x2062a85c809fd683ULL;
  417|     83|    n[4U] = 0x164bf7394caf7a13ULL;
  418|     83|    n[5U] = 0x340bd7de8b939f33ULL;
  419|     83|    n[6U] = 0xeccc7aa224abcda2ULL;
  420|     83|    n[7U] = 0x022e452fda163e8dULL;
  421|     83|    n[8U] = 0x1e0ULL;
  422|     83|}
Hacl_P521.c:p521_finv:
  695|     90|{
  696|     90|    uint64_t b[9U] = { 0U };
  697|     90|    b[0U] = 0xfffffffffffffffdULL;
  698|     90|    b[1U] = 0xffffffffffffffffULL;
  699|     90|    b[2U] = 0xffffffffffffffffULL;
  700|     90|    b[3U] = 0xffffffffffffffffULL;
  701|     90|    b[4U] = 0xffffffffffffffffULL;
  702|     90|    b[5U] = 0xffffffffffffffffULL;
  703|     90|    b[6U] = 0xffffffffffffffffULL;
  704|     90|    b[7U] = 0xffffffffffffffffULL;
  705|     90|    b[8U] = 0x1ffULL;
  706|     90|    uint64_t tmp[9U] = { 0U };
  707|     90|    memcpy(tmp, a, 9U * sizeof(uint64_t));
  708|     90|    uint64_t table[288U] = { 0U };
  709|     90|    uint64_t tmp1[9U] = { 0U };
  710|     90|    uint64_t *t0 = table;
  711|     90|    uint64_t *t1 = table + 9U;
  712|     90|    p521_make_fone(t0);
  713|     90|    memcpy(t1, tmp, 9U * sizeof(uint64_t));
  714|     90|    KRML_MAYBE_FOR15(i,
  ------------------
  |  |  396|     90|#define KRML_MAYBE_FOR15(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 15, k, x)
  |  |  ------------------
  |  |  |  |  288|     90|    do {                               \
  |  |  |  |  289|     90|        uint32_t i = z;                \
  |  |  |  |  290|     90|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     90|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  715|     90|                     0U,
  716|     90|                     15U,
  717|     90|                     1U,
  718|     90|                     uint64_t *t11 = table + (i + 1U) * 9U;
  719|     90|                     fsqr0(tmp1, t11);
  720|     90|                     memcpy(table + (2U * i + 2U) * 9U, tmp1, 9U * sizeof(uint64_t));
  721|     90|                     uint64_t *t2 = table + (2U * i + 2U) * 9U;
  722|     90|                     fmul0(tmp1, tmp, t2);
  723|     90|                     memcpy(table + (2U * i + 3U) * 9U, tmp1, 9U * sizeof(uint64_t)););
  724|     90|    uint32_t i0 = 520U;
  725|     90|    uint64_t bits_c = Hacl_Bignum_Lib_bn_get_bits_u64(9U, b, i0, 5U);
  726|     90|    memcpy(res, (uint64_t *)table, 9U * sizeof(uint64_t));
  727|  2.88k|    for (uint32_t i1 = 0U; i1 < 31U; i1++) {
  ------------------
  |  Branch (727:28): [True: 2.79k, False: 90]
  ------------------
  728|  2.79k|        uint64_t c = FStar_UInt64_eq_mask(bits_c, (uint64_t)(i1 + 1U));
  729|  2.79k|        const uint64_t *res_j = table + (i1 + 1U) * 9U;
  730|  2.79k|        KRML_MAYBE_FOR9(i,
  ------------------
  |  |  360|  2.79k|#define KRML_MAYBE_FOR9(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 9, k, x)
  |  |  ------------------
  |  |  |  |  288|  2.79k|    do {                               \
  |  |  |  |  289|  2.79k|        uint32_t i = z;                \
  |  |  |  |  290|  2.79k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  2.79k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  731|  2.79k|                        0U,
  732|  2.79k|                        9U,
  733|  2.79k|                        1U,
  734|  2.79k|                        uint64_t *os = res;
  735|  2.79k|                        uint64_t x = (c & res_j[i]) | (~c & res[i]);
  736|  2.79k|                        os[i] = x;);
  737|  2.79k|    }
  738|     90|    uint64_t tmp10[9U] = { 0U };
  739|  9.45k|    for (uint32_t i1 = 0U; i1 < 104U; i1++) {
  ------------------
  |  Branch (739:28): [True: 9.36k, False: 90]
  ------------------
  740|  9.36k|        KRML_MAYBE_FOR5(i, 0U, 5U, 1U, fsqr0(res, res););
  ------------------
  |  |  336|  9.36k|#define KRML_MAYBE_FOR5(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 5, k, x)
  |  |  ------------------
  |  |  |  |  288|  9.36k|    do {                               \
  |  |  |  |  289|  9.36k|        uint32_t i = z;                \
  |  |  |  |  290|  9.36k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  9.36k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  741|  9.36k|        uint32_t k = 520U - 5U * i1 - 5U;
  742|  9.36k|        uint64_t bits_l = Hacl_Bignum_Lib_bn_get_bits_u64(9U, b, k, 5U);
  743|  9.36k|        memcpy(tmp10, (uint64_t *)table, 9U * sizeof(uint64_t));
  744|   299k|        for (uint32_t i2 = 0U; i2 < 31U; i2++) {
  ------------------
  |  Branch (744:32): [True: 290k, False: 9.36k]
  ------------------
  745|   290k|            uint64_t c = FStar_UInt64_eq_mask(bits_l, (uint64_t)(i2 + 1U));
  746|   290k|            const uint64_t *res_j = table + (i2 + 1U) * 9U;
  747|   290k|            KRML_MAYBE_FOR9(i,
  ------------------
  |  |  360|   290k|#define KRML_MAYBE_FOR9(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 9, k, x)
  |  |  ------------------
  |  |  |  |  288|   290k|    do {                               \
  |  |  |  |  289|   290k|        uint32_t i = z;                \
  |  |  |  |  290|   290k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|   290k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  748|   290k|                            0U,
  749|   290k|                            9U,
  750|   290k|                            1U,
  751|   290k|                            uint64_t *os = tmp10;
  752|   290k|                            uint64_t x = (c & res_j[i]) | (~c & tmp10[i]);
  753|   290k|                            os[i] = x;);
  754|   290k|        }
  755|  9.36k|        fmul0(res, res, tmp10);
  756|  9.36k|    }
  757|     90|}
Hacl_P521.c:point_mul:
 1107|    133|{
 1108|    133|    uint64_t table[432U] = { 0U };
 1109|    133|    uint64_t tmp[27U] = { 0U };
 1110|    133|    uint64_t *t0 = table;
 1111|    133|    uint64_t *t1 = table + 27U;
 1112|    133|    point_zero(t0);
 1113|    133|    memcpy(t1, p, 27U * sizeof(uint64_t));
 1114|    133|    KRML_MAYBE_FOR7(i,
  ------------------
  |  |  348|    133|#define KRML_MAYBE_FOR7(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 7, k, x)
  |  |  ------------------
  |  |  |  |  288|    133|    do {                               \
  |  |  |  |  289|    133|        uint32_t i = z;                \
  |  |  |  |  290|    133|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|    133|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1115|    133|                    0U,
 1116|    133|                    7U,
 1117|    133|                    1U,
 1118|    133|                    uint64_t *t11 = table + (i + 1U) * 27U;
 1119|    133|                    point_double(t11, tmp);
 1120|    133|                    memcpy(table + (2U * i + 2U) * 27U, tmp, 27U * sizeof(uint64_t));
 1121|    133|                    uint64_t *t2 = table + (2U * i + 2U) * 27U;
 1122|    133|                    point_add(p, t2, tmp);
 1123|    133|                    memcpy(table + (2U * i + 3U) * 27U, tmp, 27U * sizeof(uint64_t)););
 1124|    133|    uint32_t i0 = 520U;
 1125|    133|    uint64_t bits_c = Hacl_Bignum_Lib_bn_get_bits_u64(9U, scalar, i0, 4U);
 1126|    133|    memcpy(res, (uint64_t *)table, 27U * sizeof(uint64_t));
 1127|    133|    KRML_MAYBE_FOR15(
  ------------------
  |  |  396|    133|#define KRML_MAYBE_FOR15(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 15, k, x)
  |  |  ------------------
  |  |  |  |  288|    133|    do {                               \
  |  |  |  |  289|    133|        uint32_t i = z;                \
  |  |  |  |  290|    133|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|    133|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1128|    133|        i1,
 1129|    133|        0U,
 1130|    133|        15U,
 1131|    133|        1U,
 1132|    133|        uint64_t c = FStar_UInt64_eq_mask(bits_c, (uint64_t)(i1 + 1U));
 1133|    133|        const uint64_t *res_j = table + (i1 + 1U) * 27U;
 1134|    133|        for (uint32_t i = 0U; i < 27U; i++) {
 1135|    133|            uint64_t *os = res;
 1136|    133|            uint64_t x = (c & res_j[i]) | (~c & res[i]);
 1137|    133|            os[i] = x;
 1138|    133|        });
 1139|    133|    uint64_t tmp0[27U] = { 0U };
 1140|  17.4k|    for (uint32_t i1 = 0U; i1 < 130U; i1++) {
  ------------------
  |  Branch (1140:28): [True: 17.2k, False: 133]
  ------------------
 1141|  17.2k|        KRML_MAYBE_FOR4(i, 0U, 4U, 1U, point_double(res, res););
  ------------------
  |  |  330|  17.2k|#define KRML_MAYBE_FOR4(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 4, k, x)
  |  |  ------------------
  |  |  |  |  288|  17.2k|    do {                               \
  |  |  |  |  289|  17.2k|        uint32_t i = z;                \
  |  |  |  |  290|  17.2k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  17.2k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1142|  17.2k|        uint32_t k = 520U - 4U * i1 - 4U;
 1143|  17.2k|        uint64_t bits_l = Hacl_Bignum_Lib_bn_get_bits_u64(9U, scalar, k, 4U);
 1144|  17.2k|        memcpy(tmp0, (uint64_t *)table, 27U * sizeof(uint64_t));
 1145|  17.2k|        KRML_MAYBE_FOR15(
  ------------------
  |  |  396|  17.2k|#define KRML_MAYBE_FOR15(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 15, k, x)
  |  |  ------------------
  |  |  |  |  288|  17.2k|    do {                               \
  |  |  |  |  289|  17.2k|        uint32_t i = z;                \
  |  |  |  |  290|  17.2k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  17.2k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1146|  17.2k|            i2,
 1147|  17.2k|            0U,
 1148|  17.2k|            15U,
 1149|  17.2k|            1U,
 1150|  17.2k|            uint64_t c = FStar_UInt64_eq_mask(bits_l, (uint64_t)(i2 + 1U));
 1151|  17.2k|            const uint64_t *res_j = table + (i2 + 1U) * 27U;
 1152|  17.2k|            for (uint32_t i = 0U; i < 27U; i++) {
 1153|  17.2k|                uint64_t *os = tmp0;
 1154|  17.2k|                uint64_t x = (c & res_j[i]) | (~c & tmp0[i]);
 1155|  17.2k|                os[i] = x;
 1156|  17.2k|            });
 1157|  17.2k|        point_add(res, tmp0, res);
 1158|  17.2k|    }
 1159|    133|}
Hacl_P521.c:point_zero:
 1096|    133|{
 1097|    133|    uint64_t *x = one;
 1098|    133|    uint64_t *y = one + 9U;
 1099|    133|    uint64_t *z = one + 18U;
 1100|    133|    p521_make_fzero(x);
 1101|    133|    p521_make_fone(y);
 1102|    133|    p521_make_fzero(z);
 1103|    133|}
Hacl_P521.c:p521_make_fzero:
  440|    266|{
  441|    266|    memset(n, 0U, 9U * sizeof(uint64_t));
  442|    266|    n[0U] = 0ULL;
  443|    266|}
Hacl_P521.c:point_double:
 1039|  70.0k|{
 1040|  70.0k|    uint64_t tmp[45U] = { 0U };
 1041|  70.0k|    uint64_t *x1 = x;
 1042|  70.0k|    uint64_t *z = x + 18U;
 1043|  70.0k|    uint64_t *x3 = xx;
 1044|  70.0k|    uint64_t *y3 = xx + 9U;
 1045|  70.0k|    uint64_t *z3 = xx + 18U;
 1046|  70.0k|    uint64_t *t0 = tmp;
 1047|  70.0k|    uint64_t *t1 = tmp + 9U;
 1048|  70.0k|    uint64_t *t2 = tmp + 18U;
 1049|  70.0k|    uint64_t *t3 = tmp + 27U;
 1050|  70.0k|    uint64_t *t4 = tmp + 36U;
 1051|  70.0k|    uint64_t *x2 = x;
 1052|  70.0k|    uint64_t *y = x + 9U;
 1053|  70.0k|    uint64_t *z1 = x + 18U;
 1054|  70.0k|    fsqr0(t0, x2);
 1055|  70.0k|    fsqr0(t1, y);
 1056|  70.0k|    fsqr0(t2, z1);
 1057|  70.0k|    fmul0(t3, x2, y);
 1058|  70.0k|    fadd0(t3, t3, t3);
 1059|  70.0k|    fmul0(t4, y, z1);
 1060|  70.0k|    fmul0(z3, x1, z);
 1061|  70.0k|    fadd0(z3, z3, z3);
 1062|  70.0k|    uint64_t b_coeff[9U] = { 0U };
 1063|  70.0k|    p521_make_b_coeff(b_coeff);
 1064|  70.0k|    fmul0(y3, b_coeff, t2);
 1065|  70.0k|    fsub0(y3, y3, z3);
 1066|  70.0k|    fadd0(x3, y3, y3);
 1067|  70.0k|    fadd0(y3, x3, y3);
 1068|  70.0k|    fsub0(x3, t1, y3);
 1069|  70.0k|    fadd0(y3, t1, y3);
 1070|  70.0k|    fmul0(y3, x3, y3);
 1071|  70.0k|    fmul0(x3, x3, t3);
 1072|  70.0k|    fadd0(t3, t2, t2);
 1073|  70.0k|    fadd0(t2, t2, t3);
 1074|  70.0k|    uint64_t b_coeff0[9U] = { 0U };
 1075|  70.0k|    p521_make_b_coeff(b_coeff0);
 1076|  70.0k|    fmul0(z3, b_coeff0, z3);
 1077|  70.0k|    fsub0(z3, z3, t2);
 1078|  70.0k|    fsub0(z3, z3, t0);
 1079|  70.0k|    fadd0(t3, z3, z3);
 1080|  70.0k|    fadd0(z3, z3, t3);
 1081|  70.0k|    fadd0(t3, t0, t0);
 1082|  70.0k|    fadd0(t0, t3, t0);
 1083|  70.0k|    fsub0(t0, t0, t2);
 1084|  70.0k|    fmul0(t0, t0, z3);
 1085|  70.0k|    fadd0(y3, y3, t0);
 1086|  70.0k|    fadd0(t0, t4, t4);
 1087|  70.0k|    fmul0(z3, t0, z3);
 1088|  70.0k|    fsub0(x3, x3, z3);
 1089|  70.0k|    fmul0(z3, t0, t1);
 1090|  70.0k|    fadd0(z3, z3, z3);
 1091|  70.0k|    fadd0(z3, z3, z3);
 1092|  70.0k|}

Hacl_Impl_Poly1305_Field32xN_256_load_acc4:
   29|    327|{
   30|    327|    KRML_PRE_ALIGN(32)
   31|    327|    Lib_IntVector_Intrinsics_vec256 e[5U] KRML_POST_ALIGN(32) = { 0U };
   32|    327|    Lib_IntVector_Intrinsics_vec256 lo = Lib_IntVector_Intrinsics_vec256_load64_le(b);
  ------------------
  |  |  323|    327|    (_mm256_loadu_si256((__m256i*)(x0)))
  ------------------
   33|    327|    Lib_IntVector_Intrinsics_vec256
   34|    327|        hi = Lib_IntVector_Intrinsics_vec256_load64_le(b + (uint32_t)32U);
  ------------------
  |  |  323|    327|    (_mm256_loadu_si256((__m256i*)(x0)))
  ------------------
   35|    327|    Lib_IntVector_Intrinsics_vec256
   36|    327|        mask26 = Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3ffffffU);
  ------------------
  |  |  389|    327|    (_mm256_set1_epi64x(x1)) /* hi lo */
  ------------------
   37|    327|    Lib_IntVector_Intrinsics_vec256 m0 = Lib_IntVector_Intrinsics_vec256_interleave_low128(lo, hi);
  ------------------
  |  |  419|    327|    (_mm256_permute2x128_si256(x1, x2, 0x20))
  ------------------
   38|    327|    Lib_IntVector_Intrinsics_vec256
   39|    327|        m1 = Lib_IntVector_Intrinsics_vec256_interleave_high128(lo, hi);
  ------------------
  |  |  422|    327|    (_mm256_permute2x128_si256(x1, x2, 0x31))
  ------------------
   40|    327|    Lib_IntVector_Intrinsics_vec256
   41|    327|        m2 = Lib_IntVector_Intrinsics_vec256_shift_right(m0, (uint32_t)48U);
  ------------------
  |  |  251|    327|    (_mm256_srli_si256(x0, (x1) / 8))
  ------------------
   42|    327|    Lib_IntVector_Intrinsics_vec256
   43|    327|        m3 = Lib_IntVector_Intrinsics_vec256_shift_right(m1, (uint32_t)48U);
  ------------------
  |  |  251|    327|    (_mm256_srli_si256(x0, (x1) / 8))
  ------------------
   44|    327|    Lib_IntVector_Intrinsics_vec256 m4 = Lib_IntVector_Intrinsics_vec256_interleave_high64(m0, m1);
  ------------------
  |  |  416|    327|    (_mm256_unpackhi_epi64(x1, x2))
  ------------------
   45|    327|    Lib_IntVector_Intrinsics_vec256 t0 = Lib_IntVector_Intrinsics_vec256_interleave_low64(m0, m1);
  ------------------
  |  |  413|    327|    (_mm256_unpacklo_epi64(x1, x2))
  ------------------
   46|    327|    Lib_IntVector_Intrinsics_vec256 t3 = Lib_IntVector_Intrinsics_vec256_interleave_low64(m2, m3);
  ------------------
  |  |  413|    327|    (_mm256_unpacklo_epi64(x1, x2))
  ------------------
   47|    327|    Lib_IntVector_Intrinsics_vec256
   48|    327|        t2 = Lib_IntVector_Intrinsics_vec256_shift_right64(t3, (uint32_t)4U);
  ------------------
  |  |  257|    327|    (_mm256_srli_epi64(x0, x1))
  ------------------
   49|    327|    Lib_IntVector_Intrinsics_vec256 o20 = Lib_IntVector_Intrinsics_vec256_and(t2, mask26);
  ------------------
  |  |  242|    327|    (_mm256_and_si256(x0, x1))
  ------------------
   50|    327|    Lib_IntVector_Intrinsics_vec256
   51|    327|        t1 = Lib_IntVector_Intrinsics_vec256_shift_right64(t0, (uint32_t)26U);
  ------------------
  |  |  257|    327|    (_mm256_srli_epi64(x0, x1))
  ------------------
   52|    327|    Lib_IntVector_Intrinsics_vec256 o10 = Lib_IntVector_Intrinsics_vec256_and(t1, mask26);
  ------------------
  |  |  242|    327|    (_mm256_and_si256(x0, x1))
  ------------------
   53|    327|    Lib_IntVector_Intrinsics_vec256 o5 = Lib_IntVector_Intrinsics_vec256_and(t0, mask26);
  ------------------
  |  |  242|    327|    (_mm256_and_si256(x0, x1))
  ------------------
   54|    327|    Lib_IntVector_Intrinsics_vec256
   55|    327|        t31 = Lib_IntVector_Intrinsics_vec256_shift_right64(t3, (uint32_t)30U);
  ------------------
  |  |  257|    327|    (_mm256_srli_epi64(x0, x1))
  ------------------
   56|    327|    Lib_IntVector_Intrinsics_vec256 o30 = Lib_IntVector_Intrinsics_vec256_and(t31, mask26);
  ------------------
  |  |  242|    327|    (_mm256_and_si256(x0, x1))
  ------------------
   57|    327|    Lib_IntVector_Intrinsics_vec256
   58|    327|        o40 = Lib_IntVector_Intrinsics_vec256_shift_right64(m4, (uint32_t)40U);
  ------------------
  |  |  257|    327|    (_mm256_srli_epi64(x0, x1))
  ------------------
   59|    327|    Lib_IntVector_Intrinsics_vec256 o0 = o5;
   60|    327|    Lib_IntVector_Intrinsics_vec256 o1 = o10;
   61|    327|    Lib_IntVector_Intrinsics_vec256 o2 = o20;
   62|    327|    Lib_IntVector_Intrinsics_vec256 o3 = o30;
   63|    327|    Lib_IntVector_Intrinsics_vec256 o4 = o40;
   64|    327|    e[0U] = o0;
   65|    327|    e[1U] = o1;
   66|    327|    e[2U] = o2;
   67|    327|    e[3U] = o3;
   68|    327|    e[4U] = o4;
   69|    327|    uint64_t b1 = (uint64_t)0x1000000U;
   70|    327|    Lib_IntVector_Intrinsics_vec256 mask = Lib_IntVector_Intrinsics_vec256_load64(b1);
  ------------------
  |  |  389|    327|    (_mm256_set1_epi64x(x1)) /* hi lo */
  ------------------
   71|    327|    Lib_IntVector_Intrinsics_vec256 f40 = e[4U];
   72|    327|    e[4U] = Lib_IntVector_Intrinsics_vec256_or(f40, mask);
  ------------------
  |  |  239|    327|    (_mm256_or_si256(x0, x1))
  ------------------
   73|    327|    Lib_IntVector_Intrinsics_vec256 acc0 = acc[0U];
   74|    327|    Lib_IntVector_Intrinsics_vec256 acc1 = acc[1U];
   75|    327|    Lib_IntVector_Intrinsics_vec256 acc2 = acc[2U];
   76|    327|    Lib_IntVector_Intrinsics_vec256 acc3 = acc[3U];
   77|    327|    Lib_IntVector_Intrinsics_vec256 acc4 = acc[4U];
   78|    327|    Lib_IntVector_Intrinsics_vec256 e0 = e[0U];
   79|    327|    Lib_IntVector_Intrinsics_vec256 e1 = e[1U];
   80|    327|    Lib_IntVector_Intrinsics_vec256 e2 = e[2U];
   81|    327|    Lib_IntVector_Intrinsics_vec256 e3 = e[3U];
   82|    327|    Lib_IntVector_Intrinsics_vec256 e4 = e[4U];
   83|    327|    Lib_IntVector_Intrinsics_vec256 r0 = Lib_IntVector_Intrinsics_vec256_zero;
  ------------------
  |  |  362|    327|    (_mm256_setzero_si256())
  ------------------
   84|    327|    Lib_IntVector_Intrinsics_vec256 r1 = Lib_IntVector_Intrinsics_vec256_zero;
  ------------------
  |  |  362|    327|    (_mm256_setzero_si256())
  ------------------
   85|    327|    Lib_IntVector_Intrinsics_vec256 r2 = Lib_IntVector_Intrinsics_vec256_zero;
  ------------------
  |  |  362|    327|    (_mm256_setzero_si256())
  ------------------
   86|    327|    Lib_IntVector_Intrinsics_vec256 r3 = Lib_IntVector_Intrinsics_vec256_zero;
  ------------------
  |  |  362|    327|    (_mm256_setzero_si256())
  ------------------
   87|    327|    Lib_IntVector_Intrinsics_vec256 r4 = Lib_IntVector_Intrinsics_vec256_zero;
  ------------------
  |  |  362|    327|    (_mm256_setzero_si256())
  ------------------
   88|    327|    Lib_IntVector_Intrinsics_vec256
   89|    327|        r01 =
   90|    327|            Lib_IntVector_Intrinsics_vec256_insert64(r0,
  ------------------
  |  |  350|    327|    (_mm256_insert_epi64(x0, x1, x2))
  ------------------
   91|    327|                                                     Lib_IntVector_Intrinsics_vec256_extract64(acc0, (uint32_t)0U),
   92|    327|                                                     (uint32_t)0U);
   93|    327|    Lib_IntVector_Intrinsics_vec256
   94|    327|        r11 =
   95|    327|            Lib_IntVector_Intrinsics_vec256_insert64(r1,
  ------------------
  |  |  350|    327|    (_mm256_insert_epi64(x0, x1, x2))
  ------------------
   96|    327|                                                     Lib_IntVector_Intrinsics_vec256_extract64(acc1, (uint32_t)0U),
   97|    327|                                                     (uint32_t)0U);
   98|    327|    Lib_IntVector_Intrinsics_vec256
   99|    327|        r21 =
  100|    327|            Lib_IntVector_Intrinsics_vec256_insert64(r2,
  ------------------
  |  |  350|    327|    (_mm256_insert_epi64(x0, x1, x2))
  ------------------
  101|    327|                                                     Lib_IntVector_Intrinsics_vec256_extract64(acc2, (uint32_t)0U),
  102|    327|                                                     (uint32_t)0U);
  103|    327|    Lib_IntVector_Intrinsics_vec256
  104|    327|        r31 =
  105|    327|            Lib_IntVector_Intrinsics_vec256_insert64(r3,
  ------------------
  |  |  350|    327|    (_mm256_insert_epi64(x0, x1, x2))
  ------------------
  106|    327|                                                     Lib_IntVector_Intrinsics_vec256_extract64(acc3, (uint32_t)0U),
  107|    327|                                                     (uint32_t)0U);
  108|    327|    Lib_IntVector_Intrinsics_vec256
  109|    327|        r41 =
  110|    327|            Lib_IntVector_Intrinsics_vec256_insert64(r4,
  ------------------
  |  |  350|    327|    (_mm256_insert_epi64(x0, x1, x2))
  ------------------
  111|    327|                                                     Lib_IntVector_Intrinsics_vec256_extract64(acc4, (uint32_t)0U),
  112|    327|                                                     (uint32_t)0U);
  113|    327|    Lib_IntVector_Intrinsics_vec256 f0 = Lib_IntVector_Intrinsics_vec256_add64(r01, e0);
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  114|    327|    Lib_IntVector_Intrinsics_vec256 f1 = Lib_IntVector_Intrinsics_vec256_add64(r11, e1);
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  115|    327|    Lib_IntVector_Intrinsics_vec256 f2 = Lib_IntVector_Intrinsics_vec256_add64(r21, e2);
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  116|    327|    Lib_IntVector_Intrinsics_vec256 f3 = Lib_IntVector_Intrinsics_vec256_add64(r31, e3);
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  117|    327|    Lib_IntVector_Intrinsics_vec256 f4 = Lib_IntVector_Intrinsics_vec256_add64(r41, e4);
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  118|    327|    Lib_IntVector_Intrinsics_vec256 acc01 = f0;
  119|    327|    Lib_IntVector_Intrinsics_vec256 acc11 = f1;
  120|    327|    Lib_IntVector_Intrinsics_vec256 acc21 = f2;
  121|    327|    Lib_IntVector_Intrinsics_vec256 acc31 = f3;
  122|    327|    Lib_IntVector_Intrinsics_vec256 acc41 = f4;
  123|    327|    acc[0U] = acc01;
  124|    327|    acc[1U] = acc11;
  125|    327|    acc[2U] = acc21;
  126|    327|    acc[3U] = acc31;
  127|    327|    acc[4U] = acc41;
  128|    327|}
Hacl_Impl_Poly1305_Field32xN_256_fmul_r4_normalize:
  134|    327|{
  135|    327|    Lib_IntVector_Intrinsics_vec256 *r = p;
  136|    327|    Lib_IntVector_Intrinsics_vec256 *r_5 = p + (uint32_t)5U;
  137|    327|    Lib_IntVector_Intrinsics_vec256 *r4 = p + (uint32_t)10U;
  138|    327|    Lib_IntVector_Intrinsics_vec256 a0 = out[0U];
  139|    327|    Lib_IntVector_Intrinsics_vec256 a1 = out[1U];
  140|    327|    Lib_IntVector_Intrinsics_vec256 a2 = out[2U];
  141|    327|    Lib_IntVector_Intrinsics_vec256 a3 = out[3U];
  142|    327|    Lib_IntVector_Intrinsics_vec256 a4 = out[4U];
  143|    327|    Lib_IntVector_Intrinsics_vec256 r10 = r[0U];
  144|    327|    Lib_IntVector_Intrinsics_vec256 r11 = r[1U];
  145|    327|    Lib_IntVector_Intrinsics_vec256 r12 = r[2U];
  146|    327|    Lib_IntVector_Intrinsics_vec256 r13 = r[3U];
  147|    327|    Lib_IntVector_Intrinsics_vec256 r14 = r[4U];
  148|    327|    Lib_IntVector_Intrinsics_vec256 r151 = r_5[1U];
  149|    327|    Lib_IntVector_Intrinsics_vec256 r152 = r_5[2U];
  150|    327|    Lib_IntVector_Intrinsics_vec256 r153 = r_5[3U];
  151|    327|    Lib_IntVector_Intrinsics_vec256 r154 = r_5[4U];
  152|    327|    Lib_IntVector_Intrinsics_vec256 r40 = r4[0U];
  153|    327|    Lib_IntVector_Intrinsics_vec256 r41 = r4[1U];
  154|    327|    Lib_IntVector_Intrinsics_vec256 r42 = r4[2U];
  155|    327|    Lib_IntVector_Intrinsics_vec256 r43 = r4[3U];
  156|    327|    Lib_IntVector_Intrinsics_vec256 r44 = r4[4U];
  157|    327|    Lib_IntVector_Intrinsics_vec256 a010 = Lib_IntVector_Intrinsics_vec256_mul64(r10, r10);
  ------------------
  |  |  371|    327|    (_mm256_mul_epu32(x0, x1))
  ------------------
  158|    327|    Lib_IntVector_Intrinsics_vec256 a110 = Lib_IntVector_Intrinsics_vec256_mul64(r11, r10);
  ------------------
  |  |  371|    327|    (_mm256_mul_epu32(x0, x1))
  ------------------
  159|    327|    Lib_IntVector_Intrinsics_vec256 a210 = Lib_IntVector_Intrinsics_vec256_mul64(r12, r10);
  ------------------
  |  |  371|    327|    (_mm256_mul_epu32(x0, x1))
  ------------------
  160|    327|    Lib_IntVector_Intrinsics_vec256 a310 = Lib_IntVector_Intrinsics_vec256_mul64(r13, r10);
  ------------------
  |  |  371|    327|    (_mm256_mul_epu32(x0, x1))
  ------------------
  161|    327|    Lib_IntVector_Intrinsics_vec256 a410 = Lib_IntVector_Intrinsics_vec256_mul64(r14, r10);
  ------------------
  |  |  371|    327|    (_mm256_mul_epu32(x0, x1))
  ------------------
  162|    327|    Lib_IntVector_Intrinsics_vec256
  163|    327|        a020 =
  164|    327|            Lib_IntVector_Intrinsics_vec256_add64(a010,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  165|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r154, r11));
  166|    327|    Lib_IntVector_Intrinsics_vec256
  167|    327|        a120 =
  168|    327|            Lib_IntVector_Intrinsics_vec256_add64(a110,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  169|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r10, r11));
  170|    327|    Lib_IntVector_Intrinsics_vec256
  171|    327|        a220 =
  172|    327|            Lib_IntVector_Intrinsics_vec256_add64(a210,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  173|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r11, r11));
  174|    327|    Lib_IntVector_Intrinsics_vec256
  175|    327|        a320 =
  176|    327|            Lib_IntVector_Intrinsics_vec256_add64(a310,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  177|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r12, r11));
  178|    327|    Lib_IntVector_Intrinsics_vec256
  179|    327|        a420 =
  180|    327|            Lib_IntVector_Intrinsics_vec256_add64(a410,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  181|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r13, r11));
  182|    327|    Lib_IntVector_Intrinsics_vec256
  183|    327|        a030 =
  184|    327|            Lib_IntVector_Intrinsics_vec256_add64(a020,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  185|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r153, r12));
  186|    327|    Lib_IntVector_Intrinsics_vec256
  187|    327|        a130 =
  188|    327|            Lib_IntVector_Intrinsics_vec256_add64(a120,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  189|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r154, r12));
  190|    327|    Lib_IntVector_Intrinsics_vec256
  191|    327|        a230 =
  192|    327|            Lib_IntVector_Intrinsics_vec256_add64(a220,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  193|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r10, r12));
  194|    327|    Lib_IntVector_Intrinsics_vec256
  195|    327|        a330 =
  196|    327|            Lib_IntVector_Intrinsics_vec256_add64(a320,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  197|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r11, r12));
  198|    327|    Lib_IntVector_Intrinsics_vec256
  199|    327|        a430 =
  200|    327|            Lib_IntVector_Intrinsics_vec256_add64(a420,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  201|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r12, r12));
  202|    327|    Lib_IntVector_Intrinsics_vec256
  203|    327|        a040 =
  204|    327|            Lib_IntVector_Intrinsics_vec256_add64(a030,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  205|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r152, r13));
  206|    327|    Lib_IntVector_Intrinsics_vec256
  207|    327|        a140 =
  208|    327|            Lib_IntVector_Intrinsics_vec256_add64(a130,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  209|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r153, r13));
  210|    327|    Lib_IntVector_Intrinsics_vec256
  211|    327|        a240 =
  212|    327|            Lib_IntVector_Intrinsics_vec256_add64(a230,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  213|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r154, r13));
  214|    327|    Lib_IntVector_Intrinsics_vec256
  215|    327|        a340 =
  216|    327|            Lib_IntVector_Intrinsics_vec256_add64(a330,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  217|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r10, r13));
  218|    327|    Lib_IntVector_Intrinsics_vec256
  219|    327|        a440 =
  220|    327|            Lib_IntVector_Intrinsics_vec256_add64(a430,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  221|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r11, r13));
  222|    327|    Lib_IntVector_Intrinsics_vec256
  223|    327|        a050 =
  224|    327|            Lib_IntVector_Intrinsics_vec256_add64(a040,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  225|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r151, r14));
  226|    327|    Lib_IntVector_Intrinsics_vec256
  227|    327|        a150 =
  228|    327|            Lib_IntVector_Intrinsics_vec256_add64(a140,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  229|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r152, r14));
  230|    327|    Lib_IntVector_Intrinsics_vec256
  231|    327|        a250 =
  232|    327|            Lib_IntVector_Intrinsics_vec256_add64(a240,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  233|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r153, r14));
  234|    327|    Lib_IntVector_Intrinsics_vec256
  235|    327|        a350 =
  236|    327|            Lib_IntVector_Intrinsics_vec256_add64(a340,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  237|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r154, r14));
  238|    327|    Lib_IntVector_Intrinsics_vec256
  239|    327|        a450 =
  240|    327|            Lib_IntVector_Intrinsics_vec256_add64(a440,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  241|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r10, r14));
  242|    327|    Lib_IntVector_Intrinsics_vec256 t00 = a050;
  243|    327|    Lib_IntVector_Intrinsics_vec256 t10 = a150;
  244|    327|    Lib_IntVector_Intrinsics_vec256 t20 = a250;
  245|    327|    Lib_IntVector_Intrinsics_vec256 t30 = a350;
  246|    327|    Lib_IntVector_Intrinsics_vec256 t40 = a450;
  247|    327|    Lib_IntVector_Intrinsics_vec256
  248|    327|        mask260 = Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3ffffffU);
  ------------------
  |  |  389|    327|    (_mm256_set1_epi64x(x1)) /* hi lo */
  ------------------
  249|    327|    Lib_IntVector_Intrinsics_vec256
  250|    327|        z00 = Lib_IntVector_Intrinsics_vec256_shift_right64(t00, (uint32_t)26U);
  ------------------
  |  |  257|    327|    (_mm256_srli_epi64(x0, x1))
  ------------------
  251|    327|    Lib_IntVector_Intrinsics_vec256
  252|    327|        z10 = Lib_IntVector_Intrinsics_vec256_shift_right64(t30, (uint32_t)26U);
  ------------------
  |  |  257|    327|    (_mm256_srli_epi64(x0, x1))
  ------------------
  253|    327|    Lib_IntVector_Intrinsics_vec256 x00 = Lib_IntVector_Intrinsics_vec256_and(t00, mask260);
  ------------------
  |  |  242|    327|    (_mm256_and_si256(x0, x1))
  ------------------
  254|    327|    Lib_IntVector_Intrinsics_vec256 x30 = Lib_IntVector_Intrinsics_vec256_and(t30, mask260);
  ------------------
  |  |  242|    327|    (_mm256_and_si256(x0, x1))
  ------------------
  255|    327|    Lib_IntVector_Intrinsics_vec256 x10 = Lib_IntVector_Intrinsics_vec256_add64(t10, z00);
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  256|    327|    Lib_IntVector_Intrinsics_vec256 x40 = Lib_IntVector_Intrinsics_vec256_add64(t40, z10);
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  257|    327|    Lib_IntVector_Intrinsics_vec256
  258|    327|        z010 = Lib_IntVector_Intrinsics_vec256_shift_right64(x10, (uint32_t)26U);
  ------------------
  |  |  257|    327|    (_mm256_srli_epi64(x0, x1))
  ------------------
  259|    327|    Lib_IntVector_Intrinsics_vec256
  260|    327|        z110 = Lib_IntVector_Intrinsics_vec256_shift_right64(x40, (uint32_t)26U);
  ------------------
  |  |  257|    327|    (_mm256_srli_epi64(x0, x1))
  ------------------
  261|    327|    Lib_IntVector_Intrinsics_vec256
  262|    327|        t5 = Lib_IntVector_Intrinsics_vec256_shift_left64(z110, (uint32_t)2U);
  ------------------
  |  |  254|    327|    (_mm256_slli_epi64(x0, x1))
  ------------------
  263|    327|    Lib_IntVector_Intrinsics_vec256 z12 = Lib_IntVector_Intrinsics_vec256_add64(z110, t5);
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  264|    327|    Lib_IntVector_Intrinsics_vec256 x110 = Lib_IntVector_Intrinsics_vec256_and(x10, mask260);
  ------------------
  |  |  242|    327|    (_mm256_and_si256(x0, x1))
  ------------------
  265|    327|    Lib_IntVector_Intrinsics_vec256 x410 = Lib_IntVector_Intrinsics_vec256_and(x40, mask260);
  ------------------
  |  |  242|    327|    (_mm256_and_si256(x0, x1))
  ------------------
  266|    327|    Lib_IntVector_Intrinsics_vec256 x20 = Lib_IntVector_Intrinsics_vec256_add64(t20, z010);
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  267|    327|    Lib_IntVector_Intrinsics_vec256 x010 = Lib_IntVector_Intrinsics_vec256_add64(x00, z12);
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  268|    327|    Lib_IntVector_Intrinsics_vec256
  269|    327|        z020 = Lib_IntVector_Intrinsics_vec256_shift_right64(x20, (uint32_t)26U);
  ------------------
  |  |  257|    327|    (_mm256_srli_epi64(x0, x1))
  ------------------
  270|    327|    Lib_IntVector_Intrinsics_vec256
  271|    327|        z130 = Lib_IntVector_Intrinsics_vec256_shift_right64(x010, (uint32_t)26U);
  ------------------
  |  |  257|    327|    (_mm256_srli_epi64(x0, x1))
  ------------------
  272|    327|    Lib_IntVector_Intrinsics_vec256 x210 = Lib_IntVector_Intrinsics_vec256_and(x20, mask260);
  ------------------
  |  |  242|    327|    (_mm256_and_si256(x0, x1))
  ------------------
  273|    327|    Lib_IntVector_Intrinsics_vec256 x020 = Lib_IntVector_Intrinsics_vec256_and(x010, mask260);
  ------------------
  |  |  242|    327|    (_mm256_and_si256(x0, x1))
  ------------------
  274|    327|    Lib_IntVector_Intrinsics_vec256 x310 = Lib_IntVector_Intrinsics_vec256_add64(x30, z020);
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  275|    327|    Lib_IntVector_Intrinsics_vec256 x120 = Lib_IntVector_Intrinsics_vec256_add64(x110, z130);
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  276|    327|    Lib_IntVector_Intrinsics_vec256
  277|    327|        z030 = Lib_IntVector_Intrinsics_vec256_shift_right64(x310, (uint32_t)26U);
  ------------------
  |  |  257|    327|    (_mm256_srli_epi64(x0, x1))
  ------------------
  278|    327|    Lib_IntVector_Intrinsics_vec256 x320 = Lib_IntVector_Intrinsics_vec256_and(x310, mask260);
  ------------------
  |  |  242|    327|    (_mm256_and_si256(x0, x1))
  ------------------
  279|    327|    Lib_IntVector_Intrinsics_vec256 x420 = Lib_IntVector_Intrinsics_vec256_add64(x410, z030);
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  280|    327|    Lib_IntVector_Intrinsics_vec256 r20 = x020;
  281|    327|    Lib_IntVector_Intrinsics_vec256 r21 = x120;
  282|    327|    Lib_IntVector_Intrinsics_vec256 r22 = x210;
  283|    327|    Lib_IntVector_Intrinsics_vec256 r23 = x320;
  284|    327|    Lib_IntVector_Intrinsics_vec256 r24 = x420;
  285|    327|    Lib_IntVector_Intrinsics_vec256 a011 = Lib_IntVector_Intrinsics_vec256_mul64(r10, r20);
  ------------------
  |  |  371|    327|    (_mm256_mul_epu32(x0, x1))
  ------------------
  286|    327|    Lib_IntVector_Intrinsics_vec256 a111 = Lib_IntVector_Intrinsics_vec256_mul64(r11, r20);
  ------------------
  |  |  371|    327|    (_mm256_mul_epu32(x0, x1))
  ------------------
  287|    327|    Lib_IntVector_Intrinsics_vec256 a211 = Lib_IntVector_Intrinsics_vec256_mul64(r12, r20);
  ------------------
  |  |  371|    327|    (_mm256_mul_epu32(x0, x1))
  ------------------
  288|    327|    Lib_IntVector_Intrinsics_vec256 a311 = Lib_IntVector_Intrinsics_vec256_mul64(r13, r20);
  ------------------
  |  |  371|    327|    (_mm256_mul_epu32(x0, x1))
  ------------------
  289|    327|    Lib_IntVector_Intrinsics_vec256 a411 = Lib_IntVector_Intrinsics_vec256_mul64(r14, r20);
  ------------------
  |  |  371|    327|    (_mm256_mul_epu32(x0, x1))
  ------------------
  290|    327|    Lib_IntVector_Intrinsics_vec256
  291|    327|        a021 =
  292|    327|            Lib_IntVector_Intrinsics_vec256_add64(a011,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  293|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r154, r21));
  294|    327|    Lib_IntVector_Intrinsics_vec256
  295|    327|        a121 =
  296|    327|            Lib_IntVector_Intrinsics_vec256_add64(a111,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  297|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r10, r21));
  298|    327|    Lib_IntVector_Intrinsics_vec256
  299|    327|        a221 =
  300|    327|            Lib_IntVector_Intrinsics_vec256_add64(a211,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  301|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r11, r21));
  302|    327|    Lib_IntVector_Intrinsics_vec256
  303|    327|        a321 =
  304|    327|            Lib_IntVector_Intrinsics_vec256_add64(a311,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  305|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r12, r21));
  306|    327|    Lib_IntVector_Intrinsics_vec256
  307|    327|        a421 =
  308|    327|            Lib_IntVector_Intrinsics_vec256_add64(a411,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  309|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r13, r21));
  310|    327|    Lib_IntVector_Intrinsics_vec256
  311|    327|        a031 =
  312|    327|            Lib_IntVector_Intrinsics_vec256_add64(a021,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  313|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r153, r22));
  314|    327|    Lib_IntVector_Intrinsics_vec256
  315|    327|        a131 =
  316|    327|            Lib_IntVector_Intrinsics_vec256_add64(a121,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  317|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r154, r22));
  318|    327|    Lib_IntVector_Intrinsics_vec256
  319|    327|        a231 =
  320|    327|            Lib_IntVector_Intrinsics_vec256_add64(a221,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  321|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r10, r22));
  322|    327|    Lib_IntVector_Intrinsics_vec256
  323|    327|        a331 =
  324|    327|            Lib_IntVector_Intrinsics_vec256_add64(a321,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  325|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r11, r22));
  326|    327|    Lib_IntVector_Intrinsics_vec256
  327|    327|        a431 =
  328|    327|            Lib_IntVector_Intrinsics_vec256_add64(a421,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  329|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r12, r22));
  330|    327|    Lib_IntVector_Intrinsics_vec256
  331|    327|        a041 =
  332|    327|            Lib_IntVector_Intrinsics_vec256_add64(a031,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  333|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r152, r23));
  334|    327|    Lib_IntVector_Intrinsics_vec256
  335|    327|        a141 =
  336|    327|            Lib_IntVector_Intrinsics_vec256_add64(a131,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  337|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r153, r23));
  338|    327|    Lib_IntVector_Intrinsics_vec256
  339|    327|        a241 =
  340|    327|            Lib_IntVector_Intrinsics_vec256_add64(a231,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  341|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r154, r23));
  342|    327|    Lib_IntVector_Intrinsics_vec256
  343|    327|        a341 =
  344|    327|            Lib_IntVector_Intrinsics_vec256_add64(a331,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  345|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r10, r23));
  346|    327|    Lib_IntVector_Intrinsics_vec256
  347|    327|        a441 =
  348|    327|            Lib_IntVector_Intrinsics_vec256_add64(a431,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  349|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r11, r23));
  350|    327|    Lib_IntVector_Intrinsics_vec256
  351|    327|        a051 =
  352|    327|            Lib_IntVector_Intrinsics_vec256_add64(a041,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  353|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r151, r24));
  354|    327|    Lib_IntVector_Intrinsics_vec256
  355|    327|        a151 =
  356|    327|            Lib_IntVector_Intrinsics_vec256_add64(a141,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  357|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r152, r24));
  358|    327|    Lib_IntVector_Intrinsics_vec256
  359|    327|        a251 =
  360|    327|            Lib_IntVector_Intrinsics_vec256_add64(a241,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  361|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r153, r24));
  362|    327|    Lib_IntVector_Intrinsics_vec256
  363|    327|        a351 =
  364|    327|            Lib_IntVector_Intrinsics_vec256_add64(a341,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  365|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r154, r24));
  366|    327|    Lib_IntVector_Intrinsics_vec256
  367|    327|        a451 =
  368|    327|            Lib_IntVector_Intrinsics_vec256_add64(a441,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  369|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r10, r24));
  370|    327|    Lib_IntVector_Intrinsics_vec256 t01 = a051;
  371|    327|    Lib_IntVector_Intrinsics_vec256 t11 = a151;
  372|    327|    Lib_IntVector_Intrinsics_vec256 t21 = a251;
  373|    327|    Lib_IntVector_Intrinsics_vec256 t31 = a351;
  374|    327|    Lib_IntVector_Intrinsics_vec256 t41 = a451;
  375|    327|    Lib_IntVector_Intrinsics_vec256
  376|    327|        mask261 = Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3ffffffU);
  ------------------
  |  |  389|    327|    (_mm256_set1_epi64x(x1)) /* hi lo */
  ------------------
  377|    327|    Lib_IntVector_Intrinsics_vec256
  378|    327|        z04 = Lib_IntVector_Intrinsics_vec256_shift_right64(t01, (uint32_t)26U);
  ------------------
  |  |  257|    327|    (_mm256_srli_epi64(x0, x1))
  ------------------
  379|    327|    Lib_IntVector_Intrinsics_vec256
  380|    327|        z14 = Lib_IntVector_Intrinsics_vec256_shift_right64(t31, (uint32_t)26U);
  ------------------
  |  |  257|    327|    (_mm256_srli_epi64(x0, x1))
  ------------------
  381|    327|    Lib_IntVector_Intrinsics_vec256 x03 = Lib_IntVector_Intrinsics_vec256_and(t01, mask261);
  ------------------
  |  |  242|    327|    (_mm256_and_si256(x0, x1))
  ------------------
  382|    327|    Lib_IntVector_Intrinsics_vec256 x33 = Lib_IntVector_Intrinsics_vec256_and(t31, mask261);
  ------------------
  |  |  242|    327|    (_mm256_and_si256(x0, x1))
  ------------------
  383|    327|    Lib_IntVector_Intrinsics_vec256 x13 = Lib_IntVector_Intrinsics_vec256_add64(t11, z04);
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  384|    327|    Lib_IntVector_Intrinsics_vec256 x43 = Lib_IntVector_Intrinsics_vec256_add64(t41, z14);
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  385|    327|    Lib_IntVector_Intrinsics_vec256
  386|    327|        z011 = Lib_IntVector_Intrinsics_vec256_shift_right64(x13, (uint32_t)26U);
  ------------------
  |  |  257|    327|    (_mm256_srli_epi64(x0, x1))
  ------------------
  387|    327|    Lib_IntVector_Intrinsics_vec256
  388|    327|        z111 = Lib_IntVector_Intrinsics_vec256_shift_right64(x43, (uint32_t)26U);
  ------------------
  |  |  257|    327|    (_mm256_srli_epi64(x0, x1))
  ------------------
  389|    327|    Lib_IntVector_Intrinsics_vec256
  390|    327|        t6 = Lib_IntVector_Intrinsics_vec256_shift_left64(z111, (uint32_t)2U);
  ------------------
  |  |  254|    327|    (_mm256_slli_epi64(x0, x1))
  ------------------
  391|    327|    Lib_IntVector_Intrinsics_vec256 z120 = Lib_IntVector_Intrinsics_vec256_add64(z111, t6);
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  392|    327|    Lib_IntVector_Intrinsics_vec256 x111 = Lib_IntVector_Intrinsics_vec256_and(x13, mask261);
  ------------------
  |  |  242|    327|    (_mm256_and_si256(x0, x1))
  ------------------
  393|    327|    Lib_IntVector_Intrinsics_vec256 x411 = Lib_IntVector_Intrinsics_vec256_and(x43, mask261);
  ------------------
  |  |  242|    327|    (_mm256_and_si256(x0, x1))
  ------------------
  394|    327|    Lib_IntVector_Intrinsics_vec256 x22 = Lib_IntVector_Intrinsics_vec256_add64(t21, z011);
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  395|    327|    Lib_IntVector_Intrinsics_vec256 x011 = Lib_IntVector_Intrinsics_vec256_add64(x03, z120);
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  396|    327|    Lib_IntVector_Intrinsics_vec256
  397|    327|        z021 = Lib_IntVector_Intrinsics_vec256_shift_right64(x22, (uint32_t)26U);
  ------------------
  |  |  257|    327|    (_mm256_srli_epi64(x0, x1))
  ------------------
  398|    327|    Lib_IntVector_Intrinsics_vec256
  399|    327|        z131 = Lib_IntVector_Intrinsics_vec256_shift_right64(x011, (uint32_t)26U);
  ------------------
  |  |  257|    327|    (_mm256_srli_epi64(x0, x1))
  ------------------
  400|    327|    Lib_IntVector_Intrinsics_vec256 x211 = Lib_IntVector_Intrinsics_vec256_and(x22, mask261);
  ------------------
  |  |  242|    327|    (_mm256_and_si256(x0, x1))
  ------------------
  401|    327|    Lib_IntVector_Intrinsics_vec256 x021 = Lib_IntVector_Intrinsics_vec256_and(x011, mask261);
  ------------------
  |  |  242|    327|    (_mm256_and_si256(x0, x1))
  ------------------
  402|    327|    Lib_IntVector_Intrinsics_vec256 x311 = Lib_IntVector_Intrinsics_vec256_add64(x33, z021);
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  403|    327|    Lib_IntVector_Intrinsics_vec256 x121 = Lib_IntVector_Intrinsics_vec256_add64(x111, z131);
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  404|    327|    Lib_IntVector_Intrinsics_vec256
  405|    327|        z031 = Lib_IntVector_Intrinsics_vec256_shift_right64(x311, (uint32_t)26U);
  ------------------
  |  |  257|    327|    (_mm256_srli_epi64(x0, x1))
  ------------------
  406|    327|    Lib_IntVector_Intrinsics_vec256 x321 = Lib_IntVector_Intrinsics_vec256_and(x311, mask261);
  ------------------
  |  |  242|    327|    (_mm256_and_si256(x0, x1))
  ------------------
  407|    327|    Lib_IntVector_Intrinsics_vec256 x421 = Lib_IntVector_Intrinsics_vec256_add64(x411, z031);
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  408|    327|    Lib_IntVector_Intrinsics_vec256 r30 = x021;
  409|    327|    Lib_IntVector_Intrinsics_vec256 r31 = x121;
  410|    327|    Lib_IntVector_Intrinsics_vec256 r32 = x211;
  411|    327|    Lib_IntVector_Intrinsics_vec256 r33 = x321;
  412|    327|    Lib_IntVector_Intrinsics_vec256 r34 = x421;
  413|    327|    Lib_IntVector_Intrinsics_vec256
  414|    327|        v12120 = Lib_IntVector_Intrinsics_vec256_interleave_low64(r20, r10);
  ------------------
  |  |  413|    327|    (_mm256_unpacklo_epi64(x1, x2))
  ------------------
  415|    327|    Lib_IntVector_Intrinsics_vec256
  416|    327|        v34340 = Lib_IntVector_Intrinsics_vec256_interleave_low64(r40, r30);
  ------------------
  |  |  413|    327|    (_mm256_unpacklo_epi64(x1, x2))
  ------------------
  417|    327|    Lib_IntVector_Intrinsics_vec256
  418|    327|        r12340 = Lib_IntVector_Intrinsics_vec256_interleave_low128(v34340, v12120);
  ------------------
  |  |  419|    327|    (_mm256_permute2x128_si256(x1, x2, 0x20))
  ------------------
  419|    327|    Lib_IntVector_Intrinsics_vec256
  420|    327|        v12121 = Lib_IntVector_Intrinsics_vec256_interleave_low64(r21, r11);
  ------------------
  |  |  413|    327|    (_mm256_unpacklo_epi64(x1, x2))
  ------------------
  421|    327|    Lib_IntVector_Intrinsics_vec256
  422|    327|        v34341 = Lib_IntVector_Intrinsics_vec256_interleave_low64(r41, r31);
  ------------------
  |  |  413|    327|    (_mm256_unpacklo_epi64(x1, x2))
  ------------------
  423|    327|    Lib_IntVector_Intrinsics_vec256
  424|    327|        r12341 = Lib_IntVector_Intrinsics_vec256_interleave_low128(v34341, v12121);
  ------------------
  |  |  419|    327|    (_mm256_permute2x128_si256(x1, x2, 0x20))
  ------------------
  425|    327|    Lib_IntVector_Intrinsics_vec256
  426|    327|        v12122 = Lib_IntVector_Intrinsics_vec256_interleave_low64(r22, r12);
  ------------------
  |  |  413|    327|    (_mm256_unpacklo_epi64(x1, x2))
  ------------------
  427|    327|    Lib_IntVector_Intrinsics_vec256
  428|    327|        v34342 = Lib_IntVector_Intrinsics_vec256_interleave_low64(r42, r32);
  ------------------
  |  |  413|    327|    (_mm256_unpacklo_epi64(x1, x2))
  ------------------
  429|    327|    Lib_IntVector_Intrinsics_vec256
  430|    327|        r12342 = Lib_IntVector_Intrinsics_vec256_interleave_low128(v34342, v12122);
  ------------------
  |  |  419|    327|    (_mm256_permute2x128_si256(x1, x2, 0x20))
  ------------------
  431|    327|    Lib_IntVector_Intrinsics_vec256
  432|    327|        v12123 = Lib_IntVector_Intrinsics_vec256_interleave_low64(r23, r13);
  ------------------
  |  |  413|    327|    (_mm256_unpacklo_epi64(x1, x2))
  ------------------
  433|    327|    Lib_IntVector_Intrinsics_vec256
  434|    327|        v34343 = Lib_IntVector_Intrinsics_vec256_interleave_low64(r43, r33);
  ------------------
  |  |  413|    327|    (_mm256_unpacklo_epi64(x1, x2))
  ------------------
  435|    327|    Lib_IntVector_Intrinsics_vec256
  436|    327|        r12343 = Lib_IntVector_Intrinsics_vec256_interleave_low128(v34343, v12123);
  ------------------
  |  |  419|    327|    (_mm256_permute2x128_si256(x1, x2, 0x20))
  ------------------
  437|    327|    Lib_IntVector_Intrinsics_vec256
  438|    327|        v12124 = Lib_IntVector_Intrinsics_vec256_interleave_low64(r24, r14);
  ------------------
  |  |  413|    327|    (_mm256_unpacklo_epi64(x1, x2))
  ------------------
  439|    327|    Lib_IntVector_Intrinsics_vec256
  440|    327|        v34344 = Lib_IntVector_Intrinsics_vec256_interleave_low64(r44, r34);
  ------------------
  |  |  413|    327|    (_mm256_unpacklo_epi64(x1, x2))
  ------------------
  441|    327|    Lib_IntVector_Intrinsics_vec256
  442|    327|        r12344 = Lib_IntVector_Intrinsics_vec256_interleave_low128(v34344, v12124);
  ------------------
  |  |  419|    327|    (_mm256_permute2x128_si256(x1, x2, 0x20))
  ------------------
  443|    327|    Lib_IntVector_Intrinsics_vec256
  444|    327|        r123451 = Lib_IntVector_Intrinsics_vec256_smul64(r12341, (uint64_t)5U);
  ------------------
  |  |  374|    327|    (_mm256_mul_epu32(x0, _mm256_set1_epi64x(x1)))
  ------------------
  445|    327|    Lib_IntVector_Intrinsics_vec256
  446|    327|        r123452 = Lib_IntVector_Intrinsics_vec256_smul64(r12342, (uint64_t)5U);
  ------------------
  |  |  374|    327|    (_mm256_mul_epu32(x0, _mm256_set1_epi64x(x1)))
  ------------------
  447|    327|    Lib_IntVector_Intrinsics_vec256
  448|    327|        r123453 = Lib_IntVector_Intrinsics_vec256_smul64(r12343, (uint64_t)5U);
  ------------------
  |  |  374|    327|    (_mm256_mul_epu32(x0, _mm256_set1_epi64x(x1)))
  ------------------
  449|    327|    Lib_IntVector_Intrinsics_vec256
  450|    327|        r123454 = Lib_IntVector_Intrinsics_vec256_smul64(r12344, (uint64_t)5U);
  ------------------
  |  |  374|    327|    (_mm256_mul_epu32(x0, _mm256_set1_epi64x(x1)))
  ------------------
  451|    327|    Lib_IntVector_Intrinsics_vec256 a01 = Lib_IntVector_Intrinsics_vec256_mul64(r12340, a0);
  ------------------
  |  |  371|    327|    (_mm256_mul_epu32(x0, x1))
  ------------------
  452|    327|    Lib_IntVector_Intrinsics_vec256 a11 = Lib_IntVector_Intrinsics_vec256_mul64(r12341, a0);
  ------------------
  |  |  371|    327|    (_mm256_mul_epu32(x0, x1))
  ------------------
  453|    327|    Lib_IntVector_Intrinsics_vec256 a21 = Lib_IntVector_Intrinsics_vec256_mul64(r12342, a0);
  ------------------
  |  |  371|    327|    (_mm256_mul_epu32(x0, x1))
  ------------------
  454|    327|    Lib_IntVector_Intrinsics_vec256 a31 = Lib_IntVector_Intrinsics_vec256_mul64(r12343, a0);
  ------------------
  |  |  371|    327|    (_mm256_mul_epu32(x0, x1))
  ------------------
  455|    327|    Lib_IntVector_Intrinsics_vec256 a41 = Lib_IntVector_Intrinsics_vec256_mul64(r12344, a0);
  ------------------
  |  |  371|    327|    (_mm256_mul_epu32(x0, x1))
  ------------------
  456|    327|    Lib_IntVector_Intrinsics_vec256
  457|    327|        a02 =
  458|    327|            Lib_IntVector_Intrinsics_vec256_add64(a01,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  459|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r123454, a1));
  460|    327|    Lib_IntVector_Intrinsics_vec256
  461|    327|        a12 =
  462|    327|            Lib_IntVector_Intrinsics_vec256_add64(a11,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  463|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r12340, a1));
  464|    327|    Lib_IntVector_Intrinsics_vec256
  465|    327|        a22 =
  466|    327|            Lib_IntVector_Intrinsics_vec256_add64(a21,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  467|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r12341, a1));
  468|    327|    Lib_IntVector_Intrinsics_vec256
  469|    327|        a32 =
  470|    327|            Lib_IntVector_Intrinsics_vec256_add64(a31,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  471|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r12342, a1));
  472|    327|    Lib_IntVector_Intrinsics_vec256
  473|    327|        a42 =
  474|    327|            Lib_IntVector_Intrinsics_vec256_add64(a41,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  475|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r12343, a1));
  476|    327|    Lib_IntVector_Intrinsics_vec256
  477|    327|        a03 =
  478|    327|            Lib_IntVector_Intrinsics_vec256_add64(a02,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  479|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r123453, a2));
  480|    327|    Lib_IntVector_Intrinsics_vec256
  481|    327|        a13 =
  482|    327|            Lib_IntVector_Intrinsics_vec256_add64(a12,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  483|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r123454, a2));
  484|    327|    Lib_IntVector_Intrinsics_vec256
  485|    327|        a23 =
  486|    327|            Lib_IntVector_Intrinsics_vec256_add64(a22,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  487|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r12340, a2));
  488|    327|    Lib_IntVector_Intrinsics_vec256
  489|    327|        a33 =
  490|    327|            Lib_IntVector_Intrinsics_vec256_add64(a32,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  491|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r12341, a2));
  492|    327|    Lib_IntVector_Intrinsics_vec256
  493|    327|        a43 =
  494|    327|            Lib_IntVector_Intrinsics_vec256_add64(a42,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  495|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r12342, a2));
  496|    327|    Lib_IntVector_Intrinsics_vec256
  497|    327|        a04 =
  498|    327|            Lib_IntVector_Intrinsics_vec256_add64(a03,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  499|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r123452, a3));
  500|    327|    Lib_IntVector_Intrinsics_vec256
  501|    327|        a14 =
  502|    327|            Lib_IntVector_Intrinsics_vec256_add64(a13,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  503|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r123453, a3));
  504|    327|    Lib_IntVector_Intrinsics_vec256
  505|    327|        a24 =
  506|    327|            Lib_IntVector_Intrinsics_vec256_add64(a23,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  507|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r123454, a3));
  508|    327|    Lib_IntVector_Intrinsics_vec256
  509|    327|        a34 =
  510|    327|            Lib_IntVector_Intrinsics_vec256_add64(a33,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  511|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r12340, a3));
  512|    327|    Lib_IntVector_Intrinsics_vec256
  513|    327|        a44 =
  514|    327|            Lib_IntVector_Intrinsics_vec256_add64(a43,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  515|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r12341, a3));
  516|    327|    Lib_IntVector_Intrinsics_vec256
  517|    327|        a05 =
  518|    327|            Lib_IntVector_Intrinsics_vec256_add64(a04,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  519|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r123451, a4));
  520|    327|    Lib_IntVector_Intrinsics_vec256
  521|    327|        a15 =
  522|    327|            Lib_IntVector_Intrinsics_vec256_add64(a14,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  523|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r123452, a4));
  524|    327|    Lib_IntVector_Intrinsics_vec256
  525|    327|        a25 =
  526|    327|            Lib_IntVector_Intrinsics_vec256_add64(a24,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  527|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r123453, a4));
  528|    327|    Lib_IntVector_Intrinsics_vec256
  529|    327|        a35 =
  530|    327|            Lib_IntVector_Intrinsics_vec256_add64(a34,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  531|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r123454, a4));
  532|    327|    Lib_IntVector_Intrinsics_vec256
  533|    327|        a45 =
  534|    327|            Lib_IntVector_Intrinsics_vec256_add64(a44,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  535|    327|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r12340, a4));
  536|    327|    Lib_IntVector_Intrinsics_vec256 t0 = a05;
  537|    327|    Lib_IntVector_Intrinsics_vec256 t1 = a15;
  538|    327|    Lib_IntVector_Intrinsics_vec256 t2 = a25;
  539|    327|    Lib_IntVector_Intrinsics_vec256 t3 = a35;
  540|    327|    Lib_IntVector_Intrinsics_vec256 t4 = a45;
  541|    327|    Lib_IntVector_Intrinsics_vec256
  542|    327|        mask26 = Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3ffffffU);
  ------------------
  |  |  389|    327|    (_mm256_set1_epi64x(x1)) /* hi lo */
  ------------------
  543|    327|    Lib_IntVector_Intrinsics_vec256
  544|    327|        z0 = Lib_IntVector_Intrinsics_vec256_shift_right64(t0, (uint32_t)26U);
  ------------------
  |  |  257|    327|    (_mm256_srli_epi64(x0, x1))
  ------------------
  545|    327|    Lib_IntVector_Intrinsics_vec256
  546|    327|        z1 = Lib_IntVector_Intrinsics_vec256_shift_right64(t3, (uint32_t)26U);
  ------------------
  |  |  257|    327|    (_mm256_srli_epi64(x0, x1))
  ------------------
  547|    327|    Lib_IntVector_Intrinsics_vec256 x0 = Lib_IntVector_Intrinsics_vec256_and(t0, mask26);
  ------------------
  |  |  242|    327|    (_mm256_and_si256(x0, x1))
  ------------------
  548|    327|    Lib_IntVector_Intrinsics_vec256 x3 = Lib_IntVector_Intrinsics_vec256_and(t3, mask26);
  ------------------
  |  |  242|    327|    (_mm256_and_si256(x0, x1))
  ------------------
  549|    327|    Lib_IntVector_Intrinsics_vec256 x1 = Lib_IntVector_Intrinsics_vec256_add64(t1, z0);
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  550|    327|    Lib_IntVector_Intrinsics_vec256 x4 = Lib_IntVector_Intrinsics_vec256_add64(t4, z1);
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  551|    327|    Lib_IntVector_Intrinsics_vec256
  552|    327|        z01 = Lib_IntVector_Intrinsics_vec256_shift_right64(x1, (uint32_t)26U);
  ------------------
  |  |  257|    327|    (_mm256_srli_epi64(x0, x1))
  ------------------
  553|    327|    Lib_IntVector_Intrinsics_vec256
  554|    327|        z11 = Lib_IntVector_Intrinsics_vec256_shift_right64(x4, (uint32_t)26U);
  ------------------
  |  |  257|    327|    (_mm256_srli_epi64(x0, x1))
  ------------------
  555|    327|    Lib_IntVector_Intrinsics_vec256
  556|    327|        t = Lib_IntVector_Intrinsics_vec256_shift_left64(z11, (uint32_t)2U);
  ------------------
  |  |  254|    327|    (_mm256_slli_epi64(x0, x1))
  ------------------
  557|    327|    Lib_IntVector_Intrinsics_vec256 z121 = Lib_IntVector_Intrinsics_vec256_add64(z11, t);
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  558|    327|    Lib_IntVector_Intrinsics_vec256 x11 = Lib_IntVector_Intrinsics_vec256_and(x1, mask26);
  ------------------
  |  |  242|    327|    (_mm256_and_si256(x0, x1))
  ------------------
  559|    327|    Lib_IntVector_Intrinsics_vec256 x41 = Lib_IntVector_Intrinsics_vec256_and(x4, mask26);
  ------------------
  |  |  242|    327|    (_mm256_and_si256(x0, x1))
  ------------------
  560|    327|    Lib_IntVector_Intrinsics_vec256 x2 = Lib_IntVector_Intrinsics_vec256_add64(t2, z01);
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  561|    327|    Lib_IntVector_Intrinsics_vec256 x01 = Lib_IntVector_Intrinsics_vec256_add64(x0, z121);
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  562|    327|    Lib_IntVector_Intrinsics_vec256
  563|    327|        z02 = Lib_IntVector_Intrinsics_vec256_shift_right64(x2, (uint32_t)26U);
  ------------------
  |  |  257|    327|    (_mm256_srli_epi64(x0, x1))
  ------------------
  564|    327|    Lib_IntVector_Intrinsics_vec256
  565|    327|        z13 = Lib_IntVector_Intrinsics_vec256_shift_right64(x01, (uint32_t)26U);
  ------------------
  |  |  257|    327|    (_mm256_srli_epi64(x0, x1))
  ------------------
  566|    327|    Lib_IntVector_Intrinsics_vec256 x21 = Lib_IntVector_Intrinsics_vec256_and(x2, mask26);
  ------------------
  |  |  242|    327|    (_mm256_and_si256(x0, x1))
  ------------------
  567|    327|    Lib_IntVector_Intrinsics_vec256 x02 = Lib_IntVector_Intrinsics_vec256_and(x01, mask26);
  ------------------
  |  |  242|    327|    (_mm256_and_si256(x0, x1))
  ------------------
  568|    327|    Lib_IntVector_Intrinsics_vec256 x31 = Lib_IntVector_Intrinsics_vec256_add64(x3, z02);
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  569|    327|    Lib_IntVector_Intrinsics_vec256 x12 = Lib_IntVector_Intrinsics_vec256_add64(x11, z13);
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  570|    327|    Lib_IntVector_Intrinsics_vec256
  571|    327|        z03 = Lib_IntVector_Intrinsics_vec256_shift_right64(x31, (uint32_t)26U);
  ------------------
  |  |  257|    327|    (_mm256_srli_epi64(x0, x1))
  ------------------
  572|    327|    Lib_IntVector_Intrinsics_vec256 x32 = Lib_IntVector_Intrinsics_vec256_and(x31, mask26);
  ------------------
  |  |  242|    327|    (_mm256_and_si256(x0, x1))
  ------------------
  573|    327|    Lib_IntVector_Intrinsics_vec256 x42 = Lib_IntVector_Intrinsics_vec256_add64(x41, z03);
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  574|    327|    Lib_IntVector_Intrinsics_vec256 o0 = x02;
  575|    327|    Lib_IntVector_Intrinsics_vec256 o10 = x12;
  576|    327|    Lib_IntVector_Intrinsics_vec256 o20 = x21;
  577|    327|    Lib_IntVector_Intrinsics_vec256 o30 = x32;
  578|    327|    Lib_IntVector_Intrinsics_vec256 o40 = x42;
  579|    327|    Lib_IntVector_Intrinsics_vec256
  580|    327|        v00 = Lib_IntVector_Intrinsics_vec256_interleave_high128(o0, o0);
  ------------------
  |  |  422|    327|    (_mm256_permute2x128_si256(x1, x2, 0x31))
  ------------------
  581|    327|    Lib_IntVector_Intrinsics_vec256 v10 = Lib_IntVector_Intrinsics_vec256_add64(o0, v00);
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  582|    327|    Lib_IntVector_Intrinsics_vec256
  583|    327|        v10h = Lib_IntVector_Intrinsics_vec256_interleave_high64(v10, v10);
  ------------------
  |  |  416|    327|    (_mm256_unpackhi_epi64(x1, x2))
  ------------------
  584|    327|    Lib_IntVector_Intrinsics_vec256 v20 = Lib_IntVector_Intrinsics_vec256_add64(v10, v10h);
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  585|    327|    Lib_IntVector_Intrinsics_vec256
  586|    327|        v01 = Lib_IntVector_Intrinsics_vec256_interleave_high128(o10, o10);
  ------------------
  |  |  422|    327|    (_mm256_permute2x128_si256(x1, x2, 0x31))
  ------------------
  587|    327|    Lib_IntVector_Intrinsics_vec256 v11 = Lib_IntVector_Intrinsics_vec256_add64(o10, v01);
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  588|    327|    Lib_IntVector_Intrinsics_vec256
  589|    327|        v11h = Lib_IntVector_Intrinsics_vec256_interleave_high64(v11, v11);
  ------------------
  |  |  416|    327|    (_mm256_unpackhi_epi64(x1, x2))
  ------------------
  590|    327|    Lib_IntVector_Intrinsics_vec256 v21 = Lib_IntVector_Intrinsics_vec256_add64(v11, v11h);
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  591|    327|    Lib_IntVector_Intrinsics_vec256
  592|    327|        v02 = Lib_IntVector_Intrinsics_vec256_interleave_high128(o20, o20);
  ------------------
  |  |  422|    327|    (_mm256_permute2x128_si256(x1, x2, 0x31))
  ------------------
  593|    327|    Lib_IntVector_Intrinsics_vec256 v12 = Lib_IntVector_Intrinsics_vec256_add64(o20, v02);
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  594|    327|    Lib_IntVector_Intrinsics_vec256
  595|    327|        v12h = Lib_IntVector_Intrinsics_vec256_interleave_high64(v12, v12);
  ------------------
  |  |  416|    327|    (_mm256_unpackhi_epi64(x1, x2))
  ------------------
  596|    327|    Lib_IntVector_Intrinsics_vec256 v22 = Lib_IntVector_Intrinsics_vec256_add64(v12, v12h);
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  597|    327|    Lib_IntVector_Intrinsics_vec256
  598|    327|        v03 = Lib_IntVector_Intrinsics_vec256_interleave_high128(o30, o30);
  ------------------
  |  |  422|    327|    (_mm256_permute2x128_si256(x1, x2, 0x31))
  ------------------
  599|    327|    Lib_IntVector_Intrinsics_vec256 v13 = Lib_IntVector_Intrinsics_vec256_add64(o30, v03);
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  600|    327|    Lib_IntVector_Intrinsics_vec256
  601|    327|        v13h = Lib_IntVector_Intrinsics_vec256_interleave_high64(v13, v13);
  ------------------
  |  |  416|    327|    (_mm256_unpackhi_epi64(x1, x2))
  ------------------
  602|    327|    Lib_IntVector_Intrinsics_vec256 v23 = Lib_IntVector_Intrinsics_vec256_add64(v13, v13h);
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  603|    327|    Lib_IntVector_Intrinsics_vec256
  604|    327|        v04 = Lib_IntVector_Intrinsics_vec256_interleave_high128(o40, o40);
  ------------------
  |  |  422|    327|    (_mm256_permute2x128_si256(x1, x2, 0x31))
  ------------------
  605|    327|    Lib_IntVector_Intrinsics_vec256 v14 = Lib_IntVector_Intrinsics_vec256_add64(o40, v04);
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  606|    327|    Lib_IntVector_Intrinsics_vec256
  607|    327|        v14h = Lib_IntVector_Intrinsics_vec256_interleave_high64(v14, v14);
  ------------------
  |  |  416|    327|    (_mm256_unpackhi_epi64(x1, x2))
  ------------------
  608|    327|    Lib_IntVector_Intrinsics_vec256 v24 = Lib_IntVector_Intrinsics_vec256_add64(v14, v14h);
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  609|    327|    Lib_IntVector_Intrinsics_vec256
  610|    327|        l = Lib_IntVector_Intrinsics_vec256_add64(v20, Lib_IntVector_Intrinsics_vec256_zero);
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  611|    327|    Lib_IntVector_Intrinsics_vec256
  612|    327|        tmp0 =
  613|    327|            Lib_IntVector_Intrinsics_vec256_and(l,
  ------------------
  |  |  242|    327|    (_mm256_and_si256(x0, x1))
  ------------------
  614|    327|                                                Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3ffffffU));
  615|    327|    Lib_IntVector_Intrinsics_vec256
  616|    327|        c0 = Lib_IntVector_Intrinsics_vec256_shift_right64(l, (uint32_t)26U);
  ------------------
  |  |  257|    327|    (_mm256_srli_epi64(x0, x1))
  ------------------
  617|    327|    Lib_IntVector_Intrinsics_vec256 l0 = Lib_IntVector_Intrinsics_vec256_add64(v21, c0);
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  618|    327|    Lib_IntVector_Intrinsics_vec256
  619|    327|        tmp1 =
  620|    327|            Lib_IntVector_Intrinsics_vec256_and(l0,
  ------------------
  |  |  242|    327|    (_mm256_and_si256(x0, x1))
  ------------------
  621|    327|                                                Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3ffffffU));
  622|    327|    Lib_IntVector_Intrinsics_vec256
  623|    327|        c1 = Lib_IntVector_Intrinsics_vec256_shift_right64(l0, (uint32_t)26U);
  ------------------
  |  |  257|    327|    (_mm256_srli_epi64(x0, x1))
  ------------------
  624|    327|    Lib_IntVector_Intrinsics_vec256 l1 = Lib_IntVector_Intrinsics_vec256_add64(v22, c1);
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  625|    327|    Lib_IntVector_Intrinsics_vec256
  626|    327|        tmp2 =
  627|    327|            Lib_IntVector_Intrinsics_vec256_and(l1,
  ------------------
  |  |  242|    327|    (_mm256_and_si256(x0, x1))
  ------------------
  628|    327|                                                Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3ffffffU));
  629|    327|    Lib_IntVector_Intrinsics_vec256
  630|    327|        c2 = Lib_IntVector_Intrinsics_vec256_shift_right64(l1, (uint32_t)26U);
  ------------------
  |  |  257|    327|    (_mm256_srli_epi64(x0, x1))
  ------------------
  631|    327|    Lib_IntVector_Intrinsics_vec256 l2 = Lib_IntVector_Intrinsics_vec256_add64(v23, c2);
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  632|    327|    Lib_IntVector_Intrinsics_vec256
  633|    327|        tmp3 =
  634|    327|            Lib_IntVector_Intrinsics_vec256_and(l2,
  ------------------
  |  |  242|    327|    (_mm256_and_si256(x0, x1))
  ------------------
  635|    327|                                                Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3ffffffU));
  636|    327|    Lib_IntVector_Intrinsics_vec256
  637|    327|        c3 = Lib_IntVector_Intrinsics_vec256_shift_right64(l2, (uint32_t)26U);
  ------------------
  |  |  257|    327|    (_mm256_srli_epi64(x0, x1))
  ------------------
  638|    327|    Lib_IntVector_Intrinsics_vec256 l3 = Lib_IntVector_Intrinsics_vec256_add64(v24, c3);
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  639|    327|    Lib_IntVector_Intrinsics_vec256
  640|    327|        tmp4 =
  641|    327|            Lib_IntVector_Intrinsics_vec256_and(l3,
  ------------------
  |  |  242|    327|    (_mm256_and_si256(x0, x1))
  ------------------
  642|    327|                                                Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3ffffffU));
  643|    327|    Lib_IntVector_Intrinsics_vec256
  644|    327|        c4 = Lib_IntVector_Intrinsics_vec256_shift_right64(l3, (uint32_t)26U);
  ------------------
  |  |  257|    327|    (_mm256_srli_epi64(x0, x1))
  ------------------
  645|    327|    Lib_IntVector_Intrinsics_vec256
  646|    327|        o00 =
  647|    327|            Lib_IntVector_Intrinsics_vec256_add64(tmp0,
  ------------------
  |  |  365|    327|    (_mm256_add_epi64(x0, x1))
  ------------------
  648|    327|                                                  Lib_IntVector_Intrinsics_vec256_smul64(c4, (uint64_t)5U));
  649|    327|    Lib_IntVector_Intrinsics_vec256 o1 = tmp1;
  650|    327|    Lib_IntVector_Intrinsics_vec256 o2 = tmp2;
  651|    327|    Lib_IntVector_Intrinsics_vec256 o3 = tmp3;
  652|    327|    Lib_IntVector_Intrinsics_vec256 o4 = tmp4;
  653|    327|    out[0U] = o00;
  654|    327|    out[1U] = o1;
  655|    327|    out[2U] = o2;
  656|    327|    out[3U] = o3;
  657|    327|    out[4U] = o4;
  658|    327|}
Hacl_Poly1305_256_poly1305_init:
  662|  4.84k|{
  663|  4.84k|    Lib_IntVector_Intrinsics_vec256 *acc = ctx;
  664|  4.84k|    Lib_IntVector_Intrinsics_vec256 *pre = ctx + (uint32_t)5U;
  665|  4.84k|    uint8_t *kr = key;
  666|  4.84k|    acc[0U] = Lib_IntVector_Intrinsics_vec256_zero;
  ------------------
  |  |  362|  4.84k|    (_mm256_setzero_si256())
  ------------------
  667|  4.84k|    acc[1U] = Lib_IntVector_Intrinsics_vec256_zero;
  ------------------
  |  |  362|  4.84k|    (_mm256_setzero_si256())
  ------------------
  668|  4.84k|    acc[2U] = Lib_IntVector_Intrinsics_vec256_zero;
  ------------------
  |  |  362|  4.84k|    (_mm256_setzero_si256())
  ------------------
  669|  4.84k|    acc[3U] = Lib_IntVector_Intrinsics_vec256_zero;
  ------------------
  |  |  362|  4.84k|    (_mm256_setzero_si256())
  ------------------
  670|  4.84k|    acc[4U] = Lib_IntVector_Intrinsics_vec256_zero;
  ------------------
  |  |  362|  4.84k|    (_mm256_setzero_si256())
  ------------------
  671|  4.84k|    uint64_t u0 = load64_le(kr);
  ------------------
  |  |  214|  4.84k|#define load64_le(b) (le64toh(load64(b)))
  ------------------
  672|  4.84k|    uint64_t lo = u0;
  673|  4.84k|    uint64_t u = load64_le(kr + (uint32_t)8U);
  ------------------
  |  |  214|  4.84k|#define load64_le(b) (le64toh(load64(b)))
  ------------------
  674|  4.84k|    uint64_t hi = u;
  675|  4.84k|    uint64_t mask0 = (uint64_t)0x0ffffffc0fffffffU;
  676|  4.84k|    uint64_t mask1 = (uint64_t)0x0ffffffc0ffffffcU;
  677|  4.84k|    uint64_t lo1 = lo & mask0;
  678|  4.84k|    uint64_t hi1 = hi & mask1;
  679|  4.84k|    Lib_IntVector_Intrinsics_vec256 *r = pre;
  680|  4.84k|    Lib_IntVector_Intrinsics_vec256 *r5 = pre + (uint32_t)5U;
  681|  4.84k|    Lib_IntVector_Intrinsics_vec256 *rn = pre + (uint32_t)10U;
  682|  4.84k|    Lib_IntVector_Intrinsics_vec256 *rn_5 = pre + (uint32_t)15U;
  683|  4.84k|    Lib_IntVector_Intrinsics_vec256 r_vec0 = Lib_IntVector_Intrinsics_vec256_load64(lo1);
  ------------------
  |  |  389|  4.84k|    (_mm256_set1_epi64x(x1)) /* hi lo */
  ------------------
  684|  4.84k|    Lib_IntVector_Intrinsics_vec256 r_vec1 = Lib_IntVector_Intrinsics_vec256_load64(hi1);
  ------------------
  |  |  389|  4.84k|    (_mm256_set1_epi64x(x1)) /* hi lo */
  ------------------
  685|  4.84k|    Lib_IntVector_Intrinsics_vec256
  686|  4.84k|        f00 =
  687|  4.84k|            Lib_IntVector_Intrinsics_vec256_and(r_vec0,
  ------------------
  |  |  242|  4.84k|    (_mm256_and_si256(x0, x1))
  ------------------
  688|  4.84k|                                                Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3ffffffU));
  689|  4.84k|    Lib_IntVector_Intrinsics_vec256
  690|  4.84k|        f15 =
  691|  4.84k|            Lib_IntVector_Intrinsics_vec256_and(Lib_IntVector_Intrinsics_vec256_shift_right64(r_vec0,
  ------------------
  |  |  242|  4.84k|    (_mm256_and_si256(x0, x1))
  ------------------
  692|  4.84k|                                                                                              (uint32_t)26U),
  693|  4.84k|                                                Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3ffffffU));
  694|  4.84k|    Lib_IntVector_Intrinsics_vec256
  695|  4.84k|        f20 =
  696|  4.84k|            Lib_IntVector_Intrinsics_vec256_or(Lib_IntVector_Intrinsics_vec256_shift_right64(r_vec0,
  ------------------
  |  |  239|  4.84k|    (_mm256_or_si256(x0, x1))
  ------------------
  697|  4.84k|                                                                                             (uint32_t)52U),
  698|  4.84k|                                               Lib_IntVector_Intrinsics_vec256_shift_left64(Lib_IntVector_Intrinsics_vec256_and(r_vec1,
  699|  4.84k|                                                                                                                                Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3fffU)),
  700|  4.84k|                                                                                            (uint32_t)12U));
  701|  4.84k|    Lib_IntVector_Intrinsics_vec256
  702|  4.84k|        f30 =
  703|  4.84k|            Lib_IntVector_Intrinsics_vec256_and(Lib_IntVector_Intrinsics_vec256_shift_right64(r_vec1,
  ------------------
  |  |  242|  4.84k|    (_mm256_and_si256(x0, x1))
  ------------------
  704|  4.84k|                                                                                              (uint32_t)14U),
  705|  4.84k|                                                Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3ffffffU));
  706|  4.84k|    Lib_IntVector_Intrinsics_vec256
  707|  4.84k|        f40 = Lib_IntVector_Intrinsics_vec256_shift_right64(r_vec1, (uint32_t)40U);
  ------------------
  |  |  257|  4.84k|    (_mm256_srli_epi64(x0, x1))
  ------------------
  708|  4.84k|    Lib_IntVector_Intrinsics_vec256 f0 = f00;
  709|  4.84k|    Lib_IntVector_Intrinsics_vec256 f1 = f15;
  710|  4.84k|    Lib_IntVector_Intrinsics_vec256 f2 = f20;
  711|  4.84k|    Lib_IntVector_Intrinsics_vec256 f3 = f30;
  712|  4.84k|    Lib_IntVector_Intrinsics_vec256 f4 = f40;
  713|  4.84k|    r[0U] = f0;
  714|  4.84k|    r[1U] = f1;
  715|  4.84k|    r[2U] = f2;
  716|  4.84k|    r[3U] = f3;
  717|  4.84k|    r[4U] = f4;
  718|  4.84k|    Lib_IntVector_Intrinsics_vec256 f200 = r[0U];
  719|  4.84k|    Lib_IntVector_Intrinsics_vec256 f210 = r[1U];
  720|  4.84k|    Lib_IntVector_Intrinsics_vec256 f220 = r[2U];
  721|  4.84k|    Lib_IntVector_Intrinsics_vec256 f230 = r[3U];
  722|  4.84k|    Lib_IntVector_Intrinsics_vec256 f240 = r[4U];
  723|  4.84k|    r5[0U] = Lib_IntVector_Intrinsics_vec256_smul64(f200, (uint64_t)5U);
  ------------------
  |  |  374|  4.84k|    (_mm256_mul_epu32(x0, _mm256_set1_epi64x(x1)))
  ------------------
  724|  4.84k|    r5[1U] = Lib_IntVector_Intrinsics_vec256_smul64(f210, (uint64_t)5U);
  ------------------
  |  |  374|  4.84k|    (_mm256_mul_epu32(x0, _mm256_set1_epi64x(x1)))
  ------------------
  725|  4.84k|    r5[2U] = Lib_IntVector_Intrinsics_vec256_smul64(f220, (uint64_t)5U);
  ------------------
  |  |  374|  4.84k|    (_mm256_mul_epu32(x0, _mm256_set1_epi64x(x1)))
  ------------------
  726|  4.84k|    r5[3U] = Lib_IntVector_Intrinsics_vec256_smul64(f230, (uint64_t)5U);
  ------------------
  |  |  374|  4.84k|    (_mm256_mul_epu32(x0, _mm256_set1_epi64x(x1)))
  ------------------
  727|  4.84k|    r5[4U] = Lib_IntVector_Intrinsics_vec256_smul64(f240, (uint64_t)5U);
  ------------------
  |  |  374|  4.84k|    (_mm256_mul_epu32(x0, _mm256_set1_epi64x(x1)))
  ------------------
  728|  4.84k|    Lib_IntVector_Intrinsics_vec256 r0 = r[0U];
  729|  4.84k|    Lib_IntVector_Intrinsics_vec256 r10 = r[1U];
  730|  4.84k|    Lib_IntVector_Intrinsics_vec256 r20 = r[2U];
  731|  4.84k|    Lib_IntVector_Intrinsics_vec256 r30 = r[3U];
  732|  4.84k|    Lib_IntVector_Intrinsics_vec256 r40 = r[4U];
  733|  4.84k|    Lib_IntVector_Intrinsics_vec256 r510 = r5[1U];
  734|  4.84k|    Lib_IntVector_Intrinsics_vec256 r520 = r5[2U];
  735|  4.84k|    Lib_IntVector_Intrinsics_vec256 r530 = r5[3U];
  736|  4.84k|    Lib_IntVector_Intrinsics_vec256 r540 = r5[4U];
  737|  4.84k|    Lib_IntVector_Intrinsics_vec256 f100 = r[0U];
  738|  4.84k|    Lib_IntVector_Intrinsics_vec256 f110 = r[1U];
  739|  4.84k|    Lib_IntVector_Intrinsics_vec256 f120 = r[2U];
  740|  4.84k|    Lib_IntVector_Intrinsics_vec256 f130 = r[3U];
  741|  4.84k|    Lib_IntVector_Intrinsics_vec256 f140 = r[4U];
  742|  4.84k|    Lib_IntVector_Intrinsics_vec256 a00 = Lib_IntVector_Intrinsics_vec256_mul64(r0, f100);
  ------------------
  |  |  371|  4.84k|    (_mm256_mul_epu32(x0, x1))
  ------------------
  743|  4.84k|    Lib_IntVector_Intrinsics_vec256 a10 = Lib_IntVector_Intrinsics_vec256_mul64(r10, f100);
  ------------------
  |  |  371|  4.84k|    (_mm256_mul_epu32(x0, x1))
  ------------------
  744|  4.84k|    Lib_IntVector_Intrinsics_vec256 a20 = Lib_IntVector_Intrinsics_vec256_mul64(r20, f100);
  ------------------
  |  |  371|  4.84k|    (_mm256_mul_epu32(x0, x1))
  ------------------
  745|  4.84k|    Lib_IntVector_Intrinsics_vec256 a30 = Lib_IntVector_Intrinsics_vec256_mul64(r30, f100);
  ------------------
  |  |  371|  4.84k|    (_mm256_mul_epu32(x0, x1))
  ------------------
  746|  4.84k|    Lib_IntVector_Intrinsics_vec256 a40 = Lib_IntVector_Intrinsics_vec256_mul64(r40, f100);
  ------------------
  |  |  371|  4.84k|    (_mm256_mul_epu32(x0, x1))
  ------------------
  747|  4.84k|    Lib_IntVector_Intrinsics_vec256
  748|  4.84k|        a010 =
  749|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a00,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  750|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r540, f110));
  751|  4.84k|    Lib_IntVector_Intrinsics_vec256
  752|  4.84k|        a110 =
  753|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a10,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  754|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r0, f110));
  755|  4.84k|    Lib_IntVector_Intrinsics_vec256
  756|  4.84k|        a210 =
  757|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a20,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  758|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r10, f110));
  759|  4.84k|    Lib_IntVector_Intrinsics_vec256
  760|  4.84k|        a310 =
  761|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a30,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  762|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r20, f110));
  763|  4.84k|    Lib_IntVector_Intrinsics_vec256
  764|  4.84k|        a410 =
  765|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a40,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  766|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r30, f110));
  767|  4.84k|    Lib_IntVector_Intrinsics_vec256
  768|  4.84k|        a020 =
  769|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a010,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  770|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r530, f120));
  771|  4.84k|    Lib_IntVector_Intrinsics_vec256
  772|  4.84k|        a120 =
  773|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a110,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  774|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r540, f120));
  775|  4.84k|    Lib_IntVector_Intrinsics_vec256
  776|  4.84k|        a220 =
  777|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a210,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  778|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r0, f120));
  779|  4.84k|    Lib_IntVector_Intrinsics_vec256
  780|  4.84k|        a320 =
  781|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a310,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  782|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r10, f120));
  783|  4.84k|    Lib_IntVector_Intrinsics_vec256
  784|  4.84k|        a420 =
  785|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a410,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  786|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r20, f120));
  787|  4.84k|    Lib_IntVector_Intrinsics_vec256
  788|  4.84k|        a030 =
  789|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a020,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  790|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r520, f130));
  791|  4.84k|    Lib_IntVector_Intrinsics_vec256
  792|  4.84k|        a130 =
  793|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a120,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  794|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r530, f130));
  795|  4.84k|    Lib_IntVector_Intrinsics_vec256
  796|  4.84k|        a230 =
  797|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a220,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  798|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r540, f130));
  799|  4.84k|    Lib_IntVector_Intrinsics_vec256
  800|  4.84k|        a330 =
  801|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a320,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  802|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r0, f130));
  803|  4.84k|    Lib_IntVector_Intrinsics_vec256
  804|  4.84k|        a430 =
  805|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a420,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  806|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r10, f130));
  807|  4.84k|    Lib_IntVector_Intrinsics_vec256
  808|  4.84k|        a040 =
  809|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a030,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  810|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r510, f140));
  811|  4.84k|    Lib_IntVector_Intrinsics_vec256
  812|  4.84k|        a140 =
  813|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a130,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  814|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r520, f140));
  815|  4.84k|    Lib_IntVector_Intrinsics_vec256
  816|  4.84k|        a240 =
  817|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a230,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  818|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r530, f140));
  819|  4.84k|    Lib_IntVector_Intrinsics_vec256
  820|  4.84k|        a340 =
  821|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a330,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  822|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r540, f140));
  823|  4.84k|    Lib_IntVector_Intrinsics_vec256
  824|  4.84k|        a440 =
  825|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a430,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  826|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r0, f140));
  827|  4.84k|    Lib_IntVector_Intrinsics_vec256 t00 = a040;
  828|  4.84k|    Lib_IntVector_Intrinsics_vec256 t10 = a140;
  829|  4.84k|    Lib_IntVector_Intrinsics_vec256 t20 = a240;
  830|  4.84k|    Lib_IntVector_Intrinsics_vec256 t30 = a340;
  831|  4.84k|    Lib_IntVector_Intrinsics_vec256 t40 = a440;
  832|  4.84k|    Lib_IntVector_Intrinsics_vec256
  833|  4.84k|        mask260 = Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3ffffffU);
  ------------------
  |  |  389|  4.84k|    (_mm256_set1_epi64x(x1)) /* hi lo */
  ------------------
  834|  4.84k|    Lib_IntVector_Intrinsics_vec256
  835|  4.84k|        z00 = Lib_IntVector_Intrinsics_vec256_shift_right64(t00, (uint32_t)26U);
  ------------------
  |  |  257|  4.84k|    (_mm256_srli_epi64(x0, x1))
  ------------------
  836|  4.84k|    Lib_IntVector_Intrinsics_vec256
  837|  4.84k|        z10 = Lib_IntVector_Intrinsics_vec256_shift_right64(t30, (uint32_t)26U);
  ------------------
  |  |  257|  4.84k|    (_mm256_srli_epi64(x0, x1))
  ------------------
  838|  4.84k|    Lib_IntVector_Intrinsics_vec256 x00 = Lib_IntVector_Intrinsics_vec256_and(t00, mask260);
  ------------------
  |  |  242|  4.84k|    (_mm256_and_si256(x0, x1))
  ------------------
  839|  4.84k|    Lib_IntVector_Intrinsics_vec256 x30 = Lib_IntVector_Intrinsics_vec256_and(t30, mask260);
  ------------------
  |  |  242|  4.84k|    (_mm256_and_si256(x0, x1))
  ------------------
  840|  4.84k|    Lib_IntVector_Intrinsics_vec256 x10 = Lib_IntVector_Intrinsics_vec256_add64(t10, z00);
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  841|  4.84k|    Lib_IntVector_Intrinsics_vec256 x40 = Lib_IntVector_Intrinsics_vec256_add64(t40, z10);
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  842|  4.84k|    Lib_IntVector_Intrinsics_vec256
  843|  4.84k|        z010 = Lib_IntVector_Intrinsics_vec256_shift_right64(x10, (uint32_t)26U);
  ------------------
  |  |  257|  4.84k|    (_mm256_srli_epi64(x0, x1))
  ------------------
  844|  4.84k|    Lib_IntVector_Intrinsics_vec256
  845|  4.84k|        z110 = Lib_IntVector_Intrinsics_vec256_shift_right64(x40, (uint32_t)26U);
  ------------------
  |  |  257|  4.84k|    (_mm256_srli_epi64(x0, x1))
  ------------------
  846|  4.84k|    Lib_IntVector_Intrinsics_vec256
  847|  4.84k|        t5 = Lib_IntVector_Intrinsics_vec256_shift_left64(z110, (uint32_t)2U);
  ------------------
  |  |  254|  4.84k|    (_mm256_slli_epi64(x0, x1))
  ------------------
  848|  4.84k|    Lib_IntVector_Intrinsics_vec256 z12 = Lib_IntVector_Intrinsics_vec256_add64(z110, t5);
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  849|  4.84k|    Lib_IntVector_Intrinsics_vec256 x110 = Lib_IntVector_Intrinsics_vec256_and(x10, mask260);
  ------------------
  |  |  242|  4.84k|    (_mm256_and_si256(x0, x1))
  ------------------
  850|  4.84k|    Lib_IntVector_Intrinsics_vec256 x410 = Lib_IntVector_Intrinsics_vec256_and(x40, mask260);
  ------------------
  |  |  242|  4.84k|    (_mm256_and_si256(x0, x1))
  ------------------
  851|  4.84k|    Lib_IntVector_Intrinsics_vec256 x20 = Lib_IntVector_Intrinsics_vec256_add64(t20, z010);
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  852|  4.84k|    Lib_IntVector_Intrinsics_vec256 x010 = Lib_IntVector_Intrinsics_vec256_add64(x00, z12);
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  853|  4.84k|    Lib_IntVector_Intrinsics_vec256
  854|  4.84k|        z020 = Lib_IntVector_Intrinsics_vec256_shift_right64(x20, (uint32_t)26U);
  ------------------
  |  |  257|  4.84k|    (_mm256_srli_epi64(x0, x1))
  ------------------
  855|  4.84k|    Lib_IntVector_Intrinsics_vec256
  856|  4.84k|        z130 = Lib_IntVector_Intrinsics_vec256_shift_right64(x010, (uint32_t)26U);
  ------------------
  |  |  257|  4.84k|    (_mm256_srli_epi64(x0, x1))
  ------------------
  857|  4.84k|    Lib_IntVector_Intrinsics_vec256 x210 = Lib_IntVector_Intrinsics_vec256_and(x20, mask260);
  ------------------
  |  |  242|  4.84k|    (_mm256_and_si256(x0, x1))
  ------------------
  858|  4.84k|    Lib_IntVector_Intrinsics_vec256 x020 = Lib_IntVector_Intrinsics_vec256_and(x010, mask260);
  ------------------
  |  |  242|  4.84k|    (_mm256_and_si256(x0, x1))
  ------------------
  859|  4.84k|    Lib_IntVector_Intrinsics_vec256 x310 = Lib_IntVector_Intrinsics_vec256_add64(x30, z020);
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  860|  4.84k|    Lib_IntVector_Intrinsics_vec256 x120 = Lib_IntVector_Intrinsics_vec256_add64(x110, z130);
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  861|  4.84k|    Lib_IntVector_Intrinsics_vec256
  862|  4.84k|        z030 = Lib_IntVector_Intrinsics_vec256_shift_right64(x310, (uint32_t)26U);
  ------------------
  |  |  257|  4.84k|    (_mm256_srli_epi64(x0, x1))
  ------------------
  863|  4.84k|    Lib_IntVector_Intrinsics_vec256 x320 = Lib_IntVector_Intrinsics_vec256_and(x310, mask260);
  ------------------
  |  |  242|  4.84k|    (_mm256_and_si256(x0, x1))
  ------------------
  864|  4.84k|    Lib_IntVector_Intrinsics_vec256 x420 = Lib_IntVector_Intrinsics_vec256_add64(x410, z030);
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  865|  4.84k|    Lib_IntVector_Intrinsics_vec256 o00 = x020;
  866|  4.84k|    Lib_IntVector_Intrinsics_vec256 o10 = x120;
  867|  4.84k|    Lib_IntVector_Intrinsics_vec256 o20 = x210;
  868|  4.84k|    Lib_IntVector_Intrinsics_vec256 o30 = x320;
  869|  4.84k|    Lib_IntVector_Intrinsics_vec256 o40 = x420;
  870|  4.84k|    rn[0U] = o00;
  871|  4.84k|    rn[1U] = o10;
  872|  4.84k|    rn[2U] = o20;
  873|  4.84k|    rn[3U] = o30;
  874|  4.84k|    rn[4U] = o40;
  875|  4.84k|    Lib_IntVector_Intrinsics_vec256 f201 = rn[0U];
  876|  4.84k|    Lib_IntVector_Intrinsics_vec256 f211 = rn[1U];
  877|  4.84k|    Lib_IntVector_Intrinsics_vec256 f221 = rn[2U];
  878|  4.84k|    Lib_IntVector_Intrinsics_vec256 f231 = rn[3U];
  879|  4.84k|    Lib_IntVector_Intrinsics_vec256 f241 = rn[4U];
  880|  4.84k|    rn_5[0U] = Lib_IntVector_Intrinsics_vec256_smul64(f201, (uint64_t)5U);
  ------------------
  |  |  374|  4.84k|    (_mm256_mul_epu32(x0, _mm256_set1_epi64x(x1)))
  ------------------
  881|  4.84k|    rn_5[1U] = Lib_IntVector_Intrinsics_vec256_smul64(f211, (uint64_t)5U);
  ------------------
  |  |  374|  4.84k|    (_mm256_mul_epu32(x0, _mm256_set1_epi64x(x1)))
  ------------------
  882|  4.84k|    rn_5[2U] = Lib_IntVector_Intrinsics_vec256_smul64(f221, (uint64_t)5U);
  ------------------
  |  |  374|  4.84k|    (_mm256_mul_epu32(x0, _mm256_set1_epi64x(x1)))
  ------------------
  883|  4.84k|    rn_5[3U] = Lib_IntVector_Intrinsics_vec256_smul64(f231, (uint64_t)5U);
  ------------------
  |  |  374|  4.84k|    (_mm256_mul_epu32(x0, _mm256_set1_epi64x(x1)))
  ------------------
  884|  4.84k|    rn_5[4U] = Lib_IntVector_Intrinsics_vec256_smul64(f241, (uint64_t)5U);
  ------------------
  |  |  374|  4.84k|    (_mm256_mul_epu32(x0, _mm256_set1_epi64x(x1)))
  ------------------
  885|  4.84k|    Lib_IntVector_Intrinsics_vec256 r00 = rn[0U];
  886|  4.84k|    Lib_IntVector_Intrinsics_vec256 r1 = rn[1U];
  887|  4.84k|    Lib_IntVector_Intrinsics_vec256 r2 = rn[2U];
  888|  4.84k|    Lib_IntVector_Intrinsics_vec256 r3 = rn[3U];
  889|  4.84k|    Lib_IntVector_Intrinsics_vec256 r4 = rn[4U];
  890|  4.84k|    Lib_IntVector_Intrinsics_vec256 r51 = rn_5[1U];
  891|  4.84k|    Lib_IntVector_Intrinsics_vec256 r52 = rn_5[2U];
  892|  4.84k|    Lib_IntVector_Intrinsics_vec256 r53 = rn_5[3U];
  893|  4.84k|    Lib_IntVector_Intrinsics_vec256 r54 = rn_5[4U];
  894|  4.84k|    Lib_IntVector_Intrinsics_vec256 f10 = rn[0U];
  895|  4.84k|    Lib_IntVector_Intrinsics_vec256 f11 = rn[1U];
  896|  4.84k|    Lib_IntVector_Intrinsics_vec256 f12 = rn[2U];
  897|  4.84k|    Lib_IntVector_Intrinsics_vec256 f13 = rn[3U];
  898|  4.84k|    Lib_IntVector_Intrinsics_vec256 f14 = rn[4U];
  899|  4.84k|    Lib_IntVector_Intrinsics_vec256 a0 = Lib_IntVector_Intrinsics_vec256_mul64(r00, f10);
  ------------------
  |  |  371|  4.84k|    (_mm256_mul_epu32(x0, x1))
  ------------------
  900|  4.84k|    Lib_IntVector_Intrinsics_vec256 a1 = Lib_IntVector_Intrinsics_vec256_mul64(r1, f10);
  ------------------
  |  |  371|  4.84k|    (_mm256_mul_epu32(x0, x1))
  ------------------
  901|  4.84k|    Lib_IntVector_Intrinsics_vec256 a2 = Lib_IntVector_Intrinsics_vec256_mul64(r2, f10);
  ------------------
  |  |  371|  4.84k|    (_mm256_mul_epu32(x0, x1))
  ------------------
  902|  4.84k|    Lib_IntVector_Intrinsics_vec256 a3 = Lib_IntVector_Intrinsics_vec256_mul64(r3, f10);
  ------------------
  |  |  371|  4.84k|    (_mm256_mul_epu32(x0, x1))
  ------------------
  903|  4.84k|    Lib_IntVector_Intrinsics_vec256 a4 = Lib_IntVector_Intrinsics_vec256_mul64(r4, f10);
  ------------------
  |  |  371|  4.84k|    (_mm256_mul_epu32(x0, x1))
  ------------------
  904|  4.84k|    Lib_IntVector_Intrinsics_vec256
  905|  4.84k|        a01 =
  906|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a0,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  907|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r54, f11));
  908|  4.84k|    Lib_IntVector_Intrinsics_vec256
  909|  4.84k|        a11 =
  910|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a1,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  911|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r00, f11));
  912|  4.84k|    Lib_IntVector_Intrinsics_vec256
  913|  4.84k|        a21 = Lib_IntVector_Intrinsics_vec256_add64(a2, Lib_IntVector_Intrinsics_vec256_mul64(r1, f11));
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  914|  4.84k|    Lib_IntVector_Intrinsics_vec256
  915|  4.84k|        a31 = Lib_IntVector_Intrinsics_vec256_add64(a3, Lib_IntVector_Intrinsics_vec256_mul64(r2, f11));
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  916|  4.84k|    Lib_IntVector_Intrinsics_vec256
  917|  4.84k|        a41 = Lib_IntVector_Intrinsics_vec256_add64(a4, Lib_IntVector_Intrinsics_vec256_mul64(r3, f11));
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  918|  4.84k|    Lib_IntVector_Intrinsics_vec256
  919|  4.84k|        a02 =
  920|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a01,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  921|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r53, f12));
  922|  4.84k|    Lib_IntVector_Intrinsics_vec256
  923|  4.84k|        a12 =
  924|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a11,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  925|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r54, f12));
  926|  4.84k|    Lib_IntVector_Intrinsics_vec256
  927|  4.84k|        a22 =
  928|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a21,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  929|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r00, f12));
  930|  4.84k|    Lib_IntVector_Intrinsics_vec256
  931|  4.84k|        a32 =
  932|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a31,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  933|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r1, f12));
  934|  4.84k|    Lib_IntVector_Intrinsics_vec256
  935|  4.84k|        a42 =
  936|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a41,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  937|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r2, f12));
  938|  4.84k|    Lib_IntVector_Intrinsics_vec256
  939|  4.84k|        a03 =
  940|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a02,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  941|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r52, f13));
  942|  4.84k|    Lib_IntVector_Intrinsics_vec256
  943|  4.84k|        a13 =
  944|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a12,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  945|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r53, f13));
  946|  4.84k|    Lib_IntVector_Intrinsics_vec256
  947|  4.84k|        a23 =
  948|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a22,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  949|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r54, f13));
  950|  4.84k|    Lib_IntVector_Intrinsics_vec256
  951|  4.84k|        a33 =
  952|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a32,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  953|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r00, f13));
  954|  4.84k|    Lib_IntVector_Intrinsics_vec256
  955|  4.84k|        a43 =
  956|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a42,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  957|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r1, f13));
  958|  4.84k|    Lib_IntVector_Intrinsics_vec256
  959|  4.84k|        a04 =
  960|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a03,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  961|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r51, f14));
  962|  4.84k|    Lib_IntVector_Intrinsics_vec256
  963|  4.84k|        a14 =
  964|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a13,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  965|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r52, f14));
  966|  4.84k|    Lib_IntVector_Intrinsics_vec256
  967|  4.84k|        a24 =
  968|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a23,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  969|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r53, f14));
  970|  4.84k|    Lib_IntVector_Intrinsics_vec256
  971|  4.84k|        a34 =
  972|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a33,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  973|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r54, f14));
  974|  4.84k|    Lib_IntVector_Intrinsics_vec256
  975|  4.84k|        a44 =
  976|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(a43,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  977|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_mul64(r00, f14));
  978|  4.84k|    Lib_IntVector_Intrinsics_vec256 t0 = a04;
  979|  4.84k|    Lib_IntVector_Intrinsics_vec256 t1 = a14;
  980|  4.84k|    Lib_IntVector_Intrinsics_vec256 t2 = a24;
  981|  4.84k|    Lib_IntVector_Intrinsics_vec256 t3 = a34;
  982|  4.84k|    Lib_IntVector_Intrinsics_vec256 t4 = a44;
  983|  4.84k|    Lib_IntVector_Intrinsics_vec256
  984|  4.84k|        mask26 = Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3ffffffU);
  ------------------
  |  |  389|  4.84k|    (_mm256_set1_epi64x(x1)) /* hi lo */
  ------------------
  985|  4.84k|    Lib_IntVector_Intrinsics_vec256
  986|  4.84k|        z0 = Lib_IntVector_Intrinsics_vec256_shift_right64(t0, (uint32_t)26U);
  ------------------
  |  |  257|  4.84k|    (_mm256_srli_epi64(x0, x1))
  ------------------
  987|  4.84k|    Lib_IntVector_Intrinsics_vec256
  988|  4.84k|        z1 = Lib_IntVector_Intrinsics_vec256_shift_right64(t3, (uint32_t)26U);
  ------------------
  |  |  257|  4.84k|    (_mm256_srli_epi64(x0, x1))
  ------------------
  989|  4.84k|    Lib_IntVector_Intrinsics_vec256 x0 = Lib_IntVector_Intrinsics_vec256_and(t0, mask26);
  ------------------
  |  |  242|  4.84k|    (_mm256_and_si256(x0, x1))
  ------------------
  990|  4.84k|    Lib_IntVector_Intrinsics_vec256 x3 = Lib_IntVector_Intrinsics_vec256_and(t3, mask26);
  ------------------
  |  |  242|  4.84k|    (_mm256_and_si256(x0, x1))
  ------------------
  991|  4.84k|    Lib_IntVector_Intrinsics_vec256 x1 = Lib_IntVector_Intrinsics_vec256_add64(t1, z0);
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  992|  4.84k|    Lib_IntVector_Intrinsics_vec256 x4 = Lib_IntVector_Intrinsics_vec256_add64(t4, z1);
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
  993|  4.84k|    Lib_IntVector_Intrinsics_vec256
  994|  4.84k|        z01 = Lib_IntVector_Intrinsics_vec256_shift_right64(x1, (uint32_t)26U);
  ------------------
  |  |  257|  4.84k|    (_mm256_srli_epi64(x0, x1))
  ------------------
  995|  4.84k|    Lib_IntVector_Intrinsics_vec256
  996|  4.84k|        z11 = Lib_IntVector_Intrinsics_vec256_shift_right64(x4, (uint32_t)26U);
  ------------------
  |  |  257|  4.84k|    (_mm256_srli_epi64(x0, x1))
  ------------------
  997|  4.84k|    Lib_IntVector_Intrinsics_vec256
  998|  4.84k|        t = Lib_IntVector_Intrinsics_vec256_shift_left64(z11, (uint32_t)2U);
  ------------------
  |  |  254|  4.84k|    (_mm256_slli_epi64(x0, x1))
  ------------------
  999|  4.84k|    Lib_IntVector_Intrinsics_vec256 z120 = Lib_IntVector_Intrinsics_vec256_add64(z11, t);
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 1000|  4.84k|    Lib_IntVector_Intrinsics_vec256 x11 = Lib_IntVector_Intrinsics_vec256_and(x1, mask26);
  ------------------
  |  |  242|  4.84k|    (_mm256_and_si256(x0, x1))
  ------------------
 1001|  4.84k|    Lib_IntVector_Intrinsics_vec256 x41 = Lib_IntVector_Intrinsics_vec256_and(x4, mask26);
  ------------------
  |  |  242|  4.84k|    (_mm256_and_si256(x0, x1))
  ------------------
 1002|  4.84k|    Lib_IntVector_Intrinsics_vec256 x2 = Lib_IntVector_Intrinsics_vec256_add64(t2, z01);
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 1003|  4.84k|    Lib_IntVector_Intrinsics_vec256 x01 = Lib_IntVector_Intrinsics_vec256_add64(x0, z120);
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 1004|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1005|  4.84k|        z02 = Lib_IntVector_Intrinsics_vec256_shift_right64(x2, (uint32_t)26U);
  ------------------
  |  |  257|  4.84k|    (_mm256_srli_epi64(x0, x1))
  ------------------
 1006|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1007|  4.84k|        z13 = Lib_IntVector_Intrinsics_vec256_shift_right64(x01, (uint32_t)26U);
  ------------------
  |  |  257|  4.84k|    (_mm256_srli_epi64(x0, x1))
  ------------------
 1008|  4.84k|    Lib_IntVector_Intrinsics_vec256 x21 = Lib_IntVector_Intrinsics_vec256_and(x2, mask26);
  ------------------
  |  |  242|  4.84k|    (_mm256_and_si256(x0, x1))
  ------------------
 1009|  4.84k|    Lib_IntVector_Intrinsics_vec256 x02 = Lib_IntVector_Intrinsics_vec256_and(x01, mask26);
  ------------------
  |  |  242|  4.84k|    (_mm256_and_si256(x0, x1))
  ------------------
 1010|  4.84k|    Lib_IntVector_Intrinsics_vec256 x31 = Lib_IntVector_Intrinsics_vec256_add64(x3, z02);
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 1011|  4.84k|    Lib_IntVector_Intrinsics_vec256 x12 = Lib_IntVector_Intrinsics_vec256_add64(x11, z13);
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 1012|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1013|  4.84k|        z03 = Lib_IntVector_Intrinsics_vec256_shift_right64(x31, (uint32_t)26U);
  ------------------
  |  |  257|  4.84k|    (_mm256_srli_epi64(x0, x1))
  ------------------
 1014|  4.84k|    Lib_IntVector_Intrinsics_vec256 x32 = Lib_IntVector_Intrinsics_vec256_and(x31, mask26);
  ------------------
  |  |  242|  4.84k|    (_mm256_and_si256(x0, x1))
  ------------------
 1015|  4.84k|    Lib_IntVector_Intrinsics_vec256 x42 = Lib_IntVector_Intrinsics_vec256_add64(x41, z03);
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 1016|  4.84k|    Lib_IntVector_Intrinsics_vec256 o0 = x02;
 1017|  4.84k|    Lib_IntVector_Intrinsics_vec256 o1 = x12;
 1018|  4.84k|    Lib_IntVector_Intrinsics_vec256 o2 = x21;
 1019|  4.84k|    Lib_IntVector_Intrinsics_vec256 o3 = x32;
 1020|  4.84k|    Lib_IntVector_Intrinsics_vec256 o4 = x42;
 1021|  4.84k|    rn[0U] = o0;
 1022|  4.84k|    rn[1U] = o1;
 1023|  4.84k|    rn[2U] = o2;
 1024|  4.84k|    rn[3U] = o3;
 1025|  4.84k|    rn[4U] = o4;
 1026|  4.84k|    Lib_IntVector_Intrinsics_vec256 f202 = rn[0U];
 1027|  4.84k|    Lib_IntVector_Intrinsics_vec256 f21 = rn[1U];
 1028|  4.84k|    Lib_IntVector_Intrinsics_vec256 f22 = rn[2U];
 1029|  4.84k|    Lib_IntVector_Intrinsics_vec256 f23 = rn[3U];
 1030|  4.84k|    Lib_IntVector_Intrinsics_vec256 f24 = rn[4U];
 1031|  4.84k|    rn_5[0U] = Lib_IntVector_Intrinsics_vec256_smul64(f202, (uint64_t)5U);
  ------------------
  |  |  374|  4.84k|    (_mm256_mul_epu32(x0, _mm256_set1_epi64x(x1)))
  ------------------
 1032|  4.84k|    rn_5[1U] = Lib_IntVector_Intrinsics_vec256_smul64(f21, (uint64_t)5U);
  ------------------
  |  |  374|  4.84k|    (_mm256_mul_epu32(x0, _mm256_set1_epi64x(x1)))
  ------------------
 1033|  4.84k|    rn_5[2U] = Lib_IntVector_Intrinsics_vec256_smul64(f22, (uint64_t)5U);
  ------------------
  |  |  374|  4.84k|    (_mm256_mul_epu32(x0, _mm256_set1_epi64x(x1)))
  ------------------
 1034|  4.84k|    rn_5[3U] = Lib_IntVector_Intrinsics_vec256_smul64(f23, (uint64_t)5U);
  ------------------
  |  |  374|  4.84k|    (_mm256_mul_epu32(x0, _mm256_set1_epi64x(x1)))
  ------------------
 1035|  4.84k|    rn_5[4U] = Lib_IntVector_Intrinsics_vec256_smul64(f24, (uint64_t)5U);
  ------------------
  |  |  374|  4.84k|    (_mm256_mul_epu32(x0, _mm256_set1_epi64x(x1)))
  ------------------
 1036|  4.84k|}
Hacl_Poly1305_256_poly1305_finish:
 1916|  4.84k|{
 1917|  4.84k|    Lib_IntVector_Intrinsics_vec256 *acc = ctx;
 1918|  4.84k|    uint8_t *ks = key + (uint32_t)16U;
 1919|  4.84k|    Lib_IntVector_Intrinsics_vec256 f0 = acc[0U];
 1920|  4.84k|    Lib_IntVector_Intrinsics_vec256 f13 = acc[1U];
 1921|  4.84k|    Lib_IntVector_Intrinsics_vec256 f23 = acc[2U];
 1922|  4.84k|    Lib_IntVector_Intrinsics_vec256 f33 = acc[3U];
 1923|  4.84k|    Lib_IntVector_Intrinsics_vec256 f40 = acc[4U];
 1924|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1925|  4.84k|        l0 = Lib_IntVector_Intrinsics_vec256_add64(f0, Lib_IntVector_Intrinsics_vec256_zero);
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 1926|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1927|  4.84k|        tmp00 =
 1928|  4.84k|            Lib_IntVector_Intrinsics_vec256_and(l0,
  ------------------
  |  |  242|  4.84k|    (_mm256_and_si256(x0, x1))
  ------------------
 1929|  4.84k|                                                Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3ffffffU));
 1930|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1931|  4.84k|        c00 = Lib_IntVector_Intrinsics_vec256_shift_right64(l0, (uint32_t)26U);
  ------------------
  |  |  257|  4.84k|    (_mm256_srli_epi64(x0, x1))
  ------------------
 1932|  4.84k|    Lib_IntVector_Intrinsics_vec256 l1 = Lib_IntVector_Intrinsics_vec256_add64(f13, c00);
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 1933|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1934|  4.84k|        tmp10 =
 1935|  4.84k|            Lib_IntVector_Intrinsics_vec256_and(l1,
  ------------------
  |  |  242|  4.84k|    (_mm256_and_si256(x0, x1))
  ------------------
 1936|  4.84k|                                                Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3ffffffU));
 1937|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1938|  4.84k|        c10 = Lib_IntVector_Intrinsics_vec256_shift_right64(l1, (uint32_t)26U);
  ------------------
  |  |  257|  4.84k|    (_mm256_srli_epi64(x0, x1))
  ------------------
 1939|  4.84k|    Lib_IntVector_Intrinsics_vec256 l2 = Lib_IntVector_Intrinsics_vec256_add64(f23, c10);
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 1940|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1941|  4.84k|        tmp20 =
 1942|  4.84k|            Lib_IntVector_Intrinsics_vec256_and(l2,
  ------------------
  |  |  242|  4.84k|    (_mm256_and_si256(x0, x1))
  ------------------
 1943|  4.84k|                                                Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3ffffffU));
 1944|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1945|  4.84k|        c20 = Lib_IntVector_Intrinsics_vec256_shift_right64(l2, (uint32_t)26U);
  ------------------
  |  |  257|  4.84k|    (_mm256_srli_epi64(x0, x1))
  ------------------
 1946|  4.84k|    Lib_IntVector_Intrinsics_vec256 l3 = Lib_IntVector_Intrinsics_vec256_add64(f33, c20);
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 1947|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1948|  4.84k|        tmp30 =
 1949|  4.84k|            Lib_IntVector_Intrinsics_vec256_and(l3,
  ------------------
  |  |  242|  4.84k|    (_mm256_and_si256(x0, x1))
  ------------------
 1950|  4.84k|                                                Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3ffffffU));
 1951|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1952|  4.84k|        c30 = Lib_IntVector_Intrinsics_vec256_shift_right64(l3, (uint32_t)26U);
  ------------------
  |  |  257|  4.84k|    (_mm256_srli_epi64(x0, x1))
  ------------------
 1953|  4.84k|    Lib_IntVector_Intrinsics_vec256 l4 = Lib_IntVector_Intrinsics_vec256_add64(f40, c30);
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 1954|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1955|  4.84k|        tmp40 =
 1956|  4.84k|            Lib_IntVector_Intrinsics_vec256_and(l4,
  ------------------
  |  |  242|  4.84k|    (_mm256_and_si256(x0, x1))
  ------------------
 1957|  4.84k|                                                Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3ffffffU));
 1958|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1959|  4.84k|        c40 = Lib_IntVector_Intrinsics_vec256_shift_right64(l4, (uint32_t)26U);
  ------------------
  |  |  257|  4.84k|    (_mm256_srli_epi64(x0, x1))
  ------------------
 1960|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1961|  4.84k|        f010 =
 1962|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(tmp00,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 1963|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_smul64(c40, (uint64_t)5U));
 1964|  4.84k|    Lib_IntVector_Intrinsics_vec256 f110 = tmp10;
 1965|  4.84k|    Lib_IntVector_Intrinsics_vec256 f210 = tmp20;
 1966|  4.84k|    Lib_IntVector_Intrinsics_vec256 f310 = tmp30;
 1967|  4.84k|    Lib_IntVector_Intrinsics_vec256 f410 = tmp40;
 1968|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1969|  4.84k|        l = Lib_IntVector_Intrinsics_vec256_add64(f010, Lib_IntVector_Intrinsics_vec256_zero);
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 1970|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1971|  4.84k|        tmp0 =
 1972|  4.84k|            Lib_IntVector_Intrinsics_vec256_and(l,
  ------------------
  |  |  242|  4.84k|    (_mm256_and_si256(x0, x1))
  ------------------
 1973|  4.84k|                                                Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3ffffffU));
 1974|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1975|  4.84k|        c0 = Lib_IntVector_Intrinsics_vec256_shift_right64(l, (uint32_t)26U);
  ------------------
  |  |  257|  4.84k|    (_mm256_srli_epi64(x0, x1))
  ------------------
 1976|  4.84k|    Lib_IntVector_Intrinsics_vec256 l5 = Lib_IntVector_Intrinsics_vec256_add64(f110, c0);
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 1977|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1978|  4.84k|        tmp1 =
 1979|  4.84k|            Lib_IntVector_Intrinsics_vec256_and(l5,
  ------------------
  |  |  242|  4.84k|    (_mm256_and_si256(x0, x1))
  ------------------
 1980|  4.84k|                                                Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3ffffffU));
 1981|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1982|  4.84k|        c1 = Lib_IntVector_Intrinsics_vec256_shift_right64(l5, (uint32_t)26U);
  ------------------
  |  |  257|  4.84k|    (_mm256_srli_epi64(x0, x1))
  ------------------
 1983|  4.84k|    Lib_IntVector_Intrinsics_vec256 l6 = Lib_IntVector_Intrinsics_vec256_add64(f210, c1);
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 1984|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1985|  4.84k|        tmp2 =
 1986|  4.84k|            Lib_IntVector_Intrinsics_vec256_and(l6,
  ------------------
  |  |  242|  4.84k|    (_mm256_and_si256(x0, x1))
  ------------------
 1987|  4.84k|                                                Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3ffffffU));
 1988|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1989|  4.84k|        c2 = Lib_IntVector_Intrinsics_vec256_shift_right64(l6, (uint32_t)26U);
  ------------------
  |  |  257|  4.84k|    (_mm256_srli_epi64(x0, x1))
  ------------------
 1990|  4.84k|    Lib_IntVector_Intrinsics_vec256 l7 = Lib_IntVector_Intrinsics_vec256_add64(f310, c2);
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 1991|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1992|  4.84k|        tmp3 =
 1993|  4.84k|            Lib_IntVector_Intrinsics_vec256_and(l7,
  ------------------
  |  |  242|  4.84k|    (_mm256_and_si256(x0, x1))
  ------------------
 1994|  4.84k|                                                Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3ffffffU));
 1995|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1996|  4.84k|        c3 = Lib_IntVector_Intrinsics_vec256_shift_right64(l7, (uint32_t)26U);
  ------------------
  |  |  257|  4.84k|    (_mm256_srli_epi64(x0, x1))
  ------------------
 1997|  4.84k|    Lib_IntVector_Intrinsics_vec256 l8 = Lib_IntVector_Intrinsics_vec256_add64(f410, c3);
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 1998|  4.84k|    Lib_IntVector_Intrinsics_vec256
 1999|  4.84k|        tmp4 =
 2000|  4.84k|            Lib_IntVector_Intrinsics_vec256_and(l8,
  ------------------
  |  |  242|  4.84k|    (_mm256_and_si256(x0, x1))
  ------------------
 2001|  4.84k|                                                Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3ffffffU));
 2002|  4.84k|    Lib_IntVector_Intrinsics_vec256
 2003|  4.84k|        c4 = Lib_IntVector_Intrinsics_vec256_shift_right64(l8, (uint32_t)26U);
  ------------------
  |  |  257|  4.84k|    (_mm256_srli_epi64(x0, x1))
  ------------------
 2004|  4.84k|    Lib_IntVector_Intrinsics_vec256
 2005|  4.84k|        f02 =
 2006|  4.84k|            Lib_IntVector_Intrinsics_vec256_add64(tmp0,
  ------------------
  |  |  365|  4.84k|    (_mm256_add_epi64(x0, x1))
  ------------------
 2007|  4.84k|                                                  Lib_IntVector_Intrinsics_vec256_smul64(c4, (uint64_t)5U));
 2008|  4.84k|    Lib_IntVector_Intrinsics_vec256 f12 = tmp1;
 2009|  4.84k|    Lib_IntVector_Intrinsics_vec256 f22 = tmp2;
 2010|  4.84k|    Lib_IntVector_Intrinsics_vec256 f32 = tmp3;
 2011|  4.84k|    Lib_IntVector_Intrinsics_vec256 f42 = tmp4;
 2012|  4.84k|    Lib_IntVector_Intrinsics_vec256
 2013|  4.84k|        mh = Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3ffffffU);
  ------------------
  |  |  389|  4.84k|    (_mm256_set1_epi64x(x1)) /* hi lo */
  ------------------
 2014|  4.84k|    Lib_IntVector_Intrinsics_vec256
 2015|  4.84k|        ml = Lib_IntVector_Intrinsics_vec256_load64((uint64_t)0x3fffffbU);
  ------------------
  |  |  389|  4.84k|    (_mm256_set1_epi64x(x1)) /* hi lo */
  ------------------
 2016|  4.84k|    Lib_IntVector_Intrinsics_vec256 mask = Lib_IntVector_Intrinsics_vec256_eq64(f42, mh);
  ------------------
  |  |  224|  4.84k|    (_mm256_cmpeq_epi64(x0, x1))
  ------------------
 2017|  4.84k|    Lib_IntVector_Intrinsics_vec256
 2018|  4.84k|        mask1 =
 2019|  4.84k|            Lib_IntVector_Intrinsics_vec256_and(mask,
  ------------------
  |  |  242|  4.84k|    (_mm256_and_si256(x0, x1))
  ------------------
 2020|  4.84k|                                                Lib_IntVector_Intrinsics_vec256_eq64(f32, mh));
 2021|  4.84k|    Lib_IntVector_Intrinsics_vec256
 2022|  4.84k|        mask2 =
 2023|  4.84k|            Lib_IntVector_Intrinsics_vec256_and(mask1,
  ------------------
  |  |  242|  4.84k|    (_mm256_and_si256(x0, x1))
  ------------------
 2024|  4.84k|                                                Lib_IntVector_Intrinsics_vec256_eq64(f22, mh));
 2025|  4.84k|    Lib_IntVector_Intrinsics_vec256
 2026|  4.84k|        mask3 =
 2027|  4.84k|            Lib_IntVector_Intrinsics_vec256_and(mask2,
  ------------------
  |  |  242|  4.84k|    (_mm256_and_si256(x0, x1))
  ------------------
 2028|  4.84k|                                                Lib_IntVector_Intrinsics_vec256_eq64(f12, mh));
 2029|  4.84k|    Lib_IntVector_Intrinsics_vec256
 2030|  4.84k|        mask4 =
 2031|  4.84k|            Lib_IntVector_Intrinsics_vec256_and(mask3,
  ------------------
  |  |  242|  4.84k|    (_mm256_and_si256(x0, x1))
  ------------------
 2032|  4.84k|                                                Lib_IntVector_Intrinsics_vec256_lognot(Lib_IntVector_Intrinsics_vec256_gt64(ml, f02)));
 2033|  4.84k|    Lib_IntVector_Intrinsics_vec256 ph = Lib_IntVector_Intrinsics_vec256_and(mask4, mh);
  ------------------
  |  |  242|  4.84k|    (_mm256_and_si256(x0, x1))
  ------------------
 2034|  4.84k|    Lib_IntVector_Intrinsics_vec256 pl = Lib_IntVector_Intrinsics_vec256_and(mask4, ml);
  ------------------
  |  |  242|  4.84k|    (_mm256_and_si256(x0, x1))
  ------------------
 2035|  4.84k|    Lib_IntVector_Intrinsics_vec256 o0 = Lib_IntVector_Intrinsics_vec256_sub64(f02, pl);
  ------------------
  |  |  368|  4.84k|    (_mm256_sub_epi64(x0, x1))
  ------------------
 2036|  4.84k|    Lib_IntVector_Intrinsics_vec256 o1 = Lib_IntVector_Intrinsics_vec256_sub64(f12, ph);
  ------------------
  |  |  368|  4.84k|    (_mm256_sub_epi64(x0, x1))
  ------------------
 2037|  4.84k|    Lib_IntVector_Intrinsics_vec256 o2 = Lib_IntVector_Intrinsics_vec256_sub64(f22, ph);
  ------------------
  |  |  368|  4.84k|    (_mm256_sub_epi64(x0, x1))
  ------------------
 2038|  4.84k|    Lib_IntVector_Intrinsics_vec256 o3 = Lib_IntVector_Intrinsics_vec256_sub64(f32, ph);
  ------------------
  |  |  368|  4.84k|    (_mm256_sub_epi64(x0, x1))
  ------------------
 2039|  4.84k|    Lib_IntVector_Intrinsics_vec256 o4 = Lib_IntVector_Intrinsics_vec256_sub64(f42, ph);
  ------------------
  |  |  368|  4.84k|    (_mm256_sub_epi64(x0, x1))
  ------------------
 2040|  4.84k|    Lib_IntVector_Intrinsics_vec256 f011 = o0;
 2041|  4.84k|    Lib_IntVector_Intrinsics_vec256 f111 = o1;
 2042|  4.84k|    Lib_IntVector_Intrinsics_vec256 f211 = o2;
 2043|  4.84k|    Lib_IntVector_Intrinsics_vec256 f311 = o3;
 2044|  4.84k|    Lib_IntVector_Intrinsics_vec256 f411 = o4;
 2045|  4.84k|    acc[0U] = f011;
 2046|  4.84k|    acc[1U] = f111;
 2047|  4.84k|    acc[2U] = f211;
 2048|  4.84k|    acc[3U] = f311;
 2049|  4.84k|    acc[4U] = f411;
 2050|  4.84k|    Lib_IntVector_Intrinsics_vec256 f00 = acc[0U];
 2051|  4.84k|    Lib_IntVector_Intrinsics_vec256 f1 = acc[1U];
 2052|  4.84k|    Lib_IntVector_Intrinsics_vec256 f2 = acc[2U];
 2053|  4.84k|    Lib_IntVector_Intrinsics_vec256 f3 = acc[3U];
 2054|  4.84k|    Lib_IntVector_Intrinsics_vec256 f4 = acc[4U];
 2055|  4.84k|    uint64_t f01 = Lib_IntVector_Intrinsics_vec256_extract64(f00, (uint32_t)0U);
  ------------------
  |  |  359|  4.84k|    (_mm256_extract_epi64(x0, x1))
  ------------------
 2056|  4.84k|    uint64_t f112 = Lib_IntVector_Intrinsics_vec256_extract64(f1, (uint32_t)0U);
  ------------------
  |  |  359|  4.84k|    (_mm256_extract_epi64(x0, x1))
  ------------------
 2057|  4.84k|    uint64_t f212 = Lib_IntVector_Intrinsics_vec256_extract64(f2, (uint32_t)0U);
  ------------------
  |  |  359|  4.84k|    (_mm256_extract_epi64(x0, x1))
  ------------------
 2058|  4.84k|    uint64_t f312 = Lib_IntVector_Intrinsics_vec256_extract64(f3, (uint32_t)0U);
  ------------------
  |  |  359|  4.84k|    (_mm256_extract_epi64(x0, x1))
  ------------------
 2059|  4.84k|    uint64_t f41 = Lib_IntVector_Intrinsics_vec256_extract64(f4, (uint32_t)0U);
  ------------------
  |  |  359|  4.84k|    (_mm256_extract_epi64(x0, x1))
  ------------------
 2060|  4.84k|    uint64_t lo = (f01 | f112 << (uint32_t)26U) | f212 << (uint32_t)52U;
 2061|  4.84k|    uint64_t hi = (f212 >> (uint32_t)12U | f312 << (uint32_t)14U) | f41 << (uint32_t)40U;
 2062|  4.84k|    uint64_t f10 = lo;
 2063|  4.84k|    uint64_t f11 = hi;
 2064|  4.84k|    uint64_t u0 = load64_le(ks);
  ------------------
  |  |  214|  4.84k|#define load64_le(b) (le64toh(load64(b)))
  ------------------
 2065|  4.84k|    uint64_t lo0 = u0;
 2066|  4.84k|    uint64_t u = load64_le(ks + (uint32_t)8U);
  ------------------
  |  |  214|  4.84k|#define load64_le(b) (le64toh(load64(b)))
  ------------------
 2067|  4.84k|    uint64_t hi0 = u;
 2068|  4.84k|    uint64_t f20 = lo0;
 2069|  4.84k|    uint64_t f21 = hi0;
 2070|  4.84k|    uint64_t r0 = f10 + f20;
 2071|  4.84k|    uint64_t r1 = f11 + f21;
 2072|  4.84k|    uint64_t c = (r0 ^ ((r0 ^ f20) | ((r0 - f20) ^ f20))) >> (uint32_t)63U;
 2073|  4.84k|    uint64_t r11 = r1 + c;
 2074|  4.84k|    uint64_t f30 = r0;
 2075|  4.84k|    uint64_t f31 = r11;
 2076|  4.84k|    store64_le(tag, f30);
  ------------------
  |  |  215|  4.84k|#define store64_le(b, i) (store64(b, htole64(i)))
  ------------------
 2077|  4.84k|    store64_le(tag + (uint32_t)8U, f31);
  ------------------
  |  |  215|  4.84k|#define store64_le(b, i) (store64(b, htole64(i)))
  ------------------
 2078|  4.84k|}

libcrux_mlkem_portable.c:core_num__u64_9__from_le_bytes:
  150|  18.1k|{
  151|  18.1k|    return load64_le(buf);
  ------------------
  |  |  214|  18.1k|#define load64_le(b) (le64toh(load64(b)))
  ------------------
  152|  18.1k|}
libcrux_mlkem_portable.c:core_num__u64_9__to_le_bytes:
  145|  27.8k|{
  146|  27.8k|    store64_le(buf, v);
  ------------------
  |  |  215|  27.8k|#define store64_le(b, i) (store64(b, htole64(i)))
  ------------------
  147|  27.8k|}
libcrux_mlkem_portable.c:Eurydice_slice_to_array3:
  122|  27.7k|{
  123|  27.7k|    *dst_tag = 0;
  124|  27.7k|    memcpy(dst_ok, src.ptr, sz);
  125|  27.7k|}

Hacl_Curve25519_51.c:Hacl_Impl_Curve25519_Field51_fsqr:
  375|  2.15M|{
  376|  2.15M|    KRML_HOST_IGNORE(uu___);
  ------------------
  |  |   56|  2.15M|#define KRML_HOST_IGNORE(x) (void)(x)
  ------------------
  377|  2.15M|    uint64_t f0 = f[0U];
  378|  2.15M|    uint64_t f1 = f[1U];
  379|  2.15M|    uint64_t f2 = f[2U];
  380|  2.15M|    uint64_t f3 = f[3U];
  381|  2.15M|    uint64_t f4 = f[4U];
  382|  2.15M|    uint64_t d0 = (uint64_t)2U * f0;
  383|  2.15M|    uint64_t d1 = (uint64_t)2U * f1;
  384|  2.15M|    uint64_t d2 = (uint64_t)38U * f2;
  385|  2.15M|    uint64_t d3 = (uint64_t)19U * f3;
  386|  2.15M|    uint64_t d419 = (uint64_t)19U * f4;
  387|  2.15M|    uint64_t d4 = (uint64_t)2U * d419;
  388|  2.15M|    FStar_UInt128_uint128
  389|  2.15M|        s0 =
  390|  2.15M|            FStar_UInt128_add(FStar_UInt128_add(FStar_UInt128_mul_wide(f0, f0),
  391|  2.15M|                                                FStar_UInt128_mul_wide(d4, f1)),
  392|  2.15M|                              FStar_UInt128_mul_wide(d2, f3));
  393|  2.15M|    FStar_UInt128_uint128
  394|  2.15M|        s1 =
  395|  2.15M|            FStar_UInt128_add(FStar_UInt128_add(FStar_UInt128_mul_wide(d0, f1),
  396|  2.15M|                                                FStar_UInt128_mul_wide(d4, f2)),
  397|  2.15M|                              FStar_UInt128_mul_wide(d3, f3));
  398|  2.15M|    FStar_UInt128_uint128
  399|  2.15M|        s2 =
  400|  2.15M|            FStar_UInt128_add(FStar_UInt128_add(FStar_UInt128_mul_wide(d0, f2),
  401|  2.15M|                                                FStar_UInt128_mul_wide(f1, f1)),
  402|  2.15M|                              FStar_UInt128_mul_wide(d4, f3));
  403|  2.15M|    FStar_UInt128_uint128
  404|  2.15M|        s3 =
  405|  2.15M|            FStar_UInt128_add(FStar_UInt128_add(FStar_UInt128_mul_wide(d0, f3),
  406|  2.15M|                                                FStar_UInt128_mul_wide(d1, f2)),
  407|  2.15M|                              FStar_UInt128_mul_wide(f4, d419));
  408|  2.15M|    FStar_UInt128_uint128
  409|  2.15M|        s4 =
  410|  2.15M|            FStar_UInt128_add(FStar_UInt128_add(FStar_UInt128_mul_wide(d0, f4),
  411|  2.15M|                                                FStar_UInt128_mul_wide(d1, f3)),
  412|  2.15M|                              FStar_UInt128_mul_wide(f2, f2));
  413|  2.15M|    FStar_UInt128_uint128 o00 = s0;
  414|  2.15M|    FStar_UInt128_uint128 o10 = s1;
  415|  2.15M|    FStar_UInt128_uint128 o20 = s2;
  416|  2.15M|    FStar_UInt128_uint128 o30 = s3;
  417|  2.15M|    FStar_UInt128_uint128 o40 = s4;
  418|  2.15M|    FStar_UInt128_uint128
  419|  2.15M|        l_ = FStar_UInt128_add(o00, FStar_UInt128_uint64_to_uint128((uint64_t)0U));
  420|  2.15M|    uint64_t tmp0 = FStar_UInt128_uint128_to_uint64(l_) & (uint64_t)0x7ffffffffffffU;
  421|  2.15M|    uint64_t c0 = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(l_, (uint32_t)51U));
  422|  2.15M|    FStar_UInt128_uint128 l_0 = FStar_UInt128_add(o10, FStar_UInt128_uint64_to_uint128(c0));
  423|  2.15M|    uint64_t tmp1 = FStar_UInt128_uint128_to_uint64(l_0) & (uint64_t)0x7ffffffffffffU;
  424|  2.15M|    uint64_t c1 = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(l_0, (uint32_t)51U));
  425|  2.15M|    FStar_UInt128_uint128 l_1 = FStar_UInt128_add(o20, FStar_UInt128_uint64_to_uint128(c1));
  426|  2.15M|    uint64_t tmp2 = FStar_UInt128_uint128_to_uint64(l_1) & (uint64_t)0x7ffffffffffffU;
  427|  2.15M|    uint64_t c2 = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(l_1, (uint32_t)51U));
  428|  2.15M|    FStar_UInt128_uint128 l_2 = FStar_UInt128_add(o30, FStar_UInt128_uint64_to_uint128(c2));
  429|  2.15M|    uint64_t tmp3 = FStar_UInt128_uint128_to_uint64(l_2) & (uint64_t)0x7ffffffffffffU;
  430|  2.15M|    uint64_t c3 = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(l_2, (uint32_t)51U));
  431|  2.15M|    FStar_UInt128_uint128 l_3 = FStar_UInt128_add(o40, FStar_UInt128_uint64_to_uint128(c3));
  432|  2.15M|    uint64_t tmp4 = FStar_UInt128_uint128_to_uint64(l_3) & (uint64_t)0x7ffffffffffffU;
  433|  2.15M|    uint64_t c4 = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(l_3, (uint32_t)51U));
  434|  2.15M|    uint64_t l_4 = tmp0 + c4 * (uint64_t)19U;
  435|  2.15M|    uint64_t tmp0_ = l_4 & (uint64_t)0x7ffffffffffffU;
  436|  2.15M|    uint64_t c5 = l_4 >> (uint32_t)51U;
  437|  2.15M|    uint64_t o0 = tmp0_;
  438|  2.15M|    uint64_t o1 = tmp1 + c5;
  439|  2.15M|    uint64_t o2 = tmp2;
  440|  2.15M|    uint64_t o3 = tmp3;
  441|  2.15M|    uint64_t o4 = tmp4;
  442|  2.15M|    out[0U] = o0;
  443|  2.15M|    out[1U] = o1;
  444|  2.15M|    out[2U] = o2;
  445|  2.15M|    out[3U] = o3;
  446|  2.15M|    out[4U] = o4;
  447|  2.15M|}
Hacl_Curve25519_51.c:Hacl_Impl_Curve25519_Field51_fmul:
   86|  2.24M|{
   87|  2.24M|    KRML_HOST_IGNORE(uu___);
  ------------------
  |  |   56|  2.24M|#define KRML_HOST_IGNORE(x) (void)(x)
  ------------------
   88|  2.24M|    uint64_t f10 = f1[0U];
   89|  2.24M|    uint64_t f11 = f1[1U];
   90|  2.24M|    uint64_t f12 = f1[2U];
   91|  2.24M|    uint64_t f13 = f1[3U];
   92|  2.24M|    uint64_t f14 = f1[4U];
   93|  2.24M|    uint64_t f20 = f2[0U];
   94|  2.24M|    uint64_t f21 = f2[1U];
   95|  2.24M|    uint64_t f22 = f2[2U];
   96|  2.24M|    uint64_t f23 = f2[3U];
   97|  2.24M|    uint64_t f24 = f2[4U];
   98|  2.24M|    uint64_t tmp1 = f21 * (uint64_t)19U;
   99|  2.24M|    uint64_t tmp2 = f22 * (uint64_t)19U;
  100|  2.24M|    uint64_t tmp3 = f23 * (uint64_t)19U;
  101|  2.24M|    uint64_t tmp4 = f24 * (uint64_t)19U;
  102|  2.24M|    FStar_UInt128_uint128 o00 = FStar_UInt128_mul_wide(f10, f20);
  103|  2.24M|    FStar_UInt128_uint128 o10 = FStar_UInt128_mul_wide(f10, f21);
  104|  2.24M|    FStar_UInt128_uint128 o20 = FStar_UInt128_mul_wide(f10, f22);
  105|  2.24M|    FStar_UInt128_uint128 o30 = FStar_UInt128_mul_wide(f10, f23);
  106|  2.24M|    FStar_UInt128_uint128 o40 = FStar_UInt128_mul_wide(f10, f24);
  107|  2.24M|    FStar_UInt128_uint128 o01 = FStar_UInt128_add(o00, FStar_UInt128_mul_wide(f11, tmp4));
  108|  2.24M|    FStar_UInt128_uint128 o11 = FStar_UInt128_add(o10, FStar_UInt128_mul_wide(f11, f20));
  109|  2.24M|    FStar_UInt128_uint128 o21 = FStar_UInt128_add(o20, FStar_UInt128_mul_wide(f11, f21));
  110|  2.24M|    FStar_UInt128_uint128 o31 = FStar_UInt128_add(o30, FStar_UInt128_mul_wide(f11, f22));
  111|  2.24M|    FStar_UInt128_uint128 o41 = FStar_UInt128_add(o40, FStar_UInt128_mul_wide(f11, f23));
  112|  2.24M|    FStar_UInt128_uint128 o02 = FStar_UInt128_add(o01, FStar_UInt128_mul_wide(f12, tmp3));
  113|  2.24M|    FStar_UInt128_uint128 o12 = FStar_UInt128_add(o11, FStar_UInt128_mul_wide(f12, tmp4));
  114|  2.24M|    FStar_UInt128_uint128 o22 = FStar_UInt128_add(o21, FStar_UInt128_mul_wide(f12, f20));
  115|  2.24M|    FStar_UInt128_uint128 o32 = FStar_UInt128_add(o31, FStar_UInt128_mul_wide(f12, f21));
  116|  2.24M|    FStar_UInt128_uint128 o42 = FStar_UInt128_add(o41, FStar_UInt128_mul_wide(f12, f22));
  117|  2.24M|    FStar_UInt128_uint128 o03 = FStar_UInt128_add(o02, FStar_UInt128_mul_wide(f13, tmp2));
  118|  2.24M|    FStar_UInt128_uint128 o13 = FStar_UInt128_add(o12, FStar_UInt128_mul_wide(f13, tmp3));
  119|  2.24M|    FStar_UInt128_uint128 o23 = FStar_UInt128_add(o22, FStar_UInt128_mul_wide(f13, tmp4));
  120|  2.24M|    FStar_UInt128_uint128 o33 = FStar_UInt128_add(o32, FStar_UInt128_mul_wide(f13, f20));
  121|  2.24M|    FStar_UInt128_uint128 o43 = FStar_UInt128_add(o42, FStar_UInt128_mul_wide(f13, f21));
  122|  2.24M|    FStar_UInt128_uint128 o04 = FStar_UInt128_add(o03, FStar_UInt128_mul_wide(f14, tmp1));
  123|  2.24M|    FStar_UInt128_uint128 o14 = FStar_UInt128_add(o13, FStar_UInt128_mul_wide(f14, tmp2));
  124|  2.24M|    FStar_UInt128_uint128 o24 = FStar_UInt128_add(o23, FStar_UInt128_mul_wide(f14, tmp3));
  125|  2.24M|    FStar_UInt128_uint128 o34 = FStar_UInt128_add(o33, FStar_UInt128_mul_wide(f14, tmp4));
  126|  2.24M|    FStar_UInt128_uint128 o44 = FStar_UInt128_add(o43, FStar_UInt128_mul_wide(f14, f20));
  127|  2.24M|    FStar_UInt128_uint128 tmp_w0 = o04;
  128|  2.24M|    FStar_UInt128_uint128 tmp_w1 = o14;
  129|  2.24M|    FStar_UInt128_uint128 tmp_w2 = o24;
  130|  2.24M|    FStar_UInt128_uint128 tmp_w3 = o34;
  131|  2.24M|    FStar_UInt128_uint128 tmp_w4 = o44;
  132|  2.24M|    FStar_UInt128_uint128
  133|  2.24M|        l_ = FStar_UInt128_add(tmp_w0, FStar_UInt128_uint64_to_uint128((uint64_t)0U));
  134|  2.24M|    uint64_t tmp01 = FStar_UInt128_uint128_to_uint64(l_) & (uint64_t)0x7ffffffffffffU;
  135|  2.24M|    uint64_t c0 = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(l_, (uint32_t)51U));
  136|  2.24M|    FStar_UInt128_uint128 l_0 = FStar_UInt128_add(tmp_w1, FStar_UInt128_uint64_to_uint128(c0));
  137|  2.24M|    uint64_t tmp11 = FStar_UInt128_uint128_to_uint64(l_0) & (uint64_t)0x7ffffffffffffU;
  138|  2.24M|    uint64_t c1 = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(l_0, (uint32_t)51U));
  139|  2.24M|    FStar_UInt128_uint128 l_1 = FStar_UInt128_add(tmp_w2, FStar_UInt128_uint64_to_uint128(c1));
  140|  2.24M|    uint64_t tmp21 = FStar_UInt128_uint128_to_uint64(l_1) & (uint64_t)0x7ffffffffffffU;
  141|  2.24M|    uint64_t c2 = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(l_1, (uint32_t)51U));
  142|  2.24M|    FStar_UInt128_uint128 l_2 = FStar_UInt128_add(tmp_w3, FStar_UInt128_uint64_to_uint128(c2));
  143|  2.24M|    uint64_t tmp31 = FStar_UInt128_uint128_to_uint64(l_2) & (uint64_t)0x7ffffffffffffU;
  144|  2.24M|    uint64_t c3 = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(l_2, (uint32_t)51U));
  145|  2.24M|    FStar_UInt128_uint128 l_3 = FStar_UInt128_add(tmp_w4, FStar_UInt128_uint64_to_uint128(c3));
  146|  2.24M|    uint64_t tmp41 = FStar_UInt128_uint128_to_uint64(l_3) & (uint64_t)0x7ffffffffffffU;
  147|  2.24M|    uint64_t c4 = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(l_3, (uint32_t)51U));
  148|  2.24M|    uint64_t l_4 = tmp01 + c4 * (uint64_t)19U;
  149|  2.24M|    uint64_t tmp0_ = l_4 & (uint64_t)0x7ffffffffffffU;
  150|  2.24M|    uint64_t c5 = l_4 >> (uint32_t)51U;
  151|  2.24M|    uint64_t o0 = tmp0_;
  152|  2.24M|    uint64_t o1 = tmp11 + c5;
  153|  2.24M|    uint64_t o2 = tmp21;
  154|  2.24M|    uint64_t o3 = tmp31;
  155|  2.24M|    uint64_t o4 = tmp41;
  156|  2.24M|    out[0U] = o0;
  157|  2.24M|    out[1U] = o1;
  158|  2.24M|    out[2U] = o2;
  159|  2.24M|    out[3U] = o3;
  160|  2.24M|    out[4U] = o4;
  161|  2.24M|}
Hacl_Curve25519_51.c:Hacl_Impl_Curve25519_Field51_cswap2:
  668|  2.15M|{
  669|  2.15M|    uint64_t mask = (uint64_t)0U - bit;
  670|  2.15M|    KRML_MAYBE_FOR10(i,
  ------------------
  |  |  366|  2.15M|#define KRML_MAYBE_FOR10(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 10, k, x)
  |  |  ------------------
  |  |  |  |  288|  2.15M|    do {                               \
  |  |  |  |  289|  2.15M|        uint32_t i = z;                \
  |  |  |  |  290|  2.15M|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  2.15M|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  671|  2.15M|                     (uint32_t)0U,
  672|  2.15M|                     (uint32_t)10U,
  673|  2.15M|                     (uint32_t)1U,
  674|  2.15M|                     uint64_t dummy = mask & (p1[i] ^ p2[i]);
  675|  2.15M|                     p1[i] = p1[i] ^ dummy;
  676|  2.15M|                     p2[i] = p2[i] ^ dummy;);
  677|  2.15M|}
Hacl_Curve25519_51.c:Hacl_Impl_Curve25519_Field51_fadd:
   42|  8.62M|{
   43|  8.62M|    uint64_t f10 = f1[0U];
   44|  8.62M|    uint64_t f20 = f2[0U];
   45|  8.62M|    uint64_t f11 = f1[1U];
   46|  8.62M|    uint64_t f21 = f2[1U];
   47|  8.62M|    uint64_t f12 = f1[2U];
   48|  8.62M|    uint64_t f22 = f2[2U];
   49|  8.62M|    uint64_t f13 = f1[3U];
   50|  8.62M|    uint64_t f23 = f2[3U];
   51|  8.62M|    uint64_t f14 = f1[4U];
   52|  8.62M|    uint64_t f24 = f2[4U];
   53|  8.62M|    out[0U] = f10 + f20;
   54|  8.62M|    out[1U] = f11 + f21;
   55|  8.62M|    out[2U] = f12 + f22;
   56|  8.62M|    out[3U] = f13 + f23;
   57|  8.62M|    out[4U] = f14 + f24;
   58|  8.62M|}
Hacl_Curve25519_51.c:Hacl_Impl_Curve25519_Field51_fsub:
   62|  8.62M|{
   63|  8.62M|    uint64_t f10 = f1[0U];
   64|  8.62M|    uint64_t f20 = f2[0U];
   65|  8.62M|    uint64_t f11 = f1[1U];
   66|  8.62M|    uint64_t f21 = f2[1U];
   67|  8.62M|    uint64_t f12 = f1[2U];
   68|  8.62M|    uint64_t f22 = f2[2U];
   69|  8.62M|    uint64_t f13 = f1[3U];
   70|  8.62M|    uint64_t f23 = f2[3U];
   71|  8.62M|    uint64_t f14 = f1[4U];
   72|  8.62M|    uint64_t f24 = f2[4U];
   73|  8.62M|    out[0U] = f10 + (uint64_t)0x3fffffffffff68U - f20;
   74|  8.62M|    out[1U] = f11 + (uint64_t)0x3ffffffffffff8U - f21;
   75|  8.62M|    out[2U] = f12 + (uint64_t)0x3ffffffffffff8U - f22;
   76|  8.62M|    out[3U] = f13 + (uint64_t)0x3ffffffffffff8U - f23;
   77|  8.62M|    out[4U] = f14 + (uint64_t)0x3ffffffffffff8U - f24;
   78|  8.62M|}
Hacl_Curve25519_51.c:Hacl_Impl_Curve25519_Field51_fmul2:
  169|  4.31M|{
  170|  4.31M|    KRML_HOST_IGNORE(uu___);
  ------------------
  |  |   56|  4.31M|#define KRML_HOST_IGNORE(x) (void)(x)
  ------------------
  171|  4.31M|    uint64_t f10 = f1[0U];
  172|  4.31M|    uint64_t f11 = f1[1U];
  173|  4.31M|    uint64_t f12 = f1[2U];
  174|  4.31M|    uint64_t f13 = f1[3U];
  175|  4.31M|    uint64_t f14 = f1[4U];
  176|  4.31M|    uint64_t f20 = f2[0U];
  177|  4.31M|    uint64_t f21 = f2[1U];
  178|  4.31M|    uint64_t f22 = f2[2U];
  179|  4.31M|    uint64_t f23 = f2[3U];
  180|  4.31M|    uint64_t f24 = f2[4U];
  181|  4.31M|    uint64_t f30 = f1[5U];
  182|  4.31M|    uint64_t f31 = f1[6U];
  183|  4.31M|    uint64_t f32 = f1[7U];
  184|  4.31M|    uint64_t f33 = f1[8U];
  185|  4.31M|    uint64_t f34 = f1[9U];
  186|  4.31M|    uint64_t f40 = f2[5U];
  187|  4.31M|    uint64_t f41 = f2[6U];
  188|  4.31M|    uint64_t f42 = f2[7U];
  189|  4.31M|    uint64_t f43 = f2[8U];
  190|  4.31M|    uint64_t f44 = f2[9U];
  191|  4.31M|    uint64_t tmp11 = f21 * (uint64_t)19U;
  192|  4.31M|    uint64_t tmp12 = f22 * (uint64_t)19U;
  193|  4.31M|    uint64_t tmp13 = f23 * (uint64_t)19U;
  194|  4.31M|    uint64_t tmp14 = f24 * (uint64_t)19U;
  195|  4.31M|    uint64_t tmp21 = f41 * (uint64_t)19U;
  196|  4.31M|    uint64_t tmp22 = f42 * (uint64_t)19U;
  197|  4.31M|    uint64_t tmp23 = f43 * (uint64_t)19U;
  198|  4.31M|    uint64_t tmp24 = f44 * (uint64_t)19U;
  199|  4.31M|    FStar_UInt128_uint128 o00 = FStar_UInt128_mul_wide(f10, f20);
  200|  4.31M|    FStar_UInt128_uint128 o15 = FStar_UInt128_mul_wide(f10, f21);
  201|  4.31M|    FStar_UInt128_uint128 o25 = FStar_UInt128_mul_wide(f10, f22);
  202|  4.31M|    FStar_UInt128_uint128 o30 = FStar_UInt128_mul_wide(f10, f23);
  203|  4.31M|    FStar_UInt128_uint128 o40 = FStar_UInt128_mul_wide(f10, f24);
  204|  4.31M|    FStar_UInt128_uint128 o010 = FStar_UInt128_add(o00, FStar_UInt128_mul_wide(f11, tmp14));
  205|  4.31M|    FStar_UInt128_uint128 o110 = FStar_UInt128_add(o15, FStar_UInt128_mul_wide(f11, f20));
  206|  4.31M|    FStar_UInt128_uint128 o210 = FStar_UInt128_add(o25, FStar_UInt128_mul_wide(f11, f21));
  207|  4.31M|    FStar_UInt128_uint128 o310 = FStar_UInt128_add(o30, FStar_UInt128_mul_wide(f11, f22));
  208|  4.31M|    FStar_UInt128_uint128 o410 = FStar_UInt128_add(o40, FStar_UInt128_mul_wide(f11, f23));
  209|  4.31M|    FStar_UInt128_uint128 o020 = FStar_UInt128_add(o010, FStar_UInt128_mul_wide(f12, tmp13));
  210|  4.31M|    FStar_UInt128_uint128 o120 = FStar_UInt128_add(o110, FStar_UInt128_mul_wide(f12, tmp14));
  211|  4.31M|    FStar_UInt128_uint128 o220 = FStar_UInt128_add(o210, FStar_UInt128_mul_wide(f12, f20));
  212|  4.31M|    FStar_UInt128_uint128 o320 = FStar_UInt128_add(o310, FStar_UInt128_mul_wide(f12, f21));
  213|  4.31M|    FStar_UInt128_uint128 o420 = FStar_UInt128_add(o410, FStar_UInt128_mul_wide(f12, f22));
  214|  4.31M|    FStar_UInt128_uint128 o030 = FStar_UInt128_add(o020, FStar_UInt128_mul_wide(f13, tmp12));
  215|  4.31M|    FStar_UInt128_uint128 o130 = FStar_UInt128_add(o120, FStar_UInt128_mul_wide(f13, tmp13));
  216|  4.31M|    FStar_UInt128_uint128 o230 = FStar_UInt128_add(o220, FStar_UInt128_mul_wide(f13, tmp14));
  217|  4.31M|    FStar_UInt128_uint128 o330 = FStar_UInt128_add(o320, FStar_UInt128_mul_wide(f13, f20));
  218|  4.31M|    FStar_UInt128_uint128 o430 = FStar_UInt128_add(o420, FStar_UInt128_mul_wide(f13, f21));
  219|  4.31M|    FStar_UInt128_uint128 o040 = FStar_UInt128_add(o030, FStar_UInt128_mul_wide(f14, tmp11));
  220|  4.31M|    FStar_UInt128_uint128 o140 = FStar_UInt128_add(o130, FStar_UInt128_mul_wide(f14, tmp12));
  221|  4.31M|    FStar_UInt128_uint128 o240 = FStar_UInt128_add(o230, FStar_UInt128_mul_wide(f14, tmp13));
  222|  4.31M|    FStar_UInt128_uint128 o340 = FStar_UInt128_add(o330, FStar_UInt128_mul_wide(f14, tmp14));
  223|  4.31M|    FStar_UInt128_uint128 o440 = FStar_UInt128_add(o430, FStar_UInt128_mul_wide(f14, f20));
  224|  4.31M|    FStar_UInt128_uint128 tmp_w10 = o040;
  225|  4.31M|    FStar_UInt128_uint128 tmp_w11 = o140;
  226|  4.31M|    FStar_UInt128_uint128 tmp_w12 = o240;
  227|  4.31M|    FStar_UInt128_uint128 tmp_w13 = o340;
  228|  4.31M|    FStar_UInt128_uint128 tmp_w14 = o440;
  229|  4.31M|    FStar_UInt128_uint128 o0 = FStar_UInt128_mul_wide(f30, f40);
  230|  4.31M|    FStar_UInt128_uint128 o1 = FStar_UInt128_mul_wide(f30, f41);
  231|  4.31M|    FStar_UInt128_uint128 o2 = FStar_UInt128_mul_wide(f30, f42);
  232|  4.31M|    FStar_UInt128_uint128 o3 = FStar_UInt128_mul_wide(f30, f43);
  233|  4.31M|    FStar_UInt128_uint128 o4 = FStar_UInt128_mul_wide(f30, f44);
  234|  4.31M|    FStar_UInt128_uint128 o01 = FStar_UInt128_add(o0, FStar_UInt128_mul_wide(f31, tmp24));
  235|  4.31M|    FStar_UInt128_uint128 o111 = FStar_UInt128_add(o1, FStar_UInt128_mul_wide(f31, f40));
  236|  4.31M|    FStar_UInt128_uint128 o211 = FStar_UInt128_add(o2, FStar_UInt128_mul_wide(f31, f41));
  237|  4.31M|    FStar_UInt128_uint128 o31 = FStar_UInt128_add(o3, FStar_UInt128_mul_wide(f31, f42));
  238|  4.31M|    FStar_UInt128_uint128 o41 = FStar_UInt128_add(o4, FStar_UInt128_mul_wide(f31, f43));
  239|  4.31M|    FStar_UInt128_uint128 o02 = FStar_UInt128_add(o01, FStar_UInt128_mul_wide(f32, tmp23));
  240|  4.31M|    FStar_UInt128_uint128 o121 = FStar_UInt128_add(o111, FStar_UInt128_mul_wide(f32, tmp24));
  241|  4.31M|    FStar_UInt128_uint128 o221 = FStar_UInt128_add(o211, FStar_UInt128_mul_wide(f32, f40));
  242|  4.31M|    FStar_UInt128_uint128 o32 = FStar_UInt128_add(o31, FStar_UInt128_mul_wide(f32, f41));
  243|  4.31M|    FStar_UInt128_uint128 o42 = FStar_UInt128_add(o41, FStar_UInt128_mul_wide(f32, f42));
  244|  4.31M|    FStar_UInt128_uint128 o03 = FStar_UInt128_add(o02, FStar_UInt128_mul_wide(f33, tmp22));
  245|  4.31M|    FStar_UInt128_uint128 o131 = FStar_UInt128_add(o121, FStar_UInt128_mul_wide(f33, tmp23));
  246|  4.31M|    FStar_UInt128_uint128 o231 = FStar_UInt128_add(o221, FStar_UInt128_mul_wide(f33, tmp24));
  247|  4.31M|    FStar_UInt128_uint128 o33 = FStar_UInt128_add(o32, FStar_UInt128_mul_wide(f33, f40));
  248|  4.31M|    FStar_UInt128_uint128 o43 = FStar_UInt128_add(o42, FStar_UInt128_mul_wide(f33, f41));
  249|  4.31M|    FStar_UInt128_uint128 o04 = FStar_UInt128_add(o03, FStar_UInt128_mul_wide(f34, tmp21));
  250|  4.31M|    FStar_UInt128_uint128 o141 = FStar_UInt128_add(o131, FStar_UInt128_mul_wide(f34, tmp22));
  251|  4.31M|    FStar_UInt128_uint128 o241 = FStar_UInt128_add(o231, FStar_UInt128_mul_wide(f34, tmp23));
  252|  4.31M|    FStar_UInt128_uint128 o34 = FStar_UInt128_add(o33, FStar_UInt128_mul_wide(f34, tmp24));
  253|  4.31M|    FStar_UInt128_uint128 o44 = FStar_UInt128_add(o43, FStar_UInt128_mul_wide(f34, f40));
  254|  4.31M|    FStar_UInt128_uint128 tmp_w20 = o04;
  255|  4.31M|    FStar_UInt128_uint128 tmp_w21 = o141;
  256|  4.31M|    FStar_UInt128_uint128 tmp_w22 = o241;
  257|  4.31M|    FStar_UInt128_uint128 tmp_w23 = o34;
  258|  4.31M|    FStar_UInt128_uint128 tmp_w24 = o44;
  259|  4.31M|    FStar_UInt128_uint128
  260|  4.31M|        l_ = FStar_UInt128_add(tmp_w10, FStar_UInt128_uint64_to_uint128((uint64_t)0U));
  261|  4.31M|    uint64_t tmp00 = FStar_UInt128_uint128_to_uint64(l_) & (uint64_t)0x7ffffffffffffU;
  262|  4.31M|    uint64_t c00 = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(l_, (uint32_t)51U));
  263|  4.31M|    FStar_UInt128_uint128 l_0 = FStar_UInt128_add(tmp_w11, FStar_UInt128_uint64_to_uint128(c00));
  264|  4.31M|    uint64_t tmp10 = FStar_UInt128_uint128_to_uint64(l_0) & (uint64_t)0x7ffffffffffffU;
  265|  4.31M|    uint64_t c10 = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(l_0, (uint32_t)51U));
  266|  4.31M|    FStar_UInt128_uint128 l_1 = FStar_UInt128_add(tmp_w12, FStar_UInt128_uint64_to_uint128(c10));
  267|  4.31M|    uint64_t tmp20 = FStar_UInt128_uint128_to_uint64(l_1) & (uint64_t)0x7ffffffffffffU;
  268|  4.31M|    uint64_t c20 = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(l_1, (uint32_t)51U));
  269|  4.31M|    FStar_UInt128_uint128 l_2 = FStar_UInt128_add(tmp_w13, FStar_UInt128_uint64_to_uint128(c20));
  270|  4.31M|    uint64_t tmp30 = FStar_UInt128_uint128_to_uint64(l_2) & (uint64_t)0x7ffffffffffffU;
  271|  4.31M|    uint64_t c30 = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(l_2, (uint32_t)51U));
  272|  4.31M|    FStar_UInt128_uint128 l_3 = FStar_UInt128_add(tmp_w14, FStar_UInt128_uint64_to_uint128(c30));
  273|  4.31M|    uint64_t tmp40 = FStar_UInt128_uint128_to_uint64(l_3) & (uint64_t)0x7ffffffffffffU;
  274|  4.31M|    uint64_t c40 = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(l_3, (uint32_t)51U));
  275|  4.31M|    uint64_t l_4 = tmp00 + c40 * (uint64_t)19U;
  276|  4.31M|    uint64_t tmp0_ = l_4 & (uint64_t)0x7ffffffffffffU;
  277|  4.31M|    uint64_t c50 = l_4 >> (uint32_t)51U;
  278|  4.31M|    uint64_t o100 = tmp0_;
  279|  4.31M|    uint64_t o112 = tmp10 + c50;
  280|  4.31M|    uint64_t o122 = tmp20;
  281|  4.31M|    uint64_t o132 = tmp30;
  282|  4.31M|    uint64_t o142 = tmp40;
  283|  4.31M|    FStar_UInt128_uint128
  284|  4.31M|        l_5 = FStar_UInt128_add(tmp_w20, FStar_UInt128_uint64_to_uint128((uint64_t)0U));
  285|  4.31M|    uint64_t tmp0 = FStar_UInt128_uint128_to_uint64(l_5) & (uint64_t)0x7ffffffffffffU;
  286|  4.31M|    uint64_t c0 = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(l_5, (uint32_t)51U));
  287|  4.31M|    FStar_UInt128_uint128 l_6 = FStar_UInt128_add(tmp_w21, FStar_UInt128_uint64_to_uint128(c0));
  288|  4.31M|    uint64_t tmp1 = FStar_UInt128_uint128_to_uint64(l_6) & (uint64_t)0x7ffffffffffffU;
  289|  4.31M|    uint64_t c1 = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(l_6, (uint32_t)51U));
  290|  4.31M|    FStar_UInt128_uint128 l_7 = FStar_UInt128_add(tmp_w22, FStar_UInt128_uint64_to_uint128(c1));
  291|  4.31M|    uint64_t tmp2 = FStar_UInt128_uint128_to_uint64(l_7) & (uint64_t)0x7ffffffffffffU;
  292|  4.31M|    uint64_t c2 = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(l_7, (uint32_t)51U));
  293|  4.31M|    FStar_UInt128_uint128 l_8 = FStar_UInt128_add(tmp_w23, FStar_UInt128_uint64_to_uint128(c2));
  294|  4.31M|    uint64_t tmp3 = FStar_UInt128_uint128_to_uint64(l_8) & (uint64_t)0x7ffffffffffffU;
  295|  4.31M|    uint64_t c3 = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(l_8, (uint32_t)51U));
  296|  4.31M|    FStar_UInt128_uint128 l_9 = FStar_UInt128_add(tmp_w24, FStar_UInt128_uint64_to_uint128(c3));
  297|  4.31M|    uint64_t tmp4 = FStar_UInt128_uint128_to_uint64(l_9) & (uint64_t)0x7ffffffffffffU;
  298|  4.31M|    uint64_t c4 = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(l_9, (uint32_t)51U));
  299|  4.31M|    uint64_t l_10 = tmp0 + c4 * (uint64_t)19U;
  300|  4.31M|    uint64_t tmp0_0 = l_10 & (uint64_t)0x7ffffffffffffU;
  301|  4.31M|    uint64_t c5 = l_10 >> (uint32_t)51U;
  302|  4.31M|    uint64_t o200 = tmp0_0;
  303|  4.31M|    uint64_t o212 = tmp1 + c5;
  304|  4.31M|    uint64_t o222 = tmp2;
  305|  4.31M|    uint64_t o232 = tmp3;
  306|  4.31M|    uint64_t o242 = tmp4;
  307|  4.31M|    uint64_t o10 = o100;
  308|  4.31M|    uint64_t o11 = o112;
  309|  4.31M|    uint64_t o12 = o122;
  310|  4.31M|    uint64_t o13 = o132;
  311|  4.31M|    uint64_t o14 = o142;
  312|  4.31M|    uint64_t o20 = o200;
  313|  4.31M|    uint64_t o21 = o212;
  314|  4.31M|    uint64_t o22 = o222;
  315|  4.31M|    uint64_t o23 = o232;
  316|  4.31M|    uint64_t o24 = o242;
  317|  4.31M|    out[0U] = o10;
  318|  4.31M|    out[1U] = o11;
  319|  4.31M|    out[2U] = o12;
  320|  4.31M|    out[3U] = o13;
  321|  4.31M|    out[4U] = o14;
  322|  4.31M|    out[5U] = o20;
  323|  4.31M|    out[6U] = o21;
  324|  4.31M|    out[7U] = o22;
  325|  4.31M|    out[8U] = o23;
  326|  4.31M|    out[9U] = o24;
  327|  4.31M|}
Hacl_Curve25519_51.c:Hacl_Impl_Curve25519_Field51_fsqr2:
  451|  4.31M|{
  452|  4.31M|    KRML_HOST_IGNORE(uu___);
  ------------------
  |  |   56|  4.31M|#define KRML_HOST_IGNORE(x) (void)(x)
  ------------------
  453|  4.31M|    uint64_t f10 = f[0U];
  454|  4.31M|    uint64_t f11 = f[1U];
  455|  4.31M|    uint64_t f12 = f[2U];
  456|  4.31M|    uint64_t f13 = f[3U];
  457|  4.31M|    uint64_t f14 = f[4U];
  458|  4.31M|    uint64_t f20 = f[5U];
  459|  4.31M|    uint64_t f21 = f[6U];
  460|  4.31M|    uint64_t f22 = f[7U];
  461|  4.31M|    uint64_t f23 = f[8U];
  462|  4.31M|    uint64_t f24 = f[9U];
  463|  4.31M|    uint64_t d00 = (uint64_t)2U * f10;
  464|  4.31M|    uint64_t d10 = (uint64_t)2U * f11;
  465|  4.31M|    uint64_t d20 = (uint64_t)38U * f12;
  466|  4.31M|    uint64_t d30 = (uint64_t)19U * f13;
  467|  4.31M|    uint64_t d4190 = (uint64_t)19U * f14;
  468|  4.31M|    uint64_t d40 = (uint64_t)2U * d4190;
  469|  4.31M|    FStar_UInt128_uint128
  470|  4.31M|        s00 =
  471|  4.31M|            FStar_UInt128_add(FStar_UInt128_add(FStar_UInt128_mul_wide(f10, f10),
  472|  4.31M|                                                FStar_UInt128_mul_wide(d40, f11)),
  473|  4.31M|                              FStar_UInt128_mul_wide(d20, f13));
  474|  4.31M|    FStar_UInt128_uint128
  475|  4.31M|        s10 =
  476|  4.31M|            FStar_UInt128_add(FStar_UInt128_add(FStar_UInt128_mul_wide(d00, f11),
  477|  4.31M|                                                FStar_UInt128_mul_wide(d40, f12)),
  478|  4.31M|                              FStar_UInt128_mul_wide(d30, f13));
  479|  4.31M|    FStar_UInt128_uint128
  480|  4.31M|        s20 =
  481|  4.31M|            FStar_UInt128_add(FStar_UInt128_add(FStar_UInt128_mul_wide(d00, f12),
  482|  4.31M|                                                FStar_UInt128_mul_wide(f11, f11)),
  483|  4.31M|                              FStar_UInt128_mul_wide(d40, f13));
  484|  4.31M|    FStar_UInt128_uint128
  485|  4.31M|        s30 =
  486|  4.31M|            FStar_UInt128_add(FStar_UInt128_add(FStar_UInt128_mul_wide(d00, f13),
  487|  4.31M|                                                FStar_UInt128_mul_wide(d10, f12)),
  488|  4.31M|                              FStar_UInt128_mul_wide(f14, d4190));
  489|  4.31M|    FStar_UInt128_uint128
  490|  4.31M|        s40 =
  491|  4.31M|            FStar_UInt128_add(FStar_UInt128_add(FStar_UInt128_mul_wide(d00, f14),
  492|  4.31M|                                                FStar_UInt128_mul_wide(d10, f13)),
  493|  4.31M|                              FStar_UInt128_mul_wide(f12, f12));
  494|  4.31M|    FStar_UInt128_uint128 o100 = s00;
  495|  4.31M|    FStar_UInt128_uint128 o110 = s10;
  496|  4.31M|    FStar_UInt128_uint128 o120 = s20;
  497|  4.31M|    FStar_UInt128_uint128 o130 = s30;
  498|  4.31M|    FStar_UInt128_uint128 o140 = s40;
  499|  4.31M|    uint64_t d0 = (uint64_t)2U * f20;
  500|  4.31M|    uint64_t d1 = (uint64_t)2U * f21;
  501|  4.31M|    uint64_t d2 = (uint64_t)38U * f22;
  502|  4.31M|    uint64_t d3 = (uint64_t)19U * f23;
  503|  4.31M|    uint64_t d419 = (uint64_t)19U * f24;
  504|  4.31M|    uint64_t d4 = (uint64_t)2U * d419;
  505|  4.31M|    FStar_UInt128_uint128
  506|  4.31M|        s0 =
  507|  4.31M|            FStar_UInt128_add(FStar_UInt128_add(FStar_UInt128_mul_wide(f20, f20),
  508|  4.31M|                                                FStar_UInt128_mul_wide(d4, f21)),
  509|  4.31M|                              FStar_UInt128_mul_wide(d2, f23));
  510|  4.31M|    FStar_UInt128_uint128
  511|  4.31M|        s1 =
  512|  4.31M|            FStar_UInt128_add(FStar_UInt128_add(FStar_UInt128_mul_wide(d0, f21),
  513|  4.31M|                                                FStar_UInt128_mul_wide(d4, f22)),
  514|  4.31M|                              FStar_UInt128_mul_wide(d3, f23));
  515|  4.31M|    FStar_UInt128_uint128
  516|  4.31M|        s2 =
  517|  4.31M|            FStar_UInt128_add(FStar_UInt128_add(FStar_UInt128_mul_wide(d0, f22),
  518|  4.31M|                                                FStar_UInt128_mul_wide(f21, f21)),
  519|  4.31M|                              FStar_UInt128_mul_wide(d4, f23));
  520|  4.31M|    FStar_UInt128_uint128
  521|  4.31M|        s3 =
  522|  4.31M|            FStar_UInt128_add(FStar_UInt128_add(FStar_UInt128_mul_wide(d0, f23),
  523|  4.31M|                                                FStar_UInt128_mul_wide(d1, f22)),
  524|  4.31M|                              FStar_UInt128_mul_wide(f24, d419));
  525|  4.31M|    FStar_UInt128_uint128
  526|  4.31M|        s4 =
  527|  4.31M|            FStar_UInt128_add(FStar_UInt128_add(FStar_UInt128_mul_wide(d0, f24),
  528|  4.31M|                                                FStar_UInt128_mul_wide(d1, f23)),
  529|  4.31M|                              FStar_UInt128_mul_wide(f22, f22));
  530|  4.31M|    FStar_UInt128_uint128 o200 = s0;
  531|  4.31M|    FStar_UInt128_uint128 o210 = s1;
  532|  4.31M|    FStar_UInt128_uint128 o220 = s2;
  533|  4.31M|    FStar_UInt128_uint128 o230 = s3;
  534|  4.31M|    FStar_UInt128_uint128 o240 = s4;
  535|  4.31M|    FStar_UInt128_uint128
  536|  4.31M|        l_ = FStar_UInt128_add(o100, FStar_UInt128_uint64_to_uint128((uint64_t)0U));
  537|  4.31M|    uint64_t tmp00 = FStar_UInt128_uint128_to_uint64(l_) & (uint64_t)0x7ffffffffffffU;
  538|  4.31M|    uint64_t c00 = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(l_, (uint32_t)51U));
  539|  4.31M|    FStar_UInt128_uint128 l_0 = FStar_UInt128_add(o110, FStar_UInt128_uint64_to_uint128(c00));
  540|  4.31M|    uint64_t tmp10 = FStar_UInt128_uint128_to_uint64(l_0) & (uint64_t)0x7ffffffffffffU;
  541|  4.31M|    uint64_t c10 = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(l_0, (uint32_t)51U));
  542|  4.31M|    FStar_UInt128_uint128 l_1 = FStar_UInt128_add(o120, FStar_UInt128_uint64_to_uint128(c10));
  543|  4.31M|    uint64_t tmp20 = FStar_UInt128_uint128_to_uint64(l_1) & (uint64_t)0x7ffffffffffffU;
  544|  4.31M|    uint64_t c20 = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(l_1, (uint32_t)51U));
  545|  4.31M|    FStar_UInt128_uint128 l_2 = FStar_UInt128_add(o130, FStar_UInt128_uint64_to_uint128(c20));
  546|  4.31M|    uint64_t tmp30 = FStar_UInt128_uint128_to_uint64(l_2) & (uint64_t)0x7ffffffffffffU;
  547|  4.31M|    uint64_t c30 = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(l_2, (uint32_t)51U));
  548|  4.31M|    FStar_UInt128_uint128 l_3 = FStar_UInt128_add(o140, FStar_UInt128_uint64_to_uint128(c30));
  549|  4.31M|    uint64_t tmp40 = FStar_UInt128_uint128_to_uint64(l_3) & (uint64_t)0x7ffffffffffffU;
  550|  4.31M|    uint64_t c40 = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(l_3, (uint32_t)51U));
  551|  4.31M|    uint64_t l_4 = tmp00 + c40 * (uint64_t)19U;
  552|  4.31M|    uint64_t tmp0_ = l_4 & (uint64_t)0x7ffffffffffffU;
  553|  4.31M|    uint64_t c50 = l_4 >> (uint32_t)51U;
  554|  4.31M|    uint64_t o101 = tmp0_;
  555|  4.31M|    uint64_t o111 = tmp10 + c50;
  556|  4.31M|    uint64_t o121 = tmp20;
  557|  4.31M|    uint64_t o131 = tmp30;
  558|  4.31M|    uint64_t o141 = tmp40;
  559|  4.31M|    FStar_UInt128_uint128
  560|  4.31M|        l_5 = FStar_UInt128_add(o200, FStar_UInt128_uint64_to_uint128((uint64_t)0U));
  561|  4.31M|    uint64_t tmp0 = FStar_UInt128_uint128_to_uint64(l_5) & (uint64_t)0x7ffffffffffffU;
  562|  4.31M|    uint64_t c0 = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(l_5, (uint32_t)51U));
  563|  4.31M|    FStar_UInt128_uint128 l_6 = FStar_UInt128_add(o210, FStar_UInt128_uint64_to_uint128(c0));
  564|  4.31M|    uint64_t tmp1 = FStar_UInt128_uint128_to_uint64(l_6) & (uint64_t)0x7ffffffffffffU;
  565|  4.31M|    uint64_t c1 = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(l_6, (uint32_t)51U));
  566|  4.31M|    FStar_UInt128_uint128 l_7 = FStar_UInt128_add(o220, FStar_UInt128_uint64_to_uint128(c1));
  567|  4.31M|    uint64_t tmp2 = FStar_UInt128_uint128_to_uint64(l_7) & (uint64_t)0x7ffffffffffffU;
  568|  4.31M|    uint64_t c2 = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(l_7, (uint32_t)51U));
  569|  4.31M|    FStar_UInt128_uint128 l_8 = FStar_UInt128_add(o230, FStar_UInt128_uint64_to_uint128(c2));
  570|  4.31M|    uint64_t tmp3 = FStar_UInt128_uint128_to_uint64(l_8) & (uint64_t)0x7ffffffffffffU;
  571|  4.31M|    uint64_t c3 = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(l_8, (uint32_t)51U));
  572|  4.31M|    FStar_UInt128_uint128 l_9 = FStar_UInt128_add(o240, FStar_UInt128_uint64_to_uint128(c3));
  573|  4.31M|    uint64_t tmp4 = FStar_UInt128_uint128_to_uint64(l_9) & (uint64_t)0x7ffffffffffffU;
  574|  4.31M|    uint64_t c4 = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(l_9, (uint32_t)51U));
  575|  4.31M|    uint64_t l_10 = tmp0 + c4 * (uint64_t)19U;
  576|  4.31M|    uint64_t tmp0_0 = l_10 & (uint64_t)0x7ffffffffffffU;
  577|  4.31M|    uint64_t c5 = l_10 >> (uint32_t)51U;
  578|  4.31M|    uint64_t o201 = tmp0_0;
  579|  4.31M|    uint64_t o211 = tmp1 + c5;
  580|  4.31M|    uint64_t o221 = tmp2;
  581|  4.31M|    uint64_t o231 = tmp3;
  582|  4.31M|    uint64_t o241 = tmp4;
  583|  4.31M|    uint64_t o10 = o101;
  584|  4.31M|    uint64_t o11 = o111;
  585|  4.31M|    uint64_t o12 = o121;
  586|  4.31M|    uint64_t o13 = o131;
  587|  4.31M|    uint64_t o14 = o141;
  588|  4.31M|    uint64_t o20 = o201;
  589|  4.31M|    uint64_t o21 = o211;
  590|  4.31M|    uint64_t o22 = o221;
  591|  4.31M|    uint64_t o23 = o231;
  592|  4.31M|    uint64_t o24 = o241;
  593|  4.31M|    out[0U] = o10;
  594|  4.31M|    out[1U] = o11;
  595|  4.31M|    out[2U] = o12;
  596|  4.31M|    out[3U] = o13;
  597|  4.31M|    out[4U] = o14;
  598|  4.31M|    out[5U] = o20;
  599|  4.31M|    out[6U] = o21;
  600|  4.31M|    out[7U] = o22;
  601|  4.31M|    out[8U] = o23;
  602|  4.31M|    out[9U] = o24;
  603|  4.31M|}
Hacl_Curve25519_51.c:Hacl_Impl_Curve25519_Field51_fmul1:
  331|  2.16M|{
  332|  2.16M|    uint64_t f10 = f1[0U];
  333|  2.16M|    uint64_t f11 = f1[1U];
  334|  2.16M|    uint64_t f12 = f1[2U];
  335|  2.16M|    uint64_t f13 = f1[3U];
  336|  2.16M|    uint64_t f14 = f1[4U];
  337|  2.16M|    FStar_UInt128_uint128 tmp_w0 = FStar_UInt128_mul_wide(f2, f10);
  338|  2.16M|    FStar_UInt128_uint128 tmp_w1 = FStar_UInt128_mul_wide(f2, f11);
  339|  2.16M|    FStar_UInt128_uint128 tmp_w2 = FStar_UInt128_mul_wide(f2, f12);
  340|  2.16M|    FStar_UInt128_uint128 tmp_w3 = FStar_UInt128_mul_wide(f2, f13);
  341|  2.16M|    FStar_UInt128_uint128 tmp_w4 = FStar_UInt128_mul_wide(f2, f14);
  342|  2.16M|    FStar_UInt128_uint128
  343|  2.16M|        l_ = FStar_UInt128_add(tmp_w0, FStar_UInt128_uint64_to_uint128((uint64_t)0U));
  344|  2.16M|    uint64_t tmp0 = FStar_UInt128_uint128_to_uint64(l_) & (uint64_t)0x7ffffffffffffU;
  345|  2.16M|    uint64_t c0 = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(l_, (uint32_t)51U));
  346|  2.16M|    FStar_UInt128_uint128 l_0 = FStar_UInt128_add(tmp_w1, FStar_UInt128_uint64_to_uint128(c0));
  347|  2.16M|    uint64_t tmp1 = FStar_UInt128_uint128_to_uint64(l_0) & (uint64_t)0x7ffffffffffffU;
  348|  2.16M|    uint64_t c1 = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(l_0, (uint32_t)51U));
  349|  2.16M|    FStar_UInt128_uint128 l_1 = FStar_UInt128_add(tmp_w2, FStar_UInt128_uint64_to_uint128(c1));
  350|  2.16M|    uint64_t tmp2 = FStar_UInt128_uint128_to_uint64(l_1) & (uint64_t)0x7ffffffffffffU;
  351|  2.16M|    uint64_t c2 = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(l_1, (uint32_t)51U));
  352|  2.16M|    FStar_UInt128_uint128 l_2 = FStar_UInt128_add(tmp_w3, FStar_UInt128_uint64_to_uint128(c2));
  353|  2.16M|    uint64_t tmp3 = FStar_UInt128_uint128_to_uint64(l_2) & (uint64_t)0x7ffffffffffffU;
  354|  2.16M|    uint64_t c3 = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(l_2, (uint32_t)51U));
  355|  2.16M|    FStar_UInt128_uint128 l_3 = FStar_UInt128_add(tmp_w4, FStar_UInt128_uint64_to_uint128(c3));
  356|  2.16M|    uint64_t tmp4 = FStar_UInt128_uint128_to_uint64(l_3) & (uint64_t)0x7ffffffffffffU;
  357|  2.16M|    uint64_t c4 = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(l_3, (uint32_t)51U));
  358|  2.16M|    uint64_t l_4 = tmp0 + c4 * (uint64_t)19U;
  359|  2.16M|    uint64_t tmp0_ = l_4 & (uint64_t)0x7ffffffffffffU;
  360|  2.16M|    uint64_t c5 = l_4 >> (uint32_t)51U;
  361|  2.16M|    uint64_t o0 = tmp0_;
  362|  2.16M|    uint64_t o1 = tmp1 + c5;
  363|  2.16M|    uint64_t o2 = tmp2;
  364|  2.16M|    uint64_t o3 = tmp3;
  365|  2.16M|    uint64_t o4 = tmp4;
  366|  2.16M|    out[0U] = o0;
  367|  2.16M|    out[1U] = o1;
  368|  2.16M|    out[2U] = o2;
  369|  2.16M|    out[3U] = o3;
  370|  2.16M|    out[4U] = o4;
  371|  2.16M|}
Hacl_Curve25519_51.c:Hacl_Impl_Curve25519_Field51_store_felem:
  607|  8.50k|{
  608|  8.50k|    uint64_t f0 = f[0U];
  609|  8.50k|    uint64_t f1 = f[1U];
  610|  8.50k|    uint64_t f2 = f[2U];
  611|  8.50k|    uint64_t f3 = f[3U];
  612|  8.50k|    uint64_t f4 = f[4U];
  613|  8.50k|    uint64_t l_ = f0 + (uint64_t)0U;
  614|  8.50k|    uint64_t tmp0 = l_ & (uint64_t)0x7ffffffffffffU;
  615|  8.50k|    uint64_t c0 = l_ >> (uint32_t)51U;
  616|  8.50k|    uint64_t l_0 = f1 + c0;
  617|  8.50k|    uint64_t tmp1 = l_0 & (uint64_t)0x7ffffffffffffU;
  618|  8.50k|    uint64_t c1 = l_0 >> (uint32_t)51U;
  619|  8.50k|    uint64_t l_1 = f2 + c1;
  620|  8.50k|    uint64_t tmp2 = l_1 & (uint64_t)0x7ffffffffffffU;
  621|  8.50k|    uint64_t c2 = l_1 >> (uint32_t)51U;
  622|  8.50k|    uint64_t l_2 = f3 + c2;
  623|  8.50k|    uint64_t tmp3 = l_2 & (uint64_t)0x7ffffffffffffU;
  624|  8.50k|    uint64_t c3 = l_2 >> (uint32_t)51U;
  625|  8.50k|    uint64_t l_3 = f4 + c3;
  626|  8.50k|    uint64_t tmp4 = l_3 & (uint64_t)0x7ffffffffffffU;
  627|  8.50k|    uint64_t c4 = l_3 >> (uint32_t)51U;
  628|  8.50k|    uint64_t l_4 = tmp0 + c4 * (uint64_t)19U;
  629|  8.50k|    uint64_t tmp0_ = l_4 & (uint64_t)0x7ffffffffffffU;
  630|  8.50k|    uint64_t c5 = l_4 >> (uint32_t)51U;
  631|  8.50k|    uint64_t f01 = tmp0_;
  632|  8.50k|    uint64_t f11 = tmp1 + c5;
  633|  8.50k|    uint64_t f21 = tmp2;
  634|  8.50k|    uint64_t f31 = tmp3;
  635|  8.50k|    uint64_t f41 = tmp4;
  636|  8.50k|    uint64_t m0 = FStar_UInt64_gte_mask(f01, (uint64_t)0x7ffffffffffedU);
  637|  8.50k|    uint64_t m1 = FStar_UInt64_eq_mask(f11, (uint64_t)0x7ffffffffffffU);
  638|  8.50k|    uint64_t m2 = FStar_UInt64_eq_mask(f21, (uint64_t)0x7ffffffffffffU);
  639|  8.50k|    uint64_t m3 = FStar_UInt64_eq_mask(f31, (uint64_t)0x7ffffffffffffU);
  640|  8.50k|    uint64_t m4 = FStar_UInt64_eq_mask(f41, (uint64_t)0x7ffffffffffffU);
  641|  8.50k|    uint64_t mask = (((m0 & m1) & m2) & m3) & m4;
  642|  8.50k|    uint64_t f0_ = f01 - (mask & (uint64_t)0x7ffffffffffedU);
  643|  8.50k|    uint64_t f1_ = f11 - (mask & (uint64_t)0x7ffffffffffffU);
  644|  8.50k|    uint64_t f2_ = f21 - (mask & (uint64_t)0x7ffffffffffffU);
  645|  8.50k|    uint64_t f3_ = f31 - (mask & (uint64_t)0x7ffffffffffffU);
  646|  8.50k|    uint64_t f4_ = f41 - (mask & (uint64_t)0x7ffffffffffffU);
  647|  8.50k|    uint64_t f02 = f0_;
  648|  8.50k|    uint64_t f12 = f1_;
  649|  8.50k|    uint64_t f22 = f2_;
  650|  8.50k|    uint64_t f32 = f3_;
  651|  8.50k|    uint64_t f42 = f4_;
  652|  8.50k|    uint64_t o00 = f02 | f12 << (uint32_t)51U;
  653|  8.50k|    uint64_t o10 = f12 >> (uint32_t)13U | f22 << (uint32_t)38U;
  654|  8.50k|    uint64_t o20 = f22 >> (uint32_t)26U | f32 << (uint32_t)25U;
  655|  8.50k|    uint64_t o30 = f32 >> (uint32_t)39U | f42 << (uint32_t)12U;
  656|  8.50k|    uint64_t o0 = o00;
  657|  8.50k|    uint64_t o1 = o10;
  658|  8.50k|    uint64_t o2 = o20;
  659|  8.50k|    uint64_t o3 = o30;
  660|  8.50k|    u64s[0U] = o0;
  661|  8.50k|    u64s[1U] = o1;
  662|  8.50k|    u64s[2U] = o2;
  663|  8.50k|    u64s[3U] = o3;
  664|  8.50k|}

Hacl_P256.c:Hacl_Bignum_Base_mul_wide_add2_u64:
   53|  82.9M|{
   54|  82.9M|    uint64_t out0 = out[0U];
   55|  82.9M|    FStar_UInt128_uint128
   56|  82.9M|        res =
   57|  82.9M|            FStar_UInt128_add(FStar_UInt128_add(FStar_UInt128_mul_wide(a, b),
   58|  82.9M|                                                FStar_UInt128_uint64_to_uint128(c_in)),
   59|  82.9M|                              FStar_UInt128_uint64_to_uint128(out0));
   60|  82.9M|    out[0U] = FStar_UInt128_uint128_to_uint64(res);
   61|  82.9M|    return FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(res, (uint32_t)64U));
   62|  82.9M|}
Hacl_P256.c:Hacl_Bignum_Addition_bn_add_eq_len_u64:
  242|  1.25M|{
  243|  1.25M|    uint64_t c = (uint64_t)0U;
  244|  3.75M|    for (uint32_t i = (uint32_t)0U; i < aLen / (uint32_t)4U; i++) {
  ------------------
  |  Branch (244:37): [True: 2.50M, False: 1.25M]
  ------------------
  245|  2.50M|        uint64_t t1 = a[(uint32_t)4U * i];
  246|  2.50M|        uint64_t t20 = b[(uint32_t)4U * i];
  247|  2.50M|        uint64_t *res_i0 = res + (uint32_t)4U * i;
  248|  2.50M|        c = Lib_IntTypes_Intrinsics_add_carry_u64(c, t1, t20, res_i0);
  ------------------
  |  |   66|  2.50M|    (_addcarry_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  249|  2.50M|        uint64_t t10 = a[(uint32_t)4U * i + (uint32_t)1U];
  250|  2.50M|        uint64_t t21 = b[(uint32_t)4U * i + (uint32_t)1U];
  251|  2.50M|        uint64_t *res_i1 = res + (uint32_t)4U * i + (uint32_t)1U;
  252|  2.50M|        c = Lib_IntTypes_Intrinsics_add_carry_u64(c, t10, t21, res_i1);
  ------------------
  |  |   66|  2.50M|    (_addcarry_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  253|  2.50M|        uint64_t t11 = a[(uint32_t)4U * i + (uint32_t)2U];
  254|  2.50M|        uint64_t t22 = b[(uint32_t)4U * i + (uint32_t)2U];
  255|  2.50M|        uint64_t *res_i2 = res + (uint32_t)4U * i + (uint32_t)2U;
  256|  2.50M|        c = Lib_IntTypes_Intrinsics_add_carry_u64(c, t11, t22, res_i2);
  ------------------
  |  |   66|  2.50M|    (_addcarry_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  257|  2.50M|        uint64_t t12 = a[(uint32_t)4U * i + (uint32_t)3U];
  258|  2.50M|        uint64_t t2 = b[(uint32_t)4U * i + (uint32_t)3U];
  259|  2.50M|        uint64_t *res_i = res + (uint32_t)4U * i + (uint32_t)3U;
  260|  2.50M|        c = Lib_IntTypes_Intrinsics_add_carry_u64(c, t12, t2, res_i);
  ------------------
  |  |   66|  2.50M|    (_addcarry_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  261|  2.50M|    }
  262|  1.25M|    for (uint32_t i = aLen / (uint32_t)4U * (uint32_t)4U; i < aLen; i++) {
  ------------------
  |  Branch (262:59): [True: 0, False: 1.25M]
  ------------------
  263|      0|        uint64_t t1 = a[i];
  264|      0|        uint64_t t2 = b[i];
  265|      0|        uint64_t *res_i = res + i;
  266|      0|        c = Lib_IntTypes_Intrinsics_add_carry_u64(c, t1, t2, res_i);
  ------------------
  |  |   66|      0|    (_addcarry_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  267|      0|    }
  268|  1.25M|    return c;
  269|  1.25M|}
Hacl_P256.c:Hacl_Bignum_Lib_bn_get_bits_u64:
  134|  54.0k|{
  135|  54.0k|    uint32_t i1 = i / (uint32_t)64U;
  136|  54.0k|    uint32_t j = i % (uint32_t)64U;
  137|  54.0k|    uint64_t p1 = b[i1] >> j;
  138|  54.0k|    uint64_t ite;
  139|  54.0k|    if (i1 + (uint32_t)1U < len && (uint32_t)0U < j) {
  ------------------
  |  Branch (139:9): [True: 21.5k, False: 32.5k]
  |  Branch (139:36): [True: 20.3k, False: 1.17k]
  ------------------
  140|  20.3k|        ite = p1 | b[i1 + (uint32_t)1U] << ((uint32_t)64U - j);
  141|  33.6k|    } else {
  142|  33.6k|        ite = p1;
  143|  33.6k|    }
  144|  54.0k|    return ite & (((uint64_t)1U << l) - (uint64_t)1U);
  145|  54.0k|}
Hacl_P384.c:Hacl_Bignum_Base_mul_wide_add2_u64:
   53|  57.7M|{
   54|  57.7M|    uint64_t out0 = out[0U];
   55|  57.7M|    FStar_UInt128_uint128
   56|  57.7M|        res =
   57|  57.7M|            FStar_UInt128_add(FStar_UInt128_add(FStar_UInt128_mul_wide(a, b),
   58|  57.7M|                                                FStar_UInt128_uint64_to_uint128(c_in)),
   59|  57.7M|                              FStar_UInt128_uint64_to_uint128(out0));
   60|  57.7M|    out[0U] = FStar_UInt128_uint128_to_uint64(res);
   61|  57.7M|    return FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(res, (uint32_t)64U));
   62|  57.7M|}
Hacl_P384.c:Hacl_Bignum_Addition_bn_add_eq_len_u64:
  242|   383k|{
  243|   383k|    uint64_t c = (uint64_t)0U;
  244|  1.53M|    for (uint32_t i = (uint32_t)0U; i < aLen / (uint32_t)4U; i++) {
  ------------------
  |  Branch (244:37): [True: 1.14M, False: 383k]
  ------------------
  245|  1.14M|        uint64_t t1 = a[(uint32_t)4U * i];
  246|  1.14M|        uint64_t t20 = b[(uint32_t)4U * i];
  247|  1.14M|        uint64_t *res_i0 = res + (uint32_t)4U * i;
  248|  1.14M|        c = Lib_IntTypes_Intrinsics_add_carry_u64(c, t1, t20, res_i0);
  ------------------
  |  |   66|  1.14M|    (_addcarry_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  249|  1.14M|        uint64_t t10 = a[(uint32_t)4U * i + (uint32_t)1U];
  250|  1.14M|        uint64_t t21 = b[(uint32_t)4U * i + (uint32_t)1U];
  251|  1.14M|        uint64_t *res_i1 = res + (uint32_t)4U * i + (uint32_t)1U;
  252|  1.14M|        c = Lib_IntTypes_Intrinsics_add_carry_u64(c, t10, t21, res_i1);
  ------------------
  |  |   66|  1.14M|    (_addcarry_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  253|  1.14M|        uint64_t t11 = a[(uint32_t)4U * i + (uint32_t)2U];
  254|  1.14M|        uint64_t t22 = b[(uint32_t)4U * i + (uint32_t)2U];
  255|  1.14M|        uint64_t *res_i2 = res + (uint32_t)4U * i + (uint32_t)2U;
  256|  1.14M|        c = Lib_IntTypes_Intrinsics_add_carry_u64(c, t11, t22, res_i2);
  ------------------
  |  |   66|  1.14M|    (_addcarry_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  257|  1.14M|        uint64_t t12 = a[(uint32_t)4U * i + (uint32_t)3U];
  258|  1.14M|        uint64_t t2 = b[(uint32_t)4U * i + (uint32_t)3U];
  259|  1.14M|        uint64_t *res_i = res + (uint32_t)4U * i + (uint32_t)3U;
  260|  1.14M|        c = Lib_IntTypes_Intrinsics_add_carry_u64(c, t12, t2, res_i);
  ------------------
  |  |   66|  1.14M|    (_addcarry_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  261|  1.14M|    }
  262|   383k|    for (uint32_t i = aLen / (uint32_t)4U * (uint32_t)4U; i < aLen; i++) {
  ------------------
  |  Branch (262:59): [True: 0, False: 383k]
  ------------------
  263|      0|        uint64_t t1 = a[i];
  264|      0|        uint64_t t2 = b[i];
  265|      0|        uint64_t *res_i = res + i;
  266|      0|        c = Lib_IntTypes_Intrinsics_add_carry_u64(c, t1, t2, res_i);
  ------------------
  |  |   66|      0|    (_addcarry_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  267|      0|    }
  268|   383k|    return c;
  269|   383k|}
Hacl_P384.c:Hacl_Bignum_Lib_bn_get_bits_u64:
  134|  21.1k|{
  135|  21.1k|    uint32_t i1 = i / (uint32_t)64U;
  136|  21.1k|    uint32_t j = i % (uint32_t)64U;
  137|  21.1k|    uint64_t p1 = b[i1] >> j;
  138|  21.1k|    uint64_t ite;
  139|  21.1k|    if (i1 + (uint32_t)1U < len && (uint32_t)0U < j) {
  ------------------
  |  Branch (139:9): [True: 17.5k, False: 3.53k]
  |  Branch (139:36): [True: 16.8k, False: 732]
  ------------------
  140|  16.8k|        ite = p1 | b[i1 + (uint32_t)1U] << ((uint32_t)64U - j);
  141|  16.8k|    } else {
  142|  4.27k|        ite = p1;
  143|  4.27k|    }
  144|  21.1k|    return ite & (((uint64_t)1U << l) - (uint64_t)1U);
  145|  21.1k|}
Hacl_P521.c:Hacl_Bignum_Base_mul_wide_add2_u64:
   53|   190M|{
   54|   190M|    uint64_t out0 = out[0U];
   55|   190M|    FStar_UInt128_uint128
   56|   190M|        res =
   57|   190M|            FStar_UInt128_add(FStar_UInt128_add(FStar_UInt128_mul_wide(a, b),
   58|   190M|                                                FStar_UInt128_uint64_to_uint128(c_in)),
   59|   190M|                              FStar_UInt128_uint64_to_uint128(out0));
   60|   190M|    out[0U] = FStar_UInt128_uint128_to_uint64(res);
   61|   190M|    return FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(res, (uint32_t)64U));
   62|   190M|}
Hacl_P521.c:Hacl_Bignum_Addition_bn_add_eq_len_u64:
  242|   563k|{
  243|   563k|    uint64_t c = (uint64_t)0U;
  244|  2.81M|    for (uint32_t i = (uint32_t)0U; i < aLen / (uint32_t)4U; i++) {
  ------------------
  |  Branch (244:37): [True: 2.25M, False: 563k]
  ------------------
  245|  2.25M|        uint64_t t1 = a[(uint32_t)4U * i];
  246|  2.25M|        uint64_t t20 = b[(uint32_t)4U * i];
  247|  2.25M|        uint64_t *res_i0 = res + (uint32_t)4U * i;
  248|  2.25M|        c = Lib_IntTypes_Intrinsics_add_carry_u64(c, t1, t20, res_i0);
  ------------------
  |  |   66|  2.25M|    (_addcarry_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  249|  2.25M|        uint64_t t10 = a[(uint32_t)4U * i + (uint32_t)1U];
  250|  2.25M|        uint64_t t21 = b[(uint32_t)4U * i + (uint32_t)1U];
  251|  2.25M|        uint64_t *res_i1 = res + (uint32_t)4U * i + (uint32_t)1U;
  252|  2.25M|        c = Lib_IntTypes_Intrinsics_add_carry_u64(c, t10, t21, res_i1);
  ------------------
  |  |   66|  2.25M|    (_addcarry_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  253|  2.25M|        uint64_t t11 = a[(uint32_t)4U * i + (uint32_t)2U];
  254|  2.25M|        uint64_t t22 = b[(uint32_t)4U * i + (uint32_t)2U];
  255|  2.25M|        uint64_t *res_i2 = res + (uint32_t)4U * i + (uint32_t)2U;
  256|  2.25M|        c = Lib_IntTypes_Intrinsics_add_carry_u64(c, t11, t22, res_i2);
  ------------------
  |  |   66|  2.25M|    (_addcarry_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  257|  2.25M|        uint64_t t12 = a[(uint32_t)4U * i + (uint32_t)3U];
  258|  2.25M|        uint64_t t2 = b[(uint32_t)4U * i + (uint32_t)3U];
  259|  2.25M|        uint64_t *res_i = res + (uint32_t)4U * i + (uint32_t)3U;
  260|  2.25M|        c = Lib_IntTypes_Intrinsics_add_carry_u64(c, t12, t2, res_i);
  ------------------
  |  |   66|  2.25M|    (_addcarry_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  261|  2.25M|    }
  262|  1.69M|    for (uint32_t i = aLen / (uint32_t)4U * (uint32_t)4U; i < aLen; i++) {
  ------------------
  |  Branch (262:59): [True: 1.12M, False: 563k]
  ------------------
  263|  1.12M|        uint64_t t1 = a[i];
  264|  1.12M|        uint64_t t2 = b[i];
  265|  1.12M|        uint64_t *res_i = res + i;
  266|  1.12M|        c = Lib_IntTypes_Intrinsics_add_carry_u64(c, t1, t2, res_i);
  ------------------
  |  |   66|  1.12M|    (_addcarry_u64(x1, x2, x3, (long long unsigned int *)x4))
  ------------------
  267|  1.12M|    }
  268|   563k|    return c;
  269|   563k|}
Hacl_P521.c:Hacl_Bignum_Lib_bn_get_bits_u64:
  134|  31.3k|{
  135|  31.3k|    uint32_t i1 = i / (uint32_t)64U;
  136|  31.3k|    uint32_t j = i % (uint32_t)64U;
  137|  31.3k|    uint64_t p1 = b[i1] >> j;
  138|  31.3k|    uint64_t ite;
  139|  31.3k|    if (i1 + (uint32_t)1U < len && (uint32_t)0U < j) {
  ------------------
  |  Branch (139:9): [True: 30.7k, False: 665]
  |  Branch (139:36): [True: 29.3k, False: 1.33k]
  ------------------
  140|  29.3k|        ite = p1 | b[i1 + (uint32_t)1U] << ((uint32_t)64U - j);
  141|  29.3k|    } else {
  142|  1.99k|        ite = p1;
  143|  1.99k|    }
  144|  31.3k|    return ite & (((uint64_t)1U << l) - (uint64_t)1U);
  145|  31.3k|}

libcrux_mlkem_portable.c:libcrux_sha3_portable_incremental_shake128_init:
   32|    360|{
   33|    360|    return libcrux_sha3_generic_keccak_new_1e_cf();
   34|    360|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_incremental_shake128_absorb_final:
   42|    360|{
   43|    360|    Eurydice_slice buf[1U] = { data0 };
   44|    360|    libcrux_sha3_generic_keccak_absorb_final_40(s, buf);
   45|    360|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_incremental_shake128_squeeze_first_three_blocks:
   92|    360|{
   93|    360|    Eurydice_slice buf[1U] = { out0 };
   94|    360|    libcrux_sha3_generic_keccak_squeeze_first_three_blocks_5c(s, buf);
   95|    360|}
libcrux_mlkem_portable.c:libcrux_sha3_generic_keccak_squeeze_first_three_blocks_5c:
   68|    360|{
   69|    360|    Eurydice_slice_uint8_t_1size_t__x2 uu____0 =
   70|    360|        libcrux_sha3_portable_keccak_split_at_mut_n_5a(out, (size_t)168U);
   71|    360|    Eurydice_slice o0[1U];
   72|    360|    memcpy(o0, uu____0.fst, (size_t)1U * sizeof(Eurydice_slice));
   73|    360|    Eurydice_slice o10[1U];
   74|    360|    memcpy(o10, uu____0.snd, (size_t)1U * sizeof(Eurydice_slice));
   75|    360|    libcrux_sha3_generic_keccak_squeeze_first_block_7b(s, o0);
   76|    360|    Eurydice_slice_uint8_t_1size_t__x2 uu____1 =
   77|    360|        libcrux_sha3_portable_keccak_split_at_mut_n_5a(o10, (size_t)168U);
   78|    360|    Eurydice_slice o1[1U];
   79|    360|    memcpy(o1, uu____1.fst, (size_t)1U * sizeof(Eurydice_slice));
   80|    360|    Eurydice_slice o2[1U];
   81|    360|    memcpy(o2, uu____1.snd, (size_t)1U * sizeof(Eurydice_slice));
   82|    360|    libcrux_sha3_generic_keccak_squeeze_next_block_c2(s, o1);
   83|    360|    libcrux_sha3_generic_keccak_squeeze_next_block_c2(s, o2);
   84|    360|}

libcrux_mlkem_portable.c:load64:
  178|  18.1k|{
  179|  18.1k|    uint64_t x;
  180|  18.1k|    memcpy(&x, b, 8);
  181|  18.1k|    return x;
  182|  18.1k|}
libcrux_mlkem_portable.c:store64:
  198|  27.8k|{
  199|  27.8k|    memcpy(b, &i, 8);
  200|  27.8k|}
Hacl_P256.c:load64:
  178|  15.7k|{
  179|  15.7k|    uint64_t x;
  180|  15.7k|    memcpy(&x, b, 8);
  181|  15.7k|    return x;
  182|  15.7k|}
Hacl_P256.c:store64:
  198|  5.97k|{
  199|  5.97k|    memcpy(b, &i, 8);
  200|  5.97k|}
Hacl_P384.c:load64:
  178|  3.41k|{
  179|  3.41k|    uint64_t x;
  180|  3.41k|    memcpy(&x, b, 8);
  181|  3.41k|    return x;
  182|  3.41k|}
Hacl_P384.c:store64:
  198|    696|{
  199|    696|    memcpy(b, &i, 8);
  200|    696|}
Hacl_P521.c:load64:
  178|  4.97k|{
  179|  4.97k|    uint64_t x;
  180|  4.97k|    memcpy(&x, b, 8);
  181|  4.97k|    return x;
  182|  4.97k|}
Hacl_P521.c:store64:
  198|    846|{
  199|    846|    memcpy(b, &i, 8);
  200|    846|}
Hacl_Chacha20.c:load32:
  170|   998k|{
  171|   998k|    uint32_t x;
  172|   998k|    memcpy(&x, b, 4);
  173|   998k|    return x;
  174|   998k|}
Hacl_Chacha20.c:store32:
  192|   601k|{
  193|   601k|    memcpy(b, &i, 4);
  194|   601k|}
Hacl_Curve25519_51.c:load64:
  178|  34.0k|{
  179|  34.0k|    uint64_t x;
  180|  34.0k|    memcpy(&x, b, 8);
  181|  34.0k|    return x;
  182|  34.0k|}
Hacl_Curve25519_51.c:store64:
  198|  34.0k|{
  199|  34.0k|    memcpy(b, &i, 8);
  200|  34.0k|}
Hacl_Chacha20_Vec256.c:load32:
  170|   111k|{
  171|   111k|    uint32_t x;
  172|   111k|    memcpy(&x, b, 4);
  173|   111k|    return x;
  174|   111k|}
Hacl_Chacha20Poly1305_256.c:store64:
  198|  9.69k|{
  199|  9.69k|    memcpy(b, &i, 8);
  200|  9.69k|}
Hacl_Chacha20Poly1305_256.c:load64:
  178|  23.1k|{
  179|  23.1k|    uint64_t x;
  180|  23.1k|    memcpy(&x, b, 8);
  181|  23.1k|    return x;
  182|  23.1k|}
Hacl_Poly1305_256.c:load64:
  178|  19.3k|{
  179|  19.3k|    uint64_t x;
  180|  19.3k|    memcpy(&x, b, 8);
  181|  19.3k|    return x;
  182|  19.3k|}
Hacl_Poly1305_256.c:store64:
  198|  9.69k|{
  199|  9.69k|    memcpy(b, &i, 8);
  200|  9.69k|}

Hacl_P256.c:FStar_UInt64_eq_mask:
   36|   727k|{
   37|   727k|    uint64_t x = a ^ b;
   38|   727k|    uint64_t minus_x = ~x + (uint64_t)1U;
   39|   727k|    uint64_t x_or_minus_x = x | minus_x;
   40|   727k|    uint64_t xnx = x_or_minus_x >> (uint32_t)63U;
   41|   727k|    return xnx - (uint64_t)1U;
   42|   727k|}
Hacl_P384.c:FStar_UInt64_gte_mask:
   46|    536|{
   47|    536|    uint64_t x = a;
   48|    536|    uint64_t y = b;
   49|    536|    uint64_t x_xor_y = x ^ y;
   50|    536|    uint64_t x_sub_y = x - y;
   51|    536|    uint64_t x_sub_y_xor_y = x_sub_y ^ y;
   52|    536|    uint64_t q = x_xor_y | x_sub_y_xor_y;
   53|    536|    uint64_t x_xor_q = x ^ q;
   54|    536|    uint64_t x_xor_q_ = x_xor_q >> (uint32_t)63U;
   55|    536|    return x_xor_q_ - (uint64_t)1U;
   56|    536|}
Hacl_P384.c:FStar_UInt64_eq_mask:
   36|   469k|{
   37|   469k|    uint64_t x = a ^ b;
   38|   469k|    uint64_t minus_x = ~x + (uint64_t)1U;
   39|   469k|    uint64_t x_or_minus_x = x | minus_x;
   40|   469k|    uint64_t xnx = x_or_minus_x >> (uint32_t)63U;
   41|   469k|    return xnx - (uint64_t)1U;
   42|   469k|}
Hacl_P521.c:FStar_UInt64_gte_mask:
   46|    509|{
   47|    509|    uint64_t x = a;
   48|    509|    uint64_t y = b;
   49|    509|    uint64_t x_xor_y = x ^ y;
   50|    509|    uint64_t x_sub_y = x - y;
   51|    509|    uint64_t x_sub_y_xor_y = x_sub_y ^ y;
   52|    509|    uint64_t q = x_xor_y | x_sub_y_xor_y;
   53|    509|    uint64_t x_xor_q = x ^ q;
   54|    509|    uint64_t x_xor_q_ = x_xor_q >> (uint32_t)63U;
   55|    509|    return x_xor_q_ - (uint64_t)1U;
   56|    509|}
Hacl_P521.c:FStar_UInt64_eq_mask:
   36|   698k|{
   37|   698k|    uint64_t x = a ^ b;
   38|   698k|    uint64_t minus_x = ~x + (uint64_t)1U;
   39|   698k|    uint64_t x_or_minus_x = x | minus_x;
   40|   698k|    uint64_t xnx = x_or_minus_x >> (uint32_t)63U;
   41|   698k|    return xnx - (uint64_t)1U;
   42|   698k|}
Hacl_Curve25519_51.c:FStar_UInt64_gte_mask:
   46|  8.50k|{
   47|  8.50k|    uint64_t x = a;
   48|  8.50k|    uint64_t y = b;
   49|  8.50k|    uint64_t x_xor_y = x ^ y;
   50|  8.50k|    uint64_t x_sub_y = x - y;
   51|  8.50k|    uint64_t x_sub_y_xor_y = x_sub_y ^ y;
   52|  8.50k|    uint64_t q = x_xor_y | x_sub_y_xor_y;
   53|  8.50k|    uint64_t x_xor_q = x ^ q;
   54|  8.50k|    uint64_t x_xor_q_ = x_xor_q >> (uint32_t)63U;
   55|  8.50k|    return x_xor_q_ - (uint64_t)1U;
   56|  8.50k|}
Hacl_Curve25519_51.c:FStar_UInt64_eq_mask:
   36|  34.0k|{
   37|  34.0k|    uint64_t x = a ^ b;
   38|  34.0k|    uint64_t minus_x = ~x + (uint64_t)1U;
   39|  34.0k|    uint64_t x_or_minus_x = x | minus_x;
   40|  34.0k|    uint64_t xnx = x_or_minus_x >> (uint32_t)63U;
   41|  34.0k|    return xnx - (uint64_t)1U;
   42|  34.0k|}
Hacl_Curve25519_51.c:FStar_UInt8_eq_mask:
  186|   272k|{
  187|   272k|    uint8_t x = a ^ b;
  188|   272k|    uint8_t minus_x = ~x + (uint8_t)1U;
  189|   272k|    uint8_t x_or_minus_x = x | minus_x;
  190|   272k|    uint8_t xnx = x_or_minus_x >> (uint32_t)7U;
  191|   272k|    return xnx - (uint8_t)1U;
  192|   272k|}
Hacl_Chacha20Poly1305_256.c:FStar_UInt8_eq_mask:
  186|  77.4k|{
  187|  77.4k|    uint8_t x = a ^ b;
  188|  77.4k|    uint8_t minus_x = ~x + (uint8_t)1U;
  189|  77.4k|    uint8_t x_or_minus_x = x | minus_x;
  190|  77.4k|    uint8_t xnx = x_or_minus_x >> (uint32_t)7U;
  191|  77.4k|    return xnx - (uint8_t)1U;
  192|  77.4k|}

Hacl_P256.c:FStar_UInt128_add:
   64|   165M|{
   65|   165M|    return x + y;
   66|   165M|}
Hacl_P256.c:FStar_UInt128_uint64_to_uint128:
  130|   165M|{
  131|   165M|    return (uint128_t)x;
  132|   165M|}
Hacl_P256.c:FStar_UInt128_mul_wide:
  142|  85.4M|{
  143|  85.4M|    return ((uint128_t)x) * y;
  144|  85.4M|}
Hacl_P256.c:FStar_UInt128_uint128_to_uint64:
  136|   170M|{
  137|   170M|    return (uint64_t)x;
  138|   170M|}
Hacl_P256.c:FStar_UInt128_shift_right:
  124|  85.4M|{
  125|  85.4M|    return x >> y;
  126|  85.4M|}
Hacl_P384.c:FStar_UInt128_add:
   64|   115M|{
   65|   115M|    return x + y;
   66|   115M|}
Hacl_P384.c:FStar_UInt128_uint64_to_uint128:
  130|   115M|{
  131|   115M|    return (uint128_t)x;
  132|   115M|}
Hacl_P384.c:FStar_UInt128_mul_wide:
  142|  58.8M|{
  143|  58.8M|    return ((uint128_t)x) * y;
  144|  58.8M|}
Hacl_P384.c:FStar_UInt128_uint128_to_uint64:
  136|   117M|{
  137|   117M|    return (uint64_t)x;
  138|   117M|}
Hacl_P384.c:FStar_UInt128_shift_right:
  124|  58.8M|{
  125|  58.8M|    return x >> y;
  126|  58.8M|}
Hacl_P521.c:FStar_UInt128_add:
   64|   381M|{
   65|   381M|    return x + y;
   66|   381M|}
Hacl_P521.c:FStar_UInt128_uint64_to_uint128:
  130|   381M|{
  131|   381M|    return (uint128_t)x;
  132|   381M|}
Hacl_P521.c:FStar_UInt128_mul_wide:
  142|   193M|{
  143|   193M|    return ((uint128_t)x) * y;
  144|   193M|}
Hacl_P521.c:FStar_UInt128_uint128_to_uint64:
  136|   386M|{
  137|   386M|    return (uint64_t)x;
  138|   386M|}
Hacl_P521.c:FStar_UInt128_shift_right:
  124|   193M|{
  125|   193M|    return x >> y;
  126|   193M|}
Hacl_Curve25519_51.c:FStar_UInt128_add:
   64|   444M|{
   65|   444M|    return x + y;
   66|   444M|}
Hacl_Curve25519_51.c:FStar_UInt128_mul_wide:
  142|   444M|{
  143|   444M|    return ((uint128_t)x) * y;
  144|   444M|}
Hacl_Curve25519_51.c:FStar_UInt128_uint64_to_uint128:
  130|   119M|{
  131|   119M|    return (uint128_t)x;
  132|   119M|}
Hacl_Curve25519_51.c:FStar_UInt128_uint128_to_uint64:
  136|   238M|{
  137|   238M|    return (uint64_t)x;
  138|   238M|}
Hacl_Curve25519_51.c:FStar_UInt128_shift_right:
  124|   119M|{
  125|   119M|    return x >> y;
  126|   119M|}

libcrux_ml_kem_types_from_b6_960:
  252|     40|{
  253|       |    /* Passing arrays by value in Rust generates a copy in C */
  254|     40|    uint8_t copy_of_value[1184U];
  255|     40|    memcpy(copy_of_value, value, (size_t)1184U * sizeof(uint8_t));
  256|     40|    libcrux_ml_kem_types_MlKemPublicKey_15 lit;
  257|     40|    memcpy(lit.value, copy_of_value, (size_t)1184U * sizeof(uint8_t));
  258|     40|    return lit;
  259|     40|}
libcrux_ml_kem_types_from_17_820:
  278|     40|{
  279|     40|    return (
  280|     40|        CLITERAL(libcrux_ml_kem_mlkem768_MlKem768KeyPair){ .sk = sk, .pk = pk });
  ------------------
  |  |   27|     40|#define CLITERAL(type) (type)
  ------------------
  281|     40|}
libcrux_ml_kem_types_from_05_890:
  295|     40|{
  296|       |    /* Passing arrays by value in Rust generates a copy in C */
  297|     40|    uint8_t copy_of_value[2400U];
  298|     40|    memcpy(copy_of_value, value, (size_t)2400U * sizeof(uint8_t));
  299|     40|    libcrux_ml_kem_types_MlKemPrivateKey_55 lit;
  300|     40|    memcpy(lit.value, copy_of_value, (size_t)2400U * sizeof(uint8_t));
  301|     40|    return lit;
  302|     40|}
core_result_unwrap_41_33:
  453|     40|{
  454|     40|    if (self.tag == core_result_Ok) {
  ------------------
  |  |   33|     40|#define core_result_Ok 0
  ------------------
  |  Branch (454:9): [True: 40, False: 0]
  ------------------
  455|     40|        uint8_t f0[32U];
  456|     40|        memcpy(f0, self.val.case_Ok, (size_t)32U * sizeof(uint8_t));
  457|     40|        memcpy(ret, f0, (size_t)32U * sizeof(uint8_t));
  458|     40|    } else {
  459|      0|        KRML_HOST_EPRINTF("KaRaMeL abort at %s:%d\n%s\n", __FILE__, __LINE__,
  ------------------
  |  |   34|      0|#define KRML_HOST_EPRINTF(...) fprintf(stderr, __VA_ARGS__)
  ------------------
  460|      0|                          "unwrap not Ok");
  461|      0|        KRML_HOST_EXIT(255U);
  ------------------
  |  |   40|      0|#define KRML_HOST_EXIT exit
  ------------------
  462|      0|    }
  463|     40|}
libcrux_ml_kem_utils_into_padded_array_6d2:
  515|     40|{
  516|     40|    uint8_t out[33U] = { 0U };
  517|     40|    uint8_t *uu____0 = out;
  518|     40|    Eurydice_slice_copy(
  ------------------
  |  |   84|     40|    memcpy(dst.ptr, src.ptr, dst.len * sizeof(t))
  ------------------
  519|     40|        Eurydice_array_to_subslice2(uu____0, (size_t)0U,
  520|     40|                                    Eurydice_slice_len(slice, uint8_t), uint8_t),
  521|     40|        slice, uint8_t);
  522|     40|    memcpy(ret, out, (size_t)33U * sizeof(uint8_t));
  523|     40|}
libcrux_ml_kem_utils_into_padded_array_6d1:
  536|     40|{
  537|     40|    uint8_t out[34U] = { 0U };
  538|     40|    uint8_t *uu____0 = out;
  539|     40|    Eurydice_slice_copy(
  ------------------
  |  |   84|     40|    memcpy(dst.ptr, src.ptr, dst.len * sizeof(t))
  ------------------
  540|     40|        Eurydice_array_to_subslice2(uu____0, (size_t)0U,
  541|     40|                                    Eurydice_slice_len(slice, uint8_t), uint8_t),
  542|     40|        slice, uint8_t);
  543|     40|    memcpy(ret, out, (size_t)34U * sizeof(uint8_t));
  544|     40|}
core_result_unwrap_41_30:
  680|  9.60k|{
  681|  9.60k|    if (self.tag == core_result_Ok) {
  ------------------
  |  |   33|  9.60k|#define core_result_Ok 0
  ------------------
  |  Branch (681:9): [True: 9.60k, False: 0]
  ------------------
  682|  9.60k|        int16_t f0[16U];
  683|  9.60k|        memcpy(f0, self.val.case_Ok, (size_t)16U * sizeof(int16_t));
  684|  9.60k|        memcpy(ret, f0, (size_t)16U * sizeof(int16_t));
  685|  9.60k|    } else {
  686|      0|        KRML_HOST_EPRINTF("KaRaMeL abort at %s:%d\n%s\n", __FILE__, __LINE__,
  ------------------
  |  |   34|      0|#define KRML_HOST_EPRINTF(...) fprintf(stderr, __VA_ARGS__)
  ------------------
  687|      0|                          "unwrap not Ok");
  688|      0|        KRML_HOST_EXIT(255U);
  ------------------
  |  |   40|      0|#define KRML_HOST_EXIT exit
  ------------------
  689|      0|    }
  690|  9.60k|}
core_result_unwrap_41_0e:
  702|  18.1k|{
  703|  18.1k|    if (self.tag == core_result_Ok) {
  ------------------
  |  |   33|  18.1k|#define core_result_Ok 0
  ------------------
  |  Branch (703:9): [True: 18.1k, False: 0]
  ------------------
  704|  18.1k|        uint8_t f0[8U];
  705|  18.1k|        memcpy(f0, self.val.case_Ok, (size_t)8U * sizeof(uint8_t));
  706|  18.1k|        memcpy(ret, f0, (size_t)8U * sizeof(uint8_t));
  707|  18.1k|    } else {
  708|      0|        KRML_HOST_EPRINTF("KaRaMeL abort at %s:%d\n%s\n", __FILE__, __LINE__,
  ------------------
  |  |   34|      0|#define KRML_HOST_EPRINTF(...) fprintf(stderr, __VA_ARGS__)
  ------------------
  709|      0|                          "unwrap not Ok");
  710|      0|        KRML_HOST_EXIT(255U);
  ------------------
  |  |   40|      0|#define KRML_HOST_EXIT exit
  ------------------
  711|      0|    }
  712|  18.1k|}

libcrux_ml_kem_mlkem768_portable_generate_key_pair:
  142|     40|{
  143|       |    /* Passing arrays by value in Rust generates a copy in C */
  144|     40|    uint8_t copy_of_randomness[64U];
  145|     40|    memcpy(copy_of_randomness, randomness, (size_t)64U * sizeof(uint8_t));
  146|     40|    return generate_keypair_87(copy_of_randomness);
  147|     40|}
libcrux_mlkem768_portable.c:generate_keypair_87:
  130|     40|{
  131|       |    /* Passing arrays by value in Rust generates a copy in C */
  132|     40|    uint8_t copy_of_randomness[64U];
  133|     40|    memcpy(copy_of_randomness, randomness, (size_t)64U * sizeof(uint8_t));
  134|     40|    return libcrux_ml_kem_ind_cca_generate_keypair_f6(copy_of_randomness);
  135|     40|}

libcrux_ml_kem_hash_functions_portable_G:
   22|     40|{
   23|     40|    uint8_t digest[64U] = { 0U };
   24|     40|    libcrux_sha3_portable_sha512(
   25|     40|        Eurydice_array_to_slice((size_t)64U, digest, uint8_t), input);
  ------------------
  |  |   69|     40|    EURYDICE_SLICE(x, 0,                   \
  |  |  ------------------
  |  |  |  |   50|     40|    (CLITERAL(Eurydice_slice){ .ptr = (void *)(x + start), .len = end - start })
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     40|#define CLITERAL(type) (type)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   70|     40|                   end) /* x is already at an array type, no need for cast */
  ------------------
   26|     40|    memcpy(ret, digest, (size_t)64U * sizeof(uint8_t));
   27|     40|}
libcrux_ml_kem_hash_functions_portable_H:
   32|     40|{
   33|     40|    uint8_t digest[32U] = { 0U };
   34|     40|    libcrux_sha3_portable_sha256(
   35|     40|        Eurydice_array_to_slice((size_t)32U, digest, uint8_t), input);
  ------------------
  |  |   69|     40|    EURYDICE_SLICE(x, 0,                   \
  |  |  ------------------
  |  |  |  |   50|     40|    (CLITERAL(Eurydice_slice){ .ptr = (void *)(x + start), .len = end - start })
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     40|#define CLITERAL(type) (type)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   70|     40|                   end) /* x is already at an array type, no need for cast */
  ------------------
   36|     40|    memcpy(ret, digest, (size_t)32U * sizeof(uint8_t));
   37|     40|}
libcrux_ml_kem_vector_portable_vector_type_from_i16_array:
   77|  9.60k|{
   78|  9.60k|    libcrux_ml_kem_vector_portable_vector_type_PortableVector lit;
   79|  9.60k|    int16_t ret[16U];
   80|  9.60k|    core_result_Result_c0 dst;
   81|  9.60k|    Eurydice_slice_to_array2(
  ------------------
  |  |  116|  9.60k|    Eurydice_slice_to_array3(&(dst)->tag, (char *)&(dst)->val.case_Ok, src, \
  |  |  117|  9.60k|                             sizeof(t_arr))
  ------------------
   82|  9.60k|        &dst, Eurydice_slice_subslice2(array, (size_t)0U, (size_t)16U, int16_t),
   83|  9.60k|        Eurydice_slice, int16_t[16U]);
   84|  9.60k|    core_result_unwrap_41_30(dst, ret);
   85|  9.60k|    memcpy(lit.elements, ret, (size_t)16U * sizeof(int16_t));
   86|  9.60k|    return lit;
   87|  9.60k|}
libcrux_ml_kem_vector_portable_from_i16_array_0d:
   95|  9.60k|{
   96|  9.60k|    return libcrux_ml_kem_vector_portable_vector_type_from_i16_array(array);
   97|  9.60k|}
libcrux_ml_kem_vector_portable_vector_type_zero:
  288|  32.6k|{
  289|  32.6k|    libcrux_ml_kem_vector_portable_vector_type_PortableVector lit;
  290|  32.6k|    lit.elements[0U] = (int16_t)0;
  291|  32.6k|    lit.elements[1U] = (int16_t)0;
  292|  32.6k|    lit.elements[2U] = (int16_t)0;
  293|  32.6k|    lit.elements[3U] = (int16_t)0;
  294|  32.6k|    lit.elements[4U] = (int16_t)0;
  295|  32.6k|    lit.elements[5U] = (int16_t)0;
  296|  32.6k|    lit.elements[6U] = (int16_t)0;
  297|  32.6k|    lit.elements[7U] = (int16_t)0;
  298|  32.6k|    lit.elements[8U] = (int16_t)0;
  299|  32.6k|    lit.elements[9U] = (int16_t)0;
  300|  32.6k|    lit.elements[10U] = (int16_t)0;
  301|  32.6k|    lit.elements[11U] = (int16_t)0;
  302|  32.6k|    lit.elements[12U] = (int16_t)0;
  303|  32.6k|    lit.elements[13U] = (int16_t)0;
  304|  32.6k|    lit.elements[14U] = (int16_t)0;
  305|  32.6k|    lit.elements[15U] = (int16_t)0;
  306|  32.6k|    return lit;
  307|  32.6k|}
libcrux_ml_kem_vector_portable_ZERO_0d:
  889|  26.8k|{
  890|  26.8k|    return libcrux_ml_kem_vector_portable_vector_type_zero();
  891|  26.8k|}
libcrux_ml_kem_vector_portable_arithmetic_add:
  897|  19.2k|{
  898|  19.2k|    for (size_t i = (size_t)0U;
  899|   326k|         i < LIBCRUX_ML_KEM_VECTOR_TRAITS_FIELD_ELEMENTS_IN_VECTOR; i++) {
  ------------------
  |  |   32|   326k|#define LIBCRUX_ML_KEM_VECTOR_TRAITS_FIELD_ELEMENTS_IN_VECTOR ((size_t)16U)
  ------------------
  |  Branch (899:10): [True: 307k, False: 19.2k]
  ------------------
  900|   307k|        size_t i0 = i;
  901|   307k|        size_t uu____0 = i0;
  902|   307k|        lhs.elements[uu____0] = lhs.elements[uu____0] + rhs->elements[i0];
  903|   307k|    }
  904|  19.2k|    return lhs;
  905|  19.2k|}
libcrux_ml_kem_vector_portable_add_0d:
  915|  19.2k|{
  916|  19.2k|    return libcrux_ml_kem_vector_portable_arithmetic_add(lhs, rhs);
  917|  19.2k|}
libcrux_ml_kem_vector_portable_arithmetic_sub:
  923|  7.68k|{
  924|  7.68k|    for (size_t i = (size_t)0U;
  925|   130k|         i < LIBCRUX_ML_KEM_VECTOR_TRAITS_FIELD_ELEMENTS_IN_VECTOR; i++) {
  ------------------
  |  |   32|   130k|#define LIBCRUX_ML_KEM_VECTOR_TRAITS_FIELD_ELEMENTS_IN_VECTOR ((size_t)16U)
  ------------------
  |  Branch (925:10): [True: 122k, False: 7.68k]
  ------------------
  926|   122k|        size_t i0 = i;
  927|   122k|        size_t uu____0 = i0;
  928|   122k|        lhs.elements[uu____0] = lhs.elements[uu____0] - rhs->elements[i0];
  929|   122k|    }
  930|  7.68k|    return lhs;
  931|  7.68k|}
libcrux_ml_kem_vector_portable_sub_0d:
  941|  7.68k|{
  942|  7.68k|    return libcrux_ml_kem_vector_portable_arithmetic_sub(lhs, rhs);
  943|  7.68k|}
libcrux_ml_kem_vector_portable_arithmetic_multiply_by_constant:
  948|  1.92k|{
  949|  1.92k|    for (size_t i = (size_t)0U;
  950|  32.6k|         i < LIBCRUX_ML_KEM_VECTOR_TRAITS_FIELD_ELEMENTS_IN_VECTOR; i++) {
  ------------------
  |  |   32|  32.6k|#define LIBCRUX_ML_KEM_VECTOR_TRAITS_FIELD_ELEMENTS_IN_VECTOR ((size_t)16U)
  ------------------
  |  Branch (950:10): [True: 30.7k, False: 1.92k]
  ------------------
  951|  30.7k|        size_t i0 = i;
  952|  30.7k|        size_t uu____0 = i0;
  953|  30.7k|        v.elements[uu____0] = v.elements[uu____0] * c;
  954|  30.7k|    }
  955|  1.92k|    return v;
  956|  1.92k|}
libcrux_ml_kem_vector_portable_multiply_by_constant_0d:
  965|  1.92k|{
  966|  1.92k|    return libcrux_ml_kem_vector_portable_arithmetic_multiply_by_constant(v, c);
  967|  1.92k|}
libcrux_ml_kem_vector_portable_arithmetic_bitwise_and_with_constant:
  972|  3.84k|{
  973|  3.84k|    for (size_t i = (size_t)0U;
  974|  65.2k|         i < LIBCRUX_ML_KEM_VECTOR_TRAITS_FIELD_ELEMENTS_IN_VECTOR; i++) {
  ------------------
  |  |   32|  65.2k|#define LIBCRUX_ML_KEM_VECTOR_TRAITS_FIELD_ELEMENTS_IN_VECTOR ((size_t)16U)
  ------------------
  |  Branch (974:10): [True: 61.4k, False: 3.84k]
  ------------------
  975|  61.4k|        size_t i0 = i;
  976|  61.4k|        size_t uu____0 = i0;
  977|  61.4k|        v.elements[uu____0] = v.elements[uu____0] & c;
  978|  61.4k|    }
  979|  3.84k|    return v;
  980|  3.84k|}
libcrux_ml_kem_vector_portable_bitwise_and_with_constant_0d:
  989|  3.84k|{
  990|  3.84k|    return libcrux_ml_kem_vector_portable_arithmetic_bitwise_and_with_constant(v,
  991|  3.84k|                                                                               c);
  992|  3.84k|}
libcrux_ml_kem_vector_portable_arithmetic_barrett_reduce_element:
 1047|  92.1k|{
 1048|  92.1k|    int32_t t = (int32_t)value *
 1049|  92.1k|                    LIBCRUX_ML_KEM_VECTOR_PORTABLE_ARITHMETIC_BARRETT_MULTIPLIER +
  ------------------
  |  |  200|  92.1k|    ((int32_t)20159)
  ------------------
 1050|  92.1k|                (LIBCRUX_ML_KEM_VECTOR_PORTABLE_ARITHMETIC_BARRETT_R >> 1U);
  ------------------
  |  |  205|  92.1k|    ((int32_t)1 << (uint32_t)                               \
  |  |  206|  92.1k|         LIBCRUX_ML_KEM_VECTOR_PORTABLE_ARITHMETIC_BARRETT_SHIFT)
  |  |  ------------------
  |  |  |  |  202|  92.1k|#define LIBCRUX_ML_KEM_VECTOR_PORTABLE_ARITHMETIC_BARRETT_SHIFT ((int32_t)26)
  |  |  ------------------
  ------------------
 1051|  92.1k|    int16_t quotient =
 1052|  92.1k|        (int16_t)(t >>
 1053|  92.1k|                  (uint32_t)
 1054|  92.1k|                      LIBCRUX_ML_KEM_VECTOR_PORTABLE_ARITHMETIC_BARRETT_SHIFT);
  ------------------
  |  |  202|  92.1k|#define LIBCRUX_ML_KEM_VECTOR_PORTABLE_ARITHMETIC_BARRETT_SHIFT ((int32_t)26)
  ------------------
 1055|  92.1k|    return value - quotient * LIBCRUX_ML_KEM_VECTOR_TRAITS_FIELD_MODULUS;
  ------------------
  |  |   34|  92.1k|#define LIBCRUX_ML_KEM_VECTOR_TRAITS_FIELD_MODULUS ((int16_t)3329)
  ------------------
 1056|  92.1k|}
libcrux_ml_kem_vector_portable_arithmetic_barrett_reduce:
 1061|  5.76k|{
 1062|  5.76k|    for (size_t i = (size_t)0U;
 1063|  97.9k|         i < LIBCRUX_ML_KEM_VECTOR_TRAITS_FIELD_ELEMENTS_IN_VECTOR; i++) {
  ------------------
  |  |   32|  97.9k|#define LIBCRUX_ML_KEM_VECTOR_TRAITS_FIELD_ELEMENTS_IN_VECTOR ((size_t)16U)
  ------------------
  |  Branch (1063:10): [True: 92.1k, False: 5.76k]
  ------------------
 1064|  92.1k|        size_t i0 = i;
 1065|  92.1k|        v.elements[i0] =
 1066|  92.1k|            libcrux_ml_kem_vector_portable_arithmetic_barrett_reduce_element(
 1067|  92.1k|                v.elements[i0]);
 1068|  92.1k|    }
 1069|  5.76k|    return v;
 1070|  5.76k|}
libcrux_ml_kem_vector_portable_barrett_reduce_0d:
 1079|  5.76k|{
 1080|  5.76k|    return libcrux_ml_kem_vector_portable_arithmetic_barrett_reduce(v);
 1081|  5.76k|}
libcrux_ml_kem_vector_portable_arithmetic_montgomery_reduce_element:
 1100|   353k|{
 1101|   353k|    int32_t k =
 1102|   353k|        (int32_t)(int16_t)value *
 1103|   353k|        (int32_t)LIBCRUX_ML_KEM_VECTOR_TRAITS_INVERSE_OF_MODULUS_MOD_MONTGOMERY_R;
  ------------------
  |  |   40|   353k|    (62209U)
  ------------------
 1104|   353k|    int32_t k_times_modulus =
 1105|   353k|        (int32_t)(int16_t)k * (int32_t)LIBCRUX_ML_KEM_VECTOR_TRAITS_FIELD_MODULUS;
  ------------------
  |  |   34|   353k|#define LIBCRUX_ML_KEM_VECTOR_TRAITS_FIELD_MODULUS ((int16_t)3329)
  ------------------
 1106|   353k|    int16_t c =
 1107|   353k|        (int16_t)(k_times_modulus >>
 1108|   353k|                  (uint32_t)
 1109|   353k|                      LIBCRUX_ML_KEM_VECTOR_PORTABLE_ARITHMETIC_MONTGOMERY_SHIFT);
  ------------------
  |  |  236|   353k|#define LIBCRUX_ML_KEM_VECTOR_PORTABLE_ARITHMETIC_MONTGOMERY_SHIFT (16U)
  ------------------
 1110|   353k|    int16_t value_high =
 1111|   353k|        (int16_t)(value >>
 1112|   353k|                  (uint32_t)
 1113|   353k|                      LIBCRUX_ML_KEM_VECTOR_PORTABLE_ARITHMETIC_MONTGOMERY_SHIFT);
  ------------------
  |  |  236|   353k|#define LIBCRUX_ML_KEM_VECTOR_PORTABLE_ARITHMETIC_MONTGOMERY_SHIFT (16U)
  ------------------
 1114|   353k|    return value_high - c;
 1115|   353k|}
libcrux_ml_kem_vector_portable_arithmetic_montgomery_multiply_fe_by_fer:
 1131|   215k|{
 1132|   215k|    return libcrux_ml_kem_vector_portable_arithmetic_montgomery_reduce_element(
 1133|   215k|        (int32_t)fe * (int32_t)fer);
 1134|   215k|}
libcrux_ml_kem_vector_portable_arithmetic_montgomery_multiply_by_constant:
 1139|  7.68k|{
 1140|  7.68k|    for (size_t i = (size_t)0U;
 1141|   130k|         i < LIBCRUX_ML_KEM_VECTOR_TRAITS_FIELD_ELEMENTS_IN_VECTOR; i++) {
  ------------------
  |  |   32|   130k|#define LIBCRUX_ML_KEM_VECTOR_TRAITS_FIELD_ELEMENTS_IN_VECTOR ((size_t)16U)
  ------------------
  |  Branch (1141:10): [True: 122k, False: 7.68k]
  ------------------
 1142|   122k|        size_t i0 = i;
 1143|   122k|        v.elements[i0] =
 1144|   122k|            libcrux_ml_kem_vector_portable_arithmetic_montgomery_multiply_fe_by_fer(
 1145|   122k|                v.elements[i0], c);
 1146|   122k|    }
 1147|  7.68k|    return v;
 1148|  7.68k|}
libcrux_ml_kem_vector_portable_montgomery_multiply_by_constant_0d:
 1157|  7.68k|{
 1158|  7.68k|    return libcrux_ml_kem_vector_portable_arithmetic_montgomery_multiply_by_constant(
 1159|  7.68k|        v, r);
 1160|  7.68k|}
libcrux_ml_kem_vector_portable_ntt_ntt_step:
 1244|  92.1k|{
 1245|  92.1k|    int16_t t =
 1246|  92.1k|        libcrux_ml_kem_vector_portable_arithmetic_montgomery_multiply_fe_by_fer(
 1247|  92.1k|            v->elements[j], zeta);
 1248|  92.1k|    v->elements[j] = v->elements[i] - t;
 1249|  92.1k|    v->elements[i] = v->elements[i] + t;
 1250|  92.1k|}
libcrux_ml_kem_vector_portable_ntt_ntt_layer_1_step:
 1256|  3.84k|{
 1257|  3.84k|    libcrux_ml_kem_vector_portable_ntt_ntt_step(&v, zeta0, (size_t)0U,
 1258|  3.84k|                                                (size_t)2U);
 1259|  3.84k|    libcrux_ml_kem_vector_portable_ntt_ntt_step(&v, zeta0, (size_t)1U,
 1260|  3.84k|                                                (size_t)3U);
 1261|  3.84k|    libcrux_ml_kem_vector_portable_ntt_ntt_step(&v, zeta1, (size_t)4U,
 1262|  3.84k|                                                (size_t)6U);
 1263|  3.84k|    libcrux_ml_kem_vector_portable_ntt_ntt_step(&v, zeta1, (size_t)5U,
 1264|  3.84k|                                                (size_t)7U);
 1265|  3.84k|    libcrux_ml_kem_vector_portable_ntt_ntt_step(&v, zeta2, (size_t)8U,
 1266|  3.84k|                                                (size_t)10U);
 1267|  3.84k|    libcrux_ml_kem_vector_portable_ntt_ntt_step(&v, zeta2, (size_t)9U,
 1268|  3.84k|                                                (size_t)11U);
 1269|  3.84k|    libcrux_ml_kem_vector_portable_ntt_ntt_step(&v, zeta3, (size_t)12U,
 1270|  3.84k|                                                (size_t)14U);
 1271|  3.84k|    libcrux_ml_kem_vector_portable_ntt_ntt_step(&v, zeta3, (size_t)13U,
 1272|  3.84k|                                                (size_t)15U);
 1273|  3.84k|    return v;
 1274|  3.84k|}
libcrux_ml_kem_vector_portable_ntt_layer_1_step_0d:
 1284|  3.84k|{
 1285|  3.84k|    return libcrux_ml_kem_vector_portable_ntt_ntt_layer_1_step(a, zeta0, zeta1,
 1286|  3.84k|                                                               zeta2, zeta3);
 1287|  3.84k|}
libcrux_ml_kem_vector_portable_ntt_ntt_layer_2_step:
 1293|  3.84k|{
 1294|  3.84k|    libcrux_ml_kem_vector_portable_ntt_ntt_step(&v, zeta0, (size_t)0U,
 1295|  3.84k|                                                (size_t)4U);
 1296|  3.84k|    libcrux_ml_kem_vector_portable_ntt_ntt_step(&v, zeta0, (size_t)1U,
 1297|  3.84k|                                                (size_t)5U);
 1298|  3.84k|    libcrux_ml_kem_vector_portable_ntt_ntt_step(&v, zeta0, (size_t)2U,
 1299|  3.84k|                                                (size_t)6U);
 1300|  3.84k|    libcrux_ml_kem_vector_portable_ntt_ntt_step(&v, zeta0, (size_t)3U,
 1301|  3.84k|                                                (size_t)7U);
 1302|  3.84k|    libcrux_ml_kem_vector_portable_ntt_ntt_step(&v, zeta1, (size_t)8U,
 1303|  3.84k|                                                (size_t)12U);
 1304|  3.84k|    libcrux_ml_kem_vector_portable_ntt_ntt_step(&v, zeta1, (size_t)9U,
 1305|  3.84k|                                                (size_t)13U);
 1306|  3.84k|    libcrux_ml_kem_vector_portable_ntt_ntt_step(&v, zeta1, (size_t)10U,
 1307|  3.84k|                                                (size_t)14U);
 1308|  3.84k|    libcrux_ml_kem_vector_portable_ntt_ntt_step(&v, zeta1, (size_t)11U,
 1309|  3.84k|                                                (size_t)15U);
 1310|  3.84k|    return v;
 1311|  3.84k|}
libcrux_ml_kem_vector_portable_ntt_layer_2_step_0d:
 1321|  3.84k|{
 1322|  3.84k|    return libcrux_ml_kem_vector_portable_ntt_ntt_layer_2_step(a, zeta0, zeta1);
 1323|  3.84k|}
libcrux_ml_kem_vector_portable_ntt_ntt_layer_3_step:
 1328|  3.84k|{
 1329|  3.84k|    libcrux_ml_kem_vector_portable_ntt_ntt_step(&v, zeta, (size_t)0U, (size_t)8U);
 1330|  3.84k|    libcrux_ml_kem_vector_portable_ntt_ntt_step(&v, zeta, (size_t)1U, (size_t)9U);
 1331|  3.84k|    libcrux_ml_kem_vector_portable_ntt_ntt_step(&v, zeta, (size_t)2U,
 1332|  3.84k|                                                (size_t)10U);
 1333|  3.84k|    libcrux_ml_kem_vector_portable_ntt_ntt_step(&v, zeta, (size_t)3U,
 1334|  3.84k|                                                (size_t)11U);
 1335|  3.84k|    libcrux_ml_kem_vector_portable_ntt_ntt_step(&v, zeta, (size_t)4U,
 1336|  3.84k|                                                (size_t)12U);
 1337|  3.84k|    libcrux_ml_kem_vector_portable_ntt_ntt_step(&v, zeta, (size_t)5U,
 1338|  3.84k|                                                (size_t)13U);
 1339|  3.84k|    libcrux_ml_kem_vector_portable_ntt_ntt_step(&v, zeta, (size_t)6U,
 1340|  3.84k|                                                (size_t)14U);
 1341|  3.84k|    libcrux_ml_kem_vector_portable_ntt_ntt_step(&v, zeta, (size_t)7U,
 1342|  3.84k|                                                (size_t)15U);
 1343|  3.84k|    return v;
 1344|  3.84k|}
libcrux_ml_kem_vector_portable_ntt_layer_3_step_0d:
 1353|  3.84k|{
 1354|  3.84k|    return libcrux_ml_kem_vector_portable_ntt_ntt_layer_3_step(a, zeta);
 1355|  3.84k|}
libcrux_ml_kem_vector_portable_ntt_ntt_multiply_binomials:
 1507|  46.0k|{
 1508|  46.0k|    int16_t o0 = libcrux_ml_kem_vector_portable_arithmetic_montgomery_reduce_element(
 1509|  46.0k|        (int32_t)a->elements[i] * (int32_t)b->elements[i] +
 1510|  46.0k|        (int32_t)
 1511|  46.0k|                libcrux_ml_kem_vector_portable_arithmetic_montgomery_reduce_element(
 1512|  46.0k|                    (int32_t)a->elements[j] * (int32_t)b->elements[j]) *
 1513|  46.0k|            (int32_t)zeta);
 1514|  46.0k|    int16_t o1 =
 1515|  46.0k|        libcrux_ml_kem_vector_portable_arithmetic_montgomery_reduce_element(
 1516|  46.0k|            (int32_t)a->elements[i] * (int32_t)b->elements[j] +
 1517|  46.0k|            (int32_t)a->elements[j] * (int32_t)b->elements[i]);
 1518|  46.0k|    out->elements[i] = o0;
 1519|  46.0k|    out->elements[j] = o1;
 1520|  46.0k|}
libcrux_ml_kem_vector_portable_ntt_ntt_multiply:
 1527|  5.76k|{
 1528|  5.76k|    libcrux_ml_kem_vector_portable_vector_type_PortableVector out =
 1529|  5.76k|        libcrux_ml_kem_vector_portable_vector_type_zero();
 1530|  5.76k|    libcrux_ml_kem_vector_portable_ntt_ntt_multiply_binomials(
 1531|  5.76k|        lhs, rhs, zeta0, (size_t)0U, (size_t)1U, &out);
 1532|  5.76k|    libcrux_ml_kem_vector_portable_ntt_ntt_multiply_binomials(
 1533|  5.76k|        lhs, rhs, -zeta0, (size_t)2U, (size_t)3U, &out);
 1534|  5.76k|    libcrux_ml_kem_vector_portable_ntt_ntt_multiply_binomials(
 1535|  5.76k|        lhs, rhs, zeta1, (size_t)4U, (size_t)5U, &out);
 1536|  5.76k|    libcrux_ml_kem_vector_portable_ntt_ntt_multiply_binomials(
 1537|  5.76k|        lhs, rhs, -zeta1, (size_t)6U, (size_t)7U, &out);
 1538|  5.76k|    libcrux_ml_kem_vector_portable_ntt_ntt_multiply_binomials(
 1539|  5.76k|        lhs, rhs, zeta2, (size_t)8U, (size_t)9U, &out);
 1540|  5.76k|    libcrux_ml_kem_vector_portable_ntt_ntt_multiply_binomials(
 1541|  5.76k|        lhs, rhs, -zeta2, (size_t)10U, (size_t)11U, &out);
 1542|  5.76k|    libcrux_ml_kem_vector_portable_ntt_ntt_multiply_binomials(
 1543|  5.76k|        lhs, rhs, zeta3, (size_t)12U, (size_t)13U, &out);
 1544|  5.76k|    libcrux_ml_kem_vector_portable_ntt_ntt_multiply_binomials(
 1545|  5.76k|        lhs, rhs, -zeta3, (size_t)14U, (size_t)15U, &out);
 1546|  5.76k|    return out;
 1547|  5.76k|}
libcrux_ml_kem_vector_portable_ntt_multiply_0d:
 1558|  5.76k|{
 1559|  5.76k|    return libcrux_ml_kem_vector_portable_ntt_ntt_multiply(lhs, rhs, zeta0, zeta1,
 1560|  5.76k|                                                           zeta2, zeta3);
 1561|  5.76k|}
libcrux_ml_kem_vector_portable_serialize_serialize_12_int:
 2112|  30.7k|{
 2113|  30.7k|    uint8_t r0 =
 2114|  30.7k|        (uint8_t)(Eurydice_slice_index(v, (size_t)0U, int16_t, int16_t *) &
  ------------------
  |  |   57|  30.7k|#define Eurydice_slice_index(s, i, t, t_ptr_t) (((t_ptr_t)s.ptr)[i])
  ------------------
 2115|  30.7k|                  (int16_t)255);
 2116|  30.7k|    uint8_t r1 =
 2117|  30.7k|        (uint8_t)(Eurydice_slice_index(v, (size_t)0U, int16_t, int16_t *) >> 8U |
  ------------------
  |  |   57|  30.7k|#define Eurydice_slice_index(s, i, t, t_ptr_t) (((t_ptr_t)s.ptr)[i])
  ------------------
 2118|  30.7k|                  (Eurydice_slice_index(v, (size_t)1U, int16_t, int16_t *) &
  ------------------
  |  |   57|  30.7k|#define Eurydice_slice_index(s, i, t, t_ptr_t) (((t_ptr_t)s.ptr)[i])
  ------------------
 2119|  30.7k|                   (int16_t)15)
 2120|  30.7k|                      << 4U);
 2121|  30.7k|    uint8_t r2 =
 2122|  30.7k|        (uint8_t)(Eurydice_slice_index(v, (size_t)1U, int16_t, int16_t *) >> 4U &
  ------------------
  |  |   57|  30.7k|#define Eurydice_slice_index(s, i, t, t_ptr_t) (((t_ptr_t)s.ptr)[i])
  ------------------
 2123|  30.7k|                  (int16_t)255);
 2124|  30.7k|    return (CLITERAL(uint8_t_x3){ .fst = r0, .snd = r1, .thd = r2 });
  ------------------
  |  |   27|  30.7k|#define CLITERAL(type) (type)
  ------------------
 2125|  30.7k|}
libcrux_ml_kem_vector_portable_serialize_serialize_12:
 2131|  3.84k|{
 2132|  3.84k|    uint8_t_x3 r0_2 = libcrux_ml_kem_vector_portable_serialize_serialize_12_int(
 2133|  3.84k|        Eurydice_array_to_subslice2(v.elements, (size_t)0U, (size_t)2U, int16_t));
  ------------------
  |  |   75|  3.84k|    EURYDICE_SLICE((t *)x, start, end)
  |  |  ------------------
  |  |  |  |   50|  3.84k|    (CLITERAL(Eurydice_slice){ .ptr = (void *)(x + start), .len = end - start })
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.84k|#define CLITERAL(type) (type)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2134|  3.84k|    uint8_t_x3 r3_5 = libcrux_ml_kem_vector_portable_serialize_serialize_12_int(
 2135|  3.84k|        Eurydice_array_to_subslice2(v.elements, (size_t)2U, (size_t)4U, int16_t));
  ------------------
  |  |   75|  3.84k|    EURYDICE_SLICE((t *)x, start, end)
  |  |  ------------------
  |  |  |  |   50|  3.84k|    (CLITERAL(Eurydice_slice){ .ptr = (void *)(x + start), .len = end - start })
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.84k|#define CLITERAL(type) (type)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2136|  3.84k|    uint8_t_x3 r6_8 = libcrux_ml_kem_vector_portable_serialize_serialize_12_int(
 2137|  3.84k|        Eurydice_array_to_subslice2(v.elements, (size_t)4U, (size_t)6U, int16_t));
  ------------------
  |  |   75|  3.84k|    EURYDICE_SLICE((t *)x, start, end)
  |  |  ------------------
  |  |  |  |   50|  3.84k|    (CLITERAL(Eurydice_slice){ .ptr = (void *)(x + start), .len = end - start })
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.84k|#define CLITERAL(type) (type)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2138|  3.84k|    uint8_t_x3 r9_11 = libcrux_ml_kem_vector_portable_serialize_serialize_12_int(
 2139|  3.84k|        Eurydice_array_to_subslice2(v.elements, (size_t)6U, (size_t)8U, int16_t));
  ------------------
  |  |   75|  3.84k|    EURYDICE_SLICE((t *)x, start, end)
  |  |  ------------------
  |  |  |  |   50|  3.84k|    (CLITERAL(Eurydice_slice){ .ptr = (void *)(x + start), .len = end - start })
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.84k|#define CLITERAL(type) (type)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2140|  3.84k|    uint8_t_x3 r12_14 = libcrux_ml_kem_vector_portable_serialize_serialize_12_int(
 2141|  3.84k|        Eurydice_array_to_subslice2(v.elements, (size_t)8U, (size_t)10U,
  ------------------
  |  |   75|  3.84k|    EURYDICE_SLICE((t *)x, start, end)
  |  |  ------------------
  |  |  |  |   50|  3.84k|    (CLITERAL(Eurydice_slice){ .ptr = (void *)(x + start), .len = end - start })
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.84k|#define CLITERAL(type) (type)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2142|  3.84k|                                    int16_t));
 2143|  3.84k|    uint8_t_x3 r15_17 = libcrux_ml_kem_vector_portable_serialize_serialize_12_int(
 2144|  3.84k|        Eurydice_array_to_subslice2(v.elements, (size_t)10U, (size_t)12U,
  ------------------
  |  |   75|  3.84k|    EURYDICE_SLICE((t *)x, start, end)
  |  |  ------------------
  |  |  |  |   50|  3.84k|    (CLITERAL(Eurydice_slice){ .ptr = (void *)(x + start), .len = end - start })
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.84k|#define CLITERAL(type) (type)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2145|  3.84k|                                    int16_t));
 2146|  3.84k|    uint8_t_x3 r18_20 = libcrux_ml_kem_vector_portable_serialize_serialize_12_int(
 2147|  3.84k|        Eurydice_array_to_subslice2(v.elements, (size_t)12U, (size_t)14U,
  ------------------
  |  |   75|  3.84k|    EURYDICE_SLICE((t *)x, start, end)
  |  |  ------------------
  |  |  |  |   50|  3.84k|    (CLITERAL(Eurydice_slice){ .ptr = (void *)(x + start), .len = end - start })
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.84k|#define CLITERAL(type) (type)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2148|  3.84k|                                    int16_t));
 2149|  3.84k|    uint8_t_x3 r21_23 = libcrux_ml_kem_vector_portable_serialize_serialize_12_int(
 2150|  3.84k|        Eurydice_array_to_subslice2(v.elements, (size_t)14U, (size_t)16U,
  ------------------
  |  |   75|  3.84k|    EURYDICE_SLICE((t *)x, start, end)
  |  |  ------------------
  |  |  |  |   50|  3.84k|    (CLITERAL(Eurydice_slice){ .ptr = (void *)(x + start), .len = end - start })
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.84k|#define CLITERAL(type) (type)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2151|  3.84k|                                    int16_t));
 2152|  3.84k|    uint8_t result[24U] = { 0U };
 2153|  3.84k|    result[0U] = r0_2.fst;
 2154|  3.84k|    result[1U] = r0_2.snd;
 2155|  3.84k|    result[2U] = r0_2.thd;
 2156|  3.84k|    result[3U] = r3_5.fst;
 2157|  3.84k|    result[4U] = r3_5.snd;
 2158|  3.84k|    result[5U] = r3_5.thd;
 2159|  3.84k|    result[6U] = r6_8.fst;
 2160|  3.84k|    result[7U] = r6_8.snd;
 2161|  3.84k|    result[8U] = r6_8.thd;
 2162|  3.84k|    result[9U] = r9_11.fst;
 2163|  3.84k|    result[10U] = r9_11.snd;
 2164|  3.84k|    result[11U] = r9_11.thd;
 2165|  3.84k|    result[12U] = r12_14.fst;
 2166|  3.84k|    result[13U] = r12_14.snd;
 2167|  3.84k|    result[14U] = r12_14.thd;
 2168|  3.84k|    result[15U] = r15_17.fst;
 2169|  3.84k|    result[16U] = r15_17.snd;
 2170|  3.84k|    result[17U] = r15_17.thd;
 2171|  3.84k|    result[18U] = r18_20.fst;
 2172|  3.84k|    result[19U] = r18_20.snd;
 2173|  3.84k|    result[20U] = r18_20.thd;
 2174|  3.84k|    result[21U] = r21_23.fst;
 2175|  3.84k|    result[22U] = r21_23.snd;
 2176|  3.84k|    result[23U] = r21_23.thd;
 2177|  3.84k|    memcpy(ret, result, (size_t)24U * sizeof(uint8_t));
 2178|  3.84k|}
libcrux_ml_kem_vector_portable_serialize_12_0d:
 2188|  3.84k|{
 2189|  3.84k|    libcrux_ml_kem_vector_portable_serialize_serialize_12(a, ret);
 2190|  3.84k|}
libcrux_ml_kem_vector_portable_sampling_rej_sample:
 2263|  7.22k|{
 2264|  7.22k|    size_t sampled = (size_t)0U;
 2265|  64.9k|    for (size_t i = (size_t)0U; i < Eurydice_slice_len(a, uint8_t) / (size_t)3U;
  ------------------
  |  |   82|  64.9k|#define Eurydice_slice_len(s, t) EURYDICE_SLICE_LEN(s, t)
  |  |  ------------------
  |  |  |  |   51|  64.9k|#define EURYDICE_SLICE_LEN(s, _) s.len
  |  |  ------------------
  ------------------
  |  Branch (2265:33): [True: 57.7k, False: 7.22k]
  ------------------
 2266|  57.7k|         i++) {
 2267|  57.7k|        size_t i0 = i;
 2268|  57.7k|        int16_t b1 = (int16_t)Eurydice_slice_index(a, i0 * (size_t)3U + (size_t)0U,
  ------------------
  |  |   57|  57.7k|#define Eurydice_slice_index(s, i, t, t_ptr_t) (((t_ptr_t)s.ptr)[i])
  ------------------
 2269|  57.7k|                                                   uint8_t, uint8_t *);
 2270|  57.7k|        int16_t b2 = (int16_t)Eurydice_slice_index(a, i0 * (size_t)3U + (size_t)1U,
  ------------------
  |  |   57|  57.7k|#define Eurydice_slice_index(s, i, t, t_ptr_t) (((t_ptr_t)s.ptr)[i])
  ------------------
 2271|  57.7k|                                                   uint8_t, uint8_t *);
 2272|  57.7k|        int16_t b3 = (int16_t)Eurydice_slice_index(a, i0 * (size_t)3U + (size_t)2U,
  ------------------
  |  |   57|  57.7k|#define Eurydice_slice_index(s, i, t, t_ptr_t) (((t_ptr_t)s.ptr)[i])
  ------------------
 2273|  57.7k|                                                   uint8_t, uint8_t *);
 2274|  57.7k|        int16_t d1 = (b2 & (int16_t)15) << 8U | b1;
 2275|  57.7k|        int16_t d2 = b3 << 4U | b2 >> 4U;
 2276|  57.7k|        bool uu____0;
 2277|  57.7k|        int16_t uu____1;
 2278|  57.7k|        bool uu____2;
 2279|  57.7k|        size_t uu____3;
 2280|  57.7k|        int16_t uu____4;
 2281|  57.7k|        size_t uu____5;
 2282|  57.7k|        int16_t uu____6;
 2283|  57.7k|        if (d1 < LIBCRUX_ML_KEM_VECTOR_TRAITS_FIELD_MODULUS) {
  ------------------
  |  |   34|  57.7k|#define LIBCRUX_ML_KEM_VECTOR_TRAITS_FIELD_MODULUS ((int16_t)3329)
  ------------------
  |  Branch (2283:13): [True: 47.0k, False: 10.7k]
  ------------------
 2284|  47.0k|            if (sampled < (size_t)16U) {
  ------------------
  |  Branch (2284:17): [True: 47.0k, False: 0]
  ------------------
 2285|  47.0k|                Eurydice_slice_index(result, sampled, int16_t, int16_t *) = d1;
  ------------------
  |  |   57|  47.0k|#define Eurydice_slice_index(s, i, t, t_ptr_t) (((t_ptr_t)s.ptr)[i])
  ------------------
 2286|  47.0k|                sampled++;
 2287|  47.0k|                uu____1 = d2;
 2288|  47.0k|                uu____6 = LIBCRUX_ML_KEM_VECTOR_TRAITS_FIELD_MODULUS;
  ------------------
  |  |   34|  47.0k|#define LIBCRUX_ML_KEM_VECTOR_TRAITS_FIELD_MODULUS ((int16_t)3329)
  ------------------
 2289|  47.0k|                uu____0 = uu____1 < uu____6;
 2290|  47.0k|                if (uu____0) {
  ------------------
  |  Branch (2290:21): [True: 38.4k, False: 8.61k]
  ------------------
 2291|  38.4k|                    uu____3 = sampled;
 2292|  38.4k|                    uu____2 = uu____3 < (size_t)16U;
 2293|  38.4k|                    if (uu____2) {
  ------------------
  |  Branch (2293:25): [True: 38.4k, False: 0]
  ------------------
 2294|  38.4k|                        uu____4 = d2;
 2295|  38.4k|                        uu____5 = sampled;
 2296|  38.4k|                        Eurydice_slice_index(result, uu____5, int16_t, int16_t *) = uu____4;
  ------------------
  |  |   57|  38.4k|#define Eurydice_slice_index(s, i, t, t_ptr_t) (((t_ptr_t)s.ptr)[i])
  ------------------
 2297|  38.4k|                        sampled++;
 2298|  38.4k|                        continue;
 2299|  38.4k|                    }
 2300|  38.4k|                }
 2301|  8.61k|                continue;
 2302|  47.0k|            }
 2303|  47.0k|        }
 2304|  10.7k|        uu____1 = d2;
 2305|  10.7k|        uu____6 = LIBCRUX_ML_KEM_VECTOR_TRAITS_FIELD_MODULUS;
  ------------------
  |  |   34|  10.7k|#define LIBCRUX_ML_KEM_VECTOR_TRAITS_FIELD_MODULUS ((int16_t)3329)
  ------------------
 2306|  10.7k|        uu____0 = uu____1 < uu____6;
 2307|  10.7k|        if (uu____0) {
  ------------------
  |  Branch (2307:13): [True: 8.73k, False: 1.98k]
  ------------------
 2308|  8.73k|            uu____3 = sampled;
 2309|  8.73k|            uu____2 = uu____3 < (size_t)16U;
 2310|  8.73k|            if (uu____2) {
  ------------------
  |  Branch (2310:17): [True: 8.73k, False: 0]
  ------------------
 2311|  8.73k|                uu____4 = d2;
 2312|  8.73k|                uu____5 = sampled;
 2313|  8.73k|                Eurydice_slice_index(result, uu____5, int16_t, int16_t *) = uu____4;
  ------------------
  |  |   57|  8.73k|#define Eurydice_slice_index(s, i, t, t_ptr_t) (((t_ptr_t)s.ptr)[i])
  ------------------
 2314|  8.73k|                sampled++;
 2315|  8.73k|                continue;
 2316|  8.73k|            }
 2317|  8.73k|        }
 2318|  10.7k|    }
 2319|  7.22k|    return sampled;
 2320|  7.22k|}
libcrux_ml_kem_vector_portable_rej_sample_0d:
 2329|  7.22k|{
 2330|  7.22k|    return libcrux_ml_kem_vector_portable_sampling_rej_sample(a, out);
 2331|  7.22k|}
libcrux_ml_kem_ind_cca_generate_keypair_f6:
 8518|     40|{
 8519|     40|    Eurydice_slice ind_cpa_keypair_randomness = Eurydice_array_to_subslice2(
  ------------------
  |  |   75|     40|    EURYDICE_SLICE((t *)x, start, end)
  |  |  ------------------
  |  |  |  |   50|     40|    (CLITERAL(Eurydice_slice){ .ptr = (void *)(x + start), .len = end - start })
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     40|#define CLITERAL(type) (type)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8520|     40|        randomness, (size_t)0U,
 8521|     40|        LIBCRUX_ML_KEM_CONSTANTS_CPA_PKE_KEY_GENERATION_SEED_SIZE, uint8_t);
 8522|     40|    Eurydice_slice implicit_rejection_value = Eurydice_array_to_subslice_from(
  ------------------
  |  |   79|     40|    EURYDICE_SLICE((t *)x, r, size)
  |  |  ------------------
  |  |  |  |   50|     40|    (CLITERAL(Eurydice_slice){ .ptr = (void *)(x + start), .len = end - start })
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     40|#define CLITERAL(type) (type)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8523|     40|        (size_t)64U, randomness,
 8524|     40|        LIBCRUX_ML_KEM_CONSTANTS_CPA_PKE_KEY_GENERATION_SEED_SIZE, uint8_t,
 8525|     40|        size_t);
 8526|     40|    libcrux_ml_kem_utils_extraction_helper_Keypair768 uu____0 =
 8527|     40|        generate_keypair_a2(ind_cpa_keypair_randomness);
 8528|     40|    uint8_t ind_cpa_private_key[1152U];
 8529|     40|    memcpy(ind_cpa_private_key, uu____0.fst, (size_t)1152U * sizeof(uint8_t));
 8530|     40|    uint8_t public_key[1184U];
 8531|     40|    memcpy(public_key, uu____0.snd, (size_t)1184U * sizeof(uint8_t));
 8532|     40|    uint8_t secret_key_serialized[2400U];
 8533|     40|    serialize_kem_secret_key_5d(
 8534|     40|        Eurydice_array_to_slice((size_t)1152U, ind_cpa_private_key, uint8_t),
  ------------------
  |  |   69|     40|    EURYDICE_SLICE(x, 0,                   \
  |  |  ------------------
  |  |  |  |   50|     40|    (CLITERAL(Eurydice_slice){ .ptr = (void *)(x + start), .len = end - start })
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     40|#define CLITERAL(type) (type)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   70|     40|                   end) /* x is already at an array type, no need for cast */
  ------------------
 8535|     40|        Eurydice_array_to_slice((size_t)1184U, public_key, uint8_t),
  ------------------
  |  |   69|     40|    EURYDICE_SLICE(x, 0,                   \
  |  |  ------------------
  |  |  |  |   50|     40|    (CLITERAL(Eurydice_slice){ .ptr = (void *)(x + start), .len = end - start })
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     40|#define CLITERAL(type) (type)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   70|     40|                   end) /* x is already at an array type, no need for cast */
  ------------------
 8536|     40|        implicit_rejection_value, secret_key_serialized);
 8537|       |    /* Passing arrays by value in Rust generates a copy in C */
 8538|     40|    uint8_t copy_of_secret_key_serialized[2400U];
 8539|     40|    memcpy(copy_of_secret_key_serialized, secret_key_serialized,
 8540|     40|           (size_t)2400U * sizeof(uint8_t));
 8541|     40|    libcrux_ml_kem_types_MlKemPrivateKey_55 private_key =
 8542|     40|        libcrux_ml_kem_types_from_05_890(copy_of_secret_key_serialized);
 8543|     40|    libcrux_ml_kem_types_MlKemPrivateKey_55 uu____2 = private_key;
 8544|       |    /* Passing arrays by value in Rust generates a copy in C */
 8545|     40|    uint8_t copy_of_public_key[1184U];
 8546|     40|    memcpy(copy_of_public_key, public_key, (size_t)1184U * sizeof(uint8_t));
 8547|     40|    return libcrux_ml_kem_types_from_17_820(
 8548|     40|        uu____2, libcrux_ml_kem_types_from_b6_960(copy_of_public_key));
 8549|     40|}
libcrux_mlkem_portable.c:ZERO_89_c3:
 2356|  1.68k|{
 2357|  1.68k|    libcrux_ml_kem_polynomial_PolynomialRingElement_f0 lit;
 2358|  1.68k|    lit.coefficients[0U] = libcrux_ml_kem_vector_portable_ZERO_0d();
 2359|  1.68k|    lit.coefficients[1U] = libcrux_ml_kem_vector_portable_ZERO_0d();
 2360|  1.68k|    lit.coefficients[2U] = libcrux_ml_kem_vector_portable_ZERO_0d();
 2361|  1.68k|    lit.coefficients[3U] = libcrux_ml_kem_vector_portable_ZERO_0d();
 2362|  1.68k|    lit.coefficients[4U] = libcrux_ml_kem_vector_portable_ZERO_0d();
 2363|  1.68k|    lit.coefficients[5U] = libcrux_ml_kem_vector_portable_ZERO_0d();
 2364|  1.68k|    lit.coefficients[6U] = libcrux_ml_kem_vector_portable_ZERO_0d();
 2365|  1.68k|    lit.coefficients[7U] = libcrux_ml_kem_vector_portable_ZERO_0d();
 2366|  1.68k|    lit.coefficients[8U] = libcrux_ml_kem_vector_portable_ZERO_0d();
 2367|  1.68k|    lit.coefficients[9U] = libcrux_ml_kem_vector_portable_ZERO_0d();
 2368|  1.68k|    lit.coefficients[10U] = libcrux_ml_kem_vector_portable_ZERO_0d();
 2369|  1.68k|    lit.coefficients[11U] = libcrux_ml_kem_vector_portable_ZERO_0d();
 2370|  1.68k|    lit.coefficients[12U] = libcrux_ml_kem_vector_portable_ZERO_0d();
 2371|  1.68k|    lit.coefficients[13U] = libcrux_ml_kem_vector_portable_ZERO_0d();
 2372|  1.68k|    lit.coefficients[14U] = libcrux_ml_kem_vector_portable_ZERO_0d();
 2373|  1.68k|    lit.coefficients[15U] = libcrux_ml_kem_vector_portable_ZERO_0d();
 2374|  1.68k|    return lit;
 2375|  1.68k|}
libcrux_mlkem_portable.c:serialize_uncompressed_ring_element_3c:
 2505|    240|{
 2506|    240|    uint8_t serialized[384U] = { 0U };
 2507|    240|    for (size_t i = (size_t)0U;
 2508|  4.08k|         i < LIBCRUX_ML_KEM_POLYNOMIAL_VECTORS_IN_RING_ELEMENT; i++) {
  ------------------
  |  |   29|  4.08k|    (LIBCRUX_ML_KEM_CONSTANTS_COEFFICIENTS_IN_RING_ELEMENT / \
  |  |  ------------------
  |  |  |  |   36|  4.08k|#define LIBCRUX_ML_KEM_CONSTANTS_COEFFICIENTS_IN_RING_ELEMENT ((size_t)256U)
  |  |  ------------------
  |  |   30|  4.08k|     LIBCRUX_ML_KEM_VECTOR_TRAITS_FIELD_ELEMENTS_IN_VECTOR)
  |  |  ------------------
  |  |  |  |   32|  4.08k|#define LIBCRUX_ML_KEM_VECTOR_TRAITS_FIELD_ELEMENTS_IN_VECTOR ((size_t)16U)
  |  |  ------------------
  ------------------
  |  Branch (2508:10): [True: 3.84k, False: 240]
  ------------------
 2509|  3.84k|        size_t i0 = i;
 2510|  3.84k|        libcrux_ml_kem_vector_portable_vector_type_PortableVector coefficient =
 2511|  3.84k|            to_unsigned_representative_84(re->coefficients[i0]);
 2512|  3.84k|        uint8_t bytes[24U];
 2513|  3.84k|        libcrux_ml_kem_vector_portable_serialize_12_0d(coefficient, bytes);
 2514|  3.84k|        Eurydice_slice uu____0 = Eurydice_array_to_subslice2(
  ------------------
  |  |   75|  3.84k|    EURYDICE_SLICE((t *)x, start, end)
  |  |  ------------------
  |  |  |  |   50|  3.84k|    (CLITERAL(Eurydice_slice){ .ptr = (void *)(x + start), .len = end - start })
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.84k|#define CLITERAL(type) (type)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2515|  3.84k|            serialized, (size_t)24U * i0, (size_t)24U * i0 + (size_t)24U, uint8_t);
 2516|  3.84k|        Eurydice_slice_copy(
  ------------------
  |  |   84|  3.84k|    memcpy(dst.ptr, src.ptr, dst.len * sizeof(t))
  ------------------
 2517|  3.84k|            uu____0, Eurydice_array_to_slice((size_t)24U, bytes, uint8_t), uint8_t);
 2518|  3.84k|    }
 2519|    240|    memcpy(ret, serialized, (size_t)384U * sizeof(uint8_t));
 2520|    240|}
libcrux_mlkem_portable.c:to_unsigned_representative_84:
 2487|  3.84k|{
 2488|  3.84k|    libcrux_ml_kem_vector_portable_vector_type_PortableVector t =
 2489|  3.84k|        shift_right_0d_01(a);
 2490|  3.84k|    libcrux_ml_kem_vector_portable_vector_type_PortableVector fm =
 2491|  3.84k|        libcrux_ml_kem_vector_portable_bitwise_and_with_constant_0d(
 2492|  3.84k|            t, LIBCRUX_ML_KEM_VECTOR_TRAITS_FIELD_MODULUS);
  ------------------
  |  |   34|  3.84k|#define LIBCRUX_ML_KEM_VECTOR_TRAITS_FIELD_MODULUS ((int16_t)3329)
  ------------------
 2493|  3.84k|    return libcrux_ml_kem_vector_portable_add_0d(a, &fm);
 2494|  3.84k|}
libcrux_mlkem_portable.c:shift_right_0d_01:
 2474|  3.84k|{
 2475|  3.84k|    return shift_right_b0(v);
 2476|  3.84k|}
libcrux_mlkem_portable.c:shift_right_b0:
 2454|  3.84k|{
 2455|  3.84k|    for (size_t i = (size_t)0U;
 2456|  65.2k|         i < LIBCRUX_ML_KEM_VECTOR_TRAITS_FIELD_ELEMENTS_IN_VECTOR; i++) {
  ------------------
  |  |   32|  65.2k|#define LIBCRUX_ML_KEM_VECTOR_TRAITS_FIELD_ELEMENTS_IN_VECTOR ((size_t)16U)
  ------------------
  |  Branch (2456:10): [True: 61.4k, False: 3.84k]
  ------------------
 2457|  61.4k|        size_t i0 = i;
 2458|  61.4k|        v.elements[i0] = v.elements[i0] >> (uint32_t)(int32_t)15;
 2459|  61.4k|    }
 2460|  3.84k|    return v;
 2461|  3.84k|}
libcrux_mlkem_portable.c:from_i16_array_89_33:
 3030|    600|{
 3031|    600|    libcrux_ml_kem_polynomial_PolynomialRingElement_f0 result = ZERO_89_c3();
 3032|    600|    for (size_t i = (size_t)0U;
 3033|  10.2k|         i < LIBCRUX_ML_KEM_POLYNOMIAL_VECTORS_IN_RING_ELEMENT; i++) {
  ------------------
  |  |   29|  10.2k|    (LIBCRUX_ML_KEM_CONSTANTS_COEFFICIENTS_IN_RING_ELEMENT / \
  |  |  ------------------
  |  |  |  |   36|  10.2k|#define LIBCRUX_ML_KEM_CONSTANTS_COEFFICIENTS_IN_RING_ELEMENT ((size_t)256U)
  |  |  ------------------
  |  |   30|  10.2k|     LIBCRUX_ML_KEM_VECTOR_TRAITS_FIELD_ELEMENTS_IN_VECTOR)
  |  |  ------------------
  |  |  |  |   32|  10.2k|#define LIBCRUX_ML_KEM_VECTOR_TRAITS_FIELD_ELEMENTS_IN_VECTOR ((size_t)16U)
  |  |  ------------------
  ------------------
  |  Branch (3033:10): [True: 9.60k, False: 600]
  ------------------
 3034|  9.60k|        size_t i0 = i;
 3035|  9.60k|        libcrux_ml_kem_vector_portable_vector_type_PortableVector uu____0 =
 3036|  9.60k|            libcrux_ml_kem_vector_portable_from_i16_array_0d(
 3037|  9.60k|                Eurydice_slice_subslice2(a, i0 * (size_t)16U,
  ------------------
  |  |   63|  9.60k|    EURYDICE_SLICE((t *)s.ptr, start, end)
  |  |  ------------------
  |  |  |  |   50|  9.60k|    (CLITERAL(Eurydice_slice){ .ptr = (void *)(x + start), .len = end - start })
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  9.60k|#define CLITERAL(type) (type)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3038|  9.60k|                                         (i0 + (size_t)1U) * (size_t)16U, int16_t));
 3039|  9.60k|        result.coefficients[i0] = uu____0;
 3040|  9.60k|    }
 3041|    600|    return result;
 3042|    600|}
libcrux_mlkem_portable.c:sample_from_binomial_distribution_ca:
 3356|    240|{
 3357|    240|    return sample_from_binomial_distribution_2_7b(randomness);
 3358|    240|}
libcrux_mlkem_portable.c:sample_from_binomial_distribution_2_7b:
 3265|    240|{
 3266|    240|    int16_t sampled_i16s[256U] = { 0U };
 3267|    240|    for (size_t i0 = (size_t)0U;
 3268|  7.92k|         i0 < Eurydice_slice_len(randomness, uint8_t) / (size_t)4U; i0++) {
  ------------------
  |  |   82|  7.92k|#define Eurydice_slice_len(s, t) EURYDICE_SLICE_LEN(s, t)
  |  |  ------------------
  |  |  |  |   51|  7.92k|#define EURYDICE_SLICE_LEN(s, _) s.len
  |  |  ------------------
  ------------------
  |  Branch (3268:10): [True: 7.68k, False: 240]
  ------------------
 3269|  7.68k|        size_t chunk_number = i0;
 3270|  7.68k|        Eurydice_slice byte_chunk = Eurydice_slice_subslice2(
  ------------------
  |  |   63|  7.68k|    EURYDICE_SLICE((t *)s.ptr, start, end)
  |  |  ------------------
  |  |  |  |   50|  7.68k|    (CLITERAL(Eurydice_slice){ .ptr = (void *)(x + start), .len = end - start })
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  7.68k|#define CLITERAL(type) (type)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3271|  7.68k|            randomness, chunk_number * (size_t)4U,
 3272|  7.68k|            chunk_number * (size_t)4U + (size_t)4U, uint8_t);
 3273|  7.68k|        uint32_t random_bits_as_u32 =
 3274|  7.68k|            (((uint32_t)Eurydice_slice_index(byte_chunk, (size_t)0U, uint8_t,
  ------------------
  |  |   57|  7.68k|#define Eurydice_slice_index(s, i, t, t_ptr_t) (((t_ptr_t)s.ptr)[i])
  ------------------
 3275|  7.68k|                                             uint8_t *) |
 3276|  7.68k|              (uint32_t)Eurydice_slice_index(byte_chunk, (size_t)1U, uint8_t,
  ------------------
  |  |   57|  7.68k|#define Eurydice_slice_index(s, i, t, t_ptr_t) (((t_ptr_t)s.ptr)[i])
  ------------------
 3277|  7.68k|                                             uint8_t *)
 3278|  7.68k|                  << 8U) |
 3279|  7.68k|             (uint32_t)Eurydice_slice_index(byte_chunk, (size_t)2U, uint8_t,
  ------------------
  |  |   57|  7.68k|#define Eurydice_slice_index(s, i, t, t_ptr_t) (((t_ptr_t)s.ptr)[i])
  ------------------
 3280|  7.68k|                                            uint8_t *)
 3281|  7.68k|                 << 16U) |
 3282|  7.68k|            (uint32_t)Eurydice_slice_index(byte_chunk, (size_t)3U, uint8_t,
  ------------------
  |  |   57|  7.68k|#define Eurydice_slice_index(s, i, t, t_ptr_t) (((t_ptr_t)s.ptr)[i])
  ------------------
 3283|  7.68k|                                           uint8_t *)
 3284|  7.68k|                << 24U;
 3285|  7.68k|        uint32_t even_bits = random_bits_as_u32 & 1431655765U;
 3286|  7.68k|        uint32_t odd_bits = random_bits_as_u32 >> 1U & 1431655765U;
 3287|  7.68k|        uint32_t coin_toss_outcomes = even_bits + odd_bits;
 3288|  69.1k|        for (uint32_t i = 0U; i < CORE_NUM__U32_8__BITS / 4U; i++) {
  ------------------
  |  |   24|  69.1k|#define CORE_NUM__U32_8__BITS (32U)
  ------------------
  |  Branch (3288:31): [True: 61.4k, False: 7.68k]
  ------------------
 3289|  61.4k|            uint32_t outcome_set = i;
 3290|  61.4k|            uint32_t outcome_set0 = outcome_set * 4U;
 3291|  61.4k|            int16_t outcome_1 =
 3292|  61.4k|                (int16_t)(coin_toss_outcomes >> (uint32_t)outcome_set0 & 3U);
 3293|  61.4k|            int16_t outcome_2 =
 3294|  61.4k|                (int16_t)(coin_toss_outcomes >> (uint32_t)(outcome_set0 + 2U) & 3U);
 3295|  61.4k|            size_t offset = (size_t)(outcome_set0 >> 2U);
 3296|  61.4k|            sampled_i16s[(size_t)8U * chunk_number + offset] = outcome_1 - outcome_2;
 3297|  61.4k|        }
 3298|  7.68k|    }
 3299|    240|    return from_i16_array_89_33(
 3300|    240|        Eurydice_array_to_slice((size_t)256U, sampled_i16s, int16_t));
  ------------------
  |  |   69|    240|    EURYDICE_SLICE(x, 0,                   \
  |  |  ------------------
  |  |  |  |   50|    240|    (CLITERAL(Eurydice_slice){ .ptr = (void *)(x + start), .len = end - start })
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|    240|#define CLITERAL(type) (type)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   70|    240|                   end) /* x is already at an array type, no need for cast */
  ------------------
 3301|    240|}
libcrux_mlkem_portable.c:ntt_binomially_sampled_ring_element_63:
 3558|    240|{
 3559|    240|    ntt_at_layer_7_60(re);
 3560|    240|    size_t zeta_i = (size_t)1U;
 3561|    240|    ntt_at_layer_4_plus_8c(&zeta_i, re, (size_t)6U);
 3562|    240|    ntt_at_layer_4_plus_8c(&zeta_i, re, (size_t)5U);
 3563|    240|    ntt_at_layer_4_plus_8c(&zeta_i, re, (size_t)4U);
 3564|    240|    ntt_at_layer_3_34(&zeta_i, re);
 3565|    240|    ntt_at_layer_2_26(&zeta_i, re);
 3566|    240|    ntt_at_layer_1_3c(&zeta_i, re);
 3567|    240|    poly_barrett_reduce_89_d8(re);
 3568|    240|}
libcrux_mlkem_portable.c:ntt_at_layer_7_60:
 3369|    240|{
 3370|    240|    size_t step = LIBCRUX_ML_KEM_POLYNOMIAL_VECTORS_IN_RING_ELEMENT / (size_t)2U;
  ------------------
  |  |   29|    240|    (LIBCRUX_ML_KEM_CONSTANTS_COEFFICIENTS_IN_RING_ELEMENT / \
  |  |  ------------------
  |  |  |  |   36|    240|#define LIBCRUX_ML_KEM_CONSTANTS_COEFFICIENTS_IN_RING_ELEMENT ((size_t)256U)
  |  |  ------------------
  |  |   30|    240|     LIBCRUX_ML_KEM_VECTOR_TRAITS_FIELD_ELEMENTS_IN_VECTOR)
  |  |  ------------------
  |  |  |  |   32|    240|#define LIBCRUX_ML_KEM_VECTOR_TRAITS_FIELD_ELEMENTS_IN_VECTOR ((size_t)16U)
  |  |  ------------------
  ------------------
 3371|  2.16k|    for (size_t i = (size_t)0U; i < step; i++) {
  ------------------
  |  Branch (3371:33): [True: 1.92k, False: 240]
  ------------------
 3372|  1.92k|        size_t j = i;
 3373|  1.92k|        libcrux_ml_kem_vector_portable_vector_type_PortableVector t =
 3374|  1.92k|            libcrux_ml_kem_vector_portable_multiply_by_constant_0d(
 3375|  1.92k|                re->coefficients[j + step], (int16_t)-1600);
 3376|  1.92k|        re->coefficients[j + step] =
 3377|  1.92k|            libcrux_ml_kem_vector_portable_sub_0d(re->coefficients[j], &t);
 3378|  1.92k|        libcrux_ml_kem_vector_portable_vector_type_PortableVector uu____1 =
 3379|  1.92k|            libcrux_ml_kem_vector_portable_add_0d(re->coefficients[j], &t);
 3380|  1.92k|        re->coefficients[j] = uu____1;
 3381|  1.92k|    }
 3382|    240|}
libcrux_mlkem_portable.c:ntt_at_layer_4_plus_8c:
 3435|    720|{
 3436|    720|    size_t step = (size_t)1U << (uint32_t)layer;
 3437|  4.08k|    for (size_t i0 = (size_t)0U; i0 < (size_t)128U >> (uint32_t)layer; i0++) {
  ------------------
  |  Branch (3437:34): [True: 3.36k, False: 720]
  ------------------
 3438|  3.36k|        size_t round = i0;
 3439|  3.36k|        zeta_i[0U] = zeta_i[0U] + (size_t)1U;
 3440|  3.36k|        size_t offset = round * step * (size_t)2U;
 3441|  3.36k|        size_t offset_vec = offset / (size_t)16U;
 3442|  3.36k|        size_t step_vec = step / (size_t)16U;
 3443|  9.12k|        for (size_t i = offset_vec; i < offset_vec + step_vec; i++) {
  ------------------
  |  Branch (3443:37): [True: 5.76k, False: 3.36k]
  ------------------
 3444|  5.76k|            size_t j = i;
 3445|  5.76k|            libcrux_ml_kem_vector_portable_vector_type_PortableVector_x2 uu____0 =
 3446|  5.76k|                ntt_layer_int_vec_step_88(
 3447|  5.76k|                    re->coefficients[j], re->coefficients[j + step_vec],
 3448|  5.76k|                    libcrux_ml_kem_polynomial_ZETAS_TIMES_MONTGOMERY_R[zeta_i[0U]]);
 3449|  5.76k|            libcrux_ml_kem_vector_portable_vector_type_PortableVector x = uu____0.fst;
 3450|  5.76k|            libcrux_ml_kem_vector_portable_vector_type_PortableVector y = uu____0.snd;
 3451|  5.76k|            re->coefficients[j] = x;
 3452|  5.76k|            re->coefficients[j + step_vec] = y;
 3453|  5.76k|        }
 3454|  3.36k|    }
 3455|    720|}
libcrux_mlkem_portable.c:ntt_layer_int_vec_step_88:
 3415|  5.76k|{
 3416|  5.76k|    libcrux_ml_kem_vector_portable_vector_type_PortableVector t =
 3417|  5.76k|        montgomery_multiply_fe_05(b, zeta_r);
 3418|  5.76k|    b = libcrux_ml_kem_vector_portable_sub_0d(a, &t);
 3419|  5.76k|    a = libcrux_ml_kem_vector_portable_add_0d(a, &t);
 3420|  5.76k|    return (
 3421|  5.76k|        CLITERAL(libcrux_ml_kem_vector_portable_vector_type_PortableVector_x2){
  ------------------
  |  |   27|  5.76k|#define CLITERAL(type) (type)
  ------------------
 3422|  5.76k|            .fst = a, .snd = b });
 3423|  5.76k|}
libcrux_mlkem_portable.c:montgomery_multiply_fe_05:
 3398|  5.76k|{
 3399|  5.76k|    return libcrux_ml_kem_vector_portable_montgomery_multiply_by_constant_0d(v,
 3400|  5.76k|                                                                             fer);
 3401|  5.76k|}
libcrux_mlkem_portable.c:ntt_at_layer_3_34:
 3466|    240|{
 3467|    240|    KRML_MAYBE_FOR16(
  ------------------
  |  |  402|    240|#define KRML_MAYBE_FOR16(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 16, k, x)
  |  |  ------------------
  |  |  |  |  288|    240|    do {                               \
  |  |  |  |  289|    240|        uint32_t i = z;                \
  |  |  |  |  290|    240|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|    240|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3468|    240|        i, (size_t)0U, (size_t)16U, (size_t)1U, size_t round = i;
 3469|    240|        zeta_i[0U] = zeta_i[0U] + (size_t)1U;
 3470|    240|        libcrux_ml_kem_vector_portable_vector_type_PortableVector uu____0 =
 3471|    240|            libcrux_ml_kem_vector_portable_ntt_layer_3_step_0d(
 3472|    240|                re->coefficients[round],
 3473|    240|                libcrux_ml_kem_polynomial_ZETAS_TIMES_MONTGOMERY_R[zeta_i[0U]]);
 3474|    240|        re->coefficients[round] = uu____0;);
 3475|    240|}
libcrux_mlkem_portable.c:ntt_at_layer_2_26:
 3486|    240|{
 3487|    240|    KRML_MAYBE_FOR16(
  ------------------
  |  |  402|    240|#define KRML_MAYBE_FOR16(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 16, k, x)
  |  |  ------------------
  |  |  |  |  288|    240|    do {                               \
  |  |  |  |  289|    240|        uint32_t i = z;                \
  |  |  |  |  290|    240|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|    240|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3488|    240|        i, (size_t)0U, (size_t)16U, (size_t)1U, size_t round = i;
 3489|    240|        zeta_i[0U] = zeta_i[0U] + (size_t)1U;
 3490|    240|        re->coefficients[round] =
 3491|    240|            libcrux_ml_kem_vector_portable_ntt_layer_2_step_0d(
 3492|    240|                re->coefficients[round],
 3493|    240|                libcrux_ml_kem_polynomial_ZETAS_TIMES_MONTGOMERY_R[zeta_i[0U]],
 3494|    240|                libcrux_ml_kem_polynomial_ZETAS_TIMES_MONTGOMERY_R[zeta_i[0U] +
 3495|    240|                                                                   (size_t)1U]);
 3496|    240|        zeta_i[0U] = zeta_i[0U] + (size_t)1U;);
 3497|    240|}
libcrux_mlkem_portable.c:ntt_at_layer_1_3c:
 3508|    240|{
 3509|    240|    KRML_MAYBE_FOR16(
  ------------------
  |  |  402|    240|#define KRML_MAYBE_FOR16(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 16, k, x)
  |  |  ------------------
  |  |  |  |  288|    240|    do {                               \
  |  |  |  |  289|    240|        uint32_t i = z;                \
  |  |  |  |  290|    240|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|    240|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3510|    240|        i, (size_t)0U, (size_t)16U, (size_t)1U, size_t round = i;
 3511|    240|        zeta_i[0U] = zeta_i[0U] + (size_t)1U;
 3512|    240|        re->coefficients[round] =
 3513|    240|            libcrux_ml_kem_vector_portable_ntt_layer_1_step_0d(
 3514|    240|                re->coefficients[round],
 3515|    240|                libcrux_ml_kem_polynomial_ZETAS_TIMES_MONTGOMERY_R[zeta_i[0U]],
 3516|    240|                libcrux_ml_kem_polynomial_ZETAS_TIMES_MONTGOMERY_R[zeta_i[0U] +
 3517|    240|                                                                   (size_t)1U],
 3518|    240|                libcrux_ml_kem_polynomial_ZETAS_TIMES_MONTGOMERY_R[zeta_i[0U] +
 3519|    240|                                                                   (size_t)2U],
 3520|    240|                libcrux_ml_kem_polynomial_ZETAS_TIMES_MONTGOMERY_R[zeta_i[0U] +
 3521|    240|                                                                   (size_t)3U]);
 3522|    240|        zeta_i[0U] = zeta_i[0U] + (size_t)3U;);
 3523|    240|}
libcrux_mlkem_portable.c:poly_barrett_reduce_89_d8:
 3538|    240|{
 3539|    240|    for (size_t i = (size_t)0U;
 3540|  4.08k|         i < LIBCRUX_ML_KEM_POLYNOMIAL_VECTORS_IN_RING_ELEMENT; i++) {
  ------------------
  |  |   29|  4.08k|    (LIBCRUX_ML_KEM_CONSTANTS_COEFFICIENTS_IN_RING_ELEMENT / \
  |  |  ------------------
  |  |  |  |   36|  4.08k|#define LIBCRUX_ML_KEM_CONSTANTS_COEFFICIENTS_IN_RING_ELEMENT ((size_t)256U)
  |  |  ------------------
  |  |   30|  4.08k|     LIBCRUX_ML_KEM_VECTOR_TRAITS_FIELD_ELEMENTS_IN_VECTOR)
  |  |  ------------------
  |  |  |  |   32|  4.08k|#define LIBCRUX_ML_KEM_VECTOR_TRAITS_FIELD_ELEMENTS_IN_VECTOR ((size_t)16U)
  |  |  ------------------
  ------------------
  |  Branch (3540:10): [True: 3.84k, False: 240]
  ------------------
 3541|  3.84k|        size_t i0 = i;
 3542|  3.84k|        libcrux_ml_kem_vector_portable_vector_type_PortableVector uu____0 =
 3543|  3.84k|            libcrux_ml_kem_vector_portable_barrett_reduce_0d(
 3544|  3.84k|                self->coefficients[i0]);
 3545|  3.84k|        self->coefficients[i0] = uu____0;
 3546|  3.84k|    }
 3547|    240|}
libcrux_mlkem_portable.c:ntt_multiply_89_3b:
 3660|    360|{
 3661|    360|    libcrux_ml_kem_polynomial_PolynomialRingElement_f0 out = ZERO_89_c3();
 3662|    360|    for (size_t i = (size_t)0U;
 3663|  6.12k|         i < LIBCRUX_ML_KEM_POLYNOMIAL_VECTORS_IN_RING_ELEMENT; i++) {
  ------------------
  |  |   29|  6.12k|    (LIBCRUX_ML_KEM_CONSTANTS_COEFFICIENTS_IN_RING_ELEMENT / \
  |  |  ------------------
  |  |  |  |   36|  6.12k|#define LIBCRUX_ML_KEM_CONSTANTS_COEFFICIENTS_IN_RING_ELEMENT ((size_t)256U)
  |  |  ------------------
  |  |   30|  6.12k|     LIBCRUX_ML_KEM_VECTOR_TRAITS_FIELD_ELEMENTS_IN_VECTOR)
  |  |  ------------------
  |  |  |  |   32|  6.12k|#define LIBCRUX_ML_KEM_VECTOR_TRAITS_FIELD_ELEMENTS_IN_VECTOR ((size_t)16U)
  |  |  ------------------
  ------------------
  |  Branch (3663:10): [True: 5.76k, False: 360]
  ------------------
 3664|  5.76k|        size_t i0 = i;
 3665|  5.76k|        libcrux_ml_kem_vector_portable_vector_type_PortableVector uu____0 =
 3666|  5.76k|            libcrux_ml_kem_vector_portable_ntt_multiply_0d(
 3667|  5.76k|                &self->coefficients[i0], &rhs->coefficients[i0],
 3668|  5.76k|                libcrux_ml_kem_polynomial_ZETAS_TIMES_MONTGOMERY_R[(size_t)64U +
 3669|  5.76k|                                                                   (size_t)4U * i0],
 3670|  5.76k|                libcrux_ml_kem_polynomial_ZETAS_TIMES_MONTGOMERY_R[(size_t)64U +
 3671|  5.76k|                                                                   (size_t)4U * i0 +
 3672|  5.76k|                                                                   (size_t)1U],
 3673|  5.76k|                libcrux_ml_kem_polynomial_ZETAS_TIMES_MONTGOMERY_R[(size_t)64U +
 3674|  5.76k|                                                                   (size_t)4U * i0 +
 3675|  5.76k|                                                                   (size_t)2U],
 3676|  5.76k|                libcrux_ml_kem_polynomial_ZETAS_TIMES_MONTGOMERY_R[(size_t)64U +
 3677|  5.76k|                                                                   (size_t)4U * i0 +
 3678|  5.76k|                                                                   (size_t)3U]);
 3679|  5.76k|        out.coefficients[i0] = uu____0;
 3680|  5.76k|    }
 3681|    360|    return out;
 3682|    360|}
libcrux_mlkem_portable.c:add_standard_error_reduce_89_64:
 3746|    120|{
 3747|    120|    for (size_t i = (size_t)0U;
 3748|  2.04k|         i < LIBCRUX_ML_KEM_POLYNOMIAL_VECTORS_IN_RING_ELEMENT; i++) {
  ------------------
  |  |   29|  2.04k|    (LIBCRUX_ML_KEM_CONSTANTS_COEFFICIENTS_IN_RING_ELEMENT / \
  |  |  ------------------
  |  |  |  |   36|  2.04k|#define LIBCRUX_ML_KEM_CONSTANTS_COEFFICIENTS_IN_RING_ELEMENT ((size_t)256U)
  |  |  ------------------
  |  |   30|  2.04k|     LIBCRUX_ML_KEM_VECTOR_TRAITS_FIELD_ELEMENTS_IN_VECTOR)
  |  |  ------------------
  |  |  |  |   32|  2.04k|#define LIBCRUX_ML_KEM_VECTOR_TRAITS_FIELD_ELEMENTS_IN_VECTOR ((size_t)16U)
  |  |  ------------------
  ------------------
  |  Branch (3748:10): [True: 1.92k, False: 120]
  ------------------
 3749|  1.92k|        size_t j = i;
 3750|  1.92k|        libcrux_ml_kem_vector_portable_vector_type_PortableVector
 3751|  1.92k|            coefficient_normal_form = to_standard_domain_21(self->coefficients[j]);
 3752|  1.92k|        libcrux_ml_kem_vector_portable_vector_type_PortableVector uu____0 =
 3753|  1.92k|            libcrux_ml_kem_vector_portable_barrett_reduce_0d(
 3754|  1.92k|                libcrux_ml_kem_vector_portable_add_0d(coefficient_normal_form,
 3755|  1.92k|                                                      &error->coefficients[j]));
 3756|  1.92k|        self->coefficients[j] = uu____0;
 3757|  1.92k|    }
 3758|    120|}
libcrux_mlkem_portable.c:to_standard_domain_21:
 3727|  1.92k|{
 3728|  1.92k|    return libcrux_ml_kem_vector_portable_montgomery_multiply_by_constant_0d(
 3729|  1.92k|        v, LIBCRUX_ML_KEM_VECTOR_TRAITS_MONTGOMERY_R_SQUARED_MOD_FIELD_MODULUS);
  ------------------
  |  |   37|  1.92k|    ((int16_t)1353)
  ------------------
 3730|  1.92k|}
libcrux_mlkem_portable.c:serialize_public_key_67:
 7625|     40|{
 7626|     40|    uint8_t public_key_serialized[1184U] = { 0U };
 7627|     40|    Eurydice_slice uu____0 = Eurydice_array_to_subslice2(
  ------------------
  |  |   75|     40|    EURYDICE_SLICE((t *)x, start, end)
  |  |  ------------------
  |  |  |  |   50|     40|    (CLITERAL(Eurydice_slice){ .ptr = (void *)(x + start), .len = end - start })
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     40|#define CLITERAL(type) (type)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7628|     40|        public_key_serialized, (size_t)0U, (size_t)1152U, uint8_t);
 7629|     40|    uint8_t ret0[1152U];
 7630|     40|    serialize_secret_key_a3(t_as_ntt, ret0);
 7631|     40|    Eurydice_slice_copy(
  ------------------
  |  |   84|     40|    memcpy(dst.ptr, src.ptr, dst.len * sizeof(t))
  ------------------
 7632|     40|        uu____0, Eurydice_array_to_slice((size_t)1152U, ret0, uint8_t), uint8_t);
 7633|     40|    Eurydice_slice_copy(
  ------------------
  |  |   84|     40|    memcpy(dst.ptr, src.ptr, dst.len * sizeof(t))
  ------------------
 7634|     40|        Eurydice_array_to_subslice_from((size_t)1184U, public_key_serialized,
 7635|     40|                                        (size_t)1152U, uint8_t, size_t),
 7636|     40|        seed_for_a, uint8_t);
 7637|     40|    memcpy(ret, public_key_serialized, (size_t)1184U * sizeof(uint8_t));
 7638|     40|}
libcrux_mlkem_portable.c:serialize_secret_key_a3:
 7587|     80|{
 7588|     80|    uint8_t out[1152U] = { 0U };
 7589|     80|    for (size_t i = (size_t)0U;
 7590|    320|         i < Eurydice_slice_len(
  ------------------
  |  |   82|    320|#define Eurydice_slice_len(s, t) EURYDICE_SLICE_LEN(s, t)
  |  |  ------------------
  |  |  |  |   51|    320|#define EURYDICE_SLICE_LEN(s, _) s.len
  |  |  ------------------
  ------------------
  |  Branch (7590:10): [True: 240, False: 80]
  ------------------
 7591|     80|                 Eurydice_array_to_slice(
 7592|     80|                     (size_t)3U, key,
 7593|     80|                     libcrux_ml_kem_polynomial_PolynomialRingElement_f0),
 7594|     80|                 libcrux_ml_kem_polynomial_PolynomialRingElement_f0);
 7595|    240|         i++) {
 7596|    240|        size_t i0 = i;
 7597|    240|        libcrux_ml_kem_polynomial_PolynomialRingElement_f0 re = key[i0];
 7598|    240|        Eurydice_slice uu____0 = Eurydice_array_to_subslice2(
  ------------------
  |  |   75|    240|    EURYDICE_SLICE((t *)x, start, end)
  |  |  ------------------
  |  |  |  |   50|    240|    (CLITERAL(Eurydice_slice){ .ptr = (void *)(x + start), .len = end - start })
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|    240|#define CLITERAL(type) (type)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7599|    240|            out, i0 * LIBCRUX_ML_KEM_CONSTANTS_BYTES_PER_RING_ELEMENT,
 7600|    240|            (i0 + (size_t)1U) * LIBCRUX_ML_KEM_CONSTANTS_BYTES_PER_RING_ELEMENT,
 7601|    240|            uint8_t);
 7602|    240|        uint8_t ret0[384U];
 7603|    240|        serialize_uncompressed_ring_element_3c(&re, ret0);
 7604|    240|        Eurydice_slice_copy(
  ------------------
  |  |   84|    240|    memcpy(dst.ptr, src.ptr, dst.len * sizeof(t))
  ------------------
 7605|    240|            uu____0, Eurydice_array_to_slice((size_t)384U, ret0, uint8_t), uint8_t);
 7606|    240|    }
 7607|     80|    memcpy(ret, out, (size_t)1152U * sizeof(uint8_t));
 7608|     80|}
libcrux_mlkem_portable.c:H_f1_19:
 7685|     40|{
 7686|     40|    libcrux_ml_kem_hash_functions_portable_H(input, ret);
 7687|     40|}
libcrux_mlkem_portable.c:generate_keypair_a2:
 8381|     40|{
 8382|     40|    uint8_t hashed[64U];
 8383|     40|    cpa_keygen_seed_d8_b0(key_generation_seed, hashed);
 8384|     40|    Eurydice_slice_uint8_t_x2 uu____0 = Eurydice_slice_split_at(
  ------------------
  |  |  103|     40|    (CLITERAL(ret_t){                                             \
  |  |  ------------------
  |  |  |  |   27|     40|#define CLITERAL(type) (type)
  |  |  ------------------
  |  |  104|     40|        .fst = EURYDICE_SLICE((element_type *)slice.ptr, 0, mid), \
  |  |  ------------------
  |  |  |  |   50|     40|    (CLITERAL(Eurydice_slice){ .ptr = (void *)(x + start), .len = end - start })
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     40|#define CLITERAL(type) (type)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|     40|        .snd = EURYDICE_SLICE((element_type *)slice.ptr, mid, slice.len) })
  |  |  ------------------
  |  |  |  |   50|     40|    (CLITERAL(Eurydice_slice){ .ptr = (void *)(x + start), .len = end - start })
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     40|#define CLITERAL(type) (type)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8385|     40|        Eurydice_array_to_slice((size_t)64U, hashed, uint8_t), (size_t)32U,
 8386|     40|        uint8_t, Eurydice_slice_uint8_t_x2);
 8387|     40|    Eurydice_slice seed_for_A0 = uu____0.fst;
 8388|     40|    Eurydice_slice seed_for_secret_and_error = uu____0.snd;
 8389|     40|    libcrux_ml_kem_polynomial_PolynomialRingElement_f0 A_transpose[3U][3U];
 8390|     40|    uint8_t ret[34U];
 8391|     40|    libcrux_ml_kem_utils_into_padded_array_6d1(seed_for_A0, ret);
 8392|     40|    sample_matrix_A_e7(ret, true, A_transpose);
 8393|     40|    uint8_t prf_input[33U];
 8394|     40|    libcrux_ml_kem_utils_into_padded_array_6d2(seed_for_secret_and_error,
 8395|     40|                                               prf_input);
 8396|       |    /* Passing arrays by value in Rust generates a copy in C */
 8397|     40|    uint8_t copy_of_prf_input0[33U];
 8398|     40|    memcpy(copy_of_prf_input0, prf_input, (size_t)33U * sizeof(uint8_t));
 8399|     40|    tuple_b0 uu____2 = sample_vector_cbd_then_ntt_78(copy_of_prf_input0, 0U);
 8400|     40|    libcrux_ml_kem_polynomial_PolynomialRingElement_f0 secret_as_ntt[3U];
 8401|     40|    memcpy(
 8402|     40|        secret_as_ntt, uu____2.fst,
 8403|     40|        (size_t)3U * sizeof(libcrux_ml_kem_polynomial_PolynomialRingElement_f0));
 8404|     40|    uint8_t domain_separator = uu____2.snd;
 8405|       |    /* Passing arrays by value in Rust generates a copy in C */
 8406|     40|    uint8_t copy_of_prf_input[33U];
 8407|     40|    memcpy(copy_of_prf_input, prf_input, (size_t)33U * sizeof(uint8_t));
 8408|     40|    libcrux_ml_kem_polynomial_PolynomialRingElement_f0 error_as_ntt[3U];
 8409|     40|    memcpy(
 8410|     40|        error_as_ntt,
 8411|     40|        sample_vector_cbd_then_ntt_78(copy_of_prf_input, domain_separator).fst,
 8412|     40|        (size_t)3U * sizeof(libcrux_ml_kem_polynomial_PolynomialRingElement_f0));
 8413|     40|    libcrux_ml_kem_polynomial_PolynomialRingElement_f0 t_as_ntt[3U];
 8414|     40|    compute_As_plus_e_c7(A_transpose, secret_as_ntt, error_as_ntt, t_as_ntt);
 8415|     40|    uint8_t seed_for_A[32U];
 8416|     40|    core_result_Result_00 dst;
 8417|     40|    Eurydice_slice_to_array2(&dst, seed_for_A0, Eurydice_slice, uint8_t[32U]);
  ------------------
  |  |  116|     40|    Eurydice_slice_to_array3(&(dst)->tag, (char *)&(dst)->val.case_Ok, src, \
  |  |  117|     40|                             sizeof(t_arr))
  ------------------
 8418|     40|    core_result_unwrap_41_33(dst, seed_for_A);
 8419|     40|    uint8_t public_key_serialized[1184U];
 8420|     40|    serialize_public_key_67(
 8421|     40|        t_as_ntt, Eurydice_array_to_slice((size_t)32U, seed_for_A, uint8_t),
  ------------------
  |  |   69|     40|    EURYDICE_SLICE(x, 0,                   \
  |  |  ------------------
  |  |  |  |   50|     40|    (CLITERAL(Eurydice_slice){ .ptr = (void *)(x + start), .len = end - start })
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     40|#define CLITERAL(type) (type)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   70|     40|                   end) /* x is already at an array type, no need for cast */
  ------------------
 8422|     40|        public_key_serialized);
 8423|     40|    uint8_t secret_key_serialized[1152U];
 8424|     40|    serialize_secret_key_a3(secret_as_ntt, secret_key_serialized);
 8425|       |    /* Passing arrays by value in Rust generates a copy in C */
 8426|     40|    uint8_t copy_of_secret_key_serialized[1152U];
 8427|     40|    memcpy(copy_of_secret_key_serialized, secret_key_serialized,
 8428|     40|           (size_t)1152U * sizeof(uint8_t));
 8429|       |    /* Passing arrays by value in Rust generates a copy in C */
 8430|     40|    uint8_t copy_of_public_key_serialized[1184U];
 8431|     40|    memcpy(copy_of_public_key_serialized, public_key_serialized,
 8432|     40|           (size_t)1184U * sizeof(uint8_t));
 8433|     40|    libcrux_ml_kem_utils_extraction_helper_Keypair768 lit;
 8434|     40|    memcpy(lit.fst, copy_of_secret_key_serialized,
 8435|     40|           (size_t)1152U * sizeof(uint8_t));
 8436|     40|    memcpy(lit.snd, copy_of_public_key_serialized,
 8437|     40|           (size_t)1184U * sizeof(uint8_t));
 8438|     40|    return lit;
 8439|     40|}
libcrux_mlkem_portable.c:cpa_keygen_seed_d8_b0:
 7749|     40|{
 7750|     40|    uint8_t seed[33U] = { 0U };
 7751|     40|    Eurydice_slice_copy(
  ------------------
  |  |   84|     40|    memcpy(dst.ptr, src.ptr, dst.len * sizeof(t))
  ------------------
 7752|     40|        Eurydice_array_to_subslice2(
 7753|     40|            seed, (size_t)0U,
 7754|     40|            LIBCRUX_ML_KEM_CONSTANTS_CPA_PKE_KEY_GENERATION_SEED_SIZE, uint8_t),
 7755|     40|        key_generation_seed, uint8_t);
 7756|     40|    seed[LIBCRUX_ML_KEM_CONSTANTS_CPA_PKE_KEY_GENERATION_SEED_SIZE] =
  ------------------
  |  |   44|     40|#define LIBCRUX_ML_KEM_CONSTANTS_CPA_PKE_KEY_GENERATION_SEED_SIZE ((size_t)32U)
  ------------------
 7757|     40|        (uint8_t)(size_t)3U;
 7758|     40|    uint8_t ret0[64U];
 7759|     40|    G_f1_38(Eurydice_array_to_slice((size_t)33U, seed, uint8_t), ret0);
  ------------------
  |  |   69|     40|    EURYDICE_SLICE(x, 0,                   \
  |  |  ------------------
  |  |  |  |   50|     40|    (CLITERAL(Eurydice_slice){ .ptr = (void *)(x + start), .len = end - start })
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     40|#define CLITERAL(type) (type)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   70|     40|                   end) /* x is already at an array type, no need for cast */
  ------------------
 7760|     40|    memcpy(ret, ret0, (size_t)64U * sizeof(uint8_t));
 7761|     40|}
libcrux_mlkem_portable.c:sample_matrix_A_e7:
 8145|     40|{
 8146|     40|    libcrux_ml_kem_polynomial_PolynomialRingElement_f0 A_transpose[3U][3U];
 8147|     40|    KRML_MAYBE_FOR3(i, (size_t)0U, (size_t)3U, (size_t)1U,
  ------------------
  |  |  324|     40|#define KRML_MAYBE_FOR3(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 3, k, x)
  |  |  ------------------
  |  |  |  |  288|     40|    do {                               \
  |  |  |  |  289|     40|        uint32_t i = z;                \
  |  |  |  |  290|     40|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     40|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8148|     40|                    closure_fc(A_transpose[i]););
 8149|     40|    KRML_MAYBE_FOR3(
  ------------------
  |  |  324|     40|#define KRML_MAYBE_FOR3(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 3, k, x)
  |  |  ------------------
  |  |  |  |  288|     40|    do {                               \
  |  |  |  |  289|     40|        uint32_t i = z;                \
  |  |  |  |  290|     40|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     40|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8150|     40|        i0, (size_t)0U, (size_t)3U, (size_t)1U, size_t i1 = i0;
 8151|       |        /* Passing arrays by value in Rust generates a copy in C */
 8152|     40|        uint8_t copy_of_seed[34U];
 8153|     40|        memcpy(copy_of_seed, seed, (size_t)34U * sizeof(uint8_t));
 8154|     40|        uint8_t seeds[3U][34U]; KRML_MAYBE_FOR3(
 8155|     40|            i, (size_t)0U, (size_t)3U, (size_t)1U,
 8156|     40|            memcpy(seeds[i], copy_of_seed, (size_t)34U * sizeof(uint8_t)););
 8157|     40|        KRML_MAYBE_FOR3(i, (size_t)0U, (size_t)3U, (size_t)1U, size_t j = i;
 8158|     40|                        seeds[j][32U] = (uint8_t)i1; seeds[j][33U] = (uint8_t)j;);
 8159|       |        /* Passing arrays by value in Rust generates a copy in C */
 8160|     40|        uint8_t copy_of_seeds[3U][34U];
 8161|     40|        memcpy(copy_of_seeds, seeds, (size_t)3U * sizeof(uint8_t[34U]));
 8162|     40|        libcrux_ml_kem_polynomial_PolynomialRingElement_f0 sampled[3U];
 8163|     40|        sample_from_xof_46(copy_of_seeds, sampled);
 8164|     40|        for (size_t i = (size_t)0U;
 8165|     40|             i < Eurydice_slice_len(
 8166|     40|                     Eurydice_array_to_slice(
 8167|     40|                         (size_t)3U, sampled,
 8168|     40|                         libcrux_ml_kem_polynomial_PolynomialRingElement_f0),
 8169|     40|                     libcrux_ml_kem_polynomial_PolynomialRingElement_f0);
 8170|     40|             i++) {
 8171|     40|            size_t j = i;
 8172|     40|            libcrux_ml_kem_polynomial_PolynomialRingElement_f0 sample = sampled[j];
 8173|     40|            if (transpose) {
 8174|     40|                A_transpose[j][i1] = sample;
 8175|     40|            } else {
 8176|     40|                A_transpose[i1][j] = sample;
 8177|     40|            }
 8178|     40|        }
 8179|       |
 8180|     40|    );
 8181|     40|    memcpy(ret, A_transpose,
 8182|     40|           (size_t)3U *
 8183|     40|               sizeof(libcrux_ml_kem_polynomial_PolynomialRingElement_f0[3U]));
 8184|     40|}
libcrux_mlkem_portable.c:closure_fc:
 7773|    120|{
 7774|    120|    KRML_MAYBE_FOR3(i, (size_t)0U, (size_t)3U, (size_t)1U,
  ------------------
  |  |  324|    120|#define KRML_MAYBE_FOR3(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 3, k, x)
  |  |  ------------------
  |  |  |  |  288|    120|    do {                               \
  |  |  |  |  289|    120|        uint32_t i = z;                \
  |  |  |  |  290|    120|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|    120|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7775|    120|                    ret[i] = ZERO_89_c3(););
 7776|    120|}
libcrux_mlkem_portable.c:sample_from_xof_46:
 8095|    120|{
 8096|    120|    size_t sampled_coefficients[3U] = { 0U };
 8097|    120|    int16_t out[3U][272U] = { { 0U } };
 8098|       |    /* Passing arrays by value in Rust generates a copy in C */
 8099|    120|    uint8_t copy_of_seeds[3U][34U];
 8100|    120|    memcpy(copy_of_seeds, seeds, (size_t)3U * sizeof(uint8_t[34U]));
 8101|    120|    PortableHash_58 xof_state = shake128_init_absorb_f1_77(copy_of_seeds);
 8102|    120|    uint8_t randomness0[3U][504U];
 8103|    120|    shake128_squeeze_three_blocks_f1_84(&xof_state, randomness0);
 8104|       |    /* Passing arrays by value in Rust generates a copy in C */
 8105|    120|    uint8_t copy_of_randomness0[3U][504U];
 8106|    120|    memcpy(copy_of_randomness0, randomness0, (size_t)3U * sizeof(uint8_t[504U]));
 8107|    120|    bool done = sample_from_uniform_distribution_next_17(
 8108|    120|        copy_of_randomness0, sampled_coefficients, out);
 8109|    120|    while (true) {
 8110|    120|        if (done) {
  ------------------
  |  Branch (8110:13): [True: 120, False: 0]
  ------------------
 8111|    120|            break;
 8112|    120|        } else {
 8113|      0|            uint8_t randomness[3U][168U];
 8114|      0|            shake128_squeeze_block_f1_8e(&xof_state, randomness);
 8115|       |            /* Passing arrays by value in Rust generates a copy in C */
 8116|      0|            uint8_t copy_of_randomness[3U][168U];
 8117|      0|            memcpy(copy_of_randomness, randomness,
 8118|      0|                   (size_t)3U * sizeof(uint8_t[168U]));
 8119|      0|            done = sample_from_uniform_distribution_next_170(
 8120|      0|                copy_of_randomness, sampled_coefficients, out);
 8121|      0|        }
 8122|    120|    }
 8123|       |    /* Passing arrays by value in Rust generates a copy in C */
 8124|    120|    int16_t copy_of_out[3U][272U];
 8125|    120|    memcpy(copy_of_out, out, (size_t)3U * sizeof(int16_t[272U]));
 8126|    120|    libcrux_ml_kem_polynomial_PolynomialRingElement_f0 ret0[3U];
 8127|    120|    KRML_MAYBE_FOR3(i, (size_t)0U, (size_t)3U, (size_t)1U,
  ------------------
  |  |  324|    120|#define KRML_MAYBE_FOR3(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 3, k, x)
  |  |  ------------------
  |  |  |  |  288|    120|    do {                               \
  |  |  |  |  289|    120|        uint32_t i = z;                \
  |  |  |  |  290|    120|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|    120|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8128|    120|                    ret0[i] = closure_e4(copy_of_out[i]););
 8129|    120|    memcpy(
 8130|    120|        ret, ret0,
 8131|    120|        (size_t)3U * sizeof(libcrux_ml_kem_polynomial_PolynomialRingElement_f0));
 8132|    120|}
libcrux_mlkem_portable.c:shake128_init_absorb_f1_77:
 7826|    120|{
 7827|       |    /* Passing arrays by value in Rust generates a copy in C */
 7828|    120|    uint8_t copy_of_input[3U][34U];
 7829|    120|    memcpy(copy_of_input, input, (size_t)3U * sizeof(uint8_t[34U]));
 7830|    120|    return shake128_init_absorb_79(copy_of_input);
 7831|    120|}
libcrux_mlkem_portable.c:shake128_init_absorb_79:
 7794|    120|{
 7795|    120|    libcrux_sha3_generic_keccak_KeccakState_48 shake128_state[3U];
 7796|    120|    KRML_MAYBE_FOR3(
  ------------------
  |  |  324|    120|#define KRML_MAYBE_FOR3(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 3, k, x)
  |  |  ------------------
  |  |  |  |  288|    120|    do {                               \
  |  |  |  |  289|    120|        uint32_t i = z;                \
  |  |  |  |  290|    120|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|    120|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7797|    120|        i, (size_t)0U, (size_t)3U, (size_t)1U,
 7798|    120|        shake128_state[i] = libcrux_sha3_portable_incremental_shake128_init(););
 7799|    120|    KRML_MAYBE_FOR3(
  ------------------
  |  |  324|    120|#define KRML_MAYBE_FOR3(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 3, k, x)
  |  |  ------------------
  |  |  |  |  288|    120|    do {                               \
  |  |  |  |  289|    120|        uint32_t i = z;                \
  |  |  |  |  290|    120|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|    120|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7800|    120|        i, (size_t)0U, (size_t)3U, (size_t)1U, size_t i0 = i;
 7801|    120|        libcrux_sha3_portable_incremental_shake128_absorb_final(
 7802|    120|            &shake128_state[i0],
 7803|    120|            Eurydice_array_to_slice((size_t)34U, input[i0], uint8_t)););
 7804|       |    /* Passing arrays by value in Rust generates a copy in C */
 7805|    120|    libcrux_sha3_generic_keccak_KeccakState_48 copy_of_shake128_state[3U];
 7806|    120|    memcpy(copy_of_shake128_state, shake128_state,
 7807|    120|           (size_t)3U * sizeof(libcrux_sha3_generic_keccak_KeccakState_48));
 7808|    120|    PortableHash_58 lit;
 7809|    120|    memcpy(lit.shake128_state, copy_of_shake128_state,
 7810|    120|           (size_t)3U * sizeof(libcrux_sha3_generic_keccak_KeccakState_48));
 7811|    120|    return lit;
 7812|    120|}
libcrux_mlkem_portable.c:shake128_squeeze_three_blocks_f1_84:
 7865|    120|{
 7866|    120|    shake128_squeeze_three_blocks_eb(self, ret);
 7867|    120|}
libcrux_mlkem_portable.c:shake128_squeeze_three_blocks_eb:
 7842|    120|{
 7843|    120|    uint8_t out[3U][504U] = { { 0U } };
 7844|    120|    KRML_MAYBE_FOR3(
  ------------------
  |  |  324|    120|#define KRML_MAYBE_FOR3(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 3, k, x)
  |  |  ------------------
  |  |  |  |  288|    120|    do {                               \
  |  |  |  |  289|    120|        uint32_t i = z;                \
  |  |  |  |  290|    120|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|    120|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7845|    120|        i, (size_t)0U, (size_t)3U, (size_t)1U, size_t i0 = i;
 7846|    120|        libcrux_sha3_portable_incremental_shake128_squeeze_first_three_blocks(
 7847|    120|            &st->shake128_state[i0],
 7848|    120|            Eurydice_array_to_slice((size_t)504U, out[i0], uint8_t)););
 7849|    120|    memcpy(ret, out, (size_t)3U * sizeof(uint8_t[504U]));
 7850|    120|}
libcrux_mlkem_portable.c:sample_from_uniform_distribution_next_17:
 7921|    120|{
 7922|    120|    KRML_MAYBE_FOR3(
  ------------------
  |  |  324|    120|#define KRML_MAYBE_FOR3(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 3, k, x)
  |  |  ------------------
  |  |  |  |  288|    120|    do {                               \
  |  |  |  |  289|    120|        uint32_t i = z;                \
  |  |  |  |  290|    120|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|    120|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7923|    120|        i0, (size_t)0U, (size_t)3U, (size_t)1U, size_t i1 = i0;
 7924|    120|        for (size_t i = (size_t)0U; i < (size_t)504U / (size_t)24U; i++) {
 7925|    120|            size_t r = i;
 7926|    120|            if (sampled_coefficients[i1] <
 7927|    120|                LIBCRUX_ML_KEM_CONSTANTS_COEFFICIENTS_IN_RING_ELEMENT) {
 7928|    120|                Eurydice_slice uu____0 = Eurydice_array_to_subslice2(
 7929|    120|                    randomness[i1], r * (size_t)24U, r * (size_t)24U + (size_t)24U,
 7930|    120|                    uint8_t);
 7931|    120|                size_t sampled = libcrux_ml_kem_vector_portable_rej_sample_0d(
 7932|    120|                    uu____0, Eurydice_array_to_subslice2(
 7933|    120|                                 out[i1], sampled_coefficients[i1],
 7934|    120|                                 sampled_coefficients[i1] + (size_t)16U, int16_t));
 7935|    120|                size_t uu____1 = i1;
 7936|    120|                sampled_coefficients[uu____1] =
 7937|    120|                    sampled_coefficients[uu____1] + sampled;
 7938|    120|            }
 7939|    120|        });
 7940|    120|    bool done = true;
 7941|    120|    KRML_MAYBE_FOR3(
  ------------------
  |  |  324|    120|#define KRML_MAYBE_FOR3(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 3, k, x)
  |  |  ------------------
  |  |  |  |  288|    120|    do {                               \
  |  |  |  |  289|    120|        uint32_t i = z;                \
  |  |  |  |  290|    120|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|    120|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7942|    120|        i, (size_t)0U, (size_t)3U, (size_t)1U, size_t i0 = i;
 7943|    120|        if (sampled_coefficients[i0] >=
 7944|    120|            LIBCRUX_ML_KEM_CONSTANTS_COEFFICIENTS_IN_RING_ELEMENT) {
 7945|    120|            sampled_coefficients[i0] =
 7946|    120|                LIBCRUX_ML_KEM_CONSTANTS_COEFFICIENTS_IN_RING_ELEMENT;
 7947|    120|        } else { done = false; });
 7948|    120|    return done;
 7949|    120|}
libcrux_mlkem_portable.c:closure_e4:
 8079|    360|{
 8080|    360|    return from_i16_array_89_33(
 8081|    360|        Eurydice_array_to_subslice2(s, (size_t)0U, (size_t)256U, int16_t));
  ------------------
  |  |   75|    360|    EURYDICE_SLICE((t *)x, start, end)
  |  |  ------------------
  |  |  |  |   50|    360|    (CLITERAL(Eurydice_slice){ .ptr = (void *)(x + start), .len = end - start })
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|    360|#define CLITERAL(type) (type)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8082|    360|}
libcrux_mlkem_portable.c:sample_vector_cbd_then_ntt_78:
 8249|     80|{
 8250|     80|    libcrux_ml_kem_polynomial_PolynomialRingElement_f0 re_as_ntt[3U];
 8251|     80|    KRML_MAYBE_FOR3(i, (size_t)0U, (size_t)3U, (size_t)1U,
  ------------------
  |  |  324|     80|#define KRML_MAYBE_FOR3(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 3, k, x)
  |  |  ------------------
  |  |  |  |  288|     80|    do {                               \
  |  |  |  |  289|     80|        uint32_t i = z;                \
  |  |  |  |  290|     80|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     80|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8252|     80|                    re_as_ntt[i] = ZERO_89_c3(););
 8253|       |    /* Passing arrays by value in Rust generates a copy in C */
 8254|     80|    uint8_t copy_of_prf_input[33U];
 8255|     80|    memcpy(copy_of_prf_input, prf_input, (size_t)33U * sizeof(uint8_t));
 8256|     80|    uint8_t prf_inputs[3U][33U];
 8257|     80|    KRML_MAYBE_FOR3(
  ------------------
  |  |  324|     80|#define KRML_MAYBE_FOR3(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 3, k, x)
  |  |  ------------------
  |  |  |  |  288|     80|    do {                               \
  |  |  |  |  289|     80|        uint32_t i = z;                \
  |  |  |  |  290|     80|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     80|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8258|     80|        i, (size_t)0U, (size_t)3U, (size_t)1U,
 8259|     80|        memcpy(prf_inputs[i], copy_of_prf_input, (size_t)33U * sizeof(uint8_t)););
 8260|     80|    KRML_MAYBE_FOR3(i, (size_t)0U, (size_t)3U, (size_t)1U, size_t i0 = i;
  ------------------
  |  |  324|     80|#define KRML_MAYBE_FOR3(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 3, k, x)
  |  |  ------------------
  |  |  |  |  288|     80|    do {                               \
  |  |  |  |  289|     80|        uint32_t i = z;                \
  |  |  |  |  290|     80|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     80|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8261|     80|                    prf_inputs[i0][32U] = domain_separator;
 8262|     80|                    domain_separator = (uint32_t)domain_separator + 1U;);
 8263|     80|    uint8_t prf_outputs[3U][128U];
 8264|     80|    PRFxN_f1_d5(prf_inputs, prf_outputs);
 8265|     80|    KRML_MAYBE_FOR3(
  ------------------
  |  |  324|     80|#define KRML_MAYBE_FOR3(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 3, k, x)
  |  |  ------------------
  |  |  |  |  288|     80|    do {                               \
  |  |  |  |  289|     80|        uint32_t i = z;                \
  |  |  |  |  290|     80|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     80|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8266|     80|        i, (size_t)0U, (size_t)3U, (size_t)1U, size_t i0 = i;
 8267|     80|        re_as_ntt[i0] = sample_from_binomial_distribution_ca(
 8268|     80|            Eurydice_array_to_slice((size_t)128U, prf_outputs[i0], uint8_t));
 8269|     80|        ntt_binomially_sampled_ring_element_63(&re_as_ntt[i0]););
 8270|       |    /* Passing arrays by value in Rust generates a copy in C */
 8271|     80|    libcrux_ml_kem_polynomial_PolynomialRingElement_f0 copy_of_re_as_ntt[3U];
 8272|     80|    memcpy(
 8273|     80|        copy_of_re_as_ntt, re_as_ntt,
 8274|     80|        (size_t)3U * sizeof(libcrux_ml_kem_polynomial_PolynomialRingElement_f0));
 8275|     80|    tuple_b0 lit;
 8276|     80|    memcpy(
 8277|     80|        lit.fst, copy_of_re_as_ntt,
 8278|     80|        (size_t)3U * sizeof(libcrux_ml_kem_polynomial_PolynomialRingElement_f0));
 8279|     80|    lit.snd = domain_separator;
 8280|     80|    return lit;
 8281|     80|}
libcrux_mlkem_portable.c:PRFxN_f1_d5:
 8229|     80|{
 8230|     80|    PRFxN_1c(input, ret);
 8231|     80|}
libcrux_mlkem_portable.c:PRFxN_1c:
 8206|     80|{
 8207|     80|    uint8_t out[3U][128U] = { { 0U } };
 8208|     80|    KRML_MAYBE_FOR3(
  ------------------
  |  |  324|     80|#define KRML_MAYBE_FOR3(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 3, k, x)
  |  |  ------------------
  |  |  |  |  288|     80|    do {                               \
  |  |  |  |  289|     80|        uint32_t i = z;                \
  |  |  |  |  290|     80|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     80|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8209|     80|        i, (size_t)0U, (size_t)3U, (size_t)1U, size_t i0 = i;
 8210|     80|        libcrux_sha3_portable_shake256(
 8211|     80|            Eurydice_array_to_slice((size_t)128U, out[i0], uint8_t),
 8212|     80|            Eurydice_array_to_slice((size_t)33U, input[i0], uint8_t)););
 8213|     80|    memcpy(ret, out, (size_t)3U * sizeof(uint8_t[128U]));
 8214|     80|}
libcrux_mlkem_portable.c:compute_As_plus_e_c7:
 8332|     40|{
 8333|     40|    libcrux_ml_kem_polynomial_PolynomialRingElement_f0 result[3U];
 8334|     40|    KRML_MAYBE_FOR3(i, (size_t)0U, (size_t)3U, (size_t)1U,
  ------------------
  |  |  324|     40|#define KRML_MAYBE_FOR3(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 3, k, x)
  |  |  ------------------
  |  |  |  |  288|     40|    do {                               \
  |  |  |  |  289|     40|        uint32_t i = z;                \
  |  |  |  |  290|     40|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|     40|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8335|     40|                    result[i] = ZERO_89_c3(););
 8336|     40|    for (size_t i0 = (size_t)0U;
 8337|    160|         i0 < Eurydice_slice_len(
  ------------------
  |  |   82|    160|#define Eurydice_slice_len(s, t) EURYDICE_SLICE_LEN(s, t)
  |  |  ------------------
  |  |  |  |   51|    160|#define EURYDICE_SLICE_LEN(s, _) s.len
  |  |  ------------------
  ------------------
  |  Branch (8337:10): [True: 120, False: 40]
  ------------------
 8338|     40|                  Eurydice_array_to_slice(
 8339|     40|                      (size_t)3U, matrix_A,
 8340|     40|                      libcrux_ml_kem_polynomial_PolynomialRingElement_f0[3U]),
 8341|     40|                  libcrux_ml_kem_polynomial_PolynomialRingElement_f0[3U]);
 8342|    120|         i0++) {
 8343|    120|        size_t i1 = i0;
 8344|    120|        libcrux_ml_kem_polynomial_PolynomialRingElement_f0 *row = matrix_A[i1];
 8345|    120|        for (size_t i = (size_t)0U;
 8346|    480|             i < Eurydice_slice_len(
  ------------------
  |  |   82|    480|#define Eurydice_slice_len(s, t) EURYDICE_SLICE_LEN(s, t)
  |  |  ------------------
  |  |  |  |   51|    480|#define EURYDICE_SLICE_LEN(s, _) s.len
  |  |  ------------------
  ------------------
  |  Branch (8346:14): [True: 360, False: 120]
  ------------------
 8347|    120|                     Eurydice_array_to_slice(
 8348|    120|                         (size_t)3U, row,
 8349|    120|                         libcrux_ml_kem_polynomial_PolynomialRingElement_f0),
 8350|    120|                     libcrux_ml_kem_polynomial_PolynomialRingElement_f0);
 8351|    360|             i++) {
 8352|    360|            size_t j = i;
 8353|    360|            libcrux_ml_kem_polynomial_PolynomialRingElement_f0 *matrix_element =
 8354|    360|                &row[j];
 8355|    360|            libcrux_ml_kem_polynomial_PolynomialRingElement_f0 product =
 8356|    360|                ntt_multiply_89_3b(matrix_element, &s_as_ntt[j]);
 8357|    360|            add_to_ring_element_89_1e(&result[i1], &product);
 8358|    360|        }
 8359|    120|        add_standard_error_reduce_89_64(&result[i1], &error_as_ntt[i1]);
 8360|    120|    }
 8361|     40|    memcpy(
 8362|     40|        ret, result,
 8363|     40|        (size_t)3U * sizeof(libcrux_ml_kem_polynomial_PolynomialRingElement_f0));
 8364|     40|}
libcrux_mlkem_portable.c:add_to_ring_element_89_1e:
 8301|    360|{
 8302|    360|    for (size_t i = (size_t)0U;
 8303|  6.12k|         i < Eurydice_slice_len(
  ------------------
  |  |   82|  6.12k|#define Eurydice_slice_len(s, t) EURYDICE_SLICE_LEN(s, t)
  |  |  ------------------
  |  |  |  |   51|  6.12k|#define EURYDICE_SLICE_LEN(s, _) s.len
  |  |  ------------------
  ------------------
  |  Branch (8303:10): [True: 5.76k, False: 360]
  ------------------
 8304|    360|                 Eurydice_array_to_slice(
 8305|    360|                     (size_t)16U, self->coefficients,
 8306|    360|                     libcrux_ml_kem_vector_portable_vector_type_PortableVector),
 8307|    360|                 libcrux_ml_kem_vector_portable_vector_type_PortableVector);
 8308|  5.76k|         i++) {
 8309|  5.76k|        size_t i0 = i;
 8310|  5.76k|        libcrux_ml_kem_vector_portable_vector_type_PortableVector uu____0 =
 8311|  5.76k|            libcrux_ml_kem_vector_portable_add_0d(self->coefficients[i0],
 8312|  5.76k|                                                  &rhs->coefficients[i0]);
 8313|  5.76k|        self->coefficients[i0] = uu____0;
 8314|  5.76k|    }
 8315|    360|}
libcrux_mlkem_portable.c:serialize_kem_secret_key_5d:
 8455|     40|{
 8456|     40|    uint8_t out[2400U] = { 0U };
 8457|     40|    size_t pointer = (size_t)0U;
 8458|     40|    uint8_t *uu____0 = out;
 8459|     40|    size_t uu____1 = pointer;
 8460|     40|    size_t uu____2 = pointer;
 8461|     40|    Eurydice_slice_copy(
  ------------------
  |  |   84|     40|    memcpy(dst.ptr, src.ptr, dst.len * sizeof(t))
  ------------------
 8462|     40|        Eurydice_array_to_subslice2(
 8463|     40|            uu____0, uu____1, uu____2 + Eurydice_slice_len(private_key, uint8_t),
 8464|     40|            uint8_t),
 8465|     40|        private_key, uint8_t);
 8466|     40|    pointer = pointer + Eurydice_slice_len(private_key, uint8_t);
  ------------------
  |  |   82|     40|#define Eurydice_slice_len(s, t) EURYDICE_SLICE_LEN(s, t)
  |  |  ------------------
  |  |  |  |   51|     40|#define EURYDICE_SLICE_LEN(s, _) s.len
  |  |  ------------------
  ------------------
 8467|     40|    uint8_t *uu____3 = out;
 8468|     40|    size_t uu____4 = pointer;
 8469|     40|    size_t uu____5 = pointer;
 8470|     40|    Eurydice_slice_copy(
  ------------------
  |  |   84|     40|    memcpy(dst.ptr, src.ptr, dst.len * sizeof(t))
  ------------------
 8471|     40|        Eurydice_array_to_subslice2(
 8472|     40|            uu____3, uu____4, uu____5 + Eurydice_slice_len(public_key, uint8_t),
 8473|     40|            uint8_t),
 8474|     40|        public_key, uint8_t);
 8475|     40|    pointer = pointer + Eurydice_slice_len(public_key, uint8_t);
  ------------------
  |  |   82|     40|#define Eurydice_slice_len(s, t) EURYDICE_SLICE_LEN(s, t)
  |  |  ------------------
  |  |  |  |   51|     40|#define EURYDICE_SLICE_LEN(s, _) s.len
  |  |  ------------------
  ------------------
 8476|     40|    Eurydice_slice uu____6 = Eurydice_array_to_subslice2(
  ------------------
  |  |   75|     40|    EURYDICE_SLICE((t *)x, start, end)
  |  |  ------------------
  |  |  |  |   50|     40|    (CLITERAL(Eurydice_slice){ .ptr = (void *)(x + start), .len = end - start })
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     40|#define CLITERAL(type) (type)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8477|     40|        out, pointer, pointer + LIBCRUX_ML_KEM_CONSTANTS_H_DIGEST_SIZE, uint8_t);
 8478|     40|    uint8_t ret0[32U];
 8479|     40|    H_f1_19(public_key, ret0);
 8480|     40|    Eurydice_slice_copy(
  ------------------
  |  |   84|     40|    memcpy(dst.ptr, src.ptr, dst.len * sizeof(t))
  ------------------
 8481|     40|        uu____6, Eurydice_array_to_slice((size_t)32U, ret0, uint8_t), uint8_t);
 8482|     40|    pointer = pointer + LIBCRUX_ML_KEM_CONSTANTS_H_DIGEST_SIZE;
  ------------------
  |  |   46|     40|#define LIBCRUX_ML_KEM_CONSTANTS_H_DIGEST_SIZE ((size_t)32U)
  ------------------
 8483|     40|    uint8_t *uu____7 = out;
 8484|     40|    size_t uu____8 = pointer;
 8485|     40|    size_t uu____9 = pointer;
 8486|     40|    Eurydice_slice_copy(
  ------------------
  |  |   84|     40|    memcpy(dst.ptr, src.ptr, dst.len * sizeof(t))
  ------------------
 8487|     40|        Eurydice_array_to_subslice2(
 8488|     40|            uu____7, uu____8,
 8489|     40|            uu____9 + Eurydice_slice_len(implicit_rejection_value, uint8_t),
 8490|     40|            uint8_t),
 8491|     40|        implicit_rejection_value, uint8_t);
 8492|     40|    memcpy(ret, out, (size_t)2400U * sizeof(uint8_t));
 8493|     40|}
libcrux_mlkem_portable.c:G_f1_38:
 7732|     40|{
 7733|     40|    libcrux_ml_kem_hash_functions_portable_G(input, ret);
 7734|     40|}

libcrux_mlkem_portable.c:libcrux_sha3_portable_sha512:
   31|     40|{
   32|     40|    Eurydice_slice buf0[1U] = { data };
   33|     40|    Eurydice_slice buf[1U] = { digest };
   34|     40|    libcrux_sha3_portable_keccakx1_e4(buf0, buf);
   35|     40|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_sha256:
   43|     40|{
   44|     40|    Eurydice_slice buf0[1U] = { data };
   45|     40|    Eurydice_slice buf[1U] = { digest };
   46|     40|    libcrux_sha3_portable_keccakx1_e40(buf0, buf);
   47|     40|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_shake256:
   55|    240|{
   56|    240|    Eurydice_slice buf0[1U] = { data };
   57|    240|    Eurydice_slice buf[1U] = { digest };
   58|    240|    libcrux_sha3_portable_keccakx1_e41(buf0, buf);
   59|    240|}

libcrux_mlkem_portable.c:libcrux_sha3_portable_keccakx1_e4:
 3437|     40|{
 3438|       |    /* Passing arrays by value in Rust generates a copy in C */
 3439|     40|    Eurydice_slice copy_of_data[1U];
 3440|     40|    memcpy(copy_of_data, data, (size_t)1U * sizeof(Eurydice_slice));
 3441|     40|    libcrux_sha3_generic_keccak_keccak_06(copy_of_data, out);
 3442|     40|}
libcrux_mlkem_portable.c:libcrux_sha3_generic_keccak_keccak_06:
 3364|     40|{
 3365|     40|    libcrux_sha3_generic_keccak_KeccakState_48 s =
 3366|     40|        libcrux_sha3_generic_keccak_new_1e_cf();
 3367|     40|    for (size_t i = (size_t)0U;
 3368|     40|         i < Eurydice_slice_len(data[0U], uint8_t) / (size_t)72U; i++) {
  ------------------
  |  |   82|     40|#define Eurydice_slice_len(s, t) EURYDICE_SLICE_LEN(s, t)
  |  |  ------------------
  |  |  |  |   51|     40|#define EURYDICE_SLICE_LEN(s, _) s.len
  |  |  ------------------
  ------------------
  |  Branch (3368:10): [True: 0, False: 40]
  ------------------
 3369|      0|        size_t i0 = i;
 3370|      0|        libcrux_sha3_generic_keccak_KeccakState_48 *uu____0 = &s;
 3371|       |        /* Passing arrays by value in Rust generates a copy in C */
 3372|      0|        Eurydice_slice copy_of_data[1U];
 3373|      0|        memcpy(copy_of_data, data, (size_t)1U * sizeof(Eurydice_slice));
 3374|      0|        Eurydice_slice ret[1U];
 3375|      0|        libcrux_sha3_portable_keccak_slice_n_5a(copy_of_data, i0 * (size_t)72U,
 3376|      0|                                                (size_t)72U, ret);
 3377|      0|        libcrux_sha3_generic_keccak_absorb_block_40(uu____0, ret);
 3378|      0|    }
 3379|     40|    size_t rem = Eurydice_slice_len(data[0U], uint8_t) % (size_t)72U;
  ------------------
  |  |   82|     40|#define Eurydice_slice_len(s, t) EURYDICE_SLICE_LEN(s, t)
  |  |  ------------------
  |  |  |  |   51|     40|#define EURYDICE_SLICE_LEN(s, _) s.len
  |  |  ------------------
  ------------------
 3380|     40|    libcrux_sha3_generic_keccak_KeccakState_48 *uu____2 = &s;
 3381|       |    /* Passing arrays by value in Rust generates a copy in C */
 3382|     40|    Eurydice_slice copy_of_data[1U];
 3383|     40|    memcpy(copy_of_data, data, (size_t)1U * sizeof(Eurydice_slice));
 3384|     40|    Eurydice_slice ret[1U];
 3385|     40|    libcrux_sha3_portable_keccak_slice_n_5a(
 3386|     40|        copy_of_data, Eurydice_slice_len(data[0U], uint8_t) - rem, rem, ret);
  ------------------
  |  |   82|     40|#define Eurydice_slice_len(s, t) EURYDICE_SLICE_LEN(s, t)
  |  |  ------------------
  |  |  |  |   51|     40|#define EURYDICE_SLICE_LEN(s, _) s.len
  |  |  ------------------
  ------------------
 3387|     40|    libcrux_sha3_generic_keccak_absorb_final_401(uu____2, ret);
 3388|     40|    size_t outlen = Eurydice_slice_len(out[0U], uint8_t);
  ------------------
  |  |   82|     40|#define Eurydice_slice_len(s, t) EURYDICE_SLICE_LEN(s, t)
  |  |  ------------------
  |  |  |  |   51|     40|#define EURYDICE_SLICE_LEN(s, _) s.len
  |  |  ------------------
  ------------------
 3389|     40|    size_t blocks = outlen / (size_t)72U;
 3390|     40|    size_t last = outlen - outlen % (size_t)72U;
 3391|     40|    if (blocks == (size_t)0U) {
  ------------------
  |  Branch (3391:9): [True: 40, False: 0]
  ------------------
 3392|     40|        libcrux_sha3_generic_keccak_squeeze_first_and_last_88(&s, out);
 3393|     40|    } else {
 3394|      0|        Eurydice_slice_uint8_t_1size_t__x2 uu____4 =
 3395|      0|            libcrux_sha3_portable_keccak_split_at_mut_n_5a(out, (size_t)72U);
 3396|      0|        Eurydice_slice o0[1U];
 3397|      0|        memcpy(o0, uu____4.fst, (size_t)1U * sizeof(Eurydice_slice));
 3398|      0|        Eurydice_slice o1[1U];
 3399|      0|        memcpy(o1, uu____4.snd, (size_t)1U * sizeof(Eurydice_slice));
 3400|      0|        libcrux_sha3_generic_keccak_squeeze_first_block_7b1(&s, o0);
 3401|      0|        core_ops_range_Range_b3 iter =
 3402|      0|            core_iter_traits_collect___core__iter__traits__collect__IntoIterator_for_I__1__into_iter(
  ------------------
  |  |  246|      0|    Eurydice_into_iter
  |  |  ------------------
  |  |  |  |  241|      0|#define Eurydice_into_iter(x, t, _ret_t) (x)
  |  |  ------------------
  ------------------
 3403|      0|                (CLITERAL(core_ops_range_Range_b3){ .start = (size_t)1U,
 3404|      0|                                                    .end = blocks }),
 3405|      0|                core_ops_range_Range_b3, core_ops_range_Range_b3);
 3406|      0|        while (true) {
 3407|      0|            if (core_iter_range___core__iter__traits__iterator__Iterator_for_core__ops__range__Range_A___6__next(
  ------------------
  |  |  238|      0|    Eurydice_range_iter_next
  |  |  ------------------
  |  |  |  |  228|      0|    (((iter_ptr)->start == (iter_ptr)->end)             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (228:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  229|      0|         ? (CLITERAL(ret_t){ .tag = core_option_None }) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define CLITERAL(type) (type)
  |  |  |  |  ------------------
  |  |  |  |                        ? (CLITERAL(ret_t){ .tag = core_option_None }) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|      0|#define core_option_None 0
  |  |  |  |  ------------------
  |  |  |  |  230|      0|         : (CLITERAL(ret_t){ .tag = core_option_Some,   \
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define CLITERAL(type) (type)
  |  |  |  |  ------------------
  |  |  |  |                        : (CLITERAL(ret_t){ .tag = core_option_Some,   \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|      0|#define core_option_Some 1
  |  |  |  |  ------------------
  |  |  |  |  231|      0|                             .f0 = (iter_ptr)->start++ }))
  |  |  ------------------
  ------------------
  |  Branch (3407:17): [True: 0, False: 0]
  ------------------
 3408|      0|                    &iter, size_t, core_option_Option_b3)
 3409|      0|                    .tag == core_option_None) {
  ------------------
  |  |   38|      0|#define core_option_None 0
  ------------------
 3410|      0|                break;
 3411|      0|            } else {
 3412|      0|                Eurydice_slice_uint8_t_1size_t__x2 uu____5 =
 3413|      0|                    libcrux_sha3_portable_keccak_split_at_mut_n_5a(o1, (size_t)72U);
 3414|      0|                Eurydice_slice o[1U];
 3415|      0|                memcpy(o, uu____5.fst, (size_t)1U * sizeof(Eurydice_slice));
 3416|      0|                Eurydice_slice orest[1U];
 3417|      0|                memcpy(orest, uu____5.snd, (size_t)1U * sizeof(Eurydice_slice));
 3418|      0|                libcrux_sha3_generic_keccak_squeeze_next_block_c21(&s, o);
 3419|      0|                memcpy(o1, orest, (size_t)1U * sizeof(Eurydice_slice));
 3420|      0|            }
 3421|      0|        }
 3422|      0|        if (last < outlen) {
  ------------------
  |  Branch (3422:13): [True: 0, False: 0]
  ------------------
 3423|      0|            libcrux_sha3_generic_keccak_squeeze_last_ca(s, o1);
 3424|      0|        }
 3425|      0|    }
 3426|     40|}
libcrux_mlkem_portable.c:libcrux_sha3_generic_keccak_new_1e_cf:
  227|    680|{
  228|    680|    libcrux_sha3_generic_keccak_KeccakState_48 lit;
  229|    680|    lit.st[0U][0U] = libcrux_sha3_portable_keccak_zero_5a();
  230|    680|    lit.st[0U][1U] = libcrux_sha3_portable_keccak_zero_5a();
  231|    680|    lit.st[0U][2U] = libcrux_sha3_portable_keccak_zero_5a();
  232|    680|    lit.st[0U][3U] = libcrux_sha3_portable_keccak_zero_5a();
  233|    680|    lit.st[0U][4U] = libcrux_sha3_portable_keccak_zero_5a();
  234|    680|    lit.st[1U][0U] = libcrux_sha3_portable_keccak_zero_5a();
  235|    680|    lit.st[1U][1U] = libcrux_sha3_portable_keccak_zero_5a();
  236|    680|    lit.st[1U][2U] = libcrux_sha3_portable_keccak_zero_5a();
  237|    680|    lit.st[1U][3U] = libcrux_sha3_portable_keccak_zero_5a();
  238|    680|    lit.st[1U][4U] = libcrux_sha3_portable_keccak_zero_5a();
  239|    680|    lit.st[2U][0U] = libcrux_sha3_portable_keccak_zero_5a();
  240|    680|    lit.st[2U][1U] = libcrux_sha3_portable_keccak_zero_5a();
  241|    680|    lit.st[2U][2U] = libcrux_sha3_portable_keccak_zero_5a();
  242|    680|    lit.st[2U][3U] = libcrux_sha3_portable_keccak_zero_5a();
  243|    680|    lit.st[2U][4U] = libcrux_sha3_portable_keccak_zero_5a();
  244|    680|    lit.st[3U][0U] = libcrux_sha3_portable_keccak_zero_5a();
  245|    680|    lit.st[3U][1U] = libcrux_sha3_portable_keccak_zero_5a();
  246|    680|    lit.st[3U][2U] = libcrux_sha3_portable_keccak_zero_5a();
  247|    680|    lit.st[3U][3U] = libcrux_sha3_portable_keccak_zero_5a();
  248|    680|    lit.st[3U][4U] = libcrux_sha3_portable_keccak_zero_5a();
  249|    680|    lit.st[4U][0U] = libcrux_sha3_portable_keccak_zero_5a();
  250|    680|    lit.st[4U][1U] = libcrux_sha3_portable_keccak_zero_5a();
  251|    680|    lit.st[4U][2U] = libcrux_sha3_portable_keccak_zero_5a();
  252|    680|    lit.st[4U][3U] = libcrux_sha3_portable_keccak_zero_5a();
  253|    680|    lit.st[4U][4U] = libcrux_sha3_portable_keccak_zero_5a();
  254|    680|    return lit;
  255|    680|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_zero_5a:
   57|  17.0k|{
   58|  17.0k|    return 0ULL;
   59|  17.0k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_slice_n_5a:
  168|    640|{
  169|       |    /* Passing arrays by value in Rust generates a copy in C */
  170|    640|    Eurydice_slice copy_of_a[1U];
  171|    640|    memcpy(copy_of_a, a, (size_t)1U * sizeof(Eurydice_slice));
  172|    640|    Eurydice_slice ret0[1U];
  173|    640|    libcrux_sha3_portable_keccak_slice_1(copy_of_a, start, len, ret0);
  174|    640|    memcpy(ret, ret0, (size_t)1U * sizeof(Eurydice_slice));
  175|    640|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_slice_1:
  157|    640|{
  158|    640|    ret[0U] = Eurydice_slice_subslice2(a[0U], start, start + len, uint8_t);
  ------------------
  |  |   63|    640|    EURYDICE_SLICE((t *)s.ptr, start, end)
  |  |  ------------------
  |  |  |  |   50|    640|    (CLITERAL(Eurydice_slice){ .ptr = (void *)(x + start), .len = end - start })
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|    640|#define CLITERAL(type) (type)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  159|    640|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_load_block_651:
 3071|     40|{
 3072|    400|    for (size_t i = (size_t)0U; i < (size_t)72U / (size_t)8U; i++) {
  ------------------
  |  Branch (3072:33): [True: 360, False: 40]
  ------------------
 3073|    360|        size_t i0 = i;
 3074|    360|        uint8_t uu____0[8U];
 3075|    360|        core_result_Result_56 dst;
 3076|    360|        Eurydice_slice_to_array2(
  ------------------
  |  |  116|    360|    Eurydice_slice_to_array3(&(dst)->tag, (char *)&(dst)->val.case_Ok, src, \
  |  |  117|    360|                             sizeof(t_arr))
  ------------------
 3077|    360|            &dst,
 3078|    360|            Eurydice_slice_subslice2(blocks[0U], (size_t)8U * i0,
 3079|    360|                                     (size_t)8U * i0 + (size_t)8U, uint8_t),
 3080|    360|            Eurydice_slice, uint8_t[8U]);
 3081|    360|        core_result_unwrap_41_0e(dst, uu____0);
 3082|    360|        size_t uu____1 = i0 / (size_t)5U;
 3083|    360|        size_t uu____2 = i0 % (size_t)5U;
 3084|    360|        s[uu____1][uu____2] =
 3085|    360|            s[uu____1][uu____2] ^ core_num__u64_9__from_le_bytes(uu____0);
 3086|    360|    }
 3087|     40|}
libcrux_mlkem_portable.c:libcrux_sha3_generic_keccak_keccakf1600_b8:
 1466|  1.72k|{
 1467|  43.0k|    for (size_t i = (size_t)0U; i < (size_t)24U; i++) {
  ------------------
  |  Branch (1467:33): [True: 41.2k, False: 1.72k]
  ------------------
 1468|  41.2k|        size_t i0 = i;
 1469|  41.2k|        libcrux_sha3_generic_keccak_theta_rho_a7(s);
 1470|  41.2k|        libcrux_sha3_generic_keccak_pi_d5(s);
 1471|  41.2k|        libcrux_sha3_generic_keccak_chi_3e(s);
 1472|  41.2k|        libcrux_sha3_generic_keccak_iota_00(s, i0);
 1473|  41.2k|    }
 1474|  1.72k|}
libcrux_mlkem_portable.c:libcrux_sha3_generic_keccak_theta_rho_a7:
 1299|  41.2k|{
 1300|  41.2k|    uint64_t c[5U] = {
 1301|  41.2k|        libcrux_sha3_portable_keccak_xor5_5a(s->st[0U][0U], s->st[1U][0U],
 1302|  41.2k|                                             s->st[2U][0U], s->st[3U][0U],
 1303|  41.2k|                                             s->st[4U][0U]),
 1304|  41.2k|        libcrux_sha3_portable_keccak_xor5_5a(s->st[0U][1U], s->st[1U][1U],
 1305|  41.2k|                                             s->st[2U][1U], s->st[3U][1U],
 1306|  41.2k|                                             s->st[4U][1U]),
 1307|  41.2k|        libcrux_sha3_portable_keccak_xor5_5a(s->st[0U][2U], s->st[1U][2U],
 1308|  41.2k|                                             s->st[2U][2U], s->st[3U][2U],
 1309|  41.2k|                                             s->st[4U][2U]),
 1310|  41.2k|        libcrux_sha3_portable_keccak_xor5_5a(s->st[0U][3U], s->st[1U][3U],
 1311|  41.2k|                                             s->st[2U][3U], s->st[3U][3U],
 1312|  41.2k|                                             s->st[4U][3U]),
 1313|  41.2k|        libcrux_sha3_portable_keccak_xor5_5a(s->st[0U][4U], s->st[1U][4U],
 1314|  41.2k|                                             s->st[2U][4U], s->st[3U][4U],
 1315|  41.2k|                                             s->st[4U][4U])
 1316|  41.2k|    };
 1317|  41.2k|    uint64_t uu____0 = libcrux_sha3_portable_keccak_rotate_left1_and_xor_5a(
 1318|  41.2k|        c[((size_t)0U + (size_t)4U) % (size_t)5U],
 1319|  41.2k|        c[((size_t)0U + (size_t)1U) % (size_t)5U]);
 1320|  41.2k|    uint64_t uu____1 = libcrux_sha3_portable_keccak_rotate_left1_and_xor_5a(
 1321|  41.2k|        c[((size_t)1U + (size_t)4U) % (size_t)5U],
 1322|  41.2k|        c[((size_t)1U + (size_t)1U) % (size_t)5U]);
 1323|  41.2k|    uint64_t uu____2 = libcrux_sha3_portable_keccak_rotate_left1_and_xor_5a(
 1324|  41.2k|        c[((size_t)2U + (size_t)4U) % (size_t)5U],
 1325|  41.2k|        c[((size_t)2U + (size_t)1U) % (size_t)5U]);
 1326|  41.2k|    uint64_t uu____3 = libcrux_sha3_portable_keccak_rotate_left1_and_xor_5a(
 1327|  41.2k|        c[((size_t)3U + (size_t)4U) % (size_t)5U],
 1328|  41.2k|        c[((size_t)3U + (size_t)1U) % (size_t)5U]);
 1329|  41.2k|    uint64_t t[5U] = { uu____0, uu____1, uu____2, uu____3,
 1330|  41.2k|                       libcrux_sha3_portable_keccak_rotate_left1_and_xor_5a(
 1331|  41.2k|                           c[((size_t)4U + (size_t)4U) % (size_t)5U],
 1332|  41.2k|                           c[((size_t)4U + (size_t)1U) % (size_t)5U]) };
 1333|  41.2k|    s->st[0U][0U] = libcrux_sha3_portable_keccak_xor_5a(s->st[0U][0U], t[0U]);
 1334|  41.2k|    s->st[1U][0U] =
 1335|  41.2k|        libcrux_sha3_portable_keccak_xor_and_rotate_5a_03(s->st[1U][0U], t[0U]);
 1336|  41.2k|    s->st[2U][0U] =
 1337|  41.2k|        libcrux_sha3_portable_keccak_xor_and_rotate_5a_030(s->st[2U][0U], t[0U]);
 1338|  41.2k|    s->st[3U][0U] =
 1339|  41.2k|        libcrux_sha3_portable_keccak_xor_and_rotate_5a_031(s->st[3U][0U], t[0U]);
 1340|  41.2k|    s->st[4U][0U] =
 1341|  41.2k|        libcrux_sha3_portable_keccak_xor_and_rotate_5a_032(s->st[4U][0U], t[0U]);
 1342|  41.2k|    s->st[0U][1U] =
 1343|  41.2k|        libcrux_sha3_portable_keccak_xor_and_rotate_5a_033(s->st[0U][1U], t[1U]);
 1344|  41.2k|    s->st[1U][1U] =
 1345|  41.2k|        libcrux_sha3_portable_keccak_xor_and_rotate_5a_034(s->st[1U][1U], t[1U]);
 1346|  41.2k|    s->st[2U][1U] =
 1347|  41.2k|        libcrux_sha3_portable_keccak_xor_and_rotate_5a_035(s->st[2U][1U], t[1U]);
 1348|  41.2k|    s->st[3U][1U] =
 1349|  41.2k|        libcrux_sha3_portable_keccak_xor_and_rotate_5a_036(s->st[3U][1U], t[1U]);
 1350|  41.2k|    s->st[4U][1U] =
 1351|  41.2k|        libcrux_sha3_portable_keccak_xor_and_rotate_5a_037(s->st[4U][1U], t[1U]);
 1352|  41.2k|    s->st[0U][2U] =
 1353|  41.2k|        libcrux_sha3_portable_keccak_xor_and_rotate_5a_038(s->st[0U][2U], t[2U]);
 1354|  41.2k|    s->st[1U][2U] =
 1355|  41.2k|        libcrux_sha3_portable_keccak_xor_and_rotate_5a_039(s->st[1U][2U], t[2U]);
 1356|  41.2k|    s->st[2U][2U] =
 1357|  41.2k|        libcrux_sha3_portable_keccak_xor_and_rotate_5a_0310(s->st[2U][2U], t[2U]);
 1358|  41.2k|    s->st[3U][2U] =
 1359|  41.2k|        libcrux_sha3_portable_keccak_xor_and_rotate_5a_0311(s->st[3U][2U], t[2U]);
 1360|  41.2k|    s->st[4U][2U] =
 1361|  41.2k|        libcrux_sha3_portable_keccak_xor_and_rotate_5a_0312(s->st[4U][2U], t[2U]);
 1362|  41.2k|    s->st[0U][3U] =
 1363|  41.2k|        libcrux_sha3_portable_keccak_xor_and_rotate_5a_0313(s->st[0U][3U], t[3U]);
 1364|  41.2k|    s->st[1U][3U] =
 1365|  41.2k|        libcrux_sha3_portable_keccak_xor_and_rotate_5a_0314(s->st[1U][3U], t[3U]);
 1366|  41.2k|    s->st[2U][3U] =
 1367|  41.2k|        libcrux_sha3_portable_keccak_xor_and_rotate_5a_0315(s->st[2U][3U], t[3U]);
 1368|  41.2k|    s->st[3U][3U] =
 1369|  41.2k|        libcrux_sha3_portable_keccak_xor_and_rotate_5a_0316(s->st[3U][3U], t[3U]);
 1370|  41.2k|    s->st[4U][3U] =
 1371|  41.2k|        libcrux_sha3_portable_keccak_xor_and_rotate_5a_0317(s->st[4U][3U], t[3U]);
 1372|  41.2k|    s->st[0U][4U] =
 1373|  41.2k|        libcrux_sha3_portable_keccak_xor_and_rotate_5a_0318(s->st[0U][4U], t[4U]);
 1374|  41.2k|    s->st[1U][4U] =
 1375|  41.2k|        libcrux_sha3_portable_keccak_xor_and_rotate_5a_0319(s->st[1U][4U], t[4U]);
 1376|  41.2k|    s->st[2U][4U] =
 1377|  41.2k|        libcrux_sha3_portable_keccak_xor_and_rotate_5a_0320(s->st[2U][4U], t[4U]);
 1378|  41.2k|    s->st[3U][4U] =
 1379|  41.2k|        libcrux_sha3_portable_keccak_xor_and_rotate_5a_0321(s->st[3U][4U], t[4U]);
 1380|  41.2k|    uint64_t uu____27 =
 1381|  41.2k|        libcrux_sha3_portable_keccak_xor_and_rotate_5a_0322(s->st[4U][4U], t[4U]);
 1382|  41.2k|    s->st[4U][4U] = uu____27;
 1383|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_xor5_5a:
   78|   206k|{
   79|   206k|    return libcrux_sha3_portable_keccak__veor5q_u64(a, b, c, d, e);
   80|   206k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak__veor5q_u64:
   64|   206k|{
   65|   206k|    uint64_t ab = a ^ b;
   66|   206k|    uint64_t cd = c ^ d;
   67|   206k|    uint64_t abcd = ab ^ cd;
   68|   206k|    return abcd ^ e;
   69|   206k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_rotate_left1_and_xor_5a:
  107|   206k|{
  108|   206k|    return libcrux_sha3_portable_keccak__vrax1q_u64(a, b);
  109|   206k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak__vrax1q_u64:
   96|   206k|{
   97|   206k|    uint64_t uu____0 = a;
   98|   206k|    return uu____0 ^ libcrux_sha3_portable_keccak_rotate_left_d6(b);
   99|   206k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_rotate_left_d6:
   90|   247k|{
   91|   247k|    return x << (uint32_t)(int32_t)1 | x >> (uint32_t)(int32_t)63;
   92|   247k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_xor_5a:
  150|  41.2k|{
  151|  41.2k|    return a ^ b;
  152|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_xor_and_rotate_5a_03:
  355|  41.2k|{
  356|  41.2k|    return libcrux_sha3_portable_keccak__vxarq_u64_74(a, b);
  357|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak__vxarq_u64_74:
  338|  41.2k|{
  339|  41.2k|    uint64_t ab = a ^ b;
  340|  41.2k|    return libcrux_sha3_portable_keccak_rotate_left_d60(ab);
  341|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_rotate_left_d60:
  326|  41.2k|{
  327|  41.2k|    return x << (uint32_t)(int32_t)36 | x >> (uint32_t)(int32_t)28;
  328|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_xor_and_rotate_5a_030:
  396|  41.2k|{
  397|  41.2k|    return libcrux_sha3_portable_keccak__vxarq_u64_740(a, b);
  398|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak__vxarq_u64_740:
  379|  41.2k|{
  380|  41.2k|    uint64_t ab = a ^ b;
  381|  41.2k|    return libcrux_sha3_portable_keccak_rotate_left_d61(ab);
  382|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_rotate_left_d61:
  367|  41.2k|{
  368|  41.2k|    return x << (uint32_t)(int32_t)3 | x >> (uint32_t)(int32_t)61;
  369|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_xor_and_rotate_5a_031:
  437|  41.2k|{
  438|  41.2k|    return libcrux_sha3_portable_keccak__vxarq_u64_741(a, b);
  439|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak__vxarq_u64_741:
  420|  41.2k|{
  421|  41.2k|    uint64_t ab = a ^ b;
  422|  41.2k|    return libcrux_sha3_portable_keccak_rotate_left_d62(ab);
  423|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_rotate_left_d62:
  408|  41.2k|{
  409|  41.2k|    return x << (uint32_t)(int32_t)41 | x >> (uint32_t)(int32_t)23;
  410|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_xor_and_rotate_5a_032:
  478|  41.2k|{
  479|  41.2k|    return libcrux_sha3_portable_keccak__vxarq_u64_742(a, b);
  480|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak__vxarq_u64_742:
  461|  41.2k|{
  462|  41.2k|    uint64_t ab = a ^ b;
  463|  41.2k|    return libcrux_sha3_portable_keccak_rotate_left_d63(ab);
  464|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_rotate_left_d63:
  449|  41.2k|{
  450|  41.2k|    return x << (uint32_t)(int32_t)18 | x >> (uint32_t)(int32_t)46;
  451|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_xor_and_rotate_5a_033:
  507|  41.2k|{
  508|  41.2k|    return libcrux_sha3_portable_keccak__vxarq_u64_743(a, b);
  509|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak__vxarq_u64_743:
  490|  41.2k|{
  491|  41.2k|    uint64_t ab = a ^ b;
  492|  41.2k|    return libcrux_sha3_portable_keccak_rotate_left_d6(ab);
  493|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_xor_and_rotate_5a_034:
  548|  41.2k|{
  549|  41.2k|    return libcrux_sha3_portable_keccak__vxarq_u64_744(a, b);
  550|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak__vxarq_u64_744:
  531|  41.2k|{
  532|  41.2k|    uint64_t ab = a ^ b;
  533|  41.2k|    return libcrux_sha3_portable_keccak_rotate_left_d64(ab);
  534|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_rotate_left_d64:
  519|  41.2k|{
  520|  41.2k|    return x << (uint32_t)(int32_t)44 | x >> (uint32_t)(int32_t)20;
  521|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_xor_and_rotate_5a_035:
  589|  41.2k|{
  590|  41.2k|    return libcrux_sha3_portable_keccak__vxarq_u64_745(a, b);
  591|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak__vxarq_u64_745:
  572|  41.2k|{
  573|  41.2k|    uint64_t ab = a ^ b;
  574|  41.2k|    return libcrux_sha3_portable_keccak_rotate_left_d65(ab);
  575|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_rotate_left_d65:
  560|  41.2k|{
  561|  41.2k|    return x << (uint32_t)(int32_t)10 | x >> (uint32_t)(int32_t)54;
  562|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_xor_and_rotate_5a_036:
  630|  41.2k|{
  631|  41.2k|    return libcrux_sha3_portable_keccak__vxarq_u64_746(a, b);
  632|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak__vxarq_u64_746:
  613|  41.2k|{
  614|  41.2k|    uint64_t ab = a ^ b;
  615|  41.2k|    return libcrux_sha3_portable_keccak_rotate_left_d66(ab);
  616|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_rotate_left_d66:
  601|  41.2k|{
  602|  41.2k|    return x << (uint32_t)(int32_t)45 | x >> (uint32_t)(int32_t)19;
  603|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_xor_and_rotate_5a_037:
  671|  41.2k|{
  672|  41.2k|    return libcrux_sha3_portable_keccak__vxarq_u64_747(a, b);
  673|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak__vxarq_u64_747:
  654|  41.2k|{
  655|  41.2k|    uint64_t ab = a ^ b;
  656|  41.2k|    return libcrux_sha3_portable_keccak_rotate_left_d67(ab);
  657|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_rotate_left_d67:
  642|  41.2k|{
  643|  41.2k|    return x << (uint32_t)(int32_t)2 | x >> (uint32_t)(int32_t)62;
  644|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_xor_and_rotate_5a_038:
  712|  41.2k|{
  713|  41.2k|    return libcrux_sha3_portable_keccak__vxarq_u64_748(a, b);
  714|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak__vxarq_u64_748:
  695|  41.2k|{
  696|  41.2k|    uint64_t ab = a ^ b;
  697|  41.2k|    return libcrux_sha3_portable_keccak_rotate_left_d68(ab);
  698|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_rotate_left_d68:
  683|  41.2k|{
  684|  41.2k|    return x << (uint32_t)(int32_t)62 | x >> (uint32_t)(int32_t)2;
  685|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_xor_and_rotate_5a_039:
  753|  41.2k|{
  754|  41.2k|    return libcrux_sha3_portable_keccak__vxarq_u64_749(a, b);
  755|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak__vxarq_u64_749:
  736|  41.2k|{
  737|  41.2k|    uint64_t ab = a ^ b;
  738|  41.2k|    return libcrux_sha3_portable_keccak_rotate_left_d69(ab);
  739|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_rotate_left_d69:
  724|  41.2k|{
  725|  41.2k|    return x << (uint32_t)(int32_t)6 | x >> (uint32_t)(int32_t)58;
  726|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_xor_and_rotate_5a_0310:
  794|  41.2k|{
  795|  41.2k|    return libcrux_sha3_portable_keccak__vxarq_u64_7410(a, b);
  796|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak__vxarq_u64_7410:
  777|  41.2k|{
  778|  41.2k|    uint64_t ab = a ^ b;
  779|  41.2k|    return libcrux_sha3_portable_keccak_rotate_left_d610(ab);
  780|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_rotate_left_d610:
  765|  41.2k|{
  766|  41.2k|    return x << (uint32_t)(int32_t)43 | x >> (uint32_t)(int32_t)21;
  767|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_xor_and_rotate_5a_0311:
  835|  41.2k|{
  836|  41.2k|    return libcrux_sha3_portable_keccak__vxarq_u64_7411(a, b);
  837|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak__vxarq_u64_7411:
  818|  41.2k|{
  819|  41.2k|    uint64_t ab = a ^ b;
  820|  41.2k|    return libcrux_sha3_portable_keccak_rotate_left_d611(ab);
  821|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_rotate_left_d611:
  806|  41.2k|{
  807|  41.2k|    return x << (uint32_t)(int32_t)15 | x >> (uint32_t)(int32_t)49;
  808|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_xor_and_rotate_5a_0312:
  876|  41.2k|{
  877|  41.2k|    return libcrux_sha3_portable_keccak__vxarq_u64_7412(a, b);
  878|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak__vxarq_u64_7412:
  859|  41.2k|{
  860|  41.2k|    uint64_t ab = a ^ b;
  861|  41.2k|    return libcrux_sha3_portable_keccak_rotate_left_d612(ab);
  862|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_rotate_left_d612:
  847|  41.2k|{
  848|  41.2k|    return x << (uint32_t)(int32_t)61 | x >> (uint32_t)(int32_t)3;
  849|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_xor_and_rotate_5a_0313:
  917|  41.2k|{
  918|  41.2k|    return libcrux_sha3_portable_keccak__vxarq_u64_7413(a, b);
  919|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak__vxarq_u64_7413:
  900|  41.2k|{
  901|  41.2k|    uint64_t ab = a ^ b;
  902|  41.2k|    return libcrux_sha3_portable_keccak_rotate_left_d613(ab);
  903|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_rotate_left_d613:
  888|  41.2k|{
  889|  41.2k|    return x << (uint32_t)(int32_t)28 | x >> (uint32_t)(int32_t)36;
  890|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_xor_and_rotate_5a_0314:
  958|  41.2k|{
  959|  41.2k|    return libcrux_sha3_portable_keccak__vxarq_u64_7414(a, b);
  960|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak__vxarq_u64_7414:
  941|  41.2k|{
  942|  41.2k|    uint64_t ab = a ^ b;
  943|  41.2k|    return libcrux_sha3_portable_keccak_rotate_left_d614(ab);
  944|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_rotate_left_d614:
  929|  41.2k|{
  930|  41.2k|    return x << (uint32_t)(int32_t)55 | x >> (uint32_t)(int32_t)9;
  931|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_xor_and_rotate_5a_0315:
  999|  41.2k|{
 1000|  41.2k|    return libcrux_sha3_portable_keccak__vxarq_u64_7415(a, b);
 1001|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak__vxarq_u64_7415:
  982|  41.2k|{
  983|  41.2k|    uint64_t ab = a ^ b;
  984|  41.2k|    return libcrux_sha3_portable_keccak_rotate_left_d615(ab);
  985|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_rotate_left_d615:
  970|  41.2k|{
  971|  41.2k|    return x << (uint32_t)(int32_t)25 | x >> (uint32_t)(int32_t)39;
  972|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_xor_and_rotate_5a_0316:
 1040|  41.2k|{
 1041|  41.2k|    return libcrux_sha3_portable_keccak__vxarq_u64_7416(a, b);
 1042|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak__vxarq_u64_7416:
 1023|  41.2k|{
 1024|  41.2k|    uint64_t ab = a ^ b;
 1025|  41.2k|    return libcrux_sha3_portable_keccak_rotate_left_d616(ab);
 1026|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_rotate_left_d616:
 1011|  41.2k|{
 1012|  41.2k|    return x << (uint32_t)(int32_t)21 | x >> (uint32_t)(int32_t)43;
 1013|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_xor_and_rotate_5a_0317:
 1081|  41.2k|{
 1082|  41.2k|    return libcrux_sha3_portable_keccak__vxarq_u64_7417(a, b);
 1083|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak__vxarq_u64_7417:
 1064|  41.2k|{
 1065|  41.2k|    uint64_t ab = a ^ b;
 1066|  41.2k|    return libcrux_sha3_portable_keccak_rotate_left_d617(ab);
 1067|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_rotate_left_d617:
 1052|  41.2k|{
 1053|  41.2k|    return x << (uint32_t)(int32_t)56 | x >> (uint32_t)(int32_t)8;
 1054|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_xor_and_rotate_5a_0318:
 1122|  41.2k|{
 1123|  41.2k|    return libcrux_sha3_portable_keccak__vxarq_u64_7418(a, b);
 1124|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak__vxarq_u64_7418:
 1105|  41.2k|{
 1106|  41.2k|    uint64_t ab = a ^ b;
 1107|  41.2k|    return libcrux_sha3_portable_keccak_rotate_left_d618(ab);
 1108|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_rotate_left_d618:
 1093|  41.2k|{
 1094|  41.2k|    return x << (uint32_t)(int32_t)27 | x >> (uint32_t)(int32_t)37;
 1095|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_xor_and_rotate_5a_0319:
 1163|  41.2k|{
 1164|  41.2k|    return libcrux_sha3_portable_keccak__vxarq_u64_7419(a, b);
 1165|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak__vxarq_u64_7419:
 1146|  41.2k|{
 1147|  41.2k|    uint64_t ab = a ^ b;
 1148|  41.2k|    return libcrux_sha3_portable_keccak_rotate_left_d619(ab);
 1149|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_rotate_left_d619:
 1134|  41.2k|{
 1135|  41.2k|    return x << (uint32_t)(int32_t)20 | x >> (uint32_t)(int32_t)44;
 1136|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_xor_and_rotate_5a_0320:
 1204|  41.2k|{
 1205|  41.2k|    return libcrux_sha3_portable_keccak__vxarq_u64_7420(a, b);
 1206|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak__vxarq_u64_7420:
 1187|  41.2k|{
 1188|  41.2k|    uint64_t ab = a ^ b;
 1189|  41.2k|    return libcrux_sha3_portable_keccak_rotate_left_d620(ab);
 1190|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_rotate_left_d620:
 1175|  41.2k|{
 1176|  41.2k|    return x << (uint32_t)(int32_t)39 | x >> (uint32_t)(int32_t)25;
 1177|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_xor_and_rotate_5a_0321:
 1245|  41.2k|{
 1246|  41.2k|    return libcrux_sha3_portable_keccak__vxarq_u64_7421(a, b);
 1247|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak__vxarq_u64_7421:
 1228|  41.2k|{
 1229|  41.2k|    uint64_t ab = a ^ b;
 1230|  41.2k|    return libcrux_sha3_portable_keccak_rotate_left_d621(ab);
 1231|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_rotate_left_d621:
 1216|  41.2k|{
 1217|  41.2k|    return x << (uint32_t)(int32_t)8 | x >> (uint32_t)(int32_t)56;
 1218|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_xor_and_rotate_5a_0322:
 1286|  41.2k|{
 1287|  41.2k|    return libcrux_sha3_portable_keccak__vxarq_u64_7422(a, b);
 1288|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak__vxarq_u64_7422:
 1269|  41.2k|{
 1270|  41.2k|    uint64_t ab = a ^ b;
 1271|  41.2k|    return libcrux_sha3_portable_keccak_rotate_left_d622(ab);
 1272|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_rotate_left_d622:
 1257|  41.2k|{
 1258|  41.2k|    return x << (uint32_t)(int32_t)14 | x >> (uint32_t)(int32_t)50;
 1259|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_generic_keccak_pi_d5:
 1394|  41.2k|{
 1395|  41.2k|    uint64_t old[5U][5U];
 1396|  41.2k|    memcpy(old, s->st, (size_t)5U * sizeof(uint64_t[5U]));
 1397|  41.2k|    s->st[0U][1U] = old[1U][1U];
 1398|  41.2k|    s->st[0U][2U] = old[2U][2U];
 1399|  41.2k|    s->st[0U][3U] = old[3U][3U];
 1400|  41.2k|    s->st[0U][4U] = old[4U][4U];
 1401|  41.2k|    s->st[1U][0U] = old[0U][3U];
 1402|  41.2k|    s->st[1U][1U] = old[1U][4U];
 1403|  41.2k|    s->st[1U][2U] = old[2U][0U];
 1404|  41.2k|    s->st[1U][3U] = old[3U][1U];
 1405|  41.2k|    s->st[1U][4U] = old[4U][2U];
 1406|  41.2k|    s->st[2U][0U] = old[0U][1U];
 1407|  41.2k|    s->st[2U][1U] = old[1U][2U];
 1408|  41.2k|    s->st[2U][2U] = old[2U][3U];
 1409|  41.2k|    s->st[2U][3U] = old[3U][4U];
 1410|  41.2k|    s->st[2U][4U] = old[4U][0U];
 1411|  41.2k|    s->st[3U][0U] = old[0U][4U];
 1412|  41.2k|    s->st[3U][1U] = old[1U][0U];
 1413|  41.2k|    s->st[3U][2U] = old[2U][1U];
 1414|  41.2k|    s->st[3U][3U] = old[3U][2U];
 1415|  41.2k|    s->st[3U][4U] = old[4U][3U];
 1416|  41.2k|    s->st[4U][0U] = old[0U][2U];
 1417|  41.2k|    s->st[4U][1U] = old[1U][3U];
 1418|  41.2k|    s->st[4U][2U] = old[2U][4U];
 1419|  41.2k|    s->st[4U][3U] = old[3U][0U];
 1420|  41.2k|    s->st[4U][4U] = old[4U][1U];
 1421|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_generic_keccak_chi_3e:
 1432|  41.2k|{
 1433|  41.2k|    uint64_t old[5U][5U];
 1434|  41.2k|    memcpy(old, s->st, (size_t)5U * sizeof(uint64_t[5U]));
 1435|  41.2k|    KRML_MAYBE_FOR5(
  ------------------
  |  |  336|  41.2k|#define KRML_MAYBE_FOR5(i, z, n, k, x) KRML_UNROLL_FOR(i, z, 5, k, x)
  |  |  ------------------
  |  |  |  |  288|  41.2k|    do {                               \
  |  |  |  |  289|  41.2k|        uint32_t i = z;                \
  |  |  |  |  290|  41.2k|        KRML_LOOP##n(i, k, x)          \
  |  |  |  |  291|  41.2k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (291:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1436|  41.2k|        i0, (size_t)0U, (size_t)5U, (size_t)1U, size_t i1 = i0; KRML_MAYBE_FOR5(
 1437|  41.2k|            i, (size_t)0U, (size_t)5U, (size_t)1U, size_t j = i;
 1438|  41.2k|            s->st[i1][j] = libcrux_sha3_portable_keccak_and_not_xor_5a(
 1439|  41.2k|                s->st[i1][j], old[i1][(j + (size_t)2U) % (size_t)5U],
 1440|  41.2k|                old[i1][(j + (size_t)1U) % (size_t)5U]);););
 1441|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_and_not_xor_5a:
  124|  1.03M|{
  125|  1.03M|    return libcrux_sha3_portable_keccak__vbcaxq_u64(a, b, c);
  126|  1.03M|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak__vbcaxq_u64:
  113|  1.03M|{
  114|  1.03M|    return a ^ (b & ~c);
  115|  1.03M|}
libcrux_mlkem_portable.c:libcrux_sha3_generic_keccak_iota_00:
 1452|  41.2k|{
 1453|  41.2k|    s->st[0U][0U] = libcrux_sha3_portable_keccak_xor_constant_5a(
 1454|  41.2k|        s->st[0U][0U], libcrux_sha3_generic_keccak_ROUNDCONSTANTS[i]);
 1455|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_xor_constant_5a:
  140|  41.2k|{
  141|  41.2k|    return libcrux_sha3_portable_keccak__veorq_n_u64(a, c);
  142|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak__veorq_n_u64:
  130|  41.2k|{
  131|  41.2k|    return a ^ c;
  132|  41.2k|}
libcrux_mlkem_portable.c:libcrux_sha3_generic_keccak_absorb_final_401:
 3173|     40|{
 3174|     40|    size_t last_len = Eurydice_slice_len(last[0U], uint8_t);
  ------------------
  |  |   82|     40|#define Eurydice_slice_len(s, t) EURYDICE_SLICE_LEN(s, t)
  |  |  ------------------
  |  |  |  |   51|     40|#define EURYDICE_SLICE_LEN(s, _) s.len
  |  |  ------------------
  ------------------
 3175|     40|    uint8_t blocks[1U][200U] = { { 0U } };
 3176|     40|    {
 3177|     40|        size_t i = (size_t)0U;
 3178|     40|        if (last_len > (size_t)0U) {
  ------------------
  |  Branch (3178:13): [True: 40, False: 0]
  ------------------
 3179|     40|            Eurydice_slice uu____0 =
 3180|     40|                Eurydice_array_to_subslice2(blocks[i], (size_t)0U, last_len, uint8_t);
  ------------------
  |  |   75|     40|    EURYDICE_SLICE((t *)x, start, end)
  |  |  ------------------
  |  |  |  |   50|     40|    (CLITERAL(Eurydice_slice){ .ptr = (void *)(x + start), .len = end - start })
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     40|#define CLITERAL(type) (type)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3181|     40|            Eurydice_slice_copy(uu____0, last[i], uint8_t);
  ------------------
  |  |   84|     40|    memcpy(dst.ptr, src.ptr, dst.len * sizeof(t))
  ------------------
 3182|     40|        }
 3183|     40|        blocks[i][last_len] = 6U;
 3184|     40|        size_t uu____1 = i;
 3185|     40|        size_t uu____2 = (size_t)72U - (size_t)1U;
 3186|     40|        blocks[uu____1][uu____2] = (uint32_t)blocks[uu____1][uu____2] | 128U;
 3187|     40|    }
 3188|     40|    uint64_t(*uu____3)[5U] = s->st;
 3189|     40|    uint8_t uu____4[1U][200U];
 3190|     40|    memcpy(uu____4, blocks, (size_t)1U * sizeof(uint8_t[200U]));
 3191|     40|    libcrux_sha3_portable_keccak_load_block_full_5a_051(uu____3, uu____4);
 3192|     40|    libcrux_sha3_generic_keccak_keccakf1600_b8(s);
 3193|     40|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_load_block_full_5a_051:
 3154|     40|{
 3155|     40|    uint64_t(*uu____0)[5U] = a;
 3156|       |    /* Passing arrays by value in Rust generates a copy in C */
 3157|     40|    uint8_t copy_of_b[1U][200U];
 3158|     40|    memcpy(copy_of_b, b, (size_t)1U * sizeof(uint8_t[200U]));
 3159|     40|    libcrux_sha3_portable_keccak_load_block_full_d41(uu____0, copy_of_b);
 3160|     40|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_load_block_full_d41:
 3135|     40|{
 3136|     40|    Eurydice_slice buf[1U] = {
 3137|     40|        Eurydice_array_to_slice((size_t)200U, blocks[0U], uint8_t)
  ------------------
  |  |   69|     40|    EURYDICE_SLICE(x, 0,                   \
  |  |  ------------------
  |  |  |  |   50|     40|    (CLITERAL(Eurydice_slice){ .ptr = (void *)(x + start), .len = end - start })
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     40|#define CLITERAL(type) (type)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   70|     40|                   end) /* x is already at an array type, no need for cast */
  ------------------
 3138|     40|    };
 3139|     40|    libcrux_sha3_portable_keccak_load_block_651(s, buf);
 3140|     40|}
libcrux_mlkem_portable.c:libcrux_sha3_generic_keccak_squeeze_first_and_last_88:
 3261|     40|{
 3262|     40|    uint8_t b[1U][200U];
 3263|     40|    libcrux_sha3_portable_keccak_store_block_full_5a_27(s->st, b);
 3264|     40|    {
 3265|     40|        size_t i = (size_t)0U;
 3266|     40|        Eurydice_slice uu____0 = out[i];
 3267|     40|        uint8_t *uu____1 = b[i];
 3268|     40|        core_ops_range_Range_b3 lit;
 3269|     40|        lit.start = (size_t)0U;
 3270|     40|        lit.end = Eurydice_slice_len(out[i], uint8_t);
  ------------------
  |  |   82|     40|#define Eurydice_slice_len(s, t) EURYDICE_SLICE_LEN(s, t)
  |  |  ------------------
  |  |  |  |   51|     40|#define EURYDICE_SLICE_LEN(s, _) s.len
  |  |  ------------------
  ------------------
 3271|     40|        Eurydice_slice_copy(
  ------------------
  |  |   84|     40|    memcpy(dst.ptr, src.ptr, dst.len * sizeof(t))
  ------------------
 3272|     40|            uu____0,
 3273|     40|            Eurydice_array_to_subslice((size_t)200U, uu____1, lit, uint8_t,
 3274|     40|                                       core_ops_range_Range_b3),
 3275|     40|            uint8_t);
 3276|     40|    }
 3277|     40|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_store_block_full_5a_27:
 3247|     40|{
 3248|     40|    libcrux_sha3_portable_keccak_store_block_full_7e(a, ret);
 3249|     40|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_store_block_full_7e:
 3223|     40|{
 3224|     40|    uint8_t out[200U] = { 0U };
 3225|     40|    Eurydice_slice buf[1U] = {
 3226|     40|        Eurydice_array_to_slice((size_t)200U, out, uint8_t)
  ------------------
  |  |   69|     40|    EURYDICE_SLICE(x, 0,                   \
  |  |  ------------------
  |  |  |  |   50|     40|    (CLITERAL(Eurydice_slice){ .ptr = (void *)(x + start), .len = end - start })
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     40|#define CLITERAL(type) (type)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   70|     40|                   end) /* x is already at an array type, no need for cast */
  ------------------
 3227|     40|    };
 3228|     40|    libcrux_sha3_portable_keccak_store_block_9b1(s, buf);
 3229|       |    /* Passing arrays by value in Rust generates a copy in C */
 3230|     40|    uint8_t copy_of_out[200U];
 3231|     40|    memcpy(copy_of_out, out, (size_t)200U * sizeof(uint8_t));
 3232|     40|    memcpy(ret[0U], copy_of_out, (size_t)200U * sizeof(uint8_t));
 3233|     40|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_store_block_9b1:
 3203|     40|{
 3204|    400|    for (size_t i = (size_t)0U; i < (size_t)72U / (size_t)8U; i++) {
  ------------------
  |  Branch (3204:33): [True: 360, False: 40]
  ------------------
 3205|    360|        size_t i0 = i;
 3206|    360|        Eurydice_slice uu____0 = Eurydice_slice_subslice2(
  ------------------
  |  |   63|    360|    EURYDICE_SLICE((t *)s.ptr, start, end)
  |  |  ------------------
  |  |  |  |   50|    360|    (CLITERAL(Eurydice_slice){ .ptr = (void *)(x + start), .len = end - start })
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|    360|#define CLITERAL(type) (type)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3207|    360|            out[0U], (size_t)8U * i0, (size_t)8U * i0 + (size_t)8U, uint8_t);
 3208|    360|        uint8_t ret[8U];
 3209|    360|        core_num__u64_9__to_le_bytes(s[i0 / (size_t)5U][i0 % (size_t)5U], ret);
 3210|    360|        Eurydice_slice_copy(
  ------------------
  |  |   84|    360|    memcpy(dst.ptr, src.ptr, dst.len * sizeof(t))
  ------------------
 3211|    360|            uu____0, Eurydice_array_to_slice((size_t)8U, ret, uint8_t), uint8_t);
 3212|    360|    }
 3213|     40|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_split_at_mut_n_5a:
  198|    720|{
  199|    720|    return libcrux_sha3_portable_keccak_split_at_mut_1(a, mid);
  200|    720|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_split_at_mut_1:
  180|    720|{
  181|    720|    Eurydice_slice_uint8_t_x2 uu____0 = Eurydice_slice_split_at_mut(
  ------------------
  |  |  107|    720|    (CLITERAL(ret_t){                                                   \
  |  |  ------------------
  |  |  |  |   27|    720|#define CLITERAL(type) (type)
  |  |  ------------------
  |  |  108|    720|        .fst = { .ptr = slice.ptr, .len = mid },                        \
  |  |  109|    720|        .snd = { .ptr = (char *)slice.ptr + mid * sizeof(element_type), \
  |  |  110|    720|                 .len = slice.len - mid } })
  ------------------
  182|    720|        out[0U], mid, uint8_t, Eurydice_slice_uint8_t_x2);
  183|    720|    Eurydice_slice out00 = uu____0.fst;
  184|    720|    Eurydice_slice out01 = uu____0.snd;
  185|    720|    Eurydice_slice_uint8_t_1size_t__x2 lit;
  186|    720|    lit.fst[0U] = out00;
  187|    720|    lit.snd[0U] = out01;
  188|    720|    return lit;
  189|    720|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccakx1_e40:
 3056|     40|{
 3057|       |    /* Passing arrays by value in Rust generates a copy in C */
 3058|     40|    Eurydice_slice copy_of_data[1U];
 3059|     40|    memcpy(copy_of_data, data, (size_t)1U * sizeof(Eurydice_slice));
 3060|     40|    libcrux_sha3_generic_keccak_keccak_060(copy_of_data, out);
 3061|     40|}
libcrux_mlkem_portable.c:libcrux_sha3_generic_keccak_keccak_060:
 2983|     40|{
 2984|     40|    libcrux_sha3_generic_keccak_KeccakState_48 s =
 2985|     40|        libcrux_sha3_generic_keccak_new_1e_cf();
 2986|     40|    for (size_t i = (size_t)0U;
 2987|    360|         i < Eurydice_slice_len(data[0U], uint8_t) / (size_t)136U; i++) {
  ------------------
  |  |   82|    360|#define Eurydice_slice_len(s, t) EURYDICE_SLICE_LEN(s, t)
  |  |  ------------------
  |  |  |  |   51|    360|#define EURYDICE_SLICE_LEN(s, _) s.len
  |  |  ------------------
  ------------------
  |  Branch (2987:10): [True: 320, False: 40]
  ------------------
 2988|    320|        size_t i0 = i;
 2989|    320|        libcrux_sha3_generic_keccak_KeccakState_48 *uu____0 = &s;
 2990|       |        /* Passing arrays by value in Rust generates a copy in C */
 2991|    320|        Eurydice_slice copy_of_data[1U];
 2992|    320|        memcpy(copy_of_data, data, (size_t)1U * sizeof(Eurydice_slice));
 2993|    320|        Eurydice_slice ret[1U];
 2994|    320|        libcrux_sha3_portable_keccak_slice_n_5a(copy_of_data, i0 * (size_t)136U,
 2995|    320|                                                (size_t)136U, ret);
 2996|    320|        libcrux_sha3_generic_keccak_absorb_block_400(uu____0, ret);
 2997|    320|    }
 2998|     40|    size_t rem = Eurydice_slice_len(data[0U], uint8_t) % (size_t)136U;
  ------------------
  |  |   82|     40|#define Eurydice_slice_len(s, t) EURYDICE_SLICE_LEN(s, t)
  |  |  ------------------
  |  |  |  |   51|     40|#define EURYDICE_SLICE_LEN(s, _) s.len
  |  |  ------------------
  ------------------
 2999|     40|    libcrux_sha3_generic_keccak_KeccakState_48 *uu____2 = &s;
 3000|       |    /* Passing arrays by value in Rust generates a copy in C */
 3001|     40|    Eurydice_slice copy_of_data[1U];
 3002|     40|    memcpy(copy_of_data, data, (size_t)1U * sizeof(Eurydice_slice));
 3003|     40|    Eurydice_slice ret[1U];
 3004|     40|    libcrux_sha3_portable_keccak_slice_n_5a(
 3005|     40|        copy_of_data, Eurydice_slice_len(data[0U], uint8_t) - rem, rem, ret);
  ------------------
  |  |   82|     40|#define Eurydice_slice_len(s, t) EURYDICE_SLICE_LEN(s, t)
  |  |  ------------------
  |  |  |  |   51|     40|#define EURYDICE_SLICE_LEN(s, _) s.len
  |  |  ------------------
  ------------------
 3006|     40|    libcrux_sha3_generic_keccak_absorb_final_402(uu____2, ret);
 3007|     40|    size_t outlen = Eurydice_slice_len(out[0U], uint8_t);
  ------------------
  |  |   82|     40|#define Eurydice_slice_len(s, t) EURYDICE_SLICE_LEN(s, t)
  |  |  ------------------
  |  |  |  |   51|     40|#define EURYDICE_SLICE_LEN(s, _) s.len
  |  |  ------------------
  ------------------
 3008|     40|    size_t blocks = outlen / (size_t)136U;
 3009|     40|    size_t last = outlen - outlen % (size_t)136U;
 3010|     40|    if (blocks == (size_t)0U) {
  ------------------
  |  Branch (3010:9): [True: 40, False: 0]
  ------------------
 3011|     40|        libcrux_sha3_generic_keccak_squeeze_first_and_last_880(&s, out);
 3012|     40|    } else {
 3013|      0|        Eurydice_slice_uint8_t_1size_t__x2 uu____4 =
 3014|      0|            libcrux_sha3_portable_keccak_split_at_mut_n_5a(out, (size_t)136U);
 3015|      0|        Eurydice_slice o0[1U];
 3016|      0|        memcpy(o0, uu____4.fst, (size_t)1U * sizeof(Eurydice_slice));
 3017|      0|        Eurydice_slice o1[1U];
 3018|      0|        memcpy(o1, uu____4.snd, (size_t)1U * sizeof(Eurydice_slice));
 3019|      0|        libcrux_sha3_generic_keccak_squeeze_first_block_7b0(&s, o0);
 3020|      0|        core_ops_range_Range_b3 iter =
 3021|      0|            core_iter_traits_collect___core__iter__traits__collect__IntoIterator_for_I__1__into_iter(
  ------------------
  |  |  246|      0|    Eurydice_into_iter
  |  |  ------------------
  |  |  |  |  241|      0|#define Eurydice_into_iter(x, t, _ret_t) (x)
  |  |  ------------------
  ------------------
 3022|      0|                (CLITERAL(core_ops_range_Range_b3){ .start = (size_t)1U,
 3023|      0|                                                    .end = blocks }),
 3024|      0|                core_ops_range_Range_b3, core_ops_range_Range_b3);
 3025|      0|        while (true) {
 3026|      0|            if (core_iter_range___core__iter__traits__iterator__Iterator_for_core__ops__range__Range_A___6__next(
  ------------------
  |  |  238|      0|    Eurydice_range_iter_next
  |  |  ------------------
  |  |  |  |  228|      0|    (((iter_ptr)->start == (iter_ptr)->end)             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (228:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  229|      0|         ? (CLITERAL(ret_t){ .tag = core_option_None }) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define CLITERAL(type) (type)
  |  |  |  |  ------------------
  |  |  |  |                        ? (CLITERAL(ret_t){ .tag = core_option_None }) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|      0|#define core_option_None 0
  |  |  |  |  ------------------
  |  |  |  |  230|      0|         : (CLITERAL(ret_t){ .tag = core_option_Some,   \
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define CLITERAL(type) (type)
  |  |  |  |  ------------------
  |  |  |  |                        : (CLITERAL(ret_t){ .tag = core_option_Some,   \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|      0|#define core_option_Some 1
  |  |  |  |  ------------------
  |  |  |  |  231|      0|                             .f0 = (iter_ptr)->start++ }))
  |  |  ------------------
  ------------------
  |  Branch (3026:17): [True: 0, False: 0]
  ------------------
 3027|      0|                    &iter, size_t, core_option_Option_b3)
 3028|      0|                    .tag == core_option_None) {
  ------------------
  |  |   38|      0|#define core_option_None 0
  ------------------
 3029|      0|                break;
 3030|      0|            } else {
 3031|      0|                Eurydice_slice_uint8_t_1size_t__x2 uu____5 =
 3032|      0|                    libcrux_sha3_portable_keccak_split_at_mut_n_5a(o1, (size_t)136U);
 3033|      0|                Eurydice_slice o[1U];
 3034|      0|                memcpy(o, uu____5.fst, (size_t)1U * sizeof(Eurydice_slice));
 3035|      0|                Eurydice_slice orest[1U];
 3036|      0|                memcpy(orest, uu____5.snd, (size_t)1U * sizeof(Eurydice_slice));
 3037|      0|                libcrux_sha3_generic_keccak_squeeze_next_block_c20(&s, o);
 3038|      0|                memcpy(o1, orest, (size_t)1U * sizeof(Eurydice_slice));
 3039|      0|            }
 3040|      0|        }
 3041|      0|        if (last < outlen) {
  ------------------
  |  Branch (3041:13): [True: 0, False: 0]
  ------------------
 3042|      0|            libcrux_sha3_generic_keccak_squeeze_last_ca0(s, o1);
 3043|      0|        }
 3044|      0|    }
 3045|     40|}
libcrux_mlkem_portable.c:libcrux_sha3_generic_keccak_absorb_block_400:
 2747|    320|{
 2748|    320|    uint64_t(*uu____0)[5U] = s->st;
 2749|    320|    Eurydice_slice uu____1[1U];
 2750|    320|    memcpy(uu____1, blocks, (size_t)1U * sizeof(Eurydice_slice));
 2751|    320|    libcrux_sha3_portable_keccak_load_block_5a_35(uu____0, uu____1);
 2752|    320|    libcrux_sha3_generic_keccak_keccakf1600_b8(s);
 2753|    320|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_load_block_5a_35:
 1745|    320|{
 1746|    320|    uint64_t(*uu____0)[5U] = a;
 1747|       |    /* Passing arrays by value in Rust generates a copy in C */
 1748|    320|    Eurydice_slice copy_of_b[1U];
 1749|    320|    memcpy(copy_of_b, b, (size_t)1U * sizeof(Eurydice_slice));
 1750|    320|    libcrux_sha3_portable_keccak_load_block_650(uu____0, copy_of_b);
 1751|    320|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_load_block_650:
 1582|    600|{
 1583|  10.8k|    for (size_t i = (size_t)0U; i < (size_t)136U / (size_t)8U; i++) {
  ------------------
  |  Branch (1583:33): [True: 10.2k, False: 600]
  ------------------
 1584|  10.2k|        size_t i0 = i;
 1585|  10.2k|        uint8_t uu____0[8U];
 1586|  10.2k|        core_result_Result_56 dst;
 1587|  10.2k|        Eurydice_slice_to_array2(
  ------------------
  |  |  116|  10.2k|    Eurydice_slice_to_array3(&(dst)->tag, (char *)&(dst)->val.case_Ok, src, \
  |  |  117|  10.2k|                             sizeof(t_arr))
  ------------------
 1588|  10.2k|            &dst,
 1589|  10.2k|            Eurydice_slice_subslice2(blocks[0U], (size_t)8U * i0,
 1590|  10.2k|                                     (size_t)8U * i0 + (size_t)8U, uint8_t),
 1591|  10.2k|            Eurydice_slice, uint8_t[8U]);
 1592|  10.2k|        core_result_unwrap_41_0e(dst, uu____0);
 1593|  10.2k|        size_t uu____1 = i0 / (size_t)5U;
 1594|  10.2k|        size_t uu____2 = i0 % (size_t)5U;
 1595|  10.2k|        s[uu____1][uu____2] =
 1596|  10.2k|            s[uu____1][uu____2] ^ core_num__u64_9__from_le_bytes(uu____0);
 1597|  10.2k|    }
 1598|    600|}
libcrux_mlkem_portable.c:libcrux_sha3_generic_keccak_absorb_final_402:
 2950|     40|{
 2951|     40|    size_t last_len = Eurydice_slice_len(last[0U], uint8_t);
  ------------------
  |  |   82|     40|#define Eurydice_slice_len(s, t) EURYDICE_SLICE_LEN(s, t)
  |  |  ------------------
  |  |  |  |   51|     40|#define EURYDICE_SLICE_LEN(s, _) s.len
  |  |  ------------------
  ------------------
 2952|     40|    uint8_t blocks[1U][200U] = { { 0U } };
 2953|     40|    {
 2954|     40|        size_t i = (size_t)0U;
 2955|     40|        if (last_len > (size_t)0U) {
  ------------------
  |  Branch (2955:13): [True: 40, False: 0]
  ------------------
 2956|     40|            Eurydice_slice uu____0 =
 2957|     40|                Eurydice_array_to_subslice2(blocks[i], (size_t)0U, last_len, uint8_t);
  ------------------
  |  |   75|     40|    EURYDICE_SLICE((t *)x, start, end)
  |  |  ------------------
  |  |  |  |   50|     40|    (CLITERAL(Eurydice_slice){ .ptr = (void *)(x + start), .len = end - start })
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     40|#define CLITERAL(type) (type)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2958|     40|            Eurydice_slice_copy(uu____0, last[i], uint8_t);
  ------------------
  |  |   84|     40|    memcpy(dst.ptr, src.ptr, dst.len * sizeof(t))
  ------------------
 2959|     40|        }
 2960|     40|        blocks[i][last_len] = 6U;
 2961|     40|        size_t uu____1 = i;
 2962|     40|        size_t uu____2 = (size_t)136U - (size_t)1U;
 2963|     40|        blocks[uu____1][uu____2] = (uint32_t)blocks[uu____1][uu____2] | 128U;
 2964|     40|    }
 2965|     40|    uint64_t(*uu____3)[5U] = s->st;
 2966|     40|    uint8_t uu____4[1U][200U];
 2967|     40|    memcpy(uu____4, blocks, (size_t)1U * sizeof(uint8_t[200U]));
 2968|     40|    libcrux_sha3_portable_keccak_load_block_full_5a_050(uu____3, uu____4);
 2969|     40|    libcrux_sha3_generic_keccak_keccakf1600_b8(s);
 2970|     40|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_load_block_full_5a_050:
 1627|    280|{
 1628|    280|    uint64_t(*uu____0)[5U] = a;
 1629|       |    /* Passing arrays by value in Rust generates a copy in C */
 1630|    280|    uint8_t copy_of_b[1U][200U];
 1631|    280|    memcpy(copy_of_b, b, (size_t)1U * sizeof(uint8_t[200U]));
 1632|    280|    libcrux_sha3_portable_keccak_load_block_full_d40(uu____0, copy_of_b);
 1633|    280|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_load_block_full_d40:
 1608|    280|{
 1609|    280|    Eurydice_slice buf[1U] = {
 1610|    280|        Eurydice_array_to_slice((size_t)200U, blocks[0U], uint8_t)
  ------------------
  |  |   69|    280|    EURYDICE_SLICE(x, 0,                   \
  |  |  ------------------
  |  |  |  |   50|    280|    (CLITERAL(Eurydice_slice){ .ptr = (void *)(x + start), .len = end - start })
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|    280|#define CLITERAL(type) (type)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   70|    280|                   end) /* x is already at an array type, no need for cast */
  ------------------
 1611|    280|    };
 1612|    280|    libcrux_sha3_portable_keccak_load_block_650(s, buf);
 1613|    280|}
libcrux_mlkem_portable.c:libcrux_sha3_generic_keccak_squeeze_first_and_last_880:
 2801|    280|{
 2802|    280|    uint8_t b[1U][200U];
 2803|    280|    libcrux_sha3_portable_keccak_store_block_full_5a_270(s->st, b);
 2804|    280|    {
 2805|    280|        size_t i = (size_t)0U;
 2806|    280|        Eurydice_slice uu____0 = out[i];
 2807|    280|        uint8_t *uu____1 = b[i];
 2808|    280|        core_ops_range_Range_b3 lit;
 2809|    280|        lit.start = (size_t)0U;
 2810|    280|        lit.end = Eurydice_slice_len(out[i], uint8_t);
  ------------------
  |  |   82|    280|#define Eurydice_slice_len(s, t) EURYDICE_SLICE_LEN(s, t)
  |  |  ------------------
  |  |  |  |   51|    280|#define EURYDICE_SLICE_LEN(s, _) s.len
  |  |  ------------------
  ------------------
 2811|    280|        Eurydice_slice_copy(
  ------------------
  |  |   84|    280|    memcpy(dst.ptr, src.ptr, dst.len * sizeof(t))
  ------------------
 2812|    280|            uu____0,
 2813|    280|            Eurydice_array_to_subslice((size_t)200U, uu____1, lit, uint8_t,
 2814|    280|                                       core_ops_range_Range_b3),
 2815|    280|            uint8_t);
 2816|    280|    }
 2817|    280|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_store_block_full_5a_270:
 2787|    280|{
 2788|    280|    libcrux_sha3_portable_keccak_store_block_full_7e0(a, ret);
 2789|    280|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_store_block_full_7e0:
 2763|    280|{
 2764|    280|    uint8_t out[200U] = { 0U };
 2765|    280|    Eurydice_slice buf[1U] = {
 2766|    280|        Eurydice_array_to_slice((size_t)200U, out, uint8_t)
  ------------------
  |  |   69|    280|    EURYDICE_SLICE(x, 0,                   \
  |  |  ------------------
  |  |  |  |   50|    280|    (CLITERAL(Eurydice_slice){ .ptr = (void *)(x + start), .len = end - start })
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|    280|#define CLITERAL(type) (type)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   70|    280|                   end) /* x is already at an array type, no need for cast */
  ------------------
 2767|    280|    };
 2768|    280|    libcrux_sha3_portable_keccak_store_block_9b0(s, buf);
 2769|       |    /* Passing arrays by value in Rust generates a copy in C */
 2770|    280|    uint8_t copy_of_out[200U];
 2771|    280|    memcpy(copy_of_out, out, (size_t)200U * sizeof(uint8_t));
 2772|    280|    memcpy(ret[0U], copy_of_out, (size_t)200U * sizeof(uint8_t));
 2773|    280|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_store_block_9b0:
 1676|    280|{
 1677|  5.04k|    for (size_t i = (size_t)0U; i < (size_t)136U / (size_t)8U; i++) {
  ------------------
  |  Branch (1677:33): [True: 4.76k, False: 280]
  ------------------
 1678|  4.76k|        size_t i0 = i;
 1679|  4.76k|        Eurydice_slice uu____0 = Eurydice_slice_subslice2(
  ------------------
  |  |   63|  4.76k|    EURYDICE_SLICE((t *)s.ptr, start, end)
  |  |  ------------------
  |  |  |  |   50|  4.76k|    (CLITERAL(Eurydice_slice){ .ptr = (void *)(x + start), .len = end - start })
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  4.76k|#define CLITERAL(type) (type)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1680|  4.76k|            out[0U], (size_t)8U * i0, (size_t)8U * i0 + (size_t)8U, uint8_t);
 1681|  4.76k|        uint8_t ret[8U];
 1682|  4.76k|        core_num__u64_9__to_le_bytes(s[i0 / (size_t)5U][i0 % (size_t)5U], ret);
 1683|  4.76k|        Eurydice_slice_copy(
  ------------------
  |  |   84|  4.76k|    memcpy(dst.ptr, src.ptr, dst.len * sizeof(t))
  ------------------
 1684|  4.76k|            uu____0, Eurydice_array_to_slice((size_t)8U, ret, uint8_t), uint8_t);
 1685|  4.76k|    }
 1686|    280|}
libcrux_mlkem_portable.c:libcrux_sha3_generic_keccak_absorb_final_40:
 1487|    360|{
 1488|    360|    size_t last_len = Eurydice_slice_len(last[0U], uint8_t);
  ------------------
  |  |   82|    360|#define Eurydice_slice_len(s, t) EURYDICE_SLICE_LEN(s, t)
  |  |  ------------------
  |  |  |  |   51|    360|#define EURYDICE_SLICE_LEN(s, _) s.len
  |  |  ------------------
  ------------------
 1489|    360|    uint8_t blocks[1U][200U] = { { 0U } };
 1490|    360|    {
 1491|    360|        size_t i = (size_t)0U;
 1492|    360|        if (last_len > (size_t)0U) {
  ------------------
  |  Branch (1492:13): [True: 360, False: 0]
  ------------------
 1493|    360|            Eurydice_slice uu____0 =
 1494|    360|                Eurydice_array_to_subslice2(blocks[i], (size_t)0U, last_len, uint8_t);
  ------------------
  |  |   75|    360|    EURYDICE_SLICE((t *)x, start, end)
  |  |  ------------------
  |  |  |  |   50|    360|    (CLITERAL(Eurydice_slice){ .ptr = (void *)(x + start), .len = end - start })
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|    360|#define CLITERAL(type) (type)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1495|    360|            Eurydice_slice_copy(uu____0, last[i], uint8_t);
  ------------------
  |  |   84|    360|    memcpy(dst.ptr, src.ptr, dst.len * sizeof(t))
  ------------------
 1496|    360|        }
 1497|    360|        blocks[i][last_len] = 31U;
 1498|    360|        size_t uu____1 = i;
 1499|    360|        size_t uu____2 = (size_t)168U - (size_t)1U;
 1500|    360|        blocks[uu____1][uu____2] = (uint32_t)blocks[uu____1][uu____2] | 128U;
 1501|    360|    }
 1502|    360|    uint64_t(*uu____3)[5U] = s->st;
 1503|    360|    uint8_t uu____4[1U][200U];
 1504|    360|    memcpy(uu____4, blocks, (size_t)1U * sizeof(uint8_t[200U]));
 1505|    360|    libcrux_sha3_portable_keccak_load_block_full_5a_05(uu____3, uu____4);
 1506|    360|    libcrux_sha3_generic_keccak_keccakf1600_b8(s);
 1507|    360|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_load_block_full_5a_05:
  310|    360|{
  311|    360|    uint64_t(*uu____0)[5U] = a;
  312|       |    /* Passing arrays by value in Rust generates a copy in C */
  313|    360|    uint8_t copy_of_b[1U][200U];
  314|    360|    memcpy(copy_of_b, b, (size_t)1U * sizeof(uint8_t[200U]));
  315|    360|    libcrux_sha3_portable_keccak_load_block_full_d4(uu____0, copy_of_b);
  316|    360|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_load_block_full_d4:
  291|    360|{
  292|    360|    Eurydice_slice buf[1U] = {
  293|    360|        Eurydice_array_to_slice((size_t)200U, blocks[0U], uint8_t)
  ------------------
  |  |   69|    360|    EURYDICE_SLICE(x, 0,                   \
  |  |  ------------------
  |  |  |  |   50|    360|    (CLITERAL(Eurydice_slice){ .ptr = (void *)(x + start), .len = end - start })
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|    360|#define CLITERAL(type) (type)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   70|    360|                   end) /* x is already at an array type, no need for cast */
  ------------------
  294|    360|    };
  295|    360|    libcrux_sha3_portable_keccak_load_block_65(s, buf);
  296|    360|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_load_block_65:
  265|    360|{
  266|  7.92k|    for (size_t i = (size_t)0U; i < (size_t)168U / (size_t)8U; i++) {
  ------------------
  |  Branch (266:33): [True: 7.56k, False: 360]
  ------------------
  267|  7.56k|        size_t i0 = i;
  268|  7.56k|        uint8_t uu____0[8U];
  269|  7.56k|        core_result_Result_56 dst;
  270|  7.56k|        Eurydice_slice_to_array2(
  ------------------
  |  |  116|  7.56k|    Eurydice_slice_to_array3(&(dst)->tag, (char *)&(dst)->val.case_Ok, src, \
  |  |  117|  7.56k|                             sizeof(t_arr))
  ------------------
  271|  7.56k|            &dst,
  272|  7.56k|            Eurydice_slice_subslice2(blocks[0U], (size_t)8U * i0,
  273|  7.56k|                                     (size_t)8U * i0 + (size_t)8U, uint8_t),
  274|  7.56k|            Eurydice_slice, uint8_t[8U]);
  275|  7.56k|        core_result_unwrap_41_0e(dst, uu____0);
  276|  7.56k|        size_t uu____1 = i0 / (size_t)5U;
  277|  7.56k|        size_t uu____2 = i0 % (size_t)5U;
  278|  7.56k|        s[uu____1][uu____2] =
  279|  7.56k|            s[uu____1][uu____2] ^ core_num__u64_9__from_le_bytes(uu____0);
  280|  7.56k|    }
  281|    360|}
libcrux_mlkem_portable.c:libcrux_sha3_generic_keccak_squeeze_first_block_7b:
 1570|    360|{
 1571|    360|    libcrux_sha3_portable_keccak_store_block_5a_49(s->st, out);
 1572|    360|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_store_block_5a_49:
 1541|  1.08k|{
 1542|  1.08k|    libcrux_sha3_portable_keccak_store_block_9b(a, b);
 1543|  1.08k|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccak_store_block_9b:
 1517|  1.08k|{
 1518|  23.7k|    for (size_t i = (size_t)0U; i < (size_t)168U / (size_t)8U; i++) {
  ------------------
  |  Branch (1518:33): [True: 22.6k, False: 1.08k]
  ------------------
 1519|  22.6k|        size_t i0 = i;
 1520|  22.6k|        Eurydice_slice uu____0 = Eurydice_slice_subslice2(
  ------------------
  |  |   63|  22.6k|    EURYDICE_SLICE((t *)s.ptr, start, end)
  |  |  ------------------
  |  |  |  |   50|  22.6k|    (CLITERAL(Eurydice_slice){ .ptr = (void *)(x + start), .len = end - start })
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  22.6k|#define CLITERAL(type) (type)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1521|  22.6k|            out[0U], (size_t)8U * i0, (size_t)8U * i0 + (size_t)8U, uint8_t);
 1522|  22.6k|        uint8_t ret[8U];
 1523|  22.6k|        core_num__u64_9__to_le_bytes(s[i0 / (size_t)5U][i0 % (size_t)5U], ret);
 1524|  22.6k|        Eurydice_slice_copy(
  ------------------
  |  |   84|  22.6k|    memcpy(dst.ptr, src.ptr, dst.len * sizeof(t))
  ------------------
 1525|  22.6k|            uu____0, Eurydice_array_to_slice((size_t)8U, ret, uint8_t), uint8_t);
 1526|  22.6k|    }
 1527|  1.08k|}
libcrux_mlkem_portable.c:libcrux_sha3_generic_keccak_squeeze_next_block_c2:
 1555|    720|{
 1556|    720|    libcrux_sha3_generic_keccak_keccakf1600_b8(s);
 1557|    720|    libcrux_sha3_portable_keccak_store_block_5a_49(s->st, out);
 1558|    720|}
libcrux_mlkem_portable.c:libcrux_sha3_portable_keccakx1_e41:
 2932|    240|{
 2933|       |    /* Passing arrays by value in Rust generates a copy in C */
 2934|    240|    Eurydice_slice copy_of_data[1U];
 2935|    240|    memcpy(copy_of_data, data, (size_t)1U * sizeof(Eurydice_slice));
 2936|    240|    libcrux_sha3_generic_keccak_keccak_061(copy_of_data, out);
 2937|    240|}
libcrux_mlkem_portable.c:libcrux_sha3_generic_keccak_keccak_061:
 2859|    240|{
 2860|    240|    libcrux_sha3_generic_keccak_KeccakState_48 s =
 2861|    240|        libcrux_sha3_generic_keccak_new_1e_cf();
 2862|    240|    for (size_t i = (size_t)0U;
 2863|    240|         i < Eurydice_slice_len(data[0U], uint8_t) / (size_t)136U; i++) {
  ------------------
  |  |   82|    240|#define Eurydice_slice_len(s, t) EURYDICE_SLICE_LEN(s, t)
  |  |  ------------------
  |  |  |  |   51|    240|#define EURYDICE_SLICE_LEN(s, _) s.len
  |  |  ------------------
  ------------------
  |  Branch (2863:10): [True: 0, False: 240]
  ------------------
 2864|      0|        size_t i0 = i;
 2865|      0|        libcrux_sha3_generic_keccak_KeccakState_48 *uu____0 = &s;
 2866|       |        /* Passing arrays by value in Rust generates a copy in C */
 2867|      0|        Eurydice_slice copy_of_data[1U];
 2868|      0|        memcpy(copy_of_data, data, (size_t)1U * sizeof(Eurydice_slice));
 2869|      0|        Eurydice_slice ret[1U];
 2870|      0|        libcrux_sha3_portable_keccak_slice_n_5a(copy_of_data, i0 * (size_t)136U,
 2871|      0|                                                (size_t)136U, ret);
 2872|      0|        libcrux_sha3_generic_keccak_absorb_block_400(uu____0, ret);
 2873|      0|    }
 2874|    240|    size_t rem = Eurydice_slice_len(data[0U], uint8_t) % (size_t)136U;
  ------------------
  |  |   82|    240|#define Eurydice_slice_len(s, t) EURYDICE_SLICE_LEN(s, t)
  |  |  ------------------
  |  |  |  |   51|    240|#define EURYDICE_SLICE_LEN(s, _) s.len
  |  |  ------------------
  ------------------
 2875|    240|    libcrux_sha3_generic_keccak_KeccakState_48 *uu____2 = &s;
 2876|       |    /* Passing arrays by value in Rust generates a copy in C */
 2877|    240|    Eurydice_slice copy_of_data[1U];
 2878|    240|    memcpy(copy_of_data, data, (size_t)1U * sizeof(Eurydice_slice));
 2879|    240|    Eurydice_slice ret[1U];
 2880|    240|    libcrux_sha3_portable_keccak_slice_n_5a(
 2881|    240|        copy_of_data, Eurydice_slice_len(data[0U], uint8_t) - rem, rem, ret);
  ------------------
  |  |   82|    240|#define Eurydice_slice_len(s, t) EURYDICE_SLICE_LEN(s, t)
  |  |  ------------------
  |  |  |  |   51|    240|#define EURYDICE_SLICE_LEN(s, _) s.len
  |  |  ------------------
  ------------------
 2882|    240|    libcrux_sha3_generic_keccak_absorb_final_400(uu____2, ret);
 2883|    240|    size_t outlen = Eurydice_slice_len(out[0U], uint8_t);
  ------------------
  |  |   82|    240|#define Eurydice_slice_len(s, t) EURYDICE_SLICE_LEN(s, t)
  |  |  ------------------
  |  |  |  |   51|    240|#define EURYDICE_SLICE_LEN(s, _) s.len
  |  |  ------------------
  ------------------
 2884|    240|    size_t blocks = outlen / (size_t)136U;
 2885|    240|    size_t last = outlen - outlen % (size_t)136U;
 2886|    240|    if (blocks == (size_t)0U) {
  ------------------
  |  Branch (2886:9): [True: 240, False: 0]
  ------------------
 2887|    240|        libcrux_sha3_generic_keccak_squeeze_first_and_last_880(&s, out);
 2888|    240|    } else {
 2889|      0|        Eurydice_slice_uint8_t_1size_t__x2 uu____4 =
 2890|      0|            libcrux_sha3_portable_keccak_split_at_mut_n_5a(out, (size_t)136U);
 2891|      0|        Eurydice_slice o0[1U];
 2892|      0|        memcpy(o0, uu____4.fst, (size_t)1U * sizeof(Eurydice_slice));
 2893|      0|        Eurydice_slice o1[1U];
 2894|      0|        memcpy(o1, uu____4.snd, (size_t)1U * sizeof(Eurydice_slice));
 2895|      0|        libcrux_sha3_generic_keccak_squeeze_first_block_7b0(&s, o0);
 2896|      0|        core_ops_range_Range_b3 iter =
 2897|      0|            core_iter_traits_collect___core__iter__traits__collect__IntoIterator_for_I__1__into_iter(
  ------------------
  |  |  246|      0|    Eurydice_into_iter
  |  |  ------------------
  |  |  |  |  241|      0|#define Eurydice_into_iter(x, t, _ret_t) (x)
  |  |  ------------------
  ------------------
 2898|      0|                (CLITERAL(core_ops_range_Range_b3){ .start = (size_t)1U,
 2899|      0|                                                    .end = blocks }),
 2900|      0|                core_ops_range_Range_b3, core_ops_range_Range_b3);
 2901|      0|        while (true) {
 2902|      0|            if (core_iter_range___core__iter__traits__iterator__Iterator_for_core__ops__range__Range_A___6__next(
  ------------------
  |  |  238|      0|    Eurydice_range_iter_next
  |  |  ------------------
  |  |  |  |  228|      0|    (((iter_ptr)->start == (iter_ptr)->end)             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (228:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  229|      0|         ? (CLITERAL(ret_t){ .tag = core_option_None }) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define CLITERAL(type) (type)
  |  |  |  |  ------------------
  |  |  |  |                        ? (CLITERAL(ret_t){ .tag = core_option_None }) \
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|      0|#define core_option_None 0
  |  |  |  |  ------------------
  |  |  |  |  230|      0|         : (CLITERAL(ret_t){ .tag = core_option_Some,   \
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define CLITERAL(type) (type)
  |  |  |  |  ------------------
  |  |  |  |                        : (CLITERAL(ret_t){ .tag = core_option_Some,   \
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|      0|#define core_option_Some 1
  |  |  |  |  ------------------
  |  |  |  |  231|      0|                             .f0 = (iter_ptr)->start++ }))
  |  |  ------------------
  ------------------
  |  Branch (2902:17): [True: 0, False: 0]
  ------------------
 2903|      0|                    &iter, size_t, core_option_Option_b3)
 2904|      0|                    .tag == core_option_None) {
  ------------------
  |  |   38|      0|#define core_option_None 0
  ------------------
 2905|      0|                break;
 2906|      0|            } else {
 2907|      0|                Eurydice_slice_uint8_t_1size_t__x2 uu____5 =
 2908|      0|                    libcrux_sha3_portable_keccak_split_at_mut_n_5a(o1, (size_t)136U);
 2909|      0|                Eurydice_slice o[1U];
 2910|      0|                memcpy(o, uu____5.fst, (size_t)1U * sizeof(Eurydice_slice));
 2911|      0|                Eurydice_slice orest[1U];
 2912|      0|                memcpy(orest, uu____5.snd, (size_t)1U * sizeof(Eurydice_slice));
 2913|      0|                libcrux_sha3_generic_keccak_squeeze_next_block_c20(&s, o);
 2914|      0|                memcpy(o1, orest, (size_t)1U * sizeof(Eurydice_slice));
 2915|      0|            }
 2916|      0|        }
 2917|      0|        if (last < outlen) {
  ------------------
  |  Branch (2917:13): [True: 0, False: 0]
  ------------------
 2918|      0|            libcrux_sha3_generic_keccak_squeeze_last_ca0(s, o1);
 2919|      0|        }
 2920|      0|    }
 2921|    240|}
libcrux_mlkem_portable.c:libcrux_sha3_generic_keccak_absorb_final_400:
 1646|    240|{
 1647|    240|    size_t last_len = Eurydice_slice_len(last[0U], uint8_t);
  ------------------
  |  |   82|    240|#define Eurydice_slice_len(s, t) EURYDICE_SLICE_LEN(s, t)
  |  |  ------------------
  |  |  |  |   51|    240|#define EURYDICE_SLICE_LEN(s, _) s.len
  |  |  ------------------
  ------------------
 1648|    240|    uint8_t blocks[1U][200U] = { { 0U } };
 1649|    240|    {
 1650|    240|        size_t i = (size_t)0U;
 1651|    240|        if (last_len > (size_t)0U) {
  ------------------
  |  Branch (1651:13): [True: 240, False: 0]
  ------------------
 1652|    240|            Eurydice_slice uu____0 =
 1653|    240|                Eurydice_array_to_subslice2(blocks[i], (size_t)0U, last_len, uint8_t);
  ------------------
  |  |   75|    240|    EURYDICE_SLICE((t *)x, start, end)
  |  |  ------------------
  |  |  |  |   50|    240|    (CLITERAL(Eurydice_slice){ .ptr = (void *)(x + start), .len = end - start })
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|    240|#define CLITERAL(type) (type)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1654|    240|            Eurydice_slice_copy(uu____0, last[i], uint8_t);
  ------------------
  |  |   84|    240|    memcpy(dst.ptr, src.ptr, dst.len * sizeof(t))
  ------------------
 1655|    240|        }
 1656|    240|        blocks[i][last_len] = 31U;
 1657|    240|        size_t uu____1 = i;
 1658|    240|        size_t uu____2 = (size_t)136U - (size_t)1U;
 1659|    240|        blocks[uu____1][uu____2] = (uint32_t)blocks[uu____1][uu____2] | 128U;
 1660|    240|    }
 1661|    240|    uint64_t(*uu____3)[5U] = s->st;
 1662|    240|    uint8_t uu____4[1U][200U];
 1663|    240|    memcpy(uu____4, blocks, (size_t)1U * sizeof(uint8_t[200U]));
 1664|    240|    libcrux_sha3_portable_keccak_load_block_full_5a_050(uu____3, uu____4);
 1665|    240|    libcrux_sha3_generic_keccak_keccakf1600_b8(s);
 1666|    240|}

NSS_NoDB_Init:
  949|      1|{
  950|      1|    return nss_Init("", "", "", "", "", "", "", "", "", NULL, NULL,
  951|      1|                    PR_TRUE, PR_TRUE, PR_TRUE, PR_TRUE, PR_TRUE, PR_TRUE,
  ------------------
  |  |  437|      1|#define PR_TRUE 1
  ------------------
                                  PR_TRUE, PR_TRUE, PR_TRUE, PR_TRUE, PR_TRUE, PR_TRUE,
  ------------------
  |  |  437|      1|#define PR_TRUE 1
  ------------------
                                  PR_TRUE, PR_TRUE, PR_TRUE, PR_TRUE, PR_TRUE, PR_TRUE,
  ------------------
  |  |  437|      1|#define PR_TRUE 1
  ------------------
                                  PR_TRUE, PR_TRUE, PR_TRUE, PR_TRUE, PR_TRUE, PR_TRUE,
  ------------------
  |  |  437|      1|#define PR_TRUE 1
  ------------------
                                  PR_TRUE, PR_TRUE, PR_TRUE, PR_TRUE, PR_TRUE, PR_TRUE,
  ------------------
  |  |  437|      1|#define PR_TRUE 1
  ------------------
                                  PR_TRUE, PR_TRUE, PR_TRUE, PR_TRUE, PR_TRUE, PR_TRUE,
  ------------------
  |  |  437|      1|#define PR_TRUE 1
  ------------------
  952|      1|                    PR_FALSE, PR_FALSE, PR_FALSE);
  ------------------
  |  |  438|      1|#define PR_FALSE 0
  ------------------
                                  PR_FALSE, PR_FALSE, PR_FALSE);
  ------------------
  |  |  438|      1|#define PR_FALSE 0
  ------------------
                                  PR_FALSE, PR_FALSE, PR_FALSE);
  ------------------
  |  |  438|      1|#define PR_FALSE 0
  ------------------
  953|      1|}
NSS_RegisterShutdown:
  992|      3|{
  993|      3|    int i;
  994|       |
  995|       |    /* make sure our lock and condition variable are initialized one and only
  996|       |     * one time */
  997|      3|    if (PR_CallOnce(&nssInitOnce, nss_doLockInit) != PR_SUCCESS) {
  ------------------
  |  Branch (997:9): [True: 0, False: 3]
  ------------------
  998|      0|        return SECFailure;
  999|      0|    }
 1000|       |
 1001|      3|    PZ_Lock(nssInitLock);
  ------------------
  |  |  245|      3|#define PZ_Lock(k) PR_Lock((k))
  ------------------
 1002|      3|    if (!NSS_IsInitialized()) {
  ------------------
  |  Branch (1002:9): [True: 0, False: 3]
  ------------------
 1003|      0|        PZ_Unlock(nssInitLock);
  ------------------
  |  |  246|      0|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
 1004|      0|        PORT_SetError(SEC_ERROR_NOT_INITIALIZED);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1005|      0|        return SECFailure;
 1006|      0|    }
 1007|      3|    PZ_Unlock(nssInitLock);
  ------------------
  |  |  246|      3|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
 1008|      3|    if (sFunc == NULL) {
  ------------------
  |  Branch (1008:9): [True: 0, False: 3]
  ------------------
 1009|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1010|      0|        return SECFailure;
 1011|      0|    }
 1012|       |
 1013|      3|    PORT_Assert(nssShutdownList.lock);
  ------------------
  |  |  120|      3|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      3|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 3, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1014|      3|    PZ_Lock(nssShutdownList.lock);
  ------------------
  |  |  245|      3|#define PZ_Lock(k) PR_Lock((k))
  ------------------
 1015|       |
 1016|       |    /* make sure we don't have a duplicate */
 1017|      3|    i = nss_GetShutdownEntry(sFunc, appData);
 1018|      3|    if (i >= 0) {
  ------------------
  |  Branch (1018:9): [True: 0, False: 3]
  ------------------
 1019|      0|        PZ_Unlock(nssShutdownList.lock);
  ------------------
  |  |  246|      0|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
 1020|      0|        PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1021|      0|        return SECFailure;
 1022|      0|    }
 1023|       |    /* find an empty slot */
 1024|      3|    i = nss_GetShutdownEntry(NULL, NULL);
 1025|      3|    if (i >= 0) {
  ------------------
  |  Branch (1025:9): [True: 0, False: 3]
  ------------------
 1026|      0|        nssShutdownList.funcs[i].func = sFunc;
 1027|      0|        nssShutdownList.funcs[i].appData = appData;
 1028|      0|        PZ_Unlock(nssShutdownList.lock);
  ------------------
  |  |  246|      0|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
 1029|      0|        return SECSuccess;
 1030|      0|    }
 1031|      3|    if (nssShutdownList.allocatedFuncs == nssShutdownList.peakFuncs) {
  ------------------
  |  Branch (1031:9): [True: 0, False: 3]
  ------------------
 1032|      0|        struct NSSShutdownFuncPair *funcs =
 1033|      0|            (struct NSSShutdownFuncPair *)PORT_Realloc(nssShutdownList.funcs,
  ------------------
  |  |   64|      0|#define PORT_Realloc PORT_Realloc_Util
  ------------------
 1034|      0|                                                       (nssShutdownList.allocatedFuncs + NSS_SHUTDOWN_STEP) * sizeof(struct NSSShutdownFuncPair));
  ------------------
  |  |  955|      0|#define NSS_SHUTDOWN_STEP 10
  ------------------
 1035|      0|        if (!funcs) {
  ------------------
  |  Branch (1035:13): [True: 0, False: 0]
  ------------------
 1036|      0|            PZ_Unlock(nssShutdownList.lock);
  ------------------
  |  |  246|      0|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
 1037|      0|            return SECFailure;
 1038|      0|        }
 1039|      0|        nssShutdownList.funcs = funcs;
 1040|      0|        nssShutdownList.allocatedFuncs += NSS_SHUTDOWN_STEP;
  ------------------
  |  |  955|      0|#define NSS_SHUTDOWN_STEP 10
  ------------------
 1041|      0|    }
 1042|      3|    nssShutdownList.funcs[nssShutdownList.peakFuncs].func = sFunc;
 1043|      3|    nssShutdownList.funcs[nssShutdownList.peakFuncs].appData = appData;
 1044|      3|    nssShutdownList.peakFuncs++;
 1045|      3|    PZ_Unlock(nssShutdownList.lock);
  ------------------
  |  |  246|      3|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
 1046|      3|    return SECSuccess;
 1047|      3|}
nss_Shutdown:
 1143|      1|{
 1144|      1|    SECStatus shutdownRV = SECSuccess;
 1145|      1|    SECStatus rv;
 1146|      1|    PRStatus status;
 1147|      1|    NSSInitContext *temp;
 1148|       |
 1149|      1|    rv = nss_ShutdownShutdownList();
 1150|      1|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1150:9): [True: 0, False: 1]
  ------------------
 1151|      0|        shutdownRV = SECFailure;
 1152|      0|    }
 1153|      1|    cert_DestroyLocks();
 1154|      1|    ShutdownCRLCache();
 1155|      1|    OCSP_ShutdownGlobal();
 1156|       |#ifndef NSS_DISABLE_LIBPKIX
 1157|       |    PKIX_Shutdown(plContext);
 1158|       |#endif /* NSS_DISABLE_LIBPKIX */
 1159|      1|    SECOID_Shutdown();
 1160|      1|    status = STAN_Shutdown();
 1161|      1|    cert_DestroySubjectKeyIDHashTable();
 1162|      1|    pk11_SetInternalKeySlot(NULL);
 1163|      1|    rv = SECMOD_Shutdown();
 1164|      1|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1164:9): [True: 0, False: 1]
  ------------------
 1165|      0|        shutdownRV = SECFailure;
 1166|      0|    }
 1167|      1|    pk11sdr_Shutdown();
 1168|      1|    nssArena_Shutdown();
 1169|      1|    if (status == PR_FAILURE) {
  ------------------
  |  Branch (1169:9): [True: 0, False: 1]
  ------------------
 1170|      0|        if (NSS_GetError() == NSS_ERROR_BUSY) {
  ------------------
  |  Branch (1170:13): [True: 0, False: 0]
  ------------------
 1171|      0|            PORT_SetError(SEC_ERROR_BUSY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1172|      0|        }
 1173|      0|        shutdownRV = SECFailure;
 1174|      0|    }
 1175|       |    /*
 1176|       |     * A thread's error stack is automatically destroyed when the thread
 1177|       |     * terminates, except for the primordial thread, whose error stack is
 1178|       |     * destroyed by PR_Cleanup.  Since NSS is usually shut down by the
 1179|       |     * primordial thread and many NSS-based apps don't call PR_Cleanup,
 1180|       |     * we destroy the calling thread's error stack here. This must be
 1181|       |     * done after any NSS_GetError call, otherwise NSS_GetError will
 1182|       |     * create the error stack again.
 1183|       |     */
 1184|      1|    nss_DestroyErrorStack();
 1185|      1|    nssIsInitted = PR_FALSE;
  ------------------
  |  |  438|      1|#define PR_FALSE 0
  ------------------
 1186|      1|    temp = nssInitContextList;
 1187|      1|    nssInitContextList = NULL;
 1188|       |    /* free the old list. This is necessary when we are called from
 1189|       |     * NSS_Shutdown(). */
 1190|      1|    while (temp) {
  ------------------
  |  Branch (1190:12): [True: 0, False: 1]
  ------------------
 1191|      0|        NSSInitContext *next = temp->next;
 1192|      0|        temp->magic = 0;
 1193|      0|        PORT_Free(temp);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 1194|      0|        temp = next;
 1195|      0|    }
 1196|      1|    return shutdownRV;
 1197|      1|}
NSS_Shutdown:
 1201|      1|{
 1202|      1|    SECStatus rv;
 1203|       |    /* make sure our lock and condition variable are initialized one and only
 1204|       |     * one time */
 1205|      1|    if (PR_CallOnce(&nssInitOnce, nss_doLockInit) != PR_SUCCESS) {
  ------------------
  |  Branch (1205:9): [True: 0, False: 1]
  ------------------
 1206|      0|        return SECFailure;
 1207|      0|    }
 1208|      1|    PZ_Lock(nssInitLock);
  ------------------
  |  |  245|      1|#define PZ_Lock(k) PR_Lock((k))
  ------------------
 1209|       |
 1210|      1|    if (!nssIsInitted) {
  ------------------
  |  Branch (1210:9): [True: 0, False: 1]
  ------------------
 1211|      0|        PZ_Unlock(nssInitLock);
  ------------------
  |  |  246|      0|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
 1212|      0|        PORT_SetError(SEC_ERROR_NOT_INITIALIZED);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1213|      0|        return SECFailure;
 1214|      0|    }
 1215|       |
 1216|       |    /* If one or more threads are in the middle of init, wait for them
 1217|       |     * to complete */
 1218|      1|    while (nssIsInInit) {
  ------------------
  |  Branch (1218:12): [True: 0, False: 1]
  ------------------
 1219|      0|        PZ_WaitCondVar(nssInitCondition, PR_INTERVAL_NO_TIMEOUT);
  ------------------
  |  |  250|      0|#define PZ_WaitCondVar(v, t) PR_WaitCondVar((v), (t))
  ------------------
 1220|      0|    }
 1221|      1|    rv = nss_Shutdown();
 1222|      1|    PZ_Unlock(nssInitLock);
  ------------------
  |  |  246|      1|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
 1223|      1|    return rv;
 1224|      1|}
NSS_IsInitialized:
 1303|      4|{
 1304|      4|    return (nssIsInitted) || (nssInitContextList != NULL);
  ------------------
  |  Branch (1304:12): [True: 3, False: 1]
  |  Branch (1304:30): [True: 0, False: 1]
  ------------------
 1305|      4|}
nssinit.c:nss_Init:
  558|      1|{
  559|      1|    SECMODModule *parent = NULL;
  560|       |#ifndef NSS_DISABLE_LIBPKIX
  561|       |    PKIX_UInt32 actualMinorVersion = 0;
  562|       |    PKIX_Error *pkixError = NULL;
  563|       |#endif /* NSS_DISABLE_LIBPKIX */
  564|      1|    PRBool isReallyInitted;
  565|      1|    char *configStrings = NULL;
  566|      1|    char *configName = NULL;
  567|      1|    PRBool passwordRequired = PR_FALSE;
  ------------------
  |  |  438|      1|#define PR_FALSE 0
  ------------------
  568|       |#ifdef POLICY_FILE
  569|       |    char *ignoreVar;
  570|       |#endif
  571|       |
  572|       |    /* if we are trying to init with a traditional NSS_Init call, maintain
  573|       |     * the traditional idempotent behavior. */
  574|      1|    if (!initContextPtr && nssIsInitted) {
  ------------------
  |  Branch (574:9): [True: 1, False: 0]
  |  Branch (574:28): [True: 0, False: 1]
  ------------------
  575|      0|        return SECSuccess;
  576|      0|    }
  577|       |
  578|       |    /* make sure our lock and condition variable are initialized one and only
  579|       |     * one time */
  580|      1|    if (PR_CallOnce(&nssInitOnce, nss_doLockInit) != PR_SUCCESS) {
  ------------------
  |  Branch (580:9): [True: 0, False: 1]
  ------------------
  581|      0|        return SECFailure;
  582|      0|    }
  583|       |
  584|       |    /*
  585|       |     * if we haven't done basic initialization, single thread the
  586|       |     * initializations.
  587|       |     */
  588|      1|    PZ_Lock(nssInitLock);
  ------------------
  |  |  245|      1|#define PZ_Lock(k) PR_Lock((k))
  ------------------
  589|      1|    isReallyInitted = NSS_IsInitialized();
  590|      1|    if (!isReallyInitted) {
  ------------------
  |  Branch (590:9): [True: 1, False: 0]
  ------------------
  591|      1|        while (!isReallyInitted && nssIsInInit) {
  ------------------
  |  Branch (591:16): [True: 1, False: 0]
  |  Branch (591:36): [True: 0, False: 1]
  ------------------
  592|      0|            PZ_WaitCondVar(nssInitCondition, PR_INTERVAL_NO_TIMEOUT);
  ------------------
  |  |  250|      0|#define PZ_WaitCondVar(v, t) PR_WaitCondVar((v), (t))
  ------------------
  593|      0|            isReallyInitted = NSS_IsInitialized();
  594|      0|        }
  595|       |        /* once we've completed basic initialization, we can allow more than
  596|       |         * one process initialize NSS at a time. */
  597|      1|    }
  598|      1|    nssIsInInit++;
  599|      1|    PZ_Unlock(nssInitLock);
  ------------------
  |  |  246|      1|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  600|       |
  601|       |    /* this tells us whether or not some library has already initialized us.
  602|       |     * if so, we don't want to double call some of the basic initialization
  603|       |     * functions */
  604|       |
  605|      1|    if (!isReallyInitted) {
  ------------------
  |  Branch (605:9): [True: 1, False: 0]
  ------------------
  606|      1|#ifdef DEBUG
  607|      1|        CERTCertificate dummyCert;
  608|       |        /* New option bits must not change the size of CERTCertificate. */
  609|      1|        PORT_Assert(sizeof(dummyCert.options) == sizeof(void *));
  ------------------
  |  |  120|      1|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      1|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  610|      1|#endif
  611|       |
  612|      1|        if (SECSuccess != cert_InitLocks()) {
  ------------------
  |  Branch (612:13): [True: 0, False: 1]
  ------------------
  613|      0|            goto loser;
  614|      0|        }
  615|       |
  616|      1|        if (SECSuccess != InitCRLCache()) {
  ------------------
  |  Branch (616:13): [True: 0, False: 1]
  ------------------
  617|      0|            goto loser;
  618|      0|        }
  619|       |
  620|      1|        if (SECSuccess != OCSP_InitGlobal()) {
  ------------------
  |  Branch (620:13): [True: 0, False: 1]
  ------------------
  621|      0|            goto loser;
  622|      0|        }
  623|      1|    }
  624|       |
  625|      1|    if (noSingleThreadedModules || allowAlreadyInitializedModules ||
  ------------------
  |  Branch (625:9): [True: 0, False: 1]
  |  Branch (625:36): [True: 0, False: 1]
  ------------------
  626|      1|        dontFinalizeModules) {
  ------------------
  |  Branch (626:9): [True: 0, False: 1]
  ------------------
  627|      0|        pk11_setGlobalOptions(noSingleThreadedModules,
  628|      0|                              allowAlreadyInitializedModules,
  629|      0|                              dontFinalizeModules);
  630|      0|    }
  631|       |
  632|      1|    if (initContextPtr) {
  ------------------
  |  Branch (632:9): [True: 0, False: 1]
  ------------------
  633|      0|        *initContextPtr = PORT_ZNew(NSSInitContext);
  ------------------
  |  |  148|      0|#define PORT_ZNew(type) (type *)PORT_ZAlloc(sizeof(type))
  |  |  ------------------
  |  |  |  |   72|      0|#define PORT_ZAlloc PORT_ZAlloc_Util
  |  |  ------------------
  ------------------
  634|      0|        if (*initContextPtr == NULL) {
  ------------------
  |  Branch (634:13): [True: 0, False: 0]
  ------------------
  635|      0|            goto loser;
  636|      0|        }
  637|       |        /*
  638|       |         * For traditional NSS_Init, we used the PK11_Configure() call to set
  639|       |         * globals. with InitContext, we pass those strings in as parameters.
  640|       |         *
  641|       |         * This allows old NSS_Init calls to work as before, while at the same
  642|       |         * time new calls and old calls will not interfere with each other.
  643|       |         */
  644|      0|        if (initParams) {
  ------------------
  |  Branch (644:13): [True: 0, False: 0]
  ------------------
  645|      0|            if (initParams->length < sizeof(NSSInitParameters)) {
  ------------------
  |  Branch (645:17): [True: 0, False: 0]
  ------------------
  646|      0|                PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  647|      0|                goto loser;
  648|      0|            }
  649|      0|            configStrings = nss_MkConfigString(initParams->manufactureID,
  650|      0|                                               initParams->libraryDescription,
  651|      0|                                               initParams->cryptoTokenDescription,
  652|      0|                                               initParams->dbTokenDescription,
  653|      0|                                               initParams->cryptoSlotDescription,
  654|      0|                                               initParams->dbSlotDescription,
  655|      0|                                               initParams->FIPSSlotDescription,
  656|      0|                                               initParams->FIPSTokenDescription,
  657|      0|                                               initParams->minPWLen);
  658|      0|            if (configStrings == NULL) {
  ------------------
  |  Branch (658:17): [True: 0, False: 0]
  ------------------
  659|      0|                PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  660|      0|                goto loser;
  661|      0|            }
  662|      0|            configName = initParams->libraryDescription;
  663|      0|            passwordRequired = initParams->passwordRequired;
  664|      0|        }
  665|       |
  666|       |        /* If we're NSS_ContextInit, we're probably a library. It could be
  667|       |         * possible that the application initialized NSS then forked(). The
  668|       |         * library would have no knowledge of that. If we call
  669|       |         * SECMOD_RestartModules() here, we will be able to continue on with
  670|       |         * NSS as normal. SECMOD_RestartModules() does have the side affect
  671|       |         * of losing all our PKCS #11 objects in the new process, but only if
  672|       |         * the module needs to be reinited. If it needs to be reinit those
  673|       |         * objects are inaccessible anyway, it's always save to call
  674|       |         * SECMOD_RestartModules(PR_FALSE).
  675|       |         */
  676|       |        /* NOTE: We could call SECMOD_Init() here, but if we aren't already
  677|       |         * inited, then there's no modules to restart, so SECMOD_RestartModules
  678|       |         * will return immediately */
  679|      0|        SECMOD_RestartModules(PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  680|      1|    } else {
  681|      1|        configStrings = pk11_config_strings;
  682|      1|        configName = pk11_config_name;
  683|      1|        passwordRequired = pk11_password_required;
  684|      1|    }
  685|       |
  686|       |    /* Skip the module init if we are already initted and we are trying
  687|       |     * to init with noCertDB and noModDB */
  688|      1|    if (!(isReallyInitted && noCertDB && noModDB)) {
  ------------------
  |  Branch (688:11): [True: 0, False: 1]
  |  Branch (688:30): [True: 0, False: 0]
  |  Branch (688:42): [True: 0, False: 0]
  ------------------
  689|      1|        parent = nss_InitModules(configdir, certPrefix, keyPrefix, secmodName,
  690|      1|                                 updateDir, updCertPrefix, updKeyPrefix, updateID,
  691|      1|                                 updateName, configName, configStrings, passwordRequired,
  692|      1|                                 readOnly, noCertDB, noModDB, forceOpen, optimizeSpace,
  693|      1|                                 (initContextPtr != NULL));
  694|       |
  695|      1|        if (parent == NULL) {
  ------------------
  |  Branch (695:13): [True: 0, False: 1]
  ------------------
  696|      0|            goto loser;
  697|      0|        }
  698|      1|    }
  699|       |
  700|       |    /* finish up initialization */
  701|      1|    if (!isReallyInitted) {
  ------------------
  |  Branch (701:9): [True: 1, False: 0]
  ------------------
  702|      1|        if (SECOID_Init() != SECSuccess) {
  ------------------
  |  Branch (702:13): [True: 0, False: 1]
  ------------------
  703|      0|            goto loser;
  704|      0|        }
  705|       |#ifdef POLICY_FILE
  706|       |        /* Load the system crypto policy file if it exists,
  707|       |         * unless the NSS_IGNORE_SYSTEM_POLICY environment
  708|       |         * variable has been set to 1. */
  709|       |        ignoreVar = PR_GetEnvSecure("NSS_IGNORE_SYSTEM_POLICY");
  710|       |        if (ignoreVar == NULL || strncmp(ignoreVar, "1", sizeof("1")) != 0) {
  711|       |            if (PR_Access(POLICY_PATH "/" POLICY_FILE, PR_ACCESS_READ_OK) == PR_SUCCESS) {
  712|       |                SECMODModule *module = SECMOD_LoadModule(
  713|       |                    "name=\"Policy File\" "
  714|       |                    "parameters=\"configdir='sql:" POLICY_PATH "' "
  715|       |                    "secmod='" POLICY_FILE "' "
  716|       |                    "flags=readOnly,noCertDB,forceSecmodChoice,forceOpen\" "
  717|       |                    "NSS=\"flags=internal,moduleDB,skipFirst,moduleDBOnly,critical\"",
  718|       |                    parent, PR_TRUE);
  719|       |                if (module) {
  720|       |                    PRBool isLoaded = module->loaded;
  721|       |                    SECMOD_DestroyModule(module);
  722|       |                    if (!isLoaded) {
  723|       |                        goto loser;
  724|       |                    }
  725|       |                }
  726|       |            }
  727|       |        }
  728|       |#endif
  729|      1|        if (STAN_LoadDefaultNSS3TrustDomain() != PR_SUCCESS) {
  ------------------
  |  Branch (729:13): [True: 0, False: 1]
  ------------------
  730|      0|            goto loser;
  731|      0|        }
  732|      1|        if (nss_InitShutdownList() != SECSuccess) {
  ------------------
  |  Branch (732:13): [True: 0, False: 1]
  ------------------
  733|      0|            goto loser;
  734|      0|        }
  735|      1|        CERT_SetDefaultCertDB((CERTCertDBHandle *)
  736|      1|                                  STAN_GetDefaultTrustDomain());
  737|      1|        if ((!noModDB) && (!noCertDB) && (!noRootInit)) {
  ------------------
  |  Branch (737:13): [True: 0, False: 1]
  |  Branch (737:27): [True: 0, False: 0]
  |  Branch (737:42): [True: 0, False: 0]
  ------------------
  738|      0|            if (!SECMOD_HasRootCerts()) {
  ------------------
  |  Branch (738:17): [True: 0, False: 0]
  ------------------
  739|      0|                const char *dbpath = configdir;
  740|       |                /* handle supported database modifiers */
  741|      0|                if (strncmp(dbpath, "sql:", 4) == 0) {
  ------------------
  |  Branch (741:21): [True: 0, False: 0]
  ------------------
  742|      0|                    dbpath += 4;
  743|      0|                } else if (strncmp(dbpath, "dbm:", 4) == 0) {
  ------------------
  |  Branch (743:28): [True: 0, False: 0]
  ------------------
  744|      0|                    dbpath += 4;
  745|      0|                } else if (strncmp(dbpath, "extern:", 7) == 0) {
  ------------------
  |  Branch (745:28): [True: 0, False: 0]
  ------------------
  746|      0|                    dbpath += 7;
  747|      0|                } else if (strncmp(dbpath, "rdb:", 4) == 0) {
  ------------------
  |  Branch (747:28): [True: 0, False: 0]
  ------------------
  748|       |                    /* if rdb: is specified, the configdir isn't really a
  749|       |                     * path. Skip it */
  750|      0|                    dbpath = NULL;
  751|      0|                }
  752|      0|                if (dbpath) {
  ------------------
  |  Branch (752:21): [True: 0, False: 0]
  ------------------
  753|      0|                    nss_FindExternalRoot(dbpath, secmodName);
  754|      0|                }
  755|      0|            }
  756|      0|        }
  757|      1|        pk11sdr_Init();
  758|      1|        cert_CreateSubjectKeyIDHashTable();
  759|       |
  760|       |#ifndef NSS_DISABLE_LIBPKIX
  761|       |        pkixError = PKIX_Initialize(PKIX_FALSE, PKIX_MAJOR_VERSION, PKIX_MINOR_VERSION,
  762|       |                                    PKIX_MINOR_VERSION, &actualMinorVersion, &plContext);
  763|       |
  764|       |        if (pkixError != NULL) {
  765|       |            goto loser;
  766|       |        } else {
  767|       |            char *ev = PR_GetEnvSecure("NSS_DISABLE_PKIX_VERIFY");
  768|       |            if (ev && ev[0]) {
  769|       |                CERT_SetUsePKIXForValidation(PR_FALSE);
  770|       |            }
  771|       |        }
  772|       |#endif /* NSS_DISABLE_LIBPKIX */
  773|      1|    }
  774|       |
  775|       |    /*
  776|       |     * Now mark the appropriate init state. If initContextPtr was passed
  777|       |     * in, then return the new context pointer and add it to the
  778|       |     * nssInitContextList. Otherwise set the global nss_isInitted flag
  779|       |     */
  780|      1|    PZ_Lock(nssInitLock);
  ------------------
  |  |  245|      1|#define PZ_Lock(k) PR_Lock((k))
  ------------------
  781|      1|    if (!initContextPtr) {
  ------------------
  |  Branch (781:9): [True: 1, False: 0]
  ------------------
  782|      1|        nssIsInitted = PR_TRUE;
  ------------------
  |  |  437|      1|#define PR_TRUE 1
  ------------------
  783|      1|    } else {
  784|      0|        (*initContextPtr)->magic = NSS_INIT_MAGIC;
  ------------------
  |  |  523|      0|#define NSS_INIT_MAGIC 0x1413A91C
  ------------------
  785|      0|        (*initContextPtr)->next = nssInitContextList;
  786|      0|        nssInitContextList = (*initContextPtr);
  787|      0|    }
  788|      1|    nssIsInInit--;
  789|       |    /* now that we are inited, all waiters can move forward */
  790|      1|    PZ_NotifyAllCondVar(nssInitCondition);
  ------------------
  |  |  252|      1|#define PZ_NotifyAllCondVar(v) PR_NotifyAllCondVar((v))
  ------------------
  791|      1|    PZ_Unlock(nssInitLock);
  ------------------
  |  |  246|      1|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  792|       |
  793|      1|    if (initContextPtr && configStrings) {
  ------------------
  |  Branch (793:9): [True: 0, False: 1]
  |  Branch (793:27): [True: 0, False: 0]
  ------------------
  794|      0|        PR_smprintf_free(configStrings);
  795|      0|    }
  796|      1|    if (parent) {
  ------------------
  |  Branch (796:9): [True: 1, False: 0]
  ------------------
  797|      1|        SECMOD_DestroyModule(parent);
  798|      1|    }
  799|       |
  800|      1|    return SECSuccess;
  801|       |
  802|      0|loser:
  803|      0|    if (initContextPtr && *initContextPtr) {
  ------------------
  |  Branch (803:9): [True: 0, False: 0]
  |  Branch (803:27): [True: 0, False: 0]
  ------------------
  804|      0|        PORT_Free(*initContextPtr);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
  805|      0|        *initContextPtr = NULL;
  806|      0|        if (configStrings) {
  ------------------
  |  Branch (806:13): [True: 0, False: 0]
  ------------------
  807|      0|            PR_smprintf_free(configStrings);
  808|      0|        }
  809|      0|    }
  810|      0|    PZ_Lock(nssInitLock);
  ------------------
  |  |  245|      0|#define PZ_Lock(k) PR_Lock((k))
  ------------------
  811|      0|    nssIsInInit--;
  812|       |    /* We failed to init, allow one to move forward */
  813|      0|    PZ_NotifyCondVar(nssInitCondition);
  ------------------
  |  |  251|      0|#define PZ_NotifyCondVar(v) PR_NotifyCondVar((v))
  ------------------
  814|      0|    PZ_Unlock(nssInitLock);
  ------------------
  |  |  246|      0|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  815|      0|    if (parent) {
  ------------------
  |  Branch (815:9): [True: 0, False: 0]
  ------------------
  816|      0|        SECMOD_DestroyModule(parent);
  817|      0|    }
  818|      0|    return SECFailure;
  819|      1|}
nssinit.c:nss_InitModules:
  366|      1|{
  367|      1|    SECMODModule *module = NULL;
  368|      1|    char *moduleSpec = NULL;
  369|      1|    char *flags = NULL;
  370|      1|    char *lconfigdir = NULL;
  371|      1|    char *lcertPrefix = NULL;
  372|      1|    char *lkeyPrefix = NULL;
  373|      1|    char *lsecmodName = NULL;
  374|      1|    char *lupdateDir = NULL;
  375|      1|    char *lupdCertPrefix = NULL;
  376|      1|    char *lupdKeyPrefix = NULL;
  377|      1|    char *lupdateID = NULL;
  378|      1|    char *lupdateName = NULL;
  379|       |
  380|      1|    if (NSS_InitializePRErrorTable() != SECSuccess) {
  ------------------
  |  Branch (380:9): [True: 0, False: 1]
  ------------------
  381|      0|        PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  382|      0|        return NULL;
  383|      0|    }
  384|       |
  385|      1|    flags = nss_makeFlags(readOnly, noCertDB, noModDB, forceOpen,
  386|      1|                          pwRequired, optimizeSpace);
  387|      1|    if (flags == NULL)
  ------------------
  |  Branch (387:9): [True: 0, False: 1]
  ------------------
  388|      0|        return NULL;
  389|       |
  390|       |    /*
  391|       |     * configdir is double nested, and Windows uses the same character
  392|       |     * for file seps as we use for escapes! (sigh).
  393|       |     */
  394|      1|    lconfigdir = NSSUTIL_DoubleEscape(configdir, '\'', '\"');
  395|      1|    if (lconfigdir == NULL) {
  ------------------
  |  Branch (395:9): [True: 0, False: 1]
  ------------------
  396|      0|        goto loser;
  397|      0|    }
  398|      1|    lcertPrefix = NSSUTIL_DoubleEscape(certPrefix, '\'', '\"');
  399|      1|    if (lcertPrefix == NULL) {
  ------------------
  |  Branch (399:9): [True: 0, False: 1]
  ------------------
  400|      0|        goto loser;
  401|      0|    }
  402|      1|    lkeyPrefix = NSSUTIL_DoubleEscape(keyPrefix, '\'', '\"');
  403|      1|    if (lkeyPrefix == NULL) {
  ------------------
  |  Branch (403:9): [True: 0, False: 1]
  ------------------
  404|      0|        goto loser;
  405|      0|    }
  406|      1|    lsecmodName = NSSUTIL_DoubleEscape(secmodName, '\'', '\"');
  407|      1|    if (lsecmodName == NULL) {
  ------------------
  |  Branch (407:9): [True: 0, False: 1]
  ------------------
  408|      0|        goto loser;
  409|      0|    }
  410|      1|    lupdateDir = NSSUTIL_DoubleEscape(updateDir, '\'', '\"');
  411|      1|    if (lupdateDir == NULL) {
  ------------------
  |  Branch (411:9): [True: 0, False: 1]
  ------------------
  412|      0|        goto loser;
  413|      0|    }
  414|      1|    lupdCertPrefix = NSSUTIL_DoubleEscape(updCertPrefix, '\'', '\"');
  415|      1|    if (lupdCertPrefix == NULL) {
  ------------------
  |  Branch (415:9): [True: 0, False: 1]
  ------------------
  416|      0|        goto loser;
  417|      0|    }
  418|      1|    lupdKeyPrefix = NSSUTIL_DoubleEscape(updKeyPrefix, '\'', '\"');
  419|      1|    if (lupdKeyPrefix == NULL) {
  ------------------
  |  Branch (419:9): [True: 0, False: 1]
  ------------------
  420|      0|        goto loser;
  421|      0|    }
  422|      1|    lupdateID = NSSUTIL_DoubleEscape(updateID, '\'', '\"');
  423|      1|    if (lupdateID == NULL) {
  ------------------
  |  Branch (423:9): [True: 0, False: 1]
  ------------------
  424|      0|        goto loser;
  425|      0|    }
  426|      1|    lupdateName = NSSUTIL_DoubleEscape(updateName, '\'', '\"');
  427|      1|    if (lupdateName == NULL) {
  ------------------
  |  Branch (427:9): [True: 0, False: 1]
  ------------------
  428|      0|        goto loser;
  429|      0|    }
  430|       |
  431|      1|    moduleSpec = PR_smprintf(
  432|      1|        "name=\"%s\" parameters=\"configdir='%s' certPrefix='%s' keyPrefix='%s' "
  433|      1|        "secmod='%s' flags=%s updatedir='%s' updateCertPrefix='%s' "
  434|      1|        "updateKeyPrefix='%s' updateid='%s' updateTokenDescription='%s' %s\" "
  435|      1|        "NSS=\"flags=internal,moduleDB,moduleDBOnly,critical%s\"",
  436|      1|        configName ? configName : NSS_DEFAULT_MOD_NAME,
  ------------------
  |  |   58|      1|#define NSS_DEFAULT_MOD_NAME "NSS Internal Module"
  ------------------
  |  Branch (436:9): [True: 0, False: 1]
  ------------------
  437|      1|        lconfigdir, lcertPrefix, lkeyPrefix, lsecmodName, flags,
  438|      1|        lupdateDir, lupdCertPrefix, lupdKeyPrefix, lupdateID,
  439|      1|        lupdateName, configStrings ? configStrings : "",
  ------------------
  |  Branch (439:22): [True: 0, False: 1]
  ------------------
  440|      1|        isContextInit ? "" : ",defaultModDB,internalKeySlot");
  ------------------
  |  Branch (440:9): [True: 0, False: 1]
  ------------------
  441|       |
  442|      1|loser:
  443|      1|    PORT_Free(flags);
  ------------------
  |  |   60|      1|#define PORT_Free PORT_Free_Util
  ------------------
  444|      1|    if (lconfigdir)
  ------------------
  |  Branch (444:9): [True: 1, False: 0]
  ------------------
  445|      1|        PORT_Free(lconfigdir);
  ------------------
  |  |   60|      1|#define PORT_Free PORT_Free_Util
  ------------------
  446|      1|    if (lcertPrefix)
  ------------------
  |  Branch (446:9): [True: 1, False: 0]
  ------------------
  447|      1|        PORT_Free(lcertPrefix);
  ------------------
  |  |   60|      1|#define PORT_Free PORT_Free_Util
  ------------------
  448|      1|    if (lkeyPrefix)
  ------------------
  |  Branch (448:9): [True: 1, False: 0]
  ------------------
  449|      1|        PORT_Free(lkeyPrefix);
  ------------------
  |  |   60|      1|#define PORT_Free PORT_Free_Util
  ------------------
  450|      1|    if (lsecmodName)
  ------------------
  |  Branch (450:9): [True: 1, False: 0]
  ------------------
  451|      1|        PORT_Free(lsecmodName);
  ------------------
  |  |   60|      1|#define PORT_Free PORT_Free_Util
  ------------------
  452|      1|    if (lupdateDir)
  ------------------
  |  Branch (452:9): [True: 1, False: 0]
  ------------------
  453|      1|        PORT_Free(lupdateDir);
  ------------------
  |  |   60|      1|#define PORT_Free PORT_Free_Util
  ------------------
  454|      1|    if (lupdCertPrefix)
  ------------------
  |  Branch (454:9): [True: 1, False: 0]
  ------------------
  455|      1|        PORT_Free(lupdCertPrefix);
  ------------------
  |  |   60|      1|#define PORT_Free PORT_Free_Util
  ------------------
  456|      1|    if (lupdKeyPrefix)
  ------------------
  |  Branch (456:9): [True: 1, False: 0]
  ------------------
  457|      1|        PORT_Free(lupdKeyPrefix);
  ------------------
  |  |   60|      1|#define PORT_Free PORT_Free_Util
  ------------------
  458|      1|    if (lupdateID)
  ------------------
  |  Branch (458:9): [True: 1, False: 0]
  ------------------
  459|      1|        PORT_Free(lupdateID);
  ------------------
  |  |   60|      1|#define PORT_Free PORT_Free_Util
  ------------------
  460|      1|    if (lupdateName)
  ------------------
  |  Branch (460:9): [True: 1, False: 0]
  ------------------
  461|      1|        PORT_Free(lupdateName);
  ------------------
  |  |   60|      1|#define PORT_Free PORT_Free_Util
  ------------------
  462|       |
  463|      1|    if (moduleSpec) {
  ------------------
  |  Branch (463:9): [True: 1, False: 0]
  ------------------
  464|      1|        module = SECMOD_LoadModule(moduleSpec, NULL, PR_TRUE);
  ------------------
  |  |  437|      1|#define PR_TRUE 1
  ------------------
  465|      1|        PR_smprintf_free(moduleSpec);
  466|      1|        if (module && !module->loaded) {
  ------------------
  |  Branch (466:13): [True: 1, False: 0]
  |  Branch (466:23): [True: 0, False: 1]
  ------------------
  467|      0|            SECMOD_DestroyModule(module);
  468|      0|            return NULL;
  469|      0|        }
  470|      1|    }
  471|      1|    return module;
  472|      1|}
nssinit.c:nss_makeFlags:
   64|      1|{
   65|      1|    char *flags = (char *)PORT_Alloc(NSS_MAX_FLAG_SIZE);
  ------------------
  |  |   52|      1|#define PORT_Alloc PORT_Alloc_Util
  ------------------
                  char *flags = (char *)PORT_Alloc(NSS_MAX_FLAG_SIZE);
  ------------------
  |  |   55|      1|#define NSS_MAX_FLAG_SIZE sizeof("readOnly") + sizeof("noCertDB") +                                  \
  |  |   56|      1|                              sizeof("noModDB") + sizeof("forceOpen") + sizeof("passwordRequired") + \
  |  |   57|      1|                              sizeof("optimizeSpace") + sizeof("printPolicyFeedback")
  ------------------
   66|      1|    PRBool first = PR_TRUE;
  ------------------
  |  |  437|      1|#define PR_TRUE 1
  ------------------
   67|       |
   68|      1|    PORT_Memset(flags, 0, NSS_MAX_FLAG_SIZE);
  ------------------
  |  |  182|      1|#define PORT_Memset memset
  ------------------
                  PORT_Memset(flags, 0, NSS_MAX_FLAG_SIZE);
  ------------------
  |  |   55|      1|#define NSS_MAX_FLAG_SIZE sizeof("readOnly") + sizeof("noCertDB") +                                  \
  |  |   56|      1|                              sizeof("noModDB") + sizeof("forceOpen") + sizeof("passwordRequired") + \
  |  |   57|      1|                              sizeof("optimizeSpace") + sizeof("printPolicyFeedback")
  ------------------
   69|      1|    if (readOnly) {
  ------------------
  |  Branch (69:9): [True: 1, False: 0]
  ------------------
   70|      1|        PORT_Strcat(flags, "readOnly");
  ------------------
  |  |  185|      1|#define PORT_Strcat strcat
  ------------------
   71|      1|        first = PR_FALSE;
  ------------------
  |  |  438|      1|#define PR_FALSE 0
  ------------------
   72|      1|    }
   73|      1|    if (noCertDB) {
  ------------------
  |  Branch (73:9): [True: 1, False: 0]
  ------------------
   74|      1|        if (!first)
  ------------------
  |  Branch (74:13): [True: 1, False: 0]
  ------------------
   75|      1|            PORT_Strcat(flags, ",");
  ------------------
  |  |  185|      1|#define PORT_Strcat strcat
  ------------------
   76|      1|        PORT_Strcat(flags, "noCertDB");
  ------------------
  |  |  185|      1|#define PORT_Strcat strcat
  ------------------
   77|      1|        first = PR_FALSE;
  ------------------
  |  |  438|      1|#define PR_FALSE 0
  ------------------
   78|      1|    }
   79|      1|    if (noModDB) {
  ------------------
  |  Branch (79:9): [True: 1, False: 0]
  ------------------
   80|      1|        if (!first)
  ------------------
  |  Branch (80:13): [True: 1, False: 0]
  ------------------
   81|      1|            PORT_Strcat(flags, ",");
  ------------------
  |  |  185|      1|#define PORT_Strcat strcat
  ------------------
   82|      1|        PORT_Strcat(flags, "noModDB");
  ------------------
  |  |  185|      1|#define PORT_Strcat strcat
  ------------------
   83|      1|        first = PR_FALSE;
  ------------------
  |  |  438|      1|#define PR_FALSE 0
  ------------------
   84|      1|    }
   85|      1|    if (forceOpen) {
  ------------------
  |  Branch (85:9): [True: 1, False: 0]
  ------------------
   86|      1|        if (!first)
  ------------------
  |  Branch (86:13): [True: 1, False: 0]
  ------------------
   87|      1|            PORT_Strcat(flags, ",");
  ------------------
  |  |  185|      1|#define PORT_Strcat strcat
  ------------------
   88|      1|        PORT_Strcat(flags, "forceOpen");
  ------------------
  |  |  185|      1|#define PORT_Strcat strcat
  ------------------
   89|      1|        first = PR_FALSE;
  ------------------
  |  |  438|      1|#define PR_FALSE 0
  ------------------
   90|      1|    }
   91|      1|    if (passwordRequired) {
  ------------------
  |  Branch (91:9): [True: 0, False: 1]
  ------------------
   92|      0|        if (!first)
  ------------------
  |  Branch (92:13): [True: 0, False: 0]
  ------------------
   93|      0|            PORT_Strcat(flags, ",");
  ------------------
  |  |  185|      0|#define PORT_Strcat strcat
  ------------------
   94|      0|        PORT_Strcat(flags, "passwordRequired");
  ------------------
  |  |  185|      0|#define PORT_Strcat strcat
  ------------------
   95|      0|        first = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
   96|      0|    }
   97|      1|    if (optimizeSpace) {
  ------------------
  |  Branch (97:9): [True: 1, False: 0]
  ------------------
   98|      1|        if (!first)
  ------------------
  |  Branch (98:13): [True: 1, False: 0]
  ------------------
   99|      1|            PORT_Strcat(flags, ",");
  ------------------
  |  |  185|      1|#define PORT_Strcat strcat
  ------------------
  100|      1|        PORT_Strcat(flags, "optimizeSpace");
  ------------------
  |  |  185|      1|#define PORT_Strcat strcat
  ------------------
  101|      1|    }
  102|      1|    return flags;
  103|      1|}
nssinit.c:nss_InitShutdownList:
 1091|      1|{
 1092|      1|    if (nssShutdownList.lock != NULL) {
  ------------------
  |  Branch (1092:9): [True: 0, False: 1]
  ------------------
 1093|      0|        return SECSuccess;
 1094|      0|    }
 1095|      1|    nssShutdownList.lock = PZ_NewLock(nssILockOther);
  ------------------
  |  |  243|      1|#define PZ_NewLock(t) PR_NewLock()
  ------------------
 1096|      1|    if (nssShutdownList.lock == NULL) {
  ------------------
  |  Branch (1096:9): [True: 0, False: 1]
  ------------------
 1097|      0|        return SECFailure;
 1098|      0|    }
 1099|      1|    nssShutdownList.funcs = PORT_ZNewArray(struct NSSShutdownFuncPair,
  ------------------
  |  |  159|      1|    (type *)PORT_ZAlloc(sizeof(type) * (num))
  |  |  ------------------
  |  |  |  |   72|      1|#define PORT_ZAlloc PORT_ZAlloc_Util
  |  |  ------------------
  ------------------
 1100|      1|                                           NSS_SHUTDOWN_STEP);
 1101|      1|    if (nssShutdownList.funcs == NULL) {
  ------------------
  |  Branch (1101:9): [True: 0, False: 1]
  ------------------
 1102|      0|        PZ_DestroyLock(nssShutdownList.lock);
  ------------------
  |  |  244|      0|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
 1103|      0|        nssShutdownList.lock = NULL;
 1104|      0|        return SECFailure;
 1105|      0|    }
 1106|      1|    nssShutdownList.allocatedFuncs = NSS_SHUTDOWN_STEP;
  ------------------
  |  |  955|      1|#define NSS_SHUTDOWN_STEP 10
  ------------------
 1107|      1|    nssShutdownList.peakFuncs = 0;
 1108|       |
 1109|      1|    return SECSuccess;
 1110|      1|}
nssinit.c:nss_doLockInit:
  534|      1|{
  535|      1|    nssInitLock = PZ_NewLock(nssILockOther);
  ------------------
  |  |  243|      1|#define PZ_NewLock(t) PR_NewLock()
  ------------------
  536|      1|    if (nssInitLock == NULL) {
  ------------------
  |  Branch (536:9): [True: 0, False: 1]
  ------------------
  537|      0|        return PR_FAILURE;
  538|      0|    }
  539|      1|    nssInitCondition = PZ_NewCondVar(nssInitLock);
  ------------------
  |  |  248|      1|#define PZ_NewCondVar(l) PR_NewCondVar((l))
  ------------------
  540|      1|    if (nssInitCondition == NULL) {
  ------------------
  |  Branch (540:9): [True: 0, False: 1]
  ------------------
  541|      0|        return PR_FAILURE;
  542|      0|    }
  543|      1|    return PR_SUCCESS;
  544|      1|}
nssinit.c:nss_GetShutdownEntry:
  974|      6|{
  975|      6|    int count, i;
  976|      6|    count = nssShutdownList.peakFuncs;
  977|       |
  978|     12|    for (i = 0; i < count; i++) {
  ------------------
  |  Branch (978:17): [True: 6, False: 6]
  ------------------
  979|      6|        if ((nssShutdownList.funcs[i].func == sFunc) &&
  ------------------
  |  Branch (979:13): [True: 0, False: 6]
  ------------------
  980|      6|            (nssShutdownList.funcs[i].appData == appData)) {
  ------------------
  |  Branch (980:13): [True: 0, False: 0]
  ------------------
  981|      0|            return i;
  982|      0|        }
  983|      6|    }
  984|      6|    return -1;
  985|      6|}
nssinit.c:nss_ShutdownShutdownList:
 1114|      1|{
 1115|      1|    SECStatus rv = SECSuccess;
 1116|      1|    int i;
 1117|       |
 1118|       |    /* call all the registerd functions first */
 1119|      4|    for (i = 0; i < nssShutdownList.peakFuncs; i++) {
  ------------------
  |  Branch (1119:17): [True: 3, False: 1]
  ------------------
 1120|      3|        struct NSSShutdownFuncPair *funcPair = &nssShutdownList.funcs[i];
 1121|      3|        if (funcPair->func) {
  ------------------
  |  Branch (1121:13): [True: 3, False: 0]
  ------------------
 1122|      3|            if ((*funcPair->func)(funcPair->appData, NULL) != SECSuccess) {
  ------------------
  |  Branch (1122:17): [True: 0, False: 3]
  ------------------
 1123|      0|                rv = SECFailure;
 1124|      0|            }
 1125|      3|        }
 1126|      3|    }
 1127|       |
 1128|      1|    nssShutdownList.peakFuncs = 0;
 1129|      1|    nssShutdownList.allocatedFuncs = 0;
 1130|      1|    PORT_Free(nssShutdownList.funcs);
  ------------------
  |  |   60|      1|#define PORT_Free PORT_Free_Util
  ------------------
 1131|      1|    nssShutdownList.funcs = NULL;
 1132|      1|    if (nssShutdownList.lock) {
  ------------------
  |  Branch (1132:9): [True: 1, False: 0]
  ------------------
 1133|      1|        PZ_DestroyLock(nssShutdownList.lock);
  ------------------
  |  |  244|      1|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
 1134|      1|    }
 1135|      1|    nssShutdownList.lock = NULL;
 1136|      1|    return rv;
 1137|      1|}

NSS_OptionGet:
  107|   677k|{
  108|   677k|    SECStatus rv = SECSuccess;
  109|       |
  110|   677k|    switch (which) {
  111|  2.51k|        case NSS_RSA_MIN_KEY_SIZE:
  ------------------
  |  |  286|  2.51k|#define NSS_RSA_MIN_KEY_SIZE 0x001
  ------------------
  |  Branch (111:9): [True: 2.51k, False: 674k]
  ------------------
  112|  2.51k|            *value = nss_ops.rsaMinKeySize;
  113|  2.51k|            break;
  114|  1.21k|        case NSS_DH_MIN_KEY_SIZE:
  ------------------
  |  |  287|  1.21k|#define NSS_DH_MIN_KEY_SIZE 0x002
  ------------------
  |  Branch (114:9): [True: 1.21k, False: 675k]
  ------------------
  115|  1.21k|            *value = nss_ops.dhMinKeySize;
  116|  1.21k|            break;
  117|  1.15k|        case NSS_DSA_MIN_KEY_SIZE:
  ------------------
  |  |  288|  1.15k|#define NSS_DSA_MIN_KEY_SIZE 0x004
  ------------------
  |  Branch (117:9): [True: 1.15k, False: 675k]
  ------------------
  118|  1.15k|            *value = nss_ops.dsaMinKeySize;
  119|  1.15k|            break;
  120|      0|        case NSS_TLS_VERSION_MIN_POLICY:
  ------------------
  |  |  289|      0|#define NSS_TLS_VERSION_MIN_POLICY 0x008
  ------------------
  |  Branch (120:9): [True: 0, False: 677k]
  ------------------
  121|      0|            *value = nss_ops.tlsVersionMinPolicy;
  122|      0|            break;
  123|      0|        case NSS_TLS_VERSION_MAX_POLICY:
  ------------------
  |  |  290|      0|#define NSS_TLS_VERSION_MAX_POLICY 0x009
  ------------------
  |  Branch (123:9): [True: 0, False: 677k]
  ------------------
  124|      0|            *value = nss_ops.tlsVersionMaxPolicy;
  125|      0|            break;
  126|      0|        case NSS_DTLS_VERSION_MIN_POLICY:
  ------------------
  |  |  291|      0|#define NSS_DTLS_VERSION_MIN_POLICY 0x00a
  ------------------
  |  Branch (126:9): [True: 0, False: 677k]
  ------------------
  127|      0|            *value = nss_ops.dtlsVersionMinPolicy;
  128|      0|            break;
  129|      0|        case NSS_DTLS_VERSION_MAX_POLICY:
  ------------------
  |  |  292|      0|#define NSS_DTLS_VERSION_MAX_POLICY 0x00b
  ------------------
  |  Branch (129:9): [True: 0, False: 677k]
  ------------------
  130|      0|            *value = nss_ops.dtlsVersionMaxPolicy;
  131|      0|            break;
  132|      0|        case __NSS_PKCS12_DECODE_FORCE_UNICODE:
  ------------------
  |  |  301|      0|#define __NSS_PKCS12_DECODE_FORCE_UNICODE 0x00c
  ------------------
  |  Branch (132:9): [True: 0, False: 677k]
  ------------------
  133|      0|            *value = nss_ops.pkcs12DecodeForceUnicode;
  134|      0|            break;
  135|   664k|        case NSS_DEFAULT_LOCKS:
  ------------------
  |  |  302|   664k|#define NSS_DEFAULT_LOCKS 0x00d /* lock default values */
  ------------------
  |  Branch (135:9): [True: 664k, False: 12.2k]
  ------------------
  136|   664k|            *value = nss_ops.defaultLocks;
  137|   664k|            break;
  138|  6.14k|        case NSS_KEY_SIZE_POLICY_FLAGS:
  ------------------
  |  |  317|  6.14k|#define NSS_KEY_SIZE_POLICY_FLAGS 0x00e
  ------------------
  |  Branch (138:9): [True: 6.14k, False: 670k]
  ------------------
  139|  6.14k|        case NSS_KEY_SIZE_POLICY_SET_FLAGS:
  ------------------
  |  |  318|  6.14k|#define NSS_KEY_SIZE_POLICY_SET_FLAGS 0x00f
  ------------------
  |  Branch (139:9): [True: 0, False: 677k]
  ------------------
  140|  6.14k|            *value = nss_ops.keySizePolicyFlags;
  141|  6.14k|            break;
  142|      0|        case NSS_KEY_SIZE_POLICY_CLEAR_FLAGS:
  ------------------
  |  |  319|      0|#define NSS_KEY_SIZE_POLICY_CLEAR_FLAGS 0x010
  ------------------
  |  Branch (142:9): [True: 0, False: 677k]
  ------------------
  143|      0|            *value = ~nss_ops.keySizePolicyFlags;
  144|      0|            break;
  145|  1.25k|        case NSS_ECC_MIN_KEY_SIZE:
  ------------------
  |  |  327|  1.25k|#define NSS_ECC_MIN_KEY_SIZE 0x011
  ------------------
  |  Branch (145:9): [True: 1.25k, False: 675k]
  ------------------
  146|  1.25k|            *value = nss_ops.eccMinKeySize;
  147|  1.25k|            break;
  148|      0|        default:
  ------------------
  |  Branch (148:9): [True: 0, False: 677k]
  ------------------
  149|      0|            rv = SECFailure;
  150|   677k|    }
  151|       |
  152|   677k|    return rv;
  153|   677k|}

nssSession_ImportNSS3Session:
   29|      2|{
   30|      2|    nssSession *rvSession = NULL;
   31|      2|    if (session != CK_INVALID_HANDLE) {
  ------------------
  |  |   78|      2|#define CK_INVALID_HANDLE 0
  ------------------
  |  Branch (31:9): [True: 2, False: 0]
  ------------------
   32|      2|        rvSession = nss_ZNEW(arenaOpt, nssSession);
  ------------------
  |  |  348|      2|#define nss_ZNEW(arenaOpt, type) ((type *)nss_ZAlloc((arenaOpt), sizeof(type)))
  ------------------
   33|      2|        if (rvSession) {
  ------------------
  |  Branch (33:13): [True: 2, False: 0]
  ------------------
   34|      2|            rvSession->handle = session;
   35|      2|            rvSession->lock = lock;
   36|      2|            rvSession->ownLock = PR_FALSE;
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
   37|      2|            rvSession->isRW = rw;
   38|      2|        }
   39|      2|    }
   40|      2|    return rvSession;
   41|      2|}
nssToken_CreateFromPK11SlotInfo:
  132|      2|{
  133|      2|    NSSToken *rvToken;
  134|      2|    NSSArena *arena;
  135|       |
  136|       |    /* Don't create a token object for a disabled slot */
  137|      2|    if (nss3slot->disabled) {
  ------------------
  |  Branch (137:9): [True: 0, False: 2]
  ------------------
  138|      0|        PORT_SetError(SEC_ERROR_NO_TOKEN);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  139|      0|        return NULL;
  140|      0|    }
  141|      2|    arena = nssArena_Create();
  142|      2|    if (!arena) {
  ------------------
  |  Branch (142:9): [True: 0, False: 2]
  ------------------
  143|      0|        return NULL;
  144|      0|    }
  145|      2|    rvToken = nss_ZNEW(arena, NSSToken);
  ------------------
  |  |  348|      2|#define nss_ZNEW(arenaOpt, type) ((type *)nss_ZAlloc((arenaOpt), sizeof(type)))
  ------------------
  146|      2|    if (!rvToken) {
  ------------------
  |  Branch (146:9): [True: 0, False: 2]
  ------------------
  147|      0|        nssArena_Destroy(arena);
  148|      0|        return NULL;
  149|      0|    }
  150|      2|    rvToken->base.refCount = 1;
  151|      2|    rvToken->base.lock = PZ_NewLock(nssILockOther);
  ------------------
  |  |  243|      2|#define PZ_NewLock(t) PR_NewLock()
  ------------------
  152|      2|    if (!rvToken->base.lock) {
  ------------------
  |  Branch (152:9): [True: 0, False: 2]
  ------------------
  153|      0|        nssArena_Destroy(arena);
  154|      0|        return NULL;
  155|      0|    }
  156|      2|    rvToken->base.arena = arena;
  157|      2|    rvToken->pk11slot = PK11_ReferenceSlot(nss3slot);
  158|      2|    rvToken->epv = nss3slot->functionList;
  159|      2|    rvToken->defaultSession = nssSession_ImportNSS3Session(td->arena,
  160|      2|                                                           nss3slot->session,
  161|      2|                                                           nss3slot->sessionLock,
  162|      2|                                                           nss3slot->defRWSession);
  163|       |#if 0 /* we should do this instead of blindly continuing. */
  164|       |    if (!rvToken->defaultSession) {
  165|       |    PORT_SetError(SEC_ERROR_NO_TOKEN);
  166|       |        goto loser;
  167|       |    }
  168|       |#endif
  169|      2|    if (!PK11_IsInternal(nss3slot) && PK11_IsHW(nss3slot)) {
  ------------------
  |  Branch (169:9): [True: 0, False: 2]
  |  Branch (169:39): [True: 0, False: 0]
  ------------------
  170|      0|        rvToken->cache = nssTokenObjectCache_Create(rvToken,
  171|      0|                                                    PR_TRUE, PR_TRUE, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
                                                                  PR_TRUE, PR_TRUE, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
                                                                  PR_TRUE, PR_TRUE, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  172|      0|        if (!rvToken->cache)
  ------------------
  |  Branch (172:13): [True: 0, False: 0]
  ------------------
  173|      0|            goto loser;
  174|      0|    }
  175|      2|    rvToken->trustDomain = td;
  176|       |    /* Grab the token name from the PKCS#11 fixed-length buffer */
  177|      2|    rvToken->base.name = nssUTF8_Duplicate(nss3slot->token_name, td->arena);
  178|      2|    rvToken->slot = nssSlot_CreateFromPK11SlotInfo(td, nss3slot);
  179|      2|    if (!rvToken->slot) {
  ------------------
  |  Branch (179:9): [True: 0, False: 2]
  ------------------
  180|      0|        goto loser;
  181|      0|    }
  182|      2|    if (rvToken->defaultSession)
  ------------------
  |  Branch (182:9): [True: 2, False: 0]
  ------------------
  183|      2|        rvToken->defaultSession->slot = rvToken->slot;
  184|      2|    return rvToken;
  185|      0|loser:
  186|      0|    PZ_DestroyLock(rvToken->base.lock);
  ------------------
  |  |  244|      0|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
  187|      0|    nssArena_Destroy(arena);
  188|      0|    return NULL;
  189|      2|}
nssToken_UpdateName:
  193|      2|{
  194|      2|    if (!token) {
  ------------------
  |  Branch (194:9): [True: 2, False: 0]
  ------------------
  195|      2|        return;
  196|      2|    }
  197|      0|    token->base.name = nssUTF8_Duplicate(token->pk11slot->token_name, token->base.arena);
  198|      0|}
nssSlot_IsPermanent:
  202|  30.6k|{
  203|  30.6k|    return slot->pk11slot->isPerm;
  204|  30.6k|}
nssToken_Refresh:
  214|      2|{
  215|      2|    PK11SlotInfo *nss3slot;
  216|       |
  217|      2|    if (!token) {
  ------------------
  |  Branch (217:9): [True: 2, False: 0]
  ------------------
  218|      2|        return PR_SUCCESS;
  219|      2|    }
  220|      0|    nss3slot = token->pk11slot;
  221|      0|    token->defaultSession =
  222|      0|        nssSession_ImportNSS3Session(token->slot->base.arena,
  223|      0|                                     nss3slot->session,
  224|      0|                                     nss3slot->sessionLock,
  225|      0|                                     nss3slot->defRWSession);
  226|      0|    return token->defaultSession ? PR_SUCCESS : PR_FAILURE;
  ------------------
  |  Branch (226:12): [True: 0, False: 0]
  ------------------
  227|      2|}
dev3hack.c:nssSlot_CreateFromPK11SlotInfo:
  102|      2|{
  103|      2|    NSSSlot *rvSlot;
  104|      2|    NSSArena *arena;
  105|      2|    arena = nssArena_Create();
  106|      2|    if (!arena) {
  ------------------
  |  Branch (106:9): [True: 0, False: 2]
  ------------------
  107|      0|        return NULL;
  108|      0|    }
  109|      2|    rvSlot = nss_ZNEW(arena, NSSSlot);
  ------------------
  |  |  348|      2|#define nss_ZNEW(arenaOpt, type) ((type *)nss_ZAlloc((arenaOpt), sizeof(type)))
  ------------------
  110|      2|    if (!rvSlot) {
  ------------------
  |  Branch (110:9): [True: 0, False: 2]
  ------------------
  111|      0|        nssArena_Destroy(arena);
  112|      0|        return NULL;
  113|      0|    }
  114|      2|    rvSlot->base.refCount = 1;
  115|      2|    rvSlot->base.lock = PZ_NewLock(nssILockOther);
  ------------------
  |  |  243|      2|#define PZ_NewLock(t) PR_NewLock()
  ------------------
  116|      2|    rvSlot->base.arena = arena;
  117|      2|    rvSlot->pk11slot = PK11_ReferenceSlot(nss3slot);
  118|      2|    rvSlot->epv = nss3slot->functionList;
  119|      2|    rvSlot->slotID = nss3slot->slotID;
  120|       |    /* Grab the slot name from the PKCS#11 fixed-length buffer */
  121|      2|    rvSlot->base.name = nssUTF8_Duplicate(nss3slot->slot_name, td->arena);
  122|      2|    rvSlot->lock = (nss3slot->isThreadSafe) ? NULL : nss3slot->sessionLock;
  ------------------
  |  Branch (122:20): [True: 2, False: 0]
  ------------------
  123|      2|    rvSlot->isPresentLock = PZ_NewLock(nssiLockOther);
  ------------------
  |  |  243|      2|#define PZ_NewLock(t) PR_NewLock()
  ------------------
  124|      2|    rvSlot->isPresentCondition = PR_NewCondVar(rvSlot->isPresentLock);
  125|      2|    rvSlot->isPresentThread = NULL;
  126|      2|    rvSlot->lastTokenPingState = nssSlotLastPingState_Reset;
  127|      2|    return rvSlot;
  128|      2|}

PK11_ImportPublicKey:
   72|  3.81k|{
   73|  3.81k|    CK_BBOOL cktrue = CK_TRUE;
  ------------------
  |  |   22|  3.81k|#define CK_TRUE 1
  ------------------
   74|  3.81k|    CK_BBOOL ckfalse = CK_FALSE;
  ------------------
  |  |   23|  3.81k|#define CK_FALSE 0
  ------------------
   75|  3.81k|    CK_OBJECT_CLASS keyClass = CKO_PUBLIC_KEY;
  ------------------
  |  |  327|  3.81k|#define CKO_PUBLIC_KEY 0x00000002UL
  ------------------
   76|  3.81k|    CK_KEY_TYPE keyType = CKK_GENERIC_SECRET;
  ------------------
  |  |  383|  3.81k|#define CKK_GENERIC_SECRET 0x00000010UL
  ------------------
   77|  3.81k|    CK_OBJECT_HANDLE objectID;
   78|  3.81k|    CK_ATTRIBUTE theTemplate[11];
   79|  3.81k|    CK_ATTRIBUTE *signedattr = NULL;
   80|  3.81k|    CK_ATTRIBUTE *attrs = theTemplate;
   81|  3.81k|    CK_NSS_KEM_PARAMETER_SET_TYPE kemParams;
   82|  3.81k|    SECItem *ckaId = NULL;
   83|  3.81k|    SECItem *pubValue = NULL;
   84|  3.81k|    int signedcount = 0;
   85|  3.81k|    unsigned int templateCount = 0;
   86|  3.81k|    SECStatus rv;
   87|       |
   88|       |    /* if we already have an object in the desired slot, use it */
   89|  3.81k|    if (!isToken && pubKey->pkcs11Slot == slot) {
  ------------------
  |  Branch (89:9): [True: 3.81k, False: 0]
  |  Branch (89:21): [True: 0, False: 3.81k]
  ------------------
   90|      0|        return pubKey->pkcs11ID;
   91|      0|    }
   92|       |
   93|       |    /* free the existing key */
   94|  3.81k|    if (pubKey->pkcs11Slot != NULL) {
  ------------------
  |  Branch (94:9): [True: 0, False: 3.81k]
  ------------------
   95|      0|        PK11SlotInfo *oSlot = pubKey->pkcs11Slot;
   96|      0|        if (!PK11_IsPermObject(pubKey->pkcs11Slot, pubKey->pkcs11ID)) {
  ------------------
  |  Branch (96:13): [True: 0, False: 0]
  ------------------
   97|      0|            PK11_EnterSlotMonitor(oSlot);
   98|      0|            (void)PK11_GETTAB(oSlot)->C_DestroyObject(oSlot->session,
  ------------------
  |  |  102|      0|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
   99|      0|                                                      pubKey->pkcs11ID);
  100|      0|            PK11_ExitSlotMonitor(oSlot);
  101|      0|        }
  102|      0|        PK11_FreeSlot(oSlot);
  103|      0|        pubKey->pkcs11Slot = NULL;
  104|      0|    }
  105|  3.81k|    PK11_SETATTRS(attrs, CKA_CLASS, &keyClass, sizeof(keyClass));
  ------------------
  |  |  104|  3.81k|    (x)->type = (id);              \
  |  |  105|  3.81k|    (x)->pValue = (v);             \
  |  |  106|  3.81k|    (x)->ulValueLen = (l);
  ------------------
  106|  3.81k|    attrs++;
  107|  3.81k|    PK11_SETATTRS(attrs, CKA_KEY_TYPE, &keyType, sizeof(keyType));
  ------------------
  |  |  104|  3.81k|    (x)->type = (id);              \
  |  |  105|  3.81k|    (x)->pValue = (v);             \
  |  |  106|  3.81k|    (x)->ulValueLen = (l);
  ------------------
  108|  3.81k|    attrs++;
  109|  3.81k|    PK11_SETATTRS(attrs, CKA_TOKEN, isToken ? &cktrue : &ckfalse,
  ------------------
  |  |  104|  3.81k|    (x)->type = (id);              \
  |  |  105|  7.63k|    (x)->pValue = (v);             \
  |  |  ------------------
  |  |  |  Branch (105:20): [True: 0, False: 3.81k]
  |  |  ------------------
  |  |  106|  3.81k|    (x)->ulValueLen = (l);
  ------------------
  110|  3.81k|                  sizeof(CK_BBOOL));
  111|  3.81k|    attrs++;
  112|  3.81k|    if (isToken) {
  ------------------
  |  Branch (112:9): [True: 0, False: 3.81k]
  ------------------
  113|      0|        ckaId = pk11_MakeIDFromPublicKey(pubKey);
  114|      0|        if (ckaId == NULL) {
  ------------------
  |  Branch (114:13): [True: 0, False: 0]
  ------------------
  115|      0|            PORT_SetError(SEC_ERROR_BAD_KEY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  116|      0|            return CK_INVALID_HANDLE;
  ------------------
  |  |   78|      0|#define CK_INVALID_HANDLE 0
  ------------------
  117|      0|        }
  118|      0|        PK11_SETATTRS(attrs, CKA_ID, ckaId->data, ckaId->len);
  ------------------
  |  |  104|      0|    (x)->type = (id);              \
  |  |  105|      0|    (x)->pValue = (v);             \
  |  |  106|      0|    (x)->ulValueLen = (l);
  ------------------
  119|      0|        attrs++;
  120|      0|    }
  121|       |
  122|       |    /* now import the key */
  123|  3.81k|    {
  124|  3.81k|        switch (pubKey->keyType) {
  125|  2.42k|            case rsaKey:
  ------------------
  |  Branch (125:13): [True: 2.42k, False: 1.39k]
  ------------------
  126|  2.42k|                keyType = CKK_RSA;
  ------------------
  |  |  372|  2.42k|#define CKK_RSA 0x00000000UL
  ------------------
  127|  2.42k|                PK11_SETATTRS(attrs, CKA_WRAP, &cktrue, sizeof(CK_BBOOL));
  ------------------
  |  |  104|  2.42k|    (x)->type = (id);              \
  |  |  105|  2.42k|    (x)->pValue = (v);             \
  |  |  106|  2.42k|    (x)->ulValueLen = (l);
  ------------------
  128|  2.42k|                attrs++;
  129|  2.42k|                PK11_SETATTRS(attrs, CKA_ENCRYPT, &cktrue,
  ------------------
  |  |  104|  2.42k|    (x)->type = (id);              \
  |  |  105|  2.42k|    (x)->pValue = (v);             \
  |  |  106|  2.42k|    (x)->ulValueLen = (l);
  ------------------
  130|  2.42k|                              sizeof(CK_BBOOL));
  131|  2.42k|                attrs++;
  132|  2.42k|                PK11_SETATTRS(attrs, CKA_VERIFY, &cktrue, sizeof(CK_BBOOL));
  ------------------
  |  |  104|  2.42k|    (x)->type = (id);              \
  |  |  105|  2.42k|    (x)->pValue = (v);             \
  |  |  106|  2.42k|    (x)->ulValueLen = (l);
  ------------------
  133|  2.42k|                attrs++;
  134|  2.42k|                signedattr = attrs;
  135|  2.42k|                PK11_SETATTRS(attrs, CKA_MODULUS, pubKey->u.rsa.modulus.data,
  ------------------
  |  |  104|  2.42k|    (x)->type = (id);              \
  |  |  105|  2.42k|    (x)->pValue = (v);             \
  |  |  106|  2.42k|    (x)->ulValueLen = (l);
  ------------------
  136|  2.42k|                              pubKey->u.rsa.modulus.len);
  137|  2.42k|                attrs++;
  138|  2.42k|                PK11_SETATTRS(attrs, CKA_PUBLIC_EXPONENT,
  ------------------
  |  |  104|  2.42k|    (x)->type = (id);              \
  |  |  105|  2.42k|    (x)->pValue = (v);             \
  |  |  106|  2.42k|    (x)->ulValueLen = (l);
  ------------------
  139|  2.42k|                              pubKey->u.rsa.publicExponent.data,
  140|  2.42k|                              pubKey->u.rsa.publicExponent.len);
  141|  2.42k|                attrs++;
  142|  2.42k|                break;
  143|  1.14k|            case dsaKey:
  ------------------
  |  Branch (143:13): [True: 1.14k, False: 2.67k]
  ------------------
  144|  1.14k|                keyType = CKK_DSA;
  ------------------
  |  |  373|  1.14k|#define CKK_DSA 0x00000001UL
  ------------------
  145|  1.14k|                PK11_SETATTRS(attrs, CKA_VERIFY, &cktrue, sizeof(CK_BBOOL));
  ------------------
  |  |  104|  1.14k|    (x)->type = (id);              \
  |  |  105|  1.14k|    (x)->pValue = (v);             \
  |  |  106|  1.14k|    (x)->ulValueLen = (l);
  ------------------
  146|  1.14k|                attrs++;
  147|  1.14k|                signedattr = attrs;
  148|  1.14k|                PK11_SETATTRS(attrs, CKA_PRIME, pubKey->u.dsa.params.prime.data,
  ------------------
  |  |  104|  1.14k|    (x)->type = (id);              \
  |  |  105|  1.14k|    (x)->pValue = (v);             \
  |  |  106|  1.14k|    (x)->ulValueLen = (l);
  ------------------
  149|  1.14k|                              pubKey->u.dsa.params.prime.len);
  150|  1.14k|                attrs++;
  151|  1.14k|                PK11_SETATTRS(attrs, CKA_SUBPRIME, pubKey->u.dsa.params.subPrime.data,
  ------------------
  |  |  104|  1.14k|    (x)->type = (id);              \
  |  |  105|  1.14k|    (x)->pValue = (v);             \
  |  |  106|  1.14k|    (x)->ulValueLen = (l);
  ------------------
  152|  1.14k|                              pubKey->u.dsa.params.subPrime.len);
  153|  1.14k|                attrs++;
  154|  1.14k|                PK11_SETATTRS(attrs, CKA_BASE, pubKey->u.dsa.params.base.data,
  ------------------
  |  |  104|  1.14k|    (x)->type = (id);              \
  |  |  105|  1.14k|    (x)->pValue = (v);             \
  |  |  106|  1.14k|    (x)->ulValueLen = (l);
  ------------------
  155|  1.14k|                              pubKey->u.dsa.params.base.len);
  156|  1.14k|                attrs++;
  157|  1.14k|                PK11_SETATTRS(attrs, CKA_VALUE, pubKey->u.dsa.publicValue.data,
  ------------------
  |  |  104|  1.14k|    (x)->type = (id);              \
  |  |  105|  1.14k|    (x)->pValue = (v);             \
  |  |  106|  1.14k|    (x)->ulValueLen = (l);
  ------------------
  158|  1.14k|                              pubKey->u.dsa.publicValue.len);
  159|  1.14k|                attrs++;
  160|  1.14k|                break;
  161|      0|            case fortezzaKey:
  ------------------
  |  Branch (161:13): [True: 0, False: 3.81k]
  ------------------
  162|      0|                keyType = CKK_DSA;
  ------------------
  |  |  373|      0|#define CKK_DSA 0x00000001UL
  ------------------
  163|      0|                PK11_SETATTRS(attrs, CKA_VERIFY, &cktrue, sizeof(CK_BBOOL));
  ------------------
  |  |  104|      0|    (x)->type = (id);              \
  |  |  105|      0|    (x)->pValue = (v);             \
  |  |  106|      0|    (x)->ulValueLen = (l);
  ------------------
  164|      0|                attrs++;
  165|      0|                signedattr = attrs;
  166|      0|                PK11_SETATTRS(attrs, CKA_PRIME, pubKey->u.fortezza.params.prime.data,
  ------------------
  |  |  104|      0|    (x)->type = (id);              \
  |  |  105|      0|    (x)->pValue = (v);             \
  |  |  106|      0|    (x)->ulValueLen = (l);
  ------------------
  167|      0|                              pubKey->u.fortezza.params.prime.len);
  168|      0|                attrs++;
  169|      0|                PK11_SETATTRS(attrs, CKA_SUBPRIME,
  ------------------
  |  |  104|      0|    (x)->type = (id);              \
  |  |  105|      0|    (x)->pValue = (v);             \
  |  |  106|      0|    (x)->ulValueLen = (l);
  ------------------
  170|      0|                              pubKey->u.fortezza.params.subPrime.data,
  171|      0|                              pubKey->u.fortezza.params.subPrime.len);
  172|      0|                attrs++;
  173|      0|                PK11_SETATTRS(attrs, CKA_BASE, pubKey->u.fortezza.params.base.data,
  ------------------
  |  |  104|      0|    (x)->type = (id);              \
  |  |  105|      0|    (x)->pValue = (v);             \
  |  |  106|      0|    (x)->ulValueLen = (l);
  ------------------
  174|      0|                              pubKey->u.fortezza.params.base.len);
  175|      0|                attrs++;
  176|      0|                PK11_SETATTRS(attrs, CKA_VALUE, pubKey->u.fortezza.DSSKey.data,
  ------------------
  |  |  104|      0|    (x)->type = (id);              \
  |  |  105|      0|    (x)->pValue = (v);             \
  |  |  106|      0|    (x)->ulValueLen = (l);
  ------------------
  177|      0|                              pubKey->u.fortezza.DSSKey.len);
  178|      0|                attrs++;
  179|      0|                break;
  180|      4|            case dhKey:
  ------------------
  |  Branch (180:13): [True: 4, False: 3.81k]
  ------------------
  181|      4|                keyType = CKK_DH;
  ------------------
  |  |  374|      4|#define CKK_DH 0x00000002UL
  ------------------
  182|      4|                PK11_SETATTRS(attrs, CKA_DERIVE, &cktrue, sizeof(CK_BBOOL));
  ------------------
  |  |  104|      4|    (x)->type = (id);              \
  |  |  105|      4|    (x)->pValue = (v);             \
  |  |  106|      4|    (x)->ulValueLen = (l);
  ------------------
  183|      4|                attrs++;
  184|      4|                signedattr = attrs;
  185|      4|                PK11_SETATTRS(attrs, CKA_PRIME, pubKey->u.dh.prime.data,
  ------------------
  |  |  104|      4|    (x)->type = (id);              \
  |  |  105|      4|    (x)->pValue = (v);             \
  |  |  106|      4|    (x)->ulValueLen = (l);
  ------------------
  186|      4|                              pubKey->u.dh.prime.len);
  187|      4|                attrs++;
  188|      4|                PK11_SETATTRS(attrs, CKA_BASE, pubKey->u.dh.base.data,
  ------------------
  |  |  104|      4|    (x)->type = (id);              \
  |  |  105|      4|    (x)->pValue = (v);             \
  |  |  106|      4|    (x)->ulValueLen = (l);
  ------------------
  189|      4|                              pubKey->u.dh.base.len);
  190|      4|                attrs++;
  191|      4|                PK11_SETATTRS(attrs, CKA_VALUE, pubKey->u.dh.publicValue.data,
  ------------------
  |  |  104|      4|    (x)->type = (id);              \
  |  |  105|      4|    (x)->pValue = (v);             \
  |  |  106|      4|    (x)->ulValueLen = (l);
  ------------------
  192|      4|                              pubKey->u.dh.publicValue.len);
  193|      4|                attrs++;
  194|      4|                break;
  195|      0|            case edKey:
  ------------------
  |  Branch (195:13): [True: 0, False: 3.81k]
  ------------------
  196|      0|                keyType = CKK_EC_EDWARDS;
  ------------------
  |  |  448|      0|#define CKK_EC_EDWARDS 0x00000040UL
  ------------------
  197|      0|                PK11_SETATTRS(attrs, CKA_VERIFY, &cktrue, sizeof(CK_BBOOL));
  ------------------
  |  |  104|      0|    (x)->type = (id);              \
  |  |  105|      0|    (x)->pValue = (v);             \
  |  |  106|      0|    (x)->ulValueLen = (l);
  ------------------
  198|      0|                attrs++;
  199|      0|                PK11_SETATTRS(attrs, CKA_EC_PARAMS,
  ------------------
  |  |  104|      0|    (x)->type = (id);              \
  |  |  105|      0|    (x)->pValue = (v);             \
  |  |  106|      0|    (x)->ulValueLen = (l);
  ------------------
  200|      0|                              pubKey->u.ec.DEREncodedParams.data,
  201|      0|                              pubKey->u.ec.DEREncodedParams.len);
  202|      0|                attrs++;
  203|      0|                PK11_SETATTRS(attrs, CKA_EC_POINT,
  ------------------
  |  |  104|      0|    (x)->type = (id);              \
  |  |  105|      0|    (x)->pValue = (v);             \
  |  |  106|      0|    (x)->ulValueLen = (l);
  ------------------
  204|      0|                              pubKey->u.ec.publicValue.data,
  205|      0|                              pubKey->u.ec.publicValue.len);
  206|      0|                attrs++;
  207|      0|                break;
  208|      0|            case ecMontKey:
  ------------------
  |  Branch (208:13): [True: 0, False: 3.81k]
  ------------------
  209|      0|                keyType = CKK_EC_MONTGOMERY;
  ------------------
  |  |  449|      0|#define CKK_EC_MONTGOMERY 0x00000041UL
  ------------------
  210|      0|                PK11_SETATTRS(attrs, CKA_DERIVE, &cktrue, sizeof(CK_BBOOL));
  ------------------
  |  |  104|      0|    (x)->type = (id);              \
  |  |  105|      0|    (x)->pValue = (v);             \
  |  |  106|      0|    (x)->ulValueLen = (l);
  ------------------
  211|      0|                attrs++;
  212|      0|                PK11_SETATTRS(attrs, CKA_EC_PARAMS,
  ------------------
  |  |  104|      0|    (x)->type = (id);              \
  |  |  105|      0|    (x)->pValue = (v);             \
  |  |  106|      0|    (x)->ulValueLen = (l);
  ------------------
  213|      0|                              pubKey->u.ec.DEREncodedParams.data,
  214|      0|                              pubKey->u.ec.DEREncodedParams.len);
  215|      0|                attrs++;
  216|      0|                PK11_SETATTRS(attrs, CKA_EC_POINT,
  ------------------
  |  |  104|      0|    (x)->type = (id);              \
  |  |  105|      0|    (x)->pValue = (v);             \
  |  |  106|      0|    (x)->ulValueLen = (l);
  ------------------
  217|      0|                              pubKey->u.ec.publicValue.data,
  218|      0|                              pubKey->u.ec.publicValue.len);
  219|      0|                attrs++;
  220|      0|                break;
  221|    246|            case ecKey:
  ------------------
  |  Branch (221:13): [True: 246, False: 3.57k]
  ------------------
  222|    246|                keyType = CKK_EC;
  ------------------
  |  |  379|    246|#define CKK_EC 0x00000003UL
  ------------------
  223|    246|                PK11_SETATTRS(attrs, CKA_VERIFY, &cktrue, sizeof(CK_BBOOL));
  ------------------
  |  |  104|    246|    (x)->type = (id);              \
  |  |  105|    246|    (x)->pValue = (v);             \
  |  |  106|    246|    (x)->ulValueLen = (l);
  ------------------
  224|    246|                attrs++;
  225|    246|                PK11_SETATTRS(attrs, CKA_DERIVE, &cktrue, sizeof(CK_BBOOL));
  ------------------
  |  |  104|    246|    (x)->type = (id);              \
  |  |  105|    246|    (x)->pValue = (v);             \
  |  |  106|    246|    (x)->ulValueLen = (l);
  ------------------
  226|    246|                attrs++;
  227|    246|                PK11_SETATTRS(attrs, CKA_EC_PARAMS,
  ------------------
  |  |  104|    246|    (x)->type = (id);              \
  |  |  105|    246|    (x)->pValue = (v);             \
  |  |  106|    246|    (x)->ulValueLen = (l);
  ------------------
  228|    246|                              pubKey->u.ec.DEREncodedParams.data,
  229|    246|                              pubKey->u.ec.DEREncodedParams.len);
  230|    246|                attrs++;
  231|    246|                if (PR_GetEnvSecure("NSS_USE_DECODED_CKA_EC_POINT")) {
  ------------------
  |  Branch (231:21): [True: 0, False: 246]
  ------------------
  232|      0|                    PK11_SETATTRS(attrs, CKA_EC_POINT,
  ------------------
  |  |  104|      0|    (x)->type = (id);              \
  |  |  105|      0|    (x)->pValue = (v);             \
  |  |  106|      0|    (x)->ulValueLen = (l);
  ------------------
  233|      0|                                  pubKey->u.ec.publicValue.data,
  234|      0|                                  pubKey->u.ec.publicValue.len);
  235|      0|                    attrs++;
  236|    246|                } else {
  237|    246|                    pubValue = SEC_ASN1EncodeItem(NULL, NULL,
  ------------------
  |  |   89|    246|#define SEC_ASN1EncodeItem SEC_ASN1EncodeItem_Util
  ------------------
  238|    246|                                                  &pubKey->u.ec.publicValue,
  239|    246|                                                  SEC_ASN1_GET(SEC_OctetStringTemplate));
  ------------------
  |  |  188|    246|#define SEC_ASN1_GET(x) x
  ------------------
  240|    246|                    if (pubValue == NULL) {
  ------------------
  |  Branch (240:25): [True: 0, False: 246]
  ------------------
  241|      0|                        if (ckaId) {
  ------------------
  |  Branch (241:29): [True: 0, False: 0]
  ------------------
  242|      0|                            SECITEM_FreeItem(ckaId, PR_TRUE);
  ------------------
  |  |  108|      0|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                                          SECITEM_FreeItem(ckaId, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  243|      0|                        }
  244|      0|                        return CK_INVALID_HANDLE;
  ------------------
  |  |   78|      0|#define CK_INVALID_HANDLE 0
  ------------------
  245|      0|                    }
  246|    246|                    PK11_SETATTRS(attrs, CKA_EC_POINT,
  ------------------
  |  |  104|    246|    (x)->type = (id);              \
  |  |  105|    246|    (x)->pValue = (v);             \
  |  |  106|    246|    (x)->ulValueLen = (l);
  ------------------
  247|    246|                                  pubValue->data, pubValue->len);
  248|    246|                    attrs++;
  249|    246|                }
  250|    246|                break;
  251|    246|            case kyberKey:
  ------------------
  |  Branch (251:13): [True: 0, False: 3.81k]
  ------------------
  252|      0|                switch (pubKey->u.kyber.params) {
  253|      0|                    case params_kyber768_round3:
  ------------------
  |  Branch (253:21): [True: 0, False: 0]
  ------------------
  254|      0|                    case params_kyber768_round3_test_mode:
  ------------------
  |  Branch (254:21): [True: 0, False: 0]
  ------------------
  255|      0|                        keyType = CKK_NSS_KYBER;
  ------------------
  |  |   58|      0|#define CKK_NSS_KYBER (CKK_NSS + 5)
  |  |  ------------------
  |  |  |  |   49|      0|#define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  458|      0|#define CKK_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  256|      0|                        kemParams = CKP_NSS_KYBER_768_ROUND3;
  ------------------
  |  |  301|      0|#define CKP_NSS_KYBER_768_ROUND3 (CKP_NSS + 1)
  |  |  ------------------
  |  |  |  |  300|      0|#define CKP_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKP_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  257|      0|                        break;
  258|      0|                    case params_ml_kem768:
  ------------------
  |  Branch (258:21): [True: 0, False: 0]
  ------------------
  259|      0|                    case params_ml_kem768_test_mode:
  ------------------
  |  Branch (259:21): [True: 0, False: 0]
  ------------------
  260|      0|                        keyType = CKK_NSS_ML_KEM;
  ------------------
  |  |   59|      0|#define CKK_NSS_ML_KEM (CKK_NSS + 6)
  |  |  ------------------
  |  |  |  |   49|      0|#define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  458|      0|#define CKK_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  261|      0|                        kemParams = CKP_NSS_ML_KEM_768;
  ------------------
  |  |  302|      0|#define CKP_NSS_ML_KEM_768 (CKP_NSS + 2)
  |  |  ------------------
  |  |  |  |  300|      0|#define CKP_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKP_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  262|      0|                        break;
  263|      0|                    default:
  ------------------
  |  Branch (263:21): [True: 0, False: 0]
  ------------------
  264|      0|                        kemParams = CKP_INVALID_ID;
  ------------------
  |  |  345|      0|#define CKP_INVALID_ID 0x00000000UL
  ------------------
  265|      0|                        break;
  266|      0|                }
  267|      0|                PK11_SETATTRS(attrs, CKA_NSS_PARAMETER_SET,
  ------------------
  |  |  104|      0|    (x)->type = (id);              \
  |  |  105|      0|    (x)->pValue = (v);             \
  |  |  106|      0|    (x)->ulValueLen = (l);
  ------------------
  268|      0|                              &kemParams,
  269|      0|                              sizeof(CK_NSS_KEM_PARAMETER_SET_TYPE));
  270|      0|                attrs++;
  271|      0|                PK11_SETATTRS(attrs, CKA_VALUE, pubKey->u.kyber.publicValue.data,
  ------------------
  |  |  104|      0|    (x)->type = (id);              \
  |  |  105|      0|    (x)->pValue = (v);             \
  |  |  106|      0|    (x)->ulValueLen = (l);
  ------------------
  272|      0|                              pubKey->u.kyber.publicValue.len);
  273|      0|                attrs++;
  274|      0|                break;
  275|      0|            default:
  ------------------
  |  Branch (275:13): [True: 0, False: 3.81k]
  ------------------
  276|      0|                if (ckaId) {
  ------------------
  |  Branch (276:21): [True: 0, False: 0]
  ------------------
  277|      0|                    SECITEM_FreeItem(ckaId, PR_TRUE);
  ------------------
  |  |  108|      0|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                                  SECITEM_FreeItem(ckaId, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  278|      0|                }
  279|      0|                PORT_SetError(SEC_ERROR_BAD_KEY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  280|      0|                return CK_INVALID_HANDLE;
  ------------------
  |  |   78|      0|#define CK_INVALID_HANDLE 0
  ------------------
  281|  3.81k|        }
  282|  3.81k|        templateCount = attrs - theTemplate;
  283|  3.81k|        PORT_Assert(templateCount <= (sizeof(theTemplate) / sizeof(CK_ATTRIBUTE)));
  ------------------
  |  |  120|  3.81k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  3.81k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 3.81k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  284|  3.81k|        if (pubKey->keyType != ecKey && pubKey->keyType != kyberKey && pubKey->keyType != edKey &&
  ------------------
  |  Branch (284:13): [True: 3.57k, False: 246]
  |  Branch (284:41): [True: 3.57k, False: 0]
  |  Branch (284:72): [True: 3.57k, False: 0]
  ------------------
  285|  3.81k|            pubKey->keyType != ecMontKey) {
  ------------------
  |  Branch (285:13): [True: 3.57k, False: 0]
  ------------------
  286|  3.57k|            PORT_Assert(signedattr);
  ------------------
  |  |  120|  3.57k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  3.57k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 3.57k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  287|  3.57k|            signedcount = attrs - signedattr;
  288|  13.0k|            for (attrs = signedattr; signedcount; attrs++, signedcount--) {
  ------------------
  |  Branch (288:38): [True: 9.43k, False: 3.57k]
  ------------------
  289|  9.43k|                pk11_SignedToUnsigned(attrs);
  290|  9.43k|            }
  291|  3.57k|        }
  292|  3.81k|        rv = PK11_CreateNewObject(slot, CK_INVALID_HANDLE, theTemplate,
  ------------------
  |  |   78|  3.81k|#define CK_INVALID_HANDLE 0
  ------------------
  293|  3.81k|                                  templateCount, isToken, &objectID);
  294|  3.81k|        if (ckaId) {
  ------------------
  |  Branch (294:13): [True: 0, False: 3.81k]
  ------------------
  295|      0|            SECITEM_FreeItem(ckaId, PR_TRUE);
  ------------------
  |  |  108|      0|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                          SECITEM_FreeItem(ckaId, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  296|      0|        }
  297|  3.81k|        if (pubValue) {
  ------------------
  |  Branch (297:13): [True: 246, False: 3.57k]
  ------------------
  298|    246|            SECITEM_FreeItem(pubValue, PR_TRUE);
  ------------------
  |  |  108|    246|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                          SECITEM_FreeItem(pubValue, PR_TRUE);
  ------------------
  |  |  437|    246|#define PR_TRUE 1
  ------------------
  299|    246|        }
  300|  3.81k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (300:13): [True: 107, False: 3.71k]
  ------------------
  301|    107|            return CK_INVALID_HANDLE;
  ------------------
  |  |   78|    107|#define CK_INVALID_HANDLE 0
  ------------------
  302|    107|        }
  303|  3.81k|    }
  304|       |
  305|  3.71k|    pubKey->pkcs11ID = objectID;
  306|  3.71k|    pubKey->pkcs11Slot = PK11_ReferenceSlot(slot);
  307|       |
  308|  3.71k|    return objectID;
  309|  3.81k|}
PK11_ExtractPublicKey:
  648|  9.67k|{
  649|  9.67k|    CK_OBJECT_CLASS keyClass = CKO_PUBLIC_KEY;
  ------------------
  |  |  327|  9.67k|#define CKO_PUBLIC_KEY 0x00000002UL
  ------------------
  650|  9.67k|    PLArenaPool *arena;
  651|  9.67k|    PLArenaPool *tmp_arena;
  652|  9.67k|    SECKEYPublicKey *pubKey;
  653|  9.67k|    unsigned int templateCount = 0;
  654|  9.67k|    CK_KEY_TYPE pk11KeyType;
  655|  9.67k|    CK_RV crv;
  656|  9.67k|    CK_ATTRIBUTE template[8];
  657|  9.67k|    CK_ATTRIBUTE *attrs = template;
  658|  9.67k|    CK_ATTRIBUTE *modulus, *exponent, *base, *prime, *subprime, *value;
  659|  9.67k|    CK_ATTRIBUTE *ecparams, *kemParams;
  660|       |
  661|       |    /* if we didn't know the key type, get it */
  662|  9.67k|    if (keyType == nullKey) {
  ------------------
  |  Branch (662:9): [True: 0, False: 9.67k]
  ------------------
  663|       |
  664|      0|        pk11KeyType = PK11_ReadULongAttribute(slot, id, CKA_KEY_TYPE);
  ------------------
  |  |  543|      0|#define CKA_KEY_TYPE 0x00000100UL
  ------------------
  665|      0|        if (pk11KeyType == CK_UNAVAILABLE_INFORMATION) {
  ------------------
  |  |   64|      0|#define CK_UNAVAILABLE_INFORMATION (~0UL)
  ------------------
  |  Branch (665:13): [True: 0, False: 0]
  ------------------
  666|      0|            return NULL;
  667|      0|        }
  668|      0|        switch (pk11KeyType) {
  669|      0|            case CKK_RSA:
  ------------------
  |  |  372|      0|#define CKK_RSA 0x00000000UL
  ------------------
  |  Branch (669:13): [True: 0, False: 0]
  ------------------
  670|      0|                keyType = rsaKey;
  671|      0|                break;
  672|      0|            case CKK_DSA:
  ------------------
  |  |  373|      0|#define CKK_DSA 0x00000001UL
  ------------------
  |  Branch (672:13): [True: 0, False: 0]
  ------------------
  673|      0|                keyType = dsaKey;
  674|      0|                break;
  675|      0|            case CKK_DH:
  ------------------
  |  |  374|      0|#define CKK_DH 0x00000002UL
  ------------------
  |  Branch (675:13): [True: 0, False: 0]
  ------------------
  676|      0|                keyType = dhKey;
  677|      0|                break;
  678|      0|            case CKK_EC:
  ------------------
  |  |  379|      0|#define CKK_EC 0x00000003UL
  ------------------
  |  Branch (678:13): [True: 0, False: 0]
  ------------------
  679|      0|                keyType = ecKey;
  680|      0|                break;
  681|      0|            case CKK_EC_MONTGOMERY:
  ------------------
  |  |  449|      0|#define CKK_EC_MONTGOMERY 0x00000041UL
  ------------------
  |  Branch (681:13): [True: 0, False: 0]
  ------------------
  682|      0|                keyType = ecMontKey;
  683|      0|                break;
  684|      0|            case CKK_EC_EDWARDS:
  ------------------
  |  |  448|      0|#define CKK_EC_EDWARDS 0x00000040UL
  ------------------
  |  Branch (684:13): [True: 0, False: 0]
  ------------------
  685|      0|                keyType = edKey;
  686|      0|                break;
  687|      0|            case CKK_NSS_KYBER:
  ------------------
  |  |   58|      0|#define CKK_NSS_KYBER (CKK_NSS + 5)
  |  |  ------------------
  |  |  |  |   49|      0|#define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  458|      0|#define CKK_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (687:13): [True: 0, False: 0]
  ------------------
  688|      0|            case CKK_NSS_ML_KEM:
  ------------------
  |  |   59|      0|#define CKK_NSS_ML_KEM (CKK_NSS + 6)
  |  |  ------------------
  |  |  |  |   49|      0|#define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  458|      0|#define CKK_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (688:13): [True: 0, False: 0]
  ------------------
  689|      0|                keyType = kyberKey;
  690|      0|                break;
  691|      0|            default:
  ------------------
  |  Branch (691:13): [True: 0, False: 0]
  ------------------
  692|      0|                PORT_SetError(SEC_ERROR_BAD_KEY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  693|      0|                return NULL;
  694|      0|        }
  695|      0|    }
  696|       |
  697|       |    /* now we need to create space for the public key */
  698|  9.67k|    arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
  ------------------
  |  |   63|  9.67k|#define PORT_NewArena PORT_NewArena_Util
  ------------------
                  arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
  ------------------
  |  |   60|  9.67k|#define DER_DEFAULT_CHUNKSIZE (2048)
  ------------------
  699|  9.67k|    if (arena == NULL)
  ------------------
  |  Branch (699:9): [True: 0, False: 9.67k]
  ------------------
  700|      0|        return NULL;
  701|  9.67k|    tmp_arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
  ------------------
  |  |   63|  9.67k|#define PORT_NewArena PORT_NewArena_Util
  ------------------
                  tmp_arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
  ------------------
  |  |   60|  9.67k|#define DER_DEFAULT_CHUNKSIZE (2048)
  ------------------
  702|  9.67k|    if (tmp_arena == NULL) {
  ------------------
  |  Branch (702:9): [True: 0, False: 9.67k]
  ------------------
  703|      0|        PORT_FreeArena(arena, PR_FALSE);
  ------------------
  |  |   61|      0|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                      PORT_FreeArena(arena, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  704|      0|        return NULL;
  705|      0|    }
  706|       |
  707|  9.67k|    pubKey = (SECKEYPublicKey *)
  708|  9.67k|        PORT_ArenaZAlloc(arena, sizeof(SECKEYPublicKey));
  ------------------
  |  |   59|  9.67k|#define PORT_ArenaZAlloc PORT_ArenaZAlloc_Util
  ------------------
  709|  9.67k|    if (pubKey == NULL) {
  ------------------
  |  Branch (709:9): [True: 0, False: 9.67k]
  ------------------
  710|      0|        PORT_FreeArena(arena, PR_FALSE);
  ------------------
  |  |   61|      0|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                      PORT_FreeArena(arena, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  711|      0|        PORT_FreeArena(tmp_arena, PR_FALSE);
  ------------------
  |  |   61|      0|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                      PORT_FreeArena(tmp_arena, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  712|      0|        return NULL;
  713|      0|    }
  714|       |
  715|  9.67k|    pubKey->arena = arena;
  716|  9.67k|    pubKey->keyType = keyType;
  717|  9.67k|    pubKey->pkcs11Slot = PK11_ReferenceSlot(slot);
  718|  9.67k|    pubKey->pkcs11ID = id;
  719|  9.67k|    PK11_SETATTRS(attrs, CKA_CLASS, &keyClass,
  ------------------
  |  |  104|  9.67k|    (x)->type = (id);              \
  |  |  105|  9.67k|    (x)->pValue = (v);             \
  |  |  106|  9.67k|    (x)->ulValueLen = (l);
  ------------------
  720|  9.67k|                  sizeof(keyClass));
  721|  9.67k|    attrs++;
  722|  9.67k|    PK11_SETATTRS(attrs, CKA_KEY_TYPE, &pk11KeyType,
  ------------------
  |  |  104|  9.67k|    (x)->type = (id);              \
  |  |  105|  9.67k|    (x)->pValue = (v);             \
  |  |  106|  9.67k|    (x)->ulValueLen = (l);
  ------------------
  723|  9.67k|                  sizeof(pk11KeyType));
  724|  9.67k|    attrs++;
  725|  9.67k|    switch (pubKey->keyType) {
  726|      0|        case rsaKey:
  ------------------
  |  Branch (726:9): [True: 0, False: 9.67k]
  ------------------
  727|      0|            modulus = attrs;
  728|      0|            PK11_SETATTRS(attrs, CKA_MODULUS, NULL, 0);
  ------------------
  |  |  104|      0|    (x)->type = (id);              \
  |  |  105|      0|    (x)->pValue = (v);             \
  |  |  106|      0|    (x)->ulValueLen = (l);
  ------------------
  729|      0|            attrs++;
  730|      0|            exponent = attrs;
  731|      0|            PK11_SETATTRS(attrs, CKA_PUBLIC_EXPONENT, NULL, 0);
  ------------------
  |  |  104|      0|    (x)->type = (id);              \
  |  |  105|      0|    (x)->pValue = (v);             \
  |  |  106|      0|    (x)->ulValueLen = (l);
  ------------------
  732|      0|            attrs++;
  733|       |
  734|      0|            templateCount = attrs - template;
  735|      0|            PR_ASSERT(templateCount <= sizeof(template) / sizeof(CK_ATTRIBUTE));
  ------------------
  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  736|      0|            crv = PK11_GetAttributes(tmp_arena, slot, id, template, templateCount);
  737|      0|            if (crv != CKR_OK)
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (737:17): [True: 0, False: 0]
  ------------------
  738|      0|                break;
  739|       |
  740|      0|            if ((keyClass != CKO_PUBLIC_KEY) || (pk11KeyType != CKK_RSA)) {
  ------------------
  |  |  327|      0|#define CKO_PUBLIC_KEY 0x00000002UL
  ------------------
                          if ((keyClass != CKO_PUBLIC_KEY) || (pk11KeyType != CKK_RSA)) {
  ------------------
  |  |  372|      0|#define CKK_RSA 0x00000000UL
  ------------------
  |  Branch (740:17): [True: 0, False: 0]
  |  Branch (740:49): [True: 0, False: 0]
  ------------------
  741|      0|                crv = CKR_OBJECT_HANDLE_INVALID;
  ------------------
  |  | 1452|      0|#define CKR_OBJECT_HANDLE_INVALID 0x00000082UL
  ------------------
  742|      0|                break;
  743|      0|            }
  744|      0|            crv = pk11_Attr2SecItem(arena, modulus, &pubKey->u.rsa.modulus);
  745|      0|            if (crv != CKR_OK)
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (745:17): [True: 0, False: 0]
  ------------------
  746|      0|                break;
  747|      0|            crv = pk11_Attr2SecItem(arena, exponent, &pubKey->u.rsa.publicExponent);
  748|      0|            if (crv != CKR_OK)
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (748:17): [True: 0, False: 0]
  ------------------
  749|      0|                break;
  750|      0|            break;
  751|      0|        case dsaKey:
  ------------------
  |  Branch (751:9): [True: 0, False: 9.67k]
  ------------------
  752|      0|            prime = attrs;
  753|      0|            PK11_SETATTRS(attrs, CKA_PRIME, NULL, 0);
  ------------------
  |  |  104|      0|    (x)->type = (id);              \
  |  |  105|      0|    (x)->pValue = (v);             \
  |  |  106|      0|    (x)->ulValueLen = (l);
  ------------------
  754|      0|            attrs++;
  755|      0|            subprime = attrs;
  756|      0|            PK11_SETATTRS(attrs, CKA_SUBPRIME, NULL, 0);
  ------------------
  |  |  104|      0|    (x)->type = (id);              \
  |  |  105|      0|    (x)->pValue = (v);             \
  |  |  106|      0|    (x)->ulValueLen = (l);
  ------------------
  757|      0|            attrs++;
  758|      0|            base = attrs;
  759|      0|            PK11_SETATTRS(attrs, CKA_BASE, NULL, 0);
  ------------------
  |  |  104|      0|    (x)->type = (id);              \
  |  |  105|      0|    (x)->pValue = (v);             \
  |  |  106|      0|    (x)->ulValueLen = (l);
  ------------------
  760|      0|            attrs++;
  761|      0|            value = attrs;
  762|      0|            PK11_SETATTRS(attrs, CKA_VALUE, NULL, 0);
  ------------------
  |  |  104|      0|    (x)->type = (id);              \
  |  |  105|      0|    (x)->pValue = (v);             \
  |  |  106|      0|    (x)->ulValueLen = (l);
  ------------------
  763|      0|            attrs++;
  764|      0|            templateCount = attrs - template;
  765|      0|            PR_ASSERT(templateCount <= sizeof(template) / sizeof(CK_ATTRIBUTE));
  ------------------
  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  766|      0|            crv = PK11_GetAttributes(tmp_arena, slot, id, template, templateCount);
  767|      0|            if (crv != CKR_OK)
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (767:17): [True: 0, False: 0]
  ------------------
  768|      0|                break;
  769|       |
  770|      0|            if ((keyClass != CKO_PUBLIC_KEY) || (pk11KeyType != CKK_DSA)) {
  ------------------
  |  |  327|      0|#define CKO_PUBLIC_KEY 0x00000002UL
  ------------------
                          if ((keyClass != CKO_PUBLIC_KEY) || (pk11KeyType != CKK_DSA)) {
  ------------------
  |  |  373|      0|#define CKK_DSA 0x00000001UL
  ------------------
  |  Branch (770:17): [True: 0, False: 0]
  |  Branch (770:49): [True: 0, False: 0]
  ------------------
  771|      0|                crv = CKR_OBJECT_HANDLE_INVALID;
  ------------------
  |  | 1452|      0|#define CKR_OBJECT_HANDLE_INVALID 0x00000082UL
  ------------------
  772|      0|                break;
  773|      0|            }
  774|      0|            crv = pk11_Attr2SecItem(arena, prime, &pubKey->u.dsa.params.prime);
  775|      0|            if (crv != CKR_OK)
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (775:17): [True: 0, False: 0]
  ------------------
  776|      0|                break;
  777|      0|            crv = pk11_Attr2SecItem(arena, subprime, &pubKey->u.dsa.params.subPrime);
  778|      0|            if (crv != CKR_OK)
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (778:17): [True: 0, False: 0]
  ------------------
  779|      0|                break;
  780|      0|            crv = pk11_Attr2SecItem(arena, base, &pubKey->u.dsa.params.base);
  781|      0|            if (crv != CKR_OK)
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (781:17): [True: 0, False: 0]
  ------------------
  782|      0|                break;
  783|      0|            crv = pk11_Attr2SecItem(arena, value, &pubKey->u.dsa.publicValue);
  784|      0|            if (crv != CKR_OK)
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (784:17): [True: 0, False: 0]
  ------------------
  785|      0|                break;
  786|      0|            break;
  787|  1.13k|        case dhKey:
  ------------------
  |  Branch (787:9): [True: 1.13k, False: 8.54k]
  ------------------
  788|  1.13k|            prime = attrs;
  789|  1.13k|            PK11_SETATTRS(attrs, CKA_PRIME, NULL, 0);
  ------------------
  |  |  104|  1.13k|    (x)->type = (id);              \
  |  |  105|  1.13k|    (x)->pValue = (v);             \
  |  |  106|  1.13k|    (x)->ulValueLen = (l);
  ------------------
  790|  1.13k|            attrs++;
  791|  1.13k|            base = attrs;
  792|  1.13k|            PK11_SETATTRS(attrs, CKA_BASE, NULL, 0);
  ------------------
  |  |  104|  1.13k|    (x)->type = (id);              \
  |  |  105|  1.13k|    (x)->pValue = (v);             \
  |  |  106|  1.13k|    (x)->ulValueLen = (l);
  ------------------
  793|  1.13k|            attrs++;
  794|  1.13k|            value = attrs;
  795|  1.13k|            PK11_SETATTRS(attrs, CKA_VALUE, NULL, 0);
  ------------------
  |  |  104|  1.13k|    (x)->type = (id);              \
  |  |  105|  1.13k|    (x)->pValue = (v);             \
  |  |  106|  1.13k|    (x)->ulValueLen = (l);
  ------------------
  796|  1.13k|            attrs++;
  797|  1.13k|            templateCount = attrs - template;
  798|  1.13k|            PR_ASSERT(templateCount <= sizeof(template) / sizeof(CK_ATTRIBUTE));
  ------------------
  |  |  208|  1.13k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 1.13k, False: 0]
  |  |  ------------------
  ------------------
  799|  1.13k|            crv = PK11_GetAttributes(tmp_arena, slot, id, template, templateCount);
  800|  1.13k|            if (crv != CKR_OK)
  ------------------
  |  | 1388|  1.13k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (800:17): [True: 0, False: 1.13k]
  ------------------
  801|      0|                break;
  802|       |
  803|  1.13k|            if ((keyClass != CKO_PUBLIC_KEY) || (pk11KeyType != CKK_DH)) {
  ------------------
  |  |  327|  1.13k|#define CKO_PUBLIC_KEY 0x00000002UL
  ------------------
                          if ((keyClass != CKO_PUBLIC_KEY) || (pk11KeyType != CKK_DH)) {
  ------------------
  |  |  374|  1.13k|#define CKK_DH 0x00000002UL
  ------------------
  |  Branch (803:17): [True: 0, False: 1.13k]
  |  Branch (803:49): [True: 0, False: 1.13k]
  ------------------
  804|      0|                crv = CKR_OBJECT_HANDLE_INVALID;
  ------------------
  |  | 1452|      0|#define CKR_OBJECT_HANDLE_INVALID 0x00000082UL
  ------------------
  805|      0|                break;
  806|      0|            }
  807|  1.13k|            crv = pk11_Attr2SecItem(arena, prime, &pubKey->u.dh.prime);
  808|  1.13k|            if (crv != CKR_OK)
  ------------------
  |  | 1388|  1.13k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (808:17): [True: 0, False: 1.13k]
  ------------------
  809|      0|                break;
  810|  1.13k|            crv = pk11_Attr2SecItem(arena, base, &pubKey->u.dh.base);
  811|  1.13k|            if (crv != CKR_OK)
  ------------------
  |  | 1388|  1.13k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (811:17): [True: 0, False: 1.13k]
  ------------------
  812|      0|                break;
  813|  1.13k|            crv = pk11_Attr2SecItem(arena, value, &pubKey->u.dh.publicValue);
  814|  1.13k|            if (crv != CKR_OK)
  ------------------
  |  | 1388|  1.13k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (814:17): [True: 0, False: 1.13k]
  ------------------
  815|      0|                break;
  816|  1.13k|            break;
  817|  1.13k|        case edKey:
  ------------------
  |  Branch (817:9): [True: 0, False: 9.67k]
  ------------------
  818|  8.50k|        case ecKey:
  ------------------
  |  Branch (818:9): [True: 8.50k, False: 1.17k]
  ------------------
  819|  8.50k|        case ecMontKey:
  ------------------
  |  Branch (819:9): [True: 0, False: 9.67k]
  ------------------
  820|  8.50k|            pubKey->u.ec.size = 0;
  821|  8.50k|            ecparams = attrs;
  822|  8.50k|            PK11_SETATTRS(attrs, CKA_EC_PARAMS, NULL, 0);
  ------------------
  |  |  104|  8.50k|    (x)->type = (id);              \
  |  |  105|  8.50k|    (x)->pValue = (v);             \
  |  |  106|  8.50k|    (x)->ulValueLen = (l);
  ------------------
  823|  8.50k|            attrs++;
  824|  8.50k|            value = attrs;
  825|  8.50k|            PK11_SETATTRS(attrs, CKA_EC_POINT, NULL, 0);
  ------------------
  |  |  104|  8.50k|    (x)->type = (id);              \
  |  |  105|  8.50k|    (x)->pValue = (v);             \
  |  |  106|  8.50k|    (x)->ulValueLen = (l);
  ------------------
  826|  8.50k|            attrs++;
  827|  8.50k|            templateCount = attrs - template;
  828|  8.50k|            PR_ASSERT(templateCount <= sizeof(template) / sizeof(CK_ATTRIBUTE));
  ------------------
  |  |  208|  8.50k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 8.50k, False: 0]
  |  |  ------------------
  ------------------
  829|  8.50k|            crv = PK11_GetAttributes(arena, slot, id, template, templateCount);
  830|  8.50k|            if (crv != CKR_OK)
  ------------------
  |  | 1388|  8.50k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (830:17): [True: 0, False: 8.50k]
  ------------------
  831|      0|                break;
  832|       |
  833|  8.50k|            if ((keyClass != CKO_PUBLIC_KEY) ||
  ------------------
  |  |  327|  8.50k|#define CKO_PUBLIC_KEY 0x00000002UL
  ------------------
  |  Branch (833:17): [True: 0, False: 8.50k]
  ------------------
  834|  8.50k|                (pubKey->keyType == ecKey && pk11KeyType != CKK_EC) ||
  ------------------
  |  |  379|  8.50k|#define CKK_EC 0x00000003UL
  ------------------
  |  Branch (834:18): [True: 8.50k, False: 0]
  |  Branch (834:46): [True: 0, False: 8.50k]
  ------------------
  835|  8.50k|                (pubKey->keyType == edKey && pk11KeyType != CKK_EC_EDWARDS) ||
  ------------------
  |  |  448|      0|#define CKK_EC_EDWARDS 0x00000040UL
  ------------------
  |  Branch (835:18): [True: 0, False: 8.50k]
  |  Branch (835:46): [True: 0, False: 0]
  ------------------
  836|  8.50k|                (pubKey->keyType == ecMontKey && pk11KeyType != CKK_EC_MONTGOMERY)) {
  ------------------
  |  |  449|      0|#define CKK_EC_MONTGOMERY 0x00000041UL
  ------------------
  |  Branch (836:18): [True: 0, False: 8.50k]
  |  Branch (836:50): [True: 0, False: 0]
  ------------------
  837|      0|                crv = CKR_OBJECT_HANDLE_INVALID;
  ------------------
  |  | 1452|      0|#define CKR_OBJECT_HANDLE_INVALID 0x00000082UL
  ------------------
  838|      0|                break;
  839|      0|            }
  840|       |
  841|  8.50k|            crv = pk11_Attr2SecItem(arena, ecparams,
  842|  8.50k|                                    &pubKey->u.ec.DEREncodedParams);
  843|  8.50k|            if (crv != CKR_OK)
  ------------------
  |  | 1388|  8.50k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (843:17): [True: 0, False: 8.50k]
  ------------------
  844|      0|                break;
  845|  8.50k|            pubKey->u.ec.encoding = ECPoint_Undefined;
  846|  8.50k|            crv = pk11_get_Decoded_ECPoint(arena,
  847|  8.50k|                                           &pubKey->u.ec.DEREncodedParams, value,
  848|  8.50k|                                           &pubKey->u.ec.publicValue);
  849|  8.50k|            break;
  850|     40|        case kyberKey:
  ------------------
  |  Branch (850:9): [True: 40, False: 9.63k]
  ------------------
  851|     40|            value = attrs;
  852|     40|            PK11_SETATTRS(attrs, CKA_VALUE, NULL, 0);
  ------------------
  |  |  104|     40|    (x)->type = (id);              \
  |  |  105|     40|    (x)->pValue = (v);             \
  |  |  106|     40|    (x)->ulValueLen = (l);
  ------------------
  853|     40|            attrs++;
  854|     40|            kemParams = attrs;
  855|     40|            PK11_SETATTRS(attrs, CKA_NSS_PARAMETER_SET, NULL, 0);
  ------------------
  |  |  104|     40|    (x)->type = (id);              \
  |  |  105|     40|    (x)->pValue = (v);             \
  |  |  106|     40|    (x)->ulValueLen = (l);
  ------------------
  856|     40|            attrs++;
  857|     40|            templateCount = attrs - template;
  858|     40|            PR_ASSERT(templateCount <= sizeof(template) / sizeof(CK_ATTRIBUTE));
  ------------------
  |  |  208|     40|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 40, False: 0]
  |  |  ------------------
  ------------------
  859|       |
  860|     40|            crv = PK11_GetAttributes(arena, slot, id, template, templateCount);
  861|     40|            if (crv != CKR_OK)
  ------------------
  |  | 1388|     40|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (861:17): [True: 0, False: 40]
  ------------------
  862|      0|                break;
  863|       |
  864|     40|            if (keyClass != CKO_PUBLIC_KEY) {
  ------------------
  |  |  327|     40|#define CKO_PUBLIC_KEY 0x00000002UL
  ------------------
  |  Branch (864:17): [True: 0, False: 40]
  ------------------
  865|      0|                crv = CKR_OBJECT_HANDLE_INVALID;
  ------------------
  |  | 1452|      0|#define CKR_OBJECT_HANDLE_INVALID 0x00000082UL
  ------------------
  866|      0|                break;
  867|      0|            }
  868|       |
  869|     40|            if (pk11KeyType != CKK_NSS_KYBER && pk11KeyType != CKK_NSS_ML_KEM) {
  ------------------
  |  |   58|     80|#define CKK_NSS_KYBER (CKK_NSS + 5)
  |  |  ------------------
  |  |  |  |   49|     40|#define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  458|     40|#define CKK_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     40|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                          if (pk11KeyType != CKK_NSS_KYBER && pk11KeyType != CKK_NSS_ML_KEM) {
  ------------------
  |  |   59|      0|#define CKK_NSS_ML_KEM (CKK_NSS + 6)
  |  |  ------------------
  |  |  |  |   49|      0|#define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  458|      0|#define CKK_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (869:17): [True: 0, False: 40]
  |  Branch (869:49): [True: 0, False: 0]
  ------------------
  870|      0|                crv = CKR_OBJECT_HANDLE_INVALID;
  ------------------
  |  | 1452|      0|#define CKR_OBJECT_HANDLE_INVALID 0x00000082UL
  ------------------
  871|      0|                break;
  872|      0|            }
  873|       |
  874|     40|            if (kemParams->ulValueLen != sizeof(CK_NSS_KEM_PARAMETER_SET_TYPE)) {
  ------------------
  |  Branch (874:17): [True: 0, False: 40]
  ------------------
  875|      0|                crv = CKR_OBJECT_HANDLE_INVALID;
  ------------------
  |  | 1452|      0|#define CKR_OBJECT_HANDLE_INVALID 0x00000082UL
  ------------------
  876|      0|                break;
  877|      0|            }
  878|     40|            CK_NSS_KEM_PARAMETER_SET_TYPE *pPK11Params = kemParams->pValue;
  879|     40|            switch (*pPK11Params) {
  880|      0|                case CKP_NSS_KYBER_768_ROUND3:
  ------------------
  |  |  301|      0|#define CKP_NSS_KYBER_768_ROUND3 (CKP_NSS + 1)
  |  |  ------------------
  |  |  |  |  300|      0|#define CKP_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKP_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (880:17): [True: 0, False: 40]
  ------------------
  881|      0|                    pubKey->u.kyber.params = params_kyber768_round3;
  882|      0|                    break;
  883|     40|                case CKP_NSS_ML_KEM_768:
  ------------------
  |  |  302|     40|#define CKP_NSS_ML_KEM_768 (CKP_NSS + 2)
  |  |  ------------------
  |  |  |  |  300|     40|#define CKP_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|     40|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKP_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     40|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (883:17): [True: 40, False: 0]
  ------------------
  884|     40|                    pubKey->u.kyber.params = params_ml_kem768;
  885|     40|                    break;
  886|      0|                default:
  ------------------
  |  Branch (886:17): [True: 0, False: 40]
  ------------------
  887|      0|                    pubKey->u.kyber.params = params_kyber_invalid;
  888|      0|                    break;
  889|     40|            }
  890|     40|            crv = pk11_Attr2SecItem(arena, value, &pubKey->u.kyber.publicValue);
  891|     40|            break;
  892|      0|        case fortezzaKey:
  ------------------
  |  Branch (892:9): [True: 0, False: 9.67k]
  ------------------
  893|      0|        case nullKey:
  ------------------
  |  Branch (893:9): [True: 0, False: 9.67k]
  ------------------
  894|      0|        default:
  ------------------
  |  Branch (894:9): [True: 0, False: 9.67k]
  ------------------
  895|      0|            crv = CKR_OBJECT_HANDLE_INVALID;
  ------------------
  |  | 1452|      0|#define CKR_OBJECT_HANDLE_INVALID 0x00000082UL
  ------------------
  896|      0|            break;
  897|  9.67k|    }
  898|       |
  899|  9.67k|    PORT_FreeArena(tmp_arena, PR_FALSE);
  ------------------
  |  |   61|  9.67k|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                  PORT_FreeArena(tmp_arena, PR_FALSE);
  ------------------
  |  |  438|  9.67k|#define PR_FALSE 0
  ------------------
  900|       |
  901|  9.67k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  9.67k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (901:9): [True: 0, False: 9.67k]
  ------------------
  902|      0|        PORT_FreeArena(arena, PR_FALSE);
  ------------------
  |  |   61|      0|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                      PORT_FreeArena(arena, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  903|      0|        PK11_FreeSlot(slot);
  904|      0|        PORT_SetError(PK11_MapError(crv));
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  905|      0|        return NULL;
  906|      0|    }
  907|       |
  908|  9.67k|    return pubKey;
  909|  9.67k|}
PK11_MakePrivKey:
  917|  9.67k|{
  918|  9.67k|    PLArenaPool *arena;
  919|  9.67k|    SECKEYPrivateKey *privKey;
  920|  9.67k|    PRBool isPrivate;
  921|  9.67k|    SECStatus rv;
  922|       |
  923|       |    /* don't know? look it up */
  924|  9.67k|    if (keyType == nullKey) {
  ------------------
  |  Branch (924:9): [True: 0, False: 9.67k]
  ------------------
  925|      0|        CK_KEY_TYPE pk11Type = CKK_RSA;
  ------------------
  |  |  372|      0|#define CKK_RSA 0x00000000UL
  ------------------
  926|       |
  927|      0|        pk11Type = PK11_ReadULongAttribute(slot, privID, CKA_KEY_TYPE);
  ------------------
  |  |  543|      0|#define CKA_KEY_TYPE 0x00000100UL
  ------------------
  928|      0|        isTemp = (PRBool)!PK11_HasAttributeSet(slot, privID, CKA_TOKEN, PR_FALSE);
  ------------------
  |  |  512|      0|#define CKA_TOKEN 0x00000001UL
  ------------------
                      isTemp = (PRBool)!PK11_HasAttributeSet(slot, privID, CKA_TOKEN, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  929|      0|        switch (pk11Type) {
  930|      0|            case CKK_RSA:
  ------------------
  |  |  372|      0|#define CKK_RSA 0x00000000UL
  ------------------
  |  Branch (930:13): [True: 0, False: 0]
  ------------------
  931|      0|                keyType = rsaKey;
  932|      0|                break;
  933|      0|            case CKK_DSA:
  ------------------
  |  |  373|      0|#define CKK_DSA 0x00000001UL
  ------------------
  |  Branch (933:13): [True: 0, False: 0]
  ------------------
  934|      0|                keyType = dsaKey;
  935|      0|                break;
  936|      0|            case CKK_DH:
  ------------------
  |  |  374|      0|#define CKK_DH 0x00000002UL
  ------------------
  |  Branch (936:13): [True: 0, False: 0]
  ------------------
  937|      0|                keyType = dhKey;
  938|      0|                break;
  939|      0|            case CKK_KEA:
  ------------------
  |  |  381|      0|#define CKK_KEA 0x00000005UL
  ------------------
  |  Branch (939:13): [True: 0, False: 0]
  ------------------
  940|      0|                keyType = fortezzaKey;
  941|      0|                break;
  942|      0|            case CKK_EC:
  ------------------
  |  |  379|      0|#define CKK_EC 0x00000003UL
  ------------------
  |  Branch (942:13): [True: 0, False: 0]
  ------------------
  943|      0|                keyType = ecKey;
  944|      0|                break;
  945|      0|            case CKK_EC_MONTGOMERY:
  ------------------
  |  |  449|      0|#define CKK_EC_MONTGOMERY 0x00000041UL
  ------------------
  |  Branch (945:13): [True: 0, False: 0]
  ------------------
  946|      0|                keyType = ecMontKey;
  947|      0|                break;
  948|      0|            case CKK_EC_EDWARDS:
  ------------------
  |  |  448|      0|#define CKK_EC_EDWARDS 0x00000040UL
  ------------------
  |  Branch (948:13): [True: 0, False: 0]
  ------------------
  949|      0|                keyType = edKey;
  950|      0|                break;
  951|      0|            case CKK_NSS_KYBER:
  ------------------
  |  |   58|      0|#define CKK_NSS_KYBER (CKK_NSS + 5)
  |  |  ------------------
  |  |  |  |   49|      0|#define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  458|      0|#define CKK_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (951:13): [True: 0, False: 0]
  ------------------
  952|      0|            case CKK_NSS_ML_KEM:
  ------------------
  |  |   59|      0|#define CKK_NSS_ML_KEM (CKK_NSS + 6)
  |  |  ------------------
  |  |  |  |   49|      0|#define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  458|      0|#define CKK_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (952:13): [True: 0, False: 0]
  ------------------
  953|      0|                keyType = kyberKey;
  954|      0|                break;
  955|      0|            default:
  ------------------
  |  Branch (955:13): [True: 0, False: 0]
  ------------------
  956|      0|                break;
  957|      0|        }
  958|      0|    }
  959|       |
  960|       |    /* if the key is private, make sure we are authenticated to the
  961|       |     * token before we try to use it */
  962|  9.67k|    isPrivate = (PRBool)PK11_HasAttributeSet(slot, privID, CKA_PRIVATE, PR_FALSE);
  ------------------
  |  |  513|  9.67k|#define CKA_PRIVATE 0x00000002UL
  ------------------
                  isPrivate = (PRBool)PK11_HasAttributeSet(slot, privID, CKA_PRIVATE, PR_FALSE);
  ------------------
  |  |  438|  9.67k|#define PR_FALSE 0
  ------------------
  963|  9.67k|    if (isPrivate) {
  ------------------
  |  Branch (963:9): [True: 0, False: 9.67k]
  ------------------
  964|      0|        rv = PK11_Authenticate(slot, PR_TRUE, wincx);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  965|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (965:13): [True: 0, False: 0]
  ------------------
  966|      0|            return NULL;
  967|      0|        }
  968|      0|    }
  969|       |
  970|       |    /* now we need to create space for the private key */
  971|  9.67k|    arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
  ------------------
  |  |   63|  9.67k|#define PORT_NewArena PORT_NewArena_Util
  ------------------
                  arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
  ------------------
  |  |   60|  9.67k|#define DER_DEFAULT_CHUNKSIZE (2048)
  ------------------
  972|  9.67k|    if (arena == NULL)
  ------------------
  |  Branch (972:9): [True: 0, False: 9.67k]
  ------------------
  973|      0|        return NULL;
  974|       |
  975|  9.67k|    privKey = (SECKEYPrivateKey *)
  976|  9.67k|        PORT_ArenaZAlloc(arena, sizeof(SECKEYPrivateKey));
  ------------------
  |  |   59|  9.67k|#define PORT_ArenaZAlloc PORT_ArenaZAlloc_Util
  ------------------
  977|  9.67k|    if (privKey == NULL) {
  ------------------
  |  Branch (977:9): [True: 0, False: 9.67k]
  ------------------
  978|      0|        PORT_FreeArena(arena, PR_FALSE);
  ------------------
  |  |   61|      0|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                      PORT_FreeArena(arena, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  979|      0|        return NULL;
  980|      0|    }
  981|       |
  982|  9.67k|    privKey->arena = arena;
  983|  9.67k|    privKey->keyType = keyType;
  984|  9.67k|    privKey->pkcs11Slot = PK11_ReferenceSlot(slot);
  985|  9.67k|    privKey->pkcs11ID = privID;
  986|  9.67k|    privKey->pkcs11IsTemp = isTemp;
  987|  9.67k|    privKey->wincx = wincx;
  988|       |
  989|  9.67k|    return privKey;
  990|  9.67k|}
PK11_GenerateKeyPairWithOpFlags:
 1278|  9.72k|{
 1279|       |    /* we have to use these native types because when we call PKCS 11 modules
 1280|       |     * we have to make sure that we are using the correct sizes for all the
 1281|       |     * parameters. */
 1282|  9.72k|    CK_BBOOL ckfalse = CK_FALSE;
  ------------------
  |  |   23|  9.72k|#define CK_FALSE 0
  ------------------
 1283|  9.72k|    CK_BBOOL cktrue = CK_TRUE;
  ------------------
  |  |   22|  9.72k|#define CK_TRUE 1
  ------------------
 1284|  9.72k|    CK_ULONG modulusBits;
 1285|  9.72k|    CK_BYTE publicExponent[4];
 1286|  9.72k|    CK_ATTRIBUTE privTemplate[] = {
 1287|  9.72k|        { CKA_SENSITIVE, NULL, 0 },
  ------------------
  |  |  546|  9.72k|#define CKA_SENSITIVE 0x00000103UL
  ------------------
 1288|  9.72k|        { CKA_TOKEN, NULL, 0 },
  ------------------
  |  |  512|  9.72k|#define CKA_TOKEN 0x00000001UL
  ------------------
 1289|  9.72k|        { CKA_PRIVATE, NULL, 0 },
  ------------------
  |  |  513|  9.72k|#define CKA_PRIVATE 0x00000002UL
  ------------------
 1290|  9.72k|        { CKA_DERIVE, NULL, 0 },
  ------------------
  |  |  555|  9.72k|#define CKA_DERIVE 0x0000010CUL
  ------------------
 1291|  9.72k|        { CKA_UNWRAP, NULL, 0 },
  ------------------
  |  |  550|  9.72k|#define CKA_UNWRAP 0x00000107UL
  ------------------
 1292|  9.72k|        { CKA_SIGN, NULL, 0 },
  ------------------
  |  |  551|  9.72k|#define CKA_SIGN 0x00000108UL
  ------------------
 1293|  9.72k|        { CKA_DECRYPT, NULL, 0 },
  ------------------
  |  |  548|  9.72k|#define CKA_DECRYPT 0x00000105UL
  ------------------
 1294|  9.72k|        { CKA_EXTRACTABLE, NULL, 0 },
  ------------------
  |  |  585|  9.72k|#define CKA_EXTRACTABLE 0x00000162UL
  ------------------
 1295|  9.72k|        { CKA_MODIFIABLE, NULL, 0 },
  ------------------
  |  |  593|  9.72k|#define CKA_MODIFIABLE 0x00000170UL
  ------------------
 1296|  9.72k|    };
 1297|  9.72k|    CK_ATTRIBUTE rsaPubTemplate[] = {
 1298|  9.72k|        { CKA_MODULUS_BITS, NULL, 0 },
  ------------------
  |  |  559|  9.72k|#define CKA_MODULUS_BITS 0x00000121UL
  ------------------
 1299|  9.72k|        { CKA_PUBLIC_EXPONENT, NULL, 0 },
  ------------------
  |  |  560|  9.72k|#define CKA_PUBLIC_EXPONENT 0x00000122UL
  ------------------
 1300|  9.72k|        { CKA_TOKEN, NULL, 0 },
  ------------------
  |  |  512|  9.72k|#define CKA_TOKEN 0x00000001UL
  ------------------
 1301|  9.72k|        { CKA_DERIVE, NULL, 0 },
  ------------------
  |  |  555|  9.72k|#define CKA_DERIVE 0x0000010CUL
  ------------------
 1302|  9.72k|        { CKA_WRAP, NULL, 0 },
  ------------------
  |  |  549|  9.72k|#define CKA_WRAP 0x00000106UL
  ------------------
 1303|  9.72k|        { CKA_VERIFY, NULL, 0 },
  ------------------
  |  |  553|  9.72k|#define CKA_VERIFY 0x0000010AUL
  ------------------
 1304|  9.72k|        { CKA_VERIFY_RECOVER, NULL, 0 },
  ------------------
  |  |  554|  9.72k|#define CKA_VERIFY_RECOVER 0x0000010BUL
  ------------------
 1305|  9.72k|        { CKA_ENCRYPT, NULL, 0 },
  ------------------
  |  |  547|  9.72k|#define CKA_ENCRYPT 0x00000104UL
  ------------------
 1306|  9.72k|        { CKA_MODIFIABLE, NULL, 0 },
  ------------------
  |  |  593|  9.72k|#define CKA_MODIFIABLE 0x00000170UL
  ------------------
 1307|  9.72k|    };
 1308|  9.72k|    CK_ATTRIBUTE dsaPubTemplate[] = {
 1309|  9.72k|        { CKA_PRIME, NULL, 0 },
  ------------------
  |  |  569|  9.72k|#define CKA_PRIME 0x00000130UL
  ------------------
 1310|  9.72k|        { CKA_SUBPRIME, NULL, 0 },
  ------------------
  |  |  570|  9.72k|#define CKA_SUBPRIME 0x00000131UL
  ------------------
 1311|  9.72k|        { CKA_BASE, NULL, 0 },
  ------------------
  |  |  571|  9.72k|#define CKA_BASE 0x00000132UL
  ------------------
 1312|  9.72k|        { CKA_TOKEN, NULL, 0 },
  ------------------
  |  |  512|  9.72k|#define CKA_TOKEN 0x00000001UL
  ------------------
 1313|  9.72k|        { CKA_DERIVE, NULL, 0 },
  ------------------
  |  |  555|  9.72k|#define CKA_DERIVE 0x0000010CUL
  ------------------
 1314|  9.72k|        { CKA_WRAP, NULL, 0 },
  ------------------
  |  |  549|  9.72k|#define CKA_WRAP 0x00000106UL
  ------------------
 1315|  9.72k|        { CKA_VERIFY, NULL, 0 },
  ------------------
  |  |  553|  9.72k|#define CKA_VERIFY 0x0000010AUL
  ------------------
 1316|  9.72k|        { CKA_VERIFY_RECOVER, NULL, 0 },
  ------------------
  |  |  554|  9.72k|#define CKA_VERIFY_RECOVER 0x0000010BUL
  ------------------
 1317|  9.72k|        { CKA_ENCRYPT, NULL, 0 },
  ------------------
  |  |  547|  9.72k|#define CKA_ENCRYPT 0x00000104UL
  ------------------
 1318|  9.72k|        { CKA_MODIFIABLE, NULL, 0 },
  ------------------
  |  |  593|  9.72k|#define CKA_MODIFIABLE 0x00000170UL
  ------------------
 1319|  9.72k|    };
 1320|  9.72k|    CK_ATTRIBUTE dhPubTemplate[] = {
 1321|  9.72k|        { CKA_PRIME, NULL, 0 },
  ------------------
  |  |  569|  9.72k|#define CKA_PRIME 0x00000130UL
  ------------------
 1322|  9.72k|        { CKA_BASE, NULL, 0 },
  ------------------
  |  |  571|  9.72k|#define CKA_BASE 0x00000132UL
  ------------------
 1323|  9.72k|        { CKA_TOKEN, NULL, 0 },
  ------------------
  |  |  512|  9.72k|#define CKA_TOKEN 0x00000001UL
  ------------------
 1324|  9.72k|        { CKA_DERIVE, NULL, 0 },
  ------------------
  |  |  555|  9.72k|#define CKA_DERIVE 0x0000010CUL
  ------------------
 1325|  9.72k|        { CKA_WRAP, NULL, 0 },
  ------------------
  |  |  549|  9.72k|#define CKA_WRAP 0x00000106UL
  ------------------
 1326|  9.72k|        { CKA_VERIFY, NULL, 0 },
  ------------------
  |  |  553|  9.72k|#define CKA_VERIFY 0x0000010AUL
  ------------------
 1327|  9.72k|        { CKA_VERIFY_RECOVER, NULL, 0 },
  ------------------
  |  |  554|  9.72k|#define CKA_VERIFY_RECOVER 0x0000010BUL
  ------------------
 1328|  9.72k|        { CKA_ENCRYPT, NULL, 0 },
  ------------------
  |  |  547|  9.72k|#define CKA_ENCRYPT 0x00000104UL
  ------------------
 1329|  9.72k|        { CKA_MODIFIABLE, NULL, 0 },
  ------------------
  |  |  593|  9.72k|#define CKA_MODIFIABLE 0x00000170UL
  ------------------
 1330|  9.72k|    };
 1331|  9.72k|    CK_ATTRIBUTE ecPubTemplate[] = {
 1332|  9.72k|        { CKA_EC_PARAMS, NULL, 0 },
  ------------------
  |  |  602|  9.72k|#define CKA_EC_PARAMS 0x00000180UL
  ------------------
 1333|  9.72k|        { CKA_TOKEN, NULL, 0 },
  ------------------
  |  |  512|  9.72k|#define CKA_TOKEN 0x00000001UL
  ------------------
 1334|  9.72k|        { CKA_DERIVE, NULL, 0 },
  ------------------
  |  |  555|  9.72k|#define CKA_DERIVE 0x0000010CUL
  ------------------
 1335|  9.72k|        { CKA_WRAP, NULL, 0 },
  ------------------
  |  |  549|  9.72k|#define CKA_WRAP 0x00000106UL
  ------------------
 1336|  9.72k|        { CKA_VERIFY, NULL, 0 },
  ------------------
  |  |  553|  9.72k|#define CKA_VERIFY 0x0000010AUL
  ------------------
 1337|  9.72k|        { CKA_VERIFY_RECOVER, NULL, 0 },
  ------------------
  |  |  554|  9.72k|#define CKA_VERIFY_RECOVER 0x0000010BUL
  ------------------
 1338|  9.72k|        { CKA_ENCRYPT, NULL, 0 },
  ------------------
  |  |  547|  9.72k|#define CKA_ENCRYPT 0x00000104UL
  ------------------
 1339|  9.72k|        { CKA_MODIFIABLE, NULL, 0 },
  ------------------
  |  |  593|  9.72k|#define CKA_MODIFIABLE 0x00000170UL
  ------------------
 1340|  9.72k|    };
 1341|  9.72k|    SECKEYECParams *ecParams;
 1342|       |
 1343|  9.72k|    CK_ATTRIBUTE kyberPubTemplate[] = {
 1344|  9.72k|        { CKA_NSS_PARAMETER_SET, NULL, 0 },
  ------------------
  |  |  113|  9.72k|#define CKA_NSS_PARAMETER_SET (CKA_NSS + 40)
  |  |  ------------------
  |  |  |  |   77|  9.72k|#define CKA_NSS (CKA_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  692|  9.72k|#define CKA_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKA_NSS (CKA_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  9.72k|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1345|  9.72k|        { CKA_TOKEN, NULL, 0 },
  ------------------
  |  |  512|  9.72k|#define CKA_TOKEN 0x00000001UL
  ------------------
 1346|  9.72k|        { CKA_DERIVE, NULL, 0 },
  ------------------
  |  |  555|  9.72k|#define CKA_DERIVE 0x0000010CUL
  ------------------
 1347|  9.72k|        { CKA_WRAP, NULL, 0 },
  ------------------
  |  |  549|  9.72k|#define CKA_WRAP 0x00000106UL
  ------------------
 1348|  9.72k|        { CKA_VERIFY, NULL, 0 },
  ------------------
  |  |  553|  9.72k|#define CKA_VERIFY 0x0000010AUL
  ------------------
 1349|  9.72k|        { CKA_VERIFY_RECOVER, NULL, 0 },
  ------------------
  |  |  554|  9.72k|#define CKA_VERIFY_RECOVER 0x0000010BUL
  ------------------
 1350|  9.72k|        { CKA_ENCRYPT, NULL, 0 },
  ------------------
  |  |  547|  9.72k|#define CKA_ENCRYPT 0x00000104UL
  ------------------
 1351|  9.72k|        { CKA_MODIFIABLE, NULL, 0 },
  ------------------
  |  |  593|  9.72k|#define CKA_MODIFIABLE 0x00000170UL
  ------------------
 1352|  9.72k|    };
 1353|       |
 1354|       |    /*CK_ULONG key_size = 0;*/
 1355|  9.72k|    CK_ATTRIBUTE *pubTemplate;
 1356|  9.72k|    int privCount = 0;
 1357|  9.72k|    int pubCount = 0;
 1358|  9.72k|    PK11RSAGenParams *rsaParams;
 1359|  9.72k|    SECKEYPQGParams *dsaParams;
 1360|  9.72k|    SECKEYDHParams *dhParams;
 1361|  9.72k|    CK_NSS_KEM_PARAMETER_SET_TYPE *kemParams;
 1362|  9.72k|    CK_MECHANISM mechanism;
 1363|  9.72k|    CK_MECHANISM test_mech;
 1364|  9.72k|    CK_MECHANISM test_mech2;
 1365|  9.72k|    CK_SESSION_HANDLE session_handle;
 1366|  9.72k|    CK_RV crv;
 1367|  9.72k|    CK_OBJECT_HANDLE privID, pubID;
 1368|  9.72k|    SECKEYPrivateKey *privKey;
 1369|  9.72k|    KeyType keyType;
 1370|  9.72k|    PRBool restore;
 1371|  9.72k|    int peCount, i;
 1372|  9.72k|    CK_ATTRIBUTE *attrs;
 1373|  9.72k|    CK_ATTRIBUTE *privattrs;
 1374|  9.72k|    CK_ATTRIBUTE setTemplate;
 1375|  9.72k|    CK_MECHANISM_INFO mechanism_info;
 1376|  9.72k|    CK_OBJECT_CLASS keyClass;
 1377|  9.72k|    SECItem *cka_id;
 1378|  9.72k|    PRBool haslock = PR_FALSE;
  ------------------
  |  |  438|  9.72k|#define PR_FALSE 0
  ------------------
 1379|  9.72k|    PRBool pubIsToken = PR_FALSE;
  ------------------
  |  |  438|  9.72k|#define PR_FALSE 0
  ------------------
 1380|  9.72k|    PRBool token = ((attrFlags & PK11_ATTR_TOKEN) != 0);
  ------------------
  |  |  194|  9.72k|#define PK11_ATTR_TOKEN 0x00000001L
  ------------------
 1381|       |    /* subset of attrFlags applicable to the public key */
 1382|  9.72k|    PK11AttrFlags pubKeyAttrFlags = attrFlags &
 1383|  9.72k|                                    (PK11_ATTR_TOKEN | PK11_ATTR_SESSION | PK11_ATTR_MODIFIABLE | PK11_ATTR_UNMODIFIABLE);
  ------------------
  |  |  194|  9.72k|#define PK11_ATTR_TOKEN 0x00000001L
  ------------------
                                                  (PK11_ATTR_TOKEN | PK11_ATTR_SESSION | PK11_ATTR_MODIFIABLE | PK11_ATTR_UNMODIFIABLE);
  ------------------
  |  |  195|  9.72k|#define PK11_ATTR_SESSION 0x00000002L
  ------------------
                                                  (PK11_ATTR_TOKEN | PK11_ATTR_SESSION | PK11_ATTR_MODIFIABLE | PK11_ATTR_UNMODIFIABLE);
  ------------------
  |  |  235|  9.72k|#define PK11_ATTR_MODIFIABLE 0x00000010L
  ------------------
                                                  (PK11_ATTR_TOKEN | PK11_ATTR_SESSION | PK11_ATTR_MODIFIABLE | PK11_ATTR_UNMODIFIABLE);
  ------------------
  |  |  236|  9.72k|#define PK11_ATTR_UNMODIFIABLE 0x00000020L
  ------------------
 1384|       |
 1385|  9.72k|    if (pk11_BadAttrFlags(attrFlags)) {
  ------------------
  |  Branch (1385:9): [True: 0, False: 9.72k]
  ------------------
 1386|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1387|      0|        return NULL;
 1388|      0|    }
 1389|       |
 1390|  9.72k|    if (!param) {
  ------------------
  |  Branch (1390:9): [True: 0, False: 9.72k]
  ------------------
 1391|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1392|      0|        return NULL;
 1393|      0|    }
 1394|       |
 1395|       |    /*
 1396|       |     * The opFlags and opFlagMask parameters allow us to control the
 1397|       |     * settings of the key usage attributes (CKA_ENCRYPT and friends).
 1398|       |     * opFlagMask is set to one if the flag is specified in opFlags and
 1399|       |     *  zero if it is to take on a default value calculated by
 1400|       |     *  PK11_GenerateKeyPairWithOpFlags.
 1401|       |     * opFlags specifies the actual value of the flag 1 or 0.
 1402|       |     *   Bits not corresponding to one bits in opFlagMask should be zero.
 1403|       |     */
 1404|       |
 1405|       |    /* if we are trying to turn on a flag, it better be in the mask */
 1406|  9.72k|    PORT_Assert((opFlags & ~opFlagsMask) == 0);
  ------------------
  |  |  120|  9.72k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  9.72k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 9.72k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1407|  9.72k|    opFlags &= opFlagsMask;
 1408|       |
 1409|  9.72k|    PORT_Assert(slot != NULL);
  ------------------
  |  |  120|  9.72k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  9.72k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 9.72k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1410|  9.72k|    if (slot == NULL) {
  ------------------
  |  Branch (1410:9): [True: 0, False: 9.72k]
  ------------------
 1411|      0|        PORT_SetError(SEC_ERROR_NO_MODULE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1412|      0|        return NULL;
 1413|      0|    }
 1414|       |
 1415|       |    /* if our slot really doesn't do this mechanism, Generate the key
 1416|       |     * in our internal token and write it out */
 1417|  9.72k|    if (!PK11_DoesMechanism(slot, type)) {
  ------------------
  |  Branch (1417:9): [True: 0, False: 9.72k]
  ------------------
 1418|      0|        PK11SlotInfo *int_slot = PK11_GetInternalSlot();
 1419|       |
 1420|       |        /* don't loop forever looking for a slot */
 1421|      0|        if (slot == int_slot) {
  ------------------
  |  Branch (1421:13): [True: 0, False: 0]
  ------------------
 1422|      0|            PK11_FreeSlot(int_slot);
 1423|      0|            PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1424|      0|            return NULL;
 1425|      0|        }
 1426|       |
 1427|       |        /* if there isn't a suitable slot, then we can't do the keygen */
 1428|      0|        if (int_slot == NULL) {
  ------------------
  |  Branch (1428:13): [True: 0, False: 0]
  ------------------
 1429|      0|            PORT_SetError(SEC_ERROR_NO_MODULE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1430|      0|            return NULL;
 1431|      0|        }
 1432|       |
 1433|       |        /* generate the temporary key to load */
 1434|      0|        privKey = PK11_GenerateKeyPair(int_slot, type, param, pubKey, PR_FALSE,
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 1435|      0|                                       PR_FALSE, wincx);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 1436|      0|        PK11_FreeSlot(int_slot);
 1437|       |
 1438|       |        /* if successful, load the temp key into the new token */
 1439|      0|        if (privKey != NULL) {
  ------------------
  |  Branch (1439:13): [True: 0, False: 0]
  ------------------
 1440|      0|            SECKEYPrivateKey *newPrivKey = pk11_loadPrivKeyWithFlags(slot,
 1441|      0|                                                                     privKey, *pubKey, attrFlags);
 1442|      0|            SECKEY_DestroyPrivateKey(privKey);
 1443|      0|            if (newPrivKey == NULL) {
  ------------------
  |  Branch (1443:17): [True: 0, False: 0]
  ------------------
 1444|      0|                SECKEY_DestroyPublicKey(*pubKey);
 1445|      0|                *pubKey = NULL;
 1446|      0|            }
 1447|      0|            return newPrivKey;
 1448|      0|        }
 1449|      0|        return NULL;
 1450|      0|    }
 1451|       |
 1452|  9.72k|    mechanism.mechanism = type;
 1453|  9.72k|    mechanism.pParameter = NULL;
 1454|  9.72k|    mechanism.ulParameterLen = 0;
 1455|  9.72k|    test_mech.pParameter = NULL;
 1456|  9.72k|    test_mech.ulParameterLen = 0;
 1457|  9.72k|    test_mech2.mechanism = CKM_INVALID_MECHANISM;
  ------------------
  |  |  155|  9.72k|#define CKM_INVALID_MECHANISM 0xffffffffUL
  ------------------
 1458|  9.72k|    test_mech2.pParameter = NULL;
 1459|  9.72k|    test_mech2.ulParameterLen = 0;
 1460|       |
 1461|       |    /* set up the private key template */
 1462|  9.72k|    privattrs = privTemplate;
 1463|  9.72k|    privattrs += pk11_AttrFlagsToAttributes(attrFlags, privattrs,
 1464|  9.72k|                                            &cktrue, &ckfalse);
 1465|       |
 1466|       |    /* set up the mechanism specific info */
 1467|  9.72k|    switch (type) {
 1468|      0|        case CKM_RSA_PKCS_KEY_PAIR_GEN:
  ------------------
  |  |  719|      0|#define CKM_RSA_PKCS_KEY_PAIR_GEN 0x00000000UL
  ------------------
  |  Branch (1468:9): [True: 0, False: 9.72k]
  ------------------
 1469|      0|        case CKM_RSA_X9_31_KEY_PAIR_GEN:
  ------------------
  |  |  738|      0|#define CKM_RSA_X9_31_KEY_PAIR_GEN 0x0000000AUL
  ------------------
  |  Branch (1469:9): [True: 0, False: 9.72k]
  ------------------
 1470|      0|            rsaParams = (PK11RSAGenParams *)param;
 1471|      0|            if (rsaParams->pe == 0) {
  ------------------
  |  Branch (1471:17): [True: 0, False: 0]
  ------------------
 1472|      0|                PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1473|      0|                return NULL;
 1474|      0|            }
 1475|      0|            modulusBits = rsaParams->keySizeInBits;
 1476|      0|            peCount = 0;
 1477|       |
 1478|       |            /* convert pe to a PKCS #11 string */
 1479|      0|            for (i = 0; i < 4; i++) {
  ------------------
  |  Branch (1479:25): [True: 0, False: 0]
  ------------------
 1480|      0|                if (peCount || (rsaParams->pe &
  ------------------
  |  Branch (1480:21): [True: 0, False: 0]
  |  Branch (1480:32): [True: 0, False: 0]
  ------------------
 1481|      0|                                ((unsigned long)0xff000000L >> (i * 8)))) {
 1482|      0|                    publicExponent[peCount] =
 1483|      0|                        (CK_BYTE)((rsaParams->pe >> (3 - i) * 8) & 0xff);
 1484|      0|                    peCount++;
 1485|      0|                }
 1486|      0|            }
 1487|      0|            PORT_Assert(peCount != 0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1488|      0|            attrs = rsaPubTemplate;
 1489|      0|            PK11_SETATTRS(attrs, CKA_MODULUS_BITS,
  ------------------
  |  |  104|      0|    (x)->type = (id);              \
  |  |  105|      0|    (x)->pValue = (v);             \
  |  |  106|      0|    (x)->ulValueLen = (l);
  ------------------
 1490|      0|                          &modulusBits, sizeof(modulusBits));
 1491|      0|            attrs++;
 1492|      0|            PK11_SETATTRS(attrs, CKA_PUBLIC_EXPONENT,
  ------------------
  |  |  104|      0|    (x)->type = (id);              \
  |  |  105|      0|    (x)->pValue = (v);             \
  |  |  106|      0|    (x)->ulValueLen = (l);
  ------------------
 1493|      0|                          publicExponent, peCount);
 1494|      0|            attrs++;
 1495|      0|            pubTemplate = rsaPubTemplate;
 1496|      0|            keyType = rsaKey;
 1497|      0|            test_mech.mechanism = CKM_RSA_PKCS;
  ------------------
  |  |  720|      0|#define CKM_RSA_PKCS 0x00000001UL
  ------------------
 1498|      0|            break;
 1499|      0|        case CKM_DSA_KEY_PAIR_GEN:
  ------------------
  |  |  744|      0|#define CKM_DSA_KEY_PAIR_GEN 0x00000010UL
  ------------------
  |  Branch (1499:9): [True: 0, False: 9.72k]
  ------------------
 1500|      0|            dsaParams = (SECKEYPQGParams *)param;
 1501|      0|            attrs = dsaPubTemplate;
 1502|      0|            PK11_SETATTRS(attrs, CKA_PRIME, dsaParams->prime.data,
  ------------------
  |  |  104|      0|    (x)->type = (id);              \
  |  |  105|      0|    (x)->pValue = (v);             \
  |  |  106|      0|    (x)->ulValueLen = (l);
  ------------------
 1503|      0|                          dsaParams->prime.len);
 1504|      0|            attrs++;
 1505|      0|            PK11_SETATTRS(attrs, CKA_SUBPRIME, dsaParams->subPrime.data,
  ------------------
  |  |  104|      0|    (x)->type = (id);              \
  |  |  105|      0|    (x)->pValue = (v);             \
  |  |  106|      0|    (x)->ulValueLen = (l);
  ------------------
 1506|      0|                          dsaParams->subPrime.len);
 1507|      0|            attrs++;
 1508|      0|            PK11_SETATTRS(attrs, CKA_BASE, dsaParams->base.data,
  ------------------
  |  |  104|      0|    (x)->type = (id);              \
  |  |  105|      0|    (x)->pValue = (v);             \
  |  |  106|      0|    (x)->ulValueLen = (l);
  ------------------
 1509|      0|                          dsaParams->base.len);
 1510|      0|            attrs++;
 1511|      0|            pubTemplate = dsaPubTemplate;
 1512|      0|            keyType = dsaKey;
 1513|      0|            test_mech.mechanism = CKM_DSA;
  ------------------
  |  |  745|      0|#define CKM_DSA 0x00000011UL
  ------------------
 1514|      0|            break;
 1515|  1.13k|        case CKM_DH_PKCS_KEY_PAIR_GEN:
  ------------------
  |  |  758|  1.13k|#define CKM_DH_PKCS_KEY_PAIR_GEN 0x00000020UL
  ------------------
  |  Branch (1515:9): [True: 1.13k, False: 8.59k]
  ------------------
 1516|  1.13k|            dhParams = (SECKEYDHParams *)param;
 1517|  1.13k|            attrs = dhPubTemplate;
 1518|  1.13k|            PK11_SETATTRS(attrs, CKA_PRIME, dhParams->prime.data,
  ------------------
  |  |  104|  1.13k|    (x)->type = (id);              \
  |  |  105|  1.13k|    (x)->pValue = (v);             \
  |  |  106|  1.13k|    (x)->ulValueLen = (l);
  ------------------
 1519|  1.13k|                          dhParams->prime.len);
 1520|  1.13k|            attrs++;
 1521|  1.13k|            PK11_SETATTRS(attrs, CKA_BASE, dhParams->base.data,
  ------------------
  |  |  104|  1.13k|    (x)->type = (id);              \
  |  |  105|  1.13k|    (x)->pValue = (v);             \
  |  |  106|  1.13k|    (x)->ulValueLen = (l);
  ------------------
 1522|  1.13k|                          dhParams->base.len);
 1523|  1.13k|            attrs++;
 1524|  1.13k|            pubTemplate = dhPubTemplate;
 1525|  1.13k|            keyType = dhKey;
 1526|  1.13k|            test_mech.mechanism = CKM_DH_PKCS_DERIVE;
  ------------------
  |  |  759|  1.13k|#define CKM_DH_PKCS_DERIVE 0x00000021UL
  ------------------
 1527|  1.13k|            break;
 1528|      0|        case CKM_EC_KEY_PAIR_GEN:
  ------------------
  |  | 1072|      0|#define CKM_EC_KEY_PAIR_GEN 0x00001040UL
  ------------------
  |  Branch (1528:9): [True: 0, False: 9.72k]
  ------------------
 1529|  8.55k|        case CKM_NSS_ECDHE_NO_PAIRWISE_CHECK_KEY_PAIR_GEN:
  ------------------
  |  |  274|  8.55k|#define CKM_NSS_ECDHE_NO_PAIRWISE_CHECK_KEY_PAIR_GEN (CKM_NSS + 47)
  |  |  ------------------
  |  |  |  |  162|  8.55k|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|  8.55k|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  8.55k|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1529:9): [True: 8.55k, False: 1.17k]
  ------------------
 1530|  8.55k|            ecParams = (SECKEYECParams *)param;
 1531|  8.55k|            attrs = ecPubTemplate;
 1532|  8.55k|            PK11_SETATTRS(attrs, CKA_EC_PARAMS, ecParams->data,
  ------------------
  |  |  104|  8.55k|    (x)->type = (id);              \
  |  |  105|  8.55k|    (x)->pValue = (v);             \
  |  |  106|  8.55k|    (x)->ulValueLen = (l);
  ------------------
 1533|  8.55k|                          ecParams->len);
 1534|  8.55k|            attrs++;
 1535|  8.55k|            pubTemplate = ecPubTemplate;
 1536|  8.55k|            keyType = ecKey;
 1537|       |            /*
 1538|       |             * ECC supports 2 different mechanism types (unlike RSA, which
 1539|       |             * supports different usages with the same mechanism).
 1540|       |             * We may need to query both mechanism types and or the results
 1541|       |             * together -- but we only do that if either the user has
 1542|       |             * requested both usages, or not specified any usages.
 1543|       |             */
 1544|  8.55k|            if ((opFlags & (CKF_SIGN | CKF_DERIVE)) == (CKF_SIGN | CKF_DERIVE)) {
  ------------------
  |  | 1356|  8.55k|#define CKF_SIGN 0x00000800UL
  ------------------
                          if ((opFlags & (CKF_SIGN | CKF_DERIVE)) == (CKF_SIGN | CKF_DERIVE)) {
  ------------------
  |  | 1364|  8.55k|#define CKF_DERIVE 0x00080000UL
  ------------------
                          if ((opFlags & (CKF_SIGN | CKF_DERIVE)) == (CKF_SIGN | CKF_DERIVE)) {
  ------------------
  |  | 1356|  8.55k|#define CKF_SIGN 0x00000800UL
  ------------------
                          if ((opFlags & (CKF_SIGN | CKF_DERIVE)) == (CKF_SIGN | CKF_DERIVE)) {
  ------------------
  |  | 1364|  8.55k|#define CKF_DERIVE 0x00080000UL
  ------------------
  |  Branch (1544:17): [True: 0, False: 8.55k]
  ------------------
 1545|       |                /* We've explicitly turned on both flags, use both mechanism */
 1546|      0|                test_mech.mechanism = CKM_ECDH1_DERIVE;
  ------------------
  |  | 1086|      0|#define CKM_ECDH1_DERIVE 0x00001050UL
  ------------------
 1547|      0|                test_mech2.mechanism = CKM_ECDSA;
  ------------------
  |  | 1074|      0|#define CKM_ECDSA 0x00001041UL
  ------------------
 1548|  8.55k|            } else if (opFlags & CKF_SIGN) {
  ------------------
  |  | 1356|  8.55k|#define CKF_SIGN 0x00000800UL
  ------------------
  |  Branch (1548:24): [True: 0, False: 8.55k]
  ------------------
 1549|       |                /* just do signing */
 1550|      0|                test_mech.mechanism = CKM_ECDSA;
  ------------------
  |  | 1074|      0|#define CKM_ECDSA 0x00001041UL
  ------------------
 1551|  8.55k|            } else if (opFlags & CKF_DERIVE) {
  ------------------
  |  | 1364|  8.55k|#define CKF_DERIVE 0x00080000UL
  ------------------
  |  Branch (1551:24): [True: 8.55k, False: 0]
  ------------------
 1552|       |                /* just do ECDH */
 1553|  8.55k|                test_mech.mechanism = CKM_ECDH1_DERIVE;
  ------------------
  |  | 1086|  8.55k|#define CKM_ECDH1_DERIVE 0x00001050UL
  ------------------
 1554|  8.55k|            } else {
 1555|       |                /* neither was specified default to both */
 1556|      0|                test_mech.mechanism = CKM_ECDH1_DERIVE;
  ------------------
  |  | 1086|      0|#define CKM_ECDH1_DERIVE 0x00001050UL
  ------------------
 1557|      0|                test_mech2.mechanism = CKM_ECDSA;
  ------------------
  |  | 1074|      0|#define CKM_ECDSA 0x00001041UL
  ------------------
 1558|      0|            }
 1559|  8.55k|            break;
 1560|      0|        case CKM_NSS_KYBER_KEY_PAIR_GEN:
  ------------------
  |  |  267|      0|#define CKM_NSS_KYBER_KEY_PAIR_GEN (CKM_NSS + 45)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1560:9): [True: 0, False: 9.72k]
  ------------------
 1561|      0|            kemParams = (CK_NSS_KEM_PARAMETER_SET_TYPE *)param;
 1562|      0|            attrs = kyberPubTemplate;
 1563|      0|            PK11_SETATTRS(attrs, CKA_NSS_PARAMETER_SET,
  ------------------
  |  |  104|      0|    (x)->type = (id);              \
  |  |  105|      0|    (x)->pValue = (v);             \
  |  |  106|      0|    (x)->ulValueLen = (l);
  ------------------
 1564|      0|                          kemParams,
 1565|      0|                          sizeof(CK_NSS_KEM_PARAMETER_SET_TYPE));
 1566|      0|            attrs++;
 1567|      0|            pubTemplate = kyberPubTemplate;
 1568|      0|            keyType = kyberKey;
 1569|      0|            test_mech.mechanism = CKM_NSS_KYBER;
  ------------------
  |  |  268|      0|#define CKM_NSS_KYBER (CKM_NSS + 46)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1570|      0|            break;
 1571|     40|        case CKM_NSS_ML_KEM_KEY_PAIR_GEN:
  ------------------
  |  |  277|     40|#define CKM_NSS_ML_KEM_KEY_PAIR_GEN (CKM_NSS + 48)
  |  |  ------------------
  |  |  |  |  162|     40|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|     40|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     40|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1571:9): [True: 40, False: 9.68k]
  ------------------
 1572|     40|            kemParams = (CK_NSS_KEM_PARAMETER_SET_TYPE *)param;
 1573|     40|            attrs = kyberPubTemplate;
 1574|     40|            PK11_SETATTRS(attrs, CKA_NSS_PARAMETER_SET,
  ------------------
  |  |  104|     40|    (x)->type = (id);              \
  |  |  105|     40|    (x)->pValue = (v);             \
  |  |  106|     40|    (x)->ulValueLen = (l);
  ------------------
 1575|     40|                          kemParams,
 1576|     40|                          sizeof(CK_NSS_KEM_PARAMETER_SET_TYPE));
 1577|     40|            attrs++;
 1578|     40|            pubTemplate = kyberPubTemplate;
 1579|     40|            keyType = kyberKey;
 1580|     40|            test_mech.mechanism = CKM_NSS_ML_KEM;
  ------------------
  |  |  278|     40|#define CKM_NSS_ML_KEM (CKM_NSS + 49)
  |  |  ------------------
  |  |  |  |  162|     40|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|     40|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     40|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1581|     40|            break;
 1582|      0|        case CKM_EC_MONTGOMERY_KEY_PAIR_GEN:
  ------------------
  |  | 1173|      0|#define CKM_EC_MONTGOMERY_KEY_PAIR_GEN 0x00001056UL
  ------------------
  |  Branch (1582:9): [True: 0, False: 9.72k]
  ------------------
 1583|      0|            ecParams = (SECKEYECParams *)param;
 1584|      0|            attrs = ecPubTemplate;
 1585|      0|            PK11_SETATTRS(attrs, CKA_EC_PARAMS, ecParams->data,
  ------------------
  |  |  104|      0|    (x)->type = (id);              \
  |  |  105|      0|    (x)->pValue = (v);             \
  |  |  106|      0|    (x)->ulValueLen = (l);
  ------------------
 1586|      0|                          ecParams->len);
 1587|      0|            attrs++;
 1588|      0|            pubTemplate = ecPubTemplate;
 1589|      0|            keyType = ecMontKey;
 1590|      0|            test_mech.mechanism = CKM_ECDH1_DERIVE;
  ------------------
  |  | 1086|      0|#define CKM_ECDH1_DERIVE 0x00001050UL
  ------------------
 1591|      0|            break;
 1592|      0|        case CKM_EC_EDWARDS_KEY_PAIR_GEN:
  ------------------
  |  | 1172|      0|#define CKM_EC_EDWARDS_KEY_PAIR_GEN 0x00001055UL
  ------------------
  |  Branch (1592:9): [True: 0, False: 9.72k]
  ------------------
 1593|      0|            ecParams = (SECKEYECParams *)param;
 1594|      0|            attrs = ecPubTemplate;
 1595|      0|            PK11_SETATTRS(attrs, CKA_EC_PARAMS, ecParams->data,
  ------------------
  |  |  104|      0|    (x)->type = (id);              \
  |  |  105|      0|    (x)->pValue = (v);             \
  |  |  106|      0|    (x)->ulValueLen = (l);
  ------------------
 1596|      0|                          ecParams->len);
 1597|      0|            attrs++;
 1598|      0|            pubTemplate = ecPubTemplate;
 1599|      0|            keyType = edKey;
 1600|      0|            test_mech.mechanism = CKM_EDDSA;
  ------------------
  |  | 1174|      0|#define CKM_EDDSA 0x00001057UL
  ------------------
 1601|      0|            break;
 1602|      0|        default:
  ------------------
  |  Branch (1602:9): [True: 0, False: 9.72k]
  ------------------
 1603|      0|            PORT_SetError(SEC_ERROR_BAD_KEY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1604|      0|            return NULL;
 1605|  9.72k|    }
 1606|       |
 1607|       |    /* now query the slot to find out how "good" a key we can generate */
 1608|  9.72k|    if (!slot->isThreadSafe)
  ------------------
  |  Branch (1608:9): [True: 0, False: 9.72k]
  ------------------
 1609|      0|        PK11_EnterSlotMonitor(slot);
 1610|  9.72k|    crv = PK11_GETTAB(slot)->C_GetMechanismInfo(slot->slotID,
  ------------------
  |  |  102|  9.72k|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1611|  9.72k|                                                test_mech.mechanism, &mechanism_info);
 1612|       |    /*
 1613|       |     * EC keys are used in multiple different types of mechanism, if we
 1614|       |     * are using dual use keys, we need to query the second mechanism
 1615|       |     * as well.
 1616|       |     */
 1617|  9.72k|    if (test_mech2.mechanism != CKM_INVALID_MECHANISM) {
  ------------------
  |  |  155|  9.72k|#define CKM_INVALID_MECHANISM 0xffffffffUL
  ------------------
  |  Branch (1617:9): [True: 0, False: 9.72k]
  ------------------
 1618|      0|        CK_MECHANISM_INFO mechanism_info2;
 1619|      0|        CK_RV crv2;
 1620|       |
 1621|      0|        if (crv != CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1621:13): [True: 0, False: 0]
  ------------------
 1622|       |            /* the first failed, make sure there is no trash in the
 1623|       |             * mechanism flags when we or it below */
 1624|      0|            mechanism_info.flags = 0;
 1625|      0|        }
 1626|      0|        crv2 = PK11_GETTAB(slot)->C_GetMechanismInfo(slot->slotID,
  ------------------
  |  |  102|      0|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1627|      0|                                                     test_mech2.mechanism, &mechanism_info2);
 1628|      0|        if (crv2 == CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1628:13): [True: 0, False: 0]
  ------------------
 1629|      0|            crv = CKR_OK; /* succeed if either mechnaism info succeeds */
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
 1630|       |            /* combine the 2 sets of mechnanism flags */
 1631|      0|            mechanism_info.flags |= mechanism_info2.flags;
 1632|      0|        }
 1633|      0|    }
 1634|  9.72k|    if (!slot->isThreadSafe)
  ------------------
  |  Branch (1634:9): [True: 0, False: 9.72k]
  ------------------
 1635|      0|        PK11_ExitSlotMonitor(slot);
 1636|  9.72k|    if ((crv != CKR_OK) || (mechanism_info.flags == 0)) {
  ------------------
  |  | 1388|  9.72k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1636:9): [True: 0, False: 9.72k]
  |  Branch (1636:28): [True: 40, False: 9.68k]
  ------------------
 1637|       |        /* must be old module... guess what it should be... */
 1638|     40|        switch (test_mech.mechanism) {
 1639|      0|            case CKM_RSA_PKCS:
  ------------------
  |  |  720|      0|#define CKM_RSA_PKCS 0x00000001UL
  ------------------
  |  Branch (1639:13): [True: 0, False: 40]
  ------------------
 1640|      0|                mechanism_info.flags = (CKF_SIGN | CKF_DECRYPT |
  ------------------
  |  | 1356|      0|#define CKF_SIGN 0x00000800UL
  ------------------
                              mechanism_info.flags = (CKF_SIGN | CKF_DECRYPT |
  ------------------
  |  | 1354|      0|#define CKF_DECRYPT 0x00000200UL
  ------------------
 1641|      0|                                        CKF_WRAP | CKF_VERIFY_RECOVER | CKF_ENCRYPT | CKF_WRAP);
  ------------------
  |  | 1362|      0|#define CKF_WRAP 0x00020000UL
  ------------------
                                                      CKF_WRAP | CKF_VERIFY_RECOVER | CKF_ENCRYPT | CKF_WRAP);
  ------------------
  |  | 1359|      0|#define CKF_VERIFY_RECOVER 0x00004000UL
  ------------------
                                                      CKF_WRAP | CKF_VERIFY_RECOVER | CKF_ENCRYPT | CKF_WRAP);
  ------------------
  |  | 1353|      0|#define CKF_ENCRYPT 0x00000100UL
  ------------------
                                                      CKF_WRAP | CKF_VERIFY_RECOVER | CKF_ENCRYPT | CKF_WRAP);
  ------------------
  |  | 1362|      0|#define CKF_WRAP 0x00020000UL
  ------------------
 1642|      0|                break;
 1643|      0|            case CKM_DSA:
  ------------------
  |  |  745|      0|#define CKM_DSA 0x00000011UL
  ------------------
  |  Branch (1643:13): [True: 0, False: 40]
  ------------------
 1644|      0|                mechanism_info.flags = CKF_SIGN | CKF_VERIFY;
  ------------------
  |  | 1356|      0|#define CKF_SIGN 0x00000800UL
  ------------------
                              mechanism_info.flags = CKF_SIGN | CKF_VERIFY;
  ------------------
  |  | 1358|      0|#define CKF_VERIFY 0x00002000
  ------------------
 1645|      0|                break;
 1646|      0|            case CKM_DH_PKCS_DERIVE:
  ------------------
  |  |  759|      0|#define CKM_DH_PKCS_DERIVE 0x00000021UL
  ------------------
  |  Branch (1646:13): [True: 0, False: 40]
  ------------------
 1647|      0|                mechanism_info.flags = CKF_DERIVE;
  ------------------
  |  | 1364|      0|#define CKF_DERIVE 0x00080000UL
  ------------------
 1648|      0|                break;
 1649|      0|            case CKM_ECDH1_DERIVE:
  ------------------
  |  | 1086|      0|#define CKM_ECDH1_DERIVE 0x00001050UL
  ------------------
  |  Branch (1649:13): [True: 0, False: 40]
  ------------------
 1650|      0|                mechanism_info.flags = CKF_DERIVE;
  ------------------
  |  | 1364|      0|#define CKF_DERIVE 0x00080000UL
  ------------------
 1651|      0|                if (test_mech2.mechanism == CKM_ECDSA) {
  ------------------
  |  | 1074|      0|#define CKM_ECDSA 0x00001041UL
  ------------------
  |  Branch (1651:21): [True: 0, False: 0]
  ------------------
 1652|      0|                    mechanism_info.flags |= CKF_SIGN | CKF_VERIFY;
  ------------------
  |  | 1356|      0|#define CKF_SIGN 0x00000800UL
  ------------------
                                  mechanism_info.flags |= CKF_SIGN | CKF_VERIFY;
  ------------------
  |  | 1358|      0|#define CKF_VERIFY 0x00002000
  ------------------
 1653|      0|                }
 1654|      0|                break;
 1655|      0|            case CKM_ECDSA:
  ------------------
  |  | 1074|      0|#define CKM_ECDSA 0x00001041UL
  ------------------
  |  Branch (1655:13): [True: 0, False: 40]
  ------------------
 1656|      0|                mechanism_info.flags = CKF_SIGN | CKF_VERIFY;
  ------------------
  |  | 1356|      0|#define CKF_SIGN 0x00000800UL
  ------------------
                              mechanism_info.flags = CKF_SIGN | CKF_VERIFY;
  ------------------
  |  | 1358|      0|#define CKF_VERIFY 0x00002000
  ------------------
 1657|      0|                break;
 1658|      0|            case CKM_EDDSA:
  ------------------
  |  | 1174|      0|#define CKM_EDDSA 0x00001057UL
  ------------------
  |  Branch (1658:13): [True: 0, False: 40]
  ------------------
 1659|      0|                mechanism_info.flags = CKF_SIGN | CKF_VERIFY;
  ------------------
  |  | 1356|      0|#define CKF_SIGN 0x00000800UL
  ------------------
                              mechanism_info.flags = CKF_SIGN | CKF_VERIFY;
  ------------------
  |  | 1358|      0|#define CKF_VERIFY 0x00002000
  ------------------
 1660|      0|                break;
 1661|       |
 1662|     40|            default:
  ------------------
  |  Branch (1662:13): [True: 40, False: 0]
  ------------------
 1663|     40|                break;
 1664|     40|        }
 1665|     40|    }
 1666|       |    /* now adjust our flags according to the user's key usage passed to us */
 1667|  9.72k|    mechanism_info.flags = (mechanism_info.flags & (~opFlagsMask)) | opFlags;
 1668|       |    /* set the public key attributes */
 1669|  9.72k|    attrs += pk11_AttrFlagsToAttributes(pubKeyAttrFlags, attrs,
 1670|  9.72k|                                        &cktrue, &ckfalse);
 1671|  9.72k|    PK11_SETATTRS(attrs, CKA_DERIVE,
  ------------------
  |  |  104|  9.72k|    (x)->type = (id);              \
  |  |  105|  19.4k|    (x)->pValue = (v);             \
  |  |  ------------------
  |  |  |  Branch (105:20): [True: 9.72k, False: 0]
  |  |  ------------------
  |  |  106|  9.72k|    (x)->ulValueLen = (l);
  ------------------
 1672|  9.72k|                  mechanism_info.flags & CKF_DERIVE ? &cktrue : &ckfalse,
 1673|  9.72k|                  sizeof(CK_BBOOL));
 1674|  9.72k|    attrs++;
 1675|  9.72k|    PK11_SETATTRS(attrs, CKA_WRAP,
  ------------------
  |  |  104|  9.72k|    (x)->type = (id);              \
  |  |  105|  19.4k|    (x)->pValue = (v);             \
  |  |  ------------------
  |  |  |  Branch (105:20): [True: 0, False: 9.72k]
  |  |  ------------------
  |  |  106|  9.72k|    (x)->ulValueLen = (l);
  ------------------
 1676|  9.72k|                  mechanism_info.flags & CKF_WRAP ? &cktrue : &ckfalse,
 1677|  9.72k|                  sizeof(CK_BBOOL));
 1678|  9.72k|    attrs++;
 1679|  9.72k|    PK11_SETATTRS(attrs, CKA_VERIFY,
  ------------------
  |  |  104|  9.72k|    (x)->type = (id);              \
  |  |  105|  19.4k|    (x)->pValue = (v);             \
  |  |  ------------------
  |  |  |  Branch (105:20): [True: 0, False: 9.72k]
  |  |  ------------------
  |  |  106|  9.72k|    (x)->ulValueLen = (l);
  ------------------
 1680|  9.72k|                  mechanism_info.flags & CKF_VERIFY ? &cktrue : &ckfalse,
 1681|  9.72k|                  sizeof(CK_BBOOL));
 1682|  9.72k|    attrs++;
 1683|  9.72k|    PK11_SETATTRS(attrs, CKA_VERIFY_RECOVER,
  ------------------
  |  |  104|  9.72k|    (x)->type = (id);              \
  |  |  105|  19.4k|    (x)->pValue = (v);             \
  |  |  ------------------
  |  |  |  Branch (105:20): [True: 0, False: 9.72k]
  |  |  ------------------
  |  |  106|  9.72k|    (x)->ulValueLen = (l);
  ------------------
 1684|  9.72k|                  mechanism_info.flags & CKF_VERIFY_RECOVER ? &cktrue : &ckfalse,
 1685|  9.72k|                  sizeof(CK_BBOOL));
 1686|  9.72k|    attrs++;
 1687|  9.72k|    PK11_SETATTRS(attrs, CKA_ENCRYPT,
  ------------------
  |  |  104|  9.72k|    (x)->type = (id);              \
  |  |  105|  19.4k|    (x)->pValue = (v);             \
  |  |  ------------------
  |  |  |  Branch (105:20): [True: 0, False: 9.72k]
  |  |  ------------------
  |  |  106|  9.72k|    (x)->ulValueLen = (l);
  ------------------
 1688|  9.72k|                  mechanism_info.flags & CKF_ENCRYPT ? &cktrue : &ckfalse,
 1689|  9.72k|                  sizeof(CK_BBOOL));
 1690|  9.72k|    attrs++;
 1691|       |    /* set the private key attributes */
 1692|  9.72k|    PK11_SETATTRS(privattrs, CKA_DERIVE,
  ------------------
  |  |  104|  9.72k|    (x)->type = (id);              \
  |  |  105|  19.4k|    (x)->pValue = (v);             \
  |  |  ------------------
  |  |  |  Branch (105:20): [True: 9.72k, False: 0]
  |  |  ------------------
  |  |  106|  9.72k|    (x)->ulValueLen = (l);
  ------------------
 1693|  9.72k|                  mechanism_info.flags & CKF_DERIVE ? &cktrue : &ckfalse,
 1694|  9.72k|                  sizeof(CK_BBOOL));
 1695|  9.72k|    privattrs++;
 1696|  9.72k|    PK11_SETATTRS(privattrs, CKA_UNWRAP,
  ------------------
  |  |  104|  9.72k|    (x)->type = (id);              \
  |  |  105|  19.4k|    (x)->pValue = (v);             \
  |  |  ------------------
  |  |  |  Branch (105:20): [True: 0, False: 9.72k]
  |  |  ------------------
  |  |  106|  9.72k|    (x)->ulValueLen = (l);
  ------------------
 1697|  9.72k|                  mechanism_info.flags & CKF_UNWRAP ? &cktrue : &ckfalse,
 1698|  9.72k|                  sizeof(CK_BBOOL));
 1699|  9.72k|    privattrs++;
 1700|  9.72k|    PK11_SETATTRS(privattrs, CKA_SIGN,
  ------------------
  |  |  104|  9.72k|    (x)->type = (id);              \
  |  |  105|  19.4k|    (x)->pValue = (v);             \
  |  |  ------------------
  |  |  |  Branch (105:20): [True: 0, False: 9.72k]
  |  |  ------------------
  |  |  106|  9.72k|    (x)->ulValueLen = (l);
  ------------------
 1701|  9.72k|                  mechanism_info.flags & CKF_SIGN ? &cktrue : &ckfalse,
 1702|  9.72k|                  sizeof(CK_BBOOL));
 1703|  9.72k|    privattrs++;
 1704|  9.72k|    PK11_SETATTRS(privattrs, CKA_DECRYPT,
  ------------------
  |  |  104|  9.72k|    (x)->type = (id);              \
  |  |  105|  19.4k|    (x)->pValue = (v);             \
  |  |  ------------------
  |  |  |  Branch (105:20): [True: 0, False: 9.72k]
  |  |  ------------------
  |  |  106|  9.72k|    (x)->ulValueLen = (l);
  ------------------
 1705|  9.72k|                  mechanism_info.flags & CKF_DECRYPT ? &cktrue : &ckfalse,
 1706|  9.72k|                  sizeof(CK_BBOOL));
 1707|  9.72k|    privattrs++;
 1708|       |
 1709|  9.72k|    if (token) {
  ------------------
  |  Branch (1709:9): [True: 0, False: 9.72k]
  ------------------
 1710|      0|        session_handle = PK11_GetRWSession(slot);
 1711|      0|        haslock = PK11_RWSessionHasLock(slot, session_handle);
 1712|      0|        restore = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 1713|  9.72k|    } else {
 1714|  9.72k|        session_handle = slot->session;
 1715|  9.72k|        if (session_handle != CK_INVALID_HANDLE)
  ------------------
  |  |   78|  9.72k|#define CK_INVALID_HANDLE 0
  ------------------
  |  Branch (1715:13): [True: 9.72k, False: 0]
  ------------------
 1716|  9.72k|            PK11_EnterSlotMonitor(slot);
 1717|  9.72k|        restore = PR_FALSE;
  ------------------
  |  |  438|  9.72k|#define PR_FALSE 0
  ------------------
 1718|  9.72k|        haslock = PR_TRUE;
  ------------------
  |  |  437|  9.72k|#define PR_TRUE 1
  ------------------
 1719|  9.72k|    }
 1720|       |
 1721|  9.72k|    if (session_handle == CK_INVALID_HANDLE) {
  ------------------
  |  |   78|  9.72k|#define CK_INVALID_HANDLE 0
  ------------------
  |  Branch (1721:9): [True: 0, False: 9.72k]
  ------------------
 1722|      0|        PORT_SetError(SEC_ERROR_BAD_DATA);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1723|      0|        return NULL;
 1724|      0|    }
 1725|  9.72k|    privCount = privattrs - privTemplate;
 1726|  9.72k|    pubCount = attrs - pubTemplate;
 1727|  9.72k|    crv = PK11_GETTAB(slot)->C_GenerateKeyPair(session_handle, &mechanism,
  ------------------
  |  |  102|  9.72k|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1728|  9.72k|                                               pubTemplate, pubCount, privTemplate, privCount, &pubID, &privID);
 1729|       |
 1730|  9.72k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  9.72k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1730:9): [True: 56, False: 9.67k]
  ------------------
 1731|     56|        if (restore) {
  ------------------
  |  Branch (1731:13): [True: 0, False: 56]
  ------------------
 1732|      0|            PK11_RestoreROSession(slot, session_handle);
 1733|      0|        } else
 1734|     56|            PK11_ExitSlotMonitor(slot);
 1735|     56|        PORT_SetError(PK11_MapError(crv));
  ------------------
  |  |   65|     56|#define PORT_SetError PORT_SetError_Util
  ------------------
 1736|     56|        return NULL;
 1737|     56|    }
 1738|       |    /* This locking code is dangerous and needs to be more thought
 1739|       |     * out... the real problem is that we're holding the mutex open this long
 1740|       |     */
 1741|  9.67k|    if (haslock) {
  ------------------
  |  Branch (1741:9): [True: 9.67k, False: 0]
  ------------------
 1742|  9.67k|        PK11_ExitSlotMonitor(slot);
 1743|  9.67k|    }
 1744|       |
 1745|       |    /* swap around the ID's for older PKCS #11 modules */
 1746|  9.67k|    keyClass = PK11_ReadULongAttribute(slot, pubID, CKA_CLASS);
  ------------------
  |  |  511|  9.67k|#define CKA_CLASS 0x00000000UL
  ------------------
 1747|  9.67k|    if (keyClass != CKO_PUBLIC_KEY) {
  ------------------
  |  |  327|  9.67k|#define CKO_PUBLIC_KEY 0x00000002UL
  ------------------
  |  Branch (1747:9): [True: 0, False: 9.67k]
  ------------------
 1748|      0|        CK_OBJECT_HANDLE tmp = pubID;
 1749|      0|        pubID = privID;
 1750|      0|        privID = tmp;
 1751|      0|    }
 1752|       |
 1753|  9.67k|    *pubKey = PK11_ExtractPublicKey(slot, keyType, pubID);
 1754|  9.67k|    if (*pubKey == NULL) {
  ------------------
  |  Branch (1754:9): [True: 0, False: 9.67k]
  ------------------
 1755|      0|        if (restore) {
  ------------------
  |  Branch (1755:13): [True: 0, False: 0]
  ------------------
 1756|       |            /* we may have to restore the mutex so it get's exited properly
 1757|       |             * in RestoreROSession */
 1758|      0|            if (haslock)
  ------------------
  |  Branch (1758:17): [True: 0, False: 0]
  ------------------
 1759|      0|                PK11_EnterSlotMonitor(slot);
 1760|      0|            PK11_RestoreROSession(slot, session_handle);
 1761|      0|        }
 1762|      0|        PK11_DestroyObject(slot, pubID);
 1763|      0|        PK11_DestroyObject(slot, privID);
 1764|      0|        return NULL;
 1765|      0|    }
 1766|       |
 1767|       |    /* set the ID to the public key so we can find it again */
 1768|  9.67k|    cka_id = pk11_MakeIDFromPublicKey(*pubKey);
 1769|  9.67k|    pubIsToken = (PRBool)PK11_HasAttributeSet(slot, pubID, CKA_TOKEN, PR_FALSE);
  ------------------
  |  |  512|  9.67k|#define CKA_TOKEN 0x00000001UL
  ------------------
                  pubIsToken = (PRBool)PK11_HasAttributeSet(slot, pubID, CKA_TOKEN, PR_FALSE);
  ------------------
  |  |  438|  9.67k|#define PR_FALSE 0
  ------------------
 1770|       |
 1771|  9.67k|    PK11_SETATTRS(&setTemplate, CKA_ID, cka_id->data, cka_id->len);
  ------------------
  |  |  104|  9.67k|    (x)->type = (id);              \
  |  |  105|  9.67k|    (x)->pValue = (v);             \
  |  |  106|  9.67k|    (x)->ulValueLen = (l);
  ------------------
 1772|       |
 1773|  9.67k|    if (haslock) {
  ------------------
  |  Branch (1773:9): [True: 9.67k, False: 0]
  ------------------
 1774|  9.67k|        PK11_EnterSlotMonitor(slot);
 1775|  9.67k|    }
 1776|  9.67k|    crv = PK11_GETTAB(slot)->C_SetAttributeValue(session_handle, privID,
  ------------------
  |  |  102|  9.67k|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1777|  9.67k|                                                 &setTemplate, 1);
 1778|       |
 1779|  9.67k|    if (crv == CKR_OK && pubIsToken) {
  ------------------
  |  | 1388|  19.3k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1779:9): [True: 9.67k, False: 0]
  |  Branch (1779:26): [True: 0, False: 9.67k]
  ------------------
 1780|      0|        crv = PK11_GETTAB(slot)->C_SetAttributeValue(session_handle, pubID,
  ------------------
  |  |  102|      0|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1781|      0|                                                     &setTemplate, 1);
 1782|      0|    }
 1783|       |
 1784|  9.67k|    if (restore) {
  ------------------
  |  Branch (1784:9): [True: 0, False: 9.67k]
  ------------------
 1785|      0|        PK11_RestoreROSession(slot, session_handle);
 1786|  9.67k|    } else {
 1787|  9.67k|        PK11_ExitSlotMonitor(slot);
 1788|  9.67k|    }
 1789|  9.67k|    SECITEM_FreeItem(cka_id, PR_TRUE);
  ------------------
  |  |  108|  9.67k|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                  SECITEM_FreeItem(cka_id, PR_TRUE);
  ------------------
  |  |  437|  9.67k|#define PR_TRUE 1
  ------------------
 1790|       |
 1791|  9.67k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  9.67k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1791:9): [True: 0, False: 9.67k]
  ------------------
 1792|      0|        PK11_DestroyObject(slot, pubID);
 1793|      0|        PK11_DestroyObject(slot, privID);
 1794|      0|        PORT_SetError(PK11_MapError(crv));
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1795|      0|        *pubKey = NULL;
 1796|      0|        return NULL;
 1797|      0|    }
 1798|       |
 1799|  9.67k|    privKey = PK11_MakePrivKey(slot, keyType, !token, privID, wincx);
 1800|  9.67k|    if (privKey == NULL) {
  ------------------
  |  Branch (1800:9): [True: 0, False: 9.67k]
  ------------------
 1801|      0|        SECKEY_DestroyPublicKey(*pubKey);
 1802|      0|        PK11_DestroyObject(slot, privID);
 1803|      0|        *pubKey = NULL;
 1804|      0|        return NULL;
 1805|      0|    }
 1806|       |
 1807|  9.67k|    return privKey;
 1808|  9.67k|}
PK11_GenerateKeyPairWithFlags:
 1813|  1.13k|{
 1814|  1.13k|    return PK11_GenerateKeyPairWithOpFlags(slot, type, param, pubKey, attrFlags,
 1815|  1.13k|                                           0, 0, wincx);
 1816|  1.13k|}
PK11_GenerateKeyPair:
 1825|  1.13k|{
 1826|  1.13k|    PK11AttrFlags attrFlags = 0;
 1827|       |
 1828|  1.13k|    if (token) {
  ------------------
  |  Branch (1828:9): [True: 0, False: 1.13k]
  ------------------
 1829|      0|        attrFlags |= PK11_ATTR_TOKEN;
  ------------------
  |  |  194|      0|#define PK11_ATTR_TOKEN 0x00000001L
  ------------------
 1830|  1.13k|    } else {
 1831|  1.13k|        attrFlags |= PK11_ATTR_SESSION;
  ------------------
  |  |  195|  1.13k|#define PK11_ATTR_SESSION 0x00000002L
  ------------------
 1832|  1.13k|    }
 1833|  1.13k|    if (sensitive) {
  ------------------
  |  Branch (1833:9): [True: 0, False: 1.13k]
  ------------------
 1834|      0|        attrFlags |= (PK11_ATTR_SENSITIVE | PK11_ATTR_PRIVATE);
  ------------------
  |  |  260|      0|#define PK11_ATTR_SENSITIVE 0x00000040L
  ------------------
                      attrFlags |= (PK11_ATTR_SENSITIVE | PK11_ATTR_PRIVATE);
  ------------------
  |  |  216|      0|#define PK11_ATTR_PRIVATE 0x00000004L
  ------------------
 1835|  1.13k|    } else {
 1836|  1.13k|        attrFlags |= (PK11_ATTR_INSENSITIVE | PK11_ATTR_PUBLIC);
  ------------------
  |  |  261|  1.13k|#define PK11_ATTR_INSENSITIVE 0x00000080L
  ------------------
                      attrFlags |= (PK11_ATTR_INSENSITIVE | PK11_ATTR_PUBLIC);
  ------------------
  |  |  217|  1.13k|#define PK11_ATTR_PUBLIC 0x00000008L
  ------------------
 1837|  1.13k|    }
 1838|  1.13k|    return PK11_GenerateKeyPairWithFlags(slot, type, param, pubKey,
 1839|  1.13k|                                         attrFlags, wincx);
 1840|  1.13k|}
PK11_MakeIDFromPubKey:
 2699|  9.67k|{
 2700|  9.67k|    PK11Context *context;
 2701|  9.67k|    SECItem *certCKA_ID;
 2702|  9.67k|    SECStatus rv;
 2703|       |
 2704|  9.67k|    if (pubKeyData->len <= SHA1_LENGTH) {
  ------------------
  |  |   39|  9.67k|#define SHA1_LENGTH 20
  ------------------
  |  Branch (2704:9): [True: 0, False: 9.67k]
  ------------------
 2705|       |        /* probably an already hashed value. The strongest known public
 2706|       |         * key values <= 160 bits would be less than 40 bit symetric in
 2707|       |         * strength. Don't hash them, just return the value. There are
 2708|       |         * none at the time of this writing supported by previous versions
 2709|       |         * of NSS, so change is binary compatible safe */
 2710|      0|        return SECITEM_DupItem(pubKeyData);
  ------------------
  |  |  107|      0|#define SECITEM_DupItem SECITEM_DupItem_Util
  ------------------
 2711|      0|    }
 2712|       |
 2713|  9.67k|    context = PK11_CreateDigestContext(SEC_OID_SHA1);
 2714|  9.67k|    if (context == NULL) {
  ------------------
  |  Branch (2714:9): [True: 0, False: 9.67k]
  ------------------
 2715|      0|        return NULL;
 2716|      0|    }
 2717|       |
 2718|  9.67k|    rv = PK11_DigestBegin(context);
 2719|  9.67k|    if (rv == SECSuccess) {
  ------------------
  |  Branch (2719:9): [True: 9.67k, False: 0]
  ------------------
 2720|  9.67k|        rv = PK11_DigestOp(context, pubKeyData->data, pubKeyData->len);
 2721|  9.67k|    }
 2722|  9.67k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (2722:9): [True: 0, False: 9.67k]
  ------------------
 2723|      0|        PK11_DestroyContext(context, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 2724|      0|        return NULL;
 2725|      0|    }
 2726|       |
 2727|  9.67k|    certCKA_ID = (SECItem *)PORT_Alloc(sizeof(SECItem));
  ------------------
  |  |   52|  9.67k|#define PORT_Alloc PORT_Alloc_Util
  ------------------
 2728|  9.67k|    if (certCKA_ID == NULL) {
  ------------------
  |  Branch (2728:9): [True: 0, False: 9.67k]
  ------------------
 2729|      0|        PK11_DestroyContext(context, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 2730|      0|        return NULL;
 2731|      0|    }
 2732|       |
 2733|  9.67k|    certCKA_ID->len = SHA1_LENGTH;
  ------------------
  |  |   39|  9.67k|#define SHA1_LENGTH 20
  ------------------
 2734|  9.67k|    certCKA_ID->data = (unsigned char *)PORT_Alloc(certCKA_ID->len);
  ------------------
  |  |   52|  9.67k|#define PORT_Alloc PORT_Alloc_Util
  ------------------
 2735|  9.67k|    if (certCKA_ID->data == NULL) {
  ------------------
  |  Branch (2735:9): [True: 0, False: 9.67k]
  ------------------
 2736|      0|        PORT_Free(certCKA_ID);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 2737|      0|        PK11_DestroyContext(context, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 2738|      0|        return NULL;
 2739|      0|    }
 2740|       |
 2741|  9.67k|    rv = PK11_DigestFinal(context, certCKA_ID->data, &certCKA_ID->len,
 2742|  9.67k|                          SHA1_LENGTH);
  ------------------
  |  |   39|  9.67k|#define SHA1_LENGTH 20
  ------------------
 2743|  9.67k|    PK11_DestroyContext(context, PR_TRUE);
  ------------------
  |  |  437|  9.67k|#define PR_TRUE 1
  ------------------
 2744|  9.67k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (2744:9): [True: 0, False: 9.67k]
  ------------------
 2745|      0|        SECITEM_FreeItem(certCKA_ID, PR_TRUE);
  ------------------
  |  |  108|      0|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                      SECITEM_FreeItem(certCKA_ID, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 2746|      0|        return NULL;
 2747|      0|    }
 2748|       |
 2749|  9.67k|    return certCKA_ID;
 2750|  9.67k|}
pk11akey.c:pk11_MakeIDFromPublicKey:
   31|  9.67k|{
   32|       |    /* set the ID to the public key so we can find it again */
   33|  9.67k|    SECItem *pubKeyIndex = NULL;
   34|  9.67k|    switch (pubKey->keyType) {
   35|      0|        case rsaKey:
  ------------------
  |  Branch (35:9): [True: 0, False: 9.67k]
  ------------------
   36|      0|            pubKeyIndex = &pubKey->u.rsa.modulus;
   37|      0|            break;
   38|      0|        case dsaKey:
  ------------------
  |  Branch (38:9): [True: 0, False: 9.67k]
  ------------------
   39|      0|            pubKeyIndex = &pubKey->u.dsa.publicValue;
   40|      0|            break;
   41|  1.13k|        case dhKey:
  ------------------
  |  Branch (41:9): [True: 1.13k, False: 8.54k]
  ------------------
   42|  1.13k|            pubKeyIndex = &pubKey->u.dh.publicValue;
   43|  1.13k|            break;
   44|      0|        case edKey:
  ------------------
  |  Branch (44:9): [True: 0, False: 9.67k]
  ------------------
   45|  8.50k|        case ecKey:
  ------------------
  |  Branch (45:9): [True: 8.50k, False: 1.17k]
  ------------------
   46|  8.50k|        case ecMontKey:
  ------------------
  |  Branch (46:9): [True: 0, False: 9.67k]
  ------------------
   47|  8.50k|            pubKeyIndex = &pubKey->u.ec.publicValue;
   48|  8.50k|            break;
   49|     40|        case kyberKey:
  ------------------
  |  Branch (49:9): [True: 40, False: 9.63k]
  ------------------
   50|     40|            pubKeyIndex = &pubKey->u.kyber.publicValue;
   51|     40|            break;
   52|      0|        default:
  ------------------
  |  Branch (52:9): [True: 0, False: 9.67k]
  ------------------
   53|      0|            return NULL;
   54|  9.67k|    }
   55|  9.67k|    PORT_Assert(pubKeyIndex != NULL);
  ------------------
  |  |  120|  9.67k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  9.67k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 9.67k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   56|       |
   57|  9.67k|    return PK11_MakeIDFromPubKey(pubKeyIndex);
   58|  9.67k|}
pk11akey.c:pk11_Attr2SecItem:
  316|  19.9k|{
  317|  19.9k|    item->data = NULL;
  318|       |
  319|  19.9k|    (void)SECITEM_AllocItem(arena, item, attr->ulValueLen);
  ------------------
  |  |  103|  19.9k|#define SECITEM_AllocItem SECITEM_AllocItem_Util
  ------------------
  320|  19.9k|    if (item->data == NULL) {
  ------------------
  |  Branch (320:9): [True: 0, False: 19.9k]
  ------------------
  321|      0|        return CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
  322|      0|    }
  323|  19.9k|    PORT_Memcpy(item->data, attr->pValue, item->len);
  ------------------
  |  |  180|  19.9k|#define PORT_Memcpy memcpy
  ------------------
  324|  19.9k|    return CKR_OK;
  ------------------
  |  | 1388|  19.9k|#define CKR_OK 0x00000000UL
  ------------------
  325|  19.9k|}
pk11akey.c:pk11_get_Decoded_ECPoint:
  465|  8.50k|{
  466|  8.50k|    SECItem encodedPublicValue;
  467|  8.50k|    SECStatus rv;
  468|  8.50k|    int keyLen;
  469|  8.50k|    PRBool plain = PR_FALSE;
  ------------------
  |  |  438|  8.50k|#define PR_FALSE 0
  ------------------
  470|       |
  471|  8.50k|    if (ecPoint->ulValueLen == 0) {
  ------------------
  |  Branch (471:9): [True: 0, False: 8.50k]
  ------------------
  472|      0|        return CKR_ATTRIBUTE_VALUE_INVALID;
  ------------------
  |  | 1409|      0|#define CKR_ATTRIBUTE_VALUE_INVALID 0x00000013UL
  ------------------
  473|      0|    }
  474|       |
  475|       |    /*
  476|       |     * The PKCS #11 spec requires ecPoints to be encoded as a DER OCTET String.
  477|       |     * NSS has mistakenly passed unencoded values, and some PKCS #11 vendors
  478|       |     * followed that mistake. Now we need to detect which encoding we were
  479|       |     * passed in. The task is made more complicated by the fact the the
  480|       |     * DER encoding byte (SEC_ASN_OCTET_STRING) is the same as the
  481|       |     * EC_POINT_FORM_UNCOMPRESSED byte (0x04), so we can't use that to
  482|       |     * determine which curve we are using.
  483|       |     */
  484|       |
  485|       |    /* get the expected key length for the passed in curve.
  486|       |     * pk11_get_EC_PointLenInBytes only returns valid values for curves
  487|       |     * NSS has traditionally recognized. If the curve is not recognized,
  488|       |     * it will return '0', and we have to figure out if the key was
  489|       |     * encoded or not heuristically. If the ecParams are invalid, it
  490|       |     * will return -1 for the keyLen.
  491|       |     */
  492|  8.50k|    keyLen = pk11_get_EC_PointLenInBytes(arena, ecParams, &plain);
  493|  8.50k|    if (keyLen < 0) {
  ------------------
  |  Branch (493:9): [True: 0, False: 8.50k]
  ------------------
  494|      0|        return CKR_ATTRIBUTE_VALUE_INVALID;
  ------------------
  |  | 1409|      0|#define CKR_ATTRIBUTE_VALUE_INVALID 0x00000013UL
  ------------------
  495|      0|    }
  496|       |
  497|       |    /*
  498|       |     * Some curves are not encoded but we don't have the name here.
  499|       |     * Instead, pk11_get_EC_PointLenInBytes returns true plain if this is the
  500|       |     * case.
  501|       |     */
  502|  8.50k|    if (plain && ecPoint->ulValueLen == (unsigned int)keyLen) {
  ------------------
  |  Branch (502:9): [True: 8.01k, False: 490]
  |  Branch (502:18): [True: 8.01k, False: 0]
  ------------------
  503|  8.01k|        return pk11_Attr2SecItem(arena, ecPoint, publicKeyValue);
  504|  8.01k|    }
  505|       |
  506|       |    /* If the point is uncompressed and the lengths match, it
  507|       |     * must be an unencoded point */
  508|    490|    if ((*((char *)ecPoint->pValue) == EC_POINT_FORM_UNCOMPRESSED) &&
  ------------------
  |  |   92|    490|#define EC_POINT_FORM_UNCOMPRESSED 0x04
  ------------------
  |  Branch (508:9): [True: 490, False: 0]
  ------------------
  509|    490|        (ecPoint->ulValueLen == (unsigned int)keyLen)) {
  ------------------
  |  Branch (509:9): [True: 0, False: 490]
  ------------------
  510|      0|        return pk11_Attr2SecItem(arena, ecPoint, publicKeyValue);
  511|      0|    }
  512|       |
  513|       |    /* now assume the key passed to us was encoded and decode it */
  514|    490|    if (*((char *)ecPoint->pValue) == SEC_ASN1_OCTET_STRING) {
  ------------------
  |  |   80|    490|#define SEC_ASN1_OCTET_STRING 0x04
  ------------------
  |  Branch (514:9): [True: 490, False: 0]
  ------------------
  515|       |        /* OK, now let's try to decode it and see if it's valid */
  516|    490|        encodedPublicValue.data = ecPoint->pValue;
  517|    490|        encodedPublicValue.len = ecPoint->ulValueLen;
  518|    490|        rv = SEC_QuickDERDecodeItem(arena, publicKeyValue,
  ------------------
  |  |  102|    490|#define SEC_QuickDERDecodeItem SEC_QuickDERDecodeItem_Util
  ------------------
  519|    490|                                    SEC_ASN1_GET(SEC_OctetStringTemplate), &encodedPublicValue);
  ------------------
  |  |  188|    490|#define SEC_ASN1_GET(x) x
  ------------------
  520|       |
  521|       |        /* it coded correctly & we know the key length (and they match)
  522|       |         * then we are done, return the results. */
  523|    490|        if (keyLen && rv == SECSuccess && publicKeyValue->len == (unsigned int)keyLen) {
  ------------------
  |  Branch (523:13): [True: 490, False: 0]
  |  Branch (523:23): [True: 490, False: 0]
  |  Branch (523:43): [True: 490, False: 0]
  ------------------
  524|    490|            return CKR_OK;
  ------------------
  |  | 1388|    490|#define CKR_OK 0x00000000UL
  ------------------
  525|    490|        }
  526|       |
  527|       |        /* if we know the key length, one of the above tests should have
  528|       |         * succeded. If it doesn't the module gave us bad data */
  529|      0|        if (keyLen) {
  ------------------
  |  Branch (529:13): [True: 0, False: 0]
  ------------------
  530|      0|            return CKR_ATTRIBUTE_VALUE_INVALID;
  ------------------
  |  | 1409|      0|#define CKR_ATTRIBUTE_VALUE_INVALID 0x00000013UL
  ------------------
  531|      0|        }
  532|       |
  533|       |        /* We don't know the key length, so we don't know deterministically
  534|       |         * which encoding was used. We now will try to pick the most likely
  535|       |         * form that's correct, with a preference for the encoded form if we
  536|       |         * can't determine for sure. We do this by checking the key we got
  537|       |         * back from SEC_QuickDERDecodeItem for defects. If no defects are
  538|       |         * found, we assume the encoded parameter was was passed to us.
  539|       |         * our defect tests include:
  540|       |         *   1) it didn't decode.
  541|       |         *   2) The decode key had an invalid length (must be odd).
  542|       |         *   3) The decoded key wasn't an UNCOMPRESSED key.
  543|       |         *   4) The decoded key didn't include the entire encoded block
  544|       |         *   except the DER encoding values. (fixing DER length to one
  545|       |         *   particular value).
  546|       |         */
  547|      0|        if ((rv != SECSuccess) || ((publicKeyValue->len & 1) != 1) ||
  ------------------
  |  Branch (547:13): [True: 0, False: 0]
  |  Branch (547:35): [True: 0, False: 0]
  ------------------
  548|      0|            (publicKeyValue->data[0] != EC_POINT_FORM_UNCOMPRESSED) ||
  ------------------
  |  |   92|      0|#define EC_POINT_FORM_UNCOMPRESSED 0x04
  ------------------
  |  Branch (548:13): [True: 0, False: 0]
  ------------------
  549|      0|            (PORT_Memcmp(&encodedPublicValue.data[encodedPublicValue.len - publicKeyValue->len],
  ------------------
  |  |  179|      0|#define PORT_Memcmp memcmp
  ------------------
  |  Branch (549:13): [True: 0, False: 0]
  ------------------
  550|      0|                         publicKeyValue->data,
  551|      0|                         publicKeyValue->len) != 0)) {
  552|       |            /* The decoded public key was flawed, the original key must have
  553|       |             * already been in decoded form. Do a quick sanity check then
  554|       |             * return the original key value.
  555|       |             */
  556|      0|            if ((encodedPublicValue.len & 1) == 0) {
  ------------------
  |  Branch (556:17): [True: 0, False: 0]
  ------------------
  557|      0|                return CKR_ATTRIBUTE_VALUE_INVALID;
  ------------------
  |  | 1409|      0|#define CKR_ATTRIBUTE_VALUE_INVALID 0x00000013UL
  ------------------
  558|      0|            }
  559|      0|            return pk11_Attr2SecItem(arena, ecPoint, publicKeyValue);
  560|      0|        }
  561|       |
  562|       |        /* as best we can figure, the passed in key was encoded, and we've
  563|       |         * now decoded it. Note: there is a chance this could be wrong if the
  564|       |         * following conditions hold:
  565|       |         *  1) The first byte or bytes of the X point looks like a valid length
  566|       |         * of precisely the right size (2*curveSize -1). this means for curves
  567|       |         * less than 512 bits (64 bytes), this will happen 1 in 256 times*.
  568|       |         * for curves between 512 and 1024, this will happen 1 in 65,536 times*
  569|       |         * for curves between 1024 and 256K this will happen 1 in 16 million*
  570|       |         *  2) The length of the 'DER length field' is odd
  571|       |         * (making both the encoded and decode
  572|       |         * values an odd length. this is true of all curves less than 512,
  573|       |         * as well as curves between 1024 and 256K).
  574|       |         *  3) The X[length of the 'DER length field'] == 0x04, 1 in 256.
  575|       |         *
  576|       |         *  (* assuming all values are equally likely in the first byte,
  577|       |         * This isn't true if the curve length is not a multiple of 8. In these
  578|       |         * cases, if the DER length is possible, it's more likely,
  579|       |         * if it's not possible, then we have no false decodes).
  580|       |         *
  581|       |         * For reference here are the odds for the various curves we currently
  582|       |         * have support for (and the only curves SSL will negotiate at this
  583|       |         * time). NOTE: None of the supported curves will show up here
  584|       |         * because we return a valid length for all of these curves.
  585|       |         * The only way to get here is to have some application (not SSL)
  586|       |         * which supports some unknown curve and have some vendor supplied
  587|       |         * PKCS #11 module support that curve. NOTE: in this case, one
  588|       |         * presumes that that pkcs #11 module is likely to be using the
  589|       |         * correct encodings.
  590|       |         *
  591|       |         * Prime Curves (GFp):
  592|       |         *   Bit    False       Odds of
  593|       |         *  Size    DER Len  False Decode Positive
  594|       |         *  112     27     1 in 65536
  595|       |         *  128     31     1 in 65536
  596|       |         *  160     39     1 in 65536
  597|       |         *  192     47     1 in 65536
  598|       |         *  224     55     1 in 65536
  599|       |         *  239     59     1 in 32768 (top byte can only be 0-127)
  600|       |         *  256     63     1 in 65536
  601|       |         *  521     129,131      0        (decoded value would be even)
  602|       |         *
  603|       |         * Binary curves (GF2m).
  604|       |         *   Bit    False       Odds of
  605|       |         *  Size    DER Len  False Decode Positive
  606|       |         *  131     33       0        (top byte can only be 0-7)
  607|       |         *  163     41       0        (top byte can only be 0-7)
  608|       |         *  176     43     1 in 65536
  609|       |         *  191     47     1 in 32768 (top byte can only be 0-127)
  610|       |         *  193     49       0        (top byte can only be 0-1)
  611|       |         *  208     51     1 in 65536
  612|       |         *  233     59       0        (top byte can only be 0-1)
  613|       |         *  239     59     1 in 32768 (top byte can only be 0-127)
  614|       |         *  272     67     1 in 65536
  615|       |         *  283     71       0        (top byte can only be 0-7)
  616|       |         *  304     75     1 in 65536
  617|       |         *  359     89     1 in 32768 (top byte can only be 0-127)
  618|       |         *  368     91     1 in 65536
  619|       |         *  409     103      0        (top byte can only be 0-1)
  620|       |         *  431     107    1 in 32768 (top byte can only be 0-127)
  621|       |         *  571     129,143      0        (decoded value would be even)
  622|       |         *
  623|       |         */
  624|       |
  625|      0|        return CKR_OK;
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  626|      0|    }
  627|       |
  628|       |    /* In theory, we should handle the case where the curve == 0 and
  629|       |     * the first byte is EC_POINT_FORM_UNCOMPRESSED, (which would be
  630|       |     * handled by doing a santity check on the key length and returning
  631|       |     * pk11_Attr2SecItem() to copy the ecPoint to the publicKeyValue).
  632|       |     *
  633|       |     * This test is unnecessary, however, due to the fact that
  634|       |     * EC_POINT_FORM_UNCOMPRESSED == SEC_ASIN1_OCTET_STRING, that case is
  635|       |     * handled in the above if. That means if we get here, the initial
  636|       |     * byte of our ecPoint value was invalid, so we can safely return.
  637|       |     * invalid attribute.
  638|       |     */
  639|       |
  640|      0|    return CKR_ATTRIBUTE_VALUE_INVALID;
  ------------------
  |  | 1409|      0|#define CKR_ATTRIBUTE_VALUE_INVALID 0x00000013UL
  ------------------
  641|    490|}
pk11akey.c:pk11_get_EC_PointLenInBytes:
  346|  8.50k|{
  347|  8.50k|    SECItem oid;
  348|  8.50k|    SECOidTag tag;
  349|  8.50k|    SECStatus rv;
  350|       |
  351|       |    /* decode the OID tag */
  352|  8.50k|    rv = SEC_QuickDERDecodeItem(arena, &oid,
  ------------------
  |  |  102|  8.50k|#define SEC_QuickDERDecodeItem SEC_QuickDERDecodeItem_Util
  ------------------
  353|  8.50k|                                SEC_ASN1_GET(SEC_ObjectIDTemplate), ecParams);
  ------------------
  |  |  188|  8.50k|#define SEC_ASN1_GET(x) x
  ------------------
  354|  8.50k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (354:9): [True: 0, False: 8.50k]
  ------------------
  355|       |        /* could be explict curves, allow them to work if the
  356|       |         * PKCS #11 module support them. If we try to parse the
  357|       |         * explicit curve value in the future, we may return -1 here
  358|       |         * to indicate an invalid parameter if the explicit curve
  359|       |         * decode fails. */
  360|      0|        return 0;
  361|      0|    }
  362|       |
  363|  8.50k|    *plain = PR_FALSE;
  ------------------
  |  |  438|  8.50k|#define PR_FALSE 0
  ------------------
  364|  8.50k|    tag = SECOID_FindOIDTag(&oid);
  ------------------
  |  |  117|  8.50k|#define SECOID_FindOIDTag SECOID_FindOIDTag_Util
  ------------------
  365|  8.50k|    switch (tag) {
  366|      0|        case SEC_OID_SECG_EC_SECP112R1:
  ------------------
  |  Branch (366:9): [True: 0, False: 8.50k]
  ------------------
  367|      0|        case SEC_OID_SECG_EC_SECP112R2:
  ------------------
  |  Branch (367:9): [True: 0, False: 8.50k]
  ------------------
  368|      0|            return 29; /* curve len in bytes = 14 bytes */
  369|      0|        case SEC_OID_SECG_EC_SECT113R1:
  ------------------
  |  Branch (369:9): [True: 0, False: 8.50k]
  ------------------
  370|      0|        case SEC_OID_SECG_EC_SECT113R2:
  ------------------
  |  Branch (370:9): [True: 0, False: 8.50k]
  ------------------
  371|      0|            return 31; /* curve len in bytes = 15 bytes */
  372|      0|        case SEC_OID_SECG_EC_SECP128R1:
  ------------------
  |  Branch (372:9): [True: 0, False: 8.50k]
  ------------------
  373|      0|        case SEC_OID_SECG_EC_SECP128R2:
  ------------------
  |  Branch (373:9): [True: 0, False: 8.50k]
  ------------------
  374|      0|            return 33; /* curve len in bytes = 16 bytes */
  375|      0|        case SEC_OID_SECG_EC_SECT131R1:
  ------------------
  |  Branch (375:9): [True: 0, False: 8.50k]
  ------------------
  376|      0|        case SEC_OID_SECG_EC_SECT131R2:
  ------------------
  |  Branch (376:9): [True: 0, False: 8.50k]
  ------------------
  377|      0|            return 35; /* curve len in bytes = 17 bytes */
  378|      0|        case SEC_OID_SECG_EC_SECP160K1:
  ------------------
  |  Branch (378:9): [True: 0, False: 8.50k]
  ------------------
  379|      0|        case SEC_OID_SECG_EC_SECP160R1:
  ------------------
  |  Branch (379:9): [True: 0, False: 8.50k]
  ------------------
  380|      0|        case SEC_OID_SECG_EC_SECP160R2:
  ------------------
  |  Branch (380:9): [True: 0, False: 8.50k]
  ------------------
  381|      0|            return 41; /* curve len in bytes = 20 bytes */
  382|      0|        case SEC_OID_SECG_EC_SECT163K1:
  ------------------
  |  Branch (382:9): [True: 0, False: 8.50k]
  ------------------
  383|      0|        case SEC_OID_SECG_EC_SECT163R1:
  ------------------
  |  Branch (383:9): [True: 0, False: 8.50k]
  ------------------
  384|      0|        case SEC_OID_SECG_EC_SECT163R2:
  ------------------
  |  Branch (384:9): [True: 0, False: 8.50k]
  ------------------
  385|      0|        case SEC_OID_ANSIX962_EC_C2PNB163V1:
  ------------------
  |  Branch (385:9): [True: 0, False: 8.50k]
  ------------------
  386|      0|        case SEC_OID_ANSIX962_EC_C2PNB163V2:
  ------------------
  |  Branch (386:9): [True: 0, False: 8.50k]
  ------------------
  387|      0|        case SEC_OID_ANSIX962_EC_C2PNB163V3:
  ------------------
  |  Branch (387:9): [True: 0, False: 8.50k]
  ------------------
  388|      0|            return 43; /* curve len in bytes = 21 bytes */
  389|      0|        case SEC_OID_ANSIX962_EC_C2PNB176V1:
  ------------------
  |  Branch (389:9): [True: 0, False: 8.50k]
  ------------------
  390|      0|            return 45; /* curve len in bytes = 22 bytes */
  391|      0|        case SEC_OID_ANSIX962_EC_C2TNB191V1:
  ------------------
  |  Branch (391:9): [True: 0, False: 8.50k]
  ------------------
  392|      0|        case SEC_OID_ANSIX962_EC_C2TNB191V2:
  ------------------
  |  Branch (392:9): [True: 0, False: 8.50k]
  ------------------
  393|      0|        case SEC_OID_ANSIX962_EC_C2TNB191V3:
  ------------------
  |  Branch (393:9): [True: 0, False: 8.50k]
  ------------------
  394|      0|        case SEC_OID_SECG_EC_SECP192K1:
  ------------------
  |  Branch (394:9): [True: 0, False: 8.50k]
  ------------------
  395|      0|        case SEC_OID_ANSIX962_EC_PRIME192V1:
  ------------------
  |  Branch (395:9): [True: 0, False: 8.50k]
  ------------------
  396|      0|        case SEC_OID_ANSIX962_EC_PRIME192V2:
  ------------------
  |  Branch (396:9): [True: 0, False: 8.50k]
  ------------------
  397|      0|        case SEC_OID_ANSIX962_EC_PRIME192V3:
  ------------------
  |  Branch (397:9): [True: 0, False: 8.50k]
  ------------------
  398|      0|            return 49; /*curve len in bytes = 24 bytes */
  399|      0|        case SEC_OID_SECG_EC_SECT193R1:
  ------------------
  |  Branch (399:9): [True: 0, False: 8.50k]
  ------------------
  400|      0|        case SEC_OID_SECG_EC_SECT193R2:
  ------------------
  |  Branch (400:9): [True: 0, False: 8.50k]
  ------------------
  401|      0|            return 51; /*curve len in bytes = 25 bytes */
  402|      0|        case SEC_OID_ANSIX962_EC_C2PNB208W1:
  ------------------
  |  Branch (402:9): [True: 0, False: 8.50k]
  ------------------
  403|      0|            return 53; /*curve len in bytes = 26 bytes */
  404|      0|        case SEC_OID_SECG_EC_SECP224K1:
  ------------------
  |  Branch (404:9): [True: 0, False: 8.50k]
  ------------------
  405|      0|        case SEC_OID_SECG_EC_SECP224R1:
  ------------------
  |  Branch (405:9): [True: 0, False: 8.50k]
  ------------------
  406|      0|            return 57; /*curve len in bytes = 28 bytes */
  407|      0|        case SEC_OID_SECG_EC_SECT233K1:
  ------------------
  |  Branch (407:9): [True: 0, False: 8.50k]
  ------------------
  408|      0|        case SEC_OID_SECG_EC_SECT233R1:
  ------------------
  |  Branch (408:9): [True: 0, False: 8.50k]
  ------------------
  409|      0|        case SEC_OID_SECG_EC_SECT239K1:
  ------------------
  |  Branch (409:9): [True: 0, False: 8.50k]
  ------------------
  410|      0|        case SEC_OID_ANSIX962_EC_PRIME239V1:
  ------------------
  |  Branch (410:9): [True: 0, False: 8.50k]
  ------------------
  411|      0|        case SEC_OID_ANSIX962_EC_PRIME239V2:
  ------------------
  |  Branch (411:9): [True: 0, False: 8.50k]
  ------------------
  412|      0|        case SEC_OID_ANSIX962_EC_PRIME239V3:
  ------------------
  |  Branch (412:9): [True: 0, False: 8.50k]
  ------------------
  413|      0|        case SEC_OID_ANSIX962_EC_C2TNB239V1:
  ------------------
  |  Branch (413:9): [True: 0, False: 8.50k]
  ------------------
  414|      0|        case SEC_OID_ANSIX962_EC_C2TNB239V2:
  ------------------
  |  Branch (414:9): [True: 0, False: 8.50k]
  ------------------
  415|      0|        case SEC_OID_ANSIX962_EC_C2TNB239V3:
  ------------------
  |  Branch (415:9): [True: 0, False: 8.50k]
  ------------------
  416|      0|            return 61; /*curve len in bytes = 30 bytes */
  417|    396|        case SEC_OID_ANSIX962_EC_PRIME256V1:
  ------------------
  |  Branch (417:9): [True: 396, False: 8.10k]
  ------------------
  418|    396|        case SEC_OID_SECG_EC_SECP256K1:
  ------------------
  |  Branch (418:9): [True: 0, False: 8.50k]
  ------------------
  419|    396|            return 65; /*curve len in bytes = 32 bytes */
  420|      0|        case SEC_OID_ANSIX962_EC_C2PNB272W1:
  ------------------
  |  Branch (420:9): [True: 0, False: 8.50k]
  ------------------
  421|      0|            return 69; /*curve len in bytes = 34 bytes */
  422|      0|        case SEC_OID_SECG_EC_SECT283K1:
  ------------------
  |  Branch (422:9): [True: 0, False: 8.50k]
  ------------------
  423|      0|        case SEC_OID_SECG_EC_SECT283R1:
  ------------------
  |  Branch (423:9): [True: 0, False: 8.50k]
  ------------------
  424|      0|            return 73; /*curve len in bytes = 36 bytes */
  425|      0|        case SEC_OID_ANSIX962_EC_C2PNB304W1:
  ------------------
  |  Branch (425:9): [True: 0, False: 8.50k]
  ------------------
  426|      0|            return 77; /*curve len in bytes = 38 bytes */
  427|      0|        case SEC_OID_ANSIX962_EC_C2TNB359V1:
  ------------------
  |  Branch (427:9): [True: 0, False: 8.50k]
  ------------------
  428|      0|            return 91; /*curve len in bytes = 45 bytes */
  429|      0|        case SEC_OID_ANSIX962_EC_C2PNB368W1:
  ------------------
  |  Branch (429:9): [True: 0, False: 8.50k]
  ------------------
  430|      0|            return 93; /*curve len in bytes = 46 bytes */
  431|     54|        case SEC_OID_SECG_EC_SECP384R1:
  ------------------
  |  Branch (431:9): [True: 54, False: 8.44k]
  ------------------
  432|     54|            return 97; /*curve len in bytes = 48 bytes */
  433|      0|        case SEC_OID_SECG_EC_SECT409K1:
  ------------------
  |  Branch (433:9): [True: 0, False: 8.50k]
  ------------------
  434|      0|        case SEC_OID_SECG_EC_SECT409R1:
  ------------------
  |  Branch (434:9): [True: 0, False: 8.50k]
  ------------------
  435|      0|            return 105; /*curve len in bytes = 52 bytes */
  436|      0|        case SEC_OID_ANSIX962_EC_C2TNB431R1:
  ------------------
  |  Branch (436:9): [True: 0, False: 8.50k]
  ------------------
  437|      0|            return 109; /*curve len in bytes = 54 bytes */
  438|     40|        case SEC_OID_SECG_EC_SECP521R1:
  ------------------
  |  Branch (438:9): [True: 40, False: 8.46k]
  ------------------
  439|     40|            return 133; /*curve len in bytes = 66 bytes */
  440|      0|        case SEC_OID_SECG_EC_SECT571K1:
  ------------------
  |  Branch (440:9): [True: 0, False: 8.50k]
  ------------------
  441|      0|        case SEC_OID_SECG_EC_SECT571R1:
  ------------------
  |  Branch (441:9): [True: 0, False: 8.50k]
  ------------------
  442|      0|            return 145; /*curve len in bytes = 72 bytes */
  443|      0|        case SEC_OID_X25519:
  ------------------
  |  Branch (443:9): [True: 0, False: 8.50k]
  ------------------
  444|  8.01k|        case SEC_OID_CURVE25519:
  ------------------
  |  Branch (444:9): [True: 8.01k, False: 490]
  ------------------
  445|  8.01k|        case SEC_OID_ED25519_PUBLIC_KEY:
  ------------------
  |  Branch (445:9): [True: 0, False: 8.50k]
  ------------------
  446|  8.01k|            *plain = PR_TRUE;
  ------------------
  |  |  437|  8.01k|#define PR_TRUE 1
  ------------------
  447|  8.01k|            return 32; /* curve len in bytes = 32 bytes (only X) */
  448|       |        /* unknown or unrecognized OIDs. return unknown length */
  449|      0|        default:
  ------------------
  |  Branch (449:9): [True: 0, False: 8.50k]
  ------------------
  450|      0|            break;
  451|  8.50k|    }
  452|      0|    return 0;
  453|  8.50k|}

pk11_LoginStillRequired:
  311|  7.76k|{
  312|  7.76k|    return slot->needLogin && !PK11_IsLoggedIn(slot, wincx);
  ------------------
  |  Branch (312:12): [True: 0, False: 7.76k]
  |  Branch (312:31): [True: 0, False: 0]
  ------------------
  313|  7.76k|}

PK11_EnterContextMonitor:
   36|   355k|{
   37|       |    /* if we own the session and our slot is ThreadSafe, only monitor
   38|       |     * the Context */
   39|   355k|    if ((cx->ownSession) && (cx->slot->isThreadSafe)) {
  ------------------
  |  Branch (39:9): [True: 355k, False: 0]
  |  Branch (39:29): [True: 355k, False: 0]
  ------------------
   40|       |        /* Should this use monitors instead? */
   41|   355k|        PZ_Lock(cx->sessionLock);
  ------------------
  |  |  245|   355k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
   42|   355k|    } else {
   43|      0|        PK11_EnterSlotMonitor(cx->slot);
   44|      0|    }
   45|   355k|}
PK11_ExitContextMonitor:
   49|   355k|{
   50|       |    /* if we own the session and our slot is ThreadSafe, only monitor
   51|       |     * the Context */
   52|   355k|    if ((cx->ownSession) && (cx->slot->isThreadSafe)) {
  ------------------
  |  Branch (52:9): [True: 355k, False: 0]
  |  Branch (52:29): [True: 355k, False: 0]
  ------------------
   53|       |        /* Should this use monitors instead? */
   54|   355k|        PZ_Unlock(cx->sessionLock);
  ------------------
  |  |  246|   355k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
   55|   355k|    } else {
   56|      0|        PK11_ExitSlotMonitor(cx->slot);
   57|      0|    }
   58|   355k|}
PK11_DestroyContext:
   65|  49.2k|{
   66|  49.2k|    pk11_CloseSession(context->slot, context->session, context->ownSession);
   67|       |    /* initialize the critical fields of the context */
   68|  49.2k|    if (context->savedData != NULL)
  ------------------
  |  Branch (68:9): [True: 0, False: 49.2k]
  ------------------
   69|      0|        PORT_Free(context->savedData);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
   70|  49.2k|    if (context->key)
  ------------------
  |  Branch (70:9): [True: 12.8k, False: 36.3k]
  ------------------
   71|  12.8k|        PK11_FreeSymKey(context->key);
   72|  49.2k|    if (context->param && context->param != &pk11_null_params)
  ------------------
  |  Branch (72:9): [True: 49.2k, False: 0]
  |  Branch (72:27): [True: 6.52k, False: 42.7k]
  ------------------
   73|  6.52k|        SECITEM_FreeItem(context->param, PR_TRUE);
  ------------------
  |  |  108|  6.52k|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                      SECITEM_FreeItem(context->param, PR_TRUE);
  ------------------
  |  |  437|  6.52k|#define PR_TRUE 1
  ------------------
   74|  49.2k|    if (context->sessionLock)
  ------------------
  |  Branch (74:9): [True: 49.2k, False: 0]
  ------------------
   75|  49.2k|        PZ_DestroyLock(context->sessionLock);
  ------------------
  |  |  244|  49.2k|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
   76|  49.2k|    PK11_FreeSlot(context->slot);
   77|  49.2k|    if (freeit)
  ------------------
  |  Branch (77:9): [True: 49.2k, False: 0]
  ------------------
   78|  49.2k|        PORT_Free(context);
  ------------------
  |  |   60|  49.2k|#define PORT_Free PORT_Free_Util
  ------------------
   79|  49.2k|}
pk11_saveContext:
  116|  2.86k|{
  117|  2.86k|    return pk11_saveContextHelper(context,
  118|  2.86k|                                  (unsigned char *)space, savedLength);
  119|  2.86k|}
pk11_restoreContext:
  126|  3.00k|{
  127|  3.00k|    CK_RV crv;
  128|  3.00k|    CK_OBJECT_HANDLE objectID = context->objectID;
  129|       |
  130|  3.00k|    PORT_Assert(space != NULL);
  ------------------
  |  |  120|  3.00k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  3.00k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 3.00k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  131|  3.00k|    if (space == NULL) {
  ------------------
  |  Branch (131:9): [True: 0, False: 3.00k]
  ------------------
  132|      0|        PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  133|      0|        return SECFailure;
  134|      0|    }
  135|  3.00k|    crv = PK11_GETTAB(context->slot)->C_SetOperationState(context->session, (CK_BYTE_PTR)space, savedLength, objectID, 0);
  ------------------
  |  |  102|  3.00k|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
  136|  3.00k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  3.00k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (136:9): [True: 0, False: 3.00k]
  ------------------
  137|      0|        PORT_SetError(PK11_MapError(crv));
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  138|      0|        return SECFailure;
  139|      0|    }
  140|  3.00k|    return SECSuccess;
  141|  3.00k|}
PK11_CreateContextBySymKey:
  495|  12.8k|{
  496|  12.8k|    PK11SymKey *newKey;
  497|  12.8k|    PK11Context *context;
  498|       |
  499|       |    /* if this slot doesn't support the mechanism, go to a slot that does */
  500|  12.8k|    newKey = pk11_ForceSlot(symKey, type, operation);
  501|  12.8k|    if (newKey == NULL) {
  ------------------
  |  Branch (501:9): [True: 12.8k, False: 0]
  ------------------
  502|  12.8k|        PK11_ReferenceSymKey(symKey);
  503|  12.8k|    } else {
  504|      0|        symKey = newKey;
  505|      0|    }
  506|       |
  507|       |    /* Context keeps its reference to the symKey, so it's safe to
  508|       |     * free our reference we we are through, even though we may have
  509|       |     * created the key using pk11_ForceSlot. */
  510|  12.8k|    context = pk11_CreateNewContextInSlot(type, symKey->slot, operation, symKey,
  511|  12.8k|                                          symKey->objectID, param, symKey->cx);
  512|  12.8k|    PK11_FreeSymKey(symKey);
  513|  12.8k|    return context;
  514|  12.8k|}
PK11_CreateDigestContext:
  579|  33.5k|{
  580|       |    /* digesting has to work without authentication to the slot */
  581|  33.5k|    CK_MECHANISM_TYPE type;
  582|  33.5k|    PK11SlotInfo *slot;
  583|  33.5k|    PK11Context *context;
  584|  33.5k|    SECItem param;
  585|       |
  586|  33.5k|    type = PK11_AlgtagToMechanism(hashAlg);
  587|  33.5k|    slot = PK11_GetBestSlot(type, NULL);
  588|  33.5k|    if (slot == NULL) {
  ------------------
  |  Branch (588:9): [True: 0, False: 33.5k]
  ------------------
  589|      0|        PORT_SetError(SEC_ERROR_NO_MODULE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  590|      0|        return NULL;
  591|      0|    }
  592|       |
  593|       |    /* maybe should really be PK11_GenerateNewParam?? */
  594|  33.5k|    param.data = NULL;
  595|  33.5k|    param.len = 0;
  596|  33.5k|    param.type = 0;
  597|       |
  598|  33.5k|    context = pk11_CreateNewContextInSlot(type, slot, CKA_DIGEST, NULL,
  ------------------
  |  |   68|  33.5k|#define CKA_DIGEST 0x81000000L
  ------------------
  599|  33.5k|                                          CK_INVALID_HANDLE, &param, NULL);
  ------------------
  |  |   78|  33.5k|#define CK_INVALID_HANDLE 0
  ------------------
  600|  33.5k|    PK11_FreeSlot(slot);
  601|  33.5k|    return context;
  602|  33.5k|}
PK11_CloneContext:
  609|  2.86k|{
  610|  2.86k|    PK11Context *newcx;
  611|  2.86k|    PRBool needFree = PR_FALSE;
  ------------------
  |  |  438|  2.86k|#define PR_FALSE 0
  ------------------
  612|  2.86k|    SECStatus rv = SECSuccess;
  613|  2.86k|    void *data;
  614|  2.86k|    unsigned long len;
  615|       |
  616|  2.86k|    newcx = pk11_CreateNewContextInSlot(old->type, old->slot, old->operation,
  617|  2.86k|                                        old->key, old->objectID, old->param,
  618|  2.86k|                                        old->pwArg);
  619|  2.86k|    if (newcx == NULL)
  ------------------
  |  Branch (619:9): [True: 0, False: 2.86k]
  ------------------
  620|      0|        return NULL;
  621|       |
  622|       |    /* now clone the save state. First we need to find the save state
  623|       |     * of the old session. If the old context owns it's session,
  624|       |     * the state needs to be saved, otherwise the state is in saveData. */
  625|  2.86k|    if (old->ownSession) {
  ------------------
  |  Branch (625:9): [True: 2.86k, False: 0]
  ------------------
  626|  2.86k|        PK11_EnterContextMonitor(old);
  627|  2.86k|        data = pk11_saveContext(old, NULL, &len);
  628|  2.86k|        PK11_ExitContextMonitor(old);
  629|  2.86k|        needFree = PR_TRUE;
  ------------------
  |  |  437|  2.86k|#define PR_TRUE 1
  ------------------
  630|  2.86k|    } else {
  631|      0|        data = old->savedData;
  632|      0|        len = old->savedLength;
  633|      0|    }
  634|       |
  635|  2.86k|    if (data == NULL) {
  ------------------
  |  Branch (635:9): [True: 0, False: 2.86k]
  ------------------
  636|      0|        PK11_DestroyContext(newcx, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  637|      0|        return NULL;
  638|      0|    }
  639|       |
  640|       |    /* now copy that state into our new context. Again we have different
  641|       |     * work if the new context owns it's own session. If it does, we
  642|       |     * restore the state gathered above. If it doesn't, we copy the
  643|       |     * saveData pointer... */
  644|  2.86k|    if (newcx->ownSession) {
  ------------------
  |  Branch (644:9): [True: 2.86k, False: 0]
  ------------------
  645|  2.86k|        PK11_EnterContextMonitor(newcx);
  646|  2.86k|        rv = pk11_restoreContext(newcx, data, len);
  647|  2.86k|        PK11_ExitContextMonitor(newcx);
  648|  2.86k|    } else {
  649|      0|        PORT_Assert(newcx->savedData != NULL);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  650|      0|        if ((newcx->savedData == NULL) || (newcx->savedLength < len)) {
  ------------------
  |  Branch (650:13): [True: 0, False: 0]
  |  Branch (650:43): [True: 0, False: 0]
  ------------------
  651|      0|            PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  652|      0|            rv = SECFailure;
  653|      0|        } else {
  654|      0|            PORT_Memcpy(newcx->savedData, data, len);
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
  655|      0|            newcx->savedLength = len;
  656|      0|        }
  657|      0|    }
  658|       |
  659|  2.86k|    if (needFree)
  ------------------
  |  Branch (659:9): [True: 2.86k, False: 0]
  ------------------
  660|  2.86k|        PORT_Free(data);
  ------------------
  |  |   60|  2.86k|#define PORT_Free PORT_Free_Util
  ------------------
  661|       |
  662|  2.86k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (662:9): [True: 0, False: 2.86k]
  ------------------
  663|      0|        PK11_DestroyContext(newcx, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  664|      0|        return NULL;
  665|      0|    }
  666|  2.86k|    return newcx;
  667|  2.86k|}
PK11_SaveContextAlloc:
  707|    134|{
  708|    134|    unsigned char *stateBuf = NULL;
  709|    134|    unsigned long length = (unsigned long)pabLen;
  710|       |
  711|    134|    if (cx->ownSession) {
  ------------------
  |  Branch (711:9): [True: 134, False: 0]
  ------------------
  712|    134|        PK11_EnterContextMonitor(cx);
  713|    134|        stateBuf = pk11_saveContextHelper(cx, preAllocBuf, &length);
  714|    134|        PK11_ExitContextMonitor(cx);
  715|    134|        *stateLen = (stateBuf != NULL) ? length : 0;
  ------------------
  |  Branch (715:21): [True: 134, False: 0]
  ------------------
  716|    134|    } else {
  717|      0|        if (pabLen < cx->savedLength) {
  ------------------
  |  Branch (717:13): [True: 0, False: 0]
  ------------------
  718|      0|            stateBuf = (unsigned char *)PORT_Alloc(cx->savedLength);
  ------------------
  |  |   52|      0|#define PORT_Alloc PORT_Alloc_Util
  ------------------
  719|      0|            if (!stateBuf) {
  ------------------
  |  Branch (719:17): [True: 0, False: 0]
  ------------------
  720|      0|                return (unsigned char *)NULL;
  721|      0|            }
  722|      0|        } else {
  723|      0|            stateBuf = preAllocBuf;
  724|      0|        }
  725|      0|        if (cx->savedData) {
  ------------------
  |  Branch (725:13): [True: 0, False: 0]
  ------------------
  726|      0|            PORT_Memcpy(stateBuf, cx->savedData, cx->savedLength);
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
  727|      0|        }
  728|      0|        *stateLen = cx->savedLength;
  729|      0|    }
  730|    134|    return stateBuf;
  731|    134|}
PK11_RestoreContext:
  739|    134|{
  740|    134|    SECStatus rv = SECSuccess;
  741|    134|    if (cx->ownSession) {
  ------------------
  |  Branch (741:9): [True: 134, False: 0]
  ------------------
  742|    134|        PK11_EnterContextMonitor(cx);
  743|    134|        pk11_Finalize(cx);
  744|    134|        rv = pk11_restoreContext(cx, save, len);
  745|    134|        PK11_ExitContextMonitor(cx);
  746|    134|    } else {
  747|      0|        PORT_Assert(cx->savedData != NULL);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  748|      0|        if ((cx->savedData == NULL) || (cx->savedLength < (unsigned)len)) {
  ------------------
  |  Branch (748:13): [True: 0, False: 0]
  |  Branch (748:40): [True: 0, False: 0]
  ------------------
  749|      0|            PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  750|      0|            rv = SECFailure;
  751|      0|        } else {
  752|      0|            PORT_Memcpy(cx->savedData, save, len);
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
  753|      0|            cx->savedLength = len;
  754|      0|        }
  755|      0|    }
  756|    134|    return rv;
  757|    134|}
PK11_DigestBegin:
  781|  78.2k|{
  782|  78.2k|    CK_MECHANISM mech_info;
  783|  78.2k|    SECStatus rv;
  784|       |
  785|  78.2k|    if (cx->init == PR_TRUE) {
  ------------------
  |  |  437|  78.2k|#define PR_TRUE 1
  ------------------
  |  Branch (785:9): [True: 41.3k, False: 36.8k]
  ------------------
  786|  41.3k|        return SECSuccess;
  787|  41.3k|    }
  788|       |
  789|       |    /*
  790|       |     * make sure the old context is clear first
  791|       |     */
  792|  36.8k|    PK11_EnterContextMonitor(cx);
  793|  36.8k|    pk11_Finalize(cx);
  794|  36.8k|    PK11_ExitContextMonitor(cx);
  795|       |
  796|  36.8k|    mech_info.mechanism = cx->type;
  797|  36.8k|    mech_info.pParameter = cx->param->data;
  798|  36.8k|    mech_info.ulParameterLen = cx->param->len;
  799|  36.8k|    rv = pk11_context_init(cx, &mech_info);
  800|       |
  801|  36.8k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (801:9): [True: 0, False: 36.8k]
  ------------------
  802|      0|        return SECFailure;
  803|      0|    }
  804|  36.8k|    cx->init = PR_TRUE;
  ------------------
  |  |  437|  36.8k|#define PR_TRUE 1
  ------------------
  805|  36.8k|    return SECSuccess;
  806|  36.8k|}
PK11_HashBuf:
  811|  15.7k|{
  812|  15.7k|    PK11Context *context;
  813|  15.7k|    unsigned int max_length;
  814|  15.7k|    unsigned int out_length;
  815|  15.7k|    SECStatus rv;
  816|       |
  817|       |    /* len will be passed to PK11_DigestOp as unsigned. */
  818|  15.7k|    if (len < 0) {
  ------------------
  |  Branch (818:9): [True: 0, False: 15.7k]
  ------------------
  819|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  820|      0|        return SECFailure;
  821|      0|    }
  822|       |
  823|  15.7k|    context = PK11_CreateDigestContext(hashAlg);
  824|  15.7k|    if (context == NULL)
  ------------------
  |  Branch (824:9): [True: 0, False: 15.7k]
  ------------------
  825|      0|        return SECFailure;
  826|       |
  827|  15.7k|    rv = PK11_DigestBegin(context);
  828|  15.7k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (828:9): [True: 0, False: 15.7k]
  ------------------
  829|      0|        PK11_DestroyContext(context, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  830|      0|        return rv;
  831|      0|    }
  832|       |
  833|  15.7k|    rv = PK11_DigestOp(context, in, len);
  834|  15.7k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (834:9): [True: 0, False: 15.7k]
  ------------------
  835|      0|        PK11_DestroyContext(context, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  836|      0|        return rv;
  837|      0|    }
  838|       |
  839|       |    /* XXX This really should have been an argument to this function! */
  840|  15.7k|    max_length = HASH_ResultLenByOidTag(hashAlg);
  841|  15.7k|    PORT_Assert(max_length);
  ------------------
  |  |  120|  15.7k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  15.7k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 15.7k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  842|  15.7k|    if (!max_length)
  ------------------
  |  Branch (842:9): [True: 0, False: 15.7k]
  ------------------
  843|      0|        max_length = HASH_LENGTH_MAX;
  ------------------
  |  |   48|      0|#define HASH_LENGTH_MAX SHA512_LENGTH
  |  |  ------------------
  |  |  |  |   43|      0|#define SHA512_LENGTH 64
  |  |  ------------------
  ------------------
  844|       |
  845|  15.7k|    rv = PK11_DigestFinal(context, out, &out_length, max_length);
  846|  15.7k|    PK11_DestroyContext(context, PR_TRUE);
  ------------------
  |  |  437|  15.7k|#define PR_TRUE 1
  ------------------
  847|  15.7k|    return rv;
  848|  15.7k|}
PK11_CipherOp:
  856|  20.1k|{
  857|  20.1k|    CK_RV crv = CKR_OK;
  ------------------
  |  | 1388|  20.1k|#define CKR_OK 0x00000000UL
  ------------------
  858|  20.1k|    CK_ULONG length = maxout;
  859|  20.1k|    CK_ULONG offset = 0;
  860|  20.1k|    SECStatus rv = SECSuccess;
  861|  20.1k|    unsigned char *saveOut = out;
  862|  20.1k|    unsigned char *allocOut = NULL;
  863|       |
  864|       |    /* if we ran out of session, we need to restore our previously stored
  865|       |     * state.
  866|       |     */
  867|  20.1k|    PK11_EnterContextMonitor(context);
  868|  20.1k|    if (!context->ownSession) {
  ------------------
  |  Branch (868:9): [True: 0, False: 20.1k]
  ------------------
  869|      0|        rv = pk11_restoreContext(context, context->savedData,
  870|      0|                                 context->savedLength);
  871|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (871:13): [True: 0, False: 0]
  ------------------
  872|      0|            PK11_ExitContextMonitor(context);
  873|      0|            return rv;
  874|      0|        }
  875|      0|    }
  876|       |
  877|       |    /*
  878|       |     * The fortezza hack is to send 8 extra bytes on the first encrypted and
  879|       |     * lose them on the first decrypt.
  880|       |     */
  881|  20.1k|    if (context->fortezzaHack) {
  ------------------
  |  Branch (881:9): [True: 0, False: 20.1k]
  ------------------
  882|      0|        unsigned char random[8];
  883|      0|        if (context->operation == CKA_ENCRYPT) {
  ------------------
  |  |  547|      0|#define CKA_ENCRYPT 0x00000104UL
  ------------------
  |  Branch (883:13): [True: 0, False: 0]
  ------------------
  884|      0|            PK11_ExitContextMonitor(context);
  885|      0|            rv = PK11_GenerateRandom(random, sizeof(random));
  886|      0|            PK11_EnterContextMonitor(context);
  887|       |
  888|       |            /* since we are offseting the output, we can't encrypt back into
  889|       |             * the same buffer... allocate a temporary buffer just for this
  890|       |             * call. */
  891|      0|            allocOut = out = (unsigned char *)PORT_Alloc(maxout);
  ------------------
  |  |   52|      0|#define PORT_Alloc PORT_Alloc_Util
  ------------------
  892|      0|            if (out == NULL) {
  ------------------
  |  Branch (892:17): [True: 0, False: 0]
  ------------------
  893|      0|                PK11_ExitContextMonitor(context);
  894|      0|                return SECFailure;
  895|      0|            }
  896|      0|            crv = PK11_GETTAB(context->slot)->C_EncryptUpdate(context->session, random, sizeof(random), out, &length);
  ------------------
  |  |  102|      0|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
  897|       |
  898|      0|            out += length;
  899|      0|            maxout -= length;
  900|      0|            offset = length;
  901|      0|        } else if (context->operation == CKA_DECRYPT) {
  ------------------
  |  |  548|      0|#define CKA_DECRYPT 0x00000105UL
  ------------------
  |  Branch (901:20): [True: 0, False: 0]
  ------------------
  902|      0|            length = sizeof(random);
  903|      0|            crv = PK11_GETTAB(context->slot)->C_DecryptUpdate(context->session, (CK_BYTE_PTR)in, sizeof(random), random, &length);
  ------------------
  |  |  102|      0|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
  904|      0|            inlen -= length;
  905|      0|            in += length;
  906|      0|            context->fortezzaHack = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  907|      0|        }
  908|      0|    }
  909|       |
  910|  20.1k|    switch (context->operation) {
  911|  1.95k|        case CKA_ENCRYPT:
  ------------------
  |  |  547|  1.95k|#define CKA_ENCRYPT 0x00000104UL
  ------------------
  |  Branch (911:9): [True: 1.95k, False: 18.2k]
  ------------------
  912|  1.95k|            length = maxout;
  913|  1.95k|            crv = PK11_GETTAB(context->slot)->C_EncryptUpdate(context->session, (CK_BYTE_PTR)in, inlen, out, &length);
  ------------------
  |  |  102|  1.95k|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
  914|  1.95k|            length += offset;
  915|  1.95k|            break;
  916|  18.2k|        case CKA_DECRYPT:
  ------------------
  |  |  548|  18.2k|#define CKA_DECRYPT 0x00000105UL
  ------------------
  |  Branch (916:9): [True: 18.2k, False: 1.95k]
  ------------------
  917|  18.2k|            length = maxout;
  918|  18.2k|            crv = PK11_GETTAB(context->slot)->C_DecryptUpdate(context->session, (CK_BYTE_PTR)in, inlen, out, &length);
  ------------------
  |  |  102|  18.2k|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
  919|  18.2k|            break;
  920|      0|        default:
  ------------------
  |  Branch (920:9): [True: 0, False: 20.1k]
  ------------------
  921|      0|            crv = CKR_OPERATION_NOT_INITIALIZED;
  ------------------
  |  | 1454|      0|#define CKR_OPERATION_NOT_INITIALIZED 0x00000091UL
  ------------------
  922|      0|            break;
  923|  20.1k|    }
  924|       |
  925|  20.1k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  20.1k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (925:9): [True: 0, False: 20.1k]
  ------------------
  926|      0|        PORT_SetError(PK11_MapError(crv));
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  927|      0|        *outlen = 0;
  928|      0|        rv = SECFailure;
  929|  20.1k|    } else {
  930|  20.1k|        *outlen = length;
  931|  20.1k|    }
  932|       |
  933|  20.1k|    if (context->fortezzaHack) {
  ------------------
  |  Branch (933:9): [True: 0, False: 20.1k]
  ------------------
  934|      0|        if (context->operation == CKA_ENCRYPT) {
  ------------------
  |  |  547|      0|#define CKA_ENCRYPT 0x00000104UL
  ------------------
  |  Branch (934:13): [True: 0, False: 0]
  ------------------
  935|      0|            PORT_Assert(allocOut);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  936|      0|            PORT_Memcpy(saveOut, allocOut, length);
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
  937|      0|            PORT_Free(allocOut);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
  938|      0|        }
  939|      0|        context->fortezzaHack = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  940|      0|    }
  941|       |
  942|       |    /*
  943|       |     * handle session starvation case.. use our last session to multiplex
  944|       |     */
  945|  20.1k|    if (!context->ownSession) {
  ------------------
  |  Branch (945:9): [True: 0, False: 20.1k]
  ------------------
  946|      0|        context->savedData = pk11_saveContext(context, context->savedData,
  947|      0|                                              &context->savedLength);
  948|      0|        if (context->savedData == NULL)
  ------------------
  |  Branch (948:13): [True: 0, False: 0]
  ------------------
  949|      0|            rv = SECFailure;
  950|       |
  951|       |        /* clear out out session for others to use */
  952|      0|        pk11_Finalize(context);
  953|      0|    }
  954|  20.1k|    PK11_ExitContextMonitor(context);
  955|  20.1k|    return rv;
  956|  20.1k|}
PK11_AEADOp:
 1340|  11.2k|{
 1341|  11.2k|    CK_GCM_MESSAGE_PARAMS gcm_message;
 1342|  11.2k|    CK_CCM_MESSAGE_PARAMS ccm_message;
 1343|  11.2k|    CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS chacha_poly_message;
 1344|  11.2k|    void *params;
 1345|  11.2k|    int paramslen;
 1346|  11.2k|    SECStatus rv;
 1347|       |
 1348|  11.2k|    switch (context->simulate_mechanism) {
 1349|  4.84k|        case CKM_CHACHA20_POLY1305:
  ------------------
  |  | 1287|  4.84k|#define CKM_CHACHA20_POLY1305 0x00004021UL
  ------------------
  |  Branch (1349:9): [True: 4.84k, False: 6.38k]
  ------------------
 1350|  4.84k|        case CKM_SALSA20_POLY1305:
  ------------------
  |  | 1288|  4.84k|#define CKM_SALSA20_POLY1305 0x00004022UL
  ------------------
  |  Branch (1350:9): [True: 0, False: 11.2k]
  ------------------
 1351|  4.84k|        case CKM_NSS_CHACHA20_POLY1305:
  ------------------
  |  |  243|  4.84k|#define CKM_NSS_CHACHA20_POLY1305 (CKM_NSS + 28)
  |  |  ------------------
  |  |  |  |  162|  4.84k|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|  4.84k|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  4.84k|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1351:9): [True: 0, False: 11.2k]
  ------------------
 1352|  4.84k|            chacha_poly_message.pNonce = iv;
 1353|  4.84k|            chacha_poly_message.ulNonceLen = ivlen;
 1354|  4.84k|            chacha_poly_message.pTag = tag;
 1355|  4.84k|            params = &chacha_poly_message;
 1356|  4.84k|            paramslen = sizeof(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS);
 1357|       |            /* SALSA20_POLY1305 and CHACHA20_POLY1305 do not generate the iv
 1358|       |             * internally, Do it here. */
 1359|  4.84k|            if (context->operation == (CKA_NSS_MESSAGE | CKA_ENCRYPT)) {
  ------------------
  |  |   69|  4.84k|#define CKA_NSS_MESSAGE 0x82000000L
  ------------------
                          if (context->operation == (CKA_NSS_MESSAGE | CKA_ENCRYPT)) {
  ------------------
  |  |  547|  4.84k|#define CKA_ENCRYPT 0x00000104UL
  ------------------
  |  Branch (1359:17): [True: 4, False: 4.84k]
  ------------------
 1360|       |                /* simulate generating the IV */
 1361|      4|                rv = pk11_GenerateIV(context, ivgen, fixedbits, iv, ivlen);
 1362|      4|                if (rv != SECSuccess) {
  ------------------
  |  Branch (1362:21): [True: 0, False: 4]
  ------------------
 1363|      0|                    return rv;
 1364|      0|                }
 1365|      4|            }
 1366|  4.84k|            break;
 1367|  6.38k|        case CKM_AES_GCM:
  ------------------
  |  | 1115|  6.38k|#define CKM_AES_GCM 0x00001087UL
  ------------------
  |  Branch (1367:9): [True: 6.38k, False: 4.84k]
  ------------------
 1368|  6.38k|            gcm_message.pIv = iv;
 1369|  6.38k|            gcm_message.ulIvLen = ivlen;
 1370|  6.38k|            gcm_message.ivGenerator = ivgen;
 1371|  6.38k|            gcm_message.ulIvFixedBits = fixedbits;
 1372|  6.38k|            gcm_message.pTag = tag;
 1373|  6.38k|            gcm_message.ulTagBits = taglen * 8;
 1374|  6.38k|            params = &gcm_message;
 1375|  6.38k|            paramslen = sizeof(CK_GCM_MESSAGE_PARAMS);
 1376|       |            /* GCM generates IV internally */
 1377|  6.38k|            break;
 1378|      0|        case CKM_AES_CCM:
  ------------------
  |  | 1116|      0|#define CKM_AES_CCM 0x00001088UL
  ------------------
  |  Branch (1378:9): [True: 0, False: 11.2k]
  ------------------
 1379|      0|            ccm_message.ulDataLen = inlen;
 1380|      0|            ccm_message.pNonce = iv;
 1381|      0|            ccm_message.ulNonceLen = ivlen;
 1382|      0|            ccm_message.nonceGenerator = ivgen;
 1383|      0|            ccm_message.ulNonceFixedBits = fixedbits;
 1384|      0|            ccm_message.pMAC = tag;
 1385|      0|            ccm_message.ulMACLen = taglen;
 1386|      0|            params = &ccm_message;
 1387|      0|            paramslen = sizeof(CK_GCM_MESSAGE_PARAMS);
 1388|       |            /* CCM generates IV internally */
 1389|      0|            break;
 1390|       |
 1391|      0|        default:
  ------------------
  |  Branch (1391:9): [True: 0, False: 11.2k]
  ------------------
 1392|      0|            PORT_SetError(SEC_ERROR_INVALID_ALGORITHM);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1393|      0|            return SECFailure;
 1394|  11.2k|    }
 1395|  11.2k|    return PK11_AEADRawOp(context, params, paramslen, aad, aadlen, out, outlen,
 1396|  11.2k|                          maxout, in, inlen);
 1397|  11.2k|}
PK11_AEADRawOp:
 1408|  11.2k|{
 1409|  11.2k|    CK_RV crv = CKR_OK;
  ------------------
  |  | 1388|  11.2k|#define CKR_OK 0x00000000UL
  ------------------
 1410|  11.2k|    CK_ULONG length = maxout;
 1411|  11.2k|    SECStatus rv = SECSuccess;
 1412|       |
 1413|  11.2k|    PORT_Assert(outlen != NULL);
  ------------------
  |  |  120|  11.2k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  11.2k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 11.2k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1414|  11.2k|    *outlen = 0;
 1415|  11.2k|    if (((context->operation) & CKA_NSS_MESSAGE_MASK) != CKA_NSS_MESSAGE) {
  ------------------
  |  |   70|  11.2k|#define CKA_NSS_MESSAGE_MASK 0xff000000L
  ------------------
                  if (((context->operation) & CKA_NSS_MESSAGE_MASK) != CKA_NSS_MESSAGE) {
  ------------------
  |  |   69|  11.2k|#define CKA_NSS_MESSAGE 0x82000000L
  ------------------
  |  Branch (1415:9): [True: 0, False: 11.2k]
  ------------------
 1416|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1417|      0|        return SECFailure;
 1418|      0|    }
 1419|       |
 1420|       |    /*
 1421|       |     * The PKCS 11 module does not support the message interface, fall
 1422|       |     * back to using single shot operation */
 1423|  11.2k|    if (context->simulate_message) {
  ------------------
  |  Branch (1423:9): [True: 0, False: 11.2k]
  ------------------
 1424|      0|        return pk11_AEADSimulateOp(context, params, paramslen, aad, aadlen,
 1425|      0|                                   out, outlen, maxout, in, inlen);
 1426|      0|    }
 1427|       |
 1428|       |    /* if we ran out of session, we need to restore our previously stored
 1429|       |     * state.
 1430|       |     */
 1431|  11.2k|    PK11_EnterContextMonitor(context);
 1432|  11.2k|    if (!context->ownSession) {
  ------------------
  |  Branch (1432:9): [True: 0, False: 11.2k]
  ------------------
 1433|      0|        rv = pk11_restoreContext(context, context->savedData,
 1434|      0|                                 context->savedLength);
 1435|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (1435:13): [True: 0, False: 0]
  ------------------
 1436|      0|            PK11_ExitContextMonitor(context);
 1437|      0|            return rv;
 1438|      0|        }
 1439|      0|    }
 1440|       |
 1441|  11.2k|    switch (context->operation) {
 1442|    303|        case CKA_NSS_MESSAGE | CKA_ENCRYPT:
  ------------------
  |  |   69|    303|#define CKA_NSS_MESSAGE 0x82000000L
  ------------------
                      case CKA_NSS_MESSAGE | CKA_ENCRYPT:
  ------------------
  |  |  547|    303|#define CKA_ENCRYPT 0x00000104UL
  ------------------
  |  Branch (1442:9): [True: 303, False: 10.9k]
  ------------------
 1443|    303|            length = maxout;
 1444|    303|            crv = PK11_GETTAB(context->slot)->C_EncryptMessage(context->session, params, paramslen, (CK_BYTE_PTR)aad, aadlen, (CK_BYTE_PTR)in, inlen, out, &length);
  ------------------
  |  |  102|    303|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1445|    303|            break;
 1446|  10.9k|        case CKA_NSS_MESSAGE | CKA_DECRYPT:
  ------------------
  |  |   69|  10.9k|#define CKA_NSS_MESSAGE 0x82000000L
  ------------------
                      case CKA_NSS_MESSAGE | CKA_DECRYPT:
  ------------------
  |  |  548|  10.9k|#define CKA_DECRYPT 0x00000105UL
  ------------------
  |  Branch (1446:9): [True: 10.9k, False: 303]
  ------------------
 1447|  10.9k|            length = maxout;
 1448|  10.9k|            crv = PK11_GETTAB(context->slot)->C_DecryptMessage(context->session, params, paramslen, (CK_BYTE_PTR)aad, aadlen, (CK_BYTE_PTR)in, inlen, out, &length);
  ------------------
  |  |  102|  10.9k|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1449|  10.9k|            break;
 1450|      0|        case CKA_NSS_MESSAGE | CKA_SIGN:
  ------------------
  |  |   69|      0|#define CKA_NSS_MESSAGE 0x82000000L
  ------------------
                      case CKA_NSS_MESSAGE | CKA_SIGN:
  ------------------
  |  |  551|      0|#define CKA_SIGN 0x00000108UL
  ------------------
  |  Branch (1450:9): [True: 0, False: 11.2k]
  ------------------
 1451|      0|            length = maxout;
 1452|      0|            crv = PK11_GETTAB(context->slot)->C_SignMessage(context->session, params, paramslen, (CK_BYTE_PTR)in, inlen, out, &length);
  ------------------
  |  |  102|      0|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1453|      0|            break;
 1454|      0|        case CKA_NSS_MESSAGE | CKA_VERIFY:
  ------------------
  |  |   69|      0|#define CKA_NSS_MESSAGE 0x82000000L
  ------------------
                      case CKA_NSS_MESSAGE | CKA_VERIFY:
  ------------------
  |  |  553|      0|#define CKA_VERIFY 0x0000010AUL
  ------------------
  |  Branch (1454:9): [True: 0, False: 11.2k]
  ------------------
 1455|      0|            length = maxout; /* sig length */
 1456|      0|            crv = PK11_GETTAB(context->slot)->C_VerifyMessage(context->session, params, paramslen, (CK_BYTE_PTR)in, inlen, out /* sig */, length);
  ------------------
  |  |  102|      0|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1457|      0|            break;
 1458|      0|        default:
  ------------------
  |  Branch (1458:9): [True: 0, False: 11.2k]
  ------------------
 1459|      0|            crv = CKR_OPERATION_NOT_INITIALIZED;
  ------------------
  |  | 1454|      0|#define CKR_OPERATION_NOT_INITIALIZED 0x00000091UL
  ------------------
 1460|      0|            break;
 1461|  11.2k|    }
 1462|       |
 1463|  11.2k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  11.2k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1463:9): [True: 10.9k, False: 303]
  ------------------
 1464|  10.9k|        PORT_SetError(PK11_MapError(crv));
  ------------------
  |  |   65|  10.9k|#define PORT_SetError PORT_SetError_Util
  ------------------
 1465|  10.9k|        rv = SECFailure;
 1466|  10.9k|    } else {
 1467|    303|        *outlen = length;
 1468|    303|    }
 1469|       |
 1470|       |    /*
 1471|       |     * handle session starvation case.. use our last session to multiplex
 1472|       |     */
 1473|  11.2k|    if (!context->ownSession) {
  ------------------
  |  Branch (1473:9): [True: 0, False: 11.2k]
  ------------------
 1474|      0|        context->savedData = pk11_saveContext(context, context->savedData,
 1475|      0|                                              &context->savedLength);
 1476|      0|        if (context->savedData == NULL)
  ------------------
  |  Branch (1476:13): [True: 0, False: 0]
  ------------------
 1477|      0|            rv = SECFailure;
 1478|       |
 1479|       |        /* clear out out session for others to use */
 1480|      0|        pk11_Finalize(context);
 1481|      0|    }
 1482|  11.2k|    PK11_ExitContextMonitor(context);
 1483|  11.2k|    return rv;
 1484|  11.2k|}
PK11_DigestOp:
 1491|   129k|{
 1492|   129k|    CK_RV crv = CKR_OK;
  ------------------
  |  | 1388|   129k|#define CKR_OK 0x00000000UL
  ------------------
 1493|   129k|    SECStatus rv = SECSuccess;
 1494|       |
 1495|   129k|    if (inLen == 0) {
  ------------------
  |  Branch (1495:9): [True: 14.5k, False: 115k]
  ------------------
 1496|  14.5k|        return SECSuccess;
 1497|  14.5k|    }
 1498|   115k|    if (!in) {
  ------------------
  |  Branch (1498:9): [True: 0, False: 115k]
  ------------------
 1499|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1500|      0|        return SECFailure;
 1501|      0|    }
 1502|       |
 1503|       |    /* if we ran out of session, we need to restore our previously stored
 1504|       |     * state.
 1505|       |     */
 1506|   115k|    context->init = PR_FALSE;
  ------------------
  |  |  438|   115k|#define PR_FALSE 0
  ------------------
 1507|   115k|    PK11_EnterContextMonitor(context);
 1508|   115k|    if (!context->ownSession) {
  ------------------
  |  Branch (1508:9): [True: 0, False: 115k]
  ------------------
 1509|      0|        rv = pk11_restoreContext(context, context->savedData,
 1510|      0|                                 context->savedLength);
 1511|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (1511:13): [True: 0, False: 0]
  ------------------
 1512|      0|            PK11_ExitContextMonitor(context);
 1513|      0|            return rv;
 1514|      0|        }
 1515|      0|    }
 1516|       |
 1517|   115k|    switch (context->operation) {
 1518|       |        /* also for MAC'ing */
 1519|  75.7k|        case CKA_SIGN:
  ------------------
  |  |  551|  75.7k|#define CKA_SIGN 0x00000108UL
  ------------------
  |  Branch (1519:9): [True: 75.7k, False: 39.5k]
  ------------------
 1520|  75.7k|            crv = PK11_GETTAB(context->slot)->C_SignUpdate(context->session, (unsigned char *)in, inLen);
  ------------------
  |  |  102|  75.7k|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1521|  75.7k|            break;
 1522|      0|        case CKA_VERIFY:
  ------------------
  |  |  553|      0|#define CKA_VERIFY 0x0000010AUL
  ------------------
  |  Branch (1522:9): [True: 0, False: 115k]
  ------------------
 1523|      0|            crv = PK11_GETTAB(context->slot)->C_VerifyUpdate(context->session, (unsigned char *)in, inLen);
  ------------------
  |  |  102|      0|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1524|      0|            break;
 1525|  39.5k|        case CKA_DIGEST:
  ------------------
  |  |   68|  39.5k|#define CKA_DIGEST 0x81000000L
  ------------------
  |  Branch (1525:9): [True: 39.5k, False: 75.7k]
  ------------------
 1526|  39.5k|            crv = PK11_GETTAB(context->slot)->C_DigestUpdate(context->session, (unsigned char *)in, inLen);
  ------------------
  |  |  102|  39.5k|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1527|  39.5k|            break;
 1528|      0|        default:
  ------------------
  |  Branch (1528:9): [True: 0, False: 115k]
  ------------------
 1529|      0|            crv = CKR_OPERATION_NOT_INITIALIZED;
  ------------------
  |  | 1454|      0|#define CKR_OPERATION_NOT_INITIALIZED 0x00000091UL
  ------------------
 1530|      0|            break;
 1531|   115k|    }
 1532|       |
 1533|   115k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|   115k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1533:9): [True: 0, False: 115k]
  ------------------
 1534|      0|        PORT_SetError(PK11_MapError(crv));
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1535|      0|        rv = SECFailure;
 1536|      0|    }
 1537|       |
 1538|       |    /*
 1539|       |     * handle session starvation case.. use our last session to multiplex
 1540|       |     */
 1541|   115k|    if (!context->ownSession) {
  ------------------
  |  Branch (1541:9): [True: 0, False: 115k]
  ------------------
 1542|      0|        context->savedData = pk11_saveContext(context, context->savedData,
 1543|      0|                                              &context->savedLength);
 1544|      0|        if (context->savedData == NULL)
  ------------------
  |  Branch (1544:13): [True: 0, False: 0]
  ------------------
 1545|      0|            rv = SECFailure;
 1546|       |
 1547|       |        /* clear out out session for others to use */
 1548|      0|        pk11_Finalize(context);
 1549|      0|    }
 1550|   115k|    PK11_ExitContextMonitor(context);
 1551|   115k|    return rv;
 1552|   115k|}
pk11_Finalize:
 1642|  37.0k|{
 1643|  37.0k|    CK_ULONG count = 0;
 1644|  37.0k|    CK_RV crv;
 1645|  37.0k|    unsigned char stackBuf[256];
 1646|  37.0k|    unsigned char *buffer = NULL;
 1647|       |
 1648|  37.0k|    if (!context->ownSession) {
  ------------------
  |  Branch (1648:9): [True: 0, False: 37.0k]
  ------------------
 1649|      0|        return SECSuccess;
 1650|      0|    }
 1651|       |
 1652|  37.0k|finalize:
 1653|  37.0k|    switch (context->operation) {
 1654|      0|        case CKA_ENCRYPT:
  ------------------
  |  |  547|      0|#define CKA_ENCRYPT 0x00000104UL
  ------------------
  |  Branch (1654:9): [True: 0, False: 37.0k]
  ------------------
 1655|      0|            crv = PK11_GETTAB(context->slot)->C_EncryptFinal(context->session, buffer, &count);
  ------------------
  |  |  102|      0|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1656|      0|            break;
 1657|      0|        case CKA_DECRYPT:
  ------------------
  |  |  548|      0|#define CKA_DECRYPT 0x00000105UL
  ------------------
  |  Branch (1657:9): [True: 0, False: 37.0k]
  ------------------
 1658|      0|            crv = PK11_GETTAB(context->slot)->C_DecryptFinal(context->session, buffer, &count);
  ------------------
  |  |  102|      0|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1659|      0|            break;
 1660|  36.8k|        case CKA_SIGN:
  ------------------
  |  |  551|  36.8k|#define CKA_SIGN 0x00000108UL
  ------------------
  |  Branch (1660:9): [True: 36.8k, False: 134]
  ------------------
 1661|  36.8k|            crv = PK11_GETTAB(context->slot)->C_SignFinal(context->session, buffer, &count);
  ------------------
  |  |  102|  36.8k|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1662|  36.8k|            break;
 1663|      0|        case CKA_VERIFY:
  ------------------
  |  |  553|      0|#define CKA_VERIFY 0x0000010AUL
  ------------------
  |  Branch (1663:9): [True: 0, False: 37.0k]
  ------------------
 1664|      0|            crv = PK11_GETTAB(context->slot)->C_VerifyFinal(context->session, buffer, count);
  ------------------
  |  |  102|      0|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1665|      0|            break;
 1666|    134|        case CKA_DIGEST:
  ------------------
  |  |   68|    134|#define CKA_DIGEST 0x81000000L
  ------------------
  |  Branch (1666:9): [True: 134, False: 36.8k]
  ------------------
 1667|    134|            crv = PK11_GETTAB(context->slot)->C_DigestFinal(context->session, buffer, &count);
  ------------------
  |  |  102|    134|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1668|    134|            break;
 1669|      0|        case CKA_NSS_MESSAGE | CKA_ENCRYPT:
  ------------------
  |  |   69|      0|#define CKA_NSS_MESSAGE 0x82000000L
  ------------------
                      case CKA_NSS_MESSAGE | CKA_ENCRYPT:
  ------------------
  |  |  547|      0|#define CKA_ENCRYPT 0x00000104UL
  ------------------
  |  Branch (1669:9): [True: 0, False: 37.0k]
  ------------------
 1670|      0|            crv = PK11_GETTAB(context->slot)->C_MessageEncryptFinal(context->session);
  ------------------
  |  |  102|      0|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1671|      0|            break;
 1672|      0|        case CKA_NSS_MESSAGE | CKA_DECRYPT:
  ------------------
  |  |   69|      0|#define CKA_NSS_MESSAGE 0x82000000L
  ------------------
                      case CKA_NSS_MESSAGE | CKA_DECRYPT:
  ------------------
  |  |  548|      0|#define CKA_DECRYPT 0x00000105UL
  ------------------
  |  Branch (1672:9): [True: 0, False: 37.0k]
  ------------------
 1673|      0|            crv = PK11_GETTAB(context->slot)->C_MessageDecryptFinal(context->session);
  ------------------
  |  |  102|      0|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1674|      0|            break;
 1675|      0|        case CKA_NSS_MESSAGE | CKA_SIGN:
  ------------------
  |  |   69|      0|#define CKA_NSS_MESSAGE 0x82000000L
  ------------------
                      case CKA_NSS_MESSAGE | CKA_SIGN:
  ------------------
  |  |  551|      0|#define CKA_SIGN 0x00000108UL
  ------------------
  |  Branch (1675:9): [True: 0, False: 37.0k]
  ------------------
 1676|      0|            crv = PK11_GETTAB(context->slot)->C_MessageSignFinal(context->session);
  ------------------
  |  |  102|      0|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1677|      0|            break;
 1678|      0|        case CKA_NSS_MESSAGE | CKA_VERIFY:
  ------------------
  |  |   69|      0|#define CKA_NSS_MESSAGE 0x82000000L
  ------------------
                      case CKA_NSS_MESSAGE | CKA_VERIFY:
  ------------------
  |  |  553|      0|#define CKA_VERIFY 0x0000010AUL
  ------------------
  |  Branch (1678:9): [True: 0, False: 37.0k]
  ------------------
 1679|      0|            crv = PK11_GETTAB(context->slot)->C_MessageVerifyFinal(context->session);
  ------------------
  |  |  102|      0|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1680|      0|            break;
 1681|      0|        default:
  ------------------
  |  Branch (1681:9): [True: 0, False: 37.0k]
  ------------------
 1682|      0|            crv = CKR_OPERATION_NOT_INITIALIZED;
  ------------------
  |  | 1454|      0|#define CKR_OPERATION_NOT_INITIALIZED 0x00000091UL
  ------------------
 1683|      0|            break;
 1684|  37.0k|    }
 1685|       |
 1686|  37.0k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  37.0k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1686:9): [True: 37.0k, False: 0]
  ------------------
 1687|  37.0k|        if (buffer != stackBuf) {
  ------------------
  |  Branch (1687:13): [True: 37.0k, False: 0]
  ------------------
 1688|  37.0k|            PORT_Free(buffer);
  ------------------
  |  |   60|  37.0k|#define PORT_Free PORT_Free_Util
  ------------------
 1689|  37.0k|        }
 1690|  37.0k|        if (crv == CKR_OPERATION_NOT_INITIALIZED) {
  ------------------
  |  | 1454|  37.0k|#define CKR_OPERATION_NOT_INITIALIZED 0x00000091UL
  ------------------
  |  Branch (1690:13): [True: 37.0k, False: 0]
  ------------------
 1691|       |            /* if there's no operation, it is finalized */
 1692|  37.0k|            return SECSuccess;
 1693|  37.0k|        }
 1694|      0|        PORT_SetError(PK11_MapError(crv));
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1695|      0|        return SECFailure;
 1696|  37.0k|    }
 1697|       |
 1698|       |    /* Message interface does not need to allocate a final buffer */
 1699|      0|    if (((context->operation) & CKA_NSS_MESSAGE_MASK) == CKA_NSS_MESSAGE) {
  ------------------
  |  |   70|      0|#define CKA_NSS_MESSAGE_MASK 0xff000000L
  ------------------
                  if (((context->operation) & CKA_NSS_MESSAGE_MASK) == CKA_NSS_MESSAGE) {
  ------------------
  |  |   69|      0|#define CKA_NSS_MESSAGE 0x82000000L
  ------------------
  |  Branch (1699:9): [True: 0, False: 0]
  ------------------
 1700|      0|        return SECSuccess;
 1701|      0|    }
 1702|       |
 1703|       |    /* try to finalize the session with a buffer */
 1704|      0|    if (buffer == NULL) {
  ------------------
  |  Branch (1704:9): [True: 0, False: 0]
  ------------------
 1705|      0|        if (count <= sizeof stackBuf) {
  ------------------
  |  Branch (1705:13): [True: 0, False: 0]
  ------------------
 1706|      0|            buffer = stackBuf;
 1707|      0|        } else {
 1708|      0|            buffer = PORT_Alloc(count);
  ------------------
  |  |   52|      0|#define PORT_Alloc PORT_Alloc_Util
  ------------------
 1709|      0|            if (buffer == NULL) {
  ------------------
  |  Branch (1709:17): [True: 0, False: 0]
  ------------------
 1710|      0|                return SECFailure;
 1711|      0|            }
 1712|      0|        }
 1713|      0|        goto finalize;
 1714|      0|    }
 1715|      0|    if (buffer != stackBuf) {
  ------------------
  |  Branch (1715:9): [True: 0, False: 0]
  ------------------
 1716|      0|        PORT_Free(buffer);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 1717|      0|    }
 1718|      0|    return SECSuccess;
 1719|      0|}
PK11_DigestFinal:
 1729|  79.1k|{
 1730|  79.1k|    CK_ULONG len;
 1731|  79.1k|    CK_RV crv;
 1732|  79.1k|    SECStatus rv;
 1733|       |
 1734|       |    /* message interface returns no data on Final, Should not use DigestFinal
 1735|       |     * in this case */
 1736|  79.1k|    if (((context->operation) & CKA_NSS_MESSAGE_MASK) == CKA_NSS_MESSAGE) {
  ------------------
  |  |   70|  79.1k|#define CKA_NSS_MESSAGE_MASK 0xff000000L
  ------------------
                  if (((context->operation) & CKA_NSS_MESSAGE_MASK) == CKA_NSS_MESSAGE) {
  ------------------
  |  |   69|  79.1k|#define CKA_NSS_MESSAGE 0x82000000L
  ------------------
  |  Branch (1736:9): [True: 0, False: 79.1k]
  ------------------
 1737|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1738|      0|        return SECFailure;
 1739|      0|    }
 1740|       |
 1741|       |    /* if we ran out of session, we need to restore our previously stored
 1742|       |     * state.
 1743|       |     */
 1744|  79.1k|    PK11_EnterContextMonitor(context);
 1745|  79.1k|    if (!context->ownSession) {
  ------------------
  |  Branch (1745:9): [True: 0, False: 79.1k]
  ------------------
 1746|      0|        rv = pk11_restoreContext(context, context->savedData,
 1747|      0|                                 context->savedLength);
 1748|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (1748:13): [True: 0, False: 0]
  ------------------
 1749|      0|            PK11_ExitContextMonitor(context);
 1750|      0|            return rv;
 1751|      0|        }
 1752|      0|    }
 1753|       |
 1754|  79.1k|    len = length;
 1755|  79.1k|    switch (context->operation) {
 1756|  44.7k|        case CKA_SIGN:
  ------------------
  |  |  551|  44.7k|#define CKA_SIGN 0x00000108UL
  ------------------
  |  Branch (1756:9): [True: 44.7k, False: 34.4k]
  ------------------
 1757|  44.7k|            crv = PK11_GETTAB(context->slot)->C_SignFinal(context->session, data, &len);
  ------------------
  |  |  102|  44.7k|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1758|  44.7k|            break;
 1759|      0|        case CKA_VERIFY:
  ------------------
  |  |  553|      0|#define CKA_VERIFY 0x0000010AUL
  ------------------
  |  Branch (1759:9): [True: 0, False: 79.1k]
  ------------------
 1760|      0|            crv = PK11_GETTAB(context->slot)->C_VerifyFinal(context->session, data, len);
  ------------------
  |  |  102|      0|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1761|      0|            break;
 1762|  34.4k|        case CKA_DIGEST:
  ------------------
  |  |   68|  34.4k|#define CKA_DIGEST 0x81000000L
  ------------------
  |  Branch (1762:9): [True: 34.4k, False: 44.7k]
  ------------------
 1763|  34.4k|            crv = PK11_GETTAB(context->slot)->C_DigestFinal(context->session, data, &len);
  ------------------
  |  |  102|  34.4k|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1764|  34.4k|            break;
 1765|      0|        case CKA_ENCRYPT:
  ------------------
  |  |  547|      0|#define CKA_ENCRYPT 0x00000104UL
  ------------------
  |  Branch (1765:9): [True: 0, False: 79.1k]
  ------------------
 1766|      0|            crv = PK11_GETTAB(context->slot)->C_EncryptFinal(context->session, data, &len);
  ------------------
  |  |  102|      0|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1767|      0|            break;
 1768|      0|        case CKA_DECRYPT:
  ------------------
  |  |  548|      0|#define CKA_DECRYPT 0x00000105UL
  ------------------
  |  Branch (1768:9): [True: 0, False: 79.1k]
  ------------------
 1769|      0|            crv = PK11_GETTAB(context->slot)->C_DecryptFinal(context->session, data, &len);
  ------------------
  |  |  102|      0|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1770|      0|            break;
 1771|      0|        default:
  ------------------
  |  Branch (1771:9): [True: 0, False: 79.1k]
  ------------------
 1772|      0|            crv = CKR_OPERATION_NOT_INITIALIZED;
  ------------------
  |  | 1454|      0|#define CKR_OPERATION_NOT_INITIALIZED 0x00000091UL
  ------------------
 1773|      0|            break;
 1774|  79.1k|    }
 1775|  79.1k|    PK11_ExitContextMonitor(context);
 1776|       |
 1777|  79.1k|    context->init = PR_FALSE; /* allow Begin to start up again */
  ------------------
  |  |  438|  79.1k|#define PR_FALSE 0
  ------------------
 1778|       |
 1779|  79.1k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  79.1k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1779:9): [True: 0, False: 79.1k]
  ------------------
 1780|      0|        PORT_SetError(PK11_MapError(crv));
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1781|      0|        return SECFailure;
 1782|      0|    }
 1783|  79.1k|    *outLen = (unsigned int)len;
 1784|  79.1k|    return SECSuccess;
 1785|  79.1k|}
pk11cxt.c:pk11_saveContextHelper:
   87|  3.00k|{
   88|  3.00k|    CK_RV crv;
   89|       |
   90|       |    /* If buffer is NULL, this will get the length */
   91|  3.00k|    crv = PK11_GETTAB(context->slot)->C_GetOperationState(context->session, (CK_BYTE_PTR)buffer, savedLength);
  ------------------
  |  |  102|  3.00k|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
   92|  3.00k|    if (!buffer || (crv == CKR_BUFFER_TOO_SMALL)) {
  ------------------
  |  | 1514|    134|#define CKR_BUFFER_TOO_SMALL 0x00000150UL
  ------------------
  |  Branch (92:9): [True: 2.86k, False: 134]
  |  Branch (92:20): [True: 0, False: 134]
  ------------------
   93|       |        /* the given buffer wasn't big enough (or was NULL), but we
   94|       |         * have the length, so try again with a new buffer and the
   95|       |         * correct length
   96|       |         */
   97|  2.86k|        unsigned long bufLen = *savedLength;
   98|  2.86k|        buffer = PORT_Alloc(bufLen);
  ------------------
  |  |   52|  2.86k|#define PORT_Alloc PORT_Alloc_Util
  ------------------
   99|  2.86k|        if (buffer == NULL) {
  ------------------
  |  Branch (99:13): [True: 0, False: 2.86k]
  ------------------
  100|      0|            return (unsigned char *)NULL;
  101|      0|        }
  102|  2.86k|        crv = PK11_GETTAB(context->slot)->C_GetOperationState(context->session, (CK_BYTE_PTR)buffer, savedLength);
  ------------------
  |  |  102|  2.86k|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
  103|  2.86k|        if (crv != CKR_OK) {
  ------------------
  |  | 1388|  2.86k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (103:13): [True: 0, False: 2.86k]
  ------------------
  104|      0|            PORT_ZFree(buffer, bufLen);
  ------------------
  |  |   75|      0|#define PORT_ZFree PORT_ZFree_Util
  ------------------
  105|      0|        }
  106|  2.86k|    }
  107|  3.00k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  3.00k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (107:9): [True: 0, False: 3.00k]
  ------------------
  108|      0|        PORT_SetError(PK11_MapError(crv));
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  109|      0|        return (unsigned char *)NULL;
  110|      0|    }
  111|  3.00k|    return buffer;
  112|  3.00k|}
pk11cxt.c:pk11_CreateNewContextInSlot:
  360|  49.2k|{
  361|  49.2k|    CK_MECHANISM mech_info;
  362|  49.2k|    PK11Context *context;
  363|  49.2k|    SECStatus rv;
  364|       |
  365|  49.2k|    PORT_Assert(slot != NULL);
  ------------------
  |  |  120|  49.2k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  49.2k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 49.2k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  366|  49.2k|    if (!slot || ((objectID == CK_INVALID_HANDLE) && ((operation != CKA_DIGEST) ||
  ------------------
  |  |   78|  49.2k|#define CK_INVALID_HANDLE 0
  ------------------
                  if (!slot || ((objectID == CK_INVALID_HANDLE) && ((operation != CKA_DIGEST) ||
  ------------------
  |  |   68|  36.3k|#define CKA_DIGEST 0x81000000L
  ------------------
  |  Branch (366:9): [True: 0, False: 49.2k]
  |  Branch (366:19): [True: 36.3k, False: 12.8k]
  |  Branch (366:55): [True: 0, False: 36.3k]
  ------------------
  367|  36.3k|                                                      (type == CKM_SKIPJACK_CBC64)))) {
  ------------------
  |  | 1049|  36.3k|#define CKM_SKIPJACK_CBC64 0x00001002UL
  ------------------
  |  Branch (367:55): [True: 0, False: 36.3k]
  ------------------
  368|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  369|      0|        return NULL;
  370|      0|    }
  371|  49.2k|    context = (PK11Context *)PORT_Alloc(sizeof(PK11Context));
  ------------------
  |  |   52|  49.2k|#define PORT_Alloc PORT_Alloc_Util
  ------------------
  372|  49.2k|    if (context == NULL) {
  ------------------
  |  Branch (372:9): [True: 0, False: 49.2k]
  ------------------
  373|      0|        return NULL;
  374|      0|    }
  375|       |
  376|       |    /* now deal with the fortezza hack... the fortezza hack is an attempt
  377|       |     * to get around the issue of the card not allowing you to do a FORTEZZA
  378|       |     * LoadIV/Encrypt, which was added because such a combination could be
  379|       |     * use to circumvent the key escrow system. Unfortunately SSL needs to
  380|       |     * do this kind of operation, so in SSL we do a loadIV (to verify it),
  381|       |     * Then GenerateIV, and through away the first 8 bytes on either side
  382|       |     * of the connection.*/
  383|  49.2k|    context->fortezzaHack = PR_FALSE;
  ------------------
  |  |  438|  49.2k|#define PR_FALSE 0
  ------------------
  384|  49.2k|    if (type == CKM_SKIPJACK_CBC64) {
  ------------------
  |  | 1049|  49.2k|#define CKM_SKIPJACK_CBC64 0x00001002UL
  ------------------
  |  Branch (384:9): [True: 0, False: 49.2k]
  ------------------
  385|      0|        if (symKey && (symKey->origin == PK11_OriginFortezzaHack)) {
  ------------------
  |  Branch (385:13): [True: 0, False: 0]
  |  Branch (385:23): [True: 0, False: 0]
  ------------------
  386|      0|            context->fortezzaHack = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  387|      0|        }
  388|      0|    }
  389|       |
  390|       |    /* initialize the critical fields of the context */
  391|  49.2k|    context->operation = operation;
  392|       |    /* If we were given a symKey, keep our own reference to it so
  393|       |     * that the key doesn't disappear in the middle of the operation
  394|       |     * if the caller frees it. Public and Private keys are not reference
  395|       |     * counted, so the caller just has to keep his copies around until
  396|       |     * the operation completes */
  397|  49.2k|    context->key = symKey ? PK11_ReferenceSymKey(symKey) : NULL;
  ------------------
  |  Branch (397:20): [True: 12.8k, False: 36.3k]
  ------------------
  398|  49.2k|    context->objectID = objectID;
  399|  49.2k|    context->slot = PK11_ReferenceSlot(slot);
  400|  49.2k|    context->session = pk11_GetNewSession(slot, &context->ownSession);
  401|  49.2k|    context->pwArg = pwArg;
  402|       |    /* get our session */
  403|  49.2k|    context->savedData = NULL;
  404|       |
  405|       |    /* save the parameters so that some digesting stuff can do multiple
  406|       |     * begins on a single context */
  407|  49.2k|    context->type = type;
  408|  49.2k|    if (param) {
  ------------------
  |  Branch (408:9): [True: 49.2k, False: 0]
  ------------------
  409|  49.2k|        if (param->len > 0) {
  ------------------
  |  Branch (409:13): [True: 6.52k, False: 42.7k]
  ------------------
  410|  6.52k|            context->param = SECITEM_DupItem(param);
  ------------------
  |  |  107|  6.52k|#define SECITEM_DupItem SECITEM_DupItem_Util
  ------------------
  411|  42.7k|        } else {
  412|  42.7k|            context->param = (SECItem *)&pk11_null_params;
  413|  42.7k|        }
  414|  49.2k|    } else {
  415|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  416|      0|        context->param = NULL;
  417|      0|    }
  418|  49.2k|    context->init = PR_FALSE;
  ------------------
  |  |  438|  49.2k|#define PR_FALSE 0
  ------------------
  419|  49.2k|    context->sessionLock = PZ_NewLock(nssILockPK11cxt);
  ------------------
  |  |  243|  49.2k|#define PZ_NewLock(t) PR_NewLock()
  ------------------
  420|  49.2k|    if ((context->param == NULL) || (context->sessionLock == NULL)) {
  ------------------
  |  Branch (420:9): [True: 0, False: 49.2k]
  |  Branch (420:37): [True: 0, False: 49.2k]
  ------------------
  421|      0|        PK11_DestroyContext(context, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  422|      0|        return NULL;
  423|      0|    }
  424|       |
  425|  49.2k|    mech_info.mechanism = type;
  426|  49.2k|    mech_info.pParameter = param->data;
  427|  49.2k|    mech_info.ulParameterLen = param->len;
  428|  49.2k|    rv = pk11_context_init(context, &mech_info);
  429|       |
  430|  49.2k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (430:9): [True: 0, False: 49.2k]
  ------------------
  431|      0|        PK11_DestroyContext(context, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  432|      0|        return NULL;
  433|      0|    }
  434|  49.2k|    context->init = PR_TRUE;
  ------------------
  |  |  437|  49.2k|#define PR_TRUE 1
  ------------------
  435|  49.2k|    return context;
  436|  49.2k|}
pk11cxt.c:pk11_context_init:
  198|  86.1k|{
  199|  86.1k|    CK_RV crv;
  200|  86.1k|    SECStatus rv = SECSuccess;
  201|       |
  202|  86.1k|    context->simulate_message = PR_FALSE;
  ------------------
  |  |  438|  86.1k|#define PR_FALSE 0
  ------------------
  203|  86.1k|    switch (context->operation) {
  204|    950|        case CKA_ENCRYPT:
  ------------------
  |  |  547|    950|#define CKA_ENCRYPT 0x00000104UL
  ------------------
  |  Branch (204:9): [True: 950, False: 85.2k]
  ------------------
  205|    950|            PK11_EnterContextMonitor(context);
  206|    950|            crv = PK11_GETTAB(context->slot)->C_EncryptInit(context->session, mech_info, context->objectID);
  ------------------
  |  |  102|    950|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
  207|    950|            PK11_ExitContextMonitor(context);
  208|    950|            break;
  209|    950|        case CKA_DECRYPT:
  ------------------
  |  |  548|    950|#define CKA_DECRYPT 0x00000105UL
  ------------------
  |  Branch (209:9): [True: 950, False: 85.2k]
  ------------------
  210|    950|            PK11_EnterContextMonitor(context);
  211|    950|            if (context->fortezzaHack) {
  ------------------
  |  Branch (211:17): [True: 0, False: 950]
  ------------------
  212|      0|                CK_ULONG count = 0;
  213|       |                /* generate the IV for fortezza */
  214|      0|                crv = PK11_GETTAB(context->slot)->C_EncryptInit(context->session, mech_info, context->objectID);
  ------------------
  |  |  102|      0|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
  215|      0|                if (crv != CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (215:21): [True: 0, False: 0]
  ------------------
  216|      0|                    PK11_ExitContextMonitor(context);
  217|      0|                    break;
  218|      0|                }
  219|      0|                PK11_GETTAB(context->slot)
  ------------------
  |  |  102|      0|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
  220|      0|                    ->C_EncryptFinal(context->session,
  221|      0|                                     NULL, &count);
  222|      0|            }
  223|    950|            crv = PK11_GETTAB(context->slot)->C_DecryptInit(context->session, mech_info, context->objectID);
  ------------------
  |  |  102|    950|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
  224|    950|            PK11_ExitContextMonitor(context);
  225|    950|            break;
  226|  46.0k|        case CKA_SIGN:
  ------------------
  |  |  551|  46.0k|#define CKA_SIGN 0x00000108UL
  ------------------
  |  Branch (226:9): [True: 46.0k, False: 40.1k]
  ------------------
  227|  46.0k|            PK11_EnterContextMonitor(context);
  228|  46.0k|            crv = PK11_GETTAB(context->slot)->C_SignInit(context->session, mech_info, context->objectID);
  ------------------
  |  |  102|  46.0k|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
  229|  46.0k|            PK11_ExitContextMonitor(context);
  230|  46.0k|            break;
  231|      0|        case CKA_VERIFY:
  ------------------
  |  |  553|      0|#define CKA_VERIFY 0x0000010AUL
  ------------------
  |  Branch (231:9): [True: 0, False: 86.1k]
  ------------------
  232|       |            /* NOTE: we previously has this set to C_SignInit for Macing.
  233|       |             * It turns out now one could possibly use it that way, though,
  234|       |             * because PK11_HashOp() always called C_VerifyUpdate on CKA_VERIFY,
  235|       |             * which would have failed. So everyone just calls us with CKA_SIGN
  236|       |             * when Macing even when they are verifying, no need to 'do it
  237|       |             * for them'. It needs to be VerifyInit now so that we can do
  238|       |             * PKCS #11 hash/Verify combo operations. */
  239|      0|            PK11_EnterContextMonitor(context);
  240|      0|            crv = PK11_GETTAB(context->slot)->C_VerifyInit(context->session, mech_info, context->objectID);
  ------------------
  |  |  102|      0|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
  241|      0|            PK11_ExitContextMonitor(context);
  242|      0|            break;
  243|  36.3k|        case CKA_DIGEST:
  ------------------
  |  |   68|  36.3k|#define CKA_DIGEST 0x81000000L
  ------------------
  |  Branch (243:9): [True: 36.3k, False: 49.7k]
  ------------------
  244|  36.3k|            PK11_EnterContextMonitor(context);
  245|  36.3k|            crv = PK11_GETTAB(context->slot)->C_DigestInit(context->session, mech_info);
  ------------------
  |  |  102|  36.3k|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
  246|  36.3k|            PK11_ExitContextMonitor(context);
  247|  36.3k|            break;
  248|       |
  249|    298|        case CKA_NSS_MESSAGE | CKA_ENCRYPT:
  ------------------
  |  |   69|    298|#define CKA_NSS_MESSAGE 0x82000000L
  ------------------
                      case CKA_NSS_MESSAGE | CKA_ENCRYPT:
  ------------------
  |  |  547|    298|#define CKA_ENCRYPT 0x00000104UL
  ------------------
  |  Branch (249:9): [True: 298, False: 85.8k]
  ------------------
  250|    298|            crv = pk11_contextInitMessage(context, mech_info,
  251|    298|                                          PK11_GETTAB(context->slot)->C_MessageEncryptInit,
  ------------------
  |  |  102|    298|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
  252|    298|                                          CKF_MESSAGE_ENCRYPT, CKR_OK);
  ------------------
  |  | 1339|    298|#define CKF_MESSAGE_ENCRYPT 0x00000002UL
  ------------------
                                                        CKF_MESSAGE_ENCRYPT, CKR_OK);
  ------------------
  |  | 1388|    298|#define CKR_OK 0x00000000UL
  ------------------
  253|    298|            break;
  254|  1.55k|        case CKA_NSS_MESSAGE | CKA_DECRYPT:
  ------------------
  |  |   69|  1.55k|#define CKA_NSS_MESSAGE 0x82000000L
  ------------------
                      case CKA_NSS_MESSAGE | CKA_DECRYPT:
  ------------------
  |  |  548|  1.55k|#define CKA_DECRYPT 0x00000105UL
  ------------------
  |  Branch (254:9): [True: 1.55k, False: 84.6k]
  ------------------
  255|  1.55k|            crv = pk11_contextInitMessage(context, mech_info,
  256|  1.55k|                                          PK11_GETTAB(context->slot)->C_MessageDecryptInit,
  ------------------
  |  |  102|  1.55k|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
  257|  1.55k|                                          CKF_MESSAGE_DECRYPT, CKR_OK);
  ------------------
  |  | 1340|  1.55k|#define CKF_MESSAGE_DECRYPT 0x00000004UL
  ------------------
                                                        CKF_MESSAGE_DECRYPT, CKR_OK);
  ------------------
  |  | 1388|  1.55k|#define CKR_OK 0x00000000UL
  ------------------
  258|  1.55k|            break;
  259|      0|        case CKA_NSS_MESSAGE | CKA_SIGN:
  ------------------
  |  |   69|      0|#define CKA_NSS_MESSAGE 0x82000000L
  ------------------
                      case CKA_NSS_MESSAGE | CKA_SIGN:
  ------------------
  |  |  551|      0|#define CKA_SIGN 0x00000108UL
  ------------------
  |  Branch (259:9): [True: 0, False: 86.1k]
  ------------------
  260|      0|            crv = pk11_contextInitMessage(context, mech_info,
  261|      0|                                          PK11_GETTAB(context->slot)->C_MessageSignInit,
  ------------------
  |  |  102|      0|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
  262|      0|                                          CKF_MESSAGE_SIGN, CKR_FUNCTION_NOT_SUPPORTED);
  ------------------
  |  | 1341|      0|#define CKF_MESSAGE_SIGN 0x00000008UL
  ------------------
                                                        CKF_MESSAGE_SIGN, CKR_FUNCTION_NOT_SUPPORTED);
  ------------------
  |  | 1426|      0|#define CKR_FUNCTION_NOT_SUPPORTED 0x00000054UL
  ------------------
  263|      0|            break;
  264|      0|        case CKA_NSS_MESSAGE | CKA_VERIFY:
  ------------------
  |  |   69|      0|#define CKA_NSS_MESSAGE 0x82000000L
  ------------------
                      case CKA_NSS_MESSAGE | CKA_VERIFY:
  ------------------
  |  |  553|      0|#define CKA_VERIFY 0x0000010AUL
  ------------------
  |  Branch (264:9): [True: 0, False: 86.1k]
  ------------------
  265|      0|            crv = pk11_contextInitMessage(context, mech_info,
  266|      0|                                          PK11_GETTAB(context->slot)->C_MessageVerifyInit,
  ------------------
  |  |  102|      0|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
  267|      0|                                          CKF_MESSAGE_VERIFY, CKR_FUNCTION_NOT_SUPPORTED);
  ------------------
  |  | 1342|      0|#define CKF_MESSAGE_VERIFY 0x00000010UL
  ------------------
                                                        CKF_MESSAGE_VERIFY, CKR_FUNCTION_NOT_SUPPORTED);
  ------------------
  |  | 1426|      0|#define CKR_FUNCTION_NOT_SUPPORTED 0x00000054UL
  ------------------
  268|      0|            break;
  269|      0|        default:
  ------------------
  |  Branch (269:9): [True: 0, False: 86.1k]
  ------------------
  270|      0|            crv = CKR_OPERATION_NOT_INITIALIZED;
  ------------------
  |  | 1454|      0|#define CKR_OPERATION_NOT_INITIALIZED 0x00000091UL
  ------------------
  271|      0|            break;
  272|  86.1k|    }
  273|       |
  274|  86.1k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  86.1k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (274:9): [True: 0, False: 86.1k]
  ------------------
  275|      0|        PORT_SetError(PK11_MapError(crv));
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  276|      0|        return SECFailure;
  277|      0|    }
  278|       |
  279|       |    /* handle the case where the token is using the old NSS mechanism */
  280|  86.1k|    if (context->simulate_message &&
  ------------------
  |  Branch (280:9): [True: 0, False: 86.1k]
  ------------------
  281|  86.1k|        !PK11_DoesMechanism(context->slot, context->simulate_mechanism)) {
  ------------------
  |  Branch (281:9): [True: 0, False: 0]
  ------------------
  282|      0|        if ((context->simulate_mechanism == CKM_CHACHA20_POLY1305) &&
  ------------------
  |  | 1287|      0|#define CKM_CHACHA20_POLY1305 0x00004021UL
  ------------------
  |  Branch (282:13): [True: 0, False: 0]
  ------------------
  283|      0|            PK11_DoesMechanism(context->slot, CKM_NSS_CHACHA20_POLY1305)) {
  ------------------
  |  |  243|      0|#define CKM_NSS_CHACHA20_POLY1305 (CKM_NSS + 28)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (283:13): [True: 0, False: 0]
  ------------------
  284|      0|            context->simulate_mechanism = CKM_NSS_CHACHA20_POLY1305;
  ------------------
  |  |  243|      0|#define CKM_NSS_CHACHA20_POLY1305 (CKM_NSS + 28)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  285|      0|        } else {
  286|      0|            PORT_SetError(PK11_MapError(CKR_MECHANISM_INVALID));
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
                          PORT_SetError(PK11_MapError(CKR_MECHANISM_INVALID));
  ------------------
  |  | 1447|      0|#define CKR_MECHANISM_INVALID 0x00000070UL
  ------------------
  287|      0|            return SECFailure;
  288|      0|        }
  289|      0|    }
  290|       |
  291|       |    /*
  292|       |     * handle session starvation case.. use our last session to multiplex
  293|       |     */
  294|  86.1k|    if (!context->ownSession) {
  ------------------
  |  Branch (294:9): [True: 0, False: 86.1k]
  ------------------
  295|      0|        PK11_EnterContextMonitor(context);
  296|      0|        context->savedData = pk11_saveContext(context, context->savedData,
  297|      0|                                              &context->savedLength);
  298|      0|        if (context->savedData == NULL)
  ------------------
  |  Branch (298:13): [True: 0, False: 0]
  ------------------
  299|      0|            rv = SECFailure;
  300|       |        /* clear out out session for others to use */
  301|      0|        pk11_Finalize(context);
  302|      0|        PK11_ExitContextMonitor(context);
  303|      0|    }
  304|  86.1k|    return rv;
  305|  86.1k|}
pk11cxt.c:pk11_contextInitMessage:
  155|  1.85k|{
  156|  1.85k|    PK11SlotInfo *slot = context->slot;
  157|  1.85k|    CK_VERSION version = slot->module->cryptokiVersion;
  158|  1.85k|    CK_RV crv = CKR_OK;
  ------------------
  |  | 1388|  1.85k|#define CKR_OK 0x00000000UL
  ------------------
  159|       |
  160|  1.85k|    context->ivCounter = 0;
  161|  1.85k|    context->ivMaxCount = 0;
  162|  1.85k|    context->ivFixedBits = 0;
  163|  1.85k|    context->ivLen = 0;
  164|  1.85k|    context->ivGen = CKG_NO_GENERATE;
  ------------------
  |  | 1991|  1.85k|#define CKG_NO_GENERATE 0x00000000UL
  ------------------
  165|  1.85k|    context->simulate_mechanism = (mech)->mechanism;
  166|  1.85k|    context->simulate_message = PR_FALSE;
  ------------------
  |  |  438|  1.85k|#define PR_FALSE 0
  ------------------
  167|       |    /* check that we can do the Message interface. We need to check
  168|       |     * for either 1) are we using a PKCS #11 v3 interface and 2) is the
  169|       |     * Message flag set on the mechanism. If either is false we simulate
  170|       |     * the message interface for the Encrypt and Decrypt cases using the
  171|       |     * PKCS #11 V2 interface.
  172|       |     * Sign and verify do not have V2 interfaces, so we go ahead and fail
  173|       |     * if those cases */
  174|  1.85k|    if ((version.major >= 3) &&
  ------------------
  |  Branch (174:9): [True: 1.85k, False: 0]
  ------------------
  175|  1.85k|        PK11_DoesMechanismFlag(slot, (mech)->mechanism, flags)) {
  ------------------
  |  Branch (175:9): [True: 1.85k, False: 0]
  ------------------
  176|  1.85k|        PK11_EnterContextMonitor(context);
  177|  1.85k|        crv = (*initFunc)((context)->session, (mech), (context)->objectID);
  178|  1.85k|        PK11_ExitContextMonitor(context);
  179|  1.85k|        if ((crv == CKR_FUNCTION_NOT_SUPPORTED) ||
  ------------------
  |  | 1426|  1.85k|#define CKR_FUNCTION_NOT_SUPPORTED 0x00000054UL
  ------------------
  |  Branch (179:13): [True: 0, False: 1.85k]
  ------------------
  180|  1.85k|            (crv == CKR_MECHANISM_INVALID)) {
  ------------------
  |  | 1447|  1.85k|#define CKR_MECHANISM_INVALID 0x00000070UL
  ------------------
  |  Branch (180:13): [True: 0, False: 1.85k]
  ------------------
  181|       |            /* we have a 3.0 interface, and the flag was set (or ignored)
  182|       |             * but the implementation was not there, use the V2 interface */
  183|      0|            crv = (scrv);
  184|      0|            context->simulate_message = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  185|      0|        }
  186|  1.85k|    } else {
  187|      0|        crv = (scrv);
  188|      0|        context->simulate_message = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  189|      0|    }
  190|  1.85k|    return crv;
  191|  1.85k|}
pk11cxt.c:pk11_GenerateIV:
  973|      4|{
  974|      4|    unsigned int i;
  975|      4|    unsigned int flexBits;
  976|      4|    unsigned int ivOffset;
  977|      4|    unsigned int ivNewCount;
  978|      4|    unsigned char ivMask;
  979|      4|    unsigned char ivSave;
  980|      4|    SECStatus rv;
  981|       |
  982|      4|    if (context->ivCounter != 0) {
  ------------------
  |  Branch (982:9): [True: 0, False: 4]
  ------------------
  983|       |        /* If we've already generated a message, make sure all subsequent
  984|       |         * messages are using the same generator */
  985|      0|        if ((context->ivGen != ivgen) ||
  ------------------
  |  Branch (985:13): [True: 0, False: 0]
  ------------------
  986|      0|            (context->ivFixedBits != fixedBits) ||
  ------------------
  |  Branch (986:13): [True: 0, False: 0]
  ------------------
  987|      0|            (context->ivLen != ivLen)) {
  ------------------
  |  Branch (987:13): [True: 0, False: 0]
  ------------------
  988|      0|            PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  989|      0|            return SECFailure;
  990|      0|        }
  991|      4|    } else {
  992|       |        /* remember these values */
  993|      4|        context->ivGen = ivgen;
  994|      4|        context->ivFixedBits = fixedBits;
  995|      4|        context->ivLen = ivLen;
  996|       |        /* now calculate how may bits of IV we have to supply */
  997|      4|        flexBits = ivLen * PR_BITS_PER_BYTE;
  ------------------
  |  |  286|      4|#define PR_BITS_PER_BYTE    8
  ------------------
  998|       |        /* first make sure we aren't going to overflow */
  999|      4|        if (flexBits < fixedBits) {
  ------------------
  |  Branch (999:13): [True: 0, False: 4]
  ------------------
 1000|      0|            PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1001|      0|            return SECFailure;
 1002|      0|        }
 1003|      4|        flexBits -= fixedBits;
 1004|       |        /* if we are generating a random number reduce the acceptable bits to
 1005|       |         * avoid birthday attacks */
 1006|      4|        if (ivgen == CKG_GENERATE_RANDOM) {
  ------------------
  |  | 1994|      4|#define CKG_GENERATE_RANDOM 0x00000003UL
  ------------------
  |  Branch (1006:13): [True: 0, False: 4]
  ------------------
 1007|      0|            if (flexBits <= GCMIV_RANDOM_BIRTHDAY_BITS) {
  ------------------
  |  |  246|      0|#define GCMIV_RANDOM_BIRTHDAY_BITS 64
  ------------------
  |  Branch (1007:17): [True: 0, False: 0]
  ------------------
 1008|      0|                PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1009|      0|                return SECFailure;
 1010|      0|            }
 1011|       |            /* see freebl/blapit.h for how GCMIV_RANDOM_BIRTHDAY_BITS is
 1012|       |             * calculated. */
 1013|      0|            flexBits -= GCMIV_RANDOM_BIRTHDAY_BITS;
  ------------------
  |  |  246|      0|#define GCMIV_RANDOM_BIRTHDAY_BITS 64
  ------------------
 1014|      0|            flexBits = flexBits >> 1;
 1015|      0|        }
 1016|      4|        if (flexBits == 0) {
  ------------------
  |  Branch (1016:13): [True: 0, False: 4]
  ------------------
 1017|      0|            PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1018|      0|            return SECFailure;
 1019|      0|        }
 1020|       |        /* Turn those bits into the number of IV's we can safely return */
 1021|      4|        if (flexBits >= sizeof(context->ivMaxCount) * PR_BITS_PER_BYTE) {
  ------------------
  |  |  286|      4|#define PR_BITS_PER_BYTE    8
  ------------------
  |  Branch (1021:13): [True: 4, False: 0]
  ------------------
 1022|      4|            context->ivMaxCount = PR_UINT64(0xffffffffffffffff);
  ------------------
  |  |  337|      4|#define PR_UINT64(x) x ## UL
  ------------------
 1023|      4|        } else {
 1024|      0|            context->ivMaxCount = (PR_UINT64(1) << flexBits);
  ------------------
  |  |  337|      0|#define PR_UINT64(x) x ## UL
  ------------------
 1025|      0|        }
 1026|      4|    }
 1027|       |
 1028|       |    /* no generate, accept the IV from the source */
 1029|      4|    if (ivgen == CKG_NO_GENERATE) {
  ------------------
  |  | 1991|      4|#define CKG_NO_GENERATE 0x00000000UL
  ------------------
  |  Branch (1029:9): [True: 0, False: 4]
  ------------------
 1030|      0|        context->ivCounter = 1;
 1031|      0|        return SECSuccess;
 1032|      0|    }
 1033|       |
 1034|       |    /* make sure we haven't exceeded the number of IVs we can return
 1035|       |     * for this key, generator, and IV size */
 1036|      4|    if (context->ivCounter >= context->ivMaxCount) {
  ------------------
  |  Branch (1036:9): [True: 0, False: 4]
  ------------------
 1037|       |        /* use a unique error from just bad user input */
 1038|      0|        PORT_SetError(SEC_ERROR_EXTRA_INPUT);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1039|      0|        return SECFailure;
 1040|      0|    }
 1041|       |
 1042|       |    /* build to mask to handle the first byte of the IV */
 1043|      4|    ivOffset = fixedBits / PR_BITS_PER_BYTE;
  ------------------
  |  |  286|      4|#define PR_BITS_PER_BYTE    8
  ------------------
 1044|      4|    ivMask = 0xff >> ((PR_BITS_PER_BYTE - (fixedBits & 7)) & 7);
  ------------------
  |  |  286|      4|#define PR_BITS_PER_BYTE    8
  ------------------
 1045|      4|    ivNewCount = ivLen - ivOffset;
 1046|       |
 1047|       |    /* finally generate the IV */
 1048|      4|    switch (ivgen) {
  ------------------
  |  Branch (1048:13): [True: 0, False: 4]
  ------------------
 1049|      0|        case CKG_GENERATE: /* default to counter */
  ------------------
  |  | 1992|      0|#define CKG_GENERATE 0x00000001UL
  ------------------
  |  Branch (1049:9): [True: 0, False: 4]
  ------------------
 1050|      0|        case CKG_GENERATE_COUNTER:
  ------------------
  |  | 1993|      0|#define CKG_GENERATE_COUNTER 0x00000002UL
  ------------------
  |  Branch (1050:9): [True: 0, False: 4]
  ------------------
 1051|      0|            iv[ivOffset] = (iv[ivOffset] & ~ivMask) |
 1052|      0|                           (PORT_GET_BYTE_BE(context->ivCounter, 0, ivNewCount) & ivMask);
  ------------------
  |  |  131|      0|    ((unsigned char)(((len) - (offset)-1) >= sizeof(value) ? 0 : (((value) >> (((len) - (offset)-1) * PR_BITS_PER_BYTE)) & 0xff)))
  |  |  ------------------
  |  |  |  |  286|      0|#define PR_BITS_PER_BYTE    8
  |  |  ------------------
  |  |  |  Branch (131:22): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1053|      0|            for (i = 1; i < ivNewCount; i++) {
  ------------------
  |  Branch (1053:25): [True: 0, False: 0]
  ------------------
 1054|      0|                iv[ivOffset + i] =
 1055|      0|                    PORT_GET_BYTE_BE(context->ivCounter, i, ivNewCount);
  ------------------
  |  |  131|      0|    ((unsigned char)(((len) - (offset)-1) >= sizeof(value) ? 0 : (((value) >> (((len) - (offset)-1) * PR_BITS_PER_BYTE)) & 0xff)))
  |  |  ------------------
  |  |  |  |  286|      0|#define PR_BITS_PER_BYTE    8
  |  |  ------------------
  |  |  |  Branch (131:22): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1056|      0|            }
 1057|      0|            break;
 1058|      4|        case CKG_GENERATE_COUNTER_XOR:
  ------------------
  |  | 1995|      4|#define CKG_GENERATE_COUNTER_XOR 0x00000004UL
  ------------------
  |  Branch (1058:9): [True: 4, False: 0]
  ------------------
 1059|      4|            iv[ivOffset] ^=
 1060|      4|                (PORT_GET_BYTE_BE(context->ivCounter, 0, ivNewCount) & ivMask);
  ------------------
  |  |  131|      4|    ((unsigned char)(((len) - (offset)-1) >= sizeof(value) ? 0 : (((value) >> (((len) - (offset)-1) * PR_BITS_PER_BYTE)) & 0xff)))
  |  |  ------------------
  |  |  |  |  286|      4|#define PR_BITS_PER_BYTE    8
  |  |  ------------------
  |  |  |  Branch (131:22): [True: 0, False: 4]
  |  |  ------------------
  ------------------
 1061|     32|            for (i = 1; i < ivNewCount; i++) {
  ------------------
  |  Branch (1061:25): [True: 28, False: 4]
  ------------------
 1062|     28|                iv[ivOffset + i] ^=
 1063|     28|                    PORT_GET_BYTE_BE(context->ivCounter, i, ivNewCount);
  ------------------
  |  |  131|     28|    ((unsigned char)(((len) - (offset)-1) >= sizeof(value) ? 0 : (((value) >> (((len) - (offset)-1) * PR_BITS_PER_BYTE)) & 0xff)))
  |  |  ------------------
  |  |  |  |  286|     28|#define PR_BITS_PER_BYTE    8
  |  |  ------------------
  |  |  |  Branch (131:22): [True: 0, False: 28]
  |  |  ------------------
  ------------------
 1064|     28|            }
 1065|      4|            break;
 1066|      0|        case CKG_GENERATE_RANDOM:
  ------------------
  |  | 1994|      0|#define CKG_GENERATE_RANDOM 0x00000003UL
  ------------------
  |  Branch (1066:9): [True: 0, False: 4]
  ------------------
 1067|      0|            ivSave = iv[ivOffset] & ~ivMask;
 1068|      0|            rv = PK11_GenerateRandom(iv + ivOffset, ivNewCount);
 1069|      0|            iv[ivOffset] = ivSave | (iv[ivOffset] & ivMask);
 1070|      0|            if (rv != SECSuccess) {
  ------------------
  |  Branch (1070:17): [True: 0, False: 0]
  ------------------
 1071|      0|                return rv;
 1072|      0|            }
 1073|      0|            break;
 1074|      4|    }
 1075|      4|    context->ivCounter++;
 1076|      4|    return SECSuccess;
 1077|      4|}

PK11_MapError:
   37|  13.6k|{
   38|       |
   39|  13.6k|    switch (rv) {
   40|      0|#define MAPERROR(x, y) \
   41|      0|    case x:            \
   42|      0|        return y;
   43|       |
   44|      0|#endif
   45|       |
   46|       |    /* the guts mapping */
   47|       |    /* clang-format off */
   48|      0|    MAPERROR(CKR_OK, 0)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
   49|      0|    MAPERROR(CKR_CANCEL, SEC_ERROR_IO)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
   50|      0|    MAPERROR(CKR_HOST_MEMORY, SEC_ERROR_NO_MEMORY)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
   51|      0|    MAPERROR(CKR_SLOT_ID_INVALID, SEC_ERROR_BAD_DATA)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
   52|      1|    MAPERROR(CKR_ARGUMENTS_BAD, SEC_ERROR_INVALID_ARGS)
  ------------------
  |  |   41|      1|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 1, False: 13.6k]
  |  |  ------------------
  |  |   42|      1|        return y;
  ------------------
   53|      0|    MAPERROR(CKR_ATTRIBUTE_READ_ONLY, SEC_ERROR_READ_ONLY)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
   54|      0|    MAPERROR(CKR_ATTRIBUTE_SENSITIVE, SEC_ERROR_IO) /* XX SENSITIVE */
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
   55|      0|    MAPERROR(CKR_ATTRIBUTE_TYPE_INVALID, SEC_ERROR_BAD_DATA)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
   56|     22|    MAPERROR(CKR_ATTRIBUTE_VALUE_INVALID, SEC_ERROR_BAD_DATA)
  ------------------
  |  |   41|     22|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 22, False: 13.5k]
  |  |  ------------------
  |  |   42|     22|        return y;
  ------------------
   57|      0|    MAPERROR(CKR_BUFFER_TOO_SMALL, SEC_ERROR_OUTPUT_LEN)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
   58|      0|    MAPERROR(CKR_DATA_INVALID, SEC_ERROR_BAD_DATA)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
   59|      0|    MAPERROR(CKR_DATA_LEN_RANGE, SEC_ERROR_INPUT_LEN)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
   60|     14|    MAPERROR(CKR_DEVICE_ERROR, SEC_ERROR_PKCS11_DEVICE_ERROR)
  ------------------
  |  |   41|     14|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 14, False: 13.5k]
  |  |  ------------------
  |  |   42|     14|        return y;
  ------------------
   61|      0|    MAPERROR(CKR_DEVICE_MEMORY, SEC_ERROR_NO_MEMORY)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
   62|      0|    MAPERROR(CKR_DEVICE_REMOVED, SEC_ERROR_NO_TOKEN)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
   63|    111|    MAPERROR(CKR_DOMAIN_PARAMS_INVALID, SEC_ERROR_INVALID_KEY)
  ------------------
  |  |   41|    111|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 111, False: 13.4k]
  |  |  ------------------
  |  |   42|    111|        return y;
  ------------------
   64|  10.9k|    MAPERROR(CKR_ENCRYPTED_DATA_INVALID, SEC_ERROR_BAD_DATA)
  ------------------
  |  |   41|  10.9k|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 10.9k, False: 2.67k]
  |  |  ------------------
  |  |   42|  10.9k|        return y;
  ------------------
   65|      0|    MAPERROR(CKR_ENCRYPTED_DATA_LEN_RANGE, SEC_ERROR_BAD_DATA)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
   66|      0|    MAPERROR(CKR_FUNCTION_CANCELED, SEC_ERROR_LIBRARY_FAILURE)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
   67|      0|    MAPERROR(CKR_FUNCTION_FAILED, SEC_ERROR_PKCS11_FUNCTION_FAILED)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
   68|      0|    MAPERROR(CKR_FUNCTION_NOT_PARALLEL, SEC_ERROR_LIBRARY_FAILURE)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
   69|      0|    MAPERROR(CKR_FUNCTION_NOT_SUPPORTED, PR_NOT_IMPLEMENTED_ERROR)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
   70|     71|    MAPERROR(CKR_GENERAL_ERROR, SEC_ERROR_PKCS11_GENERAL_ERROR)
  ------------------
  |  |   41|     71|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 71, False: 13.5k]
  |  |  ------------------
  |  |   42|     71|        return y;
  ------------------
   71|      0|    MAPERROR(CKR_KEY_HANDLE_INVALID, SEC_ERROR_INVALID_KEY)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
   72|     77|    MAPERROR(CKR_KEY_SIZE_RANGE, SEC_ERROR_INVALID_KEY)
  ------------------
  |  |   41|     77|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 77, False: 13.5k]
  |  |  ------------------
  |  |   42|     77|        return y;
  ------------------
   73|      0|    MAPERROR(CKR_KEY_TYPE_INCONSISTENT, SEC_ERROR_INVALID_KEY)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
   74|      9|    MAPERROR(CKR_MECHANISM_INVALID, SEC_ERROR_INVALID_ALGORITHM)
  ------------------
  |  |   41|      9|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 9, False: 13.6k]
  |  |  ------------------
  |  |   42|      9|        return y;
  ------------------
   75|      0|    MAPERROR(CKR_MECHANISM_PARAM_INVALID, SEC_ERROR_BAD_DATA)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
   76|      0|    MAPERROR(CKR_NO_EVENT, SEC_ERROR_NO_EVENT)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
   77|      0|    MAPERROR(CKR_OBJECT_HANDLE_INVALID, SEC_ERROR_BAD_DATA)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
   78|      0|    MAPERROR(CKR_OPERATION_ACTIVE, SEC_ERROR_LIBRARY_FAILURE)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
   79|      0|    MAPERROR(CKR_OPERATION_NOT_INITIALIZED, SEC_ERROR_LIBRARY_FAILURE)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
   80|      0|    MAPERROR(CKR_PIN_INCORRECT, SEC_ERROR_BAD_PASSWORD)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
   81|      0|    MAPERROR(CKR_PIN_INVALID, SEC_ERROR_INVALID_PASSWORD)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
   82|      0|    MAPERROR(CKR_PIN_LEN_RANGE, SEC_ERROR_INVALID_PASSWORD)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
   83|      0|    MAPERROR(CKR_PIN_EXPIRED, SEC_ERROR_EXPIRED_PASSWORD)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
   84|      0|    MAPERROR(CKR_PIN_LOCKED, SEC_ERROR_LOCKED_PASSWORD)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
   85|      0|    MAPERROR(CKR_SESSION_CLOSED, SEC_ERROR_LIBRARY_FAILURE)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
   86|      0|    MAPERROR(CKR_SESSION_COUNT, SEC_ERROR_NO_MEMORY) /* XXXX? */
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
   87|      0|    MAPERROR(CKR_SESSION_HANDLE_INVALID, SEC_ERROR_BAD_DATA)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
   88|      0|    MAPERROR(CKR_SESSION_PARALLEL_NOT_SUPPORTED, SEC_ERROR_LIBRARY_FAILURE)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
   89|      0|    MAPERROR(CKR_SESSION_READ_ONLY, SEC_ERROR_READ_ONLY)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
   90|  2.34k|    MAPERROR(CKR_SIGNATURE_INVALID, SEC_ERROR_BAD_SIGNATURE)
  ------------------
  |  |   41|  2.34k|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 2.34k, False: 11.2k]
  |  |  ------------------
  |  |   42|  2.34k|        return y;
  ------------------
   91|      0|    MAPERROR(CKR_SIGNATURE_LEN_RANGE, SEC_ERROR_BAD_SIGNATURE)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
   92|      0|    MAPERROR(CKR_TEMPLATE_INCOMPLETE, SEC_ERROR_BAD_DATA)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
   93|     30|    MAPERROR(CKR_TEMPLATE_INCONSISTENT, SEC_ERROR_BAD_DATA)
  ------------------
  |  |   41|     30|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 30, False: 13.5k]
  |  |  ------------------
  |  |   42|     30|        return y;
  ------------------
   94|      0|    MAPERROR(CKR_TOKEN_NOT_PRESENT, SEC_ERROR_NO_TOKEN)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
   95|      0|    MAPERROR(CKR_TOKEN_NOT_RECOGNIZED, SEC_ERROR_IO)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
   96|      0|    MAPERROR(CKR_TOKEN_WRITE_PROTECTED, SEC_ERROR_READ_ONLY)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
   97|      0|    MAPERROR(CKR_UNWRAPPING_KEY_HANDLE_INVALID, SEC_ERROR_INVALID_KEY)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
   98|      0|    MAPERROR(CKR_UNWRAPPING_KEY_SIZE_RANGE, SEC_ERROR_INVALID_KEY)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
   99|      0|    MAPERROR(CKR_UNWRAPPING_KEY_TYPE_INCONSISTENT, SEC_ERROR_INVALID_KEY)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
  100|      0|    MAPERROR(CKR_USER_ALREADY_LOGGED_IN, 0)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
  101|      0|    MAPERROR(CKR_USER_NOT_LOGGED_IN, SEC_ERROR_TOKEN_NOT_LOGGED_IN)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
  102|      0|    MAPERROR(CKR_USER_PIN_NOT_INITIALIZED, SEC_ERROR_NO_TOKEN)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
  103|      0|    MAPERROR(CKR_USER_TYPE_INVALID, SEC_ERROR_LIBRARY_FAILURE)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
  104|      0|    MAPERROR(CKR_WRAPPED_KEY_INVALID, SEC_ERROR_INVALID_KEY)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
  105|      0|    MAPERROR(CKR_WRAPPED_KEY_LEN_RANGE, SEC_ERROR_INVALID_KEY)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
  106|      0|    MAPERROR(CKR_WRAPPING_KEY_HANDLE_INVALID, SEC_ERROR_INVALID_KEY)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
  107|      0|    MAPERROR(CKR_WRAPPING_KEY_SIZE_RANGE, SEC_ERROR_INVALID_KEY)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
  108|      0|    MAPERROR(CKR_WRAPPING_KEY_TYPE_INCONSISTENT, SEC_ERROR_INVALID_KEY)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
  109|      0|    MAPERROR(CKR_VENDOR_DEFINED, SEC_ERROR_LIBRARY_FAILURE)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
  110|      0|    MAPERROR(CKR_NSS_CERTDB_FAILED, SEC_ERROR_BAD_DATABASE)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
  111|      0|    MAPERROR(CKR_NSS_KEYDB_FAILED, SEC_ERROR_BAD_DATABASE)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
  112|      0|    MAPERROR(CKR_CANT_LOCK, SEC_ERROR_INCOMPATIBLE_PKCS11)
  ------------------
  |  |   41|      0|    case x:            \
  |  |  ------------------
  |  |  |  Branch (41:5): [True: 0, False: 13.6k]
  |  |  ------------------
  |  |   42|      0|        return y;
  ------------------
  113|       |/* clang-format on */
  114|       |
  115|       |#ifdef PK11_ERROR_USE_ARRAY
  116|       |};
  117|       |
  118|       |int
  119|       |PK11_MapError(CK_RV rv)
  120|       |{
  121|       |    int size = sizeof(pk11_error_map) / sizeof(pk11_error_map[0]);
  122|       |
  123|       |    for (i = 0; i < size; i++) {
  124|       |        if (pk11_error_map[i].pk11_error == rv) {
  125|       |            return pk11_error_map[i].sec_error;
  126|       |        }
  127|       |    }
  128|       |    return SEC_ERROR_UNKNOWN_PKCS11_ERROR;
  129|       |}
  130|       |
  131|       |#else
  132|       |
  133|       |            /* clang-format off */
  134|      0|    default :
  ------------------
  |  Branch (134:5): [True: 0, False: 13.6k]
  ------------------
  135|      0|        break;
  136|       |            /* clang-format on */
  137|  13.6k|    }
  138|      0|    return SEC_ERROR_UNKNOWN_PKCS11_ERROR;
  139|  13.6k|}

PK11_HPKE_DestroyContext:
  207|  9.36k|{
  208|  9.36k|    if (!cx) {
  ------------------
  |  Branch (208:9): [True: 9.36k, False: 0]
  ------------------
  209|  9.36k|        return;
  210|  9.36k|    }
  211|       |
  212|      0|    if (cx->aeadContext) {
  ------------------
  |  Branch (212:9): [True: 0, False: 0]
  ------------------
  213|      0|        PK11_DestroyContext((PK11Context *)cx->aeadContext, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  214|      0|        cx->aeadContext = NULL;
  215|      0|    }
  216|      0|    PK11_FreeSymKey(cx->exporterSecret);
  217|      0|    PK11_FreeSymKey(cx->sharedSecret);
  218|      0|    PK11_FreeSymKey(cx->key);
  219|      0|    PK11_FreeSymKey(cx->psk);
  220|      0|    SECITEM_FreeItem(cx->pskId, PR_TRUE);
  ------------------
  |  |  108|      0|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                  SECITEM_FreeItem(cx->pskId, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  221|      0|    SECITEM_FreeItem(cx->baseNonce, PR_TRUE);
  ------------------
  |  |  108|      0|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                  SECITEM_FreeItem(cx->baseNonce, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  222|      0|    SECITEM_FreeItem(cx->encapPubKey, PR_TRUE);
  ------------------
  |  |  108|      0|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                  SECITEM_FreeItem(cx->encapPubKey, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  223|      0|    cx->exporterSecret = NULL;
  224|      0|    cx->sharedSecret = NULL;
  225|      0|    cx->key = NULL;
  226|      0|    cx->psk = NULL;
  227|      0|    cx->pskId = NULL;
  228|      0|    cx->baseNonce = NULL;
  229|      0|    cx->encapPubKey = NULL;
  230|      0|    if (freeit) {
  ------------------
  |  Branch (230:9): [True: 0, False: 0]
  ------------------
  231|      0|        PORT_ZFree(cx, sizeof(HpkeContext));
  ------------------
  |  |   75|      0|#define PORT_ZFree PORT_ZFree_Util
  ------------------
  232|      0|    }
  233|      0|}

SECMOD_NewListLock:
   21|      1|{
   22|      1|    return NSSRWLock_New(10, "moduleListLock");
  ------------------
  |  |   49|      1|#define NSSRWLock_New NSSRWLock_New_Util
  ------------------
   23|      1|}
SECMOD_DestroyListLock:
   30|      1|{
   31|      1|    NSSRWLock_Destroy(lock);
  ------------------
  |  |   45|      1|#define NSSRWLock_Destroy NSSRWLock_Destroy_Util
  ------------------
   32|      1|}
SECMOD_GetReadLock:
   40|  3.88k|{
   41|  3.88k|    NSSRWLock_LockRead(modLock);
  ------------------
  |  |   47|  3.88k|#define NSSRWLock_LockRead NSSRWLock_LockRead_Util
  ------------------
   42|  3.88k|}
SECMOD_ReleaseReadLock:
   49|  3.88k|{
   50|  3.88k|    NSSRWLock_UnlockRead(modLock);
  ------------------
  |  |   50|  3.88k|#define NSSRWLock_UnlockRead NSSRWLock_UnlockRead_Util
  ------------------
   51|  3.88k|}
SECMOD_GetWriteLock:
   58|      2|{
   59|      2|    NSSRWLock_LockWrite(modLock);
  ------------------
  |  |   48|      2|#define NSSRWLock_LockWrite NSSRWLock_LockWrite_Util
  ------------------
   60|      2|}
SECMOD_ReleaseWriteLock:
   68|      2|{
   69|      2|    NSSRWLock_UnlockWrite(modLock);
  ------------------
  |  |   51|      2|#define NSSRWLock_UnlockWrite NSSRWLock_UnlockWrite_Util
  ------------------
   70|      2|}

secmod_ModuleInit:
  216|      1|{
  217|      1|    CK_C_INITIALIZE_ARGS moduleArgs;
  218|      1|    CK_VOID_PTR pInitArgs;
  219|      1|    CK_RV crv;
  220|       |
  221|      1|    if (reload) {
  ------------------
  |  Branch (221:9): [True: 1, False: 0]
  ------------------
  222|      1|        *reload = NULL;
  223|      1|    }
  224|       |
  225|      1|    if (!mod || !alreadyLoaded) {
  ------------------
  |  Branch (225:9): [True: 0, False: 1]
  |  Branch (225:17): [True: 0, False: 1]
  ------------------
  226|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  227|      0|        return SECFailure;
  228|      0|    }
  229|       |
  230|      1|    if (mod->libraryParams == NULL) {
  ------------------
  |  Branch (230:9): [True: 0, False: 1]
  ------------------
  231|      0|        if (mod->isThreadSafe) {
  ------------------
  |  Branch (231:13): [True: 0, False: 0]
  ------------------
  232|      0|            pInitArgs = (void *)&secmodLockFunctions;
  233|      0|        } else {
  234|      0|            pInitArgs = NULL;
  235|      0|        }
  236|      1|    } else {
  237|      1|        if (mod->isThreadSafe) {
  ------------------
  |  Branch (237:13): [True: 1, False: 0]
  ------------------
  238|      1|            moduleArgs = secmodLockFunctions;
  239|      1|        } else {
  240|      0|            moduleArgs = secmodNoLockArgs;
  241|      0|        }
  242|      1|        moduleArgs.LibraryParameters = (void *)mod->libraryParams;
  243|      1|        pInitArgs = &moduleArgs;
  244|      1|    }
  245|      1|    crv = PK11_GETTAB(mod)->C_Initialize(pInitArgs);
  ------------------
  |  |  102|      1|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
  246|      1|    if (CKR_CRYPTOKI_ALREADY_INITIALIZED == crv) {
  ------------------
  |  | 1521|      1|#define CKR_CRYPTOKI_ALREADY_INITIALIZED 0x00000191UL
  ------------------
  |  Branch (246:9): [True: 0, False: 1]
  ------------------
  247|      0|        SECMODModule *oldModule = NULL;
  248|       |
  249|       |        /* Library has already been loaded once, if caller expects it, and it
  250|       |         * has additional configuration, try reloading it as well. */
  251|      0|        if (reload != NULL && mod->libraryParams) {
  ------------------
  |  Branch (251:13): [True: 0, False: 0]
  |  Branch (251:31): [True: 0, False: 0]
  ------------------
  252|      0|            oldModule = secmod_FindModuleByFuncPtr(mod->functionList);
  253|      0|        }
  254|       |        /* Library has been loaded by NSS. It means it may be capable of
  255|       |         * reloading */
  256|      0|        if (oldModule) {
  ------------------
  |  Branch (256:13): [True: 0, False: 0]
  ------------------
  257|      0|            SECStatus rv;
  258|      0|            rv = secmod_handleReload(oldModule, mod);
  259|      0|            if (rv == SECSuccess) {
  ------------------
  |  Branch (259:17): [True: 0, False: 0]
  ------------------
  260|       |                /* This module should go away soon, since we've
  261|       |                 * simply expanded the slots on the old module.
  262|       |                 * When it goes away, it should not Finalize since
  263|       |                 * that will close our old module as well. Setting
  264|       |                 * the function list to NULL will prevent that close */
  265|      0|                mod->functionList = NULL;
  266|      0|                *reload = oldModule;
  267|      0|                return SECSuccess;
  268|      0|            }
  269|      0|            SECMOD_DestroyModule(oldModule);
  270|      0|        }
  271|       |        /* reload not possible, fall back to old semantics */
  272|      0|        if (!enforceAlreadyInitializedError) {
  ------------------
  |  Branch (272:13): [True: 0, False: 0]
  ------------------
  273|      0|            *alreadyLoaded = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  274|      0|            return SECSuccess;
  275|      0|        }
  276|      0|    }
  277|      1|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|      1|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (277:9): [True: 0, False: 1]
  ------------------
  278|      0|        if (!mod->isThreadSafe ||
  ------------------
  |  Branch (278:13): [True: 0, False: 0]
  ------------------
  279|      0|            crv == CKR_NSS_CERTDB_FAILED ||
  ------------------
  |  |  376|      0|#define CKR_NSS_CERTDB_FAILED (CKR_NSS + 1)
  |  |  ------------------
  |  |  |  |  374|      0|#define CKR_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKR_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (279:13): [True: 0, False: 0]
  ------------------
  280|      0|            crv == CKR_NSS_KEYDB_FAILED) {
  ------------------
  |  |  377|      0|#define CKR_NSS_KEYDB_FAILED (CKR_NSS + 2)
  |  |  ------------------
  |  |  |  |  374|      0|#define CKR_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKR_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (280:13): [True: 0, False: 0]
  ------------------
  281|      0|            PORT_SetError(PK11_MapError(crv));
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  282|      0|            return SECFailure;
  283|      0|        }
  284|       |        /* If we had attempted to init a single threaded module "with"
  285|       |         * parameters and it failed, should we retry "without" parameters?
  286|       |         * (currently we don't retry in this scenario) */
  287|       |
  288|      0|        if (!loadSingleThreadedModules) {
  ------------------
  |  Branch (288:13): [True: 0, False: 0]
  ------------------
  289|      0|            PORT_SetError(SEC_ERROR_INCOMPATIBLE_PKCS11);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  290|      0|            return SECFailure;
  291|      0|        }
  292|       |        /* If we arrive here, the module failed a ThreadSafe init. */
  293|      0|        mod->isThreadSafe = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  294|      0|        if (!mod->libraryParams) {
  ------------------
  |  Branch (294:13): [True: 0, False: 0]
  ------------------
  295|      0|            pInitArgs = NULL;
  296|      0|        } else {
  297|      0|            moduleArgs = secmodNoLockArgs;
  298|      0|            moduleArgs.LibraryParameters = (void *)mod->libraryParams;
  299|      0|            pInitArgs = &moduleArgs;
  300|      0|        }
  301|      0|        crv = PK11_GETTAB(mod)->C_Initialize(pInitArgs);
  ------------------
  |  |  102|      0|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
  302|      0|        if ((CKR_CRYPTOKI_ALREADY_INITIALIZED == crv) &&
  ------------------
  |  | 1521|      0|#define CKR_CRYPTOKI_ALREADY_INITIALIZED 0x00000191UL
  ------------------
  |  Branch (302:13): [True: 0, False: 0]
  ------------------
  303|      0|            (!enforceAlreadyInitializedError)) {
  ------------------
  |  Branch (303:13): [True: 0, False: 0]
  ------------------
  304|      0|            *alreadyLoaded = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  305|      0|            return SECSuccess;
  306|      0|        }
  307|      0|        if (crv != CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (307:13): [True: 0, False: 0]
  ------------------
  308|      0|            PORT_SetError(PK11_MapError(crv));
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  309|      0|            return SECFailure;
  310|      0|        }
  311|      0|    }
  312|      1|    return SECSuccess;
  313|      1|}
SECMOD_SetRootCerts:
  321|      2|{
  322|      2|    PK11PreSlotInfo *psi = NULL;
  323|      2|    int i;
  324|       |
  325|      2|    if (slot->hasRootCerts) {
  ------------------
  |  Branch (325:9): [True: 0, False: 2]
  ------------------
  326|      0|        for (i = 0; i < mod->slotInfoCount; i++) {
  ------------------
  |  Branch (326:21): [True: 0, False: 0]
  ------------------
  327|      0|            if (slot->slotID == mod->slotInfo[i].slotID) {
  ------------------
  |  Branch (327:17): [True: 0, False: 0]
  ------------------
  328|      0|                psi = &mod->slotInfo[i];
  329|      0|                break;
  330|      0|            }
  331|      0|        }
  332|      0|        if (psi == NULL) {
  ------------------
  |  Branch (332:13): [True: 0, False: 0]
  ------------------
  333|       |            /* allocate more slots */
  334|      0|            PK11PreSlotInfo *psi_list = (PK11PreSlotInfo *)
  335|      0|                PORT_ArenaAlloc(mod->arena,
  ------------------
  |  |   53|      0|#define PORT_ArenaAlloc PORT_ArenaAlloc_Util
  ------------------
  336|      0|                                (mod->slotInfoCount + 1) * sizeof(PK11PreSlotInfo));
  337|       |            /* copy the old ones */
  338|      0|            if (mod->slotInfoCount > 0) {
  ------------------
  |  Branch (338:17): [True: 0, False: 0]
  ------------------
  339|      0|                PORT_Memcpy(psi_list, mod->slotInfo,
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
  340|      0|                            (mod->slotInfoCount) * sizeof(PK11PreSlotInfo));
  341|      0|            }
  342|       |            /* assign psi to the last new slot */
  343|      0|            psi = &psi_list[mod->slotInfoCount];
  344|      0|            psi->slotID = slot->slotID;
  345|      0|            psi->askpw = 0;
  346|      0|            psi->timeout = 0;
  347|      0|            psi->defaultFlags = 0;
  348|       |
  349|       |            /* increment module count & store new list */
  350|      0|            mod->slotInfo = psi_list;
  351|      0|            mod->slotInfoCount++;
  352|      0|        }
  353|      0|        psi->hasRootCerts = 1;
  354|      0|    }
  355|      2|}
secmod_DetermineModuleFunctionList:
  392|      2|{
  393|      2|    PRLibrary *library = NULL;
  394|      2|    CK_C_GetInterface ientry = NULL;
  395|      2|    CK_C_GetFunctionList fentry = NULL;
  396|      2|    char *disableUnload = NULL;
  397|       |#ifndef NSS_STATIC_SOFTOKEN
  398|       |    const char *nss_interface;
  399|       |    const char *nss_function;
  400|       |#endif
  401|      2|    CK_INTERFACE_PTR interface;
  402|       |
  403|       |    /* internal modules get loaded from their internal list */
  404|      2|    if (mod->internal && (mod->dllName == NULL)) {
  ------------------
  |  Branch (404:9): [True: 2, False: 0]
  |  Branch (404:26): [True: 2, False: 0]
  ------------------
  405|      2|#ifdef NSS_STATIC_SOFTOKEN
  406|      2|        ientry = (CK_C_GetInterface)NSC_GetInterface;
  407|       |#else
  408|       |        /*
  409|       |         * Loads softoken as a dynamic library,
  410|       |         * even though the rest of NSS assumes this as the "internal" module.
  411|       |         */
  412|       |        if (!softokenLib &&
  413|       |            PR_SUCCESS != PR_CallOnce(&loadSoftokenOnce, &softoken_LoadDSO))
  414|       |            return SECFailure;
  415|       |
  416|       |        PR_ATOMIC_INCREMENT(&softokenLoadCount);
  417|       |
  418|       |        if (mod->isFIPS) {
  419|       |            nss_interface = "FC_GetInterface";
  420|       |            nss_function = "FC_GetFunctionList";
  421|       |        } else {
  422|       |            nss_interface = "NSC_GetInterface";
  423|       |            nss_function = "NSC_GetFunctionList";
  424|       |        }
  425|       |
  426|       |        ientry = (CK_C_GetInterface)
  427|       |            PR_FindSymbol(softokenLib, nss_interface);
  428|       |        if (!ientry) {
  429|       |            fentry = (CK_C_GetFunctionList)
  430|       |                PR_FindSymbol(softokenLib, nss_function);
  431|       |            if (!fentry) {
  432|       |                return SECFailure;
  433|       |            }
  434|       |        }
  435|       |#endif
  436|       |
  437|      2|        if (mod->isModuleDB) {
  ------------------
  |  Branch (437:13): [True: 1, False: 1]
  ------------------
  438|      1|            mod->moduleDBFunc = (CK_C_GetFunctionList)
  439|      1|#ifdef NSS_STATIC_SOFTOKEN
  440|      1|                NSC_ModuleDBFunc;
  441|       |#else
  442|       |                PR_FindSymbol(softokenLib, "NSC_ModuleDBFunc");
  443|       |#endif
  444|      1|        }
  445|       |
  446|      2|        if (mod->moduleDBOnly) {
  ------------------
  |  Branch (446:13): [True: 1, False: 1]
  ------------------
  447|      1|            mod->loaded = PR_TRUE;
  ------------------
  |  |  437|      1|#define PR_TRUE 1
  ------------------
  448|      1|            return SECSuccess;
  449|      1|        }
  450|      2|    } else {
  451|       |        /* Not internal, load the DLL and look up C_GetFunctionList */
  452|      0|        if (mod->dllName == NULL) {
  ------------------
  |  Branch (452:13): [True: 0, False: 0]
  ------------------
  453|      0|            return SECFailure;
  454|      0|        }
  455|       |
  456|       |/* load the library. If this succeeds, then we have to remember to
  457|       | * unload the library if anything goes wrong from here on out...
  458|       | */
  459|       |#if defined(_WIN32)
  460|       |        if (nssUTF8_Length(mod->dllName, NULL)) {
  461|       |            wchar_t *dllNameWide = _NSSUTIL_UTF8ToWide(mod->dllName);
  462|       |            if (dllNameWide) {
  463|       |                PRLibSpec libSpec;
  464|       |                libSpec.type = PR_LibSpec_PathnameU;
  465|       |                libSpec.value.pathname_u = dllNameWide;
  466|       |                library = PR_LoadLibraryWithFlags(libSpec, 0);
  467|       |                PORT_Free(dllNameWide);
  468|       |            }
  469|       |        }
  470|       |        if (library == NULL) {
  471|       |            // fallback to system code page
  472|       |            library = PR_LoadLibrary(mod->dllName);
  473|       |        }
  474|       |#else
  475|      0|        library = PR_LoadLibrary(mod->dllName);
  476|      0|#endif // defined(_WIN32)
  477|      0|        mod->library = (void *)library;
  478|       |
  479|      0|        if (library == NULL) {
  ------------------
  |  Branch (479:13): [True: 0, False: 0]
  ------------------
  480|      0|            return SECFailure;
  481|      0|        }
  482|       |
  483|       |        /*
  484|       |         * now we need to get the entry point to find the function pointers
  485|       |         */
  486|      0|        if (!mod->moduleDBOnly) {
  ------------------
  |  Branch (486:13): [True: 0, False: 0]
  ------------------
  487|      0|            ientry = (CK_C_GetInterface)
  488|      0|                PR_FindSymbol(library, "C_GetInterface");
  489|      0|            if (!ientry) {
  ------------------
  |  Branch (489:17): [True: 0, False: 0]
  ------------------
  490|      0|                fentry = (CK_C_GetFunctionList)
  491|      0|                    PR_FindSymbol(library, "C_GetFunctionList");
  492|      0|            }
  493|      0|        }
  494|      0|        if (mod->isModuleDB) {
  ------------------
  |  Branch (494:13): [True: 0, False: 0]
  ------------------
  495|      0|            mod->moduleDBFunc = (void *)
  496|      0|                PR_FindSymbol(library, "NSS_ReturnModuleSpecData");
  497|      0|        }
  498|      0|        if (mod->moduleDBFunc == NULL)
  ------------------
  |  Branch (498:13): [True: 0, False: 0]
  ------------------
  499|      0|            mod->isModuleDB = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  500|      0|        if ((ientry == NULL) && (fentry == NULL)) {
  ------------------
  |  Branch (500:13): [True: 0, False: 0]
  |  Branch (500:33): [True: 0, False: 0]
  ------------------
  501|      0|            if (mod->isModuleDB) {
  ------------------
  |  Branch (501:17): [True: 0, False: 0]
  ------------------
  502|      0|                mod->loaded = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  503|      0|                mod->moduleDBOnly = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  504|      0|                return SECSuccess;
  505|      0|            }
  506|      0|            PR_UnloadLibrary(library);
  507|      0|            return SECFailure;
  508|      0|        }
  509|      0|    }
  510|       |
  511|       |    /*
  512|       |     * We need to get the function list
  513|       |     */
  514|      1|    if (ientry) {
  ------------------
  |  Branch (514:9): [True: 1, False: 0]
  ------------------
  515|       |        /* we first try to get a FORK_SAFE interface */
  516|      1|        if ((*ientry)((CK_UTF8CHAR_PTR) "PKCS 11", NULL, &interface,
  ------------------
  |  Branch (516:13): [True: 0, False: 1]
  ------------------
  517|      1|                      CKF_INTERFACE_FORK_SAFE) != CKR_OK) {
  ------------------
  |  | 1576|      1|#define CKF_INTERFACE_FORK_SAFE 0x00000001UL
  ------------------
                                    CKF_INTERFACE_FORK_SAFE) != CKR_OK) {
  ------------------
  |  | 1388|      1|#define CKR_OK 0x00000000UL
  ------------------
  518|       |            /* one is not appearantly available, get a non-fork safe version */
  519|      0|            if ((*ientry)((CK_UTF8CHAR_PTR) "PKCS 11", NULL, &interface, 0) != CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (519:17): [True: 0, False: 0]
  ------------------
  520|      0|                goto fail;
  521|      0|            }
  522|      0|        }
  523|      1|        mod->functionList = interface->pFunctionList;
  524|      1|        mod->flags = interface->flags;
  525|       |        /* if we have a fips indicator, grab it */
  526|      1|        if ((*ientry)((CK_UTF8CHAR_PTR) "Vendor NSS FIPS Interface", NULL,
  ------------------
  |  Branch (526:13): [True: 1, False: 0]
  ------------------
  527|      1|                      &interface, 0) == CKR_OK) {
  ------------------
  |  | 1388|      1|#define CKR_OK 0x00000000UL
  ------------------
  528|      1|            mod->fipsIndicator = ((CK_NSS_FIPS_FUNCTIONS *)(interface->pFunctionList))->NSC_NSSGetFIPSStatus;
  529|      1|        }
  530|      1|    } else {
  531|      0|        if ((*fentry)((CK_FUNCTION_LIST_PTR *)&mod->functionList) != CKR_OK)
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (531:13): [True: 0, False: 0]
  ------------------
  532|      0|            goto fail;
  533|      0|        mod->flags = 0;
  534|      0|    }
  535|       |
  536|      1|#ifdef DEBUG_MODULE
  537|      1|    modToDBG = PR_GetEnvSecure("NSS_DEBUG_PKCS11_MODULE");
  538|      1|    if (modToDBG && strcmp(mod->commonName, modToDBG) == 0) {
  ------------------
  |  Branch (538:9): [True: 0, False: 1]
  |  Branch (538:21): [True: 0, False: 0]
  ------------------
  539|      0|        mod->functionList = (void *)nss_InsertDeviceLog(
  540|      0|            (CK_FUNCTION_LIST_3_0_PTR)mod->functionList);
  541|      0|    }
  542|      1|#endif
  543|       |
  544|      1|    return SECSuccess;
  545|       |
  546|      0|fail:
  547|      0|    mod->functionList = NULL;
  548|      0|    disableUnload = PR_GetEnvSecure("NSS_DISABLE_UNLOAD");
  549|      0|    if (library && !disableUnload) {
  ------------------
  |  Branch (549:9): [True: 0, False: 0]
  |  Branch (549:20): [True: 0, False: 0]
  ------------------
  550|      0|        PR_UnloadLibrary(library);
  551|      0|    }
  552|      0|    return SECFailure;
  553|      1|}
secmod_InitializeModuleAndGetSlotInfo:
  557|      1|{
  558|      1|    CK_INFO info;
  559|      1|    CK_ULONG slotCount = 0;
  560|      1|    SECStatus rv;
  561|      1|    PRBool alreadyLoaded = PR_FALSE;
  ------------------
  |  |  438|      1|#define PR_FALSE 0
  ------------------
  562|       |
  563|       |    /* This test operation makes sure our locking system is
  564|       |     * consistent even if we are using non-thread safe tokens by
  565|       |     * simulating unsafe tokens with safe ones. */
  566|      1|    mod->isThreadSafe = !PR_GetEnvSecure("NSS_FORCE_TOKEN_LOCK");
  567|       |
  568|       |    /* Now we initialize the module */
  569|      1|    rv = secmod_ModuleInit(mod, oldModule, &alreadyLoaded);
  570|      1|    if (rv != SECSuccess) {
  ------------------
  |  Branch (570:9): [True: 0, False: 1]
  ------------------
  571|      0|        goto fail;
  572|      0|    }
  573|       |
  574|       |    /* module has been reloaded, this module itself is done,
  575|       |     * return to the caller */
  576|      1|    if (mod->functionList == NULL) {
  ------------------
  |  Branch (576:9): [True: 0, False: 1]
  ------------------
  577|      0|        mod->loaded = PR_TRUE; /* technically the module is loaded.. */
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  578|      0|        return SECSuccess;
  579|      0|    }
  580|       |
  581|       |    /* check the version number */
  582|      1|    if (PK11_GETTAB(mod)->C_GetInfo(&info) != CKR_OK)
  ------------------
  |  |  102|      1|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
                  if (PK11_GETTAB(mod)->C_GetInfo(&info) != CKR_OK)
  ------------------
  |  | 1388|      1|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (582:9): [True: 0, False: 1]
  ------------------
  583|      0|        goto fail2;
  584|      1|    if (info.cryptokiVersion.major < 2)
  ------------------
  |  Branch (584:9): [True: 0, False: 1]
  ------------------
  585|      0|        goto fail2;
  586|       |    /* all 2.0 are a priori *not* thread safe */
  587|      1|    if ((info.cryptokiVersion.major == 2) && (info.cryptokiVersion.minor < 1)) {
  ------------------
  |  Branch (587:9): [True: 0, False: 1]
  |  Branch (587:46): [True: 0, False: 0]
  ------------------
  588|      0|        if (!loadSingleThreadedModules) {
  ------------------
  |  Branch (588:13): [True: 0, False: 0]
  ------------------
  589|      0|            PORT_SetError(SEC_ERROR_INCOMPATIBLE_PKCS11);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  590|      0|            goto fail2;
  591|      0|        } else {
  592|      0|            mod->isThreadSafe = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  593|      0|        }
  594|      0|    }
  595|      1|    mod->cryptokiVersion = info.cryptokiVersion;
  596|       |
  597|       |    /* If we don't have a common name, get it from the PKCS 11 module */
  598|      1|    if ((mod->commonName == NULL) || (mod->commonName[0] == 0)) {
  ------------------
  |  Branch (598:9): [True: 0, False: 1]
  |  Branch (598:38): [True: 0, False: 1]
  ------------------
  599|      0|        mod->commonName = PK11_MakeString(mod->arena, NULL,
  600|      0|                                          (char *)info.libraryDescription, sizeof(info.libraryDescription));
  601|      0|        if (mod->commonName == NULL)
  ------------------
  |  Branch (601:13): [True: 0, False: 0]
  ------------------
  602|      0|            goto fail2;
  603|      0|    }
  604|       |
  605|       |    /* initialize the Slots */
  606|      1|    if (PK11_GETTAB(mod)->C_GetSlotList(CK_FALSE, NULL, &slotCount) == CKR_OK) {
  ------------------
  |  |  102|      1|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
                  if (PK11_GETTAB(mod)->C_GetSlotList(CK_FALSE, NULL, &slotCount) == CKR_OK) {
  ------------------
  |  |   23|      1|#define CK_FALSE 0
  ------------------
                  if (PK11_GETTAB(mod)->C_GetSlotList(CK_FALSE, NULL, &slotCount) == CKR_OK) {
  ------------------
  |  | 1388|      1|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (606:9): [True: 1, False: 0]
  ------------------
  607|      1|        CK_SLOT_ID *slotIDs;
  608|      1|        int i;
  609|      1|        CK_RV crv;
  610|       |
  611|      1|        mod->slots = (PK11SlotInfo **)PORT_ArenaAlloc(mod->arena,
  ------------------
  |  |   53|      1|#define PORT_ArenaAlloc PORT_ArenaAlloc_Util
  ------------------
  612|      1|                                                      sizeof(PK11SlotInfo *) * slotCount);
  613|      1|        if (mod->slots == NULL)
  ------------------
  |  Branch (613:13): [True: 0, False: 1]
  ------------------
  614|      0|            goto fail2;
  615|       |
  616|      1|        slotIDs = (CK_SLOT_ID *)PORT_Alloc(sizeof(CK_SLOT_ID) * slotCount);
  ------------------
  |  |   52|      1|#define PORT_Alloc PORT_Alloc_Util
  ------------------
  617|      1|        if (slotIDs == NULL) {
  ------------------
  |  Branch (617:13): [True: 0, False: 1]
  ------------------
  618|      0|            goto fail2;
  619|      0|        }
  620|      1|        crv = PK11_GETTAB(mod)->C_GetSlotList(CK_FALSE, slotIDs, &slotCount);
  ------------------
  |  |  102|      1|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
                      crv = PK11_GETTAB(mod)->C_GetSlotList(CK_FALSE, slotIDs, &slotCount);
  ------------------
  |  |   23|      1|#define CK_FALSE 0
  ------------------
  621|      1|        if (crv != CKR_OK) {
  ------------------
  |  | 1388|      1|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (621:13): [True: 0, False: 1]
  ------------------
  622|      0|            PORT_Free(slotIDs);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
  623|      0|            goto fail2;
  624|      0|        }
  625|       |
  626|       |        /* Initialize each slot */
  627|      3|        for (i = 0; i < (int)slotCount; i++) {
  ------------------
  |  Branch (627:21): [True: 2, False: 1]
  ------------------
  628|      2|            mod->slots[i] = PK11_NewSlotInfo(mod);
  629|      2|            PK11_InitSlot(mod, slotIDs[i], mod->slots[i]);
  630|       |            /* look down the slot info table */
  631|      2|            PK11_LoadSlotList(mod->slots[i], mod->slotInfo, mod->slotInfoCount);
  632|      2|            SECMOD_SetRootCerts(mod->slots[i], mod);
  633|       |            /* explicitly mark the internal slot as such if IsInternalKeySlot()
  634|       |             * is set */
  635|      2|            if (secmod_IsInternalKeySlot(mod) && (i == (mod->isFIPS ? 0 : 1))) {
  ------------------
  |  Branch (635:17): [True: 2, False: 0]
  |  Branch (635:50): [True: 1, False: 1]
  |  Branch (635:57): [True: 0, False: 2]
  ------------------
  636|      1|                pk11_SetInternalKeySlotIfFirst(mod->slots[i]);
  637|      1|            }
  638|      2|        }
  639|      1|        mod->slotCount = slotCount;
  640|      1|        mod->slotInfoCount = 0;
  641|      1|        PORT_Free(slotIDs);
  ------------------
  |  |   60|      1|#define PORT_Free PORT_Free_Util
  ------------------
  642|      1|    }
  643|       |
  644|      1|    mod->loaded = PR_TRUE;
  ------------------
  |  |  437|      1|#define PR_TRUE 1
  ------------------
  645|      1|    mod->moduleID = nextModuleID++;
  646|      1|    return SECSuccess;
  647|      0|fail2:
  648|      0|    if (enforceAlreadyInitializedError || (!alreadyLoaded)) {
  ------------------
  |  Branch (648:9): [True: 0, False: 0]
  |  Branch (648:43): [True: 0, False: 0]
  ------------------
  649|      0|        PK11_GETTAB(mod)->C_Finalize(NULL);
  ------------------
  |  |  102|      0|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
  650|      0|    }
  651|      0|fail:
  652|      0|    mod->functionList = NULL;
  653|      0|    return SECFailure;
  654|      0|}
secmod_LoadPKCS11Module:
  661|      2|{
  662|      2|    SECStatus rv = SECFailure;
  663|      2|    if (mod->loaded) {
  ------------------
  |  Branch (663:9): [True: 0, False: 2]
  ------------------
  664|      0|        return SECSuccess;
  665|      0|    }
  666|       |
  667|      2|    mod->fipsIndicator = NULL;
  668|       |
  669|      2|    rv = secmod_DetermineModuleFunctionList(mod);
  670|      2|    if (rv != SECSuccess) { // The error code is set up by secmod_DetermineModuleFunctionList.
  ------------------
  |  Branch (670:9): [True: 0, False: 2]
  ------------------
  671|      0|        return rv;
  672|      0|    }
  673|       |
  674|      2|    if (mod->loaded == PR_TRUE) {
  ------------------
  |  |  437|      2|#define PR_TRUE 1
  ------------------
  |  Branch (674:9): [True: 1, False: 1]
  ------------------
  675|      1|        return SECSuccess;
  676|      1|    }
  677|       |
  678|      1|    rv = secmod_InitializeModuleAndGetSlotInfo(mod, oldModule);
  679|      1|    if (rv != SECSuccess) { // The error code is set up by secmod_InitializeModuleAndGetSlotInfo
  ------------------
  |  Branch (679:9): [True: 0, False: 1]
  ------------------
  680|      0|        return rv;
  681|      0|    }
  682|       |
  683|      1|    return SECSuccess;
  684|      1|}
SECMOD_UnloadModule:
  729|      2|{
  730|      2|    PRLibrary *library;
  731|      2|    char *disableUnload = NULL;
  732|       |
  733|      2|    if (!mod->loaded) {
  ------------------
  |  Branch (733:9): [True: 0, False: 2]
  ------------------
  734|      0|        return SECFailure;
  735|      0|    }
  736|      2|    if (finalizeModules) {
  ------------------
  |  Branch (736:9): [True: 2, False: 0]
  ------------------
  737|      2|        if (mod->functionList && !mod->moduleDBOnly) {
  ------------------
  |  Branch (737:13): [True: 1, False: 1]
  |  Branch (737:34): [True: 1, False: 0]
  ------------------
  738|      1|            PK11_GETTAB(mod)->C_Finalize(NULL);
  ------------------
  |  |  102|      1|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
  739|      1|        }
  740|      2|    }
  741|      2|    mod->moduleID = 0;
  742|      2|    mod->loaded = PR_FALSE;
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
  743|       |
  744|       |    /* do we want the semantics to allow unloading the internal library?
  745|       |     * if not, we should change this to SECFailure and move it above the
  746|       |     * mod->loaded = PR_FALSE; */
  747|      2|    if (mod->internal && (mod->dllName == NULL)) {
  ------------------
  |  Branch (747:9): [True: 2, False: 0]
  |  Branch (747:26): [True: 2, False: 0]
  ------------------
  748|       |#ifndef NSS_STATIC_SOFTOKEN
  749|       |        if (0 == PR_ATOMIC_DECREMENT(&softokenLoadCount)) {
  750|       |            if (softokenLib) {
  751|       |                disableUnload = PR_GetEnvSecure("NSS_DISABLE_UNLOAD");
  752|       |                if (!disableUnload) {
  753|       |#ifdef DEBUG
  754|       |                    PRStatus status = PR_UnloadLibrary(softokenLib);
  755|       |                    PORT_Assert(PR_SUCCESS == status);
  756|       |#else
  757|       |                    PR_UnloadLibrary(softokenLib);
  758|       |#endif
  759|       |                }
  760|       |                softokenLib = NULL;
  761|       |            }
  762|       |            loadSoftokenOnce = pristineCallOnce;
  763|       |        }
  764|       |#endif
  765|      2|        return SECSuccess;
  766|      2|    }
  767|       |
  768|      0|    library = (PRLibrary *)mod->library;
  769|       |    /* if no library, then we should not unload it */
  770|      0|    if (library == NULL) {
  ------------------
  |  Branch (770:9): [True: 0, False: 0]
  ------------------
  771|      0|        return SECSuccess;
  772|      0|    }
  773|       |
  774|      0|    disableUnload = PR_GetEnvSecure("NSS_DISABLE_UNLOAD");
  775|      0|    if (!disableUnload) {
  ------------------
  |  Branch (775:9): [True: 0, False: 0]
  ------------------
  776|      0|        PR_UnloadLibrary(library);
  777|      0|    }
  778|      0|    return SECSuccess;
  779|      0|}
nss_DumpModuleLog:
  783|      1|{
  784|      1|#ifdef DEBUG_MODULE
  785|      1|    if (modToDBG) {
  ------------------
  |  Branch (785:9): [True: 0, False: 1]
  ------------------
  786|      0|        print_final_statistics();
  787|      0|    }
  788|      1|#endif
  789|      1|}

PK11_GetKeyType:
  216|  33.9k|{
  217|  33.9k|    switch (type) {
  218|      0|        case CKM_SEED_ECB:
  ------------------
  |  | 1156|      0|#define CKM_SEED_ECB 0x00000651UL
  ------------------
  |  Branch (218:9): [True: 0, False: 33.9k]
  ------------------
  219|    101|        case CKM_SEED_CBC:
  ------------------
  |  | 1157|    101|#define CKM_SEED_CBC 0x00000652UL
  ------------------
  |  Branch (219:9): [True: 101, False: 33.8k]
  ------------------
  220|    101|        case CKM_SEED_MAC:
  ------------------
  |  | 1158|    101|#define CKM_SEED_MAC 0x00000653UL
  ------------------
  |  Branch (220:9): [True: 0, False: 33.9k]
  ------------------
  221|    101|        case CKM_SEED_MAC_GENERAL:
  ------------------
  |  | 1159|    101|#define CKM_SEED_MAC_GENERAL 0x00000654UL
  ------------------
  |  Branch (221:9): [True: 0, False: 33.9k]
  ------------------
  222|    101|        case CKM_SEED_CBC_PAD:
  ------------------
  |  | 1160|    101|#define CKM_SEED_CBC_PAD 0x00000655UL
  ------------------
  |  Branch (222:9): [True: 0, False: 33.9k]
  ------------------
  223|    101|        case CKM_SEED_KEY_GEN:
  ------------------
  |  | 1155|    101|#define CKM_SEED_KEY_GEN 0x00000650UL
  ------------------
  |  Branch (223:9): [True: 0, False: 33.9k]
  ------------------
  224|    101|            return CKK_SEED;
  ------------------
  |  |  416|    101|#define CKK_SEED 0x0000002FUL /* was 2A */
  ------------------
  225|      0|        case CKM_CAMELLIA_ECB:
  ------------------
  |  | 1136|      0|#define CKM_CAMELLIA_ECB 0x00000551UL
  ------------------
  |  Branch (225:9): [True: 0, False: 33.9k]
  ------------------
  226|     95|        case CKM_CAMELLIA_CBC:
  ------------------
  |  | 1137|     95|#define CKM_CAMELLIA_CBC 0x00000552UL
  ------------------
  |  Branch (226:9): [True: 95, False: 33.8k]
  ------------------
  227|     95|        case CKM_CAMELLIA_MAC:
  ------------------
  |  | 1138|     95|#define CKM_CAMELLIA_MAC 0x00000553UL
  ------------------
  |  Branch (227:9): [True: 0, False: 33.9k]
  ------------------
  228|     95|        case CKM_CAMELLIA_MAC_GENERAL:
  ------------------
  |  | 1139|     95|#define CKM_CAMELLIA_MAC_GENERAL 0x00000554UL
  ------------------
  |  Branch (228:9): [True: 0, False: 33.9k]
  ------------------
  229|     95|        case CKM_CAMELLIA_CBC_PAD:
  ------------------
  |  | 1140|     95|#define CKM_CAMELLIA_CBC_PAD 0x00000555UL
  ------------------
  |  Branch (229:9): [True: 0, False: 33.9k]
  ------------------
  230|     95|        case CKM_CAMELLIA_KEY_GEN:
  ------------------
  |  | 1135|     95|#define CKM_CAMELLIA_KEY_GEN 0x00000550UL
  ------------------
  |  Branch (230:9): [True: 0, False: 33.9k]
  ------------------
  231|     95|            return CKK_CAMELLIA;
  ------------------
  |  |  414|     95|#define CKK_CAMELLIA 0x00000025UL
  ------------------
  232|      0|        case CKM_NSS_CHACHA20_POLY1305:
  ------------------
  |  |  243|      0|#define CKM_NSS_CHACHA20_POLY1305 (CKM_NSS + 28)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (232:9): [True: 0, False: 33.9k]
  ------------------
  233|      0|        case CKM_NSS_CHACHA20_KEY_GEN:
  ------------------
  |  |  242|      0|#define CKM_NSS_CHACHA20_KEY_GEN (CKM_NSS + 27)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (233:9): [True: 0, False: 33.9k]
  ------------------
  234|    220|        case CKM_NSS_CHACHA20_CTR:
  ------------------
  |  |  251|    220|#define CKM_NSS_CHACHA20_CTR (CKM_NSS + 33)
  |  |  ------------------
  |  |  |  |  162|    220|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|    220|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|    220|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (234:9): [True: 220, False: 33.6k]
  ------------------
  235|    220|            return CKK_NSS_CHACHA20;
  ------------------
  |  |   56|    220|#define CKK_NSS_CHACHA20 (CKK_NSS + 4)
  |  |  ------------------
  |  |  |  |   49|    220|#define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  458|    220|#define CKK_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|    220|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  236|    220|        case CKM_CHACHA20_POLY1305:
  ------------------
  |  | 1287|    220|#define CKM_CHACHA20_POLY1305 0x00004021UL
  ------------------
  |  Branch (236:9): [True: 220, False: 33.6k]
  ------------------
  237|    220|        case CKM_CHACHA20_KEY_GEN:
  ------------------
  |  | 1203|    220|#define CKM_CHACHA20_KEY_GEN 0x00001225UL
  ------------------
  |  Branch (237:9): [True: 0, False: 33.9k]
  ------------------
  238|    220|        case CKM_CHACHA20:
  ------------------
  |  | 1204|    220|#define CKM_CHACHA20 0x00001226UL
  ------------------
  |  Branch (238:9): [True: 0, False: 33.9k]
  ------------------
  239|    220|            return CKK_CHACHA20;
  ------------------
  |  |  433|    220|#define CKK_CHACHA20 0x00000033UL
  ------------------
  240|  1.38k|        case CKM_AES_ECB:
  ------------------
  |  | 1107|  1.38k|#define CKM_AES_ECB 0x00001081UL
  ------------------
  |  Branch (240:9): [True: 1.38k, False: 32.5k]
  ------------------
  241|  1.59k|        case CKM_AES_CBC:
  ------------------
  |  | 1108|  1.59k|#define CKM_AES_CBC 0x00001082UL
  ------------------
  |  Branch (241:9): [True: 209, False: 33.6k]
  ------------------
  242|  1.59k|        case CKM_AES_CCM:
  ------------------
  |  | 1116|  1.59k|#define CKM_AES_CCM 0x00001088UL
  ------------------
  |  Branch (242:9): [True: 0, False: 33.9k]
  ------------------
  243|  1.59k|        case CKM_AES_CTR:
  ------------------
  |  | 1113|  1.59k|#define CKM_AES_CTR 0x00001086UL
  ------------------
  |  Branch (243:9): [True: 0, False: 33.9k]
  ------------------
  244|  1.59k|        case CKM_AES_CTS:
  ------------------
  |  | 1117|  1.59k|#define CKM_AES_CTS 0x00001089UL
  ------------------
  |  Branch (244:9): [True: 0, False: 33.9k]
  ------------------
  245|  3.10k|        case CKM_AES_GCM:
  ------------------
  |  | 1115|  3.10k|#define CKM_AES_GCM 0x00001087UL
  ------------------
  |  Branch (245:9): [True: 1.51k, False: 32.3k]
  ------------------
  246|  3.10k|        case CKM_AES_MAC:
  ------------------
  |  | 1109|  3.10k|#define CKM_AES_MAC 0x00001083UL
  ------------------
  |  Branch (246:9): [True: 0, False: 33.9k]
  ------------------
  247|  3.10k|        case CKM_AES_MAC_GENERAL:
  ------------------
  |  | 1110|  3.10k|#define CKM_AES_MAC_GENERAL 0x00001084UL
  ------------------
  |  Branch (247:9): [True: 0, False: 33.9k]
  ------------------
  248|  3.10k|        case CKM_AES_CMAC:
  ------------------
  |  | 1119|  3.10k|#define CKM_AES_CMAC 0x0000108AUL
  ------------------
  |  Branch (248:9): [True: 0, False: 33.9k]
  ------------------
  249|  3.10k|        case CKM_AES_CMAC_GENERAL:
  ------------------
  |  | 1120|  3.10k|#define CKM_AES_CMAC_GENERAL 0x0000108BUL
  ------------------
  |  Branch (249:9): [True: 0, False: 33.9k]
  ------------------
  250|  3.10k|        case CKM_AES_CBC_PAD:
  ------------------
  |  | 1111|  3.10k|#define CKM_AES_CBC_PAD 0x00001085UL
  ------------------
  |  Branch (250:9): [True: 0, False: 33.9k]
  ------------------
  251|  3.10k|        case CKM_AES_KEY_GEN:
  ------------------
  |  | 1106|  3.10k|#define CKM_AES_KEY_GEN 0x00001080UL
  ------------------
  |  Branch (251:9): [True: 0, False: 33.9k]
  ------------------
  252|  3.10k|        case CKM_NSS_AES_KEY_WRAP:
  ------------------
  |  |  164|  3.10k|#define CKM_NSS_AES_KEY_WRAP (CKM_NSS + 1)
  |  |  ------------------
  |  |  |  |  162|  3.10k|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|  3.10k|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.10k|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (252:9): [True: 0, False: 33.9k]
  ------------------
  253|  3.10k|        case CKM_NSS_AES_KEY_WRAP_PAD:
  ------------------
  |  |  165|  3.10k|#define CKM_NSS_AES_KEY_WRAP_PAD (CKM_NSS + 2)
  |  |  ------------------
  |  |  |  |  162|  3.10k|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|  3.10k|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.10k|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (253:9): [True: 0, False: 33.9k]
  ------------------
  254|  3.10k|        case CKM_AES_KEY_WRAP:
  ------------------
  |  | 1231|  3.10k|#define CKM_AES_KEY_WRAP 0x00002109UL
  ------------------
  |  Branch (254:9): [True: 0, False: 33.9k]
  ------------------
  255|  3.10k|        case CKM_AES_KEY_WRAP_KWP:
  ------------------
  |  | 1233|  3.10k|#define CKM_AES_KEY_WRAP_KWP 0x0000210BUL
  ------------------
  |  Branch (255:9): [True: 0, False: 33.9k]
  ------------------
  256|  3.10k|        case CKM_AES_XCBC_MAC:
  ------------------
  |  | 1121|  3.10k|#define CKM_AES_XCBC_MAC 0x0000108CUL
  ------------------
  |  Branch (256:9): [True: 0, False: 33.9k]
  ------------------
  257|  3.10k|        case CKM_AES_XCBC_MAC_96:
  ------------------
  |  | 1122|  3.10k|#define CKM_AES_XCBC_MAC_96 0x0000108DUL
  ------------------
  |  Branch (257:9): [True: 0, False: 33.9k]
  ------------------
  258|  3.10k|            return CKK_AES;
  ------------------
  |  |  402|  3.10k|#define CKK_AES 0x0000001FUL
  ------------------
  259|      0|        case CKM_DES_ECB:
  ------------------
  |  |  815|      0|#define CKM_DES_ECB 0x00000121UL
  ------------------
  |  Branch (259:9): [True: 0, False: 33.9k]
  ------------------
  260|     38|        case CKM_DES_CBC:
  ------------------
  |  |  816|     38|#define CKM_DES_CBC 0x00000122UL
  ------------------
  |  Branch (260:9): [True: 38, False: 33.8k]
  ------------------
  261|     38|        case CKM_DES_MAC:
  ------------------
  |  |  817|     38|#define CKM_DES_MAC 0x00000123UL
  ------------------
  |  Branch (261:9): [True: 0, False: 33.9k]
  ------------------
  262|     38|        case CKM_DES_MAC_GENERAL:
  ------------------
  |  |  820|     38|#define CKM_DES_MAC_GENERAL 0x00000124UL
  ------------------
  |  Branch (262:9): [True: 0, False: 33.9k]
  ------------------
  263|     38|        case CKM_DES_CBC_PAD:
  ------------------
  |  |  821|     38|#define CKM_DES_CBC_PAD 0x00000125UL
  ------------------
  |  Branch (263:9): [True: 0, False: 33.9k]
  ------------------
  264|     38|        case CKM_DES_KEY_GEN:
  ------------------
  |  |  814|     38|#define CKM_DES_KEY_GEN 0x00000120UL
  ------------------
  |  Branch (264:9): [True: 0, False: 33.9k]
  ------------------
  265|     38|        case CKM_KEY_WRAP_LYNKS:
  ------------------
  |  | 1035|     38|#define CKM_KEY_WRAP_LYNKS 0x00000400UL
  ------------------
  |  Branch (265:9): [True: 0, False: 33.9k]
  ------------------
  266|     38|        case CKM_PBE_MD2_DES_CBC:
  ------------------
  |  |  997|     38|#define CKM_PBE_MD2_DES_CBC 0x000003A0UL
  ------------------
  |  Branch (266:9): [True: 0, False: 33.9k]
  ------------------
  267|     38|        case CKM_PBE_MD5_DES_CBC:
  ------------------
  |  |  998|     38|#define CKM_PBE_MD5_DES_CBC 0x000003A1UL
  ------------------
  |  Branch (267:9): [True: 0, False: 33.9k]
  ------------------
  268|     38|            return CKK_DES;
  ------------------
  |  |  386|     38|#define CKK_DES 0x00000013UL
  ------------------
  269|      0|        case CKM_DES3_ECB:
  ------------------
  |  |  825|      0|#define CKM_DES3_ECB 0x00000132UL
  ------------------
  |  Branch (269:9): [True: 0, False: 33.9k]
  ------------------
  270|    507|        case CKM_DES3_CBC:
  ------------------
  |  |  826|    507|#define CKM_DES3_CBC 0x00000133UL
  ------------------
  |  Branch (270:9): [True: 507, False: 33.3k]
  ------------------
  271|    507|        case CKM_DES3_MAC:
  ------------------
  |  |  827|    507|#define CKM_DES3_MAC 0x00000134UL
  ------------------
  |  Branch (271:9): [True: 0, False: 33.9k]
  ------------------
  272|    507|        case CKM_DES3_MAC_GENERAL:
  ------------------
  |  |  832|    507|#define CKM_DES3_MAC_GENERAL 0x00000135UL
  ------------------
  |  Branch (272:9): [True: 0, False: 33.9k]
  ------------------
  273|    507|        case CKM_DES3_CBC_PAD:
  ------------------
  |  |  833|    507|#define CKM_DES3_CBC_PAD 0x00000136UL
  ------------------
  |  Branch (273:9): [True: 0, False: 33.9k]
  ------------------
  274|    507|            return (len == 16) ? CKK_DES2 : CKK_DES3;
  ------------------
  |  |  387|      0|#define CKK_DES2 0x00000014UL
  ------------------
                          return (len == 16) ? CKK_DES2 : CKK_DES3;
  ------------------
  |  |  388|    507|#define CKK_DES3 0x00000015UL
  ------------------
  |  Branch (274:20): [True: 0, False: 507]
  ------------------
  275|      0|        case CKM_DES2_KEY_GEN:
  ------------------
  |  |  823|      0|#define CKM_DES2_KEY_GEN 0x00000130UL
  ------------------
  |  Branch (275:9): [True: 0, False: 33.9k]
  ------------------
  276|      0|        case CKM_PBE_SHA1_DES2_EDE_CBC:
  ------------------
  |  | 1008|      0|#define CKM_PBE_SHA1_DES2_EDE_CBC 0x000003A9UL
  ------------------
  |  Branch (276:9): [True: 0, False: 33.9k]
  ------------------
  277|      0|            return CKK_DES2;
  ------------------
  |  |  387|      0|#define CKK_DES2 0x00000014UL
  ------------------
  278|      0|        case CKM_PBE_SHA1_DES3_EDE_CBC:
  ------------------
  |  | 1007|      0|#define CKM_PBE_SHA1_DES3_EDE_CBC 0x000003A8UL
  ------------------
  |  Branch (278:9): [True: 0, False: 33.9k]
  ------------------
  279|      0|        case CKM_DES3_KEY_GEN:
  ------------------
  |  |  824|      0|#define CKM_DES3_KEY_GEN 0x00000131UL
  ------------------
  |  Branch (279:9): [True: 0, False: 33.9k]
  ------------------
  280|      0|            return CKK_DES3;
  ------------------
  |  |  388|      0|#define CKK_DES3 0x00000015UL
  ------------------
  281|      0|        case CKM_CDMF_ECB:
  ------------------
  |  |  835|      0|#define CKM_CDMF_ECB 0x00000141UL
  ------------------
  |  Branch (281:9): [True: 0, False: 33.9k]
  ------------------
  282|      0|        case CKM_CDMF_CBC:
  ------------------
  |  |  836|      0|#define CKM_CDMF_CBC 0x00000142UL
  ------------------
  |  Branch (282:9): [True: 0, False: 33.9k]
  ------------------
  283|      0|        case CKM_CDMF_MAC:
  ------------------
  |  |  837|      0|#define CKM_CDMF_MAC 0x00000143UL
  ------------------
  |  Branch (283:9): [True: 0, False: 33.9k]
  ------------------
  284|      0|        case CKM_CDMF_MAC_GENERAL:
  ------------------
  |  |  838|      0|#define CKM_CDMF_MAC_GENERAL 0x00000144UL
  ------------------
  |  Branch (284:9): [True: 0, False: 33.9k]
  ------------------
  285|      0|        case CKM_CDMF_CBC_PAD:
  ------------------
  |  |  839|      0|#define CKM_CDMF_CBC_PAD 0x00000145UL
  ------------------
  |  Branch (285:9): [True: 0, False: 33.9k]
  ------------------
  286|      0|        case CKM_CDMF_KEY_GEN:
  ------------------
  |  |  834|      0|#define CKM_CDMF_KEY_GEN 0x00000140UL
  ------------------
  |  Branch (286:9): [True: 0, False: 33.9k]
  ------------------
  287|      0|            return CKK_CDMF;
  ------------------
  |  |  401|      0|#define CKK_CDMF 0x0000001EUL
  ------------------
  288|      0|        case CKM_RC2_ECB:
  ------------------
  |  |  804|      0|#define CKM_RC2_ECB 0x00000101UL
  ------------------
  |  Branch (288:9): [True: 0, False: 33.9k]
  ------------------
  289|      0|        case CKM_RC2_CBC:
  ------------------
  |  |  805|      0|#define CKM_RC2_CBC 0x00000102UL
  ------------------
  |  Branch (289:9): [True: 0, False: 33.9k]
  ------------------
  290|      0|        case CKM_RC2_MAC:
  ------------------
  |  |  806|      0|#define CKM_RC2_MAC 0x00000103UL
  ------------------
  |  Branch (290:9): [True: 0, False: 33.9k]
  ------------------
  291|      0|        case CKM_RC2_MAC_GENERAL:
  ------------------
  |  |  809|      0|#define CKM_RC2_MAC_GENERAL 0x00000104UL
  ------------------
  |  Branch (291:9): [True: 0, False: 33.9k]
  ------------------
  292|      0|        case CKM_RC2_CBC_PAD:
  ------------------
  |  |  810|      0|#define CKM_RC2_CBC_PAD 0x00000105UL
  ------------------
  |  Branch (292:9): [True: 0, False: 33.9k]
  ------------------
  293|      0|        case CKM_RC2_KEY_GEN:
  ------------------
  |  |  803|      0|#define CKM_RC2_KEY_GEN 0x00000100UL
  ------------------
  |  Branch (293:9): [True: 0, False: 33.9k]
  ------------------
  294|      0|        case CKM_PBE_SHA1_RC2_128_CBC:
  ------------------
  |  | 1009|      0|#define CKM_PBE_SHA1_RC2_128_CBC 0x000003AAUL
  ------------------
  |  Branch (294:9): [True: 0, False: 33.9k]
  ------------------
  295|      0|        case CKM_PBE_SHA1_RC2_40_CBC:
  ------------------
  |  | 1010|      0|#define CKM_PBE_SHA1_RC2_40_CBC 0x000003ABUL
  ------------------
  |  Branch (295:9): [True: 0, False: 33.9k]
  ------------------
  296|      0|            return CKK_RC2;
  ------------------
  |  |  384|      0|#define CKK_RC2 0x00000011UL
  ------------------
  297|      0|        case CKM_RC4:
  ------------------
  |  |  813|      0|#define CKM_RC4 0x00000111UL
  ------------------
  |  Branch (297:9): [True: 0, False: 33.9k]
  ------------------
  298|      0|        case CKM_RC4_KEY_GEN:
  ------------------
  |  |  812|      0|#define CKM_RC4_KEY_GEN 0x00000110UL
  ------------------
  |  Branch (298:9): [True: 0, False: 33.9k]
  ------------------
  299|      0|            return CKK_RC4;
  ------------------
  |  |  385|      0|#define CKK_RC4 0x00000012UL
  ------------------
  300|      0|        case CKM_RC5_ECB:
  ------------------
  |  |  942|      0|#define CKM_RC5_ECB 0x00000331UL
  ------------------
  |  Branch (300:9): [True: 0, False: 33.9k]
  ------------------
  301|      0|        case CKM_RC5_CBC:
  ------------------
  |  |  943|      0|#define CKM_RC5_CBC 0x00000332UL
  ------------------
  |  Branch (301:9): [True: 0, False: 33.9k]
  ------------------
  302|      0|        case CKM_RC5_MAC:
  ------------------
  |  |  944|      0|#define CKM_RC5_MAC 0x00000333UL
  ------------------
  |  Branch (302:9): [True: 0, False: 33.9k]
  ------------------
  303|      0|        case CKM_RC5_MAC_GENERAL:
  ------------------
  |  |  945|      0|#define CKM_RC5_MAC_GENERAL 0x00000334UL
  ------------------
  |  Branch (303:9): [True: 0, False: 33.9k]
  ------------------
  304|      0|        case CKM_RC5_CBC_PAD:
  ------------------
  |  |  946|      0|#define CKM_RC5_CBC_PAD 0x00000335UL
  ------------------
  |  Branch (304:9): [True: 0, False: 33.9k]
  ------------------
  305|      0|        case CKM_RC5_KEY_GEN:
  ------------------
  |  |  941|      0|#define CKM_RC5_KEY_GEN 0x00000330UL
  ------------------
  |  Branch (305:9): [True: 0, False: 33.9k]
  ------------------
  306|      0|            return CKK_RC5;
  ------------------
  |  |  396|      0|#define CKK_RC5 0x00000019UL
  ------------------
  307|      0|        case CKM_SKIPJACK_CBC64:
  ------------------
  |  | 1049|      0|#define CKM_SKIPJACK_CBC64 0x00001002UL
  ------------------
  |  Branch (307:9): [True: 0, False: 33.9k]
  ------------------
  308|      0|        case CKM_SKIPJACK_ECB64:
  ------------------
  |  | 1048|      0|#define CKM_SKIPJACK_ECB64 0x00001001UL
  ------------------
  |  Branch (308:9): [True: 0, False: 33.9k]
  ------------------
  309|      0|        case CKM_SKIPJACK_OFB64:
  ------------------
  |  | 1050|      0|#define CKM_SKIPJACK_OFB64 0x00001003UL
  ------------------
  |  Branch (309:9): [True: 0, False: 33.9k]
  ------------------
  310|      0|        case CKM_SKIPJACK_CFB64:
  ------------------
  |  | 1051|      0|#define CKM_SKIPJACK_CFB64 0x00001004UL
  ------------------
  |  Branch (310:9): [True: 0, False: 33.9k]
  ------------------
  311|      0|        case CKM_SKIPJACK_CFB32:
  ------------------
  |  | 1052|      0|#define CKM_SKIPJACK_CFB32 0x00001005UL
  ------------------
  |  Branch (311:9): [True: 0, False: 33.9k]
  ------------------
  312|      0|        case CKM_SKIPJACK_CFB16:
  ------------------
  |  | 1053|      0|#define CKM_SKIPJACK_CFB16 0x00001006UL
  ------------------
  |  Branch (312:9): [True: 0, False: 33.9k]
  ------------------
  313|      0|        case CKM_SKIPJACK_CFB8:
  ------------------
  |  | 1054|      0|#define CKM_SKIPJACK_CFB8 0x00001007UL
  ------------------
  |  Branch (313:9): [True: 0, False: 33.9k]
  ------------------
  314|      0|        case CKM_SKIPJACK_KEY_GEN:
  ------------------
  |  | 1047|      0|#define CKM_SKIPJACK_KEY_GEN 0x00001000UL
  ------------------
  |  Branch (314:9): [True: 0, False: 33.9k]
  ------------------
  315|      0|        case CKM_SKIPJACK_WRAP:
  ------------------
  |  | 1055|      0|#define CKM_SKIPJACK_WRAP 0x00001008UL
  ------------------
  |  Branch (315:9): [True: 0, False: 33.9k]
  ------------------
  316|      0|        case CKM_SKIPJACK_PRIVATE_WRAP:
  ------------------
  |  | 1056|      0|#define CKM_SKIPJACK_PRIVATE_WRAP 0x00001009UL
  ------------------
  |  Branch (316:9): [True: 0, False: 33.9k]
  ------------------
  317|      0|            return CKK_SKIPJACK;
  ------------------
  |  |  398|      0|#define CKK_SKIPJACK 0x0000001BUL
  ------------------
  318|      0|        case CKM_BATON_ECB128:
  ------------------
  |  | 1062|      0|#define CKM_BATON_ECB128 0x00001031UL
  ------------------
  |  Branch (318:9): [True: 0, False: 33.9k]
  ------------------
  319|      0|        case CKM_BATON_ECB96:
  ------------------
  |  | 1063|      0|#define CKM_BATON_ECB96 0x00001032UL
  ------------------
  |  Branch (319:9): [True: 0, False: 33.9k]
  ------------------
  320|      0|        case CKM_BATON_CBC128:
  ------------------
  |  | 1064|      0|#define CKM_BATON_CBC128 0x00001033UL
  ------------------
  |  Branch (320:9): [True: 0, False: 33.9k]
  ------------------
  321|      0|        case CKM_BATON_COUNTER:
  ------------------
  |  | 1065|      0|#define CKM_BATON_COUNTER 0x00001034UL
  ------------------
  |  Branch (321:9): [True: 0, False: 33.9k]
  ------------------
  322|      0|        case CKM_BATON_SHUFFLE:
  ------------------
  |  | 1066|      0|#define CKM_BATON_SHUFFLE 0x00001035UL
  ------------------
  |  Branch (322:9): [True: 0, False: 33.9k]
  ------------------
  323|      0|        case CKM_BATON_WRAP:
  ------------------
  |  | 1067|      0|#define CKM_BATON_WRAP 0x00001036UL
  ------------------
  |  Branch (323:9): [True: 0, False: 33.9k]
  ------------------
  324|      0|        case CKM_BATON_KEY_GEN:
  ------------------
  |  | 1061|      0|#define CKM_BATON_KEY_GEN 0x00001030UL
  ------------------
  |  Branch (324:9): [True: 0, False: 33.9k]
  ------------------
  325|      0|            return CKK_BATON;
  ------------------
  |  |  399|      0|#define CKK_BATON 0x0000001CUL
  ------------------
  326|      0|        case CKM_JUNIPER_ECB128:
  ------------------
  |  | 1095|      0|#define CKM_JUNIPER_ECB128 0x00001061UL
  ------------------
  |  Branch (326:9): [True: 0, False: 33.9k]
  ------------------
  327|      0|        case CKM_JUNIPER_CBC128:
  ------------------
  |  | 1096|      0|#define CKM_JUNIPER_CBC128 0x00001062UL
  ------------------
  |  Branch (327:9): [True: 0, False: 33.9k]
  ------------------
  328|      0|        case CKM_JUNIPER_COUNTER:
  ------------------
  |  | 1097|      0|#define CKM_JUNIPER_COUNTER 0x00001063UL
  ------------------
  |  Branch (328:9): [True: 0, False: 33.9k]
  ------------------
  329|      0|        case CKM_JUNIPER_SHUFFLE:
  ------------------
  |  | 1098|      0|#define CKM_JUNIPER_SHUFFLE 0x00001064UL
  ------------------
  |  Branch (329:9): [True: 0, False: 33.9k]
  ------------------
  330|      0|        case CKM_JUNIPER_WRAP:
  ------------------
  |  | 1099|      0|#define CKM_JUNIPER_WRAP 0x00001065UL
  ------------------
  |  Branch (330:9): [True: 0, False: 33.9k]
  ------------------
  331|      0|        case CKM_JUNIPER_KEY_GEN:
  ------------------
  |  | 1094|      0|#define CKM_JUNIPER_KEY_GEN 0x00001060UL
  ------------------
  |  Branch (331:9): [True: 0, False: 33.9k]
  ------------------
  332|      0|            return CKK_JUNIPER;
  ------------------
  |  |  400|      0|#define CKK_JUNIPER 0x0000001DUL
  ------------------
  333|      0|        case CKM_IDEA_CBC:
  ------------------
  |  |  949|      0|#define CKM_IDEA_CBC 0x00000342UL
  ------------------
  |  Branch (333:9): [True: 0, False: 33.9k]
  ------------------
  334|      0|        case CKM_IDEA_ECB:
  ------------------
  |  |  948|      0|#define CKM_IDEA_ECB 0x00000341UL
  ------------------
  |  Branch (334:9): [True: 0, False: 33.9k]
  ------------------
  335|      0|        case CKM_IDEA_MAC:
  ------------------
  |  |  950|      0|#define CKM_IDEA_MAC 0x00000343UL
  ------------------
  |  Branch (335:9): [True: 0, False: 33.9k]
  ------------------
  336|      0|        case CKM_IDEA_MAC_GENERAL:
  ------------------
  |  |  951|      0|#define CKM_IDEA_MAC_GENERAL 0x00000344UL
  ------------------
  |  Branch (336:9): [True: 0, False: 33.9k]
  ------------------
  337|      0|        case CKM_IDEA_CBC_PAD:
  ------------------
  |  |  952|      0|#define CKM_IDEA_CBC_PAD 0x00000345UL
  ------------------
  |  Branch (337:9): [True: 0, False: 33.9k]
  ------------------
  338|      0|        case CKM_IDEA_KEY_GEN:
  ------------------
  |  |  947|      0|#define CKM_IDEA_KEY_GEN 0x00000340UL
  ------------------
  |  Branch (338:9): [True: 0, False: 33.9k]
  ------------------
  339|      0|            return CKK_IDEA;
  ------------------
  |  |  397|      0|#define CKK_IDEA 0x0000001AUL
  ------------------
  340|      0|        case CKM_CAST_ECB:
  ------------------
  |  |  918|      0|#define CKM_CAST_ECB 0x00000301UL
  ------------------
  |  Branch (340:9): [True: 0, False: 33.9k]
  ------------------
  341|      0|        case CKM_CAST_CBC:
  ------------------
  |  |  919|      0|#define CKM_CAST_CBC 0x00000302UL
  ------------------
  |  Branch (341:9): [True: 0, False: 33.9k]
  ------------------
  342|      0|        case CKM_CAST_MAC:
  ------------------
  |  |  920|      0|#define CKM_CAST_MAC 0x00000303UL
  ------------------
  |  Branch (342:9): [True: 0, False: 33.9k]
  ------------------
  343|      0|        case CKM_CAST_MAC_GENERAL:
  ------------------
  |  |  921|      0|#define CKM_CAST_MAC_GENERAL 0x00000304UL
  ------------------
  |  Branch (343:9): [True: 0, False: 33.9k]
  ------------------
  344|      0|        case CKM_CAST_CBC_PAD:
  ------------------
  |  |  922|      0|#define CKM_CAST_CBC_PAD 0x00000305UL
  ------------------
  |  Branch (344:9): [True: 0, False: 33.9k]
  ------------------
  345|      0|        case CKM_CAST_KEY_GEN:
  ------------------
  |  |  917|      0|#define CKM_CAST_KEY_GEN 0x00000300UL
  ------------------
  |  Branch (345:9): [True: 0, False: 33.9k]
  ------------------
  346|      0|        case CKM_PBE_MD5_CAST_CBC:
  ------------------
  |  |  999|      0|#define CKM_PBE_MD5_CAST_CBC 0x000003A2UL
  ------------------
  |  Branch (346:9): [True: 0, False: 33.9k]
  ------------------
  347|      0|            return CKK_CAST;
  ------------------
  |  |  391|      0|#define CKK_CAST 0x00000016UL
  ------------------
  348|      0|        case CKM_CAST3_ECB:
  ------------------
  |  |  924|      0|#define CKM_CAST3_ECB 0x00000311UL
  ------------------
  |  Branch (348:9): [True: 0, False: 33.9k]
  ------------------
  349|      0|        case CKM_CAST3_CBC:
  ------------------
  |  |  925|      0|#define CKM_CAST3_CBC 0x00000312UL
  ------------------
  |  Branch (349:9): [True: 0, False: 33.9k]
  ------------------
  350|      0|        case CKM_CAST3_MAC:
  ------------------
  |  |  926|      0|#define CKM_CAST3_MAC 0x00000313UL
  ------------------
  |  Branch (350:9): [True: 0, False: 33.9k]
  ------------------
  351|      0|        case CKM_CAST3_MAC_GENERAL:
  ------------------
  |  |  927|      0|#define CKM_CAST3_MAC_GENERAL 0x00000314UL
  ------------------
  |  Branch (351:9): [True: 0, False: 33.9k]
  ------------------
  352|      0|        case CKM_CAST3_CBC_PAD:
  ------------------
  |  |  928|      0|#define CKM_CAST3_CBC_PAD 0x00000315UL
  ------------------
  |  Branch (352:9): [True: 0, False: 33.9k]
  ------------------
  353|      0|        case CKM_CAST3_KEY_GEN:
  ------------------
  |  |  923|      0|#define CKM_CAST3_KEY_GEN 0x00000310UL
  ------------------
  |  Branch (353:9): [True: 0, False: 33.9k]
  ------------------
  354|      0|        case CKM_PBE_MD5_CAST3_CBC:
  ------------------
  |  | 1000|      0|#define CKM_PBE_MD5_CAST3_CBC 0x000003A3UL
  ------------------
  |  Branch (354:9): [True: 0, False: 33.9k]
  ------------------
  355|      0|            return CKK_CAST3;
  ------------------
  |  |  392|      0|#define CKK_CAST3 0x00000017UL
  ------------------
  356|      0|        case CKM_CAST5_ECB:
  ------------------
  |  |  931|      0|#define CKM_CAST5_ECB 0x00000321UL
  ------------------
  |  Branch (356:9): [True: 0, False: 33.9k]
  ------------------
  357|      0|        case CKM_CAST5_CBC:
  ------------------
  |  |  933|      0|#define CKM_CAST5_CBC 0x00000322UL
  ------------------
  |  Branch (357:9): [True: 0, False: 33.9k]
  ------------------
  358|      0|        case CKM_CAST5_MAC:
  ------------------
  |  |  935|      0|#define CKM_CAST5_MAC 0x00000323UL
  ------------------
  |  Branch (358:9): [True: 0, False: 33.9k]
  ------------------
  359|      0|        case CKM_CAST5_MAC_GENERAL:
  ------------------
  |  |  937|      0|#define CKM_CAST5_MAC_GENERAL 0x00000324UL
  ------------------
  |  Branch (359:9): [True: 0, False: 33.9k]
  ------------------
  360|      0|        case CKM_CAST5_CBC_PAD:
  ------------------
  |  |  939|      0|#define CKM_CAST5_CBC_PAD 0x00000325UL
  ------------------
  |  Branch (360:9): [True: 0, False: 33.9k]
  ------------------
  361|      0|        case CKM_CAST5_KEY_GEN:
  ------------------
  |  |  929|      0|#define CKM_CAST5_KEY_GEN 0x00000320UL
  ------------------
  |  Branch (361:9): [True: 0, False: 33.9k]
  ------------------
  362|      0|        case CKM_PBE_MD5_CAST5_CBC:
  ------------------
  |  | 1001|      0|#define CKM_PBE_MD5_CAST5_CBC 0x000003A4UL
  ------------------
  |  Branch (362:9): [True: 0, False: 33.9k]
  ------------------
  363|      0|            return CKK_CAST5;
  ------------------
  |  |  394|      0|#define CKK_CAST5 0x00000018UL
  ------------------
  364|      0|        case CKM_RSA_PKCS:
  ------------------
  |  |  720|      0|#define CKM_RSA_PKCS 0x00000001UL
  ------------------
  |  Branch (364:9): [True: 0, False: 33.9k]
  ------------------
  365|      0|        case CKM_RSA_9796:
  ------------------
  |  |  721|      0|#define CKM_RSA_9796 0x00000002UL
  ------------------
  |  Branch (365:9): [True: 0, False: 33.9k]
  ------------------
  366|      0|        case CKM_RSA_X_509:
  ------------------
  |  |  722|      0|#define CKM_RSA_X_509 0x00000003UL
  ------------------
  |  Branch (366:9): [True: 0, False: 33.9k]
  ------------------
  367|      0|        case CKM_MD2_RSA_PKCS:
  ------------------
  |  |  726|      0|#define CKM_MD2_RSA_PKCS 0x00000004UL
  ------------------
  |  Branch (367:9): [True: 0, False: 33.9k]
  ------------------
  368|      0|        case CKM_MD5_RSA_PKCS:
  ------------------
  |  |  727|      0|#define CKM_MD5_RSA_PKCS 0x00000005UL
  ------------------
  |  Branch (368:9): [True: 0, False: 33.9k]
  ------------------
  369|      0|        case CKM_SHA1_RSA_PKCS:
  ------------------
  |  |  728|      0|#define CKM_SHA1_RSA_PKCS 0x00000006UL
  ------------------
  |  Branch (369:9): [True: 0, False: 33.9k]
  ------------------
  370|      0|        case CKM_SHA224_RSA_PKCS:
  ------------------
  |  |  778|      0|#define CKM_SHA224_RSA_PKCS 0x00000046UL
  ------------------
  |  Branch (370:9): [True: 0, False: 33.9k]
  ------------------
  371|      0|        case CKM_SHA256_RSA_PKCS:
  ------------------
  |  |  770|      0|#define CKM_SHA256_RSA_PKCS 0x00000040UL
  ------------------
  |  Branch (371:9): [True: 0, False: 33.9k]
  ------------------
  372|      0|        case CKM_SHA384_RSA_PKCS:
  ------------------
  |  |  771|      0|#define CKM_SHA384_RSA_PKCS 0x00000041UL
  ------------------
  |  Branch (372:9): [True: 0, False: 33.9k]
  ------------------
  373|      0|        case CKM_SHA512_RSA_PKCS:
  ------------------
  |  |  772|      0|#define CKM_SHA512_RSA_PKCS 0x00000042UL
  ------------------
  |  Branch (373:9): [True: 0, False: 33.9k]
  ------------------
  374|      0|        case CKM_KEY_WRAP_SET_OAEP:
  ------------------
  |  | 1036|      0|#define CKM_KEY_WRAP_SET_OAEP 0x00000401UL
  ------------------
  |  Branch (374:9): [True: 0, False: 33.9k]
  ------------------
  375|      0|        case CKM_RSA_PKCS_KEY_PAIR_GEN:
  ------------------
  |  |  719|      0|#define CKM_RSA_PKCS_KEY_PAIR_GEN 0x00000000UL
  ------------------
  |  Branch (375:9): [True: 0, False: 33.9k]
  ------------------
  376|      0|        case CKM_RSA_X9_31_KEY_PAIR_GEN:
  ------------------
  |  |  738|      0|#define CKM_RSA_X9_31_KEY_PAIR_GEN 0x0000000AUL
  ------------------
  |  Branch (376:9): [True: 0, False: 33.9k]
  ------------------
  377|      0|            return CKK_RSA;
  ------------------
  |  |  372|      0|#define CKK_RSA 0x00000000UL
  ------------------
  378|      0|        case CKM_DSA:
  ------------------
  |  |  745|      0|#define CKM_DSA 0x00000011UL
  ------------------
  |  Branch (378:9): [True: 0, False: 33.9k]
  ------------------
  379|      0|        case CKM_DSA_SHA1:
  ------------------
  |  |  746|      0|#define CKM_DSA_SHA1 0x00000012UL
  ------------------
  |  Branch (379:9): [True: 0, False: 33.9k]
  ------------------
  380|      0|        case CKM_DSA_KEY_PAIR_GEN:
  ------------------
  |  |  744|      0|#define CKM_DSA_KEY_PAIR_GEN 0x00000010UL
  ------------------
  |  Branch (380:9): [True: 0, False: 33.9k]
  ------------------
  381|      0|            return CKK_DSA;
  ------------------
  |  |  373|      0|#define CKK_DSA 0x00000001UL
  ------------------
  382|      0|        case CKM_DH_PKCS_DERIVE:
  ------------------
  |  |  759|      0|#define CKM_DH_PKCS_DERIVE 0x00000021UL
  ------------------
  |  Branch (382:9): [True: 0, False: 33.9k]
  ------------------
  383|      0|        case CKM_DH_PKCS_KEY_PAIR_GEN:
  ------------------
  |  |  758|      0|#define CKM_DH_PKCS_KEY_PAIR_GEN 0x00000020UL
  ------------------
  |  Branch (383:9): [True: 0, False: 33.9k]
  ------------------
  384|      0|            return CKK_DH;
  ------------------
  |  |  374|      0|#define CKK_DH 0x00000002UL
  ------------------
  385|      0|        case CKM_KEA_KEY_DERIVE:
  ------------------
  |  | 1059|      0|#define CKM_KEA_KEY_DERIVE 0x00001011UL
  ------------------
  |  Branch (385:9): [True: 0, False: 33.9k]
  ------------------
  386|      0|        case CKM_KEA_KEY_PAIR_GEN:
  ------------------
  |  | 1058|      0|#define CKM_KEA_KEY_PAIR_GEN 0x00001010UL
  ------------------
  |  Branch (386:9): [True: 0, False: 33.9k]
  ------------------
  387|      0|            return CKK_KEA;
  ------------------
  |  |  381|      0|#define CKK_KEA 0x00000005UL
  ------------------
  388|      0|        case CKM_ECDSA:
  ------------------
  |  | 1074|      0|#define CKM_ECDSA 0x00001041UL
  ------------------
  |  Branch (388:9): [True: 0, False: 33.9k]
  ------------------
  389|      0|        case CKM_ECDSA_SHA1:
  ------------------
  |  | 1075|      0|#define CKM_ECDSA_SHA1 0x00001042UL
  ------------------
  |  Branch (389:9): [True: 0, False: 33.9k]
  ------------------
  390|      0|        case CKM_EC_KEY_PAIR_GEN: /* aka CKM_ECDSA_KEY_PAIR_GEN */
  ------------------
  |  | 1072|      0|#define CKM_EC_KEY_PAIR_GEN 0x00001040UL
  ------------------
  |  Branch (390:9): [True: 0, False: 33.9k]
  ------------------
  391|      0|        case CKM_ECDH1_DERIVE:
  ------------------
  |  | 1086|      0|#define CKM_ECDH1_DERIVE 0x00001050UL
  ------------------
  |  Branch (391:9): [True: 0, False: 33.9k]
  ------------------
  392|      0|            return CKK_EC; /* CKK_ECDSA is deprecated */
  ------------------
  |  |  379|      0|#define CKK_EC 0x00000003UL
  ------------------
  393|      0|        case CKM_EC_EDWARDS_KEY_PAIR_GEN:
  ------------------
  |  | 1172|      0|#define CKM_EC_EDWARDS_KEY_PAIR_GEN 0x00001055UL
  ------------------
  |  Branch (393:9): [True: 0, False: 33.9k]
  ------------------
  394|      0|        case CKM_EDDSA:
  ------------------
  |  | 1174|      0|#define CKM_EDDSA 0x00001057UL
  ------------------
  |  Branch (394:9): [True: 0, False: 33.9k]
  ------------------
  395|      0|            return CKK_EC_EDWARDS;
  ------------------
  |  |  448|      0|#define CKK_EC_EDWARDS 0x00000040UL
  ------------------
  396|      0|        case CKM_HKDF_KEY_GEN:
  ------------------
  |  | 1298|      0|#define CKM_HKDF_KEY_GEN 0x0000402cUL
  ------------------
  |  Branch (396:9): [True: 0, False: 33.9k]
  ------------------
  397|  22.5k|        case CKM_HKDF_DERIVE:
  ------------------
  |  | 1296|  22.5k|#define CKM_HKDF_DERIVE 0x0000402aUL
  ------------------
  |  Branch (397:9): [True: 22.5k, False: 11.3k]
  ------------------
  398|  22.5k|        case CKM_HKDF_DATA:
  ------------------
  |  | 1297|  22.5k|#define CKM_HKDF_DATA 0x0000402bUL
  ------------------
  |  Branch (398:9): [True: 0, False: 33.9k]
  ------------------
  399|  22.5k|            return CKK_HKDF;
  ------------------
  |  |  450|  22.5k|#define CKK_HKDF 0x00000042UL
  ------------------
  400|      0|        case CKM_SSL3_PRE_MASTER_KEY_GEN:
  ------------------
  |  |  959|      0|#define CKM_SSL3_PRE_MASTER_KEY_GEN 0x00000370UL
  ------------------
  |  Branch (400:9): [True: 0, False: 33.9k]
  ------------------
  401|      0|        case CKM_GENERIC_SECRET_KEY_GEN:
  ------------------
  |  |  953|      0|#define CKM_GENERIC_SECRET_KEY_GEN 0x00000350UL
  ------------------
  |  Branch (401:9): [True: 0, False: 33.9k]
  ------------------
  402|      0|        case CKM_SSL3_MASTER_KEY_DERIVE:
  ------------------
  |  |  960|      0|#define CKM_SSL3_MASTER_KEY_DERIVE 0x00000371UL
  ------------------
  |  Branch (402:9): [True: 0, False: 33.9k]
  ------------------
  403|      0|        case CKM_SSL3_MASTER_KEY_DERIVE_DH:
  ------------------
  |  |  966|      0|#define CKM_SSL3_MASTER_KEY_DERIVE_DH 0x00000373UL
  ------------------
  |  Branch (403:9): [True: 0, False: 33.9k]
  ------------------
  404|      0|        case CKM_SSL3_KEY_AND_MAC_DERIVE:
  ------------------
  |  |  961|      0|#define CKM_SSL3_KEY_AND_MAC_DERIVE 0x00000372UL
  ------------------
  |  Branch (404:9): [True: 0, False: 33.9k]
  ------------------
  405|      0|        case CKM_SSL3_SHA1_MAC:
  ------------------
  |  |  976|      0|#define CKM_SSL3_SHA1_MAC 0x00000381UL
  ------------------
  |  Branch (405:9): [True: 0, False: 33.9k]
  ------------------
  406|      0|        case CKM_SSL3_MD5_MAC:
  ------------------
  |  |  975|      0|#define CKM_SSL3_MD5_MAC 0x00000380UL
  ------------------
  |  Branch (406:9): [True: 0, False: 33.9k]
  ------------------
  407|      0|        case CKM_TLS_MASTER_KEY_DERIVE:
  ------------------
  |  |  968|      0|#define CKM_TLS_MASTER_KEY_DERIVE 0x00000375UL
  ------------------
  |  Branch (407:9): [True: 0, False: 33.9k]
  ------------------
  408|      0|        case CKM_NSS_TLS_MASTER_KEY_DERIVE_SHA256:
  ------------------
  |  |  234|      0|#define CKM_NSS_TLS_MASTER_KEY_DERIVE_SHA256 (CKM_NSS + 22)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (408:9): [True: 0, False: 33.9k]
  ------------------
  409|     29|        case CKM_TLS_MASTER_KEY_DERIVE_DH:
  ------------------
  |  |  970|     29|#define CKM_TLS_MASTER_KEY_DERIVE_DH 0x00000377UL
  ------------------
  |  Branch (409:9): [True: 29, False: 33.8k]
  ------------------
  410|     29|        case CKM_NSS_TLS_MASTER_KEY_DERIVE_DH_SHA256:
  ------------------
  |  |  236|     29|#define CKM_NSS_TLS_MASTER_KEY_DERIVE_DH_SHA256 (CKM_NSS + 24)
  |  |  ------------------
  |  |  |  |  162|     29|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|     29|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     29|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (410:9): [True: 0, False: 33.9k]
  ------------------
  411|     95|        case CKM_TLS_KEY_AND_MAC_DERIVE:
  ------------------
  |  |  969|     95|#define CKM_TLS_KEY_AND_MAC_DERIVE 0x00000376UL
  ------------------
  |  Branch (411:9): [True: 66, False: 33.8k]
  ------------------
  412|     95|        case CKM_NSS_TLS_KEY_AND_MAC_DERIVE_SHA256:
  ------------------
  |  |  235|     95|#define CKM_NSS_TLS_KEY_AND_MAC_DERIVE_SHA256 (CKM_NSS + 23)
  |  |  ------------------
  |  |  |  |  162|     95|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|     95|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     95|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (412:9): [True: 0, False: 33.9k]
  ------------------
  413|     95|        case CKM_NSS_TLS_EXTENDED_MASTER_KEY_DERIVE:
  ------------------
  |  |  239|     95|#define CKM_NSS_TLS_EXTENDED_MASTER_KEY_DERIVE (CKM_NSS + 25)
  |  |  ------------------
  |  |  |  |  162|     95|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|     95|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     95|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (413:9): [True: 0, False: 33.9k]
  ------------------
  414|     95|        case CKM_NSS_TLS_EXTENDED_MASTER_KEY_DERIVE_DH:
  ------------------
  |  |  240|     95|#define CKM_NSS_TLS_EXTENDED_MASTER_KEY_DERIVE_DH (CKM_NSS + 26)
  |  |  ------------------
  |  |  |  |  162|     95|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|     95|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     95|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (414:9): [True: 0, False: 33.9k]
  ------------------
  415|     95|        case CKM_SHA_1_HMAC:
  ------------------
  |  |  862|     95|#define CKM_SHA_1_HMAC 0x00000221UL
  ------------------
  |  Branch (415:9): [True: 0, False: 33.9k]
  ------------------
  416|     95|        case CKM_SHA_1_HMAC_GENERAL:
  ------------------
  |  |  863|     95|#define CKM_SHA_1_HMAC_GENERAL 0x00000222UL
  ------------------
  |  Branch (416:9): [True: 0, False: 33.9k]
  ------------------
  417|     95|        case CKM_SHA224_HMAC:
  ------------------
  |  |  888|     95|#define CKM_SHA224_HMAC 0x00000256UL
  ------------------
  |  Branch (417:9): [True: 0, False: 33.9k]
  ------------------
  418|     95|        case CKM_SHA224_HMAC_GENERAL:
  ------------------
  |  |  889|     95|#define CKM_SHA224_HMAC_GENERAL 0x00000257UL
  ------------------
  |  Branch (418:9): [True: 0, False: 33.9k]
  ------------------
  419|  1.57k|        case CKM_SHA256_HMAC:
  ------------------
  |  |  877|  1.57k|#define CKM_SHA256_HMAC 0x00000251UL
  ------------------
  |  Branch (419:9): [True: 1.47k, False: 32.4k]
  ------------------
  420|  1.57k|        case CKM_SHA256_HMAC_GENERAL:
  ------------------
  |  |  878|  1.57k|#define CKM_SHA256_HMAC_GENERAL 0x00000252UL
  ------------------
  |  Branch (420:9): [True: 0, False: 33.9k]
  ------------------
  421|  4.61k|        case CKM_SHA384_HMAC:
  ------------------
  |  |  880|  4.61k|#define CKM_SHA384_HMAC 0x00000261UL
  ------------------
  |  Branch (421:9): [True: 3.03k, False: 30.8k]
  ------------------
  422|  4.61k|        case CKM_SHA384_HMAC_GENERAL:
  ------------------
  |  |  881|  4.61k|#define CKM_SHA384_HMAC_GENERAL 0x00000262UL
  ------------------
  |  Branch (422:9): [True: 0, False: 33.9k]
  ------------------
  423|  4.61k|        case CKM_SHA512_HMAC:
  ------------------
  |  |  883|  4.61k|#define CKM_SHA512_HMAC 0x00000271UL
  ------------------
  |  Branch (423:9): [True: 0, False: 33.9k]
  ------------------
  424|  4.61k|        case CKM_SHA512_HMAC_GENERAL:
  ------------------
  |  |  884|  4.61k|#define CKM_SHA512_HMAC_GENERAL 0x00000272UL
  ------------------
  |  Branch (424:9): [True: 0, False: 33.9k]
  ------------------
  425|  4.61k|        case CKM_MD2_HMAC:
  ------------------
  |  |  850|  4.61k|#define CKM_MD2_HMAC 0x00000201UL
  ------------------
  |  Branch (425:9): [True: 0, False: 33.9k]
  ------------------
  426|  4.61k|        case CKM_MD2_HMAC_GENERAL:
  ------------------
  |  |  851|  4.61k|#define CKM_MD2_HMAC_GENERAL 0x00000202UL
  ------------------
  |  Branch (426:9): [True: 0, False: 33.9k]
  ------------------
  427|  4.61k|        case CKM_MD5_HMAC:
  ------------------
  |  |  856|  4.61k|#define CKM_MD5_HMAC 0x00000211UL
  ------------------
  |  Branch (427:9): [True: 0, False: 33.9k]
  ------------------
  428|  4.61k|        case CKM_MD5_HMAC_GENERAL:
  ------------------
  |  |  857|  4.61k|#define CKM_MD5_HMAC_GENERAL 0x00000212UL
  ------------------
  |  Branch (428:9): [True: 0, False: 33.9k]
  ------------------
  429|  4.61k|        case CKM_TLS_PRF_GENERAL:
  ------------------
  |  |  297|  4.61k|#define CKM_TLS_PRF_GENERAL 0x80000373UL
  ------------------
  |  Branch (429:9): [True: 0, False: 33.9k]
  ------------------
  430|  4.61k|        case CKM_NSS_TLS_PRF_GENERAL_SHA256:
  ------------------
  |  |  233|  4.61k|#define CKM_NSS_TLS_PRF_GENERAL_SHA256 (CKM_NSS + 21)
  |  |  ------------------
  |  |  |  |  162|  4.61k|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|  4.61k|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  4.61k|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (430:9): [True: 0, False: 33.9k]
  ------------------
  431|  4.61k|            return CKK_GENERIC_SECRET;
  ------------------
  |  |  383|  4.61k|#define CKK_GENERIC_SECRET 0x00000010UL
  ------------------
  432|      0|        case CKM_NSS_KYBER_KEY_PAIR_GEN:
  ------------------
  |  |  267|      0|#define CKM_NSS_KYBER_KEY_PAIR_GEN (CKM_NSS + 45)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (432:9): [True: 0, False: 33.9k]
  ------------------
  433|      0|            return CKK_NSS_KYBER;
  ------------------
  |  |   58|      0|#define CKK_NSS_KYBER (CKK_NSS + 5)
  |  |  ------------------
  |  |  |  |   49|      0|#define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  458|      0|#define CKK_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  434|      0|        case CKM_NSS_ML_KEM_KEY_PAIR_GEN:
  ------------------
  |  |  277|      0|#define CKM_NSS_ML_KEM_KEY_PAIR_GEN (CKM_NSS + 48)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (434:9): [True: 0, False: 33.9k]
  ------------------
  435|      0|            return CKK_NSS_ML_KEM;
  ------------------
  |  |   59|      0|#define CKK_NSS_ML_KEM (CKK_NSS + 6)
  |  |  ------------------
  |  |  |  |   49|      0|#define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  458|      0|#define CKK_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  436|  2.46k|        default:
  ------------------
  |  Branch (436:9): [True: 2.46k, False: 31.4k]
  ------------------
  437|  2.46k|            return pk11_lookup(type)->keyType;
  438|  33.9k|    }
  439|  33.9k|}
PK11_GetKeyGenWithSize:
  453|  6.05k|{
  454|  6.05k|    switch (type) {
  455|      0|        case CKM_SEED_ECB:
  ------------------
  |  | 1156|      0|#define CKM_SEED_ECB 0x00000651UL
  ------------------
  |  Branch (455:9): [True: 0, False: 6.05k]
  ------------------
  456|      0|        case CKM_SEED_CBC:
  ------------------
  |  | 1157|      0|#define CKM_SEED_CBC 0x00000652UL
  ------------------
  |  Branch (456:9): [True: 0, False: 6.05k]
  ------------------
  457|      0|        case CKM_SEED_MAC:
  ------------------
  |  | 1158|      0|#define CKM_SEED_MAC 0x00000653UL
  ------------------
  |  Branch (457:9): [True: 0, False: 6.05k]
  ------------------
  458|      0|        case CKM_SEED_MAC_GENERAL:
  ------------------
  |  | 1159|      0|#define CKM_SEED_MAC_GENERAL 0x00000654UL
  ------------------
  |  Branch (458:9): [True: 0, False: 6.05k]
  ------------------
  459|      0|        case CKM_SEED_CBC_PAD:
  ------------------
  |  | 1160|      0|#define CKM_SEED_CBC_PAD 0x00000655UL
  ------------------
  |  Branch (459:9): [True: 0, False: 6.05k]
  ------------------
  460|      0|        case CKM_SEED_KEY_GEN:
  ------------------
  |  | 1155|      0|#define CKM_SEED_KEY_GEN 0x00000650UL
  ------------------
  |  Branch (460:9): [True: 0, False: 6.05k]
  ------------------
  461|      0|            return CKM_SEED_KEY_GEN;
  ------------------
  |  | 1155|      0|#define CKM_SEED_KEY_GEN 0x00000650UL
  ------------------
  462|      0|        case CKM_CAMELLIA_ECB:
  ------------------
  |  | 1136|      0|#define CKM_CAMELLIA_ECB 0x00000551UL
  ------------------
  |  Branch (462:9): [True: 0, False: 6.05k]
  ------------------
  463|      0|        case CKM_CAMELLIA_CBC:
  ------------------
  |  | 1137|      0|#define CKM_CAMELLIA_CBC 0x00000552UL
  ------------------
  |  Branch (463:9): [True: 0, False: 6.05k]
  ------------------
  464|      0|        case CKM_CAMELLIA_MAC:
  ------------------
  |  | 1138|      0|#define CKM_CAMELLIA_MAC 0x00000553UL
  ------------------
  |  Branch (464:9): [True: 0, False: 6.05k]
  ------------------
  465|      0|        case CKM_CAMELLIA_MAC_GENERAL:
  ------------------
  |  | 1139|      0|#define CKM_CAMELLIA_MAC_GENERAL 0x00000554UL
  ------------------
  |  Branch (465:9): [True: 0, False: 6.05k]
  ------------------
  466|      0|        case CKM_CAMELLIA_CBC_PAD:
  ------------------
  |  | 1140|      0|#define CKM_CAMELLIA_CBC_PAD 0x00000555UL
  ------------------
  |  Branch (466:9): [True: 0, False: 6.05k]
  ------------------
  467|      0|        case CKM_CAMELLIA_KEY_GEN:
  ------------------
  |  | 1135|      0|#define CKM_CAMELLIA_KEY_GEN 0x00000550UL
  ------------------
  |  Branch (467:9): [True: 0, False: 6.05k]
  ------------------
  468|      0|            return CKM_CAMELLIA_KEY_GEN;
  ------------------
  |  | 1135|      0|#define CKM_CAMELLIA_KEY_GEN 0x00000550UL
  ------------------
  469|  4.73k|        case CKM_NSS_CHACHA20_POLY1305:
  ------------------
  |  |  243|  4.73k|#define CKM_NSS_CHACHA20_POLY1305 (CKM_NSS + 28)
  |  |  ------------------
  |  |  |  |  162|  4.73k|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|  4.73k|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  4.73k|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (469:9): [True: 4.73k, False: 1.31k]
  ------------------
  470|  4.73k|        case CKM_NSS_CHACHA20_CTR:
  ------------------
  |  |  251|  4.73k|#define CKM_NSS_CHACHA20_CTR (CKM_NSS + 33)
  |  |  ------------------
  |  |  |  |  162|  4.73k|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|  4.73k|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  4.73k|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (470:9): [True: 0, False: 6.05k]
  ------------------
  471|  4.73k|            return CKM_NSS_CHACHA20_KEY_GEN;
  ------------------
  |  |  242|  4.73k|#define CKM_NSS_CHACHA20_KEY_GEN (CKM_NSS + 27)
  |  |  ------------------
  |  |  |  |  162|  4.73k|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|  4.73k|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  4.73k|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  472|      0|        case CKM_CHACHA20_POLY1305:
  ------------------
  |  | 1287|      0|#define CKM_CHACHA20_POLY1305 0x00004021UL
  ------------------
  |  Branch (472:9): [True: 0, False: 6.05k]
  ------------------
  473|      0|        case CKM_CHACHA20:
  ------------------
  |  | 1204|      0|#define CKM_CHACHA20 0x00001226UL
  ------------------
  |  Branch (473:9): [True: 0, False: 6.05k]
  ------------------
  474|      0|            return CKM_CHACHA20_KEY_GEN;
  ------------------
  |  | 1203|      0|#define CKM_CHACHA20_KEY_GEN 0x00001225UL
  ------------------
  475|      0|        case CKM_AES_ECB:
  ------------------
  |  | 1107|      0|#define CKM_AES_ECB 0x00001081UL
  ------------------
  |  Branch (475:9): [True: 0, False: 6.05k]
  ------------------
  476|      0|        case CKM_AES_CBC:
  ------------------
  |  | 1108|      0|#define CKM_AES_CBC 0x00001082UL
  ------------------
  |  Branch (476:9): [True: 0, False: 6.05k]
  ------------------
  477|      0|        case CKM_AES_CCM:
  ------------------
  |  | 1116|      0|#define CKM_AES_CCM 0x00001088UL
  ------------------
  |  Branch (477:9): [True: 0, False: 6.05k]
  ------------------
  478|      0|        case CKM_AES_CTR:
  ------------------
  |  | 1113|      0|#define CKM_AES_CTR 0x00001086UL
  ------------------
  |  Branch (478:9): [True: 0, False: 6.05k]
  ------------------
  479|      0|        case CKM_AES_CTS:
  ------------------
  |  | 1117|      0|#define CKM_AES_CTS 0x00001089UL
  ------------------
  |  Branch (479:9): [True: 0, False: 6.05k]
  ------------------
  480|      0|        case CKM_AES_GCM:
  ------------------
  |  | 1115|      0|#define CKM_AES_GCM 0x00001087UL
  ------------------
  |  Branch (480:9): [True: 0, False: 6.05k]
  ------------------
  481|      0|        case CKM_AES_MAC:
  ------------------
  |  | 1109|      0|#define CKM_AES_MAC 0x00001083UL
  ------------------
  |  Branch (481:9): [True: 0, False: 6.05k]
  ------------------
  482|      0|        case CKM_AES_MAC_GENERAL:
  ------------------
  |  | 1110|      0|#define CKM_AES_MAC_GENERAL 0x00001084UL
  ------------------
  |  Branch (482:9): [True: 0, False: 6.05k]
  ------------------
  483|      0|        case CKM_AES_CMAC:
  ------------------
  |  | 1119|      0|#define CKM_AES_CMAC 0x0000108AUL
  ------------------
  |  Branch (483:9): [True: 0, False: 6.05k]
  ------------------
  484|      0|        case CKM_AES_CMAC_GENERAL:
  ------------------
  |  | 1120|      0|#define CKM_AES_CMAC_GENERAL 0x0000108BUL
  ------------------
  |  Branch (484:9): [True: 0, False: 6.05k]
  ------------------
  485|      0|        case CKM_AES_CBC_PAD:
  ------------------
  |  | 1111|      0|#define CKM_AES_CBC_PAD 0x00001085UL
  ------------------
  |  Branch (485:9): [True: 0, False: 6.05k]
  ------------------
  486|      0|        case CKM_AES_KEY_GEN:
  ------------------
  |  | 1106|      0|#define CKM_AES_KEY_GEN 0x00001080UL
  ------------------
  |  Branch (486:9): [True: 0, False: 6.05k]
  ------------------
  487|      0|            return CKM_AES_KEY_GEN;
  ------------------
  |  | 1106|      0|#define CKM_AES_KEY_GEN 0x00001080UL
  ------------------
  488|      0|        case CKM_DES_ECB:
  ------------------
  |  |  815|      0|#define CKM_DES_ECB 0x00000121UL
  ------------------
  |  Branch (488:9): [True: 0, False: 6.05k]
  ------------------
  489|      0|        case CKM_DES_CBC:
  ------------------
  |  |  816|      0|#define CKM_DES_CBC 0x00000122UL
  ------------------
  |  Branch (489:9): [True: 0, False: 6.05k]
  ------------------
  490|      0|        case CKM_DES_MAC:
  ------------------
  |  |  817|      0|#define CKM_DES_MAC 0x00000123UL
  ------------------
  |  Branch (490:9): [True: 0, False: 6.05k]
  ------------------
  491|      0|        case CKM_DES_MAC_GENERAL:
  ------------------
  |  |  820|      0|#define CKM_DES_MAC_GENERAL 0x00000124UL
  ------------------
  |  Branch (491:9): [True: 0, False: 6.05k]
  ------------------
  492|      0|        case CKM_KEY_WRAP_LYNKS:
  ------------------
  |  | 1035|      0|#define CKM_KEY_WRAP_LYNKS 0x00000400UL
  ------------------
  |  Branch (492:9): [True: 0, False: 6.05k]
  ------------------
  493|      0|        case CKM_DES_CBC_PAD:
  ------------------
  |  |  821|      0|#define CKM_DES_CBC_PAD 0x00000125UL
  ------------------
  |  Branch (493:9): [True: 0, False: 6.05k]
  ------------------
  494|      0|        case CKM_DES_KEY_GEN:
  ------------------
  |  |  814|      0|#define CKM_DES_KEY_GEN 0x00000120UL
  ------------------
  |  Branch (494:9): [True: 0, False: 6.05k]
  ------------------
  495|      0|            return CKM_DES_KEY_GEN;
  ------------------
  |  |  814|      0|#define CKM_DES_KEY_GEN 0x00000120UL
  ------------------
  496|      0|        case CKM_DES3_ECB:
  ------------------
  |  |  825|      0|#define CKM_DES3_ECB 0x00000132UL
  ------------------
  |  Branch (496:9): [True: 0, False: 6.05k]
  ------------------
  497|      0|        case CKM_DES3_CBC:
  ------------------
  |  |  826|      0|#define CKM_DES3_CBC 0x00000133UL
  ------------------
  |  Branch (497:9): [True: 0, False: 6.05k]
  ------------------
  498|      0|        case CKM_DES3_MAC:
  ------------------
  |  |  827|      0|#define CKM_DES3_MAC 0x00000134UL
  ------------------
  |  Branch (498:9): [True: 0, False: 6.05k]
  ------------------
  499|      0|        case CKM_DES3_MAC_GENERAL:
  ------------------
  |  |  832|      0|#define CKM_DES3_MAC_GENERAL 0x00000135UL
  ------------------
  |  Branch (499:9): [True: 0, False: 6.05k]
  ------------------
  500|      0|        case CKM_DES3_CBC_PAD:
  ------------------
  |  |  833|      0|#define CKM_DES3_CBC_PAD 0x00000136UL
  ------------------
  |  Branch (500:9): [True: 0, False: 6.05k]
  ------------------
  501|      0|            return (size == 16) ? CKM_DES2_KEY_GEN : CKM_DES3_KEY_GEN;
  ------------------
  |  |  823|      0|#define CKM_DES2_KEY_GEN 0x00000130UL
  ------------------
                          return (size == 16) ? CKM_DES2_KEY_GEN : CKM_DES3_KEY_GEN;
  ------------------
  |  |  824|      0|#define CKM_DES3_KEY_GEN 0x00000131UL
  ------------------
  |  Branch (501:20): [True: 0, False: 0]
  ------------------
  502|      0|        case CKM_DES3_KEY_GEN:
  ------------------
  |  |  824|      0|#define CKM_DES3_KEY_GEN 0x00000131UL
  ------------------
  |  Branch (502:9): [True: 0, False: 6.05k]
  ------------------
  503|      0|            return CKM_DES3_KEY_GEN;
  ------------------
  |  |  824|      0|#define CKM_DES3_KEY_GEN 0x00000131UL
  ------------------
  504|      0|        case CKM_DES2_KEY_GEN:
  ------------------
  |  |  823|      0|#define CKM_DES2_KEY_GEN 0x00000130UL
  ------------------
  |  Branch (504:9): [True: 0, False: 6.05k]
  ------------------
  505|      0|            return CKM_DES2_KEY_GEN;
  ------------------
  |  |  823|      0|#define CKM_DES2_KEY_GEN 0x00000130UL
  ------------------
  506|      0|        case CKM_CDMF_ECB:
  ------------------
  |  |  835|      0|#define CKM_CDMF_ECB 0x00000141UL
  ------------------
  |  Branch (506:9): [True: 0, False: 6.05k]
  ------------------
  507|      0|        case CKM_CDMF_CBC:
  ------------------
  |  |  836|      0|#define CKM_CDMF_CBC 0x00000142UL
  ------------------
  |  Branch (507:9): [True: 0, False: 6.05k]
  ------------------
  508|      0|        case CKM_CDMF_MAC:
  ------------------
  |  |  837|      0|#define CKM_CDMF_MAC 0x00000143UL
  ------------------
  |  Branch (508:9): [True: 0, False: 6.05k]
  ------------------
  509|      0|        case CKM_CDMF_MAC_GENERAL:
  ------------------
  |  |  838|      0|#define CKM_CDMF_MAC_GENERAL 0x00000144UL
  ------------------
  |  Branch (509:9): [True: 0, False: 6.05k]
  ------------------
  510|      0|        case CKM_CDMF_CBC_PAD:
  ------------------
  |  |  839|      0|#define CKM_CDMF_CBC_PAD 0x00000145UL
  ------------------
  |  Branch (510:9): [True: 0, False: 6.05k]
  ------------------
  511|      0|        case CKM_CDMF_KEY_GEN:
  ------------------
  |  |  834|      0|#define CKM_CDMF_KEY_GEN 0x00000140UL
  ------------------
  |  Branch (511:9): [True: 0, False: 6.05k]
  ------------------
  512|      0|            return CKM_CDMF_KEY_GEN;
  ------------------
  |  |  834|      0|#define CKM_CDMF_KEY_GEN 0x00000140UL
  ------------------
  513|      0|        case CKM_RC2_ECB:
  ------------------
  |  |  804|      0|#define CKM_RC2_ECB 0x00000101UL
  ------------------
  |  Branch (513:9): [True: 0, False: 6.05k]
  ------------------
  514|      0|        case CKM_RC2_CBC:
  ------------------
  |  |  805|      0|#define CKM_RC2_CBC 0x00000102UL
  ------------------
  |  Branch (514:9): [True: 0, False: 6.05k]
  ------------------
  515|      0|        case CKM_RC2_MAC:
  ------------------
  |  |  806|      0|#define CKM_RC2_MAC 0x00000103UL
  ------------------
  |  Branch (515:9): [True: 0, False: 6.05k]
  ------------------
  516|      0|        case CKM_RC2_MAC_GENERAL:
  ------------------
  |  |  809|      0|#define CKM_RC2_MAC_GENERAL 0x00000104UL
  ------------------
  |  Branch (516:9): [True: 0, False: 6.05k]
  ------------------
  517|      0|        case CKM_RC2_CBC_PAD:
  ------------------
  |  |  810|      0|#define CKM_RC2_CBC_PAD 0x00000105UL
  ------------------
  |  Branch (517:9): [True: 0, False: 6.05k]
  ------------------
  518|      0|        case CKM_RC2_KEY_GEN:
  ------------------
  |  |  803|      0|#define CKM_RC2_KEY_GEN 0x00000100UL
  ------------------
  |  Branch (518:9): [True: 0, False: 6.05k]
  ------------------
  519|      0|            return CKM_RC2_KEY_GEN;
  ------------------
  |  |  803|      0|#define CKM_RC2_KEY_GEN 0x00000100UL
  ------------------
  520|      0|        case CKM_RC4:
  ------------------
  |  |  813|      0|#define CKM_RC4 0x00000111UL
  ------------------
  |  Branch (520:9): [True: 0, False: 6.05k]
  ------------------
  521|      0|        case CKM_RC4_KEY_GEN:
  ------------------
  |  |  812|      0|#define CKM_RC4_KEY_GEN 0x00000110UL
  ------------------
  |  Branch (521:9): [True: 0, False: 6.05k]
  ------------------
  522|      0|            return CKM_RC4_KEY_GEN;
  ------------------
  |  |  812|      0|#define CKM_RC4_KEY_GEN 0x00000110UL
  ------------------
  523|      0|        case CKM_RC5_ECB:
  ------------------
  |  |  942|      0|#define CKM_RC5_ECB 0x00000331UL
  ------------------
  |  Branch (523:9): [True: 0, False: 6.05k]
  ------------------
  524|      0|        case CKM_RC5_CBC:
  ------------------
  |  |  943|      0|#define CKM_RC5_CBC 0x00000332UL
  ------------------
  |  Branch (524:9): [True: 0, False: 6.05k]
  ------------------
  525|      0|        case CKM_RC5_MAC:
  ------------------
  |  |  944|      0|#define CKM_RC5_MAC 0x00000333UL
  ------------------
  |  Branch (525:9): [True: 0, False: 6.05k]
  ------------------
  526|      0|        case CKM_RC5_MAC_GENERAL:
  ------------------
  |  |  945|      0|#define CKM_RC5_MAC_GENERAL 0x00000334UL
  ------------------
  |  Branch (526:9): [True: 0, False: 6.05k]
  ------------------
  527|      0|        case CKM_RC5_CBC_PAD:
  ------------------
  |  |  946|      0|#define CKM_RC5_CBC_PAD 0x00000335UL
  ------------------
  |  Branch (527:9): [True: 0, False: 6.05k]
  ------------------
  528|      0|        case CKM_RC5_KEY_GEN:
  ------------------
  |  |  941|      0|#define CKM_RC5_KEY_GEN 0x00000330UL
  ------------------
  |  Branch (528:9): [True: 0, False: 6.05k]
  ------------------
  529|      0|            return CKM_RC5_KEY_GEN;
  ------------------
  |  |  941|      0|#define CKM_RC5_KEY_GEN 0x00000330UL
  ------------------
  530|      0|        case CKM_SKIPJACK_CBC64:
  ------------------
  |  | 1049|      0|#define CKM_SKIPJACK_CBC64 0x00001002UL
  ------------------
  |  Branch (530:9): [True: 0, False: 6.05k]
  ------------------
  531|      0|        case CKM_SKIPJACK_ECB64:
  ------------------
  |  | 1048|      0|#define CKM_SKIPJACK_ECB64 0x00001001UL
  ------------------
  |  Branch (531:9): [True: 0, False: 6.05k]
  ------------------
  532|      0|        case CKM_SKIPJACK_OFB64:
  ------------------
  |  | 1050|      0|#define CKM_SKIPJACK_OFB64 0x00001003UL
  ------------------
  |  Branch (532:9): [True: 0, False: 6.05k]
  ------------------
  533|      0|        case CKM_SKIPJACK_CFB64:
  ------------------
  |  | 1051|      0|#define CKM_SKIPJACK_CFB64 0x00001004UL
  ------------------
  |  Branch (533:9): [True: 0, False: 6.05k]
  ------------------
  534|      0|        case CKM_SKIPJACK_CFB32:
  ------------------
  |  | 1052|      0|#define CKM_SKIPJACK_CFB32 0x00001005UL
  ------------------
  |  Branch (534:9): [True: 0, False: 6.05k]
  ------------------
  535|      0|        case CKM_SKIPJACK_CFB16:
  ------------------
  |  | 1053|      0|#define CKM_SKIPJACK_CFB16 0x00001006UL
  ------------------
  |  Branch (535:9): [True: 0, False: 6.05k]
  ------------------
  536|      0|        case CKM_SKIPJACK_CFB8:
  ------------------
  |  | 1054|      0|#define CKM_SKIPJACK_CFB8 0x00001007UL
  ------------------
  |  Branch (536:9): [True: 0, False: 6.05k]
  ------------------
  537|      0|        case CKM_SKIPJACK_WRAP:
  ------------------
  |  | 1055|      0|#define CKM_SKIPJACK_WRAP 0x00001008UL
  ------------------
  |  Branch (537:9): [True: 0, False: 6.05k]
  ------------------
  538|      0|        case CKM_SKIPJACK_KEY_GEN:
  ------------------
  |  | 1047|      0|#define CKM_SKIPJACK_KEY_GEN 0x00001000UL
  ------------------
  |  Branch (538:9): [True: 0, False: 6.05k]
  ------------------
  539|      0|            return CKM_SKIPJACK_KEY_GEN;
  ------------------
  |  | 1047|      0|#define CKM_SKIPJACK_KEY_GEN 0x00001000UL
  ------------------
  540|      0|        case CKM_BATON_ECB128:
  ------------------
  |  | 1062|      0|#define CKM_BATON_ECB128 0x00001031UL
  ------------------
  |  Branch (540:9): [True: 0, False: 6.05k]
  ------------------
  541|      0|        case CKM_BATON_ECB96:
  ------------------
  |  | 1063|      0|#define CKM_BATON_ECB96 0x00001032UL
  ------------------
  |  Branch (541:9): [True: 0, False: 6.05k]
  ------------------
  542|      0|        case CKM_BATON_CBC128:
  ------------------
  |  | 1064|      0|#define CKM_BATON_CBC128 0x00001033UL
  ------------------
  |  Branch (542:9): [True: 0, False: 6.05k]
  ------------------
  543|      0|        case CKM_BATON_COUNTER:
  ------------------
  |  | 1065|      0|#define CKM_BATON_COUNTER 0x00001034UL
  ------------------
  |  Branch (543:9): [True: 0, False: 6.05k]
  ------------------
  544|      0|        case CKM_BATON_SHUFFLE:
  ------------------
  |  | 1066|      0|#define CKM_BATON_SHUFFLE 0x00001035UL
  ------------------
  |  Branch (544:9): [True: 0, False: 6.05k]
  ------------------
  545|      0|        case CKM_BATON_WRAP:
  ------------------
  |  | 1067|      0|#define CKM_BATON_WRAP 0x00001036UL
  ------------------
  |  Branch (545:9): [True: 0, False: 6.05k]
  ------------------
  546|      0|        case CKM_BATON_KEY_GEN:
  ------------------
  |  | 1061|      0|#define CKM_BATON_KEY_GEN 0x00001030UL
  ------------------
  |  Branch (546:9): [True: 0, False: 6.05k]
  ------------------
  547|      0|            return CKM_BATON_KEY_GEN;
  ------------------
  |  | 1061|      0|#define CKM_BATON_KEY_GEN 0x00001030UL
  ------------------
  548|      0|        case CKM_JUNIPER_ECB128:
  ------------------
  |  | 1095|      0|#define CKM_JUNIPER_ECB128 0x00001061UL
  ------------------
  |  Branch (548:9): [True: 0, False: 6.05k]
  ------------------
  549|      0|        case CKM_JUNIPER_CBC128:
  ------------------
  |  | 1096|      0|#define CKM_JUNIPER_CBC128 0x00001062UL
  ------------------
  |  Branch (549:9): [True: 0, False: 6.05k]
  ------------------
  550|      0|        case CKM_JUNIPER_COUNTER:
  ------------------
  |  | 1097|      0|#define CKM_JUNIPER_COUNTER 0x00001063UL
  ------------------
  |  Branch (550:9): [True: 0, False: 6.05k]
  ------------------
  551|      0|        case CKM_JUNIPER_SHUFFLE:
  ------------------
  |  | 1098|      0|#define CKM_JUNIPER_SHUFFLE 0x00001064UL
  ------------------
  |  Branch (551:9): [True: 0, False: 6.05k]
  ------------------
  552|      0|        case CKM_JUNIPER_WRAP:
  ------------------
  |  | 1099|      0|#define CKM_JUNIPER_WRAP 0x00001065UL
  ------------------
  |  Branch (552:9): [True: 0, False: 6.05k]
  ------------------
  553|      0|        case CKM_JUNIPER_KEY_GEN:
  ------------------
  |  | 1094|      0|#define CKM_JUNIPER_KEY_GEN 0x00001060UL
  ------------------
  |  Branch (553:9): [True: 0, False: 6.05k]
  ------------------
  554|      0|            return CKM_JUNIPER_KEY_GEN;
  ------------------
  |  | 1094|      0|#define CKM_JUNIPER_KEY_GEN 0x00001060UL
  ------------------
  555|      0|        case CKM_IDEA_CBC:
  ------------------
  |  |  949|      0|#define CKM_IDEA_CBC 0x00000342UL
  ------------------
  |  Branch (555:9): [True: 0, False: 6.05k]
  ------------------
  556|      0|        case CKM_IDEA_ECB:
  ------------------
  |  |  948|      0|#define CKM_IDEA_ECB 0x00000341UL
  ------------------
  |  Branch (556:9): [True: 0, False: 6.05k]
  ------------------
  557|      0|        case CKM_IDEA_MAC:
  ------------------
  |  |  950|      0|#define CKM_IDEA_MAC 0x00000343UL
  ------------------
  |  Branch (557:9): [True: 0, False: 6.05k]
  ------------------
  558|      0|        case CKM_IDEA_MAC_GENERAL:
  ------------------
  |  |  951|      0|#define CKM_IDEA_MAC_GENERAL 0x00000344UL
  ------------------
  |  Branch (558:9): [True: 0, False: 6.05k]
  ------------------
  559|      0|        case CKM_IDEA_CBC_PAD:
  ------------------
  |  |  952|      0|#define CKM_IDEA_CBC_PAD 0x00000345UL
  ------------------
  |  Branch (559:9): [True: 0, False: 6.05k]
  ------------------
  560|      0|        case CKM_IDEA_KEY_GEN:
  ------------------
  |  |  947|      0|#define CKM_IDEA_KEY_GEN 0x00000340UL
  ------------------
  |  Branch (560:9): [True: 0, False: 6.05k]
  ------------------
  561|      0|            return CKM_IDEA_KEY_GEN;
  ------------------
  |  |  947|      0|#define CKM_IDEA_KEY_GEN 0x00000340UL
  ------------------
  562|      0|        case CKM_CAST_ECB:
  ------------------
  |  |  918|      0|#define CKM_CAST_ECB 0x00000301UL
  ------------------
  |  Branch (562:9): [True: 0, False: 6.05k]
  ------------------
  563|      0|        case CKM_CAST_CBC:
  ------------------
  |  |  919|      0|#define CKM_CAST_CBC 0x00000302UL
  ------------------
  |  Branch (563:9): [True: 0, False: 6.05k]
  ------------------
  564|      0|        case CKM_CAST_MAC:
  ------------------
  |  |  920|      0|#define CKM_CAST_MAC 0x00000303UL
  ------------------
  |  Branch (564:9): [True: 0, False: 6.05k]
  ------------------
  565|      0|        case CKM_CAST_MAC_GENERAL:
  ------------------
  |  |  921|      0|#define CKM_CAST_MAC_GENERAL 0x00000304UL
  ------------------
  |  Branch (565:9): [True: 0, False: 6.05k]
  ------------------
  566|      0|        case CKM_CAST_CBC_PAD:
  ------------------
  |  |  922|      0|#define CKM_CAST_CBC_PAD 0x00000305UL
  ------------------
  |  Branch (566:9): [True: 0, False: 6.05k]
  ------------------
  567|      0|        case CKM_CAST_KEY_GEN:
  ------------------
  |  |  917|      0|#define CKM_CAST_KEY_GEN 0x00000300UL
  ------------------
  |  Branch (567:9): [True: 0, False: 6.05k]
  ------------------
  568|      0|            return CKM_CAST_KEY_GEN;
  ------------------
  |  |  917|      0|#define CKM_CAST_KEY_GEN 0x00000300UL
  ------------------
  569|      0|        case CKM_CAST3_ECB:
  ------------------
  |  |  924|      0|#define CKM_CAST3_ECB 0x00000311UL
  ------------------
  |  Branch (569:9): [True: 0, False: 6.05k]
  ------------------
  570|      0|        case CKM_CAST3_CBC:
  ------------------
  |  |  925|      0|#define CKM_CAST3_CBC 0x00000312UL
  ------------------
  |  Branch (570:9): [True: 0, False: 6.05k]
  ------------------
  571|      0|        case CKM_CAST3_MAC:
  ------------------
  |  |  926|      0|#define CKM_CAST3_MAC 0x00000313UL
  ------------------
  |  Branch (571:9): [True: 0, False: 6.05k]
  ------------------
  572|      0|        case CKM_CAST3_MAC_GENERAL:
  ------------------
  |  |  927|      0|#define CKM_CAST3_MAC_GENERAL 0x00000314UL
  ------------------
  |  Branch (572:9): [True: 0, False: 6.05k]
  ------------------
  573|      0|        case CKM_CAST3_CBC_PAD:
  ------------------
  |  |  928|      0|#define CKM_CAST3_CBC_PAD 0x00000315UL
  ------------------
  |  Branch (573:9): [True: 0, False: 6.05k]
  ------------------
  574|      0|        case CKM_CAST3_KEY_GEN:
  ------------------
  |  |  923|      0|#define CKM_CAST3_KEY_GEN 0x00000310UL
  ------------------
  |  Branch (574:9): [True: 0, False: 6.05k]
  ------------------
  575|      0|            return CKM_CAST3_KEY_GEN;
  ------------------
  |  |  923|      0|#define CKM_CAST3_KEY_GEN 0x00000310UL
  ------------------
  576|      0|        case CKM_CAST5_ECB:
  ------------------
  |  |  931|      0|#define CKM_CAST5_ECB 0x00000321UL
  ------------------
  |  Branch (576:9): [True: 0, False: 6.05k]
  ------------------
  577|      0|        case CKM_CAST5_CBC:
  ------------------
  |  |  933|      0|#define CKM_CAST5_CBC 0x00000322UL
  ------------------
  |  Branch (577:9): [True: 0, False: 6.05k]
  ------------------
  578|      0|        case CKM_CAST5_MAC:
  ------------------
  |  |  935|      0|#define CKM_CAST5_MAC 0x00000323UL
  ------------------
  |  Branch (578:9): [True: 0, False: 6.05k]
  ------------------
  579|      0|        case CKM_CAST5_MAC_GENERAL:
  ------------------
  |  |  937|      0|#define CKM_CAST5_MAC_GENERAL 0x00000324UL
  ------------------
  |  Branch (579:9): [True: 0, False: 6.05k]
  ------------------
  580|      0|        case CKM_CAST5_CBC_PAD:
  ------------------
  |  |  939|      0|#define CKM_CAST5_CBC_PAD 0x00000325UL
  ------------------
  |  Branch (580:9): [True: 0, False: 6.05k]
  ------------------
  581|      0|        case CKM_CAST5_KEY_GEN:
  ------------------
  |  |  929|      0|#define CKM_CAST5_KEY_GEN 0x00000320UL
  ------------------
  |  Branch (581:9): [True: 0, False: 6.05k]
  ------------------
  582|      0|            return CKM_CAST5_KEY_GEN;
  ------------------
  |  |  929|      0|#define CKM_CAST5_KEY_GEN 0x00000320UL
  ------------------
  583|      0|        case CKM_RSA_PKCS:
  ------------------
  |  |  720|      0|#define CKM_RSA_PKCS 0x00000001UL
  ------------------
  |  Branch (583:9): [True: 0, False: 6.05k]
  ------------------
  584|      0|        case CKM_RSA_9796:
  ------------------
  |  |  721|      0|#define CKM_RSA_9796 0x00000002UL
  ------------------
  |  Branch (584:9): [True: 0, False: 6.05k]
  ------------------
  585|      0|        case CKM_RSA_X_509:
  ------------------
  |  |  722|      0|#define CKM_RSA_X_509 0x00000003UL
  ------------------
  |  Branch (585:9): [True: 0, False: 6.05k]
  ------------------
  586|      0|        case CKM_MD2_RSA_PKCS:
  ------------------
  |  |  726|      0|#define CKM_MD2_RSA_PKCS 0x00000004UL
  ------------------
  |  Branch (586:9): [True: 0, False: 6.05k]
  ------------------
  587|      0|        case CKM_MD5_RSA_PKCS:
  ------------------
  |  |  727|      0|#define CKM_MD5_RSA_PKCS 0x00000005UL
  ------------------
  |  Branch (587:9): [True: 0, False: 6.05k]
  ------------------
  588|      0|        case CKM_SHA1_RSA_PKCS:
  ------------------
  |  |  728|      0|#define CKM_SHA1_RSA_PKCS 0x00000006UL
  ------------------
  |  Branch (588:9): [True: 0, False: 6.05k]
  ------------------
  589|      0|        case CKM_SHA224_RSA_PKCS:
  ------------------
  |  |  778|      0|#define CKM_SHA224_RSA_PKCS 0x00000046UL
  ------------------
  |  Branch (589:9): [True: 0, False: 6.05k]
  ------------------
  590|      0|        case CKM_SHA256_RSA_PKCS:
  ------------------
  |  |  770|      0|#define CKM_SHA256_RSA_PKCS 0x00000040UL
  ------------------
  |  Branch (590:9): [True: 0, False: 6.05k]
  ------------------
  591|      0|        case CKM_SHA384_RSA_PKCS:
  ------------------
  |  |  771|      0|#define CKM_SHA384_RSA_PKCS 0x00000041UL
  ------------------
  |  Branch (591:9): [True: 0, False: 6.05k]
  ------------------
  592|      0|        case CKM_SHA512_RSA_PKCS:
  ------------------
  |  |  772|      0|#define CKM_SHA512_RSA_PKCS 0x00000042UL
  ------------------
  |  Branch (592:9): [True: 0, False: 6.05k]
  ------------------
  593|      0|        case CKM_KEY_WRAP_SET_OAEP:
  ------------------
  |  | 1036|      0|#define CKM_KEY_WRAP_SET_OAEP 0x00000401UL
  ------------------
  |  Branch (593:9): [True: 0, False: 6.05k]
  ------------------
  594|      0|        case CKM_RSA_PKCS_KEY_PAIR_GEN:
  ------------------
  |  |  719|      0|#define CKM_RSA_PKCS_KEY_PAIR_GEN 0x00000000UL
  ------------------
  |  Branch (594:9): [True: 0, False: 6.05k]
  ------------------
  595|      0|            return CKM_RSA_PKCS_KEY_PAIR_GEN;
  ------------------
  |  |  719|      0|#define CKM_RSA_PKCS_KEY_PAIR_GEN 0x00000000UL
  ------------------
  596|      0|        case CKM_RSA_X9_31_KEY_PAIR_GEN:
  ------------------
  |  |  738|      0|#define CKM_RSA_X9_31_KEY_PAIR_GEN 0x0000000AUL
  ------------------
  |  Branch (596:9): [True: 0, False: 6.05k]
  ------------------
  597|      0|            return CKM_RSA_X9_31_KEY_PAIR_GEN;
  ------------------
  |  |  738|      0|#define CKM_RSA_X9_31_KEY_PAIR_GEN 0x0000000AUL
  ------------------
  598|      0|        case CKM_DSA:
  ------------------
  |  |  745|      0|#define CKM_DSA 0x00000011UL
  ------------------
  |  Branch (598:9): [True: 0, False: 6.05k]
  ------------------
  599|      0|        case CKM_DSA_SHA1:
  ------------------
  |  |  746|      0|#define CKM_DSA_SHA1 0x00000012UL
  ------------------
  |  Branch (599:9): [True: 0, False: 6.05k]
  ------------------
  600|      0|        case CKM_DSA_KEY_PAIR_GEN:
  ------------------
  |  |  744|      0|#define CKM_DSA_KEY_PAIR_GEN 0x00000010UL
  ------------------
  |  Branch (600:9): [True: 0, False: 6.05k]
  ------------------
  601|      0|            return CKM_DSA_KEY_PAIR_GEN;
  ------------------
  |  |  744|      0|#define CKM_DSA_KEY_PAIR_GEN 0x00000010UL
  ------------------
  602|      0|        case CKM_DH_PKCS_DERIVE:
  ------------------
  |  |  759|      0|#define CKM_DH_PKCS_DERIVE 0x00000021UL
  ------------------
  |  Branch (602:9): [True: 0, False: 6.05k]
  ------------------
  603|      0|        case CKM_DH_PKCS_KEY_PAIR_GEN:
  ------------------
  |  |  758|      0|#define CKM_DH_PKCS_KEY_PAIR_GEN 0x00000020UL
  ------------------
  |  Branch (603:9): [True: 0, False: 6.05k]
  ------------------
  604|      0|            return CKM_DH_PKCS_KEY_PAIR_GEN;
  ------------------
  |  |  758|      0|#define CKM_DH_PKCS_KEY_PAIR_GEN 0x00000020UL
  ------------------
  605|      0|        case CKM_KEA_KEY_DERIVE:
  ------------------
  |  | 1059|      0|#define CKM_KEA_KEY_DERIVE 0x00001011UL
  ------------------
  |  Branch (605:9): [True: 0, False: 6.05k]
  ------------------
  606|      0|        case CKM_KEA_KEY_PAIR_GEN:
  ------------------
  |  | 1058|      0|#define CKM_KEA_KEY_PAIR_GEN 0x00001010UL
  ------------------
  |  Branch (606:9): [True: 0, False: 6.05k]
  ------------------
  607|      0|            return CKM_KEA_KEY_PAIR_GEN;
  ------------------
  |  | 1058|      0|#define CKM_KEA_KEY_PAIR_GEN 0x00001010UL
  ------------------
  608|      0|        case CKM_ECDSA:
  ------------------
  |  | 1074|      0|#define CKM_ECDSA 0x00001041UL
  ------------------
  |  Branch (608:9): [True: 0, False: 6.05k]
  ------------------
  609|      0|        case CKM_ECDSA_SHA1:
  ------------------
  |  | 1075|      0|#define CKM_ECDSA_SHA1 0x00001042UL
  ------------------
  |  Branch (609:9): [True: 0, False: 6.05k]
  ------------------
  610|      0|        case CKM_EC_KEY_PAIR_GEN: /* aka CKM_ECDSA_KEY_PAIR_GEN */
  ------------------
  |  | 1072|      0|#define CKM_EC_KEY_PAIR_GEN 0x00001040UL
  ------------------
  |  Branch (610:9): [True: 0, False: 6.05k]
  ------------------
  611|      0|        case CKM_ECDH1_DERIVE:
  ------------------
  |  | 1086|      0|#define CKM_ECDH1_DERIVE 0x00001050UL
  ------------------
  |  Branch (611:9): [True: 0, False: 6.05k]
  ------------------
  612|      0|            return CKM_EC_KEY_PAIR_GEN;
  ------------------
  |  | 1072|      0|#define CKM_EC_KEY_PAIR_GEN 0x00001040UL
  ------------------
  613|      0|        case CKM_EDDSA:
  ------------------
  |  | 1174|      0|#define CKM_EDDSA 0x00001057UL
  ------------------
  |  Branch (613:9): [True: 0, False: 6.05k]
  ------------------
  614|      0|            return CKM_EC_EDWARDS_KEY_PAIR_GEN;
  ------------------
  |  | 1172|      0|#define CKM_EC_EDWARDS_KEY_PAIR_GEN 0x00001055UL
  ------------------
  615|  1.31k|        case CKM_SSL3_PRE_MASTER_KEY_GEN:
  ------------------
  |  |  959|  1.31k|#define CKM_SSL3_PRE_MASTER_KEY_GEN 0x00000370UL
  ------------------
  |  Branch (615:9): [True: 1.31k, False: 4.73k]
  ------------------
  616|  1.31k|        case CKM_SSL3_MASTER_KEY_DERIVE:
  ------------------
  |  |  960|  1.31k|#define CKM_SSL3_MASTER_KEY_DERIVE 0x00000371UL
  ------------------
  |  Branch (616:9): [True: 0, False: 6.05k]
  ------------------
  617|  1.31k|        case CKM_SSL3_KEY_AND_MAC_DERIVE:
  ------------------
  |  |  961|  1.31k|#define CKM_SSL3_KEY_AND_MAC_DERIVE 0x00000372UL
  ------------------
  |  Branch (617:9): [True: 0, False: 6.05k]
  ------------------
  618|  1.31k|        case CKM_SSL3_SHA1_MAC:
  ------------------
  |  |  976|  1.31k|#define CKM_SSL3_SHA1_MAC 0x00000381UL
  ------------------
  |  Branch (618:9): [True: 0, False: 6.05k]
  ------------------
  619|  1.31k|        case CKM_SSL3_MD5_MAC:
  ------------------
  |  |  975|  1.31k|#define CKM_SSL3_MD5_MAC 0x00000380UL
  ------------------
  |  Branch (619:9): [True: 0, False: 6.05k]
  ------------------
  620|  1.31k|        case CKM_TLS_MASTER_KEY_DERIVE:
  ------------------
  |  |  968|  1.31k|#define CKM_TLS_MASTER_KEY_DERIVE 0x00000375UL
  ------------------
  |  Branch (620:9): [True: 0, False: 6.05k]
  ------------------
  621|  1.31k|        case CKM_TLS_KEY_AND_MAC_DERIVE:
  ------------------
  |  |  969|  1.31k|#define CKM_TLS_KEY_AND_MAC_DERIVE 0x00000376UL
  ------------------
  |  Branch (621:9): [True: 0, False: 6.05k]
  ------------------
  622|  1.31k|        case CKM_NSS_TLS_KEY_AND_MAC_DERIVE_SHA256:
  ------------------
  |  |  235|  1.31k|#define CKM_NSS_TLS_KEY_AND_MAC_DERIVE_SHA256 (CKM_NSS + 23)
  |  |  ------------------
  |  |  |  |  162|  1.31k|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|  1.31k|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  1.31k|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (622:9): [True: 0, False: 6.05k]
  ------------------
  623|  1.31k|        case CKM_NSS_TLS_EXTENDED_MASTER_KEY_DERIVE:
  ------------------
  |  |  239|  1.31k|#define CKM_NSS_TLS_EXTENDED_MASTER_KEY_DERIVE (CKM_NSS + 25)
  |  |  ------------------
  |  |  |  |  162|  1.31k|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|  1.31k|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  1.31k|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (623:9): [True: 0, False: 6.05k]
  ------------------
  624|  1.31k|        case CKM_NSS_TLS_EXTENDED_MASTER_KEY_DERIVE_DH:
  ------------------
  |  |  240|  1.31k|#define CKM_NSS_TLS_EXTENDED_MASTER_KEY_DERIVE_DH (CKM_NSS + 26)
  |  |  ------------------
  |  |  |  |  162|  1.31k|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|  1.31k|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  1.31k|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (624:9): [True: 0, False: 6.05k]
  ------------------
  625|  1.31k|            return CKM_SSL3_PRE_MASTER_KEY_GEN;
  ------------------
  |  |  959|  1.31k|#define CKM_SSL3_PRE_MASTER_KEY_GEN 0x00000370UL
  ------------------
  626|      0|        case CKM_SHA_1_HMAC:
  ------------------
  |  |  862|      0|#define CKM_SHA_1_HMAC 0x00000221UL
  ------------------
  |  Branch (626:9): [True: 0, False: 6.05k]
  ------------------
  627|      0|        case CKM_SHA_1_HMAC_GENERAL:
  ------------------
  |  |  863|      0|#define CKM_SHA_1_HMAC_GENERAL 0x00000222UL
  ------------------
  |  Branch (627:9): [True: 0, False: 6.05k]
  ------------------
  628|      0|        case CKM_SHA224_HMAC:
  ------------------
  |  |  888|      0|#define CKM_SHA224_HMAC 0x00000256UL
  ------------------
  |  Branch (628:9): [True: 0, False: 6.05k]
  ------------------
  629|      0|        case CKM_SHA224_HMAC_GENERAL:
  ------------------
  |  |  889|      0|#define CKM_SHA224_HMAC_GENERAL 0x00000257UL
  ------------------
  |  Branch (629:9): [True: 0, False: 6.05k]
  ------------------
  630|      0|        case CKM_SHA256_HMAC:
  ------------------
  |  |  877|      0|#define CKM_SHA256_HMAC 0x00000251UL
  ------------------
  |  Branch (630:9): [True: 0, False: 6.05k]
  ------------------
  631|      0|        case CKM_SHA256_HMAC_GENERAL:
  ------------------
  |  |  878|      0|#define CKM_SHA256_HMAC_GENERAL 0x00000252UL
  ------------------
  |  Branch (631:9): [True: 0, False: 6.05k]
  ------------------
  632|      0|        case CKM_SHA384_HMAC:
  ------------------
  |  |  880|      0|#define CKM_SHA384_HMAC 0x00000261UL
  ------------------
  |  Branch (632:9): [True: 0, False: 6.05k]
  ------------------
  633|      0|        case CKM_SHA384_HMAC_GENERAL:
  ------------------
  |  |  881|      0|#define CKM_SHA384_HMAC_GENERAL 0x00000262UL
  ------------------
  |  Branch (633:9): [True: 0, False: 6.05k]
  ------------------
  634|      0|        case CKM_SHA512_HMAC:
  ------------------
  |  |  883|      0|#define CKM_SHA512_HMAC 0x00000271UL
  ------------------
  |  Branch (634:9): [True: 0, False: 6.05k]
  ------------------
  635|      0|        case CKM_SHA512_HMAC_GENERAL:
  ------------------
  |  |  884|      0|#define CKM_SHA512_HMAC_GENERAL 0x00000272UL
  ------------------
  |  Branch (635:9): [True: 0, False: 6.05k]
  ------------------
  636|      0|        case CKM_MD2_HMAC:
  ------------------
  |  |  850|      0|#define CKM_MD2_HMAC 0x00000201UL
  ------------------
  |  Branch (636:9): [True: 0, False: 6.05k]
  ------------------
  637|      0|        case CKM_MD2_HMAC_GENERAL:
  ------------------
  |  |  851|      0|#define CKM_MD2_HMAC_GENERAL 0x00000202UL
  ------------------
  |  Branch (637:9): [True: 0, False: 6.05k]
  ------------------
  638|      0|        case CKM_MD5_HMAC:
  ------------------
  |  |  856|      0|#define CKM_MD5_HMAC 0x00000211UL
  ------------------
  |  Branch (638:9): [True: 0, False: 6.05k]
  ------------------
  639|      0|        case CKM_MD5_HMAC_GENERAL:
  ------------------
  |  |  857|      0|#define CKM_MD5_HMAC_GENERAL 0x00000212UL
  ------------------
  |  Branch (639:9): [True: 0, False: 6.05k]
  ------------------
  640|      0|        case CKM_TLS_PRF_GENERAL:
  ------------------
  |  |  297|      0|#define CKM_TLS_PRF_GENERAL 0x80000373UL
  ------------------
  |  Branch (640:9): [True: 0, False: 6.05k]
  ------------------
  641|      0|        case CKM_NSS_TLS_PRF_GENERAL_SHA256:
  ------------------
  |  |  233|      0|#define CKM_NSS_TLS_PRF_GENERAL_SHA256 (CKM_NSS + 21)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (641:9): [True: 0, False: 6.05k]
  ------------------
  642|      0|        case CKM_GENERIC_SECRET_KEY_GEN:
  ------------------
  |  |  953|      0|#define CKM_GENERIC_SECRET_KEY_GEN 0x00000350UL
  ------------------
  |  Branch (642:9): [True: 0, False: 6.05k]
  ------------------
  643|      0|            return CKM_GENERIC_SECRET_KEY_GEN;
  ------------------
  |  |  953|      0|#define CKM_GENERIC_SECRET_KEY_GEN 0x00000350UL
  ------------------
  644|      0|        case CKM_PBE_MD2_DES_CBC:
  ------------------
  |  |  997|      0|#define CKM_PBE_MD2_DES_CBC 0x000003A0UL
  ------------------
  |  Branch (644:9): [True: 0, False: 6.05k]
  ------------------
  645|      0|        case CKM_PBE_MD5_DES_CBC:
  ------------------
  |  |  998|      0|#define CKM_PBE_MD5_DES_CBC 0x000003A1UL
  ------------------
  |  Branch (645:9): [True: 0, False: 6.05k]
  ------------------
  646|      0|        case CKM_PBA_SHA1_WITH_SHA1_HMAC:
  ------------------
  |  | 1015|      0|#define CKM_PBA_SHA1_WITH_SHA1_HMAC 0x000003C0UL
  ------------------
  |  Branch (646:9): [True: 0, False: 6.05k]
  ------------------
  647|      0|        case CKM_NSS_PBE_SHA1_HMAC_KEY_GEN:
  ------------------
  |  |  293|      0|#define CKM_NSS_PBE_SHA1_HMAC_KEY_GEN 0x80000009UL
  ------------------
  |  Branch (647:9): [True: 0, False: 6.05k]
  ------------------
  648|      0|        case CKM_NSS_PBE_MD5_HMAC_KEY_GEN:
  ------------------
  |  |  294|      0|#define CKM_NSS_PBE_MD5_HMAC_KEY_GEN 0x8000000aUL
  ------------------
  |  Branch (648:9): [True: 0, False: 6.05k]
  ------------------
  649|      0|        case CKM_NSS_PBE_MD2_HMAC_KEY_GEN:
  ------------------
  |  |  295|      0|#define CKM_NSS_PBE_MD2_HMAC_KEY_GEN 0x8000000bUL
  ------------------
  |  Branch (649:9): [True: 0, False: 6.05k]
  ------------------
  650|      0|        case CKM_NSS_PKCS12_PBE_SHA224_HMAC_KEY_GEN:
  ------------------
  |  |  246|      0|#define CKM_NSS_PKCS12_PBE_SHA224_HMAC_KEY_GEN (CKM_NSS + 29)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (650:9): [True: 0, False: 6.05k]
  ------------------
  651|      0|        case CKM_NSS_PKCS12_PBE_SHA256_HMAC_KEY_GEN:
  ------------------
  |  |  247|      0|#define CKM_NSS_PKCS12_PBE_SHA256_HMAC_KEY_GEN (CKM_NSS + 30)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (651:9): [True: 0, False: 6.05k]
  ------------------
  652|      0|        case CKM_NSS_PKCS12_PBE_SHA384_HMAC_KEY_GEN:
  ------------------
  |  |  248|      0|#define CKM_NSS_PKCS12_PBE_SHA384_HMAC_KEY_GEN (CKM_NSS + 31)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (652:9): [True: 0, False: 6.05k]
  ------------------
  653|      0|        case CKM_NSS_PKCS12_PBE_SHA512_HMAC_KEY_GEN:
  ------------------
  |  |  249|      0|#define CKM_NSS_PKCS12_PBE_SHA512_HMAC_KEY_GEN (CKM_NSS + 32)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (653:9): [True: 0, False: 6.05k]
  ------------------
  654|      0|        case CKM_NSS_PBE_SHA1_DES_CBC:
  ------------------
  |  |  286|      0|#define CKM_NSS_PBE_SHA1_DES_CBC 0x80000002UL
  ------------------
  |  Branch (654:9): [True: 0, False: 6.05k]
  ------------------
  655|      0|        case CKM_NSS_PBE_SHA1_40_BIT_RC2_CBC:
  ------------------
  |  |  288|      0|#define CKM_NSS_PBE_SHA1_40_BIT_RC2_CBC 0x80000004UL
  ------------------
  |  Branch (655:9): [True: 0, False: 6.05k]
  ------------------
  656|      0|        case CKM_NSS_PBE_SHA1_128_BIT_RC2_CBC:
  ------------------
  |  |  289|      0|#define CKM_NSS_PBE_SHA1_128_BIT_RC2_CBC 0x80000005UL
  ------------------
  |  Branch (656:9): [True: 0, False: 6.05k]
  ------------------
  657|      0|        case CKM_NSS_PBE_SHA1_40_BIT_RC4:
  ------------------
  |  |  290|      0|#define CKM_NSS_PBE_SHA1_40_BIT_RC4 0x80000006UL
  ------------------
  |  Branch (657:9): [True: 0, False: 6.05k]
  ------------------
  658|      0|        case CKM_NSS_PBE_SHA1_128_BIT_RC4:
  ------------------
  |  |  291|      0|#define CKM_NSS_PBE_SHA1_128_BIT_RC4 0x80000007UL
  ------------------
  |  Branch (658:9): [True: 0, False: 6.05k]
  ------------------
  659|      0|        case CKM_NSS_PBE_SHA1_TRIPLE_DES_CBC:
  ------------------
  |  |  287|      0|#define CKM_NSS_PBE_SHA1_TRIPLE_DES_CBC 0x80000003UL
  ------------------
  |  Branch (659:9): [True: 0, False: 6.05k]
  ------------------
  660|      0|        case CKM_NSS_PBE_SHA1_FAULTY_3DES_CBC:
  ------------------
  |  |  292|      0|#define CKM_NSS_PBE_SHA1_FAULTY_3DES_CBC 0x80000008UL
  ------------------
  |  Branch (660:9): [True: 0, False: 6.05k]
  ------------------
  661|      0|        case CKM_PBE_SHA1_RC2_40_CBC:
  ------------------
  |  | 1010|      0|#define CKM_PBE_SHA1_RC2_40_CBC 0x000003ABUL
  ------------------
  |  Branch (661:9): [True: 0, False: 6.05k]
  ------------------
  662|      0|        case CKM_PBE_SHA1_RC2_128_CBC:
  ------------------
  |  | 1009|      0|#define CKM_PBE_SHA1_RC2_128_CBC 0x000003AAUL
  ------------------
  |  Branch (662:9): [True: 0, False: 6.05k]
  ------------------
  663|      0|        case CKM_PBE_SHA1_RC4_40:
  ------------------
  |  | 1006|      0|#define CKM_PBE_SHA1_RC4_40 0x000003A7UL
  ------------------
  |  Branch (663:9): [True: 0, False: 6.05k]
  ------------------
  664|      0|        case CKM_PBE_SHA1_RC4_128:
  ------------------
  |  | 1005|      0|#define CKM_PBE_SHA1_RC4_128 0x000003A6UL
  ------------------
  |  Branch (664:9): [True: 0, False: 6.05k]
  ------------------
  665|      0|        case CKM_PBE_SHA1_DES3_EDE_CBC:
  ------------------
  |  | 1007|      0|#define CKM_PBE_SHA1_DES3_EDE_CBC 0x000003A8UL
  ------------------
  |  Branch (665:9): [True: 0, False: 6.05k]
  ------------------
  666|      0|        case CKM_PBE_SHA1_DES2_EDE_CBC:
  ------------------
  |  | 1008|      0|#define CKM_PBE_SHA1_DES2_EDE_CBC 0x000003A9UL
  ------------------
  |  Branch (666:9): [True: 0, False: 6.05k]
  ------------------
  667|      0|        case CKM_PKCS5_PBKD2:
  ------------------
  |  | 1013|      0|#define CKM_PKCS5_PBKD2 0x000003B0UL
  ------------------
  |  Branch (667:9): [True: 0, False: 6.05k]
  ------------------
  668|      0|            return type;
  669|      0|        default:
  ------------------
  |  Branch (669:9): [True: 0, False: 6.05k]
  ------------------
  670|      0|            return pk11_lookup(type)->keyGen;
  671|  6.05k|    }
  672|  6.05k|}
PK11_AlgtagToMechanism:
 1755|  33.5k|{
 1756|  33.5k|    SECOidData *oid = SECOID_FindOIDByTag(algTag);
  ------------------
  |  |  116|  33.5k|#define SECOID_FindOIDByTag SECOID_FindOIDByTag_Util
  ------------------
 1757|       |
 1758|  33.5k|    if (oid)
  ------------------
  |  Branch (1758:9): [True: 33.5k, False: 0]
  ------------------
 1759|  33.5k|        return (CK_MECHANISM_TYPE)oid->mechanism;
 1760|      0|    return CKM_INVALID_MECHANISM;
  ------------------
  |  |  155|      0|#define CKM_INVALID_MECHANISM 0xffffffffUL
  ------------------
 1761|  33.5k|}
PK11_MapSignKeyType:
 1931|  2.45k|{
 1932|  2.45k|    switch (keyType) {
 1933|  1.15k|        case rsaKey:
  ------------------
  |  Branch (1933:9): [True: 1.15k, False: 1.29k]
  ------------------
 1934|  1.15k|            return CKM_RSA_PKCS;
  ------------------
  |  |  720|  1.15k|#define CKM_RSA_PKCS 0x00000001UL
  ------------------
 1935|      0|        case fortezzaKey:
  ------------------
  |  Branch (1935:9): [True: 0, False: 2.45k]
  ------------------
 1936|  1.13k|        case dsaKey:
  ------------------
  |  Branch (1936:9): [True: 1.13k, False: 1.31k]
  ------------------
 1937|  1.13k|            return CKM_DSA;
  ------------------
  |  |  745|  1.13k|#define CKM_DSA 0x00000011UL
  ------------------
 1938|    159|        case ecKey:
  ------------------
  |  Branch (1938:9): [True: 159, False: 2.29k]
  ------------------
 1939|    159|            return CKM_ECDSA;
  ------------------
  |  | 1074|    159|#define CKM_ECDSA 0x00001041UL
  ------------------
 1940|      0|        case edKey:
  ------------------
  |  Branch (1940:9): [True: 0, False: 2.45k]
  ------------------
 1941|      0|            return CKM_EDDSA;
  ------------------
  |  | 1174|      0|#define CKM_EDDSA 0x00001057UL
  ------------------
 1942|      0|        case dhKey:
  ------------------
  |  Branch (1942:9): [True: 0, False: 2.45k]
  ------------------
 1943|      0|        default:
  ------------------
  |  Branch (1943:9): [True: 0, False: 2.45k]
  ------------------
 1944|      0|            break;
 1945|  2.45k|    }
 1946|      0|    return CKM_INVALID_MECHANISM;
  ------------------
  |  |  155|      0|#define CKM_INVALID_MECHANISM 0xffffffffUL
  ------------------
 1947|  2.45k|}
pk11_mapWrapKeyType:
 1951|  1.31k|{
 1952|  1.31k|    switch (keyType) {
 1953|  1.26k|        case rsaKey:
  ------------------
  |  Branch (1953:9): [True: 1.26k, False: 47]
  ------------------
 1954|  1.26k|            return CKM_RSA_PKCS;
  ------------------
  |  |  720|  1.26k|#define CKM_RSA_PKCS 0x00000001UL
  ------------------
 1955|       |        /* Add fortezza?? */
 1956|     47|        default:
  ------------------
  |  Branch (1956:9): [True: 47, False: 1.26k]
  ------------------
 1957|     47|            break;
 1958|  1.31k|    }
 1959|     47|    return CKM_INVALID_MECHANISM;
  ------------------
  |  |  155|     47|#define CKM_INVALID_MECHANISM 0xffffffffUL
  ------------------
 1960|  1.31k|}
pk11mech.c:pk11_lookup:
   75|  2.46k|{
   76|  2.46k|    int i;
   77|  2.46k|    for (i = 0; i < pk11_MechEntrySize; i++) {
  ------------------
  |  Branch (77:17): [True: 0, False: 2.46k]
  ------------------
   78|      0|        if (pk11_MechanismTable[i].type == type) {
  ------------------
  |  Branch (78:13): [True: 0, False: 0]
  ------------------
   79|      0|            return (&pk11_MechanismTable[i]);
   80|      0|        }
   81|      0|    }
   82|  2.46k|    return &pk11_default;
   83|  2.46k|}

PK11_DestroyObject:
   55|  23.0k|{
   56|  23.0k|    CK_RV crv;
   57|       |
   58|  23.0k|    PK11_EnterSlotMonitor(slot);
   59|  23.0k|    crv = PK11_GETTAB(slot)->C_DestroyObject(slot->session, object);
  ------------------
  |  |  102|  23.0k|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
   60|  23.0k|    PK11_ExitSlotMonitor(slot);
   61|  23.0k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  23.0k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (61:9): [True: 0, False: 23.0k]
  ------------------
   62|      0|        return SECFailure;
   63|      0|    }
   64|  23.0k|    return SECSuccess;
   65|  23.0k|}
PK11_ReadAttribute:
  100|  3.03k|{
  101|  3.03k|    CK_ATTRIBUTE attr = { 0, NULL, 0 };
  102|  3.03k|    CK_RV crv;
  103|       |
  104|  3.03k|    attr.type = type;
  105|       |
  106|  3.03k|    PK11_EnterSlotMonitor(slot);
  107|  3.03k|    crv = PK11_GETTAB(slot)->C_GetAttributeValue(slot->session, id, &attr, 1);
  ------------------
  |  |  102|  3.03k|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
  108|  3.03k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  3.03k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (108:9): [True: 0, False: 3.03k]
  ------------------
  109|      0|        PK11_ExitSlotMonitor(slot);
  110|      0|        PORT_SetError(PK11_MapError(crv));
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  111|      0|        return SECFailure;
  112|      0|    }
  113|  3.03k|    if (arena) {
  ------------------
  |  Branch (113:9): [True: 0, False: 3.03k]
  ------------------
  114|      0|        attr.pValue = PORT_ArenaAlloc(arena, attr.ulValueLen);
  ------------------
  |  |   53|      0|#define PORT_ArenaAlloc PORT_ArenaAlloc_Util
  ------------------
  115|  3.03k|    } else {
  116|  3.03k|        attr.pValue = PORT_Alloc(attr.ulValueLen);
  ------------------
  |  |   52|  3.03k|#define PORT_Alloc PORT_Alloc_Util
  ------------------
  117|  3.03k|    }
  118|  3.03k|    if (attr.pValue == NULL) {
  ------------------
  |  Branch (118:9): [True: 0, False: 3.03k]
  ------------------
  119|      0|        PK11_ExitSlotMonitor(slot);
  120|      0|        return SECFailure;
  121|      0|    }
  122|  3.03k|    crv = PK11_GETTAB(slot)->C_GetAttributeValue(slot->session, id, &attr, 1);
  ------------------
  |  |  102|  3.03k|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
  123|  3.03k|    PK11_ExitSlotMonitor(slot);
  124|  3.03k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  3.03k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (124:9): [True: 0, False: 3.03k]
  ------------------
  125|      0|        PORT_SetError(PK11_MapError(crv));
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  126|      0|        if (!arena)
  ------------------
  |  Branch (126:13): [True: 0, False: 0]
  ------------------
  127|      0|            PORT_Free(attr.pValue);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
  128|      0|        return SECFailure;
  129|      0|    }
  130|       |
  131|  3.03k|    result->data = (unsigned char *)attr.pValue;
  132|  3.03k|    result->len = attr.ulValueLen;
  133|       |
  134|  3.03k|    return SECSuccess;
  135|  3.03k|}
PK11_ReadULongAttribute:
  143|  9.67k|{
  144|  9.67k|    CK_ATTRIBUTE attr;
  145|  9.67k|    CK_ULONG value = CK_UNAVAILABLE_INFORMATION;
  ------------------
  |  |   64|  9.67k|#define CK_UNAVAILABLE_INFORMATION (~0UL)
  ------------------
  146|  9.67k|    CK_RV crv;
  147|       |
  148|  9.67k|    PK11_SETATTRS(&attr, type, &value, sizeof(value));
  ------------------
  |  |  104|  9.67k|    (x)->type = (id);              \
  |  |  105|  9.67k|    (x)->pValue = (v);             \
  |  |  106|  9.67k|    (x)->ulValueLen = (l);
  ------------------
  149|       |
  150|  9.67k|    PK11_EnterSlotMonitor(slot);
  151|  9.67k|    crv = PK11_GETTAB(slot)->C_GetAttributeValue(slot->session, id, &attr, 1);
  ------------------
  |  |  102|  9.67k|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
  152|  9.67k|    PK11_ExitSlotMonitor(slot);
  153|  9.67k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  9.67k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (153:9): [True: 0, False: 9.67k]
  ------------------
  154|      0|        PORT_SetError(PK11_MapError(crv));
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  155|      0|    }
  156|  9.67k|    return value;
  157|  9.67k|}
pk11_HasAttributeSet_Lock:
  165|  32.7k|{
  166|  32.7k|    CK_BBOOL ckvalue = CK_FALSE;
  ------------------
  |  |   23|  32.7k|#define CK_FALSE 0
  ------------------
  167|  32.7k|    CK_ATTRIBUTE theTemplate;
  168|  32.7k|    CK_RV crv;
  169|       |
  170|       |    /* Prepare to retrieve the attribute. */
  171|  32.7k|    PK11_SETATTRS(&theTemplate, type, &ckvalue, sizeof(CK_BBOOL));
  ------------------
  |  |  104|  32.7k|    (x)->type = (id);              \
  |  |  105|  32.7k|    (x)->pValue = (v);             \
  |  |  106|  32.7k|    (x)->ulValueLen = (l);
  ------------------
  172|       |
  173|       |    /* Retrieve attribute value. */
  174|  32.7k|    if (!haslock)
  ------------------
  |  Branch (174:9): [True: 32.7k, False: 0]
  ------------------
  175|  32.7k|        PK11_EnterSlotMonitor(slot);
  176|  32.7k|    crv = PK11_GETTAB(slot)->C_GetAttributeValue(slot->session, id,
  ------------------
  |  |  102|  32.7k|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
  177|  32.7k|                                                 &theTemplate, 1);
  178|  32.7k|    if (!haslock)
  ------------------
  |  Branch (178:9): [True: 32.7k, False: 0]
  ------------------
  179|  32.7k|        PK11_ExitSlotMonitor(slot);
  180|  32.7k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  32.7k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (180:9): [True: 0, False: 32.7k]
  ------------------
  181|      0|        PORT_SetError(PK11_MapError(crv));
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  182|      0|        return CK_FALSE;
  ------------------
  |  |   23|      0|#define CK_FALSE 0
  ------------------
  183|      0|    }
  184|       |
  185|  32.7k|    return ckvalue;
  186|  32.7k|}
PK11_HasAttributeSet:
  191|  32.7k|{
  192|  32.7k|    PR_ASSERT(haslock == PR_FALSE);
  ------------------
  |  |  208|  32.7k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 32.7k, False: 0]
  |  |  ------------------
  ------------------
  193|  32.7k|    return pk11_HasAttributeSet_Lock(slot, id, type, PR_FALSE);
  ------------------
  |  |  438|  32.7k|#define PR_FALSE 0
  ------------------
  194|  32.7k|}
PK11_GetAttributes:
  203|  9.67k|{
  204|  9.67k|    int i;
  205|       |    /* make pedantic happy... note that it's only used arena != NULL */
  206|  9.67k|    void *mark = NULL;
  207|  9.67k|    CK_RV crv;
  208|  9.67k|    if (slot->session == CK_INVALID_HANDLE)
  ------------------
  |  |   78|  9.67k|#define CK_INVALID_HANDLE 0
  ------------------
  |  Branch (208:9): [True: 0, False: 9.67k]
  ------------------
  209|      0|        return CKR_SESSION_HANDLE_INVALID;
  ------------------
  |  | 1465|      0|#define CKR_SESSION_HANDLE_INVALID 0x000000B3UL
  ------------------
  210|       |
  211|       |    /*
  212|       |     * first get all the lengths of the parameters.
  213|       |     */
  214|  9.67k|    PK11_EnterSlotMonitor(slot);
  215|  9.67k|    crv = PK11_GETTAB(slot)->C_GetAttributeValue(slot->session, obj, attr, count);
  ------------------
  |  |  102|  9.67k|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
  216|  9.67k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  9.67k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (216:9): [True: 0, False: 9.67k]
  ------------------
  217|      0|        PK11_ExitSlotMonitor(slot);
  218|      0|        return crv;
  219|      0|    }
  220|       |
  221|  9.67k|    if (arena) {
  ------------------
  |  Branch (221:9): [True: 9.67k, False: 0]
  ------------------
  222|  9.67k|        mark = PORT_ArenaMark(arena);
  ------------------
  |  |   55|  9.67k|#define PORT_ArenaMark PORT_ArenaMark_Util
  ------------------
  223|  9.67k|        if (mark == NULL)
  ------------------
  |  Branch (223:13): [True: 0, False: 9.67k]
  ------------------
  224|      0|            return CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
  225|  9.67k|    }
  226|       |
  227|       |    /*
  228|       |     * now allocate space to store the results.
  229|       |     */
  230|  49.4k|    for (i = 0; i < count; i++) {
  ------------------
  |  Branch (230:17): [True: 39.8k, False: 9.67k]
  ------------------
  231|  39.8k|        if (attr[i].ulValueLen == 0)
  ------------------
  |  Branch (231:13): [True: 0, False: 39.8k]
  ------------------
  232|      0|            continue;
  233|  39.8k|        if (arena) {
  ------------------
  |  Branch (233:13): [True: 39.8k, False: 0]
  ------------------
  234|  39.8k|            attr[i].pValue = PORT_ArenaAlloc(arena, attr[i].ulValueLen);
  ------------------
  |  |   53|  39.8k|#define PORT_ArenaAlloc PORT_ArenaAlloc_Util
  ------------------
  235|  39.8k|            if (attr[i].pValue == NULL) {
  ------------------
  |  Branch (235:17): [True: 0, False: 39.8k]
  ------------------
  236|       |                /* arena failures, just release the mark */
  237|      0|                PORT_ArenaRelease(arena, mark);
  ------------------
  |  |   56|      0|#define PORT_ArenaRelease PORT_ArenaRelease_Util
  ------------------
  238|      0|                PK11_ExitSlotMonitor(slot);
  239|      0|                return CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
  240|      0|            }
  241|  39.8k|        } else {
  242|      0|            attr[i].pValue = PORT_Alloc(attr[i].ulValueLen);
  ------------------
  |  |   52|      0|#define PORT_Alloc PORT_Alloc_Util
  ------------------
  243|      0|            if (attr[i].pValue == NULL) {
  ------------------
  |  Branch (243:17): [True: 0, False: 0]
  ------------------
  244|       |                /* Separate malloc failures, loop to release what we have
  245|       |                 * so far */
  246|      0|                int j;
  247|      0|                for (j = 0; j < i; j++) {
  ------------------
  |  Branch (247:29): [True: 0, False: 0]
  ------------------
  248|      0|                    PORT_Free(attr[j].pValue);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
  249|       |                    /* don't give the caller pointers to freed memory */
  250|      0|                    attr[j].pValue = NULL;
  251|      0|                }
  252|      0|                PK11_ExitSlotMonitor(slot);
  253|      0|                return CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
  254|      0|            }
  255|      0|        }
  256|  39.8k|    }
  257|       |
  258|       |    /*
  259|       |     * finally get the results.
  260|       |     */
  261|  9.67k|    crv = PK11_GETTAB(slot)->C_GetAttributeValue(slot->session, obj, attr, count);
  ------------------
  |  |  102|  9.67k|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
  262|  9.67k|    PK11_ExitSlotMonitor(slot);
  263|  9.67k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  9.67k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (263:9): [True: 0, False: 9.67k]
  ------------------
  264|      0|        if (arena) {
  ------------------
  |  Branch (264:13): [True: 0, False: 0]
  ------------------
  265|      0|            PORT_ArenaRelease(arena, mark);
  ------------------
  |  |   56|      0|#define PORT_ArenaRelease PORT_ArenaRelease_Util
  ------------------
  266|      0|        } else {
  267|      0|            for (i = 0; i < count; i++) {
  ------------------
  |  Branch (267:25): [True: 0, False: 0]
  ------------------
  268|      0|                PORT_Free(attr[i].pValue);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
  269|       |                /* don't give the caller pointers to freed memory */
  270|      0|                attr[i].pValue = NULL;
  271|      0|            }
  272|      0|        }
  273|  9.67k|    } else if (arena && mark) {
  ------------------
  |  Branch (273:16): [True: 9.67k, False: 0]
  |  Branch (273:25): [True: 9.67k, False: 0]
  ------------------
  274|  9.67k|        PORT_ArenaUnmark(arena, mark);
  ------------------
  |  |   58|  9.67k|#define PORT_ArenaUnmark PORT_ArenaUnmark_Util
  ------------------
  275|  9.67k|    }
  276|  9.67k|    return crv;
  277|  9.67k|}
PK11_IsPermObject:
  281|  13.3k|{
  282|  13.3k|    return (PRBool)PK11_HasAttributeSet(slot, handle, CKA_TOKEN, PR_FALSE);
  ------------------
  |  |  512|  13.3k|#define CKA_TOKEN 0x00000001UL
  ------------------
                  return (PRBool)PK11_HasAttributeSet(slot, handle, CKA_TOKEN, PR_FALSE);
  ------------------
  |  |  438|  13.3k|#define PR_FALSE 0
  ------------------
  283|  13.3k|}
pk11_SignedToUnsigned:
  341|  9.43k|{
  342|  9.43k|    char *ptr = (char *)attrib->pValue;
  343|  9.43k|    unsigned long len = attrib->ulValueLen;
  344|       |
  345|  9.43k|    while ((len > 1) && (*ptr == 0)) {
  ------------------
  |  Branch (345:12): [True: 9.39k, False: 38]
  |  Branch (345:25): [True: 0, False: 9.39k]
  ------------------
  346|      0|        len--;
  347|      0|        ptr++;
  348|      0|    }
  349|  9.43k|    attrib->pValue = ptr;
  350|  9.43k|    attrib->ulValueLen = len;
  351|  9.43k|}
pk11_GetNewSession:
  359|  73.6k|{
  360|  73.6k|    CK_SESSION_HANDLE session;
  361|  73.6k|    *owner = PR_TRUE;
  ------------------
  |  |  437|  73.6k|#define PR_TRUE 1
  ------------------
  362|  73.6k|    if (!slot->isThreadSafe)
  ------------------
  |  Branch (362:9): [True: 0, False: 73.6k]
  ------------------
  363|      0|        PK11_EnterSlotMonitor(slot);
  364|  73.6k|    if (PK11_GETTAB(slot)->C_OpenSession(slot->slotID, CKF_SERIAL_SESSION,
  ------------------
  |  |  102|  73.6k|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
                  if (PK11_GETTAB(slot)->C_OpenSession(slot->slotID, CKF_SERIAL_SESSION,
  ------------------
  |  |  303|  73.6k|#define CKF_SERIAL_SESSION 0x00000004UL /* no parallel */
  ------------------
  |  Branch (364:9): [True: 0, False: 73.6k]
  ------------------
  365|  73.6k|                                         slot, pk11_notify, &session) != CKR_OK) {
  ------------------
  |  | 1388|  73.6k|#define CKR_OK 0x00000000UL
  ------------------
  366|      0|        *owner = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  367|      0|        session = slot->session;
  368|      0|    }
  369|  73.6k|    if (!slot->isThreadSafe)
  ------------------
  |  Branch (369:9): [True: 0, False: 73.6k]
  ------------------
  370|      0|        PK11_ExitSlotMonitor(slot);
  371|       |
  372|  73.6k|    return session;
  373|  73.6k|}
pk11_CloseSession:
  377|  73.6k|{
  378|  73.6k|    if (!owner)
  ------------------
  |  Branch (378:9): [True: 4, False: 73.6k]
  ------------------
  379|      4|        return;
  380|  73.6k|    if (!slot->isThreadSafe)
  ------------------
  |  Branch (380:9): [True: 0, False: 73.6k]
  ------------------
  381|      0|        PK11_EnterSlotMonitor(slot);
  382|  73.6k|    (void)PK11_GETTAB(slot)->C_CloseSession(session);
  ------------------
  |  |  102|  73.6k|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
  383|  73.6k|    if (!slot->isThreadSafe)
  ------------------
  |  Branch (383:9): [True: 0, False: 73.6k]
  ------------------
  384|      0|        PK11_ExitSlotMonitor(slot);
  385|  73.6k|}
PK11_CreateNewObject:
  391|  8.10k|{
  392|  8.10k|    CK_SESSION_HANDLE rwsession;
  393|  8.10k|    CK_RV crv;
  394|  8.10k|    SECStatus rv = SECSuccess;
  395|       |
  396|  8.10k|    rwsession = session;
  397|  8.10k|    if (token) {
  ------------------
  |  Branch (397:9): [True: 0, False: 8.10k]
  ------------------
  398|      0|        rwsession = PK11_GetRWSession(slot);
  399|  8.10k|    } else if (rwsession == CK_INVALID_HANDLE) {
  ------------------
  |  |   78|  8.10k|#define CK_INVALID_HANDLE 0
  ------------------
  |  Branch (399:16): [True: 3.81k, False: 4.29k]
  ------------------
  400|  3.81k|        rwsession = slot->session;
  401|  3.81k|        if (rwsession != CK_INVALID_HANDLE)
  ------------------
  |  |   78|  3.81k|#define CK_INVALID_HANDLE 0
  ------------------
  |  Branch (401:13): [True: 3.81k, False: 0]
  ------------------
  402|  3.81k|            PK11_EnterSlotMonitor(slot);
  403|  3.81k|    }
  404|  8.10k|    if (rwsession == CK_INVALID_HANDLE) {
  ------------------
  |  |   78|  8.10k|#define CK_INVALID_HANDLE 0
  ------------------
  |  Branch (404:9): [True: 0, False: 8.10k]
  ------------------
  405|      0|        PORT_SetError(SEC_ERROR_BAD_DATA);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  406|      0|        return SECFailure;
  407|      0|    }
  408|  8.10k|    crv = PK11_GETTAB(slot)->C_CreateObject(rwsession,
  ------------------
  |  |  102|  8.10k|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
  409|  8.10k|                                            /* cast away const :-( */ (CK_ATTRIBUTE_PTR)theTemplate,
  410|  8.10k|                                            count, objectID);
  411|  8.10k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  8.10k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (411:9): [True: 107, False: 8.00k]
  ------------------
  412|    107|        PORT_SetError(PK11_MapError(crv));
  ------------------
  |  |   65|    107|#define PORT_SetError PORT_SetError_Util
  ------------------
  413|    107|        rv = SECFailure;
  414|    107|    }
  415|  8.10k|    if (token) {
  ------------------
  |  Branch (415:9): [True: 0, False: 8.10k]
  ------------------
  416|      0|        PK11_RestoreROSession(slot, rwsession);
  417|  8.10k|    } else if (session == CK_INVALID_HANDLE) {
  ------------------
  |  |   78|  8.10k|#define CK_INVALID_HANDLE 0
  ------------------
  |  Branch (417:16): [True: 3.81k, False: 4.29k]
  ------------------
  418|  3.81k|        PK11_ExitSlotMonitor(slot);
  419|  3.81k|    }
  420|       |
  421|  8.10k|    return rv;
  422|  8.10k|}
pk11_OpFlagsToAttributes:
  427|  28.1k|{
  428|       |
  429|  28.1k|    const static CK_ATTRIBUTE_TYPE attrTypes[12] = {
  430|  28.1k|        CKA_ENCRYPT, CKA_DECRYPT, 0 /* DIGEST */, CKA_SIGN,
  ------------------
  |  |  547|  28.1k|#define CKA_ENCRYPT 0x00000104UL
  ------------------
                      CKA_ENCRYPT, CKA_DECRYPT, 0 /* DIGEST */, CKA_SIGN,
  ------------------
  |  |  548|  28.1k|#define CKA_DECRYPT 0x00000105UL
  ------------------
                      CKA_ENCRYPT, CKA_DECRYPT, 0 /* DIGEST */, CKA_SIGN,
  ------------------
  |  |  551|  28.1k|#define CKA_SIGN 0x00000108UL
  ------------------
  431|  28.1k|        CKA_SIGN_RECOVER, CKA_VERIFY, CKA_VERIFY_RECOVER, 0 /* GEN */,
  ------------------
  |  |  552|  28.1k|#define CKA_SIGN_RECOVER 0x00000109UL
  ------------------
                      CKA_SIGN_RECOVER, CKA_VERIFY, CKA_VERIFY_RECOVER, 0 /* GEN */,
  ------------------
  |  |  553|  28.1k|#define CKA_VERIFY 0x0000010AUL
  ------------------
                      CKA_SIGN_RECOVER, CKA_VERIFY, CKA_VERIFY_RECOVER, 0 /* GEN */,
  ------------------
  |  |  554|  28.1k|#define CKA_VERIFY_RECOVER 0x0000010BUL
  ------------------
  432|  28.1k|        0 /* GEN PAIR */, CKA_WRAP, CKA_UNWRAP, CKA_DERIVE
  ------------------
  |  |  549|  28.1k|#define CKA_WRAP 0x00000106UL
  ------------------
                      0 /* GEN PAIR */, CKA_WRAP, CKA_UNWRAP, CKA_DERIVE
  ------------------
  |  |  550|  28.1k|#define CKA_UNWRAP 0x00000107UL
  ------------------
                      0 /* GEN PAIR */, CKA_WRAP, CKA_UNWRAP, CKA_DERIVE
  ------------------
  |  |  555|  28.1k|#define CKA_DERIVE 0x0000010CUL
  ------------------
  433|  28.1k|    };
  434|       |
  435|  28.1k|    const CK_ATTRIBUTE_TYPE *pType = attrTypes;
  436|  28.1k|    CK_ATTRIBUTE *attr = attrs;
  437|  28.1k|    CK_FLAGS test = CKF_ENCRYPT;
  ------------------
  |  | 1353|  28.1k|#define CKF_ENCRYPT 0x00000100UL
  ------------------
  438|       |
  439|  28.1k|    PR_ASSERT(!(flags & ~CKF_KEY_OPERATION_FLAGS));
  ------------------
  |  |  208|  28.1k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 28.1k, False: 0]
  |  |  ------------------
  ------------------
  440|  28.1k|    flags &= CKF_KEY_OPERATION_FLAGS;
  ------------------
  |  |  203|  28.1k|#define CKF_KEY_OPERATION_FLAGS 0x000e7b00UL
  ------------------
  441|       |
  442|   176k|    for (; flags && test <= CKF_DERIVE; test <<= 1, ++pType) {
  ------------------
  |  | 1364|   148k|#define CKF_DERIVE 0x00080000UL
  ------------------
  |  Branch (442:12): [True: 148k, False: 28.1k]
  |  Branch (442:21): [True: 148k, False: 0]
  ------------------
  443|   148k|        if (test & flags) {
  ------------------
  |  Branch (443:13): [True: 53.4k, False: 94.8k]
  ------------------
  444|  53.4k|            flags ^= test;
  445|  53.4k|            PR_ASSERT(*pType);
  ------------------
  |  |  208|  53.4k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 53.4k, False: 0]
  |  |  ------------------
  ------------------
  446|  53.4k|            PK11_SETATTRS(attr, *pType, ckTrue, sizeof *ckTrue);
  ------------------
  |  |  104|  53.4k|    (x)->type = (id);              \
  |  |  105|  53.4k|    (x)->pValue = (v);             \
  |  |  106|  53.4k|    (x)->ulValueLen = (l);
  ------------------
  447|  53.4k|            ++attr;
  448|  53.4k|        }
  449|   148k|    }
  450|  28.1k|    return (attr - attrs);
  451|  28.1k|}
pk11_BadAttrFlags:
  459|  41.2k|{
  460|  41.2k|    PK11AttrFlags trueFlags = attrFlags & 0x55555555;
  461|  41.2k|    PK11AttrFlags falseFlags = (attrFlags >> 1) & 0x55555555;
  462|  41.2k|    return ((trueFlags & falseFlags) != 0);
  463|  41.2k|}
pk11_AttrFlagsToAttributes:
  472|  25.5k|{
  473|  25.5k|    const static CK_ATTRIBUTE_TYPE attrTypes[5] = {
  474|  25.5k|        CKA_TOKEN, CKA_PRIVATE, CKA_MODIFIABLE, CKA_SENSITIVE,
  ------------------
  |  |  512|  25.5k|#define CKA_TOKEN 0x00000001UL
  ------------------
                      CKA_TOKEN, CKA_PRIVATE, CKA_MODIFIABLE, CKA_SENSITIVE,
  ------------------
  |  |  513|  25.5k|#define CKA_PRIVATE 0x00000002UL
  ------------------
                      CKA_TOKEN, CKA_PRIVATE, CKA_MODIFIABLE, CKA_SENSITIVE,
  ------------------
  |  |  593|  25.5k|#define CKA_MODIFIABLE 0x00000170UL
  ------------------
                      CKA_TOKEN, CKA_PRIVATE, CKA_MODIFIABLE, CKA_SENSITIVE,
  ------------------
  |  |  546|  25.5k|#define CKA_SENSITIVE 0x00000103UL
  ------------------
  475|  25.5k|        CKA_EXTRACTABLE
  ------------------
  |  |  585|  25.5k|#define CKA_EXTRACTABLE 0x00000162UL
  ------------------
  476|  25.5k|    };
  477|       |
  478|  25.5k|    const CK_ATTRIBUTE_TYPE *pType = attrTypes;
  479|  25.5k|    CK_ATTRIBUTE *attr = attrs;
  480|  25.5k|    PK11AttrFlags test = PK11_ATTR_TOKEN;
  ------------------
  |  |  194|  25.5k|#define PK11_ATTR_TOKEN 0x00000001L
  ------------------
  481|       |
  482|  25.5k|    PR_ASSERT(!pk11_BadAttrFlags(attrFlags));
  ------------------
  |  |  208|  25.5k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 25.5k, False: 0]
  |  |  ------------------
  ------------------
  483|       |
  484|       |    /* we test two related bitflags in each iteration */
  485|  74.1k|    for (; attrFlags && test <= PK11_ATTR_EXTRACTABLE; test <<= 2, ++pType) {
  ------------------
  |  |  278|  48.6k|#define PK11_ATTR_EXTRACTABLE 0x00000100L
  ------------------
  |  Branch (485:12): [True: 48.6k, False: 25.5k]
  |  Branch (485:25): [True: 48.6k, False: 0]
  ------------------
  486|  48.6k|        if (test & attrFlags) {
  ------------------
  |  Branch (486:13): [True: 56, False: 48.5k]
  ------------------
  487|     56|            attrFlags ^= test;
  488|     56|            PK11_SETATTRS(attr, *pType, ckTrue, sizeof *ckTrue);
  ------------------
  |  |  104|     56|    (x)->type = (id);              \
  |  |  105|     56|    (x)->pValue = (v);             \
  |  |  106|     56|    (x)->ulValueLen = (l);
  ------------------
  489|     56|            ++attr;
  490|  48.5k|        } else if ((test << 1) & attrFlags) {
  ------------------
  |  Branch (490:20): [True: 38.8k, False: 9.72k]
  ------------------
  491|  38.8k|            attrFlags ^= (test << 1);
  492|  38.8k|            PK11_SETATTRS(attr, *pType, ckFalse, sizeof *ckFalse);
  ------------------
  |  |  104|  38.8k|    (x)->type = (id);              \
  |  |  105|  38.8k|    (x)->pValue = (v);             \
  |  |  106|  38.8k|    (x)->ulValueLen = (l);
  ------------------
  493|  38.8k|            ++attr;
  494|  38.8k|        }
  495|  48.6k|    }
  496|  25.5k|    return (attr - attrs);
  497|  25.5k|}
pk11_FindAttrInTemplate:
  622|   113k|{
  623|   278k|    for (; numAttrs > 0; ++attr, --numAttrs) {
  ------------------
  |  Branch (623:12): [True: 165k, False: 113k]
  ------------------
  624|   165k|        if (attr->type == target)
  ------------------
  |  Branch (624:13): [True: 0, False: 165k]
  ------------------
  625|      0|            return PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  626|   165k|    }
  627|   113k|    return PR_FALSE;
  ------------------
  |  |  438|   113k|#define PR_FALSE 0
  ------------------
  628|   113k|}
PK11_VerifyRecover:
  637|     18|{
  638|     18|    PK11SlotInfo *slot = key->pkcs11Slot;
  639|     18|    CK_OBJECT_HANDLE id = key->pkcs11ID;
  640|     18|    CK_MECHANISM mech = { 0, NULL, 0 };
  641|     18|    PRBool owner = PR_TRUE;
  ------------------
  |  |  437|     18|#define PR_TRUE 1
  ------------------
  642|     18|    CK_SESSION_HANDLE session;
  643|     18|    CK_ULONG len;
  644|     18|    CK_RV crv;
  645|       |
  646|     18|    mech.mechanism = PK11_MapSignKeyType(key->keyType);
  647|       |
  648|     18|    if (slot == NULL) {
  ------------------
  |  Branch (648:9): [True: 2, False: 16]
  ------------------
  649|      2|        slot = PK11_GetBestSlotWithAttributes(mech.mechanism,
  650|      2|                                              CKF_VERIFY_RECOVER, 0, wincx);
  ------------------
  |  | 1359|      2|#define CKF_VERIFY_RECOVER 0x00004000UL
  ------------------
  651|      2|        if (slot == NULL) {
  ------------------
  |  Branch (651:13): [True: 0, False: 2]
  ------------------
  652|      0|            PORT_SetError(SEC_ERROR_NO_MODULE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  653|      0|            return SECFailure;
  654|      0|        }
  655|      2|        id = PK11_ImportPublicKey(slot, key, PR_FALSE);
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
  656|     16|    } else {
  657|     16|        PK11_ReferenceSlot(slot);
  658|     16|    }
  659|       |
  660|     18|    if (id == CK_INVALID_HANDLE) {
  ------------------
  |  |   78|     18|#define CK_INVALID_HANDLE 0
  ------------------
  |  Branch (660:9): [True: 2, False: 16]
  ------------------
  661|      2|        PK11_FreeSlot(slot);
  662|      2|        PORT_SetError(SEC_ERROR_BAD_KEY);
  ------------------
  |  |   65|      2|#define PORT_SetError PORT_SetError_Util
  ------------------
  663|      2|        return SECFailure;
  664|      2|    }
  665|       |
  666|     16|    session = pk11_GetNewSession(slot, &owner);
  667|     16|    if (!owner || !(slot->isThreadSafe))
  ------------------
  |  Branch (667:9): [True: 0, False: 16]
  |  Branch (667:19): [True: 0, False: 16]
  ------------------
  668|      0|        PK11_EnterSlotMonitor(slot);
  669|     16|    crv = PK11_GETTAB(slot)->C_VerifyRecoverInit(session, &mech, id);
  ------------------
  |  |  102|     16|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
  670|     16|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|     16|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (670:9): [True: 0, False: 16]
  ------------------
  671|      0|        if (!owner || !(slot->isThreadSafe))
  ------------------
  |  Branch (671:13): [True: 0, False: 0]
  |  Branch (671:23): [True: 0, False: 0]
  ------------------
  672|      0|            PK11_ExitSlotMonitor(slot);
  673|      0|        pk11_CloseSession(slot, session, owner);
  674|      0|        PORT_SetError(PK11_MapError(crv));
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  675|      0|        PK11_FreeSlot(slot);
  676|      0|        return SECFailure;
  677|      0|    }
  678|     16|    len = dsig->len;
  679|     16|    crv = PK11_GETTAB(slot)->C_VerifyRecover(session, sig->data,
  ------------------
  |  |  102|     16|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
  680|     16|                                             sig->len, dsig->data, &len);
  681|     16|    if (!owner || !(slot->isThreadSafe))
  ------------------
  |  Branch (681:9): [True: 0, False: 16]
  |  Branch (681:19): [True: 0, False: 16]
  ------------------
  682|      0|        PK11_ExitSlotMonitor(slot);
  683|     16|    pk11_CloseSession(slot, session, owner);
  684|     16|    dsig->len = len;
  685|     16|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|     16|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (685:9): [True: 13, False: 3]
  ------------------
  686|     13|        PORT_SetError(PK11_MapError(crv));
  ------------------
  |  |   65|     13|#define PORT_SetError PORT_SetError_Util
  ------------------
  687|     13|        PK11_FreeSlot(slot);
  688|     13|        return SECFailure;
  689|     13|    }
  690|      3|    PK11_FreeSlot(slot);
  691|      3|    return SECSuccess;
  692|     16|}
PK11_Verify:
  700|    159|{
  701|    159|    CK_MECHANISM_TYPE mech = PK11_MapSignKeyType(key->keyType);
  702|    159|    return PK11_VerifyWithMechanism(key, mech, NULL, sig, hash, wincx);
  703|    159|}
PK11_VerifyWithMechanism:
  712|  2.43k|{
  713|  2.43k|    PK11SlotInfo *slot = key->pkcs11Slot;
  714|  2.43k|    CK_OBJECT_HANDLE id = key->pkcs11ID;
  715|  2.43k|    CK_MECHANISM mech = { 0, NULL, 0 };
  716|  2.43k|    PRBool owner = PR_TRUE;
  ------------------
  |  |  437|  2.43k|#define PR_TRUE 1
  ------------------
  717|  2.43k|    CK_SESSION_HANDLE session;
  718|  2.43k|    CK_RV crv;
  719|       |
  720|  2.43k|    mech.mechanism = mechanism;
  721|  2.43k|    if (param) {
  ------------------
  |  Branch (721:9): [True: 1.11k, False: 1.32k]
  ------------------
  722|  1.11k|        mech.pParameter = param->data;
  723|  1.11k|        mech.ulParameterLen = param->len;
  724|  1.11k|    }
  725|       |
  726|  2.43k|    if (slot == NULL) {
  ------------------
  |  Branch (726:9): [True: 2.29k, False: 139]
  ------------------
  727|  2.29k|        unsigned int length = 0;
  728|  2.29k|        if ((mech.mechanism == CKM_DSA) &&
  ------------------
  |  |  745|  2.29k|#define CKM_DSA 0x00000011UL
  ------------------
  |  Branch (728:13): [True: 1.13k, False: 1.16k]
  ------------------
  729|       |            /* 129 is 1024 bits translated to bytes and
  730|       |             * padded with an optional '0' to maintain a
  731|       |             * positive sign */
  732|  2.29k|            (key->u.dsa.params.prime.len > 129)) {
  ------------------
  |  Branch (732:13): [True: 1.13k, False: 0]
  ------------------
  733|       |            /* we need to get a slot that not only can do DSA, but can do DSA2
  734|       |             * key lengths */
  735|  1.13k|            length = key->u.dsa.params.prime.len;
  736|  1.13k|            if (key->u.dsa.params.prime.data[0] == 0) {
  ------------------
  |  Branch (736:17): [True: 0, False: 1.13k]
  ------------------
  737|      0|                length--;
  738|      0|            }
  739|       |            /* convert keysize to bits for slot lookup */
  740|  1.13k|            length *= 8;
  741|  1.13k|        }
  742|  2.29k|        slot = PK11_GetBestSlotWithAttributes(mech.mechanism,
  743|  2.29k|                                              CKF_VERIFY, length, wincx);
  ------------------
  |  | 1358|  2.29k|#define CKF_VERIFY 0x00002000
  ------------------
  744|  2.29k|        if (slot == NULL) {
  ------------------
  |  Branch (744:13): [True: 0, False: 2.29k]
  ------------------
  745|      0|            PORT_SetError(SEC_ERROR_NO_MODULE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  746|      0|            return SECFailure;
  747|      0|        }
  748|  2.29k|        id = PK11_ImportPublicKey(slot, key, PR_FALSE);
  ------------------
  |  |  438|  2.29k|#define PR_FALSE 0
  ------------------
  749|       |
  750|  2.29k|    } else {
  751|    139|        PK11_ReferenceSlot(slot);
  752|    139|    }
  753|       |
  754|  2.43k|    if (id == CK_INVALID_HANDLE) {
  ------------------
  |  |   78|  2.43k|#define CK_INVALID_HANDLE 0
  ------------------
  |  Branch (754:9): [True: 22, False: 2.41k]
  ------------------
  755|     22|        PK11_FreeSlot(slot);
  756|     22|        PORT_SetError(SEC_ERROR_BAD_KEY);
  ------------------
  |  |   65|     22|#define PORT_SetError PORT_SetError_Util
  ------------------
  757|     22|        return SECFailure;
  758|     22|    }
  759|       |
  760|  2.41k|    session = pk11_GetNewSession(slot, &owner);
  761|  2.41k|    if (!owner || !(slot->isThreadSafe))
  ------------------
  |  Branch (761:9): [True: 0, False: 2.41k]
  |  Branch (761:19): [True: 0, False: 2.41k]
  ------------------
  762|      0|        PK11_EnterSlotMonitor(slot);
  763|  2.41k|    crv = PK11_GETTAB(slot)->C_VerifyInit(session, &mech, id);
  ------------------
  |  |  102|  2.41k|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
  764|  2.41k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  2.41k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (764:9): [True: 0, False: 2.41k]
  ------------------
  765|      0|        if (!owner || !(slot->isThreadSafe))
  ------------------
  |  Branch (765:13): [True: 0, False: 0]
  |  Branch (765:23): [True: 0, False: 0]
  ------------------
  766|      0|            PK11_ExitSlotMonitor(slot);
  767|      0|        pk11_CloseSession(slot, session, owner);
  768|      0|        PK11_FreeSlot(slot);
  769|      0|        PORT_SetError(PK11_MapError(crv));
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  770|      0|        return SECFailure;
  771|      0|    }
  772|  2.41k|    crv = PK11_GETTAB(slot)->C_Verify(session, hash->data,
  ------------------
  |  |  102|  2.41k|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
  773|  2.41k|                                      hash->len, sig->data, sig->len);
  774|  2.41k|    if (!owner || !(slot->isThreadSafe))
  ------------------
  |  Branch (774:9): [True: 0, False: 2.41k]
  |  Branch (774:19): [True: 0, False: 2.41k]
  ------------------
  775|      0|        PK11_ExitSlotMonitor(slot);
  776|  2.41k|    pk11_CloseSession(slot, session, owner);
  777|  2.41k|    PK11_FreeSlot(slot);
  778|  2.41k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  2.41k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (778:9): [True: 2.41k, False: 0]
  ------------------
  779|  2.41k|        PORT_SetError(PK11_MapError(crv));
  ------------------
  |  |   65|  2.41k|#define PORT_SetError PORT_SetError_Util
  ------------------
  780|  2.41k|        return SECFailure;
  781|  2.41k|    }
  782|      0|    return SECSuccess;
  783|  2.41k|}
PK11_SignWithSymKey:
  860|  8.99k|{
  861|  8.99k|    PK11SlotInfo *slot = symKey->slot;
  862|  8.99k|    CK_MECHANISM mech = { 0, NULL, 0 };
  863|  8.99k|    PRBool owner = PR_TRUE;
  ------------------
  |  |  437|  8.99k|#define PR_TRUE 1
  ------------------
  864|  8.99k|    CK_SESSION_HANDLE session;
  865|  8.99k|    PRBool haslock = PR_FALSE;
  ------------------
  |  |  438|  8.99k|#define PR_FALSE 0
  ------------------
  866|  8.99k|    CK_ULONG len;
  867|  8.99k|    CK_RV crv;
  868|       |
  869|  8.99k|    mech.mechanism = mechanism;
  870|  8.99k|    if (param) {
  ------------------
  |  Branch (870:9): [True: 8.99k, False: 0]
  ------------------
  871|  8.99k|        mech.pParameter = param->data;
  872|  8.99k|        mech.ulParameterLen = param->len;
  873|  8.99k|    }
  874|       |
  875|  8.99k|    session = pk11_GetNewSession(slot, &owner);
  876|  8.99k|    haslock = (!owner || !(slot->isThreadSafe));
  ------------------
  |  Branch (876:16): [True: 0, False: 8.99k]
  |  Branch (876:26): [True: 0, False: 8.99k]
  ------------------
  877|  8.99k|    if (haslock)
  ------------------
  |  Branch (877:9): [True: 0, False: 8.99k]
  ------------------
  878|      0|        PK11_EnterSlotMonitor(slot);
  879|  8.99k|    crv = PK11_GETTAB(slot)->C_SignInit(session, &mech, symKey->objectID);
  ------------------
  |  |  102|  8.99k|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
  880|  8.99k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  8.99k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (880:9): [True: 0, False: 8.99k]
  ------------------
  881|      0|        if (haslock)
  ------------------
  |  Branch (881:13): [True: 0, False: 0]
  ------------------
  882|      0|            PK11_ExitSlotMonitor(slot);
  883|      0|        pk11_CloseSession(slot, session, owner);
  884|      0|        PORT_SetError(PK11_MapError(crv));
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  885|      0|        return SECFailure;
  886|      0|    }
  887|       |
  888|  8.99k|    len = sig->len;
  889|  8.99k|    crv = PK11_GETTAB(slot)->C_Sign(session, data->data,
  ------------------
  |  |  102|  8.99k|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
  890|  8.99k|                                    data->len, sig->data, &len);
  891|  8.99k|    if (haslock)
  ------------------
  |  Branch (891:9): [True: 0, False: 8.99k]
  ------------------
  892|      0|        PK11_ExitSlotMonitor(slot);
  893|  8.99k|    pk11_CloseSession(slot, session, owner);
  894|  8.99k|    sig->len = len;
  895|  8.99k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  8.99k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (895:9): [True: 0, False: 8.99k]
  ------------------
  896|      0|        PORT_SetError(PK11_MapError(crv));
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  897|      0|        return SECFailure;
  898|      0|    }
  899|  8.99k|    return SECSuccess;
  900|  8.99k|}
PK11_Encrypt:
  955|  11.6k|{
  956|  11.6k|    PK11SlotInfo *slot = symKey->slot;
  957|  11.6k|    CK_MECHANISM mech = { 0, NULL, 0 };
  958|  11.6k|    CK_ULONG len = maxLen;
  959|  11.6k|    PRBool owner = PR_TRUE;
  ------------------
  |  |  437|  11.6k|#define PR_TRUE 1
  ------------------
  960|  11.6k|    CK_SESSION_HANDLE session;
  961|  11.6k|    PRBool haslock = PR_FALSE;
  ------------------
  |  |  438|  11.6k|#define PR_FALSE 0
  ------------------
  962|  11.6k|    CK_RV crv;
  963|       |
  964|  11.6k|    mech.mechanism = mechanism;
  965|  11.6k|    if (param) {
  ------------------
  |  Branch (965:9): [True: 5.31k, False: 6.29k]
  ------------------
  966|  5.31k|        mech.pParameter = param->data;
  967|  5.31k|        mech.ulParameterLen = param->len;
  968|  5.31k|    }
  969|       |
  970|  11.6k|    session = pk11_GetNewSession(slot, &owner);
  971|  11.6k|    haslock = (!owner || !slot->isThreadSafe);
  ------------------
  |  Branch (971:16): [True: 0, False: 11.6k]
  |  Branch (971:26): [True: 0, False: 11.6k]
  ------------------
  972|  11.6k|    if (haslock)
  ------------------
  |  Branch (972:9): [True: 0, False: 11.6k]
  ------------------
  973|      0|        PK11_EnterSlotMonitor(slot);
  974|  11.6k|    crv = PK11_GETTAB(slot)->C_EncryptInit(session, &mech, symKey->objectID);
  ------------------
  |  |  102|  11.6k|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
  975|  11.6k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  11.6k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (975:9): [True: 0, False: 11.6k]
  ------------------
  976|      0|        if (haslock)
  ------------------
  |  Branch (976:13): [True: 0, False: 0]
  ------------------
  977|      0|            PK11_ExitSlotMonitor(slot);
  978|      0|        pk11_CloseSession(slot, session, owner);
  979|      0|        PORT_SetError(PK11_MapError(crv));
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  980|      0|        return SECFailure;
  981|      0|    }
  982|  11.6k|    crv = PK11_GETTAB(slot)->C_Encrypt(session, (unsigned char *)data,
  ------------------
  |  |  102|  11.6k|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
  983|  11.6k|                                       dataLen, out, &len);
  984|  11.6k|    if (haslock)
  ------------------
  |  Branch (984:9): [True: 0, False: 11.6k]
  ------------------
  985|      0|        PK11_ExitSlotMonitor(slot);
  986|  11.6k|    pk11_CloseSession(slot, session, owner);
  987|  11.6k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  11.6k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (987:9): [True: 0, False: 11.6k]
  ------------------
  988|      0|        PORT_SetError(PK11_MapError(crv));
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  989|      0|        return SECFailure;
  990|      0|    }
  991|  11.6k|    *outLen = len;
  992|  11.6k|    return SECSuccess;
  993|  11.6k|}
PK11_UnlinkGenericObject:
 1567|  2.86k|{
 1568|  2.86k|    if (object->prev != NULL) {
  ------------------
  |  Branch (1568:9): [True: 0, False: 2.86k]
  ------------------
 1569|      0|        object->prev->next = object->next;
 1570|      0|    }
 1571|  2.86k|    if (object->next != NULL) {
  ------------------
  |  Branch (1571:9): [True: 0, False: 2.86k]
  ------------------
 1572|      0|        object->next->prev = object->prev;
 1573|      0|    }
 1574|       |
 1575|  2.86k|    object->next = NULL;
 1576|  2.86k|    object->prev = NULL;
 1577|  2.86k|    return SECSuccess;
 1578|  2.86k|}
PK11_DestroyGenericObject:
 1587|  2.86k|{
 1588|  2.86k|    if (object == NULL) {
  ------------------
  |  Branch (1588:9): [True: 0, False: 2.86k]
  ------------------
 1589|      0|        return SECSuccess;
 1590|      0|    }
 1591|       |
 1592|  2.86k|    PK11_UnlinkGenericObject(object);
 1593|  2.86k|    if (object->slot) {
  ------------------
  |  Branch (1593:9): [True: 2.86k, False: 0]
  ------------------
 1594|  2.86k|        if (object->owner) {
  ------------------
  |  Branch (1594:13): [True: 0, False: 2.86k]
  ------------------
 1595|      0|            PK11_DestroyObject(object->slot, object->objectID);
 1596|      0|        }
 1597|  2.86k|        PK11_FreeSlot(object->slot);
 1598|  2.86k|    }
 1599|  2.86k|    PORT_Free(object);
  ------------------
  |  |   60|  2.86k|#define PORT_Free PORT_Free_Util
  ------------------
 1600|  2.86k|    return SECSuccess;
 1601|  2.86k|}
pk11_CreateGenericObjectHelper:
 1641|  2.86k|{
 1642|  2.86k|    CK_OBJECT_HANDLE objectID;
 1643|  2.86k|    PK11GenericObject *obj;
 1644|  2.86k|    CK_RV crv;
 1645|       |
 1646|  2.86k|    PK11_EnterSlotMonitor(slot);
 1647|  2.86k|    crv = PK11_CreateNewObject(slot, slot->session, pTemplate, count,
 1648|  2.86k|                               token, &objectID);
 1649|  2.86k|    PK11_ExitSlotMonitor(slot);
 1650|  2.86k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  2.86k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1650:9): [True: 0, False: 2.86k]
  ------------------
 1651|      0|        PORT_SetError(PK11_MapError(crv));
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1652|      0|        return NULL;
 1653|      0|    }
 1654|       |
 1655|  2.86k|    obj = PORT_New(PK11GenericObject);
  ------------------
  |  |  151|  2.86k|#define PORT_New(type) (type *)PORT_Alloc(sizeof(type))
  |  |  ------------------
  |  |  |  |   52|  2.86k|#define PORT_Alloc PORT_Alloc_Util
  |  |  ------------------
  ------------------
 1656|  2.86k|    if (!obj) {
  ------------------
  |  Branch (1656:9): [True: 0, False: 2.86k]
  ------------------
 1657|       |        /* error set by PORT_New */
 1658|      0|        return NULL;
 1659|      0|    }
 1660|       |
 1661|       |    /* initialize it */
 1662|  2.86k|    obj->slot = PK11_ReferenceSlot(slot);
 1663|  2.86k|    obj->objectID = objectID;
 1664|  2.86k|    obj->owner = owner;
 1665|  2.86k|    obj->next = NULL;
 1666|  2.86k|    obj->prev = NULL;
 1667|  2.86k|    return obj;
 1668|  2.86k|}
PK11_CreateGenericObject:
 1681|  2.86k|{
 1682|  2.86k|    return pk11_CreateGenericObjectHelper(slot, pTemplate, count, token,
 1683|  2.86k|                                          PR_FALSE);
  ------------------
  |  |  438|  2.86k|#define PR_FALSE 0
  ------------------
 1684|  2.86k|}
PK11_GetObjectHandle:
 1701|  2.86k|{
 1702|  2.86k|    CK_OBJECT_HANDLE handle = CK_INVALID_HANDLE;
  ------------------
  |  |   78|  2.86k|#define CK_INVALID_HANDLE 0
  ------------------
 1703|  2.86k|    PK11SlotInfo *slot = NULL;
 1704|       |
 1705|  2.86k|    switch (objType) {
 1706|  2.86k|        case PK11_TypeGeneric:
  ------------------
  |  Branch (1706:9): [True: 2.86k, False: 0]
  ------------------
 1707|  2.86k|            slot = ((PK11GenericObject *)objSpec)->slot;
 1708|  2.86k|            handle = ((PK11GenericObject *)objSpec)->objectID;
 1709|  2.86k|            break;
 1710|      0|        case PK11_TypePrivKey:
  ------------------
  |  Branch (1710:9): [True: 0, False: 2.86k]
  ------------------
 1711|      0|            slot = ((SECKEYPrivateKey *)objSpec)->pkcs11Slot;
 1712|      0|            handle = ((SECKEYPrivateKey *)objSpec)->pkcs11ID;
 1713|      0|            break;
 1714|      0|        case PK11_TypePubKey:
  ------------------
  |  Branch (1714:9): [True: 0, False: 2.86k]
  ------------------
 1715|      0|            slot = ((SECKEYPublicKey *)objSpec)->pkcs11Slot;
 1716|      0|            handle = ((SECKEYPublicKey *)objSpec)->pkcs11ID;
 1717|      0|            break;
 1718|      0|        case PK11_TypeSymKey:
  ------------------
  |  Branch (1718:9): [True: 0, False: 2.86k]
  ------------------
 1719|      0|            slot = ((PK11SymKey *)objSpec)->slot;
 1720|      0|            handle = ((PK11SymKey *)objSpec)->objectID;
 1721|      0|            break;
 1722|      0|        case PK11_TypeCert:
  ------------------
  |  Branch (1722:9): [True: 0, False: 2.86k]
  ------------------
 1723|      0|            handle = PK11_FindObjectForCert((CERTCertificate *)objSpec, NULL,
 1724|      0|                                            &slot);
 1725|      0|            break;
 1726|      0|        default:
  ------------------
  |  Branch (1726:9): [True: 0, False: 2.86k]
  ------------------
 1727|      0|            PORT_SetError(SEC_ERROR_UNKNOWN_OBJECT_TYPE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1728|      0|            break;
 1729|  2.86k|    }
 1730|  2.86k|    if (slotp) {
  ------------------
  |  Branch (1730:9): [True: 0, False: 2.86k]
  ------------------
 1731|      0|        *slotp = slot;
 1732|      0|    }
 1733|       |    /* paranoia. If the object doesn't have a slot, then it's handle isn't
 1734|       |     * valid either */
 1735|  2.86k|    if (slot == NULL) {
  ------------------
  |  Branch (1735:9): [True: 0, False: 2.86k]
  ------------------
 1736|      0|        handle = CK_INVALID_HANDLE;
  ------------------
  |  |   78|      0|#define CK_INVALID_HANDLE 0
  ------------------
 1737|      0|    }
 1738|  2.86k|    return handle;
 1739|  2.86k|}
pk11_FindObjectByTemplate:
 1866|      2|{
 1867|      2|    CK_OBJECT_HANDLE object;
 1868|      2|    CK_RV crv = CKR_SESSION_HANDLE_INVALID;
  ------------------
  |  | 1465|      2|#define CKR_SESSION_HANDLE_INVALID 0x000000B3UL
  ------------------
 1869|      2|    CK_ULONG objectCount;
 1870|       |
 1871|       |    /*
 1872|       |     * issue the find
 1873|       |     */
 1874|      2|    PK11_EnterSlotMonitor(slot);
 1875|      2|    if (slot->session != CK_INVALID_HANDLE) {
  ------------------
  |  |   78|      2|#define CK_INVALID_HANDLE 0
  ------------------
  |  Branch (1875:9): [True: 2, False: 0]
  ------------------
 1876|      2|        crv = PK11_GETTAB(slot)->C_FindObjectsInit(slot->session,
  ------------------
  |  |  102|      2|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1877|      2|                                                   theTemplate, tsize);
 1878|      2|    }
 1879|      2|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|      2|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1879:9): [True: 0, False: 2]
  ------------------
 1880|      0|        PK11_ExitSlotMonitor(slot);
 1881|      0|        PORT_SetError(PK11_MapError(crv));
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1882|      0|        return CK_INVALID_HANDLE;
  ------------------
  |  |   78|      0|#define CK_INVALID_HANDLE 0
  ------------------
 1883|      0|    }
 1884|       |
 1885|      2|    crv = PK11_GETTAB(slot)->C_FindObjects(slot->session, &object, 1, &objectCount);
  ------------------
  |  |  102|      2|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1886|      2|    PK11_GETTAB(slot)->C_FindObjectsFinal(slot->session);
  ------------------
  |  |  102|      2|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1887|      2|    PK11_ExitSlotMonitor(slot);
 1888|      2|    if ((crv != CKR_OK) || (objectCount < 1)) {
  ------------------
  |  | 1388|      2|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1888:9): [True: 0, False: 2]
  |  Branch (1888:28): [True: 2, False: 0]
  ------------------
 1889|       |        /* shouldn't use SSL_ERROR... here */
 1890|      2|        PORT_SetError(crv != CKR_OK ? PK11_MapError(crv) : SSL_ERROR_NO_CERTIFICATE);
  ------------------
  |  |   65|      2|#define PORT_SetError PORT_SetError_Util
  ------------------
                      PORT_SetError(crv != CKR_OK ? PK11_MapError(crv) : SSL_ERROR_NO_CERTIFICATE);
  ------------------
  |  | 1388|      2|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1890:23): [True: 0, False: 2]
  ------------------
 1891|      2|        return CK_INVALID_HANDLE;
  ------------------
  |  |   78|      2|#define CK_INVALID_HANDLE 0
  ------------------
 1892|      2|    }
 1893|       |
 1894|       |    /* blow up if the PKCS #11 module returns us and invalid object handle */
 1895|      0|    PORT_Assert(object != CK_INVALID_HANDLE);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1896|      0|    return object;
 1897|      2|}
pk11_FindObjectsByTemplate:
 1905|      2|{
 1906|      2|    CK_OBJECT_HANDLE *objID = NULL;
 1907|      2|    CK_ULONG returned_count = 0;
 1908|      2|    PRBool owner = PR_TRUE;
  ------------------
  |  |  437|      2|#define PR_TRUE 1
  ------------------
 1909|      2|    CK_SESSION_HANDLE session;
 1910|      2|    PRBool haslock = PR_FALSE;
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
 1911|      2|    CK_RV crv = CKR_SESSION_HANDLE_INVALID;
  ------------------
  |  | 1465|      2|#define CKR_SESSION_HANDLE_INVALID 0x000000B3UL
  ------------------
 1912|       |
 1913|      2|    session = pk11_GetNewSession(slot, &owner);
 1914|      2|    haslock = (!owner || !(slot->isThreadSafe));
  ------------------
  |  Branch (1914:16): [True: 0, False: 2]
  |  Branch (1914:26): [True: 0, False: 2]
  ------------------
 1915|      2|    if (haslock) {
  ------------------
  |  Branch (1915:9): [True: 0, False: 2]
  ------------------
 1916|      0|        PK11_EnterSlotMonitor(slot);
 1917|      0|    }
 1918|      2|    if (session != CK_INVALID_HANDLE) {
  ------------------
  |  |   78|      2|#define CK_INVALID_HANDLE 0
  ------------------
  |  Branch (1918:9): [True: 2, False: 0]
  ------------------
 1919|      2|        crv = PK11_GETTAB(slot)->C_FindObjectsInit(session,
  ------------------
  |  |  102|      2|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1920|      2|                                                   findTemplate, templCount);
 1921|      2|    }
 1922|      2|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|      2|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1922:9): [True: 0, False: 2]
  ------------------
 1923|      0|        if (haslock)
  ------------------
  |  Branch (1923:13): [True: 0, False: 0]
  ------------------
 1924|      0|            PK11_ExitSlotMonitor(slot);
 1925|      0|        pk11_CloseSession(slot, session, owner);
 1926|      0|        PORT_SetError(PK11_MapError(crv));
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1927|      0|        *object_count = -1;
 1928|      0|        return NULL;
 1929|      0|    }
 1930|       |
 1931|       |    /*
 1932|       |     * collect all the Matching Objects
 1933|       |     */
 1934|      2|    do {
 1935|      2|        CK_OBJECT_HANDLE *oldObjID = objID;
 1936|       |
 1937|      2|        if (objID == NULL) {
  ------------------
  |  Branch (1937:13): [True: 2, False: 0]
  ------------------
 1938|      2|            objID = (CK_OBJECT_HANDLE *)PORT_Alloc(sizeof(CK_OBJECT_HANDLE) *
  ------------------
  |  |   52|      2|#define PORT_Alloc PORT_Alloc_Util
  ------------------
 1939|      2|                                                   (*object_count + PK11_SEARCH_CHUNKSIZE));
  ------------------
  |  |   23|      2|#define PK11_SEARCH_CHUNKSIZE 10
  ------------------
 1940|      2|        } else {
 1941|      0|            objID = (CK_OBJECT_HANDLE *)PORT_Realloc(objID,
  ------------------
  |  |   64|      0|#define PORT_Realloc PORT_Realloc_Util
  ------------------
 1942|      0|                                                     sizeof(CK_OBJECT_HANDLE) * (*object_count + PK11_SEARCH_CHUNKSIZE));
  ------------------
  |  |   23|      0|#define PK11_SEARCH_CHUNKSIZE 10
  ------------------
 1943|      0|        }
 1944|       |
 1945|      2|        if (objID == NULL) {
  ------------------
  |  Branch (1945:13): [True: 0, False: 2]
  ------------------
 1946|      0|            if (oldObjID)
  ------------------
  |  Branch (1946:17): [True: 0, False: 0]
  ------------------
 1947|      0|                PORT_Free(oldObjID);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 1948|      0|            break;
 1949|      0|        }
 1950|      2|        crv = PK11_GETTAB(slot)->C_FindObjects(session,
  ------------------
  |  |  102|      2|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1951|      2|                                               &objID[*object_count], PK11_SEARCH_CHUNKSIZE, &returned_count);
  ------------------
  |  |   23|      2|#define PK11_SEARCH_CHUNKSIZE 10
  ------------------
 1952|      2|        if (crv != CKR_OK) {
  ------------------
  |  | 1388|      2|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1952:13): [True: 0, False: 2]
  ------------------
 1953|      0|            PORT_SetError(PK11_MapError(crv));
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1954|      0|            PORT_Free(objID);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 1955|      0|            objID = NULL;
 1956|      0|            break;
 1957|      0|        }
 1958|      2|        *object_count += returned_count;
 1959|      2|    } while (returned_count == PK11_SEARCH_CHUNKSIZE);
  ------------------
  |  |   23|      2|#define PK11_SEARCH_CHUNKSIZE 10
  ------------------
  |  Branch (1959:14): [True: 0, False: 2]
  ------------------
 1960|       |
 1961|      2|    PK11_GETTAB(slot)->C_FindObjectsFinal(session);
  ------------------
  |  |  102|      2|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1962|      2|    if (haslock) {
  ------------------
  |  Branch (1962:9): [True: 0, False: 2]
  ------------------
 1963|      0|        PK11_ExitSlotMonitor(slot);
 1964|      0|    }
 1965|      2|    pk11_CloseSession(slot, session, owner);
 1966|       |
 1967|      2|    if (objID && (*object_count == 0)) {
  ------------------
  |  Branch (1967:9): [True: 2, False: 0]
  |  Branch (1967:18): [True: 2, False: 0]
  ------------------
 1968|      2|        PORT_Free(objID);
  ------------------
  |  |   60|      2|#define PORT_Free PORT_Free_Util
  ------------------
 1969|      2|        return NULL;
 1970|      2|    }
 1971|      0|    if (objID == NULL)
  ------------------
  |  Branch (1971:9): [True: 0, False: 0]
  ------------------
 1972|      0|        *object_count = -1;
 1973|      0|    return objID;
 1974|      2|}

SECMOD_CreateModuleEx:
 1154|      2|{
 1155|      2|    SECMODModule *mod;
 1156|      2|    SECStatus rv;
 1157|      2|    char *slotParams, *ciphers;
 1158|      2|    PRBool printPolicyFeedback = NSSUTIL_ArgHasFlag("flags", "printPolicyFeedback", nss);
 1159|      2|    PRUint32 policyCheckFlags = secmod_parsePolicyCheckFlags(nss);
 1160|       |
 1161|      2|    rv = secmod_parseCryptoPolicy(config, printPolicyFeedback, policyCheckFlags);
 1162|       |
 1163|       |    /* do not load the module if policy parsing fails */
 1164|      2|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1164:9): [True: 0, False: 2]
  ------------------
 1165|      0|        if (printPolicyFeedback) {
  ------------------
  |  Branch (1165:13): [True: 0, False: 0]
  ------------------
 1166|      0|            PR_SetEnv("NSS_POLICY_FAIL=1");
 1167|      0|            fprintf(stderr, "NSS-POLICY-FAIL: policy config parsing failed, not loading module %s\n", moduleName);
 1168|      0|        }
 1169|      0|        return NULL;
 1170|      0|    }
 1171|       |
 1172|      2|    mod = secmod_NewModule();
 1173|      2|    if (mod == NULL)
  ------------------
  |  Branch (1173:9): [True: 0, False: 2]
  ------------------
 1174|      0|        return NULL;
 1175|       |
 1176|      2|    mod->commonName = PORT_ArenaStrdup(mod->arena, moduleName ? moduleName : "");
  ------------------
  |  |   57|      2|#define PORT_ArenaStrdup PORT_ArenaStrdup_Util
  ------------------
  |  Branch (1176:52): [True: 2, False: 0]
  ------------------
 1177|      2|    if (library) {
  ------------------
  |  Branch (1177:9): [True: 0, False: 2]
  ------------------
 1178|      0|        mod->dllName = PORT_ArenaStrdup(mod->arena, library);
  ------------------
  |  |   57|      0|#define PORT_ArenaStrdup PORT_ArenaStrdup_Util
  ------------------
 1179|      0|    }
 1180|       |    /* new field */
 1181|      2|    if (parameters) {
  ------------------
  |  Branch (1181:9): [True: 2, False: 0]
  ------------------
 1182|      2|        mod->libraryParams = PORT_ArenaStrdup(mod->arena, parameters);
  ------------------
  |  |   57|      2|#define PORT_ArenaStrdup PORT_ArenaStrdup_Util
  ------------------
 1183|      2|    }
 1184|       |
 1185|      2|    mod->internal = NSSUTIL_ArgHasFlag("flags", "internal", nss);
 1186|      2|    mod->isFIPS = NSSUTIL_ArgHasFlag("flags", "FIPS", nss);
 1187|       |    /* if the system FIPS mode is enabled, force FIPS to be on */
 1188|      2|    if (SECMOD_GetSystemFIPSEnabled()) {
  ------------------
  |  Branch (1188:9): [True: 0, False: 2]
  ------------------
 1189|      0|        mod->isFIPS = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 1190|      0|    }
 1191|      2|    mod->isCritical = NSSUTIL_ArgHasFlag("flags", "critical", nss);
 1192|      2|    slotParams = NSSUTIL_ArgGetParamValue("slotParams", nss);
 1193|      2|    mod->slotInfo = NSSUTIL_ArgParseSlotInfo(mod->arena, slotParams,
 1194|      2|                                             &mod->slotInfoCount);
 1195|      2|    if (slotParams)
  ------------------
  |  Branch (1195:9): [True: 1, False: 1]
  ------------------
 1196|      1|        PORT_Free(slotParams);
  ------------------
  |  |   60|      1|#define PORT_Free PORT_Free_Util
  ------------------
 1197|       |    /* new field */
 1198|      2|    mod->trustOrder = NSSUTIL_ArgReadLong("trustOrder", nss,
 1199|      2|                                          NSSUTIL_DEFAULT_TRUST_ORDER, NULL);
  ------------------
  |  |   49|      2|#define NSSUTIL_DEFAULT_TRUST_ORDER 50
  ------------------
 1200|       |    /* new field */
 1201|      2|    mod->cipherOrder = NSSUTIL_ArgReadLong("cipherOrder", nss,
 1202|      2|                                           NSSUTIL_DEFAULT_CIPHER_ORDER, NULL);
  ------------------
  |  |   48|      2|#define NSSUTIL_DEFAULT_CIPHER_ORDER 0
  ------------------
 1203|       |    /* new field */
 1204|      2|    mod->isModuleDB = NSSUTIL_ArgHasFlag("flags", "moduleDB", nss);
 1205|      2|    mod->moduleDBOnly = NSSUTIL_ArgHasFlag("flags", "moduleDBOnly", nss);
 1206|      2|    if (mod->moduleDBOnly)
  ------------------
  |  Branch (1206:9): [True: 1, False: 1]
  ------------------
 1207|      1|        mod->isModuleDB = PR_TRUE;
  ------------------
  |  |  437|      1|#define PR_TRUE 1
  ------------------
 1208|       |
 1209|       |    /* we need more bits, but we also want to preserve binary compatibility
 1210|       |     * so we overload the isModuleDB PRBool with additional flags.
 1211|       |     * These flags are only valid if mod->isModuleDB is already set.
 1212|       |     * NOTE: this depends on the fact that PRBool is at least a char on
 1213|       |     * all platforms. These flags are only valid if moduleDB is set, so
 1214|       |     * code checking if (mod->isModuleDB) will continue to work correctly. */
 1215|      2|    if (mod->isModuleDB) {
  ------------------
  |  Branch (1215:9): [True: 1, False: 1]
  ------------------
 1216|      1|        char flags = SECMOD_FLAG_MODULE_DB_IS_MODULE_DB;
  ------------------
  |  |  108|      1|#define SECMOD_FLAG_MODULE_DB_IS_MODULE_DB 0x01 /* must be set if any of the \
  ------------------
 1217|      1|        if (NSSUTIL_ArgHasFlag("flags", "skipFirst", nss)) {
  ------------------
  |  Branch (1217:13): [True: 0, False: 1]
  ------------------
 1218|      0|            flags |= SECMOD_FLAG_MODULE_DB_SKIP_FIRST;
  ------------------
  |  |  110|      0|#define SECMOD_FLAG_MODULE_DB_SKIP_FIRST 0x02
  ------------------
 1219|      0|        }
 1220|      1|        if (NSSUTIL_ArgHasFlag("flags", "defaultModDB", nss)) {
  ------------------
  |  Branch (1220:13): [True: 1, False: 0]
  ------------------
 1221|      1|            flags |= SECMOD_FLAG_MODULE_DB_DEFAULT_MODDB;
  ------------------
  |  |  111|      1|#define SECMOD_FLAG_MODULE_DB_DEFAULT_MODDB 0x04
  ------------------
 1222|      1|        }
 1223|      1|        if (NSSUTIL_ArgHasFlag("flags", "policyOnly", nss)) {
  ------------------
  |  Branch (1223:13): [True: 0, False: 1]
  ------------------
 1224|      0|            flags |= SECMOD_FLAG_MODULE_DB_POLICY_ONLY;
  ------------------
  |  |  112|      0|#define SECMOD_FLAG_MODULE_DB_POLICY_ONLY 0x08
  ------------------
 1225|      0|        }
 1226|       |        /* additional moduleDB flags could be added here in the future */
 1227|      1|        mod->isModuleDB = (PRBool)flags;
 1228|      1|    }
 1229|       |
 1230|      2|    if (mod->internal) {
  ------------------
  |  Branch (1230:9): [True: 2, False: 0]
  ------------------
 1231|      2|        char flags = SECMOD_FLAG_INTERNAL_IS_INTERNAL;
  ------------------
  |  |  126|      2|#define SECMOD_FLAG_INTERNAL_IS_INTERNAL 0x01 /* must be set if any of \
  ------------------
 1232|       |
 1233|      2|        if (NSSUTIL_ArgHasFlag("flags", "internalKeySlot", nss)) {
  ------------------
  |  Branch (1233:13): [True: 1, False: 1]
  ------------------
 1234|      1|            flags |= SECMOD_FLAG_INTERNAL_KEY_SLOT;
  ------------------
  |  |  128|      1|#define SECMOD_FLAG_INTERNAL_KEY_SLOT 0x02
  ------------------
 1235|      1|        }
 1236|      2|        mod->internal = (PRBool)flags;
 1237|      2|    }
 1238|       |
 1239|      2|    ciphers = NSSUTIL_ArgGetParamValue("ciphers", nss);
 1240|      2|    NSSUTIL_ArgParseCipherFlags(&mod->ssl[0], ciphers);
 1241|      2|    if (ciphers)
  ------------------
  |  Branch (1241:9): [True: 0, False: 2]
  ------------------
 1242|      0|        PORT_Free(ciphers);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 1243|       |
 1244|      2|    secmod_PrivateModuleCount++;
 1245|       |
 1246|      2|    return mod;
 1247|      2|}
SECMOD_GetSkipFirstFlag:
 1251|      1|{
 1252|      1|    char flags = (char)mod->isModuleDB;
 1253|       |
 1254|      1|    return (flags & SECMOD_FLAG_MODULE_DB_SKIP_FIRST) ? PR_TRUE : PR_FALSE;
  ------------------
  |  |  110|      1|#define SECMOD_FLAG_MODULE_DB_SKIP_FIRST 0x02
  ------------------
                  return (flags & SECMOD_FLAG_MODULE_DB_SKIP_FIRST) ? PR_TRUE : PR_FALSE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
                  return (flags & SECMOD_FLAG_MODULE_DB_SKIP_FIRST) ? PR_TRUE : PR_FALSE;
  ------------------
  |  |  438|      1|#define PR_FALSE 0
  ------------------
  |  Branch (1254:12): [True: 0, False: 1]
  ------------------
 1255|      1|}
secmod_PolicyOnly:
 1267|      2|{
 1268|      2|    char flags = (char)mod->isModuleDB;
 1269|       |
 1270|      2|    return (flags & SECMOD_FLAG_MODULE_DB_POLICY_ONLY) ? PR_TRUE : PR_FALSE;
  ------------------
  |  |  112|      2|#define SECMOD_FLAG_MODULE_DB_POLICY_ONLY 0x08
  ------------------
                  return (flags & SECMOD_FLAG_MODULE_DB_POLICY_ONLY) ? PR_TRUE : PR_FALSE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
                  return (flags & SECMOD_FLAG_MODULE_DB_POLICY_ONLY) ? PR_TRUE : PR_FALSE;
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
  |  Branch (1270:12): [True: 0, False: 2]
  ------------------
 1271|      2|}
secmod_IsInternalKeySlot:
 1275|      3|{
 1276|      3|    char flags = (char)mod->internal;
 1277|       |
 1278|      3|    return (flags & SECMOD_FLAG_INTERNAL_KEY_SLOT) ? PR_TRUE : PR_FALSE;
  ------------------
  |  |  128|      3|#define SECMOD_FLAG_INTERNAL_KEY_SLOT 0x02
  ------------------
                  return (flags & SECMOD_FLAG_INTERNAL_KEY_SLOT) ? PR_TRUE : PR_FALSE;
  ------------------
  |  |  437|      3|#define PR_TRUE 1
  ------------------
                  return (flags & SECMOD_FLAG_INTERNAL_KEY_SLOT) ? PR_TRUE : PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  |  Branch (1278:12): [True: 3, False: 0]
  ------------------
 1279|      3|}
SECMOD_GetModuleSpecList:
 2095|      1|{
 2096|      1|    SECMODModuleDBFunc func = (SECMODModuleDBFunc)module->moduleDBFunc;
 2097|      1|    if (func) {
  ------------------
  |  Branch (2097:9): [True: 1, False: 0]
  ------------------
 2098|      1|        return (*func)(SECMOD_MODULE_DB_FUNCTION_FIND,
  ------------------
  |  |  557|      1|#define SECMOD_MODULE_DB_FUNCTION_FIND 0
  ------------------
 2099|      1|                       module->libraryParams, NULL);
 2100|      1|    }
 2101|      0|    return NULL;
 2102|      1|}
SECMOD_FreeModuleSpecList:
 2150|      1|{
 2151|      1|    SECMODModuleDBFunc func = (SECMODModuleDBFunc)module->moduleDBFunc;
 2152|      1|    char **retString;
 2153|      1|    if (func) {
  ------------------
  |  Branch (2153:9): [True: 1, False: 0]
  ------------------
 2154|      1|        retString = (*func)(SECMOD_MODULE_DB_FUNCTION_RELEASE,
  ------------------
  |  |  560|      1|#define SECMOD_MODULE_DB_FUNCTION_RELEASE 3
  ------------------
 2155|      1|                            module->libraryParams, moduleSpecList);
 2156|      1|        if (retString != NULL)
  ------------------
  |  Branch (2156:13): [True: 1, False: 0]
  ------------------
 2157|      1|            return SECSuccess;
 2158|      1|    }
 2159|      0|    return SECFailure;
 2160|      1|}
SECMOD_LoadModule:
 2167|      2|{
 2168|      2|    char *library = NULL, *moduleName = NULL, *parameters = NULL, *nss = NULL;
 2169|      2|    char *config = NULL;
 2170|      2|    SECStatus status;
 2171|      2|    SECMODModule *module = NULL;
 2172|      2|    SECMODModule *oldModule = NULL;
 2173|      2|    SECStatus rv;
 2174|      2|    PRBool forwardPolicyFeedback = PR_FALSE;
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
 2175|      2|    PRUint32 forwardPolicyCheckFlags;
 2176|       |
 2177|       |    /* initialize the underlying module structures */
 2178|      2|    SECMOD_Init();
 2179|       |
 2180|      2|    status = NSSUTIL_ArgParseModuleSpecEx(modulespec, &library, &moduleName,
 2181|      2|                                          &parameters, &nss,
 2182|      2|                                          &config);
 2183|      2|    if (status != SECSuccess) {
  ------------------
  |  Branch (2183:9): [True: 0, False: 2]
  ------------------
 2184|      0|        goto loser;
 2185|      0|    }
 2186|       |
 2187|      2|    module = SECMOD_CreateModuleEx(library, moduleName, parameters, nss, config);
 2188|      2|    forwardPolicyFeedback = NSSUTIL_ArgHasFlag("flags", "printPolicyFeedback", nss);
 2189|      2|    forwardPolicyCheckFlags = secmod_parsePolicyCheckFlags(nss);
 2190|       |
 2191|      2|    if (library)
  ------------------
  |  Branch (2191:9): [True: 0, False: 2]
  ------------------
 2192|      0|        PORT_Free(library);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 2193|      2|    if (moduleName)
  ------------------
  |  Branch (2193:9): [True: 2, False: 0]
  ------------------
 2194|      2|        PORT_Free(moduleName);
  ------------------
  |  |   60|      2|#define PORT_Free PORT_Free_Util
  ------------------
 2195|      2|    if (parameters)
  ------------------
  |  Branch (2195:9): [True: 2, False: 0]
  ------------------
 2196|      2|        PORT_Free(parameters);
  ------------------
  |  |   60|      2|#define PORT_Free PORT_Free_Util
  ------------------
 2197|      2|    if (nss)
  ------------------
  |  Branch (2197:9): [True: 2, False: 0]
  ------------------
 2198|      2|        PORT_Free(nss);
  ------------------
  |  |   60|      2|#define PORT_Free PORT_Free_Util
  ------------------
 2199|      2|    if (config)
  ------------------
  |  Branch (2199:9): [True: 0, False: 2]
  ------------------
 2200|      0|        PORT_Free(config);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 2201|      2|    if (!module) {
  ------------------
  |  Branch (2201:9): [True: 0, False: 2]
  ------------------
 2202|      0|        goto loser;
 2203|      0|    }
 2204|       |
 2205|       |    /* a policy only stanza doesn't actually get 'loaded'. policy has already
 2206|       |     * been parsed as a side effect of the CreateModuleEx call */
 2207|      2|    if (secmod_PolicyOnly(module)) {
  ------------------
  |  Branch (2207:9): [True: 0, False: 2]
  ------------------
 2208|      0|        return module;
 2209|      0|    }
 2210|      2|    if (parent) {
  ------------------
  |  Branch (2210:9): [True: 1, False: 1]
  ------------------
 2211|      1|        module->parent = SECMOD_ReferenceModule(parent);
 2212|      1|        if (module->internal && secmod_IsInternalKeySlot(parent)) {
  ------------------
  |  Branch (2212:13): [True: 1, False: 0]
  |  Branch (2212:33): [True: 1, False: 0]
  ------------------
 2213|      1|            module->internal = parent->internal;
 2214|      1|        }
 2215|      1|    }
 2216|       |
 2217|       |    /* load it */
 2218|      2|    rv = secmod_LoadPKCS11Module(module, &oldModule);
 2219|      2|    if (rv != SECSuccess) {
  ------------------
  |  Branch (2219:9): [True: 0, False: 2]
  ------------------
 2220|      0|        goto loser;
 2221|      0|    }
 2222|       |
 2223|       |    /* if we just reload an old module, no need to add it to any lists.
 2224|       |     * we simple release all our references */
 2225|      2|    if (oldModule) {
  ------------------
  |  Branch (2225:9): [True: 0, False: 2]
  ------------------
 2226|       |        /* This module already exists, don't link it anywhere. This
 2227|       |         * will probably destroy this module */
 2228|      0|        SECMOD_DestroyModule(module);
 2229|      0|        return oldModule;
 2230|      0|    }
 2231|       |
 2232|      2|    if (recurse && module->isModuleDB) {
  ------------------
  |  Branch (2232:9): [True: 2, False: 0]
  |  Branch (2232:20): [True: 1, False: 1]
  ------------------
 2233|      1|        char **moduleSpecList;
 2234|      1|        PORT_SetError(0);
  ------------------
  |  |   65|      1|#define PORT_SetError PORT_SetError_Util
  ------------------
 2235|       |
 2236|      1|        moduleSpecList = SECMOD_GetModuleSpecList(module);
 2237|      1|        if (moduleSpecList) {
  ------------------
  |  Branch (2237:13): [True: 1, False: 0]
  ------------------
 2238|      1|            char **index;
 2239|       |
 2240|      1|            index = moduleSpecList;
 2241|      1|            if (*index && SECMOD_GetSkipFirstFlag(module)) {
  ------------------
  |  Branch (2241:17): [True: 1, False: 0]
  |  Branch (2241:27): [True: 0, False: 1]
  ------------------
 2242|      0|                index++;
 2243|      0|            }
 2244|       |
 2245|      2|            for (; *index; index++) {
  ------------------
  |  Branch (2245:20): [True: 1, False: 1]
  ------------------
 2246|      1|                SECMODModule *child;
 2247|      1|                if (0 == PORT_Strcmp(*index, modulespec)) {
  ------------------
  |  |  188|      1|#define PORT_Strcmp strcmp
  ------------------
  |  Branch (2247:21): [True: 0, False: 1]
  ------------------
 2248|       |                    /* avoid trivial infinite recursion */
 2249|      0|                    PORT_SetError(SEC_ERROR_NO_MODULE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2250|      0|                    rv = SECFailure;
 2251|      0|                    break;
 2252|      0|                }
 2253|      1|                if (!forwardPolicyFeedback) {
  ------------------
  |  Branch (2253:21): [True: 1, False: 0]
  ------------------
 2254|      1|                    child = SECMOD_LoadModule(*index, module, PR_TRUE);
  ------------------
  |  |  437|      1|#define PR_TRUE 1
  ------------------
 2255|      1|                } else {
 2256|       |                    /* Add printPolicyFeedback to the nss flags */
 2257|      0|                    char *specWithForwards =
 2258|      0|                        NSSUTIL_AddNSSFlagToModuleSpec(*index, "printPolicyFeedback");
 2259|      0|                    char *tmp;
 2260|      0|                    if (forwardPolicyCheckFlags & SECMOD_FLAG_POLICY_CHECK_IDENTIFIER) {
  ------------------
  |  |  131|      0|#define SECMOD_FLAG_POLICY_CHECK_IDENTIFIER 0x01
  ------------------
  |  Branch (2260:25): [True: 0, False: 0]
  ------------------
 2261|      0|                        tmp = NSSUTIL_AddNSSFlagToModuleSpec(specWithForwards, "policyCheckIdentifier");
 2262|      0|                        PORT_Free(specWithForwards);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 2263|      0|                        specWithForwards = tmp;
 2264|      0|                    }
 2265|      0|                    if (forwardPolicyCheckFlags & SECMOD_FLAG_POLICY_CHECK_VALUE) {
  ------------------
  |  |  132|      0|#define SECMOD_FLAG_POLICY_CHECK_VALUE 0x02
  ------------------
  |  Branch (2265:25): [True: 0, False: 0]
  ------------------
 2266|      0|                        tmp = NSSUTIL_AddNSSFlagToModuleSpec(specWithForwards, "policyCheckValue");
 2267|      0|                        PORT_Free(specWithForwards);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 2268|      0|                        specWithForwards = tmp;
 2269|      0|                    }
 2270|      0|                    child = SECMOD_LoadModule(specWithForwards, module, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 2271|      0|                    PORT_Free(specWithForwards);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 2272|      0|                }
 2273|      1|                if (!child)
  ------------------
  |  Branch (2273:21): [True: 0, False: 1]
  ------------------
 2274|      0|                    break;
 2275|      1|                if (child->isCritical && !child->loaded) {
  ------------------
  |  Branch (2275:21): [True: 1, False: 0]
  |  Branch (2275:42): [True: 0, False: 1]
  ------------------
 2276|      0|                    int err = PORT_GetError();
  ------------------
  |  |   62|      0|#define PORT_GetError PORT_GetError_Util
  ------------------
 2277|      0|                    if (!err)
  ------------------
  |  Branch (2277:25): [True: 0, False: 0]
  ------------------
 2278|      0|                        err = SEC_ERROR_NO_MODULE;
 2279|      0|                    SECMOD_DestroyModule(child);
 2280|      0|                    PORT_SetError(err);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2281|      0|                    rv = SECFailure;
 2282|      0|                    break;
 2283|      0|                }
 2284|      1|                SECMOD_DestroyModule(child);
 2285|      1|            }
 2286|      1|            SECMOD_FreeModuleSpecList(module, moduleSpecList);
 2287|      1|        } else {
 2288|      0|            if (!PORT_GetError())
  ------------------
  |  |   62|      0|#define PORT_GetError PORT_GetError_Util
  ------------------
  |  Branch (2288:17): [True: 0, False: 0]
  ------------------
 2289|      0|                PORT_SetError(SEC_ERROR_NO_MODULE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2290|      0|            rv = SECFailure;
 2291|      0|        }
 2292|      1|    }
 2293|       |
 2294|      2|    if (rv != SECSuccess) {
  ------------------
  |  Branch (2294:9): [True: 0, False: 2]
  ------------------
 2295|      0|        goto loser;
 2296|      0|    }
 2297|       |
 2298|       |    /* inherit the reference */
 2299|      2|    if (!module->moduleDBOnly) {
  ------------------
  |  Branch (2299:9): [True: 1, False: 1]
  ------------------
 2300|      1|        SECMOD_AddModuleToList(module);
 2301|      1|    } else {
 2302|      1|        SECMOD_AddModuleToDBOnlyList(module);
 2303|      1|    }
 2304|       |
 2305|       |    /* handle any additional work here */
 2306|      2|    return module;
 2307|       |
 2308|      0|loser:
 2309|      0|    if (module) {
  ------------------
  |  Branch (2309:9): [True: 0, False: 0]
  ------------------
 2310|      0|        if (module->loaded) {
  ------------------
  |  Branch (2310:13): [True: 0, False: 0]
  ------------------
 2311|      0|            SECMOD_UnloadModule(module);
 2312|      0|        }
 2313|      0|        SECMOD_AddModuleToUnloadList(module);
 2314|      0|    }
 2315|      0|    return module;
 2316|      2|}
pk11pars.c:secmod_parsePolicyCheckFlags:
 1133|      4|{
 1134|      4|    PRUint32 policyCheckFlags = 0;
 1135|       |
 1136|      4|    if (NSSUTIL_ArgHasFlag("flags", "policyCheckIdentifier", nss)) {
  ------------------
  |  Branch (1136:9): [True: 0, False: 4]
  ------------------
 1137|      0|        policyCheckFlags |= SECMOD_FLAG_POLICY_CHECK_IDENTIFIER;
  ------------------
  |  |  131|      0|#define SECMOD_FLAG_POLICY_CHECK_IDENTIFIER 0x01
  ------------------
 1138|      0|    }
 1139|       |
 1140|      4|    if (NSSUTIL_ArgHasFlag("flags", "policyCheckValue", nss)) {
  ------------------
  |  Branch (1140:9): [True: 0, False: 4]
  ------------------
 1141|      0|        policyCheckFlags |= SECMOD_FLAG_POLICY_CHECK_VALUE;
  ------------------
  |  |  132|      0|#define SECMOD_FLAG_POLICY_CHECK_VALUE 0x02
  ------------------
 1142|      0|    }
 1143|       |
 1144|      4|    return policyCheckFlags;
 1145|      4|}
pk11pars.c:secmod_parseCryptoPolicy:
 1061|      2|{
 1062|      2|    char *args;
 1063|      2|    SECStatus rv;
 1064|       |
 1065|      2|    if (policyConfig == NULL) {
  ------------------
  |  Branch (1065:9): [True: 2, False: 0]
  ------------------
 1066|      2|        return SECSuccess; /* no policy given */
 1067|      2|    }
 1068|       |    /* make sure we initialize the oid table and set all the default policy
 1069|       |     * values first so we can override them here */
 1070|      0|    rv = SECOID_Init();
 1071|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1071:9): [True: 0, False: 0]
  ------------------
 1072|      0|        return rv;
 1073|      0|    }
 1074|      0|    args = NSSUTIL_ArgGetParamValue("disallow", policyConfig);
 1075|      0|    rv = secmod_applyCryptoPolicy(args, NSS_DISALLOW, printPolicyFeedback,
 1076|      0|                                  policyCheckFlags);
 1077|      0|    if (args)
  ------------------
  |  Branch (1077:9): [True: 0, False: 0]
  ------------------
 1078|      0|        PORT_Free(args);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 1079|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1079:9): [True: 0, False: 0]
  ------------------
 1080|      0|        return rv;
 1081|      0|    }
 1082|      0|    args = NSSUTIL_ArgGetParamValue("allow", policyConfig);
 1083|      0|    rv = secmod_applyCryptoPolicy(args, NSS_ALLOW, printPolicyFeedback,
 1084|      0|                                  policyCheckFlags);
 1085|      0|    if (args)
  ------------------
  |  Branch (1085:9): [True: 0, False: 0]
  ------------------
 1086|      0|        PORT_Free(args);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 1087|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1087:9): [True: 0, False: 0]
  ------------------
 1088|      0|        return rv;
 1089|      0|    }
 1090|      0|    args = NSSUTIL_ArgGetParamValue("disable", policyConfig);
 1091|      0|    rv = secmod_applyCryptoPolicy(args, NSS_DISABLE, printPolicyFeedback,
 1092|      0|                                  policyCheckFlags);
 1093|      0|    if (args)
  ------------------
  |  Branch (1093:9): [True: 0, False: 0]
  ------------------
 1094|      0|        PORT_Free(args);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 1095|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1095:9): [True: 0, False: 0]
  ------------------
 1096|      0|        return rv;
 1097|      0|    }
 1098|      0|    args = NSSUTIL_ArgGetParamValue("enable", policyConfig);
 1099|      0|    rv = secmod_applyCryptoPolicy(args, NSS_ENABLE, printPolicyFeedback,
 1100|      0|                                  policyCheckFlags);
 1101|      0|    if (args)
  ------------------
  |  Branch (1101:9): [True: 0, False: 0]
  ------------------
 1102|      0|        PORT_Free(args);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 1103|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1103:9): [True: 0, False: 0]
  ------------------
 1104|      0|        return rv;
 1105|      0|    }
 1106|       |    /* this has to be last. Everything after this will be a noop */
 1107|      0|    if (NSSUTIL_ArgHasFlag("flags", "ssl-lock", policyConfig)) {
  ------------------
  |  Branch (1107:9): [True: 0, False: 0]
  ------------------
 1108|      0|        PRInt32 locks;
 1109|       |        /* don't overwrite other (future) lock flags */
 1110|      0|        rv = NSS_OptionGet(NSS_DEFAULT_LOCKS, &locks);
  ------------------
  |  |  302|      0|#define NSS_DEFAULT_LOCKS 0x00d /* lock default values */
  ------------------
 1111|      0|        if (rv == SECSuccess) {
  ------------------
  |  Branch (1111:13): [True: 0, False: 0]
  ------------------
 1112|      0|            rv = NSS_OptionSet(NSS_DEFAULT_LOCKS, locks | NSS_DEFAULT_SSL_LOCK);
  ------------------
  |  |  302|      0|#define NSS_DEFAULT_LOCKS 0x00d /* lock default values */
  ------------------
                          rv = NSS_OptionSet(NSS_DEFAULT_LOCKS, locks | NSS_DEFAULT_SSL_LOCK);
  ------------------
  |  |  303|      0|#define NSS_DEFAULT_SSL_LOCK 1  /* lock the ssl default values */
  ------------------
 1113|      0|        }
 1114|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (1114:13): [True: 0, False: 0]
  ------------------
 1115|      0|            return rv;
 1116|      0|        }
 1117|      0|    }
 1118|      0|    if (NSSUTIL_ArgHasFlag("flags", "policy-lock", policyConfig)) {
  ------------------
  |  Branch (1118:9): [True: 0, False: 0]
  ------------------
 1119|      0|        NSS_LockPolicy();
 1120|      0|    }
 1121|      0|    if (printPolicyFeedback) {
  ------------------
  |  Branch (1121:9): [True: 0, False: 0]
  ------------------
 1122|       |        /* This helps to distinguish configurations that don't contain any
 1123|       |         * policy config= statement. */
 1124|      0|        PR_SetEnv("NSS_POLICY_LOADED=1");
 1125|      0|        fprintf(stderr, "NSS-POLICY-INFO: LOADED-SUCCESSFULLY\n");
 1126|      0|        secmod_sanityCheckCryptoPolicy();
 1127|      0|    }
 1128|      0|    return rv;
 1129|      0|}
pk11pars.c:secmod_NewModule:
   25|      2|{
   26|      2|    SECMODModule *newMod;
   27|      2|    PLArenaPool *arena;
   28|       |
   29|       |    /* create an arena in which dllName and commonName can be
   30|       |     * allocated.
   31|       |     */
   32|      2|    arena = PORT_NewArena(512);
  ------------------
  |  |   63|      2|#define PORT_NewArena PORT_NewArena_Util
  ------------------
   33|      2|    if (arena == NULL) {
  ------------------
  |  Branch (33:9): [True: 0, False: 2]
  ------------------
   34|      0|        return NULL;
   35|      0|    }
   36|       |
   37|      2|    newMod = (SECMODModule *)PORT_ArenaAlloc(arena, sizeof(SECMODModule));
  ------------------
  |  |   53|      2|#define PORT_ArenaAlloc PORT_ArenaAlloc_Util
  ------------------
   38|      2|    if (newMod == NULL) {
  ------------------
  |  Branch (38:9): [True: 0, False: 2]
  ------------------
   39|      0|        PORT_FreeArena(arena, PR_FALSE);
  ------------------
  |  |   61|      0|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                      PORT_FreeArena(arena, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
   40|      0|        return NULL;
   41|      0|    }
   42|       |
   43|       |    /*
   44|       |     * initialize of the fields of the module
   45|       |     */
   46|      2|    newMod->arena = arena;
   47|      2|    newMod->internal = PR_FALSE;
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
   48|      2|    newMod->loaded = PR_FALSE;
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
   49|      2|    newMod->isFIPS = PR_FALSE;
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
   50|      2|    newMod->dllName = NULL;
   51|      2|    newMod->commonName = NULL;
   52|      2|    newMod->library = NULL;
   53|      2|    newMod->functionList = NULL;
   54|      2|    newMod->slotCount = 0;
   55|      2|    newMod->slots = NULL;
   56|      2|    newMod->slotInfo = NULL;
   57|      2|    newMod->slotInfoCount = 0;
   58|      2|    newMod->refCount = 1;
   59|      2|    newMod->ssl[0] = 0;
   60|      2|    newMod->ssl[1] = 0;
   61|      2|    newMod->libraryParams = NULL;
   62|      2|    newMod->moduleDBFunc = NULL;
   63|      2|    newMod->parent = NULL;
   64|      2|    newMod->isCritical = PR_FALSE;
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
   65|      2|    newMod->isModuleDB = PR_FALSE;
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
   66|      2|    newMod->moduleDBOnly = PR_FALSE;
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
   67|      2|    newMod->trustOrder = 0;
   68|      2|    newMod->cipherOrder = 0;
   69|      2|    newMod->evControlMask = 0;
   70|      2|    newMod->refLock = PZ_NewLock(nssILockRefLock);
  ------------------
  |  |  243|      2|#define PZ_NewLock(t) PR_NewLock()
  ------------------
   71|      2|    if (newMod->refLock == NULL) {
  ------------------
  |  Branch (71:9): [True: 0, False: 2]
  ------------------
   72|      0|        PORT_FreeArena(arena, PR_FALSE);
  ------------------
  |  |   61|      0|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                      PORT_FreeArena(arena, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
   73|      0|        return NULL;
   74|      0|    }
   75|      2|    return newMod;
   76|      2|}

pk11sdr_Init:
  126|      1|{
  127|      1|    pk11sdrLock = PR_NewLock();
  128|      1|}
pk11sdr_Shutdown:
  132|      1|{
  133|      1|    if (pk11sdrLock) {
  ------------------
  |  Branch (133:9): [True: 1, False: 0]
  ------------------
  134|      1|        PR_DestroyLock(pk11sdrLock);
  135|      1|        pk11sdrLock = NULL;
  136|      1|    }
  137|      1|}

PK11_CleanKeyList:
  114|      2|{
  115|      2|    PK11SymKey *symKey = NULL;
  116|       |
  117|     14|    while (slot->freeSymKeysWithSessionHead) {
  ------------------
  |  Branch (117:12): [True: 12, False: 2]
  ------------------
  118|     12|        symKey = slot->freeSymKeysWithSessionHead;
  119|     12|        slot->freeSymKeysWithSessionHead = symKey->next;
  120|     12|        pk11_CloseSession(slot, symKey->session, symKey->sessionOwner);
  121|     12|        PORT_Free(symKey);
  ------------------
  |  |   60|     12|#define PORT_Free PORT_Free_Util
  ------------------
  122|     12|    }
  123|      6|    while (slot->freeSymKeysHead) {
  ------------------
  |  Branch (123:12): [True: 4, False: 2]
  ------------------
  124|      4|        symKey = slot->freeSymKeysHead;
  125|      4|        slot->freeSymKeysHead = symKey->next;
  126|      4|        pk11_CloseSession(slot, symKey->session, symKey->sessionOwner);
  127|      4|        PORT_Free(symKey);
  ------------------
  |  |   60|      4|#define PORT_Free PORT_Free_Util
  ------------------
  128|      4|    }
  129|      2|    return;
  130|      2|}
PK11_FreeSymKey:
  184|   191k|{
  185|   191k|    PK11SlotInfo *slot;
  186|   191k|    PRBool freeit = PR_TRUE;
  ------------------
  |  |  437|   191k|#define PR_TRUE 1
  ------------------
  187|       |
  188|   191k|    if (!symKey) {
  ------------------
  |  Branch (188:9): [True: 95.8k, False: 95.2k]
  ------------------
  189|  95.8k|        return;
  190|  95.8k|    }
  191|       |
  192|  95.2k|    if (PR_ATOMIC_DECREMENT(&symKey->refCount) == 0) {
  ------------------
  |  |  123|  95.2k|#define PR_ATOMIC_DECREMENT(val) __sync_sub_and_fetch(val, 1)
  ------------------
  |  Branch (192:9): [True: 48.2k, False: 47.0k]
  ------------------
  193|  48.2k|        PK11SymKey *parent = symKey->parent;
  194|       |
  195|  48.2k|        symKey->parent = NULL;
  196|  48.2k|        if ((symKey->owner) && symKey->objectID != CK_INVALID_HANDLE) {
  ------------------
  |  |   78|  48.2k|#define CK_INVALID_HANDLE 0
  ------------------
  |  Branch (196:13): [True: 48.2k, False: 0]
  |  Branch (196:32): [True: 46.5k, False: 1.70k]
  ------------------
  197|  46.5k|            pk11_EnterKeyMonitor(symKey);
  198|  46.5k|            (void)PK11_GETTAB(symKey->slot)->C_DestroyObject(symKey->session, symKey->objectID);
  ------------------
  |  |  102|  46.5k|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
  199|  46.5k|            pk11_ExitKeyMonitor(symKey);
  200|  46.5k|        }
  201|  48.2k|        if (symKey->data.data) {
  ------------------
  |  Branch (201:13): [True: 4.46k, False: 43.7k]
  ------------------
  202|  4.46k|            PORT_Memset(symKey->data.data, 0, symKey->data.len);
  ------------------
  |  |  182|  4.46k|#define PORT_Memset memset
  ------------------
  203|  4.46k|            PORT_Free(symKey->data.data);
  ------------------
  |  |   60|  4.46k|#define PORT_Free PORT_Free_Util
  ------------------
  204|  4.46k|        }
  205|       |        /* free any existing data */
  206|  48.2k|        if (symKey->userData && symKey->freeFunc) {
  ------------------
  |  Branch (206:13): [True: 0, False: 48.2k]
  |  Branch (206:33): [True: 0, False: 0]
  ------------------
  207|      0|            (*symKey->freeFunc)(symKey->userData);
  208|      0|        }
  209|  48.2k|        slot = symKey->slot;
  210|  48.2k|        PZ_Lock(slot->freeListLock);
  ------------------
  |  |  245|  48.2k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
  211|  48.2k|        if (slot->keyCount < slot->maxKeyCount) {
  ------------------
  |  Branch (211:13): [True: 48.2k, False: 0]
  ------------------
  212|       |            /*
  213|       |             * freeSymkeysWithSessionHead contain a list of reusable
  214|       |             *  SymKey structures with valid sessions.
  215|       |             *    sessionOwner must be true.
  216|       |             *    session must be valid.
  217|       |             * freeSymKeysHead contain a list of SymKey structures without
  218|       |             *  valid session.
  219|       |             *    session must be CK_INVALID_HANDLE.
  220|       |             *    though sessionOwner is false, callers should not depend on
  221|       |             *    this fact.
  222|       |             */
  223|  48.2k|            if (symKey->sessionOwner) {
  ------------------
  |  Branch (223:17): [True: 42.8k, False: 5.40k]
  ------------------
  224|  42.8k|                PORT_Assert(symKey->session != CK_INVALID_HANDLE);
  ------------------
  |  |  120|  42.8k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  42.8k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 42.8k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  225|  42.8k|                symKey->next = slot->freeSymKeysWithSessionHead;
  226|  42.8k|                slot->freeSymKeysWithSessionHead = symKey;
  227|  42.8k|            } else {
  228|  5.40k|                symKey->session = CK_INVALID_HANDLE;
  ------------------
  |  |   78|  5.40k|#define CK_INVALID_HANDLE 0
  ------------------
  229|  5.40k|                symKey->next = slot->freeSymKeysHead;
  230|  5.40k|                slot->freeSymKeysHead = symKey;
  231|  5.40k|            }
  232|  48.2k|            slot->keyCount++;
  233|  48.2k|            symKey->slot = NULL;
  234|  48.2k|            freeit = PR_FALSE;
  ------------------
  |  |  438|  48.2k|#define PR_FALSE 0
  ------------------
  235|  48.2k|        }
  236|  48.2k|        PZ_Unlock(slot->freeListLock);
  ------------------
  |  |  246|  48.2k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  237|  48.2k|        if (freeit) {
  ------------------
  |  Branch (237:13): [True: 0, False: 48.2k]
  ------------------
  238|      0|            pk11_CloseSession(symKey->slot, symKey->session,
  239|      0|                              symKey->sessionOwner);
  240|      0|            PORT_Free(symKey);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
  241|      0|        }
  242|  48.2k|        PK11_FreeSlot(slot);
  243|       |
  244|  48.2k|        if (parent) {
  ------------------
  |  Branch (244:13): [True: 5.40k, False: 42.8k]
  ------------------
  245|  5.40k|            PK11_FreeSymKey(parent);
  246|  5.40k|        }
  247|  48.2k|    }
  248|  95.2k|}
PK11_ReferenceSymKey:
  252|  47.0k|{
  253|  47.0k|    PR_ATOMIC_INCREMENT(&symKey->refCount);
  ------------------
  |  |  122|  47.0k|#define PR_ATOMIC_INCREMENT(val) __sync_add_and_fetch(val, 1)
  ------------------
  254|  47.0k|    return symKey;
  255|  47.0k|}
PK11_GetSlotFromKey:
  271|  3.05k|{
  272|  3.05k|    return PK11_ReferenceSlot(symKey->slot);
  273|  3.05k|}
PK11_SymKeyFromHandle:
  324|  8.26k|{
  325|  8.26k|    PK11SymKey *symKey;
  326|  8.26k|    PRBool needSession = !(owner && parent);
  ------------------
  |  Branch (326:28): [True: 8.26k, False: 0]
  |  Branch (326:37): [True: 5.40k, False: 2.86k]
  ------------------
  327|       |
  328|  8.26k|    if (keyID == CK_INVALID_HANDLE) {
  ------------------
  |  |   78|  8.26k|#define CK_INVALID_HANDLE 0
  ------------------
  |  Branch (328:9): [True: 0, False: 8.26k]
  ------------------
  329|      0|        return NULL;
  330|      0|    }
  331|       |
  332|  8.26k|    symKey = pk11_CreateSymKey(slot, type, owner, needSession, wincx);
  333|  8.26k|    if (symKey == NULL) {
  ------------------
  |  Branch (333:9): [True: 0, False: 8.26k]
  ------------------
  334|      0|        return NULL;
  335|      0|    }
  336|       |
  337|  8.26k|    symKey->objectID = keyID;
  338|  8.26k|    symKey->origin = origin;
  339|       |
  340|       |    /* adopt the parent's session */
  341|       |    /* This is only used by SSL. What we really want here is a session
  342|       |     * structure with a ref count so  the session goes away only after all the
  343|       |     * keys do. */
  344|  8.26k|    if (!needSession) {
  ------------------
  |  Branch (344:9): [True: 5.40k, False: 2.86k]
  ------------------
  345|  5.40k|        symKey->sessionOwner = PR_FALSE;
  ------------------
  |  |  438|  5.40k|#define PR_FALSE 0
  ------------------
  346|  5.40k|        symKey->session = parent->session;
  347|  5.40k|        symKey->parent = PK11_ReferenceSymKey(parent);
  348|       |        /* This is the only case where pk11_CreateSymKey does not explicitly
  349|       |         * check symKey->session. We need to assert here to make sure.
  350|       |         * the session isn't invalid. */
  351|  5.40k|        PORT_Assert(parent->session != CK_INVALID_HANDLE);
  ------------------
  |  |  120|  5.40k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  5.40k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 5.40k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  352|  5.40k|        if (parent->session == CK_INVALID_HANDLE) {
  ------------------
  |  |   78|  5.40k|#define CK_INVALID_HANDLE 0
  ------------------
  |  Branch (352:13): [True: 0, False: 5.40k]
  ------------------
  353|      0|            PK11_FreeSymKey(symKey);
  354|      0|            PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  355|      0|            return NULL;
  356|      0|        }
  357|  5.40k|    }
  358|       |
  359|  8.26k|    return symKey;
  360|  8.26k|}
PK11_ImportDataKey:
  517|  2.86k|{
  518|  2.86k|    CK_OBJECT_CLASS ckoData = CKO_DATA;
  ------------------
  |  |  325|  2.86k|#define CKO_DATA 0x00000000UL
  ------------------
  519|  2.86k|    CK_ATTRIBUTE template[2] = { { CKA_CLASS, (CK_BYTE_PTR)&ckoData, sizeof(ckoData) },
  ------------------
  |  |  511|  2.86k|#define CKA_CLASS 0x00000000UL
  ------------------
  520|  2.86k|                                 { CKA_VALUE, (CK_BYTE_PTR)key->data, key->len } };
  ------------------
  |  |  516|  2.86k|#define CKA_VALUE 0x00000011UL
  ------------------
  521|  2.86k|    CK_OBJECT_HANDLE handle;
  522|  2.86k|    PK11GenericObject *genObject;
  523|       |
  524|  2.86k|    genObject = PK11_CreateGenericObject(slot, template, PR_ARRAY_SIZE(template), PR_FALSE);
  ------------------
  |  |  167|  2.86k|#define PR_ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
  ------------------
                  genObject = PK11_CreateGenericObject(slot, template, PR_ARRAY_SIZE(template), PR_FALSE);
  ------------------
  |  |  438|  2.86k|#define PR_FALSE 0
  ------------------
  525|  2.86k|    if (genObject == NULL) {
  ------------------
  |  Branch (525:9): [True: 0, False: 2.86k]
  ------------------
  526|      0|        return NULL;
  527|      0|    }
  528|  2.86k|    handle = PK11_GetObjectHandle(PK11_TypeGeneric, genObject, NULL);
  529|       |    /* A note about ownership of the PKCS #11 handle:
  530|       |     * PK11_CreateGenericObject() will not destroy the object it creates
  531|       |     * on Free, For that you want PK11_CreateManagedGenericObject().
  532|       |     * Below we import the handle into the symKey structure. We pass
  533|       |     * PR_TRUE as the owner so that the symKey will destroy the object
  534|       |     * once it's freed. This is why it's safe to destroy genObject now. */
  535|  2.86k|    PK11_DestroyGenericObject(genObject);
  536|  2.86k|    if (handle == CK_INVALID_HANDLE) {
  ------------------
  |  |   78|  2.86k|#define CK_INVALID_HANDLE 0
  ------------------
  |  Branch (536:9): [True: 0, False: 2.86k]
  ------------------
  537|      0|        return NULL;
  538|      0|    }
  539|  2.86k|    return PK11_SymKeyFromHandle(slot, NULL, origin, type, handle, PR_TRUE, wincx);
  ------------------
  |  |  437|  2.86k|#define PR_TRUE 1
  ------------------
  540|  2.86k|}
PK11_ImportSymKeyWithFlags:
  547|  1.42k|{
  548|  1.42k|    PK11SymKey *symKey;
  549|  1.42k|    unsigned int templateCount = 0;
  550|  1.42k|    CK_OBJECT_CLASS keyClass = CKO_SECRET_KEY;
  ------------------
  |  |  329|  1.42k|#define CKO_SECRET_KEY 0x00000004UL
  ------------------
  551|  1.42k|    CK_KEY_TYPE keyType = CKK_GENERIC_SECRET;
  ------------------
  |  |  383|  1.42k|#define CKK_GENERIC_SECRET 0x00000010UL
  ------------------
  552|  1.42k|    CK_BBOOL cktrue = CK_TRUE; /* sigh */
  ------------------
  |  |   22|  1.42k|#define CK_TRUE 1
  ------------------
  553|  1.42k|    CK_ATTRIBUTE keyTemplate[MAX_TEMPL_ATTRS];
  554|  1.42k|    CK_ATTRIBUTE *attrs = keyTemplate;
  555|       |
  556|       |    /* CKA_NSS_MESSAGE is a fake operation to distinguish between
  557|       |     * Normal Encrypt/Decrypt and MessageEncrypt/Decrypt. Don't try to set
  558|       |     * it as a real attribute */
  559|  1.42k|    if ((operation & CKA_NSS_MESSAGE_MASK) == CKA_NSS_MESSAGE) {
  ------------------
  |  |   70|  1.42k|#define CKA_NSS_MESSAGE_MASK 0xff000000L
  ------------------
                  if ((operation & CKA_NSS_MESSAGE_MASK) == CKA_NSS_MESSAGE) {
  ------------------
  |  |   69|  1.42k|#define CKA_NSS_MESSAGE 0x82000000L
  ------------------
  |  Branch (559:9): [True: 0, False: 1.42k]
  ------------------
  560|       |        /* Message is or'd with a real Attribute (CKA_ENCRYPT, CKA_DECRYPT),
  561|       |         * etc. Strip out the real attribute here */
  562|      0|        operation &= ~CKA_NSS_MESSAGE_MASK;
  ------------------
  |  |   70|      0|#define CKA_NSS_MESSAGE_MASK 0xff000000L
  ------------------
  563|      0|    }
  564|       |
  565|  1.42k|    PK11_SETATTRS(attrs, CKA_CLASS, &keyClass, sizeof(keyClass));
  ------------------
  |  |  104|  1.42k|    (x)->type = (id);              \
  |  |  105|  1.42k|    (x)->pValue = (v);             \
  |  |  106|  1.42k|    (x)->ulValueLen = (l);
  ------------------
  566|  1.42k|    attrs++;
  567|  1.42k|    PK11_SETATTRS(attrs, CKA_KEY_TYPE, &keyType, sizeof(keyType));
  ------------------
  |  |  104|  1.42k|    (x)->type = (id);              \
  |  |  105|  1.42k|    (x)->pValue = (v);             \
  |  |  106|  1.42k|    (x)->ulValueLen = (l);
  ------------------
  568|  1.42k|    attrs++;
  569|  1.42k|    if (isPerm) {
  ------------------
  |  Branch (569:9): [True: 0, False: 1.42k]
  ------------------
  570|      0|        PK11_SETATTRS(attrs, CKA_TOKEN, &cktrue, sizeof(cktrue));
  ------------------
  |  |  104|      0|    (x)->type = (id);              \
  |  |  105|      0|    (x)->pValue = (v);             \
  |  |  106|      0|    (x)->ulValueLen = (l);
  ------------------
  571|      0|        attrs++;
  572|       |        /* sigh some tokens think CKA_PRIVATE = false is a reasonable
  573|       |         * default for secret keys */
  574|      0|        PK11_SETATTRS(attrs, CKA_PRIVATE, &cktrue, sizeof(cktrue));
  ------------------
  |  |  104|      0|    (x)->type = (id);              \
  |  |  105|      0|    (x)->pValue = (v);             \
  |  |  106|      0|    (x)->ulValueLen = (l);
  ------------------
  575|      0|        attrs++;
  576|      0|    }
  577|  1.42k|    attrs += pk11_OpFlagsToAttributes(flags, attrs, &cktrue);
  578|  1.42k|    if ((operation != CKA_FLAGS_ONLY) &&
  ------------------
  |  |   71|  1.42k|#define CKA_FLAGS_ONLY 0 /* CKA_CLASS */
  ------------------
  |  Branch (578:9): [True: 1.42k, False: 0]
  ------------------
  579|  1.42k|        !pk11_FindAttrInTemplate(keyTemplate, attrs - keyTemplate, operation)) {
  ------------------
  |  Branch (579:9): [True: 1.42k, False: 0]
  ------------------
  580|  1.42k|        PK11_SETATTRS(attrs, operation, &cktrue, sizeof(cktrue));
  ------------------
  |  |  104|  1.42k|    (x)->type = (id);              \
  |  |  105|  1.42k|    (x)->pValue = (v);             \
  |  |  106|  1.42k|    (x)->ulValueLen = (l);
  ------------------
  581|  1.42k|        attrs++;
  582|  1.42k|    }
  583|  1.42k|    templateCount = attrs - keyTemplate;
  584|  1.42k|    PR_ASSERT(templateCount + 1 <= sizeof(keyTemplate) / sizeof(CK_ATTRIBUTE));
  ------------------
  |  |  208|  1.42k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 1.42k, False: 0]
  |  |  ------------------
  ------------------
  585|       |
  586|  1.42k|    keyType = PK11_GetKeyType(type, key->len);
  587|  1.42k|    symKey = pk11_ImportSymKeyWithTempl(slot, type, origin, isPerm,
  588|  1.42k|                                        keyTemplate, templateCount, key, wincx);
  589|  1.42k|    if (symKey && isPerm) {
  ------------------
  |  Branch (589:9): [True: 1.42k, False: 0]
  |  Branch (589:19): [True: 0, False: 1.42k]
  ------------------
  590|      0|        symKey->owner = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  591|      0|    }
  592|  1.42k|    return symKey;
  593|  1.42k|}
PK11_ExtractKeyValue:
  692|  3.03k|{
  693|  3.03k|    SECStatus rv;
  694|       |
  695|  3.03k|    if (symKey == NULL) {
  ------------------
  |  Branch (695:9): [True: 0, False: 3.03k]
  ------------------
  696|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  697|      0|        return SECFailure;
  698|      0|    }
  699|       |
  700|  3.03k|    if (symKey->data.data != NULL) {
  ------------------
  |  Branch (700:9): [True: 0, False: 3.03k]
  ------------------
  701|      0|        if (symKey->size == 0) {
  ------------------
  |  Branch (701:13): [True: 0, False: 0]
  ------------------
  702|      0|            symKey->size = symKey->data.len;
  703|      0|        }
  704|      0|        return SECSuccess;
  705|      0|    }
  706|       |
  707|  3.03k|    if (symKey->slot == NULL) {
  ------------------
  |  Branch (707:9): [True: 0, False: 3.03k]
  ------------------
  708|      0|        PORT_SetError(SEC_ERROR_INVALID_KEY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  709|      0|        return SECFailure;
  710|      0|    }
  711|       |
  712|  3.03k|    rv = PK11_ReadAttribute(symKey->slot, symKey->objectID, CKA_VALUE, NULL,
  ------------------
  |  |  516|  3.03k|#define CKA_VALUE 0x00000011UL
  ------------------
  713|  3.03k|                            &symKey->data);
  714|  3.03k|    if (rv == SECSuccess) {
  ------------------
  |  Branch (714:9): [True: 3.03k, False: 0]
  ------------------
  715|  3.03k|        symKey->size = symKey->data.len;
  716|  3.03k|    }
  717|  3.03k|    return rv;
  718|  3.03k|}
PK11_GetKeyData:
  733|  1.60k|{
  734|  1.60k|    return &symKey->data;
  735|  1.60k|}
pk11_GetPredefinedKeyLength:
  749|    929|{
  750|    929|    int length = 0;
  751|    929|    switch (keyType) {
  752|      0|        case CKK_DES:
  ------------------
  |  |  386|      0|#define CKK_DES 0x00000013UL
  ------------------
  |  Branch (752:9): [True: 0, False: 929]
  ------------------
  753|      0|            length = 8;
  754|      0|            break;
  755|      0|        case CKK_DES2:
  ------------------
  |  |  387|      0|#define CKK_DES2 0x00000014UL
  ------------------
  |  Branch (755:9): [True: 0, False: 929]
  ------------------
  756|      0|            length = 16;
  757|      0|            break;
  758|      0|        case CKK_DES3:
  ------------------
  |  |  388|      0|#define CKK_DES3 0x00000015UL
  ------------------
  |  Branch (758:9): [True: 0, False: 929]
  ------------------
  759|      0|            length = 24;
  760|      0|            break;
  761|      0|        case CKK_SKIPJACK:
  ------------------
  |  |  398|      0|#define CKK_SKIPJACK 0x0000001BUL
  ------------------
  |  Branch (761:9): [True: 0, False: 929]
  ------------------
  762|      0|            length = 10;
  763|      0|            break;
  764|      0|        case CKK_BATON:
  ------------------
  |  |  399|      0|#define CKK_BATON 0x0000001CUL
  ------------------
  |  Branch (764:9): [True: 0, False: 929]
  ------------------
  765|      0|            length = 20;
  766|      0|            break;
  767|      0|        case CKK_JUNIPER:
  ------------------
  |  |  400|      0|#define CKK_JUNIPER 0x0000001DUL
  ------------------
  |  Branch (767:9): [True: 0, False: 929]
  ------------------
  768|      0|            length = 20;
  769|      0|            break;
  770|    929|        default:
  ------------------
  |  Branch (770:9): [True: 929, False: 0]
  ------------------
  771|    929|            break;
  772|    929|    }
  773|    929|    return length;
  774|    929|}
pk11_CopyToSlotPerm:
  903|  1.42k|{
  904|  1.42k|    SECStatus rv;
  905|  1.42k|    PK11SymKey *newKey = NULL;
  906|       |
  907|       |    /* Extract the raw key data if possible */
  908|  1.42k|    if (symKey->data.data == NULL) {
  ------------------
  |  Branch (908:9): [True: 1.42k, False: 0]
  ------------------
  909|  1.42k|        rv = PK11_ExtractKeyValue(symKey);
  910|       |        /* KEY is sensitive, we're try key exchanging it. */
  911|  1.42k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (911:13): [True: 0, False: 1.42k]
  ------------------
  912|      0|            return pk11_KeyExchange(slot, type, operation,
  913|      0|                                    flags, isPerm, symKey);
  914|      0|        }
  915|  1.42k|    }
  916|       |
  917|  1.42k|    newKey = PK11_ImportSymKeyWithFlags(slot, type, symKey->origin,
  918|  1.42k|                                        operation, &symKey->data, flags, isPerm, symKey->cx);
  919|  1.42k|    if (newKey == NULL) {
  ------------------
  |  Branch (919:9): [True: 0, False: 1.42k]
  ------------------
  920|      0|        newKey = pk11_KeyExchange(slot, type, operation, flags, isPerm, symKey);
  921|      0|    }
  922|  1.42k|    return newKey;
  923|  1.42k|}
pk11_CopyToSlot:
  928|  1.42k|{
  929|  1.42k|    return pk11_CopyToSlotPerm(slot, type, operation, 0, PR_FALSE, symKey);
  ------------------
  |  |  438|  1.42k|#define PR_FALSE 0
  ------------------
  930|  1.42k|}
pk11_ForceSlotMultiple:
  939|  14.2k|{
  940|  14.2k|    PK11SlotInfo *slot = symKey->slot;
  941|  14.2k|    PK11SymKey *newKey = NULL;
  942|  14.2k|    PRBool needToCopy = PR_FALSE;
  ------------------
  |  |  438|  14.2k|#define PR_FALSE 0
  ------------------
  943|  14.2k|    int i;
  944|       |
  945|  14.2k|    if (slot == NULL) {
  ------------------
  |  Branch (945:9): [True: 0, False: 14.2k]
  ------------------
  946|      0|        needToCopy = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  947|  14.2k|    } else {
  948|  14.2k|        i = 0;
  949|  28.4k|        while ((i < mechCount) && (needToCopy == PR_FALSE)) {
  ------------------
  |  |  438|  14.2k|#define PR_FALSE 0
  ------------------
  |  Branch (949:16): [True: 14.2k, False: 14.2k]
  |  Branch (949:35): [True: 14.2k, False: 0]
  ------------------
  950|  14.2k|            if (!PK11_DoesMechanism(slot, type[i])) {
  ------------------
  |  Branch (950:17): [True: 47, False: 14.1k]
  ------------------
  951|     47|                needToCopy = PR_TRUE;
  ------------------
  |  |  437|     47|#define PR_TRUE 1
  ------------------
  952|     47|            }
  953|  14.2k|            i++;
  954|  14.2k|        }
  955|  14.2k|    }
  956|       |
  957|  14.2k|    if (needToCopy == PR_TRUE) {
  ------------------
  |  |  437|  14.2k|#define PR_TRUE 1
  ------------------
  |  Branch (957:9): [True: 47, False: 14.1k]
  ------------------
  958|     47|        slot = PK11_GetBestSlotMultiple(type, mechCount, symKey->cx);
  959|     47|        if (slot == NULL) {
  ------------------
  |  Branch (959:13): [True: 47, False: 0]
  ------------------
  960|     47|            PORT_SetError(SEC_ERROR_NO_MODULE);
  ------------------
  |  |   65|     47|#define PORT_SetError PORT_SetError_Util
  ------------------
  961|     47|            return NULL;
  962|     47|        }
  963|      0|        newKey = pk11_CopyToSlot(slot, type[0], operation, symKey);
  964|      0|        PK11_FreeSlot(slot);
  965|      0|    }
  966|  14.1k|    return newKey;
  967|  14.2k|}
pk11_ForceSlot:
  975|  14.2k|{
  976|  14.2k|    return pk11_ForceSlotMultiple(symKey, &type, 1, operation);
  977|  14.2k|}
pk11_TokenKeyGenWithFlagsAndKeyType:
 1020|  6.05k|{
 1021|  6.05k|    PK11SymKey *symKey;
 1022|  6.05k|    CK_ATTRIBUTE genTemplate[MAX_TEMPL_ATTRS];
 1023|  6.05k|    CK_ATTRIBUTE *attrs = genTemplate;
 1024|  6.05k|    int count = sizeof(genTemplate) / sizeof(genTemplate[0]);
 1025|  6.05k|    CK_MECHANISM_TYPE keyGenType;
 1026|  6.05k|    CK_BBOOL cktrue = CK_TRUE;
  ------------------
  |  |   22|  6.05k|#define CK_TRUE 1
  ------------------
 1027|  6.05k|    CK_BBOOL ckfalse = CK_FALSE;
  ------------------
  |  |   23|  6.05k|#define CK_FALSE 0
  ------------------
 1028|  6.05k|    CK_ULONG ck_key_size; /* only used for variable-length keys */
 1029|       |
 1030|  6.05k|    if (pk11_BadAttrFlags(attrFlags)) {
  ------------------
  |  Branch (1030:9): [True: 0, False: 6.05k]
  ------------------
 1031|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1032|      0|        return NULL;
 1033|      0|    }
 1034|       |
 1035|  6.05k|    if ((keySize != 0) && (type != CKM_DES3_CBC) &&
  ------------------
  |  |  826|  4.73k|#define CKM_DES3_CBC 0x00000133UL
  ------------------
  |  Branch (1035:9): [True: 4.73k, False: 1.31k]
  |  Branch (1035:27): [True: 4.73k, False: 0]
  ------------------
 1036|  6.05k|        (type != CKM_DES3_CBC_PAD) && (type != CKM_DES3_ECB)) {
  ------------------
  |  |  833|  4.73k|#define CKM_DES3_CBC_PAD 0x00000136UL
  ------------------
                      (type != CKM_DES3_CBC_PAD) && (type != CKM_DES3_ECB)) {
  ------------------
  |  |  825|  4.73k|#define CKM_DES3_ECB 0x00000132UL
  ------------------
  |  Branch (1036:9): [True: 4.73k, False: 0]
  |  Branch (1036:39): [True: 4.73k, False: 0]
  ------------------
 1037|  4.73k|        ck_key_size = keySize; /* Convert to PK11 type */
 1038|       |
 1039|  4.73k|        PK11_SETATTRS(attrs, CKA_VALUE_LEN, &ck_key_size, sizeof(ck_key_size));
  ------------------
  |  |  104|  4.73k|    (x)->type = (id);              \
  |  |  105|  4.73k|    (x)->pValue = (v);             \
  |  |  106|  4.73k|    (x)->ulValueLen = (l);
  ------------------
 1040|  4.73k|        attrs++;
 1041|  4.73k|    }
 1042|       |
 1043|  6.05k|    if (keyType != -1) {
  ------------------
  |  Branch (1043:9): [True: 0, False: 6.05k]
  ------------------
 1044|      0|        PK11_SETATTRS(attrs, CKA_KEY_TYPE, &keyType, sizeof(CK_KEY_TYPE));
  ------------------
  |  |  104|      0|    (x)->type = (id);              \
  |  |  105|      0|    (x)->pValue = (v);             \
  |  |  106|      0|    (x)->ulValueLen = (l);
  ------------------
 1045|      0|        attrs++;
 1046|      0|    }
 1047|       |
 1048|       |    /* Include key id value if provided */
 1049|  6.05k|    if (keyid) {
  ------------------
  |  Branch (1049:9): [True: 0, False: 6.05k]
  ------------------
 1050|      0|        PK11_SETATTRS(attrs, CKA_ID, keyid->data, keyid->len);
  ------------------
  |  |  104|      0|    (x)->type = (id);              \
  |  |  105|      0|    (x)->pValue = (v);             \
  |  |  106|      0|    (x)->ulValueLen = (l);
  ------------------
 1051|      0|        attrs++;
 1052|      0|    }
 1053|       |
 1054|  6.05k|    attrs += pk11_AttrFlagsToAttributes(attrFlags, attrs, &cktrue, &ckfalse);
 1055|  6.05k|    attrs += pk11_OpFlagsToAttributes(opFlags, attrs, &cktrue);
 1056|       |
 1057|  6.05k|    count = attrs - genTemplate;
 1058|  6.05k|    PR_ASSERT(count <= sizeof(genTemplate) / sizeof(CK_ATTRIBUTE));
  ------------------
  |  |  208|  6.05k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 6.05k, False: 0]
  |  |  ------------------
  ------------------
 1059|       |
 1060|  6.05k|    keyGenType = PK11_GetKeyGenWithSize(type, keySize);
 1061|  6.05k|    if (keyGenType == CKM_FAKE_RANDOM) {
  ------------------
  |  |  154|  6.05k|#define CKM_FAKE_RANDOM 0x80000efeUL
  ------------------
  |  Branch (1061:9): [True: 0, False: 6.05k]
  ------------------
 1062|      0|        PORT_SetError(SEC_ERROR_NO_MODULE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1063|      0|        return NULL;
 1064|      0|    }
 1065|  6.05k|    symKey = PK11_KeyGenWithTemplate(slot, type, keyGenType,
 1066|  6.05k|                                     param, genTemplate, count, wincx);
 1067|  6.05k|    if (symKey != NULL) {
  ------------------
  |  Branch (1067:9): [True: 6.05k, False: 0]
  ------------------
 1068|  6.05k|        symKey->size = keySize;
 1069|  6.05k|    }
 1070|  6.05k|    return symKey;
 1071|  6.05k|}
PK11_TokenKeyGen:
 1108|  6.05k|{
 1109|  6.05k|    PK11SymKey *symKey;
 1110|  6.05k|    PRBool weird = PR_FALSE; /* hack for fortezza */
  ------------------
  |  |  438|  6.05k|#define PR_FALSE 0
  ------------------
 1111|  6.05k|    CK_FLAGS opFlags = CKF_SIGN;
  ------------------
  |  | 1356|  6.05k|#define CKF_SIGN 0x00000800UL
  ------------------
 1112|  6.05k|    PK11AttrFlags attrFlags = 0;
 1113|       |
 1114|  6.05k|    if ((keySize == -1) && (type == CKM_SKIPJACK_CBC64)) {
  ------------------
  |  | 1049|      0|#define CKM_SKIPJACK_CBC64 0x00001002UL
  ------------------
  |  Branch (1114:9): [True: 0, False: 6.05k]
  |  Branch (1114:28): [True: 0, False: 0]
  ------------------
 1115|      0|        weird = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 1116|      0|        keySize = 0;
 1117|      0|    }
 1118|       |
 1119|  6.05k|    opFlags |= weird ? CKF_DECRYPT : CKF_ENCRYPT;
  ------------------
  |  | 1354|      0|#define CKF_DECRYPT 0x00000200UL
  ------------------
                  opFlags |= weird ? CKF_DECRYPT : CKF_ENCRYPT;
  ------------------
  |  | 1353|  12.1k|#define CKF_ENCRYPT 0x00000100UL
  ------------------
  |  Branch (1119:16): [True: 0, False: 6.05k]
  ------------------
 1120|       |
 1121|  6.05k|    if (isToken) {
  ------------------
  |  Branch (1121:9): [True: 0, False: 6.05k]
  ------------------
 1122|      0|        attrFlags |= (PK11_ATTR_TOKEN | PK11_ATTR_PRIVATE);
  ------------------
  |  |  194|      0|#define PK11_ATTR_TOKEN 0x00000001L
  ------------------
                      attrFlags |= (PK11_ATTR_TOKEN | PK11_ATTR_PRIVATE);
  ------------------
  |  |  216|      0|#define PK11_ATTR_PRIVATE 0x00000004L
  ------------------
 1123|      0|    }
 1124|       |
 1125|  6.05k|    symKey = pk11_TokenKeyGenWithFlagsAndKeyType(slot, type, param,
 1126|  6.05k|                                                 -1, keySize, keyid, opFlags, attrFlags, wincx);
 1127|  6.05k|    if (symKey && weird) {
  ------------------
  |  Branch (1127:9): [True: 6.05k, False: 0]
  |  Branch (1127:19): [True: 0, False: 6.05k]
  ------------------
 1128|      0|        PK11_SetFortezzaHack(symKey);
 1129|      0|    }
 1130|       |
 1131|  6.05k|    return symKey;
 1132|  6.05k|}
PK11_KeyGen:
 1137|  6.05k|{
 1138|  6.05k|    return PK11_TokenKeyGen(slot, type, param, keySize, 0, PR_FALSE, wincx);
  ------------------
  |  |  438|  6.05k|#define PR_FALSE 0
  ------------------
 1139|  6.05k|}
PK11_KeyGenWithTemplate:
 1146|  6.05k|{
 1147|  6.05k|    PK11SymKey *symKey;
 1148|  6.05k|    CK_SESSION_HANDLE session;
 1149|  6.05k|    CK_MECHANISM mechanism;
 1150|  6.05k|    CK_RV crv;
 1151|  6.05k|    PRBool isToken = CK_FALSE;
  ------------------
  |  |   23|  6.05k|#define CK_FALSE 0
  ------------------
 1152|  6.05k|    CK_ULONG keySize = 0;
 1153|  6.05k|    unsigned i;
 1154|       |
 1155|       |    /* Extract the template's CKA_VALUE_LEN into keySize and CKA_TOKEN into
 1156|       |       isToken. */
 1157|  22.8k|    for (i = 0; i < attrsCount; ++i) {
  ------------------
  |  Branch (1157:17): [True: 16.8k, False: 6.05k]
  ------------------
 1158|  16.8k|        switch (attrs[i].type) {
  ------------------
  |  Branch (1158:17): [True: 12.1k, False: 4.73k]
  ------------------
 1159|  4.73k|            case CKA_VALUE_LEN:
  ------------------
  |  |  580|  4.73k|#define CKA_VALUE_LEN 0x00000161UL
  ------------------
  |  Branch (1159:13): [True: 4.73k, False: 12.1k]
  ------------------
 1160|  4.73k|                if (attrs[i].pValue == NULL ||
  ------------------
  |  Branch (1160:21): [True: 0, False: 4.73k]
  ------------------
 1161|  4.73k|                    attrs[i].ulValueLen != sizeof(CK_ULONG)) {
  ------------------
  |  Branch (1161:21): [True: 0, False: 4.73k]
  ------------------
 1162|      0|                    PORT_SetError(PK11_MapError(CKR_TEMPLATE_INCONSISTENT));
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
                                  PORT_SetError(PK11_MapError(CKR_TEMPLATE_INCONSISTENT));
  ------------------
  |  | 1478|      0|#define CKR_TEMPLATE_INCONSISTENT 0x000000D1UL
  ------------------
 1163|      0|                    return NULL;
 1164|      0|                }
 1165|  4.73k|                keySize = *(CK_ULONG *)attrs[i].pValue;
 1166|  4.73k|                break;
 1167|      0|            case CKA_TOKEN:
  ------------------
  |  |  512|      0|#define CKA_TOKEN 0x00000001UL
  ------------------
  |  Branch (1167:13): [True: 0, False: 16.8k]
  ------------------
 1168|      0|                if (attrs[i].pValue == NULL ||
  ------------------
  |  Branch (1168:21): [True: 0, False: 0]
  ------------------
 1169|      0|                    attrs[i].ulValueLen != sizeof(CK_BBOOL)) {
  ------------------
  |  Branch (1169:21): [True: 0, False: 0]
  ------------------
 1170|      0|                    PORT_SetError(PK11_MapError(CKR_TEMPLATE_INCONSISTENT));
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
                                  PORT_SetError(PK11_MapError(CKR_TEMPLATE_INCONSISTENT));
  ------------------
  |  | 1478|      0|#define CKR_TEMPLATE_INCONSISTENT 0x000000D1UL
  ------------------
 1171|      0|                    return NULL;
 1172|      0|                }
 1173|      0|                isToken = (*(CK_BBOOL *)attrs[i].pValue) ? PR_TRUE : PR_FALSE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
                              isToken = (*(CK_BBOOL *)attrs[i].pValue) ? PR_TRUE : PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  |  Branch (1173:27): [True: 0, False: 0]
  ------------------
 1174|      0|                break;
 1175|  16.8k|        }
 1176|  16.8k|    }
 1177|       |
 1178|       |    /* find a slot to generate the key into */
 1179|       |    /* Only do slot management if this is not a token key */
 1180|  6.05k|    if (!isToken && (slot == NULL || !PK11_DoesMechanism(slot, type))) {
  ------------------
  |  Branch (1180:9): [True: 6.05k, False: 0]
  |  Branch (1180:22): [True: 0, False: 6.05k]
  |  Branch (1180:38): [True: 0, False: 6.05k]
  ------------------
 1181|      0|        PK11SlotInfo *bestSlot = PK11_GetBestSlot(type, wincx);
 1182|      0|        if (bestSlot == NULL) {
  ------------------
  |  Branch (1182:13): [True: 0, False: 0]
  ------------------
 1183|      0|            PORT_SetError(SEC_ERROR_NO_MODULE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1184|      0|            return NULL;
 1185|      0|        }
 1186|      0|        symKey = pk11_CreateSymKey(bestSlot, type, !isToken, PR_TRUE, wincx);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 1187|      0|        PK11_FreeSlot(bestSlot);
 1188|  6.05k|    } else {
 1189|  6.05k|        symKey = pk11_CreateSymKey(slot, type, !isToken, PR_TRUE, wincx);
  ------------------
  |  |  437|  6.05k|#define PR_TRUE 1
  ------------------
 1190|  6.05k|    }
 1191|  6.05k|    if (symKey == NULL)
  ------------------
  |  Branch (1191:9): [True: 0, False: 6.05k]
  ------------------
 1192|      0|        return NULL;
 1193|       |
 1194|  6.05k|    symKey->size = keySize;
 1195|  6.05k|    symKey->origin = PK11_OriginGenerated;
 1196|       |
 1197|       |    /* Set the parameters for the key gen if provided */
 1198|  6.05k|    mechanism.mechanism = keyGenType;
 1199|  6.05k|    mechanism.pParameter = NULL;
 1200|  6.05k|    mechanism.ulParameterLen = 0;
 1201|  6.05k|    if (param) {
  ------------------
  |  Branch (1201:9): [True: 1.31k, False: 4.73k]
  ------------------
 1202|  1.31k|        mechanism.pParameter = param->data;
 1203|  1.31k|        mechanism.ulParameterLen = param->len;
 1204|  1.31k|    }
 1205|       |
 1206|       |    /* Get session and perform locking */
 1207|  6.05k|    if (isToken) {
  ------------------
  |  Branch (1207:9): [True: 0, False: 6.05k]
  ------------------
 1208|      0|        PK11_Authenticate(symKey->slot, PR_TRUE, wincx);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 1209|       |        /* Should always be original slot */
 1210|      0|        session = PK11_GetRWSession(symKey->slot);
 1211|      0|        symKey->owner = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 1212|  6.05k|    } else {
 1213|  6.05k|        session = symKey->session;
 1214|  6.05k|        if (session != CK_INVALID_HANDLE)
  ------------------
  |  |   78|  6.05k|#define CK_INVALID_HANDLE 0
  ------------------
  |  Branch (1214:13): [True: 6.05k, False: 0]
  ------------------
 1215|  6.05k|            pk11_EnterKeyMonitor(symKey);
 1216|  6.05k|    }
 1217|  6.05k|    if (session == CK_INVALID_HANDLE) {
  ------------------
  |  |   78|  6.05k|#define CK_INVALID_HANDLE 0
  ------------------
  |  Branch (1217:9): [True: 0, False: 6.05k]
  ------------------
 1218|      0|        PK11_FreeSymKey(symKey);
 1219|      0|        PORT_SetError(SEC_ERROR_BAD_DATA);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1220|      0|        return NULL;
 1221|      0|    }
 1222|       |
 1223|  6.05k|    crv = PK11_GETTAB(symKey->slot)->C_GenerateKey(session, &mechanism, attrs, attrsCount, &symKey->objectID);
  ------------------
  |  |  102|  6.05k|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1224|       |
 1225|       |    /* Release lock and session */
 1226|  6.05k|    if (isToken) {
  ------------------
  |  Branch (1226:9): [True: 0, False: 6.05k]
  ------------------
 1227|      0|        PK11_RestoreROSession(symKey->slot, session);
 1228|  6.05k|    } else {
 1229|  6.05k|        pk11_ExitKeyMonitor(symKey);
 1230|  6.05k|    }
 1231|       |
 1232|  6.05k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  6.05k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1232:9): [True: 0, False: 6.05k]
  ------------------
 1233|      0|        PK11_FreeSymKey(symKey);
 1234|      0|        PORT_SetError(PK11_MapError(crv));
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1235|      0|        return NULL;
 1236|      0|    }
 1237|       |
 1238|  6.05k|    return symKey;
 1239|  6.05k|}
PK11_PubWrapSymKey:
 1286|  1.31k|{
 1287|  1.31k|    CK_MECHANISM_TYPE inferred = pk11_mapWrapKeyType(pubKey->keyType);
 1288|  1.31k|    return PK11_PubWrapSymKeyWithMechanism(pubKey, inferred, NULL, symKey,
 1289|  1.31k|                                           wrappedKey);
 1290|  1.31k|}
PK11_PubWrapSymKeyWithMechanism:
 1298|  1.31k|{
 1299|  1.31k|    PK11SlotInfo *slot;
 1300|  1.31k|    CK_ULONG len = wrappedKey->len;
 1301|  1.31k|    PK11SymKey *newKey = NULL;
 1302|  1.31k|    CK_OBJECT_HANDLE id;
 1303|  1.31k|    CK_MECHANISM mechanism;
 1304|  1.31k|    PRBool owner = PR_TRUE;
  ------------------
  |  |  437|  1.31k|#define PR_TRUE 1
  ------------------
 1305|  1.31k|    CK_SESSION_HANDLE session;
 1306|  1.31k|    CK_RV crv;
 1307|       |
 1308|  1.31k|    if (symKey == NULL) {
  ------------------
  |  Branch (1308:9): [True: 0, False: 1.31k]
  ------------------
 1309|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1310|      0|        return SECFailure;
 1311|      0|    }
 1312|       |
 1313|       |    /* if this slot doesn't support the mechanism, go to a slot that does */
 1314|  1.31k|    newKey = pk11_ForceSlot(symKey, mechType, CKA_ENCRYPT);
  ------------------
  |  |  547|  1.31k|#define CKA_ENCRYPT 0x00000104UL
  ------------------
 1315|  1.31k|    if (newKey != NULL) {
  ------------------
  |  Branch (1315:9): [True: 0, False: 1.31k]
  ------------------
 1316|      0|        symKey = newKey;
 1317|      0|    }
 1318|       |
 1319|  1.31k|    if (symKey->slot == NULL) {
  ------------------
  |  Branch (1319:9): [True: 0, False: 1.31k]
  ------------------
 1320|      0|        PORT_SetError(SEC_ERROR_NO_MODULE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1321|      0|        return SECFailure;
 1322|      0|    }
 1323|       |
 1324|  1.31k|    slot = symKey->slot;
 1325|       |
 1326|  1.31k|    mechanism.mechanism = mechType;
 1327|  1.31k|    if (param == NULL) {
  ------------------
  |  Branch (1327:9): [True: 1.31k, False: 0]
  ------------------
 1328|  1.31k|        mechanism.pParameter = NULL;
 1329|  1.31k|        mechanism.ulParameterLen = 0;
 1330|  1.31k|    } else {
 1331|      0|        mechanism.pParameter = param->data;
 1332|      0|        mechanism.ulParameterLen = param->len;
 1333|      0|    }
 1334|       |
 1335|  1.31k|    id = PK11_ImportPublicKey(slot, pubKey, PR_FALSE);
  ------------------
  |  |  438|  1.31k|#define PR_FALSE 0
  ------------------
 1336|  1.31k|    if (id == CK_INVALID_HANDLE) {
  ------------------
  |  |   78|  1.31k|#define CK_INVALID_HANDLE 0
  ------------------
  |  Branch (1336:9): [True: 39, False: 1.27k]
  ------------------
 1337|     39|        if (newKey) {
  ------------------
  |  Branch (1337:13): [True: 0, False: 39]
  ------------------
 1338|      0|            PK11_FreeSymKey(newKey);
 1339|      0|        }
 1340|     39|        return SECFailure; /* Error code has been set. */
 1341|     39|    }
 1342|       |
 1343|  1.27k|    session = pk11_GetNewSession(slot, &owner);
 1344|  1.27k|    if (!owner || !(slot->isThreadSafe))
  ------------------
  |  Branch (1344:9): [True: 0, False: 1.27k]
  |  Branch (1344:19): [True: 0, False: 1.27k]
  ------------------
 1345|      0|        PK11_EnterSlotMonitor(slot);
 1346|  1.27k|    crv = PK11_GETTAB(slot)->C_WrapKey(session, &mechanism,
  ------------------
  |  |  102|  1.27k|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1347|  1.27k|                                       id, symKey->objectID, wrappedKey->data, &len);
 1348|  1.27k|    if (!owner || !(slot->isThreadSafe))
  ------------------
  |  Branch (1348:9): [True: 0, False: 1.27k]
  |  Branch (1348:19): [True: 0, False: 1.27k]
  ------------------
 1349|      0|        PK11_ExitSlotMonitor(slot);
 1350|  1.27k|    pk11_CloseSession(slot, session, owner);
 1351|  1.27k|    if (newKey) {
  ------------------
  |  Branch (1351:9): [True: 0, False: 1.27k]
  ------------------
 1352|      0|        PK11_FreeSymKey(newKey);
 1353|      0|    }
 1354|       |
 1355|  1.27k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  1.27k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1355:9): [True: 9, False: 1.26k]
  ------------------
 1356|      9|        PORT_SetError(PK11_MapError(crv));
  ------------------
  |  |   65|      9|#define PORT_SetError PORT_SetError_Util
  ------------------
 1357|      9|        return SECFailure;
 1358|      9|    }
 1359|  1.26k|    wrappedKey->len = len;
 1360|  1.26k|    return SECSuccess;
 1361|  1.27k|}
PK11_SymKeysToSameSlot:
 1486|  1.43k|{
 1487|       |    /* usually don't return new keys */
 1488|  1.43k|    *newMovingKey = NULL;
 1489|  1.43k|    *newPreferedKey = NULL;
 1490|  1.43k|    if (movingKey->slot == preferedKey->slot) {
  ------------------
  |  Branch (1490:9): [True: 6, False: 1.42k]
  ------------------
 1491|       |
 1492|       |        /* this should be the most common case */
 1493|      6|        if ((preferedKey->slot != NULL) &&
  ------------------
  |  Branch (1493:13): [True: 6, False: 0]
  ------------------
 1494|      6|            PK11_DoesMechanism(preferedKey->slot, mech)) {
  ------------------
  |  Branch (1494:13): [True: 6, False: 0]
  ------------------
 1495|      6|            return SECSuccess;
 1496|      6|        }
 1497|       |
 1498|       |        /* we are in the same slot, but it doesn't do the operation,
 1499|       |         * move both keys to an appropriate target slot */
 1500|      0|        return pk11_moveTwoKeys(mech, preferedOperation, movingOperation,
 1501|      0|                                preferedKey, movingKey,
 1502|      0|                                newPreferedKey, newMovingKey);
 1503|      6|    }
 1504|       |
 1505|       |    /* keys are in different slot, try moving the moving key to the prefered
 1506|       |     * key's slot */
 1507|  1.42k|    if ((preferedKey->slot != NULL) &&
  ------------------
  |  Branch (1507:9): [True: 1.42k, False: 0]
  ------------------
 1508|  1.42k|        PK11_DoesMechanism(preferedKey->slot, mech)) {
  ------------------
  |  Branch (1508:9): [True: 1.42k, False: 0]
  ------------------
 1509|  1.42k|        *newMovingKey = pk11_CopyToSlot(preferedKey->slot, movingKey->type,
 1510|  1.42k|                                        movingOperation, movingKey);
 1511|  1.42k|        if (*newMovingKey != NULL) {
  ------------------
  |  Branch (1511:13): [True: 1.42k, False: 0]
  ------------------
 1512|  1.42k|            return SECSuccess;
 1513|  1.42k|        }
 1514|  1.42k|    }
 1515|       |    /* couldn't moving the moving key to the prefered slot, try moving
 1516|       |     * the prefered key */
 1517|      0|    if ((movingKey->slot != NULL) &&
  ------------------
  |  Branch (1517:9): [True: 0, False: 0]
  ------------------
 1518|      0|        PK11_DoesMechanism(movingKey->slot, mech)) {
  ------------------
  |  Branch (1518:9): [True: 0, False: 0]
  ------------------
 1519|      0|        *newPreferedKey = pk11_CopyToSlot(movingKey->slot, preferedKey->type,
 1520|      0|                                          preferedOperation, preferedKey);
 1521|      0|        if (*newPreferedKey != NULL) {
  ------------------
  |  Branch (1521:13): [True: 0, False: 0]
  ------------------
 1522|      0|            return SECSuccess;
 1523|      0|        }
 1524|      0|    }
 1525|       |    /* Neither succeeded, but that could be that they were not in slots that
 1526|       |     * supported the operation, try moving both keys into a common slot that
 1527|       |     * can do the operation. */
 1528|      0|    return pk11_moveTwoKeys(mech, preferedOperation, movingOperation,
 1529|      0|                            preferedKey, movingKey,
 1530|      0|                            newPreferedKey, newMovingKey);
 1531|      0|}
PK11_Derive:
 1635|  9.91k|{
 1636|  9.91k|    return PK11_DeriveWithTemplate(baseKey, derive, param, target, operation,
 1637|  9.91k|                                   keySize, NULL, 0, PR_FALSE);
  ------------------
  |  |  438|  9.91k|#define PR_FALSE 0
  ------------------
 1638|  9.91k|}
PK11_DeriveWithFlags:
 1644|  20.6k|{
 1645|  20.6k|    CK_BBOOL ckTrue = CK_TRUE;
  ------------------
  |  |   22|  20.6k|#define CK_TRUE 1
  ------------------
 1646|  20.6k|    CK_ATTRIBUTE keyTemplate[MAX_TEMPL_ATTRS];
 1647|  20.6k|    unsigned int templateCount;
 1648|       |
 1649|  20.6k|    templateCount = pk11_OpFlagsToAttributes(flags, keyTemplate, &ckTrue);
 1650|  20.6k|    return PK11_DeriveWithTemplate(baseKey, derive, param, target, operation,
 1651|  20.6k|                                   keySize, keyTemplate, templateCount, PR_FALSE);
  ------------------
  |  |  438|  20.6k|#define PR_FALSE 0
  ------------------
 1652|  20.6k|}
PK11_DeriveWithTemplate:
 1680|  30.6k|{
 1681|  30.6k|    PK11SlotInfo *slot = baseKey->slot;
 1682|  30.6k|    PK11SymKey *symKey;
 1683|  30.6k|    PK11SymKey *newBaseKey = NULL;
 1684|  30.6k|    CK_BBOOL cktrue = CK_TRUE;
  ------------------
  |  |   22|  30.6k|#define CK_TRUE 1
  ------------------
 1685|  30.6k|    CK_OBJECT_CLASS keyClass = CKO_SECRET_KEY;
  ------------------
  |  |  329|  30.6k|#define CKO_SECRET_KEY 0x00000004UL
  ------------------
 1686|  30.6k|    CK_KEY_TYPE keyType = CKK_GENERIC_SECRET;
  ------------------
  |  |  383|  30.6k|#define CKK_GENERIC_SECRET 0x00000010UL
  ------------------
 1687|  30.6k|    CK_ULONG valueLen = 0;
 1688|  30.6k|    CK_MECHANISM mechanism;
 1689|  30.6k|    CK_RV crv;
 1690|  30.6k|#define MAX_ADD_ATTRS 4
 1691|  30.6k|    CK_ATTRIBUTE keyTemplate[MAX_TEMPL_ATTRS + MAX_ADD_ATTRS];
 1692|  30.6k|#undef MAX_ADD_ATTRS
 1693|  30.6k|    CK_ATTRIBUTE *attrs = keyTemplate;
 1694|  30.6k|    CK_SESSION_HANDLE session;
 1695|  30.6k|    unsigned int templateCount;
 1696|       |
 1697|  30.6k|    if (numAttrs > MAX_TEMPL_ATTRS) {
  ------------------
  |  |  200|  30.6k|#define MAX_TEMPL_ATTRS 16 /* maximum attributes in template */
  ------------------
  |  Branch (1697:9): [True: 0, False: 30.6k]
  ------------------
 1698|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1699|      0|        return NULL;
 1700|      0|    }
 1701|       |    /* CKA_NSS_MESSAGE is a fake operation to distinguish between
 1702|       |     * Normal Encrypt/Decrypt and MessageEncrypt/Decrypt. Don't try to set
 1703|       |     * it as a real attribute */
 1704|  30.6k|    if ((operation & CKA_NSS_MESSAGE_MASK) == CKA_NSS_MESSAGE) {
  ------------------
  |  |   70|  30.6k|#define CKA_NSS_MESSAGE_MASK 0xff000000L
  ------------------
                  if ((operation & CKA_NSS_MESSAGE_MASK) == CKA_NSS_MESSAGE) {
  ------------------
  |  |   69|  30.6k|#define CKA_NSS_MESSAGE 0x82000000L
  ------------------
  |  Branch (1704:9): [True: 0, False: 30.6k]
  ------------------
 1705|       |        /* Message is or'd with a real Attribute (CKA_ENCRYPT, CKA_DECRYPT),
 1706|       |         * etc. Strip out the real attribute here */
 1707|      0|        operation &= ~CKA_NSS_MESSAGE_MASK;
  ------------------
  |  |   70|      0|#define CKA_NSS_MESSAGE_MASK 0xff000000L
  ------------------
 1708|      0|    }
 1709|       |
 1710|       |    /* first copy caller attributes in. */
 1711|  71.9k|    for (templateCount = 0; templateCount < numAttrs; ++templateCount) {
  ------------------
  |  Branch (1711:29): [True: 41.3k, False: 30.6k]
  ------------------
 1712|  41.3k|        *attrs++ = *userAttr++;
 1713|  41.3k|    }
 1714|       |
 1715|       |    /* We only add the following attributes to the template if the caller
 1716|       |    ** didn't already supply them.
 1717|       |    */
 1718|  30.6k|    if (!pk11_FindAttrInTemplate(keyTemplate, numAttrs, CKA_CLASS)) {
  ------------------
  |  |  511|  30.6k|#define CKA_CLASS 0x00000000UL
  ------------------
  |  Branch (1718:9): [True: 30.6k, False: 0]
  ------------------
 1719|  30.6k|        PK11_SETATTRS(attrs, CKA_CLASS, &keyClass, sizeof keyClass);
  ------------------
  |  |  104|  30.6k|    (x)->type = (id);              \
  |  |  105|  30.6k|    (x)->pValue = (v);             \
  |  |  106|  30.6k|    (x)->ulValueLen = (l);
  ------------------
 1720|  30.6k|        attrs++;
 1721|  30.6k|    }
 1722|  30.6k|    if (!pk11_FindAttrInTemplate(keyTemplate, numAttrs, CKA_KEY_TYPE)) {
  ------------------
  |  |  543|  30.6k|#define CKA_KEY_TYPE 0x00000100UL
  ------------------
  |  Branch (1722:9): [True: 30.6k, False: 0]
  ------------------
 1723|  30.6k|        keyType = PK11_GetKeyType(target, keySize);
 1724|  30.6k|        PK11_SETATTRS(attrs, CKA_KEY_TYPE, &keyType, sizeof keyType);
  ------------------
  |  |  104|  30.6k|    (x)->type = (id);              \
  |  |  105|  30.6k|    (x)->pValue = (v);             \
  |  |  106|  30.6k|    (x)->ulValueLen = (l);
  ------------------
 1725|  30.6k|        attrs++;
 1726|  30.6k|    }
 1727|  30.6k|    if (keySize > 0 &&
  ------------------
  |  Branch (1727:9): [True: 20.1k, False: 10.4k]
  ------------------
 1728|  30.6k|        !pk11_FindAttrInTemplate(keyTemplate, numAttrs, CKA_VALUE_LEN)) {
  ------------------
  |  |  580|  20.1k|#define CKA_VALUE_LEN 0x00000161UL
  ------------------
  |  Branch (1728:9): [True: 20.1k, False: 0]
  ------------------
 1729|  20.1k|        valueLen = (CK_ULONG)keySize;
 1730|  20.1k|        PK11_SETATTRS(attrs, CKA_VALUE_LEN, &valueLen, sizeof valueLen);
  ------------------
  |  |  104|  20.1k|    (x)->type = (id);              \
  |  |  105|  20.1k|    (x)->pValue = (v);             \
  |  |  106|  20.1k|    (x)->ulValueLen = (l);
  ------------------
 1731|  20.1k|        attrs++;
 1732|  20.1k|    }
 1733|  30.6k|    if ((operation != CKA_FLAGS_ONLY) &&
  ------------------
  |  |   71|  30.6k|#define CKA_FLAGS_ONLY 0 /* CKA_CLASS */
  ------------------
  |  Branch (1733:9): [True: 30.6k, False: 0]
  ------------------
 1734|  30.6k|        !pk11_FindAttrInTemplate(keyTemplate, numAttrs, operation)) {
  ------------------
  |  Branch (1734:9): [True: 30.6k, False: 0]
  ------------------
 1735|  30.6k|        PK11_SETATTRS(attrs, operation, &cktrue, sizeof cktrue);
  ------------------
  |  |  104|  30.6k|    (x)->type = (id);              \
  |  |  105|  30.6k|    (x)->pValue = (v);             \
  |  |  106|  30.6k|    (x)->ulValueLen = (l);
  ------------------
 1736|  30.6k|        attrs++;
 1737|  30.6k|    }
 1738|       |
 1739|  30.6k|    templateCount = attrs - keyTemplate;
 1740|  30.6k|    PR_ASSERT(templateCount <= sizeof(keyTemplate) / sizeof(CK_ATTRIBUTE));
  ------------------
  |  |  208|  30.6k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 30.6k, False: 0]
  |  |  ------------------
  ------------------
 1741|       |
 1742|       |    /* move the key to a slot that can do the function */
 1743|  30.6k|    if (!PK11_DoesMechanism(slot, derive)) {
  ------------------
  |  Branch (1743:9): [True: 0, False: 30.6k]
  ------------------
 1744|       |        /* get a new base key & slot */
 1745|      0|        PK11SlotInfo *newSlot = PK11_GetBestSlot(derive, baseKey->cx);
 1746|       |
 1747|      0|        if (newSlot == NULL)
  ------------------
  |  Branch (1747:13): [True: 0, False: 0]
  ------------------
 1748|      0|            return NULL;
 1749|       |
 1750|      0|        newBaseKey = pk11_CopyToSlot(newSlot, derive, CKA_DERIVE,
  ------------------
  |  |  555|      0|#define CKA_DERIVE 0x0000010CUL
  ------------------
 1751|      0|                                     baseKey);
 1752|      0|        PK11_FreeSlot(newSlot);
 1753|      0|        if (newBaseKey == NULL)
  ------------------
  |  Branch (1753:13): [True: 0, False: 0]
  ------------------
 1754|      0|            return NULL;
 1755|      0|        baseKey = newBaseKey;
 1756|      0|        slot = baseKey->slot;
 1757|      0|    }
 1758|       |
 1759|       |    /* get our key Structure */
 1760|  30.6k|    symKey = pk11_CreateSymKey(slot, target, !isPerm, PR_TRUE, baseKey->cx);
  ------------------
  |  |  437|  30.6k|#define PR_TRUE 1
  ------------------
 1761|  30.6k|    if (symKey == NULL) {
  ------------------
  |  Branch (1761:9): [True: 0, False: 30.6k]
  ------------------
 1762|      0|        return NULL;
 1763|      0|    }
 1764|       |
 1765|  30.6k|    symKey->size = keySize;
 1766|       |
 1767|  30.6k|    mechanism.mechanism = derive;
 1768|  30.6k|    if (param) {
  ------------------
  |  Branch (1768:9): [True: 30.6k, False: 0]
  ------------------
 1769|  30.6k|        mechanism.pParameter = param->data;
 1770|  30.6k|        mechanism.ulParameterLen = param->len;
 1771|  30.6k|    } else {
 1772|      0|        mechanism.pParameter = NULL;
 1773|      0|        mechanism.ulParameterLen = 0;
 1774|      0|    }
 1775|  30.6k|    symKey->origin = PK11_OriginDerive;
 1776|       |
 1777|  30.6k|    if (isPerm) {
  ------------------
  |  Branch (1777:9): [True: 0, False: 30.6k]
  ------------------
 1778|      0|        session = PK11_GetRWSession(slot);
 1779|  30.6k|    } else {
 1780|  30.6k|        pk11_EnterKeyMonitor(symKey);
 1781|  30.6k|        session = symKey->session;
 1782|  30.6k|    }
 1783|  30.6k|    if (session == CK_INVALID_HANDLE) {
  ------------------
  |  |   78|  30.6k|#define CK_INVALID_HANDLE 0
  ------------------
  |  Branch (1783:9): [True: 0, False: 30.6k]
  ------------------
 1784|      0|        if (!isPerm)
  ------------------
  |  Branch (1784:13): [True: 0, False: 0]
  ------------------
 1785|      0|            pk11_ExitKeyMonitor(symKey);
 1786|      0|        crv = CKR_SESSION_HANDLE_INVALID;
  ------------------
  |  | 1465|      0|#define CKR_SESSION_HANDLE_INVALID 0x000000B3UL
  ------------------
 1787|  30.6k|    } else {
 1788|  30.6k|        crv = PK11_GETTAB(slot)->C_DeriveKey(session, &mechanism,
  ------------------
  |  |  102|  30.6k|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1789|  30.6k|                                             baseKey->objectID, keyTemplate, templateCount, &symKey->objectID);
 1790|  30.6k|        if (isPerm) {
  ------------------
  |  Branch (1790:13): [True: 0, False: 30.6k]
  ------------------
 1791|      0|            PK11_RestoreROSession(slot, session);
 1792|  30.6k|        } else {
 1793|  30.6k|            pk11_ExitKeyMonitor(symKey);
 1794|  30.6k|        }
 1795|  30.6k|    }
 1796|  30.6k|    if (newBaseKey)
  ------------------
  |  Branch (1796:9): [True: 0, False: 30.6k]
  ------------------
 1797|      0|        PK11_FreeSymKey(newBaseKey);
 1798|  30.6k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  30.6k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1798:9): [True: 0, False: 30.6k]
  ------------------
 1799|      0|        PK11_FreeSymKey(symKey);
 1800|      0|        PORT_SetError(PK11_MapError(crv));
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1801|      0|        return NULL;
 1802|      0|    }
 1803|  30.6k|    return symKey;
 1804|  30.6k|}
PK11_PubDerive:
 2107|    940|{
 2108|    940|    PK11SlotInfo *slot = privKey->pkcs11Slot;
 2109|    940|    CK_MECHANISM mechanism;
 2110|    940|    PK11SymKey *symKey;
 2111|    940|    CK_RV crv;
 2112|       |
 2113|       |    /* get our key Structure */
 2114|    940|    symKey = pk11_CreateSymKey(slot, target, PR_TRUE, PR_TRUE, wincx);
  ------------------
  |  |  437|    940|#define PR_TRUE 1
  ------------------
                  symKey = pk11_CreateSymKey(slot, target, PR_TRUE, PR_TRUE, wincx);
  ------------------
  |  |  437|    940|#define PR_TRUE 1
  ------------------
 2115|    940|    if (symKey == NULL) {
  ------------------
  |  Branch (2115:9): [True: 0, False: 940]
  ------------------
 2116|      0|        return NULL;
 2117|      0|    }
 2118|       |
 2119|       |    /* CKA_NSS_MESSAGE is a fake operation to distinguish between
 2120|       |     * Normal Encrypt/Decrypt and MessageEncrypt/Decrypt. Don't try to set
 2121|       |     * it as a real attribute */
 2122|    940|    if ((operation & CKA_NSS_MESSAGE_MASK) == CKA_NSS_MESSAGE) {
  ------------------
  |  |   70|    940|#define CKA_NSS_MESSAGE_MASK 0xff000000L
  ------------------
                  if ((operation & CKA_NSS_MESSAGE_MASK) == CKA_NSS_MESSAGE) {
  ------------------
  |  |   69|    940|#define CKA_NSS_MESSAGE 0x82000000L
  ------------------
  |  Branch (2122:9): [True: 0, False: 940]
  ------------------
 2123|       |        /* Message is or'd with a real Attribute (CKA_ENCRYPT, CKA_DECRYPT),
 2124|       |         * etc. Strip out the real attribute here */
 2125|      0|        operation &= ~CKA_NSS_MESSAGE_MASK;
  ------------------
  |  |   70|      0|#define CKA_NSS_MESSAGE_MASK 0xff000000L
  ------------------
 2126|      0|    }
 2127|       |
 2128|    940|    symKey->origin = PK11_OriginDerive;
 2129|       |
 2130|    940|    switch (privKey->keyType) {
  ------------------
  |  Branch (2130:13): [True: 0, False: 940]
  ------------------
 2131|      0|        case rsaKey:
  ------------------
  |  Branch (2131:9): [True: 0, False: 940]
  ------------------
 2132|      0|        case rsaPssKey:
  ------------------
  |  Branch (2132:9): [True: 0, False: 940]
  ------------------
 2133|      0|        case rsaOaepKey:
  ------------------
  |  Branch (2133:9): [True: 0, False: 940]
  ------------------
 2134|      0|        case kyberKey:
  ------------------
  |  Branch (2134:9): [True: 0, False: 940]
  ------------------
 2135|      0|        case nullKey:
  ------------------
  |  Branch (2135:9): [True: 0, False: 940]
  ------------------
 2136|      0|        case edKey:
  ------------------
  |  Branch (2136:9): [True: 0, False: 940]
  ------------------
 2137|      0|        case ecMontKey:
  ------------------
  |  Branch (2137:9): [True: 0, False: 940]
  ------------------
 2138|      0|            PORT_SetError(SEC_ERROR_BAD_KEY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2139|      0|            break;
 2140|      0|        case dsaKey:
  ------------------
  |  Branch (2140:9): [True: 0, False: 940]
  ------------------
 2141|      0|        case keaKey:
  ------------------
  |  Branch (2141:9): [True: 0, False: 940]
  ------------------
 2142|      0|        case fortezzaKey: {
  ------------------
  |  Branch (2142:9): [True: 0, False: 940]
  ------------------
 2143|      0|            static unsigned char rb_email[128] = { 0 };
 2144|      0|            CK_KEA_DERIVE_PARAMS param;
 2145|      0|            param.isSender = (CK_BBOOL)isSender;
 2146|      0|            param.ulRandomLen = randomA->len;
 2147|      0|            param.pRandomA = randomA->data;
 2148|      0|            param.pRandomB = rb_email;
 2149|      0|            param.pRandomB[127] = 1;
 2150|      0|            if (randomB)
  ------------------
  |  Branch (2150:17): [True: 0, False: 0]
  ------------------
 2151|      0|                param.pRandomB = randomB->data;
 2152|      0|            if (pubKey->keyType == fortezzaKey) {
  ------------------
  |  Branch (2152:17): [True: 0, False: 0]
  ------------------
 2153|      0|                param.ulPublicDataLen = pubKey->u.fortezza.KEAKey.len;
 2154|      0|                param.pPublicData = pubKey->u.fortezza.KEAKey.data;
 2155|      0|            } else {
 2156|       |                /* assert type == keaKey */
 2157|       |                /* XXX change to match key key types */
 2158|      0|                param.ulPublicDataLen = pubKey->u.fortezza.KEAKey.len;
 2159|      0|                param.pPublicData = pubKey->u.fortezza.KEAKey.data;
 2160|      0|            }
 2161|       |
 2162|      0|            mechanism.mechanism = derive;
 2163|      0|            mechanism.pParameter = &param;
 2164|      0|            mechanism.ulParameterLen = sizeof(param);
 2165|       |
 2166|       |            /* get a new symKey structure */
 2167|      0|            pk11_EnterKeyMonitor(symKey);
 2168|      0|            crv = PK11_GETTAB(slot)->C_DeriveKey(symKey->session, &mechanism,
  ------------------
  |  |  102|      0|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 2169|      0|                                                 privKey->pkcs11ID, NULL, 0,
 2170|      0|                                                 &symKey->objectID);
 2171|      0|            pk11_ExitKeyMonitor(symKey);
 2172|      0|            if (crv == CKR_OK)
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (2172:17): [True: 0, False: 0]
  ------------------
 2173|      0|                return symKey;
 2174|      0|            PORT_SetError(PK11_MapError(crv));
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2175|      0|        } break;
 2176|    940|        case dhKey: {
  ------------------
  |  Branch (2176:9): [True: 940, False: 0]
  ------------------
 2177|    940|            CK_BBOOL cktrue = CK_TRUE;
  ------------------
  |  |   22|    940|#define CK_TRUE 1
  ------------------
 2178|    940|            CK_OBJECT_CLASS keyClass = CKO_SECRET_KEY;
  ------------------
  |  |  329|    940|#define CKO_SECRET_KEY 0x00000004UL
  ------------------
 2179|    940|            CK_KEY_TYPE keyType = CKK_GENERIC_SECRET;
  ------------------
  |  |  383|    940|#define CKK_GENERIC_SECRET 0x00000010UL
  ------------------
 2180|    940|            CK_ULONG key_size = 0;
 2181|    940|            CK_ATTRIBUTE keyTemplate[4];
 2182|    940|            int templateCount;
 2183|    940|            CK_ATTRIBUTE *attrs = keyTemplate;
 2184|       |
 2185|    940|            if (pubKey->keyType != dhKey) {
  ------------------
  |  Branch (2185:17): [True: 0, False: 940]
  ------------------
 2186|      0|                PORT_SetError(SEC_ERROR_BAD_KEY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2187|      0|                break;
 2188|      0|            }
 2189|       |
 2190|    940|            PK11_SETATTRS(attrs, CKA_CLASS, &keyClass, sizeof(keyClass));
  ------------------
  |  |  104|    940|    (x)->type = (id);              \
  |  |  105|    940|    (x)->pValue = (v);             \
  |  |  106|    940|    (x)->ulValueLen = (l);
  ------------------
 2191|    940|            attrs++;
 2192|    940|            PK11_SETATTRS(attrs, CKA_KEY_TYPE, &keyType, sizeof(keyType));
  ------------------
  |  |  104|    940|    (x)->type = (id);              \
  |  |  105|    940|    (x)->pValue = (v);             \
  |  |  106|    940|    (x)->ulValueLen = (l);
  ------------------
 2193|    940|            attrs++;
 2194|    940|            PK11_SETATTRS(attrs, operation, &cktrue, 1);
  ------------------
  |  |  104|    940|    (x)->type = (id);              \
  |  |  105|    940|    (x)->pValue = (v);             \
  |  |  106|    940|    (x)->ulValueLen = (l);
  ------------------
 2195|    940|            attrs++;
 2196|    940|            PK11_SETATTRS(attrs, CKA_VALUE_LEN, &key_size, sizeof(key_size));
  ------------------
  |  |  104|    940|    (x)->type = (id);              \
  |  |  105|    940|    (x)->pValue = (v);             \
  |  |  106|    940|    (x)->ulValueLen = (l);
  ------------------
 2197|    940|            attrs++;
 2198|    940|            templateCount = attrs - keyTemplate;
 2199|    940|            PR_ASSERT(templateCount <= sizeof(keyTemplate) / sizeof(CK_ATTRIBUTE));
  ------------------
  |  |  208|    940|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 940, False: 0]
  |  |  ------------------
  ------------------
 2200|       |
 2201|    940|            keyType = PK11_GetKeyType(target, keySize);
 2202|    940|            key_size = keySize;
 2203|    940|            symKey->size = keySize;
 2204|    940|            if (key_size == 0)
  ------------------
  |  Branch (2204:17): [True: 0, False: 940]
  ------------------
 2205|      0|                templateCount--;
 2206|       |
 2207|    940|            mechanism.mechanism = derive;
 2208|       |
 2209|       |            /* we can undefine these when we define diffie-helman keys */
 2210|       |
 2211|    940|            mechanism.pParameter = pubKey->u.dh.publicValue.data;
 2212|    940|            mechanism.ulParameterLen = pubKey->u.dh.publicValue.len;
 2213|       |
 2214|    940|            pk11_EnterKeyMonitor(symKey);
 2215|    940|            crv = PK11_GETTAB(slot)->C_DeriveKey(symKey->session, &mechanism,
  ------------------
  |  |  102|    940|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 2216|    940|                                                 privKey->pkcs11ID, keyTemplate,
 2217|    940|                                                 templateCount, &symKey->objectID);
 2218|    940|            pk11_ExitKeyMonitor(symKey);
 2219|    940|            if (crv == CKR_OK)
  ------------------
  |  | 1388|    940|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (2219:17): [True: 940, False: 0]
  ------------------
 2220|    940|                return symKey;
 2221|      0|            PORT_SetError(PK11_MapError(crv));
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2222|      0|        } break;
 2223|      0|        case ecKey: {
  ------------------
  |  Branch (2223:9): [True: 0, False: 940]
  ------------------
 2224|      0|            CK_BBOOL cktrue = CK_TRUE;
  ------------------
  |  |   22|      0|#define CK_TRUE 1
  ------------------
 2225|      0|            CK_OBJECT_CLASS keyClass = CKO_SECRET_KEY;
  ------------------
  |  |  329|      0|#define CKO_SECRET_KEY 0x00000004UL
  ------------------
 2226|      0|            CK_KEY_TYPE keyType = CKK_GENERIC_SECRET;
  ------------------
  |  |  383|      0|#define CKK_GENERIC_SECRET 0x00000010UL
  ------------------
 2227|      0|            CK_ULONG key_size = 0;
 2228|      0|            CK_ATTRIBUTE keyTemplate[4];
 2229|      0|            int templateCount;
 2230|      0|            CK_ATTRIBUTE *attrs = keyTemplate;
 2231|      0|            CK_ECDH1_DERIVE_PARAMS *mechParams = NULL;
 2232|       |
 2233|      0|            if (pubKey->keyType != ecKey) {
  ------------------
  |  Branch (2233:17): [True: 0, False: 0]
  ------------------
 2234|      0|                PORT_SetError(SEC_ERROR_BAD_KEY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2235|      0|                break;
 2236|      0|            }
 2237|       |
 2238|      0|            PK11_SETATTRS(attrs, CKA_CLASS, &keyClass, sizeof(keyClass));
  ------------------
  |  |  104|      0|    (x)->type = (id);              \
  |  |  105|      0|    (x)->pValue = (v);             \
  |  |  106|      0|    (x)->ulValueLen = (l);
  ------------------
 2239|      0|            attrs++;
 2240|      0|            PK11_SETATTRS(attrs, CKA_KEY_TYPE, &keyType, sizeof(keyType));
  ------------------
  |  |  104|      0|    (x)->type = (id);              \
  |  |  105|      0|    (x)->pValue = (v);             \
  |  |  106|      0|    (x)->ulValueLen = (l);
  ------------------
 2241|      0|            attrs++;
 2242|      0|            PK11_SETATTRS(attrs, operation, &cktrue, 1);
  ------------------
  |  |  104|      0|    (x)->type = (id);              \
  |  |  105|      0|    (x)->pValue = (v);             \
  |  |  106|      0|    (x)->ulValueLen = (l);
  ------------------
 2243|      0|            attrs++;
 2244|      0|            PK11_SETATTRS(attrs, CKA_VALUE_LEN, &key_size, sizeof(key_size));
  ------------------
  |  |  104|      0|    (x)->type = (id);              \
  |  |  105|      0|    (x)->pValue = (v);             \
  |  |  106|      0|    (x)->ulValueLen = (l);
  ------------------
 2245|      0|            attrs++;
 2246|      0|            templateCount = attrs - keyTemplate;
 2247|      0|            PR_ASSERT(templateCount <= sizeof(keyTemplate) / sizeof(CK_ATTRIBUTE));
  ------------------
  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2248|       |
 2249|      0|            keyType = PK11_GetKeyType(target, keySize);
 2250|      0|            key_size = keySize;
 2251|      0|            if (key_size == 0) {
  ------------------
  |  Branch (2251:17): [True: 0, False: 0]
  ------------------
 2252|      0|                if ((key_size = pk11_GetPredefinedKeyLength(keyType))) {
  ------------------
  |  Branch (2252:21): [True: 0, False: 0]
  ------------------
 2253|      0|                    templateCount--;
 2254|      0|                } else {
 2255|       |                    /* sigh, some tokens can't figure this out and require
 2256|       |                     * CKA_VALUE_LEN to be set */
 2257|      0|                    key_size = SHA1_LENGTH;
  ------------------
  |  |   39|      0|#define SHA1_LENGTH 20
  ------------------
 2258|      0|                }
 2259|      0|            }
 2260|      0|            symKey->size = key_size;
 2261|       |
 2262|      0|            mechParams = PORT_ZNew(CK_ECDH1_DERIVE_PARAMS);
  ------------------
  |  |  148|      0|#define PORT_ZNew(type) (type *)PORT_ZAlloc(sizeof(type))
  |  |  ------------------
  |  |  |  |   72|      0|#define PORT_ZAlloc PORT_ZAlloc_Util
  |  |  ------------------
  ------------------
 2263|      0|            mechParams->kdf = CKD_SHA1_KDF;
  ------------------
  |  | 1703|      0|#define CKD_SHA1_KDF 0x00000002UL
  ------------------
 2264|      0|            mechParams->ulSharedDataLen = 0;
 2265|      0|            mechParams->pSharedData = NULL;
 2266|      0|            mechParams->ulPublicDataLen = pubKey->u.ec.publicValue.len;
 2267|      0|            mechParams->pPublicData = pubKey->u.ec.publicValue.data;
 2268|       |
 2269|      0|            mechanism.mechanism = derive;
 2270|      0|            mechanism.pParameter = mechParams;
 2271|      0|            mechanism.ulParameterLen = sizeof(CK_ECDH1_DERIVE_PARAMS);
 2272|       |
 2273|      0|            pk11_EnterKeyMonitor(symKey);
 2274|      0|            crv = PK11_GETTAB(slot)->C_DeriveKey(symKey->session,
  ------------------
  |  |  102|      0|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 2275|      0|                                                 &mechanism, privKey->pkcs11ID, keyTemplate,
 2276|      0|                                                 templateCount, &symKey->objectID);
 2277|      0|            pk11_ExitKeyMonitor(symKey);
 2278|       |
 2279|       |            /* old PKCS #11 spec was ambiguous on what needed to be passed,
 2280|       |             * try this again with and encoded public key */
 2281|      0|            if (crv != CKR_OK && pk11_ECGetPubkeyEncoding(pubKey) != ECPoint_XOnly) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (2281:17): [True: 0, False: 0]
  |  Branch (2281:34): [True: 0, False: 0]
  ------------------
 2282|      0|                SECItem *pubValue = SEC_ASN1EncodeItem(NULL, NULL,
  ------------------
  |  |   89|      0|#define SEC_ASN1EncodeItem SEC_ASN1EncodeItem_Util
  ------------------
 2283|      0|                                                       &pubKey->u.ec.publicValue,
 2284|      0|                                                       SEC_ASN1_GET(SEC_OctetStringTemplate));
  ------------------
  |  |  188|      0|#define SEC_ASN1_GET(x) x
  ------------------
 2285|      0|                if (pubValue == NULL) {
  ------------------
  |  Branch (2285:21): [True: 0, False: 0]
  ------------------
 2286|      0|                    PORT_ZFree(mechParams, sizeof(CK_ECDH1_DERIVE_PARAMS));
  ------------------
  |  |   75|      0|#define PORT_ZFree PORT_ZFree_Util
  ------------------
 2287|      0|                    break;
 2288|      0|                }
 2289|      0|                mechParams->ulPublicDataLen = pubValue->len;
 2290|      0|                mechParams->pPublicData = pubValue->data;
 2291|       |
 2292|      0|                pk11_EnterKeyMonitor(symKey);
 2293|      0|                crv = PK11_GETTAB(slot)->C_DeriveKey(symKey->session,
  ------------------
  |  |  102|      0|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 2294|      0|                                                     &mechanism, privKey->pkcs11ID, keyTemplate,
 2295|      0|                                                     templateCount, &symKey->objectID);
 2296|      0|                pk11_ExitKeyMonitor(symKey);
 2297|       |
 2298|      0|                SECITEM_FreeItem(pubValue, PR_TRUE);
  ------------------
  |  |  108|      0|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                              SECITEM_FreeItem(pubValue, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 2299|      0|            }
 2300|       |
 2301|      0|            PORT_ZFree(mechParams, sizeof(CK_ECDH1_DERIVE_PARAMS));
  ------------------
  |  |   75|      0|#define PORT_ZFree PORT_ZFree_Util
  ------------------
 2302|       |
 2303|      0|            if (crv == CKR_OK)
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (2303:17): [True: 0, False: 0]
  ------------------
 2304|      0|                return symKey;
 2305|      0|            PORT_SetError(PK11_MapError(crv));
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2306|      0|        }
 2307|    940|    }
 2308|       |
 2309|      0|    PK11_FreeSymKey(symKey);
 2310|      0|    return NULL;
 2311|    940|}
PK11_PubDeriveWithKDF:
 2591|  1.86k|{
 2592|       |
 2593|  1.86k|    switch (privKey->keyType) {
 2594|      0|        case rsaKey:
  ------------------
  |  Branch (2594:9): [True: 0, False: 1.86k]
  ------------------
 2595|      0|        case nullKey:
  ------------------
  |  Branch (2595:9): [True: 0, False: 1.86k]
  ------------------
 2596|      0|        case dsaKey:
  ------------------
  |  Branch (2596:9): [True: 0, False: 1.86k]
  ------------------
 2597|      0|        case keaKey:
  ------------------
  |  Branch (2597:9): [True: 0, False: 1.86k]
  ------------------
 2598|      0|        case fortezzaKey:
  ------------------
  |  Branch (2598:9): [True: 0, False: 1.86k]
  ------------------
 2599|    940|        case dhKey:
  ------------------
  |  Branch (2599:9): [True: 940, False: 929]
  ------------------
 2600|    940|            return PK11_PubDerive(privKey, pubKey, isSender, randomA, randomB,
 2601|    940|                                  derive, target, operation, keySize, wincx);
 2602|    929|        case ecKey:
  ------------------
  |  Branch (2602:9): [True: 929, False: 940]
  ------------------
 2603|    929|        case ecMontKey:
  ------------------
  |  Branch (2603:9): [True: 0, False: 1.86k]
  ------------------
 2604|    929|            return pk11_PubDeriveECKeyWithKDF(privKey, pubKey, isSender,
 2605|    929|                                              randomA, randomB, derive, target,
 2606|    929|                                              operation, keySize,
 2607|    929|                                              kdf, sharedData, wincx);
 2608|      0|        default:
  ------------------
  |  Branch (2608:9): [True: 0, False: 1.86k]
  ------------------
 2609|      0|            PORT_SetError(SEC_ERROR_BAD_KEY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2610|      0|            break;
 2611|  1.86k|    }
 2612|       |
 2613|      0|    return NULL;
 2614|  1.86k|}
PK11_GetSymKeyHandle:
 3078|  4.29k|{
 3079|  4.29k|    return symKey->objectID;
 3080|  4.29k|}
pk11skey.c:pk11_EnterKeyMonitor:
   28|  85.1k|{
   29|  85.1k|    if (!symKey->sessionOwner || !(symKey->slot->isThreadSafe))
  ------------------
  |  Branch (29:9): [True: 5.40k, False: 79.7k]
  |  Branch (29:34): [True: 0, False: 79.7k]
  ------------------
   30|  5.40k|        PK11_EnterSlotMonitor(symKey->slot);
   31|  85.1k|}
pk11skey.c:pk11_ExitKeyMonitor:
   35|  85.1k|{
   36|  85.1k|    if (!symKey->sessionOwner || !(symKey->slot->isThreadSafe))
  ------------------
  |  Branch (36:9): [True: 5.40k, False: 79.7k]
  |  Branch (36:34): [True: 0, False: 79.7k]
  ------------------
   37|  5.40k|        PK11_ExitSlotMonitor(symKey->slot);
   38|  85.1k|}
pk11skey.c:pk11_CreateSymKey:
  144|  48.2k|{
  145|       |
  146|  48.2k|    PK11SymKey *symKey = pk11_getKeyFromList(slot, needSession);
  147|       |
  148|  48.2k|    if (symKey == NULL) {
  ------------------
  |  Branch (148:9): [True: 0, False: 48.2k]
  ------------------
  149|      0|        return NULL;
  150|      0|    }
  151|       |    /* if needSession was specified, make sure we have a valid session.
  152|       |     * callers which specify needSession as false should do their own
  153|       |     * check of the session before returning the symKey */
  154|  48.2k|    if (needSession && symKey->session == CK_INVALID_HANDLE) {
  ------------------
  |  |   78|  42.8k|#define CK_INVALID_HANDLE 0
  ------------------
  |  Branch (154:9): [True: 42.8k, False: 5.40k]
  |  Branch (154:24): [True: 0, False: 42.8k]
  ------------------
  155|      0|        PK11_FreeSymKey(symKey);
  156|      0|        PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  157|      0|        return NULL;
  158|      0|    }
  159|       |
  160|  48.2k|    symKey->type = type;
  161|  48.2k|    symKey->data.type = siBuffer;
  162|  48.2k|    symKey->data.data = NULL;
  163|  48.2k|    symKey->data.len = 0;
  164|  48.2k|    symKey->owner = owner;
  165|  48.2k|    symKey->objectID = CK_INVALID_HANDLE;
  ------------------
  |  |   78|  48.2k|#define CK_INVALID_HANDLE 0
  ------------------
  166|  48.2k|    symKey->slot = slot;
  167|  48.2k|    symKey->series = slot->series;
  168|  48.2k|    symKey->cx = wincx;
  169|  48.2k|    symKey->size = 0;
  170|  48.2k|    symKey->refCount = 1;
  171|  48.2k|    symKey->origin = PK11_OriginNULL;
  172|  48.2k|    symKey->parent = NULL;
  173|  48.2k|    symKey->freeFunc = NULL;
  174|  48.2k|    symKey->userData = NULL;
  175|  48.2k|    PK11_ReferenceSlot(slot);
  176|  48.2k|    return symKey;
  177|  48.2k|}
pk11skey.c:pk11_getKeyFromList:
   47|  48.2k|{
   48|  48.2k|    PK11SymKey *symKey = NULL;
   49|       |
   50|  48.2k|    PZ_Lock(slot->freeListLock);
  ------------------
  |  |  245|  48.2k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
   51|       |    /* own session list are symkeys with sessions that the symkey owns.
   52|       |     * 'most' symkeys will own their own session. */
   53|  48.2k|    if (needSession) {
  ------------------
  |  Branch (53:9): [True: 42.8k, False: 5.40k]
  ------------------
   54|  42.8k|        if (slot->freeSymKeysWithSessionHead) {
  ------------------
  |  Branch (54:13): [True: 42.8k, False: 12]
  ------------------
   55|  42.8k|            symKey = slot->freeSymKeysWithSessionHead;
   56|  42.8k|            slot->freeSymKeysWithSessionHead = symKey->next;
   57|  42.8k|            slot->keyCount--;
   58|  42.8k|        }
   59|  42.8k|    }
   60|       |    /* if we don't need a symkey with its own session, or we couldn't find
   61|       |     * one on the owner list, get one from the non-owner free list. */
   62|  48.2k|    if (!symKey) {
  ------------------
  |  Branch (62:9): [True: 5.41k, False: 42.8k]
  ------------------
   63|  5.41k|        if (slot->freeSymKeysHead) {
  ------------------
  |  Branch (63:13): [True: 5.39k, False: 16]
  ------------------
   64|  5.39k|            symKey = slot->freeSymKeysHead;
   65|  5.39k|            slot->freeSymKeysHead = symKey->next;
   66|  5.39k|            slot->keyCount--;
   67|  5.39k|        }
   68|  5.41k|    }
   69|  48.2k|    PZ_Unlock(slot->freeListLock);
  ------------------
  |  |  246|  48.2k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
   70|  48.2k|    if (symKey) {
  ------------------
  |  Branch (70:9): [True: 48.2k, False: 16]
  ------------------
   71|  48.2k|        symKey->next = NULL;
   72|  48.2k|        if (!needSession) {
  ------------------
  |  Branch (72:13): [True: 5.39k, False: 42.8k]
  ------------------
   73|  5.39k|            return symKey;
   74|  5.39k|        }
   75|       |        /* if we are getting an owner key, make sure we have a valid session.
   76|       |         * session could be invalid if the token has been removed or because
   77|       |         * we got it from the non-owner free list */
   78|  42.8k|        if ((symKey->series != slot->series) ||
  ------------------
  |  Branch (78:13): [True: 0, False: 42.8k]
  ------------------
   79|  42.8k|            (symKey->session == CK_INVALID_HANDLE)) {
  ------------------
  |  |   78|  42.8k|#define CK_INVALID_HANDLE 0
  ------------------
  |  Branch (79:13): [True: 0, False: 42.8k]
  ------------------
   80|      0|            symKey->session = pk11_GetNewSession(slot, &symKey->sessionOwner);
   81|      0|        }
   82|  42.8k|        PORT_Assert(symKey->session != CK_INVALID_HANDLE);
  ------------------
  |  |  120|  42.8k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  42.8k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 42.8k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   83|  42.8k|        if (symKey->session != CK_INVALID_HANDLE)
  ------------------
  |  |   78|  42.8k|#define CK_INVALID_HANDLE 0
  ------------------
  |  Branch (83:13): [True: 42.8k, False: 0]
  ------------------
   84|  42.8k|            return symKey;
   85|      0|        PK11_FreeSymKey(symKey);
   86|       |        /* if we are here, we need a session, but couldn't get one, it's
   87|       |         * unlikely we pk11_GetNewSession will succeed if we call it a second
   88|       |         * time. */
   89|      0|        return NULL;
   90|  42.8k|    }
   91|       |
   92|     16|    symKey = PORT_New(PK11SymKey);
  ------------------
  |  |  151|     16|#define PORT_New(type) (type *)PORT_Alloc(sizeof(type))
  |  |  ------------------
  |  |  |  |   52|     16|#define PORT_Alloc PORT_Alloc_Util
  |  |  ------------------
  ------------------
   93|     16|    if (symKey == NULL) {
  ------------------
  |  Branch (93:9): [True: 0, False: 16]
  ------------------
   94|      0|        return NULL;
   95|      0|    }
   96|       |
   97|     16|    symKey->next = NULL;
   98|     16|    if (needSession) {
  ------------------
  |  Branch (98:9): [True: 12, False: 4]
  ------------------
   99|     12|        symKey->session = pk11_GetNewSession(slot, &symKey->sessionOwner);
  100|     12|        PORT_Assert(symKey->session != CK_INVALID_HANDLE);
  ------------------
  |  |  120|     12|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|     12|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 12, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  101|     12|        if (symKey->session == CK_INVALID_HANDLE) {
  ------------------
  |  |   78|     12|#define CK_INVALID_HANDLE 0
  ------------------
  |  Branch (101:13): [True: 0, False: 12]
  ------------------
  102|      0|            PK11_FreeSymKey(symKey);
  103|      0|            symKey = NULL;
  104|      0|        }
  105|     12|    } else {
  106|      4|        symKey->session = CK_INVALID_HANDLE;
  ------------------
  |  |   78|      4|#define CK_INVALID_HANDLE 0
  ------------------
  107|      4|    }
  108|     16|    return symKey;
  109|     16|}
pk11skey.c:pk11_ImportSymKeyWithTempl:
  442|  1.42k|{
  443|  1.42k|    PK11SymKey *symKey;
  444|  1.42k|    SECStatus rv;
  445|       |
  446|  1.42k|    symKey = pk11_CreateSymKey(slot, type, !isToken, PR_TRUE, wincx);
  ------------------
  |  |  437|  1.42k|#define PR_TRUE 1
  ------------------
  447|  1.42k|    if (symKey == NULL) {
  ------------------
  |  Branch (447:9): [True: 0, False: 1.42k]
  ------------------
  448|      0|        return NULL;
  449|      0|    }
  450|       |
  451|  1.42k|    symKey->size = key->len;
  452|       |
  453|  1.42k|    PK11_SETATTRS(&keyTemplate[templateCount], CKA_VALUE, key->data, key->len);
  ------------------
  |  |  104|  1.42k|    (x)->type = (id);              \
  |  |  105|  1.42k|    (x)->pValue = (v);             \
  |  |  106|  1.42k|    (x)->ulValueLen = (l);
  ------------------
  454|  1.42k|    templateCount++;
  455|       |
  456|  1.42k|    if (SECITEM_CopyItem(NULL, &symKey->data, key) != SECSuccess) {
  ------------------
  |  |  106|  1.42k|#define SECITEM_CopyItem SECITEM_CopyItem_Util
  ------------------
  |  Branch (456:9): [True: 0, False: 1.42k]
  ------------------
  457|      0|        PK11_FreeSymKey(symKey);
  458|      0|        return NULL;
  459|      0|    }
  460|       |
  461|  1.42k|    symKey->origin = origin;
  462|       |
  463|       |    /* import the keys */
  464|  1.42k|    rv = PK11_CreateNewObject(slot, symKey->session, keyTemplate,
  465|  1.42k|                              templateCount, isToken, &symKey->objectID);
  466|  1.42k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (466:9): [True: 0, False: 1.42k]
  ------------------
  467|      0|        PK11_FreeSymKey(symKey);
  468|      0|        return NULL;
  469|      0|    }
  470|       |
  471|  1.42k|    return symKey;
  472|  1.42k|}
pk11skey.c:pk11_ECGetPubkeyEncoding:
 2317|  1.00k|{
 2318|  1.00k|    SECItem oid;
 2319|  1.00k|    SECStatus rv;
 2320|  1.00k|    PORTCheapArenaPool tmpArena;
 2321|  1.00k|    ECPointEncoding encoding = ECPoint_Undefined;
 2322|       |
 2323|  1.00k|    PORT_InitCheapArena(&tmpArena, DER_DEFAULT_CHUNKSIZE);
  ------------------
  |  |   60|  1.00k|#define DER_DEFAULT_CHUNKSIZE (2048)
  ------------------
 2324|       |
 2325|       |    /* decode the OID tag */
 2326|  1.00k|    rv = SEC_QuickDERDecodeItem(&tmpArena.arena, &oid,
  ------------------
  |  |  102|  1.00k|#define SEC_QuickDERDecodeItem SEC_QuickDERDecodeItem_Util
  ------------------
 2327|  1.00k|                                SEC_ASN1_GET(SEC_ObjectIDTemplate),
  ------------------
  |  |  188|  1.00k|#define SEC_ASN1_GET(x) x
  ------------------
 2328|  1.00k|                                &pubKey->u.ec.DEREncodedParams);
 2329|  1.00k|    if (rv == SECSuccess) {
  ------------------
  |  Branch (2329:9): [True: 1.00k, False: 0]
  ------------------
 2330|  1.00k|        SECOidTag tag = SECOID_FindOIDTag(&oid);
  ------------------
  |  |  117|  1.00k|#define SECOID_FindOIDTag SECOID_FindOIDTag_Util
  ------------------
 2331|  1.00k|        switch (tag) {
 2332|      0|            case SEC_OID_X25519:
  ------------------
  |  Branch (2332:13): [True: 0, False: 1.00k]
  ------------------
 2333|    497|            case SEC_OID_CURVE25519:
  ------------------
  |  Branch (2333:13): [True: 497, False: 510]
  ------------------
 2334|    497|                encoding = ECPoint_XOnly;
 2335|    497|                break;
 2336|    427|            case SEC_OID_SECG_EC_SECP256R1:
  ------------------
  |  |  543|    427|#define SEC_OID_SECG_EC_SECP256R1 SEC_OID_ANSIX962_EC_PRIME256V1
  ------------------
  |  Branch (2336:13): [True: 427, False: 580]
  ------------------
 2337|    481|            case SEC_OID_SECG_EC_SECP384R1:
  ------------------
  |  Branch (2337:13): [True: 54, False: 953]
  ------------------
 2338|    510|            case SEC_OID_SECG_EC_SECP521R1:
  ------------------
  |  Branch (2338:13): [True: 29, False: 978]
  ------------------
 2339|    510|            default:
  ------------------
  |  Branch (2339:13): [True: 0, False: 1.00k]
  ------------------
 2340|       |                /* unknown curve, default to uncompressed */
 2341|    510|                encoding = ECPoint_Uncompressed;
 2342|  1.00k|        }
 2343|  1.00k|    }
 2344|  1.00k|    PORT_DestroyCheapArena(&tmpArena);
 2345|  1.00k|    return encoding;
 2346|  1.00k|}
pk11skey.c:pk11_PubDeriveECKeyWithKDF:
 2374|    929|{
 2375|    929|    PK11SlotInfo *slot = privKey->pkcs11Slot;
 2376|    929|    PK11SymKey *symKey;
 2377|    929|    PK11SymKey *SharedSecret;
 2378|    929|    CK_MECHANISM mechanism;
 2379|    929|    CK_RV crv;
 2380|    929|    CK_BBOOL cktrue = CK_TRUE;
  ------------------
  |  |   22|    929|#define CK_TRUE 1
  ------------------
 2381|    929|    CK_OBJECT_CLASS keyClass = CKO_SECRET_KEY;
  ------------------
  |  |  329|    929|#define CKO_SECRET_KEY 0x00000004UL
  ------------------
 2382|    929|    CK_KEY_TYPE keyType = CKK_GENERIC_SECRET;
  ------------------
  |  |  383|    929|#define CKK_GENERIC_SECRET 0x00000010UL
  ------------------
 2383|    929|    CK_ULONG key_size = 0;
 2384|    929|    CK_ATTRIBUTE keyTemplate[4];
 2385|    929|    int templateCount;
 2386|    929|    CK_ATTRIBUTE *attrs = keyTemplate;
 2387|    929|    CK_ECDH1_DERIVE_PARAMS *mechParams = NULL;
 2388|       |
 2389|    929|    if (pubKey->keyType != ecKey && pubKey->keyType != ecMontKey) {
  ------------------
  |  Branch (2389:9): [True: 0, False: 929]
  |  Branch (2389:37): [True: 0, False: 0]
  ------------------
 2390|      0|        PORT_SetError(SEC_ERROR_BAD_KEY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2391|      0|        return NULL;
 2392|      0|    }
 2393|    929|    if ((kdf != CKD_NULL) && (kdf != CKD_SHA1_KDF) &&
  ------------------
  |  | 1702|    929|#define CKD_NULL 0x00000001UL
  ------------------
                  if ((kdf != CKD_NULL) && (kdf != CKD_SHA1_KDF) &&
  ------------------
  |  | 1703|      0|#define CKD_SHA1_KDF 0x00000002UL
  ------------------
  |  Branch (2393:9): [True: 0, False: 929]
  |  Branch (2393:30): [True: 0, False: 0]
  ------------------
 2394|    929|        (kdf != CKD_SHA224_KDF) && (kdf != CKD_SHA256_KDF) &&
  ------------------
  |  | 1704|      0|#define CKD_SHA224_KDF 0x00000005UL
  ------------------
                      (kdf != CKD_SHA224_KDF) && (kdf != CKD_SHA256_KDF) &&
  ------------------
  |  | 1705|      0|#define CKD_SHA256_KDF 0x00000006UL
  ------------------
  |  Branch (2394:9): [True: 0, False: 0]
  |  Branch (2394:36): [True: 0, False: 0]
  ------------------
 2395|    929|        (kdf != CKD_SHA384_KDF) && (kdf != CKD_SHA512_KDF)) {
  ------------------
  |  | 1706|      0|#define CKD_SHA384_KDF 0x00000007UL
  ------------------
                      (kdf != CKD_SHA384_KDF) && (kdf != CKD_SHA512_KDF)) {
  ------------------
  |  | 1707|      0|#define CKD_SHA512_KDF 0x00000008UL
  ------------------
  |  Branch (2395:9): [True: 0, False: 0]
  |  Branch (2395:36): [True: 0, False: 0]
  ------------------
 2396|      0|        PORT_SetError(SEC_ERROR_INVALID_ALGORITHM);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2397|      0|        return NULL;
 2398|      0|    }
 2399|       |
 2400|       |    /* get our key Structure */
 2401|    929|    symKey = pk11_CreateSymKey(slot, target, PR_TRUE, PR_TRUE, wincx);
  ------------------
  |  |  437|    929|#define PR_TRUE 1
  ------------------
                  symKey = pk11_CreateSymKey(slot, target, PR_TRUE, PR_TRUE, wincx);
  ------------------
  |  |  437|    929|#define PR_TRUE 1
  ------------------
 2402|    929|    if (symKey == NULL) {
  ------------------
  |  Branch (2402:9): [True: 0, False: 929]
  ------------------
 2403|      0|        return NULL;
 2404|      0|    }
 2405|       |    /* CKA_NSS_MESSAGE is a fake operation to distinguish between
 2406|       |     * Normal Encrypt/Decrypt and MessageEncrypt/Decrypt. Don't try to set
 2407|       |     * it as a real attribute */
 2408|    929|    if ((operation & CKA_NSS_MESSAGE_MASK) == CKA_NSS_MESSAGE) {
  ------------------
  |  |   70|    929|#define CKA_NSS_MESSAGE_MASK 0xff000000L
  ------------------
                  if ((operation & CKA_NSS_MESSAGE_MASK) == CKA_NSS_MESSAGE) {
  ------------------
  |  |   69|    929|#define CKA_NSS_MESSAGE 0x82000000L
  ------------------
  |  Branch (2408:9): [True: 0, False: 929]
  ------------------
 2409|       |        /* Message is or'd with a real Attribute (CKA_ENCRYPT, CKA_DECRYPT),
 2410|       |         * etc. Strip out the real attribute here */
 2411|      0|        operation &= ~CKA_NSS_MESSAGE_MASK;
  ------------------
  |  |   70|      0|#define CKA_NSS_MESSAGE_MASK 0xff000000L
  ------------------
 2412|      0|    }
 2413|       |
 2414|    929|    symKey->origin = PK11_OriginDerive;
 2415|       |
 2416|    929|    PK11_SETATTRS(attrs, CKA_CLASS, &keyClass, sizeof(keyClass));
  ------------------
  |  |  104|    929|    (x)->type = (id);              \
  |  |  105|    929|    (x)->pValue = (v);             \
  |  |  106|    929|    (x)->ulValueLen = (l);
  ------------------
 2417|    929|    attrs++;
 2418|    929|    PK11_SETATTRS(attrs, CKA_KEY_TYPE, &keyType, sizeof(keyType));
  ------------------
  |  |  104|    929|    (x)->type = (id);              \
  |  |  105|    929|    (x)->pValue = (v);             \
  |  |  106|    929|    (x)->ulValueLen = (l);
  ------------------
 2419|    929|    attrs++;
 2420|    929|    PK11_SETATTRS(attrs, operation, &cktrue, 1);
  ------------------
  |  |  104|    929|    (x)->type = (id);              \
  |  |  105|    929|    (x)->pValue = (v);             \
  |  |  106|    929|    (x)->ulValueLen = (l);
  ------------------
 2421|    929|    attrs++;
 2422|    929|    PK11_SETATTRS(attrs, CKA_VALUE_LEN, &key_size, sizeof(key_size));
  ------------------
  |  |  104|    929|    (x)->type = (id);              \
  |  |  105|    929|    (x)->pValue = (v);             \
  |  |  106|    929|    (x)->ulValueLen = (l);
  ------------------
 2423|    929|    attrs++;
 2424|    929|    templateCount = attrs - keyTemplate;
 2425|    929|    PR_ASSERT(templateCount <= sizeof(keyTemplate) / sizeof(CK_ATTRIBUTE));
  ------------------
  |  |  208|    929|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 929, False: 0]
  |  |  ------------------
  ------------------
 2426|       |
 2427|    929|    keyType = PK11_GetKeyType(target, keySize);
 2428|    929|    key_size = keySize;
 2429|    929|    if (key_size == 0) {
  ------------------
  |  Branch (2429:9): [True: 929, False: 0]
  ------------------
 2430|    929|        if ((key_size = pk11_GetPredefinedKeyLength(keyType))) {
  ------------------
  |  Branch (2430:13): [True: 0, False: 929]
  ------------------
 2431|      0|            templateCount--;
 2432|    929|        } else {
 2433|       |            /* sigh, some tokens can't figure this out and require
 2434|       |             * CKA_VALUE_LEN to be set */
 2435|    929|            switch (kdf) {
 2436|    929|                case CKD_NULL:
  ------------------
  |  | 1702|    929|#define CKD_NULL 0x00000001UL
  ------------------
  |  Branch (2436:17): [True: 929, False: 0]
  ------------------
 2437|    929|                    key_size = pk11_ECPubKeySize(pubKey);
 2438|    929|                    if (key_size == 0) {
  ------------------
  |  Branch (2438:25): [True: 0, False: 929]
  ------------------
 2439|      0|                        PK11_FreeSymKey(symKey);
 2440|      0|                        return NULL;
 2441|      0|                    }
 2442|    929|                    break;
 2443|    929|                case CKD_SHA1_KDF:
  ------------------
  |  | 1703|      0|#define CKD_SHA1_KDF 0x00000002UL
  ------------------
  |  Branch (2443:17): [True: 0, False: 929]
  ------------------
 2444|      0|                    key_size = SHA1_LENGTH;
  ------------------
  |  |   39|      0|#define SHA1_LENGTH 20
  ------------------
 2445|      0|                    break;
 2446|      0|                case CKD_SHA224_KDF:
  ------------------
  |  | 1704|      0|#define CKD_SHA224_KDF 0x00000005UL
  ------------------
  |  Branch (2446:17): [True: 0, False: 929]
  ------------------
 2447|      0|                    key_size = SHA224_LENGTH;
  ------------------
  |  |   40|      0|#define SHA224_LENGTH 28
  ------------------
 2448|      0|                    break;
 2449|      0|                case CKD_SHA256_KDF:
  ------------------
  |  | 1705|      0|#define CKD_SHA256_KDF 0x00000006UL
  ------------------
  |  Branch (2449:17): [True: 0, False: 929]
  ------------------
 2450|      0|                    key_size = SHA256_LENGTH;
  ------------------
  |  |   41|      0|#define SHA256_LENGTH 32
  ------------------
 2451|      0|                    break;
 2452|      0|                case CKD_SHA384_KDF:
  ------------------
  |  | 1706|      0|#define CKD_SHA384_KDF 0x00000007UL
  ------------------
  |  Branch (2452:17): [True: 0, False: 929]
  ------------------
 2453|      0|                    key_size = SHA384_LENGTH;
  ------------------
  |  |   42|      0|#define SHA384_LENGTH 48
  ------------------
 2454|      0|                    break;
 2455|      0|                case CKD_SHA512_KDF:
  ------------------
  |  | 1707|      0|#define CKD_SHA512_KDF 0x00000008UL
  ------------------
  |  Branch (2455:17): [True: 0, False: 929]
  ------------------
 2456|      0|                    key_size = SHA512_LENGTH;
  ------------------
  |  |   43|      0|#define SHA512_LENGTH 64
  ------------------
 2457|      0|                    break;
 2458|      0|                default:
  ------------------
  |  Branch (2458:17): [True: 0, False: 929]
  ------------------
 2459|      0|                    PORT_AssertNotReached("Invalid CKD");
  ------------------
  |  |  127|      0|#define PORT_AssertNotReached(reasonStr) PR_NOT_REACHED(reasonStr)
  |  |  ------------------
  |  |  |  |  213|      0|    PR_Assert(_reasonStr,__FILE__,__LINE__)
  |  |  ------------------
  ------------------
 2460|      0|                    PORT_SetError(SEC_ERROR_INVALID_ALGORITHM);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2461|      0|                    PK11_FreeSymKey(symKey);
 2462|      0|                    return NULL;
 2463|    929|            }
 2464|    929|        }
 2465|    929|    }
 2466|    929|    symKey->size = key_size;
 2467|       |
 2468|    929|    mechParams = PORT_ZNew(CK_ECDH1_DERIVE_PARAMS);
  ------------------
  |  |  148|    929|#define PORT_ZNew(type) (type *)PORT_ZAlloc(sizeof(type))
  |  |  ------------------
  |  |  |  |   72|    929|#define PORT_ZAlloc PORT_ZAlloc_Util
  |  |  ------------------
  ------------------
 2469|    929|    if (!mechParams) {
  ------------------
  |  Branch (2469:9): [True: 0, False: 929]
  ------------------
 2470|      0|        PK11_FreeSymKey(symKey);
 2471|      0|        return NULL;
 2472|      0|    }
 2473|    929|    mechParams->kdf = kdf;
 2474|    929|    if (sharedData == NULL) {
  ------------------
  |  Branch (2474:9): [True: 929, False: 0]
  ------------------
 2475|    929|        mechParams->ulSharedDataLen = 0;
 2476|    929|        mechParams->pSharedData = NULL;
 2477|    929|    } else {
 2478|      0|        mechParams->ulSharedDataLen = sharedData->len;
 2479|      0|        mechParams->pSharedData = sharedData->data;
 2480|      0|    }
 2481|    929|    mechParams->ulPublicDataLen = pubKey->u.ec.publicValue.len;
 2482|    929|    mechParams->pPublicData = pubKey->u.ec.publicValue.data;
 2483|       |
 2484|    929|    mechanism.mechanism = derive;
 2485|    929|    mechanism.pParameter = mechParams;
 2486|    929|    mechanism.ulParameterLen = sizeof(CK_ECDH1_DERIVE_PARAMS);
 2487|       |
 2488|    929|    pk11_EnterKeyMonitor(symKey);
 2489|    929|    crv = PK11_GETTAB(slot)->C_DeriveKey(symKey->session, &mechanism,
  ------------------
  |  |  102|    929|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 2490|    929|                                         privKey->pkcs11ID, keyTemplate,
 2491|    929|                                         templateCount, &symKey->objectID);
 2492|    929|    pk11_ExitKeyMonitor(symKey);
 2493|       |
 2494|       |    /* old PKCS #11 spec was ambiguous on what needed to be passed,
 2495|       |     * try this again with an encoded public key */
 2496|    929|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|    929|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (2496:9): [True: 78, False: 851]
  ------------------
 2497|       |        /* For curves that only use X as public value and no encoding we don't
 2498|       |         * have to try again. (Currently only Curve25519) */
 2499|     78|        if (pk11_ECGetPubkeyEncoding(pubKey) == ECPoint_XOnly) {
  ------------------
  |  Branch (2499:13): [True: 4, False: 74]
  ------------------
 2500|      4|            goto loser;
 2501|      4|        }
 2502|     74|        SECItem *pubValue = SEC_ASN1EncodeItem(NULL, NULL,
  ------------------
  |  |   89|     74|#define SEC_ASN1EncodeItem SEC_ASN1EncodeItem_Util
  ------------------
 2503|     74|                                               &pubKey->u.ec.publicValue,
 2504|     74|                                               SEC_ASN1_GET(SEC_OctetStringTemplate));
  ------------------
  |  |  188|     74|#define SEC_ASN1_GET(x) x
  ------------------
 2505|     74|        if (pubValue == NULL) {
  ------------------
  |  Branch (2505:13): [True: 0, False: 74]
  ------------------
 2506|      0|            goto loser;
 2507|      0|        }
 2508|     74|        mechParams->ulPublicDataLen = pubValue->len;
 2509|     74|        mechParams->pPublicData = pubValue->data;
 2510|       |
 2511|     74|        pk11_EnterKeyMonitor(symKey);
 2512|     74|        crv = PK11_GETTAB(slot)->C_DeriveKey(symKey->session,
  ------------------
  |  |  102|     74|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 2513|     74|                                             &mechanism, privKey->pkcs11ID, keyTemplate,
 2514|     74|                                             templateCount, &symKey->objectID);
 2515|     74|        pk11_ExitKeyMonitor(symKey);
 2516|       |
 2517|     74|        if ((crv != CKR_OK) && (kdf != CKD_NULL)) {
  ------------------
  |  | 1388|     74|#define CKR_OK 0x00000000UL
  ------------------
                      if ((crv != CKR_OK) && (kdf != CKD_NULL)) {
  ------------------
  |  | 1702|     74|#define CKD_NULL 0x00000001UL
  ------------------
  |  Branch (2517:13): [True: 74, False: 0]
  |  Branch (2517:32): [True: 0, False: 74]
  ------------------
 2518|       |            /* Some PKCS #11 libraries cannot perform the key derivation
 2519|       |             * function. So, try calling C_DeriveKey with CKD_NULL and then
 2520|       |             * performing the KDF separately.
 2521|       |             */
 2522|      0|            CK_ULONG derivedKeySize = key_size;
 2523|       |
 2524|      0|            keyType = CKK_GENERIC_SECRET;
  ------------------
  |  |  383|      0|#define CKK_GENERIC_SECRET 0x00000010UL
  ------------------
 2525|      0|            key_size = pk11_ECPubKeySize(pubKey);
 2526|      0|            if (key_size == 0) {
  ------------------
  |  Branch (2526:17): [True: 0, False: 0]
  ------------------
 2527|      0|                SECITEM_FreeItem(pubValue, PR_TRUE);
  ------------------
  |  |  108|      0|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                              SECITEM_FreeItem(pubValue, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 2528|      0|                goto loser;
 2529|      0|            }
 2530|      0|            SharedSecret = symKey;
 2531|      0|            SharedSecret->size = key_size;
 2532|       |
 2533|      0|            mechParams->kdf = CKD_NULL;
  ------------------
  |  | 1702|      0|#define CKD_NULL 0x00000001UL
  ------------------
 2534|      0|            mechParams->ulSharedDataLen = 0;
 2535|      0|            mechParams->pSharedData = NULL;
 2536|      0|            mechParams->ulPublicDataLen = pubKey->u.ec.publicValue.len;
 2537|      0|            mechParams->pPublicData = pubKey->u.ec.publicValue.data;
 2538|       |
 2539|      0|            pk11_EnterKeyMonitor(SharedSecret);
 2540|      0|            crv = PK11_GETTAB(slot)->C_DeriveKey(SharedSecret->session,
  ------------------
  |  |  102|      0|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 2541|      0|                                                 &mechanism, privKey->pkcs11ID, keyTemplate,
 2542|      0|                                                 templateCount, &SharedSecret->objectID);
 2543|      0|            pk11_ExitKeyMonitor(SharedSecret);
 2544|       |
 2545|      0|            if (crv != CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (2545:17): [True: 0, False: 0]
  ------------------
 2546|       |                /* old PKCS #11 spec was ambiguous on what needed to be passed,
 2547|       |                 * try this one final time with an encoded public key */
 2548|      0|                mechParams->ulPublicDataLen = pubValue->len;
 2549|      0|                mechParams->pPublicData = pubValue->data;
 2550|       |
 2551|      0|                pk11_EnterKeyMonitor(SharedSecret);
 2552|      0|                crv = PK11_GETTAB(slot)->C_DeriveKey(SharedSecret->session,
  ------------------
  |  |  102|      0|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 2553|      0|                                                     &mechanism, privKey->pkcs11ID, keyTemplate,
 2554|      0|                                                     templateCount, &SharedSecret->objectID);
 2555|      0|                pk11_ExitKeyMonitor(SharedSecret);
 2556|      0|            }
 2557|       |
 2558|       |            /* Perform KDF. */
 2559|      0|            if (crv == CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (2559:17): [True: 0, False: 0]
  ------------------
 2560|      0|                symKey = pk11_ANSIX963Derive(SharedSecret, kdf,
 2561|      0|                                             sharedData, target, operation,
 2562|      0|                                             derivedKeySize);
 2563|      0|                PK11_FreeSymKey(SharedSecret);
 2564|      0|                if (symKey == NULL) {
  ------------------
  |  Branch (2564:21): [True: 0, False: 0]
  ------------------
 2565|      0|                    SECITEM_FreeItem(pubValue, PR_TRUE);
  ------------------
  |  |  108|      0|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                                  SECITEM_FreeItem(pubValue, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 2566|      0|                    PORT_ZFree(mechParams, sizeof(CK_ECDH1_DERIVE_PARAMS));
  ------------------
  |  |   75|      0|#define PORT_ZFree PORT_ZFree_Util
  ------------------
 2567|      0|                    return NULL;
 2568|      0|                }
 2569|      0|            }
 2570|      0|        }
 2571|     74|        SECITEM_FreeItem(pubValue, PR_TRUE);
  ------------------
  |  |  108|     74|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                      SECITEM_FreeItem(pubValue, PR_TRUE);
  ------------------
  |  |  437|     74|#define PR_TRUE 1
  ------------------
 2572|     74|    }
 2573|       |
 2574|    929|loser:
 2575|    929|    PORT_ZFree(mechParams, sizeof(CK_ECDH1_DERIVE_PARAMS));
  ------------------
  |  |   75|    929|#define PORT_ZFree PORT_ZFree_Util
  ------------------
 2576|       |
 2577|    929|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|    929|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (2577:9): [True: 78, False: 851]
  ------------------
 2578|     78|        PK11_FreeSymKey(symKey);
 2579|     78|        symKey = NULL;
 2580|     78|        PORT_SetError(PK11_MapError(crv));
  ------------------
  |  |   65|     78|#define PORT_SetError PORT_SetError_Util
  ------------------
 2581|     78|    }
 2582|    929|    return symKey;
 2583|    929|}
pk11skey.c:pk11_ECPubKeySize:
 2352|    929|{
 2353|    929|    SECItem *publicValue = &pubKey->u.ec.publicValue;
 2354|       |
 2355|    929|    ECPointEncoding encoding = pk11_ECGetPubkeyEncoding(pubKey);
 2356|    929|    if (encoding == ECPoint_XOnly) {
  ------------------
  |  Branch (2356:9): [True: 493, False: 436]
  ------------------
 2357|    493|        return publicValue->len;
 2358|    493|    }
 2359|    436|    if (encoding == ECPoint_Uncompressed) {
  ------------------
  |  Branch (2359:9): [True: 436, False: 0]
  ------------------
 2360|       |        /* key encoded in uncompressed form */
 2361|    436|        return ((publicValue->len - 1) / 2);
 2362|    436|    }
 2363|       |    /* key encoding not recognized */
 2364|      0|    return 0;
 2365|    436|}

PK11_NewSlotList:
  108|  11.6k|{
  109|  11.6k|    PK11SlotList *list;
  110|       |
  111|  11.6k|    list = (PK11SlotList *)PORT_Alloc(sizeof(PK11SlotList));
  ------------------
  |  |   52|  11.6k|#define PORT_Alloc PORT_Alloc_Util
  ------------------
  112|  11.6k|    if (list == NULL)
  ------------------
  |  Branch (112:9): [True: 0, False: 11.6k]
  ------------------
  113|      0|        return NULL;
  114|  11.6k|    list->head = NULL;
  115|  11.6k|    list->tail = NULL;
  116|  11.6k|    list->lock = PZ_NewLock(nssILockList);
  ------------------
  |  |  243|  11.6k|#define PZ_NewLock(t) PR_NewLock()
  ------------------
  117|  11.6k|    if (list->lock == NULL) {
  ------------------
  |  Branch (117:9): [True: 0, False: 11.6k]
  ------------------
  118|      0|        PORT_Free(list);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
  119|      0|        return NULL;
  120|      0|    }
  121|       |
  122|  11.6k|    return list;
  123|  11.6k|}
PK11_FreeSlotListElement:
  130|  79.9k|{
  131|  79.9k|    PRBool freeit = PR_FALSE;
  ------------------
  |  |  438|  79.9k|#define PR_FALSE 0
  ------------------
  132|       |
  133|  79.9k|    if (list == NULL || le == NULL) {
  ------------------
  |  Branch (133:9): [True: 0, False: 79.9k]
  |  Branch (133:25): [True: 0, False: 79.9k]
  ------------------
  134|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  135|      0|        return SECFailure;
  136|      0|    }
  137|       |
  138|  79.9k|    PZ_Lock(list->lock);
  ------------------
  |  |  245|  79.9k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
  139|  79.9k|    if (le->refCount-- == 1) {
  ------------------
  |  Branch (139:9): [True: 7.78k, False: 72.1k]
  ------------------
  140|  7.78k|        freeit = PR_TRUE;
  ------------------
  |  |  437|  7.78k|#define PR_TRUE 1
  ------------------
  141|  7.78k|    }
  142|  79.9k|    PZ_Unlock(list->lock);
  ------------------
  |  |  246|  79.9k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  143|  79.9k|    if (freeit) {
  ------------------
  |  Branch (143:9): [True: 7.78k, False: 72.1k]
  ------------------
  144|  7.78k|        PK11_FreeSlot(le->slot);
  145|  7.78k|        PORT_Free(le);
  ------------------
  |  |   60|  7.78k|#define PORT_Free PORT_Free_Util
  ------------------
  146|  7.78k|    }
  147|  79.9k|    return SECSuccess;
  148|  79.9k|}
PK11_FreeSlotList:
  174|  11.6k|{
  175|  11.6k|    pk11_FreeSlotListStatic(list);
  176|  11.6k|    PORT_Free(list);
  ------------------
  |  |   60|  11.6k|#define PORT_Free PORT_Free_Util
  ------------------
  177|  11.6k|}
PK11_AddSlotToList:
  188|  7.78k|{
  189|  7.78k|    PK11SlotListElement *le;
  190|  7.78k|    PK11SlotListElement *element;
  191|       |
  192|  7.78k|    le = (PK11SlotListElement *)PORT_Alloc(sizeof(PK11SlotListElement));
  ------------------
  |  |   52|  7.78k|#define PORT_Alloc PORT_Alloc_Util
  ------------------
  193|  7.78k|    if (le == NULL)
  ------------------
  |  Branch (193:9): [True: 0, False: 7.78k]
  ------------------
  194|      0|        return SECFailure;
  195|       |
  196|  7.78k|    le->slot = PK11_ReferenceSlot(slot);
  197|  7.78k|    le->prev = NULL;
  198|  7.78k|    le->refCount = 1;
  199|  7.78k|    PZ_Lock(list->lock);
  ------------------
  |  |  245|  7.78k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
  200|  7.78k|    element = list->head;
  201|       |    /* Insertion sort, with higher cipherOrders are sorted first in the list */
  202|  7.78k|    while (element && sorted && (element->slot->module->cipherOrder > le->slot->module->cipherOrder)) {
  ------------------
  |  Branch (202:12): [True: 3.88k, False: 3.90k]
  |  Branch (202:23): [True: 3.88k, False: 1]
  |  Branch (202:33): [True: 0, False: 3.88k]
  ------------------
  203|      0|        element = element->next;
  204|      0|    }
  205|  7.78k|    if (element) {
  ------------------
  |  Branch (205:9): [True: 3.88k, False: 3.90k]
  ------------------
  206|  3.88k|        le->prev = element->prev;
  207|  3.88k|        element->prev = le;
  208|  3.88k|        le->next = element;
  209|  3.90k|    } else {
  210|  3.90k|        le->prev = list->tail;
  211|  3.90k|        le->next = NULL;
  212|  3.90k|        list->tail = le;
  213|  3.90k|    }
  214|  7.78k|    if (le->prev)
  ------------------
  |  Branch (214:9): [True: 0, False: 7.78k]
  ------------------
  215|      0|        le->prev->next = le;
  216|  7.78k|    if (list->head == element)
  ------------------
  |  Branch (216:9): [True: 7.78k, False: 0]
  ------------------
  217|  7.78k|        list->head = le;
  218|  7.78k|    PZ_Unlock(list->lock);
  ------------------
  |  |  246|  7.78k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  219|       |
  220|  7.78k|    return SECSuccess;
  221|  7.78k|}
PK11_DeleteSlotFromList:
  228|     18|{
  229|     18|    PZ_Lock(list->lock);
  ------------------
  |  |  245|     18|#define PZ_Lock(k) PR_Lock((k))
  ------------------
  230|     18|    if (le->prev)
  ------------------
  |  Branch (230:9): [True: 0, False: 18]
  ------------------
  231|      0|        le->prev->next = le->next;
  232|     18|    else
  233|     18|        list->head = le->next;
  234|     18|    if (le->next)
  ------------------
  |  Branch (234:9): [True: 1, False: 17]
  ------------------
  235|      1|        le->next->prev = le->prev;
  236|     17|    else
  237|     17|        list->tail = le->prev;
  238|     18|    le->next = le->prev = NULL;
  239|     18|    PZ_Unlock(list->lock);
  ------------------
  |  |  246|     18|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  240|     18|    PK11_FreeSlotListElement(list, le);
  241|     18|    return SECSuccess;
  242|     18|}
pk11_MoveListToList:
  251|  7.76k|{
  252|  7.76k|    if (src->head == NULL)
  ------------------
  |  Branch (252:9): [True: 7.76k, False: 0]
  ------------------
  253|  7.76k|        return SECSuccess;
  254|       |
  255|      0|    if (target->tail == NULL) {
  ------------------
  |  Branch (255:9): [True: 0, False: 0]
  ------------------
  256|      0|        target->head = src->head;
  257|      0|    } else {
  258|      0|        target->tail->next = src->head;
  259|      0|    }
  260|      0|    src->head->prev = target->tail;
  261|      0|    target->tail = src->tail;
  262|      0|    src->head = src->tail = NULL;
  263|      0|    return SECSuccess;
  264|  7.76k|}
PK11_GetFirstSafe:
  300|  72.1k|{
  301|  72.1k|    PK11SlotListElement *le;
  302|       |
  303|  72.1k|    PZ_Lock(list->lock);
  ------------------
  |  |  245|  72.1k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
  304|  72.1k|    le = list->head;
  305|  72.1k|    if (le != NULL)
  ------------------
  |  Branch (305:9): [True: 72.1k, False: 0]
  ------------------
  306|  72.1k|        (le)->refCount++;
  307|  72.1k|    PZ_Unlock(list->lock);
  ------------------
  |  |  246|  72.1k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  308|  72.1k|    return le;
  309|  72.1k|}
PK11_GetNextSafe:
  318|    588|{
  319|    588|    PK11SlotListElement *new_le;
  320|    588|    PZ_Lock(list->lock);
  ------------------
  |  |  245|    588|#define PZ_Lock(k) PR_Lock((k))
  ------------------
  321|    588|    new_le = le->next;
  322|    588|    if (le->next == NULL) {
  ------------------
  |  Branch (322:9): [True: 541, False: 47]
  ------------------
  323|       |        /* if the prev and next fields are NULL then either this element
  324|       |         * has been removed and we need to walk the list again (if restart
  325|       |         * is true) or this was the only element on the list */
  326|    541|        if ((le->prev == NULL) && restart && (list->head != le)) {
  ------------------
  |  Branch (326:13): [True: 494, False: 47]
  |  Branch (326:35): [True: 494, False: 0]
  |  Branch (326:46): [True: 0, False: 494]
  ------------------
  327|      0|            new_le = list->head;
  328|      0|        }
  329|    541|    }
  330|    588|    if (new_le)
  ------------------
  |  Branch (330:9): [True: 47, False: 541]
  ------------------
  331|     47|        new_le->refCount++;
  332|    588|    PZ_Unlock(list->lock);
  ------------------
  |  |  246|    588|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  333|    588|    PK11_FreeSlotListElement(list, le);
  334|    588|    return new_le;
  335|    588|}
PK11_FindSlotElement:
  342|     18|{
  343|     18|    PK11SlotListElement *le;
  344|       |
  345|     18|    for (le = PK11_GetFirstSafe(list); le;
  ------------------
  |  Branch (345:40): [True: 18, False: 0]
  ------------------
  346|     18|         le = PK11_GetNextSafe(list, le, PR_TRUE)) {
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  347|     18|        if (le->slot == slot)
  ------------------
  |  Branch (347:13): [True: 18, False: 0]
  ------------------
  348|     18|            return le;
  349|     18|    }
  350|      0|    return NULL;
  351|     18|}
PK11_NewSlotInfo:
  361|      2|{
  362|      2|    PK11SlotInfo *slot;
  363|       |
  364|      2|    slot = (PK11SlotInfo *)PORT_Alloc(sizeof(PK11SlotInfo));
  ------------------
  |  |   52|      2|#define PORT_Alloc PORT_Alloc_Util
  ------------------
  365|      2|    if (slot == NULL) {
  ------------------
  |  Branch (365:9): [True: 0, False: 2]
  ------------------
  366|      0|        return slot;
  367|      0|    }
  368|      2|    slot->freeListLock = PZ_NewLock(nssILockFreelist);
  ------------------
  |  |  243|      2|#define PZ_NewLock(t) PR_NewLock()
  ------------------
  369|      2|    if (slot->freeListLock == NULL) {
  ------------------
  |  Branch (369:9): [True: 0, False: 2]
  ------------------
  370|      0|        PORT_Free(slot);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
  371|      0|        return NULL;
  372|      0|    }
  373|      2|    slot->nssTokenLock = PZ_NewLock(nssILockOther);
  ------------------
  |  |  243|      2|#define PZ_NewLock(t) PR_NewLock()
  ------------------
  374|      2|    if (slot->nssTokenLock == NULL) {
  ------------------
  |  Branch (374:9): [True: 0, False: 2]
  ------------------
  375|      0|        PZ_DestroyLock(slot->freeListLock);
  ------------------
  |  |  244|      0|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
  376|      0|        PORT_Free(slot);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
  377|      0|        return NULL;
  378|      0|    }
  379|      2|    slot->sessionLock = mod->isThreadSafe ? PZ_NewLock(nssILockSession) : mod->refLock;
  ------------------
  |  |  243|      2|#define PZ_NewLock(t) PR_NewLock()
  ------------------
  |  Branch (379:25): [True: 2, False: 0]
  ------------------
  380|      2|    if (slot->sessionLock == NULL) {
  ------------------
  |  Branch (380:9): [True: 0, False: 2]
  ------------------
  381|      0|        PZ_DestroyLock(slot->nssTokenLock);
  ------------------
  |  |  244|      0|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
  382|      0|        PZ_DestroyLock(slot->freeListLock);
  ------------------
  |  |  244|      0|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
  383|      0|        PORT_Free(slot);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
  384|      0|        return NULL;
  385|      0|    }
  386|      2|    slot->freeSymKeysWithSessionHead = NULL;
  387|      2|    slot->freeSymKeysHead = NULL;
  388|      2|    slot->keyCount = 0;
  389|      2|    slot->maxKeyCount = 0;
  390|      2|    slot->functionList = NULL;
  391|      2|    slot->needTest = PR_TRUE;
  ------------------
  |  |  437|      2|#define PR_TRUE 1
  ------------------
  392|      2|    slot->isPerm = PR_FALSE;
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
  393|      2|    slot->isHW = PR_FALSE;
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
  394|      2|    slot->isInternal = PR_FALSE;
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
  395|      2|    slot->isThreadSafe = PR_FALSE;
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
  396|      2|    slot->disabled = PR_FALSE;
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
  397|      2|    slot->series = 1;
  398|      2|    slot->flagSeries = 0;
  399|      2|    slot->flagState = PR_FALSE;
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
  400|      2|    slot->wrapKey = 0;
  401|      2|    slot->wrapMechanism = CKM_INVALID_MECHANISM;
  ------------------
  |  |  155|      2|#define CKM_INVALID_MECHANISM 0xffffffffUL
  ------------------
  402|      2|    slot->refKeys[0] = CK_INVALID_HANDLE;
  ------------------
  |  |   78|      2|#define CK_INVALID_HANDLE 0
  ------------------
  403|      2|    slot->reason = PK11_DIS_NONE;
  404|      2|    slot->readOnly = PR_TRUE;
  ------------------
  |  |  437|      2|#define PR_TRUE 1
  ------------------
  405|      2|    slot->needLogin = PR_FALSE;
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
  406|      2|    slot->hasRandom = PR_FALSE;
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
  407|      2|    slot->defRWSession = PR_FALSE;
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
  408|      2|    slot->protectedAuthPath = PR_FALSE;
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
  409|      2|    slot->flags = 0;
  410|      2|    slot->session = CK_INVALID_HANDLE;
  ------------------
  |  |   78|      2|#define CK_INVALID_HANDLE 0
  ------------------
  411|      2|    slot->slotID = 0;
  412|      2|    slot->defaultFlags = 0;
  413|      2|    slot->refCount = 1;
  414|      2|    slot->askpw = 0;
  415|      2|    slot->timeout = 0;
  416|      2|    slot->mechanismList = NULL;
  417|      2|    slot->mechanismCount = 0;
  418|      2|    slot->cert_array = NULL;
  419|      2|    slot->cert_count = 0;
  420|      2|    slot->slot_name[0] = 0;
  421|      2|    slot->token_name[0] = 0;
  422|      2|    PORT_Memset(slot->serial, ' ', sizeof(slot->serial));
  ------------------
  |  |  182|      2|#define PORT_Memset memset
  ------------------
  423|      2|    PORT_Memset(&slot->tokenInfo, 0, sizeof(slot->tokenInfo));
  ------------------
  |  |  182|      2|#define PORT_Memset memset
  ------------------
  424|      2|    slot->module = NULL;
  425|      2|    slot->authTransact = 0;
  426|      2|    slot->authTime = LL_ZERO;
  ------------------
  |  |   41|      2|#define LL_ZERO     0L
  ------------------
  427|      2|    slot->minPassword = 0;
  428|      2|    slot->maxPassword = 0;
  429|      2|    slot->hasRootCerts = PR_FALSE;
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
  430|      2|    slot->hasRootTrust = PR_FALSE;
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
  431|      2|    slot->nssToken = NULL;
  432|      2|    slot->profileList = NULL;
  433|      2|    slot->profileCount = 0;
  434|      2|    return slot;
  435|      2|}
PK11_ReferenceSlot:
  440|  3.93M|{
  441|  3.93M|    PR_ATOMIC_INCREMENT(&slot->refCount);
  ------------------
  |  |  122|  3.93M|#define PR_ATOMIC_INCREMENT(val) __sync_add_and_fetch(val, 1)
  ------------------
  442|  3.93M|    return slot;
  443|  3.93M|}
PK11_DestroySlot:
  448|      2|{
  449|       |    /* free up the cached keys and sessions */
  450|      2|    PK11_CleanKeyList(slot);
  451|       |
  452|       |    /* free up all the sessions on this slot */
  453|      2|    if (slot->functionList) {
  ------------------
  |  Branch (453:9): [True: 2, False: 0]
  ------------------
  454|      2|        PK11_GETTAB(slot)
  ------------------
  |  |  102|      2|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
  455|      2|            ->C_CloseAllSessions(slot->slotID);
  456|      2|    }
  457|       |
  458|      2|    if (slot->mechanismList) {
  ------------------
  |  Branch (458:9): [True: 2, False: 0]
  ------------------
  459|      2|        PORT_Free(slot->mechanismList);
  ------------------
  |  |   60|      2|#define PORT_Free PORT_Free_Util
  ------------------
  460|      2|    }
  461|      2|    if (slot->profileList) {
  ------------------
  |  Branch (461:9): [True: 0, False: 2]
  ------------------
  462|      0|        PORT_Free(slot->profileList);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
  463|      0|    }
  464|      2|    if (slot->isThreadSafe && slot->sessionLock) {
  ------------------
  |  Branch (464:9): [True: 2, False: 0]
  |  Branch (464:31): [True: 2, False: 0]
  ------------------
  465|      2|        PZ_DestroyLock(slot->sessionLock);
  ------------------
  |  |  244|      2|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
  466|      2|    }
  467|      2|    slot->sessionLock = NULL;
  468|      2|    if (slot->freeListLock) {
  ------------------
  |  Branch (468:9): [True: 2, False: 0]
  ------------------
  469|      2|        PZ_DestroyLock(slot->freeListLock);
  ------------------
  |  |  244|      2|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
  470|      2|        slot->freeListLock = NULL;
  471|      2|    }
  472|      2|    if (slot->nssTokenLock) {
  ------------------
  |  Branch (472:9): [True: 2, False: 0]
  ------------------
  473|      2|        PZ_DestroyLock(slot->nssTokenLock);
  ------------------
  |  |  244|      2|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
  474|      2|        slot->nssTokenLock = NULL;
  475|      2|    }
  476|       |
  477|       |    /* finally Tell our parent module that we've gone away so it can unload */
  478|      2|    if (slot->module) {
  ------------------
  |  Branch (478:9): [True: 2, False: 0]
  ------------------
  479|      2|        SECMOD_SlotDestroyModule(slot->module, PR_TRUE);
  ------------------
  |  |  437|      2|#define PR_TRUE 1
  ------------------
  480|      2|    }
  481|       |
  482|       |    /* ok, well not quit finally... now we free the memory */
  483|      2|    PORT_Free(slot);
  ------------------
  |  |   60|      2|#define PORT_Free PORT_Free_Util
  ------------------
  484|      2|}
PK11_FreeSlot:
  489|  3.93M|{
  490|  3.93M|    if (PR_ATOMIC_DECREMENT(&slot->refCount) == 0) {
  ------------------
  |  |  123|  3.93M|#define PR_ATOMIC_DECREMENT(val) __sync_sub_and_fetch(val, 1)
  ------------------
  |  Branch (490:9): [True: 2, False: 3.93M]
  ------------------
  491|      2|        PK11_DestroySlot(slot);
  492|      2|    }
  493|  3.93M|}
PK11_EnterSlotMonitor:
  497|   109k|{
  498|   109k|    PZ_Lock(slot->sessionLock);
  ------------------
  |  |  245|   109k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
  499|   109k|}
PK11_ExitSlotMonitor:
  503|   109k|{
  504|   109k|    PZ_Unlock(slot->sessionLock);
  ------------------
  |  |  246|   109k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  505|   109k|}
PK11_InitSlotLists:
  831|      1|{
  832|      1|    pk11_InitSlotListStatic(&pk11_seedSlotList);
  833|      1|    pk11_InitSlotListStatic(&pk11_camelliaSlotList);
  834|      1|    pk11_InitSlotListStatic(&pk11_aesSlotList);
  835|      1|    pk11_InitSlotListStatic(&pk11_desSlotList);
  836|      1|    pk11_InitSlotListStatic(&pk11_rc4SlotList);
  837|      1|    pk11_InitSlotListStatic(&pk11_rc2SlotList);
  838|      1|    pk11_InitSlotListStatic(&pk11_rc5SlotList);
  839|      1|    pk11_InitSlotListStatic(&pk11_md5SlotList);
  840|      1|    pk11_InitSlotListStatic(&pk11_md2SlotList);
  841|      1|    pk11_InitSlotListStatic(&pk11_sha1SlotList);
  842|      1|    pk11_InitSlotListStatic(&pk11_rsaSlotList);
  843|      1|    pk11_InitSlotListStatic(&pk11_dsaSlotList);
  844|      1|    pk11_InitSlotListStatic(&pk11_dhSlotList);
  845|      1|    pk11_InitSlotListStatic(&pk11_ecSlotList);
  846|      1|    pk11_InitSlotListStatic(&pk11_ideaSlotList);
  847|      1|    pk11_InitSlotListStatic(&pk11_sslSlotList);
  848|      1|    pk11_InitSlotListStatic(&pk11_tlsSlotList);
  849|      1|    pk11_InitSlotListStatic(&pk11_randomSlotList);
  850|      1|    pk11_InitSlotListStatic(&pk11_sha256SlotList);
  851|      1|    pk11_InitSlotListStatic(&pk11_sha512SlotList);
  852|      1|    return SECSuccess;
  853|      1|}
PK11_DestroySlotLists:
  857|      1|{
  858|      1|    pk11_FreeSlotListStatic(&pk11_seedSlotList);
  859|      1|    pk11_FreeSlotListStatic(&pk11_camelliaSlotList);
  860|      1|    pk11_FreeSlotListStatic(&pk11_aesSlotList);
  861|      1|    pk11_FreeSlotListStatic(&pk11_desSlotList);
  862|      1|    pk11_FreeSlotListStatic(&pk11_rc4SlotList);
  863|      1|    pk11_FreeSlotListStatic(&pk11_rc2SlotList);
  864|      1|    pk11_FreeSlotListStatic(&pk11_rc5SlotList);
  865|      1|    pk11_FreeSlotListStatic(&pk11_md5SlotList);
  866|      1|    pk11_FreeSlotListStatic(&pk11_md2SlotList);
  867|      1|    pk11_FreeSlotListStatic(&pk11_sha1SlotList);
  868|      1|    pk11_FreeSlotListStatic(&pk11_rsaSlotList);
  869|      1|    pk11_FreeSlotListStatic(&pk11_dsaSlotList);
  870|      1|    pk11_FreeSlotListStatic(&pk11_dhSlotList);
  871|      1|    pk11_FreeSlotListStatic(&pk11_ecSlotList);
  872|      1|    pk11_FreeSlotListStatic(&pk11_ideaSlotList);
  873|      1|    pk11_FreeSlotListStatic(&pk11_sslSlotList);
  874|      1|    pk11_FreeSlotListStatic(&pk11_tlsSlotList);
  875|      1|    pk11_FreeSlotListStatic(&pk11_randomSlotList);
  876|      1|    pk11_FreeSlotListStatic(&pk11_sha256SlotList);
  877|      1|    pk11_FreeSlotListStatic(&pk11_sha512SlotList);
  878|      1|    return;
  879|      1|}
PK11_GetSlotList:
  884|  72.1k|{
  885|       |/* XXX a workaround for Bugzilla bug #55267 */
  886|       |#if defined(HPUX) && defined(__LP64__)
  887|       |    if (CKM_INVALID_MECHANISM == type)
  888|       |        return NULL;
  889|       |#endif
  890|  72.1k|    switch (type) {
  ------------------
  |  Branch (890:13): [True: 2.74k, False: 69.3k]
  ------------------
  891|      2|        case CKM_SEED_CBC:
  ------------------
  |  | 1157|      2|#define CKM_SEED_CBC 0x00000652UL
  ------------------
  |  Branch (891:9): [True: 2, False: 72.1k]
  ------------------
  892|      2|        case CKM_SEED_ECB:
  ------------------
  |  | 1156|      2|#define CKM_SEED_ECB 0x00000651UL
  ------------------
  |  Branch (892:9): [True: 0, False: 72.1k]
  ------------------
  893|      2|            return &pk11_seedSlotList;
  894|      2|        case CKM_CAMELLIA_CBC:
  ------------------
  |  | 1137|      2|#define CKM_CAMELLIA_CBC 0x00000552UL
  ------------------
  |  Branch (894:9): [True: 2, False: 72.1k]
  ------------------
  895|      2|        case CKM_CAMELLIA_ECB:
  ------------------
  |  | 1136|      2|#define CKM_CAMELLIA_ECB 0x00000551UL
  ------------------
  |  Branch (895:9): [True: 0, False: 72.1k]
  ------------------
  896|      2|            return &pk11_camelliaSlotList;
  897|      2|        case CKM_AES_CBC:
  ------------------
  |  | 1108|      2|#define CKM_AES_CBC 0x00001082UL
  ------------------
  |  Branch (897:9): [True: 2, False: 72.1k]
  ------------------
  898|      2|        case CKM_AES_CCM:
  ------------------
  |  | 1116|      2|#define CKM_AES_CCM 0x00001088UL
  ------------------
  |  Branch (898:9): [True: 0, False: 72.1k]
  ------------------
  899|      2|        case CKM_AES_CTR:
  ------------------
  |  | 1113|      2|#define CKM_AES_CTR 0x00001086UL
  ------------------
  |  Branch (899:9): [True: 0, False: 72.1k]
  ------------------
  900|      2|        case CKM_AES_CTS:
  ------------------
  |  | 1117|      2|#define CKM_AES_CTS 0x00001089UL
  ------------------
  |  Branch (900:9): [True: 0, False: 72.1k]
  ------------------
  901|      2|        case CKM_AES_GCM:
  ------------------
  |  | 1115|      2|#define CKM_AES_GCM 0x00001087UL
  ------------------
  |  Branch (901:9): [True: 0, False: 72.1k]
  ------------------
  902|      2|        case CKM_AES_ECB:
  ------------------
  |  | 1107|      2|#define CKM_AES_ECB 0x00001081UL
  ------------------
  |  Branch (902:9): [True: 0, False: 72.1k]
  ------------------
  903|      2|            return &pk11_aesSlotList;
  904|      2|        case CKM_DES_CBC:
  ------------------
  |  |  816|      2|#define CKM_DES_CBC 0x00000122UL
  ------------------
  |  Branch (904:9): [True: 2, False: 72.1k]
  ------------------
  905|      2|        case CKM_DES_ECB:
  ------------------
  |  |  815|      2|#define CKM_DES_ECB 0x00000121UL
  ------------------
  |  Branch (905:9): [True: 0, False: 72.1k]
  ------------------
  906|      2|        case CKM_DES3_ECB:
  ------------------
  |  |  825|      2|#define CKM_DES3_ECB 0x00000132UL
  ------------------
  |  Branch (906:9): [True: 0, False: 72.1k]
  ------------------
  907|      2|        case CKM_DES3_CBC:
  ------------------
  |  |  826|      2|#define CKM_DES3_CBC 0x00000133UL
  ------------------
  |  Branch (907:9): [True: 0, False: 72.1k]
  ------------------
  908|      2|            return &pk11_desSlotList;
  909|      2|        case CKM_RC4:
  ------------------
  |  |  813|      2|#define CKM_RC4 0x00000111UL
  ------------------
  |  Branch (909:9): [True: 2, False: 72.1k]
  ------------------
  910|      2|            return &pk11_rc4SlotList;
  911|      0|        case CKM_RC5_CBC:
  ------------------
  |  |  943|      0|#define CKM_RC5_CBC 0x00000332UL
  ------------------
  |  Branch (911:9): [True: 0, False: 72.1k]
  ------------------
  912|      0|            return &pk11_rc5SlotList;
  913|  15.0k|        case CKM_SHA_1:
  ------------------
  |  |  859|  15.0k|#define CKM_SHA_1 0x00000220UL
  ------------------
  |  Branch (913:9): [True: 15.0k, False: 57.0k]
  ------------------
  914|  15.0k|            return &pk11_sha1SlotList;
  915|      0|        case CKM_SHA224:
  ------------------
  |  |  887|      0|#define CKM_SHA224 0x00000255UL
  ------------------
  |  Branch (915:9): [True: 0, False: 72.1k]
  ------------------
  916|  11.0k|        case CKM_SHA256:
  ------------------
  |  |  876|  11.0k|#define CKM_SHA256 0x00000250UL
  ------------------
  |  Branch (916:9): [True: 11.0k, False: 61.0k]
  ------------------
  917|  11.0k|        case CKM_SHA3_224:
  ------------------
  |  |  902|  11.0k|#define CKM_SHA3_224 0x000002B5UL
  ------------------
  |  Branch (917:9): [True: 0, False: 72.1k]
  ------------------
  918|  11.0k|        case CKM_SHA3_256:
  ------------------
  |  |  898|  11.0k|#define CKM_SHA3_256 0x000002B0UL
  ------------------
  |  Branch (918:9): [True: 0, False: 72.1k]
  ------------------
  919|  11.0k|            return &pk11_sha256SlotList;
  920|  6.53k|        case CKM_SHA384:
  ------------------
  |  |  879|  6.53k|#define CKM_SHA384 0x00000260UL
  ------------------
  |  Branch (920:9): [True: 6.53k, False: 65.6k]
  ------------------
  921|  7.12k|        case CKM_SHA512:
  ------------------
  |  |  882|  7.12k|#define CKM_SHA512 0x00000270UL
  ------------------
  |  Branch (921:9): [True: 591, False: 71.5k]
  ------------------
  922|  7.12k|        case CKM_SHA3_384:
  ------------------
  |  |  906|  7.12k|#define CKM_SHA3_384 0x000002C0UL
  ------------------
  |  Branch (922:9): [True: 0, False: 72.1k]
  ------------------
  923|  7.12k|        case CKM_SHA3_512:
  ------------------
  |  |  910|  7.12k|#define CKM_SHA3_512 0x000002D0UL
  ------------------
  |  Branch (923:9): [True: 0, False: 72.1k]
  ------------------
  924|  7.12k|            return &pk11_sha512SlotList;
  925|    270|        case CKM_MD5:
  ------------------
  |  |  853|    270|#define CKM_MD5 0x00000210UL
  ------------------
  |  Branch (925:9): [True: 270, False: 71.8k]
  ------------------
  926|    270|            return &pk11_md5SlotList;
  927|      2|        case CKM_MD2:
  ------------------
  |  |  847|      2|#define CKM_MD2 0x00000200UL
  ------------------
  |  Branch (927:9): [True: 2, False: 72.1k]
  ------------------
  928|      2|            return &pk11_md2SlotList;
  929|      0|        case CKM_RC2_ECB:
  ------------------
  |  |  804|      0|#define CKM_RC2_ECB 0x00000101UL
  ------------------
  |  Branch (929:9): [True: 0, False: 72.1k]
  ------------------
  930|      2|        case CKM_RC2_CBC:
  ------------------
  |  |  805|      2|#define CKM_RC2_CBC 0x00000102UL
  ------------------
  |  Branch (930:9): [True: 2, False: 72.1k]
  ------------------
  931|      2|            return &pk11_rc2SlotList;
  932|     31|        case CKM_RSA_PKCS:
  ------------------
  |  |  720|     31|#define CKM_RSA_PKCS 0x00000001UL
  ------------------
  |  Branch (932:9): [True: 31, False: 72.1k]
  ------------------
  933|     31|        case CKM_RSA_PKCS_KEY_PAIR_GEN:
  ------------------
  |  |  719|     31|#define CKM_RSA_PKCS_KEY_PAIR_GEN 0x00000000UL
  ------------------
  |  Branch (933:9): [True: 0, False: 72.1k]
  ------------------
  934|     31|        case CKM_RSA_X_509:
  ------------------
  |  |  722|     31|#define CKM_RSA_X_509 0x00000003UL
  ------------------
  |  Branch (934:9): [True: 0, False: 72.1k]
  ------------------
  935|     31|            return &pk11_rsaSlotList;
  936|  1.13k|        case CKM_DSA:
  ------------------
  |  |  745|  1.13k|#define CKM_DSA 0x00000011UL
  ------------------
  |  Branch (936:9): [True: 1.13k, False: 71.0k]
  ------------------
  937|  1.13k|            return &pk11_dsaSlotList;
  938|  1.13k|        case CKM_DH_PKCS_KEY_PAIR_GEN:
  ------------------
  |  |  758|  1.13k|#define CKM_DH_PKCS_KEY_PAIR_GEN 0x00000020UL
  ------------------
  |  Branch (938:9): [True: 1.13k, False: 71.0k]
  ------------------
  939|  1.13k|        case CKM_DH_PKCS_DERIVE:
  ------------------
  |  |  759|  1.13k|#define CKM_DH_PKCS_DERIVE 0x00000021UL
  ------------------
  |  Branch (939:9): [True: 2, False: 72.1k]
  ------------------
  940|  1.13k|            return &pk11_dhSlotList;
  941|      2|        case CKM_EDDSA:
  ------------------
  |  | 1174|      2|#define CKM_EDDSA 0x00001057UL
  ------------------
  |  Branch (941:9): [True: 2, False: 72.1k]
  ------------------
  942|      2|        case CKM_EC_EDWARDS_KEY_PAIR_GEN:
  ------------------
  |  | 1172|      2|#define CKM_EC_EDWARDS_KEY_PAIR_GEN 0x00001055UL
  ------------------
  |  Branch (942:9): [True: 0, False: 72.1k]
  ------------------
  943|     24|        case CKM_ECDSA:
  ------------------
  |  | 1074|     24|#define CKM_ECDSA 0x00001041UL
  ------------------
  |  Branch (943:9): [True: 22, False: 72.1k]
  ------------------
  944|     69|        case CKM_ECDSA_SHA1:
  ------------------
  |  | 1075|     69|#define CKM_ECDSA_SHA1 0x00001042UL
  ------------------
  |  Branch (944:9): [True: 45, False: 72.0k]
  ------------------
  945|     69|        case CKM_EC_KEY_PAIR_GEN: /* aka CKM_ECDSA_KEY_PAIR_GEN */
  ------------------
  |  | 1072|     69|#define CKM_EC_KEY_PAIR_GEN 0x00001040UL
  ------------------
  |  Branch (945:9): [True: 0, False: 72.1k]
  ------------------
  946|     69|        case CKM_NSS_ECDHE_NO_PAIRWISE_CHECK_KEY_PAIR_GEN:
  ------------------
  |  |  274|     69|#define CKM_NSS_ECDHE_NO_PAIRWISE_CHECK_KEY_PAIR_GEN (CKM_NSS + 47)
  |  |  ------------------
  |  |  |  |  162|     69|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|     69|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     69|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (946:9): [True: 0, False: 72.1k]
  ------------------
  947|  12.5k|        case CKM_ECDH1_DERIVE:
  ------------------
  |  | 1086|  12.5k|#define CKM_ECDH1_DERIVE 0x00001050UL
  ------------------
  |  Branch (947:9): [True: 12.4k, False: 59.6k]
  ------------------
  948|  12.5k|        case CKM_NSS_KYBER_KEY_PAIR_GEN: /* Bug 1893029 */
  ------------------
  |  |  267|  12.5k|#define CKM_NSS_KYBER_KEY_PAIR_GEN (CKM_NSS + 45)
  |  |  ------------------
  |  |  |  |  162|  12.5k|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|  12.5k|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  12.5k|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (948:9): [True: 0, False: 72.1k]
  ------------------
  949|  12.5k|        case CKM_NSS_KYBER:
  ------------------
  |  |  268|  12.5k|#define CKM_NSS_KYBER (CKM_NSS + 46)
  |  |  ------------------
  |  |  |  |  162|  12.5k|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|  12.5k|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  12.5k|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (949:9): [True: 0, False: 72.1k]
  ------------------
  950|  12.5k|        case CKM_NSS_ML_KEM_KEY_PAIR_GEN: /* Bug 1893029 */
  ------------------
  |  |  277|  12.5k|#define CKM_NSS_ML_KEM_KEY_PAIR_GEN (CKM_NSS + 48)
  |  |  ------------------
  |  |  |  |  162|  12.5k|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|  12.5k|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  12.5k|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (950:9): [True: 40, False: 72.0k]
  ------------------
  951|  12.5k|        case CKM_NSS_ML_KEM:
  ------------------
  |  |  278|  12.5k|#define CKM_NSS_ML_KEM (CKM_NSS + 49)
  |  |  ------------------
  |  |  |  |  162|  12.5k|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|  12.5k|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  12.5k|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (951:9): [True: 0, False: 72.1k]
  ------------------
  952|  12.5k|            return &pk11_ecSlotList;
  953|  1.81k|        case CKM_SSL3_PRE_MASTER_KEY_GEN:
  ------------------
  |  |  959|  1.81k|#define CKM_SSL3_PRE_MASTER_KEY_GEN 0x00000370UL
  ------------------
  |  Branch (953:9): [True: 1.81k, False: 70.3k]
  ------------------
  954|  1.81k|        case CKM_SSL3_MASTER_KEY_DERIVE:
  ------------------
  |  |  960|  1.81k|#define CKM_SSL3_MASTER_KEY_DERIVE 0x00000371UL
  ------------------
  |  Branch (954:9): [True: 0, False: 72.1k]
  ------------------
  955|  1.81k|        case CKM_SSL3_SHA1_MAC:
  ------------------
  |  |  976|  1.81k|#define CKM_SSL3_SHA1_MAC 0x00000381UL
  ------------------
  |  Branch (955:9): [True: 0, False: 72.1k]
  ------------------
  956|  1.81k|        case CKM_SSL3_MD5_MAC:
  ------------------
  |  |  975|  1.81k|#define CKM_SSL3_MD5_MAC 0x00000380UL
  ------------------
  |  Branch (956:9): [True: 0, False: 72.1k]
  ------------------
  957|  1.81k|            return &pk11_sslSlotList;
  958|      2|        case CKM_TLS_MASTER_KEY_DERIVE:
  ------------------
  |  |  968|      2|#define CKM_TLS_MASTER_KEY_DERIVE 0x00000375UL
  ------------------
  |  Branch (958:9): [True: 2, False: 72.1k]
  ------------------
  959|      2|        case CKM_TLS_KEY_AND_MAC_DERIVE:
  ------------------
  |  |  969|      2|#define CKM_TLS_KEY_AND_MAC_DERIVE 0x00000376UL
  ------------------
  |  Branch (959:9): [True: 0, False: 72.1k]
  ------------------
  960|      2|        case CKM_NSS_TLS_KEY_AND_MAC_DERIVE_SHA256:
  ------------------
  |  |  235|      2|#define CKM_NSS_TLS_KEY_AND_MAC_DERIVE_SHA256 (CKM_NSS + 23)
  |  |  ------------------
  |  |  |  |  162|      2|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      2|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      2|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (960:9): [True: 0, False: 72.1k]
  ------------------
  961|      2|            return &pk11_tlsSlotList;
  962|      0|        case CKM_IDEA_CBC:
  ------------------
  |  |  949|      0|#define CKM_IDEA_CBC 0x00000342UL
  ------------------
  |  Branch (962:9): [True: 0, False: 72.1k]
  ------------------
  963|      0|        case CKM_IDEA_ECB:
  ------------------
  |  |  948|      0|#define CKM_IDEA_ECB 0x00000341UL
  ------------------
  |  Branch (963:9): [True: 0, False: 72.1k]
  ------------------
  964|      0|            return &pk11_ideaSlotList;
  965|  19.1k|        case CKM_FAKE_RANDOM:
  ------------------
  |  |  154|  19.1k|#define CKM_FAKE_RANDOM 0x80000efeUL
  ------------------
  |  Branch (965:9): [True: 19.1k, False: 53.0k]
  ------------------
  966|  19.1k|            return &pk11_randomSlotList;
  967|  72.1k|    }
  968|  2.74k|    return NULL;
  969|  72.1k|}
PK11_LoadSlotList:
  978|      2|{
  979|      2|    int i;
  980|       |
  981|      3|    for (i = 0; i < count; i++) {
  ------------------
  |  Branch (981:17): [True: 2, False: 1]
  ------------------
  982|      2|        if (psi[i].slotID == slot->slotID)
  ------------------
  |  Branch (982:13): [True: 1, False: 1]
  ------------------
  983|      1|            break;
  984|      2|    }
  985|       |
  986|      2|    if (i == count)
  ------------------
  |  Branch (986:9): [True: 1, False: 1]
  ------------------
  987|      1|        return;
  988|       |
  989|      1|    slot->defaultFlags = psi[i].defaultFlags;
  990|      1|    slot->askpw = psi[i].askpw;
  991|      1|    slot->timeout = psi[i].timeout;
  992|      1|    slot->hasRootCerts = psi[i].hasRootCerts;
  993|       |
  994|       |    /* if the slot is already disabled, don't load them into the
  995|       |     * default slot lists. We get here so we can save the default
  996|       |     * list value. */
  997|      1|    if (slot->disabled)
  ------------------
  |  Branch (997:9): [True: 0, False: 1]
  ------------------
  998|      0|        return;
  999|       |
 1000|       |    /* if the user has disabled us, don't load us in */
 1001|      1|    if (slot->defaultFlags & PK11_DISABLE_FLAG) {
  ------------------
  |  |   37|      1|#define PK11_DISABLE_FLAG 0x40000000L
  ------------------
  |  Branch (1001:9): [True: 0, False: 1]
  ------------------
 1002|      0|        slot->disabled = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 1003|      0|        slot->reason = PK11_DIS_USER_SELECTED;
 1004|       |        /* free up sessions and things?? */
 1005|      0|        return;
 1006|      0|    }
 1007|       |
 1008|     23|    for (i = 0; i < num_pk11_default_mechanisms; i++) {
  ------------------
  |  Branch (1008:17): [True: 22, False: 1]
  ------------------
 1009|     22|        if (slot->defaultFlags & PK11_DefaultArray[i].flag) {
  ------------------
  |  Branch (1009:13): [True: 18, False: 4]
  ------------------
 1010|     18|            CK_MECHANISM_TYPE mechanism = PK11_DefaultArray[i].mechanism;
 1011|     18|            PK11SlotList *slotList = PK11_GetSlotList(mechanism);
 1012|       |
 1013|     18|            if (slotList)
  ------------------
  |  Branch (1013:17): [True: 18, False: 0]
  ------------------
 1014|     18|                PK11_AddSlotToList(slotList, slot, PR_FALSE);
  ------------------
  |  |  438|     18|#define PR_FALSE 0
  ------------------
 1015|     18|        }
 1016|     22|    }
 1017|       |
 1018|      1|    return;
 1019|      1|}
PK11_ClearSlotList:
 1065|      2|{
 1066|      2|    int i;
 1067|       |
 1068|      2|    if (slot->disabled)
  ------------------
  |  Branch (1068:9): [True: 0, False: 2]
  ------------------
 1069|      0|        return;
 1070|      2|    if (slot->defaultFlags == 0)
  ------------------
  |  Branch (1070:9): [True: 1, False: 1]
  ------------------
 1071|      1|        return;
 1072|       |
 1073|     23|    for (i = 0; i < num_pk11_default_mechanisms; i++) {
  ------------------
  |  Branch (1073:17): [True: 22, False: 1]
  ------------------
 1074|     22|        if (slot->defaultFlags & PK11_DefaultArray[i].flag) {
  ------------------
  |  Branch (1074:13): [True: 18, False: 4]
  ------------------
 1075|     18|            CK_MECHANISM_TYPE mechanism = PK11_DefaultArray[i].mechanism;
 1076|     18|            PK11SlotList *slotList = PK11_GetSlotList(mechanism);
 1077|     18|            PK11SlotListElement *le = NULL;
 1078|       |
 1079|     18|            if (slotList)
  ------------------
  |  Branch (1079:17): [True: 18, False: 0]
  ------------------
 1080|     18|                le = PK11_FindSlotElement(slotList, slot);
 1081|       |
 1082|     18|            if (le) {
  ------------------
  |  Branch (1082:17): [True: 18, False: 0]
  ------------------
 1083|     18|                PK11_DeleteSlotFromList(slotList, le);
 1084|     18|                PK11_FreeSlotListElement(slotList, le);
 1085|     18|            }
 1086|     18|        }
 1087|     22|    }
 1088|      1|}
PK11_MakeString:
 1099|      4|{
 1100|      4|    int i;
 1101|      4|    char *newString;
 1102|     71|    for (i = (stringLen - 1); i >= 0; i--) {
  ------------------
  |  Branch (1102:31): [True: 71, False: 0]
  ------------------
 1103|     71|        if (staticString[i] != ' ')
  ------------------
  |  Branch (1103:13): [True: 4, False: 67]
  ------------------
 1104|      4|            break;
 1105|     71|    }
 1106|       |    /* move i to point to the last space */
 1107|      4|    i++;
 1108|      4|    if (arena) {
  ------------------
  |  Branch (1108:9): [True: 0, False: 4]
  ------------------
 1109|      0|        newString = (char *)PORT_ArenaAlloc(arena, i + 1 /* space for NULL */);
  ------------------
  |  |   53|      0|#define PORT_ArenaAlloc PORT_ArenaAlloc_Util
  ------------------
 1110|      4|    } else if (space) {
  ------------------
  |  Branch (1110:16): [True: 4, False: 0]
  ------------------
 1111|      4|        newString = space;
 1112|      4|    } else {
 1113|      0|        newString = (char *)PORT_Alloc(i + 1 /* space for NULL */);
  ------------------
  |  |   52|      0|#define PORT_Alloc PORT_Alloc_Util
  ------------------
 1114|      0|    }
 1115|      4|    if (newString == NULL)
  ------------------
  |  Branch (1115:9): [True: 0, False: 4]
  ------------------
 1116|      0|        return NULL;
 1117|       |
 1118|      4|    if (i)
  ------------------
  |  Branch (1118:9): [True: 4, False: 0]
  ------------------
 1119|      4|        PORT_Memcpy(newString, staticString, i);
  ------------------
  |  |  180|      4|#define PORT_Memcpy memcpy
  ------------------
 1120|      4|    newString[i] = 0;
 1121|       |
 1122|      4|    return newString;
 1123|      4|}
PK11_ReadMechanismList:
 1153|      2|{
 1154|      2|    CK_ULONG count;
 1155|      2|    CK_RV crv;
 1156|      2|    PRUint32 i;
 1157|       |
 1158|      2|    if (slot->mechanismList) {
  ------------------
  |  Branch (1158:9): [True: 0, False: 2]
  ------------------
 1159|      0|        PORT_Free(slot->mechanismList);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 1160|      0|        slot->mechanismList = NULL;
 1161|      0|    }
 1162|      2|    slot->mechanismCount = 0;
 1163|       |
 1164|      2|    if (!slot->isThreadSafe)
  ------------------
  |  Branch (1164:9): [True: 0, False: 2]
  ------------------
 1165|      0|        PK11_EnterSlotMonitor(slot);
 1166|      2|    crv = PK11_GETTAB(slot)->C_GetMechanismList(slot->slotID, NULL, &count);
  ------------------
  |  |  102|      2|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1167|      2|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|      2|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1167:9): [True: 0, False: 2]
  ------------------
 1168|      0|        if (!slot->isThreadSafe)
  ------------------
  |  Branch (1168:13): [True: 0, False: 0]
  ------------------
 1169|      0|            PK11_ExitSlotMonitor(slot);
 1170|      0|        PORT_SetError(PK11_MapError(crv));
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1171|      0|        return SECFailure;
 1172|      0|    }
 1173|       |
 1174|      2|    slot->mechanismList = (CK_MECHANISM_TYPE *)
 1175|      2|        PORT_Alloc(count * sizeof(CK_MECHANISM_TYPE));
  ------------------
  |  |   52|      2|#define PORT_Alloc PORT_Alloc_Util
  ------------------
 1176|      2|    if (slot->mechanismList == NULL) {
  ------------------
  |  Branch (1176:9): [True: 0, False: 2]
  ------------------
 1177|      0|        if (!slot->isThreadSafe)
  ------------------
  |  Branch (1177:13): [True: 0, False: 0]
  ------------------
 1178|      0|            PK11_ExitSlotMonitor(slot);
 1179|      0|        return SECFailure;
 1180|      0|    }
 1181|      2|    crv = PK11_GETTAB(slot)->C_GetMechanismList(slot->slotID,
  ------------------
  |  |  102|      2|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1182|      2|                                                slot->mechanismList, &count);
 1183|      2|    if (!slot->isThreadSafe)
  ------------------
  |  Branch (1183:9): [True: 0, False: 2]
  ------------------
 1184|      0|        PK11_ExitSlotMonitor(slot);
 1185|      2|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|      2|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1185:9): [True: 0, False: 2]
  ------------------
 1186|      0|        PORT_Free(slot->mechanismList);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 1187|      0|        slot->mechanismList = NULL;
 1188|      0|        PORT_SetError(PK11_MapError(crv));
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1189|      0|        return SECSuccess;
 1190|      0|    }
 1191|      2|    slot->mechanismCount = count;
 1192|      2|    PORT_Memset(slot->mechanismBits, 0, sizeof(slot->mechanismBits));
  ------------------
  |  |  182|      2|#define PORT_Memset memset
  ------------------
 1193|       |
 1194|    409|    for (i = 0; i < count; i++) {
  ------------------
  |  Branch (1194:17): [True: 407, False: 2]
  ------------------
 1195|    407|        CK_MECHANISM_TYPE mech = slot->mechanismList[i];
 1196|    407|        if (mech < 0x7ff) {
  ------------------
  |  Branch (1196:13): [True: 240, False: 167]
  ------------------
 1197|    240|            slot->mechanismBits[mech & 0xff] |= 1 << (mech >> 8);
 1198|    240|        }
 1199|    407|    }
 1200|      2|    return SECSuccess;
 1201|      2|}
PK11_InitToken:
 1281|      2|{
 1282|      2|    CK_RV crv;
 1283|      2|    SECStatus rv;
 1284|      2|    PRStatus status;
 1285|      2|    NSSToken *nssToken;
 1286|       |
 1287|       |    /* set the slot flags to the current token values */
 1288|      2|    if (!slot->isThreadSafe)
  ------------------
  |  Branch (1288:9): [True: 0, False: 2]
  ------------------
 1289|      0|        PK11_EnterSlotMonitor(slot);
 1290|      2|    crv = PK11_GETTAB(slot)->C_GetTokenInfo(slot->slotID, &slot->tokenInfo);
  ------------------
  |  |  102|      2|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1291|      2|    if (!slot->isThreadSafe)
  ------------------
  |  Branch (1291:9): [True: 0, False: 2]
  ------------------
 1292|      0|        PK11_ExitSlotMonitor(slot);
 1293|      2|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|      2|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1293:9): [True: 0, False: 2]
  ------------------
 1294|      0|        PORT_SetError(PK11_MapError(crv));
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1295|      0|        return SECFailure;
 1296|      0|    }
 1297|       |
 1298|       |    /* set the slot flags to the current token values */
 1299|      2|    slot->series++; /* allow other objects to detect that the
 1300|       |                     * slot is different */
 1301|      2|    slot->flags = slot->tokenInfo.flags;
 1302|      2|    slot->needLogin = ((slot->tokenInfo.flags & CKF_LOGIN_REQUIRED) ? PR_TRUE : PR_FALSE);
  ------------------
  |  |  176|      2|#define CKF_LOGIN_REQUIRED 0x00000004UL       /* user must \
  ------------------
                  slot->needLogin = ((slot->tokenInfo.flags & CKF_LOGIN_REQUIRED) ? PR_TRUE : PR_FALSE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
                  slot->needLogin = ((slot->tokenInfo.flags & CKF_LOGIN_REQUIRED) ? PR_TRUE : PR_FALSE);
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
  |  Branch (1302:24): [True: 0, False: 2]
  ------------------
 1303|      2|    slot->readOnly = ((slot->tokenInfo.flags & CKF_WRITE_PROTECTED) ? PR_TRUE : PR_FALSE);
  ------------------
  |  |  173|      2|#define CKF_WRITE_PROTECTED 0x00000002UL      /* token is \
  ------------------
                  slot->readOnly = ((slot->tokenInfo.flags & CKF_WRITE_PROTECTED) ? PR_TRUE : PR_FALSE);
  ------------------
  |  |  437|      2|#define PR_TRUE 1
  ------------------
                  slot->readOnly = ((slot->tokenInfo.flags & CKF_WRITE_PROTECTED) ? PR_TRUE : PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  |  Branch (1303:23): [True: 2, False: 0]
  ------------------
 1304|       |
 1305|      2|    slot->hasRandom = ((slot->tokenInfo.flags & CKF_RNG) ? PR_TRUE : PR_FALSE);
  ------------------
  |  |  171|      2|#define CKF_RNG 0x00000001UL                  /* has random # \
  ------------------
                  slot->hasRandom = ((slot->tokenInfo.flags & CKF_RNG) ? PR_TRUE : PR_FALSE);
  ------------------
  |  |  437|      2|#define PR_TRUE 1
  ------------------
                  slot->hasRandom = ((slot->tokenInfo.flags & CKF_RNG) ? PR_TRUE : PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  |  Branch (1305:24): [True: 2, False: 0]
  ------------------
 1306|      2|    slot->protectedAuthPath =
 1307|      2|        ((slot->tokenInfo.flags & CKF_PROTECTED_AUTHENTICATION_PATH)
  ------------------
  |  |  195|      2|#define CKF_PROTECTED_AUTHENTICATION_PATH 0x00000100UL
  ------------------
  |  Branch (1307:10): [True: 0, False: 2]
  ------------------
 1308|      2|             ? PR_TRUE
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 1309|      2|             : PR_FALSE);
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
 1310|      2|    slot->lastLoginCheck = 0;
 1311|      2|    slot->lastState = 0;
 1312|       |    /* on some platforms Active Card incorrectly sets the
 1313|       |     * CKF_PROTECTED_AUTHENTICATION_PATH bit when it doesn't mean to. */
 1314|      2|    if (slot->isActiveCard) {
  ------------------
  |  Branch (1314:9): [True: 0, False: 2]
  ------------------
 1315|      0|        slot->protectedAuthPath = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 1316|      0|    }
 1317|      2|    (void)PK11_MakeString(NULL, slot->token_name,
 1318|      2|                          (char *)slot->tokenInfo.label, sizeof(slot->tokenInfo.label));
 1319|      2|    slot->minPassword = slot->tokenInfo.ulMinPinLen;
 1320|      2|    slot->maxPassword = slot->tokenInfo.ulMaxPinLen;
 1321|      2|    PORT_Memcpy(slot->serial, slot->tokenInfo.serialNumber, sizeof(slot->serial));
  ------------------
  |  |  180|      2|#define PORT_Memcpy memcpy
  ------------------
 1322|       |
 1323|      2|    nssToken = PK11Slot_GetNSSToken(slot);
 1324|      2|    nssToken_UpdateName(nssToken); /* null token is OK */
 1325|      2|    (void)nssToken_Destroy(nssToken);
 1326|       |
 1327|      2|    slot->defRWSession = (PRBool)((!slot->readOnly) &&
  ------------------
  |  Branch (1327:35): [True: 0, False: 2]
  ------------------
 1328|      2|                                  (slot->tokenInfo.ulMaxSessionCount == 1));
  ------------------
  |  Branch (1328:35): [True: 0, False: 0]
  ------------------
 1329|      2|    rv = PK11_ReadMechanismList(slot);
 1330|      2|    if (rv != SECSuccess)
  ------------------
  |  Branch (1330:9): [True: 0, False: 2]
  ------------------
 1331|      0|        return rv;
 1332|       |
 1333|      2|    slot->hasRSAInfo = PR_FALSE;
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
 1334|      2|    slot->RSAInfoFlags = 0;
 1335|       |
 1336|       |    /* initialize the maxKeyCount value */
 1337|      2|    if (slot->tokenInfo.ulMaxSessionCount == 0) {
  ------------------
  |  Branch (1337:9): [True: 2, False: 0]
  ------------------
 1338|      2|        slot->maxKeyCount = 800; /* should be #define or a config param */
 1339|      2|    } else if (slot->tokenInfo.ulMaxSessionCount < 20) {
  ------------------
  |  Branch (1339:16): [True: 0, False: 0]
  ------------------
 1340|       |        /* don't have enough sessions to keep that many keys around */
 1341|      0|        slot->maxKeyCount = 0;
 1342|      0|    } else {
 1343|      0|        slot->maxKeyCount = slot->tokenInfo.ulMaxSessionCount / 2;
 1344|      0|    }
 1345|       |
 1346|       |    /* Make sure our session handle is valid */
 1347|      2|    if (slot->session == CK_INVALID_HANDLE) {
  ------------------
  |  |   78|      2|#define CK_INVALID_HANDLE 0
  ------------------
  |  Branch (1347:9): [True: 2, False: 0]
  ------------------
 1348|       |        /* we know we don't have a valid session, go get one */
 1349|      2|        CK_SESSION_HANDLE session;
 1350|       |
 1351|       |        /* session should be Readonly, serial */
 1352|      2|        if (!slot->isThreadSafe)
  ------------------
  |  Branch (1352:13): [True: 0, False: 2]
  ------------------
 1353|      0|            PK11_EnterSlotMonitor(slot);
 1354|      2|        crv = PK11_GETTAB(slot)->C_OpenSession(slot->slotID,
  ------------------
  |  |  102|      2|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1355|      2|                                               (slot->defRWSession ? CKF_RW_SESSION : 0) | CKF_SERIAL_SESSION,
  ------------------
  |  |  302|      0|#define CKF_RW_SESSION 0x00000002UL     /* session is r/w */
  ------------------
                                                             (slot->defRWSession ? CKF_RW_SESSION : 0) | CKF_SERIAL_SESSION,
  ------------------
  |  |  303|      2|#define CKF_SERIAL_SESSION 0x00000004UL /* no parallel */
  ------------------
  |  Branch (1355:49): [True: 0, False: 2]
  ------------------
 1356|      2|                                               slot, pk11_notify, &session);
 1357|      2|        if (!slot->isThreadSafe)
  ------------------
  |  Branch (1357:13): [True: 0, False: 2]
  ------------------
 1358|      0|            PK11_ExitSlotMonitor(slot);
 1359|      2|        if (crv != CKR_OK) {
  ------------------
  |  | 1388|      2|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1359:13): [True: 0, False: 2]
  ------------------
 1360|      0|            PORT_SetError(PK11_MapError(crv));
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1361|      0|            return SECFailure;
 1362|      0|        }
 1363|      2|        slot->session = session;
 1364|      2|    } else {
 1365|       |        /* The session we have may be defunct (the token associated with it)
 1366|       |         * has been removed   */
 1367|      0|        CK_SESSION_INFO sessionInfo;
 1368|       |
 1369|      0|        if (!slot->isThreadSafe)
  ------------------
  |  Branch (1369:13): [True: 0, False: 0]
  ------------------
 1370|      0|            PK11_EnterSlotMonitor(slot);
 1371|      0|        crv = PK11_GETTAB(slot)->C_GetSessionInfo(slot->session, &sessionInfo);
  ------------------
  |  |  102|      0|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1372|      0|        if (crv == CKR_DEVICE_ERROR) {
  ------------------
  |  | 1416|      0|#define CKR_DEVICE_ERROR 0x00000030UL
  ------------------
  |  Branch (1372:13): [True: 0, False: 0]
  ------------------
 1373|      0|            PK11_GETTAB(slot)
  ------------------
  |  |  102|      0|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1374|      0|                ->C_CloseSession(slot->session);
 1375|      0|            crv = CKR_SESSION_CLOSED;
  ------------------
  |  | 1463|      0|#define CKR_SESSION_CLOSED 0x000000B0UL
  ------------------
 1376|      0|        }
 1377|      0|        if ((crv == CKR_SESSION_CLOSED) || (crv == CKR_SESSION_HANDLE_INVALID)) {
  ------------------
  |  | 1463|      0|#define CKR_SESSION_CLOSED 0x000000B0UL
  ------------------
                      if ((crv == CKR_SESSION_CLOSED) || (crv == CKR_SESSION_HANDLE_INVALID)) {
  ------------------
  |  | 1465|      0|#define CKR_SESSION_HANDLE_INVALID 0x000000B3UL
  ------------------
  |  Branch (1377:13): [True: 0, False: 0]
  |  Branch (1377:44): [True: 0, False: 0]
  ------------------
 1378|      0|            crv = PK11_GETTAB(slot)->C_OpenSession(slot->slotID,
  ------------------
  |  |  102|      0|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1379|      0|                                                   (slot->defRWSession ? CKF_RW_SESSION : 0) | CKF_SERIAL_SESSION,
  ------------------
  |  |  302|      0|#define CKF_RW_SESSION 0x00000002UL     /* session is r/w */
  ------------------
                                                                 (slot->defRWSession ? CKF_RW_SESSION : 0) | CKF_SERIAL_SESSION,
  ------------------
  |  |  303|      0|#define CKF_SERIAL_SESSION 0x00000004UL /* no parallel */
  ------------------
  |  Branch (1379:53): [True: 0, False: 0]
  ------------------
 1380|      0|                                                   slot, pk11_notify, &slot->session);
 1381|      0|            if (crv != CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1381:17): [True: 0, False: 0]
  ------------------
 1382|      0|                PORT_SetError(PK11_MapError(crv));
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1383|      0|                slot->session = CK_INVALID_HANDLE;
  ------------------
  |  |   78|      0|#define CK_INVALID_HANDLE 0
  ------------------
 1384|      0|                if (!slot->isThreadSafe)
  ------------------
  |  Branch (1384:21): [True: 0, False: 0]
  ------------------
 1385|      0|                    PK11_ExitSlotMonitor(slot);
 1386|      0|                return SECFailure;
 1387|      0|            }
 1388|      0|        }
 1389|      0|        if (!slot->isThreadSafe)
  ------------------
  |  Branch (1389:13): [True: 0, False: 0]
  ------------------
 1390|      0|            PK11_ExitSlotMonitor(slot);
 1391|      0|    }
 1392|       |
 1393|      2|    nssToken = PK11Slot_GetNSSToken(slot);
 1394|      2|    status = nssToken_Refresh(nssToken); /* null token is OK */
 1395|      2|    (void)nssToken_Destroy(nssToken);
 1396|      2|    if (status != PR_SUCCESS)
  ------------------
  |  Branch (1396:9): [True: 0, False: 2]
  ------------------
 1397|      0|        return SECFailure;
 1398|       |
 1399|       |    /* Not all tokens have profile objects or even recognize what profile
 1400|       |     * objects are it's OK for pk11_ReadProfileList to fail */
 1401|      2|    (void)pk11_ReadProfileList(slot);
 1402|       |
 1403|      2|    if (!(slot->isInternal) && (slot->hasRandom)) {
  ------------------
  |  Branch (1403:9): [True: 0, False: 2]
  |  Branch (1403:32): [True: 0, False: 0]
  ------------------
 1404|       |        /* if this slot has a random number generater, use it to add entropy
 1405|       |         * to the internal slot. */
 1406|      0|        PK11SlotInfo *int_slot = PK11_GetInternalSlot();
 1407|       |
 1408|      0|        if (int_slot) {
  ------------------
  |  Branch (1408:13): [True: 0, False: 0]
  ------------------
 1409|      0|            unsigned char random_bytes[32];
 1410|       |
 1411|       |            /* if this slot can issue random numbers, get some entropy from
 1412|       |             * that random number generater and give it to our internal token.
 1413|       |             */
 1414|      0|            PK11_EnterSlotMonitor(slot);
 1415|      0|            crv = PK11_GETTAB(slot)->C_GenerateRandom(slot->session, random_bytes, sizeof(random_bytes));
  ------------------
  |  |  102|      0|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1416|      0|            PK11_ExitSlotMonitor(slot);
 1417|      0|            if (crv == CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1417:17): [True: 0, False: 0]
  ------------------
 1418|      0|                PK11_EnterSlotMonitor(int_slot);
 1419|      0|                PK11_GETTAB(int_slot)
  ------------------
  |  |  102|      0|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1420|      0|                    ->C_SeedRandom(int_slot->session,
 1421|      0|                                   random_bytes, sizeof(random_bytes));
 1422|      0|                PK11_ExitSlotMonitor(int_slot);
 1423|      0|            }
 1424|       |
 1425|       |            /* Now return the favor and send entropy to the token's random
 1426|       |             * number generater */
 1427|      0|            PK11_EnterSlotMonitor(int_slot);
 1428|      0|            crv = PK11_GETTAB(int_slot)->C_GenerateRandom(int_slot->session,
  ------------------
  |  |  102|      0|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1429|      0|                                                          random_bytes, sizeof(random_bytes));
 1430|      0|            PK11_ExitSlotMonitor(int_slot);
 1431|      0|            if (crv == CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1431:17): [True: 0, False: 0]
  ------------------
 1432|      0|                PK11_EnterSlotMonitor(slot);
 1433|      0|                crv = PK11_GETTAB(slot)->C_SeedRandom(slot->session,
  ------------------
  |  |  102|      0|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1434|      0|                                                      random_bytes, sizeof(random_bytes));
 1435|      0|                PK11_ExitSlotMonitor(slot);
 1436|      0|            }
 1437|      0|            PK11_FreeSlot(int_slot);
 1438|      0|        }
 1439|      0|    }
 1440|       |    /* work around a problem in softoken where it incorrectly
 1441|       |     * reports databases opened read only as read/write. */
 1442|      2|    if (slot->isInternal && !slot->readOnly) {
  ------------------
  |  Branch (1442:9): [True: 2, False: 0]
  |  Branch (1442:29): [True: 0, False: 2]
  ------------------
 1443|      0|        CK_SESSION_HANDLE session = CK_INVALID_HANDLE;
  ------------------
  |  |   78|      0|#define CK_INVALID_HANDLE 0
  ------------------
 1444|       |
 1445|       |        /* try to open a R/W session */
 1446|      0|        crv = PK11_GETTAB(slot)->C_OpenSession(slot->slotID,
  ------------------
  |  |  102|      0|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1447|      0|                                               CKF_RW_SESSION | CKF_SERIAL_SESSION, slot, pk11_notify, &session);
  ------------------
  |  |  302|      0|#define CKF_RW_SESSION 0x00000002UL     /* session is r/w */
  ------------------
                                                             CKF_RW_SESSION | CKF_SERIAL_SESSION, slot, pk11_notify, &session);
  ------------------
  |  |  303|      0|#define CKF_SERIAL_SESSION 0x00000004UL /* no parallel */
  ------------------
 1448|       |        /* what a well behaved token should return if you open
 1449|       |         * a RW session on a read only token */
 1450|      0|        if (crv == CKR_TOKEN_WRITE_PROTECTED) {
  ------------------
  |  | 1481|      0|#define CKR_TOKEN_WRITE_PROTECTED 0x000000E2UL
  ------------------
  |  Branch (1450:13): [True: 0, False: 0]
  ------------------
 1451|      0|            slot->readOnly = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 1452|      0|        } else if (crv == CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1452:20): [True: 0, False: 0]
  ------------------
 1453|      0|            CK_SESSION_INFO sessionInfo;
 1454|       |
 1455|       |            /* Because of a second bug in softoken, which silently returns
 1456|       |             * a RO session, we need to check what type of session we got. */
 1457|      0|            crv = PK11_GETTAB(slot)->C_GetSessionInfo(session, &sessionInfo);
  ------------------
  |  |  102|      0|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1458|      0|            if (crv == CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1458:17): [True: 0, False: 0]
  ------------------
 1459|      0|                if ((sessionInfo.flags & CKF_RW_SESSION) == 0) {
  ------------------
  |  |  302|      0|#define CKF_RW_SESSION 0x00000002UL     /* session is r/w */
  ------------------
  |  Branch (1459:21): [True: 0, False: 0]
  ------------------
 1460|       |                    /* session was readonly, so this softoken slot must be readonly */
 1461|      0|                    slot->readOnly = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 1462|      0|                }
 1463|      0|            }
 1464|      0|            PK11_GETTAB(slot)
  ------------------
  |  |  102|      0|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1465|      0|                ->C_CloseSession(session);
 1466|      0|        }
 1467|      0|    }
 1468|       |
 1469|      2|    return SECSuccess;
 1470|      2|}
PK11_InitSlot:
 1542|      2|{
 1543|      2|    SECStatus rv;
 1544|      2|    CK_SLOT_INFO slotInfo;
 1545|       |
 1546|      2|    slot->functionList = mod->functionList;
 1547|      2|    slot->isInternal = mod->internal;
 1548|      2|    slot->slotID = slotID;
 1549|      2|    slot->isThreadSafe = mod->isThreadSafe;
 1550|      2|    slot->hasRSAInfo = PR_FALSE;
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
 1551|      2|    slot->module = mod; /* NOTE: we don't make a reference here because
 1552|       |                         * modules have references to their slots. This
 1553|       |                         * works because modules keep implicit references
 1554|       |                         * from their slots, and won't unload and disappear
 1555|       |                         * until all their slots have been freed */
 1556|       |
 1557|      2|    if (PK11_GetSlotInfo(slot, &slotInfo) != SECSuccess) {
  ------------------
  |  Branch (1557:9): [True: 0, False: 2]
  ------------------
 1558|      0|        slot->disabled = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 1559|      0|        slot->reason = PK11_DIS_COULD_NOT_INIT_TOKEN;
 1560|      0|        return;
 1561|      0|    }
 1562|       |
 1563|       |    /* test to make sure claimed mechanism work */
 1564|      2|    slot->needTest = mod->internal ? PR_FALSE : PR_TRUE;
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
                  slot->needTest = mod->internal ? PR_FALSE : PR_TRUE;
  ------------------
  |  |  437|      2|#define PR_TRUE 1
  ------------------
  |  Branch (1564:22): [True: 2, False: 0]
  ------------------
 1565|      2|    (void)PK11_MakeString(NULL, slot->slot_name,
 1566|      2|                          (char *)slotInfo.slotDescription, sizeof(slotInfo.slotDescription));
 1567|      2|    slot->isHW = (PRBool)((slotInfo.flags & CKF_HW_SLOT) == CKF_HW_SLOT);
  ------------------
  |  |  133|      2|#define CKF_HW_SLOT 0x00000004UL          /* hardware slot */
  ------------------
                  slot->isHW = (PRBool)((slotInfo.flags & CKF_HW_SLOT) == CKF_HW_SLOT);
  ------------------
  |  |  133|      2|#define CKF_HW_SLOT 0x00000004UL          /* hardware slot */
  ------------------
 1568|      2|#define ACTIVE_CARD "ActivCard SA"
 1569|      2|    slot->isActiveCard = (PRBool)(PORT_Strncmp((char *)slotInfo.manufacturerID,
  ------------------
  |  |  193|      2|#define PORT_Strncmp strncmp
  ------------------
 1570|      2|                                               ACTIVE_CARD, sizeof(ACTIVE_CARD) - 1) == 0);
  ------------------
  |  | 1568|      2|#define ACTIVE_CARD "ActivCard SA"
  ------------------
                                                             ACTIVE_CARD, sizeof(ACTIVE_CARD) - 1) == 0);
  ------------------
  |  | 1568|      2|#define ACTIVE_CARD "ActivCard SA"
  ------------------
 1571|      2|    if ((slotInfo.flags & CKF_REMOVABLE_DEVICE) == 0) {
  ------------------
  |  |  132|      2|#define CKF_REMOVABLE_DEVICE 0x00000002UL /* removable devices*/
  ------------------
  |  Branch (1571:9): [True: 2, False: 0]
  ------------------
 1572|      2|        slot->isPerm = PR_TRUE;
  ------------------
  |  |  437|      2|#define PR_TRUE 1
  ------------------
 1573|       |        /* permanment slots must have the token present always */
 1574|      2|        if ((slotInfo.flags & CKF_TOKEN_PRESENT) == 0) {
  ------------------
  |  |  131|      2|#define CKF_TOKEN_PRESENT 0x00000001UL    /* a token is there */
  ------------------
  |  Branch (1574:13): [True: 0, False: 2]
  ------------------
 1575|      0|            slot->disabled = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 1576|      0|            slot->reason = PK11_DIS_TOKEN_NOT_PRESENT;
 1577|      0|            return; /* nothing else to do */
 1578|      0|        }
 1579|      2|    }
 1580|       |    /* if the token is present, initialize it */
 1581|      2|    if ((slotInfo.flags & CKF_TOKEN_PRESENT) != 0) {
  ------------------
  |  |  131|      2|#define CKF_TOKEN_PRESENT 0x00000001UL    /* a token is there */
  ------------------
  |  Branch (1581:9): [True: 2, False: 0]
  ------------------
 1582|      2|        rv = PK11_InitToken(slot, PR_TRUE);
  ------------------
  |  |  437|      2|#define PR_TRUE 1
  ------------------
 1583|       |        /* the only hard failures are on permanent devices, or function
 1584|       |         * verify failures... function verify failures are already handled
 1585|       |         * by tokenInit */
 1586|      2|        if ((rv != SECSuccess) && (slot->isPerm) && (!slot->disabled)) {
  ------------------
  |  Branch (1586:13): [True: 0, False: 2]
  |  Branch (1586:35): [True: 0, False: 0]
  |  Branch (1586:53): [True: 0, False: 0]
  ------------------
 1587|      0|            slot->disabled = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 1588|      0|            slot->reason = PK11_DIS_COULD_NOT_INIT_TOKEN;
 1589|      0|        }
 1590|      2|        if (rv == SECSuccess && pk11_isRootSlot(slot)) {
  ------------------
  |  Branch (1590:13): [True: 2, False: 0]
  |  Branch (1590:33): [True: 0, False: 2]
  ------------------
 1591|      0|            if (!slot->hasRootCerts) {
  ------------------
  |  Branch (1591:17): [True: 0, False: 0]
  ------------------
 1592|      0|                slot->module->trustOrder = 100;
 1593|      0|            }
 1594|      0|            slot->hasRootCerts = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 1595|      0|        }
 1596|      2|    }
 1597|      2|    if ((slotInfo.flags & CKF_USER_PIN_INITIALIZED) != 0) {
  ------------------
  |  |  178|      2|#define CKF_USER_PIN_INITIALIZED 0x00000008UL /* normal user's \
  ------------------
  |  Branch (1597:9): [True: 2, False: 0]
  ------------------
 1598|      2|        slot->flags |= CKF_USER_PIN_INITIALIZED;
  ------------------
  |  |  178|      2|#define CKF_USER_PIN_INITIALIZED 0x00000008UL /* normal user's \
  ------------------
 1599|      2|    }
 1600|      2|}
PK11_IsPresent:
 1690|  72.1k|{
 1691|  72.1k|    return pk11_IsPresentCertLoad(slot, PR_TRUE);
  ------------------
  |  |  437|  72.1k|#define PR_TRUE 1
  ------------------
 1692|  72.1k|}
PK11_IsDisabled:
 1697|  61.2k|{
 1698|  61.2k|    return slot->disabled;
 1699|  61.2k|}
PK11_IsInternal:
 1780|      2|{
 1781|      2|    return slot->isInternal;
 1782|      2|}
PK11_GetSlotInfo:
 1929|      2|{
 1930|      2|    CK_RV crv;
 1931|       |
 1932|      2|    if (!slot->isThreadSafe)
  ------------------
  |  Branch (1932:9): [True: 0, False: 2]
  ------------------
 1933|      0|        PK11_EnterSlotMonitor(slot);
 1934|       |    /*
 1935|       |     * some buggy drivers do not fill the buffer completely,
 1936|       |     * erase the buffer first
 1937|       |     */
 1938|      2|    PORT_Memset(info->slotDescription, ' ', sizeof(info->slotDescription));
  ------------------
  |  |  182|      2|#define PORT_Memset memset
  ------------------
 1939|      2|    PORT_Memset(info->manufacturerID, ' ', sizeof(info->manufacturerID));
  ------------------
  |  |  182|      2|#define PORT_Memset memset
  ------------------
 1940|      2|    crv = PK11_GETTAB(slot)->C_GetSlotInfo(slot->slotID, info);
  ------------------
  |  |  102|      2|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1941|      2|    pk11_zeroTerminatedToBlankPadded(info->slotDescription,
 1942|      2|                                     sizeof(info->slotDescription));
 1943|      2|    pk11_zeroTerminatedToBlankPadded(info->manufacturerID,
 1944|      2|                                     sizeof(info->manufacturerID));
 1945|      2|    if (!slot->isThreadSafe)
  ------------------
  |  Branch (1945:9): [True: 0, False: 2]
  ------------------
 1946|      0|        PK11_ExitSlotMonitor(slot);
 1947|      2|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|      2|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1947:9): [True: 0, False: 2]
  ------------------
 1948|      0|        PORT_SetError(PK11_MapError(crv));
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1949|      0|        return SECFailure;
 1950|      0|    }
 1951|      2|    return SECSuccess;
 1952|      2|}
pk11_SetInternalKeySlot:
 2053|      1|{
 2054|      1|    if (pk11InternalKeySlot) {
  ------------------
  |  Branch (2054:9): [True: 1, False: 0]
  ------------------
 2055|      1|        PK11_FreeSlot(pk11InternalKeySlot);
 2056|      1|    }
 2057|      1|    pk11InternalKeySlot = slot ? PK11_ReferenceSlot(slot) : NULL;
  ------------------
  |  Branch (2057:27): [True: 0, False: 1]
  ------------------
 2058|      1|}
pk11_SetInternalKeySlotIfFirst:
 2067|      1|{
 2068|      1|    if (pk11InternalKeySlot) {
  ------------------
  |  Branch (2068:9): [True: 0, False: 1]
  ------------------
 2069|      0|        return;
 2070|      0|    }
 2071|      1|    pk11InternalKeySlot = slot ? PK11_ReferenceSlot(slot) : NULL;
  ------------------
  |  Branch (2071:27): [True: 1, False: 0]
  ------------------
 2072|      1|}
PK11_GetInternalSlot:
 2109|  3.72M|{
 2110|  3.72M|    SECMODModule *mod = SECMOD_GetInternalModule();
 2111|  3.72M|    PORT_Assert(mod != NULL);
  ------------------
  |  |  120|  3.72M|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  3.72M|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 3.72M, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2112|  3.72M|    if (!mod) {
  ------------------
  |  Branch (2112:9): [True: 0, False: 3.72M]
  ------------------
 2113|      0|        PORT_SetError(SEC_ERROR_NO_MODULE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2114|      0|        return NULL;
 2115|      0|    }
 2116|  3.72M|    if (mod->isFIPS) {
  ------------------
  |  Branch (2116:9): [True: 0, False: 3.72M]
  ------------------
 2117|      0|        return PK11_GetInternalKeySlot();
 2118|      0|    }
 2119|  3.72M|    return PK11_ReferenceSlot(mod->slots[0]);
 2120|  3.72M|}
PK11_DoesMechanism:
 2127|  3.86M|{
 2128|  3.86M|    int i;
 2129|       |
 2130|       |    /* CKM_FAKE_RANDOM is not a real PKCS mechanism. It's a marker to
 2131|       |     * tell us we're looking form someone that has implemented get
 2132|       |     * random bits */
 2133|  3.86M|    if (type == CKM_FAKE_RANDOM) {
  ------------------
  |  |  154|  3.86M|#define CKM_FAKE_RANDOM 0x80000efeUL
  ------------------
  |  Branch (2133:9): [True: 19.1k, False: 3.84M]
  ------------------
 2134|  19.1k|        return slot->hasRandom;
 2135|  19.1k|    }
 2136|       |
 2137|       |    /* for most mechanism, bypass the linear lookup */
 2138|  3.84M|    if (type < 0x7ff) {
  ------------------
  |  Branch (2138:9): [True: 2.09M, False: 1.75M]
  ------------------
 2139|  2.09M|        return (slot->mechanismBits[type & 0xff] & (1 << (type >> 8))) ? PR_TRUE : PR_FALSE;
  ------------------
  |  |  437|  2.09M|#define PR_TRUE 1
  ------------------
                      return (slot->mechanismBits[type & 0xff] & (1 << (type >> 8))) ? PR_TRUE : PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  |  Branch (2139:16): [True: 2.09M, False: 0]
  ------------------
 2140|  2.09M|    }
 2141|       |
 2142|  90.9M|    for (i = 0; i < (int)slot->mechanismCount; i++) {
  ------------------
  |  Branch (2142:17): [True: 90.9M, False: 635]
  ------------------
 2143|  90.9M|        if (slot->mechanismList[i] == type)
  ------------------
  |  Branch (2143:13): [True: 1.74M, False: 89.2M]
  ------------------
 2144|  1.74M|            return PR_TRUE;
  ------------------
  |  |  437|  1.74M|#define PR_TRUE 1
  ------------------
 2145|  90.9M|    }
 2146|    635|    return PR_FALSE;
  ------------------
  |  |  438|    635|#define PR_FALSE 0
  ------------------
 2147|  1.75M|}
PK11_DoesMechanismFlag:
 2158|  1.85k|{
 2159|  1.85k|    return !pk11_filterSlot(slot, type, flags, 0);
 2160|  1.85k|}
PK11_TokenExists:
 2169|  3.71M|{
 2170|  3.71M|    SECMODModuleList *mlp;
 2171|  3.71M|    SECMODModuleList *modules;
 2172|  3.71M|    SECMODListLock *moduleLock = SECMOD_GetDefaultModuleListLock();
 2173|  3.71M|    PK11SlotInfo *slot;
 2174|  3.71M|    PRBool found = PR_FALSE;
  ------------------
  |  |  438|  3.71M|#define PR_FALSE 0
  ------------------
 2175|  3.71M|    int i;
 2176|       |
 2177|  3.71M|    if (!moduleLock) {
  ------------------
  |  Branch (2177:9): [True: 0, False: 3.71M]
  ------------------
 2178|      0|        PORT_SetError(SEC_ERROR_NOT_INITIALIZED);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2179|      0|        return found;
 2180|      0|    }
 2181|       |    /* we only need to know if there is a token that does this mechanism.
 2182|       |     * check the internal module first because it's fast, and supports
 2183|       |     * almost everything. */
 2184|  3.71M|    slot = PK11_GetInternalSlot();
 2185|  3.71M|    if (slot) {
  ------------------
  |  Branch (2185:9): [True: 3.71M, False: 0]
  ------------------
 2186|  3.71M|        found = PK11_DoesMechanism(slot, type);
 2187|  3.71M|        PK11_FreeSlot(slot);
 2188|  3.71M|    }
 2189|  3.71M|    if (found)
  ------------------
  |  Branch (2189:9): [True: 3.71M, False: 0]
  ------------------
 2190|  3.71M|        return PR_TRUE; /* bypass getting module locks */
  ------------------
  |  |  437|  3.71M|#define PR_TRUE 1
  ------------------
 2191|       |
 2192|      0|    SECMOD_GetReadLock(moduleLock);
 2193|      0|    modules = SECMOD_GetDefaultModuleList();
 2194|      0|    for (mlp = modules; mlp != NULL && (!found); mlp = mlp->next) {
  ------------------
  |  Branch (2194:25): [True: 0, False: 0]
  |  Branch (2194:40): [True: 0, False: 0]
  ------------------
 2195|      0|        for (i = 0; i < mlp->module->slotCount; i++) {
  ------------------
  |  Branch (2195:21): [True: 0, False: 0]
  ------------------
 2196|      0|            slot = mlp->module->slots[i];
 2197|      0|            if (PK11_IsPresent(slot)) {
  ------------------
  |  Branch (2197:17): [True: 0, False: 0]
  ------------------
 2198|      0|                if (PK11_DoesMechanism(slot, type)) {
  ------------------
  |  Branch (2198:21): [True: 0, False: 0]
  ------------------
 2199|      0|                    found = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 2200|      0|                    break;
 2201|      0|                }
 2202|      0|            }
 2203|      0|        }
 2204|      0|    }
 2205|      0|    SECMOD_ReleaseReadLock(moduleLock);
 2206|      0|    return found;
 2207|  3.71M|}
PK11_GetAllTokens:
 2218|  3.88k|{
 2219|  3.88k|    PK11SlotList *list;
 2220|  3.88k|    PK11SlotList *loginList;
 2221|  3.88k|    PK11SlotList *friendlyList;
 2222|  3.88k|    SECMODModuleList *mlp;
 2223|  3.88k|    SECMODModuleList *modules;
 2224|  3.88k|    SECMODListLock *moduleLock;
 2225|  3.88k|    int i;
 2226|       |
 2227|  3.88k|    moduleLock = SECMOD_GetDefaultModuleListLock();
 2228|  3.88k|    if (!moduleLock) {
  ------------------
  |  Branch (2228:9): [True: 0, False: 3.88k]
  ------------------
 2229|      0|        PORT_SetError(SEC_ERROR_NOT_INITIALIZED);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2230|      0|        return NULL;
 2231|      0|    }
 2232|       |
 2233|  3.88k|    list = PK11_NewSlotList();
 2234|  3.88k|    loginList = PK11_NewSlotList();
 2235|  3.88k|    friendlyList = PK11_NewSlotList();
 2236|  3.88k|    if ((list == NULL) || (loginList == NULL) || (friendlyList == NULL)) {
  ------------------
  |  Branch (2236:9): [True: 0, False: 3.88k]
  |  Branch (2236:27): [True: 0, False: 3.88k]
  |  Branch (2236:50): [True: 0, False: 3.88k]
  ------------------
 2237|      0|        if (list)
  ------------------
  |  Branch (2237:13): [True: 0, False: 0]
  ------------------
 2238|      0|            PK11_FreeSlotList(list);
 2239|      0|        if (loginList)
  ------------------
  |  Branch (2239:13): [True: 0, False: 0]
  ------------------
 2240|      0|            PK11_FreeSlotList(loginList);
 2241|      0|        if (friendlyList)
  ------------------
  |  Branch (2241:13): [True: 0, False: 0]
  ------------------
 2242|      0|            PK11_FreeSlotList(friendlyList);
 2243|      0|        return NULL;
 2244|      0|    }
 2245|       |
 2246|  3.88k|    SECMOD_GetReadLock(moduleLock);
 2247|       |
 2248|  3.88k|    modules = SECMOD_GetDefaultModuleList();
 2249|  7.76k|    for (mlp = modules; mlp != NULL; mlp = mlp->next) {
  ------------------
  |  Branch (2249:25): [True: 3.88k, False: 3.88k]
  ------------------
 2250|  11.6k|        for (i = 0; i < mlp->module->slotCount; i++) {
  ------------------
  |  Branch (2250:21): [True: 7.76k, False: 3.88k]
  ------------------
 2251|  7.76k|            PK11SlotInfo *slot = mlp->module->slots[i];
 2252|       |
 2253|  7.76k|            if (pk11_IsPresentCertLoad(slot, loadCerts)) {
  ------------------
  |  Branch (2253:17): [True: 7.76k, False: 0]
  ------------------
 2254|  7.76k|                if (needRW && slot->readOnly)
  ------------------
  |  Branch (2254:21): [True: 0, False: 7.76k]
  |  Branch (2254:31): [True: 0, False: 0]
  ------------------
 2255|      0|                    continue;
 2256|  7.76k|                if ((type == CKM_INVALID_MECHANISM) || PK11_DoesMechanism(slot, type)) {
  ------------------
  |  |  155|  7.76k|#define CKM_INVALID_MECHANISM 0xffffffffUL
  ------------------
  |  Branch (2256:21): [True: 94, False: 7.67k]
  |  Branch (2256:56): [True: 7.67k, False: 0]
  ------------------
 2257|  7.76k|                    if (pk11_LoginStillRequired(slot, wincx)) {
  ------------------
  |  Branch (2257:25): [True: 0, False: 7.76k]
  ------------------
 2258|      0|                        if (PK11_IsFriendly(slot)) {
  ------------------
  |  Branch (2258:29): [True: 0, False: 0]
  ------------------
 2259|      0|                            PK11_AddSlotToList(friendlyList, slot, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 2260|      0|                        } else {
 2261|      0|                            PK11_AddSlotToList(loginList, slot, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 2262|      0|                        }
 2263|  7.76k|                    } else {
 2264|  7.76k|                        PK11_AddSlotToList(list, slot, PR_TRUE);
  ------------------
  |  |  437|  7.76k|#define PR_TRUE 1
  ------------------
 2265|  7.76k|                    }
 2266|  7.76k|                }
 2267|  7.76k|            }
 2268|  7.76k|        }
 2269|  3.88k|    }
 2270|  3.88k|    SECMOD_ReleaseReadLock(moduleLock);
 2271|       |
 2272|  3.88k|    pk11_MoveListToList(list, friendlyList);
 2273|  3.88k|    PK11_FreeSlotList(friendlyList);
 2274|  3.88k|    pk11_MoveListToList(list, loginList);
 2275|  3.88k|    PK11_FreeSlotList(loginList);
 2276|       |
 2277|  3.88k|    return list;
 2278|  3.88k|}
pk11_filterSlot:
 2312|  4.36k|{
 2313|  4.36k|    CK_MECHANISM_INFO mechanism_info;
 2314|  4.36k|    CK_RV crv = CKR_OK;
  ------------------
  |  | 1388|  4.36k|#define CKR_OK 0x00000000UL
  ------------------
 2315|       |
 2316|       |    /* handle the only case where we don't actually fetch the mechanisms
 2317|       |     * on the fly */
 2318|  4.36k|    if ((keySize == 0) && (mechanism == CKM_RSA_PKCS) && (slot->hasRSAInfo)) {
  ------------------
  |  |  720|  3.22k|#define CKM_RSA_PKCS 0x00000001UL
  ------------------
  |  Branch (2318:9): [True: 3.22k, False: 1.13k]
  |  Branch (2318:27): [True: 29, False: 3.19k]
  |  Branch (2318:58): [True: 28, False: 1]
  ------------------
 2319|     28|        mechanism_info.flags = slot->RSAInfoFlags;
 2320|  4.33k|    } else {
 2321|  4.33k|        if (!slot->isThreadSafe)
  ------------------
  |  Branch (2321:13): [True: 0, False: 4.33k]
  ------------------
 2322|      0|            PK11_EnterSlotMonitor(slot);
 2323|  4.33k|        crv = PK11_GETTAB(slot)->C_GetMechanismInfo(slot->slotID, mechanism,
  ------------------
  |  |  102|  4.33k|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 2324|  4.33k|                                                    &mechanism_info);
 2325|  4.33k|        if (!slot->isThreadSafe)
  ------------------
  |  Branch (2325:13): [True: 0, False: 4.33k]
  ------------------
 2326|      0|            PK11_ExitSlotMonitor(slot);
 2327|       |        /* if we were getting the RSA flags, save them */
 2328|  4.33k|        if ((crv == CKR_OK) && (mechanism == CKM_RSA_PKCS) && (!slot->hasRSAInfo)) {
  ------------------
  |  | 1388|  4.33k|#define CKR_OK 0x00000000UL
  ------------------
                      if ((crv == CKR_OK) && (mechanism == CKM_RSA_PKCS) && (!slot->hasRSAInfo)) {
  ------------------
  |  |  720|  4.33k|#define CKM_RSA_PKCS 0x00000001UL
  ------------------
  |  Branch (2328:13): [True: 4.33k, False: 0]
  |  Branch (2328:32): [True: 1, False: 4.33k]
  |  Branch (2328:63): [True: 1, False: 0]
  ------------------
 2329|      1|            slot->RSAInfoFlags = mechanism_info.flags;
 2330|      1|            slot->hasRSAInfo = PR_TRUE;
  ------------------
  |  |  437|      1|#define PR_TRUE 1
  ------------------
 2331|      1|        }
 2332|  4.33k|    }
 2333|       |    /* couldn't get the mechanism info */
 2334|  4.36k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  4.36k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (2334:9): [True: 0, False: 4.36k]
  ------------------
 2335|      0|        return PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 2336|      0|    }
 2337|  4.36k|    if (keySize && ((mechanism_info.ulMinKeySize > keySize) || (mechanism_info.ulMaxKeySize < keySize))) {
  ------------------
  |  Branch (2337:9): [True: 1.13k, False: 3.22k]
  |  Branch (2337:21): [True: 0, False: 1.13k]
  |  Branch (2337:64): [True: 0, False: 1.13k]
  ------------------
 2338|       |        /* Token can do mechanism, but not at the key size we
 2339|       |         * want */
 2340|      0|        return PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 2341|      0|    }
 2342|  4.36k|    if (mechanismInfoFlags && ((mechanism_info.flags & mechanismInfoFlags) !=
  ------------------
  |  Branch (2342:9): [True: 4.36k, False: 0]
  |  Branch (2342:31): [True: 0, False: 4.36k]
  ------------------
 2343|  4.36k|                               mechanismInfoFlags)) {
 2344|      0|        return PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 2345|      0|    }
 2346|  4.36k|    return PR_FALSE;
  ------------------
  |  |  438|  4.36k|#define PR_FALSE 0
  ------------------
 2347|  4.36k|}
PK11_GetBestSlotMultipleWithAttributes:
 2362|  72.1k|{
 2363|  72.1k|    PK11SlotList *list = NULL;
 2364|  72.1k|    PK11SlotListElement *le;
 2365|  72.1k|    PK11SlotInfo *slot = NULL;
 2366|  72.1k|    PRBool freeit = PR_FALSE;
  ------------------
  |  |  438|  72.1k|#define PR_FALSE 0
  ------------------
 2367|  72.1k|    PRBool listNeedLogin = PR_FALSE;
  ------------------
  |  |  438|  72.1k|#define PR_FALSE 0
  ------------------
 2368|  72.1k|    unsigned int i;
 2369|  72.1k|    SECStatus rv;
 2370|       |
 2371|  72.1k|    list = PK11_GetSlotList(type[0]);
 2372|       |
 2373|  72.1k|    if ((list == NULL) || (list->head == NULL)) {
  ------------------
  |  Branch (2373:9): [True: 2.74k, False: 69.3k]
  |  Branch (2373:27): [True: 1.13k, False: 68.2k]
  ------------------
 2374|       |        /* We need to look up all the tokens for the mechanism */
 2375|  3.88k|        list = PK11_GetAllTokens(type[0], PR_FALSE, PR_TRUE, wincx);
  ------------------
  |  |  438|  3.88k|#define PR_FALSE 0
  ------------------
                      list = PK11_GetAllTokens(type[0], PR_FALSE, PR_TRUE, wincx);
  ------------------
  |  |  437|  3.88k|#define PR_TRUE 1
  ------------------
 2376|  3.88k|        freeit = PR_TRUE;
  ------------------
  |  |  437|  3.88k|#define PR_TRUE 1
  ------------------
 2377|  3.88k|    }
 2378|       |
 2379|       |    /* no one can do it! */
 2380|  72.1k|    if (list == NULL) {
  ------------------
  |  Branch (2380:9): [True: 0, False: 72.1k]
  ------------------
 2381|      0|        PORT_SetError(SEC_ERROR_NO_TOKEN);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2382|      0|        return NULL;
 2383|      0|    }
 2384|       |
 2385|  72.1k|    PORT_SetError(0);
  ------------------
  |  |   65|  72.1k|#define PORT_SetError PORT_SetError_Util
  ------------------
 2386|       |
 2387|  72.1k|    listNeedLogin = PR_FALSE;
  ------------------
  |  |  438|  72.1k|#define PR_FALSE 0
  ------------------
 2388|   124k|    for (i = 0; i < mech_count; i++) {
  ------------------
  |  Branch (2388:17): [True: 72.1k, False: 52.6k]
  ------------------
 2389|  72.1k|        if ((type[i] != CKM_FAKE_RANDOM) &&
  ------------------
  |  |  154|  72.1k|#define CKM_FAKE_RANDOM 0x80000efeUL
  ------------------
  |  Branch (2389:13): [True: 52.9k, False: 19.1k]
  ------------------
 2390|  72.1k|            (type[i] != CKM_SHA_1) &&
  ------------------
  |  |  859|  52.9k|#define CKM_SHA_1 0x00000220UL
  ------------------
  |  Branch (2390:13): [True: 37.8k, False: 15.0k]
  ------------------
 2391|  72.1k|            (type[i] != CKM_SHA224) &&
  ------------------
  |  |  887|  37.8k|#define CKM_SHA224 0x00000255UL
  ------------------
  |  Branch (2391:13): [True: 37.8k, False: 0]
  ------------------
 2392|  72.1k|            (type[i] != CKM_SHA256) &&
  ------------------
  |  |  876|  37.8k|#define CKM_SHA256 0x00000250UL
  ------------------
  |  Branch (2392:13): [True: 26.8k, False: 11.0k]
  ------------------
 2393|  72.1k|            (type[i] != CKM_SHA384) &&
  ------------------
  |  |  879|  26.8k|#define CKM_SHA384 0x00000260UL
  ------------------
  |  Branch (2393:13): [True: 20.2k, False: 6.53k]
  ------------------
 2394|  72.1k|            (type[i] != CKM_SHA512) &&
  ------------------
  |  |  882|  20.2k|#define CKM_SHA512 0x00000270UL
  ------------------
  |  Branch (2394:13): [True: 19.7k, False: 589]
  ------------------
 2395|  72.1k|            (type[i] != CKM_MD5) &&
  ------------------
  |  |  853|  19.7k|#define CKM_MD5 0x00000210UL
  ------------------
  |  Branch (2395:13): [True: 19.4k, False: 268]
  ------------------
 2396|  72.1k|            (type[i] != CKM_MD2)) {
  ------------------
  |  |  847|  19.4k|#define CKM_MD2 0x00000200UL
  ------------------
  |  Branch (2396:13): [True: 19.4k, False: 0]
  ------------------
 2397|  19.4k|            listNeedLogin = PR_TRUE;
  ------------------
  |  |  437|  19.4k|#define PR_TRUE 1
  ------------------
 2398|  19.4k|            break;
 2399|  19.4k|        }
 2400|  72.1k|    }
 2401|       |
 2402|  72.6k|    for (le = PK11_GetFirstSafe(list); le;
  ------------------
  |  Branch (2402:40): [True: 72.1k, False: 541]
  ------------------
 2403|  72.1k|         le = PK11_GetNextSafe(list, le, PR_TRUE)) {
  ------------------
  |  |  437|    588|#define PR_TRUE 1
  ------------------
 2404|  72.1k|        if (PK11_IsPresent(le->slot)) {
  ------------------
  |  Branch (2404:13): [True: 72.1k, False: 0]
  ------------------
 2405|  72.1k|            PRBool doExit = PR_FALSE;
  ------------------
  |  |  438|  72.1k|#define PR_FALSE 0
  ------------------
 2406|   146k|            for (i = 0; i < mech_count; i++) {
  ------------------
  |  Branch (2406:25): [True: 75.2k, False: 71.5k]
  ------------------
 2407|  75.2k|                if (!PK11_DoesMechanism(le->slot, type[i])) {
  ------------------
  |  Branch (2407:21): [True: 588, False: 74.6k]
  ------------------
 2408|    588|                    doExit = PR_TRUE;
  ------------------
  |  |  437|    588|#define PR_TRUE 1
  ------------------
 2409|    588|                    break;
 2410|    588|                }
 2411|  74.6k|                if ((mechanismInfoFlags && mechanismInfoFlags[i]) ||
  ------------------
  |  Branch (2411:22): [True: 2.50k, False: 72.1k]
  |  Branch (2411:44): [True: 2.50k, False: 0]
  ------------------
 2412|  74.6k|                    (keySize && keySize[i])) {
  ------------------
  |  Branch (2412:22): [True: 0, False: 72.1k]
  |  Branch (2412:33): [True: 0, False: 0]
  ------------------
 2413|  2.50k|                    if (pk11_filterSlot(le->slot, type[i],
  ------------------
  |  Branch (2413:25): [True: 0, False: 2.50k]
  ------------------
 2414|  2.50k|                                        mechanismInfoFlags ? mechanismInfoFlags[i] : 0,
  ------------------
  |  Branch (2414:41): [True: 2.50k, False: 0]
  ------------------
 2415|  2.50k|                                        keySize ? keySize[i] : 0)) {
  ------------------
  |  Branch (2415:41): [True: 2.50k, False: 0]
  ------------------
 2416|      0|                        doExit = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 2417|      0|                        break;
 2418|      0|                    }
 2419|  2.50k|                }
 2420|  74.6k|            }
 2421|       |
 2422|  72.1k|            if (doExit)
  ------------------
  |  Branch (2422:17): [True: 588, False: 71.5k]
  ------------------
 2423|    588|                continue;
 2424|       |
 2425|  71.5k|            if (listNeedLogin && le->slot->needLogin) {
  ------------------
  |  Branch (2425:17): [True: 18.9k, False: 52.6k]
  |  Branch (2425:34): [True: 0, False: 18.9k]
  ------------------
 2426|      0|                rv = PK11_Authenticate(le->slot, PR_TRUE, wincx);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 2427|      0|                if (rv != SECSuccess)
  ------------------
  |  Branch (2427:21): [True: 0, False: 0]
  ------------------
 2428|      0|                    continue;
 2429|      0|            }
 2430|  71.5k|            slot = le->slot;
 2431|  71.5k|            PK11_ReferenceSlot(slot);
 2432|  71.5k|            PK11_FreeSlotListElement(list, le);
 2433|  71.5k|            if (freeit) {
  ------------------
  |  Branch (2433:17): [True: 3.83k, False: 67.7k]
  ------------------
 2434|  3.83k|                PK11_FreeSlotList(list);
 2435|  3.83k|            }
 2436|  71.5k|            return slot;
 2437|  71.5k|        }
 2438|  72.1k|    }
 2439|    541|    if (freeit) {
  ------------------
  |  Branch (2439:9): [True: 47, False: 494]
  ------------------
 2440|     47|        PK11_FreeSlotList(list);
 2441|     47|    }
 2442|    541|    if (PORT_GetError() == 0) {
  ------------------
  |  |   62|    541|#define PORT_GetError PORT_GetError_Util
  ------------------
  |  Branch (2442:9): [True: 541, False: 0]
  ------------------
 2443|    541|        PORT_SetError(SEC_ERROR_NO_TOKEN);
  ------------------
  |  |   65|    541|#define PORT_SetError PORT_SetError_Util
  ------------------
 2444|    541|    }
 2445|    541|    return NULL;
 2446|  72.1k|}
PK11_GetBestSlotMultiple:
 2451|  1.85k|{
 2452|  1.85k|    return PK11_GetBestSlotMultipleWithAttributes(type, NULL, NULL,
 2453|  1.85k|                                                  mech_count, wincx);
 2454|  1.85k|}
PK11_GetBestSlot:
 2459|  67.7k|{
 2460|  67.7k|    return PK11_GetBestSlotMultipleWithAttributes(&type, NULL, NULL, 1, wincx);
 2461|  67.7k|}
PK11_GetBestSlotWithAttributes:
 2466|  2.50k|{
 2467|  2.50k|    return PK11_GetBestSlotMultipleWithAttributes(&type, &mechanismFlags,
 2468|  2.50k|                                                  &keySize, 1, wincx);
 2469|  2.50k|}
PK11_GenerateRandomOnSlot:
 2574|  19.1k|{
 2575|  19.1k|    CK_RV crv;
 2576|       |
 2577|  19.1k|    if (!slot->isInternal)
  ------------------
  |  Branch (2577:9): [True: 0, False: 19.1k]
  ------------------
 2578|      0|        PK11_EnterSlotMonitor(slot);
 2579|  19.1k|    crv = PK11_GETTAB(slot)->C_GenerateRandom(slot->session, data,
  ------------------
  |  |  102|  19.1k|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 2580|  19.1k|                                              (CK_ULONG)len);
 2581|  19.1k|    if (!slot->isInternal)
  ------------------
  |  Branch (2581:9): [True: 0, False: 19.1k]
  ------------------
 2582|      0|        PK11_ExitSlotMonitor(slot);
 2583|  19.1k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  19.1k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (2583:9): [True: 0, False: 19.1k]
  ------------------
 2584|      0|        PORT_SetError(PK11_MapError(crv));
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2585|      0|        return SECFailure;
 2586|      0|    }
 2587|  19.1k|    return SECSuccess;
 2588|  19.1k|}
PK11_GenerateRandom:
 2628|  19.1k|{
 2629|  19.1k|    PK11SlotInfo *slot;
 2630|  19.1k|    SECStatus rv;
 2631|       |
 2632|  19.1k|    slot = PK11_GetBestSlot(CKM_FAKE_RANDOM, NULL);
  ------------------
  |  |  154|  19.1k|#define CKM_FAKE_RANDOM 0x80000efeUL
  ------------------
 2633|  19.1k|    if (slot == NULL)
  ------------------
  |  Branch (2633:9): [True: 0, False: 19.1k]
  ------------------
 2634|      0|        return SECFailure;
 2635|       |
 2636|  19.1k|    rv = PK11_GenerateRandomOnSlot(slot, data, len);
 2637|  19.1k|    PK11_FreeSlot(slot);
 2638|  19.1k|    return rv;
 2639|  19.1k|}
PK11Slot_SetNSSToken:
 2693|      4|{
 2694|      4|    NSSToken *old;
 2695|      4|    if (nsst) {
  ------------------
  |  Branch (2695:9): [True: 2, False: 2]
  ------------------
 2696|      2|        nsst = nssToken_AddRef(nsst);
 2697|      2|    }
 2698|       |
 2699|      4|    PZ_Lock(sl->nssTokenLock);
  ------------------
  |  |  245|      4|#define PZ_Lock(k) PR_Lock((k))
  ------------------
 2700|      4|    old = sl->nssToken;
 2701|      4|    sl->nssToken = nsst;
 2702|      4|    PZ_Unlock(sl->nssTokenLock);
  ------------------
  |  |  246|      4|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
 2703|       |
 2704|      4|    if (old) {
  ------------------
  |  Branch (2704:9): [True: 2, False: 2]
  ------------------
 2705|      2|        (void)nssToken_Destroy(old);
 2706|      2|    }
 2707|      4|}
PK11Slot_GetNSSToken:
 2711|  30.6k|{
 2712|  30.6k|    NSSToken *rv = NULL;
 2713|       |
 2714|  30.6k|    PZ_Lock(sl->nssTokenLock);
  ------------------
  |  |  245|  30.6k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
 2715|  30.6k|    if (sl->nssToken) {
  ------------------
  |  Branch (2715:9): [True: 30.6k, False: 4]
  ------------------
 2716|  30.6k|        rv = nssToken_AddRef(sl->nssToken);
 2717|  30.6k|    }
 2718|  30.6k|    PZ_Unlock(sl->nssTokenLock);
  ------------------
  |  |  246|  30.6k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
 2719|       |
 2720|  30.6k|    return rv;
 2721|  30.6k|}
pk11slot.c:pk11_FreeSlotListStatic:
  152|  11.6k|{
  153|  11.6k|    PK11SlotListElement *le, *next;
  154|  11.6k|    if (list == NULL)
  ------------------
  |  Branch (154:9): [True: 0, False: 11.6k]
  ------------------
  155|      0|        return;
  156|       |
  157|  19.4k|    for (le = list->head; le; le = next) {
  ------------------
  |  Branch (157:27): [True: 7.76k, False: 11.6k]
  ------------------
  158|  7.76k|        next = le->next;
  159|  7.76k|        PK11_FreeSlotListElement(list, le);
  160|  7.76k|    }
  161|  11.6k|    if (list->lock) {
  ------------------
  |  Branch (161:9): [True: 11.6k, False: 0]
  ------------------
  162|  11.6k|        PZ_DestroyLock(list->lock);
  ------------------
  |  |  244|  11.6k|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
  163|  11.6k|    }
  164|  11.6k|    list->lock = NULL;
  165|  11.6k|    list->head = NULL;
  166|  11.6k|}
pk11slot.c:pk11_InitSlotListStatic:
  823|     20|{
  824|     20|    list->lock = PZ_NewLock(nssILockList);
  ------------------
  |  |  243|     20|#define PZ_NewLock(t) PR_NewLock()
  ------------------
  825|     20|    list->head = NULL;
  826|     20|}
pk11slot.c:pk11_ReadProfileList:
 1205|      2|{
 1206|      2|    CK_ATTRIBUTE findTemp[2];
 1207|      2|    CK_ATTRIBUTE *attrs;
 1208|      2|    CK_BBOOL cktrue = CK_TRUE;
  ------------------
  |  |   22|      2|#define CK_TRUE 1
  ------------------
 1209|      2|    CK_OBJECT_CLASS oclass = CKO_PROFILE;
  ------------------
  |  |  334|      2|#define CKO_PROFILE 0x00000009UL
  ------------------
 1210|      2|    size_t tsize;
 1211|      2|    int objCount;
 1212|      2|    CK_OBJECT_HANDLE *handles = NULL;
 1213|      2|    int i;
 1214|       |
 1215|      2|    attrs = findTemp;
 1216|      2|    PK11_SETATTRS(attrs, CKA_TOKEN, &cktrue, sizeof(cktrue));
  ------------------
  |  |  104|      2|    (x)->type = (id);              \
  |  |  105|      2|    (x)->pValue = (v);             \
  |  |  106|      2|    (x)->ulValueLen = (l);
  ------------------
 1217|      2|    attrs++;
 1218|      2|    PK11_SETATTRS(attrs, CKA_CLASS, &oclass, sizeof(oclass));
  ------------------
  |  |  104|      2|    (x)->type = (id);              \
  |  |  105|      2|    (x)->pValue = (v);             \
  |  |  106|      2|    (x)->ulValueLen = (l);
  ------------------
 1219|      2|    attrs++;
 1220|      2|    tsize = attrs - findTemp;
 1221|      2|    PORT_Assert(tsize <= sizeof(findTemp) / sizeof(CK_ATTRIBUTE));
  ------------------
  |  |  120|      2|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      2|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 2, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1222|       |
 1223|      2|    if (slot->profileList) {
  ------------------
  |  Branch (1223:9): [True: 0, False: 2]
  ------------------
 1224|      0|        PORT_Free(slot->profileList);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 1225|      0|        slot->profileList = NULL;
 1226|      0|    }
 1227|      2|    slot->profileCount = 0;
 1228|       |
 1229|      2|    objCount = 0;
 1230|      2|    handles = pk11_FindObjectsByTemplate(slot, findTemp, tsize, &objCount);
 1231|      2|    if (handles == NULL) {
  ------------------
  |  Branch (1231:9): [True: 2, False: 0]
  ------------------
 1232|      2|        if (objCount < 0) {
  ------------------
  |  Branch (1232:13): [True: 0, False: 2]
  ------------------
 1233|      0|            return SECFailure; /* error code is set */
 1234|      0|        }
 1235|      2|        PORT_Assert(objCount == 0);
  ------------------
  |  |  120|      2|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      2|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 2, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1236|      2|        return SECSuccess;
 1237|      2|    }
 1238|       |
 1239|      0|    slot->profileList = (CK_PROFILE_ID *)
 1240|      0|        PORT_Alloc(objCount * sizeof(CK_PROFILE_ID));
  ------------------
  |  |   52|      0|#define PORT_Alloc PORT_Alloc_Util
  ------------------
 1241|      0|    if (slot->profileList == NULL) {
  ------------------
  |  Branch (1241:9): [True: 0, False: 0]
  ------------------
 1242|      0|        PORT_Free(handles);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 1243|      0|        return SECFailure; /* error code is set */
 1244|      0|    }
 1245|       |
 1246|      0|    for (i = 0; i < objCount; i++) {
  ------------------
  |  Branch (1246:17): [True: 0, False: 0]
  ------------------
 1247|      0|        CK_ULONG value;
 1248|       |
 1249|      0|        value = PK11_ReadULongAttribute(slot, handles[i], CKA_PROFILE_ID);
  ------------------
  |  |  663|      0|#define CKA_PROFILE_ID 0x00000601UL
  ------------------
 1250|      0|        if (value == CK_UNAVAILABLE_INFORMATION) {
  ------------------
  |  |   64|      0|#define CK_UNAVAILABLE_INFORMATION (~0UL)
  ------------------
  |  Branch (1250:13): [True: 0, False: 0]
  ------------------
 1251|      0|            continue;
 1252|      0|        }
 1253|      0|        slot->profileList[slot->profileCount++] = value;
 1254|      0|    }
 1255|       |
 1256|      0|    PORT_Free(handles);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 1257|      0|    return SECSuccess;
 1258|      0|}
pk11slot.c:pk11_isRootSlot:
 1512|      2|{
 1513|      2|    CK_ATTRIBUTE findTemp[1];
 1514|      2|    CK_ATTRIBUTE *attrs;
 1515|      2|    CK_OBJECT_CLASS oclass = CKO_NSS_BUILTIN_ROOT_LIST;
  ------------------
  |  |   38|      2|#define CKO_NSS_BUILTIN_ROOT_LIST (CKO_NSS + 4)
  |  |  ------------------
  |  |  |  |   33|      2|#define CKO_NSS (CKO_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      2|#define CKO_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKO_NSS (CKO_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      2|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1516|      2|    size_t tsize;
 1517|      2|    CK_OBJECT_HANDLE handle;
 1518|       |
 1519|      2|    attrs = findTemp;
 1520|      2|    PK11_SETATTRS(attrs, CKA_CLASS, &oclass, sizeof(oclass));
  ------------------
  |  |  104|      2|    (x)->type = (id);              \
  |  |  105|      2|    (x)->pValue = (v);             \
  |  |  106|      2|    (x)->ulValueLen = (l);
  ------------------
 1521|      2|    attrs++;
 1522|      2|    tsize = attrs - findTemp;
 1523|      2|    PORT_Assert(tsize <= sizeof(findTemp) / sizeof(CK_ATTRIBUTE));
  ------------------
  |  |  120|      2|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      2|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 2, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1524|       |
 1525|      2|    handle = pk11_FindObjectByTemplate(slot, findTemp, tsize);
 1526|      2|    if (handle == CK_INVALID_HANDLE) {
  ------------------
  |  |   78|      2|#define CK_INVALID_HANDLE 0
  ------------------
  |  Branch (1526:9): [True: 2, False: 0]
  ------------------
 1527|      2|        return PR_FALSE;
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
 1528|      2|    }
 1529|      0|    return PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 1530|      2|}
pk11slot.c:pk11_IsPresentCertLoad:
 1613|  79.9k|{
 1614|  79.9k|    CK_SLOT_INFO slotInfo;
 1615|  79.9k|    CK_SESSION_INFO sessionInfo;
 1616|  79.9k|    CK_RV crv;
 1617|       |
 1618|       |    /* disabled slots are never present */
 1619|  79.9k|    if (slot->disabled) {
  ------------------
  |  Branch (1619:9): [True: 0, False: 79.9k]
  ------------------
 1620|      0|        return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 1621|      0|    }
 1622|       |
 1623|       |    /* permanent slots are always present */
 1624|  79.9k|    if (slot->isPerm && (slot->session != CK_INVALID_HANDLE)) {
  ------------------
  |  |   78|  79.9k|#define CK_INVALID_HANDLE 0
  ------------------
  |  Branch (1624:9): [True: 79.9k, False: 0]
  |  Branch (1624:25): [True: 79.9k, False: 0]
  ------------------
 1625|  79.9k|        return PR_TRUE;
  ------------------
  |  |  437|  79.9k|#define PR_TRUE 1
  ------------------
 1626|  79.9k|    }
 1627|       |
 1628|      0|    NSSToken *nssToken = PK11Slot_GetNSSToken(slot);
 1629|      0|    if (nssToken) {
  ------------------
  |  Branch (1629:9): [True: 0, False: 0]
  ------------------
 1630|      0|        PRBool present = nssToken_IsPresent(nssToken);
 1631|      0|        (void)nssToken_Destroy(nssToken);
 1632|      0|        return present;
 1633|      0|    }
 1634|       |
 1635|       |    /* removable slots have a flag that says they are present */
 1636|      0|    if (PK11_GetSlotInfo(slot, &slotInfo) != SECSuccess) {
  ------------------
  |  Branch (1636:9): [True: 0, False: 0]
  ------------------
 1637|      0|        return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 1638|      0|    }
 1639|       |
 1640|      0|    if ((slotInfo.flags & CKF_TOKEN_PRESENT) == 0) {
  ------------------
  |  |  131|      0|#define CKF_TOKEN_PRESENT 0x00000001UL    /* a token is there */
  ------------------
  |  Branch (1640:9): [True: 0, False: 0]
  ------------------
 1641|       |        /* if the slot is no longer present, close the session */
 1642|      0|        if (slot->session != CK_INVALID_HANDLE) {
  ------------------
  |  |   78|      0|#define CK_INVALID_HANDLE 0
  ------------------
  |  Branch (1642:13): [True: 0, False: 0]
  ------------------
 1643|      0|            if (!slot->isThreadSafe) {
  ------------------
  |  Branch (1643:17): [True: 0, False: 0]
  ------------------
 1644|      0|                PK11_EnterSlotMonitor(slot);
 1645|      0|            }
 1646|      0|            PK11_GETTAB(slot)
  ------------------
  |  |  102|      0|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1647|      0|                ->C_CloseSession(slot->session);
 1648|      0|            slot->session = CK_INVALID_HANDLE;
  ------------------
  |  |   78|      0|#define CK_INVALID_HANDLE 0
  ------------------
 1649|      0|            if (!slot->isThreadSafe) {
  ------------------
  |  Branch (1649:17): [True: 0, False: 0]
  ------------------
 1650|      0|                PK11_ExitSlotMonitor(slot);
 1651|      0|            }
 1652|      0|        }
 1653|      0|        return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 1654|      0|    }
 1655|       |
 1656|       |    /* use the session Info to determine if the card has been removed and then
 1657|       |     * re-inserted */
 1658|      0|    if (slot->session != CK_INVALID_HANDLE) {
  ------------------
  |  |   78|      0|#define CK_INVALID_HANDLE 0
  ------------------
  |  Branch (1658:9): [True: 0, False: 0]
  ------------------
 1659|      0|        if (slot->isThreadSafe) {
  ------------------
  |  Branch (1659:13): [True: 0, False: 0]
  ------------------
 1660|      0|            PK11_EnterSlotMonitor(slot);
 1661|      0|        }
 1662|      0|        crv = PK11_GETTAB(slot)->C_GetSessionInfo(slot->session, &sessionInfo);
  ------------------
  |  |  102|      0|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1663|      0|        if (crv != CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1663:13): [True: 0, False: 0]
  ------------------
 1664|      0|            PK11_GETTAB(slot)
  ------------------
  |  |  102|      0|#define PK11_GETTAB(x) ((CK_FUNCTION_LIST_3_0_PTR)((x)->functionList))
  ------------------
 1665|      0|                ->C_CloseSession(slot->session);
 1666|      0|            slot->session = CK_INVALID_HANDLE;
  ------------------
  |  |   78|      0|#define CK_INVALID_HANDLE 0
  ------------------
 1667|      0|        }
 1668|      0|        if (slot->isThreadSafe) {
  ------------------
  |  Branch (1668:13): [True: 0, False: 0]
  ------------------
 1669|      0|            PK11_ExitSlotMonitor(slot);
 1670|      0|        }
 1671|      0|    }
 1672|       |
 1673|       |    /* card has not been removed, current token info is correct */
 1674|      0|    if (slot->session != CK_INVALID_HANDLE)
  ------------------
  |  |   78|      0|#define CK_INVALID_HANDLE 0
  ------------------
  |  Branch (1674:9): [True: 0, False: 0]
  ------------------
 1675|      0|        return PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 1676|       |
 1677|       |    /* initialize the token info state */
 1678|      0|    if (PK11_InitToken(slot, loadCerts) != SECSuccess) {
  ------------------
  |  Branch (1678:9): [True: 0, False: 0]
  ------------------
 1679|      0|        return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 1680|      0|    }
 1681|       |
 1682|      0|    return PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 1683|      0|}
pk11slot.c:pk11_zeroTerminatedToBlankPadded:
 1911|      4|{
 1912|      4|    CK_CHAR *walk = buffer;
 1913|      4|    CK_CHAR *end = buffer + buffer_size;
 1914|       |
 1915|       |    /* find the NULL */
 1916|    196|    while (walk < end && *walk != '\0') {
  ------------------
  |  Branch (1916:12): [True: 192, False: 4]
  |  Branch (1916:26): [True: 192, False: 0]
  ------------------
 1917|    192|        walk++;
 1918|    192|    }
 1919|       |
 1920|       |    /* clear out the buffer */
 1921|      4|    while (walk < end) {
  ------------------
  |  Branch (1921:12): [True: 0, False: 4]
  ------------------
 1922|      0|        *walk++ = ' ';
 1923|      0|    }
 1924|      4|}

SECMOD_Init:
   37|      2|{
   38|       |    /* don't initialize twice */
   39|      2|    if (moduleLock)
  ------------------
  |  Branch (39:9): [True: 1, False: 1]
  ------------------
   40|      1|        return;
   41|       |
   42|      1|    moduleLock = SECMOD_NewListLock();
   43|      1|    PK11_InitSlotLists();
   44|      1|}
SECMOD_Shutdown:
   48|      1|{
   49|       |    /* destroy the lock */
   50|      1|    if (moduleLock) {
  ------------------
  |  Branch (50:9): [True: 1, False: 0]
  ------------------
   51|      1|        SECMOD_DestroyListLock(moduleLock);
   52|      1|        moduleLock = NULL;
   53|      1|    }
   54|       |    /* free the internal module */
   55|      1|    if (internalModule) {
  ------------------
  |  Branch (55:9): [True: 1, False: 0]
  ------------------
   56|      1|        SECMOD_DestroyModule(internalModule);
   57|      1|        internalModule = NULL;
   58|      1|    }
   59|       |
   60|       |    /* free the default database module */
   61|      1|    if (defaultDBModule) {
  ------------------
  |  Branch (61:9): [True: 1, False: 0]
  ------------------
   62|      1|        SECMOD_DestroyModule(defaultDBModule);
   63|      1|        defaultDBModule = NULL;
   64|      1|    }
   65|       |
   66|       |    /* destroy the list */
   67|      1|    if (modules) {
  ------------------
  |  Branch (67:9): [True: 1, False: 0]
  ------------------
   68|      1|        SECMOD_DestroyModuleList(modules);
   69|      1|        modules = NULL;
   70|      1|    }
   71|       |
   72|      1|    if (modulesDB) {
  ------------------
  |  Branch (72:9): [True: 1, False: 0]
  ------------------
   73|      1|        SECMOD_DestroyModuleList(modulesDB);
   74|      1|        modulesDB = NULL;
   75|      1|    }
   76|       |
   77|      1|    if (modulesUnload) {
  ------------------
  |  Branch (77:9): [True: 0, False: 1]
  ------------------
   78|      0|        SECMOD_DestroyModuleList(modulesUnload);
   79|      0|        modulesUnload = NULL;
   80|      0|    }
   81|       |
   82|       |    /* make all the slots and the lists go away */
   83|      1|    PK11_DestroySlotLists();
   84|       |
   85|      1|    nss_DumpModuleLog();
   86|       |
   87|      1|#ifdef DEBUG
   88|      1|    if (PR_GetEnvSecure("NSS_STRICT_SHUTDOWN")) {
  ------------------
  |  Branch (88:9): [True: 0, False: 1]
  ------------------
   89|      0|        PORT_Assert(secmod_PrivateModuleCount == 0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   90|      0|    }
   91|      1|#endif
   92|      1|    if (secmod_PrivateModuleCount) {
  ------------------
  |  Branch (92:9): [True: 0, False: 1]
  ------------------
   93|      0|        PORT_SetError(SEC_ERROR_BUSY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
   94|      0|        return SECFailure;
   95|      0|    }
   96|      1|    return SECSuccess;
   97|      1|}
SECMOD_GetSystemFIPSEnabled:
  101|      2|{
  102|      2|    return NSS_GetSystemFIPSEnabled();
  103|      2|}
SECMOD_GetInternalModule:
  110|  3.73M|{
  111|  3.73M|    return internalModule;
  112|  3.73M|}
secmod_AddModuleToList:
  116|      2|{
  117|      2|    SECMODModuleList *mlp, *newListElement, *last = NULL;
  118|       |
  119|      2|    newListElement = SECMOD_NewModuleListElement();
  120|      2|    if (newListElement == NULL) {
  ------------------
  |  Branch (120:9): [True: 0, False: 2]
  ------------------
  121|      0|        return SECFailure;
  122|      0|    }
  123|       |
  124|      2|    newListElement->module = SECMOD_ReferenceModule(newModule);
  125|       |
  126|      2|    SECMOD_GetWriteLock(moduleLock);
  127|       |    /* Added it to the end (This is very inefficient, but Adding a module
  128|       |     * on the fly should happen maybe 2-3 times through the life this program
  129|       |     * on a given computer, and this list should be *SHORT*. */
  130|      2|    for (mlp = *moduleList; mlp != NULL; mlp = mlp->next) {
  ------------------
  |  Branch (130:29): [True: 0, False: 2]
  ------------------
  131|      0|        last = mlp;
  132|      0|    }
  133|       |
  134|      2|    if (last == NULL) {
  ------------------
  |  Branch (134:9): [True: 2, False: 0]
  ------------------
  135|      2|        *moduleList = newListElement;
  136|      2|    } else {
  137|      0|        SECMOD_AddList(last, newListElement, NULL);
  138|      0|    }
  139|      2|    SECMOD_ReleaseWriteLock(moduleLock);
  140|      2|    return SECSuccess;
  141|      2|}
SECMOD_AddModuleToList:
  145|      1|{
  146|      1|    if (newModule->internal && !internalModule) {
  ------------------
  |  Branch (146:9): [True: 1, False: 0]
  |  Branch (146:32): [True: 1, False: 0]
  ------------------
  147|      1|        internalModule = SECMOD_ReferenceModule(newModule);
  148|      1|    }
  149|      1|    return secmod_AddModuleToList(&modules, newModule);
  150|      1|}
SECMOD_AddModuleToDBOnlyList:
  154|      1|{
  155|      1|    if (defaultDBModule && SECMOD_GetDefaultModDBFlag(newModule)) {
  ------------------
  |  Branch (155:9): [True: 0, False: 1]
  |  Branch (155:28): [True: 0, False: 0]
  ------------------
  156|      0|        SECMOD_DestroyModule(defaultDBModule);
  157|      0|        defaultDBModule = SECMOD_ReferenceModule(newModule);
  158|      1|    } else if (defaultDBModule == NULL) {
  ------------------
  |  Branch (158:16): [True: 1, False: 0]
  ------------------
  159|      1|        defaultDBModule = SECMOD_ReferenceModule(newModule);
  160|      1|    }
  161|      1|    return secmod_AddModuleToList(&modulesDB, newModule);
  162|      1|}
SECMOD_GetDefaultModuleList:
  175|  3.88k|{
  176|  3.88k|    return modules;
  177|  3.88k|}
SECMOD_GetDefaultModuleListLock:
  202|  3.71M|{
  203|  3.71M|    return moduleLock;
  204|  3.71M|}
PK11_IsFIPS:
  666|  8.53k|{
  667|  8.53k|    SECMODModule *mod = SECMOD_GetInternalModule();
  668|       |
  669|  8.53k|    if (mod && mod->internal) {
  ------------------
  |  Branch (669:9): [True: 8.53k, False: 0]
  |  Branch (669:16): [True: 8.53k, False: 0]
  ------------------
  670|  8.53k|        return mod->isFIPS;
  671|  8.53k|    }
  672|       |
  673|      0|    return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  674|  8.53k|}
SECMOD_NewModuleListElement:
  839|      2|{
  840|      2|    SECMODModuleList *newModList;
  841|       |
  842|      2|    newModList = (SECMODModuleList *)PORT_Alloc(sizeof(SECMODModuleList));
  ------------------
  |  |   52|      2|#define PORT_Alloc PORT_Alloc_Util
  ------------------
  843|      2|    if (newModList) {
  ------------------
  |  Branch (843:9): [True: 2, False: 0]
  ------------------
  844|      2|        newModList->next = NULL;
  845|      2|        newModList->module = NULL;
  846|      2|    }
  847|      2|    return newModList;
  848|      2|}
SECMOD_ReferenceModule:
  855|      5|{
  856|      5|    PZ_Lock(module->refLock);
  ------------------
  |  |  245|      5|#define PZ_Lock(k) PR_Lock((k))
  ------------------
  857|      5|    PORT_Assert(module->refCount > 0);
  ------------------
  |  |  120|      5|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      5|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 5, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  858|       |
  859|      5|    module->refCount++;
  860|      5|    PZ_Unlock(module->refLock);
  ------------------
  |  |  246|      5|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  861|      5|    return module;
  862|      5|}
SECMOD_DestroyModule:
  867|      7|{
  868|      7|    PRBool willfree = PR_FALSE;
  ------------------
  |  |  438|      7|#define PR_FALSE 0
  ------------------
  869|      7|    int slotCount;
  870|      7|    int i;
  871|       |
  872|      7|    PZ_Lock(module->refLock);
  ------------------
  |  |  245|      7|#define PZ_Lock(k) PR_Lock((k))
  ------------------
  873|      7|    if (module->refCount-- == 1) {
  ------------------
  |  Branch (873:9): [True: 2, False: 5]
  ------------------
  874|      2|        willfree = PR_TRUE;
  ------------------
  |  |  437|      2|#define PR_TRUE 1
  ------------------
  875|      2|    }
  876|      7|    PORT_Assert(willfree || (module->refCount > 0));
  ------------------
  |  |  120|      7|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|     12|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 2, False: 5]
  |  |  |  |  |  Branch (208:7): [True: 5, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  877|      7|    PZ_Unlock(module->refLock);
  ------------------
  |  |  246|      7|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  878|       |
  879|      7|    if (!willfree) {
  ------------------
  |  Branch (879:9): [True: 5, False: 2]
  ------------------
  880|      5|        return;
  881|      5|    }
  882|       |
  883|      2|    if (module->parent != NULL) {
  ------------------
  |  Branch (883:9): [True: 1, False: 1]
  ------------------
  884|      1|        SECMODModule *parent = module->parent;
  885|       |        /* paranoia, don't loop forever if the modules are looped */
  886|      1|        module->parent = NULL;
  887|      1|        SECMOD_DestroyModule(parent);
  888|      1|    }
  889|       |
  890|       |    /* slots can't really disappear until our module starts freeing them,
  891|       |     * so this check is safe */
  892|      2|    slotCount = module->slotCount;
  893|      2|    if (slotCount == 0) {
  ------------------
  |  Branch (893:9): [True: 1, False: 1]
  ------------------
  894|      1|        SECMOD_SlotDestroyModule(module, PR_FALSE);
  ------------------
  |  |  438|      1|#define PR_FALSE 0
  ------------------
  895|      1|        return;
  896|      1|    }
  897|       |
  898|       |    /* now free all out slots, when they are done, they will cause the
  899|       |     * module to disappear altogether */
  900|      3|    for (i = 0; i < slotCount; i++) {
  ------------------
  |  Branch (900:17): [True: 2, False: 1]
  ------------------
  901|      2|        if (!module->slots[i]->disabled) {
  ------------------
  |  Branch (901:13): [True: 2, False: 0]
  ------------------
  902|      2|            PK11_ClearSlotList(module->slots[i]);
  903|      2|        }
  904|      2|        PK11_FreeSlot(module->slots[i]);
  905|      2|    }
  906|       |    /* WARNING: once the last slot has been freed is it possible (even likely)
  907|       |     * that module is no more... touching it now is a good way to go south */
  908|      1|}
SECMOD_SlotDestroyModule:
  914|      3|{
  915|      3|    PRBool willfree = PR_FALSE;
  ------------------
  |  |  438|      3|#define PR_FALSE 0
  ------------------
  916|      3|    if (fromSlot) {
  ------------------
  |  Branch (916:9): [True: 2, False: 1]
  ------------------
  917|      2|        PORT_Assert(module->refCount == 0);
  ------------------
  |  |  120|      2|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      2|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 2, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  918|      2|        PZ_Lock(module->refLock);
  ------------------
  |  |  245|      2|#define PZ_Lock(k) PR_Lock((k))
  ------------------
  919|      2|        if (module->slotCount-- == 1) {
  ------------------
  |  Branch (919:13): [True: 1, False: 1]
  ------------------
  920|      1|            willfree = PR_TRUE;
  ------------------
  |  |  437|      1|#define PR_TRUE 1
  ------------------
  921|      1|        }
  922|      2|        PORT_Assert(willfree || (module->slotCount > 0));
  ------------------
  |  |  120|      2|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      3|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 1, False: 1]
  |  |  |  |  |  Branch (208:7): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  923|      2|        PZ_Unlock(module->refLock);
  ------------------
  |  |  246|      2|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  924|      2|        if (!willfree)
  ------------------
  |  Branch (924:13): [True: 1, False: 1]
  ------------------
  925|      1|            return;
  926|      2|    }
  927|       |
  928|      2|    if (module == pendingModule) {
  ------------------
  |  Branch (928:9): [True: 0, False: 2]
  ------------------
  929|      0|        pendingModule = NULL;
  930|      0|    }
  931|       |
  932|      2|    if (module->loaded) {
  ------------------
  |  Branch (932:9): [True: 2, False: 0]
  ------------------
  933|      2|        SECMOD_UnloadModule(module);
  934|      2|    }
  935|      2|    PZ_DestroyLock(module->refLock);
  ------------------
  |  |  244|      2|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
  936|      2|    PORT_FreeArena(module->arena, PR_FALSE);
  ------------------
  |  |   61|      2|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                  PORT_FreeArena(module->arena, PR_FALSE);
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
  937|      2|    secmod_PrivateModuleCount--;
  938|      2|}
SECMOD_DestroyModuleListElement:
  946|      2|{
  947|      2|    SECMODModuleList *next = element->next;
  948|       |
  949|      2|    if (element->module) {
  ------------------
  |  Branch (949:9): [True: 2, False: 0]
  ------------------
  950|      2|        SECMOD_DestroyModule(element->module);
  951|      2|        element->module = NULL;
  952|      2|    }
  953|      2|    PORT_Free(element);
  ------------------
  |  |   60|      2|#define PORT_Free PORT_Free_Util
  ------------------
  954|      2|    return next;
  955|      2|}
SECMOD_DestroyModuleList:
  962|      2|{
  963|      2|    SECMODModuleList *lp;
  964|       |
  965|      4|    for (lp = list; lp != NULL; lp = SECMOD_DestroyModuleListElement(lp))
  ------------------
  |  Branch (965:21): [True: 2, False: 2]
  ------------------
  966|      2|        ;
  967|      2|}

nssDecodedCert_Destroy:
   46|  5.09k|{
   47|  5.09k|    if (!dc) {
  ------------------
  |  Branch (47:9): [True: 0, False: 5.09k]
  ------------------
   48|      0|        return PR_FAILURE;
   49|      0|    }
   50|  5.09k|    switch (dc->type) {
   51|  5.09k|        case NSSCertificateType_PKIX:
  ------------------
  |  Branch (51:9): [True: 5.09k, False: 0]
  ------------------
   52|  5.09k|            return nssDecodedPKIXCertificate_Destroy(dc);
   53|      0|        default:
  ------------------
  |  Branch (53:9): [True: 0, False: 5.09k]
  ------------------
   54|       |#if 0
   55|       |    nss_SetError(NSS_ERROR_INVALID_ARGUMENT);
   56|       |#endif
   57|      0|            break;
   58|  5.09k|    }
   59|      0|    return PR_FAILURE;
   60|  5.09k|}

nssCertificate_AddRef:
   79|  9.63k|{
   80|  9.63k|    if (c) {
  ------------------
  |  Branch (80:9): [True: 9.63k, False: 0]
  ------------------
   81|  9.63k|        nssPKIObject_AddRef(&c->object);
   82|  9.63k|    }
   83|  9.63k|    return c;
   84|  9.63k|}
nssCertificate_Destroy:
   89|  14.7k|{
   90|  14.7k|    nssCertificateStoreTrace lockTrace = { NULL, NULL, PR_FALSE, PR_FALSE };
  ------------------
  |  |  438|  14.7k|#define PR_FALSE 0
  ------------------
                  nssCertificateStoreTrace lockTrace = { NULL, NULL, PR_FALSE, PR_FALSE };
  ------------------
  |  |  438|  14.7k|#define PR_FALSE 0
  ------------------
   91|  14.7k|    nssCertificateStoreTrace unlockTrace = { NULL, NULL, PR_FALSE, PR_FALSE };
  ------------------
  |  |  438|  14.7k|#define PR_FALSE 0
  ------------------
                  nssCertificateStoreTrace unlockTrace = { NULL, NULL, PR_FALSE, PR_FALSE };
  ------------------
  |  |  438|  14.7k|#define PR_FALSE 0
  ------------------
   92|       |
   93|  14.7k|    if (c) {
  ------------------
  |  Branch (93:9): [True: 14.7k, False: 0]
  ------------------
   94|  14.7k|        PRUint32 i;
   95|  14.7k|        nssDecodedCert *dc = c->decoding;
   96|  14.7k|        NSSTrustDomain *td = STAN_GetDefaultTrustDomain();
   97|  14.7k|        NSSCryptoContext *cc = c->object.cryptoContext;
   98|       |
   99|  14.7k|        PR_ASSERT(c->object.refCount > 0);
  ------------------
  |  |  208|  14.7k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 14.7k, False: 0]
  |  |  ------------------
  ------------------
  100|       |
  101|       |        /* --- LOCK storage --- */
  102|  14.7k|        if (cc) {
  ------------------
  |  Branch (102:13): [True: 14.7k, False: 0]
  ------------------
  103|  14.7k|            nssCertificateStore_Lock(cc->certStore, &lockTrace);
  104|  14.7k|        } else {
  105|      0|            nssTrustDomain_LockCertCache(td);
  106|      0|        }
  107|  14.7k|        if (PR_ATOMIC_DECREMENT(&c->object.refCount) == 0) {
  ------------------
  |  |  123|  14.7k|#define PR_ATOMIC_DECREMENT(val) __sync_sub_and_fetch(val, 1)
  ------------------
  |  Branch (107:13): [True: 5.09k, False: 9.63k]
  ------------------
  108|       |            /* --- remove cert and UNLOCK storage --- */
  109|  5.09k|            if (cc) {
  ------------------
  |  Branch (109:17): [True: 5.09k, False: 0]
  ------------------
  110|  5.09k|                nssCertificateStore_RemoveCertLOCKED(cc->certStore, c);
  111|  5.09k|                nssCertificateStore_Unlock(cc->certStore, &lockTrace,
  112|  5.09k|                                           &unlockTrace);
  113|  5.09k|            } else {
  114|      0|                nssTrustDomain_RemoveCertFromCacheLOCKED(td, c);
  115|      0|                nssTrustDomain_UnlockCertCache(td);
  116|      0|            }
  117|       |            /* free cert data */
  118|  5.09k|            for (i = 0; i < c->object.numInstances; i++) {
  ------------------
  |  Branch (118:25): [True: 0, False: 5.09k]
  ------------------
  119|      0|                nssCryptokiObject_Destroy(c->object.instances[i]);
  120|      0|            }
  121|  5.09k|            nssPKIObject_DestroyLock(&c->object);
  122|  5.09k|            nssArena_Destroy(c->object.arena);
  123|  5.09k|            nssDecodedCert_Destroy(dc);
  124|  9.63k|        } else {
  125|       |            /* --- UNLOCK storage --- */
  126|  9.63k|            if (cc) {
  ------------------
  |  Branch (126:17): [True: 9.63k, False: 0]
  ------------------
  127|  9.63k|                nssCertificateStore_Unlock(cc->certStore,
  128|  9.63k|                                           &lockTrace,
  129|  9.63k|                                           &unlockTrace);
  130|  9.63k|            } else {
  131|      0|                nssTrustDomain_UnlockCertCache(td);
  132|      0|            }
  133|  9.63k|        }
  134|  14.7k|    }
  135|  14.7k|    return PR_SUCCESS;
  136|  14.7k|}
NSSCertificate_Destroy:
  140|  14.7k|{
  141|  14.7k|    return nssCertificate_Destroy(c);
  142|  14.7k|}

nssCryptoContext_Create:
   24|      1|{
   25|      1|    NSSArena *arena;
   26|      1|    NSSCryptoContext *rvCC;
   27|      1|    arena = NSSArena_Create();
   28|      1|    if (!arena) {
  ------------------
  |  Branch (28:9): [True: 0, False: 1]
  ------------------
   29|      0|        return NULL;
   30|      0|    }
   31|      1|    rvCC = nss_ZNEW(arena, NSSCryptoContext);
  ------------------
  |  |  348|      1|#define nss_ZNEW(arenaOpt, type) ((type *)nss_ZAlloc((arenaOpt), sizeof(type)))
  ------------------
   32|      1|    if (!rvCC) {
  ------------------
  |  Branch (32:9): [True: 0, False: 1]
  ------------------
   33|      0|        return NULL;
   34|      0|    }
   35|      1|    rvCC->td = td;
   36|      1|    rvCC->arena = arena;
   37|      1|    rvCC->certStore = nssCertificateStore_Create(rvCC->arena);
   38|      1|    if (!rvCC->certStore) {
  ------------------
  |  Branch (38:9): [True: 0, False: 1]
  ------------------
   39|      0|        nssArena_Destroy(arena);
   40|      0|        return NULL;
   41|      0|    }
   42|       |
   43|      1|    return rvCC;
   44|      1|}
NSSCryptoContext_Destroy:
   48|      1|{
   49|      1|    PRStatus status = PR_SUCCESS;
   50|      1|    PORT_Assert(cc && cc->certStore);
  ------------------
  |  |  120|      1|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      2|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 1, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   51|      1|    if (!cc) {
  ------------------
  |  Branch (51:9): [True: 0, False: 1]
  ------------------
   52|      0|        return PR_FAILURE;
   53|      0|    }
   54|      1|    if (cc->certStore) {
  ------------------
  |  Branch (54:9): [True: 1, False: 0]
  ------------------
   55|      1|        status = nssCertificateStore_Destroy(cc->certStore);
   56|      1|        if (status == PR_FAILURE) {
  ------------------
  |  Branch (56:13): [True: 0, False: 1]
  ------------------
   57|      0|            return status;
   58|      0|        }
   59|      1|    } else {
   60|      0|        status = PR_FAILURE;
   61|      0|    }
   62|      1|    nssArena_Destroy(cc->arena);
   63|      1|    return status;
   64|      1|}
NSSCryptoContext_FindOrImportCertificate:
   96|  5.09k|{
   97|  5.09k|    NSSCertificate *rvCert = NULL;
   98|       |
   99|  5.09k|    PORT_Assert(cc && cc->certStore);
  ------------------
  |  |  120|  5.09k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  10.1k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 5.09k, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 5.09k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  100|  5.09k|    if (!cc || !cc->certStore) {
  ------------------
  |  Branch (100:9): [True: 0, False: 5.09k]
  |  Branch (100:16): [True: 0, False: 5.09k]
  ------------------
  101|      0|        nss_SetError(NSS_ERROR_INVALID_ARGUMENT);
  102|      0|        return rvCert;
  103|      0|    }
  104|  5.09k|    rvCert = nssCertificateStore_FindOrAdd(cc->certStore, c);
  105|  5.09k|    if (rvCert == c && c->object.cryptoContext != cc) {
  ------------------
  |  Branch (105:9): [True: 5.09k, False: 0]
  |  Branch (105:24): [True: 0, False: 5.09k]
  ------------------
  106|      0|        PORT_Assert(!c->object.cryptoContext);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  107|      0|        c->object.cryptoContext = cc;
  108|      0|    }
  109|  5.09k|    if (rvCert) {
  ------------------
  |  Branch (109:9): [True: 5.09k, False: 0]
  ------------------
  110|       |        /* an NSSCertificate cannot be part of two crypto contexts
  111|       |        ** simultaneously.  If this assertion fails, then there is
  112|       |        ** a serious Stan design flaw.
  113|       |        */
  114|  5.09k|        PORT_Assert(cc == c->object.cryptoContext);
  ------------------
  |  |  120|  5.09k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  5.09k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 5.09k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  115|  5.09k|    }
  116|  5.09k|    return rvCert;
  117|  5.09k|}
NSSCryptoContext_FindCertificateByEncodedCertificate:
  338|  5.30k|{
  339|  5.30k|    PORT_Assert(cc && cc->certStore);
  ------------------
  |  |  120|  5.30k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  10.6k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 5.30k, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 5.30k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  340|  5.30k|    if (!cc || !cc->certStore) {
  ------------------
  |  Branch (340:9): [True: 0, False: 5.30k]
  |  Branch (340:16): [True: 0, False: 5.30k]
  ------------------
  341|      0|        return NULL;
  342|      0|    }
  343|  5.30k|    return nssCertificateStore_FindCertificateByEncodedCertificate(
  344|  5.30k|        cc->certStore,
  345|  5.30k|        encodedCertificate);
  346|  5.30k|}
nssCryptoContext_FindTrustForCertificate:
  493|  5.09k|{
  494|  5.09k|    PORT_Assert(cc && cc->certStore);
  ------------------
  |  |  120|  5.09k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  10.1k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 5.09k, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 5.09k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  495|  5.09k|    if (!cc || !cc->certStore) {
  ------------------
  |  Branch (495:9): [True: 0, False: 5.09k]
  |  Branch (495:16): [True: 0, False: 5.09k]
  ------------------
  496|      0|        return NULL;
  497|      0|    }
  498|  5.09k|    return nssCertificateStore_FindTrustForCertificate(cc->certStore, cert);
  499|  5.09k|}

STAN_GetDefaultTrustDomain:
   49|  20.0k|{
   50|  20.0k|    return g_default_trust_domain;
   51|  20.0k|}
STAN_GetDefaultCryptoContext:
   55|  5.30k|{
   56|  5.30k|    return g_default_crypto_context;
   57|  5.30k|}
STAN_InitTokenForSlotInfo:
   64|      2|{
   65|      2|    NSSToken *token;
   66|      2|    if (!td) {
  ------------------
  |  Branch (66:9): [True: 0, False: 2]
  ------------------
   67|      0|        td = g_default_trust_domain;
   68|      0|        if (!td) {
  ------------------
  |  Branch (68:13): [True: 0, False: 0]
  ------------------
   69|       |            /* we're called while still initting. slot will get added
   70|       |             * appropriately through normal init processes */
   71|      0|            return PR_SUCCESS;
   72|      0|        }
   73|      0|    }
   74|      2|    token = nssToken_CreateFromPK11SlotInfo(td, slot);
   75|      2|    if (token) {
  ------------------
  |  Branch (75:9): [True: 2, False: 0]
  ------------------
   76|       |        /* PK11Slot_SetNSSToken increments the refcount on |token| to 2 */
   77|      2|        PK11Slot_SetNSSToken(slot, token);
   78|       |
   79|       |        /* we give our reference to |td->tokenList| */
   80|      2|        NSSRWLock_LockWrite(td->tokensLock);
  ------------------
  |  |   48|      2|#define NSSRWLock_LockWrite NSSRWLock_LockWrite_Util
  ------------------
   81|      2|        nssList_Add(td->tokenList, token);
   82|      2|        NSSRWLock_UnlockWrite(td->tokensLock);
  ------------------
  |  |   51|      2|#define NSSRWLock_UnlockWrite NSSRWLock_UnlockWrite_Util
  ------------------
   83|      2|    } else {
   84|      0|        PK11Slot_SetNSSToken(slot, NULL);
   85|      0|    }
   86|      2|    return PR_SUCCESS;
   87|      2|}
STAN_LoadDefaultNSS3TrustDomain:
  110|      1|{
  111|      1|    NSSTrustDomain *td;
  112|      1|    SECMODModuleList *mlp;
  113|      1|    SECMODListLock *moduleLock = SECMOD_GetDefaultModuleListLock();
  114|      1|    int i;
  115|       |
  116|      1|    if (g_default_trust_domain || g_default_crypto_context) {
  ------------------
  |  Branch (116:9): [True: 0, False: 1]
  |  Branch (116:35): [True: 0, False: 1]
  ------------------
  117|       |        /* Stan is already initialized or a previous shutdown failed. */
  118|      0|        nss_SetError(NSS_ERROR_ALREADY_INITIALIZED);
  119|      0|        return PR_FAILURE;
  120|      0|    }
  121|      1|    td = NSSTrustDomain_Create(NULL, NULL, NULL, NULL);
  122|      1|    if (!td) {
  ------------------
  |  Branch (122:9): [True: 0, False: 1]
  ------------------
  123|      0|        return PR_FAILURE;
  124|      0|    }
  125|       |    /*
  126|       |     * Deadlock warning: we should never acquire the moduleLock while
  127|       |     * we hold the tokensLock. We can use the NSSRWLock Rank feature to
  128|       |     * guarrentee this. tokensLock have a higher rank than module lock.
  129|       |     */
  130|      1|    td->tokenList = nssList_Create(td->arena, PR_TRUE);
  ------------------
  |  |  437|      1|#define PR_TRUE 1
  ------------------
  131|      1|    if (!td->tokenList) {
  ------------------
  |  Branch (131:9): [True: 0, False: 1]
  ------------------
  132|      0|        goto loser;
  133|      0|    }
  134|      1|    SECMOD_GetReadLock(moduleLock);
  135|      1|    NSSRWLock_LockWrite(td->tokensLock);
  ------------------
  |  |   48|      1|#define NSSRWLock_LockWrite NSSRWLock_LockWrite_Util
  ------------------
  136|      2|    for (mlp = SECMOD_GetDefaultModuleList(); mlp != NULL; mlp = mlp->next) {
  ------------------
  |  Branch (136:47): [True: 1, False: 1]
  ------------------
  137|      3|        for (i = 0; i < mlp->module->slotCount; i++) {
  ------------------
  |  Branch (137:21): [True: 2, False: 1]
  ------------------
  138|      2|            STAN_InitTokenForSlotInfo(td, mlp->module->slots[i]);
  139|      2|        }
  140|      1|    }
  141|      1|    td->tokens = nssList_CreateIterator(td->tokenList);
  142|      1|    NSSRWLock_UnlockWrite(td->tokensLock);
  ------------------
  |  |   51|      1|#define NSSRWLock_UnlockWrite NSSRWLock_UnlockWrite_Util
  ------------------
  143|      1|    SECMOD_ReleaseReadLock(moduleLock);
  144|      1|    if (!td->tokens) {
  ------------------
  |  Branch (144:9): [True: 0, False: 1]
  ------------------
  145|      0|        goto loser;
  146|      0|    }
  147|      1|    g_default_crypto_context = NSSTrustDomain_CreateCryptoContext(td, NULL);
  148|      1|    if (!g_default_crypto_context) {
  ------------------
  |  Branch (148:9): [True: 0, False: 1]
  ------------------
  149|      0|        goto loser;
  150|      0|    }
  151|      1|    g_default_trust_domain = td;
  152|      1|    return PR_SUCCESS;
  153|       |
  154|      0|loser:
  155|      0|    NSSTrustDomain_Destroy(td);
  156|      0|    return PR_FAILURE;
  157|      1|}
STAN_Shutdown:
  208|      1|{
  209|      1|    PRStatus status = PR_SUCCESS;
  210|      1|    if (g_default_trust_domain) {
  ------------------
  |  Branch (210:9): [True: 1, False: 0]
  ------------------
  211|      1|        if (NSSTrustDomain_Destroy(g_default_trust_domain) == PR_SUCCESS) {
  ------------------
  |  Branch (211:13): [True: 1, False: 0]
  ------------------
  212|      1|            g_default_trust_domain = NULL;
  213|      1|        } else {
  214|      0|            status = PR_FAILURE;
  215|      0|        }
  216|      1|    }
  217|      1|    if (g_default_crypto_context) {
  ------------------
  |  Branch (217:9): [True: 1, False: 0]
  ------------------
  218|      1|        if (NSSCryptoContext_Destroy(g_default_crypto_context) == PR_SUCCESS) {
  ------------------
  |  Branch (218:13): [True: 1, False: 0]
  ------------------
  219|      1|            g_default_crypto_context = NULL;
  220|      1|        } else {
  221|      0|            status = PR_FAILURE;
  222|      0|        }
  223|      1|    }
  224|      1|    return status;
  225|      1|}
nssPKIX509_GetIssuerAndSerialFromDER:
  257|  10.6k|{
  258|  10.6k|    SECItem derCert = { 0 };
  259|  10.6k|    SECItem derIssuer = { 0 };
  260|  10.6k|    SECItem derSerial = { 0 };
  261|  10.6k|    SECStatus secrv;
  262|  10.6k|    derCert.data = (unsigned char *)der->data;
  263|  10.6k|    derCert.len = der->size;
  264|  10.6k|    secrv = CERT_IssuerNameFromDERCert(&derCert, &derIssuer);
  265|  10.6k|    if (secrv != SECSuccess) {
  ------------------
  |  Branch (265:9): [True: 348, False: 10.2k]
  ------------------
  266|    348|        return PR_FAILURE;
  267|    348|    }
  268|  10.2k|    secrv = CERT_SerialNumberFromDERCert(&derCert, &derSerial);
  269|  10.2k|    if (secrv != SECSuccess) {
  ------------------
  |  Branch (269:9): [True: 0, False: 10.2k]
  ------------------
  270|      0|        PORT_Free(derSerial.data);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
  271|      0|        return PR_FAILURE;
  272|      0|    }
  273|  10.2k|    issuer->data = derIssuer.data;
  274|  10.2k|    issuer->size = derIssuer.len;
  275|  10.2k|    serial->data = derSerial.data;
  276|  10.2k|    serial->size = derSerial.len;
  277|  10.2k|    return PR_SUCCESS;
  278|  10.2k|}
nssDecodedPKIXCertificate_Create:
  490|  5.30k|{
  491|  5.30k|    nssDecodedCert *rvDC = NULL;
  492|  5.30k|    CERTCertificate *cert;
  493|  5.30k|    SECItem secDER;
  494|       |
  495|  5.30k|    SECITEM_FROM_NSSITEM(&secDER, encoding);
  ------------------
  |  |   31|  5.30k|    (secit)->data = (unsigned char *)(nssit)->data; \
  |  |   32|  5.30k|    (secit)->len = (unsigned int)(nssit)->size;
  ------------------
  496|  5.30k|    cert = CERT_DecodeDERCertificate(&secDER, PR_TRUE, NULL);
  ------------------
  |  |  437|  5.30k|#define PR_TRUE 1
  ------------------
  497|  5.30k|    if (cert) {
  ------------------
  |  Branch (497:9): [True: 5.09k, False: 211]
  ------------------
  498|  5.09k|        rvDC = nss_ZNEW(arenaOpt, nssDecodedCert);
  ------------------
  |  |  348|  5.09k|#define nss_ZNEW(arenaOpt, type) ((type *)nss_ZAlloc((arenaOpt), sizeof(type)))
  ------------------
  499|  5.09k|        if (rvDC) {
  ------------------
  |  Branch (499:13): [True: 5.09k, False: 0]
  ------------------
  500|  5.09k|            rvDC->type = NSSCertificateType_PKIX;
  501|  5.09k|            rvDC->data = (void *)cert;
  502|  5.09k|            rvDC->getIdentifier = nss3certificate_getIdentifier;
  503|  5.09k|            rvDC->getIssuerIdentifier = nss3certificate_getIssuerIdentifier;
  504|  5.09k|            rvDC->matchIdentifier = nss3certificate_matchIdentifier;
  505|  5.09k|            rvDC->isValidIssuer = nss3certificate_isValidIssuer;
  506|  5.09k|            rvDC->getUsage = nss3certificate_getUsage;
  507|  5.09k|            rvDC->isValidAtTime = nss3certificate_isValidAtTime;
  508|  5.09k|            rvDC->isNewerThan = nss3certificate_isNewerThan;
  509|  5.09k|            rvDC->matchUsage = nss3certificate_matchUsage;
  510|  5.09k|            rvDC->isTrustedForUsage = nss3certificate_isTrustedForUsage;
  511|  5.09k|            rvDC->getEmailAddress = nss3certificate_getEmailAddress;
  512|  5.09k|            rvDC->getDERSerialNumber = nss3certificate_getDERSerialNumber;
  513|  5.09k|        } else {
  514|      0|            CERT_DestroyCertificate(cert);
  515|      0|        }
  516|  5.09k|    }
  517|  5.30k|    return rvDC;
  518|  5.30k|}
nssDecodedPKIXCertificate_Destroy:
  546|  5.09k|{
  547|  5.09k|    CERTCertificate *cert = (CERTCertificate *)dc->data;
  548|       |
  549|       |    /* The decoder may only be half initialized (the case where we find we
  550|       |     * could not decode the certificate). In this case, there is not cert to
  551|       |     * free, just free the dc structure. */
  552|  5.09k|    if (cert) {
  ------------------
  |  Branch (552:9): [True: 5.09k, False: 0]
  ------------------
  553|  5.09k|        PRBool freeSlot = cert->ownSlot;
  554|  5.09k|        PK11SlotInfo *slot = cert->slot;
  555|  5.09k|        PLArenaPool *arena = cert->arena;
  556|       |        /* zero cert before freeing. Any stale references to this cert
  557|       |         * after this point will probably cause an exception.  */
  558|  5.09k|        PORT_Memset(cert, 0, sizeof *cert);
  ------------------
  |  |  182|  5.09k|#define PORT_Memset memset
  ------------------
  559|       |        /* free the arena that contains the cert. */
  560|  5.09k|        PORT_FreeArena(arena, PR_FALSE);
  ------------------
  |  |   61|  5.09k|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                      PORT_FreeArena(arena, PR_FALSE);
  ------------------
  |  |  438|  5.09k|#define PR_FALSE 0
  ------------------
  561|  5.09k|        if (slot && freeSlot) {
  ------------------
  |  Branch (561:13): [True: 0, False: 5.09k]
  |  Branch (561:21): [True: 0, False: 0]
  ------------------
  562|      0|            PK11_FreeSlot(slot);
  563|      0|        }
  564|  5.09k|    }
  565|  5.09k|    nss_ZFreeIf(dc);
  566|  5.09k|    return PR_SUCCESS;
  567|  5.09k|}
STAN_GetCERTCertificate:
  977|  5.30k|{
  978|  5.30k|    return stan_GetCERTCertificate(c, PR_FALSE);
  ------------------
  |  |  438|  5.30k|#define PR_FALSE 0
  ------------------
  979|  5.30k|}
STAN_GetCERTCertificateOrRelease:
  990|  5.09k|{
  991|  5.09k|    CERTCertificate *nss3cert = stan_GetCERTCertificate(c, PR_FALSE);
  ------------------
  |  |  438|  5.09k|#define PR_FALSE 0
  ------------------
  992|  5.09k|    if (!nss3cert) {
  ------------------
  |  Branch (992:9): [True: 0, False: 5.09k]
  ------------------
  993|      0|        nssCertificate_Destroy(c);
  994|      0|    }
  995|  5.09k|    return nss3cert;
  996|  5.09k|}
STAN_GetNSSCertificate:
 1024|  4.54k|{
 1025|  4.54k|    NSSCertificate *c;
 1026|  4.54k|    nssCryptokiInstance *instance;
 1027|  4.54k|    nssPKIObject *pkiob;
 1028|  4.54k|    NSSArena *arena;
 1029|  4.54k|    CERT_LockCertTempPerm(cc);
 1030|  4.54k|    c = cc->nssCertificate;
 1031|  4.54k|    CERT_UnlockCertTempPerm(cc);
 1032|  4.54k|    if (c) {
  ------------------
  |  Branch (1032:9): [True: 4.54k, False: 0]
  ------------------
 1033|  4.54k|        return c;
 1034|  4.54k|    }
 1035|       |    /* i don't think this should happen.  but if it can, need to create
 1036|       |     * NSSCertificate from CERTCertificate values here.  */
 1037|       |    /* Yup, it can happen. */
 1038|      0|    arena = NSSArena_Create();
 1039|      0|    if (!arena) {
  ------------------
  |  Branch (1039:9): [True: 0, False: 0]
  ------------------
 1040|      0|        return NULL;
 1041|      0|    }
 1042|      0|    c = nss_ZNEW(arena, NSSCertificate);
  ------------------
  |  |  348|      0|#define nss_ZNEW(arenaOpt, type) ((type *)nss_ZAlloc((arenaOpt), sizeof(type)))
  ------------------
 1043|      0|    if (!c) {
  ------------------
  |  Branch (1043:9): [True: 0, False: 0]
  ------------------
 1044|      0|        nssArena_Destroy(arena);
 1045|      0|        return NULL;
 1046|      0|    }
 1047|      0|    NSSITEM_FROM_SECITEM(&c->encoding, &cc->derCert);
  ------------------
  |  |   27|      0|    (nssit)->data = (void *)(secit)->data; \
  |  |   28|      0|    (nssit)->size = (PRUint32)(secit)->len;
  ------------------
 1048|      0|    c->type = NSSCertificateType_PKIX;
 1049|      0|    pkiob = nssPKIObject_Create(arena, NULL, cc->dbhandle, NULL, nssPKIMonitor);
 1050|      0|    if (!pkiob) {
  ------------------
  |  Branch (1050:9): [True: 0, False: 0]
  ------------------
 1051|      0|        nssArena_Destroy(arena);
 1052|      0|        return NULL;
 1053|      0|    }
 1054|      0|    c->object = *pkiob;
 1055|      0|    nssItem_Create(arena,
 1056|      0|                   &c->issuer, cc->derIssuer.len, cc->derIssuer.data);
 1057|      0|    nssItem_Create(arena,
 1058|      0|                   &c->subject, cc->derSubject.len, cc->derSubject.data);
 1059|       |    /* CERTCertificate stores serial numbers decoded.  I need the DER
 1060|       |     * here.  sigh.
 1061|       |     */
 1062|      0|    SECItem derSerial;
 1063|      0|    SECStatus secrv;
 1064|      0|    secrv = CERT_SerialNumberFromDERCert(&cc->derCert, &derSerial);
 1065|      0|    if (secrv == SECFailure) {
  ------------------
  |  Branch (1065:9): [True: 0, False: 0]
  ------------------
 1066|      0|        nssArena_Destroy(arena);
 1067|      0|        return NULL;
 1068|      0|    }
 1069|      0|    nssItem_Create(arena, &c->serial, derSerial.len, derSerial.data);
 1070|      0|    PORT_Free(derSerial.data);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 1071|       |
 1072|      0|    if (cc->emailAddr && cc->emailAddr[0]) {
  ------------------
  |  Branch (1072:9): [True: 0, False: 0]
  |  Branch (1072:26): [True: 0, False: 0]
  ------------------
 1073|      0|        c->email = nssUTF8_Create(arena,
 1074|      0|                                  nssStringType_PrintableString,
 1075|      0|                                  (NSSUTF8 *)cc->emailAddr,
 1076|      0|                                  PORT_Strlen(cc->emailAddr));
  ------------------
  |  |  190|      0|#define PORT_Strlen(s) strlen(s)
  ------------------
 1077|      0|    }
 1078|      0|    if (cc->slot) {
  ------------------
  |  Branch (1078:9): [True: 0, False: 0]
  ------------------
 1079|      0|        instance = nss_ZNEW(arena, nssCryptokiInstance);
  ------------------
  |  |  348|      0|#define nss_ZNEW(arenaOpt, type) ((type *)nss_ZAlloc((arenaOpt), sizeof(type)))
  ------------------
 1080|      0|        if (!instance) {
  ------------------
  |  Branch (1080:13): [True: 0, False: 0]
  ------------------
 1081|      0|            nssArena_Destroy(arena);
 1082|      0|            return NULL;
 1083|      0|        }
 1084|      0|        instance->token = PK11Slot_GetNSSToken(cc->slot);
 1085|      0|        if (!instance->token) {
  ------------------
  |  Branch (1085:13): [True: 0, False: 0]
  ------------------
 1086|      0|            nssArena_Destroy(arena);
 1087|      0|            return NULL;
 1088|      0|        }
 1089|      0|        instance->handle = cc->pkcs11ID;
 1090|      0|        instance->isTokenObject = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 1091|      0|        if (cc->nickname) {
  ------------------
  |  Branch (1091:13): [True: 0, False: 0]
  ------------------
 1092|      0|            instance->label = nssUTF8_Create(arena,
 1093|      0|                                             nssStringType_UTF8String,
 1094|      0|                                             (NSSUTF8 *)cc->nickname,
 1095|      0|                                             PORT_Strlen(cc->nickname));
  ------------------
  |  |  190|      0|#define PORT_Strlen(s) strlen(s)
  ------------------
 1096|      0|        }
 1097|      0|        nssPKIObject_AddInstance(&c->object, instance);
 1098|      0|    }
 1099|      0|    c->decoding = create_decoded_pkix_cert_from_nss3cert(NULL, cc);
 1100|      0|    CERT_LockCertTempPerm(cc);
 1101|      0|    cc->nssCertificate = c;
 1102|      0|    CERT_UnlockCertTempPerm(cc);
 1103|      0|    return c;
 1104|      0|}
pki3hack.c:get_cert_instance:
  643|  5.09k|{
  644|  5.09k|    nssCryptokiObject *instance, **ci;
  645|  5.09k|    nssCryptokiObject **instances = nssPKIObject_GetInstances(&c->object);
  646|  5.09k|    if (!instances) {
  ------------------
  |  Branch (646:9): [True: 5.09k, False: 0]
  ------------------
  647|  5.09k|        return NULL;
  648|  5.09k|    }
  649|      0|    instance = NULL;
  650|      0|    for (ci = instances; *ci; ci++) {
  ------------------
  |  Branch (650:26): [True: 0, False: 0]
  ------------------
  651|      0|        if (!instance) {
  ------------------
  |  Branch (651:13): [True: 0, False: 0]
  ------------------
  652|      0|            instance = nssCryptokiObject_Clone(*ci);
  653|      0|        } else {
  654|       |            /* This only really works for two instances...  But 3.4 can't
  655|       |             * handle more anyway.  The logic is, if there are multiple
  656|       |             * instances, prefer the one that is not internal (e.g., on
  657|       |             * a hardware device.
  658|       |             */
  659|      0|            if (PK11_IsInternal(instance->token->pk11slot)) {
  ------------------
  |  Branch (659:17): [True: 0, False: 0]
  ------------------
  660|      0|                nssCryptokiObject_Destroy(instance);
  661|      0|                instance = nssCryptokiObject_Clone(*ci);
  662|      0|            }
  663|      0|        }
  664|      0|    }
  665|      0|    nssCryptokiObjectArray_Destroy(instances);
  666|      0|    return instance;
  667|  5.09k|}
pki3hack.c:stan_GetCERTCertificate:
  889|  10.3k|{
  890|  10.3k|    nssDecodedCert *dc = NULL;
  891|  10.3k|    CERTCertificate *cc = NULL;
  892|  10.3k|    CERTCertTrust certTrust;
  893|       |
  894|       |    /* make sure object does not go away until we finish */
  895|  10.3k|    nssPKIObject_AddRef(&c->object);
  896|  10.3k|    nssPKIObject_Lock(&c->object);
  897|       |
  898|  10.3k|    dc = c->decoding;
  899|  10.3k|    if (!dc) {
  ------------------
  |  Branch (899:9): [True: 5.30k, False: 5.09k]
  ------------------
  900|  5.30k|        dc = nssDecodedPKIXCertificate_Create(NULL, &c->encoding);
  901|  5.30k|        if (!dc) {
  ------------------
  |  Branch (901:13): [True: 211, False: 5.09k]
  ------------------
  902|    211|            goto loser;
  903|    211|        }
  904|  5.09k|        cc = (CERTCertificate *)dc->data;
  905|  5.09k|        PORT_Assert(cc); /* software error */
  ------------------
  |  |  120|  5.09k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  5.09k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 5.09k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  906|  5.09k|        if (!cc) {
  ------------------
  |  Branch (906:13): [True: 0, False: 5.09k]
  ------------------
  907|      0|            nssDecodedPKIXCertificate_Destroy(dc);
  908|      0|            nss_SetError(NSS_ERROR_INTERNAL_ERROR);
  909|      0|            goto loser;
  910|      0|        }
  911|  5.09k|        PORT_Assert(!c->decoding);
  ------------------
  |  |  120|  5.09k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  5.09k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 5.09k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  912|  5.09k|        if (!c->decoding) {
  ------------------
  |  Branch (912:13): [True: 5.09k, False: 0]
  ------------------
  913|  5.09k|            c->decoding = dc;
  914|  5.09k|        } else {
  915|       |            /* this should never happen. Fail. */
  916|      0|            nssDecodedPKIXCertificate_Destroy(dc);
  917|      0|            nss_SetError(NSS_ERROR_INTERNAL_ERROR);
  918|      0|            goto loser;
  919|      0|        }
  920|  5.09k|    }
  921|  10.1k|    cc = (CERTCertificate *)dc->data;
  922|  10.1k|    PORT_Assert(cc);
  ------------------
  |  |  120|  10.1k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  10.1k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 10.1k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  923|  10.1k|    if (!cc) {
  ------------------
  |  Branch (923:9): [True: 0, False: 10.1k]
  ------------------
  924|      0|        nss_SetError(NSS_ERROR_INTERNAL_ERROR);
  925|      0|        goto loser;
  926|      0|    }
  927|  10.1k|    CERT_LockCertTempPerm(cc);
  928|  10.1k|    NSSCertificate *nssCert = cc->nssCertificate;
  929|  10.1k|    CERT_UnlockCertTempPerm(cc);
  930|  10.1k|    if (!nssCert || forceUpdate) {
  ------------------
  |  Branch (930:9): [True: 5.09k, False: 5.09k]
  |  Branch (930:21): [True: 0, False: 5.09k]
  ------------------
  931|  5.09k|        fill_CERTCertificateFields(c, cc, forceUpdate);
  932|  5.09k|    } else if (CERT_GetCertTrust(cc, &certTrust) != SECSuccess) {
  ------------------
  |  Branch (932:16): [True: 5.09k, False: 0]
  ------------------
  933|  5.09k|        CERTCertTrust *trust;
  934|  5.09k|        if (!c->object.cryptoContext) {
  ------------------
  |  Branch (934:13): [True: 0, False: 5.09k]
  ------------------
  935|       |            /* If it's a perm cert, it might have been stored before the
  936|       |             * trust, so look for the trust again.
  937|       |             */
  938|      0|            trust = nssTrust_GetCERTCertTrustForCert(c, cc);
  939|  5.09k|        } else {
  940|       |            /* If it's a temp cert, it might have been stored before the
  941|       |             * builtin trust module is loaded, so look for the trust
  942|       |             * again, but don't set the empty trust if it is not found.
  943|       |             */
  944|  5.09k|            NSSTrust *t = nssTrustDomain_FindTrustForCertificate(c->object.cryptoContext->td, c);
  945|  5.09k|            if (!t) {
  ------------------
  |  Branch (945:17): [True: 5.09k, False: 0]
  ------------------
  946|  5.09k|                goto loser;
  947|  5.09k|            }
  948|      0|            trust = cert_trust_from_stan_trust(t, cc->arena);
  949|      0|            nssTrust_Destroy(t);
  950|      0|            if (!trust) {
  ------------------
  |  Branch (950:17): [True: 0, False: 0]
  ------------------
  951|      0|                goto loser;
  952|      0|            }
  953|      0|        }
  954|       |
  955|      0|        CERT_LockCertTrust(cc);
  956|      0|        cc->trust = trust;
  957|      0|        CERT_UnlockCertTrust(cc);
  958|      0|    }
  959|       |
  960|  10.3k|loser:
  961|  10.3k|    nssPKIObject_Unlock(&c->object);
  962|  10.3k|    nssPKIObject_Destroy(&c->object);
  963|  10.3k|    return cc;
  964|  10.1k|}
pki3hack.c:fill_CERTCertificateFields:
  731|  5.09k|{
  732|  5.09k|    CERTCertTrust *trust = NULL;
  733|  5.09k|    NSSTrust *nssTrust;
  734|  5.09k|    NSSCryptoContext *context = c->object.cryptoContext;
  735|  5.09k|    nssCryptokiInstance *instance;
  736|  5.09k|    NSSUTF8 *stanNick = NULL;
  737|       |
  738|       |    /* We are holding the base class object's lock on entry of this function
  739|       |     * This lock protects writes to fields of the CERTCertificate .
  740|       |     * It is also needed by some functions to compute values such as trust.
  741|       |     */
  742|  5.09k|    instance = get_cert_instance(c);
  743|       |
  744|  5.09k|    if (instance) {
  ------------------
  |  Branch (744:9): [True: 0, False: 5.09k]
  ------------------
  745|      0|        stanNick = instance->label;
  746|  5.09k|    } else if (context) {
  ------------------
  |  Branch (746:16): [True: 5.09k, False: 0]
  ------------------
  747|  5.09k|        stanNick = c->object.tempName;
  748|  5.09k|    }
  749|       |    /* fill other fields needed by NSS3 functions using CERTCertificate */
  750|  5.09k|    if ((!cc->nickname && stanNick) || forced) {
  ------------------
  |  Branch (750:10): [True: 5.09k, False: 0]
  |  Branch (750:27): [True: 0, False: 5.09k]
  |  Branch (750:40): [True: 0, False: 5.09k]
  ------------------
  751|      0|        PRStatus nssrv;
  752|      0|        int nicklen, tokenlen, len;
  753|      0|        NSSUTF8 *tokenName = NULL;
  754|      0|        char *nick;
  755|      0|        if (instance &&
  ------------------
  |  Branch (755:13): [True: 0, False: 0]
  ------------------
  756|      0|            (!PK11_IsInternalKeySlot(instance->token->pk11slot) ||
  ------------------
  |  Branch (756:14): [True: 0, False: 0]
  ------------------
  757|      0|             (stanNick && PORT_Strchr(stanNick, ':') != NULL))) {
  ------------------
  |  |  186|      0|#define PORT_Strchr strchr
  ------------------
  |  Branch (757:15): [True: 0, False: 0]
  |  Branch (757:27): [True: 0, False: 0]
  ------------------
  758|      0|            tokenName = nssToken_GetName(instance->token);
  759|      0|            tokenlen = nssUTF8_Size(tokenName, &nssrv);
  760|      0|        } else {
  761|       |            /* don't use token name for internal slot; 3.3 didn't */
  762|      0|            tokenlen = 0;
  763|      0|        }
  764|      0|        if (stanNick) {
  ------------------
  |  Branch (764:13): [True: 0, False: 0]
  ------------------
  765|      0|            nicklen = nssUTF8_Size(stanNick, &nssrv);
  766|      0|            len = tokenlen + nicklen;
  767|      0|            nick = PORT_ArenaAlloc(cc->arena, len);
  ------------------
  |  |   53|      0|#define PORT_ArenaAlloc PORT_ArenaAlloc_Util
  ------------------
  768|      0|            if (tokenName) {
  ------------------
  |  Branch (768:17): [True: 0, False: 0]
  ------------------
  769|      0|                memcpy(nick, tokenName, tokenlen - 1);
  770|      0|                nick[tokenlen - 1] = ':';
  771|      0|                memcpy(nick + tokenlen, stanNick, nicklen - 1);
  772|      0|            } else {
  773|      0|                memcpy(nick, stanNick, nicklen - 1);
  774|      0|            }
  775|      0|            nick[len - 1] = '\0';
  776|      0|            cc->nickname = nick;
  777|      0|        } else {
  778|      0|            cc->nickname = NULL;
  779|      0|        }
  780|      0|    }
  781|  5.09k|    if (context) {
  ------------------
  |  Branch (781:9): [True: 5.09k, False: 0]
  ------------------
  782|       |        /* trust */
  783|  5.09k|        nssTrust = nssCryptoContext_FindTrustForCertificate(context, c);
  784|  5.09k|        if (!nssTrust) {
  ------------------
  |  Branch (784:13): [True: 5.09k, False: 0]
  ------------------
  785|       |            /* chicken and egg issue:
  786|       |             *
  787|       |             * c->issuer and c->serial are empty at this point, but
  788|       |             * nssTrustDomain_FindTrustForCertificate use them to look up
  789|       |             * up the trust object, so we point them to cc->derIssuer and
  790|       |             * cc->serialNumber.
  791|       |             *
  792|       |             * Our caller will fill these in with proper arena copies when we
  793|       |             * return. */
  794|  5.09k|            c->issuer.data = cc->derIssuer.data;
  795|  5.09k|            c->issuer.size = cc->derIssuer.len;
  796|  5.09k|            c->serial.data = cc->serialNumber.data;
  797|  5.09k|            c->serial.size = cc->serialNumber.len;
  798|  5.09k|            nssTrust = nssTrustDomain_FindTrustForCertificate(context->td, c);
  799|  5.09k|        }
  800|  5.09k|        if (nssTrust) {
  ------------------
  |  Branch (800:13): [True: 0, False: 5.09k]
  ------------------
  801|      0|            trust = cert_trust_from_stan_trust(nssTrust, cc->arena);
  802|      0|            if (trust) {
  ------------------
  |  Branch (802:17): [True: 0, False: 0]
  ------------------
  803|       |                /* we should destroy cc->trust before replacing it, but it's
  804|       |                   allocated in cc->arena, so memory growth will occur on each
  805|       |                   refresh */
  806|      0|                CERT_LockCertTrust(cc);
  807|      0|                cc->trust = trust;
  808|      0|                CERT_UnlockCertTrust(cc);
  809|      0|            }
  810|      0|            nssTrust_Destroy(nssTrust);
  811|      0|        }
  812|  5.09k|    } else if (instance) {
  ------------------
  |  Branch (812:16): [True: 0, False: 0]
  ------------------
  813|       |        /* slot */
  814|      0|        if (cc->slot != instance->token->pk11slot) {
  ------------------
  |  Branch (814:13): [True: 0, False: 0]
  ------------------
  815|      0|            if (cc->slot) {
  ------------------
  |  Branch (815:17): [True: 0, False: 0]
  ------------------
  816|      0|                PK11_FreeSlot(cc->slot);
  817|      0|            }
  818|      0|            cc->slot = PK11_ReferenceSlot(instance->token->pk11slot);
  819|      0|        }
  820|      0|        cc->ownSlot = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  821|       |        /* pkcs11ID */
  822|      0|        cc->pkcs11ID = instance->handle;
  823|       |        /* trust */
  824|      0|        trust = nssTrust_GetCERTCertTrustForCert(c, cc);
  825|      0|        if (trust) {
  ------------------
  |  Branch (825:13): [True: 0, False: 0]
  ------------------
  826|       |            /* we should destroy cc->trust before replacing it, but it's
  827|       |               allocated in cc->arena, so memory growth will occur on each
  828|       |               refresh */
  829|      0|            CERT_LockCertTrust(cc);
  830|      0|            cc->trust = trust;
  831|      0|            CERT_UnlockCertTrust(cc);
  832|      0|        }
  833|       |        /* Read the distrust fields from a nssckbi/builtins certificate and
  834|       |         * fill the fields in CERTCertificate structure when any valid date
  835|       |         * is found. */
  836|      0|        if (PK11_IsReadOnly(cc->slot) && PK11_HasRootCerts(cc->slot)) {
  ------------------
  |  Branch (836:13): [True: 0, False: 0]
  |  Branch (836:42): [True: 0, False: 0]
  ------------------
  837|       |            /* The values are hard-coded and readonly. Read just once. */
  838|      0|            if (cc->distrust == NULL) {
  ------------------
  |  Branch (838:17): [True: 0, False: 0]
  ------------------
  839|      0|                CERTCertDistrust distrustModel;
  840|      0|                SECItem model = { siUTCTime, NULL, 0 };
  841|      0|                distrustModel.serverDistrustAfter = model;
  842|      0|                distrustModel.emailDistrustAfter = model;
  843|      0|                SECStatus rServer = PK11_ReadAttribute(
  844|      0|                    cc->slot, cc->pkcs11ID, CKA_NSS_SERVER_DISTRUST_AFTER,
  ------------------
  |  |  105|      0|#define CKA_NSS_SERVER_DISTRUST_AFTER (CKA_NSS + 35)
  |  |  ------------------
  |  |  |  |   77|      0|#define CKA_NSS (CKA_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  692|      0|#define CKA_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKA_NSS (CKA_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  845|      0|                    cc->arena, &distrustModel.serverDistrustAfter);
  846|      0|                SECStatus rEmail = PK11_ReadAttribute(
  847|      0|                    cc->slot, cc->pkcs11ID, CKA_NSS_EMAIL_DISTRUST_AFTER,
  ------------------
  |  |  106|      0|#define CKA_NSS_EMAIL_DISTRUST_AFTER (CKA_NSS + 36)
  |  |  ------------------
  |  |  |  |   77|      0|#define CKA_NSS (CKA_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  692|      0|#define CKA_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKA_NSS (CKA_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  848|      0|                    cc->arena, &distrustModel.emailDistrustAfter);
  849|       |                /* Only allocate the Distrust structure if a valid date is found.
  850|       |                 * The result length of a encoded valid timestamp is exactly 13 */
  851|      0|                const unsigned int kDistrustFieldSize = 13;
  852|      0|                if ((rServer == SECSuccess && rEmail == SECSuccess) &&
  ------------------
  |  Branch (852:22): [True: 0, False: 0]
  |  Branch (852:47): [True: 0, False: 0]
  ------------------
  853|      0|                    (distrustModel.serverDistrustAfter.len == kDistrustFieldSize ||
  ------------------
  |  Branch (853:22): [True: 0, False: 0]
  ------------------
  854|      0|                     distrustModel.emailDistrustAfter.len == kDistrustFieldSize)) {
  ------------------
  |  Branch (854:22): [True: 0, False: 0]
  ------------------
  855|      0|                    CERTCertDistrust *tmpPtr = PORT_ArenaAlloc(
  ------------------
  |  |   53|      0|#define PORT_ArenaAlloc PORT_ArenaAlloc_Util
  ------------------
  856|      0|                        cc->arena, sizeof(CERTCertDistrust));
  857|      0|                    PORT_Memcpy(tmpPtr, &distrustModel,
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
  858|      0|                                sizeof(CERTCertDistrust));
  859|      0|                    cc->distrust = tmpPtr;
  860|      0|                }
  861|      0|            }
  862|      0|        }
  863|      0|    }
  864|  5.09k|    if (instance) {
  ------------------
  |  Branch (864:9): [True: 0, False: 5.09k]
  ------------------
  865|      0|        nssCryptokiObject_Destroy(instance);
  866|      0|    }
  867|       |    /* database handle is now the trust domain */
  868|  5.09k|    cc->dbhandle = c->object.trustDomain;
  869|       |    /* subjectList ? */
  870|       |    /* istemp and isperm are supported in NSS 3.4 */
  871|  5.09k|    CERT_LockCertTempPerm(cc);
  872|  5.09k|    cc->istemp = PR_FALSE; /* CERT_NewTemp will override this */
  ------------------
  |  |  438|  5.09k|#define PR_FALSE 0
  ------------------
  873|  5.09k|    cc->isperm = PR_TRUE;  /* by default */
  ------------------
  |  |  437|  5.09k|#define PR_TRUE 1
  ------------------
  874|       |    /* pointer back */
  875|  5.09k|    cc->nssCertificate = c;
  876|  5.09k|    CERT_UnlockCertTempPerm(cc);
  877|  5.09k|    if (trust) {
  ------------------
  |  Branch (877:9): [True: 0, False: 5.09k]
  ------------------
  878|       |        /* force the cert type to be recomputed to include trust info */
  879|      0|        PRUint32 nsCertType = cert_ComputeCertType(cc);
  880|       |
  881|       |        /* Assert that it is safe to cast &cc->nsCertType to "PRInt32 *" */
  882|      0|        PORT_Assert(sizeof(cc->nsCertType) == sizeof(PRInt32));
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  883|      0|        PR_ATOMIC_SET((PRInt32 *)&cc->nsCertType, nsCertType);
  ------------------
  |  |  124|      0|#define PR_ATOMIC_SET(val, newval) __sync_lock_test_and_set(val, newval)
  ------------------
  884|      0|    }
  885|  5.09k|}

nssPKIObject_Lock:
   19|  15.4k|{
   20|  15.4k|    switch (object->lockType) {
   21|  15.4k|        case nssPKIMonitor:
  ------------------
  |  Branch (21:9): [True: 15.4k, False: 0]
  ------------------
   22|  15.4k|            PZ_EnterMonitor(object->sync.mlock);
  ------------------
  |  |  256|  15.4k|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  ------------------
   23|  15.4k|            break;
   24|      0|        case nssPKILock:
  ------------------
  |  Branch (24:9): [True: 0, False: 15.4k]
  ------------------
   25|      0|            PZ_Lock(object->sync.lock);
  ------------------
  |  |  245|      0|#define PZ_Lock(k) PR_Lock((k))
  ------------------
   26|      0|            break;
   27|      0|        default:
  ------------------
  |  Branch (27:9): [True: 0, False: 15.4k]
  ------------------
   28|      0|            PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   29|  15.4k|    }
   30|  15.4k|}
nssPKIObject_Unlock:
   34|  15.4k|{
   35|  15.4k|    switch (object->lockType) {
   36|  15.4k|        case nssPKIMonitor:
  ------------------
  |  Branch (36:9): [True: 15.4k, False: 0]
  ------------------
   37|  15.4k|            PZ_ExitMonitor(object->sync.mlock);
  ------------------
  |  |  257|  15.4k|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  ------------------
   38|  15.4k|            break;
   39|      0|        case nssPKILock:
  ------------------
  |  Branch (39:9): [True: 0, False: 15.4k]
  ------------------
   40|      0|            PZ_Unlock(object->sync.lock);
  ------------------
  |  |  246|      0|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
   41|      0|            break;
   42|      0|        default:
  ------------------
  |  Branch (42:9): [True: 0, False: 15.4k]
  ------------------
   43|      0|            PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   44|  15.4k|    }
   45|  15.4k|}
nssPKIObject_NewLock:
   49|  5.30k|{
   50|  5.30k|    object->lockType = lockType;
   51|  5.30k|    switch (lockType) {
   52|  5.30k|        case nssPKIMonitor:
  ------------------
  |  Branch (52:9): [True: 5.30k, False: 0]
  ------------------
   53|  5.30k|            object->sync.mlock = PZ_NewMonitor(nssILockSSL);
  ------------------
  |  |  254|  5.30k|#define PZ_NewMonitor(t) PR_NewMonitor()
  ------------------
   54|  5.30k|            return (object->sync.mlock ? PR_SUCCESS : PR_FAILURE);
  ------------------
  |  Branch (54:21): [True: 5.30k, False: 0]
  ------------------
   55|      0|        case nssPKILock:
  ------------------
  |  Branch (55:9): [True: 0, False: 5.30k]
  ------------------
   56|      0|            object->sync.lock = PZ_NewLock(nssILockSSL);
  ------------------
  |  |  243|      0|#define PZ_NewLock(t) PR_NewLock()
  ------------------
   57|      0|            return (object->sync.lock ? PR_SUCCESS : PR_FAILURE);
  ------------------
  |  Branch (57:21): [True: 0, False: 0]
  ------------------
   58|      0|        default:
  ------------------
  |  Branch (58:9): [True: 0, False: 5.30k]
  ------------------
   59|      0|            PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   60|      0|            return PR_FAILURE;
   61|  5.30k|    }
   62|  5.30k|}
nssPKIObject_DestroyLock:
   66|  5.30k|{
   67|  5.30k|    switch (object->lockType) {
   68|  5.30k|        case nssPKIMonitor:
  ------------------
  |  Branch (68:9): [True: 5.30k, False: 0]
  ------------------
   69|  5.30k|            PZ_DestroyMonitor(object->sync.mlock);
  ------------------
  |  |  255|  5.30k|#define PZ_DestroyMonitor(m) PR_DestroyMonitor((m))
  ------------------
   70|  5.30k|            object->sync.mlock = NULL;
   71|  5.30k|            break;
   72|      0|        case nssPKILock:
  ------------------
  |  Branch (72:9): [True: 0, False: 5.30k]
  ------------------
   73|      0|            PZ_DestroyLock(object->sync.lock);
  ------------------
  |  |  244|      0|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
   74|      0|            object->sync.lock = NULL;
   75|      0|            break;
   76|      0|        default:
  ------------------
  |  Branch (76:9): [True: 0, False: 5.30k]
  ------------------
   77|      0|            PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   78|  5.30k|    }
   79|  5.30k|}
nssPKIObject_Create:
   88|  5.30k|{
   89|  5.30k|    NSSArena *arena;
   90|  5.30k|    nssArenaMark *mark = NULL;
   91|  5.30k|    nssPKIObject *object;
   92|  5.30k|    if (arenaOpt) {
  ------------------
  |  Branch (92:9): [True: 0, False: 5.30k]
  ------------------
   93|      0|        arena = arenaOpt;
   94|      0|        mark = nssArena_Mark(arena);
   95|  5.30k|    } else {
   96|  5.30k|        arena = nssArena_Create();
   97|  5.30k|        if (!arena) {
  ------------------
  |  Branch (97:13): [True: 0, False: 5.30k]
  ------------------
   98|      0|            return (nssPKIObject *)NULL;
   99|      0|        }
  100|  5.30k|    }
  101|  5.30k|    object = nss_ZNEW(arena, nssPKIObject);
  ------------------
  |  |  348|  5.30k|#define nss_ZNEW(arenaOpt, type) ((type *)nss_ZAlloc((arenaOpt), sizeof(type)))
  ------------------
  102|  5.30k|    if (!object) {
  ------------------
  |  Branch (102:9): [True: 0, False: 5.30k]
  ------------------
  103|      0|        goto loser;
  104|      0|    }
  105|  5.30k|    object->arena = arena;
  106|  5.30k|    object->trustDomain = td; /* XXX */
  107|  5.30k|    object->cryptoContext = cc;
  108|  5.30k|    if (PR_SUCCESS != nssPKIObject_NewLock(object, lockType)) {
  ------------------
  |  Branch (108:9): [True: 0, False: 5.30k]
  ------------------
  109|      0|        goto loser;
  110|      0|    }
  111|  5.30k|    if (instanceOpt) {
  ------------------
  |  Branch (111:9): [True: 0, False: 5.30k]
  ------------------
  112|      0|        if (nssPKIObject_AddInstance(object, instanceOpt) != PR_SUCCESS) {
  ------------------
  |  Branch (112:13): [True: 0, False: 0]
  ------------------
  113|      0|            goto loser;
  114|      0|        }
  115|      0|    }
  116|  5.30k|    PR_ATOMIC_INCREMENT(&object->refCount);
  ------------------
  |  |  122|  5.30k|#define PR_ATOMIC_INCREMENT(val) __sync_add_and_fetch(val, 1)
  ------------------
  117|  5.30k|    if (mark) {
  ------------------
  |  Branch (117:9): [True: 0, False: 5.30k]
  ------------------
  118|      0|        nssArena_Unmark(arena, mark);
  119|      0|    }
  120|  5.30k|    return object;
  121|      0|loser:
  122|      0|    if (mark) {
  ------------------
  |  Branch (122:9): [True: 0, False: 0]
  ------------------
  123|      0|        nssArena_Release(arena, mark);
  124|      0|    } else {
  125|      0|        nssArena_Destroy(arena);
  126|      0|    }
  127|      0|    return (nssPKIObject *)NULL;
  128|  5.30k|}
nssPKIObject_Destroy:
  133|  10.6k|{
  134|  10.6k|    PRUint32 i;
  135|  10.6k|    PR_ASSERT(object->refCount > 0);
  ------------------
  |  |  208|  10.6k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 10.6k, False: 0]
  |  |  ------------------
  ------------------
  136|  10.6k|    if (PR_ATOMIC_DECREMENT(&object->refCount) == 0) {
  ------------------
  |  |  123|  10.6k|#define PR_ATOMIC_DECREMENT(val) __sync_sub_and_fetch(val, 1)
  ------------------
  |  Branch (136:9): [True: 211, False: 10.3k]
  ------------------
  137|    211|        for (i = 0; i < object->numInstances; i++) {
  ------------------
  |  Branch (137:21): [True: 0, False: 211]
  ------------------
  138|      0|            nssCryptokiObject_Destroy(object->instances[i]);
  139|      0|        }
  140|    211|        nssPKIObject_DestroyLock(object);
  141|    211|        nssArena_Destroy(object->arena);
  142|    211|        return PR_TRUE;
  ------------------
  |  |  437|    211|#define PR_TRUE 1
  ------------------
  143|    211|    }
  144|  10.3k|    return PR_FALSE;
  ------------------
  |  |  438|  10.3k|#define PR_FALSE 0
  ------------------
  145|  10.6k|}
nssPKIObject_AddRef:
  150|  20.0k|{
  151|  20.0k|    PR_ATOMIC_INCREMENT(&object->refCount);
  ------------------
  |  |  122|  20.0k|#define PR_ATOMIC_INCREMENT(val) __sync_add_and_fetch(val, 1)
  ------------------
  152|  20.0k|    return object;
  153|  20.0k|}
nssPKIObject_GetInstances:
  333|  5.09k|{
  334|  5.09k|    nssCryptokiObject **instances = NULL;
  335|  5.09k|    PRUint32 i;
  336|       |
  337|  5.09k|    nssPKIObject_Lock(object);
  338|  5.09k|    if (object->numInstances == 0) {
  ------------------
  |  Branch (338:9): [True: 5.09k, False: 0]
  ------------------
  339|  5.09k|        nssPKIObject_Unlock(object);
  340|  5.09k|        return (nssCryptokiObject **)NULL;
  341|  5.09k|    }
  342|      0|    instances = nss_ZNEWARRAY(NULL, nssCryptokiObject *,
  ------------------
  |  |  371|      0|    ((type *)nss_ZAlloc((arenaOpt), sizeof(type) * (quantity)))
  ------------------
  343|      0|                              object->numInstances + 1);
  344|      0|    if (instances) {
  ------------------
  |  Branch (344:9): [True: 0, False: 0]
  ------------------
  345|      0|        for (i = 0; i < object->numInstances; i++) {
  ------------------
  |  Branch (345:21): [True: 0, False: 0]
  ------------------
  346|      0|            instances[i] = nssCryptokiObject_Clone(object->instances[i]);
  347|      0|        }
  348|      0|    }
  349|      0|    nssPKIObject_Unlock(object);
  350|      0|    return instances;
  351|  5.09k|}

nssCertificateStore_Create:
   64|      1|{
   65|      1|    NSSArena *arena;
   66|      1|    nssCertificateStore *store;
   67|      1|    PRBool i_alloced_arena;
   68|      1|    if (arenaOpt) {
  ------------------
  |  Branch (68:9): [True: 1, False: 0]
  ------------------
   69|      1|        arena = arenaOpt;
   70|      1|        i_alloced_arena = PR_FALSE;
  ------------------
  |  |  438|      1|#define PR_FALSE 0
  ------------------
   71|      1|    } else {
   72|      0|        arena = nssArena_Create();
   73|      0|        if (!arena) {
  ------------------
  |  Branch (73:13): [True: 0, False: 0]
  ------------------
   74|      0|            return NULL;
   75|      0|        }
   76|      0|        i_alloced_arena = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
   77|      0|    }
   78|      1|    store = nss_ZNEW(arena, nssCertificateStore);
  ------------------
  |  |  348|      1|#define nss_ZNEW(arenaOpt, type) ((type *)nss_ZAlloc((arenaOpt), sizeof(type)))
  ------------------
   79|      1|    if (!store) {
  ------------------
  |  Branch (79:9): [True: 0, False: 1]
  ------------------
   80|      0|        goto loser;
   81|      0|    }
   82|      1|    store->lock = PZ_NewLock(nssILockOther);
  ------------------
  |  |  243|      1|#define PZ_NewLock(t) PR_NewLock()
  ------------------
   83|      1|    if (!store->lock) {
  ------------------
  |  Branch (83:9): [True: 0, False: 1]
  ------------------
   84|      0|        goto loser;
   85|      0|    }
   86|       |    /* Create the issuer/serial --> {cert, trust, S/MIME profile } hash */
   87|      1|    store->issuer_and_serial = nssHash_CreateCertificate(arena, 0);
   88|      1|    if (!store->issuer_and_serial) {
  ------------------
  |  Branch (88:9): [True: 0, False: 1]
  ------------------
   89|      0|        goto loser;
   90|      0|    }
   91|       |    /* Create the subject DER --> subject list hash */
   92|      1|    store->subject = nssHash_CreateItem(arena, 0);
   93|      1|    if (!store->subject) {
  ------------------
  |  Branch (93:9): [True: 0, False: 1]
  ------------------
   94|      0|        goto loser;
   95|      0|    }
   96|      1|    store->arena = arena;
   97|      1|    store->i_alloced_arena = i_alloced_arena;
   98|      1|    return store;
   99|      0|loser:
  100|      0|    if (store) {
  ------------------
  |  Branch (100:9): [True: 0, False: 0]
  ------------------
  101|      0|        if (store->lock) {
  ------------------
  |  Branch (101:13): [True: 0, False: 0]
  ------------------
  102|      0|            PZ_DestroyLock(store->lock);
  ------------------
  |  |  244|      0|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
  103|      0|        }
  104|      0|        if (store->issuer_and_serial) {
  ------------------
  |  Branch (104:13): [True: 0, False: 0]
  ------------------
  105|      0|            nssHash_Destroy(store->issuer_and_serial);
  106|      0|        }
  107|      0|        if (store->subject) {
  ------------------
  |  Branch (107:13): [True: 0, False: 0]
  ------------------
  108|      0|            nssHash_Destroy(store->subject);
  109|      0|        }
  110|      0|    }
  111|      0|    if (i_alloced_arena) {
  ------------------
  |  Branch (111:9): [True: 0, False: 0]
  ------------------
  112|      0|        nssArena_Destroy(arena);
  113|      0|    }
  114|      0|    return NULL;
  115|      1|}
nssCertificateStore_Destroy:
  121|      1|{
  122|      1|    if (nssHash_Count(store->issuer_and_serial) > 0) {
  ------------------
  |  Branch (122:9): [True: 0, False: 1]
  ------------------
  123|      0|        nss_SetError(NSS_ERROR_BUSY);
  124|      0|        return PR_FAILURE;
  125|      0|    }
  126|      1|    PZ_DestroyLock(store->lock);
  ------------------
  |  |  244|      1|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
  127|      1|    nssHash_Destroy(store->issuer_and_serial);
  128|      1|    nssHash_Destroy(store->subject);
  129|      1|    if (store->i_alloced_arena) {
  ------------------
  |  Branch (129:9): [True: 0, False: 1]
  ------------------
  130|      0|        nssArena_Destroy(store->arena);
  131|      1|    } else {
  132|      1|        nss_ZFreeIf(store);
  133|      1|    }
  134|      1|    return PR_SUCCESS;
  135|      1|}
nssCertificateStore_FindOrAdd:
  211|  5.09k|{
  212|  5.09k|    PRStatus nssrv;
  213|  5.09k|    NSSCertificate *rvCert = NULL;
  214|       |
  215|  5.09k|    PZ_Lock(store->lock);
  ------------------
  |  |  245|  5.09k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
  216|  5.09k|    rvCert = nssCertStore_FindCertByIssuerAndSerialNumberLocked(
  217|  5.09k|        store, &c->issuer, &c->serial);
  218|  5.09k|    if (!rvCert) {
  ------------------
  |  Branch (218:9): [True: 5.09k, False: 0]
  ------------------
  219|  5.09k|        nssrv = nssCertificateStore_AddLocked(store, c);
  220|  5.09k|        if (PR_SUCCESS == nssrv) {
  ------------------
  |  Branch (220:13): [True: 5.09k, False: 0]
  ------------------
  221|  5.09k|            rvCert = nssCertificate_AddRef(c);
  222|  5.09k|        }
  223|  5.09k|    }
  224|  5.09k|    PZ_Unlock(store->lock);
  ------------------
  |  |  246|  5.09k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  225|  5.09k|    return rvCert;
  226|  5.09k|}
nssCertificateStore_RemoveCertLOCKED:
  278|  5.09k|{
  279|  5.09k|    certificate_hash_entry *entry;
  280|  5.09k|    entry = (certificate_hash_entry *)
  281|  5.09k|        nssHash_Lookup(store->issuer_and_serial, cert);
  282|  5.09k|    if (entry && entry->cert == cert) {
  ------------------
  |  Branch (282:9): [True: 5.09k, False: 0]
  |  Branch (282:18): [True: 5.09k, False: 0]
  ------------------
  283|  5.09k|        remove_certificate_entry(store, cert);
  284|  5.09k|        remove_subject_entry(store, cert);
  285|  5.09k|    }
  286|  5.09k|}
nssCertificateStore_Lock:
  290|  14.7k|{
  291|  14.7k|#ifdef DEBUG
  292|  14.7k|    PORT_Assert(out);
  ------------------
  |  |  120|  14.7k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  14.7k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 14.7k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  293|  14.7k|    out->store = store;
  294|  14.7k|    out->lock = store->lock;
  295|  14.7k|    out->locked = PR_TRUE;
  ------------------
  |  |  437|  14.7k|#define PR_TRUE 1
  ------------------
  296|  14.7k|    PZ_Lock(out->lock);
  ------------------
  |  |  245|  14.7k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
  297|       |#else
  298|       |    PZ_Lock(store->lock);
  299|       |#endif
  300|  14.7k|}
nssCertificateStore_Unlock:
  306|  14.7k|{
  307|  14.7k|#ifdef DEBUG
  308|  14.7k|    PORT_Assert(in);
  ------------------
  |  |  120|  14.7k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  14.7k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 14.7k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  309|  14.7k|    PORT_Assert(out);
  ------------------
  |  |  120|  14.7k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  14.7k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 14.7k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  310|  14.7k|    out->store = store;
  311|  14.7k|    out->lock = store->lock;
  312|  14.7k|    PORT_Assert(!out->locked);
  ------------------
  |  |  120|  14.7k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  14.7k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 14.7k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  313|  14.7k|    out->unlocked = PR_TRUE;
  ------------------
  |  |  437|  14.7k|#define PR_TRUE 1
  ------------------
  314|       |
  315|  14.7k|    PORT_Assert(in->store == out->store);
  ------------------
  |  |  120|  14.7k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  14.7k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 14.7k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  316|  14.7k|    PORT_Assert(in->lock == out->lock);
  ------------------
  |  |  120|  14.7k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  14.7k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 14.7k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  317|  14.7k|    PORT_Assert(in->locked);
  ------------------
  |  |  120|  14.7k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  14.7k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 14.7k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  318|  14.7k|    PORT_Assert(!in->unlocked);
  ------------------
  |  |  120|  14.7k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  14.7k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 14.7k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  319|       |
  320|  14.7k|    PZ_Unlock(out->lock);
  ------------------
  |  |  246|  14.7k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  321|       |#else
  322|       |    PZ_Unlock(store->lock);
  323|       |#endif
  324|  14.7k|}
nssCertificateStore_FindCertificateByIssuerAndSerialNumber:
  520|  5.12k|{
  521|  5.12k|    NSSCertificate *rvCert = NULL;
  522|       |
  523|  5.12k|    PZ_Lock(store->lock);
  ------------------
  |  |  245|  5.12k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
  524|  5.12k|    rvCert = nssCertStore_FindCertByIssuerAndSerialNumberLocked(
  525|  5.12k|        store, issuer, serial);
  526|  5.12k|    PZ_Unlock(store->lock);
  ------------------
  |  |  246|  5.12k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  527|  5.12k|    return rvCert;
  528|  5.12k|}
nssCertificateStore_FindCertificateByEncodedCertificate:
  534|  5.30k|{
  535|  5.30k|    PRStatus nssrv = PR_FAILURE;
  536|  5.30k|    NSSDER issuer, serial;
  537|  5.30k|    NSSCertificate *rvCert = NULL;
  538|  5.30k|    nssrv = nssPKIX509_GetIssuerAndSerialFromDER(encoding, &issuer, &serial);
  539|  5.30k|    if (nssrv != PR_SUCCESS) {
  ------------------
  |  Branch (539:9): [True: 174, False: 5.12k]
  ------------------
  540|    174|        return NULL;
  541|    174|    }
  542|  5.12k|    rvCert = nssCertificateStore_FindCertificateByIssuerAndSerialNumber(store,
  543|  5.12k|                                                                        &issuer,
  544|  5.12k|                                                                        &serial);
  545|  5.12k|    PORT_Free(issuer.data);
  ------------------
  |  |   60|  5.12k|#define PORT_Free PORT_Free_Util
  ------------------
  546|  5.12k|    PORT_Free(serial.data);
  ------------------
  |  |   60|  5.12k|#define PORT_Free PORT_Free_Util
  ------------------
  547|  5.12k|    return rvCert;
  548|  5.30k|}
nssCertificateStore_FindTrustForCertificate:
  576|  5.09k|{
  577|  5.09k|    certificate_hash_entry *entry;
  578|  5.09k|    NSSTrust *rvTrust = NULL;
  579|  5.09k|    PZ_Lock(store->lock);
  ------------------
  |  |  245|  5.09k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
  580|  5.09k|    entry = (certificate_hash_entry *)
  581|  5.09k|        nssHash_Lookup(store->issuer_and_serial, cert);
  582|  5.09k|    if (entry && entry->trust) {
  ------------------
  |  Branch (582:9): [True: 0, False: 5.09k]
  |  Branch (582:18): [True: 0, False: 0]
  ------------------
  583|      0|        rvTrust = nssTrust_AddRef(entry->trust);
  584|      0|    }
  585|  5.09k|    PZ_Unlock(store->lock);
  ------------------
  |  |  246|  5.09k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  586|  5.09k|    return rvTrust;
  587|  5.09k|}
nssHash_CreateCertificate:
  658|      2|{
  659|      2|    return nssHash_Create(arenaOpt,
  660|      2|                          numBuckets,
  661|      2|                          nss_certificate_hash,
  662|      2|                          nss_compare_certs,
  663|      2|                          PL_CompareValues);
  664|      2|}
pkistore.c:nssCertificateStore_AddLocked:
  196|  5.09k|{
  197|  5.09k|    PRStatus nssrv = add_certificate_entry(store, cert);
  198|  5.09k|    if (nssrv == PR_SUCCESS) {
  ------------------
  |  Branch (198:9): [True: 5.09k, False: 0]
  ------------------
  199|  5.09k|        nssrv = add_subject_entry(store, cert);
  200|  5.09k|        if (nssrv == PR_FAILURE) {
  ------------------
  |  Branch (200:13): [True: 0, False: 5.09k]
  ------------------
  201|      0|            remove_certificate_entry(store, cert);
  202|      0|        }
  203|  5.09k|    }
  204|  5.09k|    return nssrv;
  205|  5.09k|}
pkistore.c:add_certificate_entry:
  141|  5.09k|{
  142|  5.09k|    PRStatus nssrv;
  143|  5.09k|    certificate_hash_entry *entry;
  144|  5.09k|    entry = nss_ZNEW(cert->object.arena, certificate_hash_entry);
  ------------------
  |  |  348|  5.09k|#define nss_ZNEW(arenaOpt, type) ((type *)nss_ZAlloc((arenaOpt), sizeof(type)))
  ------------------
  145|  5.09k|    if (!entry) {
  ------------------
  |  Branch (145:9): [True: 0, False: 5.09k]
  ------------------
  146|      0|        return PR_FAILURE;
  147|      0|    }
  148|  5.09k|    entry->cert = cert;
  149|  5.09k|    nssrv = nssHash_Add(store->issuer_and_serial, cert, entry);
  150|  5.09k|    if (nssrv != PR_SUCCESS) {
  ------------------
  |  Branch (150:9): [True: 0, False: 5.09k]
  ------------------
  151|      0|        nss_ZFreeIf(entry);
  152|      0|    }
  153|  5.09k|    return nssrv;
  154|  5.09k|}
pkistore.c:add_subject_entry:
  160|  5.09k|{
  161|  5.09k|    PRStatus nssrv;
  162|  5.09k|    nssList *subjectList;
  163|  5.09k|    subjectList = (nssList *)nssHash_Lookup(store->subject, &cert->subject);
  164|  5.09k|    if (subjectList) {
  ------------------
  |  Branch (164:9): [True: 0, False: 5.09k]
  ------------------
  165|       |        /* The subject is already in, add this cert to the list */
  166|      0|        nssrv = nssList_AddUnique(subjectList, cert);
  167|  5.09k|    } else {
  168|       |        /* Create a new subject list for the subject */
  169|  5.09k|        subjectList = nssList_Create(NULL, PR_FALSE);
  ------------------
  |  |  438|  5.09k|#define PR_FALSE 0
  ------------------
  170|  5.09k|        if (!subjectList) {
  ------------------
  |  Branch (170:13): [True: 0, False: 5.09k]
  ------------------
  171|      0|            return PR_FAILURE;
  172|      0|        }
  173|  5.09k|        nssList_SetSortFunction(subjectList, nssCertificate_SubjectListSort);
  174|       |        /* Add the cert entry to this list of subjects */
  175|  5.09k|        nssrv = nssList_Add(subjectList, cert);
  176|  5.09k|        if (nssrv != PR_SUCCESS) {
  ------------------
  |  Branch (176:13): [True: 0, False: 5.09k]
  ------------------
  177|      0|            return nssrv;
  178|      0|        }
  179|       |        /* Add the subject list to the cache */
  180|  5.09k|        nssrv = nssHash_Add(store->subject, &cert->subject, subjectList);
  181|  5.09k|    }
  182|  5.09k|    return nssrv;
  183|  5.09k|}
pkistore.c:remove_certificate_entry:
  232|  5.09k|{
  233|  5.09k|    certificate_hash_entry *entry;
  234|  5.09k|    entry = (certificate_hash_entry *)
  235|  5.09k|        nssHash_Lookup(store->issuer_and_serial, cert);
  236|  5.09k|    if (entry) {
  ------------------
  |  Branch (236:9): [True: 5.09k, False: 0]
  ------------------
  237|  5.09k|        nssHash_Remove(store->issuer_and_serial, cert);
  238|  5.09k|        if (entry->trust) {
  ------------------
  |  Branch (238:13): [True: 0, False: 5.09k]
  ------------------
  239|      0|            nssTrust_Destroy(entry->trust);
  240|      0|        }
  241|  5.09k|        if (entry->profile) {
  ------------------
  |  Branch (241:13): [True: 0, False: 5.09k]
  ------------------
  242|      0|            nssSMIMEProfile_Destroy(entry->profile);
  243|      0|        }
  244|  5.09k|        nss_ZFreeIf(entry);
  245|  5.09k|    }
  246|  5.09k|}
pkistore.c:remove_subject_entry:
  252|  5.09k|{
  253|  5.09k|    nssList *subjectList;
  254|       |    /* Get the subject list for the cert's subject */
  255|  5.09k|    subjectList = (nssList *)nssHash_Lookup(store->subject, &cert->subject);
  256|  5.09k|    if (subjectList) {
  ------------------
  |  Branch (256:9): [True: 5.09k, False: 0]
  ------------------
  257|       |        /* Remove the cert from the subject hash */
  258|  5.09k|        nssList_Remove(subjectList, cert);
  259|  5.09k|        nssHash_Remove(store->subject, &cert->subject);
  260|  5.09k|        if (nssList_Count(subjectList) == 0) {
  ------------------
  |  Branch (260:13): [True: 5.09k, False: 0]
  ------------------
  261|  5.09k|            nssList_Destroy(subjectList);
  262|  5.09k|        } else {
  263|       |            /* The cert being released may have keyed the subject entry.
  264|       |             * Since there are still subject certs around, get another and
  265|       |             * rekey the entry just in case.
  266|       |             */
  267|      0|            NSSCertificate *subjectCert;
  268|      0|            (void)nssList_GetArray(subjectList, (void **)&subjectCert, 1);
  269|      0|            nssHash_Add(store->subject, &subjectCert->subject, subjectList);
  270|      0|        }
  271|  5.09k|    }
  272|  5.09k|}
pkistore.c:nssCertStore_FindCertByIssuerAndSerialNumberLocked:
  500|  10.2k|{
  501|  10.2k|    certificate_hash_entry *entry;
  502|  10.2k|    NSSCertificate *rvCert = NULL;
  503|  10.2k|    NSSCertificate index;
  504|       |
  505|  10.2k|    index.issuer = *issuer;
  506|  10.2k|    index.serial = *serial;
  507|  10.2k|    entry = (certificate_hash_entry *)
  508|  10.2k|        nssHash_Lookup(store->issuer_and_serial, &index);
  509|  10.2k|    if (entry) {
  ------------------
  |  Branch (509:9): [True: 0, False: 10.2k]
  ------------------
  510|      0|        rvCert = nssCertificate_AddRef(entry->cert);
  511|      0|    }
  512|  10.2k|    return rvCert;
  513|  10.2k|}
pkistore.c:nss_certificate_hash:
  632|  40.8k|{
  633|  40.8k|    unsigned int i;
  634|  40.8k|    PLHashNumber h;
  635|  40.8k|    NSSCertificate *c = (NSSCertificate *)key;
  636|  40.8k|    h = 0;
  637|   704k|    for (i = 0; i < c->issuer.size; i++)
  ------------------
  |  Branch (637:17): [True: 663k, False: 40.8k]
  ------------------
  638|   663k|        h = PR_ROTATE_LEFT32(h, 4) ^ ((unsigned char *)c->issuer.data)[i];
  ------------------
  |  |  147|   663k|#define PR_ROTATE_LEFT32(a, bits) (((a) << (bits)) | ((a) >> (32 - (bits))))
  ------------------
  639|   151k|    for (i = 0; i < c->serial.size; i++)
  ------------------
  |  Branch (639:17): [True: 110k, False: 40.8k]
  ------------------
  640|   110k|        h = PR_ROTATE_LEFT32(h, 4) ^ ((unsigned char *)c->serial.data)[i];
  ------------------
  |  |  147|   110k|#define PR_ROTATE_LEFT32(a, bits) (((a) << (bits)) | ((a) >> (32 - (bits))))
  ------------------
  641|  40.8k|    return h;
  642|  40.8k|}
pkistore.c:nss_compare_certs:
  646|  15.2k|{
  647|  15.2k|    PRStatus ignore;
  648|  15.2k|    NSSCertificate *c1 = (NSSCertificate *)v1;
  649|  15.2k|    NSSCertificate *c2 = (NSSCertificate *)v2;
  650|  15.2k|    return (int)(nssItem_Equal(&c1->issuer, &c2->issuer, &ignore) &&
  ------------------
  |  Branch (650:18): [True: 15.2k, False: 0]
  ------------------
  651|  15.2k|                 nssItem_Equal(&c1->serial, &c2->serial, &ignore));
  ------------------
  |  Branch (651:18): [True: 15.2k, False: 0]
  ------------------
  652|  15.2k|}

nssTrustDomain_InitializeCache:
  121|      1|{
  122|      1|    NSSArena *arena;
  123|      1|    nssTDCertificateCache *cache = td->cache;
  124|       |#ifdef DEBUG_CACHE
  125|       |    s_log = PR_NewLogModule("nss_cache");
  126|       |    PR_ASSERT(s_log);
  127|       |#endif
  128|      1|    PR_ASSERT(!cache);
  ------------------
  |  |  208|      1|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  129|      1|    arena = nssArena_Create();
  130|      1|    if (!arena) {
  ------------------
  |  Branch (130:9): [True: 0, False: 1]
  ------------------
  131|      0|        return PR_FAILURE;
  132|      0|    }
  133|      1|    cache = nss_ZNEW(arena, nssTDCertificateCache);
  ------------------
  |  |  348|      1|#define nss_ZNEW(arenaOpt, type) ((type *)nss_ZAlloc((arenaOpt), sizeof(type)))
  ------------------
  134|      1|    if (!cache) {
  ------------------
  |  Branch (134:9): [True: 0, False: 1]
  ------------------
  135|      0|        nssArena_Destroy(arena);
  136|      0|        return PR_FAILURE;
  137|      0|    }
  138|      1|    cache->lock = PZ_NewLock(nssILockCache);
  ------------------
  |  |  243|      1|#define PZ_NewLock(t) PR_NewLock()
  ------------------
  139|      1|    if (!cache->lock) {
  ------------------
  |  Branch (139:9): [True: 0, False: 1]
  ------------------
  140|      0|        nssArena_Destroy(arena);
  141|      0|        return PR_FAILURE;
  142|      0|    }
  143|       |    /* Create the issuer and serial DER --> certificate hash */
  144|      1|    cache->issuerAndSN = nssHash_CreateCertificate(arena, cacheSize);
  145|      1|    if (!cache->issuerAndSN) {
  ------------------
  |  Branch (145:9): [True: 0, False: 1]
  ------------------
  146|      0|        goto loser;
  147|      0|    }
  148|       |    /* Create the subject DER --> subject list hash */
  149|      1|    cache->subject = nssHash_CreateItem(arena, cacheSize);
  150|      1|    if (!cache->subject) {
  ------------------
  |  Branch (150:9): [True: 0, False: 1]
  ------------------
  151|      0|        goto loser;
  152|      0|    }
  153|       |    /* Create the nickname --> subject list hash */
  154|      1|    cache->nickname = nssHash_CreateString(arena, cacheSize);
  155|      1|    if (!cache->nickname) {
  ------------------
  |  Branch (155:9): [True: 0, False: 1]
  ------------------
  156|      0|        goto loser;
  157|      0|    }
  158|       |    /* Create the email --> list of subject lists hash */
  159|      1|    cache->email = nssHash_CreateString(arena, cacheSize);
  160|      1|    if (!cache->email) {
  ------------------
  |  Branch (160:9): [True: 0, False: 1]
  ------------------
  161|      0|        goto loser;
  162|      0|    }
  163|      1|    cache->arena = arena;
  164|      1|    td->cache = cache;
  165|       |#ifdef DEBUG_CACHE
  166|       |    PR_LOG(s_log, PR_LOG_DEBUG, ("Cache initialized."));
  167|       |#endif
  168|      1|    return PR_SUCCESS;
  169|      0|loser:
  170|      0|    PZ_DestroyLock(cache->lock);
  ------------------
  |  |  244|      0|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
  171|      0|    nssArena_Destroy(arena);
  172|      0|    td->cache = NULL;
  173|       |#ifdef DEBUG_CACHE
  174|       |    PR_LOG(s_log, PR_LOG_DEBUG, ("Cache initialization failed."));
  175|       |#endif
  176|      0|    return PR_FAILURE;
  177|      1|}
nssTrustDomain_DestroyCache:
  191|      1|{
  192|      1|    if (!td->cache) {
  ------------------
  |  Branch (192:9): [True: 0, False: 1]
  ------------------
  193|      0|        nss_SetError(NSS_ERROR_INTERNAL_ERROR);
  194|      0|        return PR_FAILURE;
  195|      0|    }
  196|      1|    if (nssHash_Count(td->cache->issuerAndSN) > 0) {
  ------------------
  |  Branch (196:9): [True: 0, False: 1]
  ------------------
  197|      0|        nss_SetError(NSS_ERROR_BUSY);
  198|      0|        return PR_FAILURE;
  199|      0|    }
  200|      1|    PZ_DestroyLock(td->cache->lock);
  ------------------
  |  |  244|      1|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
  201|      1|    nssHash_Destroy(td->cache->issuerAndSN);
  202|      1|    nssHash_Destroy(td->cache->subject);
  203|      1|    nssHash_Destroy(td->cache->nickname);
  204|      1|    nssHash_Destroy(td->cache->email);
  205|      1|    nssArena_Destroy(td->cache->arena);
  206|      1|    td->cache = NULL;
  207|       |#ifdef DEBUG_CACHE
  208|       |    PR_LOG(s_log, PR_LOG_DEBUG, ("Cache destroyed."));
  209|       |#endif
  210|      1|    return PR_SUCCESS;
  211|      1|}
nssTrustDomain_GetCertForIssuerAndSNFromCache:
 1017|  5.12k|{
 1018|  5.12k|    NSSCertificate certkey;
 1019|  5.12k|    NSSCertificate *rvCert = NULL;
 1020|  5.12k|    cache_entry *ce;
 1021|  5.12k|    certkey.issuer.data = issuer->data;
 1022|  5.12k|    certkey.issuer.size = issuer->size;
 1023|  5.12k|    certkey.serial.data = serial->data;
 1024|  5.12k|    certkey.serial.size = serial->size;
 1025|       |#ifdef DEBUG_CACHE
 1026|       |    log_item_dump("looking for cert by issuer/sn, issuer", issuer);
 1027|       |    log_item_dump("                               serial", serial);
 1028|       |#endif
 1029|  5.12k|    PZ_Lock(td->cache->lock);
  ------------------
  |  |  245|  5.12k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
 1030|  5.12k|    ce = (cache_entry *)nssHash_Lookup(td->cache->issuerAndSN, &certkey);
 1031|  5.12k|    if (ce) {
  ------------------
  |  Branch (1031:9): [True: 0, False: 5.12k]
  ------------------
 1032|      0|        ce->hits++;
 1033|      0|        ce->lastHit = PR_Now();
 1034|      0|        rvCert = nssCertificate_AddRef(ce->entry.cert);
 1035|       |#ifdef DEBUG_CACHE
 1036|       |        PR_LOG(s_log, PR_LOG_DEBUG, ("... found, %d hits", ce->hits));
 1037|       |#endif
 1038|      0|    }
 1039|  5.12k|    PZ_Unlock(td->cache->lock);
  ------------------
  |  |  246|  5.12k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
 1040|  5.12k|    return rvCert;
 1041|  5.12k|}

NSSTrustDomain_Create:
   32|      1|{
   33|      1|    NSSArena *arena;
   34|      1|    NSSTrustDomain *rvTD;
   35|      1|    arena = NSSArena_Create();
   36|      1|    if (!arena) {
  ------------------
  |  Branch (36:9): [True: 0, False: 1]
  ------------------
   37|      0|        return (NSSTrustDomain *)NULL;
   38|      0|    }
   39|      1|    rvTD = nss_ZNEW(arena, NSSTrustDomain);
  ------------------
  |  |  348|      1|#define nss_ZNEW(arenaOpt, type) ((type *)nss_ZAlloc((arenaOpt), sizeof(type)))
  ------------------
   40|      1|    if (!rvTD) {
  ------------------
  |  Branch (40:9): [True: 0, False: 1]
  ------------------
   41|      0|        goto loser;
   42|      0|    }
   43|       |    /* protect the token list and the token iterator */
   44|      1|    rvTD->tokensLock = NSSRWLock_New(100, "tokens");
  ------------------
  |  |   49|      1|#define NSSRWLock_New NSSRWLock_New_Util
  ------------------
   45|      1|    if (!rvTD->tokensLock) {
  ------------------
  |  Branch (45:9): [True: 0, False: 1]
  ------------------
   46|      0|        goto loser;
   47|      0|    }
   48|      1|    nssTrustDomain_InitializeCache(rvTD, NSSTRUSTDOMAIN_DEFAULT_CACHE_SIZE);
  ------------------
  |  |   20|      1|#define NSSTRUSTDOMAIN_DEFAULT_CACHE_SIZE 32
  ------------------
   49|      1|    rvTD->arena = arena;
   50|      1|    rvTD->refCount = 1;
   51|      1|    rvTD->statusConfig = NULL;
   52|      1|    return rvTD;
   53|      0|loser:
   54|      0|    if (rvTD && rvTD->tokensLock) {
  ------------------
  |  Branch (54:9): [True: 0, False: 0]
  |  Branch (54:17): [True: 0, False: 0]
  ------------------
   55|      0|        NSSRWLock_Destroy(rvTD->tokensLock);
  ------------------
  |  |   45|      0|#define NSSRWLock_Destroy NSSRWLock_Destroy_Util
  ------------------
   56|      0|    }
   57|      0|    nssArena_Destroy(arena);
   58|      0|    return (NSSTrustDomain *)NULL;
   59|      1|}
NSSTrustDomain_Destroy:
   78|      1|{
   79|      1|    PRStatus status = PR_SUCCESS;
   80|      1|    if (--td->refCount == 0) {
  ------------------
  |  Branch (80:9): [True: 1, False: 0]
  ------------------
   81|       |        /* Destroy each token in the list of tokens */
   82|      1|        if (td->tokens) {
  ------------------
  |  Branch (82:13): [True: 1, False: 0]
  ------------------
   83|      1|            nssListIterator_Destroy(td->tokens);
   84|      1|            td->tokens = NULL;
   85|      1|        }
   86|      1|        if (td->tokenList) {
  ------------------
  |  Branch (86:13): [True: 1, False: 0]
  ------------------
   87|      1|            nssList_Clear(td->tokenList, token_destructor);
   88|      1|            nssList_Destroy(td->tokenList);
   89|      1|            td->tokenList = NULL;
   90|      1|        }
   91|      1|        NSSRWLock_Destroy(td->tokensLock);
  ------------------
  |  |   45|      1|#define NSSRWLock_Destroy NSSRWLock_Destroy_Util
  ------------------
   92|      1|        td->tokensLock = NULL;
   93|      1|        status = nssTrustDomain_DestroyCache(td);
   94|      1|        if (status == PR_FAILURE) {
  ------------------
  |  Branch (94:13): [True: 0, False: 1]
  ------------------
   95|      0|            return status;
   96|      0|        }
   97|      1|        if (td->statusConfig) {
  ------------------
  |  Branch (97:13): [True: 0, False: 1]
  ------------------
   98|      0|            td->statusConfig->statusDestroy(td->statusConfig);
   99|      0|            td->statusConfig = NULL;
  100|      0|        }
  101|       |        /* Destroy the trust domain */
  102|      1|        nssArena_Destroy(td->arena);
  103|      1|    }
  104|      1|    return status;
  105|      1|}
nssTrustDomain_FindCertificateByIssuerAndSerialNumber:
  751|  5.12k|{
  752|  5.12k|    NSSSlot **slots = NULL;
  753|  5.12k|    NSSSlot **slotp;
  754|  5.12k|    NSSCertificate *rvCert = NULL;
  755|  5.12k|    nssPKIObjectCollection *collection = NULL;
  756|  5.12k|    nssUpdateLevel updateLevel;
  757|       |
  758|       |    /* see if this search is already cached */
  759|  5.12k|    rvCert = nssTrustDomain_GetCertForIssuerAndSNFromCache(td,
  760|  5.12k|                                                           issuer,
  761|  5.12k|                                                           serial);
  762|  5.12k|    if (rvCert) {
  ------------------
  |  Branch (762:9): [True: 0, False: 5.12k]
  ------------------
  763|      0|        return rvCert;
  764|      0|    }
  765|  5.12k|    slots = nssTrustDomain_GetActiveSlots(td, &updateLevel);
  766|  5.12k|    if (slots) {
  ------------------
  |  Branch (766:9): [True: 5.12k, False: 0]
  ------------------
  767|  15.3k|        for (slotp = slots; *slotp; slotp++) {
  ------------------
  |  Branch (767:29): [True: 10.2k, False: 5.12k]
  ------------------
  768|  10.2k|            NSSToken *token = nssSlot_GetToken(*slotp);
  769|  10.2k|            nssSession *session;
  770|  10.2k|            nssCryptokiObject *instance;
  771|  10.2k|            nssTokenSearchType tokenOnly = nssTokenSearchType_TokenOnly;
  772|  10.2k|            PRStatus status = PR_FAILURE;
  773|       |
  774|  10.2k|            if (!token)
  ------------------
  |  Branch (774:17): [True: 0, False: 10.2k]
  ------------------
  775|      0|                continue;
  776|  10.2k|            session = nssTrustDomain_GetSessionForToken(td, token);
  777|  10.2k|            if (session) {
  ------------------
  |  Branch (777:17): [True: 10.2k, False: 0]
  ------------------
  778|  10.2k|                instance = nssToken_FindCertificateByIssuerAndSerialNumber(
  779|  10.2k|                    token,
  780|  10.2k|                    session,
  781|  10.2k|                    issuer,
  782|  10.2k|                    serial,
  783|  10.2k|                    tokenOnly,
  784|  10.2k|                    &status);
  785|  10.2k|            }
  786|  10.2k|            (void)nssToken_Destroy(token);
  787|  10.2k|            if (status != PR_SUCCESS) {
  ------------------
  |  Branch (787:17): [True: 0, False: 10.2k]
  ------------------
  788|      0|                continue;
  789|      0|            }
  790|  10.2k|            if (instance) {
  ------------------
  |  Branch (790:17): [True: 0, False: 10.2k]
  ------------------
  791|      0|                if (!collection) {
  ------------------
  |  Branch (791:21): [True: 0, False: 0]
  ------------------
  792|      0|                    collection = nssCertificateCollection_Create(td, NULL);
  793|      0|                    if (!collection) {
  ------------------
  |  Branch (793:25): [True: 0, False: 0]
  ------------------
  794|      0|                        break; /* don't keep looping if out if memory */
  795|      0|                    }
  796|      0|                }
  797|      0|                status = nssPKIObjectCollection_AddInstances(collection,
  798|      0|                                                             &instance, 1);
  799|      0|                if (status == PR_SUCCESS) {
  ------------------
  |  Branch (799:21): [True: 0, False: 0]
  ------------------
  800|      0|                    (void)nssPKIObjectCollection_GetCertificates(
  801|      0|                        collection, &rvCert, 1, NULL);
  802|      0|                }
  803|      0|                if (rvCert) {
  ------------------
  |  Branch (803:21): [True: 0, False: 0]
  ------------------
  804|      0|                    break; /* found one cert, all done */
  805|      0|                }
  806|      0|            }
  807|  10.2k|        }
  808|  5.12k|    }
  809|  5.12k|    if (collection) {
  ------------------
  |  Branch (809:9): [True: 0, False: 5.12k]
  ------------------
  810|      0|        nssPKIObjectCollection_Destroy(collection);
  811|      0|    }
  812|  5.12k|    if (slots) {
  ------------------
  |  Branch (812:9): [True: 5.12k, False: 0]
  ------------------
  813|  5.12k|        nssSlotArray_Destroy(slots);
  814|  5.12k|    }
  815|  5.12k|    return rvCert;
  816|  5.12k|}
nssTrustDomain_FindCertificateByEncodedCertificate:
  833|  5.30k|{
  834|  5.30k|    PRStatus status;
  835|  5.30k|    NSSCertificate *rvCert = NULL;
  836|  5.30k|    NSSDER issuer = { 0 };
  837|  5.30k|    NSSDER serial = { 0 };
  838|       |    /* XXX this is not generic...  will any cert crack into issuer/serial? */
  839|  5.30k|    status = nssPKIX509_GetIssuerAndSerialFromDER(ber, &issuer, &serial);
  840|  5.30k|    if (status != PR_SUCCESS) {
  ------------------
  |  Branch (840:9): [True: 174, False: 5.12k]
  ------------------
  841|    174|        return NULL;
  842|    174|    }
  843|  5.12k|    rvCert = nssTrustDomain_FindCertificateByIssuerAndSerialNumber(td,
  844|  5.12k|                                                                   &issuer,
  845|  5.12k|                                                                   &serial);
  846|  5.12k|    PORT_Free(issuer.data);
  ------------------
  |  |   60|  5.12k|#define PORT_Free PORT_Free_Util
  ------------------
  847|  5.12k|    PORT_Free(serial.data);
  ------------------
  |  |   60|  5.12k|#define PORT_Free PORT_Free_Util
  ------------------
  848|  5.12k|    return rvCert;
  849|  5.30k|}
NSSTrustDomain_FindCertificateByEncodedCertificate:
  855|  5.30k|{
  856|  5.30k|    return nssTrustDomain_FindCertificateByEncodedCertificate(td, ber);
  857|  5.30k|}
nssTrustDomain_FindTrustForCertificate:
 1051|  10.1k|{
 1052|  10.1k|    NSSSlot **slots;
 1053|  10.1k|    NSSSlot **slotp;
 1054|  10.1k|    nssCryptokiObject *to = NULL;
 1055|  10.1k|    nssPKIObject *pkio = NULL;
 1056|  10.1k|    NSSTrust *rvt = NULL;
 1057|  10.1k|    nssUpdateLevel updateLevel;
 1058|  10.1k|    slots = nssTrustDomain_GetActiveSlots(td, &updateLevel);
 1059|  10.1k|    if (!slots) {
  ------------------
  |  Branch (1059:9): [True: 0, False: 10.1k]
  ------------------
 1060|      0|        return (NSSTrust *)NULL;
 1061|      0|    }
 1062|  30.5k|    for (slotp = slots; *slotp; slotp++) {
  ------------------
  |  Branch (1062:25): [True: 20.3k, False: 10.1k]
  ------------------
 1063|  20.3k|        NSSToken *token = nssSlot_GetToken(*slotp);
 1064|       |
 1065|  20.3k|        if (token) {
  ------------------
  |  Branch (1065:13): [True: 20.3k, False: 0]
  ------------------
 1066|  20.3k|            to = nssToken_FindTrustForCertificate(token, NULL,
 1067|  20.3k|                                                  &c->encoding,
 1068|  20.3k|                                                  &c->issuer,
 1069|  20.3k|                                                  &c->serial,
 1070|  20.3k|                                                  nssTokenSearchType_TokenOnly);
 1071|  20.3k|            if (to) {
  ------------------
  |  Branch (1071:17): [True: 0, False: 20.3k]
  ------------------
 1072|      0|                PRStatus status;
 1073|      0|                if (!pkio) {
  ------------------
  |  Branch (1073:21): [True: 0, False: 0]
  ------------------
 1074|      0|                    pkio = nssPKIObject_Create(NULL, to, td, NULL, nssPKILock);
 1075|      0|                    status = pkio ? PR_SUCCESS : PR_FAILURE;
  ------------------
  |  Branch (1075:30): [True: 0, False: 0]
  ------------------
 1076|      0|                } else {
 1077|      0|                    status = nssPKIObject_AddInstance(pkio, to);
 1078|      0|                }
 1079|      0|                if (status != PR_SUCCESS) {
  ------------------
  |  Branch (1079:21): [True: 0, False: 0]
  ------------------
 1080|      0|                    nssCryptokiObject_Destroy(to);
 1081|      0|                }
 1082|      0|            }
 1083|  20.3k|            (void)nssToken_Destroy(token);
 1084|  20.3k|        }
 1085|  20.3k|    }
 1086|  10.1k|    if (pkio) {
  ------------------
  |  Branch (1086:9): [True: 0, False: 10.1k]
  ------------------
 1087|      0|        rvt = nssTrust_Create(pkio, &c->encoding);
 1088|      0|        if (rvt) {
  ------------------
  |  Branch (1088:13): [True: 0, False: 0]
  ------------------
 1089|      0|            pkio = NULL; /* rvt object now owns the pkio reference */
 1090|      0|        }
 1091|      0|    }
 1092|  10.1k|    nssSlotArray_Destroy(slots);
 1093|  10.1k|    if (pkio) {
  ------------------
  |  Branch (1093:9): [True: 0, False: 10.1k]
  ------------------
 1094|      0|        nssPKIObject_Destroy(pkio);
 1095|      0|    }
 1096|  10.1k|    return rvt;
 1097|  10.1k|}
nssTrustDomain_CreateCryptoContext:
 1202|      1|{
 1203|      1|    return nssCryptoContext_Create(td, uhhOpt);
 1204|      1|}
NSSTrustDomain_CreateCryptoContext:
 1210|      1|{
 1211|      1|    return nssTrustDomain_CreateCryptoContext(td, uhhOpt);
 1212|      1|}
trustdomain.c:token_destructor:
   63|      2|{
   64|      2|    NSSToken *tok = (NSSToken *)t;
   65|       |    /* Remove the token list's reference to the token */
   66|      2|    (void)nssToken_Destroy(tok);
   67|       |
   68|       |    /* Signal that the slot should not give out any more references to the
   69|       |     * token. The token might still have a positive refcount after this call.
   70|       |     * The token has a reference to the slot, so the slot will not be destroyed
   71|       |     * until after the token's refcount drops to 0. */
   72|      2|    PK11Slot_SetNSSToken(tok->pk11slot, NULL);
   73|      2|}
trustdomain.c:nssTrustDomain_GetActiveSlots:
  112|  15.3k|{
  113|  15.3k|    PRUint32 count;
  114|  15.3k|    NSSSlot **slots = NULL;
  115|  15.3k|    NSSToken **tp, **tokens;
  116|  15.3k|    *updateLevel = 1;
  117|  15.3k|    if (!td->tokenList) {
  ------------------
  |  Branch (117:9): [True: 0, False: 15.3k]
  ------------------
  118|      0|        return NULL;
  119|      0|    }
  120|  15.3k|    NSSRWLock_LockRead(td->tokensLock);
  ------------------
  |  |   47|  15.3k|#define NSSRWLock_LockRead NSSRWLock_LockRead_Util
  ------------------
  121|  15.3k|    count = nssList_Count(td->tokenList);
  122|  15.3k|    tokens = nss_ZNEWARRAY(NULL, NSSToken *, count + 1);
  ------------------
  |  |  371|  15.3k|    ((type *)nss_ZAlloc((arenaOpt), sizeof(type) * (quantity)))
  ------------------
  123|  15.3k|    if (!tokens) {
  ------------------
  |  Branch (123:9): [True: 0, False: 15.3k]
  ------------------
  124|      0|        NSSRWLock_UnlockRead(td->tokensLock);
  ------------------
  |  |   50|      0|#define NSSRWLock_UnlockRead NSSRWLock_UnlockRead_Util
  ------------------
  125|      0|        return NULL;
  126|      0|    }
  127|  15.3k|    slots = nss_ZNEWARRAY(NULL, NSSSlot *, count + 1);
  ------------------
  |  |  371|  15.3k|    ((type *)nss_ZAlloc((arenaOpt), sizeof(type) * (quantity)))
  ------------------
  128|  15.3k|    if (!slots) {
  ------------------
  |  Branch (128:9): [True: 0, False: 15.3k]
  ------------------
  129|      0|        NSSRWLock_UnlockRead(td->tokensLock);
  ------------------
  |  |   50|      0|#define NSSRWLock_UnlockRead NSSRWLock_UnlockRead_Util
  ------------------
  130|      0|        nss_ZFreeIf(tokens);
  131|      0|        return NULL;
  132|      0|    }
  133|  15.3k|    nssList_GetArray(td->tokenList, (void **)tokens, count);
  134|  15.3k|    count = 0;
  135|  45.9k|    for (tp = tokens; *tp; tp++) {
  ------------------
  |  Branch (135:23): [True: 30.6k, False: 15.3k]
  ------------------
  136|  30.6k|        NSSSlot *slot = nssToken_GetSlot(*tp);
  137|  30.6k|        if (!PK11_IsDisabled(slot->pk11slot)) {
  ------------------
  |  Branch (137:13): [True: 30.6k, False: 0]
  ------------------
  138|  30.6k|            slots[count++] = slot;
  139|  30.6k|        } else {
  140|      0|            nssSlot_Destroy(slot);
  141|      0|        }
  142|  30.6k|    }
  143|  15.3k|    NSSRWLock_UnlockRead(td->tokensLock);
  ------------------
  |  |   50|  15.3k|#define NSSRWLock_UnlockRead NSSRWLock_UnlockRead_Util
  ------------------
  144|  15.3k|    nss_ZFreeIf(tokens);
  145|  15.3k|    if (!count) {
  ------------------
  |  Branch (145:9): [True: 0, False: 15.3k]
  ------------------
  146|      0|        nss_ZFreeIf(slots);
  147|      0|        slots = NULL;
  148|      0|    }
  149|  15.3k|    return slots;
  150|  15.3k|}
trustdomain.c:nssTrustDomain_GetSessionForToken:
  157|  10.2k|{
  158|  10.2k|    return nssToken_GetDefaultSession(token);
  159|  10.2k|}

sftk_kyber_PK11ParamToInternal:
   16|     40|{
   17|     40|    switch (pk11ParamSet) {
   18|      0|        case CKP_NSS_KYBER_768_ROUND3:
  ------------------
  |  |  301|      0|#define CKP_NSS_KYBER_768_ROUND3 (CKP_NSS + 1)
  |  |  ------------------
  |  |  |  |  300|      0|#define CKP_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKP_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (18:9): [True: 0, False: 40]
  ------------------
   19|      0|            return params_kyber768_round3;
   20|     40|        case CKP_NSS_ML_KEM_768:
  ------------------
  |  |  302|     40|#define CKP_NSS_ML_KEM_768 (CKP_NSS + 2)
  |  |  ------------------
  |  |  |  |  300|     40|#define CKP_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|     40|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKP_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     40|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (20:9): [True: 40, False: 0]
  ------------------
   21|     40|            return params_ml_kem768;
   22|      0|        default:
  ------------------
  |  Branch (22:9): [True: 0, False: 40]
  ------------------
   23|      0|            return params_kyber_invalid;
   24|     40|    }
   25|     40|}
sftk_kyber_AllocPubKeyItem:
   29|     40|{
   30|     40|    switch (params) {
   31|      0|        case params_kyber768_round3:
  ------------------
  |  Branch (31:9): [True: 0, False: 40]
  ------------------
   32|      0|        case params_kyber768_round3_test_mode:
  ------------------
  |  Branch (32:9): [True: 0, False: 40]
  ------------------
   33|     40|        case params_ml_kem768:
  ------------------
  |  Branch (33:9): [True: 40, False: 0]
  ------------------
   34|     40|        case params_ml_kem768_test_mode:
  ------------------
  |  Branch (34:9): [True: 0, False: 40]
  ------------------
   35|     40|            return SECITEM_AllocItem(NULL, pubkey, KYBER768_PUBLIC_KEY_BYTES);
  ------------------
  |  |  103|     40|#define SECITEM_AllocItem SECITEM_AllocItem_Util
  ------------------
                          return SECITEM_AllocItem(NULL, pubkey, KYBER768_PUBLIC_KEY_BYTES);
  ------------------
  |  |    8|     40|#define KYBER768_PUBLIC_KEY_BYTES 1184U
  ------------------
   36|      0|        default:
  ------------------
  |  Branch (36:9): [True: 0, False: 40]
  ------------------
   37|      0|            return NULL;
   38|     40|    }
   39|     40|}
sftk_kyber_AllocPrivKeyItem:
   43|     40|{
   44|     40|    switch (params) {
   45|      0|        case params_kyber768_round3:
  ------------------
  |  Branch (45:9): [True: 0, False: 40]
  ------------------
   46|      0|        case params_kyber768_round3_test_mode:
  ------------------
  |  Branch (46:9): [True: 0, False: 40]
  ------------------
   47|     40|        case params_ml_kem768:
  ------------------
  |  Branch (47:9): [True: 40, False: 0]
  ------------------
   48|     40|        case params_ml_kem768_test_mode:
  ------------------
  |  Branch (48:9): [True: 0, False: 40]
  ------------------
   49|     40|            return SECITEM_AllocItem(NULL, privkey, KYBER768_PRIVATE_KEY_BYTES);
  ------------------
  |  |  103|     40|#define SECITEM_AllocItem SECITEM_AllocItem_Util
  ------------------
                          return SECITEM_AllocItem(NULL, privkey, KYBER768_PRIVATE_KEY_BYTES);
  ------------------
  |  |    9|     40|#define KYBER768_PRIVATE_KEY_BYTES 2400U
  ------------------
   50|      0|        default:
  ------------------
  |  Branch (50:9): [True: 0, False: 40]
  ------------------
   51|      0|            return NULL;
   52|     40|    }
   53|     40|}

nsslowkey_DestroyPrivateKey:
  214|  9.67k|{
  215|  9.67k|    if (privk && privk->arena) {
  ------------------
  |  Branch (215:9): [True: 9.67k, False: 0]
  |  Branch (215:18): [True: 9.67k, False: 0]
  ------------------
  216|  9.67k|        PORT_FreeArena(privk->arena, PR_TRUE);
  ------------------
  |  |   61|  9.67k|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                      PORT_FreeArena(privk->arena, PR_TRUE);
  ------------------
  |  |  437|  9.67k|#define PR_TRUE 1
  ------------------
  217|  9.67k|    }
  218|  9.67k|}
nsslowkey_DestroyPublicKey:
  222|  13.4k|{
  223|  13.4k|    if (pubk && pubk->arena) {
  ------------------
  |  Branch (223:9): [True: 13.4k, False: 0]
  |  Branch (223:17): [True: 13.4k, False: 0]
  ------------------
  224|  13.4k|        PORT_FreeArena(pubk->arena, PR_TRUE);
  ------------------
  |  |   61|  13.4k|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                      PORT_FreeArena(pubk->arena, PR_TRUE);
  ------------------
  |  |  437|  13.4k|#define PR_TRUE 1
  ------------------
  225|  13.4k|    }
  226|  13.4k|}
nsslowkey_PublicModulusLen:
  229|  1.26k|{
  230|       |    /* interpret modulus length as key strength... in
  231|       |     * fortezza that's the public key length */
  232|       |
  233|  1.26k|    switch (pubk->keyType) {
  234|  1.26k|        case NSSLOWKEYRSAKey:
  ------------------
  |  Branch (234:9): [True: 1.26k, False: 0]
  ------------------
  235|  1.26k|            if (pubk->u.rsa.modulus.len == 0) {
  ------------------
  |  Branch (235:17): [True: 0, False: 1.26k]
  ------------------
  236|      0|                return 0;
  237|      0|            }
  238|  1.26k|            if (pubk->u.rsa.modulus.data[0] == 0) {
  ------------------
  |  Branch (238:17): [True: 0, False: 1.26k]
  ------------------
  239|      0|                return pubk->u.rsa.modulus.len - 1;
  240|      0|            }
  241|  1.26k|            return pubk->u.rsa.modulus.len;
  242|      0|        default:
  ------------------
  |  Branch (242:9): [True: 0, False: 1.26k]
  ------------------
  243|      0|            break;
  244|  1.26k|    }
  245|      0|    return 0;
  246|  1.26k|}

sftk_PBELockInit:
  585|      1|{
  586|      1|    if (!PBECache.lock) {
  ------------------
  |  Branch (586:9): [True: 1, False: 0]
  ------------------
  587|      1|        PBECache.lock = PZ_NewLock(nssIPBECacheLock);
  ------------------
  |  |  243|      1|#define PZ_NewLock(t) PR_NewLock()
  ------------------
  588|      1|    }
  589|      1|}
sftk_PBELockShutdown:
  716|      1|{
  717|      1|    int i;
  718|      1|    if (PBECache.lock) {
  ------------------
  |  Branch (718:9): [True: 1, False: 0]
  ------------------
  719|      1|        PZ_DestroyLock(PBECache.lock);
  ------------------
  |  |  244|      1|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
  720|      1|        PBECache.lock = 0;
  721|      1|    }
  722|      1|    sftk_clearPBECommonCacheItemsLocked(&PBECache.cacheKDF1.common);
  723|    151|    for (i = 0; i < KDF2_CACHE_COUNT; i++) {
  ------------------
  |  |  569|    151|#define KDF2_CACHE_COUNT 150
  ------------------
  |  Branch (723:17): [True: 150, False: 1]
  ------------------
  724|    150|        sftk_clearPBECommonCacheItemsLocked(&PBECache.cacheKDF2.common[i]);
  725|    150|    }
  726|      1|    PBECache.cacheKDF2.next = 0;
  727|      1|}
lowpbe.c:sftk_clearPBECommonCacheItemsLocked:
  593|    151|{
  594|    151|    if (item->hash) {
  ------------------
  |  Branch (594:9): [True: 0, False: 151]
  ------------------
  595|      0|        SECITEM_ZfreeItem(item->hash, PR_TRUE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                      SECITEM_ZfreeItem(item->hash, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  596|      0|        item->hash = NULL;
  597|      0|    }
  598|    151|    if (item->salt) {
  ------------------
  |  Branch (598:9): [True: 0, False: 151]
  ------------------
  599|      0|        SECITEM_ZfreeItem(item->salt, PR_TRUE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                      SECITEM_ZfreeItem(item->salt, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  600|      0|        item->salt = NULL;
  601|      0|    }
  602|    151|    if (item->pwItem) {
  ------------------
  |  Branch (602:9): [True: 0, False: 151]
  ------------------
  603|      0|        SECITEM_ZfreeItem(item->pwItem, PR_TRUE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                      SECITEM_ZfreeItem(item->pwItem, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  604|      0|        item->pwItem = NULL;
  605|      0|    }
  606|    151|}

SFTKFree_nsslowkey_DestroyPublicKey:
  678|  13.4k|    {                              \
  679|  13.4k|        ctxtype *p = vp;           \
  680|  13.4k|        mmm(p);                    \
  681|  13.4k|    }
SFTKFree_nsslowkey_DestroyPrivateKey:
  678|  9.67k|    {                              \
  679|  9.67k|        ctxtype *p = vp;           \
  680|  9.67k|        mmm(p);                    \
  681|  9.67k|    }
sftk_defaultAttribute:
  793|  1.09M|{
  794|  1.09M|    if (!sftk_hasAttribute(object, type)) {
  ------------------
  |  Branch (794:9): [True: 821k, False: 277k]
  ------------------
  795|   821k|        return sftk_AddAttributeType(object, type, value, len);
  796|   821k|    }
  797|   277k|    return CKR_OK;
  ------------------
  |  | 1388|   277k|#define CKR_OK 0x00000000UL
  ------------------
  798|  1.09M|}
sftk_handleObject:
 1756|  69.6k|{
 1757|  69.6k|    SFTKSlot *slot = session->slot;
 1758|  69.6k|    SFTKAttribute *attribute;
 1759|  69.6k|    CK_BBOOL ckfalse = CK_FALSE;
  ------------------
  |  |   23|  69.6k|#define CK_FALSE 0
  ------------------
 1760|  69.6k|    CK_BBOOL cktrue = CK_TRUE;
  ------------------
  |  |   22|  69.6k|#define CK_TRUE 1
  ------------------
 1761|  69.6k|    PRBool isLoggedIn, needLogin;
 1762|  69.6k|    CK_RV crv;
 1763|       |
 1764|       |    /* make sure all the base object types are defined. If not set the
 1765|       |     * defaults */
 1766|  69.6k|    crv = sftk_defaultAttribute(object, CKA_TOKEN, &ckfalse, sizeof(CK_BBOOL));
  ------------------
  |  |  512|  69.6k|#define CKA_TOKEN 0x00000001UL
  ------------------
 1767|  69.6k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  69.6k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1767:9): [True: 0, False: 69.6k]
  ------------------
 1768|      0|        return crv;
 1769|  69.6k|    crv = sftk_defaultAttribute(object, CKA_PRIVATE, &ckfalse, sizeof(CK_BBOOL));
  ------------------
  |  |  513|  69.6k|#define CKA_PRIVATE 0x00000002UL
  ------------------
 1770|  69.6k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  69.6k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1770:9): [True: 0, False: 69.6k]
  ------------------
 1771|      0|        return crv;
 1772|  69.6k|    crv = sftk_defaultAttribute(object, CKA_LABEL, NULL, 0);
  ------------------
  |  |  514|  69.6k|#define CKA_LABEL 0x00000003UL
  ------------------
 1773|  69.6k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  69.6k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1773:9): [True: 0, False: 69.6k]
  ------------------
 1774|      0|        return crv;
 1775|  69.6k|    crv = sftk_defaultAttribute(object, CKA_MODIFIABLE, &cktrue, sizeof(CK_BBOOL));
  ------------------
  |  |  593|  69.6k|#define CKA_MODIFIABLE 0x00000170UL
  ------------------
 1776|  69.6k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  69.6k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1776:9): [True: 0, False: 69.6k]
  ------------------
 1777|      0|        return crv;
 1778|       |
 1779|  69.6k|    PZ_Lock(slot->slotLock);
  ------------------
  |  |  245|  69.6k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
 1780|  69.6k|    isLoggedIn = slot->isLoggedIn;
 1781|  69.6k|    needLogin = slot->needLogin;
 1782|  69.6k|    PZ_Unlock(slot->slotLock);
  ------------------
  |  |  246|  69.6k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
 1783|       |
 1784|       |    /* don't create a private object if we aren't logged in */
 1785|  69.6k|    if (!isLoggedIn && needLogin && sftk_isTrue(object, CKA_PRIVATE)) {
  ------------------
  |  |  513|      0|#define CKA_PRIVATE 0x00000002UL
  ------------------
  |  Branch (1785:9): [True: 69.6k, False: 0]
  |  Branch (1785:24): [True: 0, False: 69.6k]
  |  Branch (1785:37): [True: 0, False: 0]
  ------------------
 1786|      0|        return CKR_USER_NOT_LOGGED_IN;
  ------------------
  |  | 1486|      0|#define CKR_USER_NOT_LOGGED_IN 0x00000101UL
  ------------------
 1787|      0|    }
 1788|       |
 1789|  69.6k|    if (((session->info.flags & CKF_RW_SESSION) == 0) &&
  ------------------
  |  |  302|  69.6k|#define CKF_RW_SESSION 0x00000002UL     /* session is r/w */
  ------------------
  |  Branch (1789:9): [True: 69.6k, False: 0]
  ------------------
 1790|  69.6k|        (sftk_isTrue(object, CKA_TOKEN))) {
  ------------------
  |  |  512|  69.6k|#define CKA_TOKEN 0x00000001UL
  ------------------
  |  Branch (1790:9): [True: 0, False: 69.6k]
  ------------------
 1791|      0|        return CKR_SESSION_READ_ONLY;
  ------------------
  |  | 1467|      0|#define CKR_SESSION_READ_ONLY 0x000000B5UL
  ------------------
 1792|      0|    }
 1793|       |
 1794|       |    /* Assign a unique SESSION object handle to every new object,
 1795|       |     * whether it is a session object or a token object.
 1796|       |     * At this point, all new objects are structured as session objects.
 1797|       |     * Objects with the CKA_TOKEN attribute true will be turned into
 1798|       |     * token objects and will have a token object handle assigned to
 1799|       |     * them by a call to sftk_mkHandle in the handler for each object
 1800|       |     * class, invoked below.
 1801|       |     *
 1802|       |     * It may be helpful to note/remember that
 1803|       |     * sftk_narrowToXxxObject uses sftk_isToken,
 1804|       |     * sftk_isToken examines the sign bit of the object's handle, but
 1805|       |     * sftk_isTrue(...,CKA_TOKEN) examines the CKA_TOKEN attribute.
 1806|       |     */
 1807|  69.6k|    object->handle = sftk_getNextHandle(slot);
 1808|       |
 1809|       |    /* get the object class */
 1810|  69.6k|    attribute = sftk_FindAttribute(object, CKA_CLASS);
  ------------------
  |  |  511|  69.6k|#define CKA_CLASS 0x00000000UL
  ------------------
 1811|  69.6k|    if (attribute == NULL) {
  ------------------
  |  Branch (1811:9): [True: 0, False: 69.6k]
  ------------------
 1812|      0|        return CKR_TEMPLATE_INCOMPLETE;
  ------------------
  |  | 1477|      0|#define CKR_TEMPLATE_INCOMPLETE 0x000000D0UL
  ------------------
 1813|      0|    }
 1814|  69.6k|    object->objclass = *(CK_OBJECT_CLASS *)attribute->attrib.pValue;
 1815|  69.6k|    sftk_FreeAttribute(attribute);
 1816|       |
 1817|       |    /* Now handle the specific object class.
 1818|       |     * At this point, all objects are session objects, and the session
 1819|       |     * number must be passed to the object class handlers.
 1820|       |     */
 1821|  69.6k|    switch (object->objclass) {
 1822|  4.46k|        case CKO_DATA:
  ------------------
  |  |  325|  4.46k|#define CKO_DATA 0x00000000UL
  ------------------
  |  Branch (1822:9): [True: 4.46k, False: 65.2k]
  ------------------
 1823|  4.46k|            crv = sftk_handleDataObject(session, object);
 1824|  4.46k|            break;
 1825|      0|        case CKO_CERTIFICATE:
  ------------------
  |  |  326|      0|#define CKO_CERTIFICATE 0x00000001UL
  ------------------
  |  Branch (1825:9): [True: 0, False: 69.6k]
  ------------------
 1826|      0|            crv = sftk_handleCertObject(session, object);
 1827|      0|            break;
 1828|      0|        case CKO_NSS_TRUST:
  ------------------
  |  |   37|      0|#define CKO_NSS_TRUST (CKO_NSS + 3)
  |  |  ------------------
  |  |  |  |   33|      0|#define CKO_NSS (CKO_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define CKO_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKO_NSS (CKO_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1828:9): [True: 0, False: 69.6k]
  ------------------
 1829|      0|            crv = sftk_handleTrustObject(session, object);
 1830|      0|            break;
 1831|      0|        case CKO_NSS_CRL:
  ------------------
  |  |   35|      0|#define CKO_NSS_CRL (CKO_NSS + 1)
  |  |  ------------------
  |  |  |  |   33|      0|#define CKO_NSS (CKO_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define CKO_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKO_NSS (CKO_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1831:9): [True: 0, False: 69.6k]
  ------------------
 1832|      0|            crv = sftk_handleCrlObject(session, object);
 1833|      0|            break;
 1834|      0|        case CKO_NSS_SMIME:
  ------------------
  |  |   36|      0|#define CKO_NSS_SMIME (CKO_NSS + 2)
  |  |  ------------------
  |  |  |  |   33|      0|#define CKO_NSS (CKO_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define CKO_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKO_NSS (CKO_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1834:9): [True: 0, False: 69.6k]
  ------------------
 1835|      0|            crv = sftk_handleSMimeObject(session, object);
 1836|      0|            break;
 1837|  9.67k|        case CKO_PRIVATE_KEY:
  ------------------
  |  |  328|  9.67k|#define CKO_PRIVATE_KEY 0x00000003UL
  ------------------
  |  Branch (1837:9): [True: 9.67k, False: 60.0k]
  ------------------
 1838|  23.1k|        case CKO_PUBLIC_KEY:
  ------------------
  |  |  327|  23.1k|#define CKO_PUBLIC_KEY 0x00000002UL
  ------------------
  |  Branch (1838:9): [True: 13.4k, False: 56.1k]
  ------------------
 1839|  65.2k|        case CKO_SECRET_KEY:
  ------------------
  |  |  329|  65.2k|#define CKO_SECRET_KEY 0x00000004UL
  ------------------
  |  Branch (1839:9): [True: 42.0k, False: 27.6k]
  ------------------
 1840|  65.2k|            crv = sftk_handleKeyObject(session, object);
 1841|  65.2k|            break;
 1842|      0|        case CKO_DOMAIN_PARAMETERS:
  ------------------
  |  |  331|      0|#define CKO_DOMAIN_PARAMETERS 0x00000006UL
  ------------------
  |  Branch (1842:9): [True: 0, False: 69.6k]
  ------------------
 1843|      0|            crv = sftk_handleKeyParameterObject(session, object);
 1844|      0|            break;
 1845|      0|        default:
  ------------------
  |  Branch (1845:9): [True: 0, False: 69.6k]
  ------------------
 1846|      0|            crv = CKR_ATTRIBUTE_VALUE_INVALID;
  ------------------
  |  | 1409|      0|#define CKR_ATTRIBUTE_VALUE_INVALID 0x00000013UL
  ------------------
 1847|      0|            break;
 1848|  69.6k|    }
 1849|       |
 1850|       |    /* can't fail from here on out unless the pk_handlXXX functions have
 1851|       |     * failed the request */
 1852|  69.6k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  69.6k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1852:9): [True: 107, False: 69.5k]
  ------------------
 1853|    107|        return crv;
 1854|    107|    }
 1855|       |
 1856|       |    /* Now link the object into the slot and session structures.
 1857|       |     * If the object has a true CKA_TOKEN attribute, the above object
 1858|       |     * class handlers will have set the sign bit in the object handle,
 1859|       |     * causing the following test to be true.
 1860|       |     */
 1861|  69.5k|    if (sftk_isToken(object->handle)) {
  ------------------
  |  |  504|  69.5k|#define sftk_isToken(id) (((id)&SFTK_TOKEN_MASK) == SFTK_TOKEN_MAGIC)
  |  |  ------------------
  |  |  |  |  478|  69.5k|#define SFTK_TOKEN_MASK 0x80000000L
  |  |  ------------------
  |  |               #define sftk_isToken(id) (((id)&SFTK_TOKEN_MASK) == SFTK_TOKEN_MAGIC)
  |  |  ------------------
  |  |  |  |  479|  69.5k|#define SFTK_TOKEN_MAGIC 0x80000000L
  |  |  ------------------
  |  |  |  Branch (504:26): [True: 0, False: 69.5k]
  |  |  ------------------
  ------------------
 1862|      0|        sftk_convertSessionToToken(object);
 1863|  69.5k|    } else {
 1864|  69.5k|        object->slot = slot;
 1865|  69.5k|        sftk_AddObject(session, object);
 1866|  69.5k|    }
 1867|       |
 1868|  69.5k|    return CKR_OK;
  ------------------
  |  | 1388|  69.5k|#define CKR_OK 0x00000000UL
  ------------------
 1869|  69.6k|}
sftk_GetPubKey:
 1878|  17.1k|{
 1879|  17.1k|    NSSLOWKEYPublicKey *pubKey;
 1880|  17.1k|    PLArenaPool *arena;
 1881|  17.1k|    CK_RV crv;
 1882|       |
 1883|  17.1k|    if (object->objclass != CKO_PUBLIC_KEY) {
  ------------------
  |  |  327|  17.1k|#define CKO_PUBLIC_KEY 0x00000002UL
  ------------------
  |  Branch (1883:9): [True: 0, False: 17.1k]
  ------------------
 1884|      0|        *crvp = CKR_KEY_TYPE_INCONSISTENT;
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
 1885|      0|        return NULL;
 1886|      0|    }
 1887|       |
 1888|  17.1k|    if (sftk_isToken(object->handle)) {
  ------------------
  |  |  504|  17.1k|#define sftk_isToken(id) (((id)&SFTK_TOKEN_MASK) == SFTK_TOKEN_MAGIC)
  |  |  ------------------
  |  |  |  |  478|  17.1k|#define SFTK_TOKEN_MASK 0x80000000L
  |  |  ------------------
  |  |               #define sftk_isToken(id) (((id)&SFTK_TOKEN_MASK) == SFTK_TOKEN_MAGIC)
  |  |  ------------------
  |  |  |  |  479|  17.1k|#define SFTK_TOKEN_MAGIC 0x80000000L
  |  |  ------------------
  |  |  |  Branch (504:26): [True: 0, False: 17.1k]
  |  |  ------------------
  ------------------
 1889|       |        /* ferret out the token object handle */
 1890|      0|    }
 1891|       |
 1892|       |    /* If we already have a key, use it */
 1893|  17.1k|    if (object->objectInfo) {
  ------------------
  |  Branch (1893:9): [True: 3.69k, False: 13.4k]
  ------------------
 1894|  3.69k|        *crvp = CKR_OK;
  ------------------
  |  | 1388|  3.69k|#define CKR_OK 0x00000000UL
  ------------------
 1895|  3.69k|        return (NSSLOWKEYPublicKey *)object->objectInfo;
 1896|  3.69k|    }
 1897|       |
 1898|       |    /* allocate the structure */
 1899|  13.4k|    arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
  ------------------
  |  |   63|  13.4k|#define PORT_NewArena PORT_NewArena_Util
  ------------------
                  arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
  ------------------
  |  |   60|  13.4k|#define DER_DEFAULT_CHUNKSIZE (2048)
  ------------------
 1900|  13.4k|    if (arena == NULL) {
  ------------------
  |  Branch (1900:9): [True: 0, False: 13.4k]
  ------------------
 1901|      0|        *crvp = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 1902|      0|        return NULL;
 1903|      0|    }
 1904|       |
 1905|  13.4k|    pubKey = (NSSLOWKEYPublicKey *)
 1906|  13.4k|        PORT_ArenaAlloc(arena, sizeof(NSSLOWKEYPublicKey));
  ------------------
  |  |   53|  13.4k|#define PORT_ArenaAlloc PORT_ArenaAlloc_Util
  ------------------
 1907|  13.4k|    if (pubKey == NULL) {
  ------------------
  |  Branch (1907:9): [True: 0, False: 13.4k]
  ------------------
 1908|      0|        PORT_FreeArena(arena, PR_FALSE);
  ------------------
  |  |   61|      0|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                      PORT_FreeArena(arena, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 1909|      0|        *crvp = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 1910|      0|        return NULL;
 1911|      0|    }
 1912|       |
 1913|       |    /* fill in the structure */
 1914|  13.4k|    pubKey->arena = arena;
 1915|  13.4k|    switch (key_type) {
 1916|  2.42k|        case CKK_RSA:
  ------------------
  |  |  372|  2.42k|#define CKK_RSA 0x00000000UL
  ------------------
  |  Branch (1916:9): [True: 2.42k, False: 11.0k]
  ------------------
 1917|  2.42k|            pubKey->keyType = NSSLOWKEYRSAKey;
 1918|  2.42k|            crv = sftk_Attribute2SSecItem(arena, &pubKey->u.rsa.modulus,
 1919|  2.42k|                                          object, CKA_MODULUS);
  ------------------
  |  |  558|  2.42k|#define CKA_MODULUS 0x00000120UL
  ------------------
 1920|  2.42k|            if (crv != CKR_OK)
  ------------------
  |  | 1388|  2.42k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1920:17): [True: 0, False: 2.42k]
  ------------------
 1921|      0|                break;
 1922|  2.42k|            crv = sftk_Attribute2SSecItem(arena, &pubKey->u.rsa.publicExponent,
 1923|  2.42k|                                          object, CKA_PUBLIC_EXPONENT);
  ------------------
  |  |  560|  2.42k|#define CKA_PUBLIC_EXPONENT 0x00000122UL
  ------------------
 1924|  2.42k|            break;
 1925|  1.13k|        case CKK_DSA:
  ------------------
  |  |  373|  1.13k|#define CKK_DSA 0x00000001UL
  ------------------
  |  Branch (1925:9): [True: 1.13k, False: 12.3k]
  ------------------
 1926|  1.13k|            pubKey->keyType = NSSLOWKEYDSAKey;
 1927|  1.13k|            crv = sftk_Attribute2SSecItem(arena, &pubKey->u.dsa.params.prime,
 1928|  1.13k|                                          object, CKA_PRIME);
  ------------------
  |  |  569|  1.13k|#define CKA_PRIME 0x00000130UL
  ------------------
 1929|  1.13k|            if (crv != CKR_OK)
  ------------------
  |  | 1388|  1.13k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1929:17): [True: 0, False: 1.13k]
  ------------------
 1930|      0|                break;
 1931|  1.13k|            crv = sftk_Attribute2SSecItem(arena, &pubKey->u.dsa.params.subPrime,
 1932|  1.13k|                                          object, CKA_SUBPRIME);
  ------------------
  |  |  570|  1.13k|#define CKA_SUBPRIME 0x00000131UL
  ------------------
 1933|  1.13k|            if (crv != CKR_OK)
  ------------------
  |  | 1388|  1.13k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1933:17): [True: 0, False: 1.13k]
  ------------------
 1934|      0|                break;
 1935|  1.13k|            crv = sftk_Attribute2SSecItem(arena, &pubKey->u.dsa.params.base,
 1936|  1.13k|                                          object, CKA_BASE);
  ------------------
  |  |  571|  1.13k|#define CKA_BASE 0x00000132UL
  ------------------
 1937|  1.13k|            if (crv != CKR_OK)
  ------------------
  |  | 1388|  1.13k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1937:17): [True: 0, False: 1.13k]
  ------------------
 1938|      0|                break;
 1939|  1.13k|            crv = sftk_Attribute2SSecItem(arena, &pubKey->u.dsa.publicValue,
 1940|  1.13k|                                          object, CKA_VALUE);
  ------------------
  |  |  516|  1.13k|#define CKA_VALUE 0x00000011UL
  ------------------
 1941|  1.13k|            break;
 1942|  1.13k|        case CKK_DH:
  ------------------
  |  |  374|  1.13k|#define CKK_DH 0x00000002UL
  ------------------
  |  Branch (1942:9): [True: 1.13k, False: 12.3k]
  ------------------
 1943|  1.13k|            pubKey->keyType = NSSLOWKEYDHKey;
 1944|  1.13k|            crv = sftk_Attribute2SSecItem(arena, &pubKey->u.dh.prime,
 1945|  1.13k|                                          object, CKA_PRIME);
  ------------------
  |  |  569|  1.13k|#define CKA_PRIME 0x00000130UL
  ------------------
 1946|  1.13k|            if (crv != CKR_OK)
  ------------------
  |  | 1388|  1.13k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1946:17): [True: 0, False: 1.13k]
  ------------------
 1947|      0|                break;
 1948|  1.13k|            crv = sftk_Attribute2SSecItem(arena, &pubKey->u.dh.base,
 1949|  1.13k|                                          object, CKA_BASE);
  ------------------
  |  |  571|  1.13k|#define CKA_BASE 0x00000132UL
  ------------------
 1950|  1.13k|            if (crv != CKR_OK)
  ------------------
  |  | 1388|  1.13k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1950:17): [True: 0, False: 1.13k]
  ------------------
 1951|      0|                break;
 1952|  1.13k|            crv = sftk_Attribute2SSecItem(arena, &pubKey->u.dh.publicValue,
 1953|  1.13k|                                          object, CKA_VALUE);
  ------------------
  |  |  516|  1.13k|#define CKA_VALUE 0x00000011UL
  ------------------
 1954|  1.13k|            break;
 1955|      0|        case CKK_EC_EDWARDS:
  ------------------
  |  |  448|      0|#define CKK_EC_EDWARDS 0x00000040UL
  ------------------
  |  Branch (1955:9): [True: 0, False: 13.4k]
  ------------------
 1956|      0|        case CKK_EC_MONTGOMERY:
  ------------------
  |  |  449|      0|#define CKK_EC_MONTGOMERY 0x00000041UL
  ------------------
  |  Branch (1956:9): [True: 0, False: 13.4k]
  ------------------
 1957|  8.74k|        case CKK_EC:
  ------------------
  |  |  379|  8.74k|#define CKK_EC 0x00000003UL
  ------------------
  |  Branch (1957:9): [True: 8.74k, False: 4.73k]
  ------------------
 1958|  8.74k|            pubKey->keyType = NSSLOWKEYECKey;
 1959|  8.74k|            crv = sftk_Attribute2SSecItem(arena,
 1960|  8.74k|                                          &pubKey->u.ec.ecParams.DEREncoding,
 1961|  8.74k|                                          object, CKA_EC_PARAMS);
  ------------------
  |  |  602|  8.74k|#define CKA_EC_PARAMS 0x00000180UL
  ------------------
 1962|  8.74k|            if (crv != CKR_OK)
  ------------------
  |  | 1388|  8.74k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1962:17): [True: 0, False: 8.74k]
  ------------------
 1963|      0|                break;
 1964|       |
 1965|       |            /* Fill out the rest of the ecParams structure
 1966|       |             * based on the encoded params
 1967|       |             */
 1968|  8.74k|            if (EC_FillParams(arena, &pubKey->u.ec.ecParams.DEREncoding,
  ------------------
  |  Branch (1968:17): [True: 55, False: 8.69k]
  ------------------
 1969|  8.74k|                              &pubKey->u.ec.ecParams) != SECSuccess) {
 1970|     55|                crv = CKR_DOMAIN_PARAMS_INVALID;
  ------------------
  |  | 1508|     55|#define CKR_DOMAIN_PARAMS_INVALID 0x00000130UL
  ------------------
 1971|     55|                break;
 1972|     55|            }
 1973|       |
 1974|  8.69k|            crv = sftk_Attribute2SSecItem(arena, &pubKey->u.ec.publicValue,
 1975|  8.69k|                                          object, CKA_EC_POINT);
  ------------------
  |  |  604|  8.69k|#define CKA_EC_POINT 0x00000181UL
  ------------------
 1976|  8.69k|            if (crv == CKR_OK) {
  ------------------
  |  | 1388|  8.69k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1976:17): [True: 8.69k, False: 0]
  ------------------
 1977|  8.69k|                unsigned int keyLen = EC_GetPointSize(&pubKey->u.ec.ecParams);
 1978|       |
 1979|       |                /* special note: We can't just use the first byte to distinguish
 1980|       |                 * between EC_POINT_FORM_UNCOMPRESSED and SEC_ASN1_OCTET_STRING.
 1981|       |                 * Both are 0x04. */
 1982|       |
 1983|       |                /* Handle the non-DER encoded case.
 1984|       |                 * Some curves are always pressumed to be non-DER.
 1985|       |                 */
 1986|  8.69k|                if (pubKey->u.ec.ecParams.type != ec_params_named ||
  ------------------
  |  Branch (1986:21): [True: 8.01k, False: 681]
  ------------------
 1987|  8.69k|                    (pubKey->u.ec.publicValue.len == keyLen &&
  ------------------
  |  Branch (1987:22): [True: 0, False: 681]
  ------------------
 1988|  8.01k|                     pubKey->u.ec.publicValue.data[0] == EC_POINT_FORM_UNCOMPRESSED)) {
  ------------------
  |  |   92|      0|#define EC_POINT_FORM_UNCOMPRESSED 0x04
  ------------------
  |  Branch (1988:22): [True: 0, False: 0]
  ------------------
 1989|  8.01k|                    break; /* key was not DER encoded, no need to unwrap */
 1990|  8.01k|                }
 1991|       |
 1992|       |                /* handle the encoded case */
 1993|    681|                if ((pubKey->u.ec.publicValue.data[0] == SEC_ASN1_OCTET_STRING) &&
  ------------------
  |  |   80|    681|#define SEC_ASN1_OCTET_STRING 0x04
  ------------------
  |  Branch (1993:21): [True: 681, False: 0]
  ------------------
 1994|    681|                    pubKey->u.ec.publicValue.len > keyLen) {
  ------------------
  |  Branch (1994:21): [True: 678, False: 3]
  ------------------
 1995|    678|                    SECItem publicValue;
 1996|    678|                    SECStatus rv;
 1997|       |
 1998|    678|                    rv = SEC_QuickDERDecodeItem(arena, &publicValue,
  ------------------
  |  |  102|    678|#define SEC_QuickDERDecodeItem SEC_QuickDERDecodeItem_Util
  ------------------
 1999|    678|                                                SEC_ASN1_GET(SEC_OctetStringTemplate),
  ------------------
  |  |  188|    678|#define SEC_ASN1_GET(x) x
  ------------------
 2000|    678|                                                &pubKey->u.ec.publicValue);
 2001|       |                    /* nope, didn't decode correctly */
 2002|    678|                    if ((rv != SECSuccess) || (publicValue.len != keyLen)) {
  ------------------
  |  Branch (2002:25): [True: 0, False: 678]
  |  Branch (2002:47): [True: 3, False: 675]
  ------------------
 2003|      3|                        crv = CKR_ATTRIBUTE_VALUE_INVALID;
  ------------------
  |  | 1409|      3|#define CKR_ATTRIBUTE_VALUE_INVALID 0x00000013UL
  ------------------
 2004|      3|                        break;
 2005|      3|                    }
 2006|       |                    /* we don't handle compressed points except in the case of ECCurve25519 */
 2007|    675|                    if (publicValue.data[0] != EC_POINT_FORM_UNCOMPRESSED) {
  ------------------
  |  |   92|    675|#define EC_POINT_FORM_UNCOMPRESSED 0x04
  ------------------
  |  Branch (2007:25): [True: 6, False: 669]
  ------------------
 2008|      6|                        crv = CKR_ATTRIBUTE_VALUE_INVALID;
  ------------------
  |  | 1409|      6|#define CKR_ATTRIBUTE_VALUE_INVALID 0x00000013UL
  ------------------
 2009|      6|                        break;
 2010|      6|                    }
 2011|       |                    /* replace our previous with the decoded key */
 2012|    669|                    pubKey->u.ec.publicValue = publicValue;
 2013|    669|                    break;
 2014|    675|                }
 2015|      3|                crv = CKR_ATTRIBUTE_VALUE_INVALID;
  ------------------
  |  | 1409|      3|#define CKR_ATTRIBUTE_VALUE_INVALID 0x00000013UL
  ------------------
 2016|      3|            }
 2017|      3|            break;
 2018|     40|        case CKK_NSS_KYBER:
  ------------------
  |  |   58|     40|#define CKK_NSS_KYBER (CKK_NSS + 5)
  |  |  ------------------
  |  |  |  |   49|     40|#define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  458|     40|#define CKK_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     40|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (2018:9): [True: 40, False: 13.4k]
  ------------------
 2019|     40|        case CKK_NSS_ML_KEM:
  ------------------
  |  |   59|     40|#define CKK_NSS_ML_KEM (CKK_NSS + 6)
  |  |  ------------------
  |  |  |  |   49|     40|#define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  458|     40|#define CKK_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     40|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (2019:9): [True: 0, False: 13.4k]
  ------------------
 2020|     40|            crv = CKR_OK;
  ------------------
  |  | 1388|     40|#define CKR_OK 0x00000000UL
  ------------------
 2021|     40|            break;
 2022|      0|        default:
  ------------------
  |  Branch (2022:9): [True: 0, False: 13.4k]
  ------------------
 2023|      0|            crv = CKR_KEY_TYPE_INCONSISTENT;
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
 2024|      0|            break;
 2025|  13.4k|    }
 2026|  13.4k|    *crvp = crv;
 2027|  13.4k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  13.4k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (2027:9): [True: 67, False: 13.4k]
  ------------------
 2028|     67|        PORT_FreeArena(arena, PR_TRUE);
  ------------------
  |  |   61|     67|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                      PORT_FreeArena(arena, PR_TRUE);
  ------------------
  |  |  437|     67|#define PR_TRUE 1
  ------------------
 2029|     67|        return NULL;
 2030|     67|    }
 2031|       |
 2032|  13.4k|    object->objectInfo = pubKey;
 2033|  13.4k|    object->infoFree = SFTKFree_nsslowkey_DestroyPublicKey;
 2034|  13.4k|    return pubKey;
 2035|  13.4k|}
sftk_GetPrivKey:
 2377|  2.13k|{
 2378|  2.13k|    NSSLOWKEYPrivateKey *priv = NULL;
 2379|       |
 2380|  2.13k|    if (object->objclass != CKO_PRIVATE_KEY) {
  ------------------
  |  |  328|  2.13k|#define CKO_PRIVATE_KEY 0x00000003UL
  ------------------
  |  Branch (2380:9): [True: 0, False: 2.13k]
  ------------------
 2381|      0|        *crvp = CKR_KEY_TYPE_INCONSISTENT;
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
 2382|      0|        return NULL;
 2383|      0|    }
 2384|  2.13k|    if (object->objectInfo) {
  ------------------
  |  Branch (2384:9): [True: 2.13k, False: 0]
  ------------------
 2385|  2.13k|        *crvp = CKR_OK;
  ------------------
  |  | 1388|  2.13k|#define CKR_OK 0x00000000UL
  ------------------
 2386|  2.13k|        return (NSSLOWKEYPrivateKey *)object->objectInfo;
 2387|  2.13k|    }
 2388|       |
 2389|      0|    priv = sftk_mkPrivKey(object, key_type, crvp);
 2390|      0|    object->objectInfo = priv;
 2391|      0|    object->infoFree = SFTKFree_nsslowkey_DestroyPrivateKey;
 2392|      0|    return priv;
 2393|  2.13k|}
sftk_FormatDESKey:
 2523|  1.09k|{
 2524|  1.09k|    int i;
 2525|       |
 2526|       |    /* format the des key */
 2527|  26.0k|    for (i = 0; i < length; i++) {
  ------------------
  |  Branch (2527:17): [True: 24.9k, False: 1.09k]
  ------------------
 2528|  24.9k|        key[i] = parityTable[key[i] >> 1];
 2529|  24.9k|    }
 2530|  1.09k|}
NSC_GetInterface:
 2642|      2|{
 2643|      2|    int i;
 2644|      5|    for (i = 0; i < NSS_INTERFACE_COUNT; i++) {
  ------------------
  |  |  191|      5|#define NSS_INTERFACE_COUNT 5
  ------------------
  |  Branch (2644:17): [True: 5, False: 0]
  ------------------
 2645|      5|        CK_INTERFACE_PTR interface = &nss_interfaces[i];
 2646|      5|        if (pInterfaceName && PORT_Strcmp((char *)pInterfaceName, (char *)interface->pInterfaceName) != 0) {
  ------------------
  |  |  188|      5|#define PORT_Strcmp strcmp
  ------------------
  |  Branch (2646:13): [True: 5, False: 0]
  |  Branch (2646:31): [True: 3, False: 2]
  ------------------
 2647|      3|            continue;
 2648|      3|        }
 2649|      2|        if (pVersion && PORT_Memcmp(pVersion, (CK_VERSION *)interface->pFunctionList, sizeof(CK_VERSION)) != 0) {
  ------------------
  |  |  179|      0|#define PORT_Memcmp memcmp
  ------------------
  |  Branch (2649:13): [True: 0, False: 2]
  |  Branch (2649:25): [True: 0, False: 0]
  ------------------
 2650|      0|            continue;
 2651|      0|        }
 2652|      2|        if (flags & ((interface->flags & flags) != flags)) {
  ------------------
  |  Branch (2652:13): [True: 0, False: 2]
  ------------------
 2653|      0|            continue;
 2654|      0|        }
 2655|      2|        *ppInterface = interface;
 2656|      2|        return CKR_OK;
  ------------------
  |  | 1388|      2|#define CKR_OK 0x00000000UL
  ------------------
 2657|      2|    }
 2658|      0|    return CKR_ARGUMENTS_BAD;
  ------------------
  |  | 1401|      0|#define CKR_ARGUMENTS_BAD 0x00000007UL
  ------------------
 2659|      2|}
sftk_getDefTokName:
 2689|      2|{
 2690|      2|    static char buf[33];
 2691|       |
 2692|      2|    switch (slotID) {
 2693|      1|        case NETSCAPE_SLOT_ID:
  ------------------
  |  |  498|      1|#define NETSCAPE_SLOT_ID 1
  ------------------
  |  Branch (2693:9): [True: 1, False: 1]
  ------------------
 2694|      1|            return "NSS Generic Crypto Services     ";
 2695|      1|        case PRIVATE_KEY_SLOT_ID:
  ------------------
  |  |  499|      1|#define PRIVATE_KEY_SLOT_ID 2
  ------------------
  |  Branch (2695:9): [True: 1, False: 1]
  ------------------
 2696|      1|            return "NSS Certificate DB              ";
 2697|      0|        case FIPS_SLOT_ID:
  ------------------
  |  |  500|      0|#define FIPS_SLOT_ID 3
  ------------------
  |  Branch (2697:9): [True: 0, False: 2]
  ------------------
 2698|      0|            return "NSS FIPS 140-2 Certificate DB   ";
 2699|      0|        default:
  ------------------
  |  Branch (2699:9): [True: 0, False: 2]
  ------------------
 2700|      0|            break;
 2701|      2|    }
 2702|      0|    snprintf(buf, sizeof(buf), "NSS Application Token %08x  ", (unsigned int)slotID);
 2703|      0|    return buf;
 2704|      2|}
sftk_getDefSlotName:
 2708|      2|{
 2709|      2|    static char buf[65];
 2710|       |
 2711|      2|    switch (slotID) {
 2712|      1|        case NETSCAPE_SLOT_ID:
  ------------------
  |  |  498|      1|#define NETSCAPE_SLOT_ID 1
  ------------------
  |  Branch (2712:9): [True: 1, False: 1]
  ------------------
 2713|      1|            return "NSS Internal Cryptographic Services                             ";
 2714|      1|        case PRIVATE_KEY_SLOT_ID:
  ------------------
  |  |  499|      1|#define PRIVATE_KEY_SLOT_ID 2
  ------------------
  |  Branch (2714:9): [True: 1, False: 1]
  ------------------
 2715|      1|            return "NSS User Private Key and Certificate Services                   ";
 2716|      0|        case FIPS_SLOT_ID:
  ------------------
  |  |  500|      0|#define FIPS_SLOT_ID 3
  ------------------
  |  Branch (2716:9): [True: 0, False: 2]
  ------------------
 2717|      0|            return "NSS FIPS 140-2 User Private Key Services                        ";
 2718|      0|        default:
  ------------------
  |  Branch (2718:9): [True: 0, False: 2]
  ------------------
 2719|      0|            break;
 2720|      2|    }
 2721|      0|    snprintf(buf, sizeof(buf),
 2722|      0|             "NSS Application Slot %08x                                   ",
 2723|      0|             (unsigned int)slotID);
 2724|      0|    return buf;
 2725|      2|}
sftk_SlotFromID:
 2747|  1.22M|{
 2748|  1.22M|    SFTKSlot *slot;
 2749|  1.22M|    unsigned int index = sftk_GetModuleIndex(slotID);
 2750|       |
 2751|  1.22M|    if (nscSlotHashTable[index] == NULL)
  ------------------
  |  Branch (2751:9): [True: 0, False: 1.22M]
  ------------------
 2752|      0|        return NULL;
 2753|  1.22M|    slot = (SFTKSlot *)PL_HashTableLookupConst(nscSlotHashTable[index],
 2754|  1.22M|                                               (void *)(uintptr_t)slotID);
 2755|       |    /* cleared slots shouldn't 'show up' */
 2756|  1.22M|    if (slot && !all && !slot->present)
  ------------------
  |  Branch (2756:9): [True: 1.22M, False: 0]
  |  Branch (2756:17): [True: 1.22M, False: 2]
  |  Branch (2756:25): [True: 0, False: 1.22M]
  ------------------
 2757|      0|        slot = NULL;
 2758|  1.22M|    return slot;
 2759|  1.22M|}
sftk_SlotIDFromSessionHandle:
 2763|  1.07M|{
 2764|  1.07M|    CK_ULONG slotIDIndex = (handle >> 24) & 0x7f;
 2765|  1.07M|    CK_ULONG moduleIndex = (handle >> 31) & 1;
 2766|       |
 2767|  1.07M|    if (slotIDIndex >= nscSlotCount[moduleIndex]) {
  ------------------
  |  Branch (2767:9): [True: 0, False: 1.07M]
  ------------------
 2768|      0|        return (CK_SLOT_ID)-1;
 2769|      0|    }
 2770|  1.07M|    return nscSlotList[moduleIndex][slotIDIndex];
 2771|  1.07M|}
sftk_SlotFromSessionHandle:
 2775|  1.07M|{
 2776|  1.07M|    return sftk_SlotFromID(sftk_SlotIDFromSessionHandle(handle), PR_FALSE);
  ------------------
  |  |  438|  1.07M|#define PR_FALSE 0
  ------------------
 2777|  1.07M|}
SFTK_SlotReInit:
 2861|      2|{
 2862|      2|    PRBool needLogin = !params->noKeyDB;
 2863|      2|    CK_RV crv;
 2864|       |
 2865|      2|    slot->hasTokens = PR_FALSE;
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
 2866|      2|    slot->sessionIDConflict = 0;
 2867|      2|    slot->sessionCount = 0;
 2868|      2|    slot->rwSessionCount = 0;
 2869|      2|    slot->needLogin = PR_FALSE;
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
 2870|      2|    slot->isLoggedIn = PR_FALSE;
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
 2871|      2|    slot->ssoLoggedIn = PR_FALSE;
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
 2872|      2|    slot->DB_loaded = PR_FALSE;
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
 2873|      2|    slot->certDB = NULL;
 2874|      2|    slot->keyDB = NULL;
 2875|      2|    slot->minimumPinLen = 0;
 2876|      2|    slot->readOnly = params->readOnly;
 2877|      2|    sftk_setStringName(params->tokdes ? params->tokdes : sftk_getDefTokName(slot->slotID), slot->tokDescription,
  ------------------
  |  Branch (2877:24): [True: 0, False: 2]
  ------------------
 2878|      2|                       sizeof(slot->tokDescription), PR_TRUE);
  ------------------
  |  |  437|      2|#define PR_TRUE 1
  ------------------
 2879|      2|    sftk_setStringName(params->updtokdes ? params->updtokdes : " ",
  ------------------
  |  Branch (2879:24): [True: 1, False: 1]
  ------------------
 2880|      2|                       slot->updateTokDescription,
 2881|      2|                       sizeof(slot->updateTokDescription), PR_TRUE);
  ------------------
  |  |  437|      2|#define PR_TRUE 1
  ------------------
 2882|       |
 2883|      2|    if ((!params->noCertDB) || (!params->noKeyDB)) {
  ------------------
  |  Branch (2883:9): [True: 0, False: 2]
  |  Branch (2883:32): [True: 0, False: 2]
  ------------------
 2884|      0|        SFTKDBHandle *certHandle = NULL;
 2885|      0|        SFTKDBHandle *keyHandle = NULL;
 2886|      0|        crv = sftk_DBInit(params->configdir ? params->configdir : configdir,
  ------------------
  |  Branch (2886:27): [True: 0, False: 0]
  ------------------
 2887|      0|                          params->certPrefix, params->keyPrefix,
 2888|      0|                          params->updatedir ? params->updatedir : updatedir,
  ------------------
  |  Branch (2888:27): [True: 0, False: 0]
  ------------------
 2889|      0|                          params->updCertPrefix, params->updKeyPrefix,
 2890|      0|                          params->updateID ? params->updateID : updateID,
  ------------------
  |  Branch (2890:27): [True: 0, False: 0]
  ------------------
 2891|      0|                          params->readOnly, params->noCertDB, params->noKeyDB,
 2892|      0|                          params->forceOpen,
 2893|      0|                          moduleIndex == NSC_FIPS_MODULE,
  ------------------
  |  |   54|      0|#define NSC_FIPS_MODULE 1
  ------------------
 2894|      0|                          &certHandle, &keyHandle);
 2895|      0|        if (crv != CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (2895:13): [True: 0, False: 0]
  ------------------
 2896|      0|            goto loser;
 2897|      0|        }
 2898|       |
 2899|      0|        slot->certDB = certHandle;
 2900|      0|        slot->keyDB = keyHandle;
 2901|      0|    }
 2902|      2|    if (needLogin) {
  ------------------
  |  Branch (2902:9): [True: 0, False: 2]
  ------------------
 2903|       |        /* if the data base is initialized with a null password,remember that */
 2904|      0|        slot->needLogin =
 2905|      0|            (PRBool)!sftk_hasNullPassword(slot, slot->keyDB);
 2906|      0|        if ((params->minPW >= 0) && (params->minPW <= SFTK_MAX_PIN)) {
  ------------------
  |  |  493|      0|#define SFTK_MAX_PIN 500
  ------------------
  |  Branch (2906:13): [True: 0, False: 0]
  |  Branch (2906:37): [True: 0, False: 0]
  ------------------
 2907|      0|            slot->minimumPinLen = params->minPW;
 2908|      0|        }
 2909|      0|        if ((slot->minimumPinLen == 0) && (params->pwRequired)) {
  ------------------
  |  Branch (2909:13): [True: 0, False: 0]
  |  Branch (2909:43): [True: 0, False: 0]
  ------------------
 2910|      0|            slot->minimumPinLen = 1;
 2911|      0|        }
 2912|       |        /* Make sure the pin len is set to the Minimum allowed value for fips
 2913|       |         * when in FIPS mode. NOTE: we don't set it if the database has not
 2914|       |         * been initialized yet so that we can init into level1 mode if needed
 2915|       |         */
 2916|      0|        if ((sftkdb_HasPasswordSet(slot->keyDB) == SECSuccess) &&
  ------------------
  |  Branch (2916:13): [True: 0, False: 0]
  ------------------
 2917|      0|            (moduleIndex == NSC_FIPS_MODULE) &&
  ------------------
  |  |   54|      0|#define NSC_FIPS_MODULE 1
  ------------------
  |  Branch (2917:13): [True: 0, False: 0]
  ------------------
 2918|      0|            (slot->minimumPinLen < FIPS_MIN_PIN)) {
  ------------------
  |  |  495|      0|#define FIPS_MIN_PIN 7
  ------------------
  |  Branch (2918:13): [True: 0, False: 0]
  ------------------
 2919|      0|            slot->minimumPinLen = FIPS_MIN_PIN;
  ------------------
  |  |  495|      0|#define FIPS_MIN_PIN 7
  ------------------
 2920|      0|        }
 2921|      0|    }
 2922|       |
 2923|      2|    slot->present = PR_TRUE;
  ------------------
  |  |  437|      2|#define PR_TRUE 1
  ------------------
 2924|      2|    return CKR_OK;
  ------------------
  |  | 1388|      2|#define CKR_OK 0x00000000UL
  ------------------
 2925|       |
 2926|      0|loser:
 2927|      0|    SFTK_ShutdownSlot(slot);
 2928|      0|    return crv;
 2929|      2|}
SFTK_SlotInit:
 2937|      2|{
 2938|      2|    unsigned int i;
 2939|      2|    CK_SLOT_ID slotID = params->slotID;
 2940|      2|    SFTKSlot *slot;
 2941|      2|    CK_RV crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      2|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 2942|       |
 2943|       |    /*
 2944|       |     * first we initialize everything that is 'permanent' with this slot.
 2945|       |     * that is everything we aren't going to shutdown if we close this slot
 2946|       |     * and open it up again with different databases */
 2947|       |
 2948|      2|    slot = PORT_ZNew(SFTKSlot);
  ------------------
  |  |  148|      2|#define PORT_ZNew(type) (type *)PORT_ZAlloc(sizeof(type))
  |  |  ------------------
  |  |  |  |   72|      2|#define PORT_ZAlloc PORT_ZAlloc_Util
  |  |  ------------------
  ------------------
 2949|       |
 2950|      2|    if (slot == NULL) {
  ------------------
  |  Branch (2950:9): [True: 0, False: 2]
  ------------------
 2951|      0|        return CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 2952|      0|    }
 2953|       |
 2954|      2|    slot->optimizeSpace = params->optimizeSpace;
 2955|      2|    if (slot->optimizeSpace) {
  ------------------
  |  Branch (2955:9): [True: 2, False: 0]
  ------------------
 2956|      2|        slot->sessObjHashSize = SPACE_SESSION_OBJECT_HASH_SIZE;
  ------------------
  |  |   66|      2|#define SPACE_SESSION_OBJECT_HASH_SIZE 32
  ------------------
 2957|      2|        slot->sessHashSize = SPACE_SESSION_HASH_SIZE;
  ------------------
  |  |   67|      2|#define SPACE_SESSION_HASH_SIZE 32
  ------------------
 2958|      2|        slot->numSessionLocks = 1;
 2959|      2|    } else {
 2960|      0|        slot->sessObjHashSize = TIME_SESSION_OBJECT_HASH_SIZE;
  ------------------
  |  |   69|      0|#define TIME_SESSION_OBJECT_HASH_SIZE 1024
  ------------------
 2961|      0|        slot->sessHashSize = TIME_SESSION_HASH_SIZE;
  ------------------
  |  |   70|      0|#define TIME_SESSION_HASH_SIZE 1024
  ------------------
 2962|      0|        slot->numSessionLocks = slot->sessHashSize / BUCKETS_PER_SESSION_LOCK;
  ------------------
  |  |   93|      0|#define BUCKETS_PER_SESSION_LOCK (1 << (LOG2_BUCKETS_PER_SESSION_LOCK))
  |  |  ------------------
  |  |  |  |   92|      0|#define LOG2_BUCKETS_PER_SESSION_LOCK 1
  |  |  ------------------
  ------------------
 2963|      0|    }
 2964|      2|    slot->sessionLockMask = slot->numSessionLocks - 1;
 2965|       |
 2966|      2|    slot->slotLock = PZ_NewLock(nssILockSession);
  ------------------
  |  |  243|      2|#define PZ_NewLock(t) PR_NewLock()
  ------------------
 2967|      2|    if (slot->slotLock == NULL)
  ------------------
  |  Branch (2967:9): [True: 0, False: 2]
  ------------------
 2968|      0|        goto mem_loser;
 2969|      2|    slot->sessionLock = PORT_ZNewArray(PZLock *, slot->numSessionLocks);
  ------------------
  |  |  159|      2|    (type *)PORT_ZAlloc(sizeof(type) * (num))
  |  |  ------------------
  |  |  |  |   72|      2|#define PORT_ZAlloc PORT_ZAlloc_Util
  |  |  ------------------
  ------------------
 2970|      2|    if (slot->sessionLock == NULL)
  ------------------
  |  Branch (2970:9): [True: 0, False: 2]
  ------------------
 2971|      0|        goto mem_loser;
 2972|      4|    for (i = 0; i < slot->numSessionLocks; i++) {
  ------------------
  |  Branch (2972:17): [True: 2, False: 2]
  ------------------
 2973|      2|        slot->sessionLock[i] = PZ_NewLock(nssILockSession);
  ------------------
  |  |  243|      2|#define PZ_NewLock(t) PR_NewLock()
  ------------------
 2974|      2|        if (slot->sessionLock[i] == NULL)
  ------------------
  |  Branch (2974:13): [True: 0, False: 2]
  ------------------
 2975|      0|            goto mem_loser;
 2976|      2|    }
 2977|      2|    slot->objectLock = PZ_NewLock(nssILockObject);
  ------------------
  |  |  243|      2|#define PZ_NewLock(t) PR_NewLock()
  ------------------
 2978|      2|    if (slot->objectLock == NULL)
  ------------------
  |  Branch (2978:9): [True: 0, False: 2]
  ------------------
 2979|      0|        goto mem_loser;
 2980|      2|    slot->pwCheckLock = PR_NewLock();
 2981|      2|    if (slot->pwCheckLock == NULL)
  ------------------
  |  Branch (2981:9): [True: 0, False: 2]
  ------------------
 2982|      0|        goto mem_loser;
 2983|      2|    slot->head = PORT_ZNewArray(SFTKSession *, slot->sessHashSize);
  ------------------
  |  |  159|      2|    (type *)PORT_ZAlloc(sizeof(type) * (num))
  |  |  ------------------
  |  |  |  |   72|      2|#define PORT_ZAlloc PORT_ZAlloc_Util
  |  |  ------------------
  ------------------
 2984|      2|    if (slot->head == NULL)
  ------------------
  |  Branch (2984:9): [True: 0, False: 2]
  ------------------
 2985|      0|        goto mem_loser;
 2986|      2|    slot->sessObjHashTable = PORT_ZNewArray(SFTKObject *, slot->sessObjHashSize);
  ------------------
  |  |  159|      2|    (type *)PORT_ZAlloc(sizeof(type) * (num))
  |  |  ------------------
  |  |  |  |   72|      2|#define PORT_ZAlloc PORT_ZAlloc_Util
  |  |  ------------------
  ------------------
 2987|      2|    if (slot->sessObjHashTable == NULL)
  ------------------
  |  Branch (2987:9): [True: 0, False: 2]
  ------------------
 2988|      0|        goto mem_loser;
 2989|      2|    slot->tokObjHashTable = PL_NewHashTable(64, sftk_HashNumber, PL_CompareValues,
 2990|      2|                                            SECITEM_HashCompare, NULL, 0);
 2991|      2|    if (slot->tokObjHashTable == NULL)
  ------------------
  |  Branch (2991:9): [True: 0, False: 2]
  ------------------
 2992|      0|        goto mem_loser;
 2993|       |
 2994|      2|    slot->sessionIDCount = 0;
 2995|      2|    slot->sessionObjectHandleCount = NSC_MIN_SESSION_OBJECT_HANDLE;
  ------------------
  |  |   52|      2|#define NSC_MIN_SESSION_OBJECT_HANDLE 1U
  ------------------
 2996|      2|    slot->slotID = slotID;
 2997|      2|    sftk_setStringName(params->slotdes ? params->slotdes : sftk_getDefSlotName(slotID), slot->slotDescription,
  ------------------
  |  Branch (2997:24): [True: 0, False: 2]
  ------------------
 2998|      2|                       sizeof(slot->slotDescription), PR_TRUE);
  ------------------
  |  |  437|      2|#define PR_TRUE 1
  ------------------
 2999|      2|    crv = sftk_InitSession(&slot->moduleObjects, slot, slotID, NULL, NULL,
 3000|      2|                           CKF_SERIAL_SESSION);
  ------------------
  |  |  303|      2|#define CKF_SERIAL_SESSION 0x00000004UL /* no parallel */
  ------------------
 3001|      2|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|      2|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (3001:9): [True: 0, False: 2]
  ------------------
 3002|      0|        goto loser;
 3003|      0|    }
 3004|       |
 3005|       |    /* call the reinit code to set everything that changes between token
 3006|       |     * init calls */
 3007|      2|    crv = SFTK_SlotReInit(slot, configdir, updatedir, updateID,
 3008|      2|                          params, moduleIndex);
 3009|      2|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|      2|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (3009:9): [True: 0, False: 2]
  ------------------
 3010|      0|        goto loser;
 3011|      0|    }
 3012|      2|    if (sftk_isFIPS(slotID)) {
  ------------------
  |  |  506|      2|    (((id) == FIPS_SLOT_ID) || ((id) >= SFTK_MIN_FIPS_USER_SLOT_ID))
  |  |  ------------------
  |  |  |  |  500|      2|#define FIPS_SLOT_ID 3
  |  |  ------------------
  |  |                   (((id) == FIPS_SLOT_ID) || ((id) >= SFTK_MIN_FIPS_USER_SLOT_ID))
  |  |  ------------------
  |  |  |  |  567|      2|#define SFTK_MIN_FIPS_USER_SLOT_ID 101
  |  |  ------------------
  |  |  |  Branch (506:6): [True: 0, False: 2]
  |  |  |  Branch (506:32): [True: 0, False: 2]
  |  |  ------------------
  ------------------
 3013|      0|        crv = sftk_CreateValidationObjects(slot);
 3014|      0|        if (crv != CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (3014:13): [True: 0, False: 0]
  ------------------
 3015|      0|            goto loser;
 3016|      0|        }
 3017|      0|    }
 3018|      2|    crv = sftk_RegisterSlot(slot, moduleIndex);
 3019|      2|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|      2|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (3019:9): [True: 0, False: 2]
  ------------------
 3020|      0|        goto loser;
 3021|      0|    }
 3022|      2|    return CKR_OK;
  ------------------
  |  | 1388|      2|#define CKR_OK 0x00000000UL
  ------------------
 3023|       |
 3024|      0|mem_loser:
 3025|      0|    crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 3026|      0|loser:
 3027|      0|    SFTK_DestroySlotData(slot);
 3028|      0|    return crv;
 3029|      0|}
sftk_CloseAllSessions:
 3033|      6|{
 3034|      6|    SFTKSession *session;
 3035|      6|    unsigned int i;
 3036|      6|    SFTKDBHandle *handle;
 3037|       |
 3038|       |    /* first log out the card */
 3039|       |    /* special case - if we are in a middle of upgrade, we want to close the
 3040|       |     * sessions to fake a token removal to tell the upper level code we have
 3041|       |     * switched from one database to another, but we don't want to
 3042|       |     * explicity logout in case we can continue the upgrade with the
 3043|       |     * existing password if possible.
 3044|       |     */
 3045|      6|    if (logout) {
  ------------------
  |  Branch (3045:9): [True: 6, False: 0]
  ------------------
 3046|      6|        handle = sftk_getKeyDB(slot);
 3047|      6|        SKIP_AFTER_FORK(PZ_Lock(slot->slotLock));
  ------------------
  |  |  256|      6|#define SKIP_AFTER_FORK(x) x
  ------------------
 3048|      6|        slot->isLoggedIn = PR_FALSE;
  ------------------
  |  |  438|      6|#define PR_FALSE 0
  ------------------
 3049|      6|        if (slot->needLogin && handle) {
  ------------------
  |  Branch (3049:13): [True: 0, False: 6]
  |  Branch (3049:32): [True: 0, False: 0]
  ------------------
 3050|      0|            sftkdb_ClearPassword(handle);
 3051|      0|        }
 3052|      6|        SKIP_AFTER_FORK(PZ_Unlock(slot->slotLock));
  ------------------
  |  |  256|      6|#define SKIP_AFTER_FORK(x) x
  ------------------
 3053|      6|        if (handle) {
  ------------------
  |  Branch (3053:13): [True: 0, False: 6]
  ------------------
 3054|      0|            sftk_freeDB(handle);
 3055|      0|        }
 3056|      6|    }
 3057|       |
 3058|       |    /* now close all the current sessions */
 3059|       |    /* NOTE: If you try to open new sessions before NSC_CloseAllSessions
 3060|       |     * completes, some of those new sessions may or may not be closed by
 3061|       |     * NSC_CloseAllSessions... but any session running when this code starts
 3062|       |     * will guarrenteed be close, and no session will be partially closed */
 3063|    198|    for (i = 0; i < slot->sessHashSize; i++) {
  ------------------
  |  Branch (3063:17): [True: 192, False: 6]
  ------------------
 3064|    192|        PZLock *lock = SFTK_SESSION_LOCK(slot, i);
  ------------------
  |  |  185|    192|#define PZLock PRLock
  ------------------
                      PZLock *lock = SFTK_SESSION_LOCK(slot, i);
  ------------------
  |  |  583|    192|    ((slot)->sessionLock[(handle) & (slot)->sessionLockMask])
  ------------------
 3065|    194|        do {
 3066|    194|            SKIP_AFTER_FORK(PZ_Lock(lock));
  ------------------
  |  |  256|    194|#define SKIP_AFTER_FORK(x) x
  ------------------
 3067|    194|            session = slot->head[i];
 3068|       |            /* hand deque */
 3069|       |            /* this duplicates function of NSC_close session functions, but
 3070|       |             * because we know that we are freeing all the sessions, we can
 3071|       |             * do more efficient processing */
 3072|    194|            if (session) {
  ------------------
  |  Branch (3072:17): [True: 2, False: 192]
  ------------------
 3073|      2|                slot->head[i] = session->next;
 3074|      2|                if (session->next)
  ------------------
  |  Branch (3074:21): [True: 0, False: 2]
  ------------------
 3075|      0|                    session->next->prev = NULL;
 3076|      2|                session->next = session->prev = NULL;
 3077|      2|                SKIP_AFTER_FORK(PZ_Unlock(lock));
  ------------------
  |  |  256|      2|#define SKIP_AFTER_FORK(x) x
  ------------------
 3078|      2|                SKIP_AFTER_FORK(PZ_Lock(slot->slotLock));
  ------------------
  |  |  256|      2|#define SKIP_AFTER_FORK(x) x
  ------------------
 3079|      2|                --slot->sessionCount;
 3080|      2|                SKIP_AFTER_FORK(PZ_Unlock(slot->slotLock));
  ------------------
  |  |  256|      2|#define SKIP_AFTER_FORK(x) x
  ------------------
 3081|      2|                if (session->info.flags & CKF_RW_SESSION) {
  ------------------
  |  |  302|      2|#define CKF_RW_SESSION 0x00000002UL     /* session is r/w */
  ------------------
  |  Branch (3081:21): [True: 0, False: 2]
  ------------------
 3082|      0|                    (void)PR_ATOMIC_DECREMENT(&slot->rwSessionCount);
  ------------------
  |  |  123|      0|#define PR_ATOMIC_DECREMENT(val) __sync_sub_and_fetch(val, 1)
  ------------------
 3083|      0|                }
 3084|    192|            } else {
 3085|    192|                SKIP_AFTER_FORK(PZ_Unlock(lock));
  ------------------
  |  |  256|    192|#define SKIP_AFTER_FORK(x) x
  ------------------
 3086|    192|            }
 3087|    194|            if (session) {
  ------------------
  |  Branch (3087:17): [True: 2, False: 192]
  ------------------
 3088|      2|                sftk_DestroySession(session);
 3089|      2|            }
 3090|    194|        } while (session != NULL);
  ------------------
  |  Branch (3090:18): [True: 2, False: 192]
  ------------------
 3091|    192|    }
 3092|      6|    return CKR_OK;
  ------------------
  |  | 1388|      6|#define CKR_OK 0x00000000UL
  ------------------
 3093|      6|}
SFTK_ShutdownSlot:
 3126|      2|{
 3127|       |    /* make sure no new PK11 calls work except C_GetSlotInfo */
 3128|      2|    slot->present = PR_FALSE;
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
 3129|       |
 3130|       |    /* close all outstanding sessions
 3131|       |     * the sessHashSize variable guarentees we have all the session
 3132|       |     * mechanism set up */
 3133|      2|    if (slot->head) {
  ------------------
  |  Branch (3133:9): [True: 2, False: 0]
  ------------------
 3134|      2|        sftk_CloseAllSessions(slot, PR_TRUE);
  ------------------
  |  |  437|      2|#define PR_TRUE 1
  ------------------
 3135|      2|    }
 3136|       |
 3137|       |    /* clear all objects.. session objects are cleared as a result of
 3138|       |     * closing all the sessions. We just need to clear the token object
 3139|       |     * cache. slot->tokObjHashTable guarentees we have the token
 3140|       |     * infrastructure set up. */
 3141|      2|    if (slot->tokObjHashTable) {
  ------------------
  |  Branch (3141:9): [True: 2, False: 0]
  ------------------
 3142|      2|        SFTK_ClearTokenKeyHashTable(slot);
 3143|      2|    }
 3144|       |
 3145|       |    /* clear the slot description for the next guy */
 3146|      2|    PORT_Memset(slot->tokDescription, 0, sizeof(slot->tokDescription));
  ------------------
  |  |  182|      2|#define PORT_Memset memset
  ------------------
 3147|       |
 3148|       |    /* now shut down the databases. */
 3149|      2|    sftk_DBShutdown(slot);
 3150|      2|    return CKR_OK;
  ------------------
  |  | 1388|      2|#define CKR_OK 0x00000000UL
  ------------------
 3151|      2|}
SFTK_DestroySlotData:
 3158|      2|{
 3159|      2|    unsigned int i;
 3160|       |
 3161|      2|    SFTK_ShutdownSlot(slot);
 3162|       |
 3163|      2|    sftk_ClearSession(&slot->moduleObjects);
 3164|       |
 3165|      2|    if (slot->tokObjHashTable) {
  ------------------
  |  Branch (3165:9): [True: 2, False: 0]
  ------------------
 3166|      2|        PL_HashTableDestroy(slot->tokObjHashTable);
 3167|      2|        slot->tokObjHashTable = NULL;
 3168|      2|    }
 3169|       |
 3170|      2|    if (slot->sessObjHashTable) {
  ------------------
  |  Branch (3170:9): [True: 2, False: 0]
  ------------------
 3171|      2|        PORT_Free(slot->sessObjHashTable);
  ------------------
  |  |   60|      2|#define PORT_Free PORT_Free_Util
  ------------------
 3172|      2|        slot->sessObjHashTable = NULL;
 3173|      2|    }
 3174|      2|    slot->sessObjHashSize = 0;
 3175|       |
 3176|      2|    if (slot->head) {
  ------------------
  |  Branch (3176:9): [True: 2, False: 0]
  ------------------
 3177|      2|        PORT_Free(slot->head);
  ------------------
  |  |   60|      2|#define PORT_Free PORT_Free_Util
  ------------------
 3178|      2|        slot->head = NULL;
 3179|      2|    }
 3180|      2|    slot->sessHashSize = 0;
 3181|       |
 3182|       |    /* OK everything has been disassembled, now we can finally get rid
 3183|       |     * of the locks */
 3184|      2|    SKIP_AFTER_FORK(PZ_DestroyLock(slot->slotLock));
  ------------------
  |  |  256|      2|#define SKIP_AFTER_FORK(x) x
  ------------------
 3185|      2|    slot->slotLock = NULL;
 3186|      2|    if (slot->sessionLock) {
  ------------------
  |  Branch (3186:9): [True: 2, False: 0]
  ------------------
 3187|      4|        for (i = 0; i < slot->numSessionLocks; i++) {
  ------------------
  |  Branch (3187:21): [True: 2, False: 2]
  ------------------
 3188|      2|            if (slot->sessionLock[i]) {
  ------------------
  |  Branch (3188:17): [True: 2, False: 0]
  ------------------
 3189|      2|                SKIP_AFTER_FORK(PZ_DestroyLock(slot->sessionLock[i]));
  ------------------
  |  |  256|      2|#define SKIP_AFTER_FORK(x) x
  ------------------
 3190|      2|                slot->sessionLock[i] = NULL;
 3191|      2|            }
 3192|      2|        }
 3193|      2|        PORT_Free(slot->sessionLock);
  ------------------
  |  |   60|      2|#define PORT_Free PORT_Free_Util
  ------------------
 3194|      2|        slot->sessionLock = NULL;
 3195|      2|    }
 3196|      2|    if (slot->objectLock) {
  ------------------
  |  Branch (3196:9): [True: 2, False: 0]
  ------------------
 3197|      2|        SKIP_AFTER_FORK(PZ_DestroyLock(slot->objectLock));
  ------------------
  |  |  256|      2|#define SKIP_AFTER_FORK(x) x
  ------------------
 3198|      2|        slot->objectLock = NULL;
 3199|      2|    }
 3200|      2|    if (slot->pwCheckLock) {
  ------------------
  |  Branch (3200:9): [True: 2, False: 0]
  ------------------
 3201|      2|        SKIP_AFTER_FORK(PR_DestroyLock(slot->pwCheckLock));
  ------------------
  |  |  256|      2|#define SKIP_AFTER_FORK(x) x
  ------------------
 3202|      2|        slot->pwCheckLock = NULL;
 3203|      2|    }
 3204|      2|    PORT_Free(slot);
  ------------------
  |  |   60|      2|#define PORT_Free PORT_Free_Util
  ------------------
 3205|      2|    return CKR_OK;
  ------------------
  |  | 1388|      2|#define CKR_OK 0x00000000UL
  ------------------
 3206|      2|}
NSC_ModuleDBFunc:
 3213|      2|{
 3214|      2|#ifdef NSS_DISABLE_DBM
 3215|      2|    return NSSUTIL_DoModuleDBFunction(function, parameters, args);
 3216|       |#else
 3217|       |    char *secmod = NULL;
 3218|       |    char *appName = NULL;
 3219|       |    char *filename = NULL;
 3220|       |    NSSDBType dbType = NSS_DB_TYPE_NONE;
 3221|       |    PRBool rw;
 3222|       |    static char *success = "Success";
 3223|       |    char **rvstr = NULL;
 3224|       |
 3225|       |    rvstr = NSSUTIL_DoModuleDBFunction(function, parameters, args);
 3226|       |    if (rvstr != NULL) {
 3227|       |        return rvstr;
 3228|       |    }
 3229|       |
 3230|       |    if (PORT_GetError() != SEC_ERROR_LEGACY_DATABASE) {
 3231|       |        return NULL;
 3232|       |    }
 3233|       |
 3234|       |    /* The legacy database uses the old dbm, which is only linked with the
 3235|       |     * legacy DB handler, which is only callable from softoken */
 3236|       |
 3237|       |    secmod = _NSSUTIL_GetSecmodName(parameters, &dbType, &appName,
 3238|       |                                    &filename, &rw);
 3239|       |
 3240|       |    switch (function) {
 3241|       |        case SECMOD_MODULE_DB_FUNCTION_FIND:
 3242|       |            if (secmod == NULL) {
 3243|       |                PORT_SetError(SEC_ERROR_INVALID_ARGS);
 3244|       |                goto loser;
 3245|       |            }
 3246|       |            if (rw && (dbType != NSS_DB_TYPE_LEGACY) &&
 3247|       |                (dbType != NSS_DB_TYPE_MULTIACCESS)) {
 3248|       |                /* if we get here, we are trying to update the local database */
 3249|       |                /* force data from the legacy DB */
 3250|       |                char *oldSecmod = NULL;
 3251|       |                char *oldAppName = NULL;
 3252|       |                char *oldFilename = NULL;
 3253|       |                PRBool oldrw;
 3254|       |                char **strings = NULL;
 3255|       |                int i;
 3256|       |
 3257|       |                dbType = NSS_DB_TYPE_LEGACY;
 3258|       |                oldSecmod = _NSSUTIL_GetSecmodName(parameters, &dbType, &oldAppName,
 3259|       |                                                   &oldFilename, &oldrw);
 3260|       |                strings = sftkdbCall_ReadSecmodDB(appName, oldFilename, oldSecmod,
 3261|       |                                                  (char *)parameters, oldrw);
 3262|       |                if (strings) {
 3263|       |                    /* write out the strings */
 3264|       |                    for (i = 0; strings[i]; i++) {
 3265|       |                        NSSUTIL_DoModuleDBFunction(SECMOD_MODULE_DB_FUNCTION_ADD,
 3266|       |                                                   parameters, strings[i]);
 3267|       |                    }
 3268|       |                    sftkdbCall_ReleaseSecmodDBData(oldAppName, oldFilename, oldSecmod,
 3269|       |                                                   (char **)strings, oldrw);
 3270|       |                } else {
 3271|       |                    /* write out a dummy record */
 3272|       |                    NSSUTIL_DoModuleDBFunction(SECMOD_MODULE_DB_FUNCTION_ADD,
 3273|       |                                               parameters, " ");
 3274|       |                }
 3275|       |                if (oldSecmod) {
 3276|       |                    PR_smprintf_free(oldSecmod);
 3277|       |                }
 3278|       |                if (oldAppName) {
 3279|       |                    PORT_Free(oldAppName);
 3280|       |                }
 3281|       |                if (oldFilename) {
 3282|       |                    PORT_Free(oldFilename);
 3283|       |                }
 3284|       |                rvstr = NSSUTIL_DoModuleDBFunction(function, parameters, args);
 3285|       |                break;
 3286|       |            }
 3287|       |            rvstr = sftkdbCall_ReadSecmodDB(appName, filename, secmod,
 3288|       |                                            (char *)parameters, rw);
 3289|       |            break;
 3290|       |        case SECMOD_MODULE_DB_FUNCTION_ADD:
 3291|       |            if (secmod == NULL) {
 3292|       |                PORT_SetError(SEC_ERROR_INVALID_ARGS);
 3293|       |                goto loser;
 3294|       |            }
 3295|       |            rvstr = (sftkdbCall_AddSecmodDB(appName, filename, secmod,
 3296|       |                                            (char *)args, rw) == SECSuccess)
 3297|       |                        ? &success
 3298|       |                        : NULL;
 3299|       |            break;
 3300|       |        case SECMOD_MODULE_DB_FUNCTION_DEL:
 3301|       |            if (secmod == NULL) {
 3302|       |                PORT_SetError(SEC_ERROR_INVALID_ARGS);
 3303|       |                goto loser;
 3304|       |            }
 3305|       |            rvstr = (sftkdbCall_DeleteSecmodDB(appName, filename, secmod,
 3306|       |                                               (char *)args, rw) == SECSuccess)
 3307|       |                        ? &success
 3308|       |                        : NULL;
 3309|       |            break;
 3310|       |        case SECMOD_MODULE_DB_FUNCTION_RELEASE:
 3311|       |            rvstr = (sftkdbCall_ReleaseSecmodDBData(appName, filename, secmod,
 3312|       |                                                    (char **)args, rw) == SECSuccess)
 3313|       |                        ? &success
 3314|       |                        : NULL;
 3315|       |            break;
 3316|       |    }
 3317|       |
 3318|       |loser:
 3319|       |    if (secmod)
 3320|       |        PR_smprintf_free(secmod);
 3321|       |    if (appName)
 3322|       |        PORT_Free(appName);
 3323|       |    if (filename)
 3324|       |        PORT_Free(filename);
 3325|       |    return rvstr;
 3326|       |#endif /* NSS_DISABLE_DBM */
 3327|      2|}
nsc_CommonInitialize:
 3467|      1|{
 3468|      1|    CK_RV crv = CKR_OK;
  ------------------
  |  | 1388|      1|#define CKR_OK 0x00000000UL
  ------------------
 3469|      1|    SECStatus rv;
 3470|      1|    CK_C_INITIALIZE_ARGS *init_args = (CK_C_INITIALIZE_ARGS *)pReserved;
 3471|      1|    PRBool destroy_freelist_on_error = PR_TRUE;
  ------------------
  |  |  437|      1|#define PR_TRUE 1
  ------------------
 3472|      1|    int i;
 3473|      1|    unsigned int moduleIndex = isFIPS ? NSC_FIPS_MODULE : NSC_NON_FIPS_MODULE;
  ------------------
  |  |   54|      0|#define NSC_FIPS_MODULE 1
  ------------------
                  unsigned int moduleIndex = isFIPS ? NSC_FIPS_MODULE : NSC_NON_FIPS_MODULE;
  ------------------
  |  |   55|      2|#define NSC_NON_FIPS_MODULE 0
  ------------------
  |  Branch (3473:32): [True: 0, False: 1]
  ------------------
 3474|       |
 3475|      1|    if (isFIPS) {
  ------------------
  |  Branch (3475:9): [True: 0, False: 1]
  ------------------
 3476|      0|        loginWaitTime = PR_SecondsToInterval(1);
 3477|      0|    }
 3478|       |
 3479|      1|    ENABLE_FORK_CHECK();
 3480|       |
 3481|      1|    sftk_PBELockInit();
 3482|       |
 3483|      1|    rv = SECOID_Init();
 3484|      1|    if (rv != SECSuccess) {
  ------------------
  |  Branch (3484:9): [True: 0, False: 1]
  ------------------
 3485|      0|        crv = CKR_DEVICE_ERROR;
  ------------------
  |  | 1416|      0|#define CKR_DEVICE_ERROR 0x00000030UL
  ------------------
 3486|      0|        return crv;
 3487|      0|    }
 3488|       |
 3489|      1|    rv = BL_Init(); /* initialize freebl engine */
 3490|      1|    if (rv != SECSuccess) {
  ------------------
  |  Branch (3490:9): [True: 0, False: 1]
  ------------------
 3491|      0|        crv = CKR_DEVICE_ERROR;
  ------------------
  |  | 1416|      0|#define CKR_DEVICE_ERROR 0x00000030UL
  ------------------
 3492|      0|        return crv;
 3493|      0|    }
 3494|       |
 3495|      1|    rv = RNG_RNGInit(); /* initialize random number generator */
 3496|      1|    if (rv != SECSuccess) {
  ------------------
  |  Branch (3496:9): [True: 0, False: 1]
  ------------------
 3497|      0|        crv = CKR_DEVICE_ERROR;
  ------------------
  |  | 1416|      0|#define CKR_DEVICE_ERROR 0x00000030UL
  ------------------
 3498|      0|        return crv;
 3499|      0|    }
 3500|       |
 3501|       |    /* NOTE:
 3502|       |     * we should be getting out mutexes from this list, not statically binding
 3503|       |     * them from NSPR. This should happen before we allow the internal to split
 3504|       |     * off from the rest on NSS.
 3505|       |     */
 3506|       |
 3507|       |    /* initialize the key and cert db's */
 3508|      1|    if (init_args && (!(init_args->flags & CKF_OS_LOCKING_OK))) {
  ------------------
  |  | 1627|      1|#define CKF_OS_LOCKING_OK 0x00000002UL
  ------------------
  |  Branch (3508:9): [True: 1, False: 0]
  |  Branch (3508:22): [True: 0, False: 1]
  ------------------
 3509|      0|        if (init_args->CreateMutex && init_args->DestroyMutex &&
  ------------------
  |  Branch (3509:13): [True: 0, False: 0]
  |  Branch (3509:39): [True: 0, False: 0]
  ------------------
 3510|      0|            init_args->LockMutex && init_args->UnlockMutex) {
  ------------------
  |  Branch (3510:13): [True: 0, False: 0]
  |  Branch (3510:37): [True: 0, False: 0]
  ------------------
 3511|       |            /* softoken always uses NSPR (ie. OS locking), and doesn't know how
 3512|       |             * to use the lock functions provided by the application.
 3513|       |             */
 3514|      0|            crv = CKR_CANT_LOCK;
  ------------------
  |  | 1404|      0|#define CKR_CANT_LOCK 0x0000000AUL
  ------------------
 3515|      0|            return crv;
 3516|      0|        }
 3517|      0|        if (init_args->CreateMutex || init_args->DestroyMutex ||
  ------------------
  |  Branch (3517:13): [True: 0, False: 0]
  |  Branch (3517:39): [True: 0, False: 0]
  ------------------
 3518|      0|            init_args->LockMutex || init_args->UnlockMutex) {
  ------------------
  |  Branch (3518:13): [True: 0, False: 0]
  |  Branch (3518:37): [True: 0, False: 0]
  ------------------
 3519|       |            /* only some of the lock functions were provided by the
 3520|       |             * application. This is invalid per PKCS#11 spec.
 3521|       |             */
 3522|      0|            crv = CKR_ARGUMENTS_BAD;
  ------------------
  |  | 1401|      0|#define CKR_ARGUMENTS_BAD 0x00000007UL
  ------------------
 3523|      0|            return crv;
 3524|      0|        }
 3525|      0|    }
 3526|       |
 3527|      1|    sftk_parameters paramStrings;
 3528|       |
 3529|       |    /* load and parse the library parameters */
 3530|      1|    crv = sftk_getParameters(init_args, isFIPS, &paramStrings);
 3531|      1|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|      1|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (3531:9): [True: 0, False: 1]
  ------------------
 3532|      0|        goto loser;
 3533|      0|    }
 3534|       |
 3535|      1|    crv = sftk_configure(paramStrings.man, paramStrings.libdes);
 3536|      1|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|      1|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (3536:9): [True: 0, False: 1]
  ------------------
 3537|      0|        goto loser;
 3538|      0|    }
 3539|       |
 3540|       |    /* if we have a peer already open, have him close his DB's so we
 3541|       |     * don't clobber each other. */
 3542|      1|    if ((isFIPS && nsc_init) || (!isFIPS && nsf_init)) {
  ------------------
  |  Branch (3542:10): [True: 0, False: 1]
  |  Branch (3542:20): [True: 0, False: 0]
  |  Branch (3542:34): [True: 1, False: 0]
  |  Branch (3542:45): [True: 0, False: 1]
  ------------------
 3543|      0|        sftk_closePeer(isFIPS);
 3544|      0|        if (sftk_audit_enabled) {
  ------------------
  |  Branch (3544:13): [True: 0, False: 0]
  ------------------
 3545|      0|            if (isFIPS && nsc_init) {
  ------------------
  |  Branch (3545:17): [True: 0, False: 0]
  |  Branch (3545:27): [True: 0, False: 0]
  ------------------
 3546|      0|                sftk_LogAuditMessage(NSS_AUDIT_INFO, NSS_AUDIT_FIPS_STATE,
 3547|      0|                                     "enabled FIPS mode");
 3548|      0|            } else {
 3549|      0|                sftk_LogAuditMessage(NSS_AUDIT_INFO, NSS_AUDIT_FIPS_STATE,
 3550|      0|                                     "disabled FIPS mode");
 3551|      0|            }
 3552|      0|        }
 3553|       |        /* if we have a peer open, we don't want to destroy the freelist
 3554|       |         * from under the peer if we fail, the free list will be
 3555|       |         * destroyed in that case when the C_Finalize is called for
 3556|       |         * the peer */
 3557|      0|        destroy_freelist_on_error = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 3558|      0|    }
 3559|       |    /* allow us to create objects in SFTK_SlotInit */
 3560|      1|    sftk_InitFreeLists();
 3561|       |
 3562|      3|    for (i = 0; i < paramStrings.token_count; i++) {
  ------------------
  |  Branch (3562:17): [True: 2, False: 1]
  ------------------
 3563|      2|        crv = SFTK_SlotInit(paramStrings.configdir,
 3564|      2|                            paramStrings.updatedir, paramStrings.updateID,
 3565|      2|                            &paramStrings.tokens[i], moduleIndex);
 3566|      2|        if (crv != CKR_OK) {
  ------------------
  |  | 1388|      2|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (3566:13): [True: 0, False: 2]
  ------------------
 3567|      0|            nscFreeAllSlots(moduleIndex);
 3568|      0|            break;
 3569|      0|        }
 3570|      2|    }
 3571|       |
 3572|      1|loser:
 3573|       |
 3574|      1|    sftk_freeParams(&paramStrings);
 3575|       |
 3576|      1|    if (destroy_freelist_on_error && (CKR_OK != crv)) {
  ------------------
  |  | 1388|      1|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (3576:9): [True: 1, False: 0]
  |  Branch (3576:38): [True: 0, False: 1]
  ------------------
 3577|       |        /* idempotent. If the list are already freed, this is a noop */
 3578|      0|        sftk_CleanupFreeLists();
 3579|      0|    }
 3580|       |
 3581|       |#ifndef NO_FORK_CHECK
 3582|       |    if (CKR_OK == crv) {
 3583|       |#if defined(CHECK_FORK_MIXED)
 3584|       |        /* Before Solaris 10, fork handlers are not unregistered at dlclose()
 3585|       |         * time. So, we only use pthread_atfork on Solaris 10 and later. For
 3586|       |         * earlier versions, we use PID checks.
 3587|       |         */
 3588|       |        char buf[200];
 3589|       |        int major = 0, minor = 0;
 3590|       |
 3591|       |        long rv = sysinfo(SI_RELEASE, buf, sizeof(buf));
 3592|       |        if (rv > 0 && rv < sizeof(buf)) {
 3593|       |            if (2 == sscanf(buf, "%d.%d", &major, &minor)) {
 3594|       |                /* Are we on Solaris 10 or greater ? */
 3595|       |                if (major > 5 || (5 == major && minor >= 10)) {
 3596|       |                    /* we are safe to use pthread_atfork */
 3597|       |                    usePthread_atfork = PR_TRUE;
 3598|       |                }
 3599|       |            }
 3600|       |        }
 3601|       |        if (usePthread_atfork) {
 3602|       |            pthread_atfork(NULL, NULL, ForkedChild);
 3603|       |        } else {
 3604|       |            myPid = getpid();
 3605|       |        }
 3606|       |
 3607|       |#elif defined(CHECK_FORK_PTHREAD)
 3608|       |        pthread_atfork(NULL, NULL, ForkedChild);
 3609|       |#elif defined(CHECK_FORK_GETPID)
 3610|       |        myPid = getpid();
 3611|       |#else
 3612|       |#error Incorrect fork check method.
 3613|       |#endif
 3614|       |    }
 3615|       |#endif
 3616|      1|    return crv;
 3617|      1|}
NSC_Initialize:
 3621|      1|{
 3622|      1|    CK_RV crv;
 3623|       |
 3624|      1|    sftk_ForkReset(pReserved, &crv);
 3625|       |
 3626|      1|    if (nsc_init) {
  ------------------
  |  Branch (3626:9): [True: 0, False: 1]
  ------------------
 3627|      0|        return CKR_CRYPTOKI_ALREADY_INITIALIZED;
  ------------------
  |  | 1521|      0|#define CKR_CRYPTOKI_ALREADY_INITIALIZED 0x00000191UL
  ------------------
 3628|      0|    }
 3629|      1|    crv = nsc_CommonInitialize(pReserved, PR_FALSE);
  ------------------
  |  |  438|      1|#define PR_FALSE 0
  ------------------
 3630|      1|    nsc_init = (PRBool)(crv == CKR_OK);
  ------------------
  |  | 1388|      1|#define CKR_OK 0x00000000UL
  ------------------
 3631|      1|    return crv;
 3632|      1|}
nsc_CommonFinalize:
 3638|      1|{
 3639|       |    /* propagate the fork status to freebl and util */
 3640|      1|    BL_SetForkState(parentForkedAfterC_Initialize);
 3641|      1|    UTIL_SetForkState(parentForkedAfterC_Initialize);
 3642|       |
 3643|      1|    nscFreeAllSlots(isFIPS ? NSC_FIPS_MODULE : NSC_NON_FIPS_MODULE);
  ------------------
  |  |   54|      0|#define NSC_FIPS_MODULE 1
  ------------------
                  nscFreeAllSlots(isFIPS ? NSC_FIPS_MODULE : NSC_NON_FIPS_MODULE);
  ------------------
  |  |   55|      2|#define NSC_NON_FIPS_MODULE 0
  ------------------
  |  Branch (3643:21): [True: 0, False: 1]
  ------------------
 3644|       |
 3645|       |    /* don't muck with the globals if our peer is still initialized */
 3646|      1|    if (isFIPS && nsc_init) {
  ------------------
  |  Branch (3646:9): [True: 0, False: 1]
  |  Branch (3646:19): [True: 0, False: 0]
  ------------------
 3647|      0|        return CKR_OK;
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
 3648|      0|    }
 3649|      1|    if (!isFIPS && nsf_init) {
  ------------------
  |  Branch (3649:9): [True: 1, False: 0]
  |  Branch (3649:20): [True: 0, False: 1]
  ------------------
 3650|      0|        return CKR_OK;
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
 3651|      0|    }
 3652|       |
 3653|      1|    sftk_CleanupFreeLists();
 3654|      1|    sftkdb_Shutdown();
 3655|       |
 3656|       |    /* This function does not discard all our previously aquired entropy. */
 3657|      1|    RNG_RNGShutdown();
 3658|       |
 3659|       |    /* tell freeBL to clean up after itself */
 3660|      1|    BL_Cleanup();
 3661|       |
 3662|       |    /* reset fork status in freebl. We must do this before BL_Unload so that
 3663|       |     * this call doesn't force freebl to be reloaded. */
 3664|      1|    BL_SetForkState(PR_FALSE);
  ------------------
  |  |  438|      1|#define PR_FALSE 0
  ------------------
 3665|       |
 3666|       |#ifndef NSS_STATIC_SOFTOKEN
 3667|       |    /* unload freeBL shared library from memory. This may only decrement the
 3668|       |     * OS refcount if it's been loaded multiple times, eg. by libssl */
 3669|       |    BL_Unload();
 3670|       |#endif
 3671|       |
 3672|       |    /* clean up the default OID table */
 3673|      1|    SECOID_Shutdown();
 3674|       |
 3675|      1|    sftk_PBELockShutdown();
 3676|       |
 3677|       |    /* reset fork status in util */
 3678|      1|    UTIL_SetForkState(PR_FALSE);
  ------------------
  |  |  438|      1|#define PR_FALSE 0
  ------------------
 3679|       |
 3680|      1|    nsc_init = PR_FALSE;
  ------------------
  |  |  438|      1|#define PR_FALSE 0
  ------------------
 3681|       |
 3682|       |#ifndef NO_FORK_CHECK
 3683|       |#ifdef CHECK_FORK_MIXED
 3684|       |    if (!usePthread_atfork) {
 3685|       |        myPid = 0; /* allow CHECK_FORK in the next softoken initialization to
 3686|       |                    * succeed */
 3687|       |    } else {
 3688|       |        forked = PR_FALSE; /* allow reinitialization */
 3689|       |    }
 3690|       |#elif defined(CHECK_FORK_GETPID)
 3691|       |    myPid = 0; /* allow reinitialization */
 3692|       |#elif defined(CHECK_FORK_PTHREAD)
 3693|       |    forked = PR_FALSE; /* allow reinitialization */
 3694|       |#endif
 3695|       |#endif
 3696|      1|    return CKR_OK;
  ------------------
  |  | 1388|      1|#define CKR_OK 0x00000000UL
  ------------------
 3697|      1|}
sftk_ForkReset:
 3703|      2|{
 3704|       |#ifndef NO_FORK_CHECK
 3705|       |    if (PARENT_FORKED()) {
 3706|       |        parentForkedAfterC_Initialize = PR_TRUE;
 3707|       |        if (nsc_init) {
 3708|       |            /* finalize non-FIPS token */
 3709|       |            *crv = nsc_CommonFinalize(pReserved, PR_FALSE);
 3710|       |            PORT_Assert(CKR_OK == *crv);
 3711|       |            nsc_init = (PRBool) !(*crv == CKR_OK);
 3712|       |        }
 3713|       |        if (nsf_init) {
 3714|       |            /* finalize FIPS token */
 3715|       |            *crv = nsc_CommonFinalize(pReserved, PR_TRUE);
 3716|       |            PORT_Assert(CKR_OK == *crv);
 3717|       |            nsf_init = (PRBool) !(*crv == CKR_OK);
 3718|       |        }
 3719|       |        parentForkedAfterC_Initialize = PR_FALSE;
 3720|       |        return PR_TRUE;
 3721|       |    }
 3722|       |#endif
 3723|      2|    return PR_FALSE;
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
 3724|      2|}
NSC_Finalize:
 3730|      1|{
 3731|      1|    CK_RV crv;
 3732|       |
 3733|       |    /* reset entire PKCS#11 module upon fork */
 3734|      1|    if (sftk_ForkReset(pReserved, &crv)) {
  ------------------
  |  Branch (3734:9): [True: 0, False: 1]
  ------------------
 3735|      0|        return crv;
 3736|      0|    }
 3737|       |
 3738|      1|    if (!nsc_init) {
  ------------------
  |  Branch (3738:9): [True: 0, False: 1]
  ------------------
 3739|      0|        return CKR_OK;
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
 3740|      0|    }
 3741|       |
 3742|      1|    crv = nsc_CommonFinalize(pReserved, PR_FALSE);
  ------------------
  |  |  438|      1|#define PR_FALSE 0
  ------------------
 3743|       |
 3744|      1|    nsc_init = (PRBool) !(crv == CKR_OK);
  ------------------
  |  | 1388|      1|#define CKR_OK 0x00000000UL
  ------------------
 3745|       |
 3746|      1|    return crv;
 3747|      1|}
NSC_GetInfo:
 3754|      1|{
 3755|      1|#define NSS_VERSION_VARIABLE __nss_softokn_version
 3756|      1|#include "verref.h"
  ------------------
  |  |    1|       |/* This Source Code Form is subject to the terms of the Mozilla Public
  |  |    2|       | * License, v. 2.0. If a copy of the MPL was not distributed with this
  |  |    3|       | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  |  |    4|       |
  |  |    5|       |/* This header is used inline in a function to ensure that a version string
  |  |    6|       | * symbol is linked in and not optimized out. A volatile reference is added to
  |  |    7|       | * the variable identified by NSS_VERSION_VARIABLE.
  |  |    8|       | *
  |  |    9|       | * Use this as follows:
  |  |   10|       | *
  |  |   11|       | * #define NSS_VERSION_VARIABLE __nss_ssl_version
  |  |   12|       | * #include "verref.h"
  |  |   13|       | */
  |  |   14|       |
  |  |   15|       |/* Suppress unused variable warnings. */
  |  |   16|       |#ifdef _MSC_VER
  |  |   17|       |#pragma warning(push)
  |  |   18|       |#pragma warning(disable : 4101)
  |  |   19|       |#endif
  |  |   20|       |/* This works for both gcc and clang */
  |  |   21|      1|#if defined(__GNUC__) && !defined(NSS_NO_GCC48)
  |  |   22|      1|#pragma GCC diagnostic push
  |  |   23|      1|#pragma GCC diagnostic ignored "-Wunused-variable"
  |  |   24|      1|#endif
  |  |   25|       |
  |  |   26|       |#ifndef NSS_VERSION_VARIABLE
  |  |   27|       |#error NSS_VERSION_VARIABLE must be set before including "verref.h"
  |  |   28|       |#endif
  |  |   29|      1|{
  |  |   30|      1|    extern const char NSS_VERSION_VARIABLE[];
  |  |   31|      1|#if defined(__GNUC__) || defined(__clang__)
  |  |   32|      1|    __attribute__((unused))
  |  |   33|      1|#endif
  |  |   34|      1|    volatile const char _nss_version_c = NSS_VERSION_VARIABLE[0];
  |  |  ------------------
  |  |  |  | 3755|      1|#define NSS_VERSION_VARIABLE __nss_softokn_version
  |  |  ------------------
  |  |   35|      1|}
  |  |   36|      1|#undef NSS_VERSION_VARIABLE
  |  |   37|       |
  |  |   38|       |#ifdef _MSC_VER
  |  |   39|       |#pragma warning(pop)
  |  |   40|       |#endif
  |  |   41|      1|#if defined(__GNUC__) && !defined(NSS_NO_GCC48)
  |  |   42|      1|#pragma GCC diagnostic pop
  |  |   43|      1|#endif
  ------------------
 3757|       |
 3758|      1|    CHECK_FORK();
 3759|       |
 3760|      1|    pInfo->cryptokiVersion.major = CRYPTOKI_VERSION_MAJOR;
  ------------------
  |  |   37|      1|#define CRYPTOKI_VERSION_MAJOR 3
  ------------------
 3761|      1|    pInfo->cryptokiVersion.minor = CRYPTOKI_VERSION_MINOR;
  ------------------
  |  |   38|      1|#define CRYPTOKI_VERSION_MINOR 1
  ------------------
 3762|      1|    PORT_Memcpy(pInfo->manufacturerID, manufacturerID, 32);
  ------------------
  |  |  180|      1|#define PORT_Memcpy memcpy
  ------------------
 3763|      1|    pInfo->libraryVersion.major = SOFTOKEN_VMAJOR;
  ------------------
  |  |   21|      1|#define SOFTOKEN_VMAJOR 3
  ------------------
 3764|      1|    pInfo->libraryVersion.minor = SOFTOKEN_VMINOR;
  ------------------
  |  |   22|      1|#define SOFTOKEN_VMINOR 111
  ------------------
 3765|      1|    PORT_Memcpy(pInfo->libraryDescription, libraryDescription, 32);
  ------------------
  |  |  180|      1|#define PORT_Memcpy memcpy
  ------------------
 3766|      1|    pInfo->flags = 0;
 3767|      1|    return CKR_OK;
  ------------------
  |  | 1388|      1|#define CKR_OK 0x00000000UL
  ------------------
 3768|      1|}
nsc_CommonGetSlotList:
 3791|      2|{
 3792|      2|    *pulCount = nscSlotCount[moduleIndex];
 3793|      2|    if (pSlotList != NULL) {
  ------------------
  |  Branch (3793:9): [True: 1, False: 1]
  ------------------
 3794|      1|        PORT_Memcpy(pSlotList, nscSlotList[moduleIndex],
  ------------------
  |  |  180|      1|#define PORT_Memcpy memcpy
  ------------------
 3795|      1|                    nscSlotCount[moduleIndex] * sizeof(CK_SLOT_ID));
 3796|      1|    }
 3797|      2|    return CKR_OK;
  ------------------
  |  | 1388|      2|#define CKR_OK 0x00000000UL
  ------------------
 3798|      2|}
NSC_GetSlotList:
 3804|      2|{
 3805|      2|    CHECK_FORK();
 3806|      2|    return nsc_CommonGetSlotList(tokenPresent, pSlotList, pulCount,
 3807|      2|                                 NSC_NON_FIPS_MODULE);
  ------------------
  |  |   55|      2|#define NSC_NON_FIPS_MODULE 0
  ------------------
 3808|      2|}
NSC_GetSlotInfo:
 3813|      2|{
 3814|      2|    SFTKSlot *slot = sftk_SlotFromID(slotID, PR_TRUE);
  ------------------
  |  |  437|      2|#define PR_TRUE 1
  ------------------
 3815|       |
 3816|      2|    CHECK_FORK();
 3817|       |
 3818|      2|    if (slot == NULL)
  ------------------
  |  Branch (3818:9): [True: 0, False: 2]
  ------------------
 3819|      0|        return CKR_SLOT_ID_INVALID;
  ------------------
  |  | 1391|      0|#define CKR_SLOT_ID_INVALID 0x00000003UL
  ------------------
 3820|       |
 3821|      2|    PORT_Memcpy(pInfo->manufacturerID, manufacturerID,
  ------------------
  |  |  180|      2|#define PORT_Memcpy memcpy
  ------------------
 3822|      2|                sizeof(pInfo->manufacturerID));
 3823|      2|    PORT_Memcpy(pInfo->slotDescription, slot->slotDescription,
  ------------------
  |  |  180|      2|#define PORT_Memcpy memcpy
  ------------------
 3824|      2|                sizeof(pInfo->slotDescription));
 3825|      2|    pInfo->flags = (slot->present) ? CKF_TOKEN_PRESENT : 0;
  ------------------
  |  |  131|      2|#define CKF_TOKEN_PRESENT 0x00000001UL    /* a token is there */
  ------------------
  |  Branch (3825:20): [True: 2, False: 0]
  ------------------
 3826|       |
 3827|       |    /* all user defined slots are defined as removable */
 3828|      2|    if (slotID >= SFTK_MIN_USER_SLOT_ID) {
  ------------------
  |  |  565|      2|#define SFTK_MIN_USER_SLOT_ID 4
  ------------------
  |  Branch (3828:9): [True: 0, False: 2]
  ------------------
 3829|      0|        pInfo->flags |= CKF_REMOVABLE_DEVICE;
  ------------------
  |  |  132|      0|#define CKF_REMOVABLE_DEVICE 0x00000002UL /* removable devices*/
  ------------------
 3830|      2|    } else {
 3831|       |        /* In the case where we are doing a merge update, we need
 3832|       |         * the DB slot to be removable so the token name can change
 3833|       |         * appropriately. */
 3834|      2|        SFTKDBHandle *handle = sftk_getKeyDB(slot);
 3835|      2|        if (handle) {
  ------------------
  |  Branch (3835:13): [True: 0, False: 2]
  ------------------
 3836|      0|            if (sftkdb_InUpdateMerge(handle)) {
  ------------------
  |  Branch (3836:17): [True: 0, False: 0]
  ------------------
 3837|      0|                pInfo->flags |= CKF_REMOVABLE_DEVICE;
  ------------------
  |  |  132|      0|#define CKF_REMOVABLE_DEVICE 0x00000002UL /* removable devices*/
  ------------------
 3838|      0|            }
 3839|      0|            sftk_freeDB(handle);
 3840|      0|        }
 3841|      2|    }
 3842|       |
 3843|       |    /* If there is no key database, this is for example the case when NSS was
 3844|       |     * initialized with NSS_NoDbInit(), then there won't be any point in
 3845|       |     * requesting a PIN. Set the CKF_USER_PIN_INITIALIZED bit so that
 3846|       |     * PK11_NeedUserInit() doesn't indicate that a PIN is needed.
 3847|       |     */
 3848|      2|    if (slot->keyDB == NULL) {
  ------------------
  |  Branch (3848:9): [True: 2, False: 0]
  ------------------
 3849|      2|        pInfo->flags |= CKF_USER_PIN_INITIALIZED;
  ------------------
  |  |  178|      2|#define CKF_USER_PIN_INITIALIZED 0x00000008UL /* normal user's \
  ------------------
 3850|      2|    }
 3851|       |
 3852|       |    /* ok we really should read it out of the keydb file. */
 3853|       |    /* pInfo->hardwareVersion.major = NSSLOWKEY_DB_FILE_VERSION; */
 3854|      2|    pInfo->hardwareVersion.major = SOFTOKEN_VMAJOR;
  ------------------
  |  |   21|      2|#define SOFTOKEN_VMAJOR 3
  ------------------
 3855|      2|    pInfo->hardwareVersion.minor = SOFTOKEN_VMINOR;
  ------------------
  |  |   22|      2|#define SOFTOKEN_VMINOR 111
  ------------------
 3856|      2|    pInfo->firmwareVersion.major = SOFTOKEN_VPATCH;
  ------------------
  |  |   23|      2|#define SOFTOKEN_VPATCH 0
  ------------------
 3857|      2|    pInfo->firmwareVersion.minor = SOFTOKEN_VBUILD;
  ------------------
  |  |   24|      2|#define SOFTOKEN_VBUILD 0
  ------------------
 3858|      2|    return CKR_OK;
  ------------------
  |  | 1388|      2|#define CKR_OK 0x00000000UL
  ------------------
 3859|      2|}
NSC_GetTokenInfo:
 3898|      2|{
 3899|      2|    SFTKSlot *slot;
 3900|      2|    SFTKDBHandle *handle;
 3901|       |
 3902|      2|    CHECK_FORK();
 3903|       |
 3904|      2|    if (!nsc_init && !nsf_init)
  ------------------
  |  Branch (3904:9): [True: 0, False: 2]
  |  Branch (3904:22): [True: 0, False: 0]
  ------------------
 3905|      0|        return CKR_CRYPTOKI_NOT_INITIALIZED;
  ------------------
  |  | 1520|      0|#define CKR_CRYPTOKI_NOT_INITIALIZED 0x00000190UL
  ------------------
 3906|      2|    slot = sftk_SlotFromID(slotID, PR_FALSE);
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
 3907|      2|    if (slot == NULL)
  ------------------
  |  Branch (3907:9): [True: 0, False: 2]
  ------------------
 3908|      0|        return CKR_SLOT_ID_INVALID;
  ------------------
  |  | 1391|      0|#define CKR_SLOT_ID_INVALID 0x00000003UL
  ------------------
 3909|       |
 3910|      2|    PORT_Memcpy(pInfo->manufacturerID, manufacturerID, 32);
  ------------------
  |  |  180|      2|#define PORT_Memcpy memcpy
  ------------------
 3911|      2|    PORT_Memcpy(pInfo->model, "NSS 3           ", 16);
  ------------------
  |  |  180|      2|#define PORT_Memcpy memcpy
  ------------------
 3912|      2|    PORT_Memcpy(pInfo->serialNumber, "0000000000000000", 16);
  ------------------
  |  |  180|      2|#define PORT_Memcpy memcpy
  ------------------
 3913|      2|    PORT_Memcpy(pInfo->utcTime, "0000000000000000", 16);
  ------------------
  |  |  180|      2|#define PORT_Memcpy memcpy
  ------------------
 3914|      2|    pInfo->ulMaxSessionCount = 0;   /* arbitrarily large */
 3915|      2|    pInfo->ulMaxRwSessionCount = 0; /* arbitarily large */
 3916|      2|    PZ_Lock(slot->slotLock);        /* Protect sessionCount / rwSessioncount */
  ------------------
  |  |  245|      2|#define PZ_Lock(k) PR_Lock((k))
  ------------------
 3917|      2|    pInfo->ulSessionCount = slot->sessionCount;
 3918|      2|    pInfo->ulRwSessionCount = slot->rwSessionCount;
 3919|      2|    PZ_Unlock(slot->slotLock); /* Unlock before sftk_getKeyDB */
  ------------------
  |  |  246|      2|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
 3920|      2|    pInfo->firmwareVersion.major = 0;
 3921|      2|    pInfo->firmwareVersion.minor = 0;
 3922|      2|    PORT_Memcpy(pInfo->label, slot->tokDescription, sizeof(pInfo->label));
  ------------------
  |  |  180|      2|#define PORT_Memcpy memcpy
  ------------------
 3923|      2|    handle = sftk_getKeyDB(slot);
 3924|      2|    pInfo->flags = CKF_RNG | CKF_DUAL_CRYPTO_OPERATIONS;
  ------------------
  |  |  171|      2|#define CKF_RNG 0x00000001UL                  /* has random # \
  ------------------
                  pInfo->flags = CKF_RNG | CKF_DUAL_CRYPTO_OPERATIONS;
  ------------------
  |  |  202|      2|#define CKF_DUAL_CRYPTO_OPERATIONS 0x00000200UL
  ------------------
 3925|      2|    if (handle == NULL) {
  ------------------
  |  Branch (3925:9): [True: 2, False: 0]
  ------------------
 3926|      2|        pInfo->flags |= CKF_WRITE_PROTECTED;
  ------------------
  |  |  173|      2|#define CKF_WRITE_PROTECTED 0x00000002UL      /* token is \
  ------------------
 3927|      2|        pInfo->ulMaxPinLen = 0;
 3928|      2|        pInfo->ulMinPinLen = 0;
 3929|      2|        pInfo->ulTotalPublicMemory = 0;
 3930|      2|        pInfo->ulFreePublicMemory = 0;
 3931|      2|        pInfo->ulTotalPrivateMemory = 0;
 3932|      2|        pInfo->ulFreePrivateMemory = 0;
 3933|      2|        pInfo->hardwareVersion.major = 4;
 3934|      2|        pInfo->hardwareVersion.minor = 0;
 3935|      2|    } else {
 3936|       |        /*
 3937|       |         * we have three possible states which we may be in:
 3938|       |         *   (1) No DB password has been initialized. This also means we
 3939|       |         *   have no keys in the key db.
 3940|       |         *   (2) Password initialized to NULL. This means we have keys, but
 3941|       |         *   the user has chosen not use a password.
 3942|       |         *   (3) Finally we have an initialized password whicn is not NULL, and
 3943|       |         *   we will need to prompt for it.
 3944|       |         */
 3945|      0|        if (sftkdb_HasPasswordSet(handle) == SECFailure) {
  ------------------
  |  Branch (3945:13): [True: 0, False: 0]
  ------------------
 3946|      0|            pInfo->flags |= CKF_LOGIN_REQUIRED;
  ------------------
  |  |  176|      0|#define CKF_LOGIN_REQUIRED 0x00000004UL       /* user must \
  ------------------
 3947|      0|        } else if (!sftk_checkNeedLogin(slot, handle)) {
  ------------------
  |  Branch (3947:20): [True: 0, False: 0]
  ------------------
 3948|      0|            pInfo->flags |= CKF_USER_PIN_INITIALIZED;
  ------------------
  |  |  178|      0|#define CKF_USER_PIN_INITIALIZED 0x00000008UL /* normal user's \
  ------------------
 3949|      0|        } else {
 3950|      0|            pInfo->flags |= CKF_LOGIN_REQUIRED | CKF_USER_PIN_INITIALIZED;
  ------------------
  |  |  176|      0|#define CKF_LOGIN_REQUIRED 0x00000004UL       /* user must \
  ------------------
                          pInfo->flags |= CKF_LOGIN_REQUIRED | CKF_USER_PIN_INITIALIZED;
  ------------------
  |  |  178|      0|#define CKF_USER_PIN_INITIALIZED 0x00000008UL /* normal user's \
  ------------------
 3951|       |            /*
 3952|       |             * if we are doing a merge style update, and we need to get the password
 3953|       |             * of our source database (the database we are updating from), make sure we
 3954|       |             * return a token name that will match the database we are prompting for.
 3955|       |             */
 3956|      0|            if (sftkdb_NeedUpdateDBPassword(handle)) {
  ------------------
  |  Branch (3956:17): [True: 0, False: 0]
  ------------------
 3957|       |                /* if we have an update tok description, use it. otherwise
 3958|       |                 * use the updateID for this database */
 3959|      0|                if (!sftk_isBlank(slot->updateTokDescription,
  ------------------
  |  Branch (3959:21): [True: 0, False: 0]
  ------------------
 3960|      0|                                  sizeof(pInfo->label))) {
 3961|      0|                    PORT_Memcpy(pInfo->label, slot->updateTokDescription,
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
 3962|      0|                                sizeof(pInfo->label));
 3963|      0|                } else {
 3964|       |                    /* build from updateID */
 3965|      0|                    const char *updateID = sftkdb_GetUpdateID(handle);
 3966|      0|                    if (updateID) {
  ------------------
  |  Branch (3966:25): [True: 0, False: 0]
  ------------------
 3967|      0|                        sftk_setStringName(updateID, (char *)pInfo->label,
 3968|      0|                                           sizeof(pInfo->label), PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 3969|      0|                    }
 3970|      0|                }
 3971|      0|            }
 3972|      0|        }
 3973|      0|        pInfo->ulMaxPinLen = SFTK_MAX_PIN;
  ------------------
  |  |  493|      0|#define SFTK_MAX_PIN 500
  ------------------
 3974|      0|        pInfo->ulMinPinLen = (CK_ULONG)slot->minimumPinLen;
 3975|      0|        pInfo->ulTotalPublicMemory = 1;
 3976|      0|        pInfo->ulFreePublicMemory = 1;
 3977|      0|        pInfo->ulTotalPrivateMemory = 1;
 3978|      0|        pInfo->ulFreePrivateMemory = 1;
 3979|       |#ifdef SHDB_FIXME
 3980|       |        pInfo->hardwareVersion.major = CERT_DB_FILE_VERSION;
 3981|       |        pInfo->hardwareVersion.minor = handle->version;
 3982|       |#else
 3983|      0|        pInfo->hardwareVersion.major = 0;
 3984|      0|        pInfo->hardwareVersion.minor = 0;
 3985|      0|#endif
 3986|      0|        sftk_freeDB(handle);
 3987|      0|    }
 3988|       |    /*
 3989|       |     * CKF_LOGIN_REQUIRED CKF_USER_PIN_INITIALIZED  how CKF_TOKEN_INITIALIZED
 3990|       |     *                                              should be set
 3991|       |     *         0                   0                           1
 3992|       |     *         1                   0                           0
 3993|       |     *         0                   1                           1
 3994|       |     *         1                   1                           1
 3995|       |     */
 3996|      2|    if (!(pInfo->flags & CKF_LOGIN_REQUIRED) ||
  ------------------
  |  |  176|      2|#define CKF_LOGIN_REQUIRED 0x00000004UL       /* user must \
  ------------------
  |  Branch (3996:9): [True: 2, False: 0]
  ------------------
 3997|      2|        (pInfo->flags & CKF_USER_PIN_INITIALIZED)) {
  ------------------
  |  |  178|      0|#define CKF_USER_PIN_INITIALIZED 0x00000008UL /* normal user's \
  ------------------
  |  Branch (3997:9): [True: 0, False: 0]
  ------------------
 3998|      2|        pInfo->flags |= CKF_TOKEN_INITIALIZED;
  ------------------
  |  |  209|      2|#define CKF_TOKEN_INITIALIZED 0x00000400UL
  ------------------
 3999|      2|    }
 4000|      2|    return CKR_OK;
  ------------------
  |  | 1388|      2|#define CKR_OK 0x00000000UL
  ------------------
 4001|      2|}
NSC_GetMechanismList:
 4008|      4|{
 4009|      4|    CK_ULONG i;
 4010|       |
 4011|      4|    CHECK_FORK();
 4012|       |
 4013|      4|    switch (slotID) {
 4014|       |        /* default: */
 4015|      2|        case NETSCAPE_SLOT_ID:
  ------------------
  |  |  498|      2|#define NETSCAPE_SLOT_ID 1
  ------------------
  |  Branch (4015:9): [True: 2, False: 2]
  ------------------
 4016|      2|            *pulCount = mechanismCount;
 4017|      2|            if (pMechanismList != NULL) {
  ------------------
  |  Branch (4017:17): [True: 1, False: 1]
  ------------------
 4018|    231|                for (i = 0; i < mechanismCount; i++) {
  ------------------
  |  Branch (4018:29): [True: 230, False: 1]
  ------------------
 4019|    230|                    pMechanismList[i] = mechanisms[i].type;
 4020|    230|                }
 4021|      1|            }
 4022|      2|            break;
 4023|      2|        default:
  ------------------
  |  Branch (4023:9): [True: 2, False: 2]
  ------------------
 4024|      2|            *pulCount = 0;
 4025|    462|            for (i = 0; i < mechanismCount; i++) {
  ------------------
  |  Branch (4025:25): [True: 460, False: 2]
  ------------------
 4026|    460|                if (mechanisms[i].privkey) {
  ------------------
  |  Branch (4026:21): [True: 354, False: 106]
  ------------------
 4027|    354|                    (*pulCount)++;
 4028|    354|                    if (pMechanismList != NULL) {
  ------------------
  |  Branch (4028:25): [True: 177, False: 177]
  ------------------
 4029|    177|                        *pMechanismList++ = mechanisms[i].type;
 4030|    177|                    }
 4031|    354|                }
 4032|    460|            }
 4033|      2|            break;
 4034|      4|    }
 4035|      4|    return CKR_OK;
  ------------------
  |  | 1388|      4|#define CKR_OK 0x00000000UL
  ------------------
 4036|      4|}
NSC_GetMechanismInfo:
 4043|  14.0k|{
 4044|  14.0k|    PRBool isPrivateKey;
 4045|  14.0k|    CK_ULONG i;
 4046|       |
 4047|  14.0k|    CHECK_FORK();
 4048|       |
 4049|  14.0k|    switch (slotID) {
 4050|  11.6k|        case NETSCAPE_SLOT_ID:
  ------------------
  |  |  498|  11.6k|#define NETSCAPE_SLOT_ID 1
  ------------------
  |  Branch (4050:9): [True: 11.6k, False: 2.40k]
  ------------------
 4051|  11.6k|            isPrivateKey = PR_FALSE;
  ------------------
  |  |  438|  11.6k|#define PR_FALSE 0
  ------------------
 4052|  11.6k|            break;
 4053|  2.40k|        default:
  ------------------
  |  Branch (4053:9): [True: 2.40k, False: 11.6k]
  ------------------
 4054|  2.40k|            isPrivateKey = PR_TRUE;
  ------------------
  |  |  437|  2.40k|#define PR_TRUE 1
  ------------------
 4055|  2.40k|            break;
 4056|  14.0k|    }
 4057|   475k|    for (i = 0; i < mechanismCount; i++) {
  ------------------
  |  Branch (4057:17): [True: 475k, False: 0]
  ------------------
 4058|   475k|        if (type == mechanisms[i].type) {
  ------------------
  |  Branch (4058:13): [True: 14.0k, False: 461k]
  ------------------
 4059|  14.0k|            if (isPrivateKey && !mechanisms[i].privkey) {
  ------------------
  |  Branch (4059:17): [True: 2.40k, False: 11.6k]
  |  Branch (4059:33): [True: 0, False: 2.40k]
  ------------------
 4060|      0|                return CKR_MECHANISM_INVALID;
  ------------------
  |  | 1447|      0|#define CKR_MECHANISM_INVALID 0x00000070UL
  ------------------
 4061|      0|            }
 4062|  14.0k|            PORT_Memcpy(pInfo, &mechanisms[i].info, sizeof(CK_MECHANISM_INFO));
  ------------------
  |  |  180|  14.0k|#define PORT_Memcpy memcpy
  ------------------
 4063|  14.0k|            return CKR_OK;
  ------------------
  |  | 1388|  14.0k|#define CKR_OK 0x00000000UL
  ------------------
 4064|  14.0k|        }
 4065|   475k|    }
 4066|      0|    return CKR_MECHANISM_INVALID;
  ------------------
  |  | 1447|      0|#define CKR_MECHANISM_INVALID 0x00000070UL
  ------------------
 4067|  14.0k|}
sftk_MechAllowsOperation:
 4087|  16.6k|{
 4088|  16.6k|    CK_ULONG i;
 4089|  16.6k|    CK_FLAGS flags = sftk_AttributeToFlags(op);
 4090|       |
 4091|  16.6k|    if (flags == 0) {
  ------------------
  |  Branch (4091:9): [True: 0, False: 16.6k]
  ------------------
 4092|      0|        return CKR_ARGUMENTS_BAD;
  ------------------
  |  | 1401|      0|#define CKR_ARGUMENTS_BAD 0x00000007UL
  ------------------
 4093|      0|    }
 4094|  1.20M|    for (i = 0; i < mechanismCount; i++) {
  ------------------
  |  Branch (4094:17): [True: 1.20M, False: 9]
  ------------------
 4095|  1.20M|        if (type == mechanisms[i].type) {
  ------------------
  |  Branch (4095:13): [True: 16.6k, False: 1.18M]
  ------------------
 4096|  16.6k|            return (flags & mechanisms[i].info.flags) ? CKR_OK
  ------------------
  |  | 1388|  16.6k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (4096:20): [True: 16.6k, False: 0]
  ------------------
 4097|  16.6k|                                                      : CKR_MECHANISM_INVALID;
  ------------------
  |  | 1447|      0|#define CKR_MECHANISM_INVALID 0x00000070UL
  ------------------
 4098|  16.6k|        }
 4099|  1.20M|    }
 4100|      9|    return CKR_MECHANISM_INVALID;
  ------------------
  |  | 1447|      9|#define CKR_MECHANISM_INVALID 0x00000070UL
  ------------------
 4101|  16.6k|}
NSC_OpenSession:
 4381|  73.6k|{
 4382|  73.6k|    SFTKSlot *slot;
 4383|  73.6k|    CK_SESSION_HANDLE sessionID;
 4384|  73.6k|    SFTKSession *session;
 4385|  73.6k|    SFTKSession *sameID;
 4386|       |
 4387|  73.6k|    CHECK_FORK();
 4388|       |
 4389|  73.6k|    slot = sftk_SlotFromID(slotID, PR_FALSE);
  ------------------
  |  |  438|  73.6k|#define PR_FALSE 0
  ------------------
 4390|  73.6k|    if (slot == NULL)
  ------------------
  |  Branch (4390:9): [True: 0, False: 73.6k]
  ------------------
 4391|      0|        return CKR_SLOT_ID_INVALID;
  ------------------
  |  | 1391|      0|#define CKR_SLOT_ID_INVALID 0x00000003UL
  ------------------
 4392|       |
 4393|       |    /* new session (we only have serial sessions) */
 4394|  73.6k|    session = sftk_NewSession(slotID, Notify, pApplication,
 4395|  73.6k|                              flags | CKF_SERIAL_SESSION);
  ------------------
  |  |  303|  73.6k|#define CKF_SERIAL_SESSION 0x00000004UL /* no parallel */
  ------------------
 4396|  73.6k|    if (session == NULL)
  ------------------
  |  Branch (4396:9): [True: 0, False: 73.6k]
  ------------------
 4397|      0|        return CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 4398|       |
 4399|  73.6k|    if (slot->readOnly && (flags & CKF_RW_SESSION)) {
  ------------------
  |  |  302|  2.37k|#define CKF_RW_SESSION 0x00000002UL     /* session is r/w */
  ------------------
  |  Branch (4399:9): [True: 2.37k, False: 71.2k]
  |  Branch (4399:27): [True: 0, False: 2.37k]
  ------------------
 4400|       |        /* NETSCAPE_SLOT_ID is Read ONLY */
 4401|      0|        session->info.flags &= ~CKF_RW_SESSION;
  ------------------
  |  |  302|      0|#define CKF_RW_SESSION 0x00000002UL     /* session is r/w */
  ------------------
 4402|      0|    }
 4403|  73.6k|    PZ_Lock(slot->slotLock);
  ------------------
  |  |  245|  73.6k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
 4404|  73.6k|    ++slot->sessionCount;
 4405|  73.6k|    PZ_Unlock(slot->slotLock);
  ------------------
  |  |  246|  73.6k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
 4406|  73.6k|    if (session->info.flags & CKF_RW_SESSION) {
  ------------------
  |  |  302|  73.6k|#define CKF_RW_SESSION 0x00000002UL     /* session is r/w */
  ------------------
  |  Branch (4406:9): [True: 0, False: 73.6k]
  ------------------
 4407|      0|        (void)PR_ATOMIC_INCREMENT(&slot->rwSessionCount);
  ------------------
  |  |  122|      0|#define PR_ATOMIC_INCREMENT(val) __sync_add_and_fetch(val, 1)
  ------------------
 4408|      0|    }
 4409|       |
 4410|  73.6k|    do {
 4411|  73.6k|        PZLock *lock;
  ------------------
  |  |  185|  73.6k|#define PZLock PRLock
  ------------------
 4412|  73.6k|        do {
 4413|  73.6k|            sessionID = (PR_ATOMIC_INCREMENT(&slot->sessionIDCount) & 0xffffff) | (slot->index << 24);
  ------------------
  |  |  122|  73.6k|#define PR_ATOMIC_INCREMENT(val) __sync_add_and_fetch(val, 1)
  ------------------
 4414|  73.6k|        } while (sessionID == CK_INVALID_HANDLE);
  ------------------
  |  |   78|  73.6k|#define CK_INVALID_HANDLE 0
  ------------------
  |  Branch (4414:18): [True: 0, False: 73.6k]
  ------------------
 4415|  73.6k|        lock = SFTK_SESSION_LOCK(slot, sessionID);
  ------------------
  |  |  583|  73.6k|    ((slot)->sessionLock[(handle) & (slot)->sessionLockMask])
  ------------------
 4416|  73.6k|        PZ_Lock(lock);
  ------------------
  |  |  245|  73.6k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
 4417|  73.6k|        sftkqueue_find(sameID, sessionID, slot->head, slot->sessHashSize);
  ------------------
  |  |  524|  98.9k|    for ((element) = (head)[sftk_hash(id, hash_size)]; (element) != NULL; \
  |  |  ------------------
  |  |  |  |  513|  73.6k|    ((PRUint32)((value)*SHMULTIPLIER) & (size - 1))
  |  |  |  |  ------------------
  |  |  |  |  |  |  509|  73.6k|#define SHMULTIPLIER 1791398085
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (524:56): [True: 25.3k, False: 73.6k]
  |  |  ------------------
  |  |  525|  73.6k|         (element) = (element)->next) {                                   \
  |  |  526|  25.3k|        if ((element)->handle == (id)) {                                  \
  |  |  ------------------
  |  |  |  Branch (526:13): [True: 0, False: 25.3k]
  |  |  ------------------
  |  |  527|      0|            break;                                                        \
  |  |  528|      0|        }                                                                 \
  |  |  529|  25.3k|    }
  ------------------
 4418|  73.6k|        if (sameID == NULL) {
  ------------------
  |  Branch (4418:13): [True: 73.6k, False: 0]
  ------------------
 4419|  73.6k|            session->handle = sessionID;
 4420|  73.6k|            sftk_update_state(slot, session);
 4421|  73.6k|            sftkqueue_add(session, sessionID, slot->head, slot->sessHashSize);
  ------------------
  |  |  515|  73.6k|    {                                               \
  |  |  516|  73.6k|        int tmp = sftk_hash(id, hash_size);         \
  |  |  ------------------
  |  |  |  |  513|  73.6k|    ((PRUint32)((value)*SHMULTIPLIER) & (size - 1))
  |  |  |  |  ------------------
  |  |  |  |  |  |  509|  73.6k|#define SHMULTIPLIER 1791398085
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  517|  73.6k|        (element)->next = (head)[tmp];              \
  |  |  518|  73.6k|        (element)->prev = NULL;                     \
  |  |  519|  73.6k|        if ((head)[tmp])                            \
  |  |  ------------------
  |  |  |  Branch (519:13): [True: 20.7k, False: 52.8k]
  |  |  ------------------
  |  |  520|  73.6k|            (head)[tmp]->prev = (element);          \
  |  |  521|  73.6k|        (head)[tmp] = (element);                    \
  |  |  522|  73.6k|    }
  ------------------
 4422|  73.6k|        } else {
 4423|      0|            slot->sessionIDConflict++; /* for debugging */
 4424|      0|        }
 4425|  73.6k|        PZ_Unlock(lock);
  ------------------
  |  |  246|  73.6k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
 4426|  73.6k|    } while (sameID != NULL);
  ------------------
  |  Branch (4426:14): [True: 0, False: 73.6k]
  ------------------
 4427|       |
 4428|  73.6k|    *phSession = sessionID;
 4429|  73.6k|    return CKR_OK;
  ------------------
  |  | 1388|  73.6k|#define CKR_OK 0x00000000UL
  ------------------
 4430|  73.6k|}
NSC_CloseSession:
 4435|  73.6k|{
 4436|  73.6k|    SFTKSlot *slot;
 4437|  73.6k|    SFTKSession *session;
 4438|  73.6k|    PRBool sessionFound;
 4439|  73.6k|    PZLock *lock;
  ------------------
  |  |  185|  73.6k|#define PZLock PRLock
  ------------------
 4440|       |
 4441|  73.6k|    CHECK_FORK();
 4442|       |
 4443|  73.6k|    session = sftk_SessionFromHandle(hSession);
 4444|  73.6k|    if (session == NULL)
  ------------------
  |  Branch (4444:9): [True: 0, False: 73.6k]
  ------------------
 4445|      0|        return CKR_SESSION_HANDLE_INVALID;
  ------------------
  |  | 1465|      0|#define CKR_SESSION_HANDLE_INVALID 0x000000B3UL
  ------------------
 4446|  73.6k|    slot = sftk_SlotFromSession(session);
  ------------------
  |  |  503|  73.6k|#define sftk_SlotFromSession(sp) ((sp)->slot)
  ------------------
 4447|  73.6k|    sessionFound = PR_FALSE;
  ------------------
  |  |  438|  73.6k|#define PR_FALSE 0
  ------------------
 4448|       |
 4449|       |    /* lock */
 4450|  73.6k|    lock = SFTK_SESSION_LOCK(slot, hSession);
  ------------------
  |  |  583|  73.6k|    ((slot)->sessionLock[(handle) & (slot)->sessionLockMask])
  ------------------
 4451|  73.6k|    PZ_Lock(lock);
  ------------------
  |  |  245|  73.6k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
 4452|  73.6k|    if (sftkqueue_is_queued(session, hSession, slot->head, slot->sessHashSize)) {
  ------------------
  |  |  531|  73.6k|    (((element)->next) || ((element)->prev) ||            \
  |  |  ------------------
  |  |  |  Branch (531:6): [True: 20.7k, False: 52.8k]
  |  |  |  Branch (531:27): [True: 1, False: 52.8k]
  |  |  ------------------
  |  |  532|  73.6k|     ((head)[sftk_hash(id, hash_size)] == (element)))
  |  |  ------------------
  |  |  |  |  513|  52.8k|    ((PRUint32)((value)*SHMULTIPLIER) & (size - 1))
  |  |  |  |  ------------------
  |  |  |  |  |  |  509|  52.8k|#define SHMULTIPLIER 1791398085
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (532:6): [True: 52.8k, False: 0]
  |  |  ------------------
  ------------------
 4453|  73.6k|        sessionFound = PR_TRUE;
  ------------------
  |  |  437|  73.6k|#define PR_TRUE 1
  ------------------
 4454|  73.6k|        sftkqueue_delete(session, hSession, slot->head, slot->sessHashSize);
  ------------------
  |  |  534|  73.6k|    if ((element)->next)                                      \
  |  |  ------------------
  |  |  |  Branch (534:9): [True: 20.7k, False: 52.8k]
  |  |  ------------------
  |  |  535|  73.6k|        (element)->next->prev = (element)->prev;              \
  |  |  536|  73.6k|    if ((element)->prev)                                      \
  |  |  ------------------
  |  |  |  Branch (536:9): [True: 1, False: 73.6k]
  |  |  ------------------
  |  |  537|  73.6k|        (element)->prev->next = (element)->next;              \
  |  |  538|  73.6k|    else                                                      \
  |  |  539|  73.6k|        (head)[sftk_hash(id, hash_size)] = ((element)->next); \
  |  |  ------------------
  |  |  |  |  513|  73.6k|    ((PRUint32)((value)*SHMULTIPLIER) & (size - 1))
  |  |  |  |  ------------------
  |  |  |  |  |  |  509|  73.6k|#define SHMULTIPLIER 1791398085
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  540|  73.6k|    (element)->next = NULL;                                   \
  |  |  541|  73.6k|    (element)->prev = NULL;
  ------------------
 4455|  73.6k|    }
 4456|  73.6k|    PZ_Unlock(lock);
  ------------------
  |  |  246|  73.6k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
 4457|       |
 4458|  73.6k|    if (sessionFound) {
  ------------------
  |  Branch (4458:9): [True: 73.6k, False: 0]
  ------------------
 4459|  73.6k|        SFTKDBHandle *handle;
 4460|  73.6k|        handle = sftk_getKeyDB(slot);
 4461|  73.6k|        PZ_Lock(slot->slotLock);
  ------------------
  |  |  245|  73.6k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
 4462|  73.6k|        if (--slot->sessionCount == 0) {
  ------------------
  |  Branch (4462:13): [True: 0, False: 73.6k]
  ------------------
 4463|      0|            slot->isLoggedIn = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 4464|      0|            if (slot->needLogin && handle) {
  ------------------
  |  Branch (4464:17): [True: 0, False: 0]
  |  Branch (4464:36): [True: 0, False: 0]
  ------------------
 4465|      0|                sftkdb_ClearPassword(handle);
 4466|      0|            }
 4467|      0|        }
 4468|  73.6k|        PZ_Unlock(slot->slotLock);
  ------------------
  |  |  246|  73.6k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
 4469|  73.6k|        if (handle) {
  ------------------
  |  Branch (4469:13): [True: 0, False: 73.6k]
  ------------------
 4470|      0|            sftk_freeDB(handle);
 4471|      0|        }
 4472|  73.6k|        if (session->info.flags & CKF_RW_SESSION) {
  ------------------
  |  |  302|  73.6k|#define CKF_RW_SESSION 0x00000002UL     /* session is r/w */
  ------------------
  |  Branch (4472:13): [True: 0, False: 73.6k]
  ------------------
 4473|      0|            (void)PR_ATOMIC_DECREMENT(&slot->rwSessionCount);
  ------------------
  |  |  123|      0|#define PR_ATOMIC_DECREMENT(val) __sync_sub_and_fetch(val, 1)
  ------------------
 4474|      0|        }
 4475|  73.6k|        sftk_DestroySession(session);
 4476|  73.6k|        session = NULL;
 4477|  73.6k|    }
 4478|       |
 4479|  73.6k|    return CKR_OK;
  ------------------
  |  | 1388|  73.6k|#define CKR_OK 0x00000000UL
  ------------------
 4480|  73.6k|}
NSC_CloseAllSessions:
 4485|      4|{
 4486|      4|    SFTKSlot *slot;
 4487|       |
 4488|       |#ifndef NO_FORK_CHECK
 4489|       |    /* skip fork check if we are being called from C_Initialize or C_Finalize */
 4490|       |    if (!parentForkedAfterC_Initialize) {
 4491|       |        CHECK_FORK();
 4492|       |    }
 4493|       |#endif
 4494|       |
 4495|      4|    slot = sftk_SlotFromID(slotID, PR_FALSE);
  ------------------
  |  |  438|      4|#define PR_FALSE 0
  ------------------
 4496|      4|    if (slot == NULL)
  ------------------
  |  Branch (4496:9): [True: 0, False: 4]
  ------------------
 4497|      0|        return CKR_SLOT_ID_INVALID;
  ------------------
  |  | 1391|      0|#define CKR_SLOT_ID_INVALID 0x00000003UL
  ------------------
 4498|       |
 4499|      4|    return sftk_CloseAllSessions(slot, PR_TRUE);
  ------------------
  |  |  437|      4|#define PR_TRUE 1
  ------------------
 4500|      4|}
NSC_CreateObject:
 4815|  8.10k|{
 4816|  8.10k|    SFTKSlot *slot = sftk_SlotFromSessionHandle(hSession);
 4817|  8.10k|    SFTKSession *session;
 4818|  8.10k|    SFTKObject *object;
 4819|       |    /* make sure class isn't randomly CKO_NSS_NEWSLOT or
 4820|       |     * CKO_NETSCPE_DELSLOT. */
 4821|  8.10k|    CK_OBJECT_CLASS class = CKO_VENDOR_DEFINED;
  ------------------
  |  |  335|  8.10k|#define CKO_VENDOR_DEFINED 0x80000000UL
  ------------------
 4822|  8.10k|    CK_RV crv;
 4823|  8.10k|    int i;
 4824|       |
 4825|  8.10k|    CHECK_FORK();
 4826|       |
 4827|  8.10k|    *phObject = CK_INVALID_HANDLE;
  ------------------
  |  |   78|  8.10k|#define CK_INVALID_HANDLE 0
  ------------------
 4828|       |
 4829|  8.10k|    if (slot == NULL) {
  ------------------
  |  Branch (4829:9): [True: 0, False: 8.10k]
  ------------------
 4830|      0|        return CKR_SESSION_HANDLE_INVALID;
  ------------------
  |  | 1465|      0|#define CKR_SESSION_HANDLE_INVALID 0x000000B3UL
  ------------------
 4831|      0|    }
 4832|       |    /*
 4833|       |     * now lets create an object to hang the attributes off of
 4834|       |     */
 4835|  8.10k|    object = sftk_NewObject(slot); /* fill in the handle later */
 4836|  8.10k|    if (object == NULL) {
  ------------------
  |  Branch (4836:9): [True: 0, False: 8.10k]
  ------------------
 4837|      0|        return CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 4838|      0|    }
 4839|       |
 4840|       |    /*
 4841|       |     * sftk_NewObject will set object->isFIPS to PR_TRUE if the slot is FIPS.
 4842|       |     * We don't need to worry about that here, as FC_CreateObject will always
 4843|       |     * disallow the import of secret and private keys, regardless of isFIPS
 4844|       |     * approval status. Therefore, at this point we know that the key is a
 4845|       |     * public key, which is acceptable to be imported in plaintext.
 4846|       |     */
 4847|       |
 4848|       |    /*
 4849|       |     * load the template values into the object
 4850|       |     */
 4851|  49.8k|    for (i = 0; i < (int)ulCount; i++) {
  ------------------
  |  Branch (4851:17): [True: 41.7k, False: 8.10k]
  ------------------
 4852|  41.7k|        crv = sftk_AddAttributeType(object, sftk_attr_expand(&pTemplate[i]));
  ------------------
  |  |  587|  41.7k|#define sftk_attr_expand(ap) (ap)->type, (ap)->pValue, (ap)->ulValueLen
  ------------------
 4853|  41.7k|        if (crv != CKR_OK) {
  ------------------
  |  | 1388|  41.7k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (4853:13): [True: 0, False: 41.7k]
  ------------------
 4854|      0|            sftk_FreeObject(object);
 4855|      0|            return crv;
 4856|      0|        }
 4857|  41.7k|        if ((pTemplate[i].type == CKA_CLASS) && pTemplate[i].pValue) {
  ------------------
  |  |  511|  41.7k|#define CKA_CLASS 0x00000000UL
  ------------------
  |  Branch (4857:13): [True: 8.10k, False: 33.6k]
  |  Branch (4857:49): [True: 8.10k, False: 0]
  ------------------
 4858|  8.10k|            class = *(CK_OBJECT_CLASS *)pTemplate[i].pValue;
 4859|  8.10k|        }
 4860|  41.7k|    }
 4861|       |
 4862|       |    /* get the session */
 4863|  8.10k|    session = sftk_SessionFromHandle(hSession);
 4864|  8.10k|    if (session == NULL) {
  ------------------
  |  Branch (4864:9): [True: 0, False: 8.10k]
  ------------------
 4865|      0|        sftk_FreeObject(object);
 4866|      0|        return CKR_SESSION_HANDLE_INVALID;
  ------------------
  |  | 1465|      0|#define CKR_SESSION_HANDLE_INVALID 0x000000B3UL
  ------------------
 4867|      0|    }
 4868|       |
 4869|       |    /*
 4870|       |     * handle pseudo objects (CKO_NEWSLOT)
 4871|       |     */
 4872|  8.10k|    if ((class == CKO_NSS_NEWSLOT) || (class == CKO_NSS_DELSLOT)) {
  ------------------
  |  |   39|  8.10k|#define CKO_NSS_NEWSLOT (CKO_NSS + 5)
  |  |  ------------------
  |  |  |  |   33|  8.10k|#define CKO_NSS (CKO_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|  8.10k|#define CKO_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKO_NSS (CKO_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  8.10k|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  if ((class == CKO_NSS_NEWSLOT) || (class == CKO_NSS_DELSLOT)) {
  ------------------
  |  |   40|  8.10k|#define CKO_NSS_DELSLOT (CKO_NSS + 6)
  |  |  ------------------
  |  |  |  |   33|  8.10k|#define CKO_NSS (CKO_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|  8.10k|#define CKO_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKO_NSS (CKO_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  8.10k|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (4872:9): [True: 0, False: 8.10k]
  |  Branch (4872:39): [True: 0, False: 8.10k]
  ------------------
 4873|      0|        crv = sftk_CreateNewSlot(slot, class, object);
 4874|      0|        goto done;
 4875|      0|    }
 4876|       |
 4877|       |    /*
 4878|       |     * handle the base object stuff
 4879|       |     */
 4880|  8.10k|    crv = sftk_handleObject(object, session);
 4881|  8.10k|    *phObject = object->handle;
 4882|  8.10k|done:
 4883|  8.10k|    sftk_FreeSession(session);
 4884|  8.10k|    sftk_FreeObject(object);
 4885|       |
 4886|  8.10k|    return crv;
 4887|  8.10k|}
NSC_GetAttributeValue:
 5033|  67.8k|{
 5034|  67.8k|    SFTKSlot *slot = sftk_SlotFromSessionHandle(hSession);
 5035|  67.8k|    SFTKSession *session;
 5036|  67.8k|    SFTKObject *object;
 5037|  67.8k|    SFTKAttribute *attribute;
 5038|  67.8k|    PRBool sensitive, isLoggedIn, needLogin;
 5039|  67.8k|    CK_RV crv;
 5040|  67.8k|    int i;
 5041|       |
 5042|  67.8k|    CHECK_FORK();
 5043|       |
 5044|  67.8k|    if (slot == NULL) {
  ------------------
  |  Branch (5044:9): [True: 0, False: 67.8k]
  ------------------
 5045|      0|        return CKR_SESSION_HANDLE_INVALID;
  ------------------
  |  | 1465|      0|#define CKR_SESSION_HANDLE_INVALID 0x000000B3UL
  ------------------
 5046|      0|    }
 5047|       |    /*
 5048|       |     * make sure we're allowed
 5049|       |     */
 5050|  67.8k|    session = sftk_SessionFromHandle(hSession);
 5051|  67.8k|    if (session == NULL) {
  ------------------
  |  Branch (5051:9): [True: 0, False: 67.8k]
  ------------------
 5052|      0|        return CKR_SESSION_HANDLE_INVALID;
  ------------------
  |  | 1465|      0|#define CKR_SESSION_HANDLE_INVALID 0x000000B3UL
  ------------------
 5053|      0|    }
 5054|       |
 5055|       |    /* short circuit everything for token objects */
 5056|  67.8k|    if (sftk_isToken(hObject)) {
  ------------------
  |  |  504|  67.8k|#define sftk_isToken(id) (((id)&SFTK_TOKEN_MASK) == SFTK_TOKEN_MAGIC)
  |  |  ------------------
  |  |  |  |  478|  67.8k|#define SFTK_TOKEN_MASK 0x80000000L
  |  |  ------------------
  |  |               #define sftk_isToken(id) (((id)&SFTK_TOKEN_MASK) == SFTK_TOKEN_MAGIC)
  |  |  ------------------
  |  |  |  |  479|  67.8k|#define SFTK_TOKEN_MAGIC 0x80000000L
  |  |  ------------------
  |  |  |  Branch (504:26): [True: 0, False: 67.8k]
  |  |  ------------------
  ------------------
 5057|      0|        crv = nsc_GetTokenAttributeValue(session, hObject, pTemplate, ulCount);
 5058|      0|        sftk_FreeSession(session);
 5059|      0|        return crv;
 5060|      0|    }
 5061|       |
 5062|       |    /* handle the session object */
 5063|  67.8k|    object = sftk_ObjectFromHandle(hObject, session);
 5064|  67.8k|    sftk_FreeSession(session);
 5065|  67.8k|    if (object == NULL) {
  ------------------
  |  Branch (5065:9): [True: 0, False: 67.8k]
  ------------------
 5066|      0|        return CKR_OBJECT_HANDLE_INVALID;
  ------------------
  |  | 1452|      0|#define CKR_OBJECT_HANDLE_INVALID 0x00000082UL
  ------------------
 5067|      0|    }
 5068|       |
 5069|  67.8k|    PZ_Lock(slot->slotLock);
  ------------------
  |  |  245|  67.8k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
 5070|  67.8k|    isLoggedIn = slot->isLoggedIn;
 5071|  67.8k|    needLogin = slot->needLogin;
 5072|  67.8k|    PZ_Unlock(slot->slotLock);
  ------------------
  |  |  246|  67.8k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
 5073|       |
 5074|       |    /* don't read a private object if we aren't logged in */
 5075|  67.8k|    if (!isLoggedIn && needLogin && sftk_isTrue(object, CKA_PRIVATE)) {
  ------------------
  |  |  513|      0|#define CKA_PRIVATE 0x00000002UL
  ------------------
  |  Branch (5075:9): [True: 67.8k, False: 0]
  |  Branch (5075:24): [True: 0, False: 67.8k]
  |  Branch (5075:37): [True: 0, False: 0]
  ------------------
 5076|      0|        sftk_FreeObject(object);
 5077|      0|        return CKR_USER_NOT_LOGGED_IN;
  ------------------
  |  | 1486|      0|#define CKR_USER_NOT_LOGGED_IN 0x00000101UL
  ------------------
 5078|      0|    }
 5079|       |
 5080|  67.8k|    crv = CKR_OK;
  ------------------
  |  | 1388|  67.8k|#define CKR_OK 0x00000000UL
  ------------------
 5081|  67.8k|    sensitive = sftk_isTrue(object, CKA_SENSITIVE);
  ------------------
  |  |  546|  67.8k|#define CKA_SENSITIVE 0x00000103UL
  ------------------
 5082|   195k|    for (i = 0; i < (int)ulCount; i++) {
  ------------------
  |  Branch (5082:17): [True: 128k, False: 67.8k]
  ------------------
 5083|       |        /* Make sure that this attribute is retrievable */
 5084|   128k|        if (sensitive && sftk_isSensitive(pTemplate[i].type, object->objclass)) {
  ------------------
  |  Branch (5084:13): [True: 0, False: 128k]
  |  Branch (5084:26): [True: 0, False: 0]
  ------------------
 5085|      0|            crv = CKR_ATTRIBUTE_SENSITIVE;
  ------------------
  |  | 1407|      0|#define CKR_ATTRIBUTE_SENSITIVE 0x00000011UL
  ------------------
 5086|      0|            pTemplate[i].ulValueLen = -1;
 5087|      0|            continue;
 5088|      0|        }
 5089|   128k|        attribute = sftk_FindAttribute(object, pTemplate[i].type);
 5090|   128k|        if (attribute == NULL) {
  ------------------
  |  Branch (5090:13): [True: 0, False: 128k]
  ------------------
 5091|      0|            crv = CKR_ATTRIBUTE_TYPE_INVALID;
  ------------------
  |  | 1408|      0|#define CKR_ATTRIBUTE_TYPE_INVALID 0x00000012UL
  ------------------
 5092|      0|            pTemplate[i].ulValueLen = -1;
 5093|      0|            continue;
 5094|      0|        }
 5095|   128k|        if (pTemplate[i].pValue != NULL) {
  ------------------
  |  Branch (5095:13): [True: 104k, False: 23.5k]
  ------------------
 5096|   104k|            PORT_Memcpy(pTemplate[i].pValue, attribute->attrib.pValue,
  ------------------
  |  |  180|   104k|#define PORT_Memcpy memcpy
  ------------------
 5097|   104k|                        attribute->attrib.ulValueLen);
 5098|   104k|        }
 5099|   128k|        pTemplate[i].ulValueLen = attribute->attrib.ulValueLen;
 5100|   128k|        sftk_FreeAttribute(attribute);
 5101|   128k|    }
 5102|       |
 5103|  67.8k|    sftk_FreeObject(object);
 5104|  67.8k|    return crv;
 5105|  67.8k|}
NSC_SetAttributeValue:
 5111|  9.67k|{
 5112|  9.67k|    SFTKSlot *slot = sftk_SlotFromSessionHandle(hSession);
 5113|  9.67k|    SFTKSession *session;
 5114|  9.67k|    SFTKAttribute *attribute;
 5115|  9.67k|    SFTKObject *object;
 5116|  9.67k|    PRBool isToken, isLoggedIn, needLogin;
 5117|  9.67k|    CK_RV crv = CKR_OK;
  ------------------
  |  | 1388|  9.67k|#define CKR_OK 0x00000000UL
  ------------------
 5118|  9.67k|    CK_BBOOL legal;
 5119|  9.67k|    int i;
 5120|       |
 5121|  9.67k|    CHECK_FORK();
 5122|       |
 5123|  9.67k|    if (slot == NULL) {
  ------------------
  |  Branch (5123:9): [True: 0, False: 9.67k]
  ------------------
 5124|      0|        return CKR_SESSION_HANDLE_INVALID;
  ------------------
  |  | 1465|      0|#define CKR_SESSION_HANDLE_INVALID 0x000000B3UL
  ------------------
 5125|      0|    }
 5126|       |    /*
 5127|       |     * make sure we're allowed
 5128|       |     */
 5129|  9.67k|    session = sftk_SessionFromHandle(hSession);
 5130|  9.67k|    if (session == NULL) {
  ------------------
  |  Branch (5130:9): [True: 0, False: 9.67k]
  ------------------
 5131|      0|        return CKR_SESSION_HANDLE_INVALID;
  ------------------
  |  | 1465|      0|#define CKR_SESSION_HANDLE_INVALID 0x000000B3UL
  ------------------
 5132|      0|    }
 5133|       |
 5134|  9.67k|    object = sftk_ObjectFromHandle(hObject, session);
 5135|  9.67k|    if (object == NULL) {
  ------------------
  |  Branch (5135:9): [True: 0, False: 9.67k]
  ------------------
 5136|      0|        sftk_FreeSession(session);
 5137|      0|        return CKR_OBJECT_HANDLE_INVALID;
  ------------------
  |  | 1452|      0|#define CKR_OBJECT_HANDLE_INVALID 0x00000082UL
  ------------------
 5138|      0|    }
 5139|       |
 5140|  9.67k|    PZ_Lock(slot->slotLock);
  ------------------
  |  |  245|  9.67k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
 5141|  9.67k|    isLoggedIn = slot->isLoggedIn;
 5142|  9.67k|    needLogin = slot->needLogin;
 5143|  9.67k|    PZ_Unlock(slot->slotLock);
  ------------------
  |  |  246|  9.67k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
 5144|       |
 5145|       |    /* don't modify a private object if we aren't logged in */
 5146|  9.67k|    if (!isLoggedIn && needLogin && sftk_isTrue(object, CKA_PRIVATE)) {
  ------------------
  |  |  513|      0|#define CKA_PRIVATE 0x00000002UL
  ------------------
  |  Branch (5146:9): [True: 9.67k, False: 0]
  |  Branch (5146:24): [True: 0, False: 9.67k]
  |  Branch (5146:37): [True: 0, False: 0]
  ------------------
 5147|      0|        sftk_FreeSession(session);
 5148|      0|        sftk_FreeObject(object);
 5149|      0|        return CKR_USER_NOT_LOGGED_IN;
  ------------------
  |  | 1486|      0|#define CKR_USER_NOT_LOGGED_IN 0x00000101UL
  ------------------
 5150|      0|    }
 5151|       |
 5152|       |    /* don't modify a token object if we aren't in a rw session */
 5153|  9.67k|    isToken = sftk_isTrue(object, CKA_TOKEN);
  ------------------
  |  |  512|  9.67k|#define CKA_TOKEN 0x00000001UL
  ------------------
 5154|  9.67k|    if (((session->info.flags & CKF_RW_SESSION) == 0) && isToken) {
  ------------------
  |  |  302|  9.67k|#define CKF_RW_SESSION 0x00000002UL     /* session is r/w */
  ------------------
  |  Branch (5154:9): [True: 9.67k, False: 0]
  |  Branch (5154:58): [True: 0, False: 9.67k]
  ------------------
 5155|      0|        sftk_FreeSession(session);
 5156|      0|        sftk_FreeObject(object);
 5157|      0|        return CKR_SESSION_READ_ONLY;
  ------------------
  |  | 1467|      0|#define CKR_SESSION_READ_ONLY 0x000000B5UL
  ------------------
 5158|      0|    }
 5159|  9.67k|    sftk_FreeSession(session);
 5160|       |
 5161|       |    /* only change modifiable objects */
 5162|  9.67k|    if (!sftk_isTrue(object, CKA_MODIFIABLE)) {
  ------------------
  |  |  593|  9.67k|#define CKA_MODIFIABLE 0x00000170UL
  ------------------
  |  Branch (5162:9): [True: 0, False: 9.67k]
  ------------------
 5163|      0|        sftk_FreeObject(object);
 5164|      0|        return CKR_ATTRIBUTE_READ_ONLY;
  ------------------
  |  | 1406|      0|#define CKR_ATTRIBUTE_READ_ONLY 0x00000010UL
  ------------------
 5165|      0|    }
 5166|       |
 5167|  19.3k|    for (i = 0; i < (int)ulCount; i++) {
  ------------------
  |  Branch (5167:17): [True: 9.67k, False: 9.67k]
  ------------------
 5168|       |        /* Make sure that this attribute is changeable */
 5169|  9.67k|        switch (sftk_modifyType(pTemplate[i].type, object->objclass)) {
 5170|      0|            case SFTK_NEVER:
  ------------------
  |  Branch (5170:13): [True: 0, False: 9.67k]
  ------------------
 5171|      0|            case SFTK_ONCOPY:
  ------------------
  |  Branch (5171:13): [True: 0, False: 9.67k]
  ------------------
 5172|      0|            default:
  ------------------
  |  Branch (5172:13): [True: 0, False: 9.67k]
  ------------------
 5173|      0|                crv = CKR_ATTRIBUTE_READ_ONLY;
  ------------------
  |  | 1406|      0|#define CKR_ATTRIBUTE_READ_ONLY 0x00000010UL
  ------------------
 5174|      0|                break;
 5175|       |
 5176|      0|            case SFTK_SENSITIVE:
  ------------------
  |  Branch (5176:13): [True: 0, False: 9.67k]
  ------------------
 5177|      0|                legal = (pTemplate[i].type == CKA_EXTRACTABLE) ? CK_FALSE : CK_TRUE;
  ------------------
  |  |  585|      0|#define CKA_EXTRACTABLE 0x00000162UL
  ------------------
                              legal = (pTemplate[i].type == CKA_EXTRACTABLE) ? CK_FALSE : CK_TRUE;
  ------------------
  |  |   23|      0|#define CK_FALSE 0
  ------------------
                              legal = (pTemplate[i].type == CKA_EXTRACTABLE) ? CK_FALSE : CK_TRUE;
  ------------------
  |  |   22|      0|#define CK_TRUE 1
  ------------------
  |  Branch (5177:25): [True: 0, False: 0]
  ------------------
 5178|      0|                if ((*(CK_BBOOL *)pTemplate[i].pValue) != legal) {
  ------------------
  |  Branch (5178:21): [True: 0, False: 0]
  ------------------
 5179|      0|                    crv = CKR_ATTRIBUTE_READ_ONLY;
  ------------------
  |  | 1406|      0|#define CKR_ATTRIBUTE_READ_ONLY 0x00000010UL
  ------------------
 5180|      0|                }
 5181|      0|                break;
 5182|  9.67k|            case SFTK_ALWAYS:
  ------------------
  |  Branch (5182:13): [True: 9.67k, False: 0]
  ------------------
 5183|  9.67k|                break;
 5184|  9.67k|        }
 5185|  9.67k|        if (crv != CKR_OK)
  ------------------
  |  | 1388|  9.67k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5185:13): [True: 0, False: 9.67k]
  ------------------
 5186|      0|            break;
 5187|       |
 5188|       |        /* find the old attribute */
 5189|  9.67k|        attribute = sftk_FindAttribute(object, pTemplate[i].type);
 5190|  9.67k|        if (attribute == NULL) {
  ------------------
  |  Branch (5190:13): [True: 0, False: 9.67k]
  ------------------
 5191|      0|            crv = CKR_ATTRIBUTE_TYPE_INVALID;
  ------------------
  |  | 1408|      0|#define CKR_ATTRIBUTE_TYPE_INVALID 0x00000012UL
  ------------------
 5192|      0|            break;
 5193|      0|        }
 5194|  9.67k|        sftk_FreeAttribute(attribute);
 5195|  9.67k|        crv = sftk_forceAttribute(object, sftk_attr_expand(&pTemplate[i]));
  ------------------
  |  |  587|  9.67k|#define sftk_attr_expand(ap) (ap)->type, (ap)->pValue, (ap)->ulValueLen
  ------------------
 5196|  9.67k|        if (crv != CKR_OK)
  ------------------
  |  | 1388|  9.67k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5196:13): [True: 0, False: 9.67k]
  ------------------
 5197|      0|            break;
 5198|  9.67k|    }
 5199|       |
 5200|  9.67k|    sftk_FreeObject(object);
 5201|  9.67k|    return crv;
 5202|  9.67k|}
sftk_emailhack:
 5250|  30.6k|{
 5251|  30.6k|    PRBool isCert = PR_FALSE;
  ------------------
  |  |  438|  30.6k|#define PR_FALSE 0
  ------------------
 5252|  30.6k|    int emailIndex = -1;
 5253|  30.6k|    unsigned int i;
 5254|  30.6k|    SFTKSearchResults smime_search;
 5255|  30.6k|    CK_ATTRIBUTE smime_template[2];
 5256|  30.6k|    CK_OBJECT_CLASS smime_class = CKO_NSS_SMIME;
  ------------------
  |  |   36|  30.6k|#define CKO_NSS_SMIME (CKO_NSS + 2)
  |  |  ------------------
  |  |  |  |   33|  30.6k|#define CKO_NSS (CKO_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|  30.6k|#define CKO_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKO_NSS (CKO_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  30.6k|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5257|  30.6k|    SFTKAttribute *attribute = NULL;
 5258|  30.6k|    SFTKObject *object = NULL;
 5259|  30.6k|    CK_RV crv = CKR_OK;
  ------------------
  |  | 1388|  30.6k|#define CKR_OK 0x00000000UL
  ------------------
 5260|       |
 5261|  30.6k|    smime_search.handles = NULL; /* paranoia, some one is bound to add a goto
 5262|       |                                  * loser before this gets initialized */
 5263|       |
 5264|       |    /* see if we are looking for email certs */
 5265|  92.0k|    for (i = 0; i < ulCount; i++) {
  ------------------
  |  Branch (5265:17): [True: 81.7k, False: 10.2k]
  ------------------
 5266|  81.7k|        if (pTemplate[i].type == CKA_CLASS) {
  ------------------
  |  |  511|  81.7k|#define CKA_CLASS 0x00000000UL
  ------------------
  |  Branch (5266:13): [True: 30.6k, False: 51.1k]
  ------------------
 5267|  30.6k|            if ((pTemplate[i].ulValueLen != sizeof(CK_OBJECT_CLASS) ||
  ------------------
  |  Branch (5267:18): [True: 0, False: 30.6k]
  ------------------
 5268|  30.6k|                 (*(CK_OBJECT_CLASS *)pTemplate[i].pValue) != CKO_CERTIFICATE)) {
  ------------------
  |  |  326|  30.6k|#define CKO_CERTIFICATE 0x00000001UL
  ------------------
  |  Branch (5268:18): [True: 20.3k, False: 10.2k]
  ------------------
 5269|       |                /* not a cert, skip out */
 5270|  20.3k|                break;
 5271|  20.3k|            }
 5272|  10.2k|            isCert = PR_TRUE;
  ------------------
  |  |  437|  10.2k|#define PR_TRUE 1
  ------------------
 5273|  51.1k|        } else if (pTemplate[i].type == CKA_NSS_EMAIL) {
  ------------------
  |  |   80|  51.1k|#define CKA_NSS_EMAIL (CKA_NSS + 2)
  |  |  ------------------
  |  |  |  |   77|  51.1k|#define CKA_NSS (CKA_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  692|  51.1k|#define CKA_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKA_NSS (CKA_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  51.1k|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (5273:20): [True: 0, False: 51.1k]
  ------------------
 5274|      0|            emailIndex = i;
 5275|      0|        }
 5276|  61.3k|        if (isCert && (emailIndex != -1))
  ------------------
  |  Branch (5276:13): [True: 30.7k, False: 30.6k]
  |  Branch (5276:23): [True: 0, False: 30.7k]
  ------------------
 5277|      0|            break;
 5278|  61.3k|    }
 5279|       |
 5280|  30.6k|    if (!isCert || (emailIndex == -1)) {
  ------------------
  |  Branch (5280:9): [True: 20.3k, False: 10.2k]
  |  Branch (5280:20): [True: 10.2k, False: 0]
  ------------------
 5281|  30.6k|        return CKR_OK;
  ------------------
  |  | 1388|  30.6k|#define CKR_OK 0x00000000UL
  ------------------
 5282|  30.6k|    }
 5283|       |
 5284|       |    /* we are doing a cert and email search, find the SMimeEntry */
 5285|      0|    smime_template[0].type = CKA_CLASS;
  ------------------
  |  |  511|      0|#define CKA_CLASS 0x00000000UL
  ------------------
 5286|      0|    smime_template[0].pValue = &smime_class;
 5287|      0|    smime_template[0].ulValueLen = sizeof(smime_class);
 5288|      0|    smime_template[1] = pTemplate[emailIndex];
 5289|       |
 5290|      0|    smime_search.handles = (CK_OBJECT_HANDLE *)
 5291|      0|        PORT_Alloc(sizeof(CK_OBJECT_HANDLE) * NSC_SEARCH_BLOCK_SIZE);
  ------------------
  |  |   52|      0|#define PORT_Alloc PORT_Alloc_Util
  ------------------
                      PORT_Alloc(sizeof(CK_OBJECT_HANDLE) * NSC_SEARCH_BLOCK_SIZE);
  ------------------
  |  |   49|      0|#define NSC_SEARCH_BLOCK_SIZE 5
  ------------------
 5292|      0|    if (smime_search.handles == NULL) {
  ------------------
  |  Branch (5292:9): [True: 0, False: 0]
  ------------------
 5293|      0|        crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 5294|      0|        goto loser;
 5295|      0|    }
 5296|      0|    smime_search.index = 0;
 5297|      0|    smime_search.size = 0;
 5298|      0|    smime_search.array_size = NSC_SEARCH_BLOCK_SIZE;
  ------------------
  |  |   49|      0|#define NSC_SEARCH_BLOCK_SIZE 5
  ------------------
 5299|       |
 5300|      0|    crv = sftk_searchDatabase(handle, &smime_search, smime_template, 2);
 5301|      0|    if (crv != CKR_OK || smime_search.size == 0) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5301:9): [True: 0, False: 0]
  |  Branch (5301:26): [True: 0, False: 0]
  ------------------
 5302|      0|        goto loser;
 5303|      0|    }
 5304|       |
 5305|       |    /* get the SMime subject */
 5306|      0|    object = sftk_NewTokenObject(slot, NULL, smime_search.handles[0]);
 5307|      0|    if (object == NULL) {
  ------------------
  |  Branch (5307:9): [True: 0, False: 0]
  ------------------
 5308|      0|        crv = CKR_HOST_MEMORY; /* is there any other reason for this failure? */
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 5309|      0|        goto loser;
 5310|      0|    }
 5311|      0|    attribute = sftk_FindAttribute(object, CKA_SUBJECT);
  ------------------
  |  |  544|      0|#define CKA_SUBJECT 0x00000101UL
  ------------------
 5312|      0|    if (attribute == NULL) {
  ------------------
  |  Branch (5312:9): [True: 0, False: 0]
  ------------------
 5313|      0|        crv = CKR_ATTRIBUTE_TYPE_INVALID;
  ------------------
  |  | 1408|      0|#define CKR_ATTRIBUTE_TYPE_INVALID 0x00000012UL
  ------------------
 5314|      0|        goto loser;
 5315|      0|    }
 5316|       |
 5317|       |    /* now find the certs with that subject */
 5318|      0|    pTemplate[emailIndex] = attribute->attrib;
 5319|       |    /* now add the appropriate certs to the search list */
 5320|      0|    crv = sftk_searchDatabase(handle, search, pTemplate, ulCount);
 5321|      0|    pTemplate[emailIndex] = smime_template[1]; /* restore the user's template*/
 5322|       |
 5323|      0|loser:
 5324|      0|    if (attribute) {
  ------------------
  |  Branch (5324:9): [True: 0, False: 0]
  ------------------
 5325|      0|        sftk_FreeAttribute(attribute);
 5326|      0|    }
 5327|      0|    if (object) {
  ------------------
  |  Branch (5327:9): [True: 0, False: 0]
  ------------------
 5328|      0|        sftk_FreeObject(object);
 5329|      0|    }
 5330|      0|    if (smime_search.handles) {
  ------------------
  |  Branch (5330:9): [True: 0, False: 0]
  ------------------
 5331|      0|        PORT_Free(smime_search.handles);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 5332|      0|    }
 5333|       |
 5334|      0|    return crv;
 5335|      0|}
NSC_FindObjectsInit:
 5392|  30.6k|{
 5393|  30.6k|    SFTKSearchResults *search = NULL, *freeSearch = NULL;
 5394|  30.6k|    SFTKSession *session = NULL;
 5395|  30.6k|    SFTKSlot *slot = sftk_SlotFromSessionHandle(hSession);
 5396|  30.6k|    CK_RV crv = CKR_OK;
  ------------------
  |  | 1388|  30.6k|#define CKR_OK 0x00000000UL
  ------------------
 5397|  30.6k|    PRBool isLoggedIn;
 5398|       |
 5399|  30.6k|    CHECK_FORK();
 5400|       |
 5401|  30.6k|    if (slot == NULL) {
  ------------------
  |  Branch (5401:9): [True: 0, False: 30.6k]
  ------------------
 5402|      0|        return CKR_SESSION_HANDLE_INVALID;
  ------------------
  |  | 1465|      0|#define CKR_SESSION_HANDLE_INVALID 0x000000B3UL
  ------------------
 5403|      0|    }
 5404|  30.6k|    session = sftk_SessionFromHandle(hSession);
 5405|  30.6k|    if (session == NULL) {
  ------------------
  |  Branch (5405:9): [True: 0, False: 30.6k]
  ------------------
 5406|      0|        crv = CKR_SESSION_HANDLE_INVALID;
  ------------------
  |  | 1465|      0|#define CKR_SESSION_HANDLE_INVALID 0x000000B3UL
  ------------------
 5407|      0|        goto loser;
 5408|      0|    }
 5409|       |
 5410|  30.6k|    search = (SFTKSearchResults *)PORT_Alloc(sizeof(SFTKSearchResults));
  ------------------
  |  |   52|  30.6k|#define PORT_Alloc PORT_Alloc_Util
  ------------------
 5411|  30.6k|    if (search == NULL) {
  ------------------
  |  Branch (5411:9): [True: 0, False: 30.6k]
  ------------------
 5412|      0|        crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 5413|      0|        goto loser;
 5414|      0|    }
 5415|  30.6k|    search->handles = (CK_OBJECT_HANDLE *)
 5416|  30.6k|        PORT_Alloc(sizeof(CK_OBJECT_HANDLE) * NSC_SEARCH_BLOCK_SIZE);
  ------------------
  |  |   52|  30.6k|#define PORT_Alloc PORT_Alloc_Util
  ------------------
                      PORT_Alloc(sizeof(CK_OBJECT_HANDLE) * NSC_SEARCH_BLOCK_SIZE);
  ------------------
  |  |   49|  30.6k|#define NSC_SEARCH_BLOCK_SIZE 5
  ------------------
 5417|  30.6k|    if (search->handles == NULL) {
  ------------------
  |  Branch (5417:9): [True: 0, False: 30.6k]
  ------------------
 5418|      0|        crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 5419|      0|        goto loser;
 5420|      0|    }
 5421|  30.6k|    search->index = 0;
 5422|  30.6k|    search->size = 0;
 5423|  30.6k|    search->array_size = NSC_SEARCH_BLOCK_SIZE;
  ------------------
  |  |   49|  30.6k|#define NSC_SEARCH_BLOCK_SIZE 5
  ------------------
 5424|       |
 5425|  30.6k|    PZ_Lock(slot->slotLock);
  ------------------
  |  |  245|  30.6k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
 5426|  30.6k|    isLoggedIn = (PRBool)((!slot->needLogin) || slot->isLoggedIn);
  ------------------
  |  Branch (5426:27): [True: 30.6k, False: 0]
  |  Branch (5426:49): [True: 0, False: 0]
  ------------------
 5427|  30.6k|    PZ_Unlock(slot->slotLock);
  ------------------
  |  |  246|  30.6k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
 5428|       |
 5429|  30.6k|    PRBool validTokenAttribute = PR_FALSE;
  ------------------
  |  |  438|  30.6k|#define PR_FALSE 0
  ------------------
 5430|  30.6k|    PRBool tokenAttributeValue = PR_FALSE;
  ------------------
  |  |  438|  30.6k|#define PR_FALSE 0
  ------------------
 5431|  30.6k|    for (CK_ULONG i = 0; i < ulCount; i++) {
  ------------------
  |  Branch (5431:26): [True: 30.6k, False: 2]
  ------------------
 5432|  30.6k|        CK_ATTRIBUTE_PTR attr = &pTemplate[i];
 5433|  30.6k|        if (attr->type == CKA_TOKEN && attr->pValue && attr->ulValueLen == sizeof(CK_BBOOL)) {
  ------------------
  |  |  512|  61.2k|#define CKA_TOKEN 0x00000001UL
  ------------------
  |  Branch (5433:13): [True: 30.6k, False: 2]
  |  Branch (5433:40): [True: 30.6k, False: 0]
  |  Branch (5433:56): [True: 30.6k, False: 0]
  ------------------
 5434|  30.6k|            if (*(CK_BBOOL *)attr->pValue == CK_TRUE) {
  ------------------
  |  |   22|  30.6k|#define CK_TRUE 1
  ------------------
  |  Branch (5434:17): [True: 30.6k, False: 0]
  ------------------
 5435|  30.6k|                validTokenAttribute = PR_TRUE;
  ------------------
  |  |  437|  30.6k|#define PR_TRUE 1
  ------------------
 5436|  30.6k|                tokenAttributeValue = PR_TRUE;
  ------------------
  |  |  437|  30.6k|#define PR_TRUE 1
  ------------------
 5437|  30.6k|            } else if (*(CK_BBOOL *)attr->pValue == CK_FALSE) {
  ------------------
  |  |   23|      0|#define CK_FALSE 0
  ------------------
  |  Branch (5437:24): [True: 0, False: 0]
  ------------------
 5438|      0|                validTokenAttribute = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 5439|      0|                tokenAttributeValue = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5440|      0|            }
 5441|  30.6k|            break;
 5442|  30.6k|        }
 5443|  30.6k|    }
 5444|       |
 5445|       |    // Search over the token object list if the template's CKA_TOKEN attribute is set to
 5446|       |    // CK_TRUE or if it is not set.
 5447|  30.6k|    if (validTokenAttribute == PR_FALSE || tokenAttributeValue == PR_TRUE) {
  ------------------
  |  |  438|  61.2k|#define PR_FALSE 0
  ------------------
                  if (validTokenAttribute == PR_FALSE || tokenAttributeValue == PR_TRUE) {
  ------------------
  |  |  437|  30.6k|#define PR_TRUE 1
  ------------------
  |  Branch (5447:9): [True: 2, False: 30.6k]
  |  Branch (5447:44): [True: 30.6k, False: 0]
  ------------------
 5448|  30.6k|        crv = sftk_searchTokenList(slot, search, pTemplate, ulCount, isLoggedIn);
 5449|  30.6k|        if (crv != CKR_OK) {
  ------------------
  |  | 1388|  30.6k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5449:13): [True: 0, False: 30.6k]
  ------------------
 5450|      0|            goto loser;
 5451|      0|        }
 5452|  30.6k|    }
 5453|       |
 5454|       |    // Search over the session object list if the template's CKA_TOKEN attribute is set to
 5455|       |    // CK_FALSE or if it is not set.
 5456|  30.6k|    if (validTokenAttribute == PR_FALSE || tokenAttributeValue == PR_FALSE) {
  ------------------
  |  |  438|  61.2k|#define PR_FALSE 0
  ------------------
                  if (validTokenAttribute == PR_FALSE || tokenAttributeValue == PR_FALSE) {
  ------------------
  |  |  438|  30.6k|#define PR_FALSE 0
  ------------------
  |  Branch (5456:9): [True: 2, False: 30.6k]
  |  Branch (5456:44): [True: 0, False: 30.6k]
  ------------------
 5457|      2|        crv = sftk_searchObjectList(search, slot->sessObjHashTable,
 5458|      2|                                    slot->sessObjHashSize, slot->objectLock,
 5459|      2|                                    pTemplate, ulCount, isLoggedIn);
 5460|      2|        if (crv != CKR_OK) {
  ------------------
  |  | 1388|      2|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5460:13): [True: 0, False: 2]
  ------------------
 5461|      0|            goto loser;
 5462|      0|        }
 5463|      2|    }
 5464|       |
 5465|  30.6k|    if ((freeSearch = session->search) != NULL) {
  ------------------
  |  Branch (5465:9): [True: 0, False: 30.6k]
  ------------------
 5466|      0|        session->search = NULL;
 5467|      0|        sftk_FreeSearch(freeSearch);
 5468|      0|    }
 5469|  30.6k|    session->search = search;
 5470|  30.6k|    sftk_FreeSession(session);
 5471|  30.6k|    return CKR_OK;
  ------------------
  |  | 1388|  30.6k|#define CKR_OK 0x00000000UL
  ------------------
 5472|       |
 5473|      0|loser:
 5474|      0|    if (search) {
  ------------------
  |  Branch (5474:9): [True: 0, False: 0]
  ------------------
 5475|      0|        sftk_FreeSearch(search);
 5476|      0|    }
 5477|      0|    if (session) {
  ------------------
  |  Branch (5477:9): [True: 0, False: 0]
  ------------------
 5478|      0|        sftk_FreeSession(session);
 5479|      0|    }
 5480|      0|    return crv;
 5481|  30.6k|}
NSC_FindObjects:
 5489|  30.6k|{
 5490|  30.6k|    SFTKSession *session;
 5491|  30.6k|    SFTKSearchResults *search;
 5492|  30.6k|    int transfer;
 5493|  30.6k|    int left;
 5494|       |
 5495|  30.6k|    CHECK_FORK();
 5496|       |
 5497|  30.6k|    *pulObjectCount = 0;
 5498|  30.6k|    session = sftk_SessionFromHandle(hSession);
 5499|  30.6k|    if (session == NULL)
  ------------------
  |  Branch (5499:9): [True: 0, False: 30.6k]
  ------------------
 5500|      0|        return CKR_SESSION_HANDLE_INVALID;
  ------------------
  |  | 1465|      0|#define CKR_SESSION_HANDLE_INVALID 0x000000B3UL
  ------------------
 5501|  30.6k|    if (session->search == NULL) {
  ------------------
  |  Branch (5501:9): [True: 0, False: 30.6k]
  ------------------
 5502|      0|        sftk_FreeSession(session);
 5503|      0|        return CKR_OK;
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
 5504|      0|    }
 5505|  30.6k|    search = session->search;
 5506|  30.6k|    left = session->search->size - session->search->index;
 5507|  30.6k|    transfer = ((int)ulMaxObjectCount > left) ? left : ulMaxObjectCount;
  ------------------
  |  Branch (5507:16): [True: 30.6k, False: 0]
  ------------------
 5508|  30.6k|    if (transfer > 0) {
  ------------------
  |  Branch (5508:9): [True: 0, False: 30.6k]
  ------------------
 5509|      0|        PORT_Memcpy(phObject, &search->handles[search->index],
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
 5510|      0|                    transfer * sizeof(CK_OBJECT_HANDLE));
 5511|  30.6k|    } else {
 5512|  30.6k|        *phObject = CK_INVALID_HANDLE;
  ------------------
  |  |   78|  30.6k|#define CK_INVALID_HANDLE 0
  ------------------
 5513|  30.6k|    }
 5514|       |
 5515|  30.6k|    search->index += transfer;
 5516|  30.6k|    if (search->index == search->size) {
  ------------------
  |  Branch (5516:9): [True: 30.6k, False: 0]
  ------------------
 5517|  30.6k|        session->search = NULL;
 5518|  30.6k|        sftk_FreeSearch(search);
 5519|  30.6k|    }
 5520|  30.6k|    *pulObjectCount = transfer;
 5521|  30.6k|    sftk_FreeSession(session);
 5522|  30.6k|    return CKR_OK;
  ------------------
  |  | 1388|  30.6k|#define CKR_OK 0x00000000UL
  ------------------
 5523|  30.6k|}
NSC_FindObjectsFinal:
 5528|  30.6k|{
 5529|  30.6k|    SFTKSession *session;
 5530|  30.6k|    SFTKSearchResults *search;
 5531|       |
 5532|  30.6k|    CHECK_FORK();
 5533|       |
 5534|  30.6k|    session = sftk_SessionFromHandle(hSession);
 5535|  30.6k|    if (session == NULL)
  ------------------
  |  Branch (5535:9): [True: 0, False: 30.6k]
  ------------------
 5536|      0|        return CKR_SESSION_HANDLE_INVALID;
  ------------------
  |  | 1465|      0|#define CKR_SESSION_HANDLE_INVALID 0x000000B3UL
  ------------------
 5537|  30.6k|    search = session->search;
 5538|  30.6k|    session->search = NULL;
 5539|  30.6k|    sftk_FreeSession(session);
 5540|  30.6k|    if (search != NULL) {
  ------------------
  |  Branch (5540:9): [True: 0, False: 30.6k]
  ------------------
 5541|      0|        sftk_FreeSearch(search);
 5542|      0|    }
 5543|  30.6k|    return CKR_OK;
  ------------------
  |  | 1388|  30.6k|#define CKR_OK 0x00000000UL
  ------------------
 5544|  30.6k|}
pkcs11.c:sftk_handleDataObject:
  805|  4.46k|{
  806|  4.46k|    CK_RV crv;
  807|       |
  808|       |    /* first reject private and token data objects */
  809|  4.46k|    if (sftk_isTrue(object, CKA_PRIVATE) || sftk_isTrue(object, CKA_TOKEN)) {
  ------------------
  |  |  513|  4.46k|#define CKA_PRIVATE 0x00000002UL
  ------------------
                  if (sftk_isTrue(object, CKA_PRIVATE) || sftk_isTrue(object, CKA_TOKEN)) {
  ------------------
  |  |  512|  4.46k|#define CKA_TOKEN 0x00000001UL
  ------------------
  |  Branch (809:9): [True: 0, False: 4.46k]
  |  Branch (809:45): [True: 0, False: 4.46k]
  ------------------
  810|      0|        return CKR_ATTRIBUTE_VALUE_INVALID;
  ------------------
  |  | 1409|      0|#define CKR_ATTRIBUTE_VALUE_INVALID 0x00000013UL
  ------------------
  811|      0|    }
  812|       |
  813|       |    /* now just verify the required date fields */
  814|  4.46k|    crv = sftk_defaultAttribute(object, CKA_APPLICATION, NULL, 0);
  ------------------
  |  |  515|  4.46k|#define CKA_APPLICATION 0x00000010UL
  ------------------
  815|  4.46k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  4.46k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (815:9): [True: 0, False: 4.46k]
  ------------------
  816|      0|        return crv;
  817|  4.46k|    crv = sftk_defaultAttribute(object, CKA_VALUE, NULL, 0);
  ------------------
  |  |  516|  4.46k|#define CKA_VALUE 0x00000011UL
  ------------------
  818|  4.46k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  4.46k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (818:9): [True: 0, False: 4.46k]
  ------------------
  819|      0|        return crv;
  820|       |
  821|  4.46k|    return CKR_OK;
  ------------------
  |  | 1388|  4.46k|#define CKR_OK 0x00000000UL
  ------------------
  822|  4.46k|}
pkcs11.c:sftk_handleKeyObject:
 1552|  65.2k|{
 1553|  65.2k|    SFTKAttribute *attribute;
 1554|  65.2k|    CK_KEY_TYPE key_type;
 1555|  65.2k|    CK_BBOOL ckfalse = CK_FALSE;
  ------------------
  |  |   23|  65.2k|#define CK_FALSE 0
  ------------------
 1556|  65.2k|    CK_RV crv;
 1557|       |
 1558|       |    /* verify the required fields */
 1559|  65.2k|    if (!sftk_hasAttribute(object, CKA_KEY_TYPE)) {
  ------------------
  |  |  543|  65.2k|#define CKA_KEY_TYPE 0x00000100UL
  ------------------
  |  Branch (1559:9): [True: 0, False: 65.2k]
  ------------------
 1560|      0|        return CKR_TEMPLATE_INCOMPLETE;
  ------------------
  |  | 1477|      0|#define CKR_TEMPLATE_INCOMPLETE 0x000000D0UL
  ------------------
 1561|      0|    }
 1562|       |
 1563|       |    /* now verify the common fields */
 1564|  65.2k|    crv = sftk_defaultAttribute(object, CKA_ID, NULL, 0);
  ------------------
  |  |  545|  65.2k|#define CKA_ID 0x00000102UL
  ------------------
 1565|  65.2k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  65.2k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1565:9): [True: 0, False: 65.2k]
  ------------------
 1566|      0|        return crv;
 1567|  65.2k|    crv = sftk_defaultAttribute(object, CKA_START_DATE, NULL, 0);
  ------------------
  |  |  556|  65.2k|#define CKA_START_DATE 0x00000110UL
  ------------------
 1568|  65.2k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  65.2k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1568:9): [True: 0, False: 65.2k]
  ------------------
 1569|      0|        return crv;
 1570|  65.2k|    crv = sftk_defaultAttribute(object, CKA_END_DATE, NULL, 0);
  ------------------
  |  |  557|  65.2k|#define CKA_END_DATE 0x00000111UL
  ------------------
 1571|  65.2k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  65.2k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1571:9): [True: 0, False: 65.2k]
  ------------------
 1572|      0|        return crv;
 1573|       |    /* CKA_DERIVE is common to all keys, but it's default value is
 1574|       |     * key dependent */
 1575|  65.2k|    crv = sftk_defaultAttribute(object, CKA_LOCAL, &ckfalse, sizeof(CK_BBOOL));
  ------------------
  |  |  586|  65.2k|#define CKA_LOCAL 0x00000163UL
  ------------------
 1576|  65.2k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  65.2k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1576:9): [True: 0, False: 65.2k]
  ------------------
 1577|      0|        return crv;
 1578|       |
 1579|       |    /* get the key type */
 1580|  65.2k|    attribute = sftk_FindAttribute(object, CKA_KEY_TYPE);
  ------------------
  |  |  543|  65.2k|#define CKA_KEY_TYPE 0x00000100UL
  ------------------
 1581|  65.2k|    if (!attribute) {
  ------------------
  |  Branch (1581:9): [True: 0, False: 65.2k]
  ------------------
 1582|      0|        return CKR_ATTRIBUTE_VALUE_INVALID;
  ------------------
  |  | 1409|      0|#define CKR_ATTRIBUTE_VALUE_INVALID 0x00000013UL
  ------------------
 1583|      0|    }
 1584|  65.2k|    key_type = *(CK_KEY_TYPE *)attribute->attrib.pValue;
 1585|  65.2k|    sftk_FreeAttribute(attribute);
 1586|       |
 1587|  65.2k|    switch (object->objclass) {
 1588|  13.4k|        case CKO_PUBLIC_KEY:
  ------------------
  |  |  327|  13.4k|#define CKO_PUBLIC_KEY 0x00000002UL
  ------------------
  |  Branch (1588:9): [True: 13.4k, False: 51.7k]
  ------------------
 1589|  13.4k|            return sftk_handlePublicKeyObject(session, object, key_type);
 1590|  9.67k|        case CKO_PRIVATE_KEY:
  ------------------
  |  |  328|  9.67k|#define CKO_PRIVATE_KEY 0x00000003UL
  ------------------
  |  Branch (1590:9): [True: 9.67k, False: 55.5k]
  ------------------
 1591|  9.67k|            return sftk_handlePrivateKeyObject(session, object, key_type);
 1592|  42.0k|        case CKO_SECRET_KEY:
  ------------------
  |  |  329|  42.0k|#define CKO_SECRET_KEY 0x00000004UL
  ------------------
  |  Branch (1592:9): [True: 42.0k, False: 23.1k]
  ------------------
 1593|       |            /* make sure the required fields exist */
 1594|  42.0k|            return sftk_handleSecretKeyObject(session, object, key_type,
 1595|  42.0k|                                              (PRBool)(sftk_isFIPS(session->slot->slotID)));
  ------------------
  |  |  506|  42.0k|    (((id) == FIPS_SLOT_ID) || ((id) >= SFTK_MIN_FIPS_USER_SLOT_ID))
  |  |  ------------------
  |  |  |  |  500|  42.0k|#define FIPS_SLOT_ID 3
  |  |  ------------------
  |  |                   (((id) == FIPS_SLOT_ID) || ((id) >= SFTK_MIN_FIPS_USER_SLOT_ID))
  |  |  ------------------
  |  |  |  |  567|  42.0k|#define SFTK_MIN_FIPS_USER_SLOT_ID 101
  |  |  ------------------
  |  |  |  Branch (506:6): [True: 0, False: 42.0k]
  |  |  |  Branch (506:32): [True: 0, False: 42.0k]
  |  |  ------------------
  ------------------
 1596|      0|        default:
  ------------------
  |  Branch (1596:9): [True: 0, False: 65.2k]
  ------------------
 1597|      0|            break;
 1598|  65.2k|    }
 1599|      0|    return CKR_ATTRIBUTE_VALUE_INVALID;
  ------------------
  |  | 1409|      0|#define CKR_ATTRIBUTE_VALUE_INVALID 0x00000013UL
  ------------------
 1600|  65.2k|}
pkcs11.c:sftk_handlePublicKeyObject:
 1031|  13.4k|{
 1032|  13.4k|    CK_BBOOL encrypt = CK_TRUE;
  ------------------
  |  |   22|  13.4k|#define CK_TRUE 1
  ------------------
 1033|  13.4k|    CK_BBOOL recover = CK_TRUE;
  ------------------
  |  |   22|  13.4k|#define CK_TRUE 1
  ------------------
 1034|  13.4k|    CK_BBOOL wrap = CK_TRUE;
  ------------------
  |  |   22|  13.4k|#define CK_TRUE 1
  ------------------
 1035|  13.4k|    CK_BBOOL derive = CK_FALSE;
  ------------------
  |  |   23|  13.4k|#define CK_FALSE 0
  ------------------
 1036|  13.4k|    CK_BBOOL verify = CK_TRUE;
  ------------------
  |  |   22|  13.4k|#define CK_TRUE 1
  ------------------
 1037|  13.4k|    CK_RV crv;
 1038|       |
 1039|  13.4k|    switch (key_type) {
 1040|  2.42k|        case CKK_RSA:
  ------------------
  |  |  372|  2.42k|#define CKK_RSA 0x00000000UL
  ------------------
  |  Branch (1040:9): [True: 2.42k, False: 11.0k]
  ------------------
 1041|  2.42k|            crv = sftk_ConstrainAttribute(object, CKA_MODULUS,
  ------------------
  |  |  558|  2.42k|#define CKA_MODULUS 0x00000120UL
  ------------------
 1042|  2.42k|                                          RSA_MIN_MODULUS_BITS, 0, 0);
  ------------------
  |  |  151|  2.42k|#define RSA_MIN_MODULUS_BITS 128
  ------------------
 1043|  2.42k|            if (crv != CKR_OK) {
  ------------------
  |  | 1388|  2.42k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1043:17): [True: 0, False: 2.42k]
  ------------------
 1044|      0|                return crv;
 1045|      0|            }
 1046|  2.42k|            crv = sftk_ConstrainAttribute(object, CKA_PUBLIC_EXPONENT, 2, 0, 0);
  ------------------
  |  |  560|  2.42k|#define CKA_PUBLIC_EXPONENT 0x00000122UL
  ------------------
 1047|  2.42k|            if (crv != CKR_OK) {
  ------------------
  |  | 1388|  2.42k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1047:17): [True: 6, False: 2.42k]
  ------------------
 1048|      6|                return crv;
 1049|      6|            }
 1050|  2.42k|            break;
 1051|  2.42k|        case CKK_DSA:
  ------------------
  |  |  373|  1.14k|#define CKK_DSA 0x00000001UL
  ------------------
  |  Branch (1051:9): [True: 1.14k, False: 12.3k]
  ------------------
 1052|  1.14k|            crv = sftk_ConstrainAttribute(object, CKA_SUBPRIME,
  ------------------
  |  |  570|  1.14k|#define CKA_SUBPRIME 0x00000131UL
  ------------------
 1053|  1.14k|                                          DSA_MIN_Q_BITS, DSA_MAX_Q_BITS, 0);
  ------------------
  |  |  200|  1.14k|#define DSA_MIN_Q_BITS 160
  ------------------
                                                        DSA_MIN_Q_BITS, DSA_MAX_Q_BITS, 0);
  ------------------
  |  |  199|  1.14k|#define DSA_MAX_Q_BITS 256
  ------------------
 1054|  1.14k|            if (crv != CKR_OK) {
  ------------------
  |  | 1388|  1.14k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1054:17): [True: 0, False: 1.14k]
  ------------------
 1055|      0|                return crv;
 1056|      0|            }
 1057|  1.14k|            crv = sftk_ConstrainAttribute(object, CKA_PRIME,
  ------------------
  |  |  569|  1.14k|#define CKA_PRIME 0x00000130UL
  ------------------
 1058|  1.14k|                                          DSA_MIN_P_BITS, DSA_MAX_P_BITS, 64);
  ------------------
  |  |  198|  1.14k|#define DSA_MIN_P_BITS 512
  ------------------
                                                        DSA_MIN_P_BITS, DSA_MAX_P_BITS, 64);
  ------------------
  |  |  197|  1.14k|#define DSA_MAX_P_BITS 3072
  ------------------
 1059|  1.14k|            if (crv != CKR_OK) {
  ------------------
  |  | 1388|  1.14k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1059:17): [True: 3, False: 1.13k]
  ------------------
 1060|      3|                return crv;
 1061|      3|            }
 1062|  1.13k|            crv = sftk_ConstrainAttribute(object, CKA_BASE, 2, DSA_MAX_P_BITS, 0);
  ------------------
  |  |  571|  1.13k|#define CKA_BASE 0x00000132UL
  ------------------
                          crv = sftk_ConstrainAttribute(object, CKA_BASE, 2, DSA_MAX_P_BITS, 0);
  ------------------
  |  |  197|  1.13k|#define DSA_MAX_P_BITS 3072
  ------------------
 1063|  1.13k|            if (crv != CKR_OK) {
  ------------------
  |  | 1388|  1.13k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1063:17): [True: 0, False: 1.13k]
  ------------------
 1064|      0|                return crv;
 1065|      0|            }
 1066|  1.13k|            crv = sftk_ConstrainAttribute(object, CKA_VALUE, 2, DSA_MAX_P_BITS, 0);
  ------------------
  |  |  516|  1.13k|#define CKA_VALUE 0x00000011UL
  ------------------
                          crv = sftk_ConstrainAttribute(object, CKA_VALUE, 2, DSA_MAX_P_BITS, 0);
  ------------------
  |  |  197|  1.13k|#define DSA_MAX_P_BITS 3072
  ------------------
 1067|  1.13k|            if (crv != CKR_OK) {
  ------------------
  |  | 1388|  1.13k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1067:17): [True: 0, False: 1.13k]
  ------------------
 1068|      0|                return crv;
 1069|      0|            }
 1070|  1.13k|            encrypt = CK_FALSE;
  ------------------
  |  |   23|  1.13k|#define CK_FALSE 0
  ------------------
 1071|  1.13k|            recover = CK_FALSE;
  ------------------
  |  |   23|  1.13k|#define CK_FALSE 0
  ------------------
 1072|  1.13k|            wrap = CK_FALSE;
  ------------------
  |  |   23|  1.13k|#define CK_FALSE 0
  ------------------
 1073|  1.13k|            break;
 1074|  1.13k|        case CKK_DH:
  ------------------
  |  |  374|  1.13k|#define CKK_DH 0x00000002UL
  ------------------
  |  Branch (1074:9): [True: 1.13k, False: 12.3k]
  ------------------
 1075|  1.13k|            crv = sftk_ConstrainAttribute(object, CKA_PRIME,
  ------------------
  |  |  569|  1.13k|#define CKA_PRIME 0x00000130UL
  ------------------
 1076|  1.13k|                                          DH_MIN_P_BITS, DH_MAX_P_BITS, 0);
  ------------------
  |  |  154|  1.13k|#define DH_MIN_P_BITS 128
  ------------------
                                                        DH_MIN_P_BITS, DH_MAX_P_BITS, 0);
  ------------------
  |  |  155|  1.13k|#define DH_MAX_P_BITS 16384
  ------------------
 1077|  1.13k|            if (crv != CKR_OK) {
  ------------------
  |  | 1388|  1.13k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1077:17): [True: 0, False: 1.13k]
  ------------------
 1078|      0|                return crv;
 1079|      0|            }
 1080|  1.13k|            crv = sftk_ConstrainAttribute(object, CKA_BASE, 2, DH_MAX_P_BITS, 0);
  ------------------
  |  |  571|  1.13k|#define CKA_BASE 0x00000132UL
  ------------------
                          crv = sftk_ConstrainAttribute(object, CKA_BASE, 2, DH_MAX_P_BITS, 0);
  ------------------
  |  |  155|  1.13k|#define DH_MAX_P_BITS 16384
  ------------------
 1081|  1.13k|            if (crv != CKR_OK) {
  ------------------
  |  | 1388|  1.13k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1081:17): [True: 1, False: 1.13k]
  ------------------
 1082|      1|                return crv;
 1083|      1|            }
 1084|  1.13k|            crv = sftk_ConstrainAttribute(object, CKA_VALUE, 2, DH_MAX_P_BITS, 0);
  ------------------
  |  |  516|  1.13k|#define CKA_VALUE 0x00000011UL
  ------------------
                          crv = sftk_ConstrainAttribute(object, CKA_VALUE, 2, DH_MAX_P_BITS, 0);
  ------------------
  |  |  155|  1.13k|#define DH_MAX_P_BITS 16384
  ------------------
 1085|  1.13k|            if (crv != CKR_OK) {
  ------------------
  |  | 1388|  1.13k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1085:17): [True: 0, False: 1.13k]
  ------------------
 1086|      0|                return crv;
 1087|      0|            }
 1088|  1.13k|            verify = CK_FALSE;
  ------------------
  |  |   23|  1.13k|#define CK_FALSE 0
  ------------------
 1089|  1.13k|            derive = CK_TRUE;
  ------------------
  |  |   22|  1.13k|#define CK_TRUE 1
  ------------------
 1090|  1.13k|            encrypt = CK_FALSE;
  ------------------
  |  |   23|  1.13k|#define CK_FALSE 0
  ------------------
 1091|  1.13k|            recover = CK_FALSE;
  ------------------
  |  |   23|  1.13k|#define CK_FALSE 0
  ------------------
 1092|  1.13k|            wrap = CK_FALSE;
  ------------------
  |  |   23|  1.13k|#define CK_FALSE 0
  ------------------
 1093|  1.13k|            break;
 1094|      0|        case CKK_EC_MONTGOMERY:
  ------------------
  |  |  449|      0|#define CKK_EC_MONTGOMERY 0x00000041UL
  ------------------
  |  Branch (1094:9): [True: 0, False: 13.4k]
  ------------------
 1095|      0|        case CKK_EC_EDWARDS:
  ------------------
  |  |  448|      0|#define CKK_EC_EDWARDS 0x00000040UL
  ------------------
  |  Branch (1095:9): [True: 0, False: 13.4k]
  ------------------
 1096|  8.74k|        case CKK_EC:
  ------------------
  |  |  379|  8.74k|#define CKK_EC 0x00000003UL
  ------------------
  |  Branch (1096:9): [True: 8.74k, False: 4.74k]
  ------------------
 1097|  8.74k|            if (!sftk_hasAttribute(object, CKA_EC_PARAMS)) {
  ------------------
  |  |  602|  8.74k|#define CKA_EC_PARAMS 0x00000180UL
  ------------------
  |  Branch (1097:17): [True: 0, False: 8.74k]
  ------------------
 1098|      0|                return CKR_TEMPLATE_INCOMPLETE;
  ------------------
  |  | 1477|      0|#define CKR_TEMPLATE_INCOMPLETE 0x000000D0UL
  ------------------
 1099|      0|            }
 1100|  8.74k|            if (!sftk_hasAttribute(object, CKA_EC_POINT)) {
  ------------------
  |  |  604|  8.74k|#define CKA_EC_POINT 0x00000181UL
  ------------------
  |  Branch (1100:17): [True: 0, False: 8.74k]
  ------------------
 1101|      0|                return CKR_TEMPLATE_INCOMPLETE;
  ------------------
  |  | 1477|      0|#define CKR_TEMPLATE_INCOMPLETE 0x000000D0UL
  ------------------
 1102|      0|            }
 1103|       |            /* for ECDSA and EDDSA. Change if the structure of any of them is modified. */
 1104|  8.74k|            derive = (key_type == CKK_EC_EDWARDS) ? CK_FALSE : CK_TRUE;    /* CK_TRUE for ECDH */
  ------------------
  |  |  448|  8.74k|#define CKK_EC_EDWARDS 0x00000040UL
  ------------------
                          derive = (key_type == CKK_EC_EDWARDS) ? CK_FALSE : CK_TRUE;    /* CK_TRUE for ECDH */
  ------------------
  |  |   23|      0|#define CK_FALSE 0
  ------------------
                          derive = (key_type == CKK_EC_EDWARDS) ? CK_FALSE : CK_TRUE;    /* CK_TRUE for ECDH */
  ------------------
  |  |   22|  17.4k|#define CK_TRUE 1
  ------------------
  |  Branch (1104:22): [True: 0, False: 8.74k]
  ------------------
 1105|  8.74k|            verify = (key_type == CKK_EC_MONTGOMERY) ? CK_FALSE : CK_TRUE; /* for ECDSA and EDDSA */
  ------------------
  |  |  449|  8.74k|#define CKK_EC_MONTGOMERY 0x00000041UL
  ------------------
                          verify = (key_type == CKK_EC_MONTGOMERY) ? CK_FALSE : CK_TRUE; /* for ECDSA and EDDSA */
  ------------------
  |  |   23|      0|#define CK_FALSE 0
  ------------------
                          verify = (key_type == CKK_EC_MONTGOMERY) ? CK_FALSE : CK_TRUE; /* for ECDSA and EDDSA */
  ------------------
  |  |   22|  17.4k|#define CK_TRUE 1
  ------------------
  |  Branch (1105:22): [True: 0, False: 8.74k]
  ------------------
 1106|  8.74k|            encrypt = CK_FALSE;
  ------------------
  |  |   23|  8.74k|#define CK_FALSE 0
  ------------------
 1107|  8.74k|            recover = CK_FALSE;
  ------------------
  |  |   23|  8.74k|#define CK_FALSE 0
  ------------------
 1108|  8.74k|            wrap = CK_FALSE;
  ------------------
  |  |   23|  8.74k|#define CK_FALSE 0
  ------------------
 1109|  8.74k|            break;
 1110|     40|        case CKK_NSS_KYBER:
  ------------------
  |  |   58|     40|#define CKK_NSS_KYBER (CKK_NSS + 5)
  |  |  ------------------
  |  |  |  |   49|     40|#define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  458|     40|#define CKK_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     40|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1110:9): [True: 40, False: 13.4k]
  ------------------
 1111|     40|        case CKK_NSS_ML_KEM:
  ------------------
  |  |   59|     40|#define CKK_NSS_ML_KEM (CKK_NSS + 6)
  |  |  ------------------
  |  |  |  |   49|     40|#define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  458|     40|#define CKK_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     40|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1111:9): [True: 0, False: 13.4k]
  ------------------
 1112|     40|            if (!sftk_hasAttribute(object, CKA_NSS_PARAMETER_SET)) {
  ------------------
  |  |  113|     40|#define CKA_NSS_PARAMETER_SET (CKA_NSS + 40)
  |  |  ------------------
  |  |  |  |   77|     40|#define CKA_NSS (CKA_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  692|     40|#define CKA_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKA_NSS (CKA_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     40|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1112:17): [True: 0, False: 40]
  ------------------
 1113|      0|                return CKR_TEMPLATE_INCOMPLETE;
  ------------------
  |  | 1477|      0|#define CKR_TEMPLATE_INCOMPLETE 0x000000D0UL
  ------------------
 1114|      0|            }
 1115|     40|            derive = CK_FALSE;
  ------------------
  |  |   23|     40|#define CK_FALSE 0
  ------------------
 1116|     40|            verify = CK_FALSE;
  ------------------
  |  |   23|     40|#define CK_FALSE 0
  ------------------
 1117|     40|            encrypt = CK_FALSE;
  ------------------
  |  |   23|     40|#define CK_FALSE 0
  ------------------
 1118|     40|            recover = CK_FALSE;
  ------------------
  |  |   23|     40|#define CK_FALSE 0
  ------------------
 1119|     40|            wrap = CK_FALSE;
  ------------------
  |  |   23|     40|#define CK_FALSE 0
  ------------------
 1120|     40|            break;
 1121|      0|        default:
  ------------------
  |  Branch (1121:9): [True: 0, False: 13.4k]
  ------------------
 1122|      0|            return CKR_ATTRIBUTE_VALUE_INVALID;
  ------------------
  |  | 1409|      0|#define CKR_ATTRIBUTE_VALUE_INVALID 0x00000013UL
  ------------------
 1123|  13.4k|    }
 1124|       |
 1125|       |    /* make sure the required fields exist */
 1126|  13.4k|    crv = sftk_defaultAttribute(object, CKA_SUBJECT, NULL, 0);
  ------------------
  |  |  544|  13.4k|#define CKA_SUBJECT 0x00000101UL
  ------------------
 1127|  13.4k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  13.4k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1127:9): [True: 0, False: 13.4k]
  ------------------
 1128|      0|        return crv;
 1129|  13.4k|    crv = sftk_defaultAttribute(object, CKA_ENCRYPT, &encrypt, sizeof(CK_BBOOL));
  ------------------
  |  |  547|  13.4k|#define CKA_ENCRYPT 0x00000104UL
  ------------------
 1130|  13.4k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  13.4k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1130:9): [True: 0, False: 13.4k]
  ------------------
 1131|      0|        return crv;
 1132|  13.4k|    crv = sftk_defaultAttribute(object, CKA_VERIFY, &verify, sizeof(CK_BBOOL));
  ------------------
  |  |  553|  13.4k|#define CKA_VERIFY 0x0000010AUL
  ------------------
 1133|  13.4k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  13.4k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1133:9): [True: 0, False: 13.4k]
  ------------------
 1134|      0|        return crv;
 1135|  13.4k|    crv = sftk_defaultAttribute(object, CKA_VERIFY_RECOVER,
  ------------------
  |  |  554|  13.4k|#define CKA_VERIFY_RECOVER 0x0000010BUL
  ------------------
 1136|  13.4k|                                &recover, sizeof(CK_BBOOL));
 1137|  13.4k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  13.4k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1137:9): [True: 0, False: 13.4k]
  ------------------
 1138|      0|        return crv;
 1139|  13.4k|    crv = sftk_defaultAttribute(object, CKA_WRAP, &wrap, sizeof(CK_BBOOL));
  ------------------
  |  |  549|  13.4k|#define CKA_WRAP 0x00000106UL
  ------------------
 1140|  13.4k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  13.4k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1140:9): [True: 0, False: 13.4k]
  ------------------
 1141|      0|        return crv;
 1142|  13.4k|    crv = sftk_defaultAttribute(object, CKA_DERIVE, &derive, sizeof(CK_BBOOL));
  ------------------
  |  |  555|  13.4k|#define CKA_DERIVE 0x0000010CUL
  ------------------
 1143|  13.4k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  13.4k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1143:9): [True: 0, False: 13.4k]
  ------------------
 1144|      0|        return crv;
 1145|       |
 1146|  13.4k|    object->objectInfo = sftk_GetPubKey(object, key_type, &crv);
 1147|  13.4k|    if (object->objectInfo == NULL) {
  ------------------
  |  Branch (1147:9): [True: 67, False: 13.4k]
  ------------------
 1148|     67|        return crv;
 1149|     67|    }
 1150|  13.4k|    object->infoFree = SFTKFree_nsslowkey_DestroyPublicKey;
 1151|       |
 1152|       |    /* Check that an imported EC key is valid */
 1153|  13.4k|    if (key_type == CKK_EC || key_type == CKK_EC_EDWARDS || key_type == CKK_EC_MONTGOMERY) {
  ------------------
  |  |  379|  26.8k|#define CKK_EC 0x00000003UL
  ------------------
                  if (key_type == CKK_EC || key_type == CKK_EC_EDWARDS || key_type == CKK_EC_MONTGOMERY) {
  ------------------
  |  |  448|  18.1k|#define CKK_EC_EDWARDS 0x00000040UL
  ------------------
                  if (key_type == CKK_EC || key_type == CKK_EC_EDWARDS || key_type == CKK_EC_MONTGOMERY) {
  ------------------
  |  |  449|  4.73k|#define CKK_EC_MONTGOMERY 0x00000041UL
  ------------------
  |  Branch (1153:9): [True: 8.68k, False: 4.73k]
  |  Branch (1153:31): [True: 0, False: 4.73k]
  |  Branch (1153:61): [True: 0, False: 4.73k]
  ------------------
 1154|  8.68k|        NSSLOWKEYPublicKey *pubKey = (NSSLOWKEYPublicKey *)object->objectInfo;
 1155|  8.68k|        SECStatus rv = EC_ValidatePublicKey(&pubKey->u.ec.ecParams,
 1156|  8.68k|                                            &pubKey->u.ec.publicValue);
 1157|       |
 1158|  8.68k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (1158:13): [True: 30, False: 8.65k]
  ------------------
 1159|     30|            return CKR_TEMPLATE_INCONSISTENT;
  ------------------
  |  | 1478|     30|#define CKR_TEMPLATE_INCONSISTENT 0x000000D1UL
  ------------------
 1160|     30|        }
 1161|  8.68k|    }
 1162|       |
 1163|  13.3k|    if (sftk_isTrue(object, CKA_TOKEN)) {
  ------------------
  |  |  512|  13.3k|#define CKA_TOKEN 0x00000001UL
  ------------------
  |  Branch (1163:9): [True: 0, False: 13.3k]
  ------------------
 1164|      0|        SFTKSlot *slot = session->slot;
 1165|      0|        SFTKDBHandle *certHandle = sftk_getCertDB(slot);
 1166|       |
 1167|      0|        if (certHandle == NULL) {
  ------------------
  |  Branch (1167:13): [True: 0, False: 0]
  ------------------
 1168|      0|            return CKR_TOKEN_WRITE_PROTECTED;
  ------------------
  |  | 1481|      0|#define CKR_TOKEN_WRITE_PROTECTED 0x000000E2UL
  ------------------
 1169|      0|        }
 1170|       |
 1171|      0|        crv = sftkdb_write(certHandle, object, &object->handle);
 1172|      0|        sftk_freeDB(certHandle);
 1173|      0|        return crv;
 1174|      0|    }
 1175|       |
 1176|  13.3k|    return CKR_OK;
  ------------------
  |  | 1388|  13.3k|#define CKR_OK 0x00000000UL
  ------------------
 1177|  13.3k|}
pkcs11.c:sftk_handlePrivateKeyObject:
 1190|  9.67k|{
 1191|  9.67k|    CK_BBOOL cktrue = CK_TRUE;
  ------------------
  |  |   22|  9.67k|#define CK_TRUE 1
  ------------------
 1192|  9.67k|    CK_BBOOL encrypt = CK_TRUE;
  ------------------
  |  |   22|  9.67k|#define CK_TRUE 1
  ------------------
 1193|  9.67k|    CK_BBOOL sign = CK_FALSE;
  ------------------
  |  |   23|  9.67k|#define CK_FALSE 0
  ------------------
 1194|  9.67k|    CK_BBOOL recover = CK_TRUE;
  ------------------
  |  |   22|  9.67k|#define CK_TRUE 1
  ------------------
 1195|  9.67k|    CK_BBOOL wrap = CK_TRUE;
  ------------------
  |  |   22|  9.67k|#define CK_TRUE 1
  ------------------
 1196|  9.67k|    CK_BBOOL derive = CK_TRUE;
  ------------------
  |  |   22|  9.67k|#define CK_TRUE 1
  ------------------
 1197|  9.67k|    CK_BBOOL ckfalse = CK_FALSE;
  ------------------
  |  |   23|  9.67k|#define CK_FALSE 0
  ------------------
 1198|  9.67k|    PRBool createObjectInfo = PR_TRUE;
  ------------------
  |  |  437|  9.67k|#define PR_TRUE 1
  ------------------
 1199|  9.67k|    PRBool fillPrivateKey = PR_FALSE;
  ------------------
  |  |  438|  9.67k|#define PR_FALSE 0
  ------------------
 1200|  9.67k|    int missing_rsa_mod_component = 0;
 1201|  9.67k|    int missing_rsa_exp_component = 0;
 1202|  9.67k|    int missing_rsa_crt_component = 0;
 1203|       |
 1204|  9.67k|    SECItem mod;
 1205|  9.67k|    CK_RV crv;
 1206|  9.67k|    SECStatus rv;
 1207|       |
 1208|  9.67k|    switch (key_type) {
 1209|      0|        case CKK_RSA:
  ------------------
  |  |  372|      0|#define CKK_RSA 0x00000000UL
  ------------------
  |  Branch (1209:9): [True: 0, False: 9.67k]
  ------------------
 1210|      0|            if (!sftk_hasAttribute(object, CKA_MODULUS)) {
  ------------------
  |  |  558|      0|#define CKA_MODULUS 0x00000120UL
  ------------------
  |  Branch (1210:17): [True: 0, False: 0]
  ------------------
 1211|      0|                missing_rsa_mod_component++;
 1212|      0|            }
 1213|      0|            if (!sftk_hasAttribute(object, CKA_PUBLIC_EXPONENT)) {
  ------------------
  |  |  560|      0|#define CKA_PUBLIC_EXPONENT 0x00000122UL
  ------------------
  |  Branch (1213:17): [True: 0, False: 0]
  ------------------
 1214|      0|                missing_rsa_exp_component++;
 1215|      0|            }
 1216|      0|            if (!sftk_hasAttribute(object, CKA_PRIVATE_EXPONENT)) {
  ------------------
  |  |  561|      0|#define CKA_PRIVATE_EXPONENT 0x00000123UL
  ------------------
  |  Branch (1216:17): [True: 0, False: 0]
  ------------------
 1217|      0|                missing_rsa_exp_component++;
 1218|      0|            }
 1219|      0|            if (!sftk_hasAttribute(object, CKA_PRIME_1)) {
  ------------------
  |  |  562|      0|#define CKA_PRIME_1 0x00000124UL
  ------------------
  |  Branch (1219:17): [True: 0, False: 0]
  ------------------
 1220|      0|                missing_rsa_mod_component++;
 1221|      0|            }
 1222|      0|            if (!sftk_hasAttribute(object, CKA_PRIME_2)) {
  ------------------
  |  |  563|      0|#define CKA_PRIME_2 0x00000125UL
  ------------------
  |  Branch (1222:17): [True: 0, False: 0]
  ------------------
 1223|      0|                missing_rsa_mod_component++;
 1224|      0|            }
 1225|      0|            if (!sftk_hasAttribute(object, CKA_EXPONENT_1)) {
  ------------------
  |  |  564|      0|#define CKA_EXPONENT_1 0x00000126UL
  ------------------
  |  Branch (1225:17): [True: 0, False: 0]
  ------------------
 1226|      0|                missing_rsa_crt_component++;
 1227|      0|            }
 1228|      0|            if (!sftk_hasAttribute(object, CKA_EXPONENT_2)) {
  ------------------
  |  |  565|      0|#define CKA_EXPONENT_2 0x00000127UL
  ------------------
  |  Branch (1228:17): [True: 0, False: 0]
  ------------------
 1229|      0|                missing_rsa_crt_component++;
 1230|      0|            }
 1231|      0|            if (!sftk_hasAttribute(object, CKA_COEFFICIENT)) {
  ------------------
  |  |  566|      0|#define CKA_COEFFICIENT 0x00000128UL
  ------------------
  |  Branch (1231:17): [True: 0, False: 0]
  ------------------
 1232|      0|                missing_rsa_crt_component++;
 1233|      0|            }
 1234|      0|            if (missing_rsa_mod_component || missing_rsa_exp_component ||
  ------------------
  |  Branch (1234:17): [True: 0, False: 0]
  |  Branch (1234:46): [True: 0, False: 0]
  ------------------
 1235|      0|                missing_rsa_crt_component) {
  ------------------
  |  Branch (1235:17): [True: 0, False: 0]
  ------------------
 1236|       |                /* we are missing a component, see if we have enough to rebuild
 1237|       |                 * the rest */
 1238|      0|                int have_exp = 2 - missing_rsa_exp_component;
 1239|      0|                int have_component = 5 -
 1240|      0|                                     (missing_rsa_exp_component + missing_rsa_mod_component);
 1241|       |
 1242|      0|                if ((have_exp == 0) || (have_component < 3)) {
  ------------------
  |  Branch (1242:21): [True: 0, False: 0]
  |  Branch (1242:40): [True: 0, False: 0]
  ------------------
 1243|       |                    /* nope, not enough to reconstruct the private key */
 1244|      0|                    return CKR_TEMPLATE_INCOMPLETE;
  ------------------
  |  | 1477|      0|#define CKR_TEMPLATE_INCOMPLETE 0x000000D0UL
  ------------------
 1245|      0|                }
 1246|      0|                fillPrivateKey = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 1247|      0|            }
 1248|       |            /*verify the parameters for consistency*/
 1249|      0|            rv = sftk_verifyRSAPrivateKey(object, fillPrivateKey);
 1250|      0|            if (rv != SECSuccess) {
  ------------------
  |  Branch (1250:17): [True: 0, False: 0]
  ------------------
 1251|      0|                return CKR_TEMPLATE_INCOMPLETE;
  ------------------
  |  | 1477|      0|#define CKR_TEMPLATE_INCOMPLETE 0x000000D0UL
  ------------------
 1252|      0|            }
 1253|       |
 1254|       |            /* make sure Netscape DB attribute is set correctly */
 1255|      0|            crv = sftk_Attribute2SSecItem(NULL, &mod, object, CKA_MODULUS);
  ------------------
  |  |  558|      0|#define CKA_MODULUS 0x00000120UL
  ------------------
 1256|      0|            if (crv != CKR_OK)
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1256:17): [True: 0, False: 0]
  ------------------
 1257|      0|                return crv;
 1258|      0|            crv = sftk_forceAttribute(object, CKA_NSS_DB,
  ------------------
  |  |  150|      0|#define CKA_NSS_DB 0xD5A0DB00L
  ------------------
 1259|      0|                                      sftk_item_expand(&mod));
  ------------------
  |  |  588|      0|#define sftk_item_expand(ip) (ip)->data, (ip)->len
  ------------------
 1260|      0|            if (mod.data)
  ------------------
  |  Branch (1260:17): [True: 0, False: 0]
  ------------------
 1261|      0|                SECITEM_ZfreeItem(&mod, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                              SECITEM_ZfreeItem(&mod, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 1262|      0|            if (crv != CKR_OK)
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1262:17): [True: 0, False: 0]
  ------------------
 1263|      0|                return crv;
 1264|       |
 1265|      0|            sign = CK_TRUE;
  ------------------
  |  |   22|      0|#define CK_TRUE 1
  ------------------
 1266|      0|            derive = CK_FALSE;
  ------------------
  |  |   23|      0|#define CK_FALSE 0
  ------------------
 1267|      0|            break;
 1268|      0|        case CKK_DSA:
  ------------------
  |  |  373|      0|#define CKK_DSA 0x00000001UL
  ------------------
  |  Branch (1268:9): [True: 0, False: 9.67k]
  ------------------
 1269|      0|            if (!sftk_hasAttribute(object, CKA_SUBPRIME)) {
  ------------------
  |  |  570|      0|#define CKA_SUBPRIME 0x00000131UL
  ------------------
  |  Branch (1269:17): [True: 0, False: 0]
  ------------------
 1270|      0|                return CKR_TEMPLATE_INCOMPLETE;
  ------------------
  |  | 1477|      0|#define CKR_TEMPLATE_INCOMPLETE 0x000000D0UL
  ------------------
 1271|      0|            }
 1272|      0|            sign = CK_TRUE;
  ------------------
  |  |   22|      0|#define CK_TRUE 1
  ------------------
 1273|      0|            derive = CK_FALSE;
  ------------------
  |  |   23|      0|#define CK_FALSE 0
  ------------------
 1274|       |        /* fall through */
 1275|  1.13k|        case CKK_DH:
  ------------------
  |  |  374|  1.13k|#define CKK_DH 0x00000002UL
  ------------------
  |  Branch (1275:9): [True: 1.13k, False: 8.54k]
  ------------------
 1276|  1.13k|            if (!sftk_hasAttribute(object, CKA_PRIME)) {
  ------------------
  |  |  569|  1.13k|#define CKA_PRIME 0x00000130UL
  ------------------
  |  Branch (1276:17): [True: 0, False: 1.13k]
  ------------------
 1277|      0|                return CKR_TEMPLATE_INCOMPLETE;
  ------------------
  |  | 1477|      0|#define CKR_TEMPLATE_INCOMPLETE 0x000000D0UL
  ------------------
 1278|      0|            }
 1279|  1.13k|            if (!sftk_hasAttribute(object, CKA_BASE)) {
  ------------------
  |  |  571|  1.13k|#define CKA_BASE 0x00000132UL
  ------------------
  |  Branch (1279:17): [True: 0, False: 1.13k]
  ------------------
 1280|      0|                return CKR_TEMPLATE_INCOMPLETE;
  ------------------
  |  | 1477|      0|#define CKR_TEMPLATE_INCOMPLETE 0x000000D0UL
  ------------------
 1281|      0|            }
 1282|  1.13k|            if (!sftk_hasAttribute(object, CKA_VALUE)) {
  ------------------
  |  |  516|  1.13k|#define CKA_VALUE 0x00000011UL
  ------------------
  |  Branch (1282:17): [True: 0, False: 1.13k]
  ------------------
 1283|      0|                return CKR_TEMPLATE_INCOMPLETE;
  ------------------
  |  | 1477|      0|#define CKR_TEMPLATE_INCOMPLETE 0x000000D0UL
  ------------------
 1284|      0|            }
 1285|       |            /* allow subprime to be set after the fact */
 1286|  1.13k|            crv = sftk_defaultAttribute(object, CKA_SUBPRIME, NULL, 0);
  ------------------
  |  |  570|  1.13k|#define CKA_SUBPRIME 0x00000131UL
  ------------------
 1287|  1.13k|            if (crv != CKR_OK) {
  ------------------
  |  | 1388|  1.13k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1287:17): [True: 0, False: 1.13k]
  ------------------
 1288|      0|                return crv;
 1289|      0|            }
 1290|  1.13k|            encrypt = CK_FALSE;
  ------------------
  |  |   23|  1.13k|#define CK_FALSE 0
  ------------------
 1291|  1.13k|            recover = CK_FALSE;
  ------------------
  |  |   23|  1.13k|#define CK_FALSE 0
  ------------------
 1292|  1.13k|            wrap = CK_FALSE;
  ------------------
  |  |   23|  1.13k|#define CK_FALSE 0
  ------------------
 1293|  1.13k|            break;
 1294|  8.50k|        case CKK_EC:
  ------------------
  |  |  379|  8.50k|#define CKK_EC 0x00000003UL
  ------------------
  |  Branch (1294:9): [True: 8.50k, False: 1.17k]
  ------------------
 1295|  8.50k|        case CKK_EC_EDWARDS:
  ------------------
  |  |  448|  8.50k|#define CKK_EC_EDWARDS 0x00000040UL
  ------------------
  |  Branch (1295:9): [True: 0, False: 9.67k]
  ------------------
 1296|  8.50k|        case CKK_EC_MONTGOMERY:
  ------------------
  |  |  449|  8.50k|#define CKK_EC_MONTGOMERY 0x00000041UL
  ------------------
  |  Branch (1296:9): [True: 0, False: 9.67k]
  ------------------
 1297|  8.50k|            if (!sftk_hasAttribute(object, CKA_EC_PARAMS)) {
  ------------------
  |  |  602|  8.50k|#define CKA_EC_PARAMS 0x00000180UL
  ------------------
  |  Branch (1297:17): [True: 0, False: 8.50k]
  ------------------
 1298|      0|                return CKR_TEMPLATE_INCOMPLETE;
  ------------------
  |  | 1477|      0|#define CKR_TEMPLATE_INCOMPLETE 0x000000D0UL
  ------------------
 1299|      0|            }
 1300|  8.50k|            if (!sftk_hasAttribute(object, CKA_VALUE)) {
  ------------------
  |  |  516|  8.50k|#define CKA_VALUE 0x00000011UL
  ------------------
  |  Branch (1300:17): [True: 0, False: 8.50k]
  ------------------
 1301|      0|                return CKR_TEMPLATE_INCOMPLETE;
  ------------------
  |  | 1477|      0|#define CKR_TEMPLATE_INCOMPLETE 0x000000D0UL
  ------------------
 1302|      0|            }
 1303|       |            /* for ECDSA and EDDSA. Change if the structure of any of them is modified. */
 1304|  8.50k|            derive = (key_type == CKK_EC_EDWARDS) ? CK_FALSE : CK_TRUE;  /* CK_TRUE for ECDH */
  ------------------
  |  |  448|  8.50k|#define CKK_EC_EDWARDS 0x00000040UL
  ------------------
                          derive = (key_type == CKK_EC_EDWARDS) ? CK_FALSE : CK_TRUE;  /* CK_TRUE for ECDH */
  ------------------
  |  |   23|      0|#define CK_FALSE 0
  ------------------
                          derive = (key_type == CKK_EC_EDWARDS) ? CK_FALSE : CK_TRUE;  /* CK_TRUE for ECDH */
  ------------------
  |  |   22|  17.0k|#define CK_TRUE 1
  ------------------
  |  Branch (1304:22): [True: 0, False: 8.50k]
  ------------------
 1305|  8.50k|            sign = (key_type == CKK_EC_MONTGOMERY) ? CK_FALSE : CK_TRUE; /* for ECDSA and EDDSA */
  ------------------
  |  |  449|  8.50k|#define CKK_EC_MONTGOMERY 0x00000041UL
  ------------------
                          sign = (key_type == CKK_EC_MONTGOMERY) ? CK_FALSE : CK_TRUE; /* for ECDSA and EDDSA */
  ------------------
  |  |   23|      0|#define CK_FALSE 0
  ------------------
                          sign = (key_type == CKK_EC_MONTGOMERY) ? CK_FALSE : CK_TRUE; /* for ECDSA and EDDSA */
  ------------------
  |  |   22|  17.0k|#define CK_TRUE 1
  ------------------
  |  Branch (1305:20): [True: 0, False: 8.50k]
  ------------------
 1306|  8.50k|            encrypt = CK_FALSE;
  ------------------
  |  |   23|  8.50k|#define CK_FALSE 0
  ------------------
 1307|  8.50k|            recover = CK_FALSE;
  ------------------
  |  |   23|  8.50k|#define CK_FALSE 0
  ------------------
 1308|  8.50k|            wrap = CK_FALSE;
  ------------------
  |  |   23|  8.50k|#define CK_FALSE 0
  ------------------
 1309|  8.50k|            break;
 1310|      0|        case CKK_NSS_JPAKE_ROUND1:
  ------------------
  |  |   53|      0|#define CKK_NSS_JPAKE_ROUND1 (CKK_NSS + 2)
  |  |  ------------------
  |  |  |  |   49|      0|#define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  458|      0|#define CKK_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1310:9): [True: 0, False: 9.67k]
  ------------------
 1311|      0|            if (!sftk_hasAttribute(object, CKA_PRIME) ||
  ------------------
  |  |  569|      0|#define CKA_PRIME 0x00000130UL
  ------------------
  |  Branch (1311:17): [True: 0, False: 0]
  ------------------
 1312|      0|                !sftk_hasAttribute(object, CKA_SUBPRIME) ||
  ------------------
  |  |  570|      0|#define CKA_SUBPRIME 0x00000131UL
  ------------------
  |  Branch (1312:17): [True: 0, False: 0]
  ------------------
 1313|      0|                !sftk_hasAttribute(object, CKA_BASE)) {
  ------------------
  |  |  571|      0|#define CKA_BASE 0x00000132UL
  ------------------
  |  Branch (1313:17): [True: 0, False: 0]
  ------------------
 1314|      0|                return CKR_TEMPLATE_INCOMPLETE;
  ------------------
  |  | 1477|      0|#define CKR_TEMPLATE_INCOMPLETE 0x000000D0UL
  ------------------
 1315|      0|            }
 1316|       |        /* fall through */
 1317|      0|        case CKK_NSS_JPAKE_ROUND2:
  ------------------
  |  |   54|      0|#define CKK_NSS_JPAKE_ROUND2 (CKK_NSS + 3)
  |  |  ------------------
  |  |  |  |   49|      0|#define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  458|      0|#define CKK_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1317:9): [True: 0, False: 9.67k]
  ------------------
 1318|       |            /* CKA_NSS_JPAKE_SIGNERID and CKA_NSS_JPAKE_PEERID are checked in
 1319|       |               the J-PAKE code. */
 1320|      0|            encrypt = sign = recover = wrap = CK_FALSE;
  ------------------
  |  |   23|      0|#define CK_FALSE 0
  ------------------
 1321|      0|            derive = CK_TRUE;
  ------------------
  |  |   22|      0|#define CK_TRUE 1
  ------------------
 1322|      0|            createObjectInfo = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 1323|      0|            break;
 1324|     40|        case CKK_NSS_KYBER:
  ------------------
  |  |   58|     40|#define CKK_NSS_KYBER (CKK_NSS + 5)
  |  |  ------------------
  |  |  |  |   49|     40|#define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  458|     40|#define CKK_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     40|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1324:9): [True: 40, False: 9.63k]
  ------------------
 1325|     40|        case CKK_NSS_ML_KEM:
  ------------------
  |  |   59|     40|#define CKK_NSS_ML_KEM (CKK_NSS + 6)
  |  |  ------------------
  |  |  |  |   49|     40|#define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  458|     40|#define CKK_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     40|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1325:9): [True: 0, False: 9.67k]
  ------------------
 1326|     40|            if (!sftk_hasAttribute(object, CKA_KEY_TYPE)) {
  ------------------
  |  |  543|     40|#define CKA_KEY_TYPE 0x00000100UL
  ------------------
  |  Branch (1326:17): [True: 0, False: 40]
  ------------------
 1327|      0|                return CKR_TEMPLATE_INCOMPLETE;
  ------------------
  |  | 1477|      0|#define CKR_TEMPLATE_INCOMPLETE 0x000000D0UL
  ------------------
 1328|      0|            }
 1329|     40|            if (!sftk_hasAttribute(object, CKA_VALUE)) {
  ------------------
  |  |  516|     40|#define CKA_VALUE 0x00000011UL
  ------------------
  |  Branch (1329:17): [True: 0, False: 40]
  ------------------
 1330|      0|                return CKR_TEMPLATE_INCOMPLETE;
  ------------------
  |  | 1477|      0|#define CKR_TEMPLATE_INCOMPLETE 0x000000D0UL
  ------------------
 1331|      0|            }
 1332|     40|            encrypt = sign = recover = wrap = CK_FALSE;
  ------------------
  |  |   23|     40|#define CK_FALSE 0
  ------------------
 1333|     40|            break;
 1334|      0|        default:
  ------------------
  |  Branch (1334:9): [True: 0, False: 9.67k]
  ------------------
 1335|      0|            return CKR_ATTRIBUTE_VALUE_INVALID;
  ------------------
  |  | 1409|      0|#define CKR_ATTRIBUTE_VALUE_INVALID 0x00000013UL
  ------------------
 1336|  9.67k|    }
 1337|  9.67k|    crv = sftk_defaultAttribute(object, CKA_SUBJECT, NULL, 0);
  ------------------
  |  |  544|  9.67k|#define CKA_SUBJECT 0x00000101UL
  ------------------
 1338|  9.67k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  9.67k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1338:9): [True: 0, False: 9.67k]
  ------------------
 1339|      0|        return crv;
 1340|  9.67k|    crv = sftk_defaultAttribute(object, CKA_SENSITIVE, &cktrue, sizeof(CK_BBOOL));
  ------------------
  |  |  546|  9.67k|#define CKA_SENSITIVE 0x00000103UL
  ------------------
 1341|  9.67k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  9.67k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1341:9): [True: 0, False: 9.67k]
  ------------------
 1342|      0|        return crv;
 1343|  9.67k|    crv = sftk_defaultAttribute(object, CKA_EXTRACTABLE, &cktrue, sizeof(CK_BBOOL));
  ------------------
  |  |  585|  9.67k|#define CKA_EXTRACTABLE 0x00000162UL
  ------------------
 1344|  9.67k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  9.67k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1344:9): [True: 0, False: 9.67k]
  ------------------
 1345|      0|        return crv;
 1346|  9.67k|    crv = sftk_defaultAttribute(object, CKA_DECRYPT, &encrypt, sizeof(CK_BBOOL));
  ------------------
  |  |  548|  9.67k|#define CKA_DECRYPT 0x00000105UL
  ------------------
 1347|  9.67k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  9.67k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1347:9): [True: 0, False: 9.67k]
  ------------------
 1348|      0|        return crv;
 1349|  9.67k|    crv = sftk_defaultAttribute(object, CKA_SIGN, &sign, sizeof(CK_BBOOL));
  ------------------
  |  |  551|  9.67k|#define CKA_SIGN 0x00000108UL
  ------------------
 1350|  9.67k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  9.67k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1350:9): [True: 0, False: 9.67k]
  ------------------
 1351|      0|        return crv;
 1352|  9.67k|    crv = sftk_defaultAttribute(object, CKA_SIGN_RECOVER, &recover,
  ------------------
  |  |  552|  9.67k|#define CKA_SIGN_RECOVER 0x00000109UL
  ------------------
 1353|  9.67k|                                sizeof(CK_BBOOL));
 1354|  9.67k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  9.67k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1354:9): [True: 0, False: 9.67k]
  ------------------
 1355|      0|        return crv;
 1356|  9.67k|    crv = sftk_defaultAttribute(object, CKA_UNWRAP, &wrap, sizeof(CK_BBOOL));
  ------------------
  |  |  550|  9.67k|#define CKA_UNWRAP 0x00000107UL
  ------------------
 1357|  9.67k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  9.67k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1357:9): [True: 0, False: 9.67k]
  ------------------
 1358|      0|        return crv;
 1359|  9.67k|    crv = sftk_defaultAttribute(object, CKA_DERIVE, &derive, sizeof(CK_BBOOL));
  ------------------
  |  |  555|  9.67k|#define CKA_DERIVE 0x0000010CUL
  ------------------
 1360|  9.67k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  9.67k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1360:9): [True: 0, False: 9.67k]
  ------------------
 1361|      0|        return crv;
 1362|       |    /* the next two bits get modified only in the key gen and token cases */
 1363|  9.67k|    crv = sftk_forceAttribute(object, CKA_ALWAYS_SENSITIVE,
  ------------------
  |  |  588|  9.67k|#define CKA_ALWAYS_SENSITIVE 0x00000165UL
  ------------------
 1364|  9.67k|                              &ckfalse, sizeof(CK_BBOOL));
 1365|  9.67k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  9.67k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1365:9): [True: 0, False: 9.67k]
  ------------------
 1366|      0|        return crv;
 1367|  9.67k|    crv = sftk_forceAttribute(object, CKA_NEVER_EXTRACTABLE,
  ------------------
  |  |  587|  9.67k|#define CKA_NEVER_EXTRACTABLE 0x00000164UL
  ------------------
 1368|  9.67k|                              &ckfalse, sizeof(CK_BBOOL));
 1369|  9.67k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  9.67k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1369:9): [True: 0, False: 9.67k]
  ------------------
 1370|      0|        return crv;
 1371|       |
 1372|       |    /* should we check the non-token RSA private keys? */
 1373|       |
 1374|  9.67k|    if (sftk_isTrue(object, CKA_TOKEN)) {
  ------------------
  |  |  512|  9.67k|#define CKA_TOKEN 0x00000001UL
  ------------------
  |  Branch (1374:9): [True: 0, False: 9.67k]
  ------------------
 1375|      0|        SFTKSlot *slot = session->slot;
 1376|      0|        SFTKDBHandle *keyHandle = sftk_getKeyDB(slot);
 1377|       |
 1378|      0|        if (keyHandle == NULL) {
  ------------------
  |  Branch (1378:13): [True: 0, False: 0]
  ------------------
 1379|      0|            return CKR_TOKEN_WRITE_PROTECTED;
  ------------------
  |  | 1481|      0|#define CKR_TOKEN_WRITE_PROTECTED 0x000000E2UL
  ------------------
 1380|      0|        }
 1381|       |
 1382|      0|        crv = sftkdb_write(keyHandle, object, &object->handle);
 1383|      0|        sftk_freeDB(keyHandle);
 1384|      0|        return crv;
 1385|  9.67k|    } else if (createObjectInfo) {
  ------------------
  |  Branch (1385:16): [True: 9.67k, False: 0]
  ------------------
 1386|  9.67k|        object->objectInfo = sftk_mkPrivKey(object, key_type, &crv);
 1387|  9.67k|        if (object->objectInfo == NULL)
  ------------------
  |  Branch (1387:13): [True: 0, False: 9.67k]
  ------------------
 1388|      0|            return crv;
 1389|  9.67k|        object->infoFree = SFTKFree_nsslowkey_DestroyPrivateKey;
 1390|  9.67k|    }
 1391|  9.67k|    return CKR_OK;
  ------------------
  |  | 1388|  9.67k|#define CKR_OK 0x00000000UL
  ------------------
 1392|  9.67k|}
pkcs11.c:sftk_handleSecretKeyObject:
 1520|  42.0k|{
 1521|  42.0k|    CK_RV crv;
 1522|       |
 1523|       |    /* First validate and set defaults */
 1524|  42.0k|    crv = validateSecretKey(session, object, key_type, isFIPS);
 1525|  42.0k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  42.0k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1525:9): [True: 0, False: 42.0k]
  ------------------
 1526|      0|        goto loser;
 1527|       |
 1528|       |    /* If the object is a TOKEN object, store in the database */
 1529|  42.0k|    if (sftk_isTrue(object, CKA_TOKEN)) {
  ------------------
  |  |  512|  42.0k|#define CKA_TOKEN 0x00000001UL
  ------------------
  |  Branch (1529:9): [True: 0, False: 42.0k]
  ------------------
 1530|      0|        SFTKSlot *slot = session->slot;
 1531|      0|        SFTKDBHandle *keyHandle = sftk_getKeyDB(slot);
 1532|       |
 1533|      0|        if (keyHandle == NULL) {
  ------------------
  |  Branch (1533:13): [True: 0, False: 0]
  ------------------
 1534|      0|            return CKR_TOKEN_WRITE_PROTECTED;
  ------------------
  |  | 1481|      0|#define CKR_TOKEN_WRITE_PROTECTED 0x000000E2UL
  ------------------
 1535|      0|        }
 1536|       |
 1537|      0|        crv = sftkdb_write(keyHandle, object, &object->handle);
 1538|      0|        sftk_freeDB(keyHandle);
 1539|      0|        return crv;
 1540|      0|    }
 1541|       |
 1542|  42.0k|loser:
 1543|       |
 1544|  42.0k|    return crv;
 1545|  42.0k|}
pkcs11.c:validateSecretKey:
 1401|  42.0k|{
 1402|  42.0k|    CK_RV crv;
 1403|  42.0k|    CK_BBOOL cktrue = CK_TRUE;
  ------------------
  |  |   22|  42.0k|#define CK_TRUE 1
  ------------------
 1404|  42.0k|    CK_BBOOL ckfalse = CK_FALSE;
  ------------------
  |  |   23|  42.0k|#define CK_FALSE 0
  ------------------
 1405|  42.0k|    SFTKAttribute *attribute = NULL;
 1406|  42.0k|    unsigned long requiredLen;
 1407|       |
 1408|  42.0k|    crv = sftk_defaultAttribute(object, CKA_SENSITIVE,
  ------------------
  |  |  546|  42.0k|#define CKA_SENSITIVE 0x00000103UL
  ------------------
 1409|  42.0k|                                isFIPS ? &cktrue : &ckfalse, sizeof(CK_BBOOL));
  ------------------
  |  Branch (1409:33): [True: 0, False: 42.0k]
  ------------------
 1410|  42.0k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  42.0k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1410:9): [True: 0, False: 42.0k]
  ------------------
 1411|      0|        return crv;
 1412|  42.0k|    crv = sftk_defaultAttribute(object, CKA_EXTRACTABLE,
  ------------------
  |  |  585|  42.0k|#define CKA_EXTRACTABLE 0x00000162UL
  ------------------
 1413|  42.0k|                                &cktrue, sizeof(CK_BBOOL));
 1414|  42.0k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  42.0k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1414:9): [True: 0, False: 42.0k]
  ------------------
 1415|      0|        return crv;
 1416|  42.0k|    crv = sftk_defaultAttribute(object, CKA_ENCRYPT, &cktrue, sizeof(CK_BBOOL));
  ------------------
  |  |  547|  42.0k|#define CKA_ENCRYPT 0x00000104UL
  ------------------
 1417|  42.0k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  42.0k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1417:9): [True: 0, False: 42.0k]
  ------------------
 1418|      0|        return crv;
 1419|  42.0k|    crv = sftk_defaultAttribute(object, CKA_DECRYPT, &cktrue, sizeof(CK_BBOOL));
  ------------------
  |  |  548|  42.0k|#define CKA_DECRYPT 0x00000105UL
  ------------------
 1420|  42.0k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  42.0k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1420:9): [True: 0, False: 42.0k]
  ------------------
 1421|      0|        return crv;
 1422|  42.0k|    crv = sftk_defaultAttribute(object, CKA_SIGN, &ckfalse, sizeof(CK_BBOOL));
  ------------------
  |  |  551|  42.0k|#define CKA_SIGN 0x00000108UL
  ------------------
 1423|  42.0k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  42.0k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1423:9): [True: 0, False: 42.0k]
  ------------------
 1424|      0|        return crv;
 1425|  42.0k|    crv = sftk_defaultAttribute(object, CKA_VERIFY, &ckfalse, sizeof(CK_BBOOL));
  ------------------
  |  |  553|  42.0k|#define CKA_VERIFY 0x0000010AUL
  ------------------
 1426|  42.0k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  42.0k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1426:9): [True: 0, False: 42.0k]
  ------------------
 1427|      0|        return crv;
 1428|  42.0k|    crv = sftk_defaultAttribute(object, CKA_WRAP, &cktrue, sizeof(CK_BBOOL));
  ------------------
  |  |  549|  42.0k|#define CKA_WRAP 0x00000106UL
  ------------------
 1429|  42.0k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  42.0k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1429:9): [True: 0, False: 42.0k]
  ------------------
 1430|      0|        return crv;
 1431|  42.0k|    crv = sftk_defaultAttribute(object, CKA_UNWRAP, &cktrue, sizeof(CK_BBOOL));
  ------------------
  |  |  550|  42.0k|#define CKA_UNWRAP 0x00000107UL
  ------------------
 1432|  42.0k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  42.0k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1432:9): [True: 0, False: 42.0k]
  ------------------
 1433|      0|        return crv;
 1434|       |
 1435|  42.0k|    if (!sftk_hasAttribute(object, CKA_VALUE)) {
  ------------------
  |  |  516|  42.0k|#define CKA_VALUE 0x00000011UL
  ------------------
  |  Branch (1435:9): [True: 0, False: 42.0k]
  ------------------
 1436|      0|        return CKR_TEMPLATE_INCOMPLETE;
  ------------------
  |  | 1477|      0|#define CKR_TEMPLATE_INCOMPLETE 0x000000D0UL
  ------------------
 1437|      0|    }
 1438|       |    /* the next two bits get modified only in the key gen and token cases */
 1439|  42.0k|    crv = sftk_forceAttribute(object, CKA_ALWAYS_SENSITIVE,
  ------------------
  |  |  588|  42.0k|#define CKA_ALWAYS_SENSITIVE 0x00000165UL
  ------------------
 1440|  42.0k|                              &ckfalse, sizeof(CK_BBOOL));
 1441|  42.0k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  42.0k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1441:9): [True: 0, False: 42.0k]
  ------------------
 1442|      0|        return crv;
 1443|  42.0k|    crv = sftk_forceAttribute(object, CKA_NEVER_EXTRACTABLE,
  ------------------
  |  |  587|  42.0k|#define CKA_NEVER_EXTRACTABLE 0x00000164UL
  ------------------
 1444|  42.0k|                              &ckfalse, sizeof(CK_BBOOL));
 1445|  42.0k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  42.0k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1445:9): [True: 0, False: 42.0k]
  ------------------
 1446|      0|        return crv;
 1447|       |
 1448|       |    /* some types of keys have a value length */
 1449|  42.0k|    crv = CKR_OK;
  ------------------
  |  | 1388|  42.0k|#define CKR_OK 0x00000000UL
  ------------------
 1450|  42.0k|    switch (key_type) {
 1451|       |        /* force CKA_VALUE_LEN to be set */
 1452|  11.0k|        case CKK_GENERIC_SECRET:
  ------------------
  |  |  383|  11.0k|#define CKK_GENERIC_SECRET 0x00000010UL
  ------------------
  |  Branch (1452:9): [True: 11.0k, False: 30.9k]
  ------------------
 1453|  11.0k|        case CKK_RC2:
  ------------------
  |  |  384|  11.0k|#define CKK_RC2 0x00000011UL
  ------------------
  |  Branch (1453:9): [True: 0, False: 42.0k]
  ------------------
 1454|  11.0k|        case CKK_RC4:
  ------------------
  |  |  385|  11.0k|#define CKK_RC4 0x00000012UL
  ------------------
  |  Branch (1454:9): [True: 0, False: 42.0k]
  ------------------
 1455|       |#if NSS_SOFTOKEN_DOES_RC5
 1456|       |        case CKK_RC5:
 1457|       |#endif
 1458|       |#ifdef NSS_SOFTOKEN_DOES_CAST
 1459|       |        case CKK_CAST:
 1460|       |        case CKK_CAST3:
 1461|       |        case CKK_CAST5:
 1462|       |#endif
 1463|       |#if NSS_SOFTOKEN_DOES_IDEA
 1464|       |        case CKK_IDEA:
 1465|       |#endif
 1466|  11.0k|            attribute = sftk_FindAttribute(object, CKA_VALUE);
  ------------------
  |  |  516|  11.0k|#define CKA_VALUE 0x00000011UL
  ------------------
 1467|       |            /* shouldn't happen */
 1468|  11.0k|            if (attribute == NULL)
  ------------------
  |  Branch (1468:17): [True: 0, False: 11.0k]
  ------------------
 1469|      0|                return CKR_TEMPLATE_INCOMPLETE;
  ------------------
  |  | 1477|      0|#define CKR_TEMPLATE_INCOMPLETE 0x000000D0UL
  ------------------
 1470|  11.0k|            crv = sftk_forceAttribute(object, CKA_VALUE_LEN,
  ------------------
  |  |  580|  11.0k|#define CKA_VALUE_LEN 0x00000161UL
  ------------------
 1471|  11.0k|                                      &attribute->attrib.ulValueLen, sizeof(CK_ULONG));
 1472|  11.0k|            sftk_FreeAttribute(attribute);
 1473|  11.0k|            break;
 1474|       |        /* force the value to have the correct parity */
 1475|     76|        case CKK_DES:
  ------------------
  |  |  386|     76|#define CKK_DES 0x00000013UL
  ------------------
  |  Branch (1475:9): [True: 76, False: 41.9k]
  ------------------
 1476|     76|        case CKK_DES2:
  ------------------
  |  |  387|     76|#define CKK_DES2 0x00000014UL
  ------------------
  |  Branch (1476:9): [True: 0, False: 42.0k]
  ------------------
 1477|  1.09k|        case CKK_DES3:
  ------------------
  |  |  388|  1.09k|#define CKK_DES3 0x00000015UL
  ------------------
  |  Branch (1477:9): [True: 1.01k, False: 41.0k]
  ------------------
 1478|  1.09k|        case CKK_CDMF:
  ------------------
  |  |  401|  1.09k|#define CKK_CDMF 0x0000001EUL
  ------------------
  |  Branch (1478:9): [True: 0, False: 42.0k]
  ------------------
 1479|  1.09k|            attribute = sftk_FindAttribute(object, CKA_VALUE);
  ------------------
  |  |  516|  1.09k|#define CKA_VALUE 0x00000011UL
  ------------------
 1480|       |            /* shouldn't happen */
 1481|  1.09k|            if (attribute == NULL)
  ------------------
  |  Branch (1481:17): [True: 0, False: 1.09k]
  ------------------
 1482|      0|                return CKR_TEMPLATE_INCOMPLETE;
  ------------------
  |  | 1477|      0|#define CKR_TEMPLATE_INCOMPLETE 0x000000D0UL
  ------------------
 1483|  1.09k|            requiredLen = sftk_MapKeySize(key_type);
 1484|  1.09k|            if (attribute->attrib.ulValueLen != requiredLen) {
  ------------------
  |  Branch (1484:17): [True: 0, False: 1.09k]
  ------------------
 1485|      0|                sftk_FreeAttribute(attribute);
 1486|      0|                return CKR_KEY_SIZE_RANGE;
  ------------------
  |  | 1432|      0|#define CKR_KEY_SIZE_RANGE 0x00000062UL
  ------------------
 1487|      0|            }
 1488|  1.09k|            sftk_FormatDESKey((unsigned char *)attribute->attrib.pValue,
 1489|  1.09k|                              attribute->attrib.ulValueLen);
 1490|  1.09k|            sftk_FreeAttribute(attribute);
 1491|  1.09k|            break;
 1492|  3.44k|        case CKK_AES:
  ------------------
  |  |  402|  3.44k|#define CKK_AES 0x0000001FUL
  ------------------
  |  Branch (1492:9): [True: 3.44k, False: 38.6k]
  ------------------
 1493|  3.44k|            attribute = sftk_FindAttribute(object, CKA_VALUE);
  ------------------
  |  |  516|  3.44k|#define CKA_VALUE 0x00000011UL
  ------------------
 1494|       |            /* shouldn't happen */
 1495|  3.44k|            if (attribute == NULL)
  ------------------
  |  Branch (1495:17): [True: 0, False: 3.44k]
  ------------------
 1496|      0|                return CKR_TEMPLATE_INCOMPLETE;
  ------------------
  |  | 1477|      0|#define CKR_TEMPLATE_INCOMPLETE 0x000000D0UL
  ------------------
 1497|  3.44k|            if (attribute->attrib.ulValueLen != 16 &&
  ------------------
  |  Branch (1497:17): [True: 770, False: 2.67k]
  ------------------
 1498|  3.44k|                attribute->attrib.ulValueLen != 24 &&
  ------------------
  |  Branch (1498:17): [True: 770, False: 0]
  ------------------
 1499|  3.44k|                attribute->attrib.ulValueLen != 32) {
  ------------------
  |  Branch (1499:17): [True: 0, False: 770]
  ------------------
 1500|      0|                sftk_FreeAttribute(attribute);
 1501|      0|                return CKR_KEY_SIZE_RANGE;
  ------------------
  |  | 1432|      0|#define CKR_KEY_SIZE_RANGE 0x00000062UL
  ------------------
 1502|      0|            }
 1503|  3.44k|            crv = sftk_forceAttribute(object, CKA_VALUE_LEN,
  ------------------
  |  |  580|  3.44k|#define CKA_VALUE_LEN 0x00000161UL
  ------------------
 1504|  3.44k|                                      &attribute->attrib.ulValueLen, sizeof(CK_ULONG));
 1505|  3.44k|            sftk_FreeAttribute(attribute);
 1506|  3.44k|            break;
 1507|  26.4k|        default:
  ------------------
  |  Branch (1507:9): [True: 26.4k, False: 15.5k]
  ------------------
 1508|  26.4k|            break;
 1509|  42.0k|    }
 1510|       |
 1511|  42.0k|    return crv;
 1512|  42.0k|}
pkcs11.c:sftk_mkPrivKey:
 2040|  9.67k|{
 2041|  9.67k|    NSSLOWKEYPrivateKey *privKey;
 2042|  9.67k|    SFTKItemTemplate itemTemplate[SFTK_MAX_ITEM_TEMPLATE];
 2043|  9.67k|    int itemTemplateCount = 0;
 2044|  9.67k|    PLArenaPool *arena;
 2045|  9.67k|    CK_RV crv = CKR_OK;
  ------------------
  |  | 1388|  9.67k|#define CKR_OK 0x00000000UL
  ------------------
 2046|  9.67k|    SECStatus rv;
 2047|       |
 2048|  9.67k|    arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
  ------------------
  |  |   63|  9.67k|#define PORT_NewArena PORT_NewArena_Util
  ------------------
                  arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
  ------------------
  |  |   60|  9.67k|#define DER_DEFAULT_CHUNKSIZE (2048)
  ------------------
 2049|  9.67k|    if (arena == NULL) {
  ------------------
  |  Branch (2049:9): [True: 0, False: 9.67k]
  ------------------
 2050|      0|        *crvp = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 2051|      0|        return NULL;
 2052|      0|    }
 2053|       |
 2054|  9.67k|    privKey = (NSSLOWKEYPrivateKey *)
 2055|  9.67k|        PORT_ArenaZAlloc(arena, sizeof(NSSLOWKEYPrivateKey));
  ------------------
  |  |   59|  9.67k|#define PORT_ArenaZAlloc PORT_ArenaZAlloc_Util
  ------------------
 2056|  9.67k|    if (privKey == NULL) {
  ------------------
  |  Branch (2056:9): [True: 0, False: 9.67k]
  ------------------
 2057|      0|        PORT_FreeArena(arena, PR_FALSE);
  ------------------
  |  |   61|      0|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                      PORT_FreeArena(arena, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 2058|      0|        *crvp = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 2059|      0|        return NULL;
 2060|      0|    }
 2061|       |
 2062|       |    /* in future this would be a switch on key_type */
 2063|  9.67k|    privKey->arena = arena;
 2064|  9.67k|    switch (key_type) {
 2065|      0|        case CKK_RSA:
  ------------------
  |  |  372|      0|#define CKK_RSA 0x00000000UL
  ------------------
  |  Branch (2065:9): [True: 0, False: 9.67k]
  ------------------
 2066|      0|            privKey->keyType = NSSLOWKEYRSAKey;
 2067|       |
 2068|      0|            SFTK_SET_ITEM_TEMPLATE(itemTemplate, itemTemplateCount,
  ------------------
  |  |  465|      0|    templ[count].type = attr;                               \
  |  |  466|      0|    templ[count].item = itemPtr
  ------------------
 2069|      0|                                   &privKey->u.rsa.modulus, CKA_MODULUS);
 2070|      0|            itemTemplateCount++;
 2071|      0|            SFTK_SET_ITEM_TEMPLATE(itemTemplate, itemTemplateCount,
  ------------------
  |  |  465|      0|    templ[count].type = attr;                               \
  |  |  466|      0|    templ[count].item = itemPtr
  ------------------
 2072|      0|                                   &privKey->u.rsa.publicExponent, CKA_PUBLIC_EXPONENT);
 2073|      0|            itemTemplateCount++;
 2074|      0|            SFTK_SET_ITEM_TEMPLATE(itemTemplate, itemTemplateCount,
  ------------------
  |  |  465|      0|    templ[count].type = attr;                               \
  |  |  466|      0|    templ[count].item = itemPtr
  ------------------
 2075|      0|                                   &privKey->u.rsa.privateExponent, CKA_PRIVATE_EXPONENT);
 2076|      0|            itemTemplateCount++;
 2077|      0|            SFTK_SET_ITEM_TEMPLATE(itemTemplate, itemTemplateCount,
  ------------------
  |  |  465|      0|    templ[count].type = attr;                               \
  |  |  466|      0|    templ[count].item = itemPtr
  ------------------
 2078|      0|                                   &privKey->u.rsa.prime1, CKA_PRIME_1);
 2079|      0|            itemTemplateCount++;
 2080|      0|            SFTK_SET_ITEM_TEMPLATE(itemTemplate, itemTemplateCount,
  ------------------
  |  |  465|      0|    templ[count].type = attr;                               \
  |  |  466|      0|    templ[count].item = itemPtr
  ------------------
 2081|      0|                                   &privKey->u.rsa.prime2, CKA_PRIME_2);
 2082|      0|            itemTemplateCount++;
 2083|      0|            SFTK_SET_ITEM_TEMPLATE(itemTemplate, itemTemplateCount,
  ------------------
  |  |  465|      0|    templ[count].type = attr;                               \
  |  |  466|      0|    templ[count].item = itemPtr
  ------------------
 2084|      0|                                   &privKey->u.rsa.exponent1, CKA_EXPONENT_1);
 2085|      0|            itemTemplateCount++;
 2086|      0|            SFTK_SET_ITEM_TEMPLATE(itemTemplate, itemTemplateCount,
  ------------------
  |  |  465|      0|    templ[count].type = attr;                               \
  |  |  466|      0|    templ[count].item = itemPtr
  ------------------
 2087|      0|                                   &privKey->u.rsa.exponent2, CKA_EXPONENT_2);
 2088|      0|            itemTemplateCount++;
 2089|      0|            SFTK_SET_ITEM_TEMPLATE(itemTemplate, itemTemplateCount,
  ------------------
  |  |  465|      0|    templ[count].type = attr;                               \
  |  |  466|      0|    templ[count].item = itemPtr
  ------------------
 2090|      0|                                   &privKey->u.rsa.coefficient, CKA_COEFFICIENT);
 2091|      0|            itemTemplateCount++;
 2092|      0|            rv = DER_SetUInteger(privKey->arena, &privKey->u.rsa.version,
 2093|      0|                                 NSSLOWKEY_PRIVATE_KEY_INFO_VERSION);
  ------------------
  |  |   51|      0|#define NSSLOWKEY_PRIVATE_KEY_INFO_VERSION 0 /* what we *create* */
  ------------------
 2094|      0|            if (rv != SECSuccess)
  ------------------
  |  Branch (2094:17): [True: 0, False: 0]
  ------------------
 2095|      0|                crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 2096|      0|            break;
 2097|       |
 2098|      0|        case CKK_DSA:
  ------------------
  |  |  373|      0|#define CKK_DSA 0x00000001UL
  ------------------
  |  Branch (2098:9): [True: 0, False: 9.67k]
  ------------------
 2099|      0|            privKey->keyType = NSSLOWKEYDSAKey;
 2100|      0|            SFTK_SET_ITEM_TEMPLATE(itemTemplate, itemTemplateCount,
  ------------------
  |  |  465|      0|    templ[count].type = attr;                               \
  |  |  466|      0|    templ[count].item = itemPtr
  ------------------
 2101|      0|                                   &privKey->u.dsa.params.prime, CKA_PRIME);
 2102|      0|            itemTemplateCount++;
 2103|      0|            SFTK_SET_ITEM_TEMPLATE(itemTemplate, itemTemplateCount,
  ------------------
  |  |  465|      0|    templ[count].type = attr;                               \
  |  |  466|      0|    templ[count].item = itemPtr
  ------------------
 2104|      0|                                   &privKey->u.dsa.params.subPrime, CKA_SUBPRIME);
 2105|      0|            itemTemplateCount++;
 2106|      0|            SFTK_SET_ITEM_TEMPLATE(itemTemplate, itemTemplateCount,
  ------------------
  |  |  465|      0|    templ[count].type = attr;                               \
  |  |  466|      0|    templ[count].item = itemPtr
  ------------------
 2107|      0|                                   &privKey->u.dsa.params.base, CKA_BASE);
 2108|      0|            itemTemplateCount++;
 2109|      0|            SFTK_SET_ITEM_TEMPLATE(itemTemplate, itemTemplateCount,
  ------------------
  |  |  465|      0|    templ[count].type = attr;                               \
  |  |  466|      0|    templ[count].item = itemPtr
  ------------------
 2110|      0|                                   &privKey->u.dsa.privateValue, CKA_VALUE);
 2111|      0|            itemTemplateCount++;
 2112|       |            /* privKey was zero'd so public value is already set to NULL, 0
 2113|       |             * if we don't set it explicitly */
 2114|      0|            break;
 2115|       |
 2116|  1.13k|        case CKK_DH:
  ------------------
  |  |  374|  1.13k|#define CKK_DH 0x00000002UL
  ------------------
  |  Branch (2116:9): [True: 1.13k, False: 8.54k]
  ------------------
 2117|  1.13k|            privKey->keyType = NSSLOWKEYDHKey;
 2118|  1.13k|            SFTK_SET_ITEM_TEMPLATE(itemTemplate, itemTemplateCount,
  ------------------
  |  |  465|  1.13k|    templ[count].type = attr;                               \
  |  |  466|  1.13k|    templ[count].item = itemPtr
  ------------------
 2119|  1.13k|                                   &privKey->u.dh.prime, CKA_PRIME);
 2120|  1.13k|            itemTemplateCount++;
 2121|  1.13k|            SFTK_SET_ITEM_TEMPLATE(itemTemplate, itemTemplateCount,
  ------------------
  |  |  465|  1.13k|    templ[count].type = attr;                               \
  |  |  466|  1.13k|    templ[count].item = itemPtr
  ------------------
 2122|  1.13k|                                   &privKey->u.dh.base, CKA_BASE);
 2123|  1.13k|            itemTemplateCount++;
 2124|  1.13k|            SFTK_SET_ITEM_TEMPLATE(itemTemplate, itemTemplateCount,
  ------------------
  |  |  465|  1.13k|    templ[count].type = attr;                               \
  |  |  466|  1.13k|    templ[count].item = itemPtr
  ------------------
 2125|  1.13k|                                   &privKey->u.dh.privateValue, CKA_VALUE);
 2126|  1.13k|            itemTemplateCount++;
 2127|       |            /* privKey was zero'd so public value is already set to NULL, 0
 2128|       |             * if we don't set it explicitly */
 2129|  1.13k|            break;
 2130|      0|        case CKK_EC_EDWARDS:
  ------------------
  |  |  448|      0|#define CKK_EC_EDWARDS 0x00000040UL
  ------------------
  |  Branch (2130:9): [True: 0, False: 9.67k]
  ------------------
 2131|      0|        case CKK_EC_MONTGOMERY:
  ------------------
  |  |  449|      0|#define CKK_EC_MONTGOMERY 0x00000041UL
  ------------------
  |  Branch (2131:9): [True: 0, False: 9.67k]
  ------------------
 2132|  8.50k|        case CKK_EC:
  ------------------
  |  |  379|  8.50k|#define CKK_EC 0x00000003UL
  ------------------
  |  Branch (2132:9): [True: 8.50k, False: 1.17k]
  ------------------
 2133|  8.50k|            privKey->keyType = NSSLOWKEYECKey;
 2134|  8.50k|            crv = sftk_Attribute2SSecItem(arena,
 2135|  8.50k|                                          &privKey->u.ec.ecParams.DEREncoding,
 2136|  8.50k|                                          object, CKA_EC_PARAMS);
  ------------------
  |  |  602|  8.50k|#define CKA_EC_PARAMS 0x00000180UL
  ------------------
 2137|  8.50k|            if (crv != CKR_OK)
  ------------------
  |  | 1388|  8.50k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (2137:17): [True: 0, False: 8.50k]
  ------------------
 2138|      0|                break;
 2139|       |
 2140|       |            /* Fill out the rest of the ecParams structure
 2141|       |             * based on the encoded params
 2142|       |             */
 2143|  8.50k|            if (EC_FillParams(arena, &privKey->u.ec.ecParams.DEREncoding,
  ------------------
  |  Branch (2143:17): [True: 0, False: 8.50k]
  ------------------
 2144|  8.50k|                              &privKey->u.ec.ecParams) != SECSuccess) {
 2145|      0|                crv = CKR_DOMAIN_PARAMS_INVALID;
  ------------------
  |  | 1508|      0|#define CKR_DOMAIN_PARAMS_INVALID 0x00000130UL
  ------------------
 2146|      0|                break;
 2147|      0|            }
 2148|  8.50k|            crv = sftk_Attribute2SSecItem(arena, &privKey->u.ec.privateValue,
 2149|  8.50k|                                          object, CKA_VALUE);
  ------------------
  |  |  516|  8.50k|#define CKA_VALUE 0x00000011UL
  ------------------
 2150|  8.50k|            if (crv != CKR_OK)
  ------------------
  |  | 1388|  8.50k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (2150:17): [True: 0, False: 8.50k]
  ------------------
 2151|      0|                break;
 2152|       |
 2153|  8.50k|            if (sftk_hasAttribute(object, CKA_NSS_DB)) {
  ------------------
  |  |  150|  8.50k|#define CKA_NSS_DB 0xD5A0DB00L
  ------------------
  |  Branch (2153:17): [True: 8.50k, False: 0]
  ------------------
 2154|  8.50k|                crv = sftk_Attribute2SSecItem(arena, &privKey->u.ec.publicValue,
 2155|  8.50k|                                              object, CKA_NSS_DB);
  ------------------
  |  |  150|  8.50k|#define CKA_NSS_DB 0xD5A0DB00L
  ------------------
 2156|  8.50k|                if (crv != CKR_OK) {
  ------------------
  |  | 1388|  8.50k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (2156:21): [True: 0, False: 8.50k]
  ------------------
 2157|      0|                    break;
 2158|      0|                }
 2159|       |                /* privKey was zero'd so public value is already set to NULL, 0
 2160|       |                 * if we don't set it explicitly */
 2161|  8.50k|            } else if (key_type == CKK_EC) {
  ------------------
  |  |  379|      0|#define CKK_EC 0x00000003UL
  ------------------
  |  Branch (2161:24): [True: 0, False: 0]
  ------------------
 2162|       |                /* as no public key was provided during the import, we need to derive it here.
 2163|       |                 See: PK11_ImportAndReturnPrivateKey*/
 2164|      0|                (void)SECITEM_AllocItem(arena, &privKey->u.ec.publicValue, EC_GetPointSize(&privKey->u.ec.ecParams));
  ------------------
  |  |  103|      0|#define SECITEM_AllocItem SECITEM_AllocItem_Util
  ------------------
 2165|      0|                rv = EC_DerivePublicKey(&privKey->u.ec.privateValue, &privKey->u.ec.ecParams, &privKey->u.ec.publicValue);
 2166|      0|                if (rv != SECSuccess) {
  ------------------
  |  Branch (2166:21): [True: 0, False: 0]
  ------------------
 2167|      0|                    break;
 2168|      0|                }
 2169|      0|                sftk_forceAttribute(object, CKA_NSS_DB, privKey->u.ec.publicValue.data, privKey->u.ec.publicValue.len);
  ------------------
  |  |  150|      0|#define CKA_NSS_DB 0xD5A0DB00L
  ------------------
 2170|      0|            }
 2171|       |
 2172|  8.50k|            rv = DER_SetUInteger(privKey->arena, &privKey->u.ec.version,
 2173|  8.50k|                                 NSSLOWKEY_EC_PRIVATE_KEY_VERSION);
  ------------------
  |  |   23|  8.50k|#define NSSLOWKEY_EC_PRIVATE_KEY_VERSION 1 /* as per SECG 1 C.4 */
  ------------------
 2174|  8.50k|            if (rv != SECSuccess) {
  ------------------
  |  Branch (2174:17): [True: 0, False: 8.50k]
  ------------------
 2175|      0|                crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 2176|       |/* The following ifdef is needed for Linux arm distros and
 2177|       | * Android as gcc 4.6 has a bug when targeting arm (but not
 2178|       | * thumb). The bug has been fixed in gcc 4.7.
 2179|       | * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56561
 2180|       | */
 2181|       |#if defined(__arm__) && !defined(__thumb__) && defined(__GNUC__)
 2182|       |                *crvp = CKR_HOST_MEMORY;
 2183|       |                break;
 2184|       |#endif
 2185|      0|            }
 2186|  8.50k|            break;
 2187|       |
 2188|     40|        case CKK_NSS_KYBER:
  ------------------
  |  |   58|     40|#define CKK_NSS_KYBER (CKK_NSS + 5)
  |  |  ------------------
  |  |  |  |   49|     40|#define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  458|     40|#define CKK_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     40|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (2188:9): [True: 40, False: 9.63k]
  ------------------
 2189|     40|        case CKK_NSS_ML_KEM:
  ------------------
  |  |   59|     40|#define CKK_NSS_ML_KEM (CKK_NSS + 6)
  |  |  ------------------
  |  |  |  |   49|     40|#define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  458|     40|#define CKK_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     40|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (2189:9): [True: 0, False: 9.67k]
  ------------------
 2190|     40|            break;
 2191|       |
 2192|      0|        default:
  ------------------
  |  Branch (2192:9): [True: 0, False: 9.67k]
  ------------------
 2193|      0|            crv = CKR_KEY_TYPE_INCONSISTENT;
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
 2194|      0|            break;
 2195|  9.67k|    }
 2196|  9.67k|    if (crv == CKR_OK && itemTemplateCount != 0) {
  ------------------
  |  | 1388|  19.3k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (2196:9): [True: 9.67k, False: 0]
  |  Branch (2196:26): [True: 1.13k, False: 8.54k]
  ------------------
 2197|  1.13k|        PORT_Assert(itemTemplateCount > 0);
  ------------------
  |  |  120|  1.13k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.13k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.13k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2198|  1.13k|        PORT_Assert(itemTemplateCount <= SFTK_MAX_ITEM_TEMPLATE);
  ------------------
  |  |  120|  1.13k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.13k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.13k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2199|  1.13k|        crv = sftk_MultipleAttribute2SecItem(arena, object, itemTemplate,
 2200|  1.13k|                                             itemTemplateCount);
 2201|  1.13k|    }
 2202|  9.67k|    *crvp = crv;
 2203|  9.67k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  9.67k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (2203:9): [True: 0, False: 9.67k]
  ------------------
 2204|      0|        PORT_FreeArena(arena, PR_TRUE);
  ------------------
  |  |   61|      0|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                      PORT_FreeArena(arena, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 2205|      0|        return NULL;
 2206|      0|    }
 2207|  9.67k|    return privKey;
 2208|  9.67k|}
pkcs11.c:sftk_GetModuleIndex:
 2734|  1.22M|{
 2735|  1.22M|    if (sftk_isFIPS(slotID)) {
  ------------------
  |  |  506|  1.22M|    (((id) == FIPS_SLOT_ID) || ((id) >= SFTK_MIN_FIPS_USER_SLOT_ID))
  |  |  ------------------
  |  |  |  |  500|  1.22M|#define FIPS_SLOT_ID 3
  |  |  ------------------
  |  |                   (((id) == FIPS_SLOT_ID) || ((id) >= SFTK_MIN_FIPS_USER_SLOT_ID))
  |  |  ------------------
  |  |  |  |  567|  1.22M|#define SFTK_MIN_FIPS_USER_SLOT_ID 101
  |  |  ------------------
  |  |  |  Branch (506:6): [True: 0, False: 1.22M]
  |  |  |  Branch (506:32): [True: 0, False: 1.22M]
  |  |  ------------------
  ------------------
 2736|      0|        return NSC_FIPS_MODULE;
  ------------------
  |  |   54|      0|#define NSC_FIPS_MODULE 1
  ------------------
 2737|      0|    }
 2738|  1.22M|    return NSC_NON_FIPS_MODULE;
  ------------------
  |  |   55|  1.22M|#define NSC_NON_FIPS_MODULE 0
  ------------------
 2739|  1.22M|}
pkcs11.c:sftk_setStringName:
  688|      6|{
  689|      6|    int full_length, string_length;
  690|       |
  691|      6|    full_length = nullTerminate ? buffer_length - 1 : buffer_length;
  ------------------
  |  Branch (691:19): [True: 6, False: 0]
  ------------------
  692|      6|    string_length = PORT_Strlen(inString);
  ------------------
  |  |  190|      6|#define PORT_Strlen(s) strlen(s)
  ------------------
  693|       |    /*
  694|       |     *  shorten the string, respecting utf8 encoding
  695|       |     *  to do so, we work backward from the end
  696|       |     *  bytes looking from the end are either:
  697|       |     *    - ascii [0x00,0x7f]
  698|       |     *    - the [2-n]th byte of a multibyte sequence
  699|       |     *        [0x3F,0xBF], i.e, most significant 2 bits are '10'
  700|       |     *    - the first byte of a multibyte sequence [0xC0,0xFD],
  701|       |     *        i.e, most significant 2 bits are '11'
  702|       |     *
  703|       |     *    When the string is too long, we lop off any trailing '10' bytes,
  704|       |     *  if any. When these are all eliminated we lop off
  705|       |     *  one additional byte. Thus if we lopped any '10'
  706|       |     *  we'll be lopping a '11' byte (the first byte of the multibyte sequence),
  707|       |     *  otherwise we're lopping off an ascii character.
  708|       |     *
  709|       |     *    To test for '10' bytes, we first AND it with
  710|       |     *  11000000 (0xc0) so that we get 10000000 (0x80) if and only if
  711|       |     *  the byte starts with 10. We test for equality.
  712|       |     */
  713|      6|    while (string_length > full_length) {
  ------------------
  |  Branch (713:12): [True: 0, False: 6]
  ------------------
  714|       |        /* need to shorten */
  715|      0|        while (string_length > 0 &&
  ------------------
  |  Branch (715:16): [True: 0, False: 0]
  ------------------
  716|      0|               ((inString[string_length - 1] & (char)0xc0) == (char)0x80)) {
  ------------------
  |  Branch (716:16): [True: 0, False: 0]
  ------------------
  717|       |            /* lop off '10' byte */
  718|      0|            string_length--;
  719|      0|        }
  720|       |        /*
  721|       |         * test string_length in case bad data is received
  722|       |         * and string consisted of all '10' bytes,
  723|       |         * avoiding any infinite loop
  724|       |         */
  725|      0|        if (string_length) {
  ------------------
  |  Branch (725:13): [True: 0, False: 0]
  ------------------
  726|       |            /* remove either '11' byte or an asci byte */
  727|      0|            string_length--;
  728|      0|        }
  729|      0|    }
  730|      6|    PORT_Memset(buffer, ' ', full_length);
  ------------------
  |  |  182|      6|#define PORT_Memset memset
  ------------------
  731|      6|    if (nullTerminate) {
  ------------------
  |  Branch (731:9): [True: 6, False: 0]
  ------------------
  732|      6|        buffer[full_length] = 0;
  733|      6|    }
  734|      6|    PORT_Memcpy(buffer, inString, string_length);
  ------------------
  |  |  180|      6|#define PORT_Memcpy memcpy
  ------------------
  735|      6|    return buffer;
  736|      6|}
pkcs11.c:sftk_HashNumber:
 2678|  1.22M|{
 2679|  1.22M|    return (PLHashNumber)((char *)key - (char *)NULL);
 2680|  1.22M|}
pkcs11.c:sftk_RegisterSlot:
 2781|      2|{
 2782|      2|    PLHashEntry *entry;
 2783|      2|    unsigned int index;
 2784|       |
 2785|      2|    index = sftk_GetModuleIndex(slot->slotID);
 2786|       |
 2787|       |    /* make sure the slotID for this module is valid */
 2788|      2|    if (moduleIndex != index) {
  ------------------
  |  Branch (2788:9): [True: 0, False: 2]
  ------------------
 2789|      0|        return CKR_SLOT_ID_INVALID;
  ------------------
  |  | 1391|      0|#define CKR_SLOT_ID_INVALID 0x00000003UL
  ------------------
 2790|      0|    }
 2791|       |
 2792|      2|    if (nscSlotList[index] == NULL) {
  ------------------
  |  Branch (2792:9): [True: 1, False: 1]
  ------------------
 2793|      1|        nscSlotListSize[index] = NSC_SLOT_LIST_BLOCK_SIZE;
  ------------------
  |  |   50|      1|#define NSC_SLOT_LIST_BLOCK_SIZE 10
  ------------------
 2794|      1|        nscSlotList[index] = (CK_SLOT_ID *)
 2795|      1|            PORT_ZAlloc(nscSlotListSize[index] * sizeof(CK_SLOT_ID));
  ------------------
  |  |   72|      1|#define PORT_ZAlloc PORT_ZAlloc_Util
  ------------------
 2796|      1|        if (nscSlotList[index] == NULL) {
  ------------------
  |  Branch (2796:13): [True: 0, False: 1]
  ------------------
 2797|      0|            return CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 2798|      0|        }
 2799|      1|    }
 2800|      2|    if (nscSlotCount[index] >= nscSlotListSize[index]) {
  ------------------
  |  Branch (2800:9): [True: 0, False: 2]
  ------------------
 2801|      0|        CK_SLOT_ID *oldNscSlotList = nscSlotList[index];
 2802|      0|        CK_ULONG oldNscSlotListSize = nscSlotListSize[index];
 2803|      0|        nscSlotListSize[index] += NSC_SLOT_LIST_BLOCK_SIZE;
  ------------------
  |  |   50|      0|#define NSC_SLOT_LIST_BLOCK_SIZE 10
  ------------------
 2804|      0|        nscSlotList[index] = (CK_SLOT_ID *)PORT_Realloc(oldNscSlotList,
  ------------------
  |  |   64|      0|#define PORT_Realloc PORT_Realloc_Util
  ------------------
 2805|      0|                                                        nscSlotListSize[index] * sizeof(CK_SLOT_ID));
 2806|      0|        if (nscSlotList[index] == NULL) {
  ------------------
  |  Branch (2806:13): [True: 0, False: 0]
  ------------------
 2807|       |            /* evidently coverity doesn't know realloc does not
 2808|       |             * free var if it fails ! */
 2809|       |            /* coverity [use_after_free : FALSE] */
 2810|      0|            nscSlotList[index] = oldNscSlotList;
 2811|      0|            nscSlotListSize[index] = oldNscSlotListSize;
 2812|      0|            return CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 2813|      0|        }
 2814|      0|    }
 2815|       |
 2816|      2|    if (nscSlotHashTable[index] == NULL) {
  ------------------
  |  Branch (2816:9): [True: 1, False: 1]
  ------------------
 2817|      1|        nscSlotHashTable[index] = PL_NewHashTable(64, sftk_HashNumber,
 2818|      1|                                                  PL_CompareValues, PL_CompareValues, NULL, 0);
 2819|      1|        if (nscSlotHashTable[index] == NULL) {
  ------------------
  |  Branch (2819:13): [True: 0, False: 1]
  ------------------
 2820|      0|            return CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 2821|      0|        }
 2822|      1|    }
 2823|       |
 2824|      2|    entry = PL_HashTableAdd(nscSlotHashTable[index], (void *)(uintptr_t)slot->slotID, slot);
 2825|      2|    if (entry == NULL) {
  ------------------
  |  Branch (2825:9): [True: 0, False: 2]
  ------------------
 2826|      0|        return CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 2827|      0|    }
 2828|      2|    slot->index = (nscSlotCount[index] & 0x7f) | ((index << 7) & 0x80);
 2829|      2|    nscSlotList[index][nscSlotCount[index]++] = slot->slotID;
 2830|       |
 2831|      2|    return CKR_OK;
  ------------------
  |  | 1388|      2|#define CKR_OK 0x00000000UL
  ------------------
 2832|      2|}
pkcs11.c:sftk_DBShutdown:
 3107|      2|{
 3108|      2|    SFTKDBHandle *certHandle;
 3109|      2|    SFTKDBHandle *keyHandle;
 3110|      2|    SKIP_AFTER_FORK(PZ_Lock(slot->slotLock));
  ------------------
  |  |  256|      2|#define SKIP_AFTER_FORK(x) x
  ------------------
 3111|      2|    certHandle = slot->certDB;
 3112|      2|    slot->certDB = NULL;
 3113|      2|    keyHandle = slot->keyDB;
 3114|      2|    slot->keyDB = NULL;
 3115|      2|    SKIP_AFTER_FORK(PZ_Unlock(slot->slotLock));
  ------------------
  |  |  256|      2|#define SKIP_AFTER_FORK(x) x
  ------------------
 3116|      2|    if (certHandle) {
  ------------------
  |  Branch (3116:9): [True: 0, False: 2]
  ------------------
 3117|      0|        sftk_freeDB(certHandle);
 3118|      0|    }
 3119|      2|    if (keyHandle) {
  ------------------
  |  Branch (3119:9): [True: 0, False: 2]
  ------------------
 3120|      0|        sftk_freeDB(keyHandle);
 3121|      0|    }
 3122|      2|}
pkcs11.c:sftk_getParameters:
 3399|      1|{
 3400|      1|    CK_RV crv;
 3401|      1|    char *libParams;
 3402|      1|    const char *filename;
 3403|      1|    PRFileDesc *file_dc;
 3404|      1|    PRBool free_mem = PR_FALSE;
  ------------------
  |  |  438|      1|#define PR_FALSE 0
  ------------------
 3405|       |
 3406|      1|    if (!init_args || !init_args->LibraryParameters) {
  ------------------
  |  Branch (3406:9): [True: 0, False: 1]
  |  Branch (3406:23): [True: 0, False: 1]
  ------------------
 3407|       |        /* Library parameters were not provided via C_Initialize_args*/
 3408|       |
 3409|       |        /* Enviromental value has precedence to configuration filename */
 3410|      0|        libParams = PR_GetEnvSecure("NSS_LIB_PARAMS");
 3411|       |
 3412|      0|        if (!libParams) {
  ------------------
  |  Branch (3412:13): [True: 0, False: 0]
  ------------------
 3413|       |            /* Load from config filename or use default */
 3414|      0|            filename = PR_GetEnvSecure("NSS_LIB_PARAMS_FILE");
 3415|      0|#ifdef XP_UNIX
 3416|       |            /* Use default configuration file for Linux only */
 3417|      0|            if (!filename)
  ------------------
  |  Branch (3417:17): [True: 0, False: 0]
  ------------------
 3418|      0|                filename = LIB_PARAM_DEFAULT_FILE_LOCATION;
  ------------------
  |  |   65|      0|#define LIB_PARAM_DEFAULT_FILE_LOCATION "/etc/nss/params.config"
  ------------------
 3419|      0|#endif
 3420|      0|            if (filename) {
  ------------------
  |  Branch (3420:17): [True: 0, False: 0]
  ------------------
 3421|      0|                file_dc = PR_OpenFile(filename, PR_RDONLY, 444);
  ------------------
  |  |  577|      0|#define PR_RDONLY       0x01
  ------------------
 3422|      0|                if (file_dc) {
  ------------------
  |  Branch (3422:21): [True: 0, False: 0]
  ------------------
 3423|       |                    /* file opened */
 3424|      0|                    PRInt32 len = PR_Available(file_dc);
 3425|      0|                    libParams = PORT_NewArray(char, len + 1);
  ------------------
  |  |  157|      0|    (type *)PORT_Alloc(sizeof(type) * (num))
  |  |  ------------------
  |  |  |  |   52|      0|#define PORT_Alloc PORT_Alloc_Util
  |  |  ------------------
  ------------------
 3426|      0|                    if (libParams) {
  ------------------
  |  Branch (3426:25): [True: 0, False: 0]
  ------------------
 3427|       |                        /* memory allocated */
 3428|      0|                        if (PR_Read(file_dc, libParams, len) == -1) {
  ------------------
  |  Branch (3428:29): [True: 0, False: 0]
  ------------------
 3429|      0|                            PORT_Free(libParams);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 3430|      0|                            libParams = NULL;
 3431|      0|                        } else {
 3432|      0|                            free_mem = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 3433|      0|                            libParams[len] = '\0';
 3434|      0|                        }
 3435|      0|                    }
 3436|       |
 3437|      0|                    PR_Close(file_dc);
 3438|      0|                }
 3439|      0|            }
 3440|      0|        }
 3441|       |
 3442|      0|        if (libParams == NULL)
  ------------------
  |  Branch (3442:13): [True: 0, False: 0]
  ------------------
 3443|      0|            libParams = LIB_PARAM_DEFAULT;
  ------------------
  |  |   68|      0|#define LIB_PARAM_DEFAULT " configdir='' certPrefix='' keyPrefix='' secmod='' flags=noCertDB,noModDB "
  ------------------
 3444|       |
 3445|      1|    } else {
 3446|       |        /* Use parameters provided with C_Initialize_args */
 3447|      1|        libParams = (char *)init_args->LibraryParameters;
 3448|      1|    }
 3449|       |
 3450|      1|    crv = sftk_parseParameters(libParams, paramStrings, isFIPS);
 3451|      1|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|      1|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (3451:9): [True: 0, False: 1]
  ------------------
 3452|      0|        crv = CKR_ARGUMENTS_BAD;
  ------------------
  |  | 1401|      0|#define CKR_ARGUMENTS_BAD 0x00000007UL
  ------------------
 3453|      0|        goto loser;
 3454|      0|    }
 3455|       |
 3456|      1|    crv = CKR_OK;
  ------------------
  |  | 1388|      1|#define CKR_OK 0x00000000UL
  ------------------
 3457|      1|loser:
 3458|      1|    if (free_mem)
  ------------------
  |  Branch (3458:9): [True: 0, False: 1]
  ------------------
 3459|      0|        PORT_Free(libParams);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 3460|       |
 3461|      1|    return crv;
 3462|      1|}
pkcs11.c:sftk_configure:
  742|      1|{
  743|       |
  744|       |    /* make sure the internationalization was done correctly... */
  745|      1|    if (man) {
  ------------------
  |  Branch (745:9): [True: 0, False: 1]
  ------------------
  746|      0|        manufacturerID = sftk_setStringName(man, manufacturerID_space,
  747|      0|                                            sizeof(manufacturerID_space), PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  748|      0|    }
  749|      1|    if (libdes) {
  ------------------
  |  Branch (749:9): [True: 0, False: 1]
  ------------------
  750|      0|        libraryDescription = sftk_setStringName(libdes,
  751|      0|                                                libraryDescription_space, sizeof(libraryDescription_space),
  752|      0|                                                PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  753|      0|    }
  754|       |
  755|      1|    return CKR_OK;
  ------------------
  |  | 1388|      1|#define CKR_OK 0x00000000UL
  ------------------
  756|      1|}
pkcs11.c:nscFreeAllSlots:
 3331|      1|{
 3332|       |    /* free all the slots */
 3333|      1|    SFTKSlot *slot = NULL;
 3334|      1|    CK_SLOT_ID slotID;
 3335|      1|    int i;
 3336|       |
 3337|      1|    if (nscSlotList[moduleIndex]) {
  ------------------
  |  Branch (3337:9): [True: 1, False: 0]
  ------------------
 3338|      1|        CK_ULONG tmpSlotCount = nscSlotCount[moduleIndex];
 3339|      1|        CK_SLOT_ID_PTR tmpSlotList = nscSlotList[moduleIndex];
 3340|      1|        PLHashTable *tmpSlotHashTable = nscSlotHashTable[moduleIndex];
 3341|       |
 3342|       |        /* first close all the session */
 3343|      3|        for (i = 0; i < (int)tmpSlotCount; i++) {
  ------------------
  |  Branch (3343:21): [True: 2, False: 1]
  ------------------
 3344|      2|            slotID = tmpSlotList[i];
 3345|      2|            (void)NSC_CloseAllSessions(slotID);
 3346|      2|        }
 3347|       |
 3348|       |        /* now clear out the statics */
 3349|      1|        nscSlotList[moduleIndex] = NULL;
 3350|      1|        nscSlotCount[moduleIndex] = 0;
 3351|      1|        nscSlotHashTable[moduleIndex] = NULL;
 3352|      1|        nscSlotListSize[moduleIndex] = 0;
 3353|       |
 3354|      3|        for (i = 0; i < (int)tmpSlotCount; i++) {
  ------------------
  |  Branch (3354:21): [True: 2, False: 1]
  ------------------
 3355|      2|            slotID = tmpSlotList[i];
 3356|      2|            slot = (SFTKSlot *)
 3357|      2|                PL_HashTableLookup(tmpSlotHashTable, (void *)(uintptr_t)slotID);
 3358|      2|            PORT_Assert(slot);
  ------------------
  |  |  120|      2|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      2|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 2, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3359|      2|            if (!slot)
  ------------------
  |  Branch (3359:17): [True: 0, False: 2]
  ------------------
 3360|      0|                continue;
 3361|      2|            SFTK_DestroySlotData(slot);
 3362|      2|            PL_HashTableRemove(tmpSlotHashTable, (void *)(uintptr_t)slotID);
 3363|      2|        }
 3364|      1|        PORT_Free(tmpSlotList);
  ------------------
  |  |   60|      1|#define PORT_Free PORT_Free_Util
  ------------------
 3365|      1|        PL_HashTableDestroy(tmpSlotHashTable);
 3366|      1|    }
 3367|      1|}
pkcs11.c:sftk_searchDatabase:
 5216|  30.6k|{
 5217|  30.6k|    CK_RV crv;
 5218|  30.6k|    int objectListSize = search->array_size - search->size;
 5219|  30.6k|    CK_OBJECT_HANDLE *array = &search->handles[search->size];
 5220|  30.6k|    SDBFind *find;
 5221|  30.6k|    CK_ULONG count;
 5222|       |
 5223|  30.6k|    crv = sftkdb_FindObjectsInit(handle, pTemplate, ulCount, &find);
 5224|  30.6k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  30.6k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5224:9): [True: 0, False: 30.6k]
  ------------------
 5225|      0|        return crv;
 5226|  30.6k|    do {
 5227|  30.6k|        crv = sftkdb_FindObjects(handle, find, array, objectListSize, &count);
 5228|  30.6k|        if ((crv != CKR_OK) || (count == 0))
  ------------------
  |  | 1388|  30.6k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5228:13): [True: 0, False: 30.6k]
  |  Branch (5228:32): [True: 30.6k, False: 0]
  ------------------
 5229|  30.6k|            break;
 5230|      0|        search->size += count;
 5231|      0|        objectListSize -= count;
 5232|      0|        if (objectListSize > 0)
  ------------------
  |  Branch (5232:13): [True: 0, False: 0]
  ------------------
 5233|      0|            break;
 5234|      0|        crv = sftk_expandSearchList(search, NSC_SEARCH_BLOCK_SIZE);
  ------------------
  |  |   49|      0|#define NSC_SEARCH_BLOCK_SIZE 5
  ------------------
 5235|      0|        objectListSize = NSC_SEARCH_BLOCK_SIZE;
  ------------------
  |  |   49|      0|#define NSC_SEARCH_BLOCK_SIZE 5
  ------------------
 5236|      0|        array = &search->handles[search->size];
 5237|      0|    } while (crv == CKR_OK);
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5237:14): [True: 0, False: 0]
  ------------------
 5238|      0|    sftkdb_FindObjectsFinal(handle, find);
 5239|       |
 5240|  30.6k|    return crv;
 5241|  30.6k|}
pkcs11.c:sftk_searchTokenList:
 5362|  30.6k|{
 5363|  30.6k|    CK_RV crv = CKR_OK;
  ------------------
  |  | 1388|  30.6k|#define CKR_OK 0x00000000UL
  ------------------
 5364|  30.6k|    CK_RV crv2;
 5365|  30.6k|    PRBool searchCertDB;
 5366|  30.6k|    PRBool searchKeyDB;
 5367|       |
 5368|  30.6k|    sftk_pruneSearch(pTemplate, ulCount, &searchCertDB, &searchKeyDB);
 5369|       |
 5370|  30.6k|    if (searchCertDB) {
  ------------------
  |  Branch (5370:9): [True: 30.6k, False: 0]
  ------------------
 5371|  30.6k|        SFTKDBHandle *certHandle = sftk_getCertDB(slot);
 5372|  30.6k|        crv = sftk_searchDatabase(certHandle, search, pTemplate, ulCount);
 5373|  30.6k|        crv2 = sftk_emailhack(slot, certHandle, search, pTemplate, ulCount);
 5374|  30.6k|        if (crv == CKR_OK)
  ------------------
  |  | 1388|  30.6k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5374:13): [True: 30.6k, False: 0]
  ------------------
 5375|  30.6k|            crv = crv2;
 5376|  30.6k|        sftk_freeDB(certHandle);
 5377|  30.6k|    }
 5378|       |
 5379|  30.6k|    if (crv == CKR_OK && isLoggedIn && searchKeyDB) {
  ------------------
  |  | 1388|  61.2k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5379:9): [True: 30.6k, False: 0]
  |  Branch (5379:26): [True: 30.6k, False: 0]
  |  Branch (5379:40): [True: 0, False: 30.6k]
  ------------------
 5380|      0|        SFTKDBHandle *keyHandle = sftk_getKeyDB(slot);
 5381|      0|        crv = sftk_searchDatabase(keyHandle, search, pTemplate, ulCount);
 5382|      0|        sftk_freeDB(keyHandle);
 5383|      0|    }
 5384|  30.6k|    return crv;
 5385|  30.6k|}
pkcs11.c:sftk_pruneSearch:
 5340|  30.6k|{
 5341|  30.6k|    CK_ULONG i;
 5342|       |
 5343|  30.6k|    *searchCertDB = PR_TRUE;
  ------------------
  |  |  437|  30.6k|#define PR_TRUE 1
  ------------------
 5344|  30.6k|    *searchKeyDB = PR_TRUE;
  ------------------
  |  |  437|  30.6k|#define PR_TRUE 1
  ------------------
 5345|  61.2k|    for (i = 0; i < ulCount; i++) {
  ------------------
  |  Branch (5345:17): [True: 61.2k, False: 0]
  ------------------
 5346|  61.2k|        if (pTemplate[i].type == CKA_CLASS && pTemplate[i].pValue != NULL) {
  ------------------
  |  |  511|   122k|#define CKA_CLASS 0x00000000UL
  ------------------
  |  Branch (5346:13): [True: 30.6k, False: 30.6k]
  |  Branch (5346:47): [True: 30.6k, False: 0]
  ------------------
 5347|  30.6k|            CK_OBJECT_CLASS class = *((CK_OBJECT_CLASS *)pTemplate[i].pValue);
 5348|  30.6k|            if (class == CKO_PRIVATE_KEY || class == CKO_SECRET_KEY) {
  ------------------
  |  |  328|  61.2k|#define CKO_PRIVATE_KEY 0x00000003UL
  ------------------
                          if (class == CKO_PRIVATE_KEY || class == CKO_SECRET_KEY) {
  ------------------
  |  |  329|  30.6k|#define CKO_SECRET_KEY 0x00000004UL
  ------------------
  |  Branch (5348:17): [True: 0, False: 30.6k]
  |  Branch (5348:45): [True: 0, False: 30.6k]
  ------------------
 5349|      0|                *searchCertDB = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5350|  30.6k|            } else {
 5351|  30.6k|                *searchKeyDB = PR_FALSE;
  ------------------
  |  |  438|  30.6k|#define PR_FALSE 0
  ------------------
 5352|  30.6k|            }
 5353|  30.6k|            break;
 5354|  30.6k|        }
 5355|  61.2k|    }
 5356|  30.6k|}

NSC_DestroyObject:
  272|  69.5k|{
  273|  69.5k|    SFTKSlot *slot = sftk_SlotFromSessionHandle(hSession);
  274|  69.5k|    SFTKSession *session;
  275|  69.5k|    SFTKObject *object;
  276|  69.5k|    SFTKFreeStatus status;
  277|       |
  278|  69.5k|    CHECK_FORK();
  279|       |
  280|  69.5k|    if (slot == NULL) {
  ------------------
  |  Branch (280:9): [True: 0, False: 69.5k]
  ------------------
  281|      0|        return CKR_SESSION_HANDLE_INVALID;
  ------------------
  |  | 1465|      0|#define CKR_SESSION_HANDLE_INVALID 0x000000B3UL
  ------------------
  282|      0|    }
  283|       |    /*
  284|       |     * This whole block just makes sure we really can destroy the
  285|       |     * requested object.
  286|       |     */
  287|  69.5k|    session = sftk_SessionFromHandle(hSession);
  288|  69.5k|    if (session == NULL) {
  ------------------
  |  Branch (288:9): [True: 0, False: 69.5k]
  ------------------
  289|      0|        return CKR_SESSION_HANDLE_INVALID;
  ------------------
  |  | 1465|      0|#define CKR_SESSION_HANDLE_INVALID 0x000000B3UL
  ------------------
  290|      0|    }
  291|       |
  292|  69.5k|    object = sftk_ObjectFromHandle(hObject, session);
  293|  69.5k|    if (object == NULL) {
  ------------------
  |  Branch (293:9): [True: 0, False: 69.5k]
  ------------------
  294|      0|        sftk_FreeSession(session);
  295|      0|        return CKR_OBJECT_HANDLE_INVALID;
  ------------------
  |  | 1452|      0|#define CKR_OBJECT_HANDLE_INVALID 0x00000082UL
  ------------------
  296|      0|    }
  297|       |
  298|       |    /* don't destroy a private object if we aren't logged in */
  299|  69.5k|    if ((!slot->isLoggedIn) && (slot->needLogin) &&
  ------------------
  |  Branch (299:9): [True: 69.5k, False: 0]
  |  Branch (299:32): [True: 0, False: 69.5k]
  ------------------
  300|  69.5k|        (sftk_isTrue(object, CKA_PRIVATE))) {
  ------------------
  |  |  513|      0|#define CKA_PRIVATE 0x00000002UL
  ------------------
  |  Branch (300:9): [True: 0, False: 0]
  ------------------
  301|      0|        sftk_FreeSession(session);
  302|      0|        sftk_FreeObject(object);
  303|      0|        return CKR_USER_NOT_LOGGED_IN;
  ------------------
  |  | 1486|      0|#define CKR_USER_NOT_LOGGED_IN 0x00000101UL
  ------------------
  304|      0|    }
  305|       |
  306|       |    /* don't destroy a token object if we aren't in a rw session */
  307|       |
  308|  69.5k|    if (((session->info.flags & CKF_RW_SESSION) == 0) &&
  ------------------
  |  |  302|  69.5k|#define CKF_RW_SESSION 0x00000002UL     /* session is r/w */
  ------------------
  |  Branch (308:9): [True: 69.5k, False: 0]
  ------------------
  309|  69.5k|        (sftk_isTrue(object, CKA_TOKEN))) {
  ------------------
  |  |  512|  69.5k|#define CKA_TOKEN 0x00000001UL
  ------------------
  |  Branch (309:9): [True: 0, False: 69.5k]
  ------------------
  310|      0|        sftk_FreeSession(session);
  311|      0|        sftk_FreeObject(object);
  312|      0|        return CKR_SESSION_READ_ONLY;
  ------------------
  |  | 1467|      0|#define CKR_SESSION_READ_ONLY 0x000000B5UL
  ------------------
  313|      0|    }
  314|       |
  315|  69.5k|    sftk_DeleteObject(session, object);
  316|       |
  317|  69.5k|    sftk_FreeSession(session);
  318|       |
  319|       |    /*
  320|       |     * get some indication if the object is destroyed. Note: this is not
  321|       |     * 100%. Someone may have an object reference outstanding (though that
  322|       |     * should not be the case by here. Also note that the object is "half"
  323|       |     * destroyed. Our internal representation is destroyed, but it may still
  324|       |     * be in the data base.
  325|       |     */
  326|  69.5k|    status = sftk_FreeObject(object);
  327|       |
  328|  69.5k|    return (status != SFTK_DestroyFailure) ? CKR_OK : CKR_DEVICE_ERROR;
  ------------------
  |  | 1388|  69.5k|#define CKR_OK 0x00000000UL
  ------------------
                  return (status != SFTK_DestroyFailure) ? CKR_OK : CKR_DEVICE_ERROR;
  ------------------
  |  | 1416|      0|#define CKR_DEVICE_ERROR 0x00000030UL
  ------------------
  |  Branch (328:12): [True: 69.5k, False: 0]
  ------------------
  329|  69.5k|}
sftk_ReturnContextByType:
  376|   431k|{
  377|   431k|    switch (type) {
  ------------------
  |  Branch (377:13): [True: 0, False: 431k]
  ------------------
  378|  29.9k|        case SFTK_ENCRYPT:
  ------------------
  |  Branch (378:9): [True: 29.9k, False: 401k]
  ------------------
  379|  49.1k|        case SFTK_DECRYPT:
  ------------------
  |  Branch (379:9): [True: 19.1k, False: 412k]
  ------------------
  380|  49.7k|        case SFTK_MESSAGE_ENCRYPT:
  ------------------
  |  Branch (380:9): [True: 601, False: 431k]
  ------------------
  381|  62.2k|        case SFTK_MESSAGE_DECRYPT:
  ------------------
  |  Branch (381:9): [True: 12.4k, False: 419k]
  ------------------
  382|  62.2k|            return session->enc_context;
  383|   125k|        case SFTK_HASH:
  ------------------
  |  Branch (383:9): [True: 125k, False: 306k]
  ------------------
  384|   125k|            return session->hash_context;
  385|   239k|        case SFTK_SIGN:
  ------------------
  |  Branch (385:9): [True: 239k, False: 192k]
  ------------------
  386|   239k|        case SFTK_SIGN_RECOVER:
  ------------------
  |  Branch (386:9): [True: 0, False: 431k]
  ------------------
  387|   244k|        case SFTK_VERIFY:
  ------------------
  |  Branch (387:9): [True: 4.82k, False: 427k]
  ------------------
  388|   244k|        case SFTK_VERIFY_RECOVER:
  ------------------
  |  Branch (388:9): [True: 32, False: 431k]
  ------------------
  389|   244k|        case SFTK_MESSAGE_SIGN:
  ------------------
  |  Branch (389:9): [True: 0, False: 431k]
  ------------------
  390|   244k|        case SFTK_MESSAGE_VERIFY:
  ------------------
  |  Branch (390:9): [True: 0, False: 431k]
  ------------------
  391|   244k|            return session->hash_context;
  392|   431k|    }
  393|      0|    return NULL;
  394|   431k|}
sftk_SetContextByType:
  402|   219k|{
  403|   219k|    switch (type) {
  ------------------
  |  Branch (403:13): [True: 0, False: 219k]
  ------------------
  404|  26.7k|        case SFTK_ENCRYPT:
  ------------------
  |  Branch (404:9): [True: 26.7k, False: 193k]
  ------------------
  405|  27.6k|        case SFTK_DECRYPT:
  ------------------
  |  Branch (405:9): [True: 950, False: 219k]
  ------------------
  406|  27.9k|        case SFTK_MESSAGE_ENCRYPT:
  ------------------
  |  Branch (406:9): [True: 298, False: 219k]
  ------------------
  407|  29.5k|        case SFTK_MESSAGE_DECRYPT:
  ------------------
  |  Branch (407:9): [True: 1.55k, False: 218k]
  ------------------
  408|  29.5k|            session->enc_context = context;
  409|  29.5k|            break;
  410|  76.8k|        case SFTK_HASH:
  ------------------
  |  Branch (410:9): [True: 76.8k, False: 143k]
  ------------------
  411|  76.8k|            session->hash_context = context;
  412|  76.8k|            break;
  413|   108k|        case SFTK_SIGN:
  ------------------
  |  Branch (413:9): [True: 108k, False: 111k]
  ------------------
  414|   108k|        case SFTK_SIGN_RECOVER:
  ------------------
  |  Branch (414:9): [True: 0, False: 219k]
  ------------------
  415|   113k|        case SFTK_VERIFY:
  ------------------
  |  Branch (415:9): [True: 4.82k, False: 215k]
  ------------------
  416|   113k|        case SFTK_VERIFY_RECOVER:
  ------------------
  |  Branch (416:9): [True: 32, False: 219k]
  ------------------
  417|   113k|        case SFTK_MESSAGE_SIGN:
  ------------------
  |  Branch (417:9): [True: 0, False: 219k]
  ------------------
  418|   113k|        case SFTK_MESSAGE_VERIFY:
  ------------------
  |  Branch (418:9): [True: 0, False: 219k]
  ------------------
  419|   113k|            session->hash_context = context;
  420|   113k|            break;
  421|   219k|    }
  422|   219k|    return;
  423|   219k|}
sftk_GetContext:
  435|   315k|{
  436|   315k|    SFTKSession *session;
  437|   315k|    SFTKSessionContext *context;
  438|       |
  439|   315k|    session = sftk_SessionFromHandle(handle);
  440|   315k|    if (session == NULL)
  ------------------
  |  Branch (440:9): [True: 0, False: 315k]
  ------------------
  441|      0|        return CKR_SESSION_HANDLE_INVALID;
  ------------------
  |  | 1465|      0|#define CKR_SESSION_HANDLE_INVALID 0x000000B3UL
  ------------------
  442|   315k|    context = sftk_ReturnContextByType(session, type);
  443|       |    /* make sure the context is valid */
  444|   315k|    if ((context == NULL) || (context->type != type) || (needMulti && !(context->multi))) {
  ------------------
  |  Branch (444:9): [True: 37.0k, False: 278k]
  |  Branch (444:30): [True: 0, False: 278k]
  |  Branch (444:58): [True: 252k, False: 25.5k]
  |  Branch (444:71): [True: 0, False: 252k]
  ------------------
  445|  37.0k|        sftk_FreeSession(session);
  446|  37.0k|        return CKR_OPERATION_NOT_INITIALIZED;
  ------------------
  |  | 1454|  37.0k|#define CKR_OPERATION_NOT_INITIALIZED 0x00000091UL
  ------------------
  447|  37.0k|    }
  448|   278k|    *contextPtr = context;
  449|   278k|    if (sessionPtr != NULL) {
  ------------------
  |  Branch (449:9): [True: 203k, False: 75.2k]
  ------------------
  450|   203k|        *sessionPtr = session;
  451|   203k|    } else {
  452|  75.2k|        sftk_FreeSession(session);
  453|  75.2k|    }
  454|   278k|    return CKR_OK;
  ------------------
  |  | 1388|   278k|#define CKR_OK 0x00000000UL
  ------------------
  455|   315k|}
sftk_TerminateOp:
  463|   103k|{
  464|   103k|    session->lastOpWasFIPS = context->isFIPS;
  465|   103k|    sftk_FreeContext(context);
  466|   103k|    sftk_SetContextByType(session, ctype, NULL);
  467|   103k|}
sftk_InitGeneric:
  483|   113k|{
  484|   113k|    SFTKObject *key = NULL;
  485|   113k|    SFTKAttribute *att;
  486|   113k|    SFTKSessionContext *context;
  487|       |
  488|       |    /* We can only init if there is not current context active */
  489|   113k|    if (sftk_ReturnContextByType(session, ctype) != NULL) {
  ------------------
  |  Branch (489:9): [True: 0, False: 113k]
  ------------------
  490|      0|        return CKR_OPERATION_ACTIVE;
  ------------------
  |  | 1453|      0|#define CKR_OPERATION_ACTIVE 0x00000090UL
  ------------------
  491|      0|    }
  492|       |
  493|       |    /* find the key */
  494|   113k|    if (keyPtr) {
  ------------------
  |  Branch (494:9): [True: 74.0k, False: 39.3k]
  ------------------
  495|  74.0k|        key = sftk_ObjectFromHandle(hKey, session);
  496|  74.0k|        if (key == NULL) {
  ------------------
  |  Branch (496:13): [True: 0, False: 74.0k]
  ------------------
  497|      0|            return CKR_KEY_HANDLE_INVALID;
  ------------------
  |  | 1428|      0|#define CKR_KEY_HANDLE_INVALID 0x00000060UL
  ------------------
  498|      0|        }
  499|       |
  500|       |        /* make sure it's a valid  key for this operation */
  501|  74.0k|        if (((key->objclass != CKO_SECRET_KEY) &&
  ------------------
  |  |  329|  74.0k|#define CKO_SECRET_KEY 0x00000004UL
  ------------------
  |  Branch (501:14): [True: 3.69k, False: 70.3k]
  ------------------
  502|  74.0k|             (key->objclass != pubKeyType)) ||
  ------------------
  |  Branch (502:14): [True: 0, False: 3.69k]
  ------------------
  503|  74.0k|            !sftk_isTrue(key, operation)) {
  ------------------
  |  Branch (503:13): [True: 0, False: 74.0k]
  ------------------
  504|      0|            sftk_FreeObject(key);
  505|      0|            return CKR_KEY_TYPE_INCONSISTENT;
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
  506|      0|        }
  507|       |        /* get the key type */
  508|  74.0k|        att = sftk_FindAttribute(key, CKA_KEY_TYPE);
  ------------------
  |  |  543|  74.0k|#define CKA_KEY_TYPE 0x00000100UL
  ------------------
  509|  74.0k|        if (att == NULL) {
  ------------------
  |  Branch (509:13): [True: 0, False: 74.0k]
  ------------------
  510|      0|            sftk_FreeObject(key);
  511|      0|            return CKR_KEY_TYPE_INCONSISTENT;
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
  512|      0|        }
  513|  74.0k|        PORT_Assert(att->attrib.ulValueLen == sizeof(CK_KEY_TYPE));
  ------------------
  |  |  120|  74.0k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  74.0k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 74.0k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  514|  74.0k|        if (att->attrib.ulValueLen != sizeof(CK_KEY_TYPE)) {
  ------------------
  |  Branch (514:13): [True: 0, False: 74.0k]
  ------------------
  515|      0|            sftk_FreeAttribute(att);
  516|      0|            sftk_FreeObject(key);
  517|      0|            return CKR_ATTRIBUTE_VALUE_INVALID;
  ------------------
  |  | 1409|      0|#define CKR_ATTRIBUTE_VALUE_INVALID 0x00000013UL
  ------------------
  518|      0|        }
  519|  74.0k|        PORT_Memcpy(keyTypePtr, att->attrib.pValue, sizeof(CK_KEY_TYPE));
  ------------------
  |  |  180|  74.0k|#define PORT_Memcpy memcpy
  ------------------
  520|  74.0k|        sftk_FreeAttribute(att);
  521|  74.0k|        *keyPtr = key;
  522|  74.0k|    }
  523|       |
  524|       |    /* allocate the context structure */
  525|   113k|    context = (SFTKSessionContext *)PORT_Alloc(sizeof(SFTKSessionContext));
  ------------------
  |  |   52|   113k|#define PORT_Alloc PORT_Alloc_Util
  ------------------
  526|   113k|    if (context == NULL) {
  ------------------
  |  Branch (526:9): [True: 0, False: 113k]
  ------------------
  527|      0|        if (key)
  ------------------
  |  Branch (527:13): [True: 0, False: 0]
  ------------------
  528|      0|            sftk_FreeObject(key);
  529|      0|        return CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
  530|      0|    }
  531|   113k|    context->type = ctype;
  532|   113k|    context->multi = PR_TRUE;
  ------------------
  |  |  437|   113k|#define PR_TRUE 1
  ------------------
  533|   113k|    context->rsa = PR_FALSE;
  ------------------
  |  |  438|   113k|#define PR_FALSE 0
  ------------------
  534|   113k|    context->cipherInfo = NULL;
  535|   113k|    context->hashInfo = NULL;
  536|   113k|    context->doPad = PR_FALSE;
  ------------------
  |  |  438|   113k|#define PR_FALSE 0
  ------------------
  537|   113k|    context->padDataLength = 0;
  538|   113k|    context->key = key;
  539|   113k|    context->blockSize = 0;
  540|   113k|    context->maxLen = 0;
  541|   113k|    context->isFIPS = sftk_operationIsFIPS(session->slot, pMechanism,
  542|   113k|                                           operation, key);
  543|   113k|    *contextPtr = context;
  544|   113k|    return CKR_OK;
  ------------------
  |  | 1388|   113k|#define CKR_OK 0x00000000UL
  ------------------
  545|   113k|}
sftk_CryptInit:
  859|  14.7k|{
  860|  14.7k|    SFTKSession *session;
  861|  14.7k|    SFTKObject *key;
  862|  14.7k|    SFTKSessionContext *context;
  863|  14.7k|    SFTKAttribute *att;
  864|  14.7k|#ifndef NSS_DISABLE_DEPRECATED_RC2
  865|  14.7k|    CK_RC2_CBC_PARAMS *rc2_param;
  866|  14.7k|    unsigned effectiveKeyLength;
  867|  14.7k|#endif
  868|       |#if NSS_SOFTOKEN_DOES_RC5
  869|       |    CK_RC5_CBC_PARAMS *rc5_param;
  870|       |    SECItem rc5Key;
  871|       |#endif
  872|  14.7k|    CK_NSS_GCM_PARAMS nss_gcm_param;
  873|  14.7k|    void *aes_param;
  874|  14.7k|    CK_NSS_AEAD_PARAMS nss_aead_params;
  875|  14.7k|    CK_NSS_AEAD_PARAMS *nss_aead_params_ptr = NULL;
  876|  14.7k|    CK_KEY_TYPE key_type;
  877|  14.7k|    CK_RV crv = CKR_OK;
  ------------------
  |  | 1388|  14.7k|#define CKR_OK 0x00000000UL
  ------------------
  878|  14.7k|    unsigned char newdeskey[24];
  879|  14.7k|    PRBool useNewKey = PR_FALSE;
  ------------------
  |  |  438|  14.7k|#define PR_FALSE 0
  ------------------
  880|  14.7k|    int t;
  881|       |
  882|  14.7k|    if (!pMechanism) {
  ------------------
  |  Branch (882:9): [True: 0, False: 14.7k]
  ------------------
  883|      0|        return CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
  884|      0|    }
  885|       |
  886|  14.7k|    crv = sftk_MechAllowsOperation(pMechanism->mechanism, mechUsage);
  887|  14.7k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  14.7k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (887:9): [True: 9, False: 14.7k]
  ------------------
  888|      9|        return crv;
  889|       |
  890|  14.7k|    session = sftk_SessionFromHandle(hSession);
  891|  14.7k|    if (session == NULL)
  ------------------
  |  Branch (891:9): [True: 0, False: 14.7k]
  ------------------
  892|      0|        return CKR_SESSION_HANDLE_INVALID;
  ------------------
  |  | 1465|      0|#define CKR_SESSION_HANDLE_INVALID 0x000000B3UL
  ------------------
  893|       |
  894|  14.7k|    crv = sftk_InitGeneric(session, pMechanism, &context, contextType, &key,
  895|  14.7k|                           hKey, &key_type,
  896|  14.7k|                           isEncrypt ? CKO_PUBLIC_KEY : CKO_PRIVATE_KEY,
  ------------------
  |  |  327|  13.8k|#define CKO_PUBLIC_KEY 0x00000002UL
  ------------------
                                         isEncrypt ? CKO_PUBLIC_KEY : CKO_PRIVATE_KEY,
  ------------------
  |  |  328|    950|#define CKO_PRIVATE_KEY 0x00000003UL
  ------------------
  |  Branch (896:28): [True: 13.8k, False: 950]
  ------------------
  897|  14.7k|                           keyUsage);
  898|       |
  899|  14.7k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  14.7k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (899:9): [True: 0, False: 14.7k]
  ------------------
  900|      0|        sftk_FreeSession(session);
  901|      0|        return crv;
  902|      0|    }
  903|       |
  904|  14.7k|    context->doPad = PR_FALSE;
  ------------------
  |  |  438|  14.7k|#define PR_FALSE 0
  ------------------
  905|  14.7k|    switch (pMechanism->mechanism) {
  906|  1.26k|        case CKM_RSA_PKCS:
  ------------------
  |  |  720|  1.26k|#define CKM_RSA_PKCS 0x00000001UL
  ------------------
  |  Branch (906:9): [True: 1.26k, False: 13.5k]
  ------------------
  907|  1.26k|        case CKM_RSA_X_509:
  ------------------
  |  |  722|  1.26k|#define CKM_RSA_X_509 0x00000003UL
  ------------------
  |  Branch (907:9): [True: 0, False: 14.7k]
  ------------------
  908|  1.26k|            if (key_type != CKK_RSA) {
  ------------------
  |  |  372|  1.26k|#define CKK_RSA 0x00000000UL
  ------------------
  |  Branch (908:17): [True: 0, False: 1.26k]
  ------------------
  909|      0|                crv = CKR_KEY_TYPE_INCONSISTENT;
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
  910|      0|                break;
  911|      0|            }
  912|  1.26k|            context->multi = PR_FALSE;
  ------------------
  |  |  438|  1.26k|#define PR_FALSE 0
  ------------------
  913|  1.26k|            context->rsa = PR_TRUE;
  ------------------
  |  |  437|  1.26k|#define PR_TRUE 1
  ------------------
  914|  1.26k|            if (isEncrypt) {
  ------------------
  |  Branch (914:17): [True: 1.26k, False: 0]
  ------------------
  915|  1.26k|                NSSLOWKEYPublicKey *pubKey = sftk_GetPubKey(key, CKK_RSA, &crv);
  ------------------
  |  |  372|  1.26k|#define CKK_RSA 0x00000000UL
  ------------------
  916|  1.26k|                if (pubKey == NULL) {
  ------------------
  |  Branch (916:21): [True: 0, False: 1.26k]
  ------------------
  917|      0|                    crv = CKR_KEY_HANDLE_INVALID;
  ------------------
  |  | 1428|      0|#define CKR_KEY_HANDLE_INVALID 0x00000060UL
  ------------------
  918|      0|                    break;
  919|      0|                }
  920|  1.26k|                context->maxLen = nsslowkey_PublicModulusLen(pubKey);
  921|  1.26k|                context->cipherInfo = (void *)pubKey;
  922|  1.26k|                context->update = pMechanism->mechanism == CKM_RSA_X_509
  ------------------
  |  |  722|  1.26k|#define CKM_RSA_X_509 0x00000003UL
  ------------------
  |  Branch (922:35): [True: 0, False: 1.26k]
  ------------------
  923|  1.26k|                                      ? sftk_RSAEncryptRaw
  924|  1.26k|                                      : sftk_RSAEncrypt;
  925|  1.26k|            } else {
  926|      0|                NSSLOWKEYPrivateKey *privKey = sftk_GetPrivKey(key, CKK_RSA, &crv);
  ------------------
  |  |  372|      0|#define CKK_RSA 0x00000000UL
  ------------------
  927|      0|                if (privKey == NULL) {
  ------------------
  |  Branch (927:21): [True: 0, False: 0]
  ------------------
  928|      0|                    crv = CKR_KEY_HANDLE_INVALID;
  ------------------
  |  | 1428|      0|#define CKR_KEY_HANDLE_INVALID 0x00000060UL
  ------------------
  929|      0|                    break;
  930|      0|                }
  931|      0|                context->maxLen = nsslowkey_PrivateModulusLen(privKey);
  932|      0|                context->cipherInfo = (void *)privKey;
  933|      0|                context->update = pMechanism->mechanism == CKM_RSA_X_509
  ------------------
  |  |  722|      0|#define CKM_RSA_X_509 0x00000003UL
  ------------------
  |  Branch (933:35): [True: 0, False: 0]
  ------------------
  934|      0|                                      ? sftk_RSADecryptRaw
  935|      0|                                      : sftk_RSADecrypt;
  936|      0|            }
  937|  1.26k|            context->destroy = sftk_Null;
  938|  1.26k|            break;
  939|      0|        case CKM_RSA_PKCS_OAEP:
  ------------------
  |  |  734|      0|#define CKM_RSA_PKCS_OAEP 0x00000009UL
  ------------------
  |  Branch (939:9): [True: 0, False: 14.7k]
  ------------------
  940|      0|            if (key_type != CKK_RSA) {
  ------------------
  |  |  372|      0|#define CKK_RSA 0x00000000UL
  ------------------
  |  Branch (940:17): [True: 0, False: 0]
  ------------------
  941|      0|                crv = CKR_KEY_TYPE_INCONSISTENT;
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
  942|      0|                break;
  943|      0|            }
  944|      0|            if (pMechanism->ulParameterLen != sizeof(CK_RSA_PKCS_OAEP_PARAMS) ||
  ------------------
  |  Branch (944:17): [True: 0, False: 0]
  ------------------
  945|      0|                !sftk_ValidateOaepParams((CK_RSA_PKCS_OAEP_PARAMS *)pMechanism->pParameter)) {
  ------------------
  |  Branch (945:17): [True: 0, False: 0]
  ------------------
  946|      0|                crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
  947|      0|                break;
  948|      0|            }
  949|      0|            context->multi = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  950|      0|            context->rsa = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  951|      0|            {
  952|      0|                SFTKOAEPInfo *info;
  953|      0|                CK_RSA_PKCS_OAEP_PARAMS *params =
  954|      0|                    (CK_RSA_PKCS_OAEP_PARAMS *)pMechanism->pParameter;
  955|       |                /* make a copy of the source data value for future
  956|       |                 * use (once the user has reclaimed his data in pParameter)*/
  957|      0|                void *newSource = NULL;
  958|      0|                if (params->pSourceData) {
  ------------------
  |  Branch (958:21): [True: 0, False: 0]
  ------------------
  959|      0|                    newSource = PORT_Alloc(params->ulSourceDataLen);
  ------------------
  |  |   52|      0|#define PORT_Alloc PORT_Alloc_Util
  ------------------
  960|      0|                    if (newSource == NULL) {
  ------------------
  |  Branch (960:25): [True: 0, False: 0]
  ------------------
  961|      0|                        crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
  962|      0|                        break;
  963|      0|                    }
  964|      0|                    PORT_Memcpy(newSource, params->pSourceData, params->ulSourceDataLen);
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
  965|      0|                }
  966|      0|                info = PORT_New(SFTKOAEPInfo);
  ------------------
  |  |  151|      0|#define PORT_New(type) (type *)PORT_Alloc(sizeof(type))
  |  |  ------------------
  |  |  |  |   52|      0|#define PORT_Alloc PORT_Alloc_Util
  |  |  ------------------
  ------------------
  967|      0|                if (info == NULL) {
  ------------------
  |  Branch (967:21): [True: 0, False: 0]
  ------------------
  968|      0|                    PORT_ZFree(newSource, params->ulSourceDataLen);
  ------------------
  |  |   75|      0|#define PORT_ZFree PORT_ZFree_Util
  ------------------
  969|      0|                    crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
  970|      0|                    break;
  971|      0|                }
  972|      0|                info->params = *params;
  973|      0|                info->params.pSourceData = newSource;
  974|      0|                info->isEncrypt = isEncrypt;
  975|       |
  976|       |                /* now setup encryption and decryption contexts */
  977|      0|                if (isEncrypt) {
  ------------------
  |  Branch (977:21): [True: 0, False: 0]
  ------------------
  978|      0|                    info->key.pub = sftk_GetPubKey(key, CKK_RSA, &crv);
  ------------------
  |  |  372|      0|#define CKK_RSA 0x00000000UL
  ------------------
  979|      0|                    if (info->key.pub == NULL) {
  ------------------
  |  Branch (979:25): [True: 0, False: 0]
  ------------------
  980|      0|                        sftk_freeRSAOAEPInfo(info, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  981|      0|                        crv = CKR_KEY_HANDLE_INVALID;
  ------------------
  |  | 1428|      0|#define CKR_KEY_HANDLE_INVALID 0x00000060UL
  ------------------
  982|      0|                        break;
  983|      0|                    }
  984|      0|                    context->update = sftk_RSAEncryptOAEP;
  985|      0|                    context->maxLen = nsslowkey_PublicModulusLen(info->key.pub);
  986|      0|                } else {
  987|      0|                    info->key.priv = sftk_GetPrivKey(key, CKK_RSA, &crv);
  ------------------
  |  |  372|      0|#define CKK_RSA 0x00000000UL
  ------------------
  988|      0|                    if (info->key.priv == NULL) {
  ------------------
  |  Branch (988:25): [True: 0, False: 0]
  ------------------
  989|      0|                        sftk_freeRSAOAEPInfo(info, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  990|      0|                        crv = CKR_KEY_HANDLE_INVALID;
  ------------------
  |  | 1428|      0|#define CKR_KEY_HANDLE_INVALID 0x00000060UL
  ------------------
  991|      0|                        break;
  992|      0|                    }
  993|      0|                    context->update = sftk_RSADecryptOAEP;
  994|      0|                    context->maxLen = nsslowkey_PrivateModulusLen(info->key.priv);
  995|      0|                }
  996|      0|                context->cipherInfo = info;
  997|      0|            }
  998|      0|            context->destroy = sftk_freeRSAOAEPInfo;
  999|      0|            break;
 1000|      0|#ifndef NSS_DISABLE_DEPRECATED_RC2
 1001|      0|        case CKM_RC2_CBC_PAD:
  ------------------
  |  |  810|      0|#define CKM_RC2_CBC_PAD 0x00000105UL
  ------------------
  |  Branch (1001:9): [True: 0, False: 14.7k]
  ------------------
 1002|      0|            context->doPad = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 1003|       |        /* fall thru */
 1004|      0|        case CKM_RC2_ECB:
  ------------------
  |  |  804|      0|#define CKM_RC2_ECB 0x00000101UL
  ------------------
  |  Branch (1004:9): [True: 0, False: 14.7k]
  ------------------
 1005|      0|        case CKM_RC2_CBC:
  ------------------
  |  |  805|      0|#define CKM_RC2_CBC 0x00000102UL
  ------------------
  |  Branch (1005:9): [True: 0, False: 14.7k]
  ------------------
 1006|      0|            context->blockSize = 8;
 1007|      0|            if (key_type != CKK_RC2) {
  ------------------
  |  |  384|      0|#define CKK_RC2 0x00000011UL
  ------------------
  |  Branch (1007:17): [True: 0, False: 0]
  ------------------
 1008|      0|                crv = CKR_KEY_TYPE_INCONSISTENT;
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
 1009|      0|                break;
 1010|      0|            }
 1011|      0|            att = sftk_FindAttribute(key, CKA_VALUE);
  ------------------
  |  |  516|      0|#define CKA_VALUE 0x00000011UL
  ------------------
 1012|      0|            if (att == NULL) {
  ------------------
  |  Branch (1012:17): [True: 0, False: 0]
  ------------------
 1013|      0|                crv = CKR_KEY_HANDLE_INVALID;
  ------------------
  |  | 1428|      0|#define CKR_KEY_HANDLE_INVALID 0x00000060UL
  ------------------
 1014|      0|                break;
 1015|      0|            }
 1016|       |
 1017|      0|            if (BAD_PARAM_CAST(pMechanism, sizeof(CK_RC2_CBC_PARAMS))) {
  ------------------
  |  |   50|      0|#define BAD_PARAM_CAST(pMech, typeSize) (!pMech->pParameter || pMech->ulParameterLen < typeSize)
  |  |  ------------------
  |  |  |  Branch (50:42): [True: 0, False: 0]
  |  |  |  Branch (50:64): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1018|      0|                crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 1019|      0|                break;
 1020|      0|            }
 1021|      0|            rc2_param = (CK_RC2_CBC_PARAMS *)pMechanism->pParameter;
 1022|      0|            effectiveKeyLength = (rc2_param->ulEffectiveBits + 7) / 8;
 1023|      0|            context->cipherInfo =
 1024|      0|                RC2_CreateContext((unsigned char *)att->attrib.pValue,
 1025|      0|                                  att->attrib.ulValueLen, rc2_param->iv,
 1026|      0|                                  pMechanism->mechanism == CKM_RC2_ECB ? NSS_RC2 : NSS_RC2_CBC, effectiveKeyLength);
  ------------------
  |  |  804|      0|#define CKM_RC2_ECB 0x00000101UL
  ------------------
                                                pMechanism->mechanism == CKM_RC2_ECB ? NSS_RC2 : NSS_RC2_CBC, effectiveKeyLength);
  ------------------
  |  |   17|      0|#define NSS_RC2 0
  ------------------
                                                pMechanism->mechanism == CKM_RC2_ECB ? NSS_RC2 : NSS_RC2_CBC, effectiveKeyLength);
  ------------------
  |  |   18|      0|#define NSS_RC2_CBC 1
  ------------------
  |  Branch (1026:35): [True: 0, False: 0]
  ------------------
 1027|      0|            sftk_FreeAttribute(att);
 1028|      0|            if (context->cipherInfo == NULL) {
  ------------------
  |  Branch (1028:17): [True: 0, False: 0]
  ------------------
 1029|      0|                crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 1030|      0|                break;
 1031|      0|            }
 1032|      0|            context->update = isEncrypt ? SFTKCipher_RC2_Encrypt : SFTKCipher_RC2_Decrypt;
  ------------------
  |  Branch (1032:31): [True: 0, False: 0]
  ------------------
 1033|      0|            context->destroy = SFTKCipher_RC2_DestroyContext;
 1034|      0|            break;
 1035|      0|#endif /* NSS_DISABLE_DEPRECATED_RC2 */
 1036|       |
 1037|       |#if NSS_SOFTOKEN_DOES_RC5
 1038|       |        case CKM_RC5_CBC_PAD:
 1039|       |            context->doPad = PR_TRUE;
 1040|       |        /* fall thru */
 1041|       |        case CKM_RC5_ECB:
 1042|       |        case CKM_RC5_CBC:
 1043|       |            if (key_type != CKK_RC5) {
 1044|       |                crv = CKR_KEY_TYPE_INCONSISTENT;
 1045|       |                break;
 1046|       |            }
 1047|       |            att = sftk_FindAttribute(key, CKA_VALUE);
 1048|       |            if (att == NULL) {
 1049|       |                crv = CKR_KEY_HANDLE_INVALID;
 1050|       |                break;
 1051|       |            }
 1052|       |
 1053|       |            if (BAD_PARAM_CAST(pMechanism, sizeof(CK_RC5_CBC_PARAMS))) {
 1054|       |                crv = CKR_MECHANISM_PARAM_INVALID;
 1055|       |                break;
 1056|       |            }
 1057|       |            rc5_param = (CK_RC5_CBC_PARAMS *)pMechanism->pParameter;
 1058|       |            context->blockSize = rc5_param->ulWordsize * 2;
 1059|       |            rc5Key.data = (unsigned char *)att->attrib.pValue;
 1060|       |            rc5Key.len = att->attrib.ulValueLen;
 1061|       |            context->cipherInfo = RC5_CreateContext(&rc5Key, rc5_param->ulRounds,
 1062|       |                                                    rc5_param->ulWordsize, rc5_param->pIv,
 1063|       |                                                    pMechanism->mechanism == CKM_RC5_ECB ? NSS_RC5 : NSS_RC5_CBC);
 1064|       |            sftk_FreeAttribute(att);
 1065|       |            if (context->cipherInfo == NULL) {
 1066|       |                crv = CKR_HOST_MEMORY;
 1067|       |                break;
 1068|       |            }
 1069|       |            context->update = isEncrypt ? SFTKCipher_RC5_Encrypt : SFTKCipher_RC5_Decrypt;
 1070|       |            context->destroy = SFTKCipher_RC5_DestroyContext;
 1071|       |            break;
 1072|       |#endif
 1073|      0|        case CKM_RC4:
  ------------------
  |  |  813|      0|#define CKM_RC4 0x00000111UL
  ------------------
  |  Branch (1073:9): [True: 0, False: 14.7k]
  ------------------
 1074|      0|            if (key_type != CKK_RC4) {
  ------------------
  |  |  385|      0|#define CKK_RC4 0x00000012UL
  ------------------
  |  Branch (1074:17): [True: 0, False: 0]
  ------------------
 1075|      0|                crv = CKR_KEY_TYPE_INCONSISTENT;
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
 1076|      0|                break;
 1077|      0|            }
 1078|      0|            att = sftk_FindAttribute(key, CKA_VALUE);
  ------------------
  |  |  516|      0|#define CKA_VALUE 0x00000011UL
  ------------------
 1079|      0|            if (att == NULL) {
  ------------------
  |  Branch (1079:17): [True: 0, False: 0]
  ------------------
 1080|      0|                crv = CKR_KEY_HANDLE_INVALID;
  ------------------
  |  | 1428|      0|#define CKR_KEY_HANDLE_INVALID 0x00000060UL
  ------------------
 1081|      0|                break;
 1082|      0|            }
 1083|      0|            context->cipherInfo =
 1084|      0|                RC4_CreateContext((unsigned char *)att->attrib.pValue,
 1085|      0|                                  att->attrib.ulValueLen);
 1086|      0|            sftk_FreeAttribute(att);
 1087|      0|            if (context->cipherInfo == NULL) {
  ------------------
  |  Branch (1087:17): [True: 0, False: 0]
  ------------------
 1088|      0|                crv = CKR_HOST_MEMORY; /* WRONG !!! */
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 1089|      0|                break;
 1090|      0|            }
 1091|      0|            context->update = isEncrypt ? SFTKCipher_RC4_Encrypt : SFTKCipher_RC4_Decrypt;
  ------------------
  |  Branch (1091:31): [True: 0, False: 0]
  ------------------
 1092|      0|            context->destroy = SFTKCipher_RC4_DestroyContext;
 1093|      0|            break;
 1094|      0|        case CKM_CDMF_CBC_PAD:
  ------------------
  |  |  839|      0|#define CKM_CDMF_CBC_PAD 0x00000145UL
  ------------------
  |  Branch (1094:9): [True: 0, False: 14.7k]
  ------------------
 1095|      0|            context->doPad = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 1096|       |        /* fall thru */
 1097|      0|        case CKM_CDMF_ECB:
  ------------------
  |  |  835|      0|#define CKM_CDMF_ECB 0x00000141UL
  ------------------
  |  Branch (1097:9): [True: 0, False: 14.7k]
  ------------------
 1098|      0|        case CKM_CDMF_CBC:
  ------------------
  |  |  836|      0|#define CKM_CDMF_CBC 0x00000142UL
  ------------------
  |  Branch (1098:9): [True: 0, False: 14.7k]
  ------------------
 1099|      0|            if (key_type != CKK_CDMF) {
  ------------------
  |  |  401|      0|#define CKK_CDMF 0x0000001EUL
  ------------------
  |  Branch (1099:17): [True: 0, False: 0]
  ------------------
 1100|      0|                crv = CKR_KEY_TYPE_INCONSISTENT;
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
 1101|      0|                break;
 1102|      0|            }
 1103|      0|            t = (pMechanism->mechanism == CKM_CDMF_ECB) ? NSS_DES : NSS_DES_CBC;
  ------------------
  |  |  835|      0|#define CKM_CDMF_ECB 0x00000141UL
  ------------------
                          t = (pMechanism->mechanism == CKM_CDMF_ECB) ? NSS_DES : NSS_DES_CBC;
  ------------------
  |  |   25|      0|#define NSS_DES 0
  ------------------
                          t = (pMechanism->mechanism == CKM_CDMF_ECB) ? NSS_DES : NSS_DES_CBC;
  ------------------
  |  |   26|      0|#define NSS_DES_CBC 1
  ------------------
  |  Branch (1103:17): [True: 0, False: 0]
  ------------------
 1104|      0|            goto finish_des;
 1105|      0|        case CKM_DES_ECB:
  ------------------
  |  |  815|      0|#define CKM_DES_ECB 0x00000121UL
  ------------------
  |  Branch (1105:9): [True: 0, False: 14.7k]
  ------------------
 1106|      0|            if (key_type != CKK_DES) {
  ------------------
  |  |  386|      0|#define CKK_DES 0x00000013UL
  ------------------
  |  Branch (1106:17): [True: 0, False: 0]
  ------------------
 1107|      0|                crv = CKR_KEY_TYPE_INCONSISTENT;
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
 1108|      0|                break;
 1109|      0|            }
 1110|      0|            t = NSS_DES;
  ------------------
  |  |   25|      0|#define NSS_DES 0
  ------------------
 1111|      0|            goto finish_des;
 1112|      0|        case CKM_DES_CBC_PAD:
  ------------------
  |  |  821|      0|#define CKM_DES_CBC_PAD 0x00000125UL
  ------------------
  |  Branch (1112:9): [True: 0, False: 14.7k]
  ------------------
 1113|      0|            context->doPad = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 1114|       |        /* fall thru */
 1115|     76|        case CKM_DES_CBC:
  ------------------
  |  |  816|     76|#define CKM_DES_CBC 0x00000122UL
  ------------------
  |  Branch (1115:9): [True: 76, False: 14.7k]
  ------------------
 1116|     76|            if (key_type != CKK_DES) {
  ------------------
  |  |  386|     76|#define CKK_DES 0x00000013UL
  ------------------
  |  Branch (1116:17): [True: 0, False: 76]
  ------------------
 1117|      0|                crv = CKR_KEY_TYPE_INCONSISTENT;
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
 1118|      0|                break;
 1119|      0|            }
 1120|     76|            t = NSS_DES_CBC;
  ------------------
  |  |   26|     76|#define NSS_DES_CBC 1
  ------------------
 1121|     76|            goto finish_des;
 1122|      0|        case CKM_DES3_ECB:
  ------------------
  |  |  825|      0|#define CKM_DES3_ECB 0x00000132UL
  ------------------
  |  Branch (1122:9): [True: 0, False: 14.7k]
  ------------------
 1123|      0|            if ((key_type != CKK_DES2) && (key_type != CKK_DES3)) {
  ------------------
  |  |  387|      0|#define CKK_DES2 0x00000014UL
  ------------------
                          if ((key_type != CKK_DES2) && (key_type != CKK_DES3)) {
  ------------------
  |  |  388|      0|#define CKK_DES3 0x00000015UL
  ------------------
  |  Branch (1123:17): [True: 0, False: 0]
  |  Branch (1123:43): [True: 0, False: 0]
  ------------------
 1124|      0|                crv = CKR_KEY_TYPE_INCONSISTENT;
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
 1125|      0|                break;
 1126|      0|            }
 1127|      0|            t = NSS_DES_EDE3;
  ------------------
  |  |   27|      0|#define NSS_DES_EDE3 2
  ------------------
 1128|      0|            goto finish_des;
 1129|      0|        case CKM_DES3_CBC_PAD:
  ------------------
  |  |  833|      0|#define CKM_DES3_CBC_PAD 0x00000136UL
  ------------------
  |  Branch (1129:9): [True: 0, False: 14.7k]
  ------------------
 1130|      0|            context->doPad = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 1131|       |        /* fall thru */
 1132|  1.01k|        case CKM_DES3_CBC:
  ------------------
  |  |  826|  1.01k|#define CKM_DES3_CBC 0x00000133UL
  ------------------
  |  Branch (1132:9): [True: 1.01k, False: 13.7k]
  ------------------
 1133|  1.01k|            if ((key_type != CKK_DES2) && (key_type != CKK_DES3)) {
  ------------------
  |  |  387|  1.01k|#define CKK_DES2 0x00000014UL
  ------------------
                          if ((key_type != CKK_DES2) && (key_type != CKK_DES3)) {
  ------------------
  |  |  388|  1.01k|#define CKK_DES3 0x00000015UL
  ------------------
  |  Branch (1133:17): [True: 1.01k, False: 0]
  |  Branch (1133:43): [True: 0, False: 1.01k]
  ------------------
 1134|      0|                crv = CKR_KEY_TYPE_INCONSISTENT;
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
 1135|      0|                break;
 1136|      0|            }
 1137|  1.01k|            t = NSS_DES_EDE3_CBC;
  ------------------
  |  |   28|  1.01k|#define NSS_DES_EDE3_CBC 3
  ------------------
 1138|  1.09k|        finish_des:
 1139|  1.09k|            if ((t != NSS_DES && t != NSS_DES_EDE3) && (pMechanism->pParameter == NULL ||
  ------------------
  |  |   25|  2.18k|#define NSS_DES 0
  ------------------
                          if ((t != NSS_DES && t != NSS_DES_EDE3) && (pMechanism->pParameter == NULL ||
  ------------------
  |  |   27|  1.09k|#define NSS_DES_EDE3 2
  ------------------
  |  Branch (1139:18): [True: 1.09k, False: 0]
  |  Branch (1139:34): [True: 1.09k, False: 0]
  |  Branch (1139:57): [True: 0, False: 1.09k]
  ------------------
 1140|  1.09k|                                                        pMechanism->ulParameterLen < 8)) {
  ------------------
  |  Branch (1140:57): [True: 0, False: 1.09k]
  ------------------
 1141|      0|                crv = CKR_DOMAIN_PARAMS_INVALID;
  ------------------
  |  | 1508|      0|#define CKR_DOMAIN_PARAMS_INVALID 0x00000130UL
  ------------------
 1142|      0|                break;
 1143|      0|            }
 1144|  1.09k|            context->blockSize = 8;
 1145|  1.09k|            att = sftk_FindAttribute(key, CKA_VALUE);
  ------------------
  |  |  516|  1.09k|#define CKA_VALUE 0x00000011UL
  ------------------
 1146|  1.09k|            if (att == NULL) {
  ------------------
  |  Branch (1146:17): [True: 0, False: 1.09k]
  ------------------
 1147|      0|                crv = CKR_KEY_HANDLE_INVALID;
  ------------------
  |  | 1428|      0|#define CKR_KEY_HANDLE_INVALID 0x00000060UL
  ------------------
 1148|      0|                break;
 1149|      0|            }
 1150|  1.09k|            if (key_type == CKK_DES2 &&
  ------------------
  |  |  387|  2.18k|#define CKK_DES2 0x00000014UL
  ------------------
  |  Branch (1150:17): [True: 0, False: 1.09k]
  ------------------
 1151|  1.09k|                (t == NSS_DES_EDE3_CBC || t == NSS_DES_EDE3)) {
  ------------------
  |  |   28|      0|#define NSS_DES_EDE3_CBC 3
  ------------------
                              (t == NSS_DES_EDE3_CBC || t == NSS_DES_EDE3)) {
  ------------------
  |  |   27|      0|#define NSS_DES_EDE3 2
  ------------------
  |  Branch (1151:18): [True: 0, False: 0]
  |  Branch (1151:43): [True: 0, False: 0]
  ------------------
 1152|       |                /* extend DES2 key to DES3 key. */
 1153|      0|                memcpy(newdeskey, att->attrib.pValue, 16);
 1154|      0|                memcpy(newdeskey + 16, newdeskey, 8);
 1155|      0|                useNewKey = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 1156|  1.09k|            } else if (key_type == CKK_CDMF) {
  ------------------
  |  |  401|  1.09k|#define CKK_CDMF 0x0000001EUL
  ------------------
  |  Branch (1156:24): [True: 0, False: 1.09k]
  ------------------
 1157|      0|                crv = sftk_cdmf2des((unsigned char *)att->attrib.pValue, newdeskey);
 1158|      0|                if (crv != CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1158:21): [True: 0, False: 0]
  ------------------
 1159|      0|                    sftk_FreeAttribute(att);
 1160|      0|                    break;
 1161|      0|                }
 1162|      0|                useNewKey = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 1163|      0|            }
 1164|  1.09k|            context->cipherInfo = DES_CreateContext(
 1165|  1.09k|                useNewKey ? newdeskey : (unsigned char *)att->attrib.pValue,
  ------------------
  |  Branch (1165:17): [True: 0, False: 1.09k]
  ------------------
 1166|  1.09k|                (unsigned char *)pMechanism->pParameter, t, isEncrypt);
 1167|  1.09k|            if (useNewKey)
  ------------------
  |  Branch (1167:17): [True: 0, False: 1.09k]
  ------------------
 1168|      0|                memset(newdeskey, 0, sizeof newdeskey);
 1169|  1.09k|            sftk_FreeAttribute(att);
 1170|  1.09k|            if (context->cipherInfo == NULL) {
  ------------------
  |  Branch (1170:17): [True: 0, False: 1.09k]
  ------------------
 1171|      0|                crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 1172|      0|                break;
 1173|      0|            }
 1174|  1.09k|            context->update = isEncrypt ? SFTKCipher_DES_Encrypt : SFTKCipher_DES_Decrypt;
  ------------------
  |  Branch (1174:31): [True: 545, False: 545]
  ------------------
 1175|  1.09k|            context->destroy = SFTKCipher_DES_DestroyContext;
 1176|  1.09k|            break;
 1177|      0|#ifndef NSS_DISABLE_DEPRECATED_SEED
 1178|      0|        case CKM_SEED_CBC_PAD:
  ------------------
  |  | 1160|      0|#define CKM_SEED_CBC_PAD 0x00000655UL
  ------------------
  |  Branch (1178:9): [True: 0, False: 14.7k]
  ------------------
 1179|      0|            context->doPad = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 1180|       |        /* fall thru */
 1181|    202|        case CKM_SEED_CBC:
  ------------------
  |  | 1157|    202|#define CKM_SEED_CBC 0x00000652UL
  ------------------
  |  Branch (1181:9): [True: 202, False: 14.5k]
  ------------------
 1182|    202|            if (!pMechanism->pParameter ||
  ------------------
  |  Branch (1182:17): [True: 0, False: 202]
  ------------------
 1183|    202|                pMechanism->ulParameterLen != 16) {
  ------------------
  |  Branch (1183:17): [True: 0, False: 202]
  ------------------
 1184|      0|                crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 1185|      0|                break;
 1186|      0|            }
 1187|       |        /* fall thru */
 1188|    202|        case CKM_SEED_ECB:
  ------------------
  |  | 1156|    202|#define CKM_SEED_ECB 0x00000651UL
  ------------------
  |  Branch (1188:9): [True: 0, False: 14.7k]
  ------------------
 1189|    202|            context->blockSize = 16;
 1190|    202|            if (key_type != CKK_SEED) {
  ------------------
  |  |  416|    202|#define CKK_SEED 0x0000002FUL /* was 2A */
  ------------------
  |  Branch (1190:17): [True: 0, False: 202]
  ------------------
 1191|      0|                crv = CKR_KEY_TYPE_INCONSISTENT;
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
 1192|      0|                break;
 1193|      0|            }
 1194|    202|            att = sftk_FindAttribute(key, CKA_VALUE);
  ------------------
  |  |  516|    202|#define CKA_VALUE 0x00000011UL
  ------------------
 1195|    202|            if (att == NULL) {
  ------------------
  |  Branch (1195:17): [True: 0, False: 202]
  ------------------
 1196|      0|                crv = CKR_KEY_HANDLE_INVALID;
  ------------------
  |  | 1428|      0|#define CKR_KEY_HANDLE_INVALID 0x00000060UL
  ------------------
 1197|      0|                break;
 1198|      0|            }
 1199|    202|            context->cipherInfo = SEED_CreateContext(
 1200|    202|                (unsigned char *)att->attrib.pValue,
 1201|    202|                (unsigned char *)pMechanism->pParameter,
 1202|    202|                pMechanism->mechanism == CKM_SEED_ECB ? NSS_SEED : NSS_SEED_CBC,
  ------------------
  |  | 1156|    202|#define CKM_SEED_ECB 0x00000651UL
  ------------------
                              pMechanism->mechanism == CKM_SEED_ECB ? NSS_SEED : NSS_SEED_CBC,
  ------------------
  |  |   46|      0|#define NSS_SEED 0
  ------------------
                              pMechanism->mechanism == CKM_SEED_ECB ? NSS_SEED : NSS_SEED_CBC,
  ------------------
  |  |   47|    202|#define NSS_SEED_CBC 1
  ------------------
  |  Branch (1202:17): [True: 0, False: 202]
  ------------------
 1203|    202|                isEncrypt);
 1204|    202|            sftk_FreeAttribute(att);
 1205|    202|            if (context->cipherInfo == NULL) {
  ------------------
  |  Branch (1205:17): [True: 0, False: 202]
  ------------------
 1206|      0|                crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 1207|      0|                break;
 1208|      0|            }
 1209|    202|            context->update = isEncrypt ? SFTKCipher_SEED_Encrypt : SFTKCipher_SEED_Decrypt;
  ------------------
  |  Branch (1209:31): [True: 101, False: 101]
  ------------------
 1210|    202|            context->destroy = SFTKCipher_SEED_DestroyContext;
 1211|    202|            break;
 1212|      0|#endif /* NSS_DISABLE_DEPRECATED_SEED */
 1213|      0|        case CKM_CAMELLIA_CBC_PAD:
  ------------------
  |  | 1140|      0|#define CKM_CAMELLIA_CBC_PAD 0x00000555UL
  ------------------
  |  Branch (1213:9): [True: 0, False: 14.7k]
  ------------------
 1214|      0|            context->doPad = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 1215|       |        /* fall thru */
 1216|    190|        case CKM_CAMELLIA_CBC:
  ------------------
  |  | 1137|    190|#define CKM_CAMELLIA_CBC 0x00000552UL
  ------------------
  |  Branch (1216:9): [True: 190, False: 14.5k]
  ------------------
 1217|    190|            if (!pMechanism->pParameter ||
  ------------------
  |  Branch (1217:17): [True: 0, False: 190]
  ------------------
 1218|    190|                pMechanism->ulParameterLen != 16) {
  ------------------
  |  Branch (1218:17): [True: 0, False: 190]
  ------------------
 1219|      0|                crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 1220|      0|                break;
 1221|      0|            }
 1222|       |        /* fall thru */
 1223|    190|        case CKM_CAMELLIA_ECB:
  ------------------
  |  | 1136|    190|#define CKM_CAMELLIA_ECB 0x00000551UL
  ------------------
  |  Branch (1223:9): [True: 0, False: 14.7k]
  ------------------
 1224|    190|            context->blockSize = 16;
 1225|    190|            if (key_type != CKK_CAMELLIA) {
  ------------------
  |  |  414|    190|#define CKK_CAMELLIA 0x00000025UL
  ------------------
  |  Branch (1225:17): [True: 0, False: 190]
  ------------------
 1226|      0|                crv = CKR_KEY_TYPE_INCONSISTENT;
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
 1227|      0|                break;
 1228|      0|            }
 1229|    190|            att = sftk_FindAttribute(key, CKA_VALUE);
  ------------------
  |  |  516|    190|#define CKA_VALUE 0x00000011UL
  ------------------
 1230|    190|            if (att == NULL) {
  ------------------
  |  Branch (1230:17): [True: 0, False: 190]
  ------------------
 1231|      0|                crv = CKR_KEY_HANDLE_INVALID;
  ------------------
  |  | 1428|      0|#define CKR_KEY_HANDLE_INVALID 0x00000060UL
  ------------------
 1232|      0|                break;
 1233|      0|            }
 1234|    190|            context->cipherInfo = Camellia_CreateContext(
 1235|    190|                (unsigned char *)att->attrib.pValue,
 1236|    190|                (unsigned char *)pMechanism->pParameter,
 1237|    190|                pMechanism->mechanism ==
  ------------------
  |  Branch (1237:17): [True: 0, False: 190]
  ------------------
 1238|    190|                        CKM_CAMELLIA_ECB
  ------------------
  |  | 1136|    190|#define CKM_CAMELLIA_ECB 0x00000551UL
  ------------------
 1239|    190|                    ? NSS_CAMELLIA
  ------------------
  |  |   42|      0|#define NSS_CAMELLIA 0
  ------------------
 1240|    190|                    : NSS_CAMELLIA_CBC,
  ------------------
  |  |   43|    190|#define NSS_CAMELLIA_CBC 1
  ------------------
 1241|    190|                isEncrypt, att->attrib.ulValueLen);
 1242|    190|            sftk_FreeAttribute(att);
 1243|    190|            if (context->cipherInfo == NULL) {
  ------------------
  |  Branch (1243:17): [True: 0, False: 190]
  ------------------
 1244|      0|                crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 1245|      0|                break;
 1246|      0|            }
 1247|    190|            context->update = isEncrypt ? SFTKCipher_Camellia_Encrypt : SFTKCipher_Camellia_Decrypt;
  ------------------
  |  Branch (1247:31): [True: 95, False: 95]
  ------------------
 1248|    190|            context->destroy = SFTKCipher_Camellia_DestroyContext;
 1249|    190|            break;
 1250|       |
 1251|      0|        case CKM_AES_CBC_PAD:
  ------------------
  |  | 1111|      0|#define CKM_AES_CBC_PAD 0x00001085UL
  ------------------
  |  Branch (1251:9): [True: 0, False: 14.7k]
  ------------------
 1252|      0|            context->doPad = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 1253|       |        /* fall thru */
 1254|  6.29k|        case CKM_AES_ECB:
  ------------------
  |  | 1107|  6.29k|#define CKM_AES_ECB 0x00001081UL
  ------------------
  |  Branch (1254:9): [True: 6.29k, False: 8.48k]
  ------------------
 1255|  6.71k|        case CKM_AES_CBC:
  ------------------
  |  | 1108|  6.71k|#define CKM_AES_CBC 0x00001082UL
  ------------------
  |  Branch (1255:9): [True: 418, False: 14.3k]
  ------------------
 1256|  6.71k|            context->blockSize = 16;
 1257|  6.71k|        case CKM_AES_CTS:
  ------------------
  |  | 1117|  6.71k|#define CKM_AES_CTS 0x00001089UL
  ------------------
  |  Branch (1257:9): [True: 0, False: 14.7k]
  ------------------
 1258|  6.71k|        case CKM_AES_CTR:
  ------------------
  |  | 1113|  6.71k|#define CKM_AES_CTR 0x00001086UL
  ------------------
  |  Branch (1258:9): [True: 0, False: 14.7k]
  ------------------
 1259|  6.71k|        case CKM_AES_GCM:
  ------------------
  |  | 1115|  6.71k|#define CKM_AES_GCM 0x00001087UL
  ------------------
  |  Branch (1259:9): [True: 0, False: 14.7k]
  ------------------
 1260|  6.71k|            aes_param = pMechanism->pParameter;
 1261|       |            /*
 1262|       |             *  Due to a mismatch between the documentation and the header
 1263|       |             *  file, two different definitions for CK_GCM_PARAMS exist.
 1264|       |             *  The header file is normative according to Oasis, but NSS used
 1265|       |             *  the documentation. In PKCS #11 v3.0, this was reconciled in
 1266|       |             *  favor of the header file definition. To maintain binary
 1267|       |             *  compatibility, NSS now defines CK_GCM_PARAMS_V3 as the official
 1268|       |             *  version v3 (V2.4 header file) and CK_NSS_GCM_PARAMS as the
 1269|       |             *  legacy (V2.4 documentation, NSS version). CK_GCM_PARAMS
 1270|       |             *  is defined as CK_GCM_PARAMS_V3 if NSS_PKCS11_2_0_COMPAT is not
 1271|       |             *  defined and CK_NSS_GCM_PARAMS if it is. Internally
 1272|       |             *  softoken continues to use the legacy version. The code below
 1273|       |             *  automatically detects which parameter was passed in and
 1274|       |             *  converts CK_GCM_PARAMS_V3 to the CK_NSS_GCM_PARAMS (legacy
 1275|       |             *  version) on the fly. NSS proper will eventually start
 1276|       |             *  using the CK_GCM_PARAMS_V3 version and fall back to the
 1277|       |             *  CK_NSS_GCM_PARAMS if the CK_GCM_PARAMS_V3 version fails with
 1278|       |             *  CKR_MECHANISM_PARAM_INVALID.
 1279|       |             */
 1280|  6.71k|            if (pMechanism->mechanism == CKM_AES_GCM) {
  ------------------
  |  | 1115|  6.71k|#define CKM_AES_GCM 0x00001087UL
  ------------------
  |  Branch (1280:17): [True: 0, False: 6.71k]
  ------------------
 1281|      0|                if (!aes_param) {
  ------------------
  |  Branch (1281:21): [True: 0, False: 0]
  ------------------
 1282|      0|                    crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 1283|      0|                    break;
 1284|      0|                }
 1285|      0|                if (pMechanism->ulParameterLen == sizeof(CK_GCM_PARAMS_V3)) {
  ------------------
  |  Branch (1285:21): [True: 0, False: 0]
  ------------------
 1286|       |                    /* convert the true V3 parameters into the old NSS parameters */
 1287|      0|                    CK_GCM_PARAMS_V3 *gcm_params = (CK_GCM_PARAMS_V3 *)aes_param;
 1288|      0|                    if (gcm_params->ulIvLen * 8 != gcm_params->ulIvBits) {
  ------------------
  |  Branch (1288:25): [True: 0, False: 0]
  ------------------
 1289|       |                        /* only support byte aligned IV lengths */
 1290|      0|                        crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 1291|      0|                        break;
 1292|      0|                    }
 1293|      0|                    aes_param = (void *)&nss_gcm_param;
 1294|      0|                    nss_gcm_param.pIv = gcm_params->pIv;
 1295|      0|                    nss_gcm_param.ulIvLen = gcm_params->ulIvLen;
 1296|      0|                    nss_gcm_param.pAAD = gcm_params->pAAD;
 1297|      0|                    nss_gcm_param.ulAADLen = gcm_params->ulAADLen;
 1298|      0|                    nss_gcm_param.ulTagBits = gcm_params->ulTagBits;
 1299|      0|                } else if (pMechanism->ulParameterLen != sizeof(CK_NSS_GCM_PARAMS)) {
  ------------------
  |  Branch (1299:28): [True: 0, False: 0]
  ------------------
 1300|       |                    /* neither old nor new style params, must be invalid */
 1301|      0|                    crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 1302|      0|                    break;
 1303|      0|                }
 1304|  6.71k|            } else if ((pMechanism->mechanism == CKM_AES_CTR && BAD_PARAM_CAST(pMechanism, sizeof(CK_AES_CTR_PARAMS))) ||
  ------------------
  |  | 1113|  13.4k|#define CKM_AES_CTR 0x00001086UL
  ------------------
                          } else if ((pMechanism->mechanism == CKM_AES_CTR && BAD_PARAM_CAST(pMechanism, sizeof(CK_AES_CTR_PARAMS))) ||
  ------------------
  |  |   50|      0|#define BAD_PARAM_CAST(pMech, typeSize) (!pMech->pParameter || pMech->ulParameterLen < typeSize)
  |  |  ------------------
  |  |  |  Branch (50:42): [True: 0, False: 0]
  |  |  |  Branch (50:64): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1304:25): [True: 0, False: 6.71k]
  ------------------
 1305|  6.71k|                       ((pMechanism->mechanism == CKM_AES_CBC || pMechanism->mechanism == CKM_AES_CTS) && BAD_PARAM_CAST(pMechanism, AES_BLOCK_SIZE))) {
  ------------------
  |  | 1108|  13.4k|#define CKM_AES_CBC 0x00001082UL
  ------------------
                                     ((pMechanism->mechanism == CKM_AES_CBC || pMechanism->mechanism == CKM_AES_CTS) && BAD_PARAM_CAST(pMechanism, AES_BLOCK_SIZE))) {
  ------------------
  |  | 1117|  6.29k|#define CKM_AES_CTS 0x00001089UL
  ------------------
                                     ((pMechanism->mechanism == CKM_AES_CBC || pMechanism->mechanism == CKM_AES_CTS) && BAD_PARAM_CAST(pMechanism, AES_BLOCK_SIZE))) {
  ------------------
  |  |   50|    418|#define BAD_PARAM_CAST(pMech, typeSize) (!pMech->pParameter || pMech->ulParameterLen < typeSize)
  |  |  ------------------
  |  |  |  Branch (50:42): [True: 0, False: 418]
  |  |  |  Branch (50:64): [True: 0, False: 418]
  |  |  ------------------
  ------------------
  |  Branch (1305:26): [True: 418, False: 6.29k]
  |  Branch (1305:66): [True: 0, False: 6.29k]
  ------------------
 1306|      0|                crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 1307|      0|                break;
 1308|      0|            }
 1309|       |
 1310|  6.71k|            if (pMechanism->mechanism == CKM_AES_GCM) {
  ------------------
  |  | 1115|  6.71k|#define CKM_AES_GCM 0x00001087UL
  ------------------
  |  Branch (1310:17): [True: 0, False: 6.71k]
  ------------------
 1311|      0|                context->multi = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 1312|      0|            }
 1313|  6.71k|            if (key_type != CKK_AES) {
  ------------------
  |  |  402|  6.71k|#define CKK_AES 0x0000001FUL
  ------------------
  |  Branch (1313:17): [True: 0, False: 6.71k]
  ------------------
 1314|      0|                crv = CKR_KEY_TYPE_INCONSISTENT;
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
 1315|      0|                break;
 1316|      0|            }
 1317|  6.71k|            att = sftk_FindAttribute(key, CKA_VALUE);
  ------------------
  |  |  516|  6.71k|#define CKA_VALUE 0x00000011UL
  ------------------
 1318|  6.71k|            if (att == NULL) {
  ------------------
  |  Branch (1318:17): [True: 0, False: 6.71k]
  ------------------
 1319|      0|                crv = CKR_KEY_HANDLE_INVALID;
  ------------------
  |  | 1428|      0|#define CKR_KEY_HANDLE_INVALID 0x00000060UL
  ------------------
 1320|      0|                break;
 1321|      0|            }
 1322|  6.71k|            context->cipherInfo = AES_CreateContext(
 1323|  6.71k|                (unsigned char *)att->attrib.pValue,
 1324|  6.71k|                (unsigned char *)aes_param,
 1325|  6.71k|                sftk_aes_mode(pMechanism->mechanism),
 1326|  6.71k|                isEncrypt, att->attrib.ulValueLen, 16);
 1327|  6.71k|            sftk_FreeAttribute(att);
 1328|  6.71k|            if (context->cipherInfo == NULL) {
  ------------------
  |  Branch (1328:17): [True: 0, False: 6.71k]
  ------------------
 1329|      0|                crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 1330|      0|                break;
 1331|      0|            }
 1332|  6.71k|            context->update = isEncrypt ? SFTKCipher_AES_Encrypt : SFTKCipher_AES_Decrypt;
  ------------------
  |  Branch (1332:31): [True: 6.50k, False: 209]
  ------------------
 1333|  6.71k|            context->destroy = SFTKCipher_AES_DestroyContext;
 1334|  6.71k|            break;
 1335|       |
 1336|      0|        case CKM_NSS_CHACHA20_POLY1305:
  ------------------
  |  |  243|      0|#define CKM_NSS_CHACHA20_POLY1305 (CKM_NSS + 28)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1336:9): [True: 0, False: 14.7k]
  ------------------
 1337|      0|        case CKM_CHACHA20_POLY1305:
  ------------------
  |  | 1287|      0|#define CKM_CHACHA20_POLY1305 0x00004021UL
  ------------------
  |  Branch (1337:9): [True: 0, False: 14.7k]
  ------------------
 1338|      0|            if (pMechanism->mechanism == CKM_NSS_CHACHA20_POLY1305) {
  ------------------
  |  |  243|      0|#define CKM_NSS_CHACHA20_POLY1305 (CKM_NSS + 28)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1338:17): [True: 0, False: 0]
  ------------------
 1339|      0|                if (key_type != CKK_NSS_CHACHA20) {
  ------------------
  |  |   56|      0|#define CKK_NSS_CHACHA20 (CKK_NSS + 4)
  |  |  ------------------
  |  |  |  |   49|      0|#define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  458|      0|#define CKK_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1339:21): [True: 0, False: 0]
  ------------------
 1340|      0|                    crv = CKR_KEY_TYPE_INCONSISTENT;
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
 1341|      0|                    break;
 1342|      0|                }
 1343|      0|                if ((pMechanism->pParameter == NULL) ||
  ------------------
  |  Branch (1343:21): [True: 0, False: 0]
  ------------------
 1344|      0|                    (pMechanism->ulParameterLen != sizeof(CK_NSS_AEAD_PARAMS))) {
  ------------------
  |  Branch (1344:21): [True: 0, False: 0]
  ------------------
 1345|      0|                    crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 1346|      0|                    break;
 1347|      0|                }
 1348|      0|                nss_aead_params_ptr = (CK_NSS_AEAD_PARAMS *)pMechanism->pParameter;
 1349|      0|            } else {
 1350|      0|                CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR chacha_poly_params;
 1351|      0|                if (key_type != CKK_CHACHA20) {
  ------------------
  |  |  433|      0|#define CKK_CHACHA20 0x00000033UL
  ------------------
  |  Branch (1351:21): [True: 0, False: 0]
  ------------------
 1352|      0|                    crv = CKR_KEY_TYPE_INCONSISTENT;
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
 1353|      0|                    break;
 1354|      0|                }
 1355|      0|                if ((pMechanism->pParameter == NULL) ||
  ------------------
  |  Branch (1355:21): [True: 0, False: 0]
  ------------------
 1356|      0|                    (pMechanism->ulParameterLen !=
  ------------------
  |  Branch (1356:21): [True: 0, False: 0]
  ------------------
 1357|      0|                     sizeof(CK_SALSA20_CHACHA20_POLY1305_PARAMS))) {
 1358|      0|                    crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 1359|      0|                    break;
 1360|      0|                }
 1361|      0|                chacha_poly_params = (CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR)
 1362|      0|                                         pMechanism->pParameter;
 1363|      0|                nss_aead_params_ptr = &nss_aead_params;
 1364|      0|                nss_aead_params.pNonce = chacha_poly_params->pNonce;
 1365|      0|                nss_aead_params.ulNonceLen = chacha_poly_params->ulNonceLen;
 1366|      0|                nss_aead_params.pAAD = chacha_poly_params->pAAD;
 1367|      0|                nss_aead_params.ulAADLen = chacha_poly_params->ulAADLen;
 1368|      0|                nss_aead_params.ulTagLen = 16; /* Poly1305 is always 16 */
 1369|      0|            }
 1370|       |
 1371|      0|            context->multi = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 1372|      0|            att = sftk_FindAttribute(key, CKA_VALUE);
  ------------------
  |  |  516|      0|#define CKA_VALUE 0x00000011UL
  ------------------
 1373|      0|            if (att == NULL) {
  ------------------
  |  Branch (1373:17): [True: 0, False: 0]
  ------------------
 1374|      0|                crv = CKR_KEY_HANDLE_INVALID;
  ------------------
  |  | 1428|      0|#define CKR_KEY_HANDLE_INVALID 0x00000060UL
  ------------------
 1375|      0|                break;
 1376|      0|            }
 1377|      0|            context->cipherInfo = sftk_ChaCha20Poly1305_CreateContext(
 1378|      0|                (unsigned char *)att->attrib.pValue, att->attrib.ulValueLen,
 1379|      0|                nss_aead_params_ptr);
 1380|      0|            sftk_FreeAttribute(att);
 1381|      0|            if (context->cipherInfo == NULL) {
  ------------------
  |  Branch (1381:17): [True: 0, False: 0]
  ------------------
 1382|      0|                crv = sftk_MapCryptError(PORT_GetError());
  ------------------
  |  |   62|      0|#define PORT_GetError PORT_GetError_Util
  ------------------
 1383|      0|                break;
 1384|      0|            }
 1385|      0|            context->update = isEncrypt ? sftk_ChaCha20Poly1305_Encrypt : sftk_ChaCha20Poly1305_Decrypt;
  ------------------
  |  Branch (1385:31): [True: 0, False: 0]
  ------------------
 1386|      0|            context->destroy = sftk_ChaCha20Poly1305_DestroyContext;
 1387|      0|            break;
 1388|       |
 1389|  5.31k|        case CKM_NSS_CHACHA20_CTR: /* old NSS private version */
  ------------------
  |  |  251|  5.31k|#define CKM_NSS_CHACHA20_CTR (CKM_NSS + 33)
  |  |  ------------------
  |  |  |  |  162|  5.31k|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|  5.31k|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  5.31k|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1389:9): [True: 5.31k, False: 9.46k]
  ------------------
 1390|  5.31k|        case CKM_CHACHA20:         /* PKCS #11 v3 version */
  ------------------
  |  | 1204|  5.31k|#define CKM_CHACHA20 0x00001226UL
  ------------------
  |  Branch (1390:9): [True: 0, False: 14.7k]
  ------------------
 1391|  5.31k|        {
 1392|  5.31k|            unsigned char *counter;
 1393|  5.31k|            unsigned char *nonce;
 1394|  5.31k|            unsigned long counter_len;
 1395|  5.31k|            unsigned long nonce_len;
 1396|  5.31k|            context->multi = PR_FALSE;
  ------------------
  |  |  438|  5.31k|#define PR_FALSE 0
  ------------------
 1397|  5.31k|            if (pMechanism->mechanism == CKM_NSS_CHACHA20_CTR) {
  ------------------
  |  |  251|  5.31k|#define CKM_NSS_CHACHA20_CTR (CKM_NSS + 33)
  |  |  ------------------
  |  |  |  |  162|  5.31k|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|  5.31k|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  5.31k|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1397:17): [True: 5.31k, False: 0]
  ------------------
 1398|  5.31k|                if (key_type != CKK_NSS_CHACHA20) {
  ------------------
  |  |   56|  5.31k|#define CKK_NSS_CHACHA20 (CKK_NSS + 4)
  |  |  ------------------
  |  |  |  |   49|  5.31k|#define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  458|  5.31k|#define CKK_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  5.31k|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1398:21): [True: 0, False: 5.31k]
  ------------------
 1399|      0|                    crv = CKR_KEY_TYPE_INCONSISTENT;
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
 1400|      0|                    break;
 1401|      0|                }
 1402|  5.31k|                if (pMechanism->pParameter == NULL || pMechanism->ulParameterLen != 16) {
  ------------------
  |  Branch (1402:21): [True: 0, False: 5.31k]
  |  Branch (1402:55): [True: 0, False: 5.31k]
  ------------------
 1403|      0|                    crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 1404|      0|                    break;
 1405|      0|                }
 1406|  5.31k|                counter_len = 4;
 1407|  5.31k|                counter = pMechanism->pParameter;
 1408|  5.31k|                nonce = counter + 4;
 1409|  5.31k|                nonce_len = 12;
 1410|  5.31k|            } else {
 1411|      0|                CK_CHACHA20_PARAMS_PTR chacha20_param_ptr;
 1412|      0|                if (key_type != CKK_CHACHA20) {
  ------------------
  |  |  433|      0|#define CKK_CHACHA20 0x00000033UL
  ------------------
  |  Branch (1412:21): [True: 0, False: 0]
  ------------------
 1413|      0|                    crv = CKR_KEY_TYPE_INCONSISTENT;
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
 1414|      0|                    break;
 1415|      0|                }
 1416|      0|                if (pMechanism->pParameter == NULL || pMechanism->ulParameterLen != sizeof(CK_CHACHA20_PARAMS)) {
  ------------------
  |  Branch (1416:21): [True: 0, False: 0]
  |  Branch (1416:55): [True: 0, False: 0]
  ------------------
 1417|      0|                    crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 1418|      0|                    break;
 1419|      0|                }
 1420|      0|                chacha20_param_ptr = (CK_CHACHA20_PARAMS_PTR)pMechanism->pParameter;
 1421|      0|                if ((chacha20_param_ptr->blockCounterBits != 32) &&
  ------------------
  |  Branch (1421:21): [True: 0, False: 0]
  ------------------
 1422|      0|                    (chacha20_param_ptr->blockCounterBits != 64)) {
  ------------------
  |  Branch (1422:21): [True: 0, False: 0]
  ------------------
 1423|      0|                    crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 1424|      0|                    break;
 1425|      0|                }
 1426|      0|                counter_len = chacha20_param_ptr->blockCounterBits / PR_BITS_PER_BYTE;
  ------------------
  |  |  286|      0|#define PR_BITS_PER_BYTE    8
  ------------------
 1427|      0|                counter = chacha20_param_ptr->pBlockCounter;
 1428|      0|                nonce = chacha20_param_ptr->pNonce;
 1429|      0|                nonce_len = chacha20_param_ptr->ulNonceBits / PR_BITS_PER_BYTE;
  ------------------
  |  |  286|      0|#define PR_BITS_PER_BYTE    8
  ------------------
 1430|      0|            }
 1431|       |
 1432|  5.31k|            att = sftk_FindAttribute(key, CKA_VALUE);
  ------------------
  |  |  516|  5.31k|#define CKA_VALUE 0x00000011UL
  ------------------
 1433|  5.31k|            if (att == NULL) {
  ------------------
  |  Branch (1433:17): [True: 0, False: 5.31k]
  ------------------
 1434|      0|                crv = CKR_KEY_HANDLE_INVALID;
  ------------------
  |  | 1428|      0|#define CKR_KEY_HANDLE_INVALID 0x00000060UL
  ------------------
 1435|      0|                break;
 1436|      0|            }
 1437|  5.31k|            SFTKChaCha20CtrInfo *ctx = PORT_ZNew(SFTKChaCha20CtrInfo);
  ------------------
  |  |  148|  5.31k|#define PORT_ZNew(type) (type *)PORT_ZAlloc(sizeof(type))
  |  |  ------------------
  |  |  |  |   72|  5.31k|#define PORT_ZAlloc PORT_ZAlloc_Util
  |  |  ------------------
  ------------------
 1438|  5.31k|            if (!ctx) {
  ------------------
  |  Branch (1438:17): [True: 0, False: 5.31k]
  ------------------
 1439|      0|                sftk_FreeAttribute(att);
 1440|      0|                crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 1441|      0|                break;
 1442|      0|            }
 1443|  5.31k|            if (att->attrib.ulValueLen != sizeof(ctx->key)) {
  ------------------
  |  Branch (1443:17): [True: 0, False: 5.31k]
  ------------------
 1444|      0|                sftk_FreeAttribute(att);
 1445|      0|                PORT_Free(ctx);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 1446|      0|                crv = CKR_KEY_HANDLE_INVALID;
  ------------------
  |  | 1428|      0|#define CKR_KEY_HANDLE_INVALID 0x00000060UL
  ------------------
 1447|      0|                break;
 1448|      0|            }
 1449|  5.31k|            memcpy(ctx->key, att->attrib.pValue, att->attrib.ulValueLen);
 1450|  5.31k|            sftk_FreeAttribute(att);
 1451|       |
 1452|       |            /* make sure we don't overflow our parameters */
 1453|  5.31k|            if ((sizeof(ctx->counter) < counter_len) ||
  ------------------
  |  Branch (1453:17): [True: 0, False: 5.31k]
  ------------------
 1454|  5.31k|                (sizeof(ctx->nonce) < nonce_len)) {
  ------------------
  |  Branch (1454:17): [True: 0, False: 5.31k]
  ------------------
 1455|      0|                PORT_Free(ctx);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 1456|      0|                crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 1457|      0|                break;
 1458|      0|            }
 1459|       |
 1460|       |            /* The counter is little endian. */
 1461|  5.31k|            int i = 0;
 1462|  26.5k|            for (; i < counter_len; ++i) {
  ------------------
  |  Branch (1462:20): [True: 21.2k, False: 5.31k]
  ------------------
 1463|  21.2k|                ctx->counter |= (PRUint32)counter[i] << (i * 8);
 1464|  21.2k|            }
 1465|  5.31k|            memcpy(ctx->nonce, nonce, nonce_len);
 1466|  5.31k|            context->cipherInfo = ctx;
 1467|  5.31k|            context->update = sftk_ChaCha20Ctr;
 1468|  5.31k|            context->destroy = sftk_ChaCha20Ctr_DestroyContext;
 1469|  5.31k|            break;
 1470|  5.31k|        }
 1471|       |
 1472|      0|        case CKM_NSS_AES_KEY_WRAP_PAD:
  ------------------
  |  |  165|      0|#define CKM_NSS_AES_KEY_WRAP_PAD (CKM_NSS + 2)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1472:9): [True: 0, False: 14.7k]
  ------------------
 1473|      0|        case CKM_AES_KEY_WRAP_PAD:
  ------------------
  |  | 1232|      0|#define CKM_AES_KEY_WRAP_PAD 0x0000210AUL
  ------------------
  |  Branch (1473:9): [True: 0, False: 14.7k]
  ------------------
 1474|      0|            context->doPad = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 1475|       |        /* fall thru */
 1476|      0|        case CKM_NSS_AES_KEY_WRAP:
  ------------------
  |  |  164|      0|#define CKM_NSS_AES_KEY_WRAP (CKM_NSS + 1)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1476:9): [True: 0, False: 14.7k]
  ------------------
 1477|      0|        case CKM_AES_KEY_WRAP:
  ------------------
  |  | 1231|      0|#define CKM_AES_KEY_WRAP 0x00002109UL
  ------------------
  |  Branch (1477:9): [True: 0, False: 14.7k]
  ------------------
 1478|      0|            context->blockSize = 8;
 1479|      0|        case CKM_AES_KEY_WRAP_KWP:
  ------------------
  |  | 1233|      0|#define CKM_AES_KEY_WRAP_KWP 0x0000210BUL
  ------------------
  |  Branch (1479:9): [True: 0, False: 14.7k]
  ------------------
 1480|      0|            context->multi = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 1481|      0|            if (key_type != CKK_AES) {
  ------------------
  |  |  402|      0|#define CKK_AES 0x0000001FUL
  ------------------
  |  Branch (1481:17): [True: 0, False: 0]
  ------------------
 1482|      0|                crv = CKR_KEY_TYPE_INCONSISTENT;
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
 1483|      0|                break;
 1484|      0|            }
 1485|      0|            att = sftk_FindAttribute(key, CKA_VALUE);
  ------------------
  |  |  516|      0|#define CKA_VALUE 0x00000011UL
  ------------------
 1486|      0|            if (att == NULL) {
  ------------------
  |  Branch (1486:17): [True: 0, False: 0]
  ------------------
 1487|      0|                crv = CKR_KEY_HANDLE_INVALID;
  ------------------
  |  | 1428|      0|#define CKR_KEY_HANDLE_INVALID 0x00000060UL
  ------------------
 1488|      0|                break;
 1489|      0|            }
 1490|      0|            context->cipherInfo = AESKeyWrap_CreateContext(
 1491|      0|                (unsigned char *)att->attrib.pValue,
 1492|      0|                (unsigned char *)pMechanism->pParameter,
 1493|      0|                isEncrypt, att->attrib.ulValueLen);
 1494|      0|            sftk_FreeAttribute(att);
 1495|      0|            if (context->cipherInfo == NULL) {
  ------------------
  |  Branch (1495:17): [True: 0, False: 0]
  ------------------
 1496|      0|                crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 1497|      0|                break;
 1498|      0|            }
 1499|      0|            if (pMechanism->mechanism == CKM_AES_KEY_WRAP_KWP) {
  ------------------
  |  | 1233|      0|#define CKM_AES_KEY_WRAP_KWP 0x0000210BUL
  ------------------
  |  Branch (1499:17): [True: 0, False: 0]
  ------------------
 1500|      0|                context->update = isEncrypt ? SFTKCipher_AESKeyWrap_EncryptKWP
  ------------------
  |  Branch (1500:35): [True: 0, False: 0]
  ------------------
 1501|      0|                                            : SFTKCipher_AESKeyWrap_DecryptKWP;
 1502|      0|            } else {
 1503|      0|                context->update = isEncrypt ? SFTKCipher_AESKeyWrap_Encrypt
  ------------------
  |  Branch (1503:35): [True: 0, False: 0]
  ------------------
 1504|      0|                                            : SFTKCipher_AESKeyWrap_Decrypt;
 1505|      0|            }
 1506|      0|            context->destroy = SFTKCipher_AESKeyWrap_DestroyContext;
 1507|      0|            break;
 1508|       |
 1509|      0|        default:
  ------------------
  |  Branch (1509:9): [True: 0, False: 14.7k]
  ------------------
 1510|      0|            crv = CKR_MECHANISM_INVALID;
  ------------------
  |  | 1447|      0|#define CKR_MECHANISM_INVALID 0x00000070UL
  ------------------
 1511|      0|            break;
 1512|  14.7k|    }
 1513|       |
 1514|  14.7k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  14.7k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1514:9): [True: 0, False: 14.7k]
  ------------------
 1515|      0|        sftk_FreeContext(context);
 1516|      0|        sftk_FreeSession(session);
 1517|      0|        return crv;
 1518|      0|    }
 1519|  14.7k|    sftk_SetContextByType(session, contextType, context);
 1520|  14.7k|    sftk_FreeSession(session);
 1521|  14.7k|    return CKR_OK;
  ------------------
  |  | 1388|  14.7k|#define CKR_OK 0x00000000UL
  ------------------
 1522|  14.7k|}
NSC_EncryptInit:
 1528|  12.5k|{
 1529|  12.5k|    CHECK_FORK();
 1530|  12.5k|    return sftk_CryptInit(hSession, pMechanism, hKey, CKA_ENCRYPT, CKA_ENCRYPT,
  ------------------
  |  |  547|  12.5k|#define CKA_ENCRYPT 0x00000104UL
  ------------------
                  return sftk_CryptInit(hSession, pMechanism, hKey, CKA_ENCRYPT, CKA_ENCRYPT,
  ------------------
  |  |  547|  12.5k|#define CKA_ENCRYPT 0x00000104UL
  ------------------
 1531|  12.5k|                          SFTK_ENCRYPT, PR_TRUE);
  ------------------
  |  |  437|  12.5k|#define PR_TRUE 1
  ------------------
 1532|  12.5k|}
NSC_EncryptUpdate:
 1539|  1.95k|{
 1540|  1.95k|    SFTKSessionContext *context;
 1541|  1.95k|    unsigned int outlen, i;
 1542|  1.95k|    unsigned int padoutlen = 0;
 1543|  1.95k|    unsigned int maxout = *pulEncryptedPartLen;
 1544|  1.95k|    CK_RV crv;
 1545|  1.95k|    SECStatus rv;
 1546|       |
 1547|  1.95k|    CHECK_FORK();
 1548|       |
 1549|       |    /* make sure we're legal */
 1550|  1.95k|    crv = sftk_GetContext(hSession, &context, SFTK_ENCRYPT, PR_TRUE, NULL);
  ------------------
  |  |  437|  1.95k|#define PR_TRUE 1
  ------------------
 1551|  1.95k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  1.95k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1551:9): [True: 0, False: 1.95k]
  ------------------
 1552|      0|        return crv;
 1553|       |
 1554|  1.95k|    if (!pEncryptedPart) {
  ------------------
  |  Branch (1554:9): [True: 0, False: 1.95k]
  ------------------
 1555|      0|        if (context->doPad) {
  ------------------
  |  Branch (1555:13): [True: 0, False: 0]
  ------------------
 1556|      0|            CK_ULONG totalDataAvailable = ulPartLen + context->padDataLength;
 1557|      0|            CK_ULONG blocksToSend = totalDataAvailable / context->blockSize;
 1558|       |
 1559|      0|            *pulEncryptedPartLen = blocksToSend * context->blockSize;
 1560|      0|            return CKR_OK;
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
 1561|      0|        }
 1562|      0|        *pulEncryptedPartLen = ulPartLen;
 1563|      0|        return CKR_OK;
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
 1564|      0|    }
 1565|       |
 1566|       |    /* do padding */
 1567|  1.95k|    if (context->doPad) {
  ------------------
  |  Branch (1567:9): [True: 0, False: 1.95k]
  ------------------
 1568|       |        /* deal with previous buffered data */
 1569|      0|        if (context->padDataLength != 0) {
  ------------------
  |  Branch (1569:13): [True: 0, False: 0]
  ------------------
 1570|       |            /* fill in the padded to a full block size */
 1571|      0|            for (i = context->padDataLength;
 1572|      0|                 (ulPartLen != 0) && i < context->blockSize; i++) {
  ------------------
  |  Branch (1572:18): [True: 0, False: 0]
  |  Branch (1572:38): [True: 0, False: 0]
  ------------------
 1573|      0|                context->padBuf[i] = *pPart++;
 1574|      0|                ulPartLen--;
 1575|      0|                context->padDataLength++;
 1576|      0|            }
 1577|       |
 1578|       |            /* not enough data to encrypt yet? then return */
 1579|      0|            if (context->padDataLength != context->blockSize) {
  ------------------
  |  Branch (1579:17): [True: 0, False: 0]
  ------------------
 1580|      0|                *pulEncryptedPartLen = 0;
 1581|      0|                return CKR_OK;
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
 1582|      0|            }
 1583|       |            /* encrypt the current padded data */
 1584|      0|            rv = (*context->update)(context->cipherInfo, pEncryptedPart,
 1585|      0|                                    &padoutlen, maxout, context->padBuf,
 1586|      0|                                    context->blockSize);
 1587|      0|            if (rv != SECSuccess) {
  ------------------
  |  Branch (1587:17): [True: 0, False: 0]
  ------------------
 1588|      0|                return sftk_MapCryptError(PORT_GetError());
  ------------------
  |  |   62|      0|#define PORT_GetError PORT_GetError_Util
  ------------------
 1589|      0|            }
 1590|      0|            pEncryptedPart += padoutlen;
 1591|      0|            maxout -= padoutlen;
 1592|      0|        }
 1593|       |        /* save the residual */
 1594|      0|        context->padDataLength = ulPartLen % context->blockSize;
 1595|      0|        if (context->padDataLength) {
  ------------------
  |  Branch (1595:13): [True: 0, False: 0]
  ------------------
 1596|      0|            PORT_Memcpy(context->padBuf,
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
 1597|      0|                        &pPart[ulPartLen - context->padDataLength],
 1598|      0|                        context->padDataLength);
 1599|      0|            ulPartLen -= context->padDataLength;
 1600|      0|        }
 1601|       |        /* if we've exhausted our new buffer, we're done */
 1602|      0|        if (ulPartLen == 0) {
  ------------------
  |  Branch (1602:13): [True: 0, False: 0]
  ------------------
 1603|      0|            *pulEncryptedPartLen = padoutlen;
 1604|      0|            return CKR_OK;
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
 1605|      0|        }
 1606|      0|    }
 1607|       |
 1608|       |    /* do it: NOTE: this assumes buf size in is >= buf size out! */
 1609|  1.95k|    rv = (*context->update)(context->cipherInfo, pEncryptedPart,
 1610|  1.95k|                            &outlen, maxout, pPart, ulPartLen);
 1611|  1.95k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1611:9): [True: 0, False: 1.95k]
  ------------------
 1612|      0|        return sftk_MapCryptError(PORT_GetError());
  ------------------
  |  |   62|      0|#define PORT_GetError PORT_GetError_Util
  ------------------
 1613|      0|    }
 1614|  1.95k|    *pulEncryptedPartLen = (CK_ULONG)(outlen + padoutlen);
 1615|  1.95k|    return CKR_OK;
  ------------------
  |  | 1388|  1.95k|#define CKR_OK 0x00000000UL
  ------------------
 1616|  1.95k|}
NSC_Encrypt:
 1673|  12.8k|{
 1674|  12.8k|    SFTKSession *session;
 1675|  12.8k|    SFTKSessionContext *context;
 1676|  12.8k|    unsigned int outlen;
 1677|  12.8k|    unsigned int maxoutlen = *pulEncryptedDataLen;
 1678|  12.8k|    CK_RV crv;
 1679|  12.8k|    CK_RV crv2;
 1680|  12.8k|    SECStatus rv = SECSuccess;
 1681|  12.8k|    SECItem pText;
 1682|       |
 1683|  12.8k|    pText.type = siBuffer;
 1684|  12.8k|    pText.data = pData;
 1685|  12.8k|    pText.len = ulDataLen;
 1686|       |
 1687|  12.8k|    CHECK_FORK();
 1688|       |
 1689|       |    /* make sure we're legal */
 1690|  12.8k|    crv = sftk_GetContext(hSession, &context, SFTK_ENCRYPT, PR_FALSE, &session);
  ------------------
  |  |  438|  12.8k|#define PR_FALSE 0
  ------------------
 1691|  12.8k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  12.8k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1691:9): [True: 0, False: 12.8k]
  ------------------
 1692|      0|        return crv;
 1693|       |
 1694|  12.8k|    if (!pEncryptedData) {
  ------------------
  |  Branch (1694:9): [True: 0, False: 12.8k]
  ------------------
 1695|      0|        outlen = context->rsa ? context->maxLen : ulDataLen + 2 * context->blockSize;
  ------------------
  |  Branch (1695:18): [True: 0, False: 0]
  ------------------
 1696|      0|        goto done;
 1697|      0|    }
 1698|       |
 1699|  12.8k|    if (context->doPad) {
  ------------------
  |  Branch (1699:9): [True: 0, False: 12.8k]
  ------------------
 1700|      0|        if (context->multi) {
  ------------------
  |  Branch (1700:13): [True: 0, False: 0]
  ------------------
 1701|      0|            CK_ULONG updateLen = maxoutlen;
 1702|      0|            CK_ULONG finalLen;
 1703|       |            /* padding is fairly complicated, have the update and final
 1704|       |             * code deal with it */
 1705|      0|            sftk_FreeSession(session);
 1706|      0|            crv = NSC_EncryptUpdate(hSession, pData, ulDataLen, pEncryptedData,
 1707|      0|                                    &updateLen);
 1708|      0|            if (crv != CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1708:17): [True: 0, False: 0]
  ------------------
 1709|      0|                updateLen = 0;
 1710|      0|            }
 1711|      0|            maxoutlen -= updateLen;
 1712|      0|            pEncryptedData += updateLen;
 1713|      0|            finalLen = maxoutlen;
 1714|      0|            crv2 = NSC_EncryptFinal(hSession, pEncryptedData, &finalLen);
 1715|      0|            if (crv == CKR_OK && crv2 == CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
                          if (crv == CKR_OK && crv2 == CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1715:17): [True: 0, False: 0]
  |  Branch (1715:34): [True: 0, False: 0]
  ------------------
 1716|      0|                *pulEncryptedDataLen = updateLen + finalLen;
 1717|      0|            }
 1718|      0|            return crv == CKR_OK ? crv2 : crv;
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1718:20): [True: 0, False: 0]
  ------------------
 1719|      0|        }
 1720|       |        /* doPad without multi means that padding must be done on the first
 1721|       |        ** and only update.  There will be no final.
 1722|       |        */
 1723|      0|        PORT_Assert(context->blockSize > 1);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1724|      0|        if (context->blockSize > 1) {
  ------------------
  |  Branch (1724:13): [True: 0, False: 0]
  ------------------
 1725|      0|            CK_ULONG remainder = ulDataLen % context->blockSize;
 1726|      0|            CK_ULONG padding = context->blockSize - remainder;
 1727|      0|            pText.len += padding;
 1728|      0|            pText.data = PORT_ZAlloc(pText.len);
  ------------------
  |  |   72|      0|#define PORT_ZAlloc PORT_ZAlloc_Util
  ------------------
 1729|      0|            if (pText.data) {
  ------------------
  |  Branch (1729:17): [True: 0, False: 0]
  ------------------
 1730|      0|                memcpy(pText.data, pData, ulDataLen);
 1731|      0|                memset(pText.data + ulDataLen, padding, padding);
 1732|      0|            } else {
 1733|      0|                crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 1734|      0|                goto fail;
 1735|      0|            }
 1736|      0|        }
 1737|      0|    }
 1738|       |
 1739|       |    /* do it: NOTE: this assumes buf size is big enough. */
 1740|  12.8k|    rv = (*context->update)(context->cipherInfo, pEncryptedData,
 1741|  12.8k|                            &outlen, maxoutlen, pText.data, pText.len);
 1742|  12.8k|    crv = (rv == SECSuccess) ? CKR_OK : sftk_MapCryptError(PORT_GetError());
  ------------------
  |  | 1388|  12.8k|#define CKR_OK 0x00000000UL
  ------------------
                  crv = (rv == SECSuccess) ? CKR_OK : sftk_MapCryptError(PORT_GetError());
  ------------------
  |  |   62|      0|#define PORT_GetError PORT_GetError_Util
  ------------------
  |  Branch (1742:11): [True: 12.8k, False: 0]
  ------------------
 1743|  12.8k|    if (pText.data != pData)
  ------------------
  |  Branch (1743:9): [True: 0, False: 12.8k]
  ------------------
 1744|      0|        PORT_ZFree(pText.data, pText.len);
  ------------------
  |  |   75|      0|#define PORT_ZFree PORT_ZFree_Util
  ------------------
 1745|  12.8k|fail:
 1746|  12.8k|    sftk_TerminateOp(session, SFTK_ENCRYPT, context);
 1747|  12.8k|done:
 1748|  12.8k|    sftk_FreeSession(session);
 1749|  12.8k|    if (crv == CKR_OK) {
  ------------------
  |  | 1388|  12.8k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1749:9): [True: 12.8k, False: 0]
  ------------------
 1750|  12.8k|        *pulEncryptedDataLen = (CK_ULONG)outlen;
 1751|  12.8k|    }
 1752|  12.8k|    return crv;
 1753|  12.8k|}
NSC_DecryptInit:
 1763|    950|{
 1764|    950|    CHECK_FORK();
 1765|    950|    return sftk_CryptInit(hSession, pMechanism, hKey, CKA_DECRYPT, CKA_DECRYPT,
  ------------------
  |  |  548|    950|#define CKA_DECRYPT 0x00000105UL
  ------------------
                  return sftk_CryptInit(hSession, pMechanism, hKey, CKA_DECRYPT, CKA_DECRYPT,
  ------------------
  |  |  548|    950|#define CKA_DECRYPT 0x00000105UL
  ------------------
 1766|    950|                          SFTK_DECRYPT, PR_FALSE);
  ------------------
  |  |  438|    950|#define PR_FALSE 0
  ------------------
 1767|    950|}
NSC_DecryptUpdate:
 1774|  18.2k|{
 1775|  18.2k|    SFTKSessionContext *context;
 1776|  18.2k|    unsigned int padoutlen = 0;
 1777|  18.2k|    unsigned int outlen;
 1778|  18.2k|    unsigned int maxout = *pulPartLen;
 1779|  18.2k|    CK_RV crv;
 1780|  18.2k|    SECStatus rv;
 1781|       |
 1782|  18.2k|    CHECK_FORK();
 1783|       |
 1784|       |    /* make sure we're legal */
 1785|  18.2k|    crv = sftk_GetContext(hSession, &context, SFTK_DECRYPT, PR_TRUE, NULL);
  ------------------
  |  |  437|  18.2k|#define PR_TRUE 1
  ------------------
 1786|  18.2k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  18.2k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1786:9): [True: 0, False: 18.2k]
  ------------------
 1787|      0|        return crv;
 1788|       |
 1789|       |    /* this can only happen on an NSS programming error */
 1790|  18.2k|    PORT_Assert((context->padDataLength == 0) || context->padDataLength == context->blockSize);
  ------------------
  |  |  120|  18.2k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  18.2k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 18.2k, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1791|       |
 1792|  18.2k|    if (context->doPad) {
  ------------------
  |  Branch (1792:9): [True: 0, False: 18.2k]
  ------------------
 1793|       |        /* Check the data length for block ciphers. If we are padding,
 1794|       |         * then we must be using a block cipher. In the non-padding case
 1795|       |         * the error will be returned by the underlying decryption
 1796|       |         * function when we do the actual decrypt. We need to do the
 1797|       |         * check here to avoid returning a negative length to the caller
 1798|       |         * or reading before the beginning of the pEncryptedPart buffer.
 1799|       |         */
 1800|      0|        if ((ulEncryptedPartLen == 0) ||
  ------------------
  |  Branch (1800:13): [True: 0, False: 0]
  ------------------
 1801|      0|            (ulEncryptedPartLen % context->blockSize) != 0) {
  ------------------
  |  Branch (1801:13): [True: 0, False: 0]
  ------------------
 1802|      0|            return CKR_ENCRYPTED_DATA_LEN_RANGE;
  ------------------
  |  | 1420|      0|#define CKR_ENCRYPTED_DATA_LEN_RANGE 0x00000041UL
  ------------------
 1803|      0|        }
 1804|      0|    }
 1805|       |
 1806|  18.2k|    if (!pPart) {
  ------------------
  |  Branch (1806:9): [True: 0, False: 18.2k]
  ------------------
 1807|      0|        if (context->doPad) {
  ------------------
  |  Branch (1807:13): [True: 0, False: 0]
  ------------------
 1808|      0|            *pulPartLen =
 1809|      0|                ulEncryptedPartLen + context->padDataLength - context->blockSize;
 1810|      0|            return CKR_OK;
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
 1811|      0|        }
 1812|       |        /* for stream ciphers there is are no constraints on ulEncryptedPartLen.
 1813|       |         * for block ciphers, it must be a multiple of blockSize. The error is
 1814|       |         * detected when this function is called again do decrypt the output.
 1815|       |         */
 1816|      0|        *pulPartLen = ulEncryptedPartLen;
 1817|      0|        return CKR_OK;
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
 1818|      0|    }
 1819|       |
 1820|  18.2k|    if (context->doPad) {
  ------------------
  |  Branch (1820:9): [True: 0, False: 18.2k]
  ------------------
 1821|       |        /* first decrypt our saved buffer */
 1822|      0|        if (context->padDataLength != 0) {
  ------------------
  |  Branch (1822:13): [True: 0, False: 0]
  ------------------
 1823|      0|            rv = (*context->update)(context->cipherInfo, pPart, &padoutlen,
 1824|      0|                                    maxout, context->padBuf, context->blockSize);
 1825|      0|            if (rv != SECSuccess)
  ------------------
  |  Branch (1825:17): [True: 0, False: 0]
  ------------------
 1826|      0|                return sftk_MapDecryptError(PORT_GetError());
  ------------------
  |  |   62|      0|#define PORT_GetError PORT_GetError_Util
  ------------------
 1827|      0|            pPart += padoutlen;
 1828|      0|            maxout -= padoutlen;
 1829|      0|        }
 1830|       |        /* now save the final block for the next decrypt or the final */
 1831|      0|        PORT_Memcpy(context->padBuf, &pEncryptedPart[ulEncryptedPartLen - context->blockSize],
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
 1832|      0|                    context->blockSize);
 1833|      0|        context->padDataLength = context->blockSize;
 1834|      0|        ulEncryptedPartLen -= context->padDataLength;
 1835|      0|    }
 1836|       |
 1837|       |    /* do it: NOTE: this assumes buf size in is >= buf size out! */
 1838|  18.2k|    rv = (*context->update)(context->cipherInfo, pPart, &outlen,
 1839|  18.2k|                            maxout, pEncryptedPart, ulEncryptedPartLen);
 1840|  18.2k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1840:9): [True: 0, False: 18.2k]
  ------------------
 1841|      0|        return sftk_MapDecryptError(PORT_GetError());
  ------------------
  |  |   62|      0|#define PORT_GetError PORT_GetError_Util
  ------------------
 1842|      0|    }
 1843|  18.2k|    *pulPartLen = (CK_ULONG)(outlen + padoutlen);
 1844|  18.2k|    return CKR_OK;
  ------------------
  |  | 1388|  18.2k|#define CKR_OK 0x00000000UL
  ------------------
 1845|  18.2k|}
NSC_DigestInit:
 1977|  39.3k|{
 1978|  39.3k|    SFTKSession *session;
 1979|  39.3k|    SFTKSessionContext *context;
 1980|  39.3k|    CK_RV crv = CKR_OK;
  ------------------
  |  | 1388|  39.3k|#define CKR_OK 0x00000000UL
  ------------------
 1981|       |
 1982|  39.3k|    CHECK_FORK();
 1983|       |
 1984|  39.3k|    session = sftk_SessionFromHandle(hSession);
 1985|  39.3k|    if (session == NULL)
  ------------------
  |  Branch (1985:9): [True: 0, False: 39.3k]
  ------------------
 1986|      0|        return CKR_SESSION_HANDLE_INVALID;
  ------------------
  |  | 1465|      0|#define CKR_SESSION_HANDLE_INVALID 0x000000B3UL
  ------------------
 1987|  39.3k|    crv = sftk_InitGeneric(session, pMechanism, &context, SFTK_HASH,
 1988|  39.3k|                           NULL, 0, NULL, 0, CKA_DIGEST);
  ------------------
  |  |   68|  39.3k|#define CKA_DIGEST 0x81000000L
  ------------------
 1989|  39.3k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  39.3k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1989:9): [True: 0, False: 39.3k]
  ------------------
 1990|      0|        sftk_FreeSession(session);
 1991|      0|        return crv;
 1992|      0|    }
 1993|       |
 1994|  39.3k|#define INIT_MECH(mmm)                                         \
 1995|  39.3k|    case CKM_##mmm: {                                          \
 1996|  39.3k|        mmm##Context *mmm##_ctx = mmm##_NewContext();          \
 1997|  39.3k|        context->cipherInfo = (void *)mmm##_ctx;               \
 1998|  39.3k|        context->cipherInfoLen = mmm##_FlattenSize(mmm##_ctx); \
 1999|  39.3k|        context->currentMech = CKM_##mmm;                      \
 2000|  39.3k|        context->hashUpdate = SFTKHash_##mmm##_Update;         \
 2001|  39.3k|        context->end = SFTKHash_##mmm##_End;                   \
 2002|  39.3k|        context->destroy = SFTKHash_##mmm##_DestroyContext;    \
 2003|  39.3k|        context->maxLen = mmm##_LENGTH;                        \
 2004|  39.3k|        if (mmm##_ctx)                                         \
 2005|  39.3k|            mmm##_Begin(mmm##_ctx);                            \
 2006|  39.3k|        else                                                   \
 2007|  39.3k|            crv = CKR_HOST_MEMORY;                             \
 2008|  39.3k|        break;                                                 \
 2009|  39.3k|    }
 2010|       |
 2011|  39.3k|    switch (pMechanism->mechanism) {
 2012|      0|        INIT_MECH(MD2)
  ------------------
  |  | 1995|      0|    case CKM_##mmm: {                                          \
  |  |  ------------------
  |  |  |  Branch (1995:5): [True: 0, False: 39.3k]
  |  |  ------------------
  |  | 1996|      0|        mmm##Context *mmm##_ctx = mmm##_NewContext();          \
  |  | 1997|      0|        context->cipherInfo = (void *)mmm##_ctx;               \
  |  | 1998|      0|        context->cipherInfoLen = mmm##_FlattenSize(mmm##_ctx); \
  |  | 1999|      0|        context->currentMech = CKM_##mmm;                      \
  |  | 2000|      0|        context->hashUpdate = SFTKHash_##mmm##_Update;         \
  |  | 2001|      0|        context->end = SFTKHash_##mmm##_End;                   \
  |  | 2002|      0|        context->destroy = SFTKHash_##mmm##_DestroyContext;    \
  |  | 2003|      0|        context->maxLen = mmm##_LENGTH;                        \
  |  | 2004|      0|        if (mmm##_ctx)                                         \
  |  | 2005|      0|            mmm##_Begin(mmm##_ctx);                            \
  |  | 2006|      0|        else                                                   \
  |  | 2007|      0|            crv = CKR_HOST_MEMORY;                             \
  |  |  ------------------
  |  |  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  |  |  ------------------
  |  | 2008|      0|        break;                                                 \
  |  | 2009|      0|    }
  ------------------
 2013|    335|        INIT_MECH(MD5)
  ------------------
  |  | 1995|    335|    case CKM_##mmm: {                                          \
  |  |  ------------------
  |  |  |  Branch (1995:5): [True: 335, False: 39.0k]
  |  |  ------------------
  |  | 1996|    335|        mmm##Context *mmm##_ctx = mmm##_NewContext();          \
  |  | 1997|    335|        context->cipherInfo = (void *)mmm##_ctx;               \
  |  | 1998|    335|        context->cipherInfoLen = mmm##_FlattenSize(mmm##_ctx); \
  |  | 1999|    335|        context->currentMech = CKM_##mmm;                      \
  |  | 2000|    335|        context->hashUpdate = SFTKHash_##mmm##_Update;         \
  |  | 2001|    335|        context->end = SFTKHash_##mmm##_End;                   \
  |  | 2002|    335|        context->destroy = SFTKHash_##mmm##_DestroyContext;    \
  |  | 2003|    335|        context->maxLen = mmm##_LENGTH;                        \
  |  | 2004|    335|        if (mmm##_ctx)                                         \
  |  | 2005|    335|            mmm##_Begin(mmm##_ctx);                            \
  |  | 2006|    335|        else                                                   \
  |  | 2007|    335|            crv = CKR_HOST_MEMORY;                             \
  |  |  ------------------
  |  |  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  |  |  ------------------
  |  | 2008|    335|        break;                                                 \
  |  | 2009|    335|    }
  ------------------
 2014|  15.1k|        INIT_MECH(SHA1)
  ------------------
  |  | 1995|  15.1k|    case CKM_##mmm: {                                          \
  |  |  ------------------
  |  |  |  Branch (1995:5): [True: 15.1k, False: 24.2k]
  |  |  ------------------
  |  | 1996|  15.1k|        mmm##Context *mmm##_ctx = mmm##_NewContext();          \
  |  | 1997|  15.1k|        context->cipherInfo = (void *)mmm##_ctx;               \
  |  | 1998|  15.1k|        context->cipherInfoLen = mmm##_FlattenSize(mmm##_ctx); \
  |  | 1999|  15.1k|        context->currentMech = CKM_##mmm;                      \
  |  | 2000|  15.1k|        context->hashUpdate = SFTKHash_##mmm##_Update;         \
  |  | 2001|  15.1k|        context->end = SFTKHash_##mmm##_End;                   \
  |  | 2002|  15.1k|        context->destroy = SFTKHash_##mmm##_DestroyContext;    \
  |  | 2003|  15.1k|        context->maxLen = mmm##_LENGTH;                        \
  |  | 2004|  15.1k|        if (mmm##_ctx)                                         \
  |  | 2005|  15.1k|            mmm##_Begin(mmm##_ctx);                            \
  |  | 2006|  15.1k|        else                                                   \
  |  | 2007|  15.1k|            crv = CKR_HOST_MEMORY;                             \
  |  |  ------------------
  |  |  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  |  |  ------------------
  |  | 2008|  15.1k|        break;                                                 \
  |  | 2009|  15.1k|    }
  ------------------
 2015|      0|        INIT_MECH(SHA224)
  ------------------
  |  | 1995|      0|    case CKM_##mmm: {                                          \
  |  |  ------------------
  |  |  |  Branch (1995:5): [True: 0, False: 39.3k]
  |  |  ------------------
  |  | 1996|      0|        mmm##Context *mmm##_ctx = mmm##_NewContext();          \
  |  | 1997|      0|        context->cipherInfo = (void *)mmm##_ctx;               \
  |  | 1998|      0|        context->cipherInfoLen = mmm##_FlattenSize(mmm##_ctx); \
  |  | 1999|      0|        context->currentMech = CKM_##mmm;                      \
  |  | 2000|      0|        context->hashUpdate = SFTKHash_##mmm##_Update;         \
  |  | 2001|      0|        context->end = SFTKHash_##mmm##_End;                   \
  |  | 2002|      0|        context->destroy = SFTKHash_##mmm##_DestroyContext;    \
  |  | 2003|      0|        context->maxLen = mmm##_LENGTH;                        \
  |  | 2004|      0|        if (mmm##_ctx)                                         \
  |  | 2005|      0|            mmm##_Begin(mmm##_ctx);                            \
  |  | 2006|      0|        else                                                   \
  |  | 2007|      0|            crv = CKR_HOST_MEMORY;                             \
  |  |  ------------------
  |  |  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  |  |  ------------------
  |  | 2008|      0|        break;                                                 \
  |  | 2009|      0|    }
  ------------------
 2016|  16.3k|        INIT_MECH(SHA256)
  ------------------
  |  | 1995|  16.3k|    case CKM_##mmm: {                                          \
  |  |  ------------------
  |  |  |  Branch (1995:5): [True: 16.3k, False: 23.0k]
  |  |  ------------------
  |  | 1996|  16.3k|        mmm##Context *mmm##_ctx = mmm##_NewContext();          \
  |  | 1997|  16.3k|        context->cipherInfo = (void *)mmm##_ctx;               \
  |  | 1998|  16.3k|        context->cipherInfoLen = mmm##_FlattenSize(mmm##_ctx); \
  |  | 1999|  16.3k|        context->currentMech = CKM_##mmm;                      \
  |  | 2000|  16.3k|        context->hashUpdate = SFTKHash_##mmm##_Update;         \
  |  | 2001|  16.3k|        context->end = SFTKHash_##mmm##_End;                   \
  |  | 2002|  16.3k|        context->destroy = SFTKHash_##mmm##_DestroyContext;    \
  |  | 2003|  16.3k|        context->maxLen = mmm##_LENGTH;                        \
  |  | 2004|  16.3k|        if (mmm##_ctx)                                         \
  |  | 2005|  16.3k|            mmm##_Begin(mmm##_ctx);                            \
  |  | 2006|  16.3k|        else                                                   \
  |  | 2007|  16.3k|            crv = CKR_HOST_MEMORY;                             \
  |  |  ------------------
  |  |  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  |  |  ------------------
  |  | 2008|  16.3k|        break;                                                 \
  |  | 2009|  16.3k|    }
  ------------------
 2017|  6.97k|        INIT_MECH(SHA384)
  ------------------
  |  | 1995|  6.97k|    case CKM_##mmm: {                                          \
  |  |  ------------------
  |  |  |  Branch (1995:5): [True: 6.97k, False: 32.4k]
  |  |  ------------------
  |  | 1996|  6.97k|        mmm##Context *mmm##_ctx = mmm##_NewContext();          \
  |  | 1997|  6.97k|        context->cipherInfo = (void *)mmm##_ctx;               \
  |  | 1998|  6.97k|        context->cipherInfoLen = mmm##_FlattenSize(mmm##_ctx); \
  |  | 1999|  6.97k|        context->currentMech = CKM_##mmm;                      \
  |  | 2000|  6.97k|        context->hashUpdate = SFTKHash_##mmm##_Update;         \
  |  | 2001|  6.97k|        context->end = SFTKHash_##mmm##_End;                   \
  |  | 2002|  6.97k|        context->destroy = SFTKHash_##mmm##_DestroyContext;    \
  |  | 2003|  6.97k|        context->maxLen = mmm##_LENGTH;                        \
  |  | 2004|  6.97k|        if (mmm##_ctx)                                         \
  |  | 2005|  6.97k|            mmm##_Begin(mmm##_ctx);                            \
  |  | 2006|  6.97k|        else                                                   \
  |  | 2007|  6.97k|            crv = CKR_HOST_MEMORY;                             \
  |  |  ------------------
  |  |  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  |  |  ------------------
  |  | 2008|  6.97k|        break;                                                 \
  |  | 2009|  6.97k|    }
  ------------------
 2018|    589|        INIT_MECH(SHA512)
  ------------------
  |  | 1995|    589|    case CKM_##mmm: {                                          \
  |  |  ------------------
  |  |  |  Branch (1995:5): [True: 589, False: 38.8k]
  |  |  ------------------
  |  | 1996|    589|        mmm##Context *mmm##_ctx = mmm##_NewContext();          \
  |  | 1997|    589|        context->cipherInfo = (void *)mmm##_ctx;               \
  |  | 1998|    589|        context->cipherInfoLen = mmm##_FlattenSize(mmm##_ctx); \
  |  | 1999|    589|        context->currentMech = CKM_##mmm;                      \
  |  | 2000|    589|        context->hashUpdate = SFTKHash_##mmm##_Update;         \
  |  | 2001|    589|        context->end = SFTKHash_##mmm##_End;                   \
  |  | 2002|    589|        context->destroy = SFTKHash_##mmm##_DestroyContext;    \
  |  | 2003|    589|        context->maxLen = mmm##_LENGTH;                        \
  |  | 2004|    589|        if (mmm##_ctx)                                         \
  |  | 2005|    589|            mmm##_Begin(mmm##_ctx);                            \
  |  | 2006|    589|        else                                                   \
  |  | 2007|    589|            crv = CKR_HOST_MEMORY;                             \
  |  |  ------------------
  |  |  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  |  |  ------------------
  |  | 2008|    589|        break;                                                 \
  |  | 2009|    589|    }
  ------------------
 2019|      0|        INIT_MECH(SHA3_224)
  ------------------
  |  | 1995|      0|    case CKM_##mmm: {                                          \
  |  |  ------------------
  |  |  |  Branch (1995:5): [True: 0, False: 39.3k]
  |  |  ------------------
  |  | 1996|      0|        mmm##Context *mmm##_ctx = mmm##_NewContext();          \
  |  | 1997|      0|        context->cipherInfo = (void *)mmm##_ctx;               \
  |  | 1998|      0|        context->cipherInfoLen = mmm##_FlattenSize(mmm##_ctx); \
  |  | 1999|      0|        context->currentMech = CKM_##mmm;                      \
  |  | 2000|      0|        context->hashUpdate = SFTKHash_##mmm##_Update;         \
  |  | 2001|      0|        context->end = SFTKHash_##mmm##_End;                   \
  |  | 2002|      0|        context->destroy = SFTKHash_##mmm##_DestroyContext;    \
  |  | 2003|      0|        context->maxLen = mmm##_LENGTH;                        \
  |  | 2004|      0|        if (mmm##_ctx)                                         \
  |  | 2005|      0|            mmm##_Begin(mmm##_ctx);                            \
  |  | 2006|      0|        else                                                   \
  |  | 2007|      0|            crv = CKR_HOST_MEMORY;                             \
  |  |  ------------------
  |  |  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  |  |  ------------------
  |  | 2008|      0|        break;                                                 \
  |  | 2009|      0|    }
  ------------------
 2020|      0|        INIT_MECH(SHA3_256)
  ------------------
  |  | 1995|      0|    case CKM_##mmm: {                                          \
  |  |  ------------------
  |  |  |  Branch (1995:5): [True: 0, False: 39.3k]
  |  |  ------------------
  |  | 1996|      0|        mmm##Context *mmm##_ctx = mmm##_NewContext();          \
  |  | 1997|      0|        context->cipherInfo = (void *)mmm##_ctx;               \
  |  | 1998|      0|        context->cipherInfoLen = mmm##_FlattenSize(mmm##_ctx); \
  |  | 1999|      0|        context->currentMech = CKM_##mmm;                      \
  |  | 2000|      0|        context->hashUpdate = SFTKHash_##mmm##_Update;         \
  |  | 2001|      0|        context->end = SFTKHash_##mmm##_End;                   \
  |  | 2002|      0|        context->destroy = SFTKHash_##mmm##_DestroyContext;    \
  |  | 2003|      0|        context->maxLen = mmm##_LENGTH;                        \
  |  | 2004|      0|        if (mmm##_ctx)                                         \
  |  | 2005|      0|            mmm##_Begin(mmm##_ctx);                            \
  |  | 2006|      0|        else                                                   \
  |  | 2007|      0|            crv = CKR_HOST_MEMORY;                             \
  |  |  ------------------
  |  |  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  |  |  ------------------
  |  | 2008|      0|        break;                                                 \
  |  | 2009|      0|    }
  ------------------
 2021|      0|        INIT_MECH(SHA3_384)
  ------------------
  |  | 1995|      0|    case CKM_##mmm: {                                          \
  |  |  ------------------
  |  |  |  Branch (1995:5): [True: 0, False: 39.3k]
  |  |  ------------------
  |  | 1996|      0|        mmm##Context *mmm##_ctx = mmm##_NewContext();          \
  |  | 1997|      0|        context->cipherInfo = (void *)mmm##_ctx;               \
  |  | 1998|      0|        context->cipherInfoLen = mmm##_FlattenSize(mmm##_ctx); \
  |  | 1999|      0|        context->currentMech = CKM_##mmm;                      \
  |  | 2000|      0|        context->hashUpdate = SFTKHash_##mmm##_Update;         \
  |  | 2001|      0|        context->end = SFTKHash_##mmm##_End;                   \
  |  | 2002|      0|        context->destroy = SFTKHash_##mmm##_DestroyContext;    \
  |  | 2003|      0|        context->maxLen = mmm##_LENGTH;                        \
  |  | 2004|      0|        if (mmm##_ctx)                                         \
  |  | 2005|      0|            mmm##_Begin(mmm##_ctx);                            \
  |  | 2006|      0|        else                                                   \
  |  | 2007|      0|            crv = CKR_HOST_MEMORY;                             \
  |  |  ------------------
  |  |  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  |  |  ------------------
  |  | 2008|      0|        break;                                                 \
  |  | 2009|      0|    }
  ------------------
 2022|      0|        INIT_MECH(SHA3_512)
  ------------------
  |  | 1995|      0|    case CKM_##mmm: {                                          \
  |  |  ------------------
  |  |  |  Branch (1995:5): [True: 0, False: 39.3k]
  |  |  ------------------
  |  | 1996|      0|        mmm##Context *mmm##_ctx = mmm##_NewContext();          \
  |  | 1997|      0|        context->cipherInfo = (void *)mmm##_ctx;               \
  |  | 1998|      0|        context->cipherInfoLen = mmm##_FlattenSize(mmm##_ctx); \
  |  | 1999|      0|        context->currentMech = CKM_##mmm;                      \
  |  | 2000|      0|        context->hashUpdate = SFTKHash_##mmm##_Update;         \
  |  | 2001|      0|        context->end = SFTKHash_##mmm##_End;                   \
  |  | 2002|      0|        context->destroy = SFTKHash_##mmm##_DestroyContext;    \
  |  | 2003|      0|        context->maxLen = mmm##_LENGTH;                        \
  |  | 2004|      0|        if (mmm##_ctx)                                         \
  |  | 2005|      0|            mmm##_Begin(mmm##_ctx);                            \
  |  | 2006|      0|        else                                                   \
  |  | 2007|      0|            crv = CKR_HOST_MEMORY;                             \
  |  |  ------------------
  |  |  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  |  |  ------------------
  |  | 2008|      0|        break;                                                 \
  |  | 2009|      0|    }
  ------------------
 2023|       |
 2024|      0|        default:
  ------------------
  |  Branch (2024:9): [True: 0, False: 39.3k]
  ------------------
 2025|      0|            crv = CKR_MECHANISM_INVALID;
  ------------------
  |  | 1447|      0|#define CKR_MECHANISM_INVALID 0x00000070UL
  ------------------
 2026|      0|            break;
 2027|  39.3k|    }
 2028|       |
 2029|  39.3k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  39.3k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (2029:9): [True: 0, False: 39.3k]
  ------------------
 2030|      0|        sftk_FreeContext(context);
 2031|      0|        sftk_FreeSession(session);
 2032|      0|        return crv;
 2033|      0|    }
 2034|  39.3k|    sftk_SetContextByType(session, SFTK_HASH, context);
 2035|  39.3k|    sftk_FreeSession(session);
 2036|  39.3k|    return CKR_OK;
  ------------------
  |  | 1388|  39.3k|#define CKR_OK 0x00000000UL
  ------------------
 2037|  39.3k|}
NSC_DigestUpdate:
 2088|  39.5k|{
 2089|  39.5k|    SFTKSessionContext *context;
 2090|  39.5k|    CK_RV crv;
 2091|       |
 2092|  39.5k|    CHECK_FORK();
 2093|       |
 2094|       |    /* make sure we're legal */
 2095|  39.5k|    crv = sftk_GetContext(hSession, &context, SFTK_HASH, PR_TRUE, NULL);
  ------------------
  |  |  437|  39.5k|#define PR_TRUE 1
  ------------------
 2096|  39.5k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  39.5k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (2096:9): [True: 0, False: 39.5k]
  ------------------
 2097|      0|        return crv;
 2098|       |
 2099|  39.5k|#if (ULONG_MAX > UINT_MAX)
 2100|       |    /* The context->hashUpdate function takes an unsigned int for its data
 2101|       |     * length argument, but NSC_DigestUpdate takes an unsigned long. */
 2102|  39.5k|    while (ulPartLen > UINT_MAX) {
  ------------------
  |  Branch (2102:12): [True: 0, False: 39.5k]
  ------------------
 2103|      0|        (*context->hashUpdate)(context->cipherInfo, pPart, UINT_MAX);
 2104|      0|        pPart += UINT_MAX;
 2105|      0|        ulPartLen -= UINT_MAX;
 2106|      0|    }
 2107|  39.5k|#endif
 2108|  39.5k|    (*context->hashUpdate)(context->cipherInfo, pPart, ulPartLen);
 2109|       |
 2110|  39.5k|    return CKR_OK;
  ------------------
  |  | 1388|  39.5k|#define CKR_OK 0x00000000UL
  ------------------
 2111|  39.5k|}
NSC_DigestFinal:
 2117|  34.6k|{
 2118|  34.6k|    SFTKSession *session;
 2119|  34.6k|    SFTKSessionContext *context;
 2120|  34.6k|    unsigned int maxout = *pulDigestLen;
 2121|  34.6k|    unsigned int digestLen;
 2122|  34.6k|    CK_RV crv;
 2123|       |
 2124|  34.6k|    CHECK_FORK();
 2125|       |
 2126|       |    /* make sure we're legal */
 2127|  34.6k|    crv = sftk_GetContext(hSession, &context, SFTK_HASH, PR_TRUE, &session);
  ------------------
  |  |  437|  34.6k|#define PR_TRUE 1
  ------------------
 2128|  34.6k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  34.6k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (2128:9): [True: 134, False: 34.4k]
  ------------------
 2129|    134|        return crv;
 2130|       |
 2131|  34.4k|    if (pDigest != NULL) {
  ------------------
  |  Branch (2131:9): [True: 34.4k, False: 0]
  ------------------
 2132|  34.4k|        (*context->end)(context->cipherInfo, pDigest, &digestLen, maxout);
 2133|  34.4k|        *pulDigestLen = digestLen;
 2134|  34.4k|        sftk_TerminateOp(session, SFTK_HASH, context);
 2135|  34.4k|    } else {
 2136|      0|        *pulDigestLen = context->maxLen;
 2137|      0|    }
 2138|       |
 2139|  34.4k|    sftk_FreeSession(session);
 2140|  34.4k|    return CKR_OK;
  ------------------
  |  | 1388|  34.4k|#define CKR_OK 0x00000000UL
  ------------------
 2141|  34.6k|}
NSC_SignInit:
 2877|  55.0k|{
 2878|  55.0k|    SFTKSession *session;
 2879|  55.0k|    SFTKObject *key;
 2880|  55.0k|    SFTKSessionContext *context;
 2881|  55.0k|    CK_KEY_TYPE key_type;
 2882|  55.0k|    CK_RV crv = CKR_OK;
  ------------------
  |  | 1388|  55.0k|#define CKR_OK 0x00000000UL
  ------------------
 2883|  55.0k|    NSSLOWKEYPrivateKey *privKey;
 2884|  55.0k|    SFTKHashSignInfo *info = NULL;
 2885|  55.0k|    SFTKPSSSignInfo *pinfo = NULL;
 2886|       |
 2887|  55.0k|    CHECK_FORK();
 2888|       |
 2889|       |    /* Block Cipher MACing Algorithms use a different Context init method..*/
 2890|  55.0k|    crv = sftk_InitCBCMac(hSession, pMechanism, hKey, CKA_SIGN, SFTK_SIGN);
  ------------------
  |  |  551|  55.0k|#define CKA_SIGN 0x00000108UL
  ------------------
 2891|  55.0k|    if (crv != CKR_FUNCTION_NOT_SUPPORTED)
  ------------------
  |  | 1426|  55.0k|#define CKR_FUNCTION_NOT_SUPPORTED 0x00000054UL
  ------------------
  |  Branch (2891:9): [True: 0, False: 55.0k]
  ------------------
 2892|      0|        return crv;
 2893|       |
 2894|       |    /* we're not using a block cipher mac */
 2895|  55.0k|    session = sftk_SessionFromHandle(hSession);
 2896|  55.0k|    if (session == NULL)
  ------------------
  |  Branch (2896:9): [True: 0, False: 55.0k]
  ------------------
 2897|      0|        return CKR_SESSION_HANDLE_INVALID;
  ------------------
  |  | 1465|      0|#define CKR_SESSION_HANDLE_INVALID 0x000000B3UL
  ------------------
 2898|  55.0k|    crv = sftk_InitGeneric(session, pMechanism, &context, SFTK_SIGN, &key,
 2899|  55.0k|                           hKey, &key_type, CKO_PRIVATE_KEY, CKA_SIGN);
  ------------------
  |  |  328|  55.0k|#define CKO_PRIVATE_KEY 0x00000003UL
  ------------------
                                         hKey, &key_type, CKO_PRIVATE_KEY, CKA_SIGN);
  ------------------
  |  |  551|  55.0k|#define CKA_SIGN 0x00000108UL
  ------------------
 2900|  55.0k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  55.0k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (2900:9): [True: 0, False: 55.0k]
  ------------------
 2901|      0|        sftk_FreeSession(session);
 2902|      0|        return crv;
 2903|      0|    }
 2904|       |
 2905|  55.0k|    context->multi = PR_FALSE;
  ------------------
  |  |  438|  55.0k|#define PR_FALSE 0
  ------------------
 2906|       |
 2907|  55.0k|#define INIT_RSA_SIGN_MECH(mmm)             \
 2908|  55.0k|    case CKM_##mmm##_RSA_PKCS:              \
 2909|  55.0k|        context->multi = PR_TRUE;           \
 2910|  55.0k|        crv = sftk_doSub##mmm(context);     \
 2911|  55.0k|        if (crv != CKR_OK)                  \
 2912|  55.0k|            break;                          \
 2913|  55.0k|        context->update = sftk_RSAHashSign; \
 2914|  55.0k|        info = PORT_New(SFTKHashSignInfo);  \
 2915|  55.0k|        if (info == NULL) {                 \
 2916|  55.0k|            crv = CKR_HOST_MEMORY;          \
 2917|  55.0k|            break;                          \
 2918|  55.0k|        }                                   \
 2919|  55.0k|        info->hashOid = SEC_OID_##mmm;      \
 2920|  55.0k|        goto finish_rsa;
 2921|       |
 2922|  55.0k|    switch (pMechanism->mechanism) {
 2923|      0|        INIT_RSA_SIGN_MECH(MD5)
  ------------------
  |  | 2908|      0|    case CKM_##mmm##_RSA_PKCS:              \
  |  |  ------------------
  |  |  |  Branch (2908:5): [True: 0, False: 55.0k]
  |  |  ------------------
  |  | 2909|      0|        context->multi = PR_TRUE;           \
  |  |  ------------------
  |  |  |  |  437|      0|#define PR_TRUE 1
  |  |  ------------------
  |  | 2910|      0|        crv = sftk_doSub##mmm(context);     \
  |  | 2911|      0|        if (crv != CKR_OK)                  \
  |  |  ------------------
  |  |  |  | 1388|      0|#define CKR_OK 0x00000000UL
  |  |  ------------------
  |  |  |  Branch (2911:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 2912|      0|            break;                          \
  |  | 2913|      0|        context->update = sftk_RSAHashSign; \
  |  | 2914|      0|        info = PORT_New(SFTKHashSignInfo);  \
  |  |  ------------------
  |  |  |  |  151|      0|#define PORT_New(type) (type *)PORT_Alloc(sizeof(type))
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define PORT_Alloc PORT_Alloc_Util
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 2915|      0|        if (info == NULL) {                 \
  |  |  ------------------
  |  |  |  Branch (2915:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 2916|      0|            crv = CKR_HOST_MEMORY;          \
  |  |  ------------------
  |  |  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  |  |  ------------------
  |  | 2917|      0|            break;                          \
  |  | 2918|      0|        }                                   \
  |  | 2919|      0|        info->hashOid = SEC_OID_##mmm;      \
  |  | 2920|      0|        goto finish_rsa;
  ------------------
 2924|      0|        INIT_RSA_SIGN_MECH(MD2)
  ------------------
  |  | 2908|      0|    case CKM_##mmm##_RSA_PKCS:              \
  |  |  ------------------
  |  |  |  Branch (2908:5): [True: 0, False: 55.0k]
  |  |  ------------------
  |  | 2909|      0|        context->multi = PR_TRUE;           \
  |  |  ------------------
  |  |  |  |  437|      0|#define PR_TRUE 1
  |  |  ------------------
  |  | 2910|      0|        crv = sftk_doSub##mmm(context);     \
  |  | 2911|      0|        if (crv != CKR_OK)                  \
  |  |  ------------------
  |  |  |  | 1388|      0|#define CKR_OK 0x00000000UL
  |  |  ------------------
  |  |  |  Branch (2911:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 2912|      0|            break;                          \
  |  | 2913|      0|        context->update = sftk_RSAHashSign; \
  |  | 2914|      0|        info = PORT_New(SFTKHashSignInfo);  \
  |  |  ------------------
  |  |  |  |  151|      0|#define PORT_New(type) (type *)PORT_Alloc(sizeof(type))
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define PORT_Alloc PORT_Alloc_Util
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 2915|      0|        if (info == NULL) {                 \
  |  |  ------------------
  |  |  |  Branch (2915:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 2916|      0|            crv = CKR_HOST_MEMORY;          \
  |  |  ------------------
  |  |  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  |  |  ------------------
  |  | 2917|      0|            break;                          \
  |  | 2918|      0|        }                                   \
  |  | 2919|      0|        info->hashOid = SEC_OID_##mmm;      \
  |  | 2920|      0|        goto finish_rsa;
  ------------------
 2925|      0|        INIT_RSA_SIGN_MECH(SHA1)
  ------------------
  |  | 2908|      0|    case CKM_##mmm##_RSA_PKCS:              \
  |  |  ------------------
  |  |  |  Branch (2908:5): [True: 0, False: 55.0k]
  |  |  ------------------
  |  | 2909|      0|        context->multi = PR_TRUE;           \
  |  |  ------------------
  |  |  |  |  437|      0|#define PR_TRUE 1
  |  |  ------------------
  |  | 2910|      0|        crv = sftk_doSub##mmm(context);     \
  |  | 2911|      0|        if (crv != CKR_OK)                  \
  |  |  ------------------
  |  |  |  | 1388|      0|#define CKR_OK 0x00000000UL
  |  |  ------------------
  |  |  |  Branch (2911:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 2912|      0|            break;                          \
  |  | 2913|      0|        context->update = sftk_RSAHashSign; \
  |  | 2914|      0|        info = PORT_New(SFTKHashSignInfo);  \
  |  |  ------------------
  |  |  |  |  151|      0|#define PORT_New(type) (type *)PORT_Alloc(sizeof(type))
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define PORT_Alloc PORT_Alloc_Util
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 2915|      0|        if (info == NULL) {                 \
  |  |  ------------------
  |  |  |  Branch (2915:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 2916|      0|            crv = CKR_HOST_MEMORY;          \
  |  |  ------------------
  |  |  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  |  |  ------------------
  |  | 2917|      0|            break;                          \
  |  | 2918|      0|        }                                   \
  |  | 2919|      0|        info->hashOid = SEC_OID_##mmm;      \
  |  | 2920|      0|        goto finish_rsa;
  ------------------
 2926|      0|        INIT_RSA_SIGN_MECH(SHA224)
  ------------------
  |  | 2908|      0|    case CKM_##mmm##_RSA_PKCS:              \
  |  |  ------------------
  |  |  |  Branch (2908:5): [True: 0, False: 55.0k]
  |  |  ------------------
  |  | 2909|      0|        context->multi = PR_TRUE;           \
  |  |  ------------------
  |  |  |  |  437|      0|#define PR_TRUE 1
  |  |  ------------------
  |  | 2910|      0|        crv = sftk_doSub##mmm(context);     \
  |  | 2911|      0|        if (crv != CKR_OK)                  \
  |  |  ------------------
  |  |  |  | 1388|      0|#define CKR_OK 0x00000000UL
  |  |  ------------------
  |  |  |  Branch (2911:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 2912|      0|            break;                          \
  |  | 2913|      0|        context->update = sftk_RSAHashSign; \
  |  | 2914|      0|        info = PORT_New(SFTKHashSignInfo);  \
  |  |  ------------------
  |  |  |  |  151|      0|#define PORT_New(type) (type *)PORT_Alloc(sizeof(type))
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define PORT_Alloc PORT_Alloc_Util
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 2915|      0|        if (info == NULL) {                 \
  |  |  ------------------
  |  |  |  Branch (2915:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 2916|      0|            crv = CKR_HOST_MEMORY;          \
  |  |  ------------------
  |  |  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  |  |  ------------------
  |  | 2917|      0|            break;                          \
  |  | 2918|      0|        }                                   \
  |  | 2919|      0|        info->hashOid = SEC_OID_##mmm;      \
  |  | 2920|      0|        goto finish_rsa;
  ------------------
 2927|      0|        INIT_RSA_SIGN_MECH(SHA256)
  ------------------
  |  | 2908|      0|    case CKM_##mmm##_RSA_PKCS:              \
  |  |  ------------------
  |  |  |  Branch (2908:5): [True: 0, False: 55.0k]
  |  |  ------------------
  |  | 2909|      0|        context->multi = PR_TRUE;           \
  |  |  ------------------
  |  |  |  |  437|      0|#define PR_TRUE 1
  |  |  ------------------
  |  | 2910|      0|        crv = sftk_doSub##mmm(context);     \
  |  | 2911|      0|        if (crv != CKR_OK)                  \
  |  |  ------------------
  |  |  |  | 1388|      0|#define CKR_OK 0x00000000UL
  |  |  ------------------
  |  |  |  Branch (2911:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 2912|      0|            break;                          \
  |  | 2913|      0|        context->update = sftk_RSAHashSign; \
  |  | 2914|      0|        info = PORT_New(SFTKHashSignInfo);  \
  |  |  ------------------
  |  |  |  |  151|      0|#define PORT_New(type) (type *)PORT_Alloc(sizeof(type))
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define PORT_Alloc PORT_Alloc_Util
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 2915|      0|        if (info == NULL) {                 \
  |  |  ------------------
  |  |  |  Branch (2915:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 2916|      0|            crv = CKR_HOST_MEMORY;          \
  |  |  ------------------
  |  |  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  |  |  ------------------
  |  | 2917|      0|            break;                          \
  |  | 2918|      0|        }                                   \
  |  | 2919|      0|        info->hashOid = SEC_OID_##mmm;      \
  |  | 2920|      0|        goto finish_rsa;
  ------------------
 2928|      0|        INIT_RSA_SIGN_MECH(SHA384)
  ------------------
  |  | 2908|      0|    case CKM_##mmm##_RSA_PKCS:              \
  |  |  ------------------
  |  |  |  Branch (2908:5): [True: 0, False: 55.0k]
  |  |  ------------------
  |  | 2909|      0|        context->multi = PR_TRUE;           \
  |  |  ------------------
  |  |  |  |  437|      0|#define PR_TRUE 1
  |  |  ------------------
  |  | 2910|      0|        crv = sftk_doSub##mmm(context);     \
  |  | 2911|      0|        if (crv != CKR_OK)                  \
  |  |  ------------------
  |  |  |  | 1388|      0|#define CKR_OK 0x00000000UL
  |  |  ------------------
  |  |  |  Branch (2911:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 2912|      0|            break;                          \
  |  | 2913|      0|        context->update = sftk_RSAHashSign; \
  |  | 2914|      0|        info = PORT_New(SFTKHashSignInfo);  \
  |  |  ------------------
  |  |  |  |  151|      0|#define PORT_New(type) (type *)PORT_Alloc(sizeof(type))
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define PORT_Alloc PORT_Alloc_Util
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 2915|      0|        if (info == NULL) {                 \
  |  |  ------------------
  |  |  |  Branch (2915:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 2916|      0|            crv = CKR_HOST_MEMORY;          \
  |  |  ------------------
  |  |  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  |  |  ------------------
  |  | 2917|      0|            break;                          \
  |  | 2918|      0|        }                                   \
  |  | 2919|      0|        info->hashOid = SEC_OID_##mmm;      \
  |  | 2920|      0|        goto finish_rsa;
  ------------------
 2929|      0|        INIT_RSA_SIGN_MECH(SHA512)
  ------------------
  |  | 2908|      0|    case CKM_##mmm##_RSA_PKCS:              \
  |  |  ------------------
  |  |  |  Branch (2908:5): [True: 0, False: 55.0k]
  |  |  ------------------
  |  | 2909|      0|        context->multi = PR_TRUE;           \
  |  |  ------------------
  |  |  |  |  437|      0|#define PR_TRUE 1
  |  |  ------------------
  |  | 2910|      0|        crv = sftk_doSub##mmm(context);     \
  |  | 2911|      0|        if (crv != CKR_OK)                  \
  |  |  ------------------
  |  |  |  | 1388|      0|#define CKR_OK 0x00000000UL
  |  |  ------------------
  |  |  |  Branch (2911:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 2912|      0|            break;                          \
  |  | 2913|      0|        context->update = sftk_RSAHashSign; \
  |  | 2914|      0|        info = PORT_New(SFTKHashSignInfo);  \
  |  |  ------------------
  |  |  |  |  151|      0|#define PORT_New(type) (type *)PORT_Alloc(sizeof(type))
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define PORT_Alloc PORT_Alloc_Util
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 2915|      0|        if (info == NULL) {                 \
  |  |  ------------------
  |  |  |  Branch (2915:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 2916|      0|            crv = CKR_HOST_MEMORY;          \
  |  |  ------------------
  |  |  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  |  |  ------------------
  |  | 2917|      0|            break;                          \
  |  | 2918|      0|        }                                   \
  |  | 2919|      0|        info->hashOid = SEC_OID_##mmm;      \
  |  | 2920|      0|        goto finish_rsa;
  ------------------
 2930|       |
 2931|      0|        case CKM_RSA_PKCS:
  ------------------
  |  |  720|      0|#define CKM_RSA_PKCS 0x00000001UL
  ------------------
  |  Branch (2931:9): [True: 0, False: 55.0k]
  ------------------
 2932|      0|            context->update = sftk_RSASign;
 2933|      0|            goto finish_rsa;
 2934|      0|        case CKM_RSA_X_509:
  ------------------
  |  |  722|      0|#define CKM_RSA_X_509 0x00000003UL
  ------------------
  |  Branch (2934:9): [True: 0, False: 55.0k]
  ------------------
 2935|      0|            context->update = sftk_RSASignRaw;
 2936|      0|        finish_rsa:
 2937|      0|            if (key_type != CKK_RSA) {
  ------------------
  |  |  372|      0|#define CKK_RSA 0x00000000UL
  ------------------
  |  Branch (2937:17): [True: 0, False: 0]
  ------------------
 2938|      0|                crv = CKR_KEY_TYPE_INCONSISTENT;
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
 2939|      0|                break;
 2940|      0|            }
 2941|      0|            context->rsa = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 2942|      0|            privKey = sftk_GetPrivKey(key, CKK_RSA, &crv);
  ------------------
  |  |  372|      0|#define CKK_RSA 0x00000000UL
  ------------------
 2943|      0|            if (privKey == NULL) {
  ------------------
  |  Branch (2943:17): [True: 0, False: 0]
  ------------------
 2944|      0|                crv = CKR_KEY_TYPE_INCONSISTENT;
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
 2945|      0|                break;
 2946|      0|            }
 2947|       |            /* OK, info is allocated only if we're doing hash and sign mechanism.
 2948|       |             * It's necessary to be able to set the correct OID in the final
 2949|       |             * signature.
 2950|       |             */
 2951|      0|            if (info) {
  ------------------
  |  Branch (2951:17): [True: 0, False: 0]
  ------------------
 2952|      0|                info->key = privKey;
 2953|      0|                context->cipherInfo = info;
 2954|      0|                context->destroy = sftk_Space;
 2955|      0|            } else {
 2956|      0|                context->cipherInfo = privKey;
 2957|      0|                context->destroy = sftk_Null;
 2958|      0|            }
 2959|      0|            context->maxLen = nsslowkey_PrivateModulusLen(privKey);
 2960|      0|            break;
 2961|       |
 2962|      0|#define INIT_RSA_PSS_SIG_MECH(mmm)                                                            \
 2963|      0|    case CKM_##mmm##_RSA_PKCS_PSS:                                                            \
 2964|      0|        context->multi = PR_TRUE;                                                             \
 2965|      0|        crv = sftk_doSub##mmm(context);                                                       \
 2966|      0|        if (crv != CKR_OK)                                                                    \
 2967|      0|            break;                                                                            \
 2968|      0|        if (pMechanism->ulParameterLen != sizeof(CK_RSA_PKCS_PSS_PARAMS)) {                   \
 2969|      0|            crv = CKR_MECHANISM_PARAM_INVALID;                                                \
 2970|      0|            break;                                                                            \
 2971|      0|        }                                                                                     \
 2972|      0|        if (((const CK_RSA_PKCS_PSS_PARAMS *)pMechanism->pParameter)->hashAlg != CKM_##mmm) { \
 2973|      0|            crv = CKR_MECHANISM_PARAM_INVALID;                                                \
 2974|      0|            break;                                                                            \
 2975|      0|        }                                                                                     \
 2976|      0|        goto finish_rsa_pss;
 2977|      0|            INIT_RSA_PSS_SIG_MECH(SHA1)
  ------------------
  |  | 2963|      0|    case CKM_##mmm##_RSA_PKCS_PSS:                                                            \
  |  |  ------------------
  |  |  |  Branch (2963:5): [True: 0, False: 55.0k]
  |  |  ------------------
  |  | 2964|      0|        context->multi = PR_TRUE;                                                             \
  |  |  ------------------
  |  |  |  |  437|      0|#define PR_TRUE 1
  |  |  ------------------
  |  | 2965|      0|        crv = sftk_doSub##mmm(context);                                                       \
  |  | 2966|      0|        if (crv != CKR_OK)                                                                    \
  |  |  ------------------
  |  |  |  | 1388|      0|#define CKR_OK 0x00000000UL
  |  |  ------------------
  |  |  |  Branch (2966:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 2967|      0|            break;                                                                            \
  |  | 2968|      0|        if (pMechanism->ulParameterLen != sizeof(CK_RSA_PKCS_PSS_PARAMS)) {                   \
  |  |  ------------------
  |  |  |  Branch (2968:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 2969|      0|            crv = CKR_MECHANISM_PARAM_INVALID;                                                \
  |  |  ------------------
  |  |  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  |  |  ------------------
  |  | 2970|      0|            break;                                                                            \
  |  | 2971|      0|        }                                                                                     \
  |  | 2972|      0|        if (((const CK_RSA_PKCS_PSS_PARAMS *)pMechanism->pParameter)->hashAlg != CKM_##mmm) { \
  |  |  ------------------
  |  |  |  Branch (2972:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 2973|      0|            crv = CKR_MECHANISM_PARAM_INVALID;                                                \
  |  |  ------------------
  |  |  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  |  |  ------------------
  |  | 2974|      0|            break;                                                                            \
  |  | 2975|      0|        }                                                                                     \
  |  | 2976|      0|        goto finish_rsa_pss;
  ------------------
 2978|      0|            INIT_RSA_PSS_SIG_MECH(SHA224)
  ------------------
  |  | 2963|      0|    case CKM_##mmm##_RSA_PKCS_PSS:                                                            \
  |  |  ------------------
  |  |  |  Branch (2963:5): [True: 0, False: 55.0k]
  |  |  ------------------
  |  | 2964|      0|        context->multi = PR_TRUE;                                                             \
  |  |  ------------------
  |  |  |  |  437|      0|#define PR_TRUE 1
  |  |  ------------------
  |  | 2965|      0|        crv = sftk_doSub##mmm(context);                                                       \
  |  | 2966|      0|        if (crv != CKR_OK)                                                                    \
  |  |  ------------------
  |  |  |  | 1388|      0|#define CKR_OK 0x00000000UL
  |  |  ------------------
  |  |  |  Branch (2966:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 2967|      0|            break;                                                                            \
  |  | 2968|      0|        if (pMechanism->ulParameterLen != sizeof(CK_RSA_PKCS_PSS_PARAMS)) {                   \
  |  |  ------------------
  |  |  |  Branch (2968:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 2969|      0|            crv = CKR_MECHANISM_PARAM_INVALID;                                                \
  |  |  ------------------
  |  |  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  |  |  ------------------
  |  | 2970|      0|            break;                                                                            \
  |  | 2971|      0|        }                                                                                     \
  |  | 2972|      0|        if (((const CK_RSA_PKCS_PSS_PARAMS *)pMechanism->pParameter)->hashAlg != CKM_##mmm) { \
  |  |  ------------------
  |  |  |  Branch (2972:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 2973|      0|            crv = CKR_MECHANISM_PARAM_INVALID;                                                \
  |  |  ------------------
  |  |  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  |  |  ------------------
  |  | 2974|      0|            break;                                                                            \
  |  | 2975|      0|        }                                                                                     \
  |  | 2976|      0|        goto finish_rsa_pss;
  ------------------
 2979|      0|            INIT_RSA_PSS_SIG_MECH(SHA256)
  ------------------
  |  | 2963|      0|    case CKM_##mmm##_RSA_PKCS_PSS:                                                            \
  |  |  ------------------
  |  |  |  Branch (2963:5): [True: 0, False: 55.0k]
  |  |  ------------------
  |  | 2964|      0|        context->multi = PR_TRUE;                                                             \
  |  |  ------------------
  |  |  |  |  437|      0|#define PR_TRUE 1
  |  |  ------------------
  |  | 2965|      0|        crv = sftk_doSub##mmm(context);                                                       \
  |  | 2966|      0|        if (crv != CKR_OK)                                                                    \
  |  |  ------------------
  |  |  |  | 1388|      0|#define CKR_OK 0x00000000UL
  |  |  ------------------
  |  |  |  Branch (2966:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 2967|      0|            break;                                                                            \
  |  | 2968|      0|        if (pMechanism->ulParameterLen != sizeof(CK_RSA_PKCS_PSS_PARAMS)) {                   \
  |  |  ------------------
  |  |  |  Branch (2968:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 2969|      0|            crv = CKR_MECHANISM_PARAM_INVALID;                                                \
  |  |  ------------------
  |  |  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  |  |  ------------------
  |  | 2970|      0|            break;                                                                            \
  |  | 2971|      0|        }                                                                                     \
  |  | 2972|      0|        if (((const CK_RSA_PKCS_PSS_PARAMS *)pMechanism->pParameter)->hashAlg != CKM_##mmm) { \
  |  |  ------------------
  |  |  |  Branch (2972:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 2973|      0|            crv = CKR_MECHANISM_PARAM_INVALID;                                                \
  |  |  ------------------
  |  |  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  |  |  ------------------
  |  | 2974|      0|            break;                                                                            \
  |  | 2975|      0|        }                                                                                     \
  |  | 2976|      0|        goto finish_rsa_pss;
  ------------------
 2980|      0|            INIT_RSA_PSS_SIG_MECH(SHA384)
  ------------------
  |  | 2963|      0|    case CKM_##mmm##_RSA_PKCS_PSS:                                                            \
  |  |  ------------------
  |  |  |  Branch (2963:5): [True: 0, False: 55.0k]
  |  |  ------------------
  |  | 2964|      0|        context->multi = PR_TRUE;                                                             \
  |  |  ------------------
  |  |  |  |  437|      0|#define PR_TRUE 1
  |  |  ------------------
  |  | 2965|      0|        crv = sftk_doSub##mmm(context);                                                       \
  |  | 2966|      0|        if (crv != CKR_OK)                                                                    \
  |  |  ------------------
  |  |  |  | 1388|      0|#define CKR_OK 0x00000000UL
  |  |  ------------------
  |  |  |  Branch (2966:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 2967|      0|            break;                                                                            \
  |  | 2968|      0|        if (pMechanism->ulParameterLen != sizeof(CK_RSA_PKCS_PSS_PARAMS)) {                   \
  |  |  ------------------
  |  |  |  Branch (2968:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 2969|      0|            crv = CKR_MECHANISM_PARAM_INVALID;                                                \
  |  |  ------------------
  |  |  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  |  |  ------------------
  |  | 2970|      0|            break;                                                                            \
  |  | 2971|      0|        }                                                                                     \
  |  | 2972|      0|        if (((const CK_RSA_PKCS_PSS_PARAMS *)pMechanism->pParameter)->hashAlg != CKM_##mmm) { \
  |  |  ------------------
  |  |  |  Branch (2972:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 2973|      0|            crv = CKR_MECHANISM_PARAM_INVALID;                                                \
  |  |  ------------------
  |  |  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  |  |  ------------------
  |  | 2974|      0|            break;                                                                            \
  |  | 2975|      0|        }                                                                                     \
  |  | 2976|      0|        goto finish_rsa_pss;
  ------------------
 2981|      0|            INIT_RSA_PSS_SIG_MECH(SHA512)
  ------------------
  |  | 2963|      0|    case CKM_##mmm##_RSA_PKCS_PSS:                                                            \
  |  |  ------------------
  |  |  |  Branch (2963:5): [True: 0, False: 55.0k]
  |  |  ------------------
  |  | 2964|      0|        context->multi = PR_TRUE;                                                             \
  |  |  ------------------
  |  |  |  |  437|      0|#define PR_TRUE 1
  |  |  ------------------
  |  | 2965|      0|        crv = sftk_doSub##mmm(context);                                                       \
  |  | 2966|      0|        if (crv != CKR_OK)                                                                    \
  |  |  ------------------
  |  |  |  | 1388|      0|#define CKR_OK 0x00000000UL
  |  |  ------------------
  |  |  |  Branch (2966:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 2967|      0|            break;                                                                            \
  |  | 2968|      0|        if (pMechanism->ulParameterLen != sizeof(CK_RSA_PKCS_PSS_PARAMS)) {                   \
  |  |  ------------------
  |  |  |  Branch (2968:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 2969|      0|            crv = CKR_MECHANISM_PARAM_INVALID;                                                \
  |  |  ------------------
  |  |  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  |  |  ------------------
  |  | 2970|      0|            break;                                                                            \
  |  | 2971|      0|        }                                                                                     \
  |  | 2972|      0|        if (((const CK_RSA_PKCS_PSS_PARAMS *)pMechanism->pParameter)->hashAlg != CKM_##mmm) { \
  |  |  ------------------
  |  |  |  Branch (2972:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 2973|      0|            crv = CKR_MECHANISM_PARAM_INVALID;                                                \
  |  |  ------------------
  |  |  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  |  |  ------------------
  |  | 2974|      0|            break;                                                                            \
  |  | 2975|      0|        }                                                                                     \
  |  | 2976|      0|        goto finish_rsa_pss;
  ------------------
 2982|      0|        case CKM_RSA_PKCS_PSS:
  ------------------
  |  |  741|      0|#define CKM_RSA_PKCS_PSS 0x0000000DUL
  ------------------
  |  Branch (2982:9): [True: 0, False: 55.0k]
  ------------------
 2983|      0|        finish_rsa_pss:
 2984|      0|            if (key_type != CKK_RSA) {
  ------------------
  |  |  372|      0|#define CKK_RSA 0x00000000UL
  ------------------
  |  Branch (2984:17): [True: 0, False: 0]
  ------------------
 2985|      0|                crv = CKR_KEY_TYPE_INCONSISTENT;
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
 2986|      0|                break;
 2987|      0|            }
 2988|      0|            context->rsa = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 2989|      0|            if (pMechanism->ulParameterLen != sizeof(CK_RSA_PKCS_PSS_PARAMS) ||
  ------------------
  |  Branch (2989:17): [True: 0, False: 0]
  ------------------
 2990|      0|                !sftk_ValidatePssParams((const CK_RSA_PKCS_PSS_PARAMS *)pMechanism->pParameter)) {
  ------------------
  |  Branch (2990:17): [True: 0, False: 0]
  ------------------
 2991|      0|                crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 2992|      0|                break;
 2993|      0|            }
 2994|      0|            pinfo = PORT_New(SFTKPSSSignInfo);
  ------------------
  |  |  151|      0|#define PORT_New(type) (type *)PORT_Alloc(sizeof(type))
  |  |  ------------------
  |  |  |  |   52|      0|#define PORT_Alloc PORT_Alloc_Util
  |  |  ------------------
  ------------------
 2995|      0|            if (pinfo == NULL) {
  ------------------
  |  Branch (2995:17): [True: 0, False: 0]
  ------------------
 2996|      0|                crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 2997|      0|                break;
 2998|      0|            }
 2999|      0|            pinfo->size = sizeof(SFTKPSSSignInfo);
 3000|      0|            pinfo->params = *(CK_RSA_PKCS_PSS_PARAMS *)pMechanism->pParameter;
 3001|      0|            pinfo->key = sftk_GetPrivKey(key, CKK_RSA, &crv);
  ------------------
  |  |  372|      0|#define CKK_RSA 0x00000000UL
  ------------------
 3002|      0|            if (pinfo->key == NULL) {
  ------------------
  |  Branch (3002:17): [True: 0, False: 0]
  ------------------
 3003|      0|                crv = CKR_KEY_TYPE_INCONSISTENT;
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
 3004|      0|                break;
 3005|      0|            }
 3006|      0|            context->cipherInfo = pinfo;
 3007|      0|            context->destroy = sftk_ZSpace;
 3008|      0|            context->update = sftk_RSASignPSS;
 3009|      0|            context->maxLen = nsslowkey_PrivateModulusLen(pinfo->key);
 3010|      0|            break;
 3011|       |
 3012|      0|#define INIT_DSA_SIG_MECH(mmm)          \
 3013|      0|    case CKM_DSA_##mmm:                 \
 3014|      0|        context->multi = PR_TRUE;       \
 3015|      0|        crv = sftk_doSub##mmm(context); \
 3016|      0|        if (crv != CKR_OK)              \
 3017|      0|            break;                      \
 3018|      0|        goto finish_dsa;
 3019|      0|            INIT_DSA_SIG_MECH(SHA1)
  ------------------
  |  | 3013|      0|    case CKM_DSA_##mmm:                 \
  |  |  ------------------
  |  |  |  Branch (3013:5): [True: 0, False: 55.0k]
  |  |  ------------------
  |  | 3014|      0|        context->multi = PR_TRUE;       \
  |  |  ------------------
  |  |  |  |  437|      0|#define PR_TRUE 1
  |  |  ------------------
  |  | 3015|      0|        crv = sftk_doSub##mmm(context); \
  |  | 3016|      0|        if (crv != CKR_OK)              \
  |  |  ------------------
  |  |  |  | 1388|      0|#define CKR_OK 0x00000000UL
  |  |  ------------------
  |  |  |  Branch (3016:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3017|      0|            break;                      \
  |  | 3018|      0|        goto finish_dsa;
  ------------------
 3020|      0|            INIT_DSA_SIG_MECH(SHA224)
  ------------------
  |  | 3013|      0|    case CKM_DSA_##mmm:                 \
  |  |  ------------------
  |  |  |  Branch (3013:5): [True: 0, False: 55.0k]
  |  |  ------------------
  |  | 3014|      0|        context->multi = PR_TRUE;       \
  |  |  ------------------
  |  |  |  |  437|      0|#define PR_TRUE 1
  |  |  ------------------
  |  | 3015|      0|        crv = sftk_doSub##mmm(context); \
  |  | 3016|      0|        if (crv != CKR_OK)              \
  |  |  ------------------
  |  |  |  | 1388|      0|#define CKR_OK 0x00000000UL
  |  |  ------------------
  |  |  |  Branch (3016:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3017|      0|            break;                      \
  |  | 3018|      0|        goto finish_dsa;
  ------------------
 3021|      0|            INIT_DSA_SIG_MECH(SHA256)
  ------------------
  |  | 3013|      0|    case CKM_DSA_##mmm:                 \
  |  |  ------------------
  |  |  |  Branch (3013:5): [True: 0, False: 55.0k]
  |  |  ------------------
  |  | 3014|      0|        context->multi = PR_TRUE;       \
  |  |  ------------------
  |  |  |  |  437|      0|#define PR_TRUE 1
  |  |  ------------------
  |  | 3015|      0|        crv = sftk_doSub##mmm(context); \
  |  | 3016|      0|        if (crv != CKR_OK)              \
  |  |  ------------------
  |  |  |  | 1388|      0|#define CKR_OK 0x00000000UL
  |  |  ------------------
  |  |  |  Branch (3016:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3017|      0|            break;                      \
  |  | 3018|      0|        goto finish_dsa;
  ------------------
 3022|      0|            INIT_DSA_SIG_MECH(SHA384)
  ------------------
  |  | 3013|      0|    case CKM_DSA_##mmm:                 \
  |  |  ------------------
  |  |  |  Branch (3013:5): [True: 0, False: 55.0k]
  |  |  ------------------
  |  | 3014|      0|        context->multi = PR_TRUE;       \
  |  |  ------------------
  |  |  |  |  437|      0|#define PR_TRUE 1
  |  |  ------------------
  |  | 3015|      0|        crv = sftk_doSub##mmm(context); \
  |  | 3016|      0|        if (crv != CKR_OK)              \
  |  |  ------------------
  |  |  |  | 1388|      0|#define CKR_OK 0x00000000UL
  |  |  ------------------
  |  |  |  Branch (3016:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3017|      0|            break;                      \
  |  | 3018|      0|        goto finish_dsa;
  ------------------
 3023|      0|            INIT_DSA_SIG_MECH(SHA512)
  ------------------
  |  | 3013|      0|    case CKM_DSA_##mmm:                 \
  |  |  ------------------
  |  |  |  Branch (3013:5): [True: 0, False: 55.0k]
  |  |  ------------------
  |  | 3014|      0|        context->multi = PR_TRUE;       \
  |  |  ------------------
  |  |  |  |  437|      0|#define PR_TRUE 1
  |  |  ------------------
  |  | 3015|      0|        crv = sftk_doSub##mmm(context); \
  |  | 3016|      0|        if (crv != CKR_OK)              \
  |  |  ------------------
  |  |  |  | 1388|      0|#define CKR_OK 0x00000000UL
  |  |  ------------------
  |  |  |  Branch (3016:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3017|      0|            break;                      \
  |  | 3018|      0|        goto finish_dsa;
  ------------------
 3024|      0|        case CKM_DSA:
  ------------------
  |  |  745|      0|#define CKM_DSA 0x00000011UL
  ------------------
  |  Branch (3024:9): [True: 0, False: 55.0k]
  ------------------
 3025|      0|        finish_dsa:
 3026|      0|            if (key_type != CKK_DSA) {
  ------------------
  |  |  373|      0|#define CKK_DSA 0x00000001UL
  ------------------
  |  Branch (3026:17): [True: 0, False: 0]
  ------------------
 3027|      0|                crv = CKR_KEY_TYPE_INCONSISTENT;
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
 3028|      0|                break;
 3029|      0|            }
 3030|      0|            privKey = sftk_GetPrivKey(key, CKK_DSA, &crv);
  ------------------
  |  |  373|      0|#define CKK_DSA 0x00000001UL
  ------------------
 3031|      0|            if (privKey == NULL) {
  ------------------
  |  Branch (3031:17): [True: 0, False: 0]
  ------------------
 3032|      0|                break;
 3033|      0|            }
 3034|      0|            context->cipherInfo = privKey;
 3035|      0|            context->update = nsc_DSA_Sign_Stub;
 3036|      0|            context->destroy = (privKey == key->objectInfo) ? sftk_Null : sftk_FreePrivKey;
  ------------------
  |  Branch (3036:32): [True: 0, False: 0]
  ------------------
 3037|      0|            context->maxLen = DSA_MAX_SIGNATURE_LEN;
  ------------------
  |  |   52|      0|#define DSA_MAX_SIGNATURE_LEN (DSA_MAX_SUBPRIME_LEN * 2) /* Bytes */
  |  |  ------------------
  |  |  |  |   51|      0|#define DSA_MAX_SUBPRIME_LEN 32                          /* Bytes */
  |  |  ------------------
  ------------------
 3038|       |
 3039|      0|            break;
 3040|       |
 3041|      0|#define INIT_ECDSA_SIG_MECH(mmm)        \
 3042|      0|    case CKM_ECDSA_##mmm:               \
 3043|      0|        context->multi = PR_TRUE;       \
 3044|      0|        crv = sftk_doSub##mmm(context); \
 3045|      0|        if (crv != CKR_OK)              \
 3046|      0|            break;                      \
 3047|      0|        goto finish_ecdsa;
 3048|      0|            INIT_ECDSA_SIG_MECH(SHA1)
  ------------------
  |  | 3042|      0|    case CKM_ECDSA_##mmm:               \
  |  |  ------------------
  |  |  |  Branch (3042:5): [True: 0, False: 55.0k]
  |  |  ------------------
  |  | 3043|      0|        context->multi = PR_TRUE;       \
  |  |  ------------------
  |  |  |  |  437|      0|#define PR_TRUE 1
  |  |  ------------------
  |  | 3044|      0|        crv = sftk_doSub##mmm(context); \
  |  | 3045|      0|        if (crv != CKR_OK)              \
  |  |  ------------------
  |  |  |  | 1388|      0|#define CKR_OK 0x00000000UL
  |  |  ------------------
  |  |  |  Branch (3045:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3046|      0|            break;                      \
  |  | 3047|      0|        goto finish_ecdsa;
  ------------------
 3049|      0|            INIT_ECDSA_SIG_MECH(SHA224)
  ------------------
  |  | 3042|      0|    case CKM_ECDSA_##mmm:               \
  |  |  ------------------
  |  |  |  Branch (3042:5): [True: 0, False: 55.0k]
  |  |  ------------------
  |  | 3043|      0|        context->multi = PR_TRUE;       \
  |  |  ------------------
  |  |  |  |  437|      0|#define PR_TRUE 1
  |  |  ------------------
  |  | 3044|      0|        crv = sftk_doSub##mmm(context); \
  |  | 3045|      0|        if (crv != CKR_OK)              \
  |  |  ------------------
  |  |  |  | 1388|      0|#define CKR_OK 0x00000000UL
  |  |  ------------------
  |  |  |  Branch (3045:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3046|      0|            break;                      \
  |  | 3047|      0|        goto finish_ecdsa;
  ------------------
 3050|      0|            INIT_ECDSA_SIG_MECH(SHA256)
  ------------------
  |  | 3042|      0|    case CKM_ECDSA_##mmm:               \
  |  |  ------------------
  |  |  |  Branch (3042:5): [True: 0, False: 55.0k]
  |  |  ------------------
  |  | 3043|      0|        context->multi = PR_TRUE;       \
  |  |  ------------------
  |  |  |  |  437|      0|#define PR_TRUE 1
  |  |  ------------------
  |  | 3044|      0|        crv = sftk_doSub##mmm(context); \
  |  | 3045|      0|        if (crv != CKR_OK)              \
  |  |  ------------------
  |  |  |  | 1388|      0|#define CKR_OK 0x00000000UL
  |  |  ------------------
  |  |  |  Branch (3045:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3046|      0|            break;                      \
  |  | 3047|      0|        goto finish_ecdsa;
  ------------------
 3051|      0|            INIT_ECDSA_SIG_MECH(SHA384)
  ------------------
  |  | 3042|      0|    case CKM_ECDSA_##mmm:               \
  |  |  ------------------
  |  |  |  Branch (3042:5): [True: 0, False: 55.0k]
  |  |  ------------------
  |  | 3043|      0|        context->multi = PR_TRUE;       \
  |  |  ------------------
  |  |  |  |  437|      0|#define PR_TRUE 1
  |  |  ------------------
  |  | 3044|      0|        crv = sftk_doSub##mmm(context); \
  |  | 3045|      0|        if (crv != CKR_OK)              \
  |  |  ------------------
  |  |  |  | 1388|      0|#define CKR_OK 0x00000000UL
  |  |  ------------------
  |  |  |  Branch (3045:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3046|      0|            break;                      \
  |  | 3047|      0|        goto finish_ecdsa;
  ------------------
 3052|      0|            INIT_ECDSA_SIG_MECH(SHA512)
  ------------------
  |  | 3042|      0|    case CKM_ECDSA_##mmm:               \
  |  |  ------------------
  |  |  |  Branch (3042:5): [True: 0, False: 55.0k]
  |  |  ------------------
  |  | 3043|      0|        context->multi = PR_TRUE;       \
  |  |  ------------------
  |  |  |  |  437|      0|#define PR_TRUE 1
  |  |  ------------------
  |  | 3044|      0|        crv = sftk_doSub##mmm(context); \
  |  | 3045|      0|        if (crv != CKR_OK)              \
  |  |  ------------------
  |  |  |  | 1388|      0|#define CKR_OK 0x00000000UL
  |  |  ------------------
  |  |  |  Branch (3045:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3046|      0|            break;                      \
  |  | 3047|      0|        goto finish_ecdsa;
  ------------------
 3053|      0|        case CKM_ECDSA:
  ------------------
  |  | 1074|      0|#define CKM_ECDSA 0x00001041UL
  ------------------
  |  Branch (3053:9): [True: 0, False: 55.0k]
  ------------------
 3054|      0|        finish_ecdsa:
 3055|      0|            if (key_type != CKK_EC) {
  ------------------
  |  |  379|      0|#define CKK_EC 0x00000003UL
  ------------------
  |  Branch (3055:17): [True: 0, False: 0]
  ------------------
 3056|      0|                crv = CKR_KEY_TYPE_INCONSISTENT;
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
 3057|      0|                break;
 3058|      0|            }
 3059|      0|            privKey = sftk_GetPrivKey(key, CKK_EC, &crv);
  ------------------
  |  |  379|      0|#define CKK_EC 0x00000003UL
  ------------------
 3060|      0|            if (privKey == NULL) {
  ------------------
  |  Branch (3060:17): [True: 0, False: 0]
  ------------------
 3061|      0|                crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 3062|      0|                break;
 3063|      0|            }
 3064|      0|            context->cipherInfo = privKey;
 3065|      0|            context->update = nsc_ECDSASignStub;
 3066|      0|            context->destroy = (privKey == key->objectInfo) ? sftk_Null : sftk_FreePrivKey;
  ------------------
  |  Branch (3066:32): [True: 0, False: 0]
  ------------------
 3067|      0|            context->maxLen = MAX_ECKEY_LEN * 2;
  ------------------
  |  |   81|      0|#define MAX_ECKEY_LEN 72 /* Bytes */
  ------------------
 3068|       |
 3069|      0|            break;
 3070|       |
 3071|      0|        case CKM_EDDSA:
  ------------------
  |  | 1174|      0|#define CKM_EDDSA 0x00001057UL
  ------------------
  |  Branch (3071:9): [True: 0, False: 55.0k]
  ------------------
 3072|      0|            if (key_type != CKK_EC_EDWARDS) {
  ------------------
  |  |  448|      0|#define CKK_EC_EDWARDS 0x00000040UL
  ------------------
  |  Branch (3072:17): [True: 0, False: 0]
  ------------------
 3073|      0|                crv = CKR_KEY_TYPE_INCONSISTENT;
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
 3074|      0|                break;
 3075|      0|            }
 3076|       |
 3077|      0|            if (pMechanism->pParameter) {
  ------------------
  |  Branch (3077:17): [True: 0, False: 0]
  ------------------
 3078|      0|                crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 3079|      0|                break;
 3080|      0|            }
 3081|       |
 3082|      0|            privKey = sftk_GetPrivKey(key, CKK_EC_EDWARDS, &crv);
  ------------------
  |  |  448|      0|#define CKK_EC_EDWARDS 0x00000040UL
  ------------------
 3083|      0|            if (privKey == NULL) {
  ------------------
  |  Branch (3083:17): [True: 0, False: 0]
  ------------------
 3084|      0|                crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 3085|      0|                break;
 3086|      0|            }
 3087|      0|            context->cipherInfo = privKey;
 3088|      0|            context->update = nsc_EDDSASignStub;
 3089|      0|            context->destroy = (privKey == key->objectInfo) ? sftk_Null : sftk_FreePrivKey;
  ------------------
  |  Branch (3089:32): [True: 0, False: 0]
  ------------------
 3090|      0|            context->maxLen = MAX_ECKEY_LEN * 2;
  ------------------
  |  |   81|      0|#define MAX_ECKEY_LEN 72 /* Bytes */
  ------------------
 3091|       |
 3092|      0|            break;
 3093|       |
 3094|      0|#define INIT_HMAC_MECH(mmm)                                        \
 3095|      0|    case CKM_##mmm##_HMAC_GENERAL:                                 \
 3096|      0|        PORT_Assert(pMechanism->pParameter);                       \
 3097|      0|        if (!pMechanism->pParameter) {                             \
 3098|      0|            crv = CKR_MECHANISM_PARAM_INVALID;                     \
 3099|      0|            break;                                                 \
 3100|      0|        }                                                          \
 3101|      0|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
 3102|      0|                             *(CK_ULONG *)pMechanism->pParameter); \
 3103|      0|        break;                                                     \
 3104|      0|    case CKM_##mmm##_HMAC:                                         \
 3105|      0|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
 3106|      0|                             mmm##_LENGTH);                        \
 3107|      0|        break;
 3108|       |
 3109|      0|            INIT_HMAC_MECH(MD2)
  ------------------
  |  | 3095|      0|    case CKM_##mmm##_HMAC_GENERAL:                                 \
  |  |  ------------------
  |  |  |  Branch (3095:5): [True: 0, False: 55.0k]
  |  |  ------------------
  |  | 3096|      0|        PORT_Assert(pMechanism->pParameter);                       \
  |  |  ------------------
  |  |  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 3097|      0|        if (!pMechanism->pParameter) {                             \
  |  |  ------------------
  |  |  |  Branch (3097:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3098|      0|            crv = CKR_MECHANISM_PARAM_INVALID;                     \
  |  |  ------------------
  |  |  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  |  |  ------------------
  |  | 3099|      0|            break;                                                 \
  |  | 3100|      0|        }                                                          \
  |  | 3101|      0|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
  |  | 3102|      0|                             *(CK_ULONG *)pMechanism->pParameter); \
  |  | 3103|      0|        break;                                                     \
  |  | 3104|      0|    case CKM_##mmm##_HMAC:                                         \
  |  |  ------------------
  |  |  |  Branch (3104:5): [True: 0, False: 55.0k]
  |  |  ------------------
  |  | 3105|      0|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
  |  | 3106|      0|                             mmm##_LENGTH);                        \
  |  | 3107|      0|        break;
  ------------------
 3110|      0|            INIT_HMAC_MECH(MD5)
  ------------------
  |  | 3095|      0|    case CKM_##mmm##_HMAC_GENERAL:                                 \
  |  |  ------------------
  |  |  |  Branch (3095:5): [True: 0, False: 55.0k]
  |  |  ------------------
  |  | 3096|      0|        PORT_Assert(pMechanism->pParameter);                       \
  |  |  ------------------
  |  |  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 3097|      0|        if (!pMechanism->pParameter) {                             \
  |  |  ------------------
  |  |  |  Branch (3097:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3098|      0|            crv = CKR_MECHANISM_PARAM_INVALID;                     \
  |  |  ------------------
  |  |  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  |  |  ------------------
  |  | 3099|      0|            break;                                                 \
  |  | 3100|      0|        }                                                          \
  |  | 3101|      0|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
  |  | 3102|      0|                             *(CK_ULONG *)pMechanism->pParameter); \
  |  | 3103|      0|        break;                                                     \
  |  | 3104|  34.0k|    case CKM_##mmm##_HMAC:                                         \
  |  |  ------------------
  |  |  |  Branch (3104:5): [True: 34.0k, False: 20.9k]
  |  |  ------------------
  |  | 3105|  34.0k|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
  |  | 3106|  34.0k|                             mmm##_LENGTH);                        \
  |  | 3107|  34.0k|        break;
  ------------------
 3111|      0|            INIT_HMAC_MECH(SHA1)
  ------------------
  |  | 3095|      0|    case CKM_##mmm##_HMAC_GENERAL:                                 \
  |  |  ------------------
  |  |  |  Branch (3095:5): [True: 0, False: 55.0k]
  |  |  ------------------
  |  | 3096|      0|        PORT_Assert(pMechanism->pParameter);                       \
  |  |  ------------------
  |  |  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 3097|      0|        if (!pMechanism->pParameter) {                             \
  |  |  ------------------
  |  |  |  Branch (3097:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3098|      0|            crv = CKR_MECHANISM_PARAM_INVALID;                     \
  |  |  ------------------
  |  |  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  |  |  ------------------
  |  | 3099|      0|            break;                                                 \
  |  | 3100|      0|        }                                                          \
  |  | 3101|      0|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
  |  | 3102|      0|                             *(CK_ULONG *)pMechanism->pParameter); \
  |  | 3103|      0|        break;                                                     \
  |  | 3104|  3.91k|    case CKM_##mmm##_HMAC:                                         \
  |  |  ------------------
  |  |  |  Branch (3104:5): [True: 3.91k, False: 51.1k]
  |  |  ------------------
  |  | 3105|  3.91k|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
  |  | 3106|  3.91k|                             mmm##_LENGTH);                        \
  |  | 3107|  3.91k|        break;
  ------------------
 3112|      0|            INIT_HMAC_MECH(SHA224)
  ------------------
  |  | 3095|      0|    case CKM_##mmm##_HMAC_GENERAL:                                 \
  |  |  ------------------
  |  |  |  Branch (3095:5): [True: 0, False: 55.0k]
  |  |  ------------------
  |  | 3096|      0|        PORT_Assert(pMechanism->pParameter);                       \
  |  |  ------------------
  |  |  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 3097|      0|        if (!pMechanism->pParameter) {                             \
  |  |  ------------------
  |  |  |  Branch (3097:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3098|      0|            crv = CKR_MECHANISM_PARAM_INVALID;                     \
  |  |  ------------------
  |  |  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  |  |  ------------------
  |  | 3099|      0|            break;                                                 \
  |  | 3100|      0|        }                                                          \
  |  | 3101|      0|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
  |  | 3102|      0|                             *(CK_ULONG *)pMechanism->pParameter); \
  |  | 3103|      0|        break;                                                     \
  |  | 3104|      0|    case CKM_##mmm##_HMAC:                                         \
  |  |  ------------------
  |  |  |  Branch (3104:5): [True: 0, False: 55.0k]
  |  |  ------------------
  |  | 3105|      0|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
  |  | 3106|      0|                             mmm##_LENGTH);                        \
  |  | 3107|      0|        break;
  ------------------
 3113|      0|            INIT_HMAC_MECH(SHA256)
  ------------------
  |  | 3095|      0|    case CKM_##mmm##_HMAC_GENERAL:                                 \
  |  |  ------------------
  |  |  |  Branch (3095:5): [True: 0, False: 55.0k]
  |  |  ------------------
  |  | 3096|      0|        PORT_Assert(pMechanism->pParameter);                       \
  |  |  ------------------
  |  |  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 3097|      0|        if (!pMechanism->pParameter) {                             \
  |  |  ------------------
  |  |  |  Branch (3097:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3098|      0|            crv = CKR_MECHANISM_PARAM_INVALID;                     \
  |  |  ------------------
  |  |  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  |  |  ------------------
  |  | 3099|      0|            break;                                                 \
  |  | 3100|      0|        }                                                          \
  |  | 3101|      0|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
  |  | 3102|      0|                             *(CK_ULONG *)pMechanism->pParameter); \
  |  | 3103|      0|        break;                                                     \
  |  | 3104|  3.39k|    case CKM_##mmm##_HMAC:                                         \
  |  |  ------------------
  |  |  |  Branch (3104:5): [True: 3.39k, False: 51.6k]
  |  |  ------------------
  |  | 3105|  3.39k|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
  |  | 3106|  3.39k|                             mmm##_LENGTH);                        \
  |  | 3107|  3.39k|        break;
  ------------------
 3114|      0|            INIT_HMAC_MECH(SHA384)
  ------------------
  |  | 3095|      0|    case CKM_##mmm##_HMAC_GENERAL:                                 \
  |  |  ------------------
  |  |  |  Branch (3095:5): [True: 0, False: 55.0k]
  |  |  ------------------
  |  | 3096|      0|        PORT_Assert(pMechanism->pParameter);                       \
  |  |  ------------------
  |  |  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 3097|      0|        if (!pMechanism->pParameter) {                             \
  |  |  ------------------
  |  |  |  Branch (3097:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3098|      0|            crv = CKR_MECHANISM_PARAM_INVALID;                     \
  |  |  ------------------
  |  |  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  |  |  ------------------
  |  | 3099|      0|            break;                                                 \
  |  | 3100|      0|        }                                                          \
  |  | 3101|      0|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
  |  | 3102|      0|                             *(CK_ULONG *)pMechanism->pParameter); \
  |  | 3103|      0|        break;                                                     \
  |  | 3104|  3.03k|    case CKM_##mmm##_HMAC:                                         \
  |  |  ------------------
  |  |  |  Branch (3104:5): [True: 3.03k, False: 51.9k]
  |  |  ------------------
  |  | 3105|  3.03k|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
  |  | 3106|  3.03k|                             mmm##_LENGTH);                        \
  |  | 3107|  3.03k|        break;
  ------------------
 3115|      0|            INIT_HMAC_MECH(SHA512)
  ------------------
  |  | 3095|      0|    case CKM_##mmm##_HMAC_GENERAL:                                 \
  |  |  ------------------
  |  |  |  Branch (3095:5): [True: 0, False: 55.0k]
  |  |  ------------------
  |  | 3096|      0|        PORT_Assert(pMechanism->pParameter);                       \
  |  |  ------------------
  |  |  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 3097|      0|        if (!pMechanism->pParameter) {                             \
  |  |  ------------------
  |  |  |  Branch (3097:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3098|      0|            crv = CKR_MECHANISM_PARAM_INVALID;                     \
  |  |  ------------------
  |  |  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  |  |  ------------------
  |  | 3099|      0|            break;                                                 \
  |  | 3100|      0|        }                                                          \
  |  | 3101|      0|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
  |  | 3102|      0|                             *(CK_ULONG *)pMechanism->pParameter); \
  |  | 3103|      0|        break;                                                     \
  |  | 3104|      0|    case CKM_##mmm##_HMAC:                                         \
  |  |  ------------------
  |  |  |  Branch (3104:5): [True: 0, False: 55.0k]
  |  |  ------------------
  |  | 3105|      0|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
  |  | 3106|      0|                             mmm##_LENGTH);                        \
  |  | 3107|      0|        break;
  ------------------
 3116|      0|            INIT_HMAC_MECH(SHA3_224)
  ------------------
  |  | 3095|      0|    case CKM_##mmm##_HMAC_GENERAL:                                 \
  |  |  ------------------
  |  |  |  Branch (3095:5): [True: 0, False: 55.0k]
  |  |  ------------------
  |  | 3096|      0|        PORT_Assert(pMechanism->pParameter);                       \
  |  |  ------------------
  |  |  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 3097|      0|        if (!pMechanism->pParameter) {                             \
  |  |  ------------------
  |  |  |  Branch (3097:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3098|      0|            crv = CKR_MECHANISM_PARAM_INVALID;                     \
  |  |  ------------------
  |  |  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  |  |  ------------------
  |  | 3099|      0|            break;                                                 \
  |  | 3100|      0|        }                                                          \
  |  | 3101|      0|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
  |  | 3102|      0|                             *(CK_ULONG *)pMechanism->pParameter); \
  |  | 3103|      0|        break;                                                     \
  |  | 3104|      0|    case CKM_##mmm##_HMAC:                                         \
  |  |  ------------------
  |  |  |  Branch (3104:5): [True: 0, False: 55.0k]
  |  |  ------------------
  |  | 3105|      0|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
  |  | 3106|      0|                             mmm##_LENGTH);                        \
  |  | 3107|      0|        break;
  ------------------
 3117|      0|            INIT_HMAC_MECH(SHA3_256)
  ------------------
  |  | 3095|      0|    case CKM_##mmm##_HMAC_GENERAL:                                 \
  |  |  ------------------
  |  |  |  Branch (3095:5): [True: 0, False: 55.0k]
  |  |  ------------------
  |  | 3096|      0|        PORT_Assert(pMechanism->pParameter);                       \
  |  |  ------------------
  |  |  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 3097|      0|        if (!pMechanism->pParameter) {                             \
  |  |  ------------------
  |  |  |  Branch (3097:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3098|      0|            crv = CKR_MECHANISM_PARAM_INVALID;                     \
  |  |  ------------------
  |  |  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  |  |  ------------------
  |  | 3099|      0|            break;                                                 \
  |  | 3100|      0|        }                                                          \
  |  | 3101|      0|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
  |  | 3102|      0|                             *(CK_ULONG *)pMechanism->pParameter); \
  |  | 3103|      0|        break;                                                     \
  |  | 3104|      0|    case CKM_##mmm##_HMAC:                                         \
  |  |  ------------------
  |  |  |  Branch (3104:5): [True: 0, False: 55.0k]
  |  |  ------------------
  |  | 3105|      0|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
  |  | 3106|      0|                             mmm##_LENGTH);                        \
  |  | 3107|      0|        break;
  ------------------
 3118|      0|            INIT_HMAC_MECH(SHA3_384)
  ------------------
  |  | 3095|      0|    case CKM_##mmm##_HMAC_GENERAL:                                 \
  |  |  ------------------
  |  |  |  Branch (3095:5): [True: 0, False: 55.0k]
  |  |  ------------------
  |  | 3096|      0|        PORT_Assert(pMechanism->pParameter);                       \
  |  |  ------------------
  |  |  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 3097|      0|        if (!pMechanism->pParameter) {                             \
  |  |  ------------------
  |  |  |  Branch (3097:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3098|      0|            crv = CKR_MECHANISM_PARAM_INVALID;                     \
  |  |  ------------------
  |  |  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  |  |  ------------------
  |  | 3099|      0|            break;                                                 \
  |  | 3100|      0|        }                                                          \
  |  | 3101|      0|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
  |  | 3102|      0|                             *(CK_ULONG *)pMechanism->pParameter); \
  |  | 3103|      0|        break;                                                     \
  |  | 3104|      0|    case CKM_##mmm##_HMAC:                                         \
  |  |  ------------------
  |  |  |  Branch (3104:5): [True: 0, False: 55.0k]
  |  |  ------------------
  |  | 3105|      0|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
  |  | 3106|      0|                             mmm##_LENGTH);                        \
  |  | 3107|      0|        break;
  ------------------
 3119|      0|            INIT_HMAC_MECH(SHA3_512)
  ------------------
  |  | 3095|      0|    case CKM_##mmm##_HMAC_GENERAL:                                 \
  |  |  ------------------
  |  |  |  Branch (3095:5): [True: 0, False: 55.0k]
  |  |  ------------------
  |  | 3096|      0|        PORT_Assert(pMechanism->pParameter);                       \
  |  |  ------------------
  |  |  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 3097|      0|        if (!pMechanism->pParameter) {                             \
  |  |  ------------------
  |  |  |  Branch (3097:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3098|      0|            crv = CKR_MECHANISM_PARAM_INVALID;                     \
  |  |  ------------------
  |  |  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  |  |  ------------------
  |  | 3099|      0|            break;                                                 \
  |  | 3100|      0|        }                                                          \
  |  | 3101|      0|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
  |  | 3102|      0|                             *(CK_ULONG *)pMechanism->pParameter); \
  |  | 3103|      0|        break;                                                     \
  |  | 3104|      0|    case CKM_##mmm##_HMAC:                                         \
  |  |  ------------------
  |  |  |  Branch (3104:5): [True: 0, False: 55.0k]
  |  |  ------------------
  |  | 3105|      0|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
  |  | 3106|      0|                             mmm##_LENGTH);                        \
  |  | 3107|      0|        break;
  ------------------
 3120|       |
 3121|      0|        case CKM_AES_CMAC_GENERAL:
  ------------------
  |  | 1120|      0|#define CKM_AES_CMAC_GENERAL 0x0000108BUL
  ------------------
  |  Branch (3121:9): [True: 0, False: 55.0k]
  ------------------
 3122|      0|            PORT_Assert(pMechanism->pParameter);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3123|      0|            if (!pMechanism->pParameter || pMechanism->ulParameterLen != sizeof(CK_MAC_GENERAL_PARAMS)) {
  ------------------
  |  Branch (3123:17): [True: 0, False: 0]
  |  Branch (3123:44): [True: 0, False: 0]
  ------------------
 3124|      0|                crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 3125|      0|                break;
 3126|      0|            }
 3127|      0|            crv = sftk_doMACInit(pMechanism->mechanism, context, key, *(CK_ULONG *)pMechanism->pParameter);
 3128|      0|            break;
 3129|      0|        case CKM_AES_CMAC:
  ------------------
  |  | 1119|      0|#define CKM_AES_CMAC 0x0000108AUL
  ------------------
  |  Branch (3129:9): [True: 0, False: 55.0k]
  ------------------
 3130|      0|            crv = sftk_doMACInit(pMechanism->mechanism, context, key, AES_BLOCK_SIZE);
  ------------------
  |  |  130|      0|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
 3131|      0|            break;
 3132|      0|        case CKM_SSL3_MD5_MAC:
  ------------------
  |  |  975|      0|#define CKM_SSL3_MD5_MAC 0x00000380UL
  ------------------
  |  Branch (3132:9): [True: 0, False: 55.0k]
  ------------------
 3133|      0|            PORT_Assert(pMechanism->pParameter);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3134|      0|            if (!pMechanism->pParameter) {
  ------------------
  |  Branch (3134:17): [True: 0, False: 0]
  ------------------
 3135|      0|                crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 3136|      0|                break;
 3137|      0|            }
 3138|      0|            crv = sftk_doSSLMACInit(context, SEC_OID_MD5, key,
 3139|      0|                                    *(CK_ULONG *)pMechanism->pParameter);
 3140|      0|            break;
 3141|      0|        case CKM_SSL3_SHA1_MAC:
  ------------------
  |  |  976|      0|#define CKM_SSL3_SHA1_MAC 0x00000381UL
  ------------------
  |  Branch (3141:9): [True: 0, False: 55.0k]
  ------------------
 3142|      0|            PORT_Assert(pMechanism->pParameter);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3143|      0|            if (!pMechanism->pParameter) {
  ------------------
  |  Branch (3143:17): [True: 0, False: 0]
  ------------------
 3144|      0|                crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 3145|      0|                break;
 3146|      0|            }
 3147|      0|            crv = sftk_doSSLMACInit(context, SEC_OID_SHA1, key,
 3148|      0|                                    *(CK_ULONG *)pMechanism->pParameter);
 3149|      0|            break;
 3150|      0|        case CKM_TLS_PRF_GENERAL:
  ------------------
  |  |  297|      0|#define CKM_TLS_PRF_GENERAL 0x80000373UL
  ------------------
  |  Branch (3150:9): [True: 0, False: 55.0k]
  ------------------
 3151|      0|            crv = sftk_TLSPRFInit(context, key, key_type, HASH_AlgNULL, 0);
 3152|      0|            break;
 3153|  1.62k|        case CKM_TLS_MAC: {
  ------------------
  |  | 1032|  1.62k|#define CKM_TLS_MAC 0x000003E4UL
  ------------------
  |  Branch (3153:9): [True: 1.62k, False: 53.3k]
  ------------------
 3154|  1.62k|            CK_TLS_MAC_PARAMS *tls12_mac_params;
 3155|  1.62k|            HASH_HashType tlsPrfHash;
 3156|  1.62k|            const char *label;
 3157|       |
 3158|  1.62k|            if (pMechanism->ulParameterLen != sizeof(CK_TLS_MAC_PARAMS)) {
  ------------------
  |  Branch (3158:17): [True: 0, False: 1.62k]
  ------------------
 3159|      0|                crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 3160|      0|                break;
 3161|      0|            }
 3162|  1.62k|            tls12_mac_params = (CK_TLS_MAC_PARAMS *)pMechanism->pParameter;
 3163|  1.62k|            if (tls12_mac_params->prfHashMechanism == CKM_TLS_PRF) {
  ------------------
  |  |  973|  1.62k|#define CKM_TLS_PRF 0x00000378UL
  ------------------
  |  Branch (3163:17): [True: 66, False: 1.55k]
  ------------------
 3164|       |                /* The TLS 1.0 and 1.1 PRF */
 3165|     66|                tlsPrfHash = HASH_AlgNULL;
 3166|     66|                if (tls12_mac_params->ulMacLength != 12) {
  ------------------
  |  Branch (3166:21): [True: 0, False: 66]
  ------------------
 3167|      0|                    crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 3168|      0|                    break;
 3169|      0|                }
 3170|  1.55k|            } else {
 3171|       |                /* The hash function for the TLS 1.2 PRF */
 3172|  1.55k|                tlsPrfHash =
 3173|  1.55k|                    sftk_GetHashTypeFromMechanism(tls12_mac_params->prfHashMechanism);
 3174|  1.55k|                if (tlsPrfHash == HASH_AlgNULL ||
  ------------------
  |  Branch (3174:21): [True: 0, False: 1.55k]
  ------------------
 3175|  1.55k|                    tls12_mac_params->ulMacLength < 12) {
  ------------------
  |  Branch (3175:21): [True: 0, False: 1.55k]
  ------------------
 3176|      0|                    crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 3177|      0|                    break;
 3178|      0|                }
 3179|  1.55k|            }
 3180|  1.62k|            if (tls12_mac_params->ulServerOrClient == 1) {
  ------------------
  |  Branch (3180:17): [True: 0, False: 1.62k]
  ------------------
 3181|      0|                label = "server finished";
 3182|  1.62k|            } else if (tls12_mac_params->ulServerOrClient == 2) {
  ------------------
  |  Branch (3182:24): [True: 1.62k, False: 0]
  ------------------
 3183|  1.62k|                label = "client finished";
 3184|  1.62k|            } else {
 3185|      0|                crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 3186|      0|                break;
 3187|      0|            }
 3188|  1.62k|            crv = sftk_TLSPRFInit(context, key, key_type, tlsPrfHash,
 3189|  1.62k|                                  tls12_mac_params->ulMacLength);
 3190|  1.62k|            if (crv == CKR_OK) {
  ------------------
  |  | 1388|  1.62k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (3190:17): [True: 1.62k, False: 0]
  ------------------
 3191|  1.62k|                context->hashUpdate(context->hashInfo, (unsigned char *)label, 15);
 3192|  1.62k|            }
 3193|  1.62k|            break;
 3194|  1.62k|        }
 3195|      0|        case CKM_NSS_TLS_PRF_GENERAL_SHA256:
  ------------------
  |  |  233|      0|#define CKM_NSS_TLS_PRF_GENERAL_SHA256 (CKM_NSS + 21)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (3195:9): [True: 0, False: 55.0k]
  ------------------
 3196|      0|            crv = sftk_TLSPRFInit(context, key, key_type, HASH_AlgSHA256, 0);
 3197|      0|            break;
 3198|       |
 3199|  8.99k|        case CKM_NSS_HMAC_CONSTANT_TIME: {
  ------------------
  |  |  229|  8.99k|#define CKM_NSS_HMAC_CONSTANT_TIME (CKM_NSS + 19)
  |  |  ------------------
  |  |  |  |  162|  8.99k|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|  8.99k|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  8.99k|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (3199:9): [True: 8.99k, False: 46.0k]
  ------------------
 3200|  8.99k|            sftk_MACConstantTimeCtx *ctx =
 3201|  8.99k|                sftk_HMACConstantTime_New(pMechanism, key);
 3202|  8.99k|            CK_ULONG *intpointer;
 3203|       |
 3204|  8.99k|            if (ctx == NULL) {
  ------------------
  |  Branch (3204:17): [True: 0, False: 8.99k]
  ------------------
 3205|      0|                crv = CKR_ARGUMENTS_BAD;
  ------------------
  |  | 1401|      0|#define CKR_ARGUMENTS_BAD 0x00000007UL
  ------------------
 3206|      0|                break;
 3207|      0|            }
 3208|  8.99k|            intpointer = PORT_New(CK_ULONG);
  ------------------
  |  |  151|  8.99k|#define PORT_New(type) (type *)PORT_Alloc(sizeof(type))
  |  |  ------------------
  |  |  |  |   52|  8.99k|#define PORT_Alloc PORT_Alloc_Util
  |  |  ------------------
  ------------------
 3209|  8.99k|            if (intpointer == NULL) {
  ------------------
  |  Branch (3209:17): [True: 0, False: 8.99k]
  ------------------
 3210|      0|                PORT_Free(ctx);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 3211|      0|                crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 3212|      0|                break;
 3213|      0|            }
 3214|  8.99k|            *intpointer = ctx->hash->length;
 3215|       |
 3216|  8.99k|            context->cipherInfo = intpointer;
 3217|  8.99k|            context->hashInfo = ctx;
 3218|  8.99k|            context->currentMech = pMechanism->mechanism;
 3219|  8.99k|            context->hashUpdate = sftk_HMACConstantTime_Update;
 3220|  8.99k|            context->hashdestroy = sftk_MACConstantTime_DestroyContext;
 3221|  8.99k|            context->end = sftk_MACConstantTime_EndHash;
 3222|  8.99k|            context->update = sftk_SignCopy;
 3223|  8.99k|            context->destroy = sftk_Space;
 3224|  8.99k|            context->maxLen = 64;
 3225|  8.99k|            context->multi = PR_TRUE;
  ------------------
  |  |  437|  8.99k|#define PR_TRUE 1
  ------------------
 3226|  8.99k|            break;
 3227|  8.99k|        }
 3228|       |
 3229|      0|        case CKM_NSS_SSL3_MAC_CONSTANT_TIME: {
  ------------------
  |  |  230|      0|#define CKM_NSS_SSL3_MAC_CONSTANT_TIME (CKM_NSS + 20)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (3229:9): [True: 0, False: 55.0k]
  ------------------
 3230|      0|            sftk_MACConstantTimeCtx *ctx =
 3231|      0|                sftk_SSLv3MACConstantTime_New(pMechanism, key);
 3232|      0|            CK_ULONG *intpointer;
 3233|       |
 3234|      0|            if (ctx == NULL) {
  ------------------
  |  Branch (3234:17): [True: 0, False: 0]
  ------------------
 3235|      0|                crv = CKR_ARGUMENTS_BAD;
  ------------------
  |  | 1401|      0|#define CKR_ARGUMENTS_BAD 0x00000007UL
  ------------------
 3236|      0|                break;
 3237|      0|            }
 3238|      0|            intpointer = PORT_New(CK_ULONG);
  ------------------
  |  |  151|      0|#define PORT_New(type) (type *)PORT_Alloc(sizeof(type))
  |  |  ------------------
  |  |  |  |   52|      0|#define PORT_Alloc PORT_Alloc_Util
  |  |  ------------------
  ------------------
 3239|      0|            if (intpointer == NULL) {
  ------------------
  |  Branch (3239:17): [True: 0, False: 0]
  ------------------
 3240|      0|                PORT_Free(ctx);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 3241|      0|                crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 3242|      0|                break;
 3243|      0|            }
 3244|      0|            *intpointer = ctx->hash->length;
 3245|       |
 3246|      0|            context->cipherInfo = intpointer;
 3247|      0|            context->hashInfo = ctx;
 3248|      0|            context->currentMech = pMechanism->mechanism;
 3249|      0|            context->hashUpdate = sftk_SSLv3MACConstantTime_Update;
 3250|      0|            context->hashdestroy = sftk_MACConstantTime_DestroyContext;
 3251|      0|            context->end = sftk_MACConstantTime_EndHash;
 3252|      0|            context->update = sftk_SignCopy;
 3253|      0|            context->destroy = sftk_Space;
 3254|      0|            context->maxLen = 64;
 3255|      0|            context->multi = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 3256|      0|            break;
 3257|      0|        }
 3258|       |
 3259|      0|        default:
  ------------------
  |  Branch (3259:9): [True: 0, False: 55.0k]
  ------------------
 3260|      0|            crv = CKR_MECHANISM_INVALID;
  ------------------
  |  | 1447|      0|#define CKR_MECHANISM_INVALID 0x00000070UL
  ------------------
 3261|      0|            break;
 3262|  55.0k|    }
 3263|       |
 3264|  55.0k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  55.0k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (3264:9): [True: 0, False: 55.0k]
  ------------------
 3265|      0|        if (info)
  ------------------
  |  Branch (3265:13): [True: 0, False: 0]
  ------------------
 3266|      0|            PORT_Free(info);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 3267|      0|        if (pinfo)
  ------------------
  |  Branch (3267:13): [True: 0, False: 0]
  ------------------
 3268|      0|            PORT_ZFree(pinfo, pinfo->size);
  ------------------
  |  |   75|      0|#define PORT_ZFree PORT_ZFree_Util
  ------------------
 3269|      0|        sftk_FreeContext(context);
 3270|      0|        sftk_FreeSession(session);
 3271|      0|        return crv;
 3272|      0|    }
 3273|  55.0k|    sftk_SetContextByType(session, SFTK_SIGN, context);
 3274|  55.0k|    sftk_FreeSession(session);
 3275|  55.0k|    return CKR_OK;
  ------------------
  |  | 1388|  55.0k|#define CKR_OK 0x00000000UL
  ------------------
 3276|  55.0k|}
NSC_SignUpdate:
 3394|  84.7k|{
 3395|  84.7k|    CHECK_FORK();
 3396|  84.7k|    return sftk_MACUpdate(hSession, pPart, ulPartLen, SFTK_SIGN);
 3397|  84.7k|}
NSC_SignFinal:
 3460|  90.5k|{
 3461|  90.5k|    SFTKSession *session;
 3462|  90.5k|    SFTKSessionContext *context;
 3463|  90.5k|    unsigned int outlen;
 3464|  90.5k|    unsigned int maxoutlen = *pulSignatureLen;
 3465|  90.5k|    CK_RV crv;
 3466|       |
 3467|  90.5k|    CHECK_FORK();
 3468|       |
 3469|       |    /* make sure we're legal */
 3470|  90.5k|    crv = sftk_GetContext(hSession, &context, SFTK_SIGN, PR_TRUE, &session);
  ------------------
  |  |  437|  90.5k|#define PR_TRUE 1
  ------------------
 3471|  90.5k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  90.5k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (3471:9): [True: 36.8k, False: 53.7k]
  ------------------
 3472|  36.8k|        return crv;
 3473|       |
 3474|  53.7k|    if (context->hashInfo) {
  ------------------
  |  Branch (3474:9): [True: 53.7k, False: 0]
  ------------------
 3475|  53.7k|        unsigned int digestLen;
 3476|  53.7k|        unsigned char tmpbuf[SFTK_MAX_MAC_LENGTH];
 3477|       |
 3478|  53.7k|        if (!pSignature) {
  ------------------
  |  Branch (3478:13): [True: 0, False: 53.7k]
  ------------------
 3479|      0|            outlen = context->maxLen;
 3480|      0|            goto finish;
 3481|      0|        }
 3482|  53.7k|        (*context->end)(context->hashInfo, tmpbuf, &digestLen, sizeof(tmpbuf));
 3483|  53.7k|        if (SECSuccess != (context->update)(context->cipherInfo, pSignature,
  ------------------
  |  Branch (3483:13): [True: 0, False: 53.7k]
  ------------------
 3484|  53.7k|                                            &outlen, maxoutlen, tmpbuf, digestLen))
 3485|      0|            crv = sftk_MapCryptError(PORT_GetError());
  ------------------
  |  |   62|      0|#define PORT_GetError PORT_GetError_Util
  ------------------
 3486|       |        /* CKR_BUFFER_TOO_SMALL here isn't continuable, let operation terminate.
 3487|       |         * Keeping "too small" CK_RV intact is a standard violation, but allows
 3488|       |         * application read EXACT signature length */
 3489|  53.7k|        PORT_Memset(tmpbuf, 0, sizeof tmpbuf);
  ------------------
  |  |  182|  53.7k|#define PORT_Memset memset
  ------------------
 3490|  53.7k|    } else {
 3491|       |        /* must be block cipher MACing */
 3492|      0|        outlen = context->macSize;
 3493|       |        /* null or "too small" buf doesn't terminate operation [PKCS#11,v2.11]*/
 3494|      0|        if (!pSignature || maxoutlen < outlen) {
  ------------------
  |  Branch (3494:13): [True: 0, False: 0]
  |  Branch (3494:28): [True: 0, False: 0]
  ------------------
 3495|      0|            if (pSignature)
  ------------------
  |  Branch (3495:17): [True: 0, False: 0]
  ------------------
 3496|      0|                crv = CKR_BUFFER_TOO_SMALL;
  ------------------
  |  | 1514|      0|#define CKR_BUFFER_TOO_SMALL 0x00000150UL
  ------------------
 3497|      0|            goto finish;
 3498|      0|        }
 3499|      0|        if (CKR_OK == (crv = sftk_MACFinal(context)))
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (3499:13): [True: 0, False: 0]
  ------------------
 3500|      0|            PORT_Memcpy(pSignature, context->macBuf, outlen);
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
 3501|      0|    }
 3502|       |
 3503|  53.7k|    sftk_TerminateOp(session, SFTK_SIGN, context);
 3504|  53.7k|finish:
 3505|  53.7k|    *pulSignatureLen = outlen;
 3506|  53.7k|    sftk_FreeSession(session);
 3507|  53.7k|    return crv;
 3508|  53.7k|}
NSC_Sign:
 3517|  8.99k|{
 3518|  8.99k|    SFTKSession *session;
 3519|  8.99k|    SFTKSessionContext *context;
 3520|  8.99k|    CK_RV crv;
 3521|       |
 3522|  8.99k|    CHECK_FORK();
 3523|       |
 3524|       |    /* make sure we're legal */
 3525|  8.99k|    crv = sftk_GetContext(hSession, &context, SFTK_SIGN, PR_FALSE, &session);
  ------------------
  |  |  438|  8.99k|#define PR_FALSE 0
  ------------------
 3526|  8.99k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  8.99k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (3526:9): [True: 0, False: 8.99k]
  ------------------
 3527|      0|        return crv;
 3528|       |
 3529|  8.99k|    if (!pSignature) {
  ------------------
  |  Branch (3529:9): [True: 0, False: 8.99k]
  ------------------
 3530|       |        /* see also how C_SignUpdate implements this */
 3531|      0|        *pulSignatureLen = (!context->multi || context->hashInfo)
  ------------------
  |  Branch (3531:29): [True: 0, False: 0]
  |  Branch (3531:48): [True: 0, False: 0]
  ------------------
 3532|      0|                               ? context->maxLen
 3533|      0|                               : context->macSize; /* must be block cipher MACing */
 3534|      0|        goto finish;
 3535|      0|    }
 3536|       |
 3537|       |    /* multi part Signing are completely implemented by SignUpdate and
 3538|       |     * sign Final */
 3539|  8.99k|    if (context->multi) {
  ------------------
  |  Branch (3539:9): [True: 8.99k, False: 0]
  ------------------
 3540|       |        /* SignFinal can't follow failed SignUpdate */
 3541|  8.99k|        if (CKR_OK == (crv = NSC_SignUpdate(hSession, pData, ulDataLen)))
  ------------------
  |  | 1388|  8.99k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (3541:13): [True: 8.99k, False: 0]
  ------------------
 3542|  8.99k|            crv = NSC_SignFinal(hSession, pSignature, pulSignatureLen);
 3543|  8.99k|    } else {
 3544|       |        /* single-part PKC signature (e.g. CKM_ECDSA) */
 3545|      0|        unsigned int outlen;
 3546|      0|        unsigned int maxoutlen = *pulSignatureLen;
 3547|      0|        if (SECSuccess != (*context->update)(context->cipherInfo, pSignature,
  ------------------
  |  Branch (3547:13): [True: 0, False: 0]
  ------------------
 3548|      0|                                             &outlen, maxoutlen, pData, ulDataLen))
 3549|      0|            crv = sftk_MapCryptError(PORT_GetError());
  ------------------
  |  |   62|      0|#define PORT_GetError PORT_GetError_Util
  ------------------
 3550|      0|        *pulSignatureLen = (CK_ULONG)outlen;
 3551|       |        /*  "too small" here is certainly continuable */
 3552|      0|        if (crv != CKR_BUFFER_TOO_SMALL)
  ------------------
  |  | 1514|      0|#define CKR_BUFFER_TOO_SMALL 0x00000150UL
  ------------------
  |  Branch (3552:13): [True: 0, False: 0]
  ------------------
 3553|      0|            sftk_TerminateOp(session, SFTK_SIGN, context);
 3554|      0|    } /* single-part */
 3555|       |
 3556|  8.99k|finish:
 3557|  8.99k|    sftk_FreeSession(session);
 3558|  8.99k|    return crv;
 3559|  8.99k|}
NSC_VerifyInit:
 3715|  2.41k|{
 3716|  2.41k|    SFTKSession *session;
 3717|  2.41k|    SFTKObject *key;
 3718|  2.41k|    SFTKSessionContext *context;
 3719|  2.41k|    CK_KEY_TYPE key_type;
 3720|  2.41k|    CK_RV crv = CKR_OK;
  ------------------
  |  | 1388|  2.41k|#define CKR_OK 0x00000000UL
  ------------------
 3721|  2.41k|    NSSLOWKEYPublicKey *pubKey;
 3722|  2.41k|    SFTKHashVerifyInfo *info = NULL;
 3723|  2.41k|    SFTKPSSVerifyInfo *pinfo = NULL;
 3724|       |
 3725|  2.41k|    CHECK_FORK();
 3726|       |
 3727|       |    /* Block Cipher MACing Algorithms use a different Context init method..*/
 3728|  2.41k|    crv = sftk_InitCBCMac(hSession, pMechanism, hKey, CKA_VERIFY, SFTK_VERIFY);
  ------------------
  |  |  553|  2.41k|#define CKA_VERIFY 0x0000010AUL
  ------------------
 3729|  2.41k|    if (crv != CKR_FUNCTION_NOT_SUPPORTED)
  ------------------
  |  | 1426|  2.41k|#define CKR_FUNCTION_NOT_SUPPORTED 0x00000054UL
  ------------------
  |  Branch (3729:9): [True: 0, False: 2.41k]
  ------------------
 3730|      0|        return crv;
 3731|       |
 3732|  2.41k|    session = sftk_SessionFromHandle(hSession);
 3733|  2.41k|    if (session == NULL)
  ------------------
  |  Branch (3733:9): [True: 0, False: 2.41k]
  ------------------
 3734|      0|        return CKR_SESSION_HANDLE_INVALID;
  ------------------
  |  | 1465|      0|#define CKR_SESSION_HANDLE_INVALID 0x000000B3UL
  ------------------
 3735|  2.41k|    crv = sftk_InitGeneric(session, pMechanism, &context, SFTK_VERIFY, &key,
 3736|  2.41k|                           hKey, &key_type, CKO_PUBLIC_KEY, CKA_VERIFY);
  ------------------
  |  |  327|  2.41k|#define CKO_PUBLIC_KEY 0x00000002UL
  ------------------
                                         hKey, &key_type, CKO_PUBLIC_KEY, CKA_VERIFY);
  ------------------
  |  |  553|  2.41k|#define CKA_VERIFY 0x0000010AUL
  ------------------
 3737|  2.41k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  2.41k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (3737:9): [True: 0, False: 2.41k]
  ------------------
 3738|      0|        sftk_FreeSession(session);
 3739|      0|        return crv;
 3740|      0|    }
 3741|       |
 3742|  2.41k|    context->multi = PR_FALSE;
  ------------------
  |  |  438|  2.41k|#define PR_FALSE 0
  ------------------
 3743|       |
 3744|  2.41k|#define INIT_RSA_VFY_MECH(mmm)                \
 3745|  2.41k|    case CKM_##mmm##_RSA_PKCS:                \
 3746|  2.41k|        context->multi = PR_TRUE;             \
 3747|  2.41k|        crv = sftk_doSub##mmm(context);       \
 3748|  2.41k|        if (crv != CKR_OK)                    \
 3749|  2.41k|            break;                            \
 3750|  2.41k|        context->verify = sftk_hashCheckSign; \
 3751|  2.41k|        info = PORT_New(SFTKHashVerifyInfo);  \
 3752|  2.41k|        if (info == NULL) {                   \
 3753|  2.41k|            crv = CKR_HOST_MEMORY;            \
 3754|  2.41k|            break;                            \
 3755|  2.41k|        }                                     \
 3756|  2.41k|        info->hashOid = SEC_OID_##mmm;        \
 3757|  2.41k|        goto finish_rsa;
 3758|       |
 3759|  2.41k|    switch (pMechanism->mechanism) {
 3760|      0|        INIT_RSA_VFY_MECH(MD5)
  ------------------
  |  | 3745|      0|    case CKM_##mmm##_RSA_PKCS:                \
  |  |  ------------------
  |  |  |  Branch (3745:5): [True: 0, False: 2.41k]
  |  |  ------------------
  |  | 3746|      0|        context->multi = PR_TRUE;             \
  |  |  ------------------
  |  |  |  |  437|      0|#define PR_TRUE 1
  |  |  ------------------
  |  | 3747|      0|        crv = sftk_doSub##mmm(context);       \
  |  | 3748|      0|        if (crv != CKR_OK)                    \
  |  |  ------------------
  |  |  |  | 1388|      0|#define CKR_OK 0x00000000UL
  |  |  ------------------
  |  |  |  Branch (3748:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3749|      0|            break;                            \
  |  | 3750|      0|        context->verify = sftk_hashCheckSign; \
  |  | 3751|      0|        info = PORT_New(SFTKHashVerifyInfo);  \
  |  |  ------------------
  |  |  |  |  151|      0|#define PORT_New(type) (type *)PORT_Alloc(sizeof(type))
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define PORT_Alloc PORT_Alloc_Util
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 3752|      0|        if (info == NULL) {                   \
  |  |  ------------------
  |  |  |  Branch (3752:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3753|      0|            crv = CKR_HOST_MEMORY;            \
  |  |  ------------------
  |  |  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  |  |  ------------------
  |  | 3754|      0|            break;                            \
  |  | 3755|      0|        }                                     \
  |  | 3756|      0|        info->hashOid = SEC_OID_##mmm;        \
  |  | 3757|      0|        goto finish_rsa;
  ------------------
 3761|      0|        INIT_RSA_VFY_MECH(MD2)
  ------------------
  |  | 3745|      0|    case CKM_##mmm##_RSA_PKCS:                \
  |  |  ------------------
  |  |  |  Branch (3745:5): [True: 0, False: 2.41k]
  |  |  ------------------
  |  | 3746|      0|        context->multi = PR_TRUE;             \
  |  |  ------------------
  |  |  |  |  437|      0|#define PR_TRUE 1
  |  |  ------------------
  |  | 3747|      0|        crv = sftk_doSub##mmm(context);       \
  |  | 3748|      0|        if (crv != CKR_OK)                    \
  |  |  ------------------
  |  |  |  | 1388|      0|#define CKR_OK 0x00000000UL
  |  |  ------------------
  |  |  |  Branch (3748:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3749|      0|            break;                            \
  |  | 3750|      0|        context->verify = sftk_hashCheckSign; \
  |  | 3751|      0|        info = PORT_New(SFTKHashVerifyInfo);  \
  |  |  ------------------
  |  |  |  |  151|      0|#define PORT_New(type) (type *)PORT_Alloc(sizeof(type))
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define PORT_Alloc PORT_Alloc_Util
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 3752|      0|        if (info == NULL) {                   \
  |  |  ------------------
  |  |  |  Branch (3752:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3753|      0|            crv = CKR_HOST_MEMORY;            \
  |  |  ------------------
  |  |  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  |  |  ------------------
  |  | 3754|      0|            break;                            \
  |  | 3755|      0|        }                                     \
  |  | 3756|      0|        info->hashOid = SEC_OID_##mmm;        \
  |  | 3757|      0|        goto finish_rsa;
  ------------------
 3762|      0|        INIT_RSA_VFY_MECH(SHA1)
  ------------------
  |  | 3745|      0|    case CKM_##mmm##_RSA_PKCS:                \
  |  |  ------------------
  |  |  |  Branch (3745:5): [True: 0, False: 2.41k]
  |  |  ------------------
  |  | 3746|      0|        context->multi = PR_TRUE;             \
  |  |  ------------------
  |  |  |  |  437|      0|#define PR_TRUE 1
  |  |  ------------------
  |  | 3747|      0|        crv = sftk_doSub##mmm(context);       \
  |  | 3748|      0|        if (crv != CKR_OK)                    \
  |  |  ------------------
  |  |  |  | 1388|      0|#define CKR_OK 0x00000000UL
  |  |  ------------------
  |  |  |  Branch (3748:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3749|      0|            break;                            \
  |  | 3750|      0|        context->verify = sftk_hashCheckSign; \
  |  | 3751|      0|        info = PORT_New(SFTKHashVerifyInfo);  \
  |  |  ------------------
  |  |  |  |  151|      0|#define PORT_New(type) (type *)PORT_Alloc(sizeof(type))
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define PORT_Alloc PORT_Alloc_Util
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 3752|      0|        if (info == NULL) {                   \
  |  |  ------------------
  |  |  |  Branch (3752:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3753|      0|            crv = CKR_HOST_MEMORY;            \
  |  |  ------------------
  |  |  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  |  |  ------------------
  |  | 3754|      0|            break;                            \
  |  | 3755|      0|        }                                     \
  |  | 3756|      0|        info->hashOid = SEC_OID_##mmm;        \
  |  | 3757|      0|        goto finish_rsa;
  ------------------
 3763|      0|        INIT_RSA_VFY_MECH(SHA224)
  ------------------
  |  | 3745|      0|    case CKM_##mmm##_RSA_PKCS:                \
  |  |  ------------------
  |  |  |  Branch (3745:5): [True: 0, False: 2.41k]
  |  |  ------------------
  |  | 3746|      0|        context->multi = PR_TRUE;             \
  |  |  ------------------
  |  |  |  |  437|      0|#define PR_TRUE 1
  |  |  ------------------
  |  | 3747|      0|        crv = sftk_doSub##mmm(context);       \
  |  | 3748|      0|        if (crv != CKR_OK)                    \
  |  |  ------------------
  |  |  |  | 1388|      0|#define CKR_OK 0x00000000UL
  |  |  ------------------
  |  |  |  Branch (3748:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3749|      0|            break;                            \
  |  | 3750|      0|        context->verify = sftk_hashCheckSign; \
  |  | 3751|      0|        info = PORT_New(SFTKHashVerifyInfo);  \
  |  |  ------------------
  |  |  |  |  151|      0|#define PORT_New(type) (type *)PORT_Alloc(sizeof(type))
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define PORT_Alloc PORT_Alloc_Util
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 3752|      0|        if (info == NULL) {                   \
  |  |  ------------------
  |  |  |  Branch (3752:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3753|      0|            crv = CKR_HOST_MEMORY;            \
  |  |  ------------------
  |  |  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  |  |  ------------------
  |  | 3754|      0|            break;                            \
  |  | 3755|      0|        }                                     \
  |  | 3756|      0|        info->hashOid = SEC_OID_##mmm;        \
  |  | 3757|      0|        goto finish_rsa;
  ------------------
 3764|      0|        INIT_RSA_VFY_MECH(SHA256)
  ------------------
  |  | 3745|      0|    case CKM_##mmm##_RSA_PKCS:                \
  |  |  ------------------
  |  |  |  Branch (3745:5): [True: 0, False: 2.41k]
  |  |  ------------------
  |  | 3746|      0|        context->multi = PR_TRUE;             \
  |  |  ------------------
  |  |  |  |  437|      0|#define PR_TRUE 1
  |  |  ------------------
  |  | 3747|      0|        crv = sftk_doSub##mmm(context);       \
  |  | 3748|      0|        if (crv != CKR_OK)                    \
  |  |  ------------------
  |  |  |  | 1388|      0|#define CKR_OK 0x00000000UL
  |  |  ------------------
  |  |  |  Branch (3748:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3749|      0|            break;                            \
  |  | 3750|      0|        context->verify = sftk_hashCheckSign; \
  |  | 3751|      0|        info = PORT_New(SFTKHashVerifyInfo);  \
  |  |  ------------------
  |  |  |  |  151|      0|#define PORT_New(type) (type *)PORT_Alloc(sizeof(type))
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define PORT_Alloc PORT_Alloc_Util
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 3752|      0|        if (info == NULL) {                   \
  |  |  ------------------
  |  |  |  Branch (3752:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3753|      0|            crv = CKR_HOST_MEMORY;            \
  |  |  ------------------
  |  |  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  |  |  ------------------
  |  | 3754|      0|            break;                            \
  |  | 3755|      0|        }                                     \
  |  | 3756|      0|        info->hashOid = SEC_OID_##mmm;        \
  |  | 3757|      0|        goto finish_rsa;
  ------------------
 3765|      0|        INIT_RSA_VFY_MECH(SHA384)
  ------------------
  |  | 3745|      0|    case CKM_##mmm##_RSA_PKCS:                \
  |  |  ------------------
  |  |  |  Branch (3745:5): [True: 0, False: 2.41k]
  |  |  ------------------
  |  | 3746|      0|        context->multi = PR_TRUE;             \
  |  |  ------------------
  |  |  |  |  437|      0|#define PR_TRUE 1
  |  |  ------------------
  |  | 3747|      0|        crv = sftk_doSub##mmm(context);       \
  |  | 3748|      0|        if (crv != CKR_OK)                    \
  |  |  ------------------
  |  |  |  | 1388|      0|#define CKR_OK 0x00000000UL
  |  |  ------------------
  |  |  |  Branch (3748:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3749|      0|            break;                            \
  |  | 3750|      0|        context->verify = sftk_hashCheckSign; \
  |  | 3751|      0|        info = PORT_New(SFTKHashVerifyInfo);  \
  |  |  ------------------
  |  |  |  |  151|      0|#define PORT_New(type) (type *)PORT_Alloc(sizeof(type))
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define PORT_Alloc PORT_Alloc_Util
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 3752|      0|        if (info == NULL) {                   \
  |  |  ------------------
  |  |  |  Branch (3752:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3753|      0|            crv = CKR_HOST_MEMORY;            \
  |  |  ------------------
  |  |  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  |  |  ------------------
  |  | 3754|      0|            break;                            \
  |  | 3755|      0|        }                                     \
  |  | 3756|      0|        info->hashOid = SEC_OID_##mmm;        \
  |  | 3757|      0|        goto finish_rsa;
  ------------------
 3766|      0|        INIT_RSA_VFY_MECH(SHA512)
  ------------------
  |  | 3745|      0|    case CKM_##mmm##_RSA_PKCS:                \
  |  |  ------------------
  |  |  |  Branch (3745:5): [True: 0, False: 2.41k]
  |  |  ------------------
  |  | 3746|      0|        context->multi = PR_TRUE;             \
  |  |  ------------------
  |  |  |  |  437|      0|#define PR_TRUE 1
  |  |  ------------------
  |  | 3747|      0|        crv = sftk_doSub##mmm(context);       \
  |  | 3748|      0|        if (crv != CKR_OK)                    \
  |  |  ------------------
  |  |  |  | 1388|      0|#define CKR_OK 0x00000000UL
  |  |  ------------------
  |  |  |  Branch (3748:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3749|      0|            break;                            \
  |  | 3750|      0|        context->verify = sftk_hashCheckSign; \
  |  | 3751|      0|        info = PORT_New(SFTKHashVerifyInfo);  \
  |  |  ------------------
  |  |  |  |  151|      0|#define PORT_New(type) (type *)PORT_Alloc(sizeof(type))
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define PORT_Alloc PORT_Alloc_Util
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 3752|      0|        if (info == NULL) {                   \
  |  |  ------------------
  |  |  |  Branch (3752:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3753|      0|            crv = CKR_HOST_MEMORY;            \
  |  |  ------------------
  |  |  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  |  |  ------------------
  |  | 3754|      0|            break;                            \
  |  | 3755|      0|        }                                     \
  |  | 3756|      0|        info->hashOid = SEC_OID_##mmm;        \
  |  | 3757|      0|        goto finish_rsa;
  ------------------
 3767|       |
 3768|     26|        case CKM_RSA_PKCS:
  ------------------
  |  |  720|     26|#define CKM_RSA_PKCS 0x00000001UL
  ------------------
  |  Branch (3768:9): [True: 26, False: 2.38k]
  ------------------
 3769|     26|            context->verify = sftk_RSACheckSign;
 3770|     26|            goto finish_rsa;
 3771|      0|        case CKM_RSA_X_509:
  ------------------
  |  |  722|      0|#define CKM_RSA_X_509 0x00000003UL
  ------------------
  |  Branch (3771:9): [True: 0, False: 2.41k]
  ------------------
 3772|      0|            context->verify = sftk_RSACheckSignRaw;
 3773|     26|        finish_rsa:
 3774|     26|            if (key_type != CKK_RSA) {
  ------------------
  |  |  372|     26|#define CKK_RSA 0x00000000UL
  ------------------
  |  Branch (3774:17): [True: 0, False: 26]
  ------------------
 3775|      0|                crv = CKR_KEY_TYPE_INCONSISTENT;
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
 3776|      0|                break;
 3777|      0|            }
 3778|     26|            context->rsa = PR_TRUE;
  ------------------
  |  |  437|     26|#define PR_TRUE 1
  ------------------
 3779|     26|            pubKey = sftk_GetPubKey(key, CKK_RSA, &crv);
  ------------------
  |  |  372|     26|#define CKK_RSA 0x00000000UL
  ------------------
 3780|     26|            if (pubKey == NULL) {
  ------------------
  |  Branch (3780:17): [True: 0, False: 26]
  ------------------
 3781|      0|                crv = CKR_KEY_TYPE_INCONSISTENT;
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
 3782|      0|                break;
 3783|      0|            }
 3784|     26|            if (info) {
  ------------------
  |  Branch (3784:17): [True: 0, False: 26]
  ------------------
 3785|      0|                info->key = pubKey;
 3786|      0|                context->cipherInfo = info;
 3787|      0|                context->destroy = sftk_Space;
 3788|     26|            } else {
 3789|     26|                context->cipherInfo = pubKey;
 3790|     26|                context->destroy = sftk_Null;
 3791|     26|            }
 3792|     26|            break;
 3793|       |
 3794|      0|            INIT_RSA_PSS_SIG_MECH(SHA1)
  ------------------
  |  | 2963|      0|    case CKM_##mmm##_RSA_PKCS_PSS:                                                            \
  |  |  ------------------
  |  |  |  Branch (2963:5): [True: 0, False: 2.41k]
  |  |  ------------------
  |  | 2964|      0|        context->multi = PR_TRUE;                                                             \
  |  |  ------------------
  |  |  |  |  437|      0|#define PR_TRUE 1
  |  |  ------------------
  |  | 2965|      0|        crv = sftk_doSub##mmm(context);                                                       \
  |  | 2966|      0|        if (crv != CKR_OK)                                                                    \
  |  |  ------------------
  |  |  |  | 1388|      0|#define CKR_OK 0x00000000UL
  |  |  ------------------
  |  |  |  Branch (2966:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 2967|      0|            break;                                                                            \
  |  | 2968|      0|        if (pMechanism->ulParameterLen != sizeof(CK_RSA_PKCS_PSS_PARAMS)) {                   \
  |  |  ------------------
  |  |  |  Branch (2968:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 2969|      0|            crv = CKR_MECHANISM_PARAM_INVALID;                                                \
  |  |  ------------------
  |  |  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  |  |  ------------------
  |  | 2970|      0|            break;                                                                            \
  |  | 2971|      0|        }                                                                                     \
  |  | 2972|      0|        if (((const CK_RSA_PKCS_PSS_PARAMS *)pMechanism->pParameter)->hashAlg != CKM_##mmm) { \
  |  |  ------------------
  |  |  |  Branch (2972:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 2973|      0|            crv = CKR_MECHANISM_PARAM_INVALID;                                                \
  |  |  ------------------
  |  |  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  |  |  ------------------
  |  | 2974|      0|            break;                                                                            \
  |  | 2975|      0|        }                                                                                     \
  |  | 2976|      0|        goto finish_rsa_pss;
  ------------------
 3795|      0|            INIT_RSA_PSS_SIG_MECH(SHA224)
  ------------------
  |  | 2963|      0|    case CKM_##mmm##_RSA_PKCS_PSS:                                                            \
  |  |  ------------------
  |  |  |  Branch (2963:5): [True: 0, False: 2.41k]
  |  |  ------------------
  |  | 2964|      0|        context->multi = PR_TRUE;                                                             \
  |  |  ------------------
  |  |  |  |  437|      0|#define PR_TRUE 1
  |  |  ------------------
  |  | 2965|      0|        crv = sftk_doSub##mmm(context);                                                       \
  |  | 2966|      0|        if (crv != CKR_OK)                                                                    \
  |  |  ------------------
  |  |  |  | 1388|      0|#define CKR_OK 0x00000000UL
  |  |  ------------------
  |  |  |  Branch (2966:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 2967|      0|            break;                                                                            \
  |  | 2968|      0|        if (pMechanism->ulParameterLen != sizeof(CK_RSA_PKCS_PSS_PARAMS)) {                   \
  |  |  ------------------
  |  |  |  Branch (2968:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 2969|      0|            crv = CKR_MECHANISM_PARAM_INVALID;                                                \
  |  |  ------------------
  |  |  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  |  |  ------------------
  |  | 2970|      0|            break;                                                                            \
  |  | 2971|      0|        }                                                                                     \
  |  | 2972|      0|        if (((const CK_RSA_PKCS_PSS_PARAMS *)pMechanism->pParameter)->hashAlg != CKM_##mmm) { \
  |  |  ------------------
  |  |  |  Branch (2972:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 2973|      0|            crv = CKR_MECHANISM_PARAM_INVALID;                                                \
  |  |  ------------------
  |  |  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  |  |  ------------------
  |  | 2974|      0|            break;                                                                            \
  |  | 2975|      0|        }                                                                                     \
  |  | 2976|      0|        goto finish_rsa_pss;
  ------------------
 3796|      0|            INIT_RSA_PSS_SIG_MECH(SHA256)
  ------------------
  |  | 2963|      0|    case CKM_##mmm##_RSA_PKCS_PSS:                                                            \
  |  |  ------------------
  |  |  |  Branch (2963:5): [True: 0, False: 2.41k]
  |  |  ------------------
  |  | 2964|      0|        context->multi = PR_TRUE;                                                             \
  |  |  ------------------
  |  |  |  |  437|      0|#define PR_TRUE 1
  |  |  ------------------
  |  | 2965|      0|        crv = sftk_doSub##mmm(context);                                                       \
  |  | 2966|      0|        if (crv != CKR_OK)                                                                    \
  |  |  ------------------
  |  |  |  | 1388|      0|#define CKR_OK 0x00000000UL
  |  |  ------------------
  |  |  |  Branch (2966:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 2967|      0|            break;                                                                            \
  |  | 2968|      0|        if (pMechanism->ulParameterLen != sizeof(CK_RSA_PKCS_PSS_PARAMS)) {                   \
  |  |  ------------------
  |  |  |  Branch (2968:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 2969|      0|            crv = CKR_MECHANISM_PARAM_INVALID;                                                \
  |  |  ------------------
  |  |  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  |  |  ------------------
  |  | 2970|      0|            break;                                                                            \
  |  | 2971|      0|        }                                                                                     \
  |  | 2972|      0|        if (((const CK_RSA_PKCS_PSS_PARAMS *)pMechanism->pParameter)->hashAlg != CKM_##mmm) { \
  |  |  ------------------
  |  |  |  Branch (2972:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 2973|      0|            crv = CKR_MECHANISM_PARAM_INVALID;                                                \
  |  |  ------------------
  |  |  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  |  |  ------------------
  |  | 2974|      0|            break;                                                                            \
  |  | 2975|      0|        }                                                                                     \
  |  | 2976|      0|        goto finish_rsa_pss;
  ------------------
 3797|      0|            INIT_RSA_PSS_SIG_MECH(SHA384)
  ------------------
  |  | 2963|      0|    case CKM_##mmm##_RSA_PKCS_PSS:                                                            \
  |  |  ------------------
  |  |  |  Branch (2963:5): [True: 0, False: 2.41k]
  |  |  ------------------
  |  | 2964|      0|        context->multi = PR_TRUE;                                                             \
  |  |  ------------------
  |  |  |  |  437|      0|#define PR_TRUE 1
  |  |  ------------------
  |  | 2965|      0|        crv = sftk_doSub##mmm(context);                                                       \
  |  | 2966|      0|        if (crv != CKR_OK)                                                                    \
  |  |  ------------------
  |  |  |  | 1388|      0|#define CKR_OK 0x00000000UL
  |  |  ------------------
  |  |  |  Branch (2966:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 2967|      0|            break;                                                                            \
  |  | 2968|      0|        if (pMechanism->ulParameterLen != sizeof(CK_RSA_PKCS_PSS_PARAMS)) {                   \
  |  |  ------------------
  |  |  |  Branch (2968:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 2969|      0|            crv = CKR_MECHANISM_PARAM_INVALID;                                                \
  |  |  ------------------
  |  |  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  |  |  ------------------
  |  | 2970|      0|            break;                                                                            \
  |  | 2971|      0|        }                                                                                     \
  |  | 2972|      0|        if (((const CK_RSA_PKCS_PSS_PARAMS *)pMechanism->pParameter)->hashAlg != CKM_##mmm) { \
  |  |  ------------------
  |  |  |  Branch (2972:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 2973|      0|            crv = CKR_MECHANISM_PARAM_INVALID;                                                \
  |  |  ------------------
  |  |  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  |  |  ------------------
  |  | 2974|      0|            break;                                                                            \
  |  | 2975|      0|        }                                                                                     \
  |  | 2976|      0|        goto finish_rsa_pss;
  ------------------
 3798|      0|            INIT_RSA_PSS_SIG_MECH(SHA512)
  ------------------
  |  | 2963|      0|    case CKM_##mmm##_RSA_PKCS_PSS:                                                            \
  |  |  ------------------
  |  |  |  Branch (2963:5): [True: 0, False: 2.41k]
  |  |  ------------------
  |  | 2964|      0|        context->multi = PR_TRUE;                                                             \
  |  |  ------------------
  |  |  |  |  437|      0|#define PR_TRUE 1
  |  |  ------------------
  |  | 2965|      0|        crv = sftk_doSub##mmm(context);                                                       \
  |  | 2966|      0|        if (crv != CKR_OK)                                                                    \
  |  |  ------------------
  |  |  |  | 1388|      0|#define CKR_OK 0x00000000UL
  |  |  ------------------
  |  |  |  Branch (2966:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 2967|      0|            break;                                                                            \
  |  | 2968|      0|        if (pMechanism->ulParameterLen != sizeof(CK_RSA_PKCS_PSS_PARAMS)) {                   \
  |  |  ------------------
  |  |  |  Branch (2968:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 2969|      0|            crv = CKR_MECHANISM_PARAM_INVALID;                                                \
  |  |  ------------------
  |  |  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  |  |  ------------------
  |  | 2970|      0|            break;                                                                            \
  |  | 2971|      0|        }                                                                                     \
  |  | 2972|      0|        if (((const CK_RSA_PKCS_PSS_PARAMS *)pMechanism->pParameter)->hashAlg != CKM_##mmm) { \
  |  |  ------------------
  |  |  |  Branch (2972:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 2973|      0|            crv = CKR_MECHANISM_PARAM_INVALID;                                                \
  |  |  ------------------
  |  |  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  |  |  ------------------
  |  | 2974|      0|            break;                                                                            \
  |  | 2975|      0|        }                                                                                     \
  |  | 2976|      0|        goto finish_rsa_pss;
  ------------------
 3799|  1.11k|        case CKM_RSA_PKCS_PSS:
  ------------------
  |  |  741|  1.11k|#define CKM_RSA_PKCS_PSS 0x0000000DUL
  ------------------
  |  Branch (3799:9): [True: 1.11k, False: 1.30k]
  ------------------
 3800|  1.11k|        finish_rsa_pss:
 3801|  1.11k|            if (key_type != CKK_RSA) {
  ------------------
  |  |  372|  1.11k|#define CKK_RSA 0x00000000UL
  ------------------
  |  Branch (3801:17): [True: 0, False: 1.11k]
  ------------------
 3802|      0|                crv = CKR_KEY_TYPE_INCONSISTENT;
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
 3803|      0|                break;
 3804|      0|            }
 3805|  1.11k|            context->rsa = PR_TRUE;
  ------------------
  |  |  437|  1.11k|#define PR_TRUE 1
  ------------------
 3806|  1.11k|            if (pMechanism->ulParameterLen != sizeof(CK_RSA_PKCS_PSS_PARAMS) ||
  ------------------
  |  Branch (3806:17): [True: 0, False: 1.11k]
  ------------------
 3807|  1.11k|                !sftk_ValidatePssParams((const CK_RSA_PKCS_PSS_PARAMS *)pMechanism->pParameter)) {
  ------------------
  |  Branch (3807:17): [True: 0, False: 1.11k]
  ------------------
 3808|      0|                crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 3809|      0|                break;
 3810|      0|            }
 3811|  1.11k|            pinfo = PORT_New(SFTKPSSVerifyInfo);
  ------------------
  |  |  151|  1.11k|#define PORT_New(type) (type *)PORT_Alloc(sizeof(type))
  |  |  ------------------
  |  |  |  |   52|  1.11k|#define PORT_Alloc PORT_Alloc_Util
  |  |  ------------------
  ------------------
 3812|  1.11k|            if (pinfo == NULL) {
  ------------------
  |  Branch (3812:17): [True: 0, False: 1.11k]
  ------------------
 3813|      0|                crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 3814|      0|                break;
 3815|      0|            }
 3816|  1.11k|            pinfo->size = sizeof(SFTKPSSVerifyInfo);
 3817|  1.11k|            pinfo->params = *(CK_RSA_PKCS_PSS_PARAMS *)pMechanism->pParameter;
 3818|  1.11k|            pinfo->key = sftk_GetPubKey(key, CKK_RSA, &crv);
  ------------------
  |  |  372|  1.11k|#define CKK_RSA 0x00000000UL
  ------------------
 3819|  1.11k|            if (pinfo->key == NULL) {
  ------------------
  |  Branch (3819:17): [True: 0, False: 1.11k]
  ------------------
 3820|      0|                crv = CKR_KEY_TYPE_INCONSISTENT;
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
 3821|      0|                break;
 3822|      0|            }
 3823|  1.11k|            context->cipherInfo = pinfo;
 3824|  1.11k|            context->destroy = sftk_ZSpace;
 3825|  1.11k|            context->verify = sftk_RSACheckSignPSS;
 3826|  1.11k|            break;
 3827|       |
 3828|      0|            INIT_DSA_SIG_MECH(SHA1)
  ------------------
  |  | 3013|      0|    case CKM_DSA_##mmm:                 \
  |  |  ------------------
  |  |  |  Branch (3013:5): [True: 0, False: 2.41k]
  |  |  ------------------
  |  | 3014|      0|        context->multi = PR_TRUE;       \
  |  |  ------------------
  |  |  |  |  437|      0|#define PR_TRUE 1
  |  |  ------------------
  |  | 3015|      0|        crv = sftk_doSub##mmm(context); \
  |  | 3016|      0|        if (crv != CKR_OK)              \
  |  |  ------------------
  |  |  |  | 1388|      0|#define CKR_OK 0x00000000UL
  |  |  ------------------
  |  |  |  Branch (3016:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3017|      0|            break;                      \
  |  | 3018|      0|        goto finish_dsa;
  ------------------
 3829|      0|            INIT_DSA_SIG_MECH(SHA224)
  ------------------
  |  | 3013|      0|    case CKM_DSA_##mmm:                 \
  |  |  ------------------
  |  |  |  Branch (3013:5): [True: 0, False: 2.41k]
  |  |  ------------------
  |  | 3014|      0|        context->multi = PR_TRUE;       \
  |  |  ------------------
  |  |  |  |  437|      0|#define PR_TRUE 1
  |  |  ------------------
  |  | 3015|      0|        crv = sftk_doSub##mmm(context); \
  |  | 3016|      0|        if (crv != CKR_OK)              \
  |  |  ------------------
  |  |  |  | 1388|      0|#define CKR_OK 0x00000000UL
  |  |  ------------------
  |  |  |  Branch (3016:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3017|      0|            break;                      \
  |  | 3018|      0|        goto finish_dsa;
  ------------------
 3830|      0|            INIT_DSA_SIG_MECH(SHA256)
  ------------------
  |  | 3013|      0|    case CKM_DSA_##mmm:                 \
  |  |  ------------------
  |  |  |  Branch (3013:5): [True: 0, False: 2.41k]
  |  |  ------------------
  |  | 3014|      0|        context->multi = PR_TRUE;       \
  |  |  ------------------
  |  |  |  |  437|      0|#define PR_TRUE 1
  |  |  ------------------
  |  | 3015|      0|        crv = sftk_doSub##mmm(context); \
  |  | 3016|      0|        if (crv != CKR_OK)              \
  |  |  ------------------
  |  |  |  | 1388|      0|#define CKR_OK 0x00000000UL
  |  |  ------------------
  |  |  |  Branch (3016:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3017|      0|            break;                      \
  |  | 3018|      0|        goto finish_dsa;
  ------------------
 3831|      0|            INIT_DSA_SIG_MECH(SHA384)
  ------------------
  |  | 3013|      0|    case CKM_DSA_##mmm:                 \
  |  |  ------------------
  |  |  |  Branch (3013:5): [True: 0, False: 2.41k]
  |  |  ------------------
  |  | 3014|      0|        context->multi = PR_TRUE;       \
  |  |  ------------------
  |  |  |  |  437|      0|#define PR_TRUE 1
  |  |  ------------------
  |  | 3015|      0|        crv = sftk_doSub##mmm(context); \
  |  | 3016|      0|        if (crv != CKR_OK)              \
  |  |  ------------------
  |  |  |  | 1388|      0|#define CKR_OK 0x00000000UL
  |  |  ------------------
  |  |  |  Branch (3016:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3017|      0|            break;                      \
  |  | 3018|      0|        goto finish_dsa;
  ------------------
 3832|      0|            INIT_DSA_SIG_MECH(SHA512)
  ------------------
  |  | 3013|      0|    case CKM_DSA_##mmm:                 \
  |  |  ------------------
  |  |  |  Branch (3013:5): [True: 0, False: 2.41k]
  |  |  ------------------
  |  | 3014|      0|        context->multi = PR_TRUE;       \
  |  |  ------------------
  |  |  |  |  437|      0|#define PR_TRUE 1
  |  |  ------------------
  |  | 3015|      0|        crv = sftk_doSub##mmm(context); \
  |  | 3016|      0|        if (crv != CKR_OK)              \
  |  |  ------------------
  |  |  |  | 1388|      0|#define CKR_OK 0x00000000UL
  |  |  ------------------
  |  |  |  Branch (3016:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3017|      0|            break;                      \
  |  | 3018|      0|        goto finish_dsa;
  ------------------
 3833|  1.13k|        case CKM_DSA:
  ------------------
  |  |  745|  1.13k|#define CKM_DSA 0x00000011UL
  ------------------
  |  Branch (3833:9): [True: 1.13k, False: 1.27k]
  ------------------
 3834|  1.13k|        finish_dsa:
 3835|  1.13k|            if (key_type != CKK_DSA) {
  ------------------
  |  |  373|  1.13k|#define CKK_DSA 0x00000001UL
  ------------------
  |  Branch (3835:17): [True: 0, False: 1.13k]
  ------------------
 3836|      0|                crv = CKR_KEY_TYPE_INCONSISTENT;
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
 3837|      0|                break;
 3838|      0|            }
 3839|  1.13k|            pubKey = sftk_GetPubKey(key, CKK_DSA, &crv);
  ------------------
  |  |  373|  1.13k|#define CKK_DSA 0x00000001UL
  ------------------
 3840|  1.13k|            if (pubKey == NULL) {
  ------------------
  |  Branch (3840:17): [True: 0, False: 1.13k]
  ------------------
 3841|      0|                break;
 3842|      0|            }
 3843|  1.13k|            context->cipherInfo = pubKey;
 3844|  1.13k|            context->verify = nsc_DSA_Verify_Stub;
 3845|  1.13k|            context->destroy = sftk_Null;
 3846|  1.13k|            break;
 3847|       |
 3848|      0|            INIT_ECDSA_SIG_MECH(SHA1)
  ------------------
  |  | 3042|      0|    case CKM_ECDSA_##mmm:               \
  |  |  ------------------
  |  |  |  Branch (3042:5): [True: 0, False: 2.41k]
  |  |  ------------------
  |  | 3043|      0|        context->multi = PR_TRUE;       \
  |  |  ------------------
  |  |  |  |  437|      0|#define PR_TRUE 1
  |  |  ------------------
  |  | 3044|      0|        crv = sftk_doSub##mmm(context); \
  |  | 3045|      0|        if (crv != CKR_OK)              \
  |  |  ------------------
  |  |  |  | 1388|      0|#define CKR_OK 0x00000000UL
  |  |  ------------------
  |  |  |  Branch (3045:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3046|      0|            break;                      \
  |  | 3047|      0|        goto finish_ecdsa;
  ------------------
 3849|      0|            INIT_ECDSA_SIG_MECH(SHA224)
  ------------------
  |  | 3042|      0|    case CKM_ECDSA_##mmm:               \
  |  |  ------------------
  |  |  |  Branch (3042:5): [True: 0, False: 2.41k]
  |  |  ------------------
  |  | 3043|      0|        context->multi = PR_TRUE;       \
  |  |  ------------------
  |  |  |  |  437|      0|#define PR_TRUE 1
  |  |  ------------------
  |  | 3044|      0|        crv = sftk_doSub##mmm(context); \
  |  | 3045|      0|        if (crv != CKR_OK)              \
  |  |  ------------------
  |  |  |  | 1388|      0|#define CKR_OK 0x00000000UL
  |  |  ------------------
  |  |  |  Branch (3045:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3046|      0|            break;                      \
  |  | 3047|      0|        goto finish_ecdsa;
  ------------------
 3850|      0|            INIT_ECDSA_SIG_MECH(SHA256)
  ------------------
  |  | 3042|      0|    case CKM_ECDSA_##mmm:               \
  |  |  ------------------
  |  |  |  Branch (3042:5): [True: 0, False: 2.41k]
  |  |  ------------------
  |  | 3043|      0|        context->multi = PR_TRUE;       \
  |  |  ------------------
  |  |  |  |  437|      0|#define PR_TRUE 1
  |  |  ------------------
  |  | 3044|      0|        crv = sftk_doSub##mmm(context); \
  |  | 3045|      0|        if (crv != CKR_OK)              \
  |  |  ------------------
  |  |  |  | 1388|      0|#define CKR_OK 0x00000000UL
  |  |  ------------------
  |  |  |  Branch (3045:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3046|      0|            break;                      \
  |  | 3047|      0|        goto finish_ecdsa;
  ------------------
 3851|      0|            INIT_ECDSA_SIG_MECH(SHA384)
  ------------------
  |  | 3042|      0|    case CKM_ECDSA_##mmm:               \
  |  |  ------------------
  |  |  |  Branch (3042:5): [True: 0, False: 2.41k]
  |  |  ------------------
  |  | 3043|      0|        context->multi = PR_TRUE;       \
  |  |  ------------------
  |  |  |  |  437|      0|#define PR_TRUE 1
  |  |  ------------------
  |  | 3044|      0|        crv = sftk_doSub##mmm(context); \
  |  | 3045|      0|        if (crv != CKR_OK)              \
  |  |  ------------------
  |  |  |  | 1388|      0|#define CKR_OK 0x00000000UL
  |  |  ------------------
  |  |  |  Branch (3045:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3046|      0|            break;                      \
  |  | 3047|      0|        goto finish_ecdsa;
  ------------------
 3852|      0|            INIT_ECDSA_SIG_MECH(SHA512)
  ------------------
  |  | 3042|      0|    case CKM_ECDSA_##mmm:               \
  |  |  ------------------
  |  |  |  Branch (3042:5): [True: 0, False: 2.41k]
  |  |  ------------------
  |  | 3043|      0|        context->multi = PR_TRUE;       \
  |  |  ------------------
  |  |  |  |  437|      0|#define PR_TRUE 1
  |  |  ------------------
  |  | 3044|      0|        crv = sftk_doSub##mmm(context); \
  |  | 3045|      0|        if (crv != CKR_OK)              \
  |  |  ------------------
  |  |  |  | 1388|      0|#define CKR_OK 0x00000000UL
  |  |  ------------------
  |  |  |  Branch (3045:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3046|      0|            break;                      \
  |  | 3047|      0|        goto finish_ecdsa;
  ------------------
 3853|    139|        case CKM_ECDSA:
  ------------------
  |  | 1074|    139|#define CKM_ECDSA 0x00001041UL
  ------------------
  |  Branch (3853:9): [True: 139, False: 2.27k]
  ------------------
 3854|    139|        finish_ecdsa:
 3855|    139|            if (key_type != CKK_EC) {
  ------------------
  |  |  379|    139|#define CKK_EC 0x00000003UL
  ------------------
  |  Branch (3855:17): [True: 0, False: 139]
  ------------------
 3856|      0|                crv = CKR_KEY_TYPE_INCONSISTENT;
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
 3857|      0|                break;
 3858|      0|            }
 3859|    139|            pubKey = sftk_GetPubKey(key, CKK_EC, &crv);
  ------------------
  |  |  379|    139|#define CKK_EC 0x00000003UL
  ------------------
 3860|    139|            if (pubKey == NULL) {
  ------------------
  |  Branch (3860:17): [True: 0, False: 139]
  ------------------
 3861|      0|                crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 3862|      0|                break;
 3863|      0|            }
 3864|    139|            context->cipherInfo = pubKey;
 3865|    139|            context->verify = nsc_ECDSAVerifyStub;
 3866|    139|            context->destroy = sftk_Null;
 3867|    139|            break;
 3868|       |
 3869|      0|            INIT_HMAC_MECH(MD2)
  ------------------
  |  | 3095|      0|    case CKM_##mmm##_HMAC_GENERAL:                                 \
  |  |  ------------------
  |  |  |  Branch (3095:5): [True: 0, False: 2.41k]
  |  |  ------------------
  |  | 3096|      0|        PORT_Assert(pMechanism->pParameter);                       \
  |  |  ------------------
  |  |  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 3097|      0|        if (!pMechanism->pParameter) {                             \
  |  |  ------------------
  |  |  |  Branch (3097:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3098|      0|            crv = CKR_MECHANISM_PARAM_INVALID;                     \
  |  |  ------------------
  |  |  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  |  |  ------------------
  |  | 3099|      0|            break;                                                 \
  |  | 3100|      0|        }                                                          \
  |  | 3101|      0|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
  |  | 3102|      0|                             *(CK_ULONG *)pMechanism->pParameter); \
  |  | 3103|      0|        break;                                                     \
  |  | 3104|      0|    case CKM_##mmm##_HMAC:                                         \
  |  |  ------------------
  |  |  |  Branch (3104:5): [True: 0, False: 2.41k]
  |  |  ------------------
  |  | 3105|      0|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
  |  | 3106|      0|                             mmm##_LENGTH);                        \
  |  | 3107|      0|        break;
  ------------------
 3870|      0|            INIT_HMAC_MECH(MD5)
  ------------------
  |  | 3095|      0|    case CKM_##mmm##_HMAC_GENERAL:                                 \
  |  |  ------------------
  |  |  |  Branch (3095:5): [True: 0, False: 2.41k]
  |  |  ------------------
  |  | 3096|      0|        PORT_Assert(pMechanism->pParameter);                       \
  |  |  ------------------
  |  |  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 3097|      0|        if (!pMechanism->pParameter) {                             \
  |  |  ------------------
  |  |  |  Branch (3097:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3098|      0|            crv = CKR_MECHANISM_PARAM_INVALID;                     \
  |  |  ------------------
  |  |  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  |  |  ------------------
  |  | 3099|      0|            break;                                                 \
  |  | 3100|      0|        }                                                          \
  |  | 3101|      0|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
  |  | 3102|      0|                             *(CK_ULONG *)pMechanism->pParameter); \
  |  | 3103|      0|        break;                                                     \
  |  | 3104|      0|    case CKM_##mmm##_HMAC:                                         \
  |  |  ------------------
  |  |  |  Branch (3104:5): [True: 0, False: 2.41k]
  |  |  ------------------
  |  | 3105|      0|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
  |  | 3106|      0|                             mmm##_LENGTH);                        \
  |  | 3107|      0|        break;
  ------------------
 3871|      0|            INIT_HMAC_MECH(SHA1)
  ------------------
  |  | 3095|      0|    case CKM_##mmm##_HMAC_GENERAL:                                 \
  |  |  ------------------
  |  |  |  Branch (3095:5): [True: 0, False: 2.41k]
  |  |  ------------------
  |  | 3096|      0|        PORT_Assert(pMechanism->pParameter);                       \
  |  |  ------------------
  |  |  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 3097|      0|        if (!pMechanism->pParameter) {                             \
  |  |  ------------------
  |  |  |  Branch (3097:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3098|      0|            crv = CKR_MECHANISM_PARAM_INVALID;                     \
  |  |  ------------------
  |  |  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  |  |  ------------------
  |  | 3099|      0|            break;                                                 \
  |  | 3100|      0|        }                                                          \
  |  | 3101|      0|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
  |  | 3102|      0|                             *(CK_ULONG *)pMechanism->pParameter); \
  |  | 3103|      0|        break;                                                     \
  |  | 3104|      0|    case CKM_##mmm##_HMAC:                                         \
  |  |  ------------------
  |  |  |  Branch (3104:5): [True: 0, False: 2.41k]
  |  |  ------------------
  |  | 3105|      0|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
  |  | 3106|      0|                             mmm##_LENGTH);                        \
  |  | 3107|      0|        break;
  ------------------
 3872|      0|            INIT_HMAC_MECH(SHA224)
  ------------------
  |  | 3095|      0|    case CKM_##mmm##_HMAC_GENERAL:                                 \
  |  |  ------------------
  |  |  |  Branch (3095:5): [True: 0, False: 2.41k]
  |  |  ------------------
  |  | 3096|      0|        PORT_Assert(pMechanism->pParameter);                       \
  |  |  ------------------
  |  |  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 3097|      0|        if (!pMechanism->pParameter) {                             \
  |  |  ------------------
  |  |  |  Branch (3097:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3098|      0|            crv = CKR_MECHANISM_PARAM_INVALID;                     \
  |  |  ------------------
  |  |  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  |  |  ------------------
  |  | 3099|      0|            break;                                                 \
  |  | 3100|      0|        }                                                          \
  |  | 3101|      0|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
  |  | 3102|      0|                             *(CK_ULONG *)pMechanism->pParameter); \
  |  | 3103|      0|        break;                                                     \
  |  | 3104|      0|    case CKM_##mmm##_HMAC:                                         \
  |  |  ------------------
  |  |  |  Branch (3104:5): [True: 0, False: 2.41k]
  |  |  ------------------
  |  | 3105|      0|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
  |  | 3106|      0|                             mmm##_LENGTH);                        \
  |  | 3107|      0|        break;
  ------------------
 3873|      0|            INIT_HMAC_MECH(SHA256)
  ------------------
  |  | 3095|      0|    case CKM_##mmm##_HMAC_GENERAL:                                 \
  |  |  ------------------
  |  |  |  Branch (3095:5): [True: 0, False: 2.41k]
  |  |  ------------------
  |  | 3096|      0|        PORT_Assert(pMechanism->pParameter);                       \
  |  |  ------------------
  |  |  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 3097|      0|        if (!pMechanism->pParameter) {                             \
  |  |  ------------------
  |  |  |  Branch (3097:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3098|      0|            crv = CKR_MECHANISM_PARAM_INVALID;                     \
  |  |  ------------------
  |  |  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  |  |  ------------------
  |  | 3099|      0|            break;                                                 \
  |  | 3100|      0|        }                                                          \
  |  | 3101|      0|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
  |  | 3102|      0|                             *(CK_ULONG *)pMechanism->pParameter); \
  |  | 3103|      0|        break;                                                     \
  |  | 3104|      0|    case CKM_##mmm##_HMAC:                                         \
  |  |  ------------------
  |  |  |  Branch (3104:5): [True: 0, False: 2.41k]
  |  |  ------------------
  |  | 3105|      0|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
  |  | 3106|      0|                             mmm##_LENGTH);                        \
  |  | 3107|      0|        break;
  ------------------
 3874|      0|            INIT_HMAC_MECH(SHA384)
  ------------------
  |  | 3095|      0|    case CKM_##mmm##_HMAC_GENERAL:                                 \
  |  |  ------------------
  |  |  |  Branch (3095:5): [True: 0, False: 2.41k]
  |  |  ------------------
  |  | 3096|      0|        PORT_Assert(pMechanism->pParameter);                       \
  |  |  ------------------
  |  |  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 3097|      0|        if (!pMechanism->pParameter) {                             \
  |  |  ------------------
  |  |  |  Branch (3097:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3098|      0|            crv = CKR_MECHANISM_PARAM_INVALID;                     \
  |  |  ------------------
  |  |  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  |  |  ------------------
  |  | 3099|      0|            break;                                                 \
  |  | 3100|      0|        }                                                          \
  |  | 3101|      0|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
  |  | 3102|      0|                             *(CK_ULONG *)pMechanism->pParameter); \
  |  | 3103|      0|        break;                                                     \
  |  | 3104|      0|    case CKM_##mmm##_HMAC:                                         \
  |  |  ------------------
  |  |  |  Branch (3104:5): [True: 0, False: 2.41k]
  |  |  ------------------
  |  | 3105|      0|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
  |  | 3106|      0|                             mmm##_LENGTH);                        \
  |  | 3107|      0|        break;
  ------------------
 3875|      0|            INIT_HMAC_MECH(SHA512)
  ------------------
  |  | 3095|      0|    case CKM_##mmm##_HMAC_GENERAL:                                 \
  |  |  ------------------
  |  |  |  Branch (3095:5): [True: 0, False: 2.41k]
  |  |  ------------------
  |  | 3096|      0|        PORT_Assert(pMechanism->pParameter);                       \
  |  |  ------------------
  |  |  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 3097|      0|        if (!pMechanism->pParameter) {                             \
  |  |  ------------------
  |  |  |  Branch (3097:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3098|      0|            crv = CKR_MECHANISM_PARAM_INVALID;                     \
  |  |  ------------------
  |  |  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  |  |  ------------------
  |  | 3099|      0|            break;                                                 \
  |  | 3100|      0|        }                                                          \
  |  | 3101|      0|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
  |  | 3102|      0|                             *(CK_ULONG *)pMechanism->pParameter); \
  |  | 3103|      0|        break;                                                     \
  |  | 3104|      0|    case CKM_##mmm##_HMAC:                                         \
  |  |  ------------------
  |  |  |  Branch (3104:5): [True: 0, False: 2.41k]
  |  |  ------------------
  |  | 3105|      0|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
  |  | 3106|      0|                             mmm##_LENGTH);                        \
  |  | 3107|      0|        break;
  ------------------
 3876|      0|            INIT_HMAC_MECH(SHA3_224)
  ------------------
  |  | 3095|      0|    case CKM_##mmm##_HMAC_GENERAL:                                 \
  |  |  ------------------
  |  |  |  Branch (3095:5): [True: 0, False: 2.41k]
  |  |  ------------------
  |  | 3096|      0|        PORT_Assert(pMechanism->pParameter);                       \
  |  |  ------------------
  |  |  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 3097|      0|        if (!pMechanism->pParameter) {                             \
  |  |  ------------------
  |  |  |  Branch (3097:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3098|      0|            crv = CKR_MECHANISM_PARAM_INVALID;                     \
  |  |  ------------------
  |  |  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  |  |  ------------------
  |  | 3099|      0|            break;                                                 \
  |  | 3100|      0|        }                                                          \
  |  | 3101|      0|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
  |  | 3102|      0|                             *(CK_ULONG *)pMechanism->pParameter); \
  |  | 3103|      0|        break;                                                     \
  |  | 3104|      0|    case CKM_##mmm##_HMAC:                                         \
  |  |  ------------------
  |  |  |  Branch (3104:5): [True: 0, False: 2.41k]
  |  |  ------------------
  |  | 3105|      0|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
  |  | 3106|      0|                             mmm##_LENGTH);                        \
  |  | 3107|      0|        break;
  ------------------
 3877|      0|            INIT_HMAC_MECH(SHA3_256)
  ------------------
  |  | 3095|      0|    case CKM_##mmm##_HMAC_GENERAL:                                 \
  |  |  ------------------
  |  |  |  Branch (3095:5): [True: 0, False: 2.41k]
  |  |  ------------------
  |  | 3096|      0|        PORT_Assert(pMechanism->pParameter);                       \
  |  |  ------------------
  |  |  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 3097|      0|        if (!pMechanism->pParameter) {                             \
  |  |  ------------------
  |  |  |  Branch (3097:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3098|      0|            crv = CKR_MECHANISM_PARAM_INVALID;                     \
  |  |  ------------------
  |  |  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  |  |  ------------------
  |  | 3099|      0|            break;                                                 \
  |  | 3100|      0|        }                                                          \
  |  | 3101|      0|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
  |  | 3102|      0|                             *(CK_ULONG *)pMechanism->pParameter); \
  |  | 3103|      0|        break;                                                     \
  |  | 3104|      0|    case CKM_##mmm##_HMAC:                                         \
  |  |  ------------------
  |  |  |  Branch (3104:5): [True: 0, False: 2.41k]
  |  |  ------------------
  |  | 3105|      0|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
  |  | 3106|      0|                             mmm##_LENGTH);                        \
  |  | 3107|      0|        break;
  ------------------
 3878|      0|            INIT_HMAC_MECH(SHA3_384)
  ------------------
  |  | 3095|      0|    case CKM_##mmm##_HMAC_GENERAL:                                 \
  |  |  ------------------
  |  |  |  Branch (3095:5): [True: 0, False: 2.41k]
  |  |  ------------------
  |  | 3096|      0|        PORT_Assert(pMechanism->pParameter);                       \
  |  |  ------------------
  |  |  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 3097|      0|        if (!pMechanism->pParameter) {                             \
  |  |  ------------------
  |  |  |  Branch (3097:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3098|      0|            crv = CKR_MECHANISM_PARAM_INVALID;                     \
  |  |  ------------------
  |  |  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  |  |  ------------------
  |  | 3099|      0|            break;                                                 \
  |  | 3100|      0|        }                                                          \
  |  | 3101|      0|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
  |  | 3102|      0|                             *(CK_ULONG *)pMechanism->pParameter); \
  |  | 3103|      0|        break;                                                     \
  |  | 3104|      0|    case CKM_##mmm##_HMAC:                                         \
  |  |  ------------------
  |  |  |  Branch (3104:5): [True: 0, False: 2.41k]
  |  |  ------------------
  |  | 3105|      0|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
  |  | 3106|      0|                             mmm##_LENGTH);                        \
  |  | 3107|      0|        break;
  ------------------
 3879|      0|            INIT_HMAC_MECH(SHA3_512)
  ------------------
  |  | 3095|      0|    case CKM_##mmm##_HMAC_GENERAL:                                 \
  |  |  ------------------
  |  |  |  Branch (3095:5): [True: 0, False: 2.41k]
  |  |  ------------------
  |  | 3096|      0|        PORT_Assert(pMechanism->pParameter);                       \
  |  |  ------------------
  |  |  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 3097|      0|        if (!pMechanism->pParameter) {                             \
  |  |  ------------------
  |  |  |  Branch (3097:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 3098|      0|            crv = CKR_MECHANISM_PARAM_INVALID;                     \
  |  |  ------------------
  |  |  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  |  |  ------------------
  |  | 3099|      0|            break;                                                 \
  |  | 3100|      0|        }                                                          \
  |  | 3101|      0|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
  |  | 3102|      0|                             *(CK_ULONG *)pMechanism->pParameter); \
  |  | 3103|      0|        break;                                                     \
  |  | 3104|      0|    case CKM_##mmm##_HMAC:                                         \
  |  |  ------------------
  |  |  |  Branch (3104:5): [True: 0, False: 2.41k]
  |  |  ------------------
  |  | 3105|      0|        crv = sftk_doMACInit(pMechanism->mechanism, context, key,  \
  |  | 3106|      0|                             mmm##_LENGTH);                        \
  |  | 3107|      0|        break;
  ------------------
 3880|       |
 3881|      0|        case CKM_EDDSA:
  ------------------
  |  | 1174|      0|#define CKM_EDDSA 0x00001057UL
  ------------------
  |  Branch (3881:9): [True: 0, False: 2.41k]
  ------------------
 3882|      0|            if (key_type != CKK_EC_EDWARDS) {
  ------------------
  |  |  448|      0|#define CKK_EC_EDWARDS 0x00000040UL
  ------------------
  |  Branch (3882:17): [True: 0, False: 0]
  ------------------
 3883|      0|                crv = CKR_KEY_TYPE_INCONSISTENT;
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
 3884|      0|                break;
 3885|      0|            }
 3886|      0|            pubKey = sftk_GetPubKey(key, CKK_EC_EDWARDS, &crv);
  ------------------
  |  |  448|      0|#define CKK_EC_EDWARDS 0x00000040UL
  ------------------
 3887|      0|            if (pubKey == NULL) {
  ------------------
  |  Branch (3887:17): [True: 0, False: 0]
  ------------------
 3888|      0|                crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 3889|      0|                break;
 3890|      0|            }
 3891|       |
 3892|      0|            if (pMechanism->pParameter) {
  ------------------
  |  Branch (3892:17): [True: 0, False: 0]
  ------------------
 3893|      0|                crv = CKR_FUNCTION_NOT_SUPPORTED;
  ------------------
  |  | 1426|      0|#define CKR_FUNCTION_NOT_SUPPORTED 0x00000054UL
  ------------------
 3894|      0|                break;
 3895|      0|            }
 3896|       |
 3897|      0|            context->cipherInfo = pubKey;
 3898|      0|            context->verify = nsc_EDDSAVerifyStub;
 3899|      0|            context->destroy = sftk_Null;
 3900|      0|            break;
 3901|       |
 3902|      0|        case CKM_SSL3_MD5_MAC:
  ------------------
  |  |  975|      0|#define CKM_SSL3_MD5_MAC 0x00000380UL
  ------------------
  |  Branch (3902:9): [True: 0, False: 2.41k]
  ------------------
 3903|      0|            PORT_Assert(pMechanism->pParameter);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3904|      0|            if (!pMechanism->pParameter) {
  ------------------
  |  Branch (3904:17): [True: 0, False: 0]
  ------------------
 3905|      0|                crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 3906|      0|                break;
 3907|      0|            }
 3908|      0|            crv = sftk_doSSLMACInit(context, SEC_OID_MD5, key,
 3909|      0|                                    *(CK_ULONG *)pMechanism->pParameter);
 3910|      0|            break;
 3911|      0|        case CKM_SSL3_SHA1_MAC:
  ------------------
  |  |  976|      0|#define CKM_SSL3_SHA1_MAC 0x00000381UL
  ------------------
  |  Branch (3911:9): [True: 0, False: 2.41k]
  ------------------
 3912|      0|            PORT_Assert(pMechanism->pParameter);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3913|      0|            if (!pMechanism->pParameter) {
  ------------------
  |  Branch (3913:17): [True: 0, False: 0]
  ------------------
 3914|      0|                crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 3915|      0|                break;
 3916|      0|            }
 3917|      0|            crv = sftk_doSSLMACInit(context, SEC_OID_SHA1, key,
 3918|      0|                                    *(CK_ULONG *)pMechanism->pParameter);
 3919|      0|            break;
 3920|      0|        case CKM_TLS_PRF_GENERAL:
  ------------------
  |  |  297|      0|#define CKM_TLS_PRF_GENERAL 0x80000373UL
  ------------------
  |  Branch (3920:9): [True: 0, False: 2.41k]
  ------------------
 3921|      0|            crv = sftk_TLSPRFInit(context, key, key_type, HASH_AlgNULL, 0);
 3922|      0|            break;
 3923|      0|        case CKM_NSS_TLS_PRF_GENERAL_SHA256:
  ------------------
  |  |  233|      0|#define CKM_NSS_TLS_PRF_GENERAL_SHA256 (CKM_NSS + 21)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (3923:9): [True: 0, False: 2.41k]
  ------------------
 3924|      0|            crv = sftk_TLSPRFInit(context, key, key_type, HASH_AlgSHA256, 0);
 3925|      0|            break;
 3926|       |
 3927|      0|        default:
  ------------------
  |  Branch (3927:9): [True: 0, False: 2.41k]
  ------------------
 3928|      0|            crv = CKR_MECHANISM_INVALID;
  ------------------
  |  | 1447|      0|#define CKR_MECHANISM_INVALID 0x00000070UL
  ------------------
 3929|      0|            break;
 3930|  2.41k|    }
 3931|       |
 3932|  2.41k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  2.41k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (3932:9): [True: 0, False: 2.41k]
  ------------------
 3933|      0|        if (info)
  ------------------
  |  Branch (3933:13): [True: 0, False: 0]
  ------------------
 3934|      0|            PORT_Free(info);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 3935|      0|        if (pinfo)
  ------------------
  |  Branch (3935:13): [True: 0, False: 0]
  ------------------
 3936|      0|            PORT_ZFree(pinfo, pinfo->size);
  ------------------
  |  |   75|      0|#define PORT_ZFree PORT_ZFree_Util
  ------------------
 3937|      0|        sftk_FreeContext(context);
 3938|      0|        sftk_FreeSession(session);
 3939|      0|        return crv;
 3940|      0|    }
 3941|  2.41k|    sftk_SetContextByType(session, SFTK_VERIFY, context);
 3942|  2.41k|    sftk_FreeSession(session);
 3943|  2.41k|    return CKR_OK;
  ------------------
  |  | 1388|  2.41k|#define CKR_OK 0x00000000UL
  ------------------
 3944|  2.41k|}
NSC_Verify:
 3952|  2.41k|{
 3953|  2.41k|    SFTKSession *session;
 3954|  2.41k|    SFTKSessionContext *context;
 3955|  2.41k|    CK_RV crv;
 3956|       |
 3957|  2.41k|    CHECK_FORK();
 3958|       |
 3959|       |    /* make sure we're legal */
 3960|  2.41k|    crv = sftk_GetContext(hSession, &context, SFTK_VERIFY, PR_FALSE, &session);
  ------------------
  |  |  438|  2.41k|#define PR_FALSE 0
  ------------------
 3961|  2.41k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  2.41k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (3961:9): [True: 0, False: 2.41k]
  ------------------
 3962|      0|        return crv;
 3963|       |
 3964|       |    /* multi part Verifying are completely implemented by VerifyUpdate and
 3965|       |     * VerifyFinal */
 3966|  2.41k|    if (context->multi) {
  ------------------
  |  Branch (3966:9): [True: 0, False: 2.41k]
  ------------------
 3967|       |        /* VerifyFinal can't follow failed VerifyUpdate */
 3968|      0|        if (CKR_OK == (crv = NSC_VerifyUpdate(hSession, pData, ulDataLen)))
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (3968:13): [True: 0, False: 0]
  ------------------
 3969|      0|            crv = NSC_VerifyFinal(hSession, pSignature, ulSignatureLen);
 3970|  2.41k|    } else {
 3971|  2.41k|        if (SECSuccess != (*context->verify)(context->cipherInfo, pSignature,
  ------------------
  |  Branch (3971:13): [True: 2.41k, False: 0]
  ------------------
 3972|  2.41k|                                             ulSignatureLen, pData, ulDataLen))
 3973|  2.41k|            crv = sftk_MapCryptError(PORT_GetError());
  ------------------
  |  |   62|  2.41k|#define PORT_GetError PORT_GetError_Util
  ------------------
 3974|       |
 3975|  2.41k|        sftk_TerminateOp(session, SFTK_VERIFY, context);
 3976|  2.41k|    }
 3977|  2.41k|    sftk_FreeSession(session);
 3978|  2.41k|    return crv;
 3979|  2.41k|}
NSC_VerifyRecoverInit:
 4078|     16|{
 4079|     16|    SFTKSession *session;
 4080|     16|    SFTKObject *key;
 4081|     16|    SFTKSessionContext *context;
 4082|     16|    CK_KEY_TYPE key_type;
 4083|     16|    CK_RV crv = CKR_OK;
  ------------------
  |  | 1388|     16|#define CKR_OK 0x00000000UL
  ------------------
 4084|     16|    NSSLOWKEYPublicKey *pubKey;
 4085|       |
 4086|     16|    CHECK_FORK();
 4087|       |
 4088|     16|    session = sftk_SessionFromHandle(hSession);
 4089|     16|    if (session == NULL)
  ------------------
  |  Branch (4089:9): [True: 0, False: 16]
  ------------------
 4090|      0|        return CKR_SESSION_HANDLE_INVALID;
  ------------------
  |  | 1465|      0|#define CKR_SESSION_HANDLE_INVALID 0x000000B3UL
  ------------------
 4091|     16|    crv = sftk_InitGeneric(session, pMechanism, &context, SFTK_VERIFY_RECOVER,
 4092|     16|                           &key, hKey, &key_type, CKO_PUBLIC_KEY, CKA_VERIFY_RECOVER);
  ------------------
  |  |  327|     16|#define CKO_PUBLIC_KEY 0x00000002UL
  ------------------
                                         &key, hKey, &key_type, CKO_PUBLIC_KEY, CKA_VERIFY_RECOVER);
  ------------------
  |  |  554|     16|#define CKA_VERIFY_RECOVER 0x0000010BUL
  ------------------
 4093|     16|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|     16|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (4093:9): [True: 0, False: 16]
  ------------------
 4094|      0|        sftk_FreeSession(session);
 4095|      0|        return crv;
 4096|      0|    }
 4097|       |
 4098|     16|    context->multi = PR_TRUE;
  ------------------
  |  |  437|     16|#define PR_TRUE 1
  ------------------
 4099|       |
 4100|     16|    switch (pMechanism->mechanism) {
 4101|     16|        case CKM_RSA_PKCS:
  ------------------
  |  |  720|     16|#define CKM_RSA_PKCS 0x00000001UL
  ------------------
  |  Branch (4101:9): [True: 16, False: 0]
  ------------------
 4102|     16|        case CKM_RSA_X_509:
  ------------------
  |  |  722|     16|#define CKM_RSA_X_509 0x00000003UL
  ------------------
  |  Branch (4102:9): [True: 0, False: 16]
  ------------------
 4103|     16|            if (key_type != CKK_RSA) {
  ------------------
  |  |  372|     16|#define CKK_RSA 0x00000000UL
  ------------------
  |  Branch (4103:17): [True: 0, False: 16]
  ------------------
 4104|      0|                crv = CKR_KEY_TYPE_INCONSISTENT;
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
 4105|      0|                break;
 4106|      0|            }
 4107|     16|            context->multi = PR_FALSE;
  ------------------
  |  |  438|     16|#define PR_FALSE 0
  ------------------
 4108|     16|            context->rsa = PR_TRUE;
  ------------------
  |  |  437|     16|#define PR_TRUE 1
  ------------------
 4109|     16|            pubKey = sftk_GetPubKey(key, CKK_RSA, &crv);
  ------------------
  |  |  372|     16|#define CKK_RSA 0x00000000UL
  ------------------
 4110|     16|            if (pubKey == NULL) {
  ------------------
  |  Branch (4110:17): [True: 0, False: 16]
  ------------------
 4111|      0|                break;
 4112|      0|            }
 4113|     16|            context->cipherInfo = pubKey;
 4114|     16|            context->update = pMechanism->mechanism == CKM_RSA_X_509
  ------------------
  |  |  722|     16|#define CKM_RSA_X_509 0x00000003UL
  ------------------
  |  Branch (4114:31): [True: 0, False: 16]
  ------------------
 4115|     16|                                  ? sftk_RSACheckSignRecoverRaw
 4116|     16|                                  : sftk_RSACheckSignRecover;
 4117|     16|            context->destroy = sftk_Null;
 4118|     16|            break;
 4119|      0|        default:
  ------------------
  |  Branch (4119:9): [True: 0, False: 16]
  ------------------
 4120|      0|            crv = CKR_MECHANISM_INVALID;
  ------------------
  |  | 1447|      0|#define CKR_MECHANISM_INVALID 0x00000070UL
  ------------------
 4121|      0|            break;
 4122|     16|    }
 4123|       |
 4124|     16|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|     16|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (4124:9): [True: 0, False: 16]
  ------------------
 4125|      0|        PORT_Free(context);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 4126|      0|        sftk_FreeSession(session);
 4127|      0|        return crv;
 4128|      0|    }
 4129|     16|    sftk_SetContextByType(session, SFTK_VERIFY_RECOVER, context);
 4130|     16|    sftk_FreeSession(session);
 4131|     16|    return CKR_OK;
  ------------------
  |  | 1388|     16|#define CKR_OK 0x00000000UL
  ------------------
 4132|     16|}
NSC_VerifyRecover:
 4141|     16|{
 4142|     16|    SFTKSession *session;
 4143|     16|    SFTKSessionContext *context;
 4144|     16|    unsigned int outlen;
 4145|     16|    unsigned int maxoutlen = *pulDataLen;
 4146|     16|    CK_RV crv;
 4147|     16|    SECStatus rv;
 4148|       |
 4149|     16|    CHECK_FORK();
 4150|       |
 4151|       |    /* make sure we're legal */
 4152|     16|    crv = sftk_GetContext(hSession, &context, SFTK_VERIFY_RECOVER,
 4153|     16|                          PR_FALSE, &session);
  ------------------
  |  |  438|     16|#define PR_FALSE 0
  ------------------
 4154|     16|    if (crv != CKR_OK)
  ------------------
  |  | 1388|     16|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (4154:9): [True: 0, False: 16]
  ------------------
 4155|      0|        return crv;
 4156|     16|    if (pData == NULL) {
  ------------------
  |  Branch (4156:9): [True: 0, False: 16]
  ------------------
 4157|       |        /* to return the actual size, we need  to do the decrypt, just return
 4158|       |         * the max size, which is the size of the input signature. */
 4159|      0|        *pulDataLen = ulSignatureLen;
 4160|      0|        rv = SECSuccess;
 4161|      0|        goto finish;
 4162|      0|    }
 4163|       |
 4164|     16|    rv = (*context->update)(context->cipherInfo, pData, &outlen, maxoutlen,
 4165|     16|                            pSignature, ulSignatureLen);
 4166|     16|    *pulDataLen = (CK_ULONG)outlen;
 4167|       |
 4168|     16|    sftk_TerminateOp(session, SFTK_VERIFY_RECOVER, context);
 4169|     16|finish:
 4170|     16|    sftk_FreeSession(session);
 4171|     16|    return (rv == SECSuccess) ? CKR_OK : sftk_MapVerifyError(PORT_GetError());
  ------------------
  |  | 1388|      3|#define CKR_OK 0x00000000UL
  ------------------
                  return (rv == SECSuccess) ? CKR_OK : sftk_MapVerifyError(PORT_GetError());
  ------------------
  |  |   62|     13|#define PORT_GetError PORT_GetError_Util
  ------------------
  |  Branch (4171:12): [True: 3, False: 13]
  ------------------
 4172|     16|}
NSC_GenerateRandom:
 4196|  25.1k|{
 4197|  25.1k|    SECStatus rv;
 4198|       |
 4199|  25.1k|    CHECK_FORK();
 4200|       |
 4201|  25.1k|    rv = RNG_GenerateGlobalRandomBytes(pRandomData, ulRandomLen);
 4202|       |    /*
 4203|       |     * This may fail with SEC_ERROR_NEED_RANDOM, which means the RNG isn't
 4204|       |     * seeded with enough entropy.
 4205|       |     */
 4206|  25.1k|    return (rv == SECSuccess) ? CKR_OK : sftk_MapCryptError(PORT_GetError());
  ------------------
  |  | 1388|  25.1k|#define CKR_OK 0x00000000UL
  ------------------
                  return (rv == SECSuccess) ? CKR_OK : sftk_MapCryptError(PORT_GetError());
  ------------------
  |  |   62|      0|#define PORT_GetError PORT_GetError_Util
  ------------------
  |  Branch (4206:12): [True: 25.1k, False: 0]
  ------------------
 4207|  25.1k|}
NSC_GenerateKey:
 4761|  6.05k|{
 4762|  6.05k|    SFTKObject *key;
 4763|  6.05k|    SFTKSession *session;
 4764|  6.05k|    PRBool checkWeak = PR_FALSE;
  ------------------
  |  |  438|  6.05k|#define PR_FALSE 0
  ------------------
 4765|  6.05k|    CK_ULONG key_length = 0;
 4766|  6.05k|    CK_KEY_TYPE key_type = CKK_INVALID_KEY_TYPE;
  ------------------
  |  | 2759|  6.05k|#define CKK_INVALID_KEY_TYPE 0xffffffffUL
  ------------------
 4767|  6.05k|    CK_OBJECT_CLASS objclass = CKO_SECRET_KEY;
  ------------------
  |  |  329|  6.05k|#define CKO_SECRET_KEY 0x00000004UL
  ------------------
 4768|  6.05k|    CK_RV crv = CKR_OK;
  ------------------
  |  | 1388|  6.05k|#define CKR_OK 0x00000000UL
  ------------------
 4769|  6.05k|    CK_BBOOL cktrue = CK_TRUE;
  ------------------
  |  |   22|  6.05k|#define CK_TRUE 1
  ------------------
 4770|  6.05k|    NSSPKCS5PBEParameter *pbe_param = NULL;
 4771|  6.05k|    int i;
 4772|  6.05k|    SFTKSlot *slot = sftk_SlotFromSessionHandle(hSession);
 4773|  6.05k|    unsigned char buf[MAX_KEY_LEN];
 4774|  6.05k|    enum { nsc_pbe,
 4775|  6.05k|           nsc_ssl,
 4776|  6.05k|           nsc_bulk,
 4777|  6.05k|           nsc_param,
 4778|  6.05k|           nsc_jpake } key_gen_type;
 4779|  6.05k|    SSL3RSAPreMasterSecret *rsa_pms;
 4780|  6.05k|    CK_VERSION *version;
 4781|       |    /* in very old versions of NSS, there were implementation errors with key
 4782|       |     * generation methods.  We want to beable to read these, but not
 4783|       |     * produce them any more.  The affected algorithm was 3DES.
 4784|       |     */
 4785|  6.05k|    PRBool faultyPBE3DES = PR_FALSE;
  ------------------
  |  |  438|  6.05k|#define PR_FALSE 0
  ------------------
 4786|  6.05k|    HASH_HashType hashType = HASH_AlgNULL;
 4787|       |
 4788|  6.05k|    CHECK_FORK();
 4789|       |
 4790|  6.05k|    if (!slot) {
  ------------------
  |  Branch (4790:9): [True: 0, False: 6.05k]
  ------------------
 4791|      0|        return CKR_SESSION_HANDLE_INVALID;
  ------------------
  |  | 1465|      0|#define CKR_SESSION_HANDLE_INVALID 0x000000B3UL
  ------------------
 4792|      0|    }
 4793|       |    /*
 4794|       |     * now lets create an object to hang the attributes off of
 4795|       |     */
 4796|  6.05k|    key = sftk_NewObject(slot); /* fill in the handle later */
 4797|  6.05k|    if (key == NULL) {
  ------------------
  |  Branch (4797:9): [True: 0, False: 6.05k]
  ------------------
 4798|      0|        return CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 4799|      0|    }
 4800|       |
 4801|       |    /*
 4802|       |     * load the template values into the object
 4803|       |     */
 4804|  22.8k|    for (i = 0; i < (int)ulCount; i++) {
  ------------------
  |  Branch (4804:17): [True: 16.8k, False: 6.05k]
  ------------------
 4805|  16.8k|        if (pTemplate[i].type == CKA_VALUE_LEN) {
  ------------------
  |  |  580|  16.8k|#define CKA_VALUE_LEN 0x00000161UL
  ------------------
  |  Branch (4805:13): [True: 4.73k, False: 12.1k]
  ------------------
 4806|  4.73k|            key_length = *(CK_ULONG *)pTemplate[i].pValue;
 4807|  4.73k|            continue;
 4808|  4.73k|        }
 4809|       |        /* some algorithms need keytype specified */
 4810|  12.1k|        if (pTemplate[i].type == CKA_KEY_TYPE) {
  ------------------
  |  |  543|  12.1k|#define CKA_KEY_TYPE 0x00000100UL
  ------------------
  |  Branch (4810:13): [True: 0, False: 12.1k]
  ------------------
 4811|      0|            key_type = *(CK_ULONG *)pTemplate[i].pValue;
 4812|      0|            continue;
 4813|      0|        }
 4814|       |
 4815|  12.1k|        crv = sftk_AddAttributeType(key, sftk_attr_expand(&pTemplate[i]));
  ------------------
  |  |  587|  12.1k|#define sftk_attr_expand(ap) (ap)->type, (ap)->pValue, (ap)->ulValueLen
  ------------------
 4816|  12.1k|        if (crv != CKR_OK) {
  ------------------
  |  | 1388|  12.1k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (4816:13): [True: 0, False: 12.1k]
  ------------------
 4817|      0|            break;
 4818|      0|        }
 4819|  12.1k|    }
 4820|  6.05k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  6.05k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (4820:9): [True: 0, False: 6.05k]
  ------------------
 4821|      0|        goto loser;
 4822|      0|    }
 4823|       |
 4824|       |    /* make sure we don't have any class, key_type, or value fields */
 4825|  6.05k|    sftk_DeleteAttributeType(key, CKA_CLASS);
  ------------------
  |  |  511|  6.05k|#define CKA_CLASS 0x00000000UL
  ------------------
 4826|  6.05k|    sftk_DeleteAttributeType(key, CKA_KEY_TYPE);
  ------------------
  |  |  543|  6.05k|#define CKA_KEY_TYPE 0x00000100UL
  ------------------
 4827|  6.05k|    sftk_DeleteAttributeType(key, CKA_VALUE);
  ------------------
  |  |  516|  6.05k|#define CKA_VALUE 0x00000011UL
  ------------------
 4828|       |
 4829|       |    /* Now Set up the parameters to generate the key (based on mechanism) */
 4830|  6.05k|    key_gen_type = nsc_bulk; /* bulk key by default */
 4831|  6.05k|    switch (pMechanism->mechanism) {
 4832|      0|        case CKM_CDMF_KEY_GEN:
  ------------------
  |  |  834|      0|#define CKM_CDMF_KEY_GEN 0x00000140UL
  ------------------
  |  Branch (4832:9): [True: 0, False: 6.05k]
  ------------------
 4833|      0|        case CKM_DES_KEY_GEN:
  ------------------
  |  |  814|      0|#define CKM_DES_KEY_GEN 0x00000120UL
  ------------------
  |  Branch (4833:9): [True: 0, False: 6.05k]
  ------------------
 4834|      0|        case CKM_DES2_KEY_GEN:
  ------------------
  |  |  823|      0|#define CKM_DES2_KEY_GEN 0x00000130UL
  ------------------
  |  Branch (4834:9): [True: 0, False: 6.05k]
  ------------------
 4835|      0|        case CKM_DES3_KEY_GEN:
  ------------------
  |  |  824|      0|#define CKM_DES3_KEY_GEN 0x00000131UL
  ------------------
  |  Branch (4835:9): [True: 0, False: 6.05k]
  ------------------
 4836|      0|            checkWeak = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 4837|       |/* fall through */
 4838|      0|#ifndef NSS_DISABLE_DEPRECATED_RC2
 4839|      0|        case CKM_RC2_KEY_GEN:
  ------------------
  |  |  803|      0|#define CKM_RC2_KEY_GEN 0x00000100UL
  ------------------
  |  Branch (4839:9): [True: 0, False: 6.05k]
  ------------------
 4840|      0|#endif
 4841|      0|        case CKM_RC4_KEY_GEN:
  ------------------
  |  |  812|      0|#define CKM_RC4_KEY_GEN 0x00000110UL
  ------------------
  |  Branch (4841:9): [True: 0, False: 6.05k]
  ------------------
 4842|      0|        case CKM_GENERIC_SECRET_KEY_GEN:
  ------------------
  |  |  953|      0|#define CKM_GENERIC_SECRET_KEY_GEN 0x00000350UL
  ------------------
  |  Branch (4842:9): [True: 0, False: 6.05k]
  ------------------
 4843|      0|#ifndef NSS_DISABLE_DEPRECATED_SEED
 4844|      0|        case CKM_SEED_KEY_GEN:
  ------------------
  |  | 1155|      0|#define CKM_SEED_KEY_GEN 0x00000650UL
  ------------------
  |  Branch (4844:9): [True: 0, False: 6.05k]
  ------------------
 4845|      0|#endif
 4846|      0|        case CKM_CAMELLIA_KEY_GEN:
  ------------------
  |  | 1135|      0|#define CKM_CAMELLIA_KEY_GEN 0x00000550UL
  ------------------
  |  Branch (4846:9): [True: 0, False: 6.05k]
  ------------------
 4847|      0|        case CKM_AES_KEY_GEN:
  ------------------
  |  | 1106|      0|#define CKM_AES_KEY_GEN 0x00001080UL
  ------------------
  |  Branch (4847:9): [True: 0, False: 6.05k]
  ------------------
 4848|  4.73k|        case CKM_NSS_CHACHA20_KEY_GEN:
  ------------------
  |  |  242|  4.73k|#define CKM_NSS_CHACHA20_KEY_GEN (CKM_NSS + 27)
  |  |  ------------------
  |  |  |  |  162|  4.73k|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|  4.73k|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  4.73k|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (4848:9): [True: 4.73k, False: 1.31k]
  ------------------
 4849|  4.73k|        case CKM_CHACHA20_KEY_GEN:
  ------------------
  |  | 1203|  4.73k|#define CKM_CHACHA20_KEY_GEN 0x00001225UL
  ------------------
  |  Branch (4849:9): [True: 0, False: 6.05k]
  ------------------
 4850|       |#if NSS_SOFTOKEN_DOES_RC5
 4851|       |        case CKM_RC5_KEY_GEN:
 4852|       |#endif
 4853|  4.73k|            crv = nsc_SetupBulkKeyGen(pMechanism->mechanism, &key_type, &key_length);
 4854|  4.73k|            break;
 4855|  1.31k|        case CKM_SSL3_PRE_MASTER_KEY_GEN:
  ------------------
  |  |  959|  1.31k|#define CKM_SSL3_PRE_MASTER_KEY_GEN 0x00000370UL
  ------------------
  |  Branch (4855:9): [True: 1.31k, False: 4.73k]
  ------------------
 4856|  1.31k|            key_type = CKK_GENERIC_SECRET;
  ------------------
  |  |  383|  1.31k|#define CKK_GENERIC_SECRET 0x00000010UL
  ------------------
 4857|  1.31k|            key_length = 48;
 4858|  1.31k|            key_gen_type = nsc_ssl;
 4859|  1.31k|            break;
 4860|      0|        case CKM_PBA_SHA1_WITH_SHA1_HMAC:
  ------------------
  |  | 1015|      0|#define CKM_PBA_SHA1_WITH_SHA1_HMAC 0x000003C0UL
  ------------------
  |  Branch (4860:9): [True: 0, False: 6.05k]
  ------------------
 4861|      0|        case CKM_NSS_PBE_SHA1_HMAC_KEY_GEN:
  ------------------
  |  |  293|      0|#define CKM_NSS_PBE_SHA1_HMAC_KEY_GEN 0x80000009UL
  ------------------
  |  Branch (4861:9): [True: 0, False: 6.05k]
  ------------------
 4862|      0|        case CKM_NSS_PBE_MD5_HMAC_KEY_GEN:
  ------------------
  |  |  294|      0|#define CKM_NSS_PBE_MD5_HMAC_KEY_GEN 0x8000000aUL
  ------------------
  |  Branch (4862:9): [True: 0, False: 6.05k]
  ------------------
 4863|      0|        case CKM_NSS_PBE_MD2_HMAC_KEY_GEN:
  ------------------
  |  |  295|      0|#define CKM_NSS_PBE_MD2_HMAC_KEY_GEN 0x8000000bUL
  ------------------
  |  Branch (4863:9): [True: 0, False: 6.05k]
  ------------------
 4864|      0|        case CKM_NSS_PKCS12_PBE_SHA224_HMAC_KEY_GEN:
  ------------------
  |  |  246|      0|#define CKM_NSS_PKCS12_PBE_SHA224_HMAC_KEY_GEN (CKM_NSS + 29)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (4864:9): [True: 0, False: 6.05k]
  ------------------
 4865|      0|        case CKM_NSS_PKCS12_PBE_SHA256_HMAC_KEY_GEN:
  ------------------
  |  |  247|      0|#define CKM_NSS_PKCS12_PBE_SHA256_HMAC_KEY_GEN (CKM_NSS + 30)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (4865:9): [True: 0, False: 6.05k]
  ------------------
 4866|      0|        case CKM_NSS_PKCS12_PBE_SHA384_HMAC_KEY_GEN:
  ------------------
  |  |  248|      0|#define CKM_NSS_PKCS12_PBE_SHA384_HMAC_KEY_GEN (CKM_NSS + 31)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (4866:9): [True: 0, False: 6.05k]
  ------------------
 4867|      0|        case CKM_NSS_PKCS12_PBE_SHA512_HMAC_KEY_GEN:
  ------------------
  |  |  249|      0|#define CKM_NSS_PKCS12_PBE_SHA512_HMAC_KEY_GEN (CKM_NSS + 32)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (4867:9): [True: 0, False: 6.05k]
  ------------------
 4868|      0|            key_gen_type = nsc_pbe;
 4869|      0|            key_type = CKK_GENERIC_SECRET;
  ------------------
  |  |  383|      0|#define CKK_GENERIC_SECRET 0x00000010UL
  ------------------
 4870|      0|            crv = nsc_SetupHMACKeyGen(pMechanism, &pbe_param);
 4871|      0|            break;
 4872|      0|        case CKM_NSS_PBE_SHA1_FAULTY_3DES_CBC:
  ------------------
  |  |  292|      0|#define CKM_NSS_PBE_SHA1_FAULTY_3DES_CBC 0x80000008UL
  ------------------
  |  Branch (4872:9): [True: 0, False: 6.05k]
  ------------------
 4873|      0|            faultyPBE3DES = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 4874|       |        /* fall through */
 4875|      0|        case CKM_NSS_PBE_SHA1_TRIPLE_DES_CBC:
  ------------------
  |  |  287|      0|#define CKM_NSS_PBE_SHA1_TRIPLE_DES_CBC 0x80000003UL
  ------------------
  |  Branch (4875:9): [True: 0, False: 6.05k]
  ------------------
 4876|      0|#ifndef NSS_DISABLE_DEPRECATED_RC2
 4877|      0|        case CKM_NSS_PBE_SHA1_40_BIT_RC2_CBC:
  ------------------
  |  |  288|      0|#define CKM_NSS_PBE_SHA1_40_BIT_RC2_CBC 0x80000004UL
  ------------------
  |  Branch (4877:9): [True: 0, False: 6.05k]
  ------------------
 4878|      0|        case CKM_NSS_PBE_SHA1_128_BIT_RC2_CBC:
  ------------------
  |  |  289|      0|#define CKM_NSS_PBE_SHA1_128_BIT_RC2_CBC 0x80000005UL
  ------------------
  |  Branch (4878:9): [True: 0, False: 6.05k]
  ------------------
 4879|      0|        case CKM_PBE_SHA1_RC2_128_CBC:
  ------------------
  |  | 1009|      0|#define CKM_PBE_SHA1_RC2_128_CBC 0x000003AAUL
  ------------------
  |  Branch (4879:9): [True: 0, False: 6.05k]
  ------------------
 4880|      0|        case CKM_PBE_SHA1_RC2_40_CBC:
  ------------------
  |  | 1010|      0|#define CKM_PBE_SHA1_RC2_40_CBC 0x000003ABUL
  ------------------
  |  Branch (4880:9): [True: 0, False: 6.05k]
  ------------------
 4881|      0|#endif
 4882|      0|        case CKM_NSS_PBE_SHA1_DES_CBC:
  ------------------
  |  |  286|      0|#define CKM_NSS_PBE_SHA1_DES_CBC 0x80000002UL
  ------------------
  |  Branch (4882:9): [True: 0, False: 6.05k]
  ------------------
 4883|      0|        case CKM_NSS_PBE_SHA1_40_BIT_RC4:
  ------------------
  |  |  290|      0|#define CKM_NSS_PBE_SHA1_40_BIT_RC4 0x80000006UL
  ------------------
  |  Branch (4883:9): [True: 0, False: 6.05k]
  ------------------
 4884|      0|        case CKM_NSS_PBE_SHA1_128_BIT_RC4:
  ------------------
  |  |  291|      0|#define CKM_NSS_PBE_SHA1_128_BIT_RC4 0x80000007UL
  ------------------
  |  Branch (4884:9): [True: 0, False: 6.05k]
  ------------------
 4885|      0|        case CKM_PBE_SHA1_DES3_EDE_CBC:
  ------------------
  |  | 1007|      0|#define CKM_PBE_SHA1_DES3_EDE_CBC 0x000003A8UL
  ------------------
  |  Branch (4885:9): [True: 0, False: 6.05k]
  ------------------
 4886|      0|        case CKM_PBE_SHA1_DES2_EDE_CBC:
  ------------------
  |  | 1008|      0|#define CKM_PBE_SHA1_DES2_EDE_CBC 0x000003A9UL
  ------------------
  |  Branch (4886:9): [True: 0, False: 6.05k]
  ------------------
 4887|      0|        case CKM_PBE_SHA1_RC4_128:
  ------------------
  |  | 1005|      0|#define CKM_PBE_SHA1_RC4_128 0x000003A6UL
  ------------------
  |  Branch (4887:9): [True: 0, False: 6.05k]
  ------------------
 4888|      0|        case CKM_PBE_SHA1_RC4_40:
  ------------------
  |  | 1006|      0|#define CKM_PBE_SHA1_RC4_40 0x000003A7UL
  ------------------
  |  Branch (4888:9): [True: 0, False: 6.05k]
  ------------------
 4889|      0|        case CKM_PBE_MD5_DES_CBC:
  ------------------
  |  |  998|      0|#define CKM_PBE_MD5_DES_CBC 0x000003A1UL
  ------------------
  |  Branch (4889:9): [True: 0, False: 6.05k]
  ------------------
 4890|      0|        case CKM_PBE_MD2_DES_CBC:
  ------------------
  |  |  997|      0|#define CKM_PBE_MD2_DES_CBC 0x000003A0UL
  ------------------
  |  Branch (4890:9): [True: 0, False: 6.05k]
  ------------------
 4891|      0|        case CKM_PKCS5_PBKD2:
  ------------------
  |  | 1013|      0|#define CKM_PKCS5_PBKD2 0x000003B0UL
  ------------------
  |  Branch (4891:9): [True: 0, False: 6.05k]
  ------------------
 4892|      0|            key_gen_type = nsc_pbe;
 4893|      0|            crv = nsc_SetupPBEKeyGen(pMechanism, &pbe_param, &key_type, &key_length);
 4894|      0|            break;
 4895|      0|        case CKM_DSA_PARAMETER_GEN:
  ------------------
  |  | 1212|      0|#define CKM_DSA_PARAMETER_GEN 0x00002000UL
  ------------------
  |  Branch (4895:9): [True: 0, False: 6.05k]
  ------------------
 4896|      0|            key_gen_type = nsc_param;
 4897|      0|            key_type = CKK_DSA;
  ------------------
  |  |  373|      0|#define CKK_DSA 0x00000001UL
  ------------------
 4898|      0|            objclass = CKO_DOMAIN_PARAMETERS;
  ------------------
  |  |  331|      0|#define CKO_DOMAIN_PARAMETERS 0x00000006UL
  ------------------
 4899|      0|            crv = CKR_OK;
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
 4900|      0|            break;
 4901|      0|        case CKM_NSS_JPAKE_ROUND1_SHA1:
  ------------------
  |  |  182|      0|#define CKM_NSS_JPAKE_ROUND1_SHA1 (CKM_NSS + 7)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (4901:9): [True: 0, False: 6.05k]
  ------------------
 4902|      0|            hashType = HASH_AlgSHA1;
 4903|      0|            goto jpake1;
 4904|      0|        case CKM_NSS_JPAKE_ROUND1_SHA256:
  ------------------
  |  |  183|      0|#define CKM_NSS_JPAKE_ROUND1_SHA256 (CKM_NSS + 8)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (4904:9): [True: 0, False: 6.05k]
  ------------------
 4905|      0|            hashType = HASH_AlgSHA256;
 4906|      0|            goto jpake1;
 4907|      0|        case CKM_NSS_JPAKE_ROUND1_SHA384:
  ------------------
  |  |  184|      0|#define CKM_NSS_JPAKE_ROUND1_SHA384 (CKM_NSS + 9)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (4907:9): [True: 0, False: 6.05k]
  ------------------
 4908|      0|            hashType = HASH_AlgSHA384;
 4909|      0|            goto jpake1;
 4910|      0|        case CKM_NSS_JPAKE_ROUND1_SHA512:
  ------------------
  |  |  185|      0|#define CKM_NSS_JPAKE_ROUND1_SHA512 (CKM_NSS + 10)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (4910:9): [True: 0, False: 6.05k]
  ------------------
 4911|      0|            hashType = HASH_AlgSHA512;
 4912|      0|            goto jpake1;
 4913|      0|        jpake1:
 4914|      0|            key_gen_type = nsc_jpake;
 4915|      0|            key_type = CKK_NSS_JPAKE_ROUND1;
  ------------------
  |  |   53|      0|#define CKK_NSS_JPAKE_ROUND1 (CKK_NSS + 2)
  |  |  ------------------
  |  |  |  |   49|      0|#define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  458|      0|#define CKK_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4916|      0|            objclass = CKO_PRIVATE_KEY;
  ------------------
  |  |  328|      0|#define CKO_PRIVATE_KEY 0x00000003UL
  ------------------
 4917|      0|            if (pMechanism->pParameter == NULL ||
  ------------------
  |  Branch (4917:17): [True: 0, False: 0]
  ------------------
 4918|      0|                pMechanism->ulParameterLen != sizeof(CK_NSS_JPAKERound1Params)) {
  ------------------
  |  Branch (4918:17): [True: 0, False: 0]
  ------------------
 4919|      0|                crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 4920|      0|                break;
 4921|      0|            }
 4922|      0|            if (sftk_isTrue(key, CKA_TOKEN)) {
  ------------------
  |  |  512|      0|#define CKA_TOKEN 0x00000001UL
  ------------------
  |  Branch (4922:17): [True: 0, False: 0]
  ------------------
 4923|      0|                crv = CKR_TEMPLATE_INCONSISTENT;
  ------------------
  |  | 1478|      0|#define CKR_TEMPLATE_INCONSISTENT 0x000000D1UL
  ------------------
 4924|      0|                break;
 4925|      0|            }
 4926|      0|            crv = CKR_OK;
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
 4927|      0|            break;
 4928|      0|        default:
  ------------------
  |  Branch (4928:9): [True: 0, False: 6.05k]
  ------------------
 4929|      0|            crv = CKR_MECHANISM_INVALID;
  ------------------
  |  | 1447|      0|#define CKR_MECHANISM_INVALID 0x00000070UL
  ------------------
 4930|      0|            break;
 4931|  6.05k|    }
 4932|       |
 4933|       |    /* make sure we aren't going to overflow the buffer */
 4934|  6.05k|    if (sizeof(buf) < key_length) {
  ------------------
  |  Branch (4934:9): [True: 0, False: 6.05k]
  ------------------
 4935|       |        /* someone is getting pretty optimistic about how big their key can
 4936|       |         * be... */
 4937|      0|        crv = CKR_TEMPLATE_INCONSISTENT;
  ------------------
  |  | 1478|      0|#define CKR_TEMPLATE_INCONSISTENT 0x000000D1UL
  ------------------
 4938|      0|    }
 4939|       |
 4940|  6.05k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  6.05k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (4940:9): [True: 0, False: 6.05k]
  ------------------
 4941|      0|        if (pbe_param) {
  ------------------
  |  Branch (4941:13): [True: 0, False: 0]
  ------------------
 4942|      0|            nsspkcs5_DestroyPBEParameter(pbe_param);
 4943|      0|        }
 4944|      0|        goto loser;
 4945|      0|    }
 4946|       |
 4947|       |    /* if there was no error,
 4948|       |     * key_type *MUST* be set in the switch statement above */
 4949|  6.05k|    PORT_Assert(key_type != CKK_INVALID_KEY_TYPE);
  ------------------
  |  |  120|  6.05k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  6.05k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 6.05k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4950|       |
 4951|       |    /*
 4952|       |     * now to the actual key gen.
 4953|       |     */
 4954|  6.05k|    switch (key_gen_type) {
  ------------------
  |  Branch (4954:13): [True: 0, False: 6.05k]
  ------------------
 4955|      0|        case nsc_pbe:
  ------------------
  |  Branch (4955:9): [True: 0, False: 6.05k]
  ------------------
 4956|      0|            crv = nsc_pbe_key_gen(pbe_param, pMechanism, buf, &key_length,
 4957|      0|                                  faultyPBE3DES);
 4958|      0|            nsspkcs5_DestroyPBEParameter(pbe_param);
 4959|      0|            break;
 4960|  1.31k|        case nsc_ssl:
  ------------------
  |  Branch (4960:9): [True: 1.31k, False: 4.73k]
  ------------------
 4961|  1.31k|            rsa_pms = (SSL3RSAPreMasterSecret *)buf;
 4962|  1.31k|            if (BAD_PARAM_CAST(pMechanism, sizeof(CK_VERSION))) {
  ------------------
  |  |   50|  1.31k|#define BAD_PARAM_CAST(pMech, typeSize) (!pMech->pParameter || pMech->ulParameterLen < typeSize)
  |  |  ------------------
  |  |  |  Branch (50:42): [True: 0, False: 1.31k]
  |  |  |  Branch (50:64): [True: 0, False: 1.31k]
  |  |  ------------------
  ------------------
 4963|      0|                crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 4964|      0|                goto loser;
 4965|      0|            }
 4966|  1.31k|            version = (CK_VERSION *)pMechanism->pParameter;
 4967|  1.31k|            rsa_pms->client_version[0] = version->major;
 4968|  1.31k|            rsa_pms->client_version[1] = version->minor;
 4969|  1.31k|            crv =
 4970|  1.31k|                NSC_GenerateRandom(0, &rsa_pms->random[0], sizeof(rsa_pms->random));
 4971|  1.31k|            break;
 4972|  4.73k|        case nsc_bulk:
  ------------------
  |  Branch (4972:9): [True: 4.73k, False: 1.31k]
  ------------------
 4973|       |            /* get the key, check for weak keys and repeat if found */
 4974|  4.73k|            do {
 4975|  4.73k|                crv = NSC_GenerateRandom(0, buf, key_length);
 4976|  4.73k|            } while (crv == CKR_OK && checkWeak && sftk_IsWeakKey(buf, key_type));
  ------------------
  |  | 1388|  9.46k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (4976:22): [True: 4.73k, False: 0]
  |  Branch (4976:39): [True: 0, False: 4.73k]
  |  Branch (4976:52): [True: 0, False: 0]
  ------------------
 4977|  4.73k|            break;
 4978|      0|        case nsc_param:
  ------------------
  |  Branch (4978:9): [True: 0, False: 6.05k]
  ------------------
 4979|       |            /* generate parameters */
 4980|      0|            *buf = 0;
 4981|      0|            crv = nsc_parameter_gen(key_type, key);
 4982|      0|            break;
 4983|      0|        case nsc_jpake:
  ------------------
  |  Branch (4983:9): [True: 0, False: 6.05k]
  ------------------
 4984|      0|            if (BAD_PARAM_CAST(pMechanism, sizeof(CK_NSS_JPAKERound1Params))) {
  ------------------
  |  |   50|      0|#define BAD_PARAM_CAST(pMech, typeSize) (!pMech->pParameter || pMech->ulParameterLen < typeSize)
  |  |  ------------------
  |  |  |  Branch (50:42): [True: 0, False: 0]
  |  |  |  Branch (50:64): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4985|      0|                crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 4986|      0|                goto loser;
 4987|      0|            }
 4988|      0|            crv = jpake_Round1(hashType,
 4989|      0|                               (CK_NSS_JPAKERound1Params *)pMechanism->pParameter,
 4990|      0|                               key);
 4991|      0|            break;
 4992|  6.05k|    }
 4993|       |
 4994|  6.05k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  6.05k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (4994:9): [True: 0, False: 6.05k]
  ------------------
 4995|      0|        goto loser;
 4996|      0|    }
 4997|       |
 4998|       |    /* Add the class, key_type, and value */
 4999|  6.05k|    crv = sftk_AddAttributeType(key, CKA_CLASS, &objclass, sizeof(CK_OBJECT_CLASS));
  ------------------
  |  |  511|  6.05k|#define CKA_CLASS 0x00000000UL
  ------------------
 5000|  6.05k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  6.05k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5000:9): [True: 0, False: 6.05k]
  ------------------
 5001|      0|        goto loser;
 5002|      0|    }
 5003|  6.05k|    crv = sftk_AddAttributeType(key, CKA_KEY_TYPE, &key_type, sizeof(CK_KEY_TYPE));
  ------------------
  |  |  543|  6.05k|#define CKA_KEY_TYPE 0x00000100UL
  ------------------
 5004|  6.05k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  6.05k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5004:9): [True: 0, False: 6.05k]
  ------------------
 5005|      0|        goto loser;
 5006|      0|    }
 5007|  6.05k|    if (key_length != 0) {
  ------------------
  |  Branch (5007:9): [True: 6.05k, False: 0]
  ------------------
 5008|  6.05k|        crv = sftk_AddAttributeType(key, CKA_VALUE, buf, key_length);
  ------------------
  |  |  516|  6.05k|#define CKA_VALUE 0x00000011UL
  ------------------
 5009|  6.05k|        if (crv != CKR_OK) {
  ------------------
  |  | 1388|  6.05k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5009:13): [True: 0, False: 6.05k]
  ------------------
 5010|      0|            goto loser;
 5011|      0|        }
 5012|  6.05k|    }
 5013|       |
 5014|       |    /* get the session */
 5015|  6.05k|    session = sftk_SessionFromHandle(hSession);
 5016|  6.05k|    if (session == NULL) {
  ------------------
  |  Branch (5016:9): [True: 0, False: 6.05k]
  ------------------
 5017|      0|        crv = CKR_SESSION_HANDLE_INVALID;
  ------------------
  |  | 1465|      0|#define CKR_SESSION_HANDLE_INVALID 0x000000B3UL
  ------------------
 5018|      0|        goto loser;
 5019|      0|    }
 5020|       |
 5021|       |    /*
 5022|       |     * handle the base object stuff
 5023|       |     */
 5024|  6.05k|    crv = sftk_handleObject(key, session);
 5025|  6.05k|    sftk_FreeSession(session);
 5026|  6.05k|    if (crv == CKR_OK && sftk_isTrue(key, CKA_SENSITIVE)) {
  ------------------
  |  | 1388|  12.1k|#define CKR_OK 0x00000000UL
  ------------------
                  if (crv == CKR_OK && sftk_isTrue(key, CKA_SENSITIVE)) {
  ------------------
  |  |  546|  6.05k|#define CKA_SENSITIVE 0x00000103UL
  ------------------
  |  Branch (5026:9): [True: 6.05k, False: 0]
  |  Branch (5026:26): [True: 0, False: 6.05k]
  ------------------
 5027|      0|        crv = sftk_forceAttribute(key, CKA_ALWAYS_SENSITIVE, &cktrue, sizeof(CK_BBOOL));
  ------------------
  |  |  588|      0|#define CKA_ALWAYS_SENSITIVE 0x00000165UL
  ------------------
 5028|      0|    }
 5029|  6.05k|    if (crv == CKR_OK && !sftk_isTrue(key, CKA_EXTRACTABLE)) {
  ------------------
  |  | 1388|  12.1k|#define CKR_OK 0x00000000UL
  ------------------
                  if (crv == CKR_OK && !sftk_isTrue(key, CKA_EXTRACTABLE)) {
  ------------------
  |  |  585|  6.05k|#define CKA_EXTRACTABLE 0x00000162UL
  ------------------
  |  Branch (5029:9): [True: 6.05k, False: 0]
  |  Branch (5029:26): [True: 0, False: 6.05k]
  ------------------
 5030|      0|        crv = sftk_forceAttribute(key, CKA_NEVER_EXTRACTABLE, &cktrue, sizeof(CK_BBOOL));
  ------------------
  |  |  587|      0|#define CKA_NEVER_EXTRACTABLE 0x00000164UL
  ------------------
 5031|      0|    }
 5032|  6.05k|    if (crv == CKR_OK) {
  ------------------
  |  | 1388|  6.05k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5032:9): [True: 6.05k, False: 0]
  ------------------
 5033|  6.05k|        *phKey = key->handle;
 5034|  6.05k|    }
 5035|  6.05k|loser:
 5036|  6.05k|    PORT_Memset(buf, 0, sizeof buf);
  ------------------
  |  |  182|  6.05k|#define PORT_Memset memset
  ------------------
 5037|  6.05k|    sftk_FreeObject(key);
 5038|  6.05k|    return crv;
 5039|  6.05k|}
NSC_GenerateKeyPair:
 5495|  9.72k|{
 5496|  9.72k|    SFTKObject *publicKey, *privateKey;
 5497|  9.72k|    SFTKSession *session;
 5498|  9.72k|    CK_KEY_TYPE key_type;
 5499|  9.72k|    CK_RV crv = CKR_OK;
  ------------------
  |  | 1388|  9.72k|#define CKR_OK 0x00000000UL
  ------------------
 5500|  9.72k|    CK_BBOOL cktrue = CK_TRUE;
  ------------------
  |  |   22|  9.72k|#define CK_TRUE 1
  ------------------
 5501|  9.72k|    SECStatus rv;
 5502|  9.72k|    CK_OBJECT_CLASS pubClass = CKO_PUBLIC_KEY;
  ------------------
  |  |  327|  9.72k|#define CKO_PUBLIC_KEY 0x00000002UL
  ------------------
 5503|  9.72k|    CK_OBJECT_CLASS privClass = CKO_PRIVATE_KEY;
  ------------------
  |  |  328|  9.72k|#define CKO_PRIVATE_KEY 0x00000003UL
  ------------------
 5504|  9.72k|    int i;
 5505|  9.72k|    SFTKSlot *slot = sftk_SlotFromSessionHandle(hSession);
 5506|  9.72k|    unsigned int bitSize;
 5507|       |
 5508|       |    /* RSA */
 5509|  9.72k|    int public_modulus_bits = 0;
 5510|  9.72k|    SECItem pubExp;
 5511|  9.72k|    RSAPrivateKey *rsaPriv;
 5512|       |
 5513|       |    /* DSA */
 5514|  9.72k|    PQGParams pqgParam;
 5515|  9.72k|    DHParams dhParam;
 5516|  9.72k|    DSAPrivateKey *dsaPriv;
 5517|       |
 5518|       |    /* Diffie Hellman */
 5519|  9.72k|    DHPrivateKey *dhPriv;
 5520|       |
 5521|       |    /* Elliptic Curve Cryptography */
 5522|  9.72k|    SECItem ecEncodedParams; /* DER Encoded parameters */
 5523|  9.72k|    ECPrivateKey *ecPriv;
 5524|  9.72k|    ECParams *ecParams;
 5525|       |
 5526|       |    /* Kyber */
 5527|  9.72k|    CK_NSS_KEM_PARAMETER_SET_TYPE ckKyberParamSet;
 5528|       |
 5529|  9.72k|    CHECK_FORK();
 5530|       |
 5531|  9.72k|    if (!slot) {
  ------------------
  |  Branch (5531:9): [True: 0, False: 9.72k]
  ------------------
 5532|      0|        return CKR_SESSION_HANDLE_INVALID;
  ------------------
  |  | 1465|      0|#define CKR_SESSION_HANDLE_INVALID 0x000000B3UL
  ------------------
 5533|      0|    }
 5534|       |    /*
 5535|       |     * now lets create an object to hang the attributes off of
 5536|       |     */
 5537|  9.72k|    publicKey = sftk_NewObject(slot); /* fill in the handle later */
 5538|  9.72k|    if (publicKey == NULL) {
  ------------------
  |  Branch (5538:9): [True: 0, False: 9.72k]
  ------------------
 5539|      0|        return CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 5540|      0|    }
 5541|       |
 5542|       |    /*
 5543|       |     * load the template values into the publicKey
 5544|       |     */
 5545|  78.9k|    for (i = 0; i < (int)ulPublicKeyAttributeCount; i++) {
  ------------------
  |  Branch (5545:17): [True: 69.2k, False: 9.72k]
  ------------------
 5546|  69.2k|        if (pPublicKeyTemplate[i].type == CKA_MODULUS_BITS) {
  ------------------
  |  |  559|  69.2k|#define CKA_MODULUS_BITS 0x00000121UL
  ------------------
  |  Branch (5546:13): [True: 0, False: 69.2k]
  ------------------
 5547|      0|            public_modulus_bits = *(CK_ULONG *)pPublicKeyTemplate[i].pValue;
 5548|      0|            continue;
 5549|      0|        }
 5550|       |
 5551|  69.2k|        if (pPublicKeyTemplate[i].type == CKA_NSS_PARAMETER_SET) {
  ------------------
  |  |  113|  69.2k|#define CKA_NSS_PARAMETER_SET (CKA_NSS + 40)
  |  |  ------------------
  |  |  |  |   77|  69.2k|#define CKA_NSS (CKA_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  692|  69.2k|#define CKA_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKA_NSS (CKA_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  69.2k|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (5551:13): [True: 40, False: 69.1k]
  ------------------
 5552|     40|            ckKyberParamSet = *(CK_NSS_KEM_PARAMETER_SET_TYPE *)pPublicKeyTemplate[i].pValue;
 5553|     40|            continue;
 5554|     40|        }
 5555|       |
 5556|  69.1k|        crv = sftk_AddAttributeType(publicKey,
 5557|  69.1k|                                    sftk_attr_expand(&pPublicKeyTemplate[i]));
  ------------------
  |  |  587|  69.1k|#define sftk_attr_expand(ap) (ap)->type, (ap)->pValue, (ap)->ulValueLen
  ------------------
 5558|  69.1k|        if (crv != CKR_OK)
  ------------------
  |  | 1388|  69.1k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5558:13): [True: 0, False: 69.1k]
  ------------------
 5559|      0|            break;
 5560|  69.1k|    }
 5561|       |
 5562|  9.72k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  9.72k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5562:9): [True: 0, False: 9.72k]
  ------------------
 5563|      0|        sftk_FreeObject(publicKey);
 5564|      0|        return CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 5565|      0|    }
 5566|       |
 5567|  9.72k|    privateKey = sftk_NewObject(slot); /* fill in the handle later */
 5568|  9.72k|    if (privateKey == NULL) {
  ------------------
  |  Branch (5568:9): [True: 0, False: 9.72k]
  ------------------
 5569|      0|        sftk_FreeObject(publicKey);
 5570|      0|        return CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 5571|      0|    }
 5572|       |    /*
 5573|       |     * now load the private key template
 5574|       |     */
 5575|  77.8k|    for (i = 0; i < (int)ulPrivateKeyAttributeCount; i++) {
  ------------------
  |  Branch (5575:17): [True: 68.0k, False: 9.72k]
  ------------------
 5576|  68.0k|        if (pPrivateKeyTemplate[i].type == CKA_VALUE_BITS) {
  ------------------
  |  |  579|  68.0k|#define CKA_VALUE_BITS 0x00000160UL
  ------------------
  |  Branch (5576:13): [True: 0, False: 68.0k]
  ------------------
 5577|      0|            continue;
 5578|      0|        }
 5579|       |
 5580|  68.0k|        crv = sftk_AddAttributeType(privateKey,
 5581|  68.0k|                                    sftk_attr_expand(&pPrivateKeyTemplate[i]));
  ------------------
  |  |  587|  68.0k|#define sftk_attr_expand(ap) (ap)->type, (ap)->pValue, (ap)->ulValueLen
  ------------------
 5582|  68.0k|        if (crv != CKR_OK)
  ------------------
  |  | 1388|  68.0k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5582:13): [True: 0, False: 68.0k]
  ------------------
 5583|      0|            break;
 5584|  68.0k|    }
 5585|       |
 5586|  9.72k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  9.72k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5586:9): [True: 0, False: 9.72k]
  ------------------
 5587|      0|        sftk_FreeObject(publicKey);
 5588|      0|        sftk_FreeObject(privateKey);
 5589|      0|        return CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 5590|      0|    }
 5591|  9.72k|    sftk_DeleteAttributeType(privateKey, CKA_CLASS);
  ------------------
  |  |  511|  9.72k|#define CKA_CLASS 0x00000000UL
  ------------------
 5592|  9.72k|    sftk_DeleteAttributeType(privateKey, CKA_KEY_TYPE);
  ------------------
  |  |  543|  9.72k|#define CKA_KEY_TYPE 0x00000100UL
  ------------------
 5593|  9.72k|    sftk_DeleteAttributeType(privateKey, CKA_VALUE);
  ------------------
  |  |  516|  9.72k|#define CKA_VALUE 0x00000011UL
  ------------------
 5594|  9.72k|    sftk_DeleteAttributeType(publicKey, CKA_CLASS);
  ------------------
  |  |  511|  9.72k|#define CKA_CLASS 0x00000000UL
  ------------------
 5595|  9.72k|    sftk_DeleteAttributeType(publicKey, CKA_KEY_TYPE);
  ------------------
  |  |  543|  9.72k|#define CKA_KEY_TYPE 0x00000100UL
  ------------------
 5596|  9.72k|    sftk_DeleteAttributeType(publicKey, CKA_VALUE);
  ------------------
  |  |  516|  9.72k|#define CKA_VALUE 0x00000011UL
  ------------------
 5597|       |
 5598|       |    /* Now Set up the parameters to generate the key (based on mechanism) */
 5599|  9.72k|    switch (pMechanism->mechanism) {
 5600|      0|        case CKM_RSA_PKCS_KEY_PAIR_GEN:
  ------------------
  |  |  719|      0|#define CKM_RSA_PKCS_KEY_PAIR_GEN 0x00000000UL
  ------------------
  |  Branch (5600:9): [True: 0, False: 9.72k]
  ------------------
 5601|       |            /* format the keys */
 5602|      0|            sftk_DeleteAttributeType(publicKey, CKA_MODULUS);
  ------------------
  |  |  558|      0|#define CKA_MODULUS 0x00000120UL
  ------------------
 5603|      0|            sftk_DeleteAttributeType(privateKey, CKA_NSS_DB);
  ------------------
  |  |  150|      0|#define CKA_NSS_DB 0xD5A0DB00L
  ------------------
 5604|      0|            sftk_DeleteAttributeType(privateKey, CKA_MODULUS);
  ------------------
  |  |  558|      0|#define CKA_MODULUS 0x00000120UL
  ------------------
 5605|      0|            sftk_DeleteAttributeType(privateKey, CKA_PRIVATE_EXPONENT);
  ------------------
  |  |  561|      0|#define CKA_PRIVATE_EXPONENT 0x00000123UL
  ------------------
 5606|      0|            sftk_DeleteAttributeType(privateKey, CKA_PUBLIC_EXPONENT);
  ------------------
  |  |  560|      0|#define CKA_PUBLIC_EXPONENT 0x00000122UL
  ------------------
 5607|      0|            sftk_DeleteAttributeType(privateKey, CKA_PRIME_1);
  ------------------
  |  |  562|      0|#define CKA_PRIME_1 0x00000124UL
  ------------------
 5608|      0|            sftk_DeleteAttributeType(privateKey, CKA_PRIME_2);
  ------------------
  |  |  563|      0|#define CKA_PRIME_2 0x00000125UL
  ------------------
 5609|      0|            sftk_DeleteAttributeType(privateKey, CKA_EXPONENT_1);
  ------------------
  |  |  564|      0|#define CKA_EXPONENT_1 0x00000126UL
  ------------------
 5610|      0|            sftk_DeleteAttributeType(privateKey, CKA_EXPONENT_2);
  ------------------
  |  |  565|      0|#define CKA_EXPONENT_2 0x00000127UL
  ------------------
 5611|      0|            sftk_DeleteAttributeType(privateKey, CKA_COEFFICIENT);
  ------------------
  |  |  566|      0|#define CKA_COEFFICIENT 0x00000128UL
  ------------------
 5612|      0|            key_type = CKK_RSA;
  ------------------
  |  |  372|      0|#define CKK_RSA 0x00000000UL
  ------------------
 5613|      0|            if (public_modulus_bits == 0) {
  ------------------
  |  Branch (5613:17): [True: 0, False: 0]
  ------------------
 5614|      0|                crv = CKR_TEMPLATE_INCOMPLETE;
  ------------------
  |  | 1477|      0|#define CKR_TEMPLATE_INCOMPLETE 0x000000D0UL
  ------------------
 5615|      0|                break;
 5616|      0|            }
 5617|      0|            if (public_modulus_bits < RSA_MIN_MODULUS_BITS) {
  ------------------
  |  |  151|      0|#define RSA_MIN_MODULUS_BITS 128
  ------------------
  |  Branch (5617:17): [True: 0, False: 0]
  ------------------
 5618|      0|                crv = CKR_ATTRIBUTE_VALUE_INVALID;
  ------------------
  |  | 1409|      0|#define CKR_ATTRIBUTE_VALUE_INVALID 0x00000013UL
  ------------------
 5619|      0|                break;
 5620|      0|            }
 5621|      0|            if (public_modulus_bits % 2 != 0) {
  ------------------
  |  Branch (5621:17): [True: 0, False: 0]
  ------------------
 5622|      0|                crv = CKR_ATTRIBUTE_VALUE_INVALID;
  ------------------
  |  | 1409|      0|#define CKR_ATTRIBUTE_VALUE_INVALID 0x00000013UL
  ------------------
 5623|      0|                break;
 5624|      0|            }
 5625|       |
 5626|       |            /* extract the exponent */
 5627|      0|            crv = sftk_Attribute2SSecItem(NULL, &pubExp, publicKey, CKA_PUBLIC_EXPONENT);
  ------------------
  |  |  560|      0|#define CKA_PUBLIC_EXPONENT 0x00000122UL
  ------------------
 5628|      0|            if (crv != CKR_OK)
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5628:17): [True: 0, False: 0]
  ------------------
 5629|      0|                break;
 5630|      0|            bitSize = sftk_GetLengthInBits(pubExp.data, pubExp.len);
 5631|      0|            if (bitSize < 2) {
  ------------------
  |  Branch (5631:17): [True: 0, False: 0]
  ------------------
 5632|      0|                crv = CKR_ATTRIBUTE_VALUE_INVALID;
  ------------------
  |  | 1409|      0|#define CKR_ATTRIBUTE_VALUE_INVALID 0x00000013UL
  ------------------
 5633|      0|                SECITEM_ZfreeItem(&pubExp, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                              SECITEM_ZfreeItem(&pubExp, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5634|      0|                break;
 5635|      0|            }
 5636|      0|            crv = sftk_AddAttributeType(privateKey, CKA_PUBLIC_EXPONENT,
  ------------------
  |  |  560|      0|#define CKA_PUBLIC_EXPONENT 0x00000122UL
  ------------------
 5637|      0|                                        sftk_item_expand(&pubExp));
  ------------------
  |  |  588|      0|#define sftk_item_expand(ip) (ip)->data, (ip)->len
  ------------------
 5638|      0|            if (crv != CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5638:17): [True: 0, False: 0]
  ------------------
 5639|      0|                SECITEM_ZfreeItem(&pubExp, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                              SECITEM_ZfreeItem(&pubExp, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5640|      0|                break;
 5641|      0|            }
 5642|       |
 5643|      0|            rsaPriv = RSA_NewKey(public_modulus_bits, &pubExp);
 5644|      0|            SECITEM_ZfreeItem(&pubExp, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                          SECITEM_ZfreeItem(&pubExp, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5645|      0|            if (rsaPriv == NULL) {
  ------------------
  |  Branch (5645:17): [True: 0, False: 0]
  ------------------
 5646|      0|                if (PORT_GetError() == SEC_ERROR_LIBRARY_FAILURE) {
  ------------------
  |  |   62|      0|#define PORT_GetError PORT_GetError_Util
  ------------------
  |  Branch (5646:21): [True: 0, False: 0]
  ------------------
 5647|      0|                    sftk_fatalError = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 5648|      0|                }
 5649|      0|                crv = sftk_MapCryptError(PORT_GetError());
  ------------------
  |  |   62|      0|#define PORT_GetError PORT_GetError_Util
  ------------------
 5650|      0|                break;
 5651|      0|            }
 5652|       |            /* now fill in the RSA dependent paramenters in the public key */
 5653|      0|            crv = sftk_AddAttributeType(publicKey, CKA_MODULUS,
  ------------------
  |  |  558|      0|#define CKA_MODULUS 0x00000120UL
  ------------------
 5654|      0|                                        sftk_item_expand(&rsaPriv->modulus));
  ------------------
  |  |  588|      0|#define sftk_item_expand(ip) (ip)->data, (ip)->len
  ------------------
 5655|      0|            if (crv != CKR_OK)
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5655:17): [True: 0, False: 0]
  ------------------
 5656|      0|                goto kpg_done;
 5657|       |            /* now fill in the RSA dependent paramenters in the private key */
 5658|      0|            crv = sftk_AddAttributeType(privateKey, CKA_NSS_DB,
  ------------------
  |  |  150|      0|#define CKA_NSS_DB 0xD5A0DB00L
  ------------------
 5659|      0|                                        sftk_item_expand(&rsaPriv->modulus));
  ------------------
  |  |  588|      0|#define sftk_item_expand(ip) (ip)->data, (ip)->len
  ------------------
 5660|      0|            if (crv != CKR_OK)
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5660:17): [True: 0, False: 0]
  ------------------
 5661|      0|                goto kpg_done;
 5662|      0|            crv = sftk_AddAttributeType(privateKey, CKA_MODULUS,
  ------------------
  |  |  558|      0|#define CKA_MODULUS 0x00000120UL
  ------------------
 5663|      0|                                        sftk_item_expand(&rsaPriv->modulus));
  ------------------
  |  |  588|      0|#define sftk_item_expand(ip) (ip)->data, (ip)->len
  ------------------
 5664|      0|            if (crv != CKR_OK)
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5664:17): [True: 0, False: 0]
  ------------------
 5665|      0|                goto kpg_done;
 5666|      0|            crv = sftk_AddAttributeType(privateKey, CKA_PRIVATE_EXPONENT,
  ------------------
  |  |  561|      0|#define CKA_PRIVATE_EXPONENT 0x00000123UL
  ------------------
 5667|      0|                                        sftk_item_expand(&rsaPriv->privateExponent));
  ------------------
  |  |  588|      0|#define sftk_item_expand(ip) (ip)->data, (ip)->len
  ------------------
 5668|      0|            if (crv != CKR_OK)
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5668:17): [True: 0, False: 0]
  ------------------
 5669|      0|                goto kpg_done;
 5670|      0|            crv = sftk_AddAttributeType(privateKey, CKA_PRIME_1,
  ------------------
  |  |  562|      0|#define CKA_PRIME_1 0x00000124UL
  ------------------
 5671|      0|                                        sftk_item_expand(&rsaPriv->prime1));
  ------------------
  |  |  588|      0|#define sftk_item_expand(ip) (ip)->data, (ip)->len
  ------------------
 5672|      0|            if (crv != CKR_OK)
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5672:17): [True: 0, False: 0]
  ------------------
 5673|      0|                goto kpg_done;
 5674|      0|            crv = sftk_AddAttributeType(privateKey, CKA_PRIME_2,
  ------------------
  |  |  563|      0|#define CKA_PRIME_2 0x00000125UL
  ------------------
 5675|      0|                                        sftk_item_expand(&rsaPriv->prime2));
  ------------------
  |  |  588|      0|#define sftk_item_expand(ip) (ip)->data, (ip)->len
  ------------------
 5676|      0|            if (crv != CKR_OK)
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5676:17): [True: 0, False: 0]
  ------------------
 5677|      0|                goto kpg_done;
 5678|      0|            crv = sftk_AddAttributeType(privateKey, CKA_EXPONENT_1,
  ------------------
  |  |  564|      0|#define CKA_EXPONENT_1 0x00000126UL
  ------------------
 5679|      0|                                        sftk_item_expand(&rsaPriv->exponent1));
  ------------------
  |  |  588|      0|#define sftk_item_expand(ip) (ip)->data, (ip)->len
  ------------------
 5680|      0|            if (crv != CKR_OK)
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5680:17): [True: 0, False: 0]
  ------------------
 5681|      0|                goto kpg_done;
 5682|      0|            crv = sftk_AddAttributeType(privateKey, CKA_EXPONENT_2,
  ------------------
  |  |  565|      0|#define CKA_EXPONENT_2 0x00000127UL
  ------------------
 5683|      0|                                        sftk_item_expand(&rsaPriv->exponent2));
  ------------------
  |  |  588|      0|#define sftk_item_expand(ip) (ip)->data, (ip)->len
  ------------------
 5684|      0|            if (crv != CKR_OK)
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5684:17): [True: 0, False: 0]
  ------------------
 5685|      0|                goto kpg_done;
 5686|      0|            crv = sftk_AddAttributeType(privateKey, CKA_COEFFICIENT,
  ------------------
  |  |  566|      0|#define CKA_COEFFICIENT 0x00000128UL
  ------------------
 5687|      0|                                        sftk_item_expand(&rsaPriv->coefficient));
  ------------------
  |  |  588|      0|#define sftk_item_expand(ip) (ip)->data, (ip)->len
  ------------------
 5688|      0|        kpg_done:
 5689|       |            /* Should zeroize the contents first, since this func doesn't. */
 5690|      0|            PORT_FreeArena(rsaPriv->arena, PR_TRUE);
  ------------------
  |  |   61|      0|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                          PORT_FreeArena(rsaPriv->arena, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 5691|      0|            break;
 5692|      0|        case CKM_DSA_KEY_PAIR_GEN:
  ------------------
  |  |  744|      0|#define CKM_DSA_KEY_PAIR_GEN 0x00000010UL
  ------------------
  |  Branch (5692:9): [True: 0, False: 9.72k]
  ------------------
 5693|      0|            sftk_DeleteAttributeType(publicKey, CKA_VALUE);
  ------------------
  |  |  516|      0|#define CKA_VALUE 0x00000011UL
  ------------------
 5694|      0|            sftk_DeleteAttributeType(privateKey, CKA_NSS_DB);
  ------------------
  |  |  150|      0|#define CKA_NSS_DB 0xD5A0DB00L
  ------------------
 5695|      0|            sftk_DeleteAttributeType(privateKey, CKA_PRIME);
  ------------------
  |  |  569|      0|#define CKA_PRIME 0x00000130UL
  ------------------
 5696|      0|            sftk_DeleteAttributeType(privateKey, CKA_SUBPRIME);
  ------------------
  |  |  570|      0|#define CKA_SUBPRIME 0x00000131UL
  ------------------
 5697|      0|            sftk_DeleteAttributeType(privateKey, CKA_BASE);
  ------------------
  |  |  571|      0|#define CKA_BASE 0x00000132UL
  ------------------
 5698|      0|            key_type = CKK_DSA;
  ------------------
  |  |  373|      0|#define CKK_DSA 0x00000001UL
  ------------------
 5699|       |
 5700|       |            /* extract the necessary parameters and copy them to the private key */
 5701|      0|            crv = sftk_Attribute2SSecItem(NULL, &pqgParam.prime, publicKey, CKA_PRIME);
  ------------------
  |  |  569|      0|#define CKA_PRIME 0x00000130UL
  ------------------
 5702|      0|            if (crv != CKR_OK)
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5702:17): [True: 0, False: 0]
  ------------------
 5703|      0|                break;
 5704|      0|            crv = sftk_Attribute2SSecItem(NULL, &pqgParam.subPrime, publicKey,
 5705|      0|                                          CKA_SUBPRIME);
  ------------------
  |  |  570|      0|#define CKA_SUBPRIME 0x00000131UL
  ------------------
 5706|      0|            if (crv != CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5706:17): [True: 0, False: 0]
  ------------------
 5707|      0|                SECITEM_ZfreeItem(&pqgParam.prime, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                              SECITEM_ZfreeItem(&pqgParam.prime, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5708|      0|                break;
 5709|      0|            }
 5710|      0|            crv = sftk_Attribute2SSecItem(NULL, &pqgParam.base, publicKey, CKA_BASE);
  ------------------
  |  |  571|      0|#define CKA_BASE 0x00000132UL
  ------------------
 5711|      0|            if (crv != CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5711:17): [True: 0, False: 0]
  ------------------
 5712|      0|                SECITEM_ZfreeItem(&pqgParam.prime, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                              SECITEM_ZfreeItem(&pqgParam.prime, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5713|      0|                SECITEM_ZfreeItem(&pqgParam.subPrime, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                              SECITEM_ZfreeItem(&pqgParam.subPrime, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5714|      0|                break;
 5715|      0|            }
 5716|      0|            crv = sftk_AddAttributeType(privateKey, CKA_PRIME,
  ------------------
  |  |  569|      0|#define CKA_PRIME 0x00000130UL
  ------------------
 5717|      0|                                        sftk_item_expand(&pqgParam.prime));
  ------------------
  |  |  588|      0|#define sftk_item_expand(ip) (ip)->data, (ip)->len
  ------------------
 5718|      0|            if (crv != CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5718:17): [True: 0, False: 0]
  ------------------
 5719|      0|                SECITEM_ZfreeItem(&pqgParam.prime, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                              SECITEM_ZfreeItem(&pqgParam.prime, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5720|      0|                SECITEM_ZfreeItem(&pqgParam.subPrime, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                              SECITEM_ZfreeItem(&pqgParam.subPrime, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5721|      0|                SECITEM_ZfreeItem(&pqgParam.base, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                              SECITEM_ZfreeItem(&pqgParam.base, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5722|      0|                break;
 5723|      0|            }
 5724|      0|            crv = sftk_AddAttributeType(privateKey, CKA_SUBPRIME,
  ------------------
  |  |  570|      0|#define CKA_SUBPRIME 0x00000131UL
  ------------------
 5725|      0|                                        sftk_item_expand(&pqgParam.subPrime));
  ------------------
  |  |  588|      0|#define sftk_item_expand(ip) (ip)->data, (ip)->len
  ------------------
 5726|      0|            if (crv != CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5726:17): [True: 0, False: 0]
  ------------------
 5727|      0|                SECITEM_ZfreeItem(&pqgParam.prime, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                              SECITEM_ZfreeItem(&pqgParam.prime, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5728|      0|                SECITEM_ZfreeItem(&pqgParam.subPrime, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                              SECITEM_ZfreeItem(&pqgParam.subPrime, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5729|      0|                SECITEM_ZfreeItem(&pqgParam.base, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                              SECITEM_ZfreeItem(&pqgParam.base, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5730|      0|                break;
 5731|      0|            }
 5732|      0|            crv = sftk_AddAttributeType(privateKey, CKA_BASE,
  ------------------
  |  |  571|      0|#define CKA_BASE 0x00000132UL
  ------------------
 5733|      0|                                        sftk_item_expand(&pqgParam.base));
  ------------------
  |  |  588|      0|#define sftk_item_expand(ip) (ip)->data, (ip)->len
  ------------------
 5734|      0|            if (crv != CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5734:17): [True: 0, False: 0]
  ------------------
 5735|      0|                SECITEM_ZfreeItem(&pqgParam.prime, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                              SECITEM_ZfreeItem(&pqgParam.prime, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5736|      0|                SECITEM_ZfreeItem(&pqgParam.subPrime, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                              SECITEM_ZfreeItem(&pqgParam.subPrime, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5737|      0|                SECITEM_ZfreeItem(&pqgParam.base, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                              SECITEM_ZfreeItem(&pqgParam.base, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5738|      0|                break;
 5739|      0|            }
 5740|       |
 5741|       |            /*
 5742|       |             * these are checked by DSA_NewKey
 5743|       |             */
 5744|      0|            bitSize = sftk_GetLengthInBits(pqgParam.subPrime.data,
 5745|      0|                                           pqgParam.subPrime.len);
 5746|      0|            if ((bitSize < DSA_MIN_Q_BITS) || (bitSize > DSA_MAX_Q_BITS)) {
  ------------------
  |  |  200|      0|#define DSA_MIN_Q_BITS 160
  ------------------
                          if ((bitSize < DSA_MIN_Q_BITS) || (bitSize > DSA_MAX_Q_BITS)) {
  ------------------
  |  |  199|      0|#define DSA_MAX_Q_BITS 256
  ------------------
  |  Branch (5746:17): [True: 0, False: 0]
  |  Branch (5746:47): [True: 0, False: 0]
  ------------------
 5747|      0|                crv = CKR_TEMPLATE_INCOMPLETE;
  ------------------
  |  | 1477|      0|#define CKR_TEMPLATE_INCOMPLETE 0x000000D0UL
  ------------------
 5748|      0|                SECITEM_ZfreeItem(&pqgParam.prime, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                              SECITEM_ZfreeItem(&pqgParam.prime, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5749|      0|                SECITEM_ZfreeItem(&pqgParam.subPrime, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                              SECITEM_ZfreeItem(&pqgParam.subPrime, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5750|      0|                SECITEM_ZfreeItem(&pqgParam.base, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                              SECITEM_ZfreeItem(&pqgParam.base, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5751|      0|                break;
 5752|      0|            }
 5753|      0|            bitSize = sftk_GetLengthInBits(pqgParam.prime.data, pqgParam.prime.len);
 5754|      0|            if ((bitSize < DSA_MIN_P_BITS) || (bitSize > DSA_MAX_P_BITS)) {
  ------------------
  |  |  198|      0|#define DSA_MIN_P_BITS 512
  ------------------
                          if ((bitSize < DSA_MIN_P_BITS) || (bitSize > DSA_MAX_P_BITS)) {
  ------------------
  |  |  197|      0|#define DSA_MAX_P_BITS 3072
  ------------------
  |  Branch (5754:17): [True: 0, False: 0]
  |  Branch (5754:47): [True: 0, False: 0]
  ------------------
 5755|      0|                crv = CKR_TEMPLATE_INCOMPLETE;
  ------------------
  |  | 1477|      0|#define CKR_TEMPLATE_INCOMPLETE 0x000000D0UL
  ------------------
 5756|      0|                SECITEM_ZfreeItem(&pqgParam.prime, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                              SECITEM_ZfreeItem(&pqgParam.prime, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5757|      0|                SECITEM_ZfreeItem(&pqgParam.subPrime, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                              SECITEM_ZfreeItem(&pqgParam.subPrime, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5758|      0|                SECITEM_ZfreeItem(&pqgParam.base, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                              SECITEM_ZfreeItem(&pqgParam.base, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5759|      0|                break;
 5760|      0|            }
 5761|      0|            bitSize = sftk_GetLengthInBits(pqgParam.base.data, pqgParam.base.len);
 5762|      0|            if ((bitSize < 2) || (bitSize > DSA_MAX_P_BITS)) {
  ------------------
  |  |  197|      0|#define DSA_MAX_P_BITS 3072
  ------------------
  |  Branch (5762:17): [True: 0, False: 0]
  |  Branch (5762:34): [True: 0, False: 0]
  ------------------
 5763|      0|                crv = CKR_TEMPLATE_INCOMPLETE;
  ------------------
  |  | 1477|      0|#define CKR_TEMPLATE_INCOMPLETE 0x000000D0UL
  ------------------
 5764|      0|                SECITEM_ZfreeItem(&pqgParam.prime, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                              SECITEM_ZfreeItem(&pqgParam.prime, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5765|      0|                SECITEM_ZfreeItem(&pqgParam.subPrime, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                              SECITEM_ZfreeItem(&pqgParam.subPrime, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5766|      0|                SECITEM_ZfreeItem(&pqgParam.base, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                              SECITEM_ZfreeItem(&pqgParam.base, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5767|      0|                break;
 5768|      0|            }
 5769|       |
 5770|       |            /* Generate the key */
 5771|      0|            rv = DSA_NewKey(&pqgParam, &dsaPriv);
 5772|       |
 5773|      0|            SECITEM_ZfreeItem(&pqgParam.prime, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                          SECITEM_ZfreeItem(&pqgParam.prime, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5774|      0|            SECITEM_ZfreeItem(&pqgParam.subPrime, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                          SECITEM_ZfreeItem(&pqgParam.subPrime, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5775|      0|            SECITEM_ZfreeItem(&pqgParam.base, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                          SECITEM_ZfreeItem(&pqgParam.base, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5776|       |
 5777|      0|            if (rv != SECSuccess) {
  ------------------
  |  Branch (5777:17): [True: 0, False: 0]
  ------------------
 5778|      0|                if (PORT_GetError() == SEC_ERROR_LIBRARY_FAILURE) {
  ------------------
  |  |   62|      0|#define PORT_GetError PORT_GetError_Util
  ------------------
  |  Branch (5778:21): [True: 0, False: 0]
  ------------------
 5779|      0|                    sftk_fatalError = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 5780|      0|                }
 5781|      0|                crv = sftk_MapCryptError(PORT_GetError());
  ------------------
  |  |   62|      0|#define PORT_GetError PORT_GetError_Util
  ------------------
 5782|      0|                break;
 5783|      0|            }
 5784|       |
 5785|       |            /* store the generated key into the attributes */
 5786|      0|            crv = sftk_AddAttributeType(publicKey, CKA_VALUE,
  ------------------
  |  |  516|      0|#define CKA_VALUE 0x00000011UL
  ------------------
 5787|      0|                                        sftk_item_expand(&dsaPriv->publicValue));
  ------------------
  |  |  588|      0|#define sftk_item_expand(ip) (ip)->data, (ip)->len
  ------------------
 5788|      0|            if (crv != CKR_OK)
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5788:17): [True: 0, False: 0]
  ------------------
 5789|      0|                goto dsagn_done;
 5790|       |
 5791|       |            /* now fill in the RSA dependent paramenters in the private key */
 5792|      0|            crv = sftk_AddAttributeType(privateKey, CKA_NSS_DB,
  ------------------
  |  |  150|      0|#define CKA_NSS_DB 0xD5A0DB00L
  ------------------
 5793|      0|                                        sftk_item_expand(&dsaPriv->publicValue));
  ------------------
  |  |  588|      0|#define sftk_item_expand(ip) (ip)->data, (ip)->len
  ------------------
 5794|      0|            if (crv != CKR_OK)
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5794:17): [True: 0, False: 0]
  ------------------
 5795|      0|                goto dsagn_done;
 5796|      0|            crv = sftk_AddAttributeType(privateKey, CKA_VALUE,
  ------------------
  |  |  516|      0|#define CKA_VALUE 0x00000011UL
  ------------------
 5797|      0|                                        sftk_item_expand(&dsaPriv->privateValue));
  ------------------
  |  |  588|      0|#define sftk_item_expand(ip) (ip)->data, (ip)->len
  ------------------
 5798|       |
 5799|      0|        dsagn_done:
 5800|       |            /* should zeroize, since this function doesn't. */
 5801|      0|            PORT_FreeArena(dsaPriv->params.arena, PR_TRUE);
  ------------------
  |  |   61|      0|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                          PORT_FreeArena(dsaPriv->params.arena, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 5802|      0|            break;
 5803|       |
 5804|  1.13k|        case CKM_DH_PKCS_KEY_PAIR_GEN:
  ------------------
  |  |  758|  1.13k|#define CKM_DH_PKCS_KEY_PAIR_GEN 0x00000020UL
  ------------------
  |  Branch (5804:9): [True: 1.13k, False: 8.59k]
  ------------------
 5805|  1.13k|            sftk_DeleteAttributeType(privateKey, CKA_PRIME);
  ------------------
  |  |  569|  1.13k|#define CKA_PRIME 0x00000130UL
  ------------------
 5806|  1.13k|            sftk_DeleteAttributeType(privateKey, CKA_BASE);
  ------------------
  |  |  571|  1.13k|#define CKA_BASE 0x00000132UL
  ------------------
 5807|  1.13k|            sftk_DeleteAttributeType(privateKey, CKA_VALUE);
  ------------------
  |  |  516|  1.13k|#define CKA_VALUE 0x00000011UL
  ------------------
 5808|  1.13k|            sftk_DeleteAttributeType(privateKey, CKA_NSS_DB);
  ------------------
  |  |  150|  1.13k|#define CKA_NSS_DB 0xD5A0DB00L
  ------------------
 5809|  1.13k|            key_type = CKK_DH;
  ------------------
  |  |  374|  1.13k|#define CKK_DH 0x00000002UL
  ------------------
 5810|       |
 5811|       |            /* extract the necessary parameters and copy them to private keys */
 5812|  1.13k|            crv = sftk_Attribute2SSecItem(NULL, &dhParam.prime, publicKey,
 5813|  1.13k|                                          CKA_PRIME);
  ------------------
  |  |  569|  1.13k|#define CKA_PRIME 0x00000130UL
  ------------------
 5814|  1.13k|            if (crv != CKR_OK)
  ------------------
  |  | 1388|  1.13k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5814:17): [True: 0, False: 1.13k]
  ------------------
 5815|      0|                break;
 5816|  1.13k|            crv = sftk_Attribute2SSecItem(NULL, &dhParam.base, publicKey, CKA_BASE);
  ------------------
  |  |  571|  1.13k|#define CKA_BASE 0x00000132UL
  ------------------
 5817|  1.13k|            if (crv != CKR_OK) {
  ------------------
  |  | 1388|  1.13k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5817:17): [True: 0, False: 1.13k]
  ------------------
 5818|      0|                SECITEM_ZfreeItem(&dhParam.prime, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                              SECITEM_ZfreeItem(&dhParam.prime, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5819|      0|                break;
 5820|      0|            }
 5821|  1.13k|            crv = sftk_AddAttributeType(privateKey, CKA_PRIME,
  ------------------
  |  |  569|  1.13k|#define CKA_PRIME 0x00000130UL
  ------------------
 5822|  1.13k|                                        sftk_item_expand(&dhParam.prime));
  ------------------
  |  |  588|  1.13k|#define sftk_item_expand(ip) (ip)->data, (ip)->len
  ------------------
 5823|  1.13k|            if (crv != CKR_OK) {
  ------------------
  |  | 1388|  1.13k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5823:17): [True: 0, False: 1.13k]
  ------------------
 5824|      0|                SECITEM_ZfreeItem(&dhParam.prime, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                              SECITEM_ZfreeItem(&dhParam.prime, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5825|      0|                SECITEM_ZfreeItem(&dhParam.base, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                              SECITEM_ZfreeItem(&dhParam.base, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5826|      0|                break;
 5827|      0|            }
 5828|  1.13k|            crv = sftk_AddAttributeType(privateKey, CKA_BASE,
  ------------------
  |  |  571|  1.13k|#define CKA_BASE 0x00000132UL
  ------------------
 5829|  1.13k|                                        sftk_item_expand(&dhParam.base));
  ------------------
  |  |  588|  1.13k|#define sftk_item_expand(ip) (ip)->data, (ip)->len
  ------------------
 5830|  1.13k|            if (crv != CKR_OK) {
  ------------------
  |  | 1388|  1.13k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5830:17): [True: 0, False: 1.13k]
  ------------------
 5831|      0|                SECITEM_ZfreeItem(&dhParam.prime, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                              SECITEM_ZfreeItem(&dhParam.prime, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5832|      0|                SECITEM_ZfreeItem(&dhParam.base, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                              SECITEM_ZfreeItem(&dhParam.base, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5833|      0|                break;
 5834|      0|            }
 5835|  1.13k|            bitSize = sftk_GetLengthInBits(dhParam.prime.data, dhParam.prime.len);
 5836|  1.13k|            if ((bitSize < DH_MIN_P_BITS) || (bitSize > DH_MAX_P_BITS)) {
  ------------------
  |  |  154|  1.13k|#define DH_MIN_P_BITS 128
  ------------------
                          if ((bitSize < DH_MIN_P_BITS) || (bitSize > DH_MAX_P_BITS)) {
  ------------------
  |  |  155|  1.13k|#define DH_MAX_P_BITS 16384
  ------------------
  |  Branch (5836:17): [True: 0, False: 1.13k]
  |  Branch (5836:46): [True: 0, False: 1.13k]
  ------------------
 5837|      0|                crv = CKR_TEMPLATE_INCOMPLETE;
  ------------------
  |  | 1477|      0|#define CKR_TEMPLATE_INCOMPLETE 0x000000D0UL
  ------------------
 5838|      0|                SECITEM_ZfreeItem(&dhParam.prime, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                              SECITEM_ZfreeItem(&dhParam.prime, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5839|      0|                SECITEM_ZfreeItem(&dhParam.base, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                              SECITEM_ZfreeItem(&dhParam.base, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5840|      0|                break;
 5841|      0|            }
 5842|  1.13k|            bitSize = sftk_GetLengthInBits(dhParam.base.data, dhParam.base.len);
 5843|  1.13k|            if ((bitSize < 1) || (bitSize > DH_MAX_P_BITS)) {
  ------------------
  |  |  155|  1.13k|#define DH_MAX_P_BITS 16384
  ------------------
  |  Branch (5843:17): [True: 0, False: 1.13k]
  |  Branch (5843:34): [True: 0, False: 1.13k]
  ------------------
 5844|      0|                crv = CKR_TEMPLATE_INCOMPLETE;
  ------------------
  |  | 1477|      0|#define CKR_TEMPLATE_INCOMPLETE 0x000000D0UL
  ------------------
 5845|      0|                SECITEM_ZfreeItem(&dhParam.prime, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                              SECITEM_ZfreeItem(&dhParam.prime, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5846|      0|                SECITEM_ZfreeItem(&dhParam.base, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                              SECITEM_ZfreeItem(&dhParam.base, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5847|      0|                break;
 5848|      0|            }
 5849|       |
 5850|  1.13k|            rv = DH_NewKey(&dhParam, &dhPriv);
 5851|  1.13k|            SECITEM_ZfreeItem(&dhParam.prime, PR_FALSE);
  ------------------
  |  |  110|  1.13k|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                          SECITEM_ZfreeItem(&dhParam.prime, PR_FALSE);
  ------------------
  |  |  438|  1.13k|#define PR_FALSE 0
  ------------------
 5852|  1.13k|            SECITEM_ZfreeItem(&dhParam.base, PR_FALSE);
  ------------------
  |  |  110|  1.13k|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                          SECITEM_ZfreeItem(&dhParam.base, PR_FALSE);
  ------------------
  |  |  438|  1.13k|#define PR_FALSE 0
  ------------------
 5853|  1.13k|            if (rv != SECSuccess) {
  ------------------
  |  Branch (5853:17): [True: 0, False: 1.13k]
  ------------------
 5854|      0|                if (PORT_GetError() == SEC_ERROR_LIBRARY_FAILURE) {
  ------------------
  |  |   62|      0|#define PORT_GetError PORT_GetError_Util
  ------------------
  |  Branch (5854:21): [True: 0, False: 0]
  ------------------
 5855|      0|                    sftk_fatalError = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 5856|      0|                }
 5857|      0|                crv = sftk_MapCryptError(PORT_GetError());
  ------------------
  |  |   62|      0|#define PORT_GetError PORT_GetError_Util
  ------------------
 5858|      0|                break;
 5859|      0|            }
 5860|       |
 5861|  1.13k|            crv = sftk_AddAttributeType(publicKey, CKA_VALUE,
  ------------------
  |  |  516|  1.13k|#define CKA_VALUE 0x00000011UL
  ------------------
 5862|  1.13k|                                        sftk_item_expand(&dhPriv->publicValue));
  ------------------
  |  |  588|  1.13k|#define sftk_item_expand(ip) (ip)->data, (ip)->len
  ------------------
 5863|  1.13k|            if (crv != CKR_OK)
  ------------------
  |  | 1388|  1.13k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5863:17): [True: 0, False: 1.13k]
  ------------------
 5864|      0|                goto dhgn_done;
 5865|       |
 5866|  1.13k|            crv = sftk_AddAttributeType(privateKey, CKA_NSS_DB,
  ------------------
  |  |  150|  1.13k|#define CKA_NSS_DB 0xD5A0DB00L
  ------------------
 5867|  1.13k|                                        sftk_item_expand(&dhPriv->publicValue));
  ------------------
  |  |  588|  1.13k|#define sftk_item_expand(ip) (ip)->data, (ip)->len
  ------------------
 5868|  1.13k|            if (crv != CKR_OK)
  ------------------
  |  | 1388|  1.13k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5868:17): [True: 0, False: 1.13k]
  ------------------
 5869|      0|                goto dhgn_done;
 5870|       |
 5871|  1.13k|            crv = sftk_AddAttributeType(privateKey, CKA_VALUE,
  ------------------
  |  |  516|  1.13k|#define CKA_VALUE 0x00000011UL
  ------------------
 5872|  1.13k|                                        sftk_item_expand(&dhPriv->privateValue));
  ------------------
  |  |  588|  1.13k|#define sftk_item_expand(ip) (ip)->data, (ip)->len
  ------------------
 5873|       |
 5874|  1.13k|        dhgn_done:
 5875|       |            /* should zeroize, since this function doesn't. */
 5876|  1.13k|            PORT_FreeArena(dhPriv->arena, PR_TRUE);
  ------------------
  |  |   61|  1.13k|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                          PORT_FreeArena(dhPriv->arena, PR_TRUE);
  ------------------
  |  |  437|  1.13k|#define PR_TRUE 1
  ------------------
 5877|  1.13k|            break;
 5878|       |
 5879|      0|        case CKM_EC_KEY_PAIR_GEN:
  ------------------
  |  | 1072|      0|#define CKM_EC_KEY_PAIR_GEN 0x00001040UL
  ------------------
  |  Branch (5879:9): [True: 0, False: 9.72k]
  ------------------
 5880|  8.55k|        case CKM_NSS_ECDHE_NO_PAIRWISE_CHECK_KEY_PAIR_GEN:
  ------------------
  |  |  274|  8.55k|#define CKM_NSS_ECDHE_NO_PAIRWISE_CHECK_KEY_PAIR_GEN (CKM_NSS + 47)
  |  |  ------------------
  |  |  |  |  162|  8.55k|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|  8.55k|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  8.55k|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (5880:9): [True: 8.55k, False: 1.17k]
  ------------------
 5881|  8.55k|            sftk_DeleteAttributeType(privateKey, CKA_EC_PARAMS);
  ------------------
  |  |  602|  8.55k|#define CKA_EC_PARAMS 0x00000180UL
  ------------------
 5882|  8.55k|            sftk_DeleteAttributeType(privateKey, CKA_VALUE);
  ------------------
  |  |  516|  8.55k|#define CKA_VALUE 0x00000011UL
  ------------------
 5883|  8.55k|            sftk_DeleteAttributeType(privateKey, CKA_NSS_DB);
  ------------------
  |  |  150|  8.55k|#define CKA_NSS_DB 0xD5A0DB00L
  ------------------
 5884|  8.55k|            key_type = CKK_EC;
  ------------------
  |  |  379|  8.55k|#define CKK_EC 0x00000003UL
  ------------------
 5885|       |
 5886|       |            /* extract the necessary parameters and copy them to private keys */
 5887|  8.55k|            crv = sftk_Attribute2SSecItem(NULL, &ecEncodedParams, publicKey,
 5888|  8.55k|                                          CKA_EC_PARAMS);
  ------------------
  |  |  602|  8.55k|#define CKA_EC_PARAMS 0x00000180UL
  ------------------
 5889|  8.55k|            if (crv != CKR_OK)
  ------------------
  |  | 1388|  8.55k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5889:17): [True: 0, False: 8.55k]
  ------------------
 5890|      0|                break;
 5891|       |
 5892|  8.55k|            crv = sftk_AddAttributeType(privateKey, CKA_EC_PARAMS,
  ------------------
  |  |  602|  8.55k|#define CKA_EC_PARAMS 0x00000180UL
  ------------------
 5893|  8.55k|                                        sftk_item_expand(&ecEncodedParams));
  ------------------
  |  |  588|  8.55k|#define sftk_item_expand(ip) (ip)->data, (ip)->len
  ------------------
 5894|  8.55k|            if (crv != CKR_OK) {
  ------------------
  |  | 1388|  8.55k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5894:17): [True: 0, False: 8.55k]
  ------------------
 5895|      0|                SECITEM_ZfreeItem(&ecEncodedParams, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                              SECITEM_ZfreeItem(&ecEncodedParams, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5896|      0|                break;
 5897|      0|            }
 5898|       |
 5899|       |            /* Decode ec params before calling EC_NewKey */
 5900|  8.55k|            rv = EC_DecodeParams(&ecEncodedParams, &ecParams);
 5901|  8.55k|            SECITEM_ZfreeItem(&ecEncodedParams, PR_FALSE);
  ------------------
  |  |  110|  8.55k|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                          SECITEM_ZfreeItem(&ecEncodedParams, PR_FALSE);
  ------------------
  |  |  438|  8.55k|#define PR_FALSE 0
  ------------------
 5902|  8.55k|            if (rv != SECSuccess) {
  ------------------
  |  Branch (5902:17): [True: 56, False: 8.50k]
  ------------------
 5903|     56|                crv = sftk_MapCryptError(PORT_GetError());
  ------------------
  |  |   62|     56|#define PORT_GetError PORT_GetError_Util
  ------------------
 5904|     56|                break;
 5905|     56|            }
 5906|  8.50k|            rv = EC_NewKey(ecParams, &ecPriv);
 5907|  8.50k|            if (rv != SECSuccess) {
  ------------------
  |  Branch (5907:17): [True: 0, False: 8.50k]
  ------------------
 5908|      0|                if (PORT_GetError() == SEC_ERROR_LIBRARY_FAILURE) {
  ------------------
  |  |   62|      0|#define PORT_GetError PORT_GetError_Util
  ------------------
  |  Branch (5908:21): [True: 0, False: 0]
  ------------------
 5909|      0|                    sftk_fatalError = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 5910|      0|                }
 5911|      0|                PORT_FreeArena(ecParams->arena, PR_TRUE);
  ------------------
  |  |   61|      0|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                              PORT_FreeArena(ecParams->arena, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 5912|      0|                crv = sftk_MapCryptError(PORT_GetError());
  ------------------
  |  |   62|      0|#define PORT_GetError PORT_GetError_Util
  ------------------
 5913|      0|                break;
 5914|      0|            }
 5915|       |
 5916|  8.50k|            if (PR_GetEnvSecure("NSS_USE_DECODED_CKA_EC_POINT") ||
  ------------------
  |  Branch (5916:17): [True: 0, False: 8.50k]
  ------------------
 5917|  8.50k|                ecParams->type != ec_params_named) {
  ------------------
  |  Branch (5917:17): [True: 8.01k, False: 490]
  ------------------
 5918|  8.01k|                PORT_FreeArena(ecParams->arena, PR_TRUE);
  ------------------
  |  |   61|  8.01k|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                              PORT_FreeArena(ecParams->arena, PR_TRUE);
  ------------------
  |  |  437|  8.01k|#define PR_TRUE 1
  ------------------
 5919|  8.01k|                crv = sftk_AddAttributeType(publicKey, CKA_EC_POINT,
  ------------------
  |  |  604|  8.01k|#define CKA_EC_POINT 0x00000181UL
  ------------------
 5920|  8.01k|                                            sftk_item_expand(&ecPriv->publicValue));
  ------------------
  |  |  588|  8.01k|#define sftk_item_expand(ip) (ip)->data, (ip)->len
  ------------------
 5921|  8.01k|            } else {
 5922|    490|                PORT_FreeArena(ecParams->arena, PR_TRUE);
  ------------------
  |  |   61|    490|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                              PORT_FreeArena(ecParams->arena, PR_TRUE);
  ------------------
  |  |  437|    490|#define PR_TRUE 1
  ------------------
 5923|    490|                SECItem *pubValue = SEC_ASN1EncodeItem(NULL, NULL,
  ------------------
  |  |   89|    490|#define SEC_ASN1EncodeItem SEC_ASN1EncodeItem_Util
  ------------------
 5924|    490|                                                       &ecPriv->publicValue,
 5925|    490|                                                       SEC_ASN1_GET(SEC_OctetStringTemplate));
  ------------------
  |  |  188|    490|#define SEC_ASN1_GET(x) x
  ------------------
 5926|    490|                if (!pubValue) {
  ------------------
  |  Branch (5926:21): [True: 0, False: 490]
  ------------------
 5927|      0|                    crv = CKR_ARGUMENTS_BAD;
  ------------------
  |  | 1401|      0|#define CKR_ARGUMENTS_BAD 0x00000007UL
  ------------------
 5928|      0|                    goto ecgn_done;
 5929|      0|                }
 5930|    490|                crv = sftk_AddAttributeType(publicKey, CKA_EC_POINT,
  ------------------
  |  |  604|    490|#define CKA_EC_POINT 0x00000181UL
  ------------------
 5931|    490|                                            sftk_item_expand(pubValue));
  ------------------
  |  |  588|    490|#define sftk_item_expand(ip) (ip)->data, (ip)->len
  ------------------
 5932|    490|                SECITEM_ZfreeItem(pubValue, PR_TRUE);
  ------------------
  |  |  110|    490|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                              SECITEM_ZfreeItem(pubValue, PR_TRUE);
  ------------------
  |  |  437|    490|#define PR_TRUE 1
  ------------------
 5933|    490|            }
 5934|  8.50k|            if (crv != CKR_OK)
  ------------------
  |  | 1388|  8.50k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5934:17): [True: 0, False: 8.50k]
  ------------------
 5935|      0|                goto ecgn_done;
 5936|       |
 5937|  8.50k|            crv = sftk_AddAttributeType(privateKey, CKA_VALUE,
  ------------------
  |  |  516|  8.50k|#define CKA_VALUE 0x00000011UL
  ------------------
 5938|  8.50k|                                        sftk_item_expand(&ecPriv->privateValue));
  ------------------
  |  |  588|  8.50k|#define sftk_item_expand(ip) (ip)->data, (ip)->len
  ------------------
 5939|  8.50k|            if (crv != CKR_OK)
  ------------------
  |  | 1388|  8.50k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5939:17): [True: 0, False: 8.50k]
  ------------------
 5940|      0|                goto ecgn_done;
 5941|       |
 5942|  8.50k|            crv = sftk_AddAttributeType(privateKey, CKA_NSS_DB,
  ------------------
  |  |  150|  8.50k|#define CKA_NSS_DB 0xD5A0DB00L
  ------------------
 5943|  8.50k|                                        sftk_item_expand(&ecPriv->publicValue));
  ------------------
  |  |  588|  8.50k|#define sftk_item_expand(ip) (ip)->data, (ip)->len
  ------------------
 5944|  8.50k|        ecgn_done:
 5945|       |            /* should zeroize, since this function doesn't. */
 5946|  8.50k|            PORT_FreeArena(ecPriv->ecParams.arena, PR_TRUE);
  ------------------
  |  |   61|  8.50k|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                          PORT_FreeArena(ecPriv->ecParams.arena, PR_TRUE);
  ------------------
  |  |  437|  8.50k|#define PR_TRUE 1
  ------------------
 5947|  8.50k|            break;
 5948|       |
 5949|      0|        case CKM_NSS_KYBER_KEY_PAIR_GEN:
  ------------------
  |  |  267|      0|#define CKM_NSS_KYBER_KEY_PAIR_GEN (CKM_NSS + 45)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (5949:9): [True: 0, False: 9.72k]
  ------------------
 5950|     40|        case CKM_NSS_ML_KEM_KEY_PAIR_GEN:
  ------------------
  |  |  277|     40|#define CKM_NSS_ML_KEM_KEY_PAIR_GEN (CKM_NSS + 48)
  |  |  ------------------
  |  |  |  |  162|     40|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|     40|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     40|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (5950:9): [True: 40, False: 9.68k]
  ------------------
 5951|     40|            sftk_DeleteAttributeType(privateKey, CKA_NSS_DB);
  ------------------
  |  |  150|     40|#define CKA_NSS_DB 0xD5A0DB00L
  ------------------
 5952|     40|            key_type = CKK_NSS_KYBER;
  ------------------
  |  |   58|     40|#define CKK_NSS_KYBER (CKK_NSS + 5)
  |  |  ------------------
  |  |  |  |   49|     40|#define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  458|     40|#define CKK_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     40|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5953|       |
 5954|     40|            SECItem privKey = { siBuffer, NULL, 0 };
 5955|     40|            SECItem pubKey = { siBuffer, NULL, 0 };
 5956|     40|            KyberParams kyberParams = sftk_kyber_PK11ParamToInternal(ckKyberParamSet);
 5957|     40|            if (!sftk_kyber_AllocPrivKeyItem(kyberParams, &privKey)) {
  ------------------
  |  Branch (5957:17): [True: 0, False: 40]
  ------------------
 5958|      0|                crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 5959|      0|                goto kyber_done;
 5960|      0|            }
 5961|     40|            if (!sftk_kyber_AllocPubKeyItem(kyberParams, &pubKey)) {
  ------------------
  |  Branch (5961:17): [True: 0, False: 40]
  ------------------
 5962|      0|                crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 5963|      0|                goto kyber_done;
 5964|      0|            }
 5965|     40|            rv = Kyber_NewKey(kyberParams, NULL, &privKey, &pubKey);
 5966|     40|            if (rv != SECSuccess) {
  ------------------
  |  Branch (5966:17): [True: 0, False: 40]
  ------------------
 5967|      0|                crv = sftk_MapCryptError(PORT_GetError());
  ------------------
  |  |   62|      0|#define PORT_GetError PORT_GetError_Util
  ------------------
 5968|      0|                goto kyber_done;
 5969|      0|            }
 5970|       |
 5971|     40|            crv = sftk_AddAttributeType(publicKey, CKA_VALUE, sftk_item_expand(&pubKey));
  ------------------
  |  |  516|     40|#define CKA_VALUE 0x00000011UL
  ------------------
                          crv = sftk_AddAttributeType(publicKey, CKA_VALUE, sftk_item_expand(&pubKey));
  ------------------
  |  |  588|     40|#define sftk_item_expand(ip) (ip)->data, (ip)->len
  ------------------
 5972|     40|            if (crv != CKR_OK) {
  ------------------
  |  | 1388|     40|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5972:17): [True: 0, False: 40]
  ------------------
 5973|      0|                goto kyber_done;
 5974|      0|            }
 5975|     40|            crv = sftk_AddAttributeType(publicKey, CKA_NSS_PARAMETER_SET,
  ------------------
  |  |  113|     40|#define CKA_NSS_PARAMETER_SET (CKA_NSS + 40)
  |  |  ------------------
  |  |  |  |   77|     40|#define CKA_NSS (CKA_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  692|     40|#define CKA_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKA_NSS (CKA_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     40|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5976|     40|                                        &ckKyberParamSet, sizeof(CK_NSS_KEM_PARAMETER_SET_TYPE));
 5977|     40|            if (crv != CKR_OK) {
  ------------------
  |  | 1388|     40|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5977:17): [True: 0, False: 40]
  ------------------
 5978|      0|                goto kyber_done;
 5979|      0|            }
 5980|     40|            crv = sftk_AddAttributeType(privateKey, CKA_VALUE,
  ------------------
  |  |  516|     40|#define CKA_VALUE 0x00000011UL
  ------------------
 5981|     40|                                        sftk_item_expand(&privKey));
  ------------------
  |  |  588|     40|#define sftk_item_expand(ip) (ip)->data, (ip)->len
  ------------------
 5982|     40|            if (crv != CKR_OK) {
  ------------------
  |  | 1388|     40|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5982:17): [True: 0, False: 40]
  ------------------
 5983|      0|                goto kyber_done;
 5984|      0|            }
 5985|     40|            crv = sftk_AddAttributeType(privateKey, CKA_NSS_PARAMETER_SET,
  ------------------
  |  |  113|     40|#define CKA_NSS_PARAMETER_SET (CKA_NSS + 40)
  |  |  ------------------
  |  |  |  |   77|     40|#define CKA_NSS (CKA_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  692|     40|#define CKA_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKA_NSS (CKA_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     40|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5986|     40|                                        &ckKyberParamSet, sizeof(CK_NSS_KEM_PARAMETER_SET_TYPE));
 5987|     40|            if (crv != CKR_OK) {
  ------------------
  |  | 1388|     40|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5987:17): [True: 0, False: 40]
  ------------------
 5988|      0|                goto kyber_done;
 5989|      0|            }
 5990|     40|            crv = sftk_AddAttributeType(privateKey, CKA_NSS_DB,
  ------------------
  |  |  150|     40|#define CKA_NSS_DB 0xD5A0DB00L
  ------------------
 5991|     40|                                        sftk_item_expand(&pubKey));
  ------------------
  |  |  588|     40|#define sftk_item_expand(ip) (ip)->data, (ip)->len
  ------------------
 5992|     40|        kyber_done:
 5993|     40|            SECITEM_ZfreeItem(&privKey, PR_FALSE);
  ------------------
  |  |  110|     40|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                          SECITEM_ZfreeItem(&privKey, PR_FALSE);
  ------------------
  |  |  438|     40|#define PR_FALSE 0
  ------------------
 5994|     40|            SECITEM_FreeItem(&pubKey, PR_FALSE);
  ------------------
  |  |  108|     40|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                          SECITEM_FreeItem(&pubKey, PR_FALSE);
  ------------------
  |  |  438|     40|#define PR_FALSE 0
  ------------------
 5995|     40|            break;
 5996|       |
 5997|      0|        case CKM_EC_MONTGOMERY_KEY_PAIR_GEN:
  ------------------
  |  | 1173|      0|#define CKM_EC_MONTGOMERY_KEY_PAIR_GEN 0x00001056UL
  ------------------
  |  Branch (5997:9): [True: 0, False: 9.72k]
  ------------------
 5998|      0|        case CKM_EC_EDWARDS_KEY_PAIR_GEN:
  ------------------
  |  | 1172|      0|#define CKM_EC_EDWARDS_KEY_PAIR_GEN 0x00001055UL
  ------------------
  |  Branch (5998:9): [True: 0, False: 9.72k]
  ------------------
 5999|      0|            sftk_DeleteAttributeType(privateKey, CKA_EC_PARAMS);
  ------------------
  |  |  602|      0|#define CKA_EC_PARAMS 0x00000180UL
  ------------------
 6000|      0|            sftk_DeleteAttributeType(privateKey, CKA_VALUE);
  ------------------
  |  |  516|      0|#define CKA_VALUE 0x00000011UL
  ------------------
 6001|      0|            sftk_DeleteAttributeType(privateKey, CKA_NSS_DB);
  ------------------
  |  |  150|      0|#define CKA_NSS_DB 0xD5A0DB00L
  ------------------
 6002|      0|            key_type = (pMechanism->mechanism == CKM_EC_EDWARDS_KEY_PAIR_GEN) ? CKK_EC_EDWARDS : CKK_EC_MONTGOMERY;
  ------------------
  |  | 1172|      0|#define CKM_EC_EDWARDS_KEY_PAIR_GEN 0x00001055UL
  ------------------
                          key_type = (pMechanism->mechanism == CKM_EC_EDWARDS_KEY_PAIR_GEN) ? CKK_EC_EDWARDS : CKK_EC_MONTGOMERY;
  ------------------
  |  |  448|      0|#define CKK_EC_EDWARDS 0x00000040UL
  ------------------
                          key_type = (pMechanism->mechanism == CKM_EC_EDWARDS_KEY_PAIR_GEN) ? CKK_EC_EDWARDS : CKK_EC_MONTGOMERY;
  ------------------
  |  |  449|      0|#define CKK_EC_MONTGOMERY 0x00000041UL
  ------------------
  |  Branch (6002:24): [True: 0, False: 0]
  ------------------
 6003|       |
 6004|       |            /* extract the necessary parameters and copy them to private keys */
 6005|      0|            crv = sftk_Attribute2SSecItem(NULL, &ecEncodedParams, publicKey,
 6006|      0|                                          CKA_EC_PARAMS);
  ------------------
  |  |  602|      0|#define CKA_EC_PARAMS 0x00000180UL
  ------------------
 6007|      0|            if (crv != CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (6007:17): [True: 0, False: 0]
  ------------------
 6008|      0|                break;
 6009|      0|            }
 6010|       |
 6011|      0|            crv = sftk_AddAttributeType(privateKey, CKA_EC_PARAMS,
  ------------------
  |  |  602|      0|#define CKA_EC_PARAMS 0x00000180UL
  ------------------
 6012|      0|                                        sftk_item_expand(&ecEncodedParams));
  ------------------
  |  |  588|      0|#define sftk_item_expand(ip) (ip)->data, (ip)->len
  ------------------
 6013|      0|            if (crv != CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (6013:17): [True: 0, False: 0]
  ------------------
 6014|      0|                SECITEM_ZfreeItem(&ecEncodedParams, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                              SECITEM_ZfreeItem(&ecEncodedParams, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 6015|      0|                break;
 6016|      0|            }
 6017|       |
 6018|       |            /* Decode ec params before calling EC_NewKey */
 6019|      0|            rv = EC_DecodeParams(&ecEncodedParams, &ecParams);
 6020|      0|            SECITEM_ZfreeItem(&ecEncodedParams, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                          SECITEM_ZfreeItem(&ecEncodedParams, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 6021|      0|            if (rv != SECSuccess) {
  ------------------
  |  Branch (6021:17): [True: 0, False: 0]
  ------------------
 6022|      0|                crv = sftk_MapCryptError(PORT_GetError());
  ------------------
  |  |   62|      0|#define PORT_GetError PORT_GetError_Util
  ------------------
 6023|      0|                break;
 6024|      0|            }
 6025|       |
 6026|      0|            rv = EC_NewKey(ecParams, &ecPriv);
 6027|      0|            if (rv != SECSuccess) {
  ------------------
  |  Branch (6027:17): [True: 0, False: 0]
  ------------------
 6028|      0|                if (PORT_GetError() == SEC_ERROR_LIBRARY_FAILURE) {
  ------------------
  |  |   62|      0|#define PORT_GetError PORT_GetError_Util
  ------------------
  |  Branch (6028:21): [True: 0, False: 0]
  ------------------
 6029|      0|                    sftk_fatalError = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 6030|      0|                }
 6031|      0|                PORT_FreeArena(ecParams->arena, PR_TRUE);
  ------------------
  |  |   61|      0|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                              PORT_FreeArena(ecParams->arena, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 6032|      0|                crv = sftk_MapCryptError(PORT_GetError());
  ------------------
  |  |   62|      0|#define PORT_GetError PORT_GetError_Util
  ------------------
 6033|      0|                break;
 6034|      0|            }
 6035|      0|            PORT_FreeArena(ecParams->arena, PR_TRUE);
  ------------------
  |  |   61|      0|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                          PORT_FreeArena(ecParams->arena, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 6036|      0|            crv = sftk_AddAttributeType(publicKey, CKA_EC_POINT,
  ------------------
  |  |  604|      0|#define CKA_EC_POINT 0x00000181UL
  ------------------
 6037|      0|                                        sftk_item_expand(&ecPriv->publicValue));
  ------------------
  |  |  588|      0|#define sftk_item_expand(ip) (ip)->data, (ip)->len
  ------------------
 6038|      0|            if (crv != CKR_OK)
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (6038:17): [True: 0, False: 0]
  ------------------
 6039|      0|                goto edgn_done;
 6040|       |
 6041|      0|            crv = sftk_AddAttributeType(privateKey, CKA_VALUE,
  ------------------
  |  |  516|      0|#define CKA_VALUE 0x00000011UL
  ------------------
 6042|      0|                                        sftk_item_expand(&ecPriv->privateValue));
  ------------------
  |  |  588|      0|#define sftk_item_expand(ip) (ip)->data, (ip)->len
  ------------------
 6043|      0|            if (crv != CKR_OK)
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (6043:17): [True: 0, False: 0]
  ------------------
 6044|      0|                goto edgn_done;
 6045|       |
 6046|      0|            crv = sftk_AddAttributeType(privateKey, CKA_NSS_DB,
  ------------------
  |  |  150|      0|#define CKA_NSS_DB 0xD5A0DB00L
  ------------------
 6047|      0|                                        sftk_item_expand(&ecPriv->publicValue));
  ------------------
  |  |  588|      0|#define sftk_item_expand(ip) (ip)->data, (ip)->len
  ------------------
 6048|      0|        edgn_done:
 6049|       |            /* should zeroize, since this function doesn't. */
 6050|      0|            PORT_FreeArena(ecPriv->ecParams.arena, PR_TRUE);
  ------------------
  |  |   61|      0|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                          PORT_FreeArena(ecPriv->ecParams.arena, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 6051|      0|            break;
 6052|       |
 6053|      0|        default:
  ------------------
  |  Branch (6053:9): [True: 0, False: 9.72k]
  ------------------
 6054|      0|            crv = CKR_MECHANISM_INVALID;
  ------------------
  |  | 1447|      0|#define CKR_MECHANISM_INVALID 0x00000070UL
  ------------------
 6055|  9.72k|    }
 6056|       |
 6057|  9.72k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  9.72k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (6057:9): [True: 56, False: 9.67k]
  ------------------
 6058|     56|        sftk_FreeObject(privateKey);
 6059|     56|        sftk_FreeObject(publicKey);
 6060|     56|        return crv;
 6061|     56|    }
 6062|       |
 6063|       |    /* Add the class, key_type The loop lets us check errors blow out
 6064|       |     *  on errors and clean up at the bottom */
 6065|  9.67k|    session = NULL; /* make pedtantic happy... session cannot leave the*/
 6066|       |                    /* loop below NULL unless an error is set... */
 6067|  9.67k|    do {
 6068|  9.67k|        crv = sftk_AddAttributeType(privateKey, CKA_CLASS, &privClass,
  ------------------
  |  |  511|  9.67k|#define CKA_CLASS 0x00000000UL
  ------------------
 6069|  9.67k|                                    sizeof(CK_OBJECT_CLASS));
 6070|  9.67k|        if (crv != CKR_OK)
  ------------------
  |  | 1388|  9.67k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (6070:13): [True: 0, False: 9.67k]
  ------------------
 6071|      0|            break;
 6072|  9.67k|        crv = sftk_AddAttributeType(publicKey, CKA_CLASS, &pubClass,
  ------------------
  |  |  511|  9.67k|#define CKA_CLASS 0x00000000UL
  ------------------
 6073|  9.67k|                                    sizeof(CK_OBJECT_CLASS));
 6074|  9.67k|        if (crv != CKR_OK)
  ------------------
  |  | 1388|  9.67k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (6074:13): [True: 0, False: 9.67k]
  ------------------
 6075|      0|            break;
 6076|  9.67k|        crv = sftk_AddAttributeType(privateKey, CKA_KEY_TYPE, &key_type,
  ------------------
  |  |  543|  9.67k|#define CKA_KEY_TYPE 0x00000100UL
  ------------------
 6077|  9.67k|                                    sizeof(CK_KEY_TYPE));
 6078|  9.67k|        if (crv != CKR_OK)
  ------------------
  |  | 1388|  9.67k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (6078:13): [True: 0, False: 9.67k]
  ------------------
 6079|      0|            break;
 6080|  9.67k|        crv = sftk_AddAttributeType(publicKey, CKA_KEY_TYPE, &key_type,
  ------------------
  |  |  543|  9.67k|#define CKA_KEY_TYPE 0x00000100UL
  ------------------
 6081|  9.67k|                                    sizeof(CK_KEY_TYPE));
 6082|  9.67k|        if (crv != CKR_OK)
  ------------------
  |  | 1388|  9.67k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (6082:13): [True: 0, False: 9.67k]
  ------------------
 6083|      0|            break;
 6084|  9.67k|        session = sftk_SessionFromHandle(hSession);
 6085|  9.67k|        if (session == NULL)
  ------------------
  |  Branch (6085:13): [True: 0, False: 9.67k]
  ------------------
 6086|      0|            crv = CKR_SESSION_HANDLE_INVALID;
  ------------------
  |  | 1465|      0|#define CKR_SESSION_HANDLE_INVALID 0x000000B3UL
  ------------------
 6087|  9.67k|    } while (0);
  ------------------
  |  Branch (6087:14): [Folded - Ignored]
  ------------------
 6088|       |
 6089|  9.67k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  9.67k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (6089:9): [True: 0, False: 9.67k]
  ------------------
 6090|      0|        sftk_FreeObject(privateKey);
 6091|      0|        sftk_FreeObject(publicKey);
 6092|      0|        return crv;
 6093|      0|    }
 6094|       |
 6095|       |    /*
 6096|       |     * handle the base object cleanup for the public Key
 6097|       |     */
 6098|  9.67k|    crv = sftk_handleObject(privateKey, session);
 6099|  9.67k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  9.67k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (6099:9): [True: 0, False: 9.67k]
  ------------------
 6100|      0|        sftk_FreeSession(session);
 6101|      0|        sftk_FreeObject(privateKey);
 6102|      0|        sftk_FreeObject(publicKey);
 6103|      0|        return crv;
 6104|      0|    }
 6105|       |
 6106|       |    /*
 6107|       |     * handle the base object cleanup for the private Key
 6108|       |     * If we have any problems, we destroy the public Key we've
 6109|       |     * created and linked.
 6110|       |     */
 6111|  9.67k|    crv = sftk_handleObject(publicKey, session);
 6112|  9.67k|    sftk_FreeSession(session);
 6113|  9.67k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  9.67k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (6113:9): [True: 0, False: 9.67k]
  ------------------
 6114|      0|        sftk_FreeObject(publicKey);
 6115|      0|        NSC_DestroyObject(hSession, privateKey->handle);
 6116|      0|        sftk_FreeObject(privateKey);
 6117|      0|        return crv;
 6118|      0|    }
 6119|  9.67k|    if (sftk_isTrue(privateKey, CKA_SENSITIVE)) {
  ------------------
  |  |  546|  9.67k|#define CKA_SENSITIVE 0x00000103UL
  ------------------
  |  Branch (6119:9): [True: 0, False: 9.67k]
  ------------------
 6120|      0|        crv = sftk_forceAttribute(privateKey, CKA_ALWAYS_SENSITIVE,
  ------------------
  |  |  588|      0|#define CKA_ALWAYS_SENSITIVE 0x00000165UL
  ------------------
 6121|      0|                                  &cktrue, sizeof(CK_BBOOL));
 6122|      0|    }
 6123|  9.67k|    if (crv == CKR_OK && sftk_isTrue(publicKey, CKA_SENSITIVE)) {
  ------------------
  |  | 1388|  19.3k|#define CKR_OK 0x00000000UL
  ------------------
                  if (crv == CKR_OK && sftk_isTrue(publicKey, CKA_SENSITIVE)) {
  ------------------
  |  |  546|  9.67k|#define CKA_SENSITIVE 0x00000103UL
  ------------------
  |  Branch (6123:9): [True: 9.67k, False: 0]
  |  Branch (6123:26): [True: 0, False: 9.67k]
  ------------------
 6124|      0|        crv = sftk_forceAttribute(publicKey, CKA_ALWAYS_SENSITIVE,
  ------------------
  |  |  588|      0|#define CKA_ALWAYS_SENSITIVE 0x00000165UL
  ------------------
 6125|      0|                                  &cktrue, sizeof(CK_BBOOL));
 6126|      0|    }
 6127|  9.67k|    if (crv == CKR_OK && !sftk_isTrue(privateKey, CKA_EXTRACTABLE)) {
  ------------------
  |  | 1388|  19.3k|#define CKR_OK 0x00000000UL
  ------------------
                  if (crv == CKR_OK && !sftk_isTrue(privateKey, CKA_EXTRACTABLE)) {
  ------------------
  |  |  585|  9.67k|#define CKA_EXTRACTABLE 0x00000162UL
  ------------------
  |  Branch (6127:9): [True: 9.67k, False: 0]
  |  Branch (6127:26): [True: 0, False: 9.67k]
  ------------------
 6128|      0|        crv = sftk_forceAttribute(privateKey, CKA_NEVER_EXTRACTABLE,
  ------------------
  |  |  587|      0|#define CKA_NEVER_EXTRACTABLE 0x00000164UL
  ------------------
 6129|      0|                                  &cktrue, sizeof(CK_BBOOL));
 6130|      0|    }
 6131|  9.67k|    if (crv == CKR_OK && !sftk_isTrue(publicKey, CKA_EXTRACTABLE)) {
  ------------------
  |  | 1388|  19.3k|#define CKR_OK 0x00000000UL
  ------------------
                  if (crv == CKR_OK && !sftk_isTrue(publicKey, CKA_EXTRACTABLE)) {
  ------------------
  |  |  585|  9.67k|#define CKA_EXTRACTABLE 0x00000162UL
  ------------------
  |  Branch (6131:9): [True: 9.67k, False: 0]
  |  Branch (6131:26): [True: 9.67k, False: 0]
  ------------------
 6132|  9.67k|        crv = sftk_forceAttribute(publicKey, CKA_NEVER_EXTRACTABLE,
  ------------------
  |  |  587|  9.67k|#define CKA_NEVER_EXTRACTABLE 0x00000164UL
  ------------------
 6133|  9.67k|                                  &cktrue, sizeof(CK_BBOOL));
 6134|  9.67k|    }
 6135|       |
 6136|  9.67k|    if (crv == CKR_OK && pMechanism->mechanism != CKM_NSS_ECDHE_NO_PAIRWISE_CHECK_KEY_PAIR_GEN && key_type != CKK_NSS_KYBER) {
  ------------------
  |  | 1388|  19.3k|#define CKR_OK 0x00000000UL
  ------------------
                  if (crv == CKR_OK && pMechanism->mechanism != CKM_NSS_ECDHE_NO_PAIRWISE_CHECK_KEY_PAIR_GEN && key_type != CKK_NSS_KYBER) {
  ------------------
  |  |  274|  19.3k|#define CKM_NSS_ECDHE_NO_PAIRWISE_CHECK_KEY_PAIR_GEN (CKM_NSS + 47)
  |  |  ------------------
  |  |  |  |  162|  9.67k|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|  9.67k|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  9.67k|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  if (crv == CKR_OK && pMechanism->mechanism != CKM_NSS_ECDHE_NO_PAIRWISE_CHECK_KEY_PAIR_GEN && key_type != CKK_NSS_KYBER) {
  ------------------
  |  |   58|  1.17k|#define CKK_NSS_KYBER (CKK_NSS + 5)
  |  |  ------------------
  |  |  |  |   49|  1.17k|#define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  458|  1.17k|#define CKK_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  1.17k|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (6136:9): [True: 9.67k, False: 0]
  |  Branch (6136:26): [True: 1.17k, False: 8.50k]
  |  Branch (6136:99): [True: 1.13k, False: 40]
  ------------------
 6137|       |        /* Perform FIPS 140-2 pairwise consistency check. */
 6138|  1.13k|        crv = sftk_PairwiseConsistencyCheck(hSession, slot,
 6139|  1.13k|                                            publicKey, privateKey, key_type);
 6140|  1.13k|        if (crv != CKR_OK) {
  ------------------
  |  | 1388|  1.13k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (6140:13): [True: 0, False: 1.13k]
  ------------------
 6141|      0|            if (sftk_audit_enabled) {
  ------------------
  |  Branch (6141:17): [True: 0, False: 0]
  ------------------
 6142|      0|                char msg[128];
 6143|      0|                PR_snprintf(msg, sizeof msg,
 6144|      0|                            "C_GenerateKeyPair(hSession=0x%08lX, "
 6145|      0|                            "pMechanism->mechanism=0x%08lX)=0x%08lX "
 6146|      0|                            "self-test: pair-wise consistency test failed",
 6147|      0|                            (PRUint32)hSession, (PRUint32)pMechanism->mechanism,
 6148|      0|                            (PRUint32)crv);
 6149|      0|                sftk_LogAuditMessage(NSS_AUDIT_ERROR, NSS_AUDIT_SELF_TEST, msg);
 6150|      0|            }
 6151|      0|        }
 6152|  1.13k|    }
 6153|       |
 6154|  9.67k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  9.67k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (6154:9): [True: 0, False: 9.67k]
  ------------------
 6155|      0|        NSC_DestroyObject(hSession, publicKey->handle);
 6156|      0|        sftk_FreeObject(publicKey);
 6157|      0|        NSC_DestroyObject(hSession, privateKey->handle);
 6158|      0|        sftk_FreeObject(privateKey);
 6159|      0|        return crv;
 6160|      0|    }
 6161|  9.67k|    *phPrivateKey = privateKey->handle;
 6162|  9.67k|    *phPublicKey = publicKey->handle;
 6163|  9.67k|    sftk_FreeObject(publicKey);
 6164|  9.67k|    sftk_FreeObject(privateKey);
 6165|       |
 6166|  9.67k|    return CKR_OK;
  ------------------
  |  | 1388|  9.67k|#define CKR_OK 0x00000000UL
  ------------------
 6167|  9.67k|}
NSC_WrapKey:
 6384|  1.27k|{
 6385|  1.27k|    SFTKSession *session;
 6386|  1.27k|    SFTKAttribute *attribute;
 6387|  1.27k|    SFTKObject *key;
 6388|  1.27k|    CK_RV crv;
 6389|       |
 6390|  1.27k|    CHECK_FORK();
 6391|       |
 6392|  1.27k|    session = sftk_SessionFromHandle(hSession);
 6393|  1.27k|    if (session == NULL) {
  ------------------
  |  Branch (6393:9): [True: 0, False: 1.27k]
  ------------------
 6394|      0|        return CKR_SESSION_HANDLE_INVALID;
  ------------------
  |  | 1465|      0|#define CKR_SESSION_HANDLE_INVALID 0x000000B3UL
  ------------------
 6395|      0|    }
 6396|       |
 6397|  1.27k|    key = sftk_ObjectFromHandle(hKey, session);
 6398|  1.27k|    if (key == NULL) {
  ------------------
  |  Branch (6398:9): [True: 0, False: 1.27k]
  ------------------
 6399|      0|        sftk_FreeSession(session);
 6400|      0|        return CKR_KEY_HANDLE_INVALID;
  ------------------
  |  | 1428|      0|#define CKR_KEY_HANDLE_INVALID 0x00000060UL
  ------------------
 6401|      0|    }
 6402|       |
 6403|  1.27k|    switch (key->objclass) {
 6404|  1.27k|        case CKO_SECRET_KEY: {
  ------------------
  |  |  329|  1.27k|#define CKO_SECRET_KEY 0x00000004UL
  ------------------
  |  Branch (6404:9): [True: 1.27k, False: 0]
  ------------------
 6405|  1.27k|            SFTKSessionContext *context = NULL;
 6406|  1.27k|            SECItem pText;
 6407|       |
 6408|  1.27k|            attribute = sftk_FindAttribute(key, CKA_VALUE);
  ------------------
  |  |  516|  1.27k|#define CKA_VALUE 0x00000011UL
  ------------------
 6409|       |
 6410|  1.27k|            if (attribute == NULL) {
  ------------------
  |  Branch (6410:17): [True: 0, False: 1.27k]
  ------------------
 6411|      0|                crv = CKR_KEY_TYPE_INCONSISTENT;
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
 6412|      0|                break;
 6413|      0|            }
 6414|  1.27k|            crv = sftk_CryptInit(hSession, pMechanism, hWrappingKey,
 6415|  1.27k|                                 CKA_WRAP, CKA_WRAP, SFTK_ENCRYPT, PR_TRUE);
  ------------------
  |  |  549|  1.27k|#define CKA_WRAP 0x00000106UL
  ------------------
                                               CKA_WRAP, CKA_WRAP, SFTK_ENCRYPT, PR_TRUE);
  ------------------
  |  |  549|  1.27k|#define CKA_WRAP 0x00000106UL
  ------------------
                                               CKA_WRAP, CKA_WRAP, SFTK_ENCRYPT, PR_TRUE);
  ------------------
  |  |  437|  1.27k|#define PR_TRUE 1
  ------------------
 6416|  1.27k|            if (crv != CKR_OK) {
  ------------------
  |  | 1388|  1.27k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (6416:17): [True: 9, False: 1.26k]
  ------------------
 6417|      9|                sftk_FreeAttribute(attribute);
 6418|      9|                break;
 6419|      9|            }
 6420|       |
 6421|  1.26k|            pText.type = siBuffer;
 6422|  1.26k|            pText.data = (unsigned char *)attribute->attrib.pValue;
 6423|  1.26k|            pText.len = attribute->attrib.ulValueLen;
 6424|       |
 6425|       |            /* Find out if this is a block cipher. */
 6426|  1.26k|            crv = sftk_GetContext(hSession, &context, SFTK_ENCRYPT, PR_FALSE, NULL);
  ------------------
  |  |  438|  1.26k|#define PR_FALSE 0
  ------------------
 6427|  1.26k|            if (crv != CKR_OK || !context)
  ------------------
  |  | 1388|  2.53k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (6427:17): [True: 0, False: 1.26k]
  |  Branch (6427:34): [True: 0, False: 1.26k]
  ------------------
 6428|      0|                break;
 6429|  1.26k|            if (context->blockSize > 1) {
  ------------------
  |  Branch (6429:17): [True: 0, False: 1.26k]
  ------------------
 6430|      0|                unsigned int remainder = pText.len % context->blockSize;
 6431|      0|                if (!context->doPad && remainder) {
  ------------------
  |  Branch (6431:21): [True: 0, False: 0]
  |  Branch (6431:40): [True: 0, False: 0]
  ------------------
 6432|       |                    /* When wrapping secret keys with unpadded block ciphers,
 6433|       |                    ** the keys are zero padded, if necessary, to fill out
 6434|       |                    ** a full block.
 6435|       |                    */
 6436|      0|                    pText.len += context->blockSize - remainder;
 6437|      0|                    pText.data = PORT_ZAlloc(pText.len);
  ------------------
  |  |   72|      0|#define PORT_ZAlloc PORT_ZAlloc_Util
  ------------------
 6438|      0|                    if (pText.data)
  ------------------
  |  Branch (6438:25): [True: 0, False: 0]
  ------------------
 6439|      0|                        memcpy(pText.data, attribute->attrib.pValue,
 6440|      0|                               attribute->attrib.ulValueLen);
 6441|      0|                    else {
 6442|      0|                        crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 6443|      0|                        break;
 6444|      0|                    }
 6445|      0|                }
 6446|      0|            }
 6447|       |
 6448|  1.26k|            crv = NSC_Encrypt(hSession, (CK_BYTE_PTR)pText.data,
 6449|  1.26k|                              pText.len, pWrappedKey, pulWrappedKeyLen);
 6450|       |            /* always force a finalize, both on errors and when
 6451|       |             * we are just getting the size */
 6452|  1.26k|            if (crv != CKR_OK || pWrappedKey == NULL) {
  ------------------
  |  | 1388|  2.53k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (6452:17): [True: 0, False: 1.26k]
  |  Branch (6452:34): [True: 0, False: 1.26k]
  ------------------
 6453|      0|                CK_RV lcrv;
 6454|      0|                lcrv = sftk_GetContext(hSession, &context,
 6455|      0|                                       SFTK_ENCRYPT, PR_FALSE, NULL);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 6456|      0|                sftk_SetContextByType(session, SFTK_ENCRYPT, NULL);
 6457|      0|                if (lcrv == CKR_OK && context) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (6457:21): [True: 0, False: 0]
  |  Branch (6457:39): [True: 0, False: 0]
  ------------------
 6458|      0|                    sftk_FreeContext(context);
 6459|      0|                }
 6460|      0|            }
 6461|       |
 6462|  1.26k|            if (pText.data != (unsigned char *)attribute->attrib.pValue)
  ------------------
  |  Branch (6462:17): [True: 0, False: 1.26k]
  ------------------
 6463|      0|                PORT_ZFree(pText.data, pText.len);
  ------------------
  |  |   75|      0|#define PORT_ZFree PORT_ZFree_Util
  ------------------
 6464|  1.26k|            sftk_FreeAttribute(attribute);
 6465|  1.26k|            break;
 6466|  1.26k|        }
 6467|       |
 6468|      0|        case CKO_PRIVATE_KEY: {
  ------------------
  |  |  328|      0|#define CKO_PRIVATE_KEY 0x00000003UL
  ------------------
  |  Branch (6468:9): [True: 0, False: 1.27k]
  ------------------
 6469|      0|            SECItem *bpki = sftk_PackagePrivateKey(key, &crv);
 6470|      0|            SFTKSessionContext *context = NULL;
 6471|       |
 6472|      0|            if (!bpki) {
  ------------------
  |  Branch (6472:17): [True: 0, False: 0]
  ------------------
 6473|      0|                break;
 6474|      0|            }
 6475|       |
 6476|      0|            crv = sftk_CryptInit(hSession, pMechanism, hWrappingKey,
 6477|      0|                                 CKA_WRAP, CKA_WRAP, SFTK_ENCRYPT, PR_TRUE);
  ------------------
  |  |  549|      0|#define CKA_WRAP 0x00000106UL
  ------------------
                                               CKA_WRAP, CKA_WRAP, SFTK_ENCRYPT, PR_TRUE);
  ------------------
  |  |  549|      0|#define CKA_WRAP 0x00000106UL
  ------------------
                                               CKA_WRAP, CKA_WRAP, SFTK_ENCRYPT, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 6478|      0|            if (crv != CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (6478:17): [True: 0, False: 0]
  ------------------
 6479|      0|                SECITEM_ZfreeItem(bpki, PR_TRUE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                              SECITEM_ZfreeItem(bpki, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 6480|      0|                crv = CKR_KEY_TYPE_INCONSISTENT;
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
 6481|      0|                break;
 6482|      0|            }
 6483|       |
 6484|      0|            crv = NSC_Encrypt(hSession, bpki->data, bpki->len,
 6485|      0|                              pWrappedKey, pulWrappedKeyLen);
 6486|       |            /* always force a finalize */
 6487|      0|            if (crv != CKR_OK || pWrappedKey == NULL) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (6487:17): [True: 0, False: 0]
  |  Branch (6487:34): [True: 0, False: 0]
  ------------------
 6488|      0|                CK_RV lcrv;
 6489|      0|                lcrv = sftk_GetContext(hSession, &context,
 6490|      0|                                       SFTK_ENCRYPT, PR_FALSE, NULL);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 6491|      0|                sftk_SetContextByType(session, SFTK_ENCRYPT, NULL);
 6492|      0|                if (lcrv == CKR_OK && context) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (6492:21): [True: 0, False: 0]
  |  Branch (6492:39): [True: 0, False: 0]
  ------------------
 6493|      0|                    sftk_FreeContext(context);
 6494|      0|                }
 6495|      0|            }
 6496|      0|            SECITEM_ZfreeItem(bpki, PR_TRUE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                          SECITEM_ZfreeItem(bpki, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 6497|      0|            break;
 6498|      0|        }
 6499|       |
 6500|      0|        default:
  ------------------
  |  Branch (6500:9): [True: 0, False: 1.27k]
  ------------------
 6501|      0|            crv = CKR_KEY_TYPE_INCONSISTENT;
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
 6502|      0|            break;
 6503|  1.27k|    }
 6504|  1.27k|    sftk_FreeObject(key);
 6505|  1.27k|    sftk_FreeSession(session);
 6506|  1.27k|    return sftk_mapWrap(crv);
 6507|  1.27k|}
sftk_MapKeySize:
 7145|  11.5k|{
 7146|  11.5k|    switch (keyType) {
 7147|      0|        case CKK_CDMF:
  ------------------
  |  |  401|      0|#define CKK_CDMF 0x0000001EUL
  ------------------
  |  Branch (7147:9): [True: 0, False: 11.5k]
  ------------------
 7148|      0|            return 8;
 7149|     76|        case CKK_DES:
  ------------------
  |  |  386|     76|#define CKK_DES 0x00000013UL
  ------------------
  |  Branch (7149:9): [True: 76, False: 11.4k]
  ------------------
 7150|     76|            return 8;
 7151|      0|        case CKK_DES2:
  ------------------
  |  |  387|      0|#define CKK_DES2 0x00000014UL
  ------------------
  |  Branch (7151:9): [True: 0, False: 11.5k]
  ------------------
 7152|      0|            return 16;
 7153|  1.01k|        case CKK_DES3:
  ------------------
  |  |  388|  1.01k|#define CKK_DES3 0x00000015UL
  ------------------
  |  Branch (7153:9): [True: 1.01k, False: 10.5k]
  ------------------
 7154|  1.01k|            return 24;
 7155|       |        /* IDEA and CAST need to be added */
 7156|  10.4k|        default:
  ------------------
  |  Branch (7156:9): [True: 10.4k, False: 1.09k]
  ------------------
 7157|  10.4k|            break;
 7158|  11.5k|    }
 7159|  10.4k|    return 0;
 7160|  11.5k|}
sftk_HKDF:
 7318|  27.3k|{
 7319|  27.3k|    SFTKSession *session;
 7320|  27.3k|    SFTKAttribute *saltKey_att = NULL;
 7321|  27.3k|    const SECHashObject *rawHash;
 7322|  27.3k|    unsigned hashLen;
 7323|  27.3k|    unsigned genLen = 0;
 7324|  27.3k|    unsigned char hashbuf[HASH_LENGTH_MAX];
 7325|  27.3k|    unsigned char keyBlock[9 * SFTK_MAX_MAC_LENGTH];
 7326|  27.3k|    unsigned char *keyBlockAlloc = NULL;    /* allocated keyBlock */
 7327|  27.3k|    unsigned char *keyBlockData = keyBlock; /* pointer to current keyBlock */
 7328|  27.3k|    const unsigned char *prk;               /* psuedo-random key */
 7329|  27.3k|    CK_ULONG prkLen;
 7330|  27.3k|    const unsigned char *okm; /* output keying material */
 7331|  27.3k|    HASH_HashType hashType = sftk_GetHashTypeFromMechanism(params->prfHashMechanism);
 7332|  27.3k|    SFTKObject *saltKey = NULL;
 7333|  27.3k|    CK_RV crv = CKR_OK;
  ------------------
  |  | 1388|  27.3k|#define CKR_OK 0x00000000UL
  ------------------
 7334|       |
 7335|       |    /* Spec says it should be the base hash, but also accept the HMAC */
 7336|  27.3k|    if (hashType == HASH_AlgNULL) {
  ------------------
  |  Branch (7336:9): [True: 0, False: 27.3k]
  ------------------
 7337|      0|        hashType = sftk_HMACMechanismToHash(params->prfHashMechanism);
 7338|      0|    }
 7339|  27.3k|    rawHash = HASH_GetRawHashObject(hashType);
 7340|  27.3k|    if (rawHash == NULL || rawHash->length > sizeof(hashbuf)) {
  ------------------
  |  Branch (7340:9): [True: 0, False: 27.3k]
  |  Branch (7340:28): [True: 0, False: 27.3k]
  ------------------
 7341|      0|        return CKR_MECHANISM_INVALID;
  ------------------
  |  | 1447|      0|#define CKR_MECHANISM_INVALID 0x00000070UL
  ------------------
 7342|      0|    }
 7343|  27.3k|    hashLen = rawHash->length;
 7344|       |
 7345|  27.3k|    if ((!params->bExpand && !params->bExtract) ||
  ------------------
  |  Branch (7345:10): [True: 8.29k, False: 19.0k]
  |  Branch (7345:30): [True: 0, False: 8.29k]
  ------------------
 7346|  27.3k|        (params->bExtract && params->ulSaltLen > 0 && !params->pSalt) ||
  ------------------
  |  Branch (7346:10): [True: 8.29k, False: 19.0k]
  |  Branch (7346:30): [True: 0, False: 8.29k]
  |  Branch (7346:55): [True: 0, False: 0]
  ------------------
 7347|  27.3k|        (params->bExpand && params->ulInfoLen > 0 && !params->pInfo)) {
  ------------------
  |  Branch (7347:10): [True: 19.0k, False: 8.29k]
  |  Branch (7347:29): [True: 19.0k, False: 0]
  |  Branch (7347:54): [True: 0, False: 19.0k]
  ------------------
 7348|      0|        return CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 7349|      0|    }
 7350|  27.3k|    if ((params->bExpand && keySize == 0) ||
  ------------------
  |  Branch (7350:10): [True: 19.0k, False: 8.29k]
  |  Branch (7350:29): [True: 0, False: 19.0k]
  ------------------
 7351|  27.3k|        (!params->bExpand && keySize > hashLen) ||
  ------------------
  |  Branch (7351:10): [True: 8.29k, False: 19.0k]
  |  Branch (7351:30): [True: 0, False: 8.29k]
  ------------------
 7352|  27.3k|        (params->bExpand && keySize > 255 * hashLen)) {
  ------------------
  |  Branch (7352:10): [True: 19.0k, False: 8.29k]
  |  Branch (7352:29): [True: 0, False: 19.0k]
  ------------------
 7353|      0|        return CKR_TEMPLATE_INCONSISTENT;
  ------------------
  |  | 1478|      0|#define CKR_TEMPLATE_INCONSISTENT 0x000000D1UL
  ------------------
 7354|      0|    }
 7355|       |
 7356|       |    /* sourceKey is NULL if we are called from the POST, skip the
 7357|       |     * sensitiveCheck */
 7358|  27.3k|    if (sourceKey != NULL) {
  ------------------
  |  Branch (7358:9): [True: 27.3k, False: 0]
  ------------------
 7359|  27.3k|        crv = sftk_DeriveSensitiveCheck(sourceKey, key, canBeData);
 7360|  27.3k|        if (crv != CKR_OK)
  ------------------
  |  | 1388|  27.3k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (7360:13): [True: 0, False: 27.3k]
  ------------------
 7361|      0|            return crv;
 7362|  27.3k|    }
 7363|       |
 7364|       |    /* HKDF-Extract(salt, base key value) */
 7365|  27.3k|    if (params->bExtract) {
  ------------------
  |  Branch (7365:9): [True: 8.29k, False: 19.0k]
  ------------------
 7366|  8.29k|        CK_BYTE *salt;
 7367|  8.29k|        CK_ULONG saltLen;
 7368|  8.29k|        HMACContext *hmac;
 7369|  8.29k|        unsigned int bufLen;
 7370|       |
 7371|  8.29k|        switch (params->ulSaltType) {
 7372|  5.42k|            case CKF_HKDF_SALT_NULL:
  ------------------
  |  | 2252|  5.42k|#define CKF_HKDF_SALT_NULL 0x00000001UL
  ------------------
  |  Branch (7372:13): [True: 5.42k, False: 2.86k]
  ------------------
 7373|  5.42k|                saltLen = hashLen;
 7374|  5.42k|                salt = hashbuf;
 7375|  5.42k|                memset(salt, 0, saltLen);
 7376|  5.42k|                break;
 7377|      0|            case CKF_HKDF_SALT_DATA:
  ------------------
  |  | 2253|      0|#define CKF_HKDF_SALT_DATA 0x00000002UL
  ------------------
  |  Branch (7377:13): [True: 0, False: 8.29k]
  ------------------
 7378|      0|                salt = params->pSalt;
 7379|      0|                saltLen = params->ulSaltLen;
 7380|      0|                if ((salt == NULL) || (params->ulSaltLen == 0)) {
  ------------------
  |  Branch (7380:21): [True: 0, False: 0]
  |  Branch (7380:39): [True: 0, False: 0]
  ------------------
 7381|      0|                    return CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 7382|      0|                }
 7383|      0|                break;
 7384|  2.86k|            case CKF_HKDF_SALT_KEY:
  ------------------
  |  | 2254|  2.86k|#define CKF_HKDF_SALT_KEY 0x00000004UL
  ------------------
  |  Branch (7384:13): [True: 2.86k, False: 5.42k]
  ------------------
 7385|       |                /* lookup key */
 7386|  2.86k|                session = sftk_SessionFromHandle(hSession);
 7387|  2.86k|                if (session == NULL) {
  ------------------
  |  Branch (7387:21): [True: 0, False: 2.86k]
  ------------------
 7388|      0|                    return CKR_SESSION_HANDLE_INVALID;
  ------------------
  |  | 1465|      0|#define CKR_SESSION_HANDLE_INVALID 0x000000B3UL
  ------------------
 7389|      0|                }
 7390|       |
 7391|  2.86k|                saltKey = sftk_ObjectFromHandle(params->hSaltKey, session);
 7392|  2.86k|                sftk_FreeSession(session);
 7393|  2.86k|                if (saltKey == NULL) {
  ------------------
  |  Branch (7393:21): [True: 0, False: 2.86k]
  ------------------
 7394|      0|                    return CKR_KEY_HANDLE_INVALID;
  ------------------
  |  | 1428|      0|#define CKR_KEY_HANDLE_INVALID 0x00000060UL
  ------------------
 7395|      0|                }
 7396|       |                /* if the base key is not fips, but the salt key is, the
 7397|       |                 * resulting key can be fips */
 7398|  2.86k|                if (isFIPS && (key->isFIPS == 0) && (saltKey->isFIPS == 1)) {
  ------------------
  |  Branch (7398:21): [True: 0, False: 2.86k]
  |  Branch (7398:31): [True: 0, False: 0]
  |  Branch (7398:53): [True: 0, False: 0]
  ------------------
 7399|      0|                    CK_MECHANISM mech;
 7400|      0|                    mech.mechanism = CKM_HKDF_DERIVE;
  ------------------
  |  | 1296|      0|#define CKM_HKDF_DERIVE 0x0000402aUL
  ------------------
 7401|      0|                    mech.pParameter = params;
 7402|      0|                    mech.ulParameterLen = sizeof(*params);
 7403|      0|                    key->isFIPS = sftk_operationIsFIPS(saltKey->slot, &mech,
 7404|      0|                                                       CKA_DERIVE, saltKey);
  ------------------
  |  |  555|      0|#define CKA_DERIVE 0x0000010CUL
  ------------------
 7405|      0|                }
 7406|  2.86k|                saltKey_att = sftk_FindAttribute(saltKey, CKA_VALUE);
  ------------------
  |  |  516|  2.86k|#define CKA_VALUE 0x00000011UL
  ------------------
 7407|  2.86k|                if (saltKey_att == NULL) {
  ------------------
  |  Branch (7407:21): [True: 0, False: 2.86k]
  ------------------
 7408|      0|                    sftk_FreeObject(saltKey);
 7409|      0|                    return CKR_KEY_HANDLE_INVALID;
  ------------------
  |  | 1428|      0|#define CKR_KEY_HANDLE_INVALID 0x00000060UL
  ------------------
 7410|      0|                }
 7411|       |                /* save the resulting salt */
 7412|  2.86k|                salt = saltKey_att->attrib.pValue;
 7413|  2.86k|                saltLen = saltKey_att->attrib.ulValueLen;
 7414|  2.86k|                break;
 7415|      0|            default:
  ------------------
  |  Branch (7415:13): [True: 0, False: 8.29k]
  ------------------
 7416|      0|                return CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 7417|      0|                break;
 7418|  8.29k|        }
 7419|       |
 7420|  8.29k|        hmac = HMAC_Create(rawHash, salt, saltLen, isFIPS);
 7421|  8.29k|        if (saltKey_att) {
  ------------------
  |  Branch (7421:13): [True: 2.86k, False: 5.42k]
  ------------------
 7422|  2.86k|            sftk_FreeAttribute(saltKey_att);
 7423|  2.86k|        }
 7424|  8.29k|        if (saltKey) {
  ------------------
  |  Branch (7424:13): [True: 2.86k, False: 5.42k]
  ------------------
 7425|  2.86k|            sftk_FreeObject(saltKey);
 7426|  2.86k|        }
 7427|  8.29k|        if (!hmac) {
  ------------------
  |  Branch (7427:13): [True: 0, False: 8.29k]
  ------------------
 7428|      0|            return CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 7429|      0|        }
 7430|  8.29k|        HMAC_Begin(hmac);
 7431|  8.29k|        HMAC_Update(hmac, sourceKeyBytes, sourceKeyLen);
 7432|  8.29k|        HMAC_Finish(hmac, hashbuf, &bufLen, sizeof(hashbuf));
 7433|  8.29k|        HMAC_Destroy(hmac, PR_TRUE);
  ------------------
  |  |  437|  8.29k|#define PR_TRUE 1
  ------------------
 7434|  8.29k|        PORT_Assert(bufLen == rawHash->length);
  ------------------
  |  |  120|  8.29k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  8.29k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 8.29k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7435|  8.29k|        prk = hashbuf;
 7436|  8.29k|        prkLen = bufLen;
 7437|  19.0k|    } else {
 7438|       |        /* PRK = base key value */
 7439|  19.0k|        prk = sourceKeyBytes;
 7440|  19.0k|        prkLen = sourceKeyLen;
 7441|  19.0k|    }
 7442|       |
 7443|       |    /* HKDF-Expand */
 7444|  27.3k|    if (!params->bExpand) {
  ------------------
  |  Branch (7444:9): [True: 8.29k, False: 19.0k]
  ------------------
 7445|  8.29k|        okm = prk;
 7446|  8.29k|        keySize = genLen = hashLen;
 7447|  19.0k|    } else {
 7448|       |        /* T(1) = HMAC-Hash(prk, "" | info | 0x01)
 7449|       |         * T(n) = HMAC-Hash(prk, T(n-1) | info | n
 7450|       |         * key material = T(1) | ... | T(n)
 7451|       |         */
 7452|  19.0k|        HMACContext *hmac;
 7453|  19.0k|        CK_BYTE bi;
 7454|  19.0k|        unsigned iterations;
 7455|       |
 7456|  19.0k|        genLen = PR_ROUNDUP(keySize, hashLen);
  ------------------
  |  |  157|  19.0k|#define PR_ROUNDUP(x,y) ((((x)+((y)-1))/(y))*(y))
  ------------------
 7457|  19.0k|        iterations = genLen / hashLen;
 7458|       |
 7459|  19.0k|        if (genLen > sizeof(keyBlock)) {
  ------------------
  |  Branch (7459:13): [True: 0, False: 19.0k]
  ------------------
 7460|      0|            keyBlockAlloc = PORT_Alloc(genLen);
  ------------------
  |  |   52|      0|#define PORT_Alloc PORT_Alloc_Util
  ------------------
 7461|      0|            if (keyBlockAlloc == NULL) {
  ------------------
  |  Branch (7461:17): [True: 0, False: 0]
  ------------------
 7462|      0|                return CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 7463|      0|            }
 7464|      0|            keyBlockData = keyBlockAlloc;
 7465|      0|        }
 7466|  19.0k|        hmac = HMAC_Create(rawHash, prk, prkLen, isFIPS);
 7467|  19.0k|        if (hmac == NULL) {
  ------------------
  |  Branch (7467:13): [True: 0, False: 19.0k]
  ------------------
 7468|      0|            PORT_Free(keyBlockAlloc);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 7469|      0|            return CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 7470|      0|        }
 7471|  38.1k|        for (bi = 1; bi <= iterations && bi > 0; ++bi) {
  ------------------
  |  Branch (7471:22): [True: 19.0k, False: 19.0k]
  |  Branch (7471:42): [True: 19.0k, False: 0]
  ------------------
 7472|  19.0k|            unsigned len;
 7473|  19.0k|            HMAC_Begin(hmac);
 7474|  19.0k|            if (bi > 1) {
  ------------------
  |  Branch (7474:17): [True: 0, False: 19.0k]
  ------------------
 7475|      0|                HMAC_Update(hmac, &keyBlockData[(bi - 2) * hashLen], hashLen);
 7476|      0|            }
 7477|  19.0k|            if (params->ulInfoLen != 0) {
  ------------------
  |  Branch (7477:17): [True: 19.0k, False: 0]
  ------------------
 7478|  19.0k|                HMAC_Update(hmac, params->pInfo, params->ulInfoLen);
 7479|  19.0k|            }
 7480|  19.0k|            HMAC_Update(hmac, &bi, 1);
 7481|  19.0k|            HMAC_Finish(hmac, &keyBlockData[(bi - 1) * hashLen], &len,
 7482|  19.0k|                        hashLen);
 7483|  19.0k|            PORT_Assert(len == hashLen);
  ------------------
  |  |  120|  19.0k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  19.0k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 19.0k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7484|  19.0k|        }
 7485|  19.0k|        HMAC_Destroy(hmac, PR_TRUE);
  ------------------
  |  |  437|  19.0k|#define PR_TRUE 1
  ------------------
 7486|  19.0k|        okm = &keyBlockData[0];
 7487|  19.0k|    }
 7488|       |    /* key material = okm */
 7489|  27.3k|    crv = CKR_OK;
  ------------------
  |  | 1388|  27.3k|#define CKR_OK 0x00000000UL
  ------------------
 7490|  27.3k|    if (key) {
  ------------------
  |  Branch (7490:9): [True: 27.3k, False: 0]
  ------------------
 7491|  27.3k|        crv = sftk_forceAttribute(key, CKA_VALUE, okm, keySize);
  ------------------
  |  |  516|  27.3k|#define CKA_VALUE 0x00000011UL
  ------------------
 7492|  27.3k|    } else {
 7493|      0|        PORT_Assert(outKeyBytes != NULL);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7494|      0|        PORT_Memcpy(outKeyBytes, okm, keySize);
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
 7495|      0|    }
 7496|  27.3k|    PORT_Memset(keyBlockData, 0, genLen);
  ------------------
  |  |  182|  27.3k|#define PORT_Memset memset
  ------------------
 7497|  27.3k|    PORT_Memset(hashbuf, 0, sizeof(hashbuf));
  ------------------
  |  |  182|  27.3k|#define PORT_Memset memset
  ------------------
 7498|  27.3k|    PORT_Free(keyBlockAlloc);
  ------------------
  |  |   60|  27.3k|#define PORT_Free PORT_Free_Util
  ------------------
 7499|  27.3k|    return crv;
 7500|  27.3k|}
NSC_DeriveKey:
 7527|  32.5k|{
 7528|  32.5k|    SFTKSession *session;
 7529|  32.5k|    SFTKSlot *slot = sftk_SlotFromSessionHandle(hSession);
 7530|  32.5k|    SFTKObject *key;
 7531|  32.5k|    SFTKObject *sourceKey;
 7532|  32.5k|    SFTKAttribute *att = NULL;
 7533|  32.5k|    SFTKAttribute *att2 = NULL;
 7534|  32.5k|    unsigned char *buf;
 7535|  32.5k|    SHA1Context *sha;
 7536|  32.5k|    MD5Context *md5;
 7537|  32.5k|    MD2Context *md2;
 7538|  32.5k|    CK_ULONG macSize;
 7539|  32.5k|    CK_ULONG tmpKeySize;
 7540|  32.5k|    CK_ULONG IVSize;
 7541|  32.5k|    CK_ULONG keySize = 0;
 7542|  32.5k|    CK_RV crv = CKR_OK;
  ------------------
  |  | 1388|  32.5k|#define CKR_OK 0x00000000UL
  ------------------
 7543|  32.5k|    CK_BBOOL cktrue = CK_TRUE;
  ------------------
  |  |   22|  32.5k|#define CK_TRUE 1
  ------------------
 7544|  32.5k|    CK_BBOOL ckfalse = CK_FALSE;
  ------------------
  |  |   23|  32.5k|#define CK_FALSE 0
  ------------------
 7545|  32.5k|    CK_KEY_TYPE keyType = CKK_GENERIC_SECRET;
  ------------------
  |  |  383|  32.5k|#define CKK_GENERIC_SECRET 0x00000010UL
  ------------------
 7546|  32.5k|    CK_OBJECT_CLASS classType = CKO_SECRET_KEY;
  ------------------
  |  |  329|  32.5k|#define CKO_SECRET_KEY 0x00000004UL
  ------------------
 7547|  32.5k|    CK_KEY_DERIVATION_STRING_DATA *stringPtr;
 7548|  32.5k|    PRBool isTLS = PR_FALSE;
  ------------------
  |  |  438|  32.5k|#define PR_FALSE 0
  ------------------
 7549|  32.5k|    PRBool isDH = PR_FALSE;
  ------------------
  |  |  438|  32.5k|#define PR_FALSE 0
  ------------------
 7550|  32.5k|    HASH_HashType tlsPrfHash = HASH_AlgNULL;
 7551|  32.5k|    SECStatus rv;
 7552|  32.5k|    int i;
 7553|  32.5k|    unsigned int outLen;
 7554|  32.5k|    unsigned char sha_out[SHA1_LENGTH];
 7555|  32.5k|    unsigned char key_block[NUM_MIXERS * SFTK_MAX_MAC_LENGTH];
 7556|  32.5k|    PRBool isFIPS;
 7557|  32.5k|    HASH_HashType hashType;
 7558|  32.5k|    CK_MECHANISM_TYPE hashMech;
 7559|  32.5k|    PRBool extractValue = PR_TRUE;
  ------------------
  |  |  437|  32.5k|#define PR_TRUE 1
  ------------------
 7560|  32.5k|    CK_NSS_IKE1_APP_B_PRF_DERIVE_PARAMS ikeAppB;
 7561|  32.5k|    CK_NSS_IKE1_APP_B_PRF_DERIVE_PARAMS *pIkeAppB;
 7562|       |
 7563|  32.5k|    CHECK_FORK();
 7564|       |
 7565|  32.5k|    if (!slot) {
  ------------------
  |  Branch (7565:9): [True: 0, False: 32.5k]
  ------------------
 7566|      0|        return CKR_SESSION_HANDLE_INVALID;
  ------------------
  |  | 1465|      0|#define CKR_SESSION_HANDLE_INVALID 0x000000B3UL
  ------------------
 7567|      0|    }
 7568|  32.5k|    if (!pMechanism) {
  ------------------
  |  Branch (7568:9): [True: 0, False: 32.5k]
  ------------------
 7569|      0|        return CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 7570|      0|    }
 7571|  32.5k|    CK_MECHANISM_TYPE mechanism = pMechanism->mechanism;
 7572|       |
 7573|       |    /*
 7574|       |     * now lets create an object to hang the attributes off of
 7575|       |     */
 7576|  32.5k|    if (phKey) {
  ------------------
  |  Branch (7576:9): [True: 32.5k, False: 0]
  ------------------
 7577|  32.5k|        *phKey = CK_INVALID_HANDLE;
  ------------------
  |  |   78|  32.5k|#define CK_INVALID_HANDLE 0
  ------------------
 7578|  32.5k|    }
 7579|       |
 7580|  32.5k|    key = sftk_NewObject(slot); /* fill in the handle later */
 7581|  32.5k|    if (key == NULL) {
  ------------------
  |  Branch (7581:9): [True: 0, False: 32.5k]
  ------------------
 7582|      0|        return CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 7583|      0|    }
 7584|  32.5k|    isFIPS = sftk_isFIPS(slot->slotID);
  ------------------
  |  |  506|  32.5k|    (((id) == FIPS_SLOT_ID) || ((id) >= SFTK_MIN_FIPS_USER_SLOT_ID))
  |  |  ------------------
  |  |  |  |  500|  32.5k|#define FIPS_SLOT_ID 3
  |  |  ------------------
  |  |                   (((id) == FIPS_SLOT_ID) || ((id) >= SFTK_MIN_FIPS_USER_SLOT_ID))
  |  |  ------------------
  |  |  |  |  567|  32.5k|#define SFTK_MIN_FIPS_USER_SLOT_ID 101
  |  |  ------------------
  |  |  |  Branch (506:6): [True: 0, False: 32.5k]
  |  |  |  Branch (506:32): [True: 0, False: 32.5k]
  |  |  ------------------
  ------------------
 7585|       |
 7586|       |    /*
 7587|       |     * load the template values into the object
 7588|       |     */
 7589|   193k|    for (i = 0; i < (int)ulAttributeCount; i++) {
  ------------------
  |  Branch (7589:17): [True: 161k, False: 32.5k]
  ------------------
 7590|   161k|        crv = sftk_AddAttributeType(key, sftk_attr_expand(&pTemplate[i]));
  ------------------
  |  |  587|   161k|#define sftk_attr_expand(ap) (ap)->type, (ap)->pValue, (ap)->ulValueLen
  ------------------
 7591|   161k|        if (crv != CKR_OK)
  ------------------
  |  | 1388|   161k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (7591:13): [True: 0, False: 161k]
  ------------------
 7592|      0|            break;
 7593|       |
 7594|   161k|        if (pTemplate[i].type == CKA_KEY_TYPE) {
  ------------------
  |  |  543|   161k|#define CKA_KEY_TYPE 0x00000100UL
  ------------------
  |  Branch (7594:13): [True: 32.5k, False: 128k]
  ------------------
 7595|  32.5k|            keyType = *(CK_KEY_TYPE *)pTemplate[i].pValue;
 7596|  32.5k|        }
 7597|   161k|        if (pTemplate[i].type == CKA_VALUE_LEN) {
  ------------------
  |  |  580|   161k|#define CKA_VALUE_LEN 0x00000161UL
  ------------------
  |  Branch (7597:13): [True: 22.0k, False: 139k]
  ------------------
 7598|  22.0k|            keySize = *(CK_ULONG *)pTemplate[i].pValue;
 7599|  22.0k|        }
 7600|   161k|    }
 7601|  32.5k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  32.5k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (7601:9): [True: 0, False: 32.5k]
  ------------------
 7602|      0|        sftk_FreeObject(key);
 7603|      0|        return crv;
 7604|      0|    }
 7605|       |
 7606|  32.5k|    if (keySize == 0) {
  ------------------
  |  Branch (7606:9): [True: 10.4k, False: 22.0k]
  ------------------
 7607|  10.4k|        keySize = sftk_MapKeySize(keyType);
 7608|  10.4k|    }
 7609|       |
 7610|  32.5k|    switch (mechanism) {
 7611|      0|        case CKM_NSS_JPAKE_ROUND2_SHA1:   /* fall through */
  ------------------
  |  |  195|      0|#define CKM_NSS_JPAKE_ROUND2_SHA1 (CKM_NSS + 11)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (7611:9): [True: 0, False: 32.5k]
  ------------------
 7612|      0|        case CKM_NSS_JPAKE_ROUND2_SHA256: /* fall through */
  ------------------
  |  |  196|      0|#define CKM_NSS_JPAKE_ROUND2_SHA256 (CKM_NSS + 12)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (7612:9): [True: 0, False: 32.5k]
  ------------------
 7613|      0|        case CKM_NSS_JPAKE_ROUND2_SHA384: /* fall through */
  ------------------
  |  |  197|      0|#define CKM_NSS_JPAKE_ROUND2_SHA384 (CKM_NSS + 13)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (7613:9): [True: 0, False: 32.5k]
  ------------------
 7614|      0|        case CKM_NSS_JPAKE_ROUND2_SHA512:
  ------------------
  |  |  198|      0|#define CKM_NSS_JPAKE_ROUND2_SHA512 (CKM_NSS + 14)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (7614:9): [True: 0, False: 32.5k]
  ------------------
 7615|      0|            extractValue = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 7616|      0|            classType = CKO_PRIVATE_KEY;
  ------------------
  |  |  328|      0|#define CKO_PRIVATE_KEY 0x00000003UL
  ------------------
 7617|      0|            break;
 7618|      0|        case CKM_NSS_PUB_FROM_PRIV:
  ------------------
  |  |  259|      0|#define CKM_NSS_PUB_FROM_PRIV (CKM_NSS + 40)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (7618:9): [True: 0, False: 32.5k]
  ------------------
 7619|      0|            extractValue = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 7620|      0|            classType = CKO_PUBLIC_KEY;
  ------------------
  |  |  327|      0|#define CKO_PUBLIC_KEY 0x00000002UL
  ------------------
 7621|      0|            break;
 7622|  1.60k|        case CKM_HKDF_DATA:                              /* fall through */
  ------------------
  |  | 1297|  1.60k|#define CKM_HKDF_DATA 0x0000402bUL
  ------------------
  |  Branch (7622:9): [True: 1.60k, False: 30.9k]
  ------------------
 7623|  1.60k|        case CKM_NSS_SP800_108_COUNTER_KDF_DERIVE_DATA:  /* fall through */
  ------------------
  |  |  262|  1.60k|#define CKM_NSS_SP800_108_COUNTER_KDF_DERIVE_DATA (CKM_NSS + 42)
  |  |  ------------------
  |  |  |  |  162|  1.60k|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|  1.60k|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  1.60k|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (7623:9): [True: 0, False: 32.5k]
  ------------------
 7624|  1.60k|        case CKM_NSS_SP800_108_FEEDBACK_KDF_DERIVE_DATA: /* fall through */
  ------------------
  |  |  263|  1.60k|#define CKM_NSS_SP800_108_FEEDBACK_KDF_DERIVE_DATA (CKM_NSS + 43)
  |  |  ------------------
  |  |  |  |  162|  1.60k|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|  1.60k|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  1.60k|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (7624:9): [True: 0, False: 32.5k]
  ------------------
 7625|  1.60k|        case CKM_NSS_SP800_108_DOUBLE_PIPELINE_KDF_DERIVE_DATA:
  ------------------
  |  |  264|  1.60k|#define CKM_NSS_SP800_108_DOUBLE_PIPELINE_KDF_DERIVE_DATA (CKM_NSS + 44)
  |  |  ------------------
  |  |  |  |  162|  1.60k|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|  1.60k|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  1.60k|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (7625:9): [True: 0, False: 32.5k]
  ------------------
 7626|  1.60k|            classType = CKO_DATA;
  ------------------
  |  |  325|  1.60k|#define CKO_DATA 0x00000000UL
  ------------------
 7627|  1.60k|            break;
 7628|      0|        case CKM_NSS_JPAKE_FINAL_SHA1:   /* fall through */
  ------------------
  |  |  210|      0|#define CKM_NSS_JPAKE_FINAL_SHA1 (CKM_NSS + 15)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (7628:9): [True: 0, False: 32.5k]
  ------------------
 7629|      0|        case CKM_NSS_JPAKE_FINAL_SHA256: /* fall through */
  ------------------
  |  |  211|      0|#define CKM_NSS_JPAKE_FINAL_SHA256 (CKM_NSS + 16)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (7629:9): [True: 0, False: 32.5k]
  ------------------
 7630|      0|        case CKM_NSS_JPAKE_FINAL_SHA384: /* fall through */
  ------------------
  |  |  212|      0|#define CKM_NSS_JPAKE_FINAL_SHA384 (CKM_NSS + 17)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (7630:9): [True: 0, False: 32.5k]
  ------------------
 7631|      0|        case CKM_NSS_JPAKE_FINAL_SHA512:
  ------------------
  |  |  213|      0|#define CKM_NSS_JPAKE_FINAL_SHA512 (CKM_NSS + 18)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (7631:9): [True: 0, False: 32.5k]
  ------------------
 7632|      0|            extractValue = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 7633|       |        /* fall through */
 7634|  30.9k|        default:
  ------------------
  |  Branch (7634:9): [True: 30.9k, False: 1.60k]
  ------------------
 7635|  30.9k|            classType = CKO_SECRET_KEY;
  ------------------
  |  |  329|  30.9k|#define CKO_SECRET_KEY 0x00000004UL
  ------------------
 7636|  32.5k|    }
 7637|       |
 7638|  32.5k|    crv = sftk_forceAttribute(key, CKA_CLASS, &classType, sizeof(classType));
  ------------------
  |  |  511|  32.5k|#define CKA_CLASS 0x00000000UL
  ------------------
 7639|  32.5k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  32.5k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (7639:9): [True: 0, False: 32.5k]
  ------------------
 7640|      0|        sftk_FreeObject(key);
 7641|      0|        return crv;
 7642|      0|    }
 7643|       |
 7644|       |    /* look up the base key we're deriving with */
 7645|  32.5k|    session = sftk_SessionFromHandle(hSession);
 7646|  32.5k|    if (session == NULL) {
  ------------------
  |  Branch (7646:9): [True: 0, False: 32.5k]
  ------------------
 7647|      0|        sftk_FreeObject(key);
 7648|      0|        return CKR_SESSION_HANDLE_INVALID;
  ------------------
  |  | 1465|      0|#define CKR_SESSION_HANDLE_INVALID 0x000000B3UL
  ------------------
 7649|      0|    }
 7650|       |
 7651|  32.5k|    sourceKey = sftk_ObjectFromHandle(hBaseKey, session);
 7652|  32.5k|    sftk_FreeSession(session);
 7653|       |    /* is this eventually succeeds, lastOpWasFIPS will be set the resulting key's
 7654|       |     * FIPS state below. */
 7655|  32.5k|    session->lastOpWasFIPS = PR_FALSE;
  ------------------
  |  |  438|  32.5k|#define PR_FALSE 0
  ------------------
 7656|  32.5k|    if (sourceKey == NULL) {
  ------------------
  |  Branch (7656:9): [True: 0, False: 32.5k]
  ------------------
 7657|      0|        sftk_FreeObject(key);
 7658|      0|        return CKR_KEY_HANDLE_INVALID;
  ------------------
  |  | 1428|      0|#define CKR_KEY_HANDLE_INVALID 0x00000060UL
  ------------------
 7659|      0|    }
 7660|       |
 7661|  32.5k|    if (extractValue) {
  ------------------
  |  Branch (7661:9): [True: 32.5k, False: 0]
  ------------------
 7662|       |        /* get the value of the base key */
 7663|  32.5k|        att = sftk_FindAttribute(sourceKey, CKA_VALUE);
  ------------------
  |  |  516|  32.5k|#define CKA_VALUE 0x00000011UL
  ------------------
 7664|  32.5k|        if (att == NULL) {
  ------------------
  |  Branch (7664:13): [True: 0, False: 32.5k]
  ------------------
 7665|      0|            sftk_FreeObject(key);
 7666|      0|            sftk_FreeObject(sourceKey);
 7667|      0|            return CKR_KEY_HANDLE_INVALID;
  ------------------
  |  | 1428|      0|#define CKR_KEY_HANDLE_INVALID 0x00000060UL
  ------------------
 7668|      0|        }
 7669|  32.5k|    }
 7670|  32.5k|    key->isFIPS = sftk_operationIsFIPS(slot, pMechanism, CKA_DERIVE, sourceKey);
  ------------------
  |  |  555|  32.5k|#define CKA_DERIVE 0x0000010CUL
  ------------------
 7671|       |
 7672|  32.5k|    switch (mechanism) {
 7673|       |        /* get a public key from a private key. nsslowkey_ConvertToPublickey()
 7674|       |         * will generate the public portion if it doesn't already exist. */
 7675|      0|        case CKM_NSS_PUB_FROM_PRIV: {
  ------------------
  |  |  259|      0|#define CKM_NSS_PUB_FROM_PRIV (CKM_NSS + 40)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (7675:9): [True: 0, False: 32.5k]
  ------------------
 7676|      0|            NSSLOWKEYPrivateKey *privKey;
 7677|      0|            NSSLOWKEYPublicKey *pubKey;
 7678|      0|            int error;
 7679|       |
 7680|      0|            crv = sftk_GetULongAttribute(sourceKey, CKA_KEY_TYPE, &keyType);
  ------------------
  |  |  543|      0|#define CKA_KEY_TYPE 0x00000100UL
  ------------------
 7681|      0|            if (crv != CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (7681:17): [True: 0, False: 0]
  ------------------
 7682|      0|                break;
 7683|      0|            }
 7684|       |
 7685|       |            /* privKey is stored in sourceKey and will be destroyed when
 7686|       |             * the sourceKey is freed. */
 7687|      0|            privKey = sftk_GetPrivKey(sourceKey, keyType, &crv);
 7688|      0|            if (privKey == NULL) {
  ------------------
  |  Branch (7688:17): [True: 0, False: 0]
  ------------------
 7689|      0|                break;
 7690|      0|            }
 7691|      0|            pubKey = nsslowkey_ConvertToPublicKey(privKey);
 7692|      0|            if (pubKey == NULL) {
  ------------------
  |  Branch (7692:17): [True: 0, False: 0]
  ------------------
 7693|      0|                error = PORT_GetError();
  ------------------
  |  |   62|      0|#define PORT_GetError PORT_GetError_Util
  ------------------
 7694|      0|                crv = sftk_MapCryptError(error);
 7695|      0|                break;
 7696|      0|            }
 7697|      0|            crv = sftk_PutPubKey(key, sourceKey, keyType, pubKey);
 7698|      0|            nsslowkey_DestroyPublicKey(pubKey);
 7699|      0|            break;
 7700|      0|        }
 7701|      0|        case CKM_NSS_IKE_PRF_DERIVE:
  ------------------
  |  |  255|      0|#define CKM_NSS_IKE_PRF_DERIVE (CKM_NSS + 35)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (7701:9): [True: 0, False: 32.5k]
  ------------------
 7702|      0|            if (pMechanism->ulParameterLen !=
  ------------------
  |  Branch (7702:17): [True: 0, False: 0]
  ------------------
 7703|      0|                sizeof(CK_NSS_IKE_PRF_DERIVE_PARAMS)) {
 7704|      0|                crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 7705|      0|                break;
 7706|      0|            }
 7707|      0|            crv = sftk_ike_prf(hSession, att,
 7708|      0|                               (CK_NSS_IKE_PRF_DERIVE_PARAMS *)pMechanism->pParameter, key);
 7709|      0|            break;
 7710|      0|        case CKM_NSS_IKE1_PRF_DERIVE:
  ------------------
  |  |  256|      0|#define CKM_NSS_IKE1_PRF_DERIVE (CKM_NSS + 36)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (7710:9): [True: 0, False: 32.5k]
  ------------------
 7711|      0|            if (pMechanism->ulParameterLen !=
  ------------------
  |  Branch (7711:17): [True: 0, False: 0]
  ------------------
 7712|      0|                sizeof(CK_NSS_IKE1_PRF_DERIVE_PARAMS)) {
 7713|      0|                crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 7714|      0|                break;
 7715|      0|            }
 7716|      0|            crv = sftk_ike1_prf(hSession, att,
 7717|      0|                                (CK_NSS_IKE1_PRF_DERIVE_PARAMS *)pMechanism->pParameter,
 7718|      0|                                key, keySize);
 7719|      0|            break;
 7720|      0|        case CKM_NSS_IKE1_APP_B_PRF_DERIVE:
  ------------------
  |  |  257|      0|#define CKM_NSS_IKE1_APP_B_PRF_DERIVE (CKM_NSS + 37)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (7720:9): [True: 0, False: 32.5k]
  ------------------
 7721|      0|            pIkeAppB = (CK_NSS_IKE1_APP_B_PRF_DERIVE_PARAMS *)pMechanism->pParameter;
 7722|      0|            if (pMechanism->ulParameterLen ==
  ------------------
  |  Branch (7722:17): [True: 0, False: 0]
  ------------------
 7723|      0|                sizeof(CK_MECHANISM_TYPE)) {
 7724|      0|                ikeAppB.prfMechanism = *(CK_MECHANISM_TYPE *)pMechanism->pParameter;
 7725|      0|                ikeAppB.bHasKeygxy = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 7726|      0|                ikeAppB.hKeygxy = CK_INVALID_HANDLE;
  ------------------
  |  |   78|      0|#define CK_INVALID_HANDLE 0
  ------------------
 7727|      0|                ikeAppB.pExtraData = NULL;
 7728|      0|                ikeAppB.ulExtraDataLen = 0;
 7729|      0|                pIkeAppB = &ikeAppB;
 7730|      0|            } else if (pMechanism->ulParameterLen !=
  ------------------
  |  Branch (7730:24): [True: 0, False: 0]
  ------------------
 7731|      0|                       sizeof(CK_NSS_IKE1_APP_B_PRF_DERIVE_PARAMS)) {
 7732|      0|                crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 7733|      0|                break;
 7734|      0|            }
 7735|      0|            crv = sftk_ike1_appendix_b_prf(hSession, att, pIkeAppB, key,
 7736|      0|                                           keySize);
 7737|      0|            break;
 7738|      0|        case CKM_NSS_IKE_PRF_PLUS_DERIVE:
  ------------------
  |  |  254|      0|#define CKM_NSS_IKE_PRF_PLUS_DERIVE (CKM_NSS + 34)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (7738:9): [True: 0, False: 32.5k]
  ------------------
 7739|      0|            if (pMechanism->ulParameterLen !=
  ------------------
  |  Branch (7739:17): [True: 0, False: 0]
  ------------------
 7740|      0|                sizeof(CK_NSS_IKE_PRF_PLUS_DERIVE_PARAMS)) {
 7741|      0|                crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 7742|      0|                break;
 7743|      0|            }
 7744|      0|            crv = sftk_ike_prf_plus(hSession, att,
 7745|      0|                                    (CK_NSS_IKE_PRF_PLUS_DERIVE_PARAMS *)pMechanism->pParameter,
 7746|      0|                                    key, keySize);
 7747|      0|            break;
 7748|       |        /*
 7749|       |         * generate the master secret
 7750|       |         */
 7751|  1.22k|        case CKM_TLS12_MASTER_KEY_DERIVE:
  ------------------
  |  | 1026|  1.22k|#define CKM_TLS12_MASTER_KEY_DERIVE 0x000003E0UL
  ------------------
  |  Branch (7751:9): [True: 1.22k, False: 31.3k]
  ------------------
 7752|  1.55k|        case CKM_TLS12_MASTER_KEY_DERIVE_DH:
  ------------------
  |  | 1028|  1.55k|#define CKM_TLS12_MASTER_KEY_DERIVE_DH 0x000003E2UL
  ------------------
  |  Branch (7752:9): [True: 330, False: 32.2k]
  ------------------
 7753|  1.55k|        case CKM_NSS_TLS_MASTER_KEY_DERIVE_SHA256:
  ------------------
  |  |  234|  1.55k|#define CKM_NSS_TLS_MASTER_KEY_DERIVE_SHA256 (CKM_NSS + 22)
  |  |  ------------------
  |  |  |  |  162|  1.55k|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|  1.55k|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  1.55k|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (7753:9): [True: 0, False: 32.5k]
  ------------------
 7754|  1.55k|        case CKM_NSS_TLS_MASTER_KEY_DERIVE_DH_SHA256:
  ------------------
  |  |  236|  1.55k|#define CKM_NSS_TLS_MASTER_KEY_DERIVE_DH_SHA256 (CKM_NSS + 24)
  |  |  ------------------
  |  |  |  |  162|  1.55k|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|  1.55k|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  1.55k|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (7754:9): [True: 0, False: 32.5k]
  ------------------
 7755|  1.59k|        case CKM_TLS_MASTER_KEY_DERIVE:
  ------------------
  |  |  968|  1.59k|#define CKM_TLS_MASTER_KEY_DERIVE 0x00000375UL
  ------------------
  |  Branch (7755:9): [True: 40, False: 32.5k]
  ------------------
 7756|  1.62k|        case CKM_TLS_MASTER_KEY_DERIVE_DH:
  ------------------
  |  |  970|  1.62k|#define CKM_TLS_MASTER_KEY_DERIVE_DH 0x00000377UL
  ------------------
  |  Branch (7756:9): [True: 25, False: 32.5k]
  ------------------
 7757|  1.62k|        case CKM_SSL3_MASTER_KEY_DERIVE:
  ------------------
  |  |  960|  1.62k|#define CKM_SSL3_MASTER_KEY_DERIVE 0x00000371UL
  ------------------
  |  Branch (7757:9): [True: 0, False: 32.5k]
  ------------------
 7758|  1.62k|        case CKM_SSL3_MASTER_KEY_DERIVE_DH: {
  ------------------
  |  |  966|  1.62k|#define CKM_SSL3_MASTER_KEY_DERIVE_DH 0x00000373UL
  ------------------
  |  Branch (7758:9): [True: 0, False: 32.5k]
  ------------------
 7759|  1.62k|            CK_SSL3_MASTER_KEY_DERIVE_PARAMS *ssl3_master;
 7760|  1.62k|            SSL3RSAPreMasterSecret *rsa_pms;
 7761|  1.62k|            unsigned char crsrdata[SSL3_RANDOM_LENGTH * 2];
 7762|       |
 7763|  1.62k|            if ((mechanism == CKM_TLS12_MASTER_KEY_DERIVE) ||
  ------------------
  |  | 1026|  1.62k|#define CKM_TLS12_MASTER_KEY_DERIVE 0x000003E0UL
  ------------------
  |  Branch (7763:17): [True: 1.22k, False: 395]
  ------------------
 7764|  1.62k|                (mechanism == CKM_TLS12_MASTER_KEY_DERIVE_DH)) {
  ------------------
  |  | 1028|    395|#define CKM_TLS12_MASTER_KEY_DERIVE_DH 0x000003E2UL
  ------------------
  |  Branch (7764:17): [True: 330, False: 65]
  ------------------
 7765|  1.55k|                if (BAD_PARAM_CAST(pMechanism, sizeof(CK_TLS12_MASTER_KEY_DERIVE_PARAMS))) {
  ------------------
  |  |   50|  1.55k|#define BAD_PARAM_CAST(pMech, typeSize) (!pMech->pParameter || pMech->ulParameterLen < typeSize)
  |  |  ------------------
  |  |  |  Branch (50:42): [True: 0, False: 1.55k]
  |  |  |  Branch (50:64): [True: 0, False: 1.55k]
  |  |  ------------------
  ------------------
 7766|      0|                    crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 7767|      0|                    break;
 7768|      0|                }
 7769|  1.55k|                CK_TLS12_MASTER_KEY_DERIVE_PARAMS *tls12_master =
 7770|  1.55k|                    (CK_TLS12_MASTER_KEY_DERIVE_PARAMS *)pMechanism->pParameter;
 7771|  1.55k|                tlsPrfHash = sftk_GetHashTypeFromMechanism(tls12_master->prfHashMechanism);
 7772|  1.55k|                if (tlsPrfHash == HASH_AlgNULL) {
  ------------------
  |  Branch (7772:21): [True: 0, False: 1.55k]
  ------------------
 7773|      0|                    crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 7774|      0|                    break;
 7775|      0|                }
 7776|  1.55k|            } else if ((mechanism == CKM_NSS_TLS_MASTER_KEY_DERIVE_SHA256) ||
  ------------------
  |  |  234|     65|#define CKM_NSS_TLS_MASTER_KEY_DERIVE_SHA256 (CKM_NSS + 22)
  |  |  ------------------
  |  |  |  |  162|     65|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|     65|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     65|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (7776:24): [True: 0, False: 65]
  ------------------
 7777|     65|                       (mechanism == CKM_NSS_TLS_MASTER_KEY_DERIVE_DH_SHA256)) {
  ------------------
  |  |  236|     65|#define CKM_NSS_TLS_MASTER_KEY_DERIVE_DH_SHA256 (CKM_NSS + 24)
  |  |  ------------------
  |  |  |  |  162|     65|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|     65|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     65|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (7777:24): [True: 0, False: 65]
  ------------------
 7778|      0|                tlsPrfHash = HASH_AlgSHA256;
 7779|      0|            }
 7780|       |
 7781|  1.62k|            if ((mechanism != CKM_SSL3_MASTER_KEY_DERIVE) &&
  ------------------
  |  |  960|  1.62k|#define CKM_SSL3_MASTER_KEY_DERIVE 0x00000371UL
  ------------------
  |  Branch (7781:17): [True: 1.62k, False: 0]
  ------------------
 7782|  1.62k|                (mechanism != CKM_SSL3_MASTER_KEY_DERIVE_DH)) {
  ------------------
  |  |  966|  1.62k|#define CKM_SSL3_MASTER_KEY_DERIVE_DH 0x00000373UL
  ------------------
  |  Branch (7782:17): [True: 1.62k, False: 0]
  ------------------
 7783|  1.62k|                isTLS = PR_TRUE;
  ------------------
  |  |  437|  1.62k|#define PR_TRUE 1
  ------------------
 7784|  1.62k|            }
 7785|  1.62k|            if ((mechanism == CKM_SSL3_MASTER_KEY_DERIVE_DH) ||
  ------------------
  |  |  966|  1.62k|#define CKM_SSL3_MASTER_KEY_DERIVE_DH 0x00000373UL
  ------------------
  |  Branch (7785:17): [True: 0, False: 1.62k]
  ------------------
 7786|  1.62k|                (mechanism == CKM_TLS_MASTER_KEY_DERIVE_DH) ||
  ------------------
  |  |  970|  1.62k|#define CKM_TLS_MASTER_KEY_DERIVE_DH 0x00000377UL
  ------------------
  |  Branch (7786:17): [True: 25, False: 1.59k]
  ------------------
 7787|  1.62k|                (mechanism == CKM_NSS_TLS_MASTER_KEY_DERIVE_DH_SHA256) ||
  ------------------
  |  |  236|  1.59k|#define CKM_NSS_TLS_MASTER_KEY_DERIVE_DH_SHA256 (CKM_NSS + 24)
  |  |  ------------------
  |  |  |  |  162|  1.59k|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|  1.59k|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  1.59k|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (7787:17): [True: 0, False: 1.59k]
  ------------------
 7788|  1.62k|                (mechanism == CKM_TLS12_MASTER_KEY_DERIVE_DH)) {
  ------------------
  |  | 1028|  1.59k|#define CKM_TLS12_MASTER_KEY_DERIVE_DH 0x000003E2UL
  ------------------
  |  Branch (7788:17): [True: 330, False: 1.26k]
  ------------------
 7789|    355|                isDH = PR_TRUE;
  ------------------
  |  |  437|    355|#define PR_TRUE 1
  ------------------
 7790|    355|            }
 7791|       |
 7792|       |            /* first do the consistency checks */
 7793|  1.62k|            if (!isDH && (att->attrib.ulValueLen != SSL3_PMS_LENGTH)) {
  ------------------
  |  | 7517|  1.26k|#define SSL3_PMS_LENGTH 48
  ------------------
  |  Branch (7793:17): [True: 1.26k, False: 355]
  |  Branch (7793:26): [True: 0, False: 1.26k]
  ------------------
 7794|      0|                crv = CKR_KEY_TYPE_INCONSISTENT;
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
 7795|      0|                break;
 7796|      0|            }
 7797|  1.62k|            att2 = sftk_FindAttribute(sourceKey, CKA_KEY_TYPE);
  ------------------
  |  |  543|  1.62k|#define CKA_KEY_TYPE 0x00000100UL
  ------------------
 7798|  1.62k|            if ((att2 == NULL) || (*(CK_KEY_TYPE *)att2->attrib.pValue !=
  ------------------
  |  Branch (7798:17): [True: 0, False: 1.62k]
  |  Branch (7798:35): [True: 0, False: 1.62k]
  ------------------
 7799|  1.62k|                                   CKK_GENERIC_SECRET)) {
  ------------------
  |  |  383|  1.62k|#define CKK_GENERIC_SECRET 0x00000010UL
  ------------------
 7800|      0|                if (att2)
  ------------------
  |  Branch (7800:21): [True: 0, False: 0]
  ------------------
 7801|      0|                    sftk_FreeAttribute(att2);
 7802|      0|                crv = CKR_KEY_FUNCTION_NOT_PERMITTED;
  ------------------
  |  | 1443|      0|#define CKR_KEY_FUNCTION_NOT_PERMITTED 0x00000068UL
  ------------------
 7803|      0|                break;
 7804|      0|            }
 7805|  1.62k|            sftk_FreeAttribute(att2);
 7806|  1.62k|            if (keyType != CKK_GENERIC_SECRET) {
  ------------------
  |  |  383|  1.62k|#define CKK_GENERIC_SECRET 0x00000010UL
  ------------------
  |  Branch (7806:17): [True: 0, False: 1.62k]
  ------------------
 7807|      0|                crv = CKR_KEY_FUNCTION_NOT_PERMITTED;
  ------------------
  |  | 1443|      0|#define CKR_KEY_FUNCTION_NOT_PERMITTED 0x00000068UL
  ------------------
 7808|      0|                break;
 7809|      0|            }
 7810|  1.62k|            if ((keySize != 0) && (keySize != SSL3_MASTER_SECRET_LENGTH)) {
  ------------------
  |  | 7518|      0|#define SSL3_MASTER_SECRET_LENGTH 48
  ------------------
  |  Branch (7810:17): [True: 0, False: 1.62k]
  |  Branch (7810:35): [True: 0, False: 0]
  ------------------
 7811|      0|                crv = CKR_KEY_FUNCTION_NOT_PERMITTED;
  ------------------
  |  | 1443|      0|#define CKR_KEY_FUNCTION_NOT_PERMITTED 0x00000068UL
  ------------------
 7812|      0|                break;
 7813|      0|            }
 7814|       |
 7815|       |            /* finally do the key gen */
 7816|  1.62k|            ssl3_master = (CK_SSL3_MASTER_KEY_DERIVE_PARAMS *)
 7817|  1.62k|                              pMechanism->pParameter;
 7818|       |
 7819|  1.62k|            if (ssl3_master->pVersion) {
  ------------------
  |  Branch (7819:17): [True: 1.26k, False: 355]
  ------------------
 7820|  1.26k|                SFTKSessionObject *sessKey = sftk_narrowToSessionObject(key);
 7821|  1.26k|                rsa_pms = (SSL3RSAPreMasterSecret *)att->attrib.pValue;
 7822|       |                /* don't leak more key material then necessary for SSL to work */
 7823|  1.26k|                if ((sessKey == NULL) || sessKey->wasDerived) {
  ------------------
  |  Branch (7823:21): [True: 0, False: 1.26k]
  |  Branch (7823:42): [True: 0, False: 1.26k]
  ------------------
 7824|      0|                    ssl3_master->pVersion->major = 0xff;
 7825|      0|                    ssl3_master->pVersion->minor = 0xff;
 7826|  1.26k|                } else {
 7827|  1.26k|                    ssl3_master->pVersion->major = rsa_pms->client_version[0];
 7828|  1.26k|                    ssl3_master->pVersion->minor = rsa_pms->client_version[1];
 7829|  1.26k|                }
 7830|  1.26k|            }
 7831|  1.62k|            if (ssl3_master->RandomInfo.ulClientRandomLen != SSL3_RANDOM_LENGTH) {
  ------------------
  |  | 7519|  1.62k|#define SSL3_RANDOM_LENGTH 32
  ------------------
  |  Branch (7831:17): [True: 0, False: 1.62k]
  ------------------
 7832|      0|                crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 7833|      0|                break;
 7834|      0|            }
 7835|  1.62k|            if (ssl3_master->RandomInfo.ulServerRandomLen != SSL3_RANDOM_LENGTH) {
  ------------------
  |  | 7519|  1.62k|#define SSL3_RANDOM_LENGTH 32
  ------------------
  |  Branch (7835:17): [True: 0, False: 1.62k]
  ------------------
 7836|      0|                crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 7837|      0|                break;
 7838|      0|            }
 7839|  1.62k|            PORT_Memcpy(crsrdata,
  ------------------
  |  |  180|  1.62k|#define PORT_Memcpy memcpy
  ------------------
 7840|  1.62k|                        ssl3_master->RandomInfo.pClientRandom, SSL3_RANDOM_LENGTH);
  ------------------
  |  | 7519|  1.62k|#define SSL3_RANDOM_LENGTH 32
  ------------------
 7841|  1.62k|            PORT_Memcpy(crsrdata + SSL3_RANDOM_LENGTH,
  ------------------
  |  |  180|  1.62k|#define PORT_Memcpy memcpy
  ------------------
                          PORT_Memcpy(crsrdata + SSL3_RANDOM_LENGTH,
  ------------------
  |  | 7519|  1.62k|#define SSL3_RANDOM_LENGTH 32
  ------------------
 7842|  1.62k|                        ssl3_master->RandomInfo.pServerRandom, SSL3_RANDOM_LENGTH);
  ------------------
  |  | 7519|  1.62k|#define SSL3_RANDOM_LENGTH 32
  ------------------
 7843|       |
 7844|  1.62k|            if (isTLS) {
  ------------------
  |  Branch (7844:17): [True: 1.62k, False: 0]
  ------------------
 7845|  1.62k|                SECStatus status;
 7846|  1.62k|                SECItem crsr = { siBuffer, NULL, 0 };
 7847|  1.62k|                SECItem master = { siBuffer, NULL, 0 };
 7848|  1.62k|                SECItem pms = { siBuffer, NULL, 0 };
 7849|       |
 7850|  1.62k|                crsr.data = crsrdata;
 7851|  1.62k|                crsr.len = sizeof crsrdata;
 7852|  1.62k|                master.data = key_block;
 7853|  1.62k|                master.len = SSL3_MASTER_SECRET_LENGTH;
  ------------------
  |  | 7518|  1.62k|#define SSL3_MASTER_SECRET_LENGTH 48
  ------------------
 7854|  1.62k|                pms.data = (unsigned char *)att->attrib.pValue;
 7855|  1.62k|                pms.len = att->attrib.ulValueLen;
 7856|       |
 7857|  1.62k|                if (tlsPrfHash != HASH_AlgNULL) {
  ------------------
  |  Branch (7857:21): [True: 1.55k, False: 65]
  ------------------
 7858|  1.55k|                    status = TLS_P_hash(tlsPrfHash, &pms, "master secret",
 7859|  1.55k|                                        &crsr, &master, isFIPS);
 7860|  1.55k|                } else {
 7861|     65|                    status = TLS_PRF(&pms, "master secret", &crsr, &master, isFIPS);
 7862|     65|                }
 7863|  1.62k|                if (status != SECSuccess) {
  ------------------
  |  Branch (7863:21): [True: 0, False: 1.62k]
  ------------------
 7864|      0|                    PORT_Memset(crsrdata, 0, sizeof crsrdata);
  ------------------
  |  |  182|      0|#define PORT_Memset memset
  ------------------
 7865|      0|                    crv = CKR_FUNCTION_FAILED;
  ------------------
  |  | 1397|      0|#define CKR_FUNCTION_FAILED 0x00000006UL
  ------------------
 7866|      0|                    break;
 7867|      0|                }
 7868|  1.62k|            } else {
 7869|       |                /* now allocate the hash contexts */
 7870|      0|                md5 = MD5_NewContext();
 7871|      0|                if (md5 == NULL) {
  ------------------
  |  Branch (7871:21): [True: 0, False: 0]
  ------------------
 7872|      0|                    PORT_Memset(crsrdata, 0, sizeof crsrdata);
  ------------------
  |  |  182|      0|#define PORT_Memset memset
  ------------------
 7873|      0|                    crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 7874|      0|                    break;
 7875|      0|                }
 7876|      0|                sha = SHA1_NewContext();
 7877|      0|                if (sha == NULL) {
  ------------------
  |  Branch (7877:21): [True: 0, False: 0]
  ------------------
 7878|      0|                    PORT_Memset(crsrdata, 0, sizeof crsrdata);
  ------------------
  |  |  182|      0|#define PORT_Memset memset
  ------------------
 7879|      0|                    PORT_Free(md5);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 7880|      0|                    crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 7881|      0|                    break;
 7882|      0|                }
 7883|      0|                for (i = 0; i < 3; i++) {
  ------------------
  |  Branch (7883:29): [True: 0, False: 0]
  ------------------
 7884|      0|                    SHA1_Begin(sha);
 7885|      0|                    SHA1_Update(sha, (unsigned char *)mixers[i], strlen(mixers[i]));
 7886|      0|                    SHA1_Update(sha, (const unsigned char *)att->attrib.pValue,
 7887|      0|                                att->attrib.ulValueLen);
 7888|      0|                    SHA1_Update(sha, crsrdata, sizeof crsrdata);
 7889|      0|                    SHA1_End(sha, sha_out, &outLen, SHA1_LENGTH);
  ------------------
  |  |   39|      0|#define SHA1_LENGTH 20
  ------------------
 7890|      0|                    PORT_Assert(outLen == SHA1_LENGTH);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7891|       |
 7892|      0|                    MD5_Begin(md5);
 7893|      0|                    MD5_Update(md5, (const unsigned char *)att->attrib.pValue,
 7894|      0|                               att->attrib.ulValueLen);
 7895|      0|                    MD5_Update(md5, sha_out, outLen);
 7896|      0|                    MD5_End(md5, &key_block[i * MD5_LENGTH], &outLen, MD5_LENGTH);
  ------------------
  |  |   38|      0|#define MD5_LENGTH 16
  ------------------
                                  MD5_End(md5, &key_block[i * MD5_LENGTH], &outLen, MD5_LENGTH);
  ------------------
  |  |   38|      0|#define MD5_LENGTH 16
  ------------------
 7897|      0|                    PORT_Assert(outLen == MD5_LENGTH);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7898|      0|                }
 7899|      0|                PORT_Free(md5);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 7900|      0|                PORT_Free(sha);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 7901|      0|                PORT_Memset(crsrdata, 0, sizeof crsrdata);
  ------------------
  |  |  182|      0|#define PORT_Memset memset
  ------------------
 7902|      0|                PORT_Memset(sha_out, 0, sizeof sha_out);
  ------------------
  |  |  182|      0|#define PORT_Memset memset
  ------------------
 7903|      0|            }
 7904|       |
 7905|       |            /* store the results */
 7906|  1.62k|            crv = sftk_forceAttribute(key, CKA_VALUE, key_block, SSL3_MASTER_SECRET_LENGTH);
  ------------------
  |  |  516|  1.62k|#define CKA_VALUE 0x00000011UL
  ------------------
                          crv = sftk_forceAttribute(key, CKA_VALUE, key_block, SSL3_MASTER_SECRET_LENGTH);
  ------------------
  |  | 7518|  1.62k|#define SSL3_MASTER_SECRET_LENGTH 48
  ------------------
 7907|  1.62k|            PORT_Memset(key_block, 0, sizeof key_block);
  ------------------
  |  |  182|  1.62k|#define PORT_Memset memset
  ------------------
 7908|  1.62k|            if (crv != CKR_OK)
  ------------------
  |  | 1388|  1.62k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (7908:17): [True: 0, False: 1.62k]
  ------------------
 7909|      0|                break;
 7910|  1.62k|            keyType = CKK_GENERIC_SECRET;
  ------------------
  |  |  383|  1.62k|#define CKK_GENERIC_SECRET 0x00000010UL
  ------------------
 7911|  1.62k|            crv = sftk_forceAttribute(key, CKA_KEY_TYPE, &keyType, sizeof(keyType));
  ------------------
  |  |  543|  1.62k|#define CKA_KEY_TYPE 0x00000100UL
  ------------------
 7912|  1.62k|            if (isTLS) {
  ------------------
  |  Branch (7912:17): [True: 1.62k, False: 0]
  ------------------
 7913|       |                /* TLS's master secret is used to "sign" finished msgs with PRF. */
 7914|       |                /* XXX This seems like a hack.   But SFTK_Derive only accepts
 7915|       |                 * one "operation" argument. */
 7916|  1.62k|                crv = sftk_forceAttribute(key, CKA_SIGN, &cktrue, sizeof(CK_BBOOL));
  ------------------
  |  |  551|  1.62k|#define CKA_SIGN 0x00000108UL
  ------------------
 7917|  1.62k|                if (crv != CKR_OK)
  ------------------
  |  | 1388|  1.62k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (7917:21): [True: 0, False: 1.62k]
  ------------------
 7918|      0|                    break;
 7919|  1.62k|                crv = sftk_forceAttribute(key, CKA_VERIFY, &cktrue, sizeof(CK_BBOOL));
  ------------------
  |  |  553|  1.62k|#define CKA_VERIFY 0x0000010AUL
  ------------------
 7920|  1.62k|                if (crv != CKR_OK)
  ------------------
  |  | 1388|  1.62k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (7920:21): [True: 0, False: 1.62k]
  ------------------
 7921|      0|                    break;
 7922|       |                /* While we're here, we might as well force this, too. */
 7923|  1.62k|                crv = sftk_forceAttribute(key, CKA_DERIVE, &cktrue, sizeof(CK_BBOOL));
  ------------------
  |  |  555|  1.62k|#define CKA_DERIVE 0x0000010CUL
  ------------------
 7924|  1.62k|                if (crv != CKR_OK)
  ------------------
  |  | 1388|  1.62k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (7924:21): [True: 0, False: 1.62k]
  ------------------
 7925|      0|                    break;
 7926|  1.62k|            }
 7927|  1.62k|            break;
 7928|  1.62k|        }
 7929|       |
 7930|       |        /* Extended master key derivation [draft-ietf-tls-session-hash] */
 7931|  1.62k|        case CKM_NSS_TLS_EXTENDED_MASTER_KEY_DERIVE:
  ------------------
  |  |  239|      3|#define CKM_NSS_TLS_EXTENDED_MASTER_KEY_DERIVE (CKM_NSS + 25)
  |  |  ------------------
  |  |  |  |  162|      3|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      3|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      3|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (7931:9): [True: 3, False: 32.5k]
  ------------------
 7932|      5|        case CKM_NSS_TLS_EXTENDED_MASTER_KEY_DERIVE_DH: {
  ------------------
  |  |  240|      5|#define CKM_NSS_TLS_EXTENDED_MASTER_KEY_DERIVE_DH (CKM_NSS + 26)
  |  |  ------------------
  |  |  |  |  162|      5|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      5|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      5|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (7932:9): [True: 2, False: 32.5k]
  ------------------
 7933|      5|            CK_NSS_TLS_EXTENDED_MASTER_KEY_DERIVE_PARAMS *ems_params;
 7934|      5|            SSL3RSAPreMasterSecret *rsa_pms;
 7935|      5|            SECStatus status;
 7936|      5|            SECItem pms = { siBuffer, NULL, 0 };
 7937|      5|            SECItem seed = { siBuffer, NULL, 0 };
 7938|      5|            SECItem master = { siBuffer, NULL, 0 };
 7939|       |
 7940|      5|            ems_params = (CK_NSS_TLS_EXTENDED_MASTER_KEY_DERIVE_PARAMS *)
 7941|      5|                             pMechanism->pParameter;
 7942|       |
 7943|       |            /* First do the consistency checks */
 7944|      5|            if ((mechanism == CKM_NSS_TLS_EXTENDED_MASTER_KEY_DERIVE) &&
  ------------------
  |  |  239|      5|#define CKM_NSS_TLS_EXTENDED_MASTER_KEY_DERIVE (CKM_NSS + 25)
  |  |  ------------------
  |  |  |  |  162|      5|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      5|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      5|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (7944:17): [True: 3, False: 2]
  ------------------
 7945|      5|                (att->attrib.ulValueLen != SSL3_PMS_LENGTH)) {
  ------------------
  |  | 7517|      3|#define SSL3_PMS_LENGTH 48
  ------------------
  |  Branch (7945:17): [True: 0, False: 3]
  ------------------
 7946|      0|                crv = CKR_KEY_TYPE_INCONSISTENT;
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
 7947|      0|                break;
 7948|      0|            }
 7949|      5|            att2 = sftk_FindAttribute(sourceKey, CKA_KEY_TYPE);
  ------------------
  |  |  543|      5|#define CKA_KEY_TYPE 0x00000100UL
  ------------------
 7950|      5|            if ((att2 == NULL) ||
  ------------------
  |  Branch (7950:17): [True: 0, False: 5]
  ------------------
 7951|      5|                (*(CK_KEY_TYPE *)att2->attrib.pValue != CKK_GENERIC_SECRET)) {
  ------------------
  |  |  383|      5|#define CKK_GENERIC_SECRET 0x00000010UL
  ------------------
  |  Branch (7951:17): [True: 0, False: 5]
  ------------------
 7952|      0|                if (att2)
  ------------------
  |  Branch (7952:21): [True: 0, False: 0]
  ------------------
 7953|      0|                    sftk_FreeAttribute(att2);
 7954|      0|                crv = CKR_KEY_FUNCTION_NOT_PERMITTED;
  ------------------
  |  | 1443|      0|#define CKR_KEY_FUNCTION_NOT_PERMITTED 0x00000068UL
  ------------------
 7955|      0|                break;
 7956|      0|            }
 7957|      5|            sftk_FreeAttribute(att2);
 7958|      5|            if (keyType != CKK_GENERIC_SECRET) {
  ------------------
  |  |  383|      5|#define CKK_GENERIC_SECRET 0x00000010UL
  ------------------
  |  Branch (7958:17): [True: 0, False: 5]
  ------------------
 7959|      0|                crv = CKR_KEY_FUNCTION_NOT_PERMITTED;
  ------------------
  |  | 1443|      0|#define CKR_KEY_FUNCTION_NOT_PERMITTED 0x00000068UL
  ------------------
 7960|      0|                break;
 7961|      0|            }
 7962|      5|            if ((keySize != 0) && (keySize != SSL3_MASTER_SECRET_LENGTH)) {
  ------------------
  |  | 7518|      0|#define SSL3_MASTER_SECRET_LENGTH 48
  ------------------
  |  Branch (7962:17): [True: 0, False: 5]
  |  Branch (7962:35): [True: 0, False: 0]
  ------------------
 7963|      0|                crv = CKR_KEY_FUNCTION_NOT_PERMITTED;
  ------------------
  |  | 1443|      0|#define CKR_KEY_FUNCTION_NOT_PERMITTED 0x00000068UL
  ------------------
 7964|      0|                break;
 7965|      0|            }
 7966|       |
 7967|       |            /* Do the key derivation */
 7968|      5|            pms.data = (unsigned char *)att->attrib.pValue;
 7969|      5|            pms.len = att->attrib.ulValueLen;
 7970|      5|            seed.data = ems_params->pSessionHash;
 7971|      5|            seed.len = ems_params->ulSessionHashLen;
 7972|      5|            master.data = key_block;
 7973|      5|            master.len = SSL3_MASTER_SECRET_LENGTH;
  ------------------
  |  | 7518|      5|#define SSL3_MASTER_SECRET_LENGTH 48
  ------------------
 7974|      5|            if (ems_params->prfHashMechanism == CKM_TLS_PRF) {
  ------------------
  |  |  973|      5|#define CKM_TLS_PRF 0x00000378UL
  ------------------
  |  Branch (7974:17): [True: 1, False: 4]
  ------------------
 7975|       |                /*
 7976|       |                 * In this case, the session hash is the concatenation of SHA-1
 7977|       |                 * and MD5, so it should be 36 bytes long.
 7978|       |                 */
 7979|      1|                if (seed.len != MD5_LENGTH + SHA1_LENGTH) {
  ------------------
  |  |   38|      1|#define MD5_LENGTH 16
  ------------------
                              if (seed.len != MD5_LENGTH + SHA1_LENGTH) {
  ------------------
  |  |   39|      1|#define SHA1_LENGTH 20
  ------------------
  |  Branch (7979:21): [True: 0, False: 1]
  ------------------
 7980|      0|                    crv = CKR_TEMPLATE_INCONSISTENT;
  ------------------
  |  | 1478|      0|#define CKR_TEMPLATE_INCONSISTENT 0x000000D1UL
  ------------------
 7981|      0|                    break;
 7982|      0|                }
 7983|       |
 7984|      1|                status = TLS_PRF(&pms, "extended master secret",
 7985|      1|                                 &seed, &master, isFIPS);
 7986|      4|            } else {
 7987|      4|                const SECHashObject *hashObj;
 7988|       |
 7989|      4|                tlsPrfHash = sftk_GetHashTypeFromMechanism(ems_params->prfHashMechanism);
 7990|      4|                if (tlsPrfHash == HASH_AlgNULL) {
  ------------------
  |  Branch (7990:21): [True: 0, False: 4]
  ------------------
 7991|      0|                    crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 7992|      0|                    break;
 7993|      0|                }
 7994|       |
 7995|      4|                hashObj = HASH_GetRawHashObject(tlsPrfHash);
 7996|      4|                if (seed.len != hashObj->length) {
  ------------------
  |  Branch (7996:21): [True: 0, False: 4]
  ------------------
 7997|      0|                    crv = CKR_TEMPLATE_INCONSISTENT;
  ------------------
  |  | 1478|      0|#define CKR_TEMPLATE_INCONSISTENT 0x000000D1UL
  ------------------
 7998|      0|                    break;
 7999|      0|                }
 8000|       |
 8001|      4|                status = TLS_P_hash(tlsPrfHash, &pms, "extended master secret",
 8002|      4|                                    &seed, &master, isFIPS);
 8003|      4|            }
 8004|      5|            if (status != SECSuccess) {
  ------------------
  |  Branch (8004:17): [True: 0, False: 5]
  ------------------
 8005|      0|                crv = CKR_FUNCTION_FAILED;
  ------------------
  |  | 1397|      0|#define CKR_FUNCTION_FAILED 0x00000006UL
  ------------------
 8006|      0|                break;
 8007|      0|            }
 8008|       |
 8009|       |            /* Reflect the version if required */
 8010|      5|            if (ems_params->pVersion) {
  ------------------
  |  Branch (8010:17): [True: 3, False: 2]
  ------------------
 8011|      3|                SFTKSessionObject *sessKey = sftk_narrowToSessionObject(key);
 8012|      3|                rsa_pms = (SSL3RSAPreMasterSecret *)att->attrib.pValue;
 8013|       |                /* don't leak more key material than necessary for SSL to work */
 8014|      3|                if ((sessKey == NULL) || sessKey->wasDerived) {
  ------------------
  |  Branch (8014:21): [True: 0, False: 3]
  |  Branch (8014:42): [True: 0, False: 3]
  ------------------
 8015|      0|                    ems_params->pVersion->major = 0xff;
 8016|      0|                    ems_params->pVersion->minor = 0xff;
 8017|      3|                } else {
 8018|      3|                    ems_params->pVersion->major = rsa_pms->client_version[0];
 8019|      3|                    ems_params->pVersion->minor = rsa_pms->client_version[1];
 8020|      3|                }
 8021|      3|            }
 8022|       |
 8023|       |            /* Store the results */
 8024|      5|            crv = sftk_forceAttribute(key, CKA_VALUE, key_block,
  ------------------
  |  |  516|      5|#define CKA_VALUE 0x00000011UL
  ------------------
 8025|      5|                                      SSL3_MASTER_SECRET_LENGTH);
  ------------------
  |  | 7518|      5|#define SSL3_MASTER_SECRET_LENGTH 48
  ------------------
 8026|      5|            PORT_Memset(key_block, 0, sizeof key_block);
  ------------------
  |  |  182|      5|#define PORT_Memset memset
  ------------------
 8027|      5|            break;
 8028|      5|        }
 8029|       |
 8030|  1.55k|        case CKM_TLS12_KEY_AND_MAC_DERIVE:
  ------------------
  |  | 1027|  1.55k|#define CKM_TLS12_KEY_AND_MAC_DERIVE 0x000003E1UL
  ------------------
  |  Branch (8030:9): [True: 1.55k, False: 30.9k]
  ------------------
 8031|  1.55k|        case CKM_NSS_TLS_KEY_AND_MAC_DERIVE_SHA256:
  ------------------
  |  |  235|  1.55k|#define CKM_NSS_TLS_KEY_AND_MAC_DERIVE_SHA256 (CKM_NSS + 23)
  |  |  ------------------
  |  |  |  |  162|  1.55k|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|  1.55k|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  1.55k|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (8031:9): [True: 0, False: 32.5k]
  ------------------
 8032|  1.62k|        case CKM_TLS_KEY_AND_MAC_DERIVE:
  ------------------
  |  |  969|  1.62k|#define CKM_TLS_KEY_AND_MAC_DERIVE 0x00000376UL
  ------------------
  |  Branch (8032:9): [True: 66, False: 32.4k]
  ------------------
 8033|  1.62k|        case CKM_SSL3_KEY_AND_MAC_DERIVE: {
  ------------------
  |  |  961|  1.62k|#define CKM_SSL3_KEY_AND_MAC_DERIVE 0x00000372UL
  ------------------
  |  Branch (8033:9): [True: 0, False: 32.5k]
  ------------------
 8034|  1.62k|            CK_SSL3_KEY_MAT_PARAMS *ssl3_keys;
 8035|  1.62k|            CK_SSL3_KEY_MAT_OUT *ssl3_keys_out;
 8036|  1.62k|            CK_ULONG effKeySize;
 8037|  1.62k|            unsigned int block_needed;
 8038|  1.62k|            unsigned char srcrdata[SSL3_RANDOM_LENGTH * 2];
 8039|       |
 8040|  1.62k|            if (mechanism == CKM_TLS12_KEY_AND_MAC_DERIVE) {
  ------------------
  |  | 1027|  1.62k|#define CKM_TLS12_KEY_AND_MAC_DERIVE 0x000003E1UL
  ------------------
  |  Branch (8040:17): [True: 1.55k, False: 66]
  ------------------
 8041|  1.55k|                if (BAD_PARAM_CAST(pMechanism, sizeof(CK_TLS12_KEY_MAT_PARAMS))) {
  ------------------
  |  |   50|  1.55k|#define BAD_PARAM_CAST(pMech, typeSize) (!pMech->pParameter || pMech->ulParameterLen < typeSize)
  |  |  ------------------
  |  |  |  Branch (50:42): [True: 0, False: 1.55k]
  |  |  |  Branch (50:64): [True: 0, False: 1.55k]
  |  |  ------------------
  ------------------
 8042|      0|                    crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 8043|      0|                    break;
 8044|      0|                }
 8045|  1.55k|                CK_TLS12_KEY_MAT_PARAMS *tls12_keys =
 8046|  1.55k|                    (CK_TLS12_KEY_MAT_PARAMS *)pMechanism->pParameter;
 8047|  1.55k|                tlsPrfHash = sftk_GetHashTypeFromMechanism(tls12_keys->prfHashMechanism);
 8048|  1.55k|                if (tlsPrfHash == HASH_AlgNULL) {
  ------------------
  |  Branch (8048:21): [True: 0, False: 1.55k]
  ------------------
 8049|      0|                    crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 8050|      0|                    break;
 8051|      0|                }
 8052|  1.55k|            } else if (mechanism == CKM_NSS_TLS_KEY_AND_MAC_DERIVE_SHA256) {
  ------------------
  |  |  235|     66|#define CKM_NSS_TLS_KEY_AND_MAC_DERIVE_SHA256 (CKM_NSS + 23)
  |  |  ------------------
  |  |  |  |  162|     66|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|     66|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     66|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (8052:24): [True: 0, False: 66]
  ------------------
 8053|      0|                tlsPrfHash = HASH_AlgSHA256;
 8054|      0|            }
 8055|       |
 8056|  1.62k|            if (mechanism != CKM_SSL3_KEY_AND_MAC_DERIVE) {
  ------------------
  |  |  961|  1.62k|#define CKM_SSL3_KEY_AND_MAC_DERIVE 0x00000372UL
  ------------------
  |  Branch (8056:17): [True: 1.62k, False: 0]
  ------------------
 8057|  1.62k|                isTLS = PR_TRUE;
  ------------------
  |  |  437|  1.62k|#define PR_TRUE 1
  ------------------
 8058|  1.62k|            }
 8059|       |
 8060|  1.62k|            crv = sftk_DeriveSensitiveCheck(sourceKey, key, PR_FALSE);
  ------------------
  |  |  438|  1.62k|#define PR_FALSE 0
  ------------------
 8061|  1.62k|            if (crv != CKR_OK)
  ------------------
  |  | 1388|  1.62k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (8061:17): [True: 0, False: 1.62k]
  ------------------
 8062|      0|                break;
 8063|       |
 8064|  1.62k|            if (att->attrib.ulValueLen != SSL3_MASTER_SECRET_LENGTH) {
  ------------------
  |  | 7518|  1.62k|#define SSL3_MASTER_SECRET_LENGTH 48
  ------------------
  |  Branch (8064:17): [True: 0, False: 1.62k]
  ------------------
 8065|      0|                crv = CKR_KEY_FUNCTION_NOT_PERMITTED;
  ------------------
  |  | 1443|      0|#define CKR_KEY_FUNCTION_NOT_PERMITTED 0x00000068UL
  ------------------
 8066|      0|                break;
 8067|      0|            }
 8068|  1.62k|            att2 = sftk_FindAttribute(sourceKey, CKA_KEY_TYPE);
  ------------------
  |  |  543|  1.62k|#define CKA_KEY_TYPE 0x00000100UL
  ------------------
 8069|  1.62k|            if ((att2 == NULL) || (*(CK_KEY_TYPE *)att2->attrib.pValue !=
  ------------------
  |  Branch (8069:17): [True: 0, False: 1.62k]
  |  Branch (8069:35): [True: 0, False: 1.62k]
  ------------------
 8070|  1.62k|                                   CKK_GENERIC_SECRET)) {
  ------------------
  |  |  383|  1.62k|#define CKK_GENERIC_SECRET 0x00000010UL
  ------------------
 8071|      0|                if (att2)
  ------------------
  |  Branch (8071:21): [True: 0, False: 0]
  ------------------
 8072|      0|                    sftk_FreeAttribute(att2);
 8073|      0|                crv = CKR_KEY_FUNCTION_NOT_PERMITTED;
  ------------------
  |  | 1443|      0|#define CKR_KEY_FUNCTION_NOT_PERMITTED 0x00000068UL
  ------------------
 8074|      0|                break;
 8075|      0|            }
 8076|  1.62k|            sftk_FreeAttribute(att2);
 8077|  1.62k|            md5 = MD5_NewContext();
 8078|  1.62k|            if (md5 == NULL) {
  ------------------
  |  Branch (8078:17): [True: 0, False: 1.62k]
  ------------------
 8079|      0|                crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 8080|      0|                break;
 8081|      0|            }
 8082|  1.62k|            sha = SHA1_NewContext();
 8083|  1.62k|            if (sha == NULL) {
  ------------------
  |  Branch (8083:17): [True: 0, False: 1.62k]
  ------------------
 8084|      0|                MD5_DestroyContext(md5, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 8085|      0|                crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 8086|      0|                break;
 8087|      0|            }
 8088|       |
 8089|  1.62k|            if (BAD_PARAM_CAST(pMechanism, sizeof(CK_SSL3_KEY_MAT_PARAMS))) {
  ------------------
  |  |   50|  1.62k|#define BAD_PARAM_CAST(pMech, typeSize) (!pMech->pParameter || pMech->ulParameterLen < typeSize)
  |  |  ------------------
  |  |  |  Branch (50:42): [True: 0, False: 1.62k]
  |  |  |  Branch (50:64): [True: 0, False: 1.62k]
  |  |  ------------------
  ------------------
 8090|      0|                MD5_DestroyContext(md5, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 8091|      0|                SHA1_DestroyContext(sha, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 8092|      0|                crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 8093|      0|                break;
 8094|      0|            }
 8095|  1.62k|            ssl3_keys = (CK_SSL3_KEY_MAT_PARAMS *)pMechanism->pParameter;
 8096|       |
 8097|  1.62k|            PORT_Memcpy(srcrdata,
  ------------------
  |  |  180|  1.62k|#define PORT_Memcpy memcpy
  ------------------
 8098|  1.62k|                        ssl3_keys->RandomInfo.pServerRandom, SSL3_RANDOM_LENGTH);
  ------------------
  |  | 7519|  1.62k|#define SSL3_RANDOM_LENGTH 32
  ------------------
 8099|  1.62k|            PORT_Memcpy(srcrdata + SSL3_RANDOM_LENGTH,
  ------------------
  |  |  180|  1.62k|#define PORT_Memcpy memcpy
  ------------------
                          PORT_Memcpy(srcrdata + SSL3_RANDOM_LENGTH,
  ------------------
  |  | 7519|  1.62k|#define SSL3_RANDOM_LENGTH 32
  ------------------
 8100|  1.62k|                        ssl3_keys->RandomInfo.pClientRandom, SSL3_RANDOM_LENGTH);
  ------------------
  |  | 7519|  1.62k|#define SSL3_RANDOM_LENGTH 32
  ------------------
 8101|       |
 8102|       |            /*
 8103|       |             * clear out our returned keys so we can recover on failure
 8104|       |             */
 8105|  1.62k|            ssl3_keys_out = ssl3_keys->pReturnedKeyMaterial;
 8106|  1.62k|            ssl3_keys_out->hClientMacSecret = CK_INVALID_HANDLE;
  ------------------
  |  |   78|  1.62k|#define CK_INVALID_HANDLE 0
  ------------------
 8107|  1.62k|            ssl3_keys_out->hServerMacSecret = CK_INVALID_HANDLE;
  ------------------
  |  |   78|  1.62k|#define CK_INVALID_HANDLE 0
  ------------------
 8108|  1.62k|            ssl3_keys_out->hClientKey = CK_INVALID_HANDLE;
  ------------------
  |  |   78|  1.62k|#define CK_INVALID_HANDLE 0
  ------------------
 8109|  1.62k|            ssl3_keys_out->hServerKey = CK_INVALID_HANDLE;
  ------------------
  |  |   78|  1.62k|#define CK_INVALID_HANDLE 0
  ------------------
 8110|       |
 8111|       |            /*
 8112|       |             * How much key material do we need?
 8113|       |             */
 8114|  1.62k|            macSize = ssl3_keys->ulMacSizeInBits / 8;
 8115|  1.62k|            effKeySize = ssl3_keys->ulKeySizeInBits / 8;
 8116|  1.62k|            IVSize = ssl3_keys->ulIVSizeInBits / 8;
 8117|  1.62k|            if (keySize == 0) {
  ------------------
  |  Branch (8117:17): [True: 550, False: 1.07k]
  ------------------
 8118|    550|                effKeySize = keySize;
 8119|    550|            }
 8120|       |
 8121|       |            /* bIsExport must be false. */
 8122|  1.62k|            if (ssl3_keys->bIsExport) {
  ------------------
  |  Branch (8122:17): [True: 0, False: 1.62k]
  ------------------
 8123|      0|                MD5_DestroyContext(md5, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 8124|      0|                SHA1_DestroyContext(sha, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 8125|      0|                PORT_Memset(srcrdata, 0, sizeof srcrdata);
  ------------------
  |  |  182|      0|#define PORT_Memset memset
  ------------------
 8126|      0|                crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 8127|      0|                break;
 8128|      0|            }
 8129|       |
 8130|  1.62k|            block_needed = 2 * (macSize + effKeySize + IVSize);
 8131|  1.62k|            PORT_Assert(block_needed <= sizeof key_block);
  ------------------
  |  |  120|  1.62k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.62k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.62k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8132|  1.62k|            if (block_needed > sizeof key_block)
  ------------------
  |  Branch (8132:17): [True: 0, False: 1.62k]
  ------------------
 8133|      0|                block_needed = sizeof key_block;
 8134|       |
 8135|       |            /*
 8136|       |             * generate the key material: This looks amazingly similar to the
 8137|       |             * PMS code, and is clearly crying out for a function to provide it.
 8138|       |             */
 8139|  1.62k|            if (isTLS) {
  ------------------
  |  Branch (8139:17): [True: 1.62k, False: 0]
  ------------------
 8140|  1.62k|                SECStatus status;
 8141|  1.62k|                SECItem srcr = { siBuffer, NULL, 0 };
 8142|  1.62k|                SECItem keyblk = { siBuffer, NULL, 0 };
 8143|  1.62k|                SECItem master = { siBuffer, NULL, 0 };
 8144|       |
 8145|  1.62k|                srcr.data = srcrdata;
 8146|  1.62k|                srcr.len = sizeof srcrdata;
 8147|  1.62k|                keyblk.data = key_block;
 8148|  1.62k|                keyblk.len = block_needed;
 8149|  1.62k|                master.data = (unsigned char *)att->attrib.pValue;
 8150|  1.62k|                master.len = att->attrib.ulValueLen;
 8151|       |
 8152|  1.62k|                if (tlsPrfHash != HASH_AlgNULL) {
  ------------------
  |  Branch (8152:21): [True: 1.55k, False: 66]
  ------------------
 8153|  1.55k|                    status = TLS_P_hash(tlsPrfHash, &master, "key expansion",
 8154|  1.55k|                                        &srcr, &keyblk, isFIPS);
 8155|  1.55k|                } else {
 8156|     66|                    status = TLS_PRF(&master, "key expansion", &srcr, &keyblk,
 8157|     66|                                     isFIPS);
 8158|     66|                }
 8159|  1.62k|                if (status != SECSuccess) {
  ------------------
  |  Branch (8159:21): [True: 0, False: 1.62k]
  ------------------
 8160|      0|                    goto key_and_mac_derive_fail;
 8161|      0|                }
 8162|  1.62k|            } else {
 8163|      0|                unsigned int block_bytes = 0;
 8164|       |                /* key_block =
 8165|       |                 *     MD5(master_secret + SHA('A' + master_secret +
 8166|       |                 *                      ServerHello.random + ClientHello.random)) +
 8167|       |                 *     MD5(master_secret + SHA('BB' + master_secret +
 8168|       |                 *                      ServerHello.random + ClientHello.random)) +
 8169|       |                 *     MD5(master_secret + SHA('CCC' + master_secret +
 8170|       |                 *                      ServerHello.random + ClientHello.random)) +
 8171|       |                 *     [...];
 8172|       |                 */
 8173|      0|                for (i = 0; i < NUM_MIXERS && block_bytes < block_needed; i++) {
  ------------------
  |  | 7505|      0|#define NUM_MIXERS 9
  ------------------
  |  Branch (8173:29): [True: 0, False: 0]
  |  Branch (8173:47): [True: 0, False: 0]
  ------------------
 8174|      0|                    SHA1_Begin(sha);
 8175|      0|                    SHA1_Update(sha, (unsigned char *)mixers[i], strlen(mixers[i]));
 8176|      0|                    SHA1_Update(sha, (const unsigned char *)att->attrib.pValue,
 8177|      0|                                att->attrib.ulValueLen);
 8178|      0|                    SHA1_Update(sha, srcrdata, sizeof srcrdata);
 8179|      0|                    SHA1_End(sha, sha_out, &outLen, SHA1_LENGTH);
  ------------------
  |  |   39|      0|#define SHA1_LENGTH 20
  ------------------
 8180|      0|                    PORT_Assert(outLen == SHA1_LENGTH);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8181|      0|                    MD5_Begin(md5);
 8182|      0|                    MD5_Update(md5, (const unsigned char *)att->attrib.pValue,
 8183|      0|                               att->attrib.ulValueLen);
 8184|      0|                    MD5_Update(md5, sha_out, outLen);
 8185|      0|                    MD5_End(md5, &key_block[i * MD5_LENGTH], &outLen, MD5_LENGTH);
  ------------------
  |  |   38|      0|#define MD5_LENGTH 16
  ------------------
                                  MD5_End(md5, &key_block[i * MD5_LENGTH], &outLen, MD5_LENGTH);
  ------------------
  |  |   38|      0|#define MD5_LENGTH 16
  ------------------
 8186|      0|                    PORT_Assert(outLen == MD5_LENGTH);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8187|      0|                    block_bytes += outLen;
 8188|      0|                }
 8189|      0|                PORT_Memset(sha_out, 0, sizeof sha_out);
  ------------------
  |  |  182|      0|#define PORT_Memset memset
  ------------------
 8190|      0|            }
 8191|       |
 8192|       |            /*
 8193|       |             * Put the key material where it goes.
 8194|       |             */
 8195|  1.62k|            i = 0; /* now shows how much consumed */
 8196|       |
 8197|       |            /*
 8198|       |             * The key_block is partitioned as follows:
 8199|       |             * client_write_MAC_secret[CipherSpec.hash_size]
 8200|       |             */
 8201|  1.62k|            crv = sftk_buildSSLKey(hSession, key, PR_TRUE, &key_block[i], macSize,
  ------------------
  |  |  437|  1.62k|#define PR_TRUE 1
  ------------------
 8202|  1.62k|                                   &ssl3_keys_out->hClientMacSecret);
 8203|  1.62k|            if (crv != CKR_OK)
  ------------------
  |  | 1388|  1.62k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (8203:17): [True: 0, False: 1.62k]
  ------------------
 8204|      0|                goto key_and_mac_derive_fail;
 8205|       |
 8206|  1.62k|            i += macSize;
 8207|       |
 8208|       |            /*
 8209|       |             * server_write_MAC_secret[CipherSpec.hash_size]
 8210|       |             */
 8211|  1.62k|            crv = sftk_buildSSLKey(hSession, key, PR_TRUE, &key_block[i], macSize,
  ------------------
  |  |  437|  1.62k|#define PR_TRUE 1
  ------------------
 8212|  1.62k|                                   &ssl3_keys_out->hServerMacSecret);
 8213|  1.62k|            if (crv != CKR_OK) {
  ------------------
  |  | 1388|  1.62k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (8213:17): [True: 0, False: 1.62k]
  ------------------
 8214|      0|                goto key_and_mac_derive_fail;
 8215|      0|            }
 8216|  1.62k|            i += macSize;
 8217|       |
 8218|  1.62k|            if (keySize) {
  ------------------
  |  Branch (8218:17): [True: 1.07k, False: 550]
  ------------------
 8219|       |                /*
 8220|       |                ** Generate Domestic write keys and IVs.
 8221|       |                ** client_write_key[CipherSpec.key_material]
 8222|       |                */
 8223|  1.07k|                crv = sftk_buildSSLKey(hSession, key, PR_FALSE, &key_block[i],
  ------------------
  |  |  438|  1.07k|#define PR_FALSE 0
  ------------------
 8224|  1.07k|                                       keySize, &ssl3_keys_out->hClientKey);
 8225|  1.07k|                if (crv != CKR_OK) {
  ------------------
  |  | 1388|  1.07k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (8225:21): [True: 0, False: 1.07k]
  ------------------
 8226|      0|                    goto key_and_mac_derive_fail;
 8227|      0|                }
 8228|  1.07k|                i += keySize;
 8229|       |
 8230|       |                /*
 8231|       |                ** server_write_key[CipherSpec.key_material]
 8232|       |                */
 8233|  1.07k|                crv = sftk_buildSSLKey(hSession, key, PR_FALSE, &key_block[i],
  ------------------
  |  |  438|  1.07k|#define PR_FALSE 0
  ------------------
 8234|  1.07k|                                       keySize, &ssl3_keys_out->hServerKey);
 8235|  1.07k|                if (crv != CKR_OK) {
  ------------------
  |  | 1388|  1.07k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (8235:21): [True: 0, False: 1.07k]
  ------------------
 8236|      0|                    goto key_and_mac_derive_fail;
 8237|      0|                }
 8238|  1.07k|                i += keySize;
 8239|       |
 8240|       |                /*
 8241|       |                ** client_write_IV[CipherSpec.IV_size]
 8242|       |                */
 8243|  1.07k|                if (IVSize > 0) {
  ------------------
  |  Branch (8243:21): [True: 1.07k, False: 0]
  ------------------
 8244|  1.07k|                    PORT_Memcpy(ssl3_keys_out->pIVClient,
  ------------------
  |  |  180|  1.07k|#define PORT_Memcpy memcpy
  ------------------
 8245|  1.07k|                                &key_block[i], IVSize);
 8246|  1.07k|                    i += IVSize;
 8247|  1.07k|                }
 8248|       |
 8249|       |                /*
 8250|       |                ** server_write_IV[CipherSpec.IV_size]
 8251|       |                */
 8252|  1.07k|                if (IVSize > 0) {
  ------------------
  |  Branch (8252:21): [True: 1.07k, False: 0]
  ------------------
 8253|  1.07k|                    PORT_Memcpy(ssl3_keys_out->pIVServer,
  ------------------
  |  |  180|  1.07k|#define PORT_Memcpy memcpy
  ------------------
 8254|  1.07k|                                &key_block[i], IVSize);
 8255|  1.07k|                    i += IVSize;
 8256|  1.07k|                }
 8257|  1.07k|                PORT_Assert(i <= sizeof key_block);
  ------------------
  |  |  120|  1.07k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.07k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.07k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8258|  1.07k|            }
 8259|       |
 8260|  1.62k|            crv = CKR_OK;
  ------------------
  |  | 1388|  1.62k|#define CKR_OK 0x00000000UL
  ------------------
 8261|       |
 8262|  1.62k|            if (0) {
  ------------------
  |  Branch (8262:17): [Folded - Ignored]
  ------------------
 8263|      0|            key_and_mac_derive_fail:
 8264|      0|                if (crv == CKR_OK)
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (8264:21): [True: 0, False: 0]
  ------------------
 8265|      0|                    crv = CKR_FUNCTION_FAILED;
  ------------------
  |  | 1397|      0|#define CKR_FUNCTION_FAILED 0x00000006UL
  ------------------
 8266|      0|                sftk_freeSSLKeys(hSession, ssl3_keys_out);
 8267|      0|            }
 8268|  1.62k|            PORT_Memset(srcrdata, 0, sizeof srcrdata);
  ------------------
  |  |  182|  1.62k|#define PORT_Memset memset
  ------------------
 8269|  1.62k|            PORT_Memset(key_block, 0, sizeof key_block);
  ------------------
  |  |  182|  1.62k|#define PORT_Memset memset
  ------------------
 8270|  1.62k|            MD5_DestroyContext(md5, PR_TRUE);
  ------------------
  |  |  437|  1.62k|#define PR_TRUE 1
  ------------------
 8271|  1.62k|            SHA1_DestroyContext(sha, PR_TRUE);
  ------------------
  |  |  437|  1.62k|#define PR_TRUE 1
  ------------------
 8272|  1.62k|            sftk_FreeObject(key);
 8273|  1.62k|            key = NULL;
 8274|  1.62k|            break;
 8275|  1.62k|        }
 8276|       |
 8277|      0|        case CKM_DES3_ECB_ENCRYPT_DATA:
  ------------------
  |  | 1184|      0|#define CKM_DES3_ECB_ENCRYPT_DATA 0x00001102UL
  ------------------
  |  Branch (8277:9): [True: 0, False: 32.5k]
  ------------------
 8278|      0|        case CKM_DES3_CBC_ENCRYPT_DATA: {
  ------------------
  |  | 1185|      0|#define CKM_DES3_CBC_ENCRYPT_DATA 0x00001103UL
  ------------------
  |  Branch (8278:9): [True: 0, False: 32.5k]
  ------------------
 8279|      0|            void *cipherInfo;
 8280|      0|            unsigned char des3key[MAX_DES3_KEY_SIZE];
 8281|      0|            CK_DES_CBC_ENCRYPT_DATA_PARAMS *desEncryptPtr;
 8282|      0|            int mode;
 8283|      0|            unsigned char *iv;
 8284|      0|            unsigned char *data;
 8285|      0|            CK_ULONG len;
 8286|       |
 8287|      0|            if (mechanism == CKM_DES3_ECB_ENCRYPT_DATA) {
  ------------------
  |  | 1184|      0|#define CKM_DES3_ECB_ENCRYPT_DATA 0x00001102UL
  ------------------
  |  Branch (8287:17): [True: 0, False: 0]
  ------------------
 8288|      0|                if (BAD_PARAM_CAST(pMechanism, sizeof(CK_KEY_DERIVATION_STRING_DATA))) {
  ------------------
  |  |   50|      0|#define BAD_PARAM_CAST(pMech, typeSize) (!pMech->pParameter || pMech->ulParameterLen < typeSize)
  |  |  ------------------
  |  |  |  Branch (50:42): [True: 0, False: 0]
  |  |  |  Branch (50:64): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 8289|      0|                    crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 8290|      0|                    break;
 8291|      0|                }
 8292|      0|                stringPtr = (CK_KEY_DERIVATION_STRING_DATA *)
 8293|      0|                                pMechanism->pParameter;
 8294|      0|                mode = NSS_DES_EDE3;
  ------------------
  |  |   27|      0|#define NSS_DES_EDE3 2
  ------------------
 8295|      0|                iv = NULL;
 8296|      0|                data = stringPtr->pData;
 8297|      0|                len = stringPtr->ulLen;
 8298|      0|            } else {
 8299|      0|                mode = NSS_DES_EDE3_CBC;
  ------------------
  |  |   28|      0|#define NSS_DES_EDE3_CBC 3
  ------------------
 8300|      0|                desEncryptPtr =
 8301|      0|                    (CK_DES_CBC_ENCRYPT_DATA_PARAMS *)
 8302|      0|                        pMechanism->pParameter;
 8303|      0|                iv = desEncryptPtr->iv;
 8304|      0|                data = desEncryptPtr->pData;
 8305|      0|                len = desEncryptPtr->length;
 8306|      0|            }
 8307|      0|            if (att->attrib.ulValueLen == 16) {
  ------------------
  |  Branch (8307:17): [True: 0, False: 0]
  ------------------
 8308|      0|                PORT_Memcpy(des3key, att->attrib.pValue, 16);
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
 8309|      0|                PORT_Memcpy(des3key + 16, des3key, 8);
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
 8310|      0|            } else if (att->attrib.ulValueLen == 24) {
  ------------------
  |  Branch (8310:24): [True: 0, False: 0]
  ------------------
 8311|      0|                PORT_Memcpy(des3key, att->attrib.pValue, 24);
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
 8312|      0|            } else {
 8313|      0|                crv = CKR_KEY_SIZE_RANGE;
  ------------------
  |  | 1432|      0|#define CKR_KEY_SIZE_RANGE 0x00000062UL
  ------------------
 8314|      0|                break;
 8315|      0|            }
 8316|      0|            cipherInfo = DES_CreateContext(des3key, iv, mode, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 8317|      0|            PORT_Memset(des3key, 0, 24);
  ------------------
  |  |  182|      0|#define PORT_Memset memset
  ------------------
 8318|      0|            if (cipherInfo == NULL) {
  ------------------
  |  Branch (8318:17): [True: 0, False: 0]
  ------------------
 8319|      0|                crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 8320|      0|                break;
 8321|      0|            }
 8322|      0|            crv = sftk_DeriveEncrypt(SFTKCipher_DES_Encrypt,
 8323|      0|                                     cipherInfo, 8, key, keySize,
 8324|      0|                                     data, len);
 8325|      0|            DES_DestroyContext(cipherInfo, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 8326|      0|            break;
 8327|      0|        }
 8328|       |
 8329|      0|        case CKM_AES_ECB_ENCRYPT_DATA:
  ------------------
  |  | 1186|      0|#define CKM_AES_ECB_ENCRYPT_DATA 0x00001104UL
  ------------------
  |  Branch (8329:9): [True: 0, False: 32.5k]
  ------------------
 8330|      0|        case CKM_AES_CBC_ENCRYPT_DATA: {
  ------------------
  |  | 1187|      0|#define CKM_AES_CBC_ENCRYPT_DATA 0x00001105UL
  ------------------
  |  Branch (8330:9): [True: 0, False: 32.5k]
  ------------------
 8331|      0|            void *cipherInfo;
 8332|      0|            CK_AES_CBC_ENCRYPT_DATA_PARAMS *aesEncryptPtr;
 8333|      0|            int mode;
 8334|      0|            unsigned char *iv;
 8335|      0|            unsigned char *data;
 8336|      0|            CK_ULONG len;
 8337|       |
 8338|      0|            if (mechanism == CKM_AES_ECB_ENCRYPT_DATA) {
  ------------------
  |  | 1186|      0|#define CKM_AES_ECB_ENCRYPT_DATA 0x00001104UL
  ------------------
  |  Branch (8338:17): [True: 0, False: 0]
  ------------------
 8339|      0|                mode = NSS_AES;
  ------------------
  |  |   35|      0|#define NSS_AES 0
  ------------------
 8340|      0|                iv = NULL;
 8341|      0|                if (BAD_PARAM_CAST(pMechanism, sizeof(CK_KEY_DERIVATION_STRING_DATA))) {
  ------------------
  |  |   50|      0|#define BAD_PARAM_CAST(pMech, typeSize) (!pMech->pParameter || pMech->ulParameterLen < typeSize)
  |  |  ------------------
  |  |  |  Branch (50:42): [True: 0, False: 0]
  |  |  |  Branch (50:64): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 8342|      0|                    crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 8343|      0|                    break;
 8344|      0|                }
 8345|      0|                stringPtr = (CK_KEY_DERIVATION_STRING_DATA *)pMechanism->pParameter;
 8346|      0|                data = stringPtr->pData;
 8347|      0|                len = stringPtr->ulLen;
 8348|      0|            } else {
 8349|      0|                if (BAD_PARAM_CAST(pMechanism, sizeof(CK_AES_CBC_ENCRYPT_DATA_PARAMS))) {
  ------------------
  |  |   50|      0|#define BAD_PARAM_CAST(pMech, typeSize) (!pMech->pParameter || pMech->ulParameterLen < typeSize)
  |  |  ------------------
  |  |  |  Branch (50:42): [True: 0, False: 0]
  |  |  |  Branch (50:64): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 8350|      0|                    crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 8351|      0|                    break;
 8352|      0|                }
 8353|      0|                aesEncryptPtr =
 8354|      0|                    (CK_AES_CBC_ENCRYPT_DATA_PARAMS *)pMechanism->pParameter;
 8355|      0|                mode = NSS_AES_CBC;
  ------------------
  |  |   36|      0|#define NSS_AES_CBC 1
  ------------------
 8356|      0|                iv = aesEncryptPtr->iv;
 8357|      0|                data = aesEncryptPtr->pData;
 8358|      0|                len = aesEncryptPtr->length;
 8359|      0|            }
 8360|       |
 8361|      0|            cipherInfo = AES_CreateContext((unsigned char *)att->attrib.pValue,
 8362|      0|                                           iv, mode, PR_TRUE,
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 8363|      0|                                           att->attrib.ulValueLen, 16);
 8364|      0|            if (cipherInfo == NULL) {
  ------------------
  |  Branch (8364:17): [True: 0, False: 0]
  ------------------
 8365|      0|                crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 8366|      0|                break;
 8367|      0|            }
 8368|      0|            crv = sftk_DeriveEncrypt(SFTKCipher_AES_Encrypt,
 8369|      0|                                     cipherInfo, 16, key, keySize,
 8370|      0|                                     data, len);
 8371|      0|            AES_DestroyContext(cipherInfo, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 8372|      0|            break;
 8373|      0|        }
 8374|       |
 8375|      0|        case CKM_CAMELLIA_ECB_ENCRYPT_DATA:
  ------------------
  |  | 1141|      0|#define CKM_CAMELLIA_ECB_ENCRYPT_DATA 0x00000556UL
  ------------------
  |  Branch (8375:9): [True: 0, False: 32.5k]
  ------------------
 8376|      0|        case CKM_CAMELLIA_CBC_ENCRYPT_DATA: {
  ------------------
  |  | 1142|      0|#define CKM_CAMELLIA_CBC_ENCRYPT_DATA 0x00000557UL
  ------------------
  |  Branch (8376:9): [True: 0, False: 32.5k]
  ------------------
 8377|      0|            void *cipherInfo;
 8378|      0|            CK_AES_CBC_ENCRYPT_DATA_PARAMS *aesEncryptPtr;
 8379|      0|            int mode;
 8380|      0|            unsigned char *iv;
 8381|      0|            unsigned char *data;
 8382|      0|            CK_ULONG len;
 8383|       |
 8384|      0|            if (mechanism == CKM_CAMELLIA_ECB_ENCRYPT_DATA) {
  ------------------
  |  | 1141|      0|#define CKM_CAMELLIA_ECB_ENCRYPT_DATA 0x00000556UL
  ------------------
  |  Branch (8384:17): [True: 0, False: 0]
  ------------------
 8385|      0|                if (BAD_PARAM_CAST(pMechanism, sizeof(CK_KEY_DERIVATION_STRING_DATA))) {
  ------------------
  |  |   50|      0|#define BAD_PARAM_CAST(pMech, typeSize) (!pMech->pParameter || pMech->ulParameterLen < typeSize)
  |  |  ------------------
  |  |  |  Branch (50:42): [True: 0, False: 0]
  |  |  |  Branch (50:64): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 8386|      0|                    crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 8387|      0|                    break;
 8388|      0|                }
 8389|      0|                stringPtr = (CK_KEY_DERIVATION_STRING_DATA *)
 8390|      0|                                pMechanism->pParameter;
 8391|      0|                aesEncryptPtr = NULL;
 8392|      0|                mode = NSS_CAMELLIA;
  ------------------
  |  |   42|      0|#define NSS_CAMELLIA 0
  ------------------
 8393|      0|                data = stringPtr->pData;
 8394|      0|                len = stringPtr->ulLen;
 8395|      0|                iv = NULL;
 8396|      0|            } else {
 8397|      0|                if (BAD_PARAM_CAST(pMechanism, sizeof(CK_AES_CBC_ENCRYPT_DATA_PARAMS))) {
  ------------------
  |  |   50|      0|#define BAD_PARAM_CAST(pMech, typeSize) (!pMech->pParameter || pMech->ulParameterLen < typeSize)
  |  |  ------------------
  |  |  |  Branch (50:42): [True: 0, False: 0]
  |  |  |  Branch (50:64): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 8398|      0|                    crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 8399|      0|                    break;
 8400|      0|                }
 8401|      0|                stringPtr = NULL;
 8402|      0|                aesEncryptPtr = (CK_AES_CBC_ENCRYPT_DATA_PARAMS *)
 8403|      0|                                    pMechanism->pParameter;
 8404|      0|                mode = NSS_CAMELLIA_CBC;
  ------------------
  |  |   43|      0|#define NSS_CAMELLIA_CBC 1
  ------------------
 8405|      0|                iv = aesEncryptPtr->iv;
 8406|      0|                data = aesEncryptPtr->pData;
 8407|      0|                len = aesEncryptPtr->length;
 8408|      0|            }
 8409|       |
 8410|      0|            cipherInfo = Camellia_CreateContext((unsigned char *)att->attrib.pValue,
 8411|      0|                                                iv, mode, PR_TRUE,
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 8412|      0|                                                att->attrib.ulValueLen);
 8413|      0|            if (cipherInfo == NULL) {
  ------------------
  |  Branch (8413:17): [True: 0, False: 0]
  ------------------
 8414|      0|                crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 8415|      0|                break;
 8416|      0|            }
 8417|      0|            crv = sftk_DeriveEncrypt(SFTKCipher_Camellia_Encrypt,
 8418|      0|                                     cipherInfo, 16, key, keySize,
 8419|      0|                                     data, len);
 8420|      0|            Camellia_DestroyContext(cipherInfo, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 8421|      0|            break;
 8422|      0|        }
 8423|       |
 8424|      0|#ifndef NSS_DISABLE_DEPRECATED_SEED
 8425|      0|        case CKM_SEED_ECB_ENCRYPT_DATA:
  ------------------
  |  | 1161|      0|#define CKM_SEED_ECB_ENCRYPT_DATA 0x00000656UL
  ------------------
  |  Branch (8425:9): [True: 0, False: 32.5k]
  ------------------
 8426|      0|        case CKM_SEED_CBC_ENCRYPT_DATA: {
  ------------------
  |  | 1162|      0|#define CKM_SEED_CBC_ENCRYPT_DATA 0x00000657UL
  ------------------
  |  Branch (8426:9): [True: 0, False: 32.5k]
  ------------------
 8427|      0|            void *cipherInfo;
 8428|      0|            CK_AES_CBC_ENCRYPT_DATA_PARAMS *aesEncryptPtr;
 8429|      0|            int mode;
 8430|      0|            unsigned char *iv;
 8431|      0|            unsigned char *data;
 8432|      0|            CK_ULONG len;
 8433|       |
 8434|      0|            if (mechanism == CKM_SEED_ECB_ENCRYPT_DATA) {
  ------------------
  |  | 1161|      0|#define CKM_SEED_ECB_ENCRYPT_DATA 0x00000656UL
  ------------------
  |  Branch (8434:17): [True: 0, False: 0]
  ------------------
 8435|      0|                if (BAD_PARAM_CAST(pMechanism, sizeof(CK_KEY_DERIVATION_STRING_DATA))) {
  ------------------
  |  |   50|      0|#define BAD_PARAM_CAST(pMech, typeSize) (!pMech->pParameter || pMech->ulParameterLen < typeSize)
  |  |  ------------------
  |  |  |  Branch (50:42): [True: 0, False: 0]
  |  |  |  Branch (50:64): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 8436|      0|                    crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 8437|      0|                    break;
 8438|      0|                }
 8439|      0|                mode = NSS_SEED;
  ------------------
  |  |   46|      0|#define NSS_SEED 0
  ------------------
 8440|      0|                stringPtr = (CK_KEY_DERIVATION_STRING_DATA *)
 8441|      0|                                pMechanism->pParameter;
 8442|      0|                aesEncryptPtr = NULL;
 8443|      0|                data = stringPtr->pData;
 8444|      0|                len = stringPtr->ulLen;
 8445|      0|                iv = NULL;
 8446|      0|            } else {
 8447|      0|                if (BAD_PARAM_CAST(pMechanism, sizeof(CK_AES_CBC_ENCRYPT_DATA_PARAMS))) {
  ------------------
  |  |   50|      0|#define BAD_PARAM_CAST(pMech, typeSize) (!pMech->pParameter || pMech->ulParameterLen < typeSize)
  |  |  ------------------
  |  |  |  Branch (50:42): [True: 0, False: 0]
  |  |  |  Branch (50:64): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 8448|      0|                    crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 8449|      0|                    break;
 8450|      0|                }
 8451|      0|                mode = NSS_SEED_CBC;
  ------------------
  |  |   47|      0|#define NSS_SEED_CBC 1
  ------------------
 8452|      0|                aesEncryptPtr = (CK_AES_CBC_ENCRYPT_DATA_PARAMS *)
 8453|      0|                                    pMechanism->pParameter;
 8454|      0|                iv = aesEncryptPtr->iv;
 8455|      0|                data = aesEncryptPtr->pData;
 8456|      0|                len = aesEncryptPtr->length;
 8457|      0|            }
 8458|       |
 8459|      0|            cipherInfo = SEED_CreateContext((unsigned char *)att->attrib.pValue,
 8460|      0|                                            iv, mode, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 8461|      0|            if (cipherInfo == NULL) {
  ------------------
  |  Branch (8461:17): [True: 0, False: 0]
  ------------------
 8462|      0|                crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 8463|      0|                break;
 8464|      0|            }
 8465|      0|            crv = sftk_DeriveEncrypt(SFTKCipher_SEED_Encrypt,
 8466|      0|                                     cipherInfo, 16, key, keySize,
 8467|      0|                                     data, len);
 8468|      0|            SEED_DestroyContext(cipherInfo, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 8469|      0|            break;
 8470|      0|        }
 8471|      0|#endif /* NSS_DISABLE_DEPRECATED_SEED */
 8472|       |
 8473|      0|        case CKM_CONCATENATE_BASE_AND_KEY: {
  ------------------
  |  |  954|      0|#define CKM_CONCATENATE_BASE_AND_KEY 0x00000360UL
  ------------------
  |  Branch (8473:9): [True: 0, False: 32.5k]
  ------------------
 8474|      0|            SFTKObject *paramKey;
 8475|       |
 8476|      0|            crv = sftk_DeriveSensitiveCheck(sourceKey, key, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 8477|      0|            if (crv != CKR_OK)
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (8477:17): [True: 0, False: 0]
  ------------------
 8478|      0|                break;
 8479|       |
 8480|      0|            session = sftk_SessionFromHandle(hSession);
 8481|      0|            if (session == NULL) {
  ------------------
  |  Branch (8481:17): [True: 0, False: 0]
  ------------------
 8482|      0|                crv = CKR_SESSION_HANDLE_INVALID;
  ------------------
  |  | 1465|      0|#define CKR_SESSION_HANDLE_INVALID 0x000000B3UL
  ------------------
 8483|      0|                break;
 8484|      0|            }
 8485|       |
 8486|      0|            paramKey = sftk_ObjectFromHandle(*(CK_OBJECT_HANDLE *)
 8487|      0|                                                  pMechanism->pParameter,
 8488|      0|                                             session);
 8489|      0|            sftk_FreeSession(session);
 8490|      0|            if (paramKey == NULL) {
  ------------------
  |  Branch (8490:17): [True: 0, False: 0]
  ------------------
 8491|      0|                crv = CKR_KEY_HANDLE_INVALID;
  ------------------
  |  | 1428|      0|#define CKR_KEY_HANDLE_INVALID 0x00000060UL
  ------------------
 8492|      0|                break;
 8493|      0|            }
 8494|       |
 8495|      0|            if (sftk_isTrue(paramKey, CKA_SENSITIVE)) {
  ------------------
  |  |  546|      0|#define CKA_SENSITIVE 0x00000103UL
  ------------------
  |  Branch (8495:17): [True: 0, False: 0]
  ------------------
 8496|      0|                crv = sftk_forceAttribute(key, CKA_SENSITIVE, &cktrue,
  ------------------
  |  |  546|      0|#define CKA_SENSITIVE 0x00000103UL
  ------------------
 8497|      0|                                          sizeof(CK_BBOOL));
 8498|      0|                if (crv != CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (8498:21): [True: 0, False: 0]
  ------------------
 8499|      0|                    sftk_FreeObject(paramKey);
 8500|      0|                    break;
 8501|      0|                }
 8502|      0|            }
 8503|       |
 8504|      0|            if (sftk_hasAttribute(paramKey, CKA_EXTRACTABLE) && !sftk_isTrue(paramKey, CKA_EXTRACTABLE)) {
  ------------------
  |  |  585|      0|#define CKA_EXTRACTABLE 0x00000162UL
  ------------------
                          if (sftk_hasAttribute(paramKey, CKA_EXTRACTABLE) && !sftk_isTrue(paramKey, CKA_EXTRACTABLE)) {
  ------------------
  |  |  585|      0|#define CKA_EXTRACTABLE 0x00000162UL
  ------------------
  |  Branch (8504:17): [True: 0, False: 0]
  |  Branch (8504:65): [True: 0, False: 0]
  ------------------
 8505|      0|                crv = sftk_forceAttribute(key, CKA_EXTRACTABLE, &ckfalse, sizeof(CK_BBOOL));
  ------------------
  |  |  585|      0|#define CKA_EXTRACTABLE 0x00000162UL
  ------------------
 8506|      0|                if (crv != CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (8506:21): [True: 0, False: 0]
  ------------------
 8507|      0|                    sftk_FreeObject(paramKey);
 8508|      0|                    break;
 8509|      0|                }
 8510|      0|            }
 8511|       |
 8512|      0|            att2 = sftk_FindAttribute(paramKey, CKA_VALUE);
  ------------------
  |  |  516|      0|#define CKA_VALUE 0x00000011UL
  ------------------
 8513|      0|            if (att2 == NULL) {
  ------------------
  |  Branch (8513:17): [True: 0, False: 0]
  ------------------
 8514|      0|                sftk_FreeObject(paramKey);
 8515|      0|                crv = CKR_KEY_HANDLE_INVALID;
  ------------------
  |  | 1428|      0|#define CKR_KEY_HANDLE_INVALID 0x00000060UL
  ------------------
 8516|      0|                break;
 8517|      0|            }
 8518|      0|            tmpKeySize = att->attrib.ulValueLen + att2->attrib.ulValueLen;
 8519|      0|            if (keySize == 0)
  ------------------
  |  Branch (8519:17): [True: 0, False: 0]
  ------------------
 8520|      0|                keySize = tmpKeySize;
 8521|      0|            if (keySize > tmpKeySize) {
  ------------------
  |  Branch (8521:17): [True: 0, False: 0]
  ------------------
 8522|      0|                sftk_FreeObject(paramKey);
 8523|      0|                sftk_FreeAttribute(att2);
 8524|      0|                crv = CKR_TEMPLATE_INCONSISTENT;
  ------------------
  |  | 1478|      0|#define CKR_TEMPLATE_INCONSISTENT 0x000000D1UL
  ------------------
 8525|      0|                break;
 8526|      0|            }
 8527|      0|            buf = (unsigned char *)PORT_Alloc(tmpKeySize);
  ------------------
  |  |   52|      0|#define PORT_Alloc PORT_Alloc_Util
  ------------------
 8528|      0|            if (buf == NULL) {
  ------------------
  |  Branch (8528:17): [True: 0, False: 0]
  ------------------
 8529|      0|                sftk_FreeAttribute(att2);
 8530|      0|                sftk_FreeObject(paramKey);
 8531|      0|                crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 8532|      0|                break;
 8533|      0|            }
 8534|       |
 8535|      0|            PORT_Memcpy(buf, att->attrib.pValue, att->attrib.ulValueLen);
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
 8536|      0|            PORT_Memcpy(buf + att->attrib.ulValueLen,
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
 8537|      0|                        att2->attrib.pValue, att2->attrib.ulValueLen);
 8538|       |
 8539|      0|            crv = sftk_forceAttribute(key, CKA_VALUE, buf, keySize);
  ------------------
  |  |  516|      0|#define CKA_VALUE 0x00000011UL
  ------------------
 8540|      0|            PORT_ZFree(buf, tmpKeySize);
  ------------------
  |  |   75|      0|#define PORT_ZFree PORT_ZFree_Util
  ------------------
 8541|      0|            sftk_FreeAttribute(att2);
 8542|      0|            sftk_FreeObject(paramKey);
 8543|      0|            break;
 8544|      0|        }
 8545|       |
 8546|      0|        case CKM_CONCATENATE_BASE_AND_DATA:
  ------------------
  |  |  955|      0|#define CKM_CONCATENATE_BASE_AND_DATA 0x00000362UL
  ------------------
  |  Branch (8546:9): [True: 0, False: 32.5k]
  ------------------
 8547|      0|            crv = sftk_DeriveSensitiveCheck(sourceKey, key, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 8548|      0|            if (crv != CKR_OK)
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (8548:17): [True: 0, False: 0]
  ------------------
 8549|      0|                break;
 8550|       |
 8551|      0|            if (BAD_PARAM_CAST(pMechanism, sizeof(CK_KEY_DERIVATION_STRING_DATA))) {
  ------------------
  |  |   50|      0|#define BAD_PARAM_CAST(pMech, typeSize) (!pMech->pParameter || pMech->ulParameterLen < typeSize)
  |  |  ------------------
  |  |  |  Branch (50:42): [True: 0, False: 0]
  |  |  |  Branch (50:64): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 8552|      0|                crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 8553|      0|                break;
 8554|      0|            }
 8555|      0|            stringPtr = (CK_KEY_DERIVATION_STRING_DATA *)pMechanism->pParameter;
 8556|      0|            tmpKeySize = att->attrib.ulValueLen + stringPtr->ulLen;
 8557|      0|            if (keySize == 0)
  ------------------
  |  Branch (8557:17): [True: 0, False: 0]
  ------------------
 8558|      0|                keySize = tmpKeySize;
 8559|      0|            if (keySize > tmpKeySize) {
  ------------------
  |  Branch (8559:17): [True: 0, False: 0]
  ------------------
 8560|      0|                crv = CKR_TEMPLATE_INCONSISTENT;
  ------------------
  |  | 1478|      0|#define CKR_TEMPLATE_INCONSISTENT 0x000000D1UL
  ------------------
 8561|      0|                break;
 8562|      0|            }
 8563|      0|            buf = (unsigned char *)PORT_Alloc(tmpKeySize);
  ------------------
  |  |   52|      0|#define PORT_Alloc PORT_Alloc_Util
  ------------------
 8564|      0|            if (buf == NULL) {
  ------------------
  |  Branch (8564:17): [True: 0, False: 0]
  ------------------
 8565|      0|                crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 8566|      0|                break;
 8567|      0|            }
 8568|       |
 8569|      0|            PORT_Memcpy(buf, att->attrib.pValue, att->attrib.ulValueLen);
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
 8570|      0|            PORT_Memcpy(buf + att->attrib.ulValueLen, stringPtr->pData,
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
 8571|      0|                        stringPtr->ulLen);
 8572|       |
 8573|      0|            crv = sftk_forceAttribute(key, CKA_VALUE, buf, keySize);
  ------------------
  |  |  516|      0|#define CKA_VALUE 0x00000011UL
  ------------------
 8574|      0|            PORT_ZFree(buf, tmpKeySize);
  ------------------
  |  |   75|      0|#define PORT_ZFree PORT_ZFree_Util
  ------------------
 8575|      0|            break;
 8576|      0|        case CKM_CONCATENATE_DATA_AND_BASE:
  ------------------
  |  |  956|      0|#define CKM_CONCATENATE_DATA_AND_BASE 0x00000363UL
  ------------------
  |  Branch (8576:9): [True: 0, False: 32.5k]
  ------------------
 8577|      0|            crv = sftk_DeriveSensitiveCheck(sourceKey, key, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 8578|      0|            if (crv != CKR_OK)
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (8578:17): [True: 0, False: 0]
  ------------------
 8579|      0|                break;
 8580|       |
 8581|      0|            if (BAD_PARAM_CAST(pMechanism, sizeof(CK_KEY_DERIVATION_STRING_DATA))) {
  ------------------
  |  |   50|      0|#define BAD_PARAM_CAST(pMech, typeSize) (!pMech->pParameter || pMech->ulParameterLen < typeSize)
  |  |  ------------------
  |  |  |  Branch (50:42): [True: 0, False: 0]
  |  |  |  Branch (50:64): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 8582|      0|                crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 8583|      0|                break;
 8584|      0|            }
 8585|      0|            stringPtr = (CK_KEY_DERIVATION_STRING_DATA *)pMechanism->pParameter;
 8586|      0|            tmpKeySize = att->attrib.ulValueLen + stringPtr->ulLen;
 8587|      0|            if (keySize == 0)
  ------------------
  |  Branch (8587:17): [True: 0, False: 0]
  ------------------
 8588|      0|                keySize = tmpKeySize;
 8589|      0|            if (keySize > tmpKeySize) {
  ------------------
  |  Branch (8589:17): [True: 0, False: 0]
  ------------------
 8590|      0|                crv = CKR_TEMPLATE_INCONSISTENT;
  ------------------
  |  | 1478|      0|#define CKR_TEMPLATE_INCONSISTENT 0x000000D1UL
  ------------------
 8591|      0|                break;
 8592|      0|            }
 8593|      0|            buf = (unsigned char *)PORT_Alloc(tmpKeySize);
  ------------------
  |  |   52|      0|#define PORT_Alloc PORT_Alloc_Util
  ------------------
 8594|      0|            if (buf == NULL) {
  ------------------
  |  Branch (8594:17): [True: 0, False: 0]
  ------------------
 8595|      0|                crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 8596|      0|                break;
 8597|      0|            }
 8598|       |
 8599|      0|            PORT_Memcpy(buf, stringPtr->pData, stringPtr->ulLen);
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
 8600|      0|            PORT_Memcpy(buf + stringPtr->ulLen, att->attrib.pValue,
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
 8601|      0|                        att->attrib.ulValueLen);
 8602|       |
 8603|      0|            crv = sftk_forceAttribute(key, CKA_VALUE, buf, keySize);
  ------------------
  |  |  516|      0|#define CKA_VALUE 0x00000011UL
  ------------------
 8604|      0|            PORT_ZFree(buf, tmpKeySize);
  ------------------
  |  |   75|      0|#define PORT_ZFree PORT_ZFree_Util
  ------------------
 8605|      0|            break;
 8606|      0|        case CKM_XOR_BASE_AND_DATA:
  ------------------
  |  |  957|      0|#define CKM_XOR_BASE_AND_DATA 0x00000364UL
  ------------------
  |  Branch (8606:9): [True: 0, False: 32.5k]
  ------------------
 8607|      0|            crv = sftk_DeriveSensitiveCheck(sourceKey, key, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 8608|      0|            if (crv != CKR_OK)
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (8608:17): [True: 0, False: 0]
  ------------------
 8609|      0|                break;
 8610|       |
 8611|      0|            if (BAD_PARAM_CAST(pMechanism, sizeof(CK_KEY_DERIVATION_STRING_DATA))) {
  ------------------
  |  |   50|      0|#define BAD_PARAM_CAST(pMech, typeSize) (!pMech->pParameter || pMech->ulParameterLen < typeSize)
  |  |  ------------------
  |  |  |  Branch (50:42): [True: 0, False: 0]
  |  |  |  Branch (50:64): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 8612|      0|                crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 8613|      0|                break;
 8614|      0|            }
 8615|      0|            stringPtr = (CK_KEY_DERIVATION_STRING_DATA *)pMechanism->pParameter;
 8616|      0|            tmpKeySize = PR_MIN(att->attrib.ulValueLen, stringPtr->ulLen);
  ------------------
  |  |  158|      0|#define PR_MIN(x,y)     ((x)<(y)?(x):(y))
  |  |  ------------------
  |  |  |  Branch (158:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 8617|      0|            if (keySize == 0)
  ------------------
  |  Branch (8617:17): [True: 0, False: 0]
  ------------------
 8618|      0|                keySize = tmpKeySize;
 8619|      0|            if (keySize > tmpKeySize) {
  ------------------
  |  Branch (8619:17): [True: 0, False: 0]
  ------------------
 8620|      0|                crv = CKR_TEMPLATE_INCONSISTENT;
  ------------------
  |  | 1478|      0|#define CKR_TEMPLATE_INCONSISTENT 0x000000D1UL
  ------------------
 8621|      0|                break;
 8622|      0|            }
 8623|      0|            buf = (unsigned char *)PORT_Alloc(keySize);
  ------------------
  |  |   52|      0|#define PORT_Alloc PORT_Alloc_Util
  ------------------
 8624|      0|            if (buf == NULL) {
  ------------------
  |  Branch (8624:17): [True: 0, False: 0]
  ------------------
 8625|      0|                crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 8626|      0|                break;
 8627|      0|            }
 8628|       |
 8629|      0|            PORT_Memcpy(buf, att->attrib.pValue, keySize);
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
 8630|      0|            for (i = 0; i < (int)keySize; i++) {
  ------------------
  |  Branch (8630:25): [True: 0, False: 0]
  ------------------
 8631|      0|                buf[i] ^= stringPtr->pData[i];
 8632|      0|            }
 8633|       |
 8634|      0|            crv = sftk_forceAttribute(key, CKA_VALUE, buf, keySize);
  ------------------
  |  |  516|      0|#define CKA_VALUE 0x00000011UL
  ------------------
 8635|      0|            PORT_ZFree(buf, keySize);
  ------------------
  |  |   75|      0|#define PORT_ZFree PORT_ZFree_Util
  ------------------
 8636|      0|            break;
 8637|       |
 8638|      0|        case CKM_EXTRACT_KEY_FROM_KEY: {
  ------------------
  |  |  958|      0|#define CKM_EXTRACT_KEY_FROM_KEY 0x00000365UL
  ------------------
  |  Branch (8638:9): [True: 0, False: 32.5k]
  ------------------
 8639|      0|            if (BAD_PARAM_CAST(pMechanism, sizeof(CK_EXTRACT_PARAMS))) {
  ------------------
  |  |   50|      0|#define BAD_PARAM_CAST(pMech, typeSize) (!pMech->pParameter || pMech->ulParameterLen < typeSize)
  |  |  ------------------
  |  |  |  Branch (50:42): [True: 0, False: 0]
  |  |  |  Branch (50:64): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 8640|      0|                crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 8641|      0|                break;
 8642|      0|            }
 8643|       |            /* the following assumes 8 bits per byte */
 8644|      0|            CK_ULONG extract = *(CK_EXTRACT_PARAMS *)pMechanism->pParameter;
 8645|      0|            CK_ULONG shift = extract & 0x7; /* extract mod 8 the fast way */
 8646|      0|            CK_ULONG offset = extract >> 3; /* extract div 8 the fast way */
 8647|       |
 8648|      0|            crv = sftk_DeriveSensitiveCheck(sourceKey, key, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 8649|      0|            if (crv != CKR_OK)
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (8649:17): [True: 0, False: 0]
  ------------------
 8650|      0|                break;
 8651|       |
 8652|      0|            if (keySize == 0) {
  ------------------
  |  Branch (8652:17): [True: 0, False: 0]
  ------------------
 8653|      0|                crv = CKR_TEMPLATE_INCOMPLETE;
  ------------------
  |  | 1477|      0|#define CKR_TEMPLATE_INCOMPLETE 0x000000D0UL
  ------------------
 8654|      0|                break;
 8655|      0|            }
 8656|       |            /* make sure we have enough bits in the original key */
 8657|      0|            if (att->attrib.ulValueLen <
  ------------------
  |  Branch (8657:17): [True: 0, False: 0]
  ------------------
 8658|      0|                (offset + keySize + ((shift != 0) ? 1 : 0))) {
  ------------------
  |  Branch (8658:38): [True: 0, False: 0]
  ------------------
 8659|      0|                crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 8660|      0|                break;
 8661|      0|            }
 8662|      0|            buf = (unsigned char *)PORT_Alloc(keySize);
  ------------------
  |  |   52|      0|#define PORT_Alloc PORT_Alloc_Util
  ------------------
 8663|      0|            if (buf == NULL) {
  ------------------
  |  Branch (8663:17): [True: 0, False: 0]
  ------------------
 8664|      0|                crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 8665|      0|                break;
 8666|      0|            }
 8667|       |
 8668|       |            /* copy the bits we need into the new key */
 8669|      0|            for (i = 0; i < (int)keySize; i++) {
  ------------------
  |  Branch (8669:25): [True: 0, False: 0]
  ------------------
 8670|      0|                unsigned char *value =
 8671|      0|                    ((unsigned char *)att->attrib.pValue) + offset + i;
 8672|      0|                if (shift) {
  ------------------
  |  Branch (8672:21): [True: 0, False: 0]
  ------------------
 8673|      0|                    buf[i] = (value[0] << (shift)) | (value[1] >> (8 - shift));
 8674|      0|                } else {
 8675|      0|                    buf[i] = value[0];
 8676|      0|                }
 8677|      0|            }
 8678|       |
 8679|      0|            crv = sftk_forceAttribute(key, CKA_VALUE, buf, keySize);
  ------------------
  |  |  516|      0|#define CKA_VALUE 0x00000011UL
  ------------------
 8680|      0|            PORT_ZFree(buf, keySize);
  ------------------
  |  |   75|      0|#define PORT_ZFree PORT_ZFree_Util
  ------------------
 8681|      0|            break;
 8682|      0|        }
 8683|      0|        case CKM_MD2_KEY_DERIVATION:
  ------------------
  |  |  978|      0|#define CKM_MD2_KEY_DERIVATION 0x00000391UL
  ------------------
  |  Branch (8683:9): [True: 0, False: 32.5k]
  ------------------
 8684|      0|            if (keySize == 0)
  ------------------
  |  Branch (8684:17): [True: 0, False: 0]
  ------------------
 8685|      0|                keySize = MD2_LENGTH;
  ------------------
  |  |   37|      0|#define MD2_LENGTH 16
  ------------------
 8686|      0|            if (keySize > MD2_LENGTH) {
  ------------------
  |  |   37|      0|#define MD2_LENGTH 16
  ------------------
  |  Branch (8686:17): [True: 0, False: 0]
  ------------------
 8687|      0|                crv = CKR_TEMPLATE_INCONSISTENT;
  ------------------
  |  | 1478|      0|#define CKR_TEMPLATE_INCONSISTENT 0x000000D1UL
  ------------------
 8688|      0|                break;
 8689|      0|            }
 8690|       |            /* now allocate the hash contexts */
 8691|      0|            md2 = MD2_NewContext();
 8692|      0|            if (md2 == NULL) {
  ------------------
  |  Branch (8692:17): [True: 0, False: 0]
  ------------------
 8693|      0|                crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 8694|      0|                break;
 8695|      0|            }
 8696|      0|            MD2_Begin(md2);
 8697|      0|            MD2_Update(md2, (const unsigned char *)att->attrib.pValue,
 8698|      0|                       att->attrib.ulValueLen);
 8699|      0|            MD2_End(md2, key_block, &outLen, MD2_LENGTH);
  ------------------
  |  |   37|      0|#define MD2_LENGTH 16
  ------------------
 8700|      0|            MD2_DestroyContext(md2, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 8701|       |
 8702|      0|            crv = sftk_forceAttribute(key, CKA_VALUE, key_block, keySize);
  ------------------
  |  |  516|      0|#define CKA_VALUE 0x00000011UL
  ------------------
 8703|      0|            PORT_Memset(key_block, 0, MD2_LENGTH);
  ------------------
  |  |  182|      0|#define PORT_Memset memset
  ------------------
                          PORT_Memset(key_block, 0, MD2_LENGTH);
  ------------------
  |  |   37|      0|#define MD2_LENGTH 16
  ------------------
 8704|      0|            break;
 8705|      0|#define DERIVE_KEY_HASH(hash)                                                \
 8706|      0|    case CKM_##hash##_KEY_DERIVATION:                                        \
 8707|      0|        if (keySize == 0)                                                    \
 8708|      0|            keySize = hash##_LENGTH;                                         \
 8709|      0|        if (keySize > hash##_LENGTH) {                                       \
 8710|      0|            crv = CKR_TEMPLATE_INCONSISTENT;                                 \
 8711|      0|            break;                                                           \
 8712|      0|        }                                                                    \
 8713|      0|        hash##_HashBuf(key_block, (const unsigned char *)att->attrib.pValue, \
 8714|      0|                       att->attrib.ulValueLen);                              \
 8715|      0|        crv = sftk_forceAttribute(key, CKA_VALUE, key_block, keySize);       \
 8716|      0|        PORT_Memset(key_block, 0, hash##_LENGTH);                            \
 8717|      0|        break;
 8718|      0|            DERIVE_KEY_HASH(MD5)
  ------------------
  |  | 8706|      0|    case CKM_##hash##_KEY_DERIVATION:                                        \
  |  |  ------------------
  |  |  |  Branch (8706:5): [True: 0, False: 32.5k]
  |  |  ------------------
  |  | 8707|      0|        if (keySize == 0)                                                    \
  |  |  ------------------
  |  |  |  Branch (8707:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 8708|      0|            keySize = hash##_LENGTH;                                         \
  |  | 8709|      0|        if (keySize > hash##_LENGTH) {                                       \
  |  |  ------------------
  |  |  |  Branch (8709:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 8710|      0|            crv = CKR_TEMPLATE_INCONSISTENT;                                 \
  |  |  ------------------
  |  |  |  | 1478|      0|#define CKR_TEMPLATE_INCONSISTENT 0x000000D1UL
  |  |  ------------------
  |  | 8711|      0|            break;                                                           \
  |  | 8712|      0|        }                                                                    \
  |  | 8713|      0|        hash##_HashBuf(key_block, (const unsigned char *)att->attrib.pValue, \
  |  | 8714|      0|                       att->attrib.ulValueLen);                              \
  |  | 8715|      0|        crv = sftk_forceAttribute(key, CKA_VALUE, key_block, keySize);       \
  |  |  ------------------
  |  |  |  |  516|      0|#define CKA_VALUE 0x00000011UL
  |  |  ------------------
  |  | 8716|      0|        PORT_Memset(key_block, 0, hash##_LENGTH);                            \
  |  |  ------------------
  |  |  |  |  182|      0|#define PORT_Memset memset
  |  |  ------------------
  |  | 8717|      0|        break;
  ------------------
 8719|      0|            DERIVE_KEY_HASH(SHA1)
  ------------------
  |  | 8706|      0|    case CKM_##hash##_KEY_DERIVATION:                                        \
  |  |  ------------------
  |  |  |  Branch (8706:5): [True: 0, False: 32.5k]
  |  |  ------------------
  |  | 8707|      0|        if (keySize == 0)                                                    \
  |  |  ------------------
  |  |  |  Branch (8707:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 8708|      0|            keySize = hash##_LENGTH;                                         \
  |  | 8709|      0|        if (keySize > hash##_LENGTH) {                                       \
  |  |  ------------------
  |  |  |  Branch (8709:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 8710|      0|            crv = CKR_TEMPLATE_INCONSISTENT;                                 \
  |  |  ------------------
  |  |  |  | 1478|      0|#define CKR_TEMPLATE_INCONSISTENT 0x000000D1UL
  |  |  ------------------
  |  | 8711|      0|            break;                                                           \
  |  | 8712|      0|        }                                                                    \
  |  | 8713|      0|        hash##_HashBuf(key_block, (const unsigned char *)att->attrib.pValue, \
  |  | 8714|      0|                       att->attrib.ulValueLen);                              \
  |  | 8715|      0|        crv = sftk_forceAttribute(key, CKA_VALUE, key_block, keySize);       \
  |  |  ------------------
  |  |  |  |  516|      0|#define CKA_VALUE 0x00000011UL
  |  |  ------------------
  |  | 8716|      0|        PORT_Memset(key_block, 0, hash##_LENGTH);                            \
  |  |  ------------------
  |  |  |  |  182|      0|#define PORT_Memset memset
  |  |  ------------------
  |  | 8717|      0|        break;
  ------------------
 8720|      0|            DERIVE_KEY_HASH(SHA224)
  ------------------
  |  | 8706|      0|    case CKM_##hash##_KEY_DERIVATION:                                        \
  |  |  ------------------
  |  |  |  Branch (8706:5): [True: 0, False: 32.5k]
  |  |  ------------------
  |  | 8707|      0|        if (keySize == 0)                                                    \
  |  |  ------------------
  |  |  |  Branch (8707:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 8708|      0|            keySize = hash##_LENGTH;                                         \
  |  | 8709|      0|        if (keySize > hash##_LENGTH) {                                       \
  |  |  ------------------
  |  |  |  Branch (8709:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 8710|      0|            crv = CKR_TEMPLATE_INCONSISTENT;                                 \
  |  |  ------------------
  |  |  |  | 1478|      0|#define CKR_TEMPLATE_INCONSISTENT 0x000000D1UL
  |  |  ------------------
  |  | 8711|      0|            break;                                                           \
  |  | 8712|      0|        }                                                                    \
  |  | 8713|      0|        hash##_HashBuf(key_block, (const unsigned char *)att->attrib.pValue, \
  |  | 8714|      0|                       att->attrib.ulValueLen);                              \
  |  | 8715|      0|        crv = sftk_forceAttribute(key, CKA_VALUE, key_block, keySize);       \
  |  |  ------------------
  |  |  |  |  516|      0|#define CKA_VALUE 0x00000011UL
  |  |  ------------------
  |  | 8716|      0|        PORT_Memset(key_block, 0, hash##_LENGTH);                            \
  |  |  ------------------
  |  |  |  |  182|      0|#define PORT_Memset memset
  |  |  ------------------
  |  | 8717|      0|        break;
  ------------------
 8721|      0|            DERIVE_KEY_HASH(SHA256)
  ------------------
  |  | 8706|      0|    case CKM_##hash##_KEY_DERIVATION:                                        \
  |  |  ------------------
  |  |  |  Branch (8706:5): [True: 0, False: 32.5k]
  |  |  ------------------
  |  | 8707|      0|        if (keySize == 0)                                                    \
  |  |  ------------------
  |  |  |  Branch (8707:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 8708|      0|            keySize = hash##_LENGTH;                                         \
  |  | 8709|      0|        if (keySize > hash##_LENGTH) {                                       \
  |  |  ------------------
  |  |  |  Branch (8709:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 8710|      0|            crv = CKR_TEMPLATE_INCONSISTENT;                                 \
  |  |  ------------------
  |  |  |  | 1478|      0|#define CKR_TEMPLATE_INCONSISTENT 0x000000D1UL
  |  |  ------------------
  |  | 8711|      0|            break;                                                           \
  |  | 8712|      0|        }                                                                    \
  |  | 8713|      0|        hash##_HashBuf(key_block, (const unsigned char *)att->attrib.pValue, \
  |  | 8714|      0|                       att->attrib.ulValueLen);                              \
  |  | 8715|      0|        crv = sftk_forceAttribute(key, CKA_VALUE, key_block, keySize);       \
  |  |  ------------------
  |  |  |  |  516|      0|#define CKA_VALUE 0x00000011UL
  |  |  ------------------
  |  | 8716|      0|        PORT_Memset(key_block, 0, hash##_LENGTH);                            \
  |  |  ------------------
  |  |  |  |  182|      0|#define PORT_Memset memset
  |  |  ------------------
  |  | 8717|      0|        break;
  ------------------
 8722|      0|            DERIVE_KEY_HASH(SHA384)
  ------------------
  |  | 8706|      0|    case CKM_##hash##_KEY_DERIVATION:                                        \
  |  |  ------------------
  |  |  |  Branch (8706:5): [True: 0, False: 32.5k]
  |  |  ------------------
  |  | 8707|      0|        if (keySize == 0)                                                    \
  |  |  ------------------
  |  |  |  Branch (8707:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 8708|      0|            keySize = hash##_LENGTH;                                         \
  |  | 8709|      0|        if (keySize > hash##_LENGTH) {                                       \
  |  |  ------------------
  |  |  |  Branch (8709:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 8710|      0|            crv = CKR_TEMPLATE_INCONSISTENT;                                 \
  |  |  ------------------
  |  |  |  | 1478|      0|#define CKR_TEMPLATE_INCONSISTENT 0x000000D1UL
  |  |  ------------------
  |  | 8711|      0|            break;                                                           \
  |  | 8712|      0|        }                                                                    \
  |  | 8713|      0|        hash##_HashBuf(key_block, (const unsigned char *)att->attrib.pValue, \
  |  | 8714|      0|                       att->attrib.ulValueLen);                              \
  |  | 8715|      0|        crv = sftk_forceAttribute(key, CKA_VALUE, key_block, keySize);       \
  |  |  ------------------
  |  |  |  |  516|      0|#define CKA_VALUE 0x00000011UL
  |  |  ------------------
  |  | 8716|      0|        PORT_Memset(key_block, 0, hash##_LENGTH);                            \
  |  |  ------------------
  |  |  |  |  182|      0|#define PORT_Memset memset
  |  |  ------------------
  |  | 8717|      0|        break;
  ------------------
 8723|      0|            DERIVE_KEY_HASH(SHA512)
  ------------------
  |  | 8706|      0|    case CKM_##hash##_KEY_DERIVATION:                                        \
  |  |  ------------------
  |  |  |  Branch (8706:5): [True: 0, False: 32.5k]
  |  |  ------------------
  |  | 8707|      0|        if (keySize == 0)                                                    \
  |  |  ------------------
  |  |  |  Branch (8707:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 8708|      0|            keySize = hash##_LENGTH;                                         \
  |  | 8709|      0|        if (keySize > hash##_LENGTH) {                                       \
  |  |  ------------------
  |  |  |  Branch (8709:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 8710|      0|            crv = CKR_TEMPLATE_INCONSISTENT;                                 \
  |  |  ------------------
  |  |  |  | 1478|      0|#define CKR_TEMPLATE_INCONSISTENT 0x000000D1UL
  |  |  ------------------
  |  | 8711|      0|            break;                                                           \
  |  | 8712|      0|        }                                                                    \
  |  | 8713|      0|        hash##_HashBuf(key_block, (const unsigned char *)att->attrib.pValue, \
  |  | 8714|      0|                       att->attrib.ulValueLen);                              \
  |  | 8715|      0|        crv = sftk_forceAttribute(key, CKA_VALUE, key_block, keySize);       \
  |  |  ------------------
  |  |  |  |  516|      0|#define CKA_VALUE 0x00000011UL
  |  |  ------------------
  |  | 8716|      0|        PORT_Memset(key_block, 0, hash##_LENGTH);                            \
  |  |  ------------------
  |  |  |  |  182|      0|#define PORT_Memset memset
  |  |  ------------------
  |  | 8717|      0|        break;
  ------------------
 8724|      0|            DERIVE_KEY_HASH(SHA3_224)
  ------------------
  |  | 8706|      0|    case CKM_##hash##_KEY_DERIVATION:                                        \
  |  |  ------------------
  |  |  |  Branch (8706:5): [True: 0, False: 32.5k]
  |  |  ------------------
  |  | 8707|      0|        if (keySize == 0)                                                    \
  |  |  ------------------
  |  |  |  Branch (8707:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 8708|      0|            keySize = hash##_LENGTH;                                         \
  |  | 8709|      0|        if (keySize > hash##_LENGTH) {                                       \
  |  |  ------------------
  |  |  |  Branch (8709:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 8710|      0|            crv = CKR_TEMPLATE_INCONSISTENT;                                 \
  |  |  ------------------
  |  |  |  | 1478|      0|#define CKR_TEMPLATE_INCONSISTENT 0x000000D1UL
  |  |  ------------------
  |  | 8711|      0|            break;                                                           \
  |  | 8712|      0|        }                                                                    \
  |  | 8713|      0|        hash##_HashBuf(key_block, (const unsigned char *)att->attrib.pValue, \
  |  | 8714|      0|                       att->attrib.ulValueLen);                              \
  |  | 8715|      0|        crv = sftk_forceAttribute(key, CKA_VALUE, key_block, keySize);       \
  |  |  ------------------
  |  |  |  |  516|      0|#define CKA_VALUE 0x00000011UL
  |  |  ------------------
  |  | 8716|      0|        PORT_Memset(key_block, 0, hash##_LENGTH);                            \
  |  |  ------------------
  |  |  |  |  182|      0|#define PORT_Memset memset
  |  |  ------------------
  |  | 8717|      0|        break;
  ------------------
 8725|      0|            DERIVE_KEY_HASH(SHA3_256)
  ------------------
  |  | 8706|      0|    case CKM_##hash##_KEY_DERIVATION:                                        \
  |  |  ------------------
  |  |  |  Branch (8706:5): [True: 0, False: 32.5k]
  |  |  ------------------
  |  | 8707|      0|        if (keySize == 0)                                                    \
  |  |  ------------------
  |  |  |  Branch (8707:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 8708|      0|            keySize = hash##_LENGTH;                                         \
  |  | 8709|      0|        if (keySize > hash##_LENGTH) {                                       \
  |  |  ------------------
  |  |  |  Branch (8709:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 8710|      0|            crv = CKR_TEMPLATE_INCONSISTENT;                                 \
  |  |  ------------------
  |  |  |  | 1478|      0|#define CKR_TEMPLATE_INCONSISTENT 0x000000D1UL
  |  |  ------------------
  |  | 8711|      0|            break;                                                           \
  |  | 8712|      0|        }                                                                    \
  |  | 8713|      0|        hash##_HashBuf(key_block, (const unsigned char *)att->attrib.pValue, \
  |  | 8714|      0|                       att->attrib.ulValueLen);                              \
  |  | 8715|      0|        crv = sftk_forceAttribute(key, CKA_VALUE, key_block, keySize);       \
  |  |  ------------------
  |  |  |  |  516|      0|#define CKA_VALUE 0x00000011UL
  |  |  ------------------
  |  | 8716|      0|        PORT_Memset(key_block, 0, hash##_LENGTH);                            \
  |  |  ------------------
  |  |  |  |  182|      0|#define PORT_Memset memset
  |  |  ------------------
  |  | 8717|      0|        break;
  ------------------
 8726|      0|            DERIVE_KEY_HASH(SHA3_384)
  ------------------
  |  | 8706|      0|    case CKM_##hash##_KEY_DERIVATION:                                        \
  |  |  ------------------
  |  |  |  Branch (8706:5): [True: 0, False: 32.5k]
  |  |  ------------------
  |  | 8707|      0|        if (keySize == 0)                                                    \
  |  |  ------------------
  |  |  |  Branch (8707:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 8708|      0|            keySize = hash##_LENGTH;                                         \
  |  | 8709|      0|        if (keySize > hash##_LENGTH) {                                       \
  |  |  ------------------
  |  |  |  Branch (8709:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 8710|      0|            crv = CKR_TEMPLATE_INCONSISTENT;                                 \
  |  |  ------------------
  |  |  |  | 1478|      0|#define CKR_TEMPLATE_INCONSISTENT 0x000000D1UL
  |  |  ------------------
  |  | 8711|      0|            break;                                                           \
  |  | 8712|      0|        }                                                                    \
  |  | 8713|      0|        hash##_HashBuf(key_block, (const unsigned char *)att->attrib.pValue, \
  |  | 8714|      0|                       att->attrib.ulValueLen);                              \
  |  | 8715|      0|        crv = sftk_forceAttribute(key, CKA_VALUE, key_block, keySize);       \
  |  |  ------------------
  |  |  |  |  516|      0|#define CKA_VALUE 0x00000011UL
  |  |  ------------------
  |  | 8716|      0|        PORT_Memset(key_block, 0, hash##_LENGTH);                            \
  |  |  ------------------
  |  |  |  |  182|      0|#define PORT_Memset memset
  |  |  ------------------
  |  | 8717|      0|        break;
  ------------------
 8727|      0|            DERIVE_KEY_HASH(SHA3_512)
  ------------------
  |  | 8706|      0|    case CKM_##hash##_KEY_DERIVATION:                                        \
  |  |  ------------------
  |  |  |  Branch (8706:5): [True: 0, False: 32.5k]
  |  |  ------------------
  |  | 8707|      0|        if (keySize == 0)                                                    \
  |  |  ------------------
  |  |  |  Branch (8707:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 8708|      0|            keySize = hash##_LENGTH;                                         \
  |  | 8709|      0|        if (keySize > hash##_LENGTH) {                                       \
  |  |  ------------------
  |  |  |  Branch (8709:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 8710|      0|            crv = CKR_TEMPLATE_INCONSISTENT;                                 \
  |  |  ------------------
  |  |  |  | 1478|      0|#define CKR_TEMPLATE_INCONSISTENT 0x000000D1UL
  |  |  ------------------
  |  | 8711|      0|            break;                                                           \
  |  | 8712|      0|        }                                                                    \
  |  | 8713|      0|        hash##_HashBuf(key_block, (const unsigned char *)att->attrib.pValue, \
  |  | 8714|      0|                       att->attrib.ulValueLen);                              \
  |  | 8715|      0|        crv = sftk_forceAttribute(key, CKA_VALUE, key_block, keySize);       \
  |  |  ------------------
  |  |  |  |  516|      0|#define CKA_VALUE 0x00000011UL
  |  |  ------------------
  |  | 8716|      0|        PORT_Memset(key_block, 0, hash##_LENGTH);                            \
  |  |  ------------------
  |  |  |  |  182|      0|#define PORT_Memset memset
  |  |  ------------------
  |  | 8717|      0|        break;
  ------------------
 8728|       |
 8729|    940|        case CKM_DH_PKCS_DERIVE: {
  ------------------
  |  |  759|    940|#define CKM_DH_PKCS_DERIVE 0x00000021UL
  ------------------
  |  Branch (8729:9): [True: 940, False: 31.6k]
  ------------------
 8730|    940|            SECItem derived, dhPublic;
 8731|    940|            SECItem dhPrime, dhValue;
 8732|    940|            const SECItem *subPrime;
 8733|       |            /* sourceKey - values for the local existing low key */
 8734|       |            /* get prime and value attributes */
 8735|    940|            crv = sftk_Attribute2SecItem(NULL, &dhPrime, sourceKey, CKA_PRIME);
  ------------------
  |  |  569|    940|#define CKA_PRIME 0x00000130UL
  ------------------
 8736|    940|            if (crv != CKR_OK)
  ------------------
  |  | 1388|    940|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (8736:17): [True: 0, False: 940]
  ------------------
 8737|      0|                break;
 8738|       |
 8739|    940|            dhPublic.data = pMechanism->pParameter;
 8740|    940|            dhPublic.len = pMechanism->ulParameterLen;
 8741|       |
 8742|       |            /* if the prime is an approved prime, we can skip all the other
 8743|       |             * checks. */
 8744|    940|            subPrime = sftk_VerifyDH_Prime(&dhPrime, NULL, isFIPS);
 8745|    940|            if (subPrime == NULL) {
  ------------------
  |  Branch (8745:17): [True: 0, False: 940]
  ------------------
 8746|      0|                SECItem dhSubPrime;
 8747|       |                /* If the caller set the subprime value, it means that
 8748|       |                 * either the caller knows the subprime value and wants us
 8749|       |                 * to validate the key against the subprime, or that the
 8750|       |                 * caller wants us to verify that the prime is a safe prime
 8751|       |                 * by passing in subprime = (prime-1)/2 */
 8752|      0|                dhSubPrime.data = NULL;
 8753|      0|                dhSubPrime.len = 0;
 8754|      0|                crv = sftk_Attribute2SecItem(NULL, &dhSubPrime,
 8755|      0|                                             sourceKey, CKA_SUBPRIME);
  ------------------
  |  |  570|      0|#define CKA_SUBPRIME 0x00000131UL
  ------------------
 8756|       |                /* we ignore the value of crv here, We treat a valid
 8757|       |                 * return of len = 0 and a failure to find a subrime the same
 8758|       |                 * NOTE: we free the subprime in both cases depending on
 8759|       |                 * PORT_Free of NULL to be a noop */
 8760|      0|                if (dhSubPrime.len != 0) {
  ------------------
  |  Branch (8760:21): [True: 0, False: 0]
  ------------------
 8761|      0|                    PRBool isSafe = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 8762|       |
 8763|       |                    /* Callers can set dhSubPrime to q=(p-1)/2 to force
 8764|       |                     * checks for safe primes. If so we only need to check
 8765|       |                     * q and p for primality and skip the group test.  */
 8766|      0|                    rv = sftk_IsSafePrime(&dhPrime, &dhSubPrime, &isSafe);
 8767|      0|                    if (rv != SECSuccess) {
  ------------------
  |  Branch (8767:25): [True: 0, False: 0]
  ------------------
 8768|       |                        /* either p or q was even and therefore not prime,
 8769|       |                         * we can stop processing here and fail now */
 8770|      0|                        crv = CKR_ARGUMENTS_BAD;
  ------------------
  |  | 1401|      0|#define CKR_ARGUMENTS_BAD 0x00000007UL
  ------------------
 8771|      0|                        SECITEM_ZfreeItem(&dhPrime, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                                      SECITEM_ZfreeItem(&dhPrime, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 8772|      0|                        SECITEM_ZfreeItem(&dhSubPrime, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                                      SECITEM_ZfreeItem(&dhSubPrime, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 8773|      0|                        break;
 8774|      0|                    }
 8775|       |
 8776|       |                    /* first make sure the primes are really prime */
 8777|      0|                    if (!KEA_PrimeCheck(&dhPrime)) {
  ------------------
  |  Branch (8777:25): [True: 0, False: 0]
  ------------------
 8778|      0|                        crv = CKR_ARGUMENTS_BAD;
  ------------------
  |  | 1401|      0|#define CKR_ARGUMENTS_BAD 0x00000007UL
  ------------------
 8779|      0|                        SECITEM_ZfreeItem(&dhPrime, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                                      SECITEM_ZfreeItem(&dhPrime, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 8780|      0|                        SECITEM_ZfreeItem(&dhSubPrime, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                                      SECITEM_ZfreeItem(&dhSubPrime, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 8781|      0|                        break;
 8782|      0|                    }
 8783|      0|                    if (!KEA_PrimeCheck(&dhSubPrime)) {
  ------------------
  |  Branch (8783:25): [True: 0, False: 0]
  ------------------
 8784|      0|                        crv = CKR_ARGUMENTS_BAD;
  ------------------
  |  | 1401|      0|#define CKR_ARGUMENTS_BAD 0x00000007UL
  ------------------
 8785|      0|                        SECITEM_ZfreeItem(&dhPrime, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                                      SECITEM_ZfreeItem(&dhPrime, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 8786|      0|                        SECITEM_ZfreeItem(&dhSubPrime, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                                      SECITEM_ZfreeItem(&dhSubPrime, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 8787|      0|                        break;
 8788|      0|                    }
 8789|      0|                    if (isFIPS || !isSafe) {
  ------------------
  |  Branch (8789:25): [True: 0, False: 0]
  |  Branch (8789:35): [True: 0, False: 0]
  ------------------
 8790|       |                        /* With safe primes, there is only one other small
 8791|       |                         * subgroup. As long as y isn't 0, 1, or -1 mod p,
 8792|       |                         * any other y is safe. Only do the full check for
 8793|       |                         * non-safe primes, except in FIPS mode we need
 8794|       |                         * to do this check on all primes in which
 8795|       |                         * we receive the subprime value */
 8796|      0|                        if (!KEA_Verify(&dhPublic, &dhPrime, &dhSubPrime)) {
  ------------------
  |  Branch (8796:29): [True: 0, False: 0]
  ------------------
 8797|      0|                            crv = CKR_ARGUMENTS_BAD;
  ------------------
  |  | 1401|      0|#define CKR_ARGUMENTS_BAD 0x00000007UL
  ------------------
 8798|      0|                            SECITEM_ZfreeItem(&dhPrime, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                                          SECITEM_ZfreeItem(&dhPrime, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 8799|      0|                            SECITEM_ZfreeItem(&dhSubPrime, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                                          SECITEM_ZfreeItem(&dhSubPrime, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 8800|      0|                            break;
 8801|      0|                        }
 8802|      0|                    }
 8803|      0|                } else if (isFIPS) {
  ------------------
  |  Branch (8803:28): [True: 0, False: 0]
  ------------------
 8804|       |                    /* In FIPS mode we only accept approved primes, or
 8805|       |                     * primes with the full subprime value */
 8806|      0|                    crv = CKR_ARGUMENTS_BAD;
  ------------------
  |  | 1401|      0|#define CKR_ARGUMENTS_BAD 0x00000007UL
  ------------------
 8807|      0|                    SECITEM_ZfreeItem(&dhPrime, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                                  SECITEM_ZfreeItem(&dhPrime, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 8808|      0|                    break;
 8809|      0|                }
 8810|       |                /* checks are complete, no need for the subPrime any longer */
 8811|      0|                SECITEM_ZfreeItem(&dhSubPrime, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                              SECITEM_ZfreeItem(&dhSubPrime, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 8812|      0|            }
 8813|       |
 8814|       |            /* now that the prime is validated, get the private value */
 8815|    940|            crv = sftk_Attribute2SecItem(NULL, &dhValue, sourceKey, CKA_VALUE);
  ------------------
  |  |  516|    940|#define CKA_VALUE 0x00000011UL
  ------------------
 8816|    940|            if (crv != CKR_OK) {
  ------------------
  |  | 1388|    940|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (8816:17): [True: 0, False: 940]
  ------------------
 8817|      0|                SECITEM_ZfreeItem(&dhPrime, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                              SECITEM_ZfreeItem(&dhPrime, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 8818|      0|                break;
 8819|      0|            }
 8820|       |
 8821|       |            /* calculate private value - oct */
 8822|    940|            rv = DH_Derive(&dhPublic, &dhPrime, &dhValue, &derived, keySize);
 8823|       |
 8824|    940|            SECITEM_ZfreeItem(&dhPrime, PR_FALSE);
  ------------------
  |  |  110|    940|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                          SECITEM_ZfreeItem(&dhPrime, PR_FALSE);
  ------------------
  |  |  438|    940|#define PR_FALSE 0
  ------------------
 8825|    940|            SECITEM_ZfreeItem(&dhValue, PR_FALSE);
  ------------------
  |  |  110|    940|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                          SECITEM_ZfreeItem(&dhValue, PR_FALSE);
  ------------------
  |  |  438|    940|#define PR_FALSE 0
  ------------------
 8826|       |
 8827|    940|            if (rv == SECSuccess) {
  ------------------
  |  Branch (8827:17): [True: 940, False: 0]
  ------------------
 8828|    940|                sftk_forceAttribute(key, CKA_VALUE, derived.data, derived.len);
  ------------------
  |  |  516|    940|#define CKA_VALUE 0x00000011UL
  ------------------
 8829|    940|                SECITEM_ZfreeItem(&derived, PR_FALSE);
  ------------------
  |  |  110|    940|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                              SECITEM_ZfreeItem(&derived, PR_FALSE);
  ------------------
  |  |  438|    940|#define PR_FALSE 0
  ------------------
 8830|    940|                crv = CKR_OK;
  ------------------
  |  | 1388|    940|#define CKR_OK 0x00000000UL
  ------------------
 8831|    940|            } else
 8832|      0|                crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 8833|       |
 8834|    940|            break;
 8835|    940|        }
 8836|       |
 8837|  1.00k|        case CKM_ECDH1_DERIVE:
  ------------------
  |  | 1086|  1.00k|#define CKM_ECDH1_DERIVE 0x00001050UL
  ------------------
  |  Branch (8837:9): [True: 1.00k, False: 31.5k]
  ------------------
 8838|  1.00k|        case CKM_ECDH1_COFACTOR_DERIVE: {
  ------------------
  |  | 1087|  1.00k|#define CKM_ECDH1_COFACTOR_DERIVE 0x00001051UL
  ------------------
  |  Branch (8838:9): [True: 0, False: 32.5k]
  ------------------
 8839|  1.00k|            SECItem ecScalar, ecPoint;
 8840|  1.00k|            SECItem tmp;
 8841|  1.00k|            PRBool withCofactor = PR_FALSE;
  ------------------
  |  |  438|  1.00k|#define PR_FALSE 0
  ------------------
 8842|  1.00k|            unsigned char *secret;
 8843|  1.00k|            unsigned char *keyData = NULL;
 8844|  1.00k|            unsigned int secretlen, pubKeyLen;
 8845|  1.00k|            CK_ECDH1_DERIVE_PARAMS *mechParams;
 8846|  1.00k|            NSSLOWKEYPrivateKey *privKey;
 8847|  1.00k|            PLArenaPool *arena = NULL;
 8848|       |
 8849|       |            /* Check mechanism parameters */
 8850|  1.00k|            mechParams = (CK_ECDH1_DERIVE_PARAMS *)pMechanism->pParameter;
 8851|  1.00k|            if ((pMechanism->ulParameterLen != sizeof(CK_ECDH1_DERIVE_PARAMS)) ||
  ------------------
  |  Branch (8851:17): [True: 0, False: 1.00k]
  ------------------
 8852|  1.00k|                ((mechParams->kdf == CKD_NULL) &&
  ------------------
  |  | 1702|  1.00k|#define CKD_NULL 0x00000001UL
  ------------------
  |  Branch (8852:18): [True: 1.00k, False: 0]
  ------------------
 8853|  1.00k|                 ((mechParams->ulSharedDataLen != 0) ||
  ------------------
  |  Branch (8853:19): [True: 0, False: 1.00k]
  ------------------
 8854|  1.00k|                  (mechParams->pSharedData != NULL)))) {
  ------------------
  |  Branch (8854:19): [True: 0, False: 1.00k]
  ------------------
 8855|      0|                crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 8856|      0|                break;
 8857|      0|            }
 8858|       |
 8859|  1.00k|            privKey = sftk_GetPrivKey(sourceKey, CKK_EC, &crv);
  ------------------
  |  |  379|  1.00k|#define CKK_EC 0x00000003UL
  ------------------
 8860|  1.00k|            if (privKey == NULL) {
  ------------------
  |  Branch (8860:17): [True: 0, False: 1.00k]
  ------------------
 8861|      0|                break;
 8862|      0|            }
 8863|       |
 8864|       |            /* Now we are working with a non-NULL private key */
 8865|  1.00k|            SECITEM_CopyItem(NULL, &ecScalar, &privKey->u.ec.privateValue);
  ------------------
  |  |  106|  1.00k|#define SECITEM_CopyItem SECITEM_CopyItem_Util
  ------------------
 8866|       |
 8867|  1.00k|            ecPoint.data = mechParams->pPublicData;
 8868|  1.00k|            ecPoint.len = mechParams->ulPublicDataLen;
 8869|       |
 8870|  1.00k|            pubKeyLen = EC_GetPointSize(&privKey->u.ec.ecParams);
 8871|       |
 8872|       |            /* if the len is too large, might be an encoded point */
 8873|  1.00k|            if (ecPoint.len > pubKeyLen) {
  ------------------
  |  Branch (8873:17): [True: 74, False: 929]
  ------------------
 8874|     74|                SECItem newPoint;
 8875|       |
 8876|     74|                arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
  ------------------
  |  |   63|     74|#define PORT_NewArena PORT_NewArena_Util
  ------------------
                              arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
  ------------------
  |  |   60|     74|#define DER_DEFAULT_CHUNKSIZE (2048)
  ------------------
 8877|     74|                if (arena == NULL) {
  ------------------
  |  Branch (8877:21): [True: 0, False: 74]
  ------------------
 8878|      0|                    goto ec_loser;
 8879|      0|                }
 8880|       |
 8881|     74|                rv = SEC_QuickDERDecodeItem(arena, &newPoint,
  ------------------
  |  |  102|     74|#define SEC_QuickDERDecodeItem SEC_QuickDERDecodeItem_Util
  ------------------
 8882|     74|                                            SEC_ASN1_GET(SEC_OctetStringTemplate),
  ------------------
  |  |  188|     74|#define SEC_ASN1_GET(x) x
  ------------------
 8883|     74|                                            &ecPoint);
 8884|     74|                if (rv != SECSuccess) {
  ------------------
  |  Branch (8884:21): [True: 2, False: 72]
  ------------------
 8885|      2|                    goto ec_loser;
 8886|      2|                }
 8887|     72|                ecPoint = newPoint;
 8888|     72|            }
 8889|       |
 8890|  1.00k|            if (mechanism == CKM_ECDH1_COFACTOR_DERIVE) {
  ------------------
  |  | 1087|  1.00k|#define CKM_ECDH1_COFACTOR_DERIVE 0x00001051UL
  ------------------
  |  Branch (8890:17): [True: 0, False: 1.00k]
  ------------------
 8891|      0|                withCofactor = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 8892|      0|            }
 8893|       |
 8894|  1.00k|            rv = ECDH_Derive(&ecPoint, &privKey->u.ec.ecParams, &ecScalar,
 8895|  1.00k|                             withCofactor, &tmp);
 8896|  1.00k|            SECITEM_ZfreeItem(&ecScalar, PR_FALSE);
  ------------------
  |  |  110|  1.00k|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                          SECITEM_ZfreeItem(&ecScalar, PR_FALSE);
  ------------------
  |  |  438|  1.00k|#define PR_FALSE 0
  ------------------
 8897|  1.00k|            ecScalar.data = NULL;
 8898|  1.00k|            if (privKey != sourceKey->objectInfo) {
  ------------------
  |  Branch (8898:17): [True: 0, False: 1.00k]
  ------------------
 8899|      0|                nsslowkey_DestroyPrivateKey(privKey);
 8900|      0|                privKey = NULL;
 8901|      0|            }
 8902|  1.00k|            if (arena) {
  ------------------
  |  Branch (8902:17): [True: 72, False: 929]
  ------------------
 8903|     72|                PORT_FreeArena(arena, PR_FALSE);
  ------------------
  |  |   61|     72|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                              PORT_FreeArena(arena, PR_FALSE);
  ------------------
  |  |  438|     72|#define PR_FALSE 0
  ------------------
 8904|     72|                arena = NULL;
 8905|     72|            }
 8906|       |
 8907|  1.00k|            if (rv != SECSuccess) {
  ------------------
  |  Branch (8907:17): [True: 150, False: 851]
  ------------------
 8908|    150|                crv = sftk_MapCryptError(PORT_GetError());
  ------------------
  |  |   62|    150|#define PORT_GetError PORT_GetError_Util
  ------------------
 8909|    150|                break;
 8910|    150|            }
 8911|       |
 8912|       |            /*
 8913|       |             * apply the kdf function.
 8914|       |             */
 8915|    851|            if (mechParams->kdf == CKD_NULL) {
  ------------------
  |  | 1702|    851|#define CKD_NULL 0x00000001UL
  ------------------
  |  Branch (8915:17): [True: 851, False: 0]
  ------------------
 8916|       |                /*
 8917|       |                 * tmp is the raw data created by ECDH_Derive,
 8918|       |                 * secret and secretlen are the values we will
 8919|       |                 * eventually pass as our generated key.
 8920|       |                 */
 8921|    851|                secret = tmp.data;
 8922|    851|                secretlen = tmp.len;
 8923|    851|            } else {
 8924|      0|                secretlen = keySize;
 8925|      0|                crv = sftk_ANSI_X9_63_kdf(&secret, keySize,
 8926|      0|                                          &tmp, mechParams->pSharedData,
 8927|      0|                                          mechParams->ulSharedDataLen, mechParams->kdf);
 8928|      0|                PORT_ZFree(tmp.data, tmp.len);
  ------------------
  |  |   75|      0|#define PORT_ZFree PORT_ZFree_Util
  ------------------
 8929|      0|                if (crv != CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (8929:21): [True: 0, False: 0]
  ------------------
 8930|      0|                    break;
 8931|      0|                }
 8932|      0|                tmp.data = secret;
 8933|      0|                tmp.len = secretlen;
 8934|      0|            }
 8935|       |
 8936|       |            /*
 8937|       |             * if keySize is supplied, then we are generating a key of a specific
 8938|       |             * length. This is done by taking the least significant 'keySize'
 8939|       |             * bytes from the unsigned value calculated by ECDH. Note: this may
 8940|       |             * mean padding temp with extra leading zeros from what ECDH_Derive
 8941|       |             * already returned (which itself may contain leading zeros).
 8942|       |             */
 8943|    851|            if (keySize) {
  ------------------
  |  Branch (8943:17): [True: 851, False: 0]
  ------------------
 8944|    851|                if (secretlen < keySize) {
  ------------------
  |  Branch (8944:21): [True: 0, False: 851]
  ------------------
 8945|      0|                    keyData = PORT_ZAlloc(keySize);
  ------------------
  |  |   72|      0|#define PORT_ZAlloc PORT_ZAlloc_Util
  ------------------
 8946|      0|                    if (!keyData) {
  ------------------
  |  Branch (8946:25): [True: 0, False: 0]
  ------------------
 8947|      0|                        PORT_ZFree(tmp.data, tmp.len);
  ------------------
  |  |   75|      0|#define PORT_ZFree PORT_ZFree_Util
  ------------------
 8948|      0|                        crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 8949|      0|                        break;
 8950|      0|                    }
 8951|      0|                    PORT_Memcpy(&keyData[keySize - secretlen], secret, secretlen);
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
 8952|      0|                    secret = keyData;
 8953|    851|                } else {
 8954|    851|                    secret += (secretlen - keySize);
 8955|    851|                }
 8956|    851|                secretlen = keySize;
 8957|    851|            }
 8958|       |
 8959|    851|            sftk_forceAttribute(key, CKA_VALUE, secret, secretlen);
  ------------------
  |  |  516|    851|#define CKA_VALUE 0x00000011UL
  ------------------
 8960|    851|            PORT_ZFree(tmp.data, tmp.len);
  ------------------
  |  |   75|    851|#define PORT_ZFree PORT_ZFree_Util
  ------------------
 8961|    851|            if (keyData) {
  ------------------
  |  Branch (8961:17): [True: 0, False: 851]
  ------------------
 8962|      0|                PORT_ZFree(keyData, keySize);
  ------------------
  |  |   75|      0|#define PORT_ZFree PORT_ZFree_Util
  ------------------
 8963|      0|            }
 8964|    851|            break;
 8965|       |
 8966|      2|        ec_loser:
 8967|      2|            crv = CKR_ARGUMENTS_BAD;
  ------------------
  |  | 1401|      2|#define CKR_ARGUMENTS_BAD 0x00000007UL
  ------------------
 8968|      2|            SECITEM_ZfreeItem(&ecScalar, PR_FALSE);
  ------------------
  |  |  110|      2|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                          SECITEM_ZfreeItem(&ecScalar, PR_FALSE);
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
 8969|      2|            if (privKey != sourceKey->objectInfo)
  ------------------
  |  Branch (8969:17): [True: 0, False: 2]
  ------------------
 8970|      0|                nsslowkey_DestroyPrivateKey(privKey);
 8971|      2|            if (arena) {
  ------------------
  |  Branch (8971:17): [True: 2, False: 0]
  ------------------
 8972|      2|                PORT_FreeArena(arena, PR_TRUE);
  ------------------
  |  |   61|      2|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                              PORT_FreeArena(arena, PR_TRUE);
  ------------------
  |  |  437|      2|#define PR_TRUE 1
  ------------------
 8973|      2|            }
 8974|      2|            break;
 8975|    851|        }
 8976|       |        /* See RFC 5869 and CK_NSS_HKDFParams for documentation. */
 8977|      0|        case CKM_NSS_HKDF_SHA1:
  ------------------
  |  |  168|      0|#define CKM_NSS_HKDF_SHA1 (CKM_NSS + 3)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (8977:9): [True: 0, False: 32.5k]
  ------------------
 8978|      0|            hashMech = CKM_SHA_1;
  ------------------
  |  |  859|      0|#define CKM_SHA_1 0x00000220UL
  ------------------
 8979|      0|            goto hkdf;
 8980|      0|        case CKM_NSS_HKDF_SHA256:
  ------------------
  |  |  169|      0|#define CKM_NSS_HKDF_SHA256 (CKM_NSS + 4)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (8980:9): [True: 0, False: 32.5k]
  ------------------
 8981|      0|            hashMech = CKM_SHA256;
  ------------------
  |  |  876|      0|#define CKM_SHA256 0x00000250UL
  ------------------
 8982|      0|            goto hkdf;
 8983|      0|        case CKM_NSS_HKDF_SHA384:
  ------------------
  |  |  170|      0|#define CKM_NSS_HKDF_SHA384 (CKM_NSS + 5)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (8983:9): [True: 0, False: 32.5k]
  ------------------
 8984|      0|            hashMech = CKM_SHA384;
  ------------------
  |  |  879|      0|#define CKM_SHA384 0x00000260UL
  ------------------
 8985|      0|            goto hkdf;
 8986|      0|        case CKM_NSS_HKDF_SHA512:
  ------------------
  |  |  171|      0|#define CKM_NSS_HKDF_SHA512 (CKM_NSS + 6)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (8986:9): [True: 0, False: 32.5k]
  ------------------
 8987|      0|            hashMech = CKM_SHA512;
  ------------------
  |  |  882|      0|#define CKM_SHA512 0x00000270UL
  ------------------
 8988|      0|            goto hkdf;
 8989|      0|        hkdf : {
 8990|      0|            const CK_NSS_HKDFParams *params =
 8991|      0|                (const CK_NSS_HKDFParams *)pMechanism->pParameter;
 8992|      0|            CK_HKDF_PARAMS hkdfParams;
 8993|       |
 8994|      0|            if (pMechanism->ulParameterLen != sizeof(CK_NSS_HKDFParams)) {
  ------------------
  |  Branch (8994:17): [True: 0, False: 0]
  ------------------
 8995|      0|                crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 8996|      0|                break;
 8997|      0|            }
 8998|      0|            hkdfParams.bExtract = params->bExtract;
 8999|      0|            hkdfParams.bExpand = params->bExpand;
 9000|      0|            if (params->pSalt) {
  ------------------
  |  Branch (9000:17): [True: 0, False: 0]
  ------------------
 9001|      0|                hkdfParams.ulSaltType = CKF_HKDF_SALT_DATA;
  ------------------
  |  | 2253|      0|#define CKF_HKDF_SALT_DATA 0x00000002UL
  ------------------
 9002|      0|            } else {
 9003|      0|                hkdfParams.ulSaltType = CKF_HKDF_SALT_NULL;
  ------------------
  |  | 2252|      0|#define CKF_HKDF_SALT_NULL 0x00000001UL
  ------------------
 9004|      0|            }
 9005|      0|            hkdfParams.pSalt = params->pSalt;
 9006|      0|            hkdfParams.ulSaltLen = params->ulSaltLen;
 9007|      0|            hkdfParams.hSaltKey = CK_INVALID_HANDLE;
  ------------------
  |  |   78|      0|#define CK_INVALID_HANDLE 0
  ------------------
 9008|      0|            hkdfParams.pInfo = params->pInfo;
 9009|      0|            hkdfParams.ulInfoLen = params->ulInfoLen;
 9010|      0|            hkdfParams.prfHashMechanism = hashMech;
 9011|       |
 9012|      0|            crv = sftk_HKDF(&hkdfParams, hSession, sourceKey,
 9013|      0|                            att->attrib.pValue, att->attrib.ulValueLen,
 9014|      0|                            key, NULL, keySize, PR_FALSE, isFIPS);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 9015|      0|        } break;
 9016|  25.7k|        case CKM_HKDF_DERIVE:
  ------------------
  |  | 1296|  25.7k|#define CKM_HKDF_DERIVE 0x0000402aUL
  ------------------
  |  Branch (9016:9): [True: 25.7k, False: 6.80k]
  ------------------
 9017|  27.3k|        case CKM_HKDF_DATA: /* only difference is the class of key */
  ------------------
  |  | 1297|  27.3k|#define CKM_HKDF_DATA 0x0000402bUL
  ------------------
  |  Branch (9017:9): [True: 1.60k, False: 30.9k]
  ------------------
 9018|  27.3k|            if ((pMechanism->pParameter == NULL) ||
  ------------------
  |  Branch (9018:17): [True: 0, False: 27.3k]
  ------------------
 9019|  27.3k|                (pMechanism->ulParameterLen != sizeof(CK_HKDF_PARAMS))) {
  ------------------
  |  Branch (9019:17): [True: 0, False: 27.3k]
  ------------------
 9020|      0|                crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 9021|      0|                break;
 9022|      0|            }
 9023|  27.3k|            crv = sftk_HKDF((CK_HKDF_PARAMS_PTR)pMechanism->pParameter,
 9024|  27.3k|                            hSession, sourceKey, att->attrib.pValue,
 9025|  27.3k|                            att->attrib.ulValueLen, key, NULL, keySize, PR_TRUE,
  ------------------
  |  |  437|  27.3k|#define PR_TRUE 1
  ------------------
 9026|  27.3k|                            isFIPS);
 9027|  27.3k|            break;
 9028|      0|        case CKM_NSS_JPAKE_ROUND2_SHA1:
  ------------------
  |  |  195|      0|#define CKM_NSS_JPAKE_ROUND2_SHA1 (CKM_NSS + 11)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (9028:9): [True: 0, False: 32.5k]
  ------------------
 9029|      0|            hashType = HASH_AlgSHA1;
 9030|      0|            goto jpake2;
 9031|      0|        case CKM_NSS_JPAKE_ROUND2_SHA256:
  ------------------
  |  |  196|      0|#define CKM_NSS_JPAKE_ROUND2_SHA256 (CKM_NSS + 12)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (9031:9): [True: 0, False: 32.5k]
  ------------------
 9032|      0|            hashType = HASH_AlgSHA256;
 9033|      0|            goto jpake2;
 9034|      0|        case CKM_NSS_JPAKE_ROUND2_SHA384:
  ------------------
  |  |  197|      0|#define CKM_NSS_JPAKE_ROUND2_SHA384 (CKM_NSS + 13)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (9034:9): [True: 0, False: 32.5k]
  ------------------
 9035|      0|            hashType = HASH_AlgSHA384;
 9036|      0|            goto jpake2;
 9037|      0|        case CKM_NSS_JPAKE_ROUND2_SHA512:
  ------------------
  |  |  198|      0|#define CKM_NSS_JPAKE_ROUND2_SHA512 (CKM_NSS + 14)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (9037:9): [True: 0, False: 32.5k]
  ------------------
 9038|      0|            hashType = HASH_AlgSHA512;
 9039|      0|            goto jpake2;
 9040|      0|        jpake2:
 9041|      0|            if (pMechanism->pParameter == NULL ||
  ------------------
  |  Branch (9041:17): [True: 0, False: 0]
  ------------------
 9042|      0|                pMechanism->ulParameterLen != sizeof(CK_NSS_JPAKERound2Params))
  ------------------
  |  Branch (9042:17): [True: 0, False: 0]
  ------------------
 9043|      0|                crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 9044|      0|            if (crv == CKR_OK && sftk_isTrue(key, CKA_TOKEN))
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
                          if (crv == CKR_OK && sftk_isTrue(key, CKA_TOKEN))
  ------------------
  |  |  512|      0|#define CKA_TOKEN 0x00000001UL
  ------------------
  |  Branch (9044:17): [True: 0, False: 0]
  |  Branch (9044:34): [True: 0, False: 0]
  ------------------
 9045|      0|                crv = CKR_TEMPLATE_INCONSISTENT;
  ------------------
  |  | 1478|      0|#define CKR_TEMPLATE_INCONSISTENT 0x000000D1UL
  ------------------
 9046|      0|            if (crv == CKR_OK)
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (9046:17): [True: 0, False: 0]
  ------------------
 9047|      0|                crv = sftk_DeriveSensitiveCheck(sourceKey, key, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 9048|      0|            if (crv == CKR_OK)
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (9048:17): [True: 0, False: 0]
  ------------------
 9049|      0|                crv = jpake_Round2(hashType,
 9050|      0|                                   (CK_NSS_JPAKERound2Params *)pMechanism->pParameter,
 9051|      0|                                   sourceKey, key);
 9052|      0|            break;
 9053|       |
 9054|      0|        case CKM_NSS_JPAKE_FINAL_SHA1:
  ------------------
  |  |  210|      0|#define CKM_NSS_JPAKE_FINAL_SHA1 (CKM_NSS + 15)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (9054:9): [True: 0, False: 32.5k]
  ------------------
 9055|      0|            hashType = HASH_AlgSHA1;
 9056|      0|            goto jpakeFinal;
 9057|      0|        case CKM_NSS_JPAKE_FINAL_SHA256:
  ------------------
  |  |  211|      0|#define CKM_NSS_JPAKE_FINAL_SHA256 (CKM_NSS + 16)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (9057:9): [True: 0, False: 32.5k]
  ------------------
 9058|      0|            hashType = HASH_AlgSHA256;
 9059|      0|            goto jpakeFinal;
 9060|      0|        case CKM_NSS_JPAKE_FINAL_SHA384:
  ------------------
  |  |  212|      0|#define CKM_NSS_JPAKE_FINAL_SHA384 (CKM_NSS + 17)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (9060:9): [True: 0, False: 32.5k]
  ------------------
 9061|      0|            hashType = HASH_AlgSHA384;
 9062|      0|            goto jpakeFinal;
 9063|      0|        case CKM_NSS_JPAKE_FINAL_SHA512:
  ------------------
  |  |  213|      0|#define CKM_NSS_JPAKE_FINAL_SHA512 (CKM_NSS + 18)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (9063:9): [True: 0, False: 32.5k]
  ------------------
 9064|      0|            hashType = HASH_AlgSHA512;
 9065|      0|            goto jpakeFinal;
 9066|      0|        jpakeFinal:
 9067|      0|            if (pMechanism->pParameter == NULL ||
  ------------------
  |  Branch (9067:17): [True: 0, False: 0]
  ------------------
 9068|      0|                pMechanism->ulParameterLen != sizeof(CK_NSS_JPAKEFinalParams))
  ------------------
  |  Branch (9068:17): [True: 0, False: 0]
  ------------------
 9069|      0|                crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 9070|       |            /* We purposely do not do the derive sensitivity check; we want to be
 9071|       |               able to derive non-sensitive keys while allowing the ROUND1 and
 9072|       |               ROUND2 keys to be sensitive (which they always are, since they are
 9073|       |               in the CKO_PRIVATE_KEY class). The caller must include CKA_SENSITIVE
 9074|       |               in the template in order for the resultant keyblock key to be
 9075|       |               sensitive.
 9076|       |             */
 9077|      0|            if (crv == CKR_OK)
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (9077:17): [True: 0, False: 0]
  ------------------
 9078|      0|                crv = jpake_Final(hashType,
 9079|      0|                                  (CK_NSS_JPAKEFinalParams *)pMechanism->pParameter,
 9080|      0|                                  sourceKey, key);
 9081|      0|            break;
 9082|       |
 9083|      0|        case CKM_NSS_SP800_108_COUNTER_KDF_DERIVE_DATA:         /* fall through */
  ------------------
  |  |  262|      0|#define CKM_NSS_SP800_108_COUNTER_KDF_DERIVE_DATA (CKM_NSS + 42)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (9083:9): [True: 0, False: 32.5k]
  ------------------
 9084|      0|        case CKM_NSS_SP800_108_FEEDBACK_KDF_DERIVE_DATA:        /* fall through */
  ------------------
  |  |  263|      0|#define CKM_NSS_SP800_108_FEEDBACK_KDF_DERIVE_DATA (CKM_NSS + 43)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (9084:9): [True: 0, False: 32.5k]
  ------------------
 9085|      0|        case CKM_NSS_SP800_108_DOUBLE_PIPELINE_KDF_DERIVE_DATA: /* fall through */
  ------------------
  |  |  264|      0|#define CKM_NSS_SP800_108_DOUBLE_PIPELINE_KDF_DERIVE_DATA (CKM_NSS + 44)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (9085:9): [True: 0, False: 32.5k]
  ------------------
 9086|      0|        case CKM_SP800_108_COUNTER_KDF:                         /* fall through */
  ------------------
  |  | 1244|      0|#define CKM_SP800_108_COUNTER_KDF 0x000003acUL
  ------------------
  |  Branch (9086:9): [True: 0, False: 32.5k]
  ------------------
 9087|      0|        case CKM_SP800_108_FEEDBACK_KDF:                        /* fall through */
  ------------------
  |  | 1245|      0|#define CKM_SP800_108_FEEDBACK_KDF 0x000003adUL
  ------------------
  |  Branch (9087:9): [True: 0, False: 32.5k]
  ------------------
 9088|      0|        case CKM_SP800_108_DOUBLE_PIPELINE_KDF:
  ------------------
  |  | 1246|      0|#define CKM_SP800_108_DOUBLE_PIPELINE_KDF 0x000003aeUL
  ------------------
  |  Branch (9088:9): [True: 0, False: 32.5k]
  ------------------
 9089|      0|            crv = sftk_DeriveSensitiveCheck(sourceKey, key, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 9090|      0|            if (crv != CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (9090:17): [True: 0, False: 0]
  ------------------
 9091|      0|                break;
 9092|      0|            }
 9093|       |
 9094|      0|            crv = kbkdf_Dispatch(mechanism, hSession, pMechanism, sourceKey, key, keySize);
 9095|      0|            break;
 9096|      0|        default:
  ------------------
  |  Branch (9096:9): [True: 0, False: 32.5k]
  ------------------
 9097|      0|            crv = CKR_MECHANISM_INVALID;
  ------------------
  |  | 1447|      0|#define CKR_MECHANISM_INVALID 0x00000070UL
  ------------------
 9098|  32.5k|    }
 9099|  32.5k|    if (att) {
  ------------------
  |  Branch (9099:9): [True: 32.5k, False: 0]
  ------------------
 9100|  32.5k|        sftk_FreeAttribute(att);
 9101|  32.5k|    }
 9102|  32.5k|    sftk_FreeObject(sourceKey);
 9103|  32.5k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  32.5k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (9103:9): [True: 152, False: 32.3k]
  ------------------
 9104|    152|        if (key)
  ------------------
  |  Branch (9104:13): [True: 152, False: 0]
  ------------------
 9105|    152|            sftk_FreeObject(key);
 9106|    152|        return crv;
 9107|    152|    }
 9108|       |
 9109|       |    /* link the key object into the list */
 9110|  32.3k|    if (key) {
  ------------------
  |  Branch (9110:9): [True: 30.7k, False: 1.62k]
  ------------------
 9111|  30.7k|        SFTKSessionObject *sessKey = sftk_narrowToSessionObject(key);
 9112|  30.7k|        PORT_Assert(sessKey);
  ------------------
  |  |  120|  30.7k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  30.7k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 30.7k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 9113|       |        /* get the session */
 9114|  30.7k|        sessKey->wasDerived = PR_TRUE;
  ------------------
  |  |  437|  30.7k|#define PR_TRUE 1
  ------------------
 9115|  30.7k|        session = sftk_SessionFromHandle(hSession);
 9116|  30.7k|        if (session == NULL) {
  ------------------
  |  Branch (9116:13): [True: 0, False: 30.7k]
  ------------------
 9117|      0|            sftk_FreeObject(key);
 9118|      0|            return CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 9119|      0|        }
 9120|       |
 9121|  30.7k|        crv = sftk_handleObject(key, session);
 9122|  30.7k|        session->lastOpWasFIPS = key->isFIPS;
 9123|  30.7k|        sftk_FreeSession(session);
 9124|  30.7k|        if (phKey) {
  ------------------
  |  Branch (9124:13): [True: 30.7k, False: 0]
  ------------------
 9125|  30.7k|            *phKey = key->handle;
 9126|  30.7k|        }
 9127|  30.7k|        sftk_FreeObject(key);
 9128|  30.7k|    }
 9129|  32.3k|    return crv;
 9130|  32.3k|}
NSC_GetOperationState:
 9159|  5.87k|{
 9160|  5.87k|    SFTKSessionContext *context;
 9161|  5.87k|    SFTKSession *session;
 9162|  5.87k|    CK_RV crv;
 9163|  5.87k|    CK_ULONG pOSLen = *pulOperationStateLen;
 9164|       |
 9165|  5.87k|    CHECK_FORK();
 9166|       |
 9167|       |    /* make sure we're legal */
 9168|  5.87k|    crv = sftk_GetContext(hSession, &context, SFTK_HASH, PR_TRUE, &session);
  ------------------
  |  |  437|  5.87k|#define PR_TRUE 1
  ------------------
 9169|  5.87k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  5.87k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (9169:9): [True: 0, False: 5.87k]
  ------------------
 9170|      0|        return crv;
 9171|       |
 9172|       |    /* a zero cipherInfoLen signals that this context cannot be serialized */
 9173|  5.87k|    if (context->cipherInfoLen == 0) {
  ------------------
  |  Branch (9173:9): [True: 0, False: 5.87k]
  ------------------
 9174|      0|        return CKR_STATE_UNSAVEABLE;
  ------------------
  |  | 1517|      0|#define CKR_STATE_UNSAVEABLE 0x00000180UL
  ------------------
 9175|      0|    }
 9176|       |
 9177|  5.87k|    *pulOperationStateLen = context->cipherInfoLen + sizeof(CK_MECHANISM_TYPE) + sizeof(SFTKContextType);
 9178|  5.87k|    if (pOperationState == NULL) {
  ------------------
  |  Branch (9178:9): [True: 2.86k, False: 3.00k]
  ------------------
 9179|  2.86k|        sftk_FreeSession(session);
 9180|  2.86k|        return CKR_OK;
  ------------------
  |  | 1388|  2.86k|#define CKR_OK 0x00000000UL
  ------------------
 9181|  3.00k|    } else {
 9182|  3.00k|        if (pOSLen < *pulOperationStateLen) {
  ------------------
  |  Branch (9182:13): [True: 0, False: 3.00k]
  ------------------
 9183|      0|            return CKR_BUFFER_TOO_SMALL;
  ------------------
  |  | 1514|      0|#define CKR_BUFFER_TOO_SMALL 0x00000150UL
  ------------------
 9184|      0|        }
 9185|  3.00k|    }
 9186|  3.00k|    PORT_Memcpy(pOperationState, &context->type, sizeof(SFTKContextType));
  ------------------
  |  |  180|  3.00k|#define PORT_Memcpy memcpy
  ------------------
 9187|  3.00k|    pOperationState += sizeof(SFTKContextType);
 9188|  3.00k|    PORT_Memcpy(pOperationState, &context->currentMech,
  ------------------
  |  |  180|  3.00k|#define PORT_Memcpy memcpy
  ------------------
 9189|  3.00k|                sizeof(CK_MECHANISM_TYPE));
 9190|  3.00k|    pOperationState += sizeof(CK_MECHANISM_TYPE);
 9191|  3.00k|    PORT_Memcpy(pOperationState, context->cipherInfo, context->cipherInfoLen);
  ------------------
  |  |  180|  3.00k|#define PORT_Memcpy memcpy
  ------------------
 9192|  3.00k|    sftk_FreeSession(session);
 9193|  3.00k|    return CKR_OK;
  ------------------
  |  | 1388|  3.00k|#define CKR_OK 0x00000000UL
  ------------------
 9194|  5.87k|}
NSC_SetOperationState:
 9206|  3.00k|{
 9207|  3.00k|    SFTKSessionContext *context;
 9208|  3.00k|    SFTKSession *session;
 9209|  3.00k|    SFTKContextType type;
 9210|  3.00k|    CK_MECHANISM mech;
 9211|  3.00k|    CK_RV crv = CKR_OK;
  ------------------
  |  | 1388|  3.00k|#define CKR_OK 0x00000000UL
  ------------------
 9212|       |
 9213|  3.00k|    CHECK_FORK();
 9214|       |
 9215|  6.00k|    while (ulOperationStateLen != 0) {
  ------------------
  |  Branch (9215:12): [True: 3.00k, False: 3.00k]
  ------------------
 9216|       |        /* get what type of state we're dealing with... */
 9217|  3.00k|        PORT_Memcpy(&type, pOperationState, sizeof(SFTKContextType));
  ------------------
  |  |  180|  3.00k|#define PORT_Memcpy memcpy
  ------------------
 9218|       |
 9219|       |        /* fix up session contexts based on type */
 9220|  3.00k|        session = sftk_SessionFromHandle(hSession);
 9221|  3.00k|        if (session == NULL)
  ------------------
  |  Branch (9221:13): [True: 0, False: 3.00k]
  ------------------
 9222|      0|            return CKR_SESSION_HANDLE_INVALID;
  ------------------
  |  | 1465|      0|#define CKR_SESSION_HANDLE_INVALID 0x000000B3UL
  ------------------
 9223|  3.00k|        context = sftk_ReturnContextByType(session, type);
 9224|  3.00k|        sftk_SetContextByType(session, type, NULL);
 9225|  3.00k|        if (context) {
  ------------------
  |  Branch (9225:13): [True: 2.86k, False: 134]
  ------------------
 9226|  2.86k|            sftk_FreeContext(context);
 9227|  2.86k|        }
 9228|  3.00k|        pOperationState += sizeof(SFTKContextType);
 9229|  3.00k|        sftk_Decrement(ulOperationStateLen, sizeof(SFTKContextType));
  ------------------
  |  | 9197|  3.00k|    stateSize = ((stateSize) > (CK_ULONG)(len)) ? ((stateSize) - (CK_ULONG)(len)) : 0;
  |  |  ------------------
  |  |  |  Branch (9197:17): [True: 3.00k, False: 0]
  |  |  ------------------
  ------------------
 9230|       |
 9231|       |        /* get the mechanism structure */
 9232|  3.00k|        PORT_Memcpy(&mech.mechanism, pOperationState, sizeof(CK_MECHANISM_TYPE));
  ------------------
  |  |  180|  3.00k|#define PORT_Memcpy memcpy
  ------------------
 9233|  3.00k|        pOperationState += sizeof(CK_MECHANISM_TYPE);
 9234|  3.00k|        sftk_Decrement(ulOperationStateLen, sizeof(CK_MECHANISM_TYPE));
  ------------------
  |  | 9197|  3.00k|    stateSize = ((stateSize) > (CK_ULONG)(len)) ? ((stateSize) - (CK_ULONG)(len)) : 0;
  |  |  ------------------
  |  |  |  Branch (9197:17): [True: 3.00k, False: 0]
  |  |  ------------------
  ------------------
 9235|       |        /* should be filled in... but not necessary for hash */
 9236|  3.00k|        mech.pParameter = NULL;
 9237|  3.00k|        mech.ulParameterLen = 0;
 9238|  3.00k|        switch (type) {
 9239|  3.00k|            case SFTK_HASH:
  ------------------
  |  Branch (9239:13): [True: 3.00k, False: 0]
  ------------------
 9240|  3.00k|                crv = NSC_DigestInit(hSession, &mech);
 9241|  3.00k|                if (crv != CKR_OK)
  ------------------
  |  | 1388|  3.00k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (9241:21): [True: 0, False: 3.00k]
  ------------------
 9242|      0|                    break;
 9243|  3.00k|                crv = sftk_GetContext(hSession, &context, SFTK_HASH, PR_TRUE,
  ------------------
  |  |  437|  3.00k|#define PR_TRUE 1
  ------------------
 9244|  3.00k|                                      NULL);
 9245|  3.00k|                if (crv != CKR_OK)
  ------------------
  |  | 1388|  3.00k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (9245:21): [True: 0, False: 3.00k]
  ------------------
 9246|      0|                    break;
 9247|  3.00k|                if (context->cipherInfoLen == 0) {
  ------------------
  |  Branch (9247:21): [True: 0, False: 3.00k]
  ------------------
 9248|      0|                    crv = CKR_SAVED_STATE_INVALID;
  ------------------
  |  | 1515|      0|#define CKR_SAVED_STATE_INVALID 0x00000160UL
  ------------------
 9249|      0|                    break;
 9250|      0|                }
 9251|  3.00k|                PORT_Memcpy(context->cipherInfo, pOperationState,
  ------------------
  |  |  180|  3.00k|#define PORT_Memcpy memcpy
  ------------------
 9252|  3.00k|                            context->cipherInfoLen);
 9253|  3.00k|                pOperationState += context->cipherInfoLen;
 9254|  3.00k|                sftk_Decrement(ulOperationStateLen, context->cipherInfoLen);
  ------------------
  |  | 9197|  3.00k|    stateSize = ((stateSize) > (CK_ULONG)(len)) ? ((stateSize) - (CK_ULONG)(len)) : 0;
  |  |  ------------------
  |  |  |  Branch (9197:17): [True: 0, False: 3.00k]
  |  |  ------------------
  ------------------
 9255|  3.00k|                break;
 9256|      0|            default:
  ------------------
  |  Branch (9256:13): [True: 0, False: 3.00k]
  ------------------
 9257|       |                /* do sign/encrypt/decrypt later */
 9258|      0|                crv = CKR_SAVED_STATE_INVALID;
  ------------------
  |  | 1515|      0|#define CKR_SAVED_STATE_INVALID 0x00000160UL
  ------------------
 9259|  3.00k|        }
 9260|  3.00k|        sftk_FreeSession(session);
 9261|  3.00k|        if (crv != CKR_OK)
  ------------------
  |  | 1388|  3.00k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (9261:13): [True: 0, False: 3.00k]
  ------------------
 9262|      0|            break;
 9263|  3.00k|    }
 9264|  3.00k|    return crv;
 9265|  3.00k|}
pkcs11c.c:sftk_RSAEncrypt:
  616|  1.26k|{
  617|  1.26k|    NSSLOWKEYPublicKey *key = ctx;
  618|  1.26k|    SECStatus rv = SECFailure;
  619|       |
  620|  1.26k|    PORT_Assert(key->keyType == NSSLOWKEYRSAKey);
  ------------------
  |  |  120|  1.26k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.26k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.26k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  621|  1.26k|    if (key->keyType != NSSLOWKEYRSAKey) {
  ------------------
  |  Branch (621:9): [True: 0, False: 1.26k]
  ------------------
  622|      0|        PORT_SetError(SEC_ERROR_INVALID_KEY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  623|      0|        return SECFailure;
  624|      0|    }
  625|       |
  626|  1.26k|    rv = RSA_EncryptBlock(&key->u.rsa, output, outputLen, maxLen, input,
  627|  1.26k|                          inputLen);
  628|  1.26k|    if (rv != SECSuccess && PORT_GetError() == SEC_ERROR_LIBRARY_FAILURE) {
  ------------------
  |  |   62|      0|#define PORT_GetError PORT_GetError_Util
  ------------------
  |  Branch (628:9): [True: 0, False: 1.26k]
  |  Branch (628:29): [True: 0, False: 0]
  ------------------
  629|      0|        sftk_fatalError = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  630|      0|    }
  631|       |
  632|  1.26k|    return rv;
  633|  1.26k|}
pkcs11c.c:sftk_Null:
   80|  2.58k|{
   81|  2.58k|    return;
   82|  2.58k|}
pkcs11c.c:SFTKCipher_DES_Encrypt:
  151|  1.11k|    {                                                                        \
  152|  1.11k|        ctxtype *ctx = vctx;                                                 \
  153|  1.11k|        return mmm(ctx, output, outputLen, maxOutputLen,                     \
  154|  1.11k|                   input, inputLen);                                         \
  155|  1.11k|    }
pkcs11c.c:SFTKCipher_DES_Decrypt:
  151|  12.6k|    {                                                                        \
  152|  12.6k|        ctxtype *ctx = vctx;                                                 \
  153|  12.6k|        return mmm(ctx, output, outputLen, maxOutputLen,                     \
  154|  12.6k|                   input, inputLen);                                         \
  155|  12.6k|    }
pkcs11c.c:SFTKCipher_DES_DestroyContext:
  164|  1.09k|    {                                                                        \
  165|  1.09k|        ctxtype *ctx = vctx;                                                 \
  166|  1.09k|        mmm##_DestroyContext(ctx, freeit);                                   \
  167|  1.09k|    }
pkcs11c.c:SFTKCipher_SEED_Encrypt:
  151|    206|    {                                                                        \
  152|    206|        ctxtype *ctx = vctx;                                                 \
  153|    206|        return mmm(ctx, output, outputLen, maxOutputLen,                     \
  154|    206|                   input, inputLen);                                         \
  155|    206|    }
pkcs11c.c:SFTKCipher_SEED_Decrypt:
  151|    921|    {                                                                        \
  152|    921|        ctxtype *ctx = vctx;                                                 \
  153|    921|        return mmm(ctx, output, outputLen, maxOutputLen,                     \
  154|    921|                   input, inputLen);                                         \
  155|    921|    }
pkcs11c.c:SFTKCipher_SEED_DestroyContext:
  164|    202|    {                                                                        \
  165|    202|        ctxtype *ctx = vctx;                                                 \
  166|    202|        mmm##_DestroyContext(ctx, freeit);                                   \
  167|    202|    }
pkcs11c.c:SFTKCipher_Camellia_Encrypt:
  151|    194|    {                                                                        \
  152|    194|        ctxtype *ctx = vctx;                                                 \
  153|    194|        return mmm(ctx, output, outputLen, maxOutputLen,                     \
  154|    194|                   input, inputLen);                                         \
  155|    194|    }
pkcs11c.c:SFTKCipher_Camellia_Decrypt:
  151|  1.62k|    {                                                                        \
  152|  1.62k|        ctxtype *ctx = vctx;                                                 \
  153|  1.62k|        return mmm(ctx, output, outputLen, maxOutputLen,                     \
  154|  1.62k|                   input, inputLen);                                         \
  155|  1.62k|    }
pkcs11c.c:SFTKCipher_Camellia_DestroyContext:
  164|    190|    {                                                                        \
  165|    190|        ctxtype *ctx = vctx;                                                 \
  166|    190|        mmm##_DestroyContext(ctx, freeit);                                   \
  167|    190|    }
pkcs11c.c:sftk_aes_mode:
  549|  6.71k|{
  550|  6.71k|    switch (mechanism) {
  ------------------
  |  Branch (550:13): [True: 0, False: 6.71k]
  ------------------
  551|      0|        case CKM_AES_CBC_PAD:
  ------------------
  |  | 1111|      0|#define CKM_AES_CBC_PAD 0x00001085UL
  ------------------
  |  Branch (551:9): [True: 0, False: 6.71k]
  ------------------
  552|    418|        case CKM_AES_CBC:
  ------------------
  |  | 1108|    418|#define CKM_AES_CBC 0x00001082UL
  ------------------
  |  Branch (552:9): [True: 418, False: 6.29k]
  ------------------
  553|    418|            return NSS_AES_CBC;
  ------------------
  |  |   36|    418|#define NSS_AES_CBC 1
  ------------------
  554|  6.29k|        case CKM_AES_ECB:
  ------------------
  |  | 1107|  6.29k|#define CKM_AES_ECB 0x00001081UL
  ------------------
  |  Branch (554:9): [True: 6.29k, False: 418]
  ------------------
  555|  6.29k|            return NSS_AES;
  ------------------
  |  |   35|  6.29k|#define NSS_AES 0
  ------------------
  556|      0|        case CKM_AES_CTS:
  ------------------
  |  | 1117|      0|#define CKM_AES_CTS 0x00001089UL
  ------------------
  |  Branch (556:9): [True: 0, False: 6.71k]
  ------------------
  557|      0|            return NSS_AES_CTS;
  ------------------
  |  |   37|      0|#define NSS_AES_CTS 2
  ------------------
  558|      0|        case CKM_AES_CTR:
  ------------------
  |  | 1113|      0|#define CKM_AES_CTR 0x00001086UL
  ------------------
  |  Branch (558:9): [True: 0, False: 6.71k]
  ------------------
  559|      0|            return NSS_AES_CTR;
  ------------------
  |  |   38|      0|#define NSS_AES_CTR 3
  ------------------
  560|      0|        case CKM_AES_GCM:
  ------------------
  |  | 1115|      0|#define CKM_AES_GCM 0x00001087UL
  ------------------
  |  Branch (560:9): [True: 0, False: 6.71k]
  ------------------
  561|      0|            return NSS_AES_GCM;
  ------------------
  |  |   39|      0|#define NSS_AES_GCM 4
  ------------------
  562|  6.71k|    }
  563|      0|    return -1;
  564|  6.71k|}
pkcs11c.c:SFTKCipher_AES_Encrypt:
  151|  6.73k|    {                                                                        \
  152|  6.73k|        ctxtype *ctx = vctx;                                                 \
  153|  6.73k|        return mmm(ctx, output, outputLen, maxOutputLen,                     \
  154|  6.73k|                   input, inputLen);                                         \
  155|  6.73k|    }
pkcs11c.c:SFTKCipher_AES_Decrypt:
  151|  3.04k|    {                                                                        \
  152|  3.04k|        ctxtype *ctx = vctx;                                                 \
  153|  3.04k|        return mmm(ctx, output, outputLen, maxOutputLen,                     \
  154|  3.04k|                   input, inputLen);                                         \
  155|  3.04k|    }
pkcs11c.c:SFTKCipher_AES_DestroyContext:
  164|  6.71k|    {                                                                        \
  165|  6.71k|        ctxtype *ctx = vctx;                                                 \
  166|  6.71k|        mmm##_DestroyContext(ctx, freeit);                                   \
  167|  6.71k|    }
pkcs11c.c:sftk_ChaCha20Ctr:
  825|  5.31k|{
  826|  5.31k|    if (maxOutputLen < inputLen) {
  ------------------
  |  Branch (826:9): [True: 0, False: 5.31k]
  ------------------
  827|      0|        PORT_SetError(SEC_ERROR_OUTPUT_LEN);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  828|      0|        return SECFailure;
  829|      0|    }
  830|  5.31k|    SFTKChaCha20CtrInfo *ctx = vctx;
  831|  5.31k|    ChaCha20_Xor(output, input, inputLen, ctx->key,
  832|  5.31k|                 ctx->nonce, ctx->counter);
  833|  5.31k|    *outputLen = inputLen;
  834|  5.31k|    return SECSuccess;
  835|  5.31k|}
pkcs11c.c:sftk_ChaCha20Ctr_DestroyContext:
  840|  5.31k|{
  841|  5.31k|    SFTKChaCha20CtrInfo *ctx = vctx;
  842|  5.31k|    memset(ctx, 0, sizeof(SFTKChaCha20CtrInfo));
  843|  5.31k|    if (freeit) {
  ------------------
  |  Branch (843:9): [True: 5.31k, False: 0]
  ------------------
  844|  5.31k|        PORT_Free(ctx);
  ------------------
  |  |   60|  5.31k|#define PORT_Free PORT_Free_Util
  ------------------
  845|  5.31k|    }
  846|  5.31k|}
pkcs11c.c:SFTKHash_MD5_Update:
  101|  2.80k|    {                                                                                     \
  102|  2.80k|        ctxtype *ctx = vctx;                                                              \
  103|  2.80k|        mmm##_Update(ctx, input, len);                                                    \
  104|  2.80k|    }                                                                                     \
pkcs11c.c:SFTKHash_MD5_End:
  108|    105|    {                                                                                     \
  109|    105|        ctxtype *ctx = vctx;                                                              \
  110|    105|        mmm##_End(ctx, digest, len, maxLen);                                              \
  111|    105|    }                                                                                     \
pkcs11c.c:SFTKHash_MD5_DestroyContext:
  114|    335|    {                                                                                     \
  115|    335|        ctxtype *ctx = vctx;                                                              \
  116|    335|        mmm##_DestroyContext(ctx, freeit);                                                \
  117|    335|    }
pkcs11c.c:SFTKHash_SHA1_Update:
  101|  17.6k|    {                                                                                     \
  102|  17.6k|        ctxtype *ctx = vctx;                                                              \
  103|  17.6k|        mmm##_Update(ctx, input, len);                                                    \
  104|  17.6k|    }                                                                                     \
pkcs11c.c:SFTKHash_SHA1_End:
  108|  14.9k|    {                                                                                     \
  109|  14.9k|        ctxtype *ctx = vctx;                                                              \
  110|  14.9k|        mmm##_End(ctx, digest, len, maxLen);                                              \
  111|  14.9k|    }                                                                                     \
pkcs11c.c:SFTKHash_SHA1_DestroyContext:
  114|  15.1k|    {                                                                                     \
  115|  15.1k|        ctxtype *ctx = vctx;                                                              \
  116|  15.1k|        mmm##_DestroyContext(ctx, freeit);                                                \
  117|  15.1k|    }
pkcs11c.c:SFTKHash_SHA256_Update:
  101|  11.8k|    {                                                                                     \
  102|  11.8k|        ctxtype *ctx = vctx;                                                              \
  103|  11.8k|        mmm##_Update(ctx, input, len);                                                    \
  104|  11.8k|    }                                                                                     \
pkcs11c.c:SFTKHash_SHA256_End:
  108|  12.2k|    {                                                                                     \
  109|  12.2k|        ctxtype *ctx = vctx;                                                              \
  110|  12.2k|        mmm##_End(ctx, digest, len, maxLen);                                              \
  111|  12.2k|    }                                                                                     \
pkcs11c.c:SFTKHash_SHA256_DestroyContext:
  114|  16.3k|    {                                                                                     \
  115|  16.3k|        ctxtype *ctx = vctx;                                                              \
  116|  16.3k|        mmm##_DestroyContext(ctx, freeit);                                                \
  117|  16.3k|    }
pkcs11c.c:SFTKHash_SHA384_Update:
  101|  6.68k|    {                                                                                     \
  102|  6.68k|        ctxtype *ctx = vctx;                                                              \
  103|  6.68k|        mmm##_Update(ctx, input, len);                                                    \
  104|  6.68k|    }                                                                                     \
pkcs11c.c:SFTKHash_SHA384_End:
  108|  6.61k|    {                                                                                     \
  109|  6.61k|        ctxtype *ctx = vctx;                                                              \
  110|  6.61k|        mmm##_End(ctx, digest, len, maxLen);                                              \
  111|  6.61k|    }                                                                                     \
pkcs11c.c:SFTKHash_SHA384_DestroyContext:
  114|  6.97k|    {                                                                                     \
  115|  6.97k|        ctxtype *ctx = vctx;                                                              \
  116|  6.97k|        mmm##_DestroyContext(ctx, freeit);                                                \
  117|  6.97k|    }
pkcs11c.c:SFTKHash_SHA512_Update:
  101|    589|    {                                                                                     \
  102|    589|        ctxtype *ctx = vctx;                                                              \
  103|    589|        mmm##_Update(ctx, input, len);                                                    \
  104|    589|    }                                                                                     \
pkcs11c.c:SFTKHash_SHA512_End:
  108|    589|    {                                                                                     \
  109|    589|        ctxtype *ctx = vctx;                                                              \
  110|    589|        mmm##_End(ctx, digest, len, maxLen);                                              \
  111|    589|    }                                                                                     \
pkcs11c.c:SFTKHash_SHA512_DestroyContext:
  114|    589|    {                                                                                     \
  115|    589|        ctxtype *ctx = vctx;                                                              \
  116|    589|        mmm##_DestroyContext(ctx, freeit);                                                \
  117|    589|    }
pkcs11c.c:sftk_InitCBCMac:
 2402|  57.4k|{
 2403|  57.4k|    CK_MECHANISM cbc_mechanism;
 2404|  57.4k|    CK_ULONG mac_bytes = SFTK_INVALID_MAC_SIZE;
  ------------------
  |  |  256|  57.4k|#define SFTK_INVALID_MAC_SIZE 0xffffffff
  ------------------
 2405|  57.4k|#ifndef NSS_DISABLE_DEPRECATED_RC2
 2406|  57.4k|    CK_RC2_CBC_PARAMS rc2_params;
 2407|  57.4k|#endif
 2408|       |#if NSS_SOFTOKEN_DOES_RC5
 2409|       |    CK_RC5_CBC_PARAMS rc5_params;
 2410|       |    CK_RC5_MAC_GENERAL_PARAMS *rc5_mac;
 2411|       |#endif
 2412|  57.4k|    unsigned char ivBlock[SFTK_MAX_BLOCK_SIZE];
 2413|  57.4k|    unsigned char k2[SFTK_MAX_BLOCK_SIZE];
 2414|  57.4k|    unsigned char k3[SFTK_MAX_BLOCK_SIZE];
 2415|  57.4k|    SFTKSessionContext *context;
 2416|  57.4k|    CK_RV crv;
 2417|  57.4k|    unsigned int blockSize;
 2418|  57.4k|    PRBool isXCBC = PR_FALSE;
  ------------------
  |  |  438|  57.4k|#define PR_FALSE 0
  ------------------
 2419|       |
 2420|  57.4k|    if (!pMechanism) {
  ------------------
  |  Branch (2420:9): [True: 0, False: 57.4k]
  ------------------
 2421|      0|        return CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 2422|      0|    }
 2423|       |
 2424|  57.4k|    switch (pMechanism->mechanism) {
 2425|      0|#ifndef NSS_DISABLE_DEPRECATED_RC2
 2426|      0|        case CKM_RC2_MAC_GENERAL:
  ------------------
  |  |  809|      0|#define CKM_RC2_MAC_GENERAL 0x00000104UL
  ------------------
  |  Branch (2426:9): [True: 0, False: 57.4k]
  ------------------
 2427|      0|            if (BAD_PARAM_CAST(pMechanism, sizeof(CK_RC2_MAC_GENERAL_PARAMS))) {
  ------------------
  |  |   50|      0|#define BAD_PARAM_CAST(pMech, typeSize) (!pMech->pParameter || pMech->ulParameterLen < typeSize)
  |  |  ------------------
  |  |  |  Branch (50:42): [True: 0, False: 0]
  |  |  |  Branch (50:64): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2428|      0|                return CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 2429|      0|            }
 2430|      0|            mac_bytes =
 2431|      0|                ((CK_RC2_MAC_GENERAL_PARAMS *)pMechanism->pParameter)->ulMacLength;
 2432|       |        /* fall through */
 2433|      0|        case CKM_RC2_MAC:
  ------------------
  |  |  806|      0|#define CKM_RC2_MAC 0x00000103UL
  ------------------
  |  Branch (2433:9): [True: 0, False: 57.4k]
  ------------------
 2434|       |            /* this works because ulEffectiveBits is in the same place in both the
 2435|       |             * CK_RC2_MAC_GENERAL_PARAMS and CK_RC2_CBC_PARAMS */
 2436|      0|            rc2_params.ulEffectiveBits = ((CK_RC2_MAC_GENERAL_PARAMS *)
 2437|      0|                                              pMechanism->pParameter)
 2438|      0|                                             ->ulEffectiveBits;
 2439|      0|            PORT_Memset(rc2_params.iv, 0, sizeof(rc2_params.iv));
  ------------------
  |  |  182|      0|#define PORT_Memset memset
  ------------------
 2440|      0|            cbc_mechanism.mechanism = CKM_RC2_CBC;
  ------------------
  |  |  805|      0|#define CKM_RC2_CBC 0x00000102UL
  ------------------
 2441|      0|            cbc_mechanism.pParameter = &rc2_params;
 2442|      0|            cbc_mechanism.ulParameterLen = sizeof(rc2_params);
 2443|      0|            blockSize = 8;
 2444|      0|            break;
 2445|      0|#endif /* NSS_DISABLE_DEPRECATED_RC2 */
 2446|       |
 2447|       |#if NSS_SOFTOKEN_DOES_RC5
 2448|       |        case CKM_RC5_MAC_GENERAL:
 2449|       |            if (BAD_PARAM_CAST(pMechanism, sizeof(CK_RC5_MAC_GENERAL_PARAMS))) {
 2450|       |                return CKR_MECHANISM_PARAM_INVALID;
 2451|       |            }
 2452|       |            mac_bytes =
 2453|       |                ((CK_RC5_MAC_GENERAL_PARAMS *)pMechanism->pParameter)->ulMacLength;
 2454|       |        /* fall through */
 2455|       |        case CKM_RC5_MAC:
 2456|       |            /* this works because ulEffectiveBits is in the same place in both the
 2457|       |             * CK_RC5_MAC_GENERAL_PARAMS and CK_RC5_CBC_PARAMS */
 2458|       |            if (BAD_PARAM_CAST(pMechanism, sizeof(CK_RC5_MAC_GENERAL_PARAMS))) {
 2459|       |                return CKR_MECHANISM_PARAM_INVALID;
 2460|       |            }
 2461|       |            rc5_mac = (CK_RC5_MAC_GENERAL_PARAMS *)pMechanism->pParameter;
 2462|       |            rc5_params.ulWordsize = rc5_mac->ulWordsize;
 2463|       |            rc5_params.ulRounds = rc5_mac->ulRounds;
 2464|       |            rc5_params.pIv = ivBlock;
 2465|       |            if ((blockSize = rc5_mac->ulWordsize * 2) > SFTK_MAX_BLOCK_SIZE)
 2466|       |                return CKR_MECHANISM_PARAM_INVALID;
 2467|       |            rc5_params.ulIvLen = blockSize;
 2468|       |            PORT_Memset(ivBlock, 0, blockSize);
 2469|       |            cbc_mechanism.mechanism = CKM_RC5_CBC;
 2470|       |            cbc_mechanism.pParameter = &rc5_params;
 2471|       |            cbc_mechanism.ulParameterLen = sizeof(rc5_params);
 2472|       |            break;
 2473|       |#endif
 2474|       |        /* add cast and idea later */
 2475|      0|        case CKM_DES_MAC_GENERAL:
  ------------------
  |  |  820|      0|#define CKM_DES_MAC_GENERAL 0x00000124UL
  ------------------
  |  Branch (2475:9): [True: 0, False: 57.4k]
  ------------------
 2476|      0|            mac_bytes = *(CK_ULONG *)pMechanism->pParameter;
 2477|       |        /* fall through */
 2478|      0|        case CKM_DES_MAC:
  ------------------
  |  |  817|      0|#define CKM_DES_MAC 0x00000123UL
  ------------------
  |  Branch (2478:9): [True: 0, False: 57.4k]
  ------------------
 2479|      0|            blockSize = 8;
 2480|      0|            PORT_Memset(ivBlock, 0, blockSize);
  ------------------
  |  |  182|      0|#define PORT_Memset memset
  ------------------
 2481|      0|            cbc_mechanism.mechanism = CKM_DES_CBC;
  ------------------
  |  |  816|      0|#define CKM_DES_CBC 0x00000122UL
  ------------------
 2482|      0|            cbc_mechanism.pParameter = &ivBlock;
 2483|      0|            cbc_mechanism.ulParameterLen = blockSize;
 2484|      0|            break;
 2485|      0|        case CKM_DES3_MAC_GENERAL:
  ------------------
  |  |  832|      0|#define CKM_DES3_MAC_GENERAL 0x00000135UL
  ------------------
  |  Branch (2485:9): [True: 0, False: 57.4k]
  ------------------
 2486|      0|            mac_bytes = *(CK_ULONG *)pMechanism->pParameter;
 2487|       |        /* fall through */
 2488|      0|        case CKM_DES3_MAC:
  ------------------
  |  |  827|      0|#define CKM_DES3_MAC 0x00000134UL
  ------------------
  |  Branch (2488:9): [True: 0, False: 57.4k]
  ------------------
 2489|      0|            blockSize = 8;
 2490|      0|            PORT_Memset(ivBlock, 0, blockSize);
  ------------------
  |  |  182|      0|#define PORT_Memset memset
  ------------------
 2491|      0|            cbc_mechanism.mechanism = CKM_DES3_CBC;
  ------------------
  |  |  826|      0|#define CKM_DES3_CBC 0x00000133UL
  ------------------
 2492|      0|            cbc_mechanism.pParameter = &ivBlock;
 2493|      0|            cbc_mechanism.ulParameterLen = blockSize;
 2494|      0|            break;
 2495|      0|        case CKM_CDMF_MAC_GENERAL:
  ------------------
  |  |  838|      0|#define CKM_CDMF_MAC_GENERAL 0x00000144UL
  ------------------
  |  Branch (2495:9): [True: 0, False: 57.4k]
  ------------------
 2496|      0|            mac_bytes = *(CK_ULONG *)pMechanism->pParameter;
 2497|       |        /* fall through */
 2498|      0|        case CKM_CDMF_MAC:
  ------------------
  |  |  837|      0|#define CKM_CDMF_MAC 0x00000143UL
  ------------------
  |  Branch (2498:9): [True: 0, False: 57.4k]
  ------------------
 2499|      0|            blockSize = 8;
 2500|      0|            PORT_Memset(ivBlock, 0, blockSize);
  ------------------
  |  |  182|      0|#define PORT_Memset memset
  ------------------
 2501|      0|            cbc_mechanism.mechanism = CKM_CDMF_CBC;
  ------------------
  |  |  836|      0|#define CKM_CDMF_CBC 0x00000142UL
  ------------------
 2502|      0|            cbc_mechanism.pParameter = &ivBlock;
 2503|      0|            cbc_mechanism.ulParameterLen = blockSize;
 2504|      0|            break;
 2505|      0|#ifndef NSS_DISABLE_DEPRECATED_SEED
 2506|      0|        case CKM_SEED_MAC_GENERAL:
  ------------------
  |  | 1159|      0|#define CKM_SEED_MAC_GENERAL 0x00000654UL
  ------------------
  |  Branch (2506:9): [True: 0, False: 57.4k]
  ------------------
 2507|      0|            mac_bytes = *(CK_ULONG *)pMechanism->pParameter;
 2508|       |        /* fall through */
 2509|      0|        case CKM_SEED_MAC:
  ------------------
  |  | 1158|      0|#define CKM_SEED_MAC 0x00000653UL
  ------------------
  |  Branch (2509:9): [True: 0, False: 57.4k]
  ------------------
 2510|      0|            blockSize = 16;
 2511|      0|            PORT_Memset(ivBlock, 0, blockSize);
  ------------------
  |  |  182|      0|#define PORT_Memset memset
  ------------------
 2512|      0|            cbc_mechanism.mechanism = CKM_SEED_CBC;
  ------------------
  |  | 1157|      0|#define CKM_SEED_CBC 0x00000652UL
  ------------------
 2513|      0|            cbc_mechanism.pParameter = &ivBlock;
 2514|      0|            cbc_mechanism.ulParameterLen = blockSize;
 2515|      0|            break;
 2516|      0|#endif /* NSS_DISABLE_DEPRECATED_SEED */
 2517|      0|        case CKM_CAMELLIA_MAC_GENERAL:
  ------------------
  |  | 1139|      0|#define CKM_CAMELLIA_MAC_GENERAL 0x00000554UL
  ------------------
  |  Branch (2517:9): [True: 0, False: 57.4k]
  ------------------
 2518|      0|            mac_bytes = *(CK_ULONG *)pMechanism->pParameter;
 2519|       |        /* fall through */
 2520|      0|        case CKM_CAMELLIA_MAC:
  ------------------
  |  | 1138|      0|#define CKM_CAMELLIA_MAC 0x00000553UL
  ------------------
  |  Branch (2520:9): [True: 0, False: 57.4k]
  ------------------
 2521|      0|            blockSize = 16;
 2522|      0|            PORT_Memset(ivBlock, 0, blockSize);
  ------------------
  |  |  182|      0|#define PORT_Memset memset
  ------------------
 2523|      0|            cbc_mechanism.mechanism = CKM_CAMELLIA_CBC;
  ------------------
  |  | 1137|      0|#define CKM_CAMELLIA_CBC 0x00000552UL
  ------------------
 2524|      0|            cbc_mechanism.pParameter = &ivBlock;
 2525|      0|            cbc_mechanism.ulParameterLen = blockSize;
 2526|      0|            break;
 2527|      0|        case CKM_AES_MAC_GENERAL:
  ------------------
  |  | 1110|      0|#define CKM_AES_MAC_GENERAL 0x00001084UL
  ------------------
  |  Branch (2527:9): [True: 0, False: 57.4k]
  ------------------
 2528|      0|            mac_bytes = *(CK_ULONG *)pMechanism->pParameter;
 2529|       |        /* fall through */
 2530|      0|        case CKM_AES_MAC:
  ------------------
  |  | 1109|      0|#define CKM_AES_MAC 0x00001083UL
  ------------------
  |  Branch (2530:9): [True: 0, False: 57.4k]
  ------------------
 2531|      0|            blockSize = 16;
 2532|      0|            PORT_Memset(ivBlock, 0, blockSize);
  ------------------
  |  |  182|      0|#define PORT_Memset memset
  ------------------
 2533|      0|            cbc_mechanism.mechanism = CKM_AES_CBC;
  ------------------
  |  | 1108|      0|#define CKM_AES_CBC 0x00001082UL
  ------------------
 2534|      0|            cbc_mechanism.pParameter = &ivBlock;
 2535|      0|            cbc_mechanism.ulParameterLen = blockSize;
 2536|      0|            break;
 2537|      0|        case CKM_AES_XCBC_MAC_96:
  ------------------
  |  | 1122|      0|#define CKM_AES_XCBC_MAC_96 0x0000108DUL
  ------------------
  |  Branch (2537:9): [True: 0, False: 57.4k]
  ------------------
 2538|      0|        case CKM_AES_XCBC_MAC:
  ------------------
  |  | 1121|      0|#define CKM_AES_XCBC_MAC 0x0000108CUL
  ------------------
  |  Branch (2538:9): [True: 0, False: 57.4k]
  ------------------
 2539|       |            /* The only difference between CKM_AES_XCBC_MAC
 2540|       |             * and CKM_AES_XCBC_MAC_96 is the size of the returned mac. */
 2541|      0|            mac_bytes = pMechanism->mechanism == CKM_AES_XCBC_MAC_96 ? 12 : 16;
  ------------------
  |  | 1122|      0|#define CKM_AES_XCBC_MAC_96 0x0000108DUL
  ------------------
  |  Branch (2541:25): [True: 0, False: 0]
  ------------------
 2542|      0|            blockSize = 16;
 2543|      0|            PORT_Memset(ivBlock, 0, blockSize);
  ------------------
  |  |  182|      0|#define PORT_Memset memset
  ------------------
 2544|      0|            cbc_mechanism.mechanism = CKM_AES_CBC;
  ------------------
  |  | 1108|      0|#define CKM_AES_CBC 0x00001082UL
  ------------------
 2545|      0|            cbc_mechanism.pParameter = &ivBlock;
 2546|      0|            cbc_mechanism.ulParameterLen = blockSize;
 2547|       |            /* is XCBC requires extra processing at the end of the operation */
 2548|      0|            isXCBC = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 2549|       |            /* The input key is used to generate k1, k2, and k3. k2 and k3
 2550|       |             * are used at the end in the pad step. k1 replaces the input
 2551|       |             * key in the aes cbc mac */
 2552|      0|            crv = sftk_aes_xcbc_new_keys(hSession, hKey, &hKey, k2, k3);
 2553|      0|            if (crv != CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (2553:17): [True: 0, False: 0]
  ------------------
 2554|      0|                return crv;
 2555|      0|            }
 2556|      0|            break;
 2557|  57.4k|        default:
  ------------------
  |  Branch (2557:9): [True: 57.4k, False: 0]
  ------------------
 2558|  57.4k|            return CKR_FUNCTION_NOT_SUPPORTED;
  ------------------
  |  | 1426|  57.4k|#define CKR_FUNCTION_NOT_SUPPORTED 0x00000054UL
  ------------------
 2559|  57.4k|    }
 2560|       |
 2561|       |    /* if MAC size is externally supplied, it should be checked.
 2562|       |     */
 2563|      0|    if (mac_bytes == SFTK_INVALID_MAC_SIZE)
  ------------------
  |  |  256|      0|#define SFTK_INVALID_MAC_SIZE 0xffffffff
  ------------------
  |  Branch (2563:9): [True: 0, False: 0]
  ------------------
 2564|      0|        mac_bytes = blockSize >> 1;
 2565|      0|    else {
 2566|      0|        if (mac_bytes > blockSize) {
  ------------------
  |  Branch (2566:13): [True: 0, False: 0]
  ------------------
 2567|      0|            crv = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
 2568|      0|            goto fail;
 2569|      0|        }
 2570|      0|    }
 2571|       |
 2572|      0|    crv = sftk_CryptInit(hSession, &cbc_mechanism, hKey,
 2573|      0|                         CKA_ENCRYPT, /* CBC mech is able to ENCRYPT, not SIGN/VERIFY */
  ------------------
  |  |  547|      0|#define CKA_ENCRYPT 0x00000104UL
  ------------------
 2574|      0|                         keyUsage, contextType, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 2575|      0|    if (crv != CKR_OK)
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (2575:9): [True: 0, False: 0]
  ------------------
 2576|      0|        goto fail;
 2577|      0|    crv = sftk_GetContext(hSession, &context, contextType, PR_TRUE, NULL);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 2578|       |
 2579|       |    /* this shouldn't happen! */
 2580|      0|    PORT_Assert(crv == CKR_OK);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2581|      0|    if (crv != CKR_OK)
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (2581:9): [True: 0, False: 0]
  ------------------
 2582|      0|        goto fail;
 2583|      0|    context->blockSize = blockSize;
 2584|      0|    context->macSize = mac_bytes;
 2585|      0|    context->isXCBC = isXCBC;
 2586|      0|    if (isXCBC) {
  ------------------
  |  Branch (2586:9): [True: 0, False: 0]
  ------------------
 2587|       |        /* save the xcbc specific parameters */
 2588|      0|        PORT_Memcpy(context->k2, k2, blockSize);
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
 2589|      0|        PORT_Memcpy(context->k3, k3, blockSize);
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
 2590|      0|        PORT_Memset(k2, 0, blockSize);
  ------------------
  |  |  182|      0|#define PORT_Memset memset
  ------------------
 2591|      0|        PORT_Memset(k3, 0, blockSize);
  ------------------
  |  |  182|      0|#define PORT_Memset memset
  ------------------
 2592|       |        /* get rid of the temp key now that the context has been created */
 2593|      0|        NSC_DestroyObject(hSession, hKey);
 2594|      0|    }
 2595|      0|    return CKR_OK;
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
 2596|      0|fail:
 2597|      0|    if (isXCBC) {
  ------------------
  |  Branch (2597:9): [True: 0, False: 0]
  ------------------
 2598|      0|        PORT_Memset(k2, 0, blockSize);
  ------------------
  |  |  182|      0|#define PORT_Memset memset
  ------------------
 2599|      0|        PORT_Memset(k3, 0, blockSize);
  ------------------
  |  |  182|      0|#define PORT_Memset memset
  ------------------
 2600|      0|        NSC_DestroyObject(hSession, hKey); /* get rid of our temp key */
 2601|      0|    }
 2602|      0|    return crv;
 2603|      0|}
pkcs11c.c:sftk_Space:
  194|  53.3k|{
  195|  53.3k|    PORT_Free(data);
  ------------------
  |  |   60|  53.3k|#define PORT_Free PORT_Free_Util
  ------------------
  196|  53.3k|}
pkcs11c.c:sftk_ValidatePssParams:
  336|  1.11k|{
  337|  1.11k|    if (!params) {
  ------------------
  |  Branch (337:9): [True: 0, False: 1.11k]
  ------------------
  338|      0|        return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  339|      0|    }
  340|  1.11k|    if (sftk_GetHashTypeFromMechanism(params->hashAlg) == HASH_AlgNULL ||
  ------------------
  |  Branch (340:9): [True: 0, False: 1.11k]
  ------------------
  341|  1.11k|        sftk_GetHashTypeFromMechanism(params->mgf) == HASH_AlgNULL) {
  ------------------
  |  Branch (341:9): [True: 0, False: 1.11k]
  ------------------
  342|      0|        return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  343|      0|    }
  344|  1.11k|    return PR_TRUE;
  ------------------
  |  |  437|  1.11k|#define PR_TRUE 1
  ------------------
  345|  1.11k|}
pkcs11c.c:sftk_ZSpace:
  200|  1.11k|{
  201|  1.11k|    size_t len = *(size_t *)data;
  202|  1.11k|    PORT_ZFree(data, len);
  ------------------
  |  |   75|  1.11k|#define PORT_ZFree PORT_ZFree_Util
  ------------------
  203|  1.11k|}
pkcs11c.c:sftk_doMACInit:
 2212|  44.3k|{
 2213|  44.3k|    CK_RV crv;
 2214|  44.3k|    sftk_MACCtx *context;
 2215|  44.3k|    CK_ULONG *intpointer;
 2216|  44.3k|    PRBool isFIPS = sftk_isFIPS(key->slot->slotID);
  ------------------
  |  |  506|  44.3k|    (((id) == FIPS_SLOT_ID) || ((id) >= SFTK_MIN_FIPS_USER_SLOT_ID))
  |  |  ------------------
  |  |  |  |  500|  44.3k|#define FIPS_SLOT_ID 3
  |  |  ------------------
  |  |                   (((id) == FIPS_SLOT_ID) || ((id) >= SFTK_MIN_FIPS_USER_SLOT_ID))
  |  |  ------------------
  |  |  |  |  567|  44.3k|#define SFTK_MIN_FIPS_USER_SLOT_ID 101
  |  |  ------------------
  |  |  |  Branch (506:6): [True: 0, False: 44.3k]
  |  |  |  Branch (506:32): [True: 0, False: 44.3k]
  |  |  ------------------
  ------------------
 2217|       |
 2218|       |    /* Set up the initial context. */
 2219|  44.3k|    crv = sftk_MAC_Create(mech, key, &context);
 2220|  44.3k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  44.3k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (2220:9): [True: 0, False: 44.3k]
  ------------------
 2221|      0|        return crv;
 2222|      0|    }
 2223|       |
 2224|  44.3k|    session->hashInfo = context;
 2225|  44.3k|    session->multi = PR_TRUE;
  ------------------
  |  |  437|  44.3k|#define PR_TRUE 1
  ------------------
 2226|       |
 2227|       |    /* Required by FIPS 198 Section 4. Delay this check until after the MAC
 2228|       |     * has been initialized to steal the output size of the MAC. */
 2229|  44.3k|    if (isFIPS && (mac_size < 4 || mac_size < context->mac_size / 2)) {
  ------------------
  |  Branch (2229:9): [True: 0, False: 44.3k]
  |  Branch (2229:20): [True: 0, False: 0]
  |  Branch (2229:36): [True: 0, False: 0]
  ------------------
 2230|      0|        sftk_MAC_DestroyContext(context, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 2231|      0|        return CKR_BUFFER_TOO_SMALL;
  ------------------
  |  | 1514|      0|#define CKR_BUFFER_TOO_SMALL 0x00000150UL
  ------------------
 2232|      0|    }
 2233|       |
 2234|       |    /* Configure our helper functions appropriately. Note that these casts
 2235|       |     * ignore the return values. */
 2236|  44.3k|    session->hashUpdate = SFTKHash_sftk_MAC_Update;
 2237|  44.3k|    session->end = SFTKHash_sftk_MAC_End;
 2238|  44.3k|    session->hashdestroy = SFTKHash_sftk_MAC_DestroyContext;
 2239|       |
 2240|  44.3k|    intpointer = PORT_New(CK_ULONG);
  ------------------
  |  |  151|  44.3k|#define PORT_New(type) (type *)PORT_Alloc(sizeof(type))
  |  |  ------------------
  |  |  |  |   52|  44.3k|#define PORT_Alloc PORT_Alloc_Util
  |  |  ------------------
  ------------------
 2241|  44.3k|    if (intpointer == NULL) {
  ------------------
  |  Branch (2241:9): [True: 0, False: 44.3k]
  ------------------
 2242|      0|        sftk_MAC_DestroyContext(context, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 2243|      0|        return CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 2244|      0|    }
 2245|  44.3k|    *intpointer = mac_size;
 2246|  44.3k|    session->cipherInfo = intpointer;
 2247|       |
 2248|       |    /* Since we're only "hashing", copy the result from session->end to the
 2249|       |     * caller using sftk_SignCopy. */
 2250|  44.3k|    session->update = sftk_SignCopy;
 2251|  44.3k|    session->verify = sftk_HMACCmp;
 2252|  44.3k|    session->destroy = sftk_Space;
 2253|       |
 2254|  44.3k|    session->maxLen = context->mac_size;
 2255|       |
 2256|  44.3k|    return CKR_OK;
  ------------------
  |  | 1388|  44.3k|#define CKR_OK 0x00000000UL
  ------------------
 2257|  44.3k|}
pkcs11c.c:SFTKHash_sftk_MAC_Update:
  101|  74.1k|    {                                                                                     \
  102|  74.1k|        ctxtype *ctx = vctx;                                                              \
  103|  74.1k|        mmm##_Update(ctx, input, len);                                                    \
  104|  74.1k|    }                                                                                     \
pkcs11c.c:SFTKHash_sftk_MAC_End:
  108|  43.0k|    {                                                                                     \
  109|  43.0k|        ctxtype *ctx = vctx;                                                              \
  110|  43.0k|        mmm##_End(ctx, digest, len, maxLen);                                              \
  111|  43.0k|    }                                                                                     \
pkcs11c.c:SFTKHash_sftk_MAC_DestroyContext:
  114|  44.3k|    {                                                                                     \
  115|  44.3k|        ctxtype *ctx = vctx;                                                              \
  116|  44.3k|        mmm##_DestroyContext(ctx, freeit);                                                \
  117|  44.3k|    }
pkcs11c.c:sftk_SignCopy:
 2178|  52.0k|{
 2179|  52.0k|    unsigned int toCopy = *(CK_ULONG *)copyLen;
 2180|  52.0k|    if (toCopy > maxLength) {
  ------------------
  |  Branch (2180:9): [True: 0, False: 52.0k]
  ------------------
 2181|      0|        toCopy = maxLength;
 2182|      0|    }
 2183|  52.0k|    if (toCopy > hashResultLength) {
  ------------------
  |  Branch (2183:9): [True: 0, False: 52.0k]
  ------------------
 2184|      0|        toCopy = hashResultLength;
 2185|      0|    }
 2186|  52.0k|    memcpy(out, hashResult, toCopy);
 2187|  52.0k|    if (outLength) {
  ------------------
  |  Branch (2187:9): [True: 52.0k, False: 0]
  ------------------
 2188|  52.0k|        *outLength = toCopy;
 2189|  52.0k|    }
 2190|  52.0k|    return SECSuccess;
 2191|  52.0k|}
pkcs11c.c:sftk_MACUpdate:
 3322|  84.7k|{
 3323|  84.7k|    SFTKSession *session;
 3324|  84.7k|    SFTKSessionContext *context;
 3325|  84.7k|    CK_RV crv;
 3326|       |
 3327|       |    /* make sure we're legal */
 3328|  84.7k|    crv = sftk_GetContext(hSession, &context, type, PR_TRUE, &session);
  ------------------
  |  |  437|  84.7k|#define PR_TRUE 1
  ------------------
 3329|  84.7k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  84.7k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (3329:9): [True: 0, False: 84.7k]
  ------------------
 3330|      0|        return crv;
 3331|       |
 3332|  84.7k|    if (context->hashInfo) {
  ------------------
  |  Branch (3332:9): [True: 84.7k, False: 0]
  ------------------
 3333|  84.7k|#if (ULONG_MAX > UINT_MAX)
 3334|  84.7k|        while (ulPartLen > UINT_MAX) {
  ------------------
  |  Branch (3334:16): [True: 0, False: 84.7k]
  ------------------
 3335|      0|            (*context->hashUpdate)(context->cipherInfo, pPart, UINT_MAX);
 3336|      0|            pPart += UINT_MAX;
 3337|      0|            ulPartLen -= UINT_MAX;
 3338|      0|        }
 3339|  84.7k|#endif
 3340|  84.7k|        (*context->hashUpdate)(context->hashInfo, pPart, ulPartLen);
 3341|  84.7k|    } else {
 3342|       |        /* must be block cipher MACing */
 3343|       |
 3344|      0|        unsigned int blkSize = context->blockSize;
 3345|      0|        unsigned char *residual = /* free room in context->padBuf */
 3346|      0|            context->padBuf + context->padDataLength;
 3347|      0|        unsigned int minInput = /* min input for MACing at least one block */
 3348|      0|            blkSize - context->padDataLength;
 3349|       |
 3350|       |        /* not enough data even for one block */
 3351|      0|        if (ulPartLen <= minInput) {
  ------------------
  |  Branch (3351:13): [True: 0, False: 0]
  ------------------
 3352|      0|            PORT_Memcpy(residual, pPart, ulPartLen);
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
 3353|      0|            context->padDataLength += ulPartLen;
 3354|      0|            goto cleanup;
 3355|      0|        }
 3356|       |        /* MACing residual */
 3357|      0|        if (context->padDataLength) {
  ------------------
  |  Branch (3357:13): [True: 0, False: 0]
  ------------------
 3358|      0|            PORT_Memcpy(residual, pPart, minInput);
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
 3359|      0|            ulPartLen -= minInput;
 3360|      0|            pPart += minInput;
 3361|      0|            if (CKR_OK != (crv = sftk_MACBlock(context, context->padBuf)))
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (3361:17): [True: 0, False: 0]
  ------------------
 3362|      0|                goto terminate;
 3363|      0|        }
 3364|       |        /* MACing full blocks */
 3365|      0|        while (ulPartLen > blkSize) {
  ------------------
  |  Branch (3365:16): [True: 0, False: 0]
  ------------------
 3366|      0|            if (CKR_OK != (crv = sftk_MACBlock(context, pPart)))
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (3366:17): [True: 0, False: 0]
  ------------------
 3367|      0|                goto terminate;
 3368|      0|            ulPartLen -= blkSize;
 3369|      0|            pPart += blkSize;
 3370|      0|        }
 3371|       |        /* save the residual */
 3372|      0|        if ((context->padDataLength = ulPartLen))
  ------------------
  |  Branch (3372:13): [True: 0, False: 0]
  ------------------
 3373|      0|            PORT_Memcpy(context->padBuf, pPart, ulPartLen);
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
 3374|      0|    } /* blk cipher MACing */
 3375|       |
 3376|  84.7k|    goto cleanup;
 3377|       |
 3378|  84.7k|terminate:
 3379|      0|    sftk_TerminateOp(session, type, context);
 3380|  84.7k|cleanup:
 3381|  84.7k|    sftk_FreeSession(session);
 3382|  84.7k|    return crv;
 3383|      0|}
pkcs11c.c:sftk_RSACheckSign:
 3660|     26|{
 3661|     26|    NSSLOWKEYPublicKey *key = ctx;
 3662|     26|    PORT_Assert(key->keyType == NSSLOWKEYRSAKey);
  ------------------
  |  |  120|     26|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|     26|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 26, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3663|     26|    if (key->keyType != NSSLOWKEYRSAKey) {
  ------------------
  |  Branch (3663:9): [True: 0, False: 26]
  ------------------
 3664|      0|        PORT_SetError(SEC_ERROR_INVALID_KEY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 3665|      0|        return SECFailure;
 3666|      0|    }
 3667|       |
 3668|     26|    return RSA_CheckSign(&key->u.rsa, sig, sigLen, digest, digestLen);
 3669|     26|}
pkcs11c.c:sftk_RSACheckSignPSS:
 3690|  1.11k|{
 3691|  1.11k|    SFTKPSSVerifyInfo *info = ctx;
 3692|  1.11k|    HASH_HashType hashAlg;
 3693|  1.11k|    HASH_HashType maskHashAlg;
 3694|  1.11k|    CK_RSA_PKCS_PSS_PARAMS *params = &info->params;
 3695|       |
 3696|  1.11k|    PORT_Assert(info->key->keyType == NSSLOWKEYRSAKey);
  ------------------
  |  |  120|  1.11k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.11k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.11k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3697|  1.11k|    if (info->key->keyType != NSSLOWKEYRSAKey) {
  ------------------
  |  Branch (3697:9): [True: 0, False: 1.11k]
  ------------------
 3698|      0|        PORT_SetError(SEC_ERROR_INVALID_KEY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 3699|      0|        return SECFailure;
 3700|      0|    }
 3701|       |
 3702|  1.11k|    hashAlg = sftk_GetHashTypeFromMechanism(params->hashAlg);
 3703|  1.11k|    maskHashAlg = sftk_GetHashTypeFromMechanism(params->mgf);
 3704|       |
 3705|  1.11k|    return RSA_CheckSignPSS(&info->key->u.rsa, hashAlg, maskHashAlg,
 3706|  1.11k|                            params->sLen, sig, sigLen, digest, digestLen);
 3707|  1.11k|}
pkcs11c.c:nsc_DSA_Verify_Stub:
 2775|  1.13k|{
 2776|  1.13k|    NSSLOWKEYPublicKey *key = ctx;
 2777|  1.13k|    SECItem signature = { siBuffer, (unsigned char *)sigBuf, sigLen };
 2778|  1.13k|    SECItem digest = { siBuffer, (unsigned char *)dataBuf, dataLen };
 2779|  1.13k|    return DSA_VerifyDigest(&(key->u.dsa), &signature, &digest);
 2780|  1.13k|}
pkcs11c.c:nsc_ECDSAVerifyStub:
 2801|    139|{
 2802|    139|    NSSLOWKEYPublicKey *key = ctx;
 2803|    139|    SECItem signature = { siBuffer, (unsigned char *)sigBuf, sigLen };
 2804|    139|    SECItem digest = { siBuffer, (unsigned char *)dataBuf, dataLen };
 2805|    139|    return ECDSA_VerifyDigest(&(key->u.ec), &signature, &digest);
 2806|    139|}
pkcs11c.c:sftk_RSACheckSignRecover:
 4044|     16|{
 4045|     16|    NSSLOWKEYPublicKey *key = ctx;
 4046|     16|    PORT_Assert(key->keyType == NSSLOWKEYRSAKey);
  ------------------
  |  |  120|     16|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|     16|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 16, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4047|     16|    if (key->keyType != NSSLOWKEYRSAKey) {
  ------------------
  |  Branch (4047:9): [True: 0, False: 16]
  ------------------
 4048|      0|        PORT_SetError(SEC_ERROR_INVALID_KEY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 4049|      0|        return SECFailure;
 4050|      0|    }
 4051|       |
 4052|     16|    return RSA_CheckSignRecover(&key->u.rsa, data, dataLen, maxDataLen,
 4053|     16|                                sig, sigLen);
 4054|     16|}
pkcs11c.c:nsc_SetupBulkKeyGen:
 4477|  4.73k|{
 4478|  4.73k|    CK_RV crv = CKR_OK;
  ------------------
  |  | 1388|  4.73k|#define CKR_OK 0x00000000UL
  ------------------
 4479|       |
 4480|  4.73k|    switch (mechanism) {
 4481|      0|#ifndef NSS_DISABLE_DEPRECATED_RC2
 4482|      0|        case CKM_RC2_KEY_GEN:
  ------------------
  |  |  803|      0|#define CKM_RC2_KEY_GEN 0x00000100UL
  ------------------
  |  Branch (4482:9): [True: 0, False: 4.73k]
  ------------------
 4483|      0|            *key_type = CKK_RC2;
  ------------------
  |  |  384|      0|#define CKK_RC2 0x00000011UL
  ------------------
 4484|      0|            if (*key_length == 0)
  ------------------
  |  Branch (4484:17): [True: 0, False: 0]
  ------------------
 4485|      0|                crv = CKR_TEMPLATE_INCOMPLETE;
  ------------------
  |  | 1477|      0|#define CKR_TEMPLATE_INCOMPLETE 0x000000D0UL
  ------------------
 4486|      0|            break;
 4487|      0|#endif /* NSS_DISABLE_DEPRECATED_RC2 */
 4488|       |#if NSS_SOFTOKEN_DOES_RC5
 4489|       |        case CKM_RC5_KEY_GEN:
 4490|       |            *key_type = CKK_RC5;
 4491|       |            if (*key_length == 0)
 4492|       |                crv = CKR_TEMPLATE_INCOMPLETE;
 4493|       |            break;
 4494|       |#endif
 4495|      0|        case CKM_RC4_KEY_GEN:
  ------------------
  |  |  812|      0|#define CKM_RC4_KEY_GEN 0x00000110UL
  ------------------
  |  Branch (4495:9): [True: 0, False: 4.73k]
  ------------------
 4496|      0|            *key_type = CKK_RC4;
  ------------------
  |  |  385|      0|#define CKK_RC4 0x00000012UL
  ------------------
 4497|      0|            if (*key_length == 0)
  ------------------
  |  Branch (4497:17): [True: 0, False: 0]
  ------------------
 4498|      0|                crv = CKR_TEMPLATE_INCOMPLETE;
  ------------------
  |  | 1477|      0|#define CKR_TEMPLATE_INCOMPLETE 0x000000D0UL
  ------------------
 4499|      0|            break;
 4500|      0|        case CKM_GENERIC_SECRET_KEY_GEN:
  ------------------
  |  |  953|      0|#define CKM_GENERIC_SECRET_KEY_GEN 0x00000350UL
  ------------------
  |  Branch (4500:9): [True: 0, False: 4.73k]
  ------------------
 4501|      0|            *key_type = CKK_GENERIC_SECRET;
  ------------------
  |  |  383|      0|#define CKK_GENERIC_SECRET 0x00000010UL
  ------------------
 4502|      0|            if (*key_length == 0)
  ------------------
  |  Branch (4502:17): [True: 0, False: 0]
  ------------------
 4503|      0|                crv = CKR_TEMPLATE_INCOMPLETE;
  ------------------
  |  | 1477|      0|#define CKR_TEMPLATE_INCOMPLETE 0x000000D0UL
  ------------------
 4504|      0|            break;
 4505|      0|        case CKM_CDMF_KEY_GEN:
  ------------------
  |  |  834|      0|#define CKM_CDMF_KEY_GEN 0x00000140UL
  ------------------
  |  Branch (4505:9): [True: 0, False: 4.73k]
  ------------------
 4506|      0|            *key_type = CKK_CDMF;
  ------------------
  |  |  401|      0|#define CKK_CDMF 0x0000001EUL
  ------------------
 4507|      0|            *key_length = 8;
 4508|      0|            break;
 4509|      0|        case CKM_DES_KEY_GEN:
  ------------------
  |  |  814|      0|#define CKM_DES_KEY_GEN 0x00000120UL
  ------------------
  |  Branch (4509:9): [True: 0, False: 4.73k]
  ------------------
 4510|      0|            *key_type = CKK_DES;
  ------------------
  |  |  386|      0|#define CKK_DES 0x00000013UL
  ------------------
 4511|      0|            *key_length = 8;
 4512|      0|            break;
 4513|      0|        case CKM_DES2_KEY_GEN:
  ------------------
  |  |  823|      0|#define CKM_DES2_KEY_GEN 0x00000130UL
  ------------------
  |  Branch (4513:9): [True: 0, False: 4.73k]
  ------------------
 4514|      0|            *key_type = CKK_DES2;
  ------------------
  |  |  387|      0|#define CKK_DES2 0x00000014UL
  ------------------
 4515|      0|            *key_length = 16;
 4516|      0|            break;
 4517|      0|        case CKM_DES3_KEY_GEN:
  ------------------
  |  |  824|      0|#define CKM_DES3_KEY_GEN 0x00000131UL
  ------------------
  |  Branch (4517:9): [True: 0, False: 4.73k]
  ------------------
 4518|      0|            *key_type = CKK_DES3;
  ------------------
  |  |  388|      0|#define CKK_DES3 0x00000015UL
  ------------------
 4519|      0|            *key_length = 24;
 4520|      0|            break;
 4521|      0|#ifndef NSS_DISABLE_DEPRECATED_SEED
 4522|      0|        case CKM_SEED_KEY_GEN:
  ------------------
  |  | 1155|      0|#define CKM_SEED_KEY_GEN 0x00000650UL
  ------------------
  |  Branch (4522:9): [True: 0, False: 4.73k]
  ------------------
 4523|      0|            *key_type = CKK_SEED;
  ------------------
  |  |  416|      0|#define CKK_SEED 0x0000002FUL /* was 2A */
  ------------------
 4524|      0|            *key_length = 16;
 4525|      0|            break;
 4526|      0|#endif /* NSS_DISABLE_DEPRECATED_SEED */
 4527|      0|        case CKM_CAMELLIA_KEY_GEN:
  ------------------
  |  | 1135|      0|#define CKM_CAMELLIA_KEY_GEN 0x00000550UL
  ------------------
  |  Branch (4527:9): [True: 0, False: 4.73k]
  ------------------
 4528|      0|            *key_type = CKK_CAMELLIA;
  ------------------
  |  |  414|      0|#define CKK_CAMELLIA 0x00000025UL
  ------------------
 4529|      0|            if (*key_length == 0)
  ------------------
  |  Branch (4529:17): [True: 0, False: 0]
  ------------------
 4530|      0|                crv = CKR_TEMPLATE_INCOMPLETE;
  ------------------
  |  | 1477|      0|#define CKR_TEMPLATE_INCOMPLETE 0x000000D0UL
  ------------------
 4531|      0|            break;
 4532|      0|        case CKM_AES_KEY_GEN:
  ------------------
  |  | 1106|      0|#define CKM_AES_KEY_GEN 0x00001080UL
  ------------------
  |  Branch (4532:9): [True: 0, False: 4.73k]
  ------------------
 4533|      0|            *key_type = CKK_AES;
  ------------------
  |  |  402|      0|#define CKK_AES 0x0000001FUL
  ------------------
 4534|      0|            if (*key_length == 0)
  ------------------
  |  Branch (4534:17): [True: 0, False: 0]
  ------------------
 4535|      0|                crv = CKR_TEMPLATE_INCOMPLETE;
  ------------------
  |  | 1477|      0|#define CKR_TEMPLATE_INCOMPLETE 0x000000D0UL
  ------------------
 4536|      0|            break;
 4537|  4.73k|        case CKM_NSS_CHACHA20_KEY_GEN:
  ------------------
  |  |  242|  4.73k|#define CKM_NSS_CHACHA20_KEY_GEN (CKM_NSS + 27)
  |  |  ------------------
  |  |  |  |  162|  4.73k|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|  4.73k|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  4.73k|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (4537:9): [True: 4.73k, False: 0]
  ------------------
 4538|  4.73k|            *key_type = CKK_NSS_CHACHA20;
  ------------------
  |  |   56|  4.73k|#define CKK_NSS_CHACHA20 (CKK_NSS + 4)
  |  |  ------------------
  |  |  |  |   49|  4.73k|#define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  458|  4.73k|#define CKK_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  4.73k|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4539|  4.73k|            *key_length = 32;
 4540|  4.73k|            break;
 4541|      0|        case CKM_CHACHA20_KEY_GEN:
  ------------------
  |  | 1203|      0|#define CKM_CHACHA20_KEY_GEN 0x00001225UL
  ------------------
  |  Branch (4541:9): [True: 0, False: 4.73k]
  ------------------
 4542|      0|            *key_type = CKK_CHACHA20;
  ------------------
  |  |  433|      0|#define CKK_CHACHA20 0x00000033UL
  ------------------
 4543|      0|            *key_length = 32;
 4544|      0|            break;
 4545|      0|        case CKM_HKDF_KEY_GEN:
  ------------------
  |  | 1298|      0|#define CKM_HKDF_KEY_GEN 0x0000402cUL
  ------------------
  |  Branch (4545:9): [True: 0, False: 4.73k]
  ------------------
 4546|      0|            *key_type = CKK_HKDF;
  ------------------
  |  |  450|      0|#define CKK_HKDF 0x00000042UL
  ------------------
 4547|      0|            if (*key_length == 0)
  ------------------
  |  Branch (4547:17): [True: 0, False: 0]
  ------------------
 4548|      0|                crv = CKR_TEMPLATE_INCOMPLETE;
  ------------------
  |  | 1477|      0|#define CKR_TEMPLATE_INCOMPLETE 0x000000D0UL
  ------------------
 4549|      0|            break;
 4550|      0|        default:
  ------------------
  |  Branch (4550:9): [True: 0, False: 4.73k]
  ------------------
 4551|      0|            PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4552|      0|            crv = CKR_MECHANISM_INVALID;
  ------------------
  |  | 1447|      0|#define CKR_MECHANISM_INVALID 0x00000070UL
  ------------------
 4553|      0|            break;
 4554|  4.73k|    }
 4555|       |
 4556|  4.73k|    return crv;
 4557|  4.73k|}
pkcs11c.c:sftk_PairwiseConsistencyCheck:
 5056|  1.13k|{
 5057|       |    /*
 5058|       |     *                      Key type    Mechanism type
 5059|       |     *                      --------------------------------
 5060|       |     * For encrypt/decrypt: CKK_RSA  => CKM_RSA_PKCS
 5061|       |     *                      others   => CKM_INVALID_MECHANISM
 5062|       |     *
 5063|       |     * For sign/verify:     CKK_RSA  => CKM_RSA_PKCS
 5064|       |     *                      CKK_DSA  => CKM_DSA
 5065|       |     *                      CKK_EC   => CKM_ECDSA
 5066|       |     *                      others   => CKM_INVALID_MECHANISM
 5067|       |     *
 5068|       |     * None of these mechanisms has a parameter.
 5069|       |     *
 5070|       |     * For derive           CKK_DH   => CKM_DH_PKCS_DERIVE
 5071|       |     *                      CKK_EC   => CKM_ECDH1_DERIVE
 5072|       |     *                      CKK_EC_MONTGOMERY   => CKM_ECDH1_DERIVE
 5073|       |     *                      others   => CKM_INVALID_MECHANISM
 5074|       |     *
 5075|       |     * The parameters for these mechanisms is the public key.
 5076|       |     */
 5077|  1.13k|    CK_MECHANISM mech = { 0, NULL, 0 };
 5078|       |
 5079|  1.13k|    CK_ULONG modulusLen = 0;
 5080|  1.13k|    CK_ULONG subPrimeLen = 0;
 5081|  1.13k|    PRBool isEncryptable = PR_FALSE;
  ------------------
  |  |  438|  1.13k|#define PR_FALSE 0
  ------------------
 5082|  1.13k|    PRBool canSignVerify = PR_FALSE;
  ------------------
  |  |  438|  1.13k|#define PR_FALSE 0
  ------------------
 5083|  1.13k|    PRBool isDerivable = PR_FALSE;
  ------------------
  |  |  438|  1.13k|#define PR_FALSE 0
  ------------------
 5084|  1.13k|    CK_RV crv;
 5085|       |
 5086|       |    /* Variables used for Encrypt/Decrypt functions. */
 5087|  1.13k|    unsigned char *known_message = (unsigned char *)"Known Crypto Message";
 5088|  1.13k|    unsigned char plaintext[PAIRWISE_MESSAGE_LENGTH];
 5089|  1.13k|    CK_ULONG bytes_decrypted;
 5090|  1.13k|    unsigned char *ciphertext;
 5091|  1.13k|    unsigned char *text_compared;
 5092|  1.13k|    CK_ULONG bytes_encrypted;
 5093|  1.13k|    CK_ULONG bytes_compared;
 5094|  1.13k|    CK_ULONG pairwise_digest_length = PAIRWISE_DIGEST_LENGTH;
  ------------------
  |  | 5041|  1.13k|#define PAIRWISE_DIGEST_LENGTH SHA1_LENGTH /* 160-bits */
  |  |  ------------------
  |  |  |  |   39|  1.13k|#define SHA1_LENGTH 20
  |  |  ------------------
  ------------------
 5095|       |
 5096|       |    /* Variables used for Signature/Verification functions. */
 5097|       |    /* Must be at least 256 bits for DSA2 digest */
 5098|  1.13k|    unsigned char *known_digest = (unsigned char *)"Mozilla Rules the World through NSS!";
 5099|  1.13k|    unsigned char *signature;
 5100|  1.13k|    CK_ULONG signature_length;
 5101|       |
 5102|  1.13k|    if (keyType == CKK_RSA) {
  ------------------
  |  |  372|  1.13k|#define CKK_RSA 0x00000000UL
  ------------------
  |  Branch (5102:9): [True: 0, False: 1.13k]
  ------------------
 5103|      0|        SFTKAttribute *attribute;
 5104|       |
 5105|       |        /* Get modulus length of private key. */
 5106|      0|        attribute = sftk_FindAttribute(privateKey, CKA_MODULUS);
  ------------------
  |  |  558|      0|#define CKA_MODULUS 0x00000120UL
  ------------------
 5107|      0|        if (attribute == NULL) {
  ------------------
  |  Branch (5107:13): [True: 0, False: 0]
  ------------------
 5108|      0|            return CKR_DEVICE_ERROR;
  ------------------
  |  | 1416|      0|#define CKR_DEVICE_ERROR 0x00000030UL
  ------------------
 5109|      0|        }
 5110|      0|        modulusLen = attribute->attrib.ulValueLen;
 5111|      0|        if (*(unsigned char *)attribute->attrib.pValue == 0) {
  ------------------
  |  Branch (5111:13): [True: 0, False: 0]
  ------------------
 5112|      0|            modulusLen--;
 5113|      0|        }
 5114|      0|        sftk_FreeAttribute(attribute);
 5115|  1.13k|    } else if (keyType == CKK_DSA) {
  ------------------
  |  |  373|  1.13k|#define CKK_DSA 0x00000001UL
  ------------------
  |  Branch (5115:16): [True: 0, False: 1.13k]
  ------------------
 5116|      0|        SFTKAttribute *attribute;
 5117|       |
 5118|       |        /* Get subprime length of private key. */
 5119|      0|        attribute = sftk_FindAttribute(privateKey, CKA_SUBPRIME);
  ------------------
  |  |  570|      0|#define CKA_SUBPRIME 0x00000131UL
  ------------------
 5120|      0|        if (attribute == NULL) {
  ------------------
  |  Branch (5120:13): [True: 0, False: 0]
  ------------------
 5121|      0|            return CKR_DEVICE_ERROR;
  ------------------
  |  | 1416|      0|#define CKR_DEVICE_ERROR 0x00000030UL
  ------------------
 5122|      0|        }
 5123|      0|        subPrimeLen = attribute->attrib.ulValueLen;
 5124|      0|        if (subPrimeLen > 1 && *(unsigned char *)attribute->attrib.pValue == 0) {
  ------------------
  |  Branch (5124:13): [True: 0, False: 0]
  |  Branch (5124:32): [True: 0, False: 0]
  ------------------
 5125|      0|            subPrimeLen--;
 5126|      0|        }
 5127|      0|        sftk_FreeAttribute(attribute);
 5128|      0|    }
 5129|       |
 5130|       |    /**************************************************/
 5131|       |    /* Pairwise Consistency Check of Encrypt/Decrypt. */
 5132|       |    /**************************************************/
 5133|       |
 5134|  1.13k|    isEncryptable = sftk_isTrue(privateKey, CKA_DECRYPT);
  ------------------
  |  |  548|  1.13k|#define CKA_DECRYPT 0x00000105UL
  ------------------
 5135|       |
 5136|       |    /*
 5137|       |     * If the decryption attribute is set, attempt to encrypt
 5138|       |     * with the public key and decrypt with the private key.
 5139|       |     */
 5140|  1.13k|    if (isEncryptable) {
  ------------------
  |  Branch (5140:9): [True: 0, False: 1.13k]
  ------------------
 5141|      0|        if (keyType != CKK_RSA) {
  ------------------
  |  |  372|      0|#define CKK_RSA 0x00000000UL
  ------------------
  |  Branch (5141:13): [True: 0, False: 0]
  ------------------
 5142|      0|            return CKR_DEVICE_ERROR;
  ------------------
  |  | 1416|      0|#define CKR_DEVICE_ERROR 0x00000030UL
  ------------------
 5143|      0|        }
 5144|      0|        bytes_encrypted = modulusLen;
 5145|      0|        mech.mechanism = CKM_RSA_PKCS;
  ------------------
  |  |  720|      0|#define CKM_RSA_PKCS 0x00000001UL
  ------------------
 5146|       |
 5147|       |        /* Allocate space for ciphertext. */
 5148|      0|        ciphertext = (unsigned char *)PORT_ZAlloc(bytes_encrypted);
  ------------------
  |  |   72|      0|#define PORT_ZAlloc PORT_ZAlloc_Util
  ------------------
 5149|      0|        if (ciphertext == NULL) {
  ------------------
  |  Branch (5149:13): [True: 0, False: 0]
  ------------------
 5150|      0|            return CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 5151|      0|        }
 5152|       |
 5153|       |        /* Prepare for encryption using the public key. */
 5154|      0|        crv = NSC_EncryptInit(hSession, &mech, publicKey->handle);
 5155|      0|        if (crv != CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5155:13): [True: 0, False: 0]
  ------------------
 5156|      0|            PORT_Free(ciphertext);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 5157|      0|            return crv;
 5158|      0|        }
 5159|       |
 5160|       |        /* Encrypt using the public key. */
 5161|      0|        crv = NSC_Encrypt(hSession,
 5162|      0|                          known_message,
 5163|      0|                          PAIRWISE_MESSAGE_LENGTH,
  ------------------
  |  | 5042|      0|#define PAIRWISE_MESSAGE_LENGTH 20         /* 160-bits */
  ------------------
 5164|      0|                          ciphertext,
 5165|      0|                          &bytes_encrypted);
 5166|      0|        if (crv != CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5166:13): [True: 0, False: 0]
  ------------------
 5167|      0|            PORT_Free(ciphertext);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 5168|      0|            return crv;
 5169|      0|        }
 5170|       |
 5171|       |        /* Always use the smaller of these two values . . . */
 5172|      0|        bytes_compared = PR_MIN(bytes_encrypted, PAIRWISE_MESSAGE_LENGTH);
  ------------------
  |  |  158|      0|#define PR_MIN(x,y)     ((x)<(y)?(x):(y))
  |  |  ------------------
  |  |  |  Branch (158:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5173|       |
 5174|       |        /*
 5175|       |         * If there was a failure, the plaintext
 5176|       |         * goes at the end, therefore . . .
 5177|       |         */
 5178|      0|        text_compared = ciphertext + bytes_encrypted - bytes_compared;
 5179|       |
 5180|       |        /*
 5181|       |         * Check to ensure that ciphertext does
 5182|       |         * NOT EQUAL known input message text
 5183|       |         * per FIPS PUB 140-2 directive.
 5184|       |         */
 5185|      0|        if (PORT_Memcmp(text_compared, known_message,
  ------------------
  |  |  179|      0|#define PORT_Memcmp memcmp
  ------------------
  |  Branch (5185:13): [True: 0, False: 0]
  ------------------
 5186|      0|                        bytes_compared) == 0) {
 5187|       |            /* Set error to Invalid PRIVATE Key. */
 5188|      0|            PORT_SetError(SEC_ERROR_INVALID_KEY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 5189|      0|            PORT_Free(ciphertext);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 5190|      0|            return CKR_GENERAL_ERROR;
  ------------------
  |  | 1396|      0|#define CKR_GENERAL_ERROR 0x00000005UL
  ------------------
 5191|      0|        }
 5192|       |
 5193|       |        /* Prepare for decryption using the private key. */
 5194|      0|        crv = NSC_DecryptInit(hSession, &mech, privateKey->handle);
 5195|      0|        if (crv != CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5195:13): [True: 0, False: 0]
  ------------------
 5196|      0|            PORT_Free(ciphertext);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 5197|      0|            return crv;
 5198|      0|        }
 5199|       |
 5200|      0|        memset(plaintext, 0, PAIRWISE_MESSAGE_LENGTH);
  ------------------
  |  | 5042|      0|#define PAIRWISE_MESSAGE_LENGTH 20         /* 160-bits */
  ------------------
 5201|       |
 5202|       |        /*
 5203|       |         * Initialize bytes decrypted to be the
 5204|       |         * expected PAIRWISE_MESSAGE_LENGTH.
 5205|       |         */
 5206|      0|        bytes_decrypted = PAIRWISE_MESSAGE_LENGTH;
  ------------------
  |  | 5042|      0|#define PAIRWISE_MESSAGE_LENGTH 20         /* 160-bits */
  ------------------
 5207|       |
 5208|       |        /*
 5209|       |         * Decrypt using the private key.
 5210|       |         * NOTE:  No need to reset the
 5211|       |         *        value of bytes_encrypted.
 5212|       |         */
 5213|      0|        crv = NSC_Decrypt(hSession,
 5214|      0|                          ciphertext,
 5215|      0|                          bytes_encrypted,
 5216|      0|                          plaintext,
 5217|      0|                          &bytes_decrypted);
 5218|       |
 5219|       |        /* Finished with ciphertext; free it. */
 5220|      0|        PORT_Free(ciphertext);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 5221|       |
 5222|      0|        if (crv != CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5222:13): [True: 0, False: 0]
  ------------------
 5223|      0|            return crv;
 5224|      0|        }
 5225|       |
 5226|       |        /*
 5227|       |         * Check to ensure that the output plaintext
 5228|       |         * does EQUAL known input message text.
 5229|       |         */
 5230|      0|        if ((bytes_decrypted != PAIRWISE_MESSAGE_LENGTH) ||
  ------------------
  |  | 5042|      0|#define PAIRWISE_MESSAGE_LENGTH 20         /* 160-bits */
  ------------------
  |  Branch (5230:13): [True: 0, False: 0]
  ------------------
 5231|      0|            (PORT_Memcmp(plaintext, known_message,
  ------------------
  |  |  179|      0|#define PORT_Memcmp memcmp
  ------------------
  |  Branch (5231:13): [True: 0, False: 0]
  ------------------
 5232|      0|                         PAIRWISE_MESSAGE_LENGTH) != 0)) {
  ------------------
  |  | 5042|      0|#define PAIRWISE_MESSAGE_LENGTH 20         /* 160-bits */
  ------------------
 5233|       |            /* Set error to Bad PUBLIC Key. */
 5234|      0|            PORT_SetError(SEC_ERROR_BAD_KEY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 5235|      0|            return CKR_GENERAL_ERROR;
  ------------------
  |  | 1396|      0|#define CKR_GENERAL_ERROR 0x00000005UL
  ------------------
 5236|      0|        }
 5237|      0|    }
 5238|       |
 5239|       |    /**********************************************/
 5240|       |    /* Pairwise Consistency Check of Sign/Verify. */
 5241|       |    /**********************************************/
 5242|       |
 5243|  1.13k|    canSignVerify = sftk_isTrue(privateKey, CKA_SIGN);
  ------------------
  |  |  551|  1.13k|#define CKA_SIGN 0x00000108UL
  ------------------
 5244|       |    /* Unfortunately CKA_SIGN is always true in lg dbs. We have to check the
 5245|       |     * actual curve to determine if we can do sign/verify. */
 5246|  1.13k|    if (canSignVerify && keyType == CKK_EC) {
  ------------------
  |  |  379|      0|#define CKK_EC 0x00000003UL
  ------------------
  |  Branch (5246:9): [True: 0, False: 1.13k]
  |  Branch (5246:26): [True: 0, False: 0]
  ------------------
 5247|      0|        NSSLOWKEYPrivateKey *privKey = sftk_GetPrivKey(privateKey, CKK_EC, &crv);
  ------------------
  |  |  379|      0|#define CKK_EC 0x00000003UL
  ------------------
 5248|      0|        if (privKey && privKey->u.ec.ecParams.name == ECCurve25519) {
  ------------------
  |  Branch (5248:13): [True: 0, False: 0]
  |  Branch (5248:24): [True: 0, False: 0]
  ------------------
 5249|      0|            canSignVerify = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5250|      0|        }
 5251|      0|    }
 5252|       |
 5253|  1.13k|    if (canSignVerify) {
  ------------------
  |  Branch (5253:9): [True: 0, False: 1.13k]
  ------------------
 5254|       |        /* Determine length of signature. */
 5255|      0|        switch (keyType) {
 5256|      0|            case CKK_RSA:
  ------------------
  |  |  372|      0|#define CKK_RSA 0x00000000UL
  ------------------
  |  Branch (5256:13): [True: 0, False: 0]
  ------------------
 5257|      0|                signature_length = modulusLen;
 5258|      0|                mech.mechanism = CKM_RSA_PKCS;
  ------------------
  |  |  720|      0|#define CKM_RSA_PKCS 0x00000001UL
  ------------------
 5259|      0|                break;
 5260|      0|            case CKK_DSA:
  ------------------
  |  |  373|      0|#define CKK_DSA 0x00000001UL
  ------------------
  |  Branch (5260:13): [True: 0, False: 0]
  ------------------
 5261|      0|                signature_length = DSA_MAX_SIGNATURE_LEN;
  ------------------
  |  |   52|      0|#define DSA_MAX_SIGNATURE_LEN (DSA_MAX_SUBPRIME_LEN * 2) /* Bytes */
  |  |  ------------------
  |  |  |  |   51|      0|#define DSA_MAX_SUBPRIME_LEN 32                          /* Bytes */
  |  |  ------------------
  ------------------
 5262|      0|                pairwise_digest_length = subPrimeLen;
 5263|      0|                mech.mechanism = CKM_DSA;
  ------------------
  |  |  745|      0|#define CKM_DSA 0x00000011UL
  ------------------
 5264|      0|                break;
 5265|      0|            case CKK_EC:
  ------------------
  |  |  379|      0|#define CKK_EC 0x00000003UL
  ------------------
  |  Branch (5265:13): [True: 0, False: 0]
  ------------------
 5266|      0|                signature_length = MAX_ECKEY_LEN * 2;
  ------------------
  |  |   81|      0|#define MAX_ECKEY_LEN 72 /* Bytes */
  ------------------
 5267|      0|                mech.mechanism = CKM_ECDSA;
  ------------------
  |  | 1074|      0|#define CKM_ECDSA 0x00001041UL
  ------------------
 5268|      0|                break;
 5269|      0|            case CKK_EC_EDWARDS:
  ------------------
  |  |  448|      0|#define CKK_EC_EDWARDS 0x00000040UL
  ------------------
  |  Branch (5269:13): [True: 0, False: 0]
  ------------------
 5270|      0|                signature_length = ED25519_SIGN_LEN;
  ------------------
  |  |   32|      0|#define ED25519_SIGN_LEN 64U /* Bytes */
  ------------------
 5271|      0|                mech.mechanism = CKM_EDDSA;
  ------------------
  |  | 1174|      0|#define CKM_EDDSA 0x00001057UL
  ------------------
 5272|      0|                break;
 5273|      0|            default:
  ------------------
  |  Branch (5273:13): [True: 0, False: 0]
  ------------------
 5274|      0|                return CKR_DEVICE_ERROR;
  ------------------
  |  | 1416|      0|#define CKR_DEVICE_ERROR 0x00000030UL
  ------------------
 5275|      0|        }
 5276|       |
 5277|       |        /* Allocate space for signature data. */
 5278|      0|        signature = (unsigned char *)PORT_ZAlloc(signature_length);
  ------------------
  |  |   72|      0|#define PORT_ZAlloc PORT_ZAlloc_Util
  ------------------
 5279|      0|        if (signature == NULL) {
  ------------------
  |  Branch (5279:13): [True: 0, False: 0]
  ------------------
 5280|      0|            return CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 5281|      0|        }
 5282|       |
 5283|       |        /* Sign the known hash using the private key. */
 5284|      0|        crv = NSC_SignInit(hSession, &mech, privateKey->handle);
 5285|      0|        if (crv != CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5285:13): [True: 0, False: 0]
  ------------------
 5286|      0|            PORT_Free(signature);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 5287|      0|            return crv;
 5288|      0|        }
 5289|       |
 5290|      0|        crv = NSC_Sign(hSession,
 5291|      0|                       known_digest,
 5292|      0|                       pairwise_digest_length,
 5293|      0|                       signature,
 5294|      0|                       &signature_length);
 5295|      0|        if (crv != CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5295:13): [True: 0, False: 0]
  ------------------
 5296|      0|            PORT_Free(signature);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 5297|      0|            return crv;
 5298|      0|        }
 5299|       |
 5300|       |        /* detect trivial signing transforms */
 5301|      0|        if ((signature_length >= pairwise_digest_length) &&
  ------------------
  |  Branch (5301:13): [True: 0, False: 0]
  ------------------
 5302|      0|            (PORT_Memcmp(known_digest, signature + (signature_length - pairwise_digest_length), pairwise_digest_length) == 0)) {
  ------------------
  |  |  179|      0|#define PORT_Memcmp memcmp
  ------------------
  |  Branch (5302:13): [True: 0, False: 0]
  ------------------
 5303|      0|            PORT_Free(signature);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 5304|      0|            return CKR_GENERAL_ERROR;
  ------------------
  |  | 1396|      0|#define CKR_GENERAL_ERROR 0x00000005UL
  ------------------
 5305|      0|        }
 5306|       |
 5307|       |        /* Verify the known hash using the public key. */
 5308|      0|        crv = NSC_VerifyInit(hSession, &mech, publicKey->handle);
 5309|      0|        if (crv != CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5309:13): [True: 0, False: 0]
  ------------------
 5310|      0|            PORT_Free(signature);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 5311|      0|            return crv;
 5312|      0|        }
 5313|       |
 5314|      0|        crv = NSC_Verify(hSession,
 5315|      0|                         known_digest,
 5316|      0|                         pairwise_digest_length,
 5317|      0|                         signature,
 5318|      0|                         signature_length);
 5319|       |
 5320|       |        /* Free signature data. */
 5321|      0|        PORT_Free(signature);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 5322|       |
 5323|      0|        if ((crv == CKR_SIGNATURE_LEN_RANGE) ||
  ------------------
  |  | 1476|      0|#define CKR_SIGNATURE_LEN_RANGE 0x000000C1UL
  ------------------
  |  Branch (5323:13): [True: 0, False: 0]
  ------------------
 5324|      0|            (crv == CKR_SIGNATURE_INVALID)) {
  ------------------
  |  | 1475|      0|#define CKR_SIGNATURE_INVALID 0x000000C0UL
  ------------------
  |  Branch (5324:13): [True: 0, False: 0]
  ------------------
 5325|      0|            return CKR_GENERAL_ERROR;
  ------------------
  |  | 1396|      0|#define CKR_GENERAL_ERROR 0x00000005UL
  ------------------
 5326|      0|        }
 5327|      0|        if (crv != CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5327:13): [True: 0, False: 0]
  ------------------
 5328|      0|            return crv;
 5329|      0|        }
 5330|      0|    }
 5331|       |
 5332|       |    /**********************************************/
 5333|       |    /* Pairwise Consistency Check for Derivation  */
 5334|       |    /**********************************************/
 5335|       |
 5336|  1.13k|    isDerivable = sftk_isTrue(privateKey, CKA_DERIVE);
  ------------------
  |  |  555|  1.13k|#define CKA_DERIVE 0x0000010CUL
  ------------------
 5337|       |
 5338|  1.13k|    if (isDerivable) {
  ------------------
  |  Branch (5338:9): [True: 1.13k, False: 0]
  ------------------
 5339|  1.13k|        SFTKAttribute *pubAttribute = NULL;
 5340|  1.13k|        PRBool isFIPS = sftk_isFIPS(slot->slotID);
  ------------------
  |  |  506|  1.13k|    (((id) == FIPS_SLOT_ID) || ((id) >= SFTK_MIN_FIPS_USER_SLOT_ID))
  |  |  ------------------
  |  |  |  |  500|  1.13k|#define FIPS_SLOT_ID 3
  |  |  ------------------
  |  |                   (((id) == FIPS_SLOT_ID) || ((id) >= SFTK_MIN_FIPS_USER_SLOT_ID))
  |  |  ------------------
  |  |  |  |  567|  1.13k|#define SFTK_MIN_FIPS_USER_SLOT_ID 101
  |  |  ------------------
  |  |  |  Branch (506:6): [True: 0, False: 1.13k]
  |  |  |  Branch (506:32): [True: 0, False: 1.13k]
  |  |  ------------------
  ------------------
 5341|  1.13k|        NSSLOWKEYPrivateKey *lowPrivKey = NULL;
 5342|  1.13k|        ECPrivateKey *ecPriv = NULL;
 5343|  1.13k|        SECItem *lowPubValue = NULL;
 5344|  1.13k|        SECItem item = { siBuffer, NULL, 0 };
 5345|  1.13k|        SECStatus rv;
 5346|       |
 5347|  1.13k|        crv = CKR_OK; /*paranoia, already get's set before we drop to the end */
  ------------------
  |  | 1388|  1.13k|#define CKR_OK 0x00000000UL
  ------------------
 5348|       |
 5349|       |        /* FIPS 140-3 requires we verify that the resulting key is a valid key
 5350|       |         * by recalculating the public can an compare it to our own public
 5351|       |         * key. */
 5352|  1.13k|        lowPrivKey = sftk_GetPrivKey(privateKey, keyType, &crv);
 5353|  1.13k|        if (lowPrivKey == NULL) {
  ------------------
  |  Branch (5353:13): [True: 0, False: 1.13k]
  ------------------
 5354|      0|            return sftk_MapCryptError(PORT_GetError());
  ------------------
  |  |   62|      0|#define PORT_GetError PORT_GetError_Util
  ------------------
 5355|      0|        }
 5356|       |        /* recalculate the public key from the private key */
 5357|  1.13k|        switch (keyType) {
 5358|  1.13k|            case CKK_DH:
  ------------------
  |  |  374|  1.13k|#define CKK_DH 0x00000002UL
  ------------------
  |  Branch (5358:13): [True: 1.13k, False: 0]
  ------------------
 5359|  1.13k|                rv = DH_Derive(&lowPrivKey->u.dh.base, &lowPrivKey->u.dh.prime,
 5360|  1.13k|                               &lowPrivKey->u.dh.privateValue, &item, 0);
 5361|  1.13k|                if (rv != SECSuccess) {
  ------------------
  |  Branch (5361:21): [True: 0, False: 1.13k]
  ------------------
 5362|      0|                    return CKR_GENERAL_ERROR;
  ------------------
  |  | 1396|      0|#define CKR_GENERAL_ERROR 0x00000005UL
  ------------------
 5363|      0|                }
 5364|  1.13k|                lowPubValue = SECITEM_DupItem(&item);
  ------------------
  |  |  107|  1.13k|#define SECITEM_DupItem SECITEM_DupItem_Util
  ------------------
 5365|  1.13k|                SECITEM_ZfreeItem(&item, PR_FALSE);
  ------------------
  |  |  110|  1.13k|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                              SECITEM_ZfreeItem(&item, PR_FALSE);
  ------------------
  |  |  438|  1.13k|#define PR_FALSE 0
  ------------------
 5366|  1.13k|                pubAttribute = sftk_FindAttribute(publicKey, CKA_VALUE);
  ------------------
  |  |  516|  1.13k|#define CKA_VALUE 0x00000011UL
  ------------------
 5367|  1.13k|                break;
 5368|      0|            case CKK_EC_MONTGOMERY:
  ------------------
  |  |  449|      0|#define CKK_EC_MONTGOMERY 0x00000041UL
  ------------------
  |  Branch (5368:13): [True: 0, False: 1.13k]
  ------------------
 5369|      0|            case CKK_EC:
  ------------------
  |  |  379|      0|#define CKK_EC 0x00000003UL
  ------------------
  |  Branch (5369:13): [True: 0, False: 1.13k]
  ------------------
 5370|      0|                rv = EC_NewKeyFromSeed(&lowPrivKey->u.ec.ecParams, &ecPriv,
 5371|      0|                                       lowPrivKey->u.ec.privateValue.data,
 5372|      0|                                       lowPrivKey->u.ec.privateValue.len);
 5373|      0|                if (rv != SECSuccess) {
  ------------------
  |  Branch (5373:21): [True: 0, False: 0]
  ------------------
 5374|      0|                    return CKR_GENERAL_ERROR;
  ------------------
  |  | 1396|      0|#define CKR_GENERAL_ERROR 0x00000005UL
  ------------------
 5375|      0|                }
 5376|       |                /* make sure it has the same encoding */
 5377|      0|                if (PR_GetEnvSecure("NSS_USE_DECODED_CKA_EC_POINT") ||
  ------------------
  |  Branch (5377:21): [True: 0, False: 0]
  ------------------
 5378|      0|                    lowPrivKey->u.ec.ecParams.type != ec_params_named) {
  ------------------
  |  Branch (5378:21): [True: 0, False: 0]
  ------------------
 5379|      0|                    lowPubValue = SECITEM_DupItem(&ecPriv->publicValue);
  ------------------
  |  |  107|      0|#define SECITEM_DupItem SECITEM_DupItem_Util
  ------------------
 5380|      0|                } else {
 5381|      0|                    lowPubValue = SEC_ASN1EncodeItem(NULL, NULL, &ecPriv->publicValue,
  ------------------
  |  |   89|      0|#define SEC_ASN1EncodeItem SEC_ASN1EncodeItem_Util
  ------------------
 5382|      0|                                                     SEC_ASN1_GET(SEC_OctetStringTemplate));
  ------------------
  |  |  188|      0|#define SEC_ASN1_GET(x) x
  ------------------
 5383|      0|                }
 5384|      0|                pubAttribute = sftk_FindAttribute(publicKey, CKA_EC_POINT);
  ------------------
  |  |  604|      0|#define CKA_EC_POINT 0x00000181UL
  ------------------
 5385|       |                /* clear out our generated private key */
 5386|      0|                PORT_FreeArena(ecPriv->ecParams.arena, PR_TRUE);
  ------------------
  |  |   61|      0|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                              PORT_FreeArena(ecPriv->ecParams.arena, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 5387|      0|                break;
 5388|      0|            default:
  ------------------
  |  Branch (5388:13): [True: 0, False: 1.13k]
  ------------------
 5389|      0|                return CKR_DEVICE_ERROR;
  ------------------
  |  | 1416|      0|#define CKR_DEVICE_ERROR 0x00000030UL
  ------------------
 5390|  1.13k|        }
 5391|       |
 5392|       |        /* now compare new public key with our already generated key */
 5393|  1.13k|        if ((pubAttribute == NULL) || (lowPubValue == NULL) ||
  ------------------
  |  Branch (5393:13): [True: 0, False: 1.13k]
  |  Branch (5393:39): [True: 0, False: 1.13k]
  ------------------
 5394|  1.13k|            (pubAttribute->attrib.ulValueLen != lowPubValue->len) ||
  ------------------
  |  Branch (5394:13): [True: 0, False: 1.13k]
  ------------------
 5395|  1.13k|            (PORT_Memcmp(pubAttribute->attrib.pValue, lowPubValue->data,
  ------------------
  |  |  179|  1.13k|#define PORT_Memcmp memcmp
  ------------------
  |  Branch (5395:13): [True: 0, False: 1.13k]
  ------------------
 5396|  1.13k|                         lowPubValue->len) != 0)) {
 5397|      0|            if (pubAttribute)
  ------------------
  |  Branch (5397:17): [True: 0, False: 0]
  ------------------
 5398|      0|                sftk_FreeAttribute(pubAttribute);
 5399|      0|            if (lowPubValue)
  ------------------
  |  Branch (5399:17): [True: 0, False: 0]
  ------------------
 5400|      0|                SECITEM_ZfreeItem(lowPubValue, PR_TRUE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                              SECITEM_ZfreeItem(lowPubValue, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 5401|      0|            PORT_SetError(SEC_ERROR_BAD_KEY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 5402|      0|            return CKR_GENERAL_ERROR;
  ------------------
  |  | 1396|      0|#define CKR_GENERAL_ERROR 0x00000005UL
  ------------------
 5403|      0|        }
 5404|  1.13k|        SECITEM_ZfreeItem(lowPubValue, PR_TRUE);
  ------------------
  |  |  110|  1.13k|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                      SECITEM_ZfreeItem(lowPubValue, PR_TRUE);
  ------------------
  |  |  437|  1.13k|#define PR_TRUE 1
  ------------------
 5405|       |
 5406|       |        /* FIPS requires full validation, but in fipx mode NSC_Derive
 5407|       |         * only does partial validation with approved primes, now handle
 5408|       |         * full validation */
 5409|  1.13k|        if (isFIPS && keyType == CKK_DH) {
  ------------------
  |  |  374|      0|#define CKK_DH 0x00000002UL
  ------------------
  |  Branch (5409:13): [True: 0, False: 1.13k]
  |  Branch (5409:23): [True: 0, False: 0]
  ------------------
 5410|      0|            SECItem pubKey = { siBuffer, pubAttribute->attrib.pValue,
 5411|      0|                               pubAttribute->attrib.ulValueLen };
 5412|      0|            SECItem base = { siBuffer, NULL, 0 };
 5413|      0|            SECItem prime = { siBuffer, NULL, 0 };
 5414|      0|            SECItem subPrime = { siBuffer, NULL, 0 };
 5415|      0|            SECItem generator = { siBuffer, NULL, 0 };
 5416|      0|            const SECItem *subPrimePtr = &subPrime;
 5417|       |
 5418|      0|            crv = sftk_Attribute2SecItem(NULL, &prime, privateKey, CKA_PRIME);
  ------------------
  |  |  569|      0|#define CKA_PRIME 0x00000130UL
  ------------------
 5419|      0|            if (crv != CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5419:17): [True: 0, False: 0]
  ------------------
 5420|      0|                goto done;
 5421|      0|            }
 5422|      0|            crv = sftk_Attribute2SecItem(NULL, &base, privateKey, CKA_BASE);
  ------------------
  |  |  571|      0|#define CKA_BASE 0x00000132UL
  ------------------
 5423|      0|            if (crv != CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5423:17): [True: 0, False: 0]
  ------------------
 5424|      0|                goto done;
 5425|      0|            }
 5426|       |            /* we ignore the return code an only look at the length */
 5427|       |            /* do we have a known prime ? */
 5428|      0|            subPrimePtr = sftk_VerifyDH_Prime(&prime, &generator, isFIPS);
 5429|      0|            if (subPrimePtr == NULL) {
  ------------------
  |  Branch (5429:17): [True: 0, False: 0]
  ------------------
 5430|      0|                if (subPrime.len == 0) {
  ------------------
  |  Branch (5430:21): [True: 0, False: 0]
  ------------------
 5431|       |                    /* if not a known prime, subprime must be supplied */
 5432|      0|                    crv = CKR_ATTRIBUTE_VALUE_INVALID;
  ------------------
  |  | 1409|      0|#define CKR_ATTRIBUTE_VALUE_INVALID 0x00000013UL
  ------------------
 5433|      0|                    goto done;
 5434|      0|                } else {
 5435|       |                    /* not a known prime, check for primality of prime
 5436|       |                     * and subPrime */
 5437|      0|                    if (!KEA_PrimeCheck(&prime)) {
  ------------------
  |  Branch (5437:25): [True: 0, False: 0]
  ------------------
 5438|      0|                        crv = CKR_ATTRIBUTE_VALUE_INVALID;
  ------------------
  |  | 1409|      0|#define CKR_ATTRIBUTE_VALUE_INVALID 0x00000013UL
  ------------------
 5439|      0|                        goto done;
 5440|      0|                    }
 5441|      0|                    if (!KEA_PrimeCheck(&subPrime)) {
  ------------------
  |  Branch (5441:25): [True: 0, False: 0]
  ------------------
 5442|      0|                        crv = CKR_ATTRIBUTE_VALUE_INVALID;
  ------------------
  |  | 1409|      0|#define CKR_ATTRIBUTE_VALUE_INVALID 0x00000013UL
  ------------------
 5443|      0|                        goto done;
 5444|      0|                    }
 5445|       |                    /* if we aren't using a defined group, make sure base is in the
 5446|       |                     * subgroup. If it's not, then our key could fail or succeed sometimes.
 5447|       |                     * This makes the failure reliable */
 5448|      0|                    if (!KEA_Verify(&base, &prime, &subPrime)) {
  ------------------
  |  Branch (5448:25): [True: 0, False: 0]
  ------------------
 5449|      0|                        crv = CKR_ATTRIBUTE_VALUE_INVALID;
  ------------------
  |  | 1409|      0|#define CKR_ATTRIBUTE_VALUE_INVALID 0x00000013UL
  ------------------
 5450|      0|                    }
 5451|      0|                }
 5452|      0|                subPrimePtr = &subPrime;
 5453|      0|            } else {
 5454|       |                /* we're using a known group, make sure we are using the known generator for that group */
 5455|      0|                if (SECITEM_CompareItem(&generator, &base) != 0) {
  ------------------
  |  |  105|      0|#define SECITEM_CompareItem SECITEM_CompareItem_Util
  ------------------
  |  Branch (5455:21): [True: 0, False: 0]
  ------------------
 5456|      0|                    crv = CKR_ATTRIBUTE_VALUE_INVALID;
  ------------------
  |  | 1409|      0|#define CKR_ATTRIBUTE_VALUE_INVALID 0x00000013UL
  ------------------
 5457|      0|                    goto done;
 5458|      0|                }
 5459|      0|                if (subPrime.len != 0) {
  ------------------
  |  Branch (5459:21): [True: 0, False: 0]
  ------------------
 5460|       |                    /* we have a known prime and a supplied subPrime,
 5461|       |                     * make sure the subPrime matches the subPrime for
 5462|       |                     * the known Prime */
 5463|      0|                    if (SECITEM_CompareItem(subPrimePtr, &subPrime) != 0) {
  ------------------
  |  |  105|      0|#define SECITEM_CompareItem SECITEM_CompareItem_Util
  ------------------
  |  Branch (5463:25): [True: 0, False: 0]
  ------------------
 5464|      0|                        crv = CKR_ATTRIBUTE_VALUE_INVALID;
  ------------------
  |  | 1409|      0|#define CKR_ATTRIBUTE_VALUE_INVALID 0x00000013UL
  ------------------
 5465|      0|                        goto done;
 5466|      0|                    }
 5467|      0|                }
 5468|      0|            }
 5469|      0|            if (!KEA_Verify(&pubKey, &prime, (SECItem *)subPrimePtr)) {
  ------------------
  |  Branch (5469:17): [True: 0, False: 0]
  ------------------
 5470|      0|                crv = CKR_ATTRIBUTE_VALUE_INVALID;
  ------------------
  |  | 1409|      0|#define CKR_ATTRIBUTE_VALUE_INVALID 0x00000013UL
  ------------------
 5471|      0|            }
 5472|      0|        done:
 5473|      0|            SECITEM_ZfreeItem(&base, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                          SECITEM_ZfreeItem(&base, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5474|      0|            SECITEM_ZfreeItem(&subPrime, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                          SECITEM_ZfreeItem(&subPrime, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5475|      0|            SECITEM_ZfreeItem(&prime, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                          SECITEM_ZfreeItem(&prime, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5476|      0|        }
 5477|       |        /* clean up before we return */
 5478|  1.13k|        sftk_FreeAttribute(pubAttribute);
 5479|  1.13k|        if (crv != CKR_OK) {
  ------------------
  |  | 1388|  1.13k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (5479:13): [True: 0, False: 1.13k]
  ------------------
 5480|      0|            return crv;
 5481|      0|        }
 5482|  1.13k|    }
 5483|       |
 5484|  1.13k|    return CKR_OK;
  ------------------
  |  | 1388|  1.13k|#define CKR_OK 0x00000000UL
  ------------------
 5485|  1.13k|}
pkcs11c.c:sftk_mapWrap:
 6369|  1.27k|{
 6370|  1.27k|    switch (crv) {
  ------------------
  |  Branch (6370:13): [True: 1.27k, False: 0]
  ------------------
 6371|      0|        case CKR_ENCRYPTED_DATA_INVALID:
  ------------------
  |  | 1419|      0|#define CKR_ENCRYPTED_DATA_INVALID 0x00000040UL
  ------------------
  |  Branch (6371:9): [True: 0, False: 1.27k]
  ------------------
 6372|      0|            crv = CKR_WRAPPED_KEY_INVALID;
  ------------------
  |  | 1497|      0|#define CKR_WRAPPED_KEY_INVALID 0x00000110UL
  ------------------
 6373|      0|            break;
 6374|  1.27k|    }
 6375|  1.27k|    return crv;
 6376|  1.27k|}
pkcs11c.c:sftk_DeriveSensitiveCheck:
 7041|  28.9k|{
 7042|  28.9k|    PRBool hasSensitive;
 7043|  28.9k|    PRBool sensitive = PR_FALSE;
  ------------------
  |  |  438|  28.9k|#define PR_FALSE 0
  ------------------
 7044|  28.9k|    CK_BBOOL bFalse = CK_FALSE;
  ------------------
  |  |   23|  28.9k|#define CK_FALSE 0
  ------------------
 7045|  28.9k|    PRBool hasExtractable;
 7046|  28.9k|    PRBool extractable = PR_TRUE;
  ------------------
  |  |  437|  28.9k|#define PR_TRUE 1
  ------------------
 7047|  28.9k|    CK_BBOOL bTrue = CK_TRUE;
  ------------------
  |  |   22|  28.9k|#define CK_TRUE 1
  ------------------
 7048|  28.9k|    CK_RV crv = CKR_OK;
  ------------------
  |  | 1388|  28.9k|#define CKR_OK 0x00000000UL
  ------------------
 7049|  28.9k|    SFTKAttribute *att;
 7050|  28.9k|    PRBool isData = PR_TRUE;
  ------------------
  |  |  437|  28.9k|#define PR_TRUE 1
  ------------------
 7051|       |
 7052|  28.9k|    if (canBeData) {
  ------------------
  |  Branch (7052:9): [True: 27.3k, False: 1.62k]
  ------------------
 7053|  27.3k|        CK_OBJECT_CLASS objClass;
 7054|       |
 7055|       |        /* if the target key is actually data, don't set the unexpected
 7056|       |         * attributes */
 7057|  27.3k|        crv = sftk_GetULongAttribute(destKey, CKA_CLASS, &objClass);
  ------------------
  |  |  511|  27.3k|#define CKA_CLASS 0x00000000UL
  ------------------
 7058|  27.3k|        if (crv != CKR_OK) {
  ------------------
  |  | 1388|  27.3k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (7058:13): [True: 0, False: 27.3k]
  ------------------
 7059|      0|            return crv;
 7060|      0|        }
 7061|  27.3k|        if (objClass == CKO_DATA) {
  ------------------
  |  |  325|  27.3k|#define CKO_DATA 0x00000000UL
  ------------------
  |  Branch (7061:13): [True: 1.60k, False: 25.7k]
  ------------------
 7062|  1.60k|            return CKR_OK;
  ------------------
  |  | 1388|  1.60k|#define CKR_OK 0x00000000UL
  ------------------
 7063|  1.60k|        }
 7064|       |
 7065|       |        /* if the base key is data, it doesn't have sensitive attributes,
 7066|       |         * allow the destKey to get it's own */
 7067|  25.7k|        crv = sftk_GetULongAttribute(baseKey, CKA_CLASS, &objClass);
  ------------------
  |  |  511|  25.7k|#define CKA_CLASS 0x00000000UL
  ------------------
 7068|  25.7k|        if (crv != CKR_OK) {
  ------------------
  |  | 1388|  25.7k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (7068:13): [True: 0, False: 25.7k]
  ------------------
 7069|      0|            return crv;
 7070|      0|        }
 7071|  25.7k|        if (objClass == CKO_DATA) {
  ------------------
  |  |  325|  25.7k|#define CKO_DATA 0x00000000UL
  ------------------
  |  Branch (7071:13): [True: 2.86k, False: 22.8k]
  ------------------
 7072|  2.86k|            isData = PR_TRUE;
  ------------------
  |  |  437|  2.86k|#define PR_TRUE 1
  ------------------
 7073|  2.86k|        }
 7074|  25.7k|    }
 7075|       |
 7076|  27.3k|    hasSensitive = PR_FALSE;
  ------------------
  |  |  438|  27.3k|#define PR_FALSE 0
  ------------------
 7077|  27.3k|    att = sftk_FindAttribute(destKey, CKA_SENSITIVE);
  ------------------
  |  |  546|  27.3k|#define CKA_SENSITIVE 0x00000103UL
  ------------------
 7078|  27.3k|    if (att) {
  ------------------
  |  Branch (7078:9): [True: 0, False: 27.3k]
  ------------------
 7079|      0|        hasSensitive = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 7080|      0|        sensitive = (PRBool) * (CK_BBOOL *)att->attrib.pValue;
 7081|      0|        sftk_FreeAttribute(att);
 7082|      0|    }
 7083|       |
 7084|  27.3k|    hasExtractable = PR_FALSE;
  ------------------
  |  |  438|  27.3k|#define PR_FALSE 0
  ------------------
 7085|  27.3k|    att = sftk_FindAttribute(destKey, CKA_EXTRACTABLE);
  ------------------
  |  |  585|  27.3k|#define CKA_EXTRACTABLE 0x00000162UL
  ------------------
 7086|  27.3k|    if (att) {
  ------------------
  |  Branch (7086:9): [True: 0, False: 27.3k]
  ------------------
 7087|      0|        hasExtractable = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 7088|      0|        extractable = (PRBool) * (CK_BBOOL *)att->attrib.pValue;
 7089|      0|        sftk_FreeAttribute(att);
 7090|      0|    }
 7091|       |
 7092|       |    /* don't make a key more accessible */
 7093|  27.3k|    if (sftk_isTrue(baseKey, CKA_SENSITIVE) && hasSensitive &&
  ------------------
  |  |  546|  27.3k|#define CKA_SENSITIVE 0x00000103UL
  ------------------
  |  Branch (7093:9): [True: 0, False: 27.3k]
  |  Branch (7093:48): [True: 0, False: 0]
  ------------------
 7094|  27.3k|        (sensitive == PR_FALSE)) {
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  |  Branch (7094:9): [True: 0, False: 0]
  ------------------
 7095|      0|        return CKR_KEY_FUNCTION_NOT_PERMITTED;
  ------------------
  |  | 1443|      0|#define CKR_KEY_FUNCTION_NOT_PERMITTED 0x00000068UL
  ------------------
 7096|      0|    }
 7097|  27.3k|    if (!sftk_isTrue(baseKey, CKA_EXTRACTABLE) && hasExtractable &&
  ------------------
  |  |  585|  27.3k|#define CKA_EXTRACTABLE 0x00000162UL
  ------------------
  |  Branch (7097:9): [True: 2.86k, False: 24.5k]
  |  Branch (7097:51): [True: 0, False: 2.86k]
  ------------------
 7098|  27.3k|        (extractable == PR_TRUE)) {
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  |  Branch (7098:9): [True: 0, False: 0]
  ------------------
 7099|      0|        return CKR_KEY_FUNCTION_NOT_PERMITTED;
  ------------------
  |  | 1443|      0|#define CKR_KEY_FUNCTION_NOT_PERMITTED 0x00000068UL
  ------------------
 7100|      0|    }
 7101|       |
 7102|       |    /* inherit parent's sensitivity */
 7103|  27.3k|    if (!hasSensitive) {
  ------------------
  |  Branch (7103:9): [True: 27.3k, False: 0]
  ------------------
 7104|  27.3k|        att = sftk_FindAttribute(baseKey, CKA_SENSITIVE);
  ------------------
  |  |  546|  27.3k|#define CKA_SENSITIVE 0x00000103UL
  ------------------
 7105|  27.3k|        if (att != NULL) {
  ------------------
  |  Branch (7105:13): [True: 24.5k, False: 2.86k]
  ------------------
 7106|  24.5k|            crv = sftk_defaultAttribute(destKey,
 7107|  24.5k|                                        sftk_attr_expand(&att->attrib));
  ------------------
  |  |  587|  24.5k|#define sftk_attr_expand(ap) (ap)->type, (ap)->pValue, (ap)->ulValueLen
  ------------------
 7108|  24.5k|            sftk_FreeAttribute(att);
 7109|  24.5k|        } else if (isData) {
  ------------------
  |  Branch (7109:20): [True: 2.86k, False: 0]
  ------------------
 7110|  2.86k|            crv = sftk_defaultAttribute(destKey, CKA_SENSITIVE,
  ------------------
  |  |  546|  2.86k|#define CKA_SENSITIVE 0x00000103UL
  ------------------
 7111|  2.86k|                                        &bFalse, sizeof(bFalse));
 7112|  2.86k|        } else {
 7113|      0|            return CKR_KEY_TYPE_INCONSISTENT;
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
 7114|      0|        }
 7115|  27.3k|        if (crv != CKR_OK)
  ------------------
  |  | 1388|  27.3k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (7115:13): [True: 0, False: 27.3k]
  ------------------
 7116|      0|            return crv;
 7117|  27.3k|    }
 7118|  27.3k|    if (!hasExtractable) {
  ------------------
  |  Branch (7118:9): [True: 27.3k, False: 0]
  ------------------
 7119|  27.3k|        att = sftk_FindAttribute(baseKey, CKA_EXTRACTABLE);
  ------------------
  |  |  585|  27.3k|#define CKA_EXTRACTABLE 0x00000162UL
  ------------------
 7120|  27.3k|        if (att != NULL) {
  ------------------
  |  Branch (7120:13): [True: 24.5k, False: 2.86k]
  ------------------
 7121|  24.5k|            crv = sftk_defaultAttribute(destKey,
 7122|  24.5k|                                        sftk_attr_expand(&att->attrib));
  ------------------
  |  |  587|  24.5k|#define sftk_attr_expand(ap) (ap)->type, (ap)->pValue, (ap)->ulValueLen
  ------------------
 7123|  24.5k|            sftk_FreeAttribute(att);
 7124|  24.5k|        } else if (isData) {
  ------------------
  |  Branch (7124:20): [True: 2.86k, False: 0]
  ------------------
 7125|  2.86k|            crv = sftk_defaultAttribute(destKey, CKA_EXTRACTABLE,
  ------------------
  |  |  585|  2.86k|#define CKA_EXTRACTABLE 0x00000162UL
  ------------------
 7126|  2.86k|                                        &bTrue, sizeof(bTrue));
 7127|  2.86k|        } else {
 7128|      0|            return CKR_KEY_TYPE_INCONSISTENT;
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
 7129|      0|        }
 7130|  27.3k|        if (crv != CKR_OK)
  ------------------
  |  | 1388|  27.3k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (7130:13): [True: 0, False: 27.3k]
  ------------------
 7131|      0|            return crv;
 7132|  27.3k|    }
 7133|       |
 7134|       |    /* we should inherit the parent's always extractable/ never sensitive info,
 7135|       |     * but handleObject always forces this attributes, so we would need to do
 7136|       |     * something special. */
 7137|  27.3k|    return CKR_OK;
  ------------------
  |  | 1388|  27.3k|#define CKR_OK 0x00000000UL
  ------------------
 7138|  27.3k|}
pkcs11c.c:sftk_buildSSLKey:
 6945|  5.40k|{
 6946|  5.40k|    SFTKObject *key;
 6947|  5.40k|    SFTKSession *session;
 6948|  5.40k|    CK_KEY_TYPE keyType = CKK_GENERIC_SECRET;
  ------------------
  |  |  383|  5.40k|#define CKK_GENERIC_SECRET 0x00000010UL
  ------------------
 6949|  5.40k|    CK_BBOOL cktrue = CK_TRUE;
  ------------------
  |  |   22|  5.40k|#define CK_TRUE 1
  ------------------
 6950|  5.40k|    CK_BBOOL ckfalse = CK_FALSE;
  ------------------
  |  |   23|  5.40k|#define CK_FALSE 0
  ------------------
 6951|  5.40k|    CK_RV crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|  5.40k|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 6952|       |
 6953|       |    /*
 6954|       |     * now lets create an object to hang the attributes off of
 6955|       |     */
 6956|  5.40k|    *keyHandle = CK_INVALID_HANDLE;
  ------------------
  |  |   78|  5.40k|#define CK_INVALID_HANDLE 0
  ------------------
 6957|  5.40k|    key = sftk_NewObject(baseKey->slot);
 6958|  5.40k|    if (key == NULL)
  ------------------
  |  Branch (6958:9): [True: 0, False: 5.40k]
  ------------------
 6959|      0|        return CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 6960|  5.40k|    sftk_narrowToSessionObject(key)->wasDerived = PR_TRUE;
  ------------------
  |  |  437|  5.40k|#define PR_TRUE 1
  ------------------
 6961|       |
 6962|  5.40k|    crv = sftk_CopyObject(key, baseKey);
 6963|  5.40k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  5.40k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (6963:9): [True: 0, False: 5.40k]
  ------------------
 6964|      0|        goto loser;
 6965|  5.40k|    if (isMacKey) {
  ------------------
  |  Branch (6965:9): [True: 3.25k, False: 2.15k]
  ------------------
 6966|  3.25k|        crv = sftk_forceAttribute(key, CKA_KEY_TYPE, &keyType, sizeof(keyType));
  ------------------
  |  |  543|  3.25k|#define CKA_KEY_TYPE 0x00000100UL
  ------------------
 6967|  3.25k|        if (crv != CKR_OK)
  ------------------
  |  | 1388|  3.25k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (6967:13): [True: 0, False: 3.25k]
  ------------------
 6968|      0|            goto loser;
 6969|  3.25k|        crv = sftk_forceAttribute(key, CKA_DERIVE, &cktrue, sizeof(CK_BBOOL));
  ------------------
  |  |  555|  3.25k|#define CKA_DERIVE 0x0000010CUL
  ------------------
 6970|  3.25k|        if (crv != CKR_OK)
  ------------------
  |  | 1388|  3.25k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (6970:13): [True: 0, False: 3.25k]
  ------------------
 6971|      0|            goto loser;
 6972|  3.25k|        crv = sftk_forceAttribute(key, CKA_ENCRYPT, &ckfalse, sizeof(CK_BBOOL));
  ------------------
  |  |  547|  3.25k|#define CKA_ENCRYPT 0x00000104UL
  ------------------
 6973|  3.25k|        if (crv != CKR_OK)
  ------------------
  |  | 1388|  3.25k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (6973:13): [True: 0, False: 3.25k]
  ------------------
 6974|      0|            goto loser;
 6975|  3.25k|        crv = sftk_forceAttribute(key, CKA_DECRYPT, &ckfalse, sizeof(CK_BBOOL));
  ------------------
  |  |  548|  3.25k|#define CKA_DECRYPT 0x00000105UL
  ------------------
 6976|  3.25k|        if (crv != CKR_OK)
  ------------------
  |  | 1388|  3.25k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (6976:13): [True: 0, False: 3.25k]
  ------------------
 6977|      0|            goto loser;
 6978|  3.25k|        crv = sftk_forceAttribute(key, CKA_SIGN, &cktrue, sizeof(CK_BBOOL));
  ------------------
  |  |  551|  3.25k|#define CKA_SIGN 0x00000108UL
  ------------------
 6979|  3.25k|        if (crv != CKR_OK)
  ------------------
  |  | 1388|  3.25k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (6979:13): [True: 0, False: 3.25k]
  ------------------
 6980|      0|            goto loser;
 6981|  3.25k|        crv = sftk_forceAttribute(key, CKA_VERIFY, &cktrue, sizeof(CK_BBOOL));
  ------------------
  |  |  553|  3.25k|#define CKA_VERIFY 0x0000010AUL
  ------------------
 6982|  3.25k|        if (crv != CKR_OK)
  ------------------
  |  | 1388|  3.25k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (6982:13): [True: 0, False: 3.25k]
  ------------------
 6983|      0|            goto loser;
 6984|  3.25k|        crv = sftk_forceAttribute(key, CKA_WRAP, &ckfalse, sizeof(CK_BBOOL));
  ------------------
  |  |  549|  3.25k|#define CKA_WRAP 0x00000106UL
  ------------------
 6985|  3.25k|        if (crv != CKR_OK)
  ------------------
  |  | 1388|  3.25k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (6985:13): [True: 0, False: 3.25k]
  ------------------
 6986|      0|            goto loser;
 6987|  3.25k|        crv = sftk_forceAttribute(key, CKA_UNWRAP, &ckfalse, sizeof(CK_BBOOL));
  ------------------
  |  |  550|  3.25k|#define CKA_UNWRAP 0x00000107UL
  ------------------
 6988|  3.25k|        if (crv != CKR_OK)
  ------------------
  |  | 1388|  3.25k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (6988:13): [True: 0, False: 3.25k]
  ------------------
 6989|      0|            goto loser;
 6990|  3.25k|    }
 6991|  5.40k|    crv = sftk_forceAttribute(key, CKA_VALUE, keyBlock, keySize);
  ------------------
  |  |  516|  5.40k|#define CKA_VALUE 0x00000011UL
  ------------------
 6992|  5.40k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  5.40k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (6992:9): [True: 0, False: 5.40k]
  ------------------
 6993|      0|        goto loser;
 6994|       |
 6995|       |    /* get the session */
 6996|  5.40k|    crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|  5.40k|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 6997|  5.40k|    session = sftk_SessionFromHandle(hSession);
 6998|  5.40k|    if (session == NULL) {
  ------------------
  |  Branch (6998:9): [True: 0, False: 5.40k]
  ------------------
 6999|      0|        goto loser;
 7000|      0|    }
 7001|       |
 7002|  5.40k|    crv = sftk_handleObject(key, session);
 7003|  5.40k|    sftk_FreeSession(session);
 7004|  5.40k|    *keyHandle = key->handle;
 7005|  5.40k|loser:
 7006|  5.40k|    if (key)
  ------------------
  |  Branch (7006:9): [True: 5.40k, False: 0]
  ------------------
 7007|  5.40k|        sftk_FreeObject(key);
 7008|  5.40k|    return crv;
 7009|  5.40k|}

sftk_MapCryptError:
   40|  2.63k|{
   41|  2.63k|    switch (error) {
  ------------------
  |  Branch (41:13): [True: 14, False: 2.61k]
  ------------------
   42|      0|        case SEC_ERROR_INVALID_ARGS:
  ------------------
  |  Branch (42:9): [True: 0, False: 2.63k]
  ------------------
   43|      0|        case SEC_ERROR_BAD_DATA: /* MP_RANGE gets mapped to this */
  ------------------
  |  Branch (43:9): [True: 0, False: 2.63k]
  ------------------
   44|      0|            return CKR_ARGUMENTS_BAD;
  ------------------
  |  | 1401|      0|#define CKR_ARGUMENTS_BAD 0x00000007UL
  ------------------
   45|      0|        case SEC_ERROR_INPUT_LEN:
  ------------------
  |  Branch (45:9): [True: 0, False: 2.63k]
  ------------------
   46|      0|            return CKR_DATA_LEN_RANGE;
  ------------------
  |  | 1415|      0|#define CKR_DATA_LEN_RANGE 0x00000021UL
  ------------------
   47|      0|        case SEC_ERROR_OUTPUT_LEN:
  ------------------
  |  Branch (47:9): [True: 0, False: 2.63k]
  ------------------
   48|      0|            return CKR_BUFFER_TOO_SMALL;
  ------------------
  |  | 1514|      0|#define CKR_BUFFER_TOO_SMALL 0x00000150UL
  ------------------
   49|     71|        case SEC_ERROR_LIBRARY_FAILURE:
  ------------------
  |  Branch (49:9): [True: 71, False: 2.56k]
  ------------------
   50|     71|            return CKR_GENERAL_ERROR;
  ------------------
  |  | 1396|     71|#define CKR_GENERAL_ERROR 0x00000005UL
  ------------------
   51|      0|        case SEC_ERROR_NO_MEMORY:
  ------------------
  |  Branch (51:9): [True: 0, False: 2.63k]
  ------------------
   52|      0|            return CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
   53|  2.34k|        case SEC_ERROR_BAD_SIGNATURE:
  ------------------
  |  Branch (53:9): [True: 2.34k, False: 291]
  ------------------
   54|  2.34k|            return CKR_SIGNATURE_INVALID;
  ------------------
  |  | 1475|  2.34k|#define CKR_SIGNATURE_INVALID 0x000000C0UL
  ------------------
   55|      0|        case SEC_ERROR_INVALID_KEY:
  ------------------
  |  Branch (55:9): [True: 0, False: 2.63k]
  ------------------
   56|      0|            return CKR_KEY_SIZE_RANGE;
  ------------------
  |  | 1432|      0|#define CKR_KEY_SIZE_RANGE 0x00000062UL
  ------------------
   57|    150|        case SEC_ERROR_BAD_KEY:        /* an EC public key that fails validation */
  ------------------
  |  Branch (57:9): [True: 150, False: 2.48k]
  ------------------
   58|    150|            return CKR_KEY_SIZE_RANGE; /* the closest error code */
  ------------------
  |  | 1432|    150|#define CKR_KEY_SIZE_RANGE 0x00000062UL
  ------------------
   59|      0|        case SEC_ERROR_UNSUPPORTED_EC_POINT_FORM:
  ------------------
  |  Branch (59:9): [True: 0, False: 2.63k]
  ------------------
   60|      0|            return CKR_TEMPLATE_INCONSISTENT;
  ------------------
  |  | 1478|      0|#define CKR_TEMPLATE_INCONSISTENT 0x000000D1UL
  ------------------
   61|      0|        case SEC_ERROR_UNSUPPORTED_KEYALG:
  ------------------
  |  Branch (61:9): [True: 0, False: 2.63k]
  ------------------
   62|      0|            return CKR_MECHANISM_INVALID;
  ------------------
  |  | 1447|      0|#define CKR_MECHANISM_INVALID 0x00000070UL
  ------------------
   63|     56|        case SEC_ERROR_UNSUPPORTED_ELLIPTIC_CURVE:
  ------------------
  |  Branch (63:9): [True: 56, False: 2.57k]
  ------------------
   64|     56|            return CKR_DOMAIN_PARAMS_INVALID;
  ------------------
  |  | 1508|     56|#define CKR_DOMAIN_PARAMS_INVALID 0x00000130UL
  ------------------
   65|       |        /* key pair generation failed after max number of attempts */
   66|      0|        case SEC_ERROR_NEED_RANDOM:
  ------------------
  |  Branch (66:9): [True: 0, False: 2.63k]
  ------------------
   67|      0|            return CKR_FUNCTION_FAILED;
  ------------------
  |  | 1397|      0|#define CKR_FUNCTION_FAILED 0x00000006UL
  ------------------
   68|  2.63k|    }
   69|     14|    return CKR_DEVICE_ERROR;
  ------------------
  |  | 1416|     14|#define CKR_DEVICE_ERROR 0x00000030UL
  ------------------
   70|  2.63k|}
sftk_MapDecryptError:
   80|  10.9k|{
   81|  10.9k|    switch (error) {
   82|       |        /* usually a padding error, or aead tag mismatch */
   83|  10.9k|        case SEC_ERROR_BAD_DATA:
  ------------------
  |  Branch (83:9): [True: 10.9k, False: 0]
  ------------------
   84|  10.9k|            return CKR_ENCRYPTED_DATA_INVALID;
  ------------------
  |  | 1419|  10.9k|#define CKR_ENCRYPTED_DATA_INVALID 0x00000040UL
  ------------------
   85|      0|        default:
  ------------------
  |  Branch (85:9): [True: 0, False: 10.9k]
  ------------------
   86|      0|            return sftk_MapCryptError(error);
   87|  10.9k|    }
   88|  10.9k|}
sftk_MapVerifyError:
   96|     13|{
   97|     13|    CK_RV crv = sftk_MapCryptError(error);
   98|     13|    if (crv == CKR_DEVICE_ERROR)
  ------------------
  |  | 1416|     13|#define CKR_DEVICE_ERROR 0x00000030UL
  ------------------
  |  Branch (98:9): [True: 0, False: 13]
  ------------------
   99|      0|        crv = CKR_SIGNATURE_INVALID;
  ------------------
  |  | 1475|      0|#define CKR_SIGNATURE_INVALID 0x000000C0UL
  ------------------
  100|     13|    return crv;
  101|     13|}
sftk_FreeAttribute:
  191|  1.12M|{
  192|  1.12M|    if (attribute && attribute->freeAttr) {
  ------------------
  |  Branch (192:9): [True: 1.12M, False: 0]
  |  Branch (192:22): [True: 0, False: 1.12M]
  ------------------
  193|      0|        sftk_DestroyAttribute(attribute);
  194|      0|        return;
  195|      0|    }
  196|  1.12M|}
sftk_FindAttribute:
  261|  1.54M|{
  262|  1.54M|    SFTKAttribute *attribute;
  263|  1.54M|    SFTKSessionObject *sessObject = sftk_narrowToSessionObject(object);
  264|       |
  265|  1.54M|    if (sessObject == NULL) {
  ------------------
  |  Branch (265:9): [True: 0, False: 1.54M]
  ------------------
  266|      0|        return sftk_FindTokenAttribute(sftk_narrowToTokenObject(object), type);
  267|      0|    }
  268|       |
  269|  1.54M|    PZ_Lock(sessObject->attributeLock);
  ------------------
  |  |  245|  1.54M|#define PZ_Lock(k) PR_Lock((k))
  ------------------
  270|  1.54M|    sftkqueue_find(attribute, type, sessObject->head, sessObject->hashSize);
  ------------------
  |  |  524|  2.75M|    for ((element) = (head)[sftk_hash(id, hash_size)]; (element) != NULL; \
  |  |  ------------------
  |  |  |  |  513|  1.54M|    ((PRUint32)((value)*SHMULTIPLIER) & (size - 1))
  |  |  |  |  ------------------
  |  |  |  |  |  |  509|  1.54M|#define SHMULTIPLIER 1791398085
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (524:56): [True: 2.33M, False: 420k]
  |  |  ------------------
  |  |  525|  2.33M|         (element) = (element)->next) {                                   \
  |  |  526|  2.33M|        if ((element)->handle == (id)) {                                  \
  |  |  ------------------
  |  |  |  Branch (526:13): [True: 1.12M, False: 1.20M]
  |  |  ------------------
  |  |  527|  1.12M|            break;                                                        \
  |  |  528|  1.12M|        }                                                                 \
  |  |  529|  2.33M|    }
  ------------------
  271|  1.54M|    PZ_Unlock(sessObject->attributeLock);
  ------------------
  |  |  246|  1.54M|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  272|       |
  273|  1.54M|    return (attribute);
  274|  1.54M|}
sftk_GetLengthInBits:
  281|  15.0k|{
  282|  15.0k|    unsigned int size = bufLen * 8;
  283|  15.0k|    unsigned int i;
  284|       |
  285|       |    /* Get the real length in bytes */
  286|  15.0k|    for (i = 0; i < bufLen; i++) {
  ------------------
  |  Branch (286:17): [True: 15.0k, False: 4]
  ------------------
  287|  15.0k|        unsigned char c = *buf++;
  288|  15.0k|        if (c != 0) {
  ------------------
  |  Branch (288:13): [True: 15.0k, False: 4]
  ------------------
  289|  15.0k|            unsigned char m;
  290|  39.1k|            for (m = 0x80; m > 0; m = m >> 1) {
  ------------------
  |  Branch (290:28): [True: 39.1k, False: 0]
  ------------------
  291|  39.1k|                if ((c & m) != 0) {
  ------------------
  |  Branch (291:21): [True: 15.0k, False: 24.0k]
  ------------------
  292|  15.0k|                    break;
  293|  15.0k|                }
  294|  24.0k|                size--;
  295|  24.0k|            }
  296|  15.0k|            break;
  297|  15.0k|        }
  298|      4|        size -= 8;
  299|      4|    }
  300|  15.0k|    return size;
  301|  15.0k|}
sftk_ConstrainAttribute:
  314|  12.8k|{
  315|  12.8k|    SFTKAttribute *attribute;
  316|  12.8k|    int size;
  317|  12.8k|    unsigned char *ptr;
  318|       |
  319|  12.8k|    attribute = sftk_FindAttribute(object, type);
  320|  12.8k|    if (!attribute) {
  ------------------
  |  Branch (320:9): [True: 0, False: 12.8k]
  ------------------
  321|      0|        return CKR_TEMPLATE_INCOMPLETE;
  ------------------
  |  | 1477|      0|#define CKR_TEMPLATE_INCOMPLETE 0x000000D0UL
  ------------------
  322|      0|    }
  323|  12.8k|    ptr = (unsigned char *)attribute->attrib.pValue;
  324|  12.8k|    if (ptr == NULL) {
  ------------------
  |  Branch (324:9): [True: 0, False: 12.8k]
  ------------------
  325|      0|        sftk_FreeAttribute(attribute);
  326|      0|        return CKR_ATTRIBUTE_VALUE_INVALID;
  ------------------
  |  | 1409|      0|#define CKR_ATTRIBUTE_VALUE_INVALID 0x00000013UL
  ------------------
  327|      0|    }
  328|  12.8k|    size = sftk_GetLengthInBits(ptr, attribute->attrib.ulValueLen);
  329|  12.8k|    sftk_FreeAttribute(attribute);
  330|       |
  331|  12.8k|    if ((minLength != 0) && (size < minLength)) {
  ------------------
  |  Branch (331:9): [True: 12.8k, False: 0]
  |  Branch (331:29): [True: 7, False: 12.8k]
  ------------------
  332|      7|        return CKR_ATTRIBUTE_VALUE_INVALID;
  ------------------
  |  | 1409|      7|#define CKR_ATTRIBUTE_VALUE_INVALID 0x00000013UL
  ------------------
  333|      7|    }
  334|  12.8k|    if ((maxLength != 0) && (size > maxLength)) {
  ------------------
  |  Branch (334:9): [True: 7.95k, False: 4.85k]
  |  Branch (334:29): [True: 0, False: 7.95k]
  ------------------
  335|      0|        return CKR_ATTRIBUTE_VALUE_INVALID;
  ------------------
  |  | 1409|      0|#define CKR_ATTRIBUTE_VALUE_INVALID 0x00000013UL
  ------------------
  336|      0|    }
  337|  12.8k|    if ((minMultiple != 0) && ((size % minMultiple) != 0)) {
  ------------------
  |  Branch (337:9): [True: 1.14k, False: 11.6k]
  |  Branch (337:31): [True: 3, False: 1.13k]
  ------------------
  338|      3|        return CKR_ATTRIBUTE_VALUE_INVALID;
  ------------------
  |  | 1409|      3|#define CKR_ATTRIBUTE_VALUE_INVALID 0x00000013UL
  ------------------
  339|      3|    }
  340|  12.8k|    return CKR_OK;
  ------------------
  |  | 1388|  12.8k|#define CKR_OK 0x00000000UL
  ------------------
  341|  12.8k|}
sftk_hasAttribute:
  367|  1.28M|{
  368|  1.28M|    SFTKAttribute *attribute;
  369|  1.28M|    SFTKSessionObject *sessObject = sftk_narrowToSessionObject(object);
  370|       |
  371|  1.28M|    if (sessObject == NULL) {
  ------------------
  |  Branch (371:9): [True: 0, False: 1.28M]
  ------------------
  372|      0|        return sftk_hasAttributeToken(sftk_narrowToTokenObject(object), type);
  373|      0|    }
  374|       |
  375|  1.28M|    PZ_Lock(sessObject->attributeLock);
  ------------------
  |  |  245|  1.28M|#define PZ_Lock(k) PR_Lock((k))
  ------------------
  376|  1.28M|    sftkqueue_find(attribute, type, sessObject->head, sessObject->hashSize);
  ------------------
  |  |  524|  2.09M|    for ((element) = (head)[sftk_hash(id, hash_size)]; (element) != NULL; \
  |  |  ------------------
  |  |  |  |  513|  1.28M|    ((PRUint32)((value)*SHMULTIPLIER) & (size - 1))
  |  |  |  |  ------------------
  |  |  |  |  |  |  509|  1.28M|#define SHMULTIPLIER 1791398085
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (524:56): [True: 1.24M, False: 853k]
  |  |  ------------------
  |  |  525|  1.28M|         (element) = (element)->next) {                                   \
  |  |  526|  1.24M|        if ((element)->handle == (id)) {                                  \
  |  |  ------------------
  |  |  |  Branch (526:13): [True: 430k, False: 812k]
  |  |  ------------------
  |  |  527|   430k|            break;                                                        \
  |  |  528|   430k|        }                                                                 \
  |  |  529|  1.24M|    }
  ------------------
  377|  1.28M|    PZ_Unlock(sessObject->attributeLock);
  ------------------
  |  |  246|  1.28M|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  378|       |
  379|  1.28M|    return (PRBool)(attribute != NULL);
  380|  1.28M|}
sftk_Attribute2SSecItem:
  405|  66.5k|{
  406|  66.5k|    SFTKAttribute *attribute;
  407|       |
  408|  66.5k|    item->data = NULL;
  409|       |
  410|  66.5k|    attribute = sftk_FindAttribute(object, type);
  411|  66.5k|    if (attribute == NULL)
  ------------------
  |  Branch (411:9): [True: 0, False: 66.5k]
  ------------------
  412|      0|        return CKR_TEMPLATE_INCOMPLETE;
  ------------------
  |  | 1477|      0|#define CKR_TEMPLATE_INCOMPLETE 0x000000D0UL
  ------------------
  413|       |
  414|  66.5k|    (void)SECITEM_AllocItem(arena, item, attribute->attrib.ulValueLen);
  ------------------
  |  |  103|  66.5k|#define SECITEM_AllocItem SECITEM_AllocItem_Util
  ------------------
  415|  66.5k|    if (item->data == NULL) {
  ------------------
  |  Branch (415:9): [True: 0, False: 66.5k]
  ------------------
  416|      0|        sftk_FreeAttribute(attribute);
  417|      0|        return CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
  418|      0|    }
  419|  66.5k|    PORT_Memcpy(item->data, attribute->attrib.pValue, item->len);
  ------------------
  |  |  180|  66.5k|#define PORT_Memcpy memcpy
  ------------------
  420|  66.5k|    sftk_FreeAttribute(attribute);
  421|  66.5k|    return CKR_OK;
  ------------------
  |  | 1388|  66.5k|#define CKR_OK 0x00000000UL
  ------------------
  422|  66.5k|}
sftk_MultipleAttribute2SecItem:
  431|  1.13k|{
  432|       |
  433|  1.13k|    CK_RV crv = CKR_OK;
  ------------------
  |  | 1388|  1.13k|#define CKR_OK 0x00000000UL
  ------------------
  434|  1.13k|    CK_ATTRIBUTE templateSpace[SFTK_MAX_ITEM_TEMPLATE];
  435|  1.13k|    CK_ATTRIBUTE *template;
  436|  1.13k|    SFTKTokenObject *tokObject;
  437|  1.13k|    SFTKDBHandle *dbHandle = NULL;
  438|  1.13k|    int i;
  439|       |
  440|  1.13k|    tokObject = sftk_narrowToTokenObject(object);
  441|       |
  442|       |    /* session objects, just loop through the list */
  443|  1.13k|    if (tokObject == NULL) {
  ------------------
  |  Branch (443:9): [True: 1.13k, False: 0]
  ------------------
  444|  4.52k|        for (i = 0; i < itemTemplateCount; i++) {
  ------------------
  |  Branch (444:21): [True: 3.39k, False: 1.13k]
  ------------------
  445|  3.39k|            crv = sftk_Attribute2SecItem(arena, itemTemplate[i].item, object,
  446|  3.39k|                                         itemTemplate[i].type);
  447|  3.39k|            if (crv != CKR_OK) {
  ------------------
  |  | 1388|  3.39k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (447:17): [True: 0, False: 3.39k]
  ------------------
  448|      0|                return crv;
  449|      0|            }
  450|  3.39k|        }
  451|  1.13k|        return CKR_OK;
  ------------------
  |  | 1388|  1.13k|#define CKR_OK 0x00000000UL
  ------------------
  452|  1.13k|    }
  453|       |
  454|       |    /* don't do any work if none is required */
  455|      0|    if (itemTemplateCount == 0) {
  ------------------
  |  Branch (455:9): [True: 0, False: 0]
  ------------------
  456|      0|        return CKR_OK;
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  457|      0|    }
  458|       |
  459|       |    /* don't allocate the template unless we need it */
  460|      0|    if (itemTemplateCount > SFTK_MAX_ITEM_TEMPLATE) {
  ------------------
  |  |  468|      0|#define SFTK_MAX_ITEM_TEMPLATE 10
  ------------------
  |  Branch (460:9): [True: 0, False: 0]
  ------------------
  461|      0|        template = PORT_NewArray(CK_ATTRIBUTE, itemTemplateCount);
  ------------------
  |  |  157|      0|    (type *)PORT_Alloc(sizeof(type) * (num))
  |  |  ------------------
  |  |  |  |   52|      0|#define PORT_Alloc PORT_Alloc_Util
  |  |  ------------------
  ------------------
  462|      0|    } else {
  463|      0|        template = templateSpace;
  464|      0|    }
  465|       |
  466|      0|    if (template == NULL) {
  ------------------
  |  Branch (466:9): [True: 0, False: 0]
  ------------------
  467|      0|        crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
  468|      0|        goto loser;
  469|      0|    }
  470|       |
  471|      0|    dbHandle = sftk_getDBForTokenObject(object->slot, object->handle);
  472|      0|    if (dbHandle == NULL) {
  ------------------
  |  Branch (472:9): [True: 0, False: 0]
  ------------------
  473|      0|        crv = CKR_OBJECT_HANDLE_INVALID;
  ------------------
  |  | 1452|      0|#define CKR_OBJECT_HANDLE_INVALID 0x00000082UL
  ------------------
  474|      0|        goto loser;
  475|      0|    }
  476|       |
  477|       |    /* set up the PKCS #11 template */
  478|      0|    for (i = 0; i < itemTemplateCount; i++) {
  ------------------
  |  Branch (478:17): [True: 0, False: 0]
  ------------------
  479|      0|        template[i].type = itemTemplate[i].type;
  480|      0|        template[i].pValue = NULL;
  481|      0|        template[i].ulValueLen = 0;
  482|      0|    }
  483|       |
  484|       |    /* fetch the attribute lengths */
  485|      0|    crv = sftkdb_GetAttributeValue(dbHandle, object->handle,
  486|      0|                                   template, itemTemplateCount);
  487|      0|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (487:9): [True: 0, False: 0]
  ------------------
  488|      0|        goto loser;
  489|      0|    }
  490|       |
  491|       |    /* allocate space for the attributes */
  492|      0|    for (i = 0; i < itemTemplateCount; i++) {
  ------------------
  |  Branch (492:17): [True: 0, False: 0]
  ------------------
  493|      0|        template[i].pValue = PORT_ArenaAlloc(arena, template[i].ulValueLen);
  ------------------
  |  |   53|      0|#define PORT_ArenaAlloc PORT_ArenaAlloc_Util
  ------------------
  494|      0|        if (template[i].pValue == NULL) {
  ------------------
  |  Branch (494:13): [True: 0, False: 0]
  ------------------
  495|      0|            crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
  496|      0|            goto loser;
  497|      0|        }
  498|      0|    }
  499|       |
  500|       |    /* fetch the attributes */
  501|      0|    crv = sftkdb_GetAttributeValue(dbHandle, object->handle,
  502|      0|                                   template, itemTemplateCount);
  503|      0|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (503:9): [True: 0, False: 0]
  ------------------
  504|      0|        goto loser;
  505|      0|    }
  506|       |
  507|       |    /* Fill in the items */
  508|      0|    for (i = 0; i < itemTemplateCount; i++) {
  ------------------
  |  Branch (508:17): [True: 0, False: 0]
  ------------------
  509|      0|        itemTemplate[i].item->data = template[i].pValue;
  510|      0|        itemTemplate[i].item->len = template[i].ulValueLen;
  511|      0|    }
  512|       |
  513|      0|loser:
  514|      0|    if (template != templateSpace) {
  ------------------
  |  Branch (514:9): [True: 0, False: 0]
  ------------------
  515|      0|        PORT_Free(template);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
  516|      0|    }
  517|      0|    if (dbHandle) {
  ------------------
  |  Branch (517:9): [True: 0, False: 0]
  ------------------
  518|      0|        sftk_freeDB(dbHandle);
  519|      0|    }
  520|       |
  521|      0|    return crv;
  522|      0|}
sftk_isTrue:
  550|   483k|{
  551|   483k|    SFTKAttribute *attribute;
  552|   483k|    PRBool tok = PR_FALSE;
  ------------------
  |  |  438|   483k|#define PR_FALSE 0
  ------------------
  553|       |
  554|   483k|    attribute = sftk_FindAttribute(object, type);
  555|   483k|    if (attribute == NULL) {
  ------------------
  |  Branch (555:9): [True: 80.3k, False: 403k]
  ------------------
  556|  80.3k|        return PR_FALSE;
  ------------------
  |  |  438|  80.3k|#define PR_FALSE 0
  ------------------
  557|  80.3k|    }
  558|   403k|    tok = (PRBool)(*(CK_BBOOL *)attribute->attrib.pValue);
  559|   403k|    sftk_FreeAttribute(attribute);
  560|       |
  561|   403k|    return tok;
  562|   483k|}
sftk_forceAttribute:
  621|   238k|{
  622|   238k|    SFTKAttribute *attribute;
  623|   238k|    void *att_val = NULL;
  624|   238k|    PRBool freeData = PR_FALSE;
  ------------------
  |  |  438|   238k|#define PR_FALSE 0
  ------------------
  625|       |
  626|   238k|    PORT_Assert(object);
  ------------------
  |  |  120|   238k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|   238k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 238k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  627|   238k|    PORT_Assert(object->refCount);
  ------------------
  |  |  120|   238k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|   238k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 238k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  628|   238k|    PORT_Assert(object->slot);
  ------------------
  |  |  120|   238k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|   238k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 238k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  629|   238k|    if (!object ||
  ------------------
  |  Branch (629:9): [True: 0, False: 238k]
  ------------------
  630|   238k|        !object->refCount ||
  ------------------
  |  Branch (630:9): [True: 0, False: 238k]
  ------------------
  631|   238k|        !object->slot) {
  ------------------
  |  Branch (631:9): [True: 0, False: 238k]
  ------------------
  632|      0|        return CKR_DEVICE_ERROR;
  ------------------
  |  | 1416|      0|#define CKR_DEVICE_ERROR 0x00000030UL
  ------------------
  633|      0|    }
  634|   238k|    if (sftk_isToken(object->handle)) {
  ------------------
  |  |  504|   238k|#define sftk_isToken(id) (((id)&SFTK_TOKEN_MASK) == SFTK_TOKEN_MAGIC)
  |  |  ------------------
  |  |  |  |  478|   238k|#define SFTK_TOKEN_MASK 0x80000000L
  |  |  ------------------
  |  |               #define sftk_isToken(id) (((id)&SFTK_TOKEN_MASK) == SFTK_TOKEN_MAGIC)
  |  |  ------------------
  |  |  |  |  479|   238k|#define SFTK_TOKEN_MAGIC 0x80000000L
  |  |  ------------------
  |  |  |  Branch (504:26): [True: 0, False: 238k]
  |  |  ------------------
  ------------------
  635|      0|        return sftk_forceTokenAttribute(object, type, value, len);
  636|      0|    }
  637|   238k|    attribute = sftk_FindAttribute(object, type);
  638|   238k|    if (attribute == NULL)
  ------------------
  |  Branch (638:9): [True: 172k, False: 65.6k]
  ------------------
  639|   172k|        return sftk_AddAttributeType(object, type, value, len);
  640|       |
  641|  65.6k|    if (value) {
  ------------------
  |  Branch (641:9): [True: 65.6k, False: 0]
  ------------------
  642|  65.6k|        if (len <= ATTR_SPACE) {
  ------------------
  |  |   39|  65.6k|#define ATTR_SPACE 50     /* Maximum size of attribute data before extra \
  ------------------
  |  Branch (642:13): [True: 65.6k, False: 0]
  ------------------
  643|  65.6k|            att_val = attribute->space;
  644|  65.6k|        } else {
  645|      0|            att_val = PORT_Alloc(len);
  ------------------
  |  |   52|      0|#define PORT_Alloc PORT_Alloc_Util
  ------------------
  646|      0|            freeData = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  647|      0|        }
  648|  65.6k|        if (att_val == NULL) {
  ------------------
  |  Branch (648:13): [True: 0, False: 65.6k]
  ------------------
  649|      0|            return CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
  650|      0|        }
  651|  65.6k|        if (attribute->attrib.pValue == att_val) {
  ------------------
  |  Branch (651:13): [True: 55.9k, False: 9.67k]
  ------------------
  652|  55.9k|            PORT_Memset(attribute->attrib.pValue, 0,
  ------------------
  |  |  182|  55.9k|#define PORT_Memset memset
  ------------------
  653|  55.9k|                        attribute->attrib.ulValueLen);
  654|  55.9k|        }
  655|  65.6k|        PORT_Memcpy(att_val, value, len);
  ------------------
  |  |  180|  65.6k|#define PORT_Memcpy memcpy
  ------------------
  656|  65.6k|    }
  657|  65.6k|    if (attribute->attrib.pValue != NULL) {
  ------------------
  |  Branch (657:9): [True: 55.9k, False: 9.67k]
  ------------------
  658|  55.9k|        if (attribute->attrib.pValue != att_val) {
  ------------------
  |  Branch (658:13): [True: 0, False: 55.9k]
  ------------------
  659|      0|            PORT_Memset(attribute->attrib.pValue, 0,
  ------------------
  |  |  182|      0|#define PORT_Memset memset
  ------------------
  660|      0|                        attribute->attrib.ulValueLen);
  661|      0|        }
  662|  55.9k|        if (attribute->freeData) {
  ------------------
  |  Branch (662:13): [True: 0, False: 55.9k]
  ------------------
  663|      0|            PORT_Free(attribute->attrib.pValue);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
  664|      0|        }
  665|  55.9k|        attribute->freeData = PR_FALSE;
  ------------------
  |  |  438|  55.9k|#define PR_FALSE 0
  ------------------
  666|  55.9k|        attribute->attrib.pValue = NULL;
  667|  55.9k|        attribute->attrib.ulValueLen = 0;
  668|  55.9k|    }
  669|  65.6k|    if (att_val) {
  ------------------
  |  Branch (669:9): [True: 65.6k, False: 0]
  ------------------
  670|  65.6k|        attribute->attrib.pValue = att_val;
  671|  65.6k|        attribute->attrib.ulValueLen = len;
  672|  65.6k|        attribute->freeData = freeData;
  673|  65.6k|    }
  674|  65.6k|    sftk_FreeAttribute(attribute);
  675|  65.6k|    return CKR_OK;
  ------------------
  |  | 1388|  65.6k|#define CKR_OK 0x00000000UL
  ------------------
  676|  65.6k|}
sftk_modifyType:
  721|  9.67k|{
  722|       |    /* if we don't know about it, user user defined, always allow modify */
  723|  9.67k|    SFTKModifyType mtype = SFTK_ALWAYS;
  724|       |
  725|  9.67k|    switch (type) {
  726|       |        /* NEVER */
  727|      0|        case CKA_CLASS:
  ------------------
  |  |  511|      0|#define CKA_CLASS 0x00000000UL
  ------------------
  |  Branch (727:9): [True: 0, False: 9.67k]
  ------------------
  728|      0|        case CKA_CERTIFICATE_TYPE:
  ------------------
  |  |  521|      0|#define CKA_CERTIFICATE_TYPE 0x00000080UL
  ------------------
  |  Branch (728:9): [True: 0, False: 9.67k]
  ------------------
  729|      0|        case CKA_KEY_TYPE:
  ------------------
  |  |  543|      0|#define CKA_KEY_TYPE 0x00000100UL
  ------------------
  |  Branch (729:9): [True: 0, False: 9.67k]
  ------------------
  730|      0|        case CKA_MODULUS:
  ------------------
  |  |  558|      0|#define CKA_MODULUS 0x00000120UL
  ------------------
  |  Branch (730:9): [True: 0, False: 9.67k]
  ------------------
  731|      0|        case CKA_MODULUS_BITS:
  ------------------
  |  |  559|      0|#define CKA_MODULUS_BITS 0x00000121UL
  ------------------
  |  Branch (731:9): [True: 0, False: 9.67k]
  ------------------
  732|      0|        case CKA_PUBLIC_EXPONENT:
  ------------------
  |  |  560|      0|#define CKA_PUBLIC_EXPONENT 0x00000122UL
  ------------------
  |  Branch (732:9): [True: 0, False: 9.67k]
  ------------------
  733|      0|        case CKA_PRIVATE_EXPONENT:
  ------------------
  |  |  561|      0|#define CKA_PRIVATE_EXPONENT 0x00000123UL
  ------------------
  |  Branch (733:9): [True: 0, False: 9.67k]
  ------------------
  734|      0|        case CKA_PRIME:
  ------------------
  |  |  569|      0|#define CKA_PRIME 0x00000130UL
  ------------------
  |  Branch (734:9): [True: 0, False: 9.67k]
  ------------------
  735|      0|        case CKA_BASE:
  ------------------
  |  |  571|      0|#define CKA_BASE 0x00000132UL
  ------------------
  |  Branch (735:9): [True: 0, False: 9.67k]
  ------------------
  736|      0|        case CKA_PRIME_1:
  ------------------
  |  |  562|      0|#define CKA_PRIME_1 0x00000124UL
  ------------------
  |  Branch (736:9): [True: 0, False: 9.67k]
  ------------------
  737|      0|        case CKA_PRIME_2:
  ------------------
  |  |  563|      0|#define CKA_PRIME_2 0x00000125UL
  ------------------
  |  Branch (737:9): [True: 0, False: 9.67k]
  ------------------
  738|      0|        case CKA_EXPONENT_1:
  ------------------
  |  |  564|      0|#define CKA_EXPONENT_1 0x00000126UL
  ------------------
  |  Branch (738:9): [True: 0, False: 9.67k]
  ------------------
  739|      0|        case CKA_EXPONENT_2:
  ------------------
  |  |  565|      0|#define CKA_EXPONENT_2 0x00000127UL
  ------------------
  |  Branch (739:9): [True: 0, False: 9.67k]
  ------------------
  740|      0|        case CKA_COEFFICIENT:
  ------------------
  |  |  566|      0|#define CKA_COEFFICIENT 0x00000128UL
  ------------------
  |  Branch (740:9): [True: 0, False: 9.67k]
  ------------------
  741|      0|        case CKA_VALUE_LEN:
  ------------------
  |  |  580|      0|#define CKA_VALUE_LEN 0x00000161UL
  ------------------
  |  Branch (741:9): [True: 0, False: 9.67k]
  ------------------
  742|      0|        case CKA_ALWAYS_SENSITIVE:
  ------------------
  |  |  588|      0|#define CKA_ALWAYS_SENSITIVE 0x00000165UL
  ------------------
  |  Branch (742:9): [True: 0, False: 9.67k]
  ------------------
  743|      0|        case CKA_NEVER_EXTRACTABLE:
  ------------------
  |  |  587|      0|#define CKA_NEVER_EXTRACTABLE 0x00000164UL
  ------------------
  |  Branch (743:9): [True: 0, False: 9.67k]
  ------------------
  744|      0|        case CKA_NSS_DB:
  ------------------
  |  |  150|      0|#define CKA_NSS_DB 0xD5A0DB00L
  ------------------
  |  Branch (744:9): [True: 0, False: 9.67k]
  ------------------
  745|      0|            mtype = SFTK_NEVER;
  746|      0|            break;
  747|       |
  748|       |        /* ONCOPY */
  749|      0|        case CKA_TOKEN:
  ------------------
  |  |  512|      0|#define CKA_TOKEN 0x00000001UL
  ------------------
  |  Branch (749:9): [True: 0, False: 9.67k]
  ------------------
  750|      0|        case CKA_PRIVATE:
  ------------------
  |  |  513|      0|#define CKA_PRIVATE 0x00000002UL
  ------------------
  |  Branch (750:9): [True: 0, False: 9.67k]
  ------------------
  751|      0|        case CKA_MODIFIABLE:
  ------------------
  |  |  593|      0|#define CKA_MODIFIABLE 0x00000170UL
  ------------------
  |  Branch (751:9): [True: 0, False: 9.67k]
  ------------------
  752|      0|            mtype = SFTK_ONCOPY;
  753|      0|            break;
  754|       |
  755|       |        /* SENSITIVE */
  756|      0|        case CKA_SENSITIVE:
  ------------------
  |  |  546|      0|#define CKA_SENSITIVE 0x00000103UL
  ------------------
  |  Branch (756:9): [True: 0, False: 9.67k]
  ------------------
  757|      0|        case CKA_EXTRACTABLE:
  ------------------
  |  |  585|      0|#define CKA_EXTRACTABLE 0x00000162UL
  ------------------
  |  Branch (757:9): [True: 0, False: 9.67k]
  ------------------
  758|      0|            mtype = SFTK_SENSITIVE;
  759|      0|            break;
  760|       |
  761|       |        /* ALWAYS */
  762|      0|        case CKA_LABEL:
  ------------------
  |  |  514|      0|#define CKA_LABEL 0x00000003UL
  ------------------
  |  Branch (762:9): [True: 0, False: 9.67k]
  ------------------
  763|      0|        case CKA_APPLICATION:
  ------------------
  |  |  515|      0|#define CKA_APPLICATION 0x00000010UL
  ------------------
  |  Branch (763:9): [True: 0, False: 9.67k]
  ------------------
  764|  9.67k|        case CKA_ID:
  ------------------
  |  |  545|  9.67k|#define CKA_ID 0x00000102UL
  ------------------
  |  Branch (764:9): [True: 9.67k, False: 0]
  ------------------
  765|  9.67k|        case CKA_SERIAL_NUMBER:
  ------------------
  |  |  523|  9.67k|#define CKA_SERIAL_NUMBER 0x00000082UL
  ------------------
  |  Branch (765:9): [True: 0, False: 9.67k]
  ------------------
  766|  9.67k|        case CKA_START_DATE:
  ------------------
  |  |  556|  9.67k|#define CKA_START_DATE 0x00000110UL
  ------------------
  |  Branch (766:9): [True: 0, False: 9.67k]
  ------------------
  767|  9.67k|        case CKA_END_DATE:
  ------------------
  |  |  557|  9.67k|#define CKA_END_DATE 0x00000111UL
  ------------------
  |  Branch (767:9): [True: 0, False: 9.67k]
  ------------------
  768|  9.67k|        case CKA_DERIVE:
  ------------------
  |  |  555|  9.67k|#define CKA_DERIVE 0x0000010CUL
  ------------------
  |  Branch (768:9): [True: 0, False: 9.67k]
  ------------------
  769|  9.67k|        case CKA_ENCRYPT:
  ------------------
  |  |  547|  9.67k|#define CKA_ENCRYPT 0x00000104UL
  ------------------
  |  Branch (769:9): [True: 0, False: 9.67k]
  ------------------
  770|  9.67k|        case CKA_DECRYPT:
  ------------------
  |  |  548|  9.67k|#define CKA_DECRYPT 0x00000105UL
  ------------------
  |  Branch (770:9): [True: 0, False: 9.67k]
  ------------------
  771|  9.67k|        case CKA_SIGN:
  ------------------
  |  |  551|  9.67k|#define CKA_SIGN 0x00000108UL
  ------------------
  |  Branch (771:9): [True: 0, False: 9.67k]
  ------------------
  772|  9.67k|        case CKA_VERIFY:
  ------------------
  |  |  553|  9.67k|#define CKA_VERIFY 0x0000010AUL
  ------------------
  |  Branch (772:9): [True: 0, False: 9.67k]
  ------------------
  773|  9.67k|        case CKA_SIGN_RECOVER:
  ------------------
  |  |  552|  9.67k|#define CKA_SIGN_RECOVER 0x00000109UL
  ------------------
  |  Branch (773:9): [True: 0, False: 9.67k]
  ------------------
  774|  9.67k|        case CKA_VERIFY_RECOVER:
  ------------------
  |  |  554|  9.67k|#define CKA_VERIFY_RECOVER 0x0000010BUL
  ------------------
  |  Branch (774:9): [True: 0, False: 9.67k]
  ------------------
  775|  9.67k|        case CKA_WRAP:
  ------------------
  |  |  549|  9.67k|#define CKA_WRAP 0x00000106UL
  ------------------
  |  Branch (775:9): [True: 0, False: 9.67k]
  ------------------
  776|  9.67k|        case CKA_UNWRAP:
  ------------------
  |  |  550|  9.67k|#define CKA_UNWRAP 0x00000107UL
  ------------------
  |  Branch (776:9): [True: 0, False: 9.67k]
  ------------------
  777|  9.67k|            mtype = SFTK_ALWAYS;
  778|  9.67k|            break;
  779|       |
  780|       |        /* DEPENDS ON CLASS */
  781|      0|        case CKA_VALUE:
  ------------------
  |  |  516|      0|#define CKA_VALUE 0x00000011UL
  ------------------
  |  Branch (781:9): [True: 0, False: 9.67k]
  ------------------
  782|      0|            mtype = (inClass == CKO_DATA) ? SFTK_ALWAYS : SFTK_NEVER;
  ------------------
  |  |  325|      0|#define CKO_DATA 0x00000000UL
  ------------------
  |  Branch (782:21): [True: 0, False: 0]
  ------------------
  783|      0|            break;
  784|       |
  785|      0|        case CKA_SUBPRIME:
  ------------------
  |  |  570|      0|#define CKA_SUBPRIME 0x00000131UL
  ------------------
  |  Branch (785:9): [True: 0, False: 9.67k]
  ------------------
  786|       |            /* allow the CKA_SUBPRIME to be added to dh private keys */
  787|      0|            mtype = (inClass == CKO_PRIVATE_KEY) ? SFTK_ALWAYS : SFTK_NEVER;
  ------------------
  |  |  328|      0|#define CKO_PRIVATE_KEY 0x00000003UL
  ------------------
  |  Branch (787:21): [True: 0, False: 0]
  ------------------
  788|      0|            break;
  789|       |
  790|      0|        case CKA_SUBJECT:
  ------------------
  |  |  544|      0|#define CKA_SUBJECT 0x00000101UL
  ------------------
  |  Branch (790:9): [True: 0, False: 9.67k]
  ------------------
  791|      0|            mtype = (inClass == CKO_CERTIFICATE) ? SFTK_NEVER : SFTK_ALWAYS;
  ------------------
  |  |  326|      0|#define CKO_CERTIFICATE 0x00000001UL
  ------------------
  |  Branch (791:21): [True: 0, False: 0]
  ------------------
  792|      0|            break;
  793|      0|        default:
  ------------------
  |  Branch (793:9): [True: 0, False: 9.67k]
  ------------------
  794|      0|            break;
  795|  9.67k|    }
  796|  9.67k|    return mtype;
  797|  9.67k|}
sftk_Attribute2SecItem:
  832|  5.27k|{
  833|  5.27k|    int len;
  834|  5.27k|    SFTKAttribute *attribute;
  835|       |
  836|  5.27k|    attribute = sftk_FindAttribute(object, type);
  837|  5.27k|    if (attribute == NULL)
  ------------------
  |  Branch (837:9): [True: 0, False: 5.27k]
  ------------------
  838|      0|        return CKR_TEMPLATE_INCOMPLETE;
  ------------------
  |  | 1477|      0|#define CKR_TEMPLATE_INCOMPLETE 0x000000D0UL
  ------------------
  839|  5.27k|    len = attribute->attrib.ulValueLen;
  840|       |
  841|  5.27k|    if (arena) {
  ------------------
  |  Branch (841:9): [True: 3.39k, False: 1.88k]
  ------------------
  842|  3.39k|        item->data = (unsigned char *)PORT_ArenaAlloc(arena, len);
  ------------------
  |  |   53|  3.39k|#define PORT_ArenaAlloc PORT_ArenaAlloc_Util
  ------------------
  843|  3.39k|    } else {
  844|  1.88k|        item->data = (unsigned char *)PORT_Alloc(len);
  ------------------
  |  |   52|  1.88k|#define PORT_Alloc PORT_Alloc_Util
  ------------------
  845|  1.88k|    }
  846|  5.27k|    if (item->data == NULL) {
  ------------------
  |  Branch (846:9): [True: 0, False: 5.27k]
  ------------------
  847|      0|        sftk_FreeAttribute(attribute);
  848|      0|        return CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
  849|      0|    }
  850|  5.27k|    item->len = len;
  851|  5.27k|    PORT_Memcpy(item->data, attribute->attrib.pValue, len);
  ------------------
  |  |  180|  5.27k|#define PORT_Memcpy memcpy
  ------------------
  852|  5.27k|    sftk_FreeAttribute(attribute);
  853|  5.27k|    return CKR_OK;
  ------------------
  |  | 1388|  5.27k|#define CKR_OK 0x00000000UL
  ------------------
  854|  5.27k|}
sftk_GetULongAttribute:
  859|  53.1k|{
  860|  53.1k|    SFTKAttribute *attribute;
  861|       |
  862|  53.1k|    attribute = sftk_FindAttribute(object, type);
  863|  53.1k|    if (attribute == NULL)
  ------------------
  |  Branch (863:9): [True: 0, False: 53.1k]
  ------------------
  864|      0|        return CKR_TEMPLATE_INCOMPLETE;
  ------------------
  |  | 1477|      0|#define CKR_TEMPLATE_INCOMPLETE 0x000000D0UL
  ------------------
  865|       |
  866|  53.1k|    if (attribute->attrib.ulValueLen != sizeof(CK_ULONG)) {
  ------------------
  |  Branch (866:9): [True: 0, False: 53.1k]
  ------------------
  867|      0|        return CKR_ATTRIBUTE_VALUE_INVALID;
  ------------------
  |  | 1409|      0|#define CKR_ATTRIBUTE_VALUE_INVALID 0x00000013UL
  ------------------
  868|      0|    }
  869|       |
  870|  53.1k|    *longData = *(CK_ULONG *)attribute->attrib.pValue;
  871|  53.1k|    sftk_FreeAttribute(attribute);
  872|  53.1k|    return CKR_OK;
  ------------------
  |  | 1388|  53.1k|#define CKR_OK 0x00000000UL
  ------------------
  873|  53.1k|}
sftk_DeleteAttributeType:
  877|   106k|{
  878|   106k|    SFTKAttribute *attribute;
  879|   106k|    attribute = sftk_FindAttribute(object, type);
  880|   106k|    if (attribute == NULL)
  ------------------
  |  Branch (880:9): [True: 106k, False: 0]
  ------------------
  881|   106k|        return;
  882|      0|    sftk_DeleteAttribute(object, attribute);
  883|      0|    sftk_DestroyAttribute(attribute);
  884|      0|}
sftk_AddAttributeType:
  889|  1.44M|{
  890|  1.44M|    SFTKAttribute *attribute;
  891|  1.44M|    attribute = sftk_NewAttribute(object, type, valPtr, length);
  892|  1.44M|    if (attribute == NULL) {
  ------------------
  |  Branch (892:9): [True: 0, False: 1.44M]
  ------------------
  893|      0|        return CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
  894|      0|    }
  895|  1.44M|    sftk_AddAttribute(object, attribute);
  896|  1.44M|    return CKR_OK;
  ------------------
  |  | 1388|  1.44M|#define CKR_OK 0x00000000UL
  ------------------
  897|  1.44M|}
SFTK_ClearTokenKeyHashTable:
  938|      2|{
  939|      2|    sftk_tokenKeyLock(slot);
  940|      2|    PORT_Assert(!slot->present);
  ------------------
  |  |  120|      2|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      2|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 2, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  941|      2|    PL_HashTableEnumerateEntries(slot->tokObjHashTable, sftk_freeHashItem, NULL);
  942|      2|    sftk_tokenKeyUnlock(slot);
  943|      2|    return CKR_OK;
  ------------------
  |  | 1388|      2|#define CKR_OK 0x00000000UL
  ------------------
  944|      2|}
sftk_GetObjectFromList:
  953|  71.5k|{
  954|  71.5k|    SFTKObject *object;
  955|  71.5k|    int size = 0;
  956|       |
  957|  71.5k|    if (!optimizeSpace) {
  ------------------
  |  Branch (957:9): [True: 0, False: 71.5k]
  ------------------
  958|      0|        PZ_Lock(list->lock);
  ------------------
  |  |  245|      0|#define PZ_Lock(k) PR_Lock((k))
  ------------------
  959|      0|        object = list->head;
  960|      0|        if (object) {
  ------------------
  |  Branch (960:13): [True: 0, False: 0]
  ------------------
  961|      0|            list->head = object->next;
  962|      0|            list->count--;
  963|      0|        }
  964|      0|        PZ_Unlock(list->lock);
  ------------------
  |  |  246|      0|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  965|      0|        if (object) {
  ------------------
  |  Branch (965:13): [True: 0, False: 0]
  ------------------
  966|       |            // As a safeguard against misuse of the library, ensure we don't
  967|       |            // hand out live objects that somehow land in the free list.
  968|      0|            PORT_Assert(object->refCount == 0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  969|      0|            if (object->refCount == 0) {
  ------------------
  |  Branch (969:17): [True: 0, False: 0]
  ------------------
  970|      0|                object->next = object->prev = NULL;
  971|      0|                *hasLocks = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  972|      0|                return object;
  973|      0|            }
  974|      0|        }
  975|      0|    }
  976|  71.5k|    size = isSessionObject ? sizeof(SFTKSessionObject) + hashSize * sizeof(SFTKAttribute *) : sizeof(SFTKTokenObject);
  ------------------
  |  Branch (976:12): [True: 71.5k, False: 0]
  ------------------
  977|       |
  978|  71.5k|    object = (SFTKObject *)PORT_ZAlloc(size);
  ------------------
  |  |   72|  71.5k|#define PORT_ZAlloc PORT_ZAlloc_Util
  ------------------
  979|  71.5k|    if (isSessionObject && object) {
  ------------------
  |  Branch (979:9): [True: 71.5k, False: 0]
  |  Branch (979:28): [True: 71.5k, False: 0]
  ------------------
  980|  71.5k|        ((SFTKSessionObject *)object)->hashSize = hashSize;
  981|  71.5k|    }
  982|  71.5k|    *hasLocks = PR_FALSE;
  ------------------
  |  |  438|  71.5k|#define PR_FALSE 0
  ------------------
  983|  71.5k|    return object;
  984|  71.5k|}
sftk_InitFreeLists:
 1039|      1|{
 1040|      1|    sftk_InitFreeList(&sessionObjectList);
 1041|      1|    sftk_InitFreeList(&tokenObjectList);
 1042|      1|}
sftk_CleanupFreeLists:
 1069|      1|{
 1070|      1|    sftk_CleanupFreeList(&sessionObjectList, PR_TRUE);
  ------------------
  |  |  437|      1|#define PR_TRUE 1
  ------------------
 1071|      1|    sftk_CleanupFreeList(&tokenObjectList, PR_FALSE);
  ------------------
  |  |  438|      1|#define PR_FALSE 0
  ------------------
 1072|      1|}
sftk_NewObject:
 1079|  71.5k|{
 1080|  71.5k|    SFTKObject *object;
 1081|  71.5k|    SFTKSessionObject *sessObject;
 1082|  71.5k|    PRBool hasLocks = PR_FALSE;
  ------------------
  |  |  438|  71.5k|#define PR_FALSE 0
  ------------------
 1083|  71.5k|    unsigned int i;
 1084|  71.5k|    unsigned int hashSize = 0;
 1085|       |
 1086|  71.5k|    hashSize = (slot->optimizeSpace) ? SPACE_ATTRIBUTE_HASH_SIZE : TIME_ATTRIBUTE_HASH_SIZE;
  ------------------
  |  |   65|  71.5k|#define SPACE_ATTRIBUTE_HASH_SIZE 32
  ------------------
                  hashSize = (slot->optimizeSpace) ? SPACE_ATTRIBUTE_HASH_SIZE : TIME_ATTRIBUTE_HASH_SIZE;
  ------------------
  |  |   68|  71.5k|#define TIME_ATTRIBUTE_HASH_SIZE 32
  ------------------
  |  Branch (1086:16): [True: 71.5k, False: 0]
  ------------------
 1087|       |
 1088|  71.5k|    object = sftk_GetObjectFromList(&hasLocks, slot->optimizeSpace,
 1089|  71.5k|                                    &sessionObjectList, hashSize, PR_TRUE);
  ------------------
  |  |  437|  71.5k|#define PR_TRUE 1
  ------------------
 1090|  71.5k|    if (object == NULL) {
  ------------------
  |  Branch (1090:9): [True: 0, False: 71.5k]
  ------------------
 1091|      0|        return NULL;
 1092|      0|    }
 1093|  71.5k|    sessObject = (SFTKSessionObject *)object;
 1094|  71.5k|    sessObject->nextAttr = 0;
 1095|       |
 1096|  3.29M|    for (i = 0; i < MAX_OBJS_ATTRS; i++) {
  ------------------
  |  |   37|  3.29M|#define MAX_OBJS_ATTRS 45 /* number of attributes to preallocate in \
  ------------------
  |  Branch (1096:17): [True: 3.22M, False: 71.5k]
  ------------------
 1097|  3.22M|        sessObject->attrList[i].attrib.pValue = NULL;
 1098|  3.22M|        sessObject->attrList[i].freeData = PR_FALSE;
  ------------------
  |  |  438|  3.22M|#define PR_FALSE 0
  ------------------
 1099|  3.22M|    }
 1100|  71.5k|    sessObject->optimizeSpace = slot->optimizeSpace;
 1101|       |
 1102|  71.5k|    object->handle = 0;
 1103|  71.5k|    object->next = object->prev = NULL;
 1104|  71.5k|    object->slot = slot;
 1105|  71.5k|    object->isFIPS = sftk_isFIPS(slot->slotID);
  ------------------
  |  |  506|  71.5k|    (((id) == FIPS_SLOT_ID) || ((id) >= SFTK_MIN_FIPS_USER_SLOT_ID))
  |  |  ------------------
  |  |  |  |  500|  71.5k|#define FIPS_SLOT_ID 3
  |  |  ------------------
  |  |                   (((id) == FIPS_SLOT_ID) || ((id) >= SFTK_MIN_FIPS_USER_SLOT_ID))
  |  |  ------------------
  |  |  |  |  567|  71.5k|#define SFTK_MIN_FIPS_USER_SLOT_ID 101
  |  |  ------------------
  |  |  |  Branch (506:6): [True: 0, False: 71.5k]
  |  |  |  Branch (506:32): [True: 0, False: 71.5k]
  |  |  ------------------
  ------------------
 1106|       |
 1107|  71.5k|    object->refCount = 1;
 1108|  71.5k|    sessObject->sessionList.next = NULL;
 1109|  71.5k|    sessObject->sessionList.prev = NULL;
 1110|  71.5k|    sessObject->sessionList.parent = object;
 1111|  71.5k|    sessObject->session = NULL;
 1112|  71.5k|    sessObject->wasDerived = PR_FALSE;
  ------------------
  |  |  438|  71.5k|#define PR_FALSE 0
  ------------------
 1113|  71.5k|    if (!hasLocks)
  ------------------
  |  Branch (1113:9): [True: 71.5k, False: 0]
  ------------------
 1114|  71.5k|        object->refLock = PZ_NewLock(nssILockRefLock);
  ------------------
  |  |  243|  71.5k|#define PZ_NewLock(t) PR_NewLock()
  ------------------
 1115|  71.5k|    if (object->refLock == NULL) {
  ------------------
  |  Branch (1115:9): [True: 0, False: 71.5k]
  ------------------
 1116|      0|        PORT_Free(object);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 1117|      0|        return NULL;
 1118|      0|    }
 1119|  71.5k|    if (!hasLocks)
  ------------------
  |  Branch (1119:9): [True: 71.5k, False: 0]
  ------------------
 1120|  71.5k|        sessObject->attributeLock = PZ_NewLock(nssILockAttribute);
  ------------------
  |  |  243|  71.5k|#define PZ_NewLock(t) PR_NewLock()
  ------------------
 1121|  71.5k|    if (sessObject->attributeLock == NULL) {
  ------------------
  |  Branch (1121:9): [True: 0, False: 71.5k]
  ------------------
 1122|      0|        PZ_DestroyLock(object->refLock);
  ------------------
  |  |  244|      0|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
 1123|      0|        PORT_Free(object);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 1124|      0|        return NULL;
 1125|      0|    }
 1126|  2.36M|    for (i = 0; i < sessObject->hashSize; i++) {
  ------------------
  |  Branch (1126:17): [True: 2.29M, False: 71.5k]
  ------------------
 1127|  2.29M|        sessObject->head[i] = NULL;
 1128|  2.29M|    }
 1129|  71.5k|    object->objectInfo = NULL;
 1130|  71.5k|    object->infoFree = NULL;
 1131|  71.5k|    return object;
 1132|  71.5k|}
sftk_ReferenceObject:
 1192|   327k|{
 1193|   327k|    PZ_Lock(object->refLock);
  ------------------
  |  |  245|   327k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
 1194|   327k|    PORT_Assert(object->refCount > 0);
  ------------------
  |  |  120|   327k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|   327k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 327k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1195|   327k|    object->refCount++;
 1196|   327k|    PZ_Unlock(object->refLock);
  ------------------
  |  |  246|   327k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
 1197|   327k|}
sftk_ObjectFromHandle:
 1225|   257k|{
 1226|   257k|    SFTKSlot *slot = sftk_SlotFromSession(session);
  ------------------
  |  |  503|   257k|#define sftk_SlotFromSession(sp) ((sp)->slot)
  ------------------
 1227|       |
 1228|   257k|    return sftk_ObjectFromHandleOnSlot(handle, slot);
 1229|   257k|}
sftk_FreeObject:
 1236|   398k|{
 1237|   398k|    PRBool destroy = PR_FALSE;
  ------------------
  |  |  438|   398k|#define PR_FALSE 0
  ------------------
 1238|   398k|    CK_RV crv;
 1239|       |
 1240|   398k|    PZ_Lock(object->refLock);
  ------------------
  |  |  245|   398k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
 1241|   398k|    if (object->refCount == 1)
  ------------------
  |  Branch (1241:9): [True: 71.5k, False: 327k]
  ------------------
 1242|  71.5k|        destroy = PR_TRUE;
  ------------------
  |  |  437|  71.5k|#define PR_TRUE 1
  ------------------
 1243|   398k|    object->refCount--;
 1244|   398k|    PZ_Unlock(object->refLock);
  ------------------
  |  |  246|   398k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
 1245|       |
 1246|   398k|    if (destroy) {
  ------------------
  |  Branch (1246:9): [True: 71.5k, False: 327k]
  ------------------
 1247|  71.5k|        crv = sftk_DestroyObject(object);
 1248|  71.5k|        if (crv != CKR_OK) {
  ------------------
  |  | 1388|  71.5k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1248:13): [True: 0, False: 71.5k]
  ------------------
 1249|      0|            return SFTK_DestroyFailure;
 1250|      0|        }
 1251|  71.5k|        return SFTK_Destroyed;
 1252|  71.5k|    }
 1253|   327k|    return SFTK_Busy;
 1254|   398k|}
sftk_getNextHandle:
 1263|  69.6k|{
 1264|  69.6k|    CK_OBJECT_HANDLE handle;
 1265|  69.6k|    SFTKObject *duplicateObject = NULL;
 1266|  69.6k|    do {
 1267|  69.6k|        PRUint32 wrappedAround;
 1268|       |
 1269|  69.6k|        duplicateObject = NULL;
 1270|  69.6k|        PZ_Lock(slot->objectLock);
  ------------------
  |  |  245|  69.6k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
 1271|  69.6k|        wrappedAround = slot->sessionObjectHandleCount & SFTK_TOKEN_MASK;
  ------------------
  |  |  478|  69.6k|#define SFTK_TOKEN_MASK 0x80000000L
  ------------------
 1272|  69.6k|        handle = slot->sessionObjectHandleCount & ~SFTK_TOKEN_MASK;
  ------------------
  |  |  478|  69.6k|#define SFTK_TOKEN_MASK 0x80000000L
  ------------------
 1273|  69.6k|        if (!handle) /* don't allow zero handle */
  ------------------
  |  Branch (1273:13): [True: 0, False: 69.6k]
  ------------------
 1274|      0|            handle = NSC_MIN_SESSION_OBJECT_HANDLE;
  ------------------
  |  |   52|      0|#define NSC_MIN_SESSION_OBJECT_HANDLE 1U
  ------------------
 1275|  69.6k|        slot->sessionObjectHandleCount = (handle + 1U) | wrappedAround;
 1276|       |        /* Is there already a session object with this handle? */
 1277|  69.6k|        if (wrappedAround) {
  ------------------
  |  Branch (1277:13): [True: 0, False: 69.6k]
  ------------------
 1278|      0|            sftkqueue_find(duplicateObject, handle, slot->sessObjHashTable,
  ------------------
  |  |  524|      0|    for ((element) = (head)[sftk_hash(id, hash_size)]; (element) != NULL; \
  |  |  ------------------
  |  |  |  |  513|      0|    ((PRUint32)((value)*SHMULTIPLIER) & (size - 1))
  |  |  |  |  ------------------
  |  |  |  |  |  |  509|      0|#define SHMULTIPLIER 1791398085
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (524:56): [True: 0, False: 0]
  |  |  ------------------
  |  |  525|      0|         (element) = (element)->next) {                                   \
  |  |  526|      0|        if ((element)->handle == (id)) {                                  \
  |  |  ------------------
  |  |  |  Branch (526:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  527|      0|            break;                                                        \
  |  |  528|      0|        }                                                                 \
  |  |  529|      0|    }
  ------------------
 1279|      0|                           slot->sessObjHashSize);
 1280|      0|        }
 1281|  69.6k|        PZ_Unlock(slot->objectLock);
  ------------------
  |  |  246|  69.6k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
 1282|  69.6k|    } while (duplicateObject != NULL);
  ------------------
  |  Branch (1282:14): [True: 0, False: 69.6k]
  ------------------
 1283|  69.6k|    return handle;
 1284|  69.6k|}
sftk_AddSlotObject:
 1292|  69.5k|{
 1293|  69.5k|    PRUint32 index = sftk_hash(object->handle, slot->sessObjHashSize);
  ------------------
  |  |  513|  69.5k|    ((PRUint32)((value)*SHMULTIPLIER) & (size - 1))
  |  |  ------------------
  |  |  |  |  509|  69.5k|#define SHMULTIPLIER 1791398085
  |  |  ------------------
  ------------------
 1294|  69.5k|    sftkqueue_init_element(object);
  ------------------
  |  |  544|  69.5k|    (element)->prev = NULL;
  ------------------
 1295|  69.5k|    PZ_Lock(slot->objectLock);
  ------------------
  |  |  245|  69.5k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
 1296|  69.5k|    sftkqueue_add2(object, object->handle, index, slot->sessObjHashTable);
  ------------------
  |  |  547|  69.5k|    {                                            \
  |  |  548|  69.5k|        (element)->next = (head)[index];         \
  |  |  549|  69.5k|        if ((head)[index])                       \
  |  |  ------------------
  |  |  |  Branch (549:13): [True: 0, False: 69.5k]
  |  |  ------------------
  |  |  550|  69.5k|            (head)[index]->prev = (element);     \
  |  |  551|  69.5k|        (head)[index] = (element);               \
  |  |  552|  69.5k|    }
  ------------------
 1297|  69.5k|    PZ_Unlock(slot->objectLock);
  ------------------
  |  |  246|  69.5k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
 1298|  69.5k|}
sftk_AddObject:
 1302|  69.5k|{
 1303|  69.5k|    SFTKSlot *slot = sftk_SlotFromSession(session);
  ------------------
  |  |  503|  69.5k|#define sftk_SlotFromSession(sp) ((sp)->slot)
  ------------------
 1304|  69.5k|    SFTKSessionObject *so = sftk_narrowToSessionObject(object);
 1305|       |
 1306|  69.5k|    if (so) {
  ------------------
  |  Branch (1306:9): [True: 69.5k, False: 0]
  ------------------
 1307|  69.5k|        PZ_Lock(session->objectLock);
  ------------------
  |  |  245|  69.5k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
 1308|  69.5k|        sftkqueue_add(&so->sessionList, 0, session->objects, 0);
  ------------------
  |  |  515|  69.5k|    {                                               \
  |  |  516|  69.5k|        int tmp = sftk_hash(id, hash_size);         \
  |  |  ------------------
  |  |  |  |  513|  69.5k|    ((PRUint32)((value)*SHMULTIPLIER) & (size - 1))
  |  |  |  |  ------------------
  |  |  |  |  |  |  509|  69.5k|#define SHMULTIPLIER 1791398085
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  517|  69.5k|        (element)->next = (head)[tmp];              \
  |  |  518|  69.5k|        (element)->prev = NULL;                     \
  |  |  519|  69.5k|        if ((head)[tmp])                            \
  |  |  ------------------
  |  |  |  Branch (519:13): [True: 16.3k, False: 53.2k]
  |  |  ------------------
  |  |  520|  69.5k|            (head)[tmp]->prev = (element);          \
  |  |  521|  69.5k|        (head)[tmp] = (element);                    \
  |  |  522|  69.5k|    }
  ------------------
 1309|  69.5k|        so->session = session;
 1310|  69.5k|        PZ_Unlock(session->objectLock);
  ------------------
  |  |  246|  69.5k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
 1311|  69.5k|    }
 1312|  69.5k|    sftk_AddSlotObject(slot, object);
 1313|  69.5k|    sftk_ReferenceObject(object);
 1314|  69.5k|}
sftk_DeleteObject:
 1321|  69.5k|{
 1322|  69.5k|    SFTKSlot *slot = sftk_SlotFromSession(session);
  ------------------
  |  |  503|  69.5k|#define sftk_SlotFromSession(sp) ((sp)->slot)
  ------------------
 1323|  69.5k|    SFTKSessionObject *so = sftk_narrowToSessionObject(object);
 1324|  69.5k|    CK_RV crv = CKR_OK;
  ------------------
  |  | 1388|  69.5k|#define CKR_OK 0x00000000UL
  ------------------
 1325|  69.5k|    PRUint32 index = sftk_hash(object->handle, slot->sessObjHashSize);
  ------------------
  |  |  513|  69.5k|    ((PRUint32)((value)*SHMULTIPLIER) & (size - 1))
  |  |  ------------------
  |  |  |  |  509|  69.5k|#define SHMULTIPLIER 1791398085
  |  |  ------------------
  ------------------
 1326|       |
 1327|       |    /* Handle Token case */
 1328|  69.5k|    if (so && so->session) {
  ------------------
  |  Branch (1328:9): [True: 69.5k, False: 0]
  |  Branch (1328:15): [True: 69.5k, False: 0]
  ------------------
 1329|  69.5k|        session = so->session;
 1330|  69.5k|        PZ_Lock(session->objectLock);
  ------------------
  |  |  245|  69.5k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
 1331|  69.5k|        sftkqueue_delete(&so->sessionList, 0, session->objects, 0);
  ------------------
  |  |  534|  69.5k|    if ((element)->next)                                      \
  |  |  ------------------
  |  |  |  Branch (534:9): [True: 5.33k, False: 64.2k]
  |  |  ------------------
  |  |  535|  69.5k|        (element)->next->prev = (element)->prev;              \
  |  |  536|  69.5k|    if ((element)->prev)                                      \
  |  |  ------------------
  |  |  |  Branch (536:9): [True: 12.4k, False: 57.1k]
  |  |  ------------------
  |  |  537|  69.5k|        (element)->prev->next = (element)->next;              \
  |  |  538|  69.5k|    else                                                      \
  |  |  539|  69.5k|        (head)[sftk_hash(id, hash_size)] = ((element)->next); \
  |  |  ------------------
  |  |  |  |  513|  57.1k|    ((PRUint32)((value)*SHMULTIPLIER) & (size - 1))
  |  |  |  |  ------------------
  |  |  |  |  |  |  509|  57.1k|#define SHMULTIPLIER 1791398085
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  540|  69.5k|    (element)->next = NULL;                                   \
  |  |  541|  69.5k|    (element)->prev = NULL;
  ------------------
 1332|  69.5k|        PZ_Unlock(session->objectLock);
  ------------------
  |  |  246|  69.5k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
 1333|  69.5k|        PZ_Lock(slot->objectLock);
  ------------------
  |  |  245|  69.5k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
 1334|  69.5k|        sftkqueue_delete2(object, object->handle, index, slot->sessObjHashTable);
  ------------------
  |  |  564|  69.5k|    if ((element)->next)                            \
  |  |  ------------------
  |  |  |  Branch (564:9): [True: 0, False: 69.5k]
  |  |  ------------------
  |  |  565|  69.5k|        (element)->next->prev = (element)->prev;    \
  |  |  566|  69.5k|    if ((element)->prev)                            \
  |  |  ------------------
  |  |  |  Branch (566:9): [True: 0, False: 69.5k]
  |  |  ------------------
  |  |  567|  69.5k|        (element)->prev->next = (element)->next;    \
  |  |  568|  69.5k|    else                                            \
  |  |  569|  69.5k|        (head)[index] = ((element)->next);
  ------------------
 1335|  69.5k|        PZ_Unlock(slot->objectLock);
  ------------------
  |  |  246|  69.5k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
 1336|  69.5k|        sftkqueue_clear_deleted_element(object);
  ------------------
  |  |  572|  69.5k|    (element)->next = NULL;                      \
  |  |  573|  69.5k|    (element)->prev = NULL;
  ------------------
 1337|  69.5k|        sftk_FreeObject(object); /* free the reference owned by the queue */
 1338|  69.5k|    } else {
 1339|      0|        SFTKDBHandle *handle = sftk_getDBForTokenObject(slot, object->handle);
 1340|      0|#ifdef DEBUG
 1341|      0|        SFTKTokenObject *to = sftk_narrowToTokenObject(object);
 1342|      0|        PORT_Assert(to);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1343|      0|#endif
 1344|      0|        crv = sftkdb_DestroyObject(handle, object->handle, object->objclass);
 1345|      0|        sftk_freeDB(handle);
 1346|      0|    }
 1347|  69.5k|    return crv;
 1348|  69.5k|}
sftk_CopyObject:
 1685|  5.40k|{
 1686|  5.40k|    SFTKAttribute *attribute;
 1687|  5.40k|    SFTKSessionObject *src_so = sftk_narrowToSessionObject(srcObject);
 1688|  5.40k|    unsigned int i;
 1689|       |
 1690|  5.40k|    destObject->isFIPS = srcObject->isFIPS;
 1691|  5.40k|    if (src_so == NULL) {
  ------------------
  |  Branch (1691:9): [True: 0, False: 5.40k]
  ------------------
 1692|      0|        return sftk_CopyTokenObject(destObject, srcObject);
 1693|      0|    }
 1694|       |
 1695|  5.40k|    PZ_Lock(src_so->attributeLock);
  ------------------
  |  |  245|  5.40k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
 1696|   178k|    for (i = 0; i < src_so->hashSize; i++) {
  ------------------
  |  Branch (1696:17): [True: 172k, False: 5.40k]
  ------------------
 1697|   172k|        attribute = src_so->head[i];
 1698|   178k|        do {
 1699|   178k|            if (attribute) {
  ------------------
  |  Branch (1699:17): [True: 31.3k, False: 146k]
  ------------------
 1700|  31.3k|                if (!sftk_hasAttribute(destObject, attribute->handle)) {
  ------------------
  |  Branch (1700:21): [True: 31.3k, False: 0]
  ------------------
 1701|       |                    /* we need to copy the attribute since each attribute
 1702|       |                     * only has one set of link list pointers */
 1703|  31.3k|                    SFTKAttribute *newAttribute = sftk_NewAttribute(
 1704|  31.3k|                        destObject, sftk_attr_expand(&attribute->attrib));
  ------------------
  |  |  587|  31.3k|#define sftk_attr_expand(ap) (ap)->type, (ap)->pValue, (ap)->ulValueLen
  ------------------
 1705|  31.3k|                    if (newAttribute == NULL) {
  ------------------
  |  Branch (1705:25): [True: 0, False: 31.3k]
  ------------------
 1706|      0|                        PZ_Unlock(src_so->attributeLock);
  ------------------
  |  |  246|      0|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
 1707|      0|                        return CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 1708|      0|                    }
 1709|  31.3k|                    sftk_AddAttribute(destObject, newAttribute);
 1710|  31.3k|                }
 1711|  31.3k|                attribute = attribute->next;
 1712|  31.3k|            }
 1713|   178k|        } while (attribute != NULL);
  ------------------
  |  Branch (1713:18): [True: 5.40k, False: 172k]
  ------------------
 1714|   172k|    }
 1715|  5.40k|    PZ_Unlock(src_so->attributeLock);
  ------------------
  |  |  246|  5.40k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
 1716|       |
 1717|  5.40k|    return CKR_OK;
  ------------------
  |  | 1388|  5.40k|#define CKR_OK 0x00000000UL
  ------------------
 1718|  5.40k|}
sftk_searchObjectList:
 1773|      2|{
 1774|      2|    unsigned int i;
 1775|      2|    SFTKObject *object;
 1776|      2|    CK_RV crv = CKR_OK;
  ------------------
  |  | 1388|      2|#define CKR_OK 0x00000000UL
  ------------------
 1777|       |
 1778|      2|    PZ_Lock(lock);
  ------------------
  |  |  245|      2|#define PZ_Lock(k) PR_Lock((k))
  ------------------
 1779|     66|    for (i = 0; i < size; i++) {
  ------------------
  |  Branch (1779:17): [True: 64, False: 2]
  ------------------
 1780|     64|        for (object = head[i]; object != NULL; object = object->next) {
  ------------------
  |  Branch (1780:32): [True: 0, False: 64]
  ------------------
 1781|      0|            if (sftk_objectMatch(object, theTemplate, count)) {
  ------------------
  |  Branch (1781:17): [True: 0, False: 0]
  ------------------
 1782|       |                /* don't return objects that aren't yet visible */
 1783|      0|                if ((!isLoggedIn) && sftk_isTrue(object, CKA_PRIVATE))
  ------------------
  |  |  513|      0|#define CKA_PRIVATE 0x00000002UL
  ------------------
  |  Branch (1783:21): [True: 0, False: 0]
  |  Branch (1783:38): [True: 0, False: 0]
  ------------------
 1784|      0|                    continue;
 1785|      0|                sftk_addHandle(search, object->handle);
 1786|      0|            }
 1787|      0|        }
 1788|     64|    }
 1789|      2|    PZ_Unlock(lock);
  ------------------
  |  |  246|      2|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
 1790|      2|    return crv;
 1791|      2|}
sftk_FreeSearch:
 1821|  30.6k|{
 1822|  30.6k|    if (search->handles) {
  ------------------
  |  Branch (1822:9): [True: 30.6k, False: 0]
  ------------------
 1823|  30.6k|        PORT_Free(search->handles);
  ------------------
  |  |   60|  30.6k|#define PORT_Free PORT_Free_Util
  ------------------
 1824|  30.6k|    }
 1825|  30.6k|    PORT_Free(search);
  ------------------
  |  |   60|  30.6k|#define PORT_Free PORT_Free_Util
  ------------------
 1826|  30.6k|}
sftk_update_state:
 1836|   147k|{
 1837|   147k|    if (slot->isLoggedIn) {
  ------------------
  |  Branch (1837:9): [True: 0, False: 147k]
  ------------------
 1838|      0|        if (slot->ssoLoggedIn) {
  ------------------
  |  Branch (1838:13): [True: 0, False: 0]
  ------------------
 1839|      0|            session->info.state = CKS_RW_SO_FUNCTIONS;
  ------------------
  |  |  286|      0|#define CKS_RW_SO_FUNCTIONS 4
  ------------------
 1840|      0|        } else if (session->info.flags & CKF_RW_SESSION) {
  ------------------
  |  |  302|      0|#define CKF_RW_SESSION 0x00000002UL     /* session is r/w */
  ------------------
  |  Branch (1840:20): [True: 0, False: 0]
  ------------------
 1841|      0|            session->info.state = CKS_RW_USER_FUNCTIONS;
  ------------------
  |  |  285|      0|#define CKS_RW_USER_FUNCTIONS 3
  ------------------
 1842|      0|        } else {
 1843|      0|            session->info.state = CKS_RO_USER_FUNCTIONS;
  ------------------
  |  |  283|      0|#define CKS_RO_USER_FUNCTIONS 1
  ------------------
 1844|      0|        }
 1845|   147k|    } else {
 1846|   147k|        if (session->info.flags & CKF_RW_SESSION) {
  ------------------
  |  |  302|   147k|#define CKF_RW_SESSION 0x00000002UL     /* session is r/w */
  ------------------
  |  Branch (1846:13): [True: 0, False: 147k]
  ------------------
 1847|      0|            session->info.state = CKS_RW_PUBLIC_SESSION;
  ------------------
  |  |  284|      0|#define CKS_RW_PUBLIC_SESSION 2
  ------------------
 1848|   147k|        } else {
 1849|   147k|            session->info.state = CKS_RO_PUBLIC_SESSION;
  ------------------
  |  |  282|   147k|#define CKS_RO_PUBLIC_SESSION 0
  ------------------
 1850|   147k|        }
 1851|   147k|    }
 1852|   147k|}
sftk_FreeContext:
 1876|   113k|{
 1877|   113k|    if (context->cipherInfo) {
  ------------------
  |  Branch (1877:9): [True: 113k, False: 0]
  ------------------
 1878|   113k|        (*context->destroy)(context->cipherInfo, PR_TRUE);
  ------------------
  |  |  437|   113k|#define PR_TRUE 1
  ------------------
 1879|   113k|    }
 1880|   113k|    if (context->hashInfo) {
  ------------------
  |  Branch (1880:9): [True: 55.0k, False: 58.4k]
  ------------------
 1881|  55.0k|        (*context->hashdestroy)(context->hashInfo, PR_TRUE);
  ------------------
  |  |  437|  55.0k|#define PR_TRUE 1
  ------------------
 1882|  55.0k|    }
 1883|   113k|    if (context->key) {
  ------------------
  |  Branch (1883:9): [True: 74.0k, False: 39.3k]
  ------------------
 1884|  74.0k|        sftk_FreeObject(context->key);
 1885|  74.0k|        context->key = NULL;
 1886|  74.0k|    }
 1887|   113k|    PORT_Free(context);
  ------------------
  |  |   60|   113k|#define PORT_Free PORT_Free_Util
  ------------------
 1888|   113k|}
sftk_InitSession:
 1897|  73.6k|{
 1898|  73.6k|    session->next = session->prev = NULL;
 1899|  73.6k|    session->enc_context = NULL;
 1900|  73.6k|    session->hash_context = NULL;
 1901|  73.6k|    session->sign_context = NULL;
 1902|  73.6k|    session->search = NULL;
 1903|  73.6k|    session->objectIDCount = 1;
 1904|  73.6k|    session->objectLock = PZ_NewLock(nssILockObject);
  ------------------
  |  |  243|  73.6k|#define PZ_NewLock(t) PR_NewLock()
  ------------------
 1905|  73.6k|    if (session->objectLock == NULL) {
  ------------------
  |  Branch (1905:9): [True: 0, False: 73.6k]
  ------------------
 1906|      0|        return CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 1907|      0|    }
 1908|  73.6k|    session->objects[0] = NULL;
 1909|       |
 1910|  73.6k|    session->slot = slot;
 1911|  73.6k|    session->notify = notify;
 1912|  73.6k|    session->appData = pApplication;
 1913|  73.6k|    session->info.flags = flags;
 1914|  73.6k|    session->info.slotID = slotID;
 1915|  73.6k|    session->info.ulDeviceError = 0;
 1916|  73.6k|    sftk_update_state(slot, session);
 1917|       |    /* no ops completed yet, so the last one couldn't be a FIPS op */
 1918|  73.6k|    session->lastOpWasFIPS = PR_FALSE;
  ------------------
  |  |  438|  73.6k|#define PR_FALSE 0
  ------------------
 1919|  73.6k|    return CKR_OK;
  ------------------
  |  | 1388|  73.6k|#define CKR_OK 0x00000000UL
  ------------------
 1920|  73.6k|}
sftk_NewSession:
 1928|  73.6k|{
 1929|  73.6k|    SFTKSession *session;
 1930|  73.6k|    SFTKSlot *slot = sftk_SlotFromID(slotID, PR_FALSE);
  ------------------
  |  |  438|  73.6k|#define PR_FALSE 0
  ------------------
 1931|  73.6k|    CK_RV crv;
 1932|       |
 1933|  73.6k|    if (slot == NULL)
  ------------------
  |  Branch (1933:9): [True: 0, False: 73.6k]
  ------------------
 1934|      0|        return NULL;
 1935|       |
 1936|  73.6k|    session = (SFTKSession *)PORT_Alloc(sizeof(SFTKSession));
  ------------------
  |  |   52|  73.6k|#define PORT_Alloc PORT_Alloc_Util
  ------------------
 1937|  73.6k|    if (session == NULL)
  ------------------
  |  Branch (1937:9): [True: 0, False: 73.6k]
  ------------------
 1938|      0|        return NULL;
 1939|       |
 1940|  73.6k|    crv = sftk_InitSession(session, slot, slotID, notify, pApplication, flags);
 1941|  73.6k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  73.6k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1941:9): [True: 0, False: 73.6k]
  ------------------
 1942|      0|        PORT_Free(session);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 1943|      0|        return NULL;
 1944|      0|    }
 1945|  73.6k|    return session;
 1946|  73.6k|}
sftk_ClearSession:
 1951|  73.6k|{
 1952|  73.6k|    SFTKObjectList *op, *next;
 1953|       |
 1954|       |    /* clean out the attributes */
 1955|       |    /* since no one is referencing us, it's safe to walk the chain
 1956|       |     * without a lock */
 1957|  73.6k|    for (op = session->objects[0]; op != NULL; op = next) {
  ------------------
  |  Branch (1957:36): [True: 0, False: 73.6k]
  ------------------
 1958|      0|        next = op->next;
 1959|       |        /* paranoia */
 1960|      0|        op->next = op->prev = NULL;
 1961|      0|        sftk_DeleteObject(session, op->parent);
 1962|      0|    }
 1963|  73.6k|    PZ_DestroyLock(session->objectLock);
  ------------------
  |  |  244|  73.6k|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
 1964|  73.6k|    if (session->enc_context) {
  ------------------
  |  Branch (1964:9): [True: 3.75k, False: 69.8k]
  ------------------
 1965|  3.75k|        sftk_FreeContext(session->enc_context);
 1966|  3.75k|    }
 1967|  73.6k|    if (session->hash_context) {
  ------------------
  |  Branch (1967:9): [True: 3.35k, False: 70.2k]
  ------------------
 1968|  3.35k|        sftk_FreeContext(session->hash_context);
 1969|  3.35k|    }
 1970|  73.6k|    if (session->sign_context) {
  ------------------
  |  Branch (1970:9): [True: 0, False: 73.6k]
  ------------------
 1971|      0|        sftk_FreeContext(session->sign_context);
 1972|      0|    }
 1973|  73.6k|    if (session->search) {
  ------------------
  |  Branch (1973:9): [True: 0, False: 73.6k]
  ------------------
 1974|      0|        sftk_FreeSearch(session->search);
 1975|      0|    }
 1976|  73.6k|}
sftk_DestroySession:
 1981|  73.6k|{
 1982|  73.6k|    sftk_ClearSession(session);
 1983|  73.6k|    PORT_Free(session);
  ------------------
  |  |   60|  73.6k|#define PORT_Free PORT_Free_Util
  ------------------
 1984|  73.6k|}
sftk_SessionFromHandle:
 1992|   841k|{
 1993|   841k|    SFTKSlot *slot = sftk_SlotFromSessionHandle(handle);
 1994|   841k|    SFTKSession *session;
 1995|   841k|    PZLock *lock;
  ------------------
  |  |  185|   841k|#define PZLock PRLock
  ------------------
 1996|       |
 1997|   841k|    if (!slot)
  ------------------
  |  Branch (1997:9): [True: 0, False: 841k]
  ------------------
 1998|      0|        return NULL;
 1999|   841k|    lock = SFTK_SESSION_LOCK(slot, handle);
  ------------------
  |  |  583|   841k|    ((slot)->sessionLock[(handle) & (slot)->sessionLockMask])
  ------------------
 2000|       |
 2001|   841k|    PZ_Lock(lock);
  ------------------
  |  |  245|   841k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
 2002|   841k|    sftkqueue_find(session, handle, slot->head, slot->sessHashSize);
  ------------------
  |  |  524|   863k|    for ((element) = (head)[sftk_hash(id, hash_size)]; (element) != NULL; \
  |  |  ------------------
  |  |  |  |  513|   841k|    ((PRUint32)((value)*SHMULTIPLIER) & (size - 1))
  |  |  |  |  ------------------
  |  |  |  |  |  |  509|   841k|#define SHMULTIPLIER 1791398085
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (524:56): [True: 863k, False: 0]
  |  |  ------------------
  |  |  525|   863k|         (element) = (element)->next) {                                   \
  |  |  526|   863k|        if ((element)->handle == (id)) {                                  \
  |  |  ------------------
  |  |  |  Branch (526:13): [True: 841k, False: 22.4k]
  |  |  ------------------
  |  |  527|   841k|            break;                                                        \
  |  |  528|   841k|        }                                                                 \
  |  |  529|   863k|    }
  ------------------
 2003|   841k|    PZ_Unlock(lock);
  ------------------
  |  |  246|   841k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
 2004|       |
 2005|   841k|    return (session);
 2006|   841k|}
sftk_FreeSession:
 2015|   767k|{
 2016|   767k|    return;
 2017|   767k|}
sftk_narrowToSessionObject:
 2122|  6.03M|{
 2123|  6.03M|    return !sftk_isToken(obj->handle) ? (SFTKSessionObject *)obj : NULL;
  ------------------
  |  |  504|  6.03M|#define sftk_isToken(id) (((id)&SFTK_TOKEN_MASK) == SFTK_TOKEN_MAGIC)
  |  |  ------------------
  |  |  |  |  478|  6.03M|#define SFTK_TOKEN_MASK 0x80000000L
  |  |  ------------------
  |  |               #define sftk_isToken(id) (((id)&SFTK_TOKEN_MASK) == SFTK_TOKEN_MAGIC)
  |  |  ------------------
  |  |  |  |  479|  6.03M|#define SFTK_TOKEN_MAGIC 0x80000000L
  |  |  ------------------
  ------------------
  |  Branch (2123:12): [True: 6.03M, False: 0]
  ------------------
 2124|  6.03M|}
sftk_narrowToTokenObject:
 2128|  72.6k|{
 2129|  72.6k|    return sftk_isToken(obj->handle) ? (SFTKTokenObject *)obj : NULL;
  ------------------
  |  |  504|  72.6k|#define sftk_isToken(id) (((id)&SFTK_TOKEN_MASK) == SFTK_TOKEN_MAGIC)
  |  |  ------------------
  |  |  |  |  478|  72.6k|#define SFTK_TOKEN_MASK 0x80000000L
  |  |  ------------------
  |  |               #define sftk_isToken(id) (((id)&SFTK_TOKEN_MASK) == SFTK_TOKEN_MAGIC)
  |  |  ------------------
  |  |  |  |  479|  72.6k|#define SFTK_TOKEN_MAGIC 0x80000000L
  |  |  ------------------
  |  |  |  Branch (504:26): [True: 0, False: 72.6k]
  |  |  ------------------
  ------------------
 2130|  72.6k|}
sftk_AttributeToFlags:
 2207|  16.6k|{
 2208|  16.6k|    CK_FLAGS flags = 0;
 2209|       |
 2210|  16.6k|    switch (op) {
 2211|  12.5k|        case CKA_ENCRYPT:
  ------------------
  |  |  547|  12.5k|#define CKA_ENCRYPT 0x00000104UL
  ------------------
  |  Branch (2211:9): [True: 12.5k, False: 4.08k]
  ------------------
 2212|  12.5k|            flags = CKF_ENCRYPT;
  ------------------
  |  | 1353|  12.5k|#define CKF_ENCRYPT 0x00000100UL
  ------------------
 2213|  12.5k|            break;
 2214|    950|        case CKA_DECRYPT:
  ------------------
  |  |  548|    950|#define CKA_DECRYPT 0x00000105UL
  ------------------
  |  Branch (2214:9): [True: 950, False: 15.6k]
  ------------------
 2215|    950|            flags = CKF_DECRYPT;
  ------------------
  |  | 1354|    950|#define CKF_DECRYPT 0x00000200UL
  ------------------
 2216|    950|            break;
 2217|  1.27k|        case CKA_WRAP:
  ------------------
  |  |  549|  1.27k|#define CKA_WRAP 0x00000106UL
  ------------------
  |  Branch (2217:9): [True: 1.27k, False: 15.3k]
  ------------------
 2218|  1.27k|            flags = CKF_WRAP;
  ------------------
  |  | 1362|  1.27k|#define CKF_WRAP 0x00020000UL
  ------------------
 2219|  1.27k|            break;
 2220|      0|        case CKA_UNWRAP:
  ------------------
  |  |  550|      0|#define CKA_UNWRAP 0x00000107UL
  ------------------
  |  Branch (2220:9): [True: 0, False: 16.6k]
  ------------------
 2221|      0|            flags = CKF_UNWRAP;
  ------------------
  |  | 1363|      0|#define CKF_UNWRAP 0x00040000UL
  ------------------
 2222|      0|            break;
 2223|      0|        case CKA_SIGN:
  ------------------
  |  |  551|      0|#define CKA_SIGN 0x00000108UL
  ------------------
  |  Branch (2223:9): [True: 0, False: 16.6k]
  ------------------
 2224|      0|            flags = CKF_SIGN;
  ------------------
  |  | 1356|      0|#define CKF_SIGN 0x00000800UL
  ------------------
 2225|      0|            break;
 2226|      0|        case CKA_SIGN_RECOVER:
  ------------------
  |  |  552|      0|#define CKA_SIGN_RECOVER 0x00000109UL
  ------------------
  |  Branch (2226:9): [True: 0, False: 16.6k]
  ------------------
 2227|      0|            flags = CKF_SIGN_RECOVER;
  ------------------
  |  | 1357|      0|#define CKF_SIGN_RECOVER 0x00001000UL
  ------------------
 2228|      0|            break;
 2229|      0|        case CKA_VERIFY:
  ------------------
  |  |  553|      0|#define CKA_VERIFY 0x0000010AUL
  ------------------
  |  Branch (2229:9): [True: 0, False: 16.6k]
  ------------------
 2230|      0|            flags = CKF_VERIFY;
  ------------------
  |  | 1358|      0|#define CKF_VERIFY 0x00002000
  ------------------
 2231|      0|            break;
 2232|      0|        case CKA_VERIFY_RECOVER:
  ------------------
  |  |  554|      0|#define CKA_VERIFY_RECOVER 0x0000010BUL
  ------------------
  |  Branch (2232:9): [True: 0, False: 16.6k]
  ------------------
 2233|      0|            flags = CKF_VERIFY_RECOVER;
  ------------------
  |  | 1359|      0|#define CKF_VERIFY_RECOVER 0x00004000UL
  ------------------
 2234|      0|            break;
 2235|      0|        case CKA_DERIVE:
  ------------------
  |  |  555|      0|#define CKA_DERIVE 0x0000010CUL
  ------------------
  |  Branch (2235:9): [True: 0, False: 16.6k]
  ------------------
 2236|      0|            flags = CKF_DERIVE;
  ------------------
  |  | 1364|      0|#define CKF_DERIVE 0x00080000UL
  ------------------
 2237|      0|            break;
 2238|       |        /* fake attribute to select digesting */
 2239|      0|        case CKA_DIGEST:
  ------------------
  |  |   68|      0|#define CKA_DIGEST 0x81000000L
  ------------------
  |  Branch (2239:9): [True: 0, False: 16.6k]
  ------------------
 2240|      0|            flags = CKF_DIGEST;
  ------------------
  |  | 1355|      0|#define CKF_DIGEST 0x00000400UL
  ------------------
 2241|      0|            break;
 2242|    298|        case CKA_NSS_MESSAGE | CKA_ENCRYPT:
  ------------------
  |  |   69|    298|#define CKA_NSS_MESSAGE 0x82000000L
  ------------------
                      case CKA_NSS_MESSAGE | CKA_ENCRYPT:
  ------------------
  |  |  547|    298|#define CKA_ENCRYPT 0x00000104UL
  ------------------
  |  Branch (2242:9): [True: 298, False: 16.3k]
  ------------------
 2243|    298|            flags = CKF_MESSAGE_ENCRYPT;
  ------------------
  |  | 1339|    298|#define CKF_MESSAGE_ENCRYPT 0x00000002UL
  ------------------
 2244|    298|            break;
 2245|  1.55k|        case CKA_NSS_MESSAGE | CKA_DECRYPT:
  ------------------
  |  |   69|  1.55k|#define CKA_NSS_MESSAGE 0x82000000L
  ------------------
                      case CKA_NSS_MESSAGE | CKA_DECRYPT:
  ------------------
  |  |  548|  1.55k|#define CKA_DECRYPT 0x00000105UL
  ------------------
  |  Branch (2245:9): [True: 1.55k, False: 15.0k]
  ------------------
 2246|  1.55k|            flags = CKF_MESSAGE_DECRYPT;
  ------------------
  |  | 1340|  1.55k|#define CKF_MESSAGE_DECRYPT 0x00000004UL
  ------------------
 2247|  1.55k|            break;
 2248|      0|        case CKA_NSS_MESSAGE | CKA_SIGN:
  ------------------
  |  |   69|      0|#define CKA_NSS_MESSAGE 0x82000000L
  ------------------
                      case CKA_NSS_MESSAGE | CKA_SIGN:
  ------------------
  |  |  551|      0|#define CKA_SIGN 0x00000108UL
  ------------------
  |  Branch (2248:9): [True: 0, False: 16.6k]
  ------------------
 2249|      0|            flags = CKF_MESSAGE_SIGN;
  ------------------
  |  | 1341|      0|#define CKF_MESSAGE_SIGN 0x00000008UL
  ------------------
 2250|      0|            break;
 2251|      0|        case CKA_NSS_MESSAGE | CKA_VERIFY:
  ------------------
  |  |   69|      0|#define CKA_NSS_MESSAGE 0x82000000L
  ------------------
                      case CKA_NSS_MESSAGE | CKA_VERIFY:
  ------------------
  |  |  553|      0|#define CKA_VERIFY 0x0000010AUL
  ------------------
  |  Branch (2251:9): [True: 0, False: 16.6k]
  ------------------
 2252|      0|            flags = CKF_MESSAGE_VERIFY;
  ------------------
  |  | 1342|      0|#define CKF_MESSAGE_VERIFY 0x00000010UL
  ------------------
 2253|      0|            break;
 2254|      0|        default:
  ------------------
  |  Branch (2254:9): [True: 0, False: 16.6k]
  ------------------
 2255|      0|            break;
 2256|  16.6k|    }
 2257|  16.6k|    return flags;
 2258|  16.6k|}
sftk_GetHashTypeFromMechanism:
 2269|  36.4k|{
 2270|  36.4k|    switch (mech) {
 2271|      0|        case CKM_SHA_1:
  ------------------
  |  |  859|      0|#define CKM_SHA_1 0x00000220UL
  ------------------
  |  Branch (2271:9): [True: 0, False: 36.4k]
  ------------------
 2272|      0|        case CKG_MGF1_SHA1:
  ------------------
  |  | 1648|      0|#define CKG_MGF1_SHA1 0x00000001UL
  ------------------
  |  Branch (2272:9): [True: 0, False: 36.4k]
  ------------------
 2273|      0|            return HASH_AlgSHA1;
 2274|      0|        case CKM_SHA224:
  ------------------
  |  |  887|      0|#define CKM_SHA224 0x00000255UL
  ------------------
  |  Branch (2274:9): [True: 0, False: 36.4k]
  ------------------
 2275|      0|        case CKG_MGF1_SHA224:
  ------------------
  |  | 1654|      0|#define CKG_MGF1_SHA224 0x00000005UL
  ------------------
  |  Branch (2275:9): [True: 0, False: 36.4k]
  ------------------
 2276|      0|            return HASH_AlgSHA224;
 2277|  23.7k|        case CKM_SHA256:
  ------------------
  |  |  876|  23.7k|#define CKM_SHA256 0x00000250UL
  ------------------
  |  Branch (2277:9): [True: 23.7k, False: 12.7k]
  ------------------
 2278|  25.7k|        case CKG_MGF1_SHA256:
  ------------------
  |  | 1649|  25.7k|#define CKG_MGF1_SHA256 0x00000002UL
  ------------------
  |  Branch (2278:9): [True: 2.00k, False: 34.4k]
  ------------------
 2279|  25.7k|            return HASH_AlgSHA256;
 2280|  10.3k|        case CKM_SHA384:
  ------------------
  |  |  879|  10.3k|#define CKM_SHA384 0x00000260UL
  ------------------
  |  Branch (2280:9): [True: 10.3k, False: 26.1k]
  ------------------
 2281|  10.3k|        case CKG_MGF1_SHA384:
  ------------------
  |  | 1650|  10.3k|#define CKG_MGF1_SHA384 0x00000003UL
  ------------------
  |  Branch (2281:9): [True: 52, False: 36.4k]
  ------------------
 2282|  10.3k|            return HASH_AlgSHA384;
 2283|    174|        case CKM_SHA512:
  ------------------
  |  |  882|    174|#define CKM_SHA512 0x00000270UL
  ------------------
  |  Branch (2283:9): [True: 174, False: 36.3k]
  ------------------
 2284|    348|        case CKG_MGF1_SHA512:
  ------------------
  |  | 1651|    348|#define CKG_MGF1_SHA512 0x00000004UL
  ------------------
  |  Branch (2284:9): [True: 174, False: 36.3k]
  ------------------
 2285|    348|            return HASH_AlgSHA512;
 2286|      0|        default:
  ------------------
  |  Branch (2286:9): [True: 0, False: 36.4k]
  ------------------
 2287|      0|            return HASH_AlgNULL;
 2288|  36.4k|    }
 2289|  36.4k|}
sftk_operationIsFIPS:
 2475|   146k|{
 2476|   146k|#ifndef NSS_HAS_FIPS_INDICATORS
 2477|   146k|    return PR_FALSE;
  ------------------
  |  |  438|   146k|#define PR_FALSE 0
  ------------------
 2478|       |#else
 2479|       |    int i;
 2480|       |    CK_FLAGS opFlags;
 2481|       |    CK_ULONG keyLength;
 2482|       |
 2483|       |    /* handle all the quick stuff first */
 2484|       |    if (!sftk_isFIPS(slot->slotID)) {
 2485|       |        return PR_FALSE;
 2486|       |    }
 2487|       |    if (source && !source->isFIPS) {
 2488|       |        return PR_FALSE;
 2489|       |    }
 2490|       |    if (mech == NULL) {
 2491|       |        return PR_FALSE;
 2492|       |    }
 2493|       |
 2494|       |    /* now get the calculated values */
 2495|       |    opFlags = sftk_AttributeToFlags(op);
 2496|       |    if (opFlags == 0) {
 2497|       |        return PR_FALSE;
 2498|       |    }
 2499|       |    keyLength = sftk_getKeyLength(source);
 2500|       |
 2501|       |    /* check against our algorithm array */
 2502|       |    for (i = 0; i < SFTK_NUMBER_FIPS_ALGORITHMS; i++) {
 2503|       |        SFTKFIPSAlgorithmList *mechs = &sftk_fips_mechs[i];
 2504|       |        /* if we match the number of records exactly, then we are an
 2505|       |         * approved algorithm in the approved mode with an approved key */
 2506|       |        if (((mech->mechanism == mechs->type) &&
 2507|       |             (opFlags == (mechs->info.flags & opFlags)) &&
 2508|       |             (keyLength <= mechs->info.ulMaxKeySize) &&
 2509|       |             (keyLength >= mechs->info.ulMinKeySize) &&
 2510|       |             ((keyLength - mechs->info.ulMinKeySize) % mechs->step) == 0) &&
 2511|       |            ((mechs->special == SFTKFIPSNone) ||
 2512|       |             sftk_handleSpecial(slot, mech, mechs, source))) {
 2513|       |            return PR_TRUE;
 2514|       |        }
 2515|       |    }
 2516|       |    return PR_FALSE;
 2517|       |#endif
 2518|   146k|}
pkcs11u.c:sftk_NewAttribute:
  114|  1.47M|{
  115|  1.47M|    SFTKAttribute *attribute;
  116|       |
  117|  1.47M|    SFTKSessionObject *so = sftk_narrowToSessionObject(object);
  118|  1.47M|    int index;
  119|       |
  120|  1.47M|    if (so == NULL) {
  ------------------
  |  Branch (120:9): [True: 0, False: 1.47M]
  ------------------
  121|       |        /* allocate new attribute in a buffer */
  122|      0|        PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  123|      0|        return NULL;
  124|      0|    }
  125|       |    /*
  126|       |     * We attempt to keep down contention on Malloc and Arena locks by
  127|       |     * limiting the number of these calls on high traversed paths. This
  128|       |     * is done for attributes by 'allocating' them from a pool already
  129|       |     * allocated by the parent object.
  130|       |     */
  131|  1.47M|    PZ_Lock(so->attributeLock);
  ------------------
  |  |  245|  1.47M|#define PZ_Lock(k) PR_Lock((k))
  ------------------
  132|  1.47M|    index = so->nextAttr++;
  133|  1.47M|    PZ_Unlock(so->attributeLock);
  ------------------
  |  |  246|  1.47M|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  134|  1.47M|    PORT_Assert(index < MAX_OBJS_ATTRS);
  ------------------
  |  |  120|  1.47M|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.47M|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.47M, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  135|  1.47M|    if (index >= MAX_OBJS_ATTRS)
  ------------------
  |  |   37|  1.47M|#define MAX_OBJS_ATTRS 45 /* number of attributes to preallocate in \
  ------------------
  |  Branch (135:9): [True: 0, False: 1.47M]
  ------------------
  136|      0|        return NULL;
  137|       |
  138|  1.47M|    attribute = &so->attrList[index];
  139|  1.47M|    attribute->attrib.type = type;
  140|  1.47M|    attribute->freeAttr = PR_FALSE;
  ------------------
  |  |  438|  1.47M|#define PR_FALSE 0
  ------------------
  141|  1.47M|    attribute->freeData = PR_FALSE;
  ------------------
  |  |  438|  1.47M|#define PR_FALSE 0
  ------------------
  142|  1.47M|    if (value) {
  ------------------
  |  Branch (142:9): [True: 1.18M, False: 294k]
  ------------------
  143|  1.18M|        if (len <= ATTR_SPACE) {
  ------------------
  |  |   39|  1.18M|#define ATTR_SPACE 50     /* Maximum size of attribute data before extra \
  ------------------
  |  Branch (143:13): [True: 1.16M, False: 12.7k]
  ------------------
  144|  1.16M|            attribute->attrib.pValue = attribute->space;
  145|  1.16M|        } else {
  146|  12.7k|            attribute->attrib.pValue = PORT_Alloc(len);
  ------------------
  |  |   52|  12.7k|#define PORT_Alloc PORT_Alloc_Util
  ------------------
  147|  12.7k|            attribute->freeData = PR_TRUE;
  ------------------
  |  |  437|  12.7k|#define PR_TRUE 1
  ------------------
  148|  12.7k|        }
  149|  1.18M|        if (attribute->attrib.pValue == NULL) {
  ------------------
  |  Branch (149:13): [True: 0, False: 1.18M]
  ------------------
  150|      0|            return NULL;
  151|      0|        }
  152|  1.18M|        PORT_Memcpy(attribute->attrib.pValue, value, len);
  ------------------
  |  |  180|  1.18M|#define PORT_Memcpy memcpy
  ------------------
  153|  1.18M|        attribute->attrib.ulValueLen = len;
  154|  1.18M|    } else {
  155|   294k|        attribute->attrib.pValue = NULL;
  156|   294k|        attribute->attrib.ulValueLen = 0;
  157|   294k|    }
  158|  1.47M|    attribute->attrib.type = type;
  159|  1.47M|    attribute->handle = type;
  160|  1.47M|    attribute->next = attribute->prev = NULL;
  161|  1.47M|    return attribute;
  162|  1.47M|}
pkcs11u.c:sftk_AddAttribute:
  387|  1.47M|{
  388|  1.47M|    SFTKSessionObject *sessObject = sftk_narrowToSessionObject(object);
  389|       |
  390|  1.47M|    if (sessObject == NULL)
  ------------------
  |  Branch (390:9): [True: 0, False: 1.47M]
  ------------------
  391|      0|        return;
  392|  1.47M|    PZ_Lock(sessObject->attributeLock);
  ------------------
  |  |  245|  1.47M|#define PZ_Lock(k) PR_Lock((k))
  ------------------
  393|  1.47M|    sftkqueue_add(attribute, attribute->handle,
  ------------------
  |  |  515|  1.47M|    {                                               \
  |  |  516|  1.47M|        int tmp = sftk_hash(id, hash_size);         \
  |  |  ------------------
  |  |  |  |  513|  1.47M|    ((PRUint32)((value)*SHMULTIPLIER) & (size - 1))
  |  |  |  |  ------------------
  |  |  |  |  |  |  509|  1.47M|#define SHMULTIPLIER 1791398085
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  517|  1.47M|        (element)->next = (head)[tmp];              \
  |  |  518|  1.47M|        (element)->prev = NULL;                     \
  |  |  519|  1.47M|        if ((head)[tmp])                            \
  |  |  ------------------
  |  |  |  Branch (519:13): [True: 628k, False: 846k]
  |  |  ------------------
  |  |  520|  1.47M|            (head)[tmp]->prev = (element);          \
  |  |  521|  1.47M|        (head)[tmp] = (element);                    \
  |  |  522|  1.47M|    }
  ------------------
  394|  1.47M|                  sessObject->head, sessObject->hashSize);
  395|  1.47M|    PZ_Unlock(sessObject->attributeLock);
  ------------------
  |  |  246|  1.47M|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  396|  1.47M|}
pkcs11u.c:sftk_tokenKeyLock:
  917|      2|{
  918|      2|    SKIP_AFTER_FORK(PZ_Lock(slot->objectLock));
  ------------------
  |  |  256|      2|#define SKIP_AFTER_FORK(x) x
  ------------------
  919|      2|}
pkcs11u.c:sftk_tokenKeyUnlock:
  923|      2|{
  924|      2|    SKIP_AFTER_FORK(PZ_Unlock(slot->objectLock));
  ------------------
  |  |  256|      2|#define SKIP_AFTER_FORK(x) x
  ------------------
  925|      2|}
pkcs11u.c:sftk_InitFreeList:
 1031|      2|{
 1032|      2|    if (!list->lock) {
  ------------------
  |  Branch (1032:9): [True: 2, False: 0]
  ------------------
 1033|      2|        list->lock = PZ_NewLock(nssILockObject);
  ------------------
  |  |  243|      2|#define PZ_NewLock(t) PR_NewLock()
  ------------------
 1034|      2|    }
 1035|      2|}
pkcs11u.c:sftk_CleanupFreeList:
 1046|      2|{
 1047|      2|    SFTKObject *object;
 1048|       |
 1049|      2|    if (!list->lock) {
  ------------------
  |  Branch (1049:9): [True: 0, False: 2]
  ------------------
 1050|      0|        return;
 1051|      0|    }
 1052|      2|    SKIP_AFTER_FORK(PZ_Lock(list->lock));
  ------------------
  |  |  256|      2|#define SKIP_AFTER_FORK(x) x
  ------------------
 1053|      2|    for (object = list->head; object != NULL;
  ------------------
  |  Branch (1053:31): [True: 0, False: 2]
  ------------------
 1054|      2|         object = sftk_freeObjectData(object)) {
 1055|      0|        PZ_DestroyLock(object->refLock);
  ------------------
  |  |  244|      0|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
 1056|      0|        if (isSessionList) {
  ------------------
  |  Branch (1056:13): [True: 0, False: 0]
  ------------------
 1057|      0|            PZ_DestroyLock(((SFTKSessionObject *)object)->attributeLock);
  ------------------
  |  |  244|      0|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
 1058|      0|        }
 1059|      0|    }
 1060|      2|    list->count = 0;
 1061|      2|    list->head = NULL;
 1062|      2|    SKIP_AFTER_FORK(PZ_Unlock(list->lock));
  ------------------
  |  |  256|      2|#define SKIP_AFTER_FORK(x) x
  ------------------
 1063|      2|    SKIP_AFTER_FORK(PZ_DestroyLock(list->lock));
  ------------------
  |  |  256|      2|#define SKIP_AFTER_FORK(x) x
  ------------------
 1064|      2|    list->lock = NULL;
 1065|      2|}
pkcs11u.c:sftk_ObjectFromHandleOnSlot:
 1201|   257k|{
 1202|   257k|    SFTKObject *object;
 1203|   257k|    PRUint32 index = sftk_hash(handle, slot->sessObjHashSize);
  ------------------
  |  |  513|   257k|    ((PRUint32)((value)*SHMULTIPLIER) & (size - 1))
  |  |  ------------------
  |  |  |  |  509|   257k|#define SHMULTIPLIER 1791398085
  |  |  ------------------
  ------------------
 1204|       |
 1205|   257k|    if (sftk_isToken(handle)) {
  ------------------
  |  |  504|   257k|#define sftk_isToken(id) (((id)&SFTK_TOKEN_MASK) == SFTK_TOKEN_MAGIC)
  |  |  ------------------
  |  |  |  |  478|   257k|#define SFTK_TOKEN_MASK 0x80000000L
  |  |  ------------------
  |  |               #define sftk_isToken(id) (((id)&SFTK_TOKEN_MASK) == SFTK_TOKEN_MAGIC)
  |  |  ------------------
  |  |  |  |  479|   257k|#define SFTK_TOKEN_MAGIC 0x80000000L
  |  |  ------------------
  |  |  |  Branch (504:26): [True: 0, False: 257k]
  |  |  ------------------
  ------------------
 1206|      0|        return sftk_NewTokenObject(slot, NULL, handle);
 1207|      0|    }
 1208|       |
 1209|   257k|    PZ_Lock(slot->objectLock);
  ------------------
  |  |  245|   257k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
 1210|   257k|    sftkqueue_find2(object, handle, index, slot->sessObjHashTable);
  ------------------
  |  |  555|   257k|    for ((element) = (head)[index];               \
  |  |  556|   257k|         (element) != NULL;                       \
  |  |  ------------------
  |  |  |  Branch (556:10): [True: 257k, False: 0]
  |  |  ------------------
  |  |  557|   257k|         (element) = (element)->next) {           \
  |  |  558|   257k|        if ((element)->handle == (id)) {          \
  |  |  ------------------
  |  |  |  Branch (558:13): [True: 257k, False: 0]
  |  |  ------------------
  |  |  559|   257k|            break;                                \
  |  |  560|   257k|        }                                         \
  |  |  561|   257k|    }
  ------------------
 1211|   257k|    if (object) {
  ------------------
  |  Branch (1211:9): [True: 257k, False: 0]
  ------------------
 1212|   257k|        sftk_ReferenceObject(object);
 1213|   257k|    }
 1214|   257k|    PZ_Unlock(slot->objectLock);
  ------------------
  |  |  246|   257k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
 1215|       |
 1216|   257k|    return (object);
 1217|   257k|}
pkcs11u.c:sftk_DestroyObject:
 1160|  71.5k|{
 1161|  71.5k|    CK_RV crv = CKR_OK;
  ------------------
  |  | 1388|  71.5k|#define CKR_OK 0x00000000UL
  ------------------
 1162|  71.5k|    SFTKSessionObject *so = sftk_narrowToSessionObject(object);
 1163|  71.5k|    SFTKTokenObject *to = sftk_narrowToTokenObject(object);
 1164|       |
 1165|  71.5k|    PORT_Assert(object->refCount == 0);
  ------------------
  |  |  120|  71.5k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  71.5k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 71.5k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1166|       |
 1167|       |    /* delete the database value */
 1168|  71.5k|    if (to) {
  ------------------
  |  Branch (1168:9): [True: 0, False: 71.5k]
  ------------------
 1169|      0|        if (to->dbKey.data) {
  ------------------
  |  Branch (1169:13): [True: 0, False: 0]
  ------------------
 1170|      0|            PORT_Free(to->dbKey.data);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 1171|      0|            to->dbKey.data = NULL;
 1172|      0|        }
 1173|      0|    }
 1174|  71.5k|    if (so) {
  ------------------
  |  Branch (1174:9): [True: 71.5k, False: 0]
  ------------------
 1175|  71.5k|        sftk_DestroySessionObjectData(so);
 1176|  71.5k|    }
 1177|  71.5k|    if (object->objectInfo) {
  ------------------
  |  Branch (1177:9): [True: 23.0k, False: 48.4k]
  ------------------
 1178|  23.0k|        (*object->infoFree)(object->objectInfo);
 1179|  23.0k|        object->objectInfo = NULL;
 1180|  23.0k|        object->infoFree = NULL;
 1181|  23.0k|    }
 1182|  71.5k|    if (so) {
  ------------------
  |  Branch (1182:9): [True: 71.5k, False: 0]
  ------------------
 1183|  71.5k|        sftk_PutObjectToList(object, &sessionObjectList, PR_TRUE);
  ------------------
  |  |  437|  71.5k|#define PR_TRUE 1
  ------------------
 1184|  71.5k|    } else {
 1185|      0|        sftk_PutObjectToList(object, &tokenObjectList, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 1186|      0|    }
 1187|  71.5k|    return crv;
 1188|  71.5k|}
pkcs11u.c:sftk_PutObjectToList:
  989|  71.5k|{
  990|       |
  991|       |    /* the code below is equivalent to :
  992|       |     *     optimizeSpace = isSessionObject ? object->optimizeSpace : PR_FALSE;
  993|       |     * just faster.
  994|       |     */
  995|  71.5k|    PRBool optimizeSpace = isSessionObject &&
  ------------------
  |  Branch (995:28): [True: 71.5k, False: 0]
  ------------------
  996|  71.5k|                           ((SFTKSessionObject *)object)->optimizeSpace;
  ------------------
  |  Branch (996:28): [True: 71.5k, False: 0]
  ------------------
  997|  71.5k|    if (object->refLock && !optimizeSpace) {
  ------------------
  |  Branch (997:9): [True: 71.5k, False: 0]
  |  Branch (997:28): [True: 0, False: 71.5k]
  ------------------
  998|      0|        PZ_Lock(list->lock);
  ------------------
  |  |  245|      0|#define PZ_Lock(k) PR_Lock((k))
  ------------------
  999|      0|        if (list->count < MAX_OBJECT_LIST_SIZE) {
  ------------------
  |  |   71|      0|#define MAX_OBJECT_LIST_SIZE 800
  ------------------
  |  Branch (999:13): [True: 0, False: 0]
  ------------------
 1000|      0|            object->next = list->head;
 1001|      0|            list->head = object;
 1002|      0|            list->count++;
 1003|      0|            PZ_Unlock(list->lock);
  ------------------
  |  |  246|      0|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
 1004|      0|            return;
 1005|      0|        }
 1006|      0|        PZ_Unlock(list->lock);
  ------------------
  |  |  246|      0|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
 1007|      0|    }
 1008|  71.5k|    if (isSessionObject) {
  ------------------
  |  Branch (1008:9): [True: 71.5k, False: 0]
  ------------------
 1009|  71.5k|        SFTKSessionObject *so = (SFTKSessionObject *)object;
 1010|  71.5k|        PZ_DestroyLock(so->attributeLock);
  ------------------
  |  |  244|  71.5k|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
 1011|  71.5k|        so->attributeLock = NULL;
 1012|  71.5k|    }
 1013|  71.5k|    if (object->refLock) {
  ------------------
  |  Branch (1013:9): [True: 71.5k, False: 0]
  ------------------
 1014|  71.5k|        PZ_DestroyLock(object->refLock);
  ------------------
  |  |  244|  71.5k|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
 1015|  71.5k|        object->refLock = NULL;
 1016|  71.5k|    }
 1017|  71.5k|    PORT_Free(object);
  ------------------
  |  |   60|  71.5k|#define PORT_Free PORT_Free_Util
  ------------------
 1018|  71.5k|}
pkcs11u.c:sftk_DestroySessionObjectData:
 1136|  71.5k|{
 1137|  71.5k|    int i;
 1138|       |
 1139|  3.29M|    for (i = 0; i < MAX_OBJS_ATTRS; i++) {
  ------------------
  |  |   37|  3.29M|#define MAX_OBJS_ATTRS 45 /* number of attributes to preallocate in \
  ------------------
  |  Branch (1139:17): [True: 3.22M, False: 71.5k]
  ------------------
 1140|  3.22M|        unsigned char *value = so->attrList[i].attrib.pValue;
 1141|  3.22M|        if (value) {
  ------------------
  |  Branch (1141:13): [True: 1.19M, False: 2.02M]
  ------------------
 1142|  1.19M|            PORT_Memset(value, 0, so->attrList[i].attrib.ulValueLen);
  ------------------
  |  |  182|  1.19M|#define PORT_Memset memset
  ------------------
 1143|  1.19M|            if (so->attrList[i].freeData) {
  ------------------
  |  Branch (1143:17): [True: 12.7k, False: 1.17M]
  ------------------
 1144|  12.7k|                PORT_Free(value);
  ------------------
  |  |   60|  12.7k|#define PORT_Free PORT_Free_Util
  ------------------
 1145|  12.7k|            }
 1146|  1.19M|            so->attrList[i].attrib.pValue = NULL;
 1147|  1.19M|            so->attrList[i].freeData = PR_FALSE;
  ------------------
  |  |  438|  1.19M|#define PR_FALSE 0
  ------------------
 1148|  1.19M|        }
 1149|  3.22M|    }
 1150|       |    /*  PZ_DestroyLock(so->attributeLock);*/
 1151|  71.5k|    return CKR_OK;
  ------------------
  |  | 1388|  71.5k|#define CKR_OK 0x00000000UL
  ------------------
 1152|  71.5k|}

s_shutdown:
 2461|      1|{
 2462|       |#ifdef SQLITE_UNSAFE_THREADS
 2463|       |    if (sqlite_lock) {
 2464|       |        PR_DestroyLock(sqlite_lock);
 2465|       |        sqlite_lock = NULL;
 2466|       |    }
 2467|       |#endif
 2468|      1|    return CKR_OK;
  ------------------
  |  | 1388|      1|#define CKR_OK 0x00000000UL
  ------------------
 2469|      1|}

sftkdb_FindObjectsInit:
 1341|  30.6k|{
 1342|  30.6k|    unsigned char *data = NULL;
 1343|  30.6k|    CK_ATTRIBUTE *ntemplate = NULL;
 1344|  30.6k|    CK_RV crv;
 1345|  30.6k|    int dataSize;
 1346|  30.6k|    SDB *db;
 1347|       |
 1348|  30.6k|    if (handle == NULL) {
  ------------------
  |  Branch (1348:9): [True: 30.6k, False: 0]
  ------------------
 1349|  30.6k|        return CKR_OK;
  ------------------
  |  | 1388|  30.6k|#define CKR_OK 0x00000000UL
  ------------------
 1350|  30.6k|    }
 1351|      0|    db = SFTK_GET_SDB(handle);
  ------------------
  |  |   40|      0|    ((handle)->update ? (handle)->update : (handle)->db)
  |  |  ------------------
  |  |  |  Branch (40:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1352|       |
 1353|      0|    if (count != 0) {
  ------------------
  |  Branch (1353:9): [True: 0, False: 0]
  ------------------
 1354|      0|        ntemplate = sftkdb_fixupTemplateIn(template, count, &data, &dataSize);
 1355|      0|        if (ntemplate == NULL) {
  ------------------
  |  Branch (1355:13): [True: 0, False: 0]
  ------------------
 1356|      0|            return CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
 1357|      0|        }
 1358|      0|    }
 1359|       |
 1360|      0|    crv = (*db->sdb_FindObjectsInit)(db, ntemplate,
 1361|      0|                                     count, find);
 1362|      0|    if (data) {
  ------------------
  |  Branch (1362:9): [True: 0, False: 0]
  ------------------
 1363|      0|        PORT_Free(ntemplate);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 1364|      0|        PORT_ZFree(data, dataSize);
  ------------------
  |  |   75|      0|#define PORT_ZFree PORT_ZFree_Util
  ------------------
 1365|      0|    }
 1366|      0|    return crv;
 1367|      0|}
sftkdb_FindObjects:
 1372|  30.6k|{
 1373|  30.6k|    CK_RV crv;
 1374|  30.6k|    SDB *db;
 1375|       |
 1376|  30.6k|    if (handle == NULL) {
  ------------------
  |  Branch (1376:9): [True: 30.6k, False: 0]
  ------------------
 1377|  30.6k|        *count = 0;
 1378|  30.6k|        return CKR_OK;
  ------------------
  |  | 1388|  30.6k|#define CKR_OK 0x00000000UL
  ------------------
 1379|  30.6k|    }
 1380|      0|    db = SFTK_GET_SDB(handle);
  ------------------
  |  |   40|      0|    ((handle)->update ? (handle)->update : (handle)->db)
  |  |  ------------------
  |  |  |  Branch (40:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1381|       |
 1382|      0|    crv = (*db->sdb_FindObjects)(db, find, ids,
 1383|      0|                                 arraySize, count);
 1384|      0|    if (crv == CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (1384:9): [True: 0, False: 0]
  ------------------
 1385|      0|        unsigned int i;
 1386|      0|        for (i = 0; i < *count; i++) {
  ------------------
  |  Branch (1386:21): [True: 0, False: 0]
  ------------------
 1387|      0|            ids[i] |= (handle->type | SFTK_TOKEN_TYPE);
  ------------------
  |  |   33|      0|#define SFTK_TOKEN_TYPE 0x80000000
  ------------------
 1388|      0|        }
 1389|      0|    }
 1390|      0|    return crv;
 1391|  30.6k|}
sftkdb_FindObjectsFinal:
 1395|  30.6k|{
 1396|  30.6k|    SDB *db;
 1397|  30.6k|    if (handle == NULL) {
  ------------------
  |  Branch (1397:9): [True: 30.6k, False: 0]
  ------------------
 1398|  30.6k|        return CKR_OK;
  ------------------
  |  | 1388|  30.6k|#define CKR_OK 0x00000000UL
  ------------------
 1399|  30.6k|    }
 1400|      0|    db = SFTK_GET_SDB(handle);
  ------------------
  |  |   40|      0|    ((handle)->update ? (handle)->update : (handle)->db)
  |  |  ------------------
  |  |  |  Branch (40:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1401|      0|    return (*db->sdb_FindObjectsFinal)(db, find);
 1402|  30.6k|}
sftk_freeDB:
 2621|  30.6k|{
 2622|  30.6k|    PRInt32 ref;
 2623|       |
 2624|  30.6k|    if (!handle)
  ------------------
  |  Branch (2624:9): [True: 30.6k, False: 0]
  ------------------
 2625|  30.6k|        return;
 2626|      0|    ref = PR_ATOMIC_DECREMENT(&handle->ref);
  ------------------
  |  |  123|      0|#define PR_ATOMIC_DECREMENT(val) __sync_sub_and_fetch(val, 1)
  ------------------
 2627|      0|    if (ref == 0) {
  ------------------
  |  Branch (2627:9): [True: 0, False: 0]
  ------------------
 2628|      0|        sftkdb_CloseDB(handle);
 2629|      0|    }
 2630|      0|    return;
 2631|  30.6k|}
sftk_getCertDB:
 2639|  30.6k|{
 2640|  30.6k|    SFTKDBHandle *dbHandle;
 2641|       |
 2642|  30.6k|    PZ_Lock(slot->slotLock);
  ------------------
  |  |  245|  30.6k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
 2643|  30.6k|    dbHandle = slot->certDB;
 2644|  30.6k|    if (dbHandle) {
  ------------------
  |  Branch (2644:9): [True: 0, False: 30.6k]
  ------------------
 2645|      0|        (void)PR_ATOMIC_INCREMENT(&dbHandle->ref);
  ------------------
  |  |  122|      0|#define PR_ATOMIC_INCREMENT(val) __sync_add_and_fetch(val, 1)
  ------------------
 2646|      0|    }
 2647|  30.6k|    PZ_Unlock(slot->slotLock);
  ------------------
  |  |  246|  30.6k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
 2648|  30.6k|    return dbHandle;
 2649|  30.6k|}
sftk_getKeyDB:
 2657|  73.6k|{
 2658|  73.6k|    SFTKDBHandle *dbHandle;
 2659|       |
 2660|  73.6k|    SKIP_AFTER_FORK(PZ_Lock(slot->slotLock));
  ------------------
  |  |  256|  73.6k|#define SKIP_AFTER_FORK(x) x
  ------------------
 2661|  73.6k|    dbHandle = slot->keyDB;
 2662|  73.6k|    if (dbHandle) {
  ------------------
  |  Branch (2662:9): [True: 0, False: 73.6k]
  ------------------
 2663|      0|        (void)PR_ATOMIC_INCREMENT(&dbHandle->ref);
  ------------------
  |  |  122|      0|#define PR_ATOMIC_INCREMENT(val) __sync_add_and_fetch(val, 1)
  ------------------
 2664|      0|    }
 2665|  73.6k|    SKIP_AFTER_FORK(PZ_Unlock(slot->slotLock));
  ------------------
  |  |  256|  73.6k|#define SKIP_AFTER_FORK(x) x
  ------------------
 2666|  73.6k|    return dbHandle;
 2667|  73.6k|}
sftkdb_Shutdown:
 3041|      1|{
 3042|      1|    s_shutdown();
 3043|       |#ifndef NSS_DISABLE_DBM
 3044|       |    sftkdbCall_Shutdown();
 3045|       |#endif /* NSS_DISABLE_DBM */
 3046|      1|    return CKR_OK;
  ------------------
  |  | 1388|      1|#define CKR_OK 0x00000000UL
  ------------------
 3047|      1|}

sftk_VerifyDH_Prime:
 6741|    940|{
 6742|       |    /* use the length to decide which primes to check */
 6743|    940|    switch (dhPrime->len) {
  ------------------
  |  Branch (6743:13): [True: 0, False: 940]
  ------------------
 6744|      0|        case 1536 / PR_BITS_PER_BYTE:
  ------------------
  |  |  286|      0|#define PR_BITS_PER_BYTE    8
  ------------------
  |  Branch (6744:9): [True: 0, False: 940]
  ------------------
 6745|       |            /* don't accept 1536 bit primes in FIPS mode */
 6746|      0|            if (isFIPS) {
  ------------------
  |  Branch (6746:17): [True: 0, False: 0]
  ------------------
 6747|      0|                break;
 6748|      0|            }
 6749|      0|            if (PORT_Memcmp(dhPrime->data, prime_ike_1536,
  ------------------
  |  |  179|      0|#define PORT_Memcmp memcmp
  ------------------
  |  Branch (6749:17): [True: 0, False: 0]
  ------------------
 6750|      0|                            sizeof(prime_ike_1536)) == 0) {
 6751|      0|                if (g)
  ------------------
  |  Branch (6751:21): [True: 0, False: 0]
  ------------------
 6752|      0|                    *g = generator_2;
 6753|      0|                return &subprime_ike_1536;
 6754|      0|            }
 6755|      0|            break;
 6756|    516|        case 2048 / PR_BITS_PER_BYTE:
  ------------------
  |  |  286|    516|#define PR_BITS_PER_BYTE    8
  ------------------
  |  Branch (6756:9): [True: 516, False: 424]
  ------------------
 6757|    516|            if (PORT_Memcmp(dhPrime->data, prime_tls_2048,
  ------------------
  |  |  179|    516|#define PORT_Memcmp memcmp
  ------------------
  |  Branch (6757:17): [True: 516, False: 0]
  ------------------
 6758|    516|                            sizeof(prime_tls_2048)) == 0) {
 6759|    516|                if (g)
  ------------------
  |  Branch (6759:21): [True: 0, False: 516]
  ------------------
 6760|      0|                    *g = generator_2;
 6761|    516|                return &subprime_tls_2048;
 6762|    516|            }
 6763|      0|            if (PORT_Memcmp(dhPrime->data, prime_ike_2048,
  ------------------
  |  |  179|      0|#define PORT_Memcmp memcmp
  ------------------
  |  Branch (6763:17): [True: 0, False: 0]
  ------------------
 6764|      0|                            sizeof(prime_ike_2048)) == 0) {
 6765|      0|                if (g)
  ------------------
  |  Branch (6765:21): [True: 0, False: 0]
  ------------------
 6766|      0|                    *g = generator_2;
 6767|      0|                return &subprime_ike_2048;
 6768|      0|            }
 6769|      0|            break;
 6770|      3|        case 3072 / PR_BITS_PER_BYTE:
  ------------------
  |  |  286|      3|#define PR_BITS_PER_BYTE    8
  ------------------
  |  Branch (6770:9): [True: 3, False: 937]
  ------------------
 6771|      3|            if (PORT_Memcmp(dhPrime->data, prime_tls_3072,
  ------------------
  |  |  179|      3|#define PORT_Memcmp memcmp
  ------------------
  |  Branch (6771:17): [True: 3, False: 0]
  ------------------
 6772|      3|                            sizeof(prime_tls_3072)) == 0) {
 6773|      3|                if (g)
  ------------------
  |  Branch (6773:21): [True: 0, False: 3]
  ------------------
 6774|      0|                    *g = generator_2;
 6775|      3|                return &subprime_tls_3072;
 6776|      3|            }
 6777|      0|            if (PORT_Memcmp(dhPrime->data, prime_ike_3072,
  ------------------
  |  |  179|      0|#define PORT_Memcmp memcmp
  ------------------
  |  Branch (6777:17): [True: 0, False: 0]
  ------------------
 6778|      0|                            sizeof(prime_ike_3072)) == 0) {
 6779|      0|                if (g)
  ------------------
  |  Branch (6779:21): [True: 0, False: 0]
  ------------------
 6780|      0|                    *g = generator_2;
 6781|      0|                return &subprime_ike_3072;
 6782|      0|            }
 6783|      0|            break;
 6784|      9|        case 4096 / PR_BITS_PER_BYTE:
  ------------------
  |  |  286|      9|#define PR_BITS_PER_BYTE    8
  ------------------
  |  Branch (6784:9): [True: 9, False: 931]
  ------------------
 6785|      9|            if (PORT_Memcmp(dhPrime->data, prime_tls_4096,
  ------------------
  |  |  179|      9|#define PORT_Memcmp memcmp
  ------------------
  |  Branch (6785:17): [True: 9, False: 0]
  ------------------
 6786|      9|                            sizeof(prime_tls_4096)) == 0) {
 6787|      9|                if (g)
  ------------------
  |  Branch (6787:21): [True: 0, False: 9]
  ------------------
 6788|      0|                    *g = generator_2;
 6789|      9|                return &subprime_tls_4096;
 6790|      9|            }
 6791|      0|            if (PORT_Memcmp(dhPrime->data, prime_ike_4096,
  ------------------
  |  |  179|      0|#define PORT_Memcmp memcmp
  ------------------
  |  Branch (6791:17): [True: 0, False: 0]
  ------------------
 6792|      0|                            sizeof(prime_ike_4096)) == 0) {
 6793|      0|                if (g)
  ------------------
  |  Branch (6793:21): [True: 0, False: 0]
  ------------------
 6794|      0|                    *g = generator_2;
 6795|      0|                return &subprime_ike_4096;
 6796|      0|            }
 6797|      0|            break;
 6798|      0|        case 6144 / PR_BITS_PER_BYTE:
  ------------------
  |  |  286|      0|#define PR_BITS_PER_BYTE    8
  ------------------
  |  Branch (6798:9): [True: 0, False: 940]
  ------------------
 6799|      0|            if (PORT_Memcmp(dhPrime->data, prime_tls_6144,
  ------------------
  |  |  179|      0|#define PORT_Memcmp memcmp
  ------------------
  |  Branch (6799:17): [True: 0, False: 0]
  ------------------
 6800|      0|                            sizeof(prime_tls_6144)) == 0) {
 6801|      0|                if (g)
  ------------------
  |  Branch (6801:21): [True: 0, False: 0]
  ------------------
 6802|      0|                    *g = generator_2;
 6803|      0|                return &subprime_tls_6144;
 6804|      0|            }
 6805|      0|            if (PORT_Memcmp(dhPrime->data, prime_ike_6144,
  ------------------
  |  |  179|      0|#define PORT_Memcmp memcmp
  ------------------
  |  Branch (6805:17): [True: 0, False: 0]
  ------------------
 6806|      0|                            sizeof(prime_ike_6144)) == 0) {
 6807|      0|                if (g)
  ------------------
  |  Branch (6807:21): [True: 0, False: 0]
  ------------------
 6808|      0|                    *g = generator_2;
 6809|      0|                return &subprime_ike_6144;
 6810|      0|            }
 6811|      0|            break;
 6812|    412|        case 8192 / PR_BITS_PER_BYTE:
  ------------------
  |  |  286|    412|#define PR_BITS_PER_BYTE    8
  ------------------
  |  Branch (6812:9): [True: 412, False: 528]
  ------------------
 6813|    412|            if (PORT_Memcmp(dhPrime->data, prime_tls_8192,
  ------------------
  |  |  179|    412|#define PORT_Memcmp memcmp
  ------------------
  |  Branch (6813:17): [True: 412, False: 0]
  ------------------
 6814|    412|                            sizeof(prime_tls_8192)) == 0) {
 6815|    412|                if (g)
  ------------------
  |  Branch (6815:21): [True: 0, False: 412]
  ------------------
 6816|      0|                    *g = generator_2;
 6817|    412|                return &subprime_tls_8192;
 6818|    412|            }
 6819|      0|            if (PORT_Memcmp(dhPrime->data, prime_ike_8192,
  ------------------
  |  |  179|      0|#define PORT_Memcmp memcmp
  ------------------
  |  Branch (6819:17): [True: 0, False: 0]
  ------------------
 6820|      0|                            sizeof(prime_ike_8192)) == 0) {
 6821|      0|                if (g)
  ------------------
  |  Branch (6821:21): [True: 0, False: 0]
  ------------------
 6822|      0|                    *g = generator_2;
 6823|      0|                return &subprime_ike_8192;
 6824|      0|            }
 6825|      0|            break;
 6826|    940|    }
 6827|       |    /* no match found, return an error */
 6828|      0|    PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 6829|      0|    return NULL;
 6830|    940|}

sftk_HMACMechanismToHash:
   31|  53.3k|{
   32|  53.3k|    switch (mech) {
  ------------------
  |  Branch (32:13): [True: 0, False: 53.3k]
  ------------------
   33|      0|        case CKM_MD2_HMAC:
  ------------------
  |  |  850|      0|#define CKM_MD2_HMAC 0x00000201UL
  ------------------
  |  Branch (33:9): [True: 0, False: 53.3k]
  ------------------
   34|      0|            return HASH_AlgMD2;
   35|  34.0k|        case CKM_MD5_HMAC:
  ------------------
  |  |  856|  34.0k|#define CKM_MD5_HMAC 0x00000211UL
  ------------------
  |  Branch (35:9): [True: 34.0k, False: 19.3k]
  ------------------
   36|  34.0k|        case CKM_SSL3_MD5_MAC:
  ------------------
  |  |  975|  34.0k|#define CKM_SSL3_MD5_MAC 0x00000380UL
  ------------------
  |  Branch (36:9): [True: 0, False: 53.3k]
  ------------------
   37|  34.0k|            return HASH_AlgMD5;
   38|  11.8k|        case CKM_SHA_1_HMAC:
  ------------------
  |  |  862|  11.8k|#define CKM_SHA_1_HMAC 0x00000221UL
  ------------------
  |  Branch (38:9): [True: 11.8k, False: 41.5k]
  ------------------
   39|  11.8k|        case CKM_SSL3_SHA1_MAC:
  ------------------
  |  |  976|  11.8k|#define CKM_SSL3_SHA1_MAC 0x00000381UL
  ------------------
  |  Branch (39:9): [True: 0, False: 53.3k]
  ------------------
   40|  11.8k|            return HASH_AlgSHA1;
   41|      0|        case CKM_SHA224_HMAC:
  ------------------
  |  |  888|      0|#define CKM_SHA224_HMAC 0x00000256UL
  ------------------
  |  Branch (41:9): [True: 0, False: 53.3k]
  ------------------
   42|      0|            return HASH_AlgSHA224;
   43|  4.48k|        case CKM_SHA256_HMAC:
  ------------------
  |  |  877|  4.48k|#define CKM_SHA256_HMAC 0x00000251UL
  ------------------
  |  Branch (43:9): [True: 4.48k, False: 48.9k]
  ------------------
   44|  4.48k|            return HASH_AlgSHA256;
   45|  3.03k|        case CKM_SHA384_HMAC:
  ------------------
  |  |  880|  3.03k|#define CKM_SHA384_HMAC 0x00000261UL
  ------------------
  |  Branch (45:9): [True: 3.03k, False: 50.3k]
  ------------------
   46|  3.03k|            return HASH_AlgSHA384;
   47|      0|        case CKM_SHA512_HMAC:
  ------------------
  |  |  883|      0|#define CKM_SHA512_HMAC 0x00000271UL
  ------------------
  |  Branch (47:9): [True: 0, False: 53.3k]
  ------------------
   48|      0|            return HASH_AlgSHA512;
   49|      0|        case CKM_SHA3_224_HMAC:
  ------------------
  |  |  903|      0|#define CKM_SHA3_224_HMAC 0x000002B6UL
  ------------------
  |  Branch (49:9): [True: 0, False: 53.3k]
  ------------------
   50|      0|            return HASH_AlgSHA3_224;
   51|      0|        case CKM_SHA3_256_HMAC:
  ------------------
  |  |  899|      0|#define CKM_SHA3_256_HMAC 0x000002B1UL
  ------------------
  |  Branch (51:9): [True: 0, False: 53.3k]
  ------------------
   52|      0|            return HASH_AlgSHA3_256;
   53|      0|        case CKM_SHA3_384_HMAC:
  ------------------
  |  |  907|      0|#define CKM_SHA3_384_HMAC 0x000002C1UL
  ------------------
  |  Branch (53:9): [True: 0, False: 53.3k]
  ------------------
   54|      0|            return HASH_AlgSHA3_384;
   55|      0|        case CKM_SHA3_512_HMAC:
  ------------------
  |  |  911|      0|#define CKM_SHA3_512_HMAC 0x000002D1UL
  ------------------
  |  Branch (55:9): [True: 0, False: 53.3k]
  ------------------
   56|      0|            return HASH_AlgSHA3_512;
   57|  53.3k|    }
   58|      0|    return HASH_AlgNULL;
   59|  53.3k|}
sftk_HMACConstantTime_New:
  110|  8.99k|{
  111|  8.99k|    CK_NSS_MAC_CONSTANT_TIME_PARAMS *params =
  112|  8.99k|        (CK_NSS_MAC_CONSTANT_TIME_PARAMS *)mech->pParameter;
  113|  8.99k|    sftk_MACConstantTimeCtx *ctx;
  114|       |
  115|  8.99k|    if (params->ulHeaderLen > sizeof(ctx->header)) {
  ------------------
  |  Branch (115:9): [True: 0, False: 8.99k]
  ------------------
  116|      0|        return NULL;
  117|      0|    }
  118|  8.99k|    ctx = SetupMAC(mech, key);
  119|  8.99k|    if (!ctx) {
  ------------------
  |  Branch (119:9): [True: 0, False: 8.99k]
  ------------------
  120|      0|        return NULL;
  121|      0|    }
  122|       |
  123|  8.99k|    ctx->headerLength = params->ulHeaderLen;
  124|  8.99k|    memcpy(ctx->header, params->pHeader, params->ulHeaderLen);
  125|  8.99k|    return ctx;
  126|  8.99k|}
sftk_HMACConstantTime_Update:
  174|  8.99k|{
  175|  8.99k|    sftk_MACConstantTimeCtx *ctx = (sftk_MACConstantTimeCtx *)pctx;
  176|  8.99k|    PORT_CheckSuccess(HMAC_ConstantTime(
  ------------------
  |  |  144|  8.99k|#define PORT_CheckSuccess(f) PR_ASSERT((f) == SECSuccess)
  |  |  ------------------
  |  |  |  |  208|  8.99k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 8.99k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  177|  8.99k|        ctx->mac, NULL, sizeof(ctx->mac),
  178|  8.99k|        ctx->hash,
  179|  8.99k|        ctx->secret, ctx->secretLength,
  180|  8.99k|        ctx->header, ctx->headerLength,
  181|  8.99k|        data, len,
  182|  8.99k|        ctx->totalLength));
  183|  8.99k|}
sftk_MACConstantTime_EndHash:
  201|  8.99k|{
  202|  8.99k|    const sftk_MACConstantTimeCtx *ctx = (sftk_MACConstantTimeCtx *)pctx;
  203|  8.99k|    unsigned int toCopy = ctx->hash->length;
  204|  8.99k|    if (toCopy > maxLength) {
  ------------------
  |  Branch (204:9): [True: 0, False: 8.99k]
  ------------------
  205|      0|        toCopy = maxLength;
  206|      0|    }
  207|  8.99k|    memcpy(out, ctx->mac, toCopy);
  208|  8.99k|    if (outLength) {
  ------------------
  |  Branch (208:9): [True: 8.99k, False: 0]
  ------------------
  209|  8.99k|        *outLength = toCopy;
  210|  8.99k|    }
  211|  8.99k|}
sftk_MACConstantTime_DestroyContext:
  215|  8.99k|{
  216|  8.99k|    PORT_ZFree(pctx, sizeof(sftk_MACConstantTimeCtx));
  ------------------
  |  |   75|  8.99k|#define PORT_ZFree PORT_ZFree_Util
  ------------------
  217|  8.99k|}
sftk_MAC_Create:
  221|  44.3k|{
  222|  44.3k|    CK_RV ret;
  223|       |
  224|  44.3k|    if (ret_ctx == NULL || key == NULL) {
  ------------------
  |  Branch (224:9): [True: 0, False: 44.3k]
  |  Branch (224:28): [True: 0, False: 44.3k]
  ------------------
  225|      0|        return CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
  226|      0|    }
  227|       |
  228|  44.3k|    *ret_ctx = PORT_New(sftk_MACCtx);
  ------------------
  |  |  151|  44.3k|#define PORT_New(type) (type *)PORT_Alloc(sizeof(type))
  |  |  ------------------
  |  |  |  |   52|  44.3k|#define PORT_Alloc PORT_Alloc_Util
  |  |  ------------------
  ------------------
  229|  44.3k|    if (*ret_ctx == NULL) {
  ------------------
  |  Branch (229:9): [True: 0, False: 44.3k]
  ------------------
  230|      0|        return CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
  231|      0|    }
  232|       |
  233|  44.3k|    ret = sftk_MAC_Init(*ret_ctx, mech, key);
  234|  44.3k|    if (ret != CKR_OK) {
  ------------------
  |  | 1388|  44.3k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (234:9): [True: 0, False: 44.3k]
  ------------------
  235|      0|        sftk_MAC_DestroyContext(*ret_ctx, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  236|      0|    }
  237|       |
  238|  44.3k|    return ret;
  239|  44.3k|}
sftk_MAC_Init:
  243|  44.3k|{
  244|  44.3k|    SFTKAttribute *keyval = NULL;
  245|  44.3k|    PRBool isFIPS = sftk_isFIPS(key->slot->slotID);
  ------------------
  |  |  506|  44.3k|    (((id) == FIPS_SLOT_ID) || ((id) >= SFTK_MIN_FIPS_USER_SLOT_ID))
  |  |  ------------------
  |  |  |  |  500|  44.3k|#define FIPS_SLOT_ID 3
  |  |  ------------------
  |  |                   (((id) == FIPS_SLOT_ID) || ((id) >= SFTK_MIN_FIPS_USER_SLOT_ID))
  |  |  ------------------
  |  |  |  |  567|  44.3k|#define SFTK_MIN_FIPS_USER_SLOT_ID 101
  |  |  ------------------
  |  |  |  Branch (506:6): [True: 0, False: 44.3k]
  |  |  |  Branch (506:32): [True: 0, False: 44.3k]
  |  |  ------------------
  ------------------
  246|  44.3k|    CK_RV ret = CKR_OK;
  ------------------
  |  | 1388|  44.3k|#define CKR_OK 0x00000000UL
  ------------------
  247|       |
  248|       |    /* Find the actual value of the key. */
  249|  44.3k|    keyval = sftk_FindAttribute(key, CKA_VALUE);
  ------------------
  |  |  516|  44.3k|#define CKA_VALUE 0x00000011UL
  ------------------
  250|  44.3k|    if (keyval == NULL) {
  ------------------
  |  Branch (250:9): [True: 0, False: 44.3k]
  ------------------
  251|      0|        ret = CKR_KEY_SIZE_RANGE;
  ------------------
  |  | 1432|      0|#define CKR_KEY_SIZE_RANGE 0x00000062UL
  ------------------
  252|      0|        goto done;
  253|      0|    }
  254|       |
  255|  44.3k|    ret = sftk_MAC_InitRaw(ctx, mech,
  256|  44.3k|                           (const unsigned char *)keyval->attrib.pValue,
  257|  44.3k|                           keyval->attrib.ulValueLen, isFIPS);
  258|       |
  259|  44.3k|done:
  260|  44.3k|    if (keyval) {
  ------------------
  |  Branch (260:9): [True: 44.3k, False: 0]
  ------------------
  261|  44.3k|        sftk_FreeAttribute(keyval);
  262|  44.3k|    }
  263|  44.3k|    return ret;
  264|  44.3k|}
sftk_MAC_InitRaw:
  268|  44.3k|{
  269|  44.3k|    const SECHashObject *hashObj = NULL;
  270|  44.3k|    CK_RV ret = CKR_OK;
  ------------------
  |  | 1388|  44.3k|#define CKR_OK 0x00000000UL
  ------------------
  271|       |
  272|  44.3k|    if (ctx == NULL) {
  ------------------
  |  Branch (272:9): [True: 0, False: 44.3k]
  ------------------
  273|      0|        return CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
  274|      0|    }
  275|       |
  276|       |    /* Clear the context before use. */
  277|  44.3k|    PORT_Memset(ctx, 0, sizeof(*ctx));
  ------------------
  |  |  182|  44.3k|#define PORT_Memset memset
  ------------------
  278|       |
  279|       |    /* Save the mech. */
  280|  44.3k|    ctx->mech = mech;
  281|       |
  282|       |    /* Initialize the correct MAC context. */
  283|  44.3k|    switch (mech) {
  284|      0|        case CKM_MD2_HMAC:
  ------------------
  |  |  850|      0|#define CKM_MD2_HMAC 0x00000201UL
  ------------------
  |  Branch (284:9): [True: 0, False: 44.3k]
  ------------------
  285|  34.0k|        case CKM_MD5_HMAC:
  ------------------
  |  |  856|  34.0k|#define CKM_MD5_HMAC 0x00000211UL
  ------------------
  |  Branch (285:9): [True: 34.0k, False: 10.3k]
  ------------------
  286|  37.9k|        case CKM_SHA_1_HMAC:
  ------------------
  |  |  862|  37.9k|#define CKM_SHA_1_HMAC 0x00000221UL
  ------------------
  |  Branch (286:9): [True: 3.91k, False: 40.4k]
  ------------------
  287|  37.9k|        case CKM_SHA224_HMAC:
  ------------------
  |  |  888|  37.9k|#define CKM_SHA224_HMAC 0x00000256UL
  ------------------
  |  Branch (287:9): [True: 0, False: 44.3k]
  ------------------
  288|  41.3k|        case CKM_SHA256_HMAC:
  ------------------
  |  |  877|  41.3k|#define CKM_SHA256_HMAC 0x00000251UL
  ------------------
  |  Branch (288:9): [True: 3.39k, False: 40.9k]
  ------------------
  289|  44.3k|        case CKM_SHA384_HMAC:
  ------------------
  |  |  880|  44.3k|#define CKM_SHA384_HMAC 0x00000261UL
  ------------------
  |  Branch (289:9): [True: 3.03k, False: 41.3k]
  ------------------
  290|  44.3k|        case CKM_SHA512_HMAC:
  ------------------
  |  |  883|  44.3k|#define CKM_SHA512_HMAC 0x00000271UL
  ------------------
  |  Branch (290:9): [True: 0, False: 44.3k]
  ------------------
  291|  44.3k|        case CKM_SHA3_224_HMAC:
  ------------------
  |  |  903|  44.3k|#define CKM_SHA3_224_HMAC 0x000002B6UL
  ------------------
  |  Branch (291:9): [True: 0, False: 44.3k]
  ------------------
  292|  44.3k|        case CKM_SHA3_256_HMAC:
  ------------------
  |  |  899|  44.3k|#define CKM_SHA3_256_HMAC 0x000002B1UL
  ------------------
  |  Branch (292:9): [True: 0, False: 44.3k]
  ------------------
  293|  44.3k|        case CKM_SHA3_384_HMAC:
  ------------------
  |  |  907|  44.3k|#define CKM_SHA3_384_HMAC 0x000002C1UL
  ------------------
  |  Branch (293:9): [True: 0, False: 44.3k]
  ------------------
  294|  44.3k|        case CKM_SHA3_512_HMAC:
  ------------------
  |  |  911|  44.3k|#define CKM_SHA3_512_HMAC 0x000002D1UL
  ------------------
  |  Branch (294:9): [True: 0, False: 44.3k]
  ------------------
  295|  44.3k|            hashObj = HASH_GetRawHashObject(sftk_HMACMechanismToHash(mech));
  296|       |
  297|       |            /* Because we condition above only on hashes we know to be valid,
  298|       |             * hashObj should never be NULL. This assert is only useful when
  299|       |             * adding a new hash function (for which only partial support has
  300|       |             * been added); thus there is no need to turn it into an if and
  301|       |             * avoid the NULL dereference on the following line. */
  302|  44.3k|            PR_ASSERT(hashObj != NULL);
  ------------------
  |  |  208|  44.3k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 44.3k, False: 0]
  |  |  ------------------
  ------------------
  303|  44.3k|            ctx->mac_size = hashObj->length;
  304|       |
  305|  44.3k|            goto hmac;
  306|      0|        case CKM_AES_CMAC:
  ------------------
  |  | 1119|      0|#define CKM_AES_CMAC 0x0000108AUL
  ------------------
  |  Branch (306:9): [True: 0, False: 44.3k]
  ------------------
  307|      0|            ctx->mac.cmac = CMAC_Create(CMAC_AES, key, key_len);
  308|      0|            ctx->destroy_func = SFTKMAC_CMAC_Destroy;
  309|       |
  310|       |            /* Copy the behavior of sftk_doCMACInit here. */
  311|      0|            if (ctx->mac.cmac == NULL) {
  ------------------
  |  Branch (311:17): [True: 0, False: 0]
  ------------------
  312|      0|                if (PORT_GetError() == SEC_ERROR_INVALID_ARGS) {
  ------------------
  |  |   62|      0|#define PORT_GetError PORT_GetError_Util
  ------------------
  |  Branch (312:21): [True: 0, False: 0]
  ------------------
  313|      0|                    ret = CKR_KEY_SIZE_RANGE;
  ------------------
  |  | 1432|      0|#define CKR_KEY_SIZE_RANGE 0x00000062UL
  ------------------
  314|      0|                    goto done;
  315|      0|                }
  316|       |
  317|      0|                ret = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
  318|      0|                goto done;
  319|      0|            }
  320|       |
  321|      0|            ctx->mac_size = AES_BLOCK_SIZE;
  ------------------
  |  |  130|      0|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  322|       |
  323|      0|            goto done;
  324|      0|        default:
  ------------------
  |  Branch (324:9): [True: 0, False: 44.3k]
  ------------------
  325|      0|            ret = CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
  326|      0|            goto done;
  327|  44.3k|    }
  328|       |
  329|  44.3k|hmac:
  330|  44.3k|    ctx->mac.hmac = HMAC_Create(hashObj, key, key_len, isFIPS);
  331|  44.3k|    ctx->destroy_func = SFTKMAC_HMAC_Destroy;
  332|       |
  333|       |    /* Copy the behavior of sftk_doHMACInit here. */
  334|  44.3k|    if (ctx->mac.hmac == NULL) {
  ------------------
  |  Branch (334:9): [True: 0, False: 44.3k]
  ------------------
  335|      0|        if (PORT_GetError() == SEC_ERROR_INVALID_ARGS) {
  ------------------
  |  |   62|      0|#define PORT_GetError PORT_GetError_Util
  ------------------
  |  Branch (335:13): [True: 0, False: 0]
  ------------------
  336|      0|            ret = CKR_KEY_SIZE_RANGE;
  ------------------
  |  | 1432|      0|#define CKR_KEY_SIZE_RANGE 0x00000062UL
  ------------------
  337|      0|            goto done;
  338|      0|        }
  339|      0|        ret = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|      0|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
  340|      0|        goto done;
  341|      0|    }
  342|       |
  343|       |    /* Semantics: HMAC and CMAC should behave the same. Begin HMAC now. */
  344|  44.3k|    HMAC_Begin(ctx->mac.hmac);
  345|       |
  346|  44.3k|done:
  347|       |    /* Handle a failure: ctx->mac.raw should be NULL, but make sure
  348|       |     * destroy_func isn't set. */
  349|  44.3k|    if (ret != CKR_OK) {
  ------------------
  |  | 1388|  44.3k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (349:9): [True: 0, False: 44.3k]
  ------------------
  350|      0|        ctx->destroy_func = NULL;
  351|      0|    }
  352|       |
  353|  44.3k|    return ret;
  354|  44.3k|}
sftk_MAC_Update:
  394|  74.1k|{
  395|  74.1k|    switch (ctx->mech) {
  396|      0|        case CKM_MD2_HMAC:
  ------------------
  |  |  850|      0|#define CKM_MD2_HMAC 0x00000201UL
  ------------------
  |  Branch (396:9): [True: 0, False: 74.1k]
  ------------------
  397|  62.4k|        case CKM_MD5_HMAC:
  ------------------
  |  |  856|  62.4k|#define CKM_MD5_HMAC 0x00000211UL
  ------------------
  |  Branch (397:9): [True: 62.4k, False: 11.7k]
  ------------------
  398|  66.9k|        case CKM_SHA_1_HMAC:
  ------------------
  |  |  862|  66.9k|#define CKM_SHA_1_HMAC 0x00000221UL
  ------------------
  |  Branch (398:9): [True: 4.56k, False: 69.5k]
  ------------------
  399|  66.9k|        case CKM_SHA224_HMAC:
  ------------------
  |  |  888|  66.9k|#define CKM_SHA224_HMAC 0x00000256UL
  ------------------
  |  Branch (399:9): [True: 0, False: 74.1k]
  ------------------
  400|  71.1k|        case CKM_SHA256_HMAC:
  ------------------
  |  |  877|  71.1k|#define CKM_SHA256_HMAC 0x00000251UL
  ------------------
  |  Branch (400:9): [True: 4.12k, False: 70.0k]
  ------------------
  401|  74.1k|        case CKM_SHA384_HMAC:
  ------------------
  |  |  880|  74.1k|#define CKM_SHA384_HMAC 0x00000261UL
  ------------------
  |  Branch (401:9): [True: 3.03k, False: 71.1k]
  ------------------
  402|  74.1k|        case CKM_SHA512_HMAC:
  ------------------
  |  |  883|  74.1k|#define CKM_SHA512_HMAC 0x00000271UL
  ------------------
  |  Branch (402:9): [True: 0, False: 74.1k]
  ------------------
  403|  74.1k|        case CKM_SHA3_224_HMAC:
  ------------------
  |  |  903|  74.1k|#define CKM_SHA3_224_HMAC 0x000002B6UL
  ------------------
  |  Branch (403:9): [True: 0, False: 74.1k]
  ------------------
  404|  74.1k|        case CKM_SHA3_256_HMAC:
  ------------------
  |  |  899|  74.1k|#define CKM_SHA3_256_HMAC 0x000002B1UL
  ------------------
  |  Branch (404:9): [True: 0, False: 74.1k]
  ------------------
  405|  74.1k|        case CKM_SHA3_384_HMAC:
  ------------------
  |  |  907|  74.1k|#define CKM_SHA3_384_HMAC 0x000002C1UL
  ------------------
  |  Branch (405:9): [True: 0, False: 74.1k]
  ------------------
  406|  74.1k|        case CKM_SHA3_512_HMAC:
  ------------------
  |  |  911|  74.1k|#define CKM_SHA3_512_HMAC 0x000002D1UL
  ------------------
  |  Branch (406:9): [True: 0, False: 74.1k]
  ------------------
  407|       |            /* HMAC doesn't indicate failure in the return code. */
  408|  74.1k|            HMAC_Update(ctx->mac.hmac, data, data_len);
  409|  74.1k|            break;
  410|      0|        case CKM_AES_CMAC:
  ------------------
  |  | 1119|      0|#define CKM_AES_CMAC 0x0000108AUL
  ------------------
  |  Branch (410:9): [True: 0, False: 74.1k]
  ------------------
  411|       |            /* CMAC indicates failure in the return code, however this is
  412|       |             * unlikely to occur. */
  413|      0|            if (CMAC_Update(ctx->mac.cmac, data, data_len) != SECSuccess) {
  ------------------
  |  Branch (413:17): [True: 0, False: 0]
  ------------------
  414|      0|                return CKR_FUNCTION_FAILED;
  ------------------
  |  | 1397|      0|#define CKR_FUNCTION_FAILED 0x00000006UL
  ------------------
  415|      0|            }
  416|      0|            break;
  417|      0|        default:
  ------------------
  |  Branch (417:9): [True: 0, False: 74.1k]
  ------------------
  418|       |            /* This shouldn't happen -- asserting indicates partial support
  419|       |             * for a new MAC type. */
  420|      0|            PR_ASSERT(PR_FALSE);
  ------------------
  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  ------------------
  ------------------
  421|      0|            return CKR_FUNCTION_FAILED;
  ------------------
  |  | 1397|      0|#define CKR_FUNCTION_FAILED 0x00000006UL
  ------------------
  422|  74.1k|    }
  423|  74.1k|    return CKR_OK;
  ------------------
  |  | 1388|  74.1k|#define CKR_OK 0x00000000UL
  ------------------
  424|  74.1k|}
sftk_MAC_End:
  428|  43.0k|{
  429|  43.0k|    unsigned int actual_result_len;
  430|       |
  431|  43.0k|    switch (ctx->mech) {
  432|      0|        case CKM_MD2_HMAC:
  ------------------
  |  |  850|      0|#define CKM_MD2_HMAC 0x00000201UL
  ------------------
  |  Branch (432:9): [True: 0, False: 43.0k]
  ------------------
  433|  33.7k|        case CKM_MD5_HMAC:
  ------------------
  |  |  856|  33.7k|#define CKM_MD5_HMAC 0x00000211UL
  ------------------
  |  Branch (433:9): [True: 33.7k, False: 9.30k]
  ------------------
  434|  36.7k|        case CKM_SHA_1_HMAC:
  ------------------
  |  |  862|  36.7k|#define CKM_SHA_1_HMAC 0x00000221UL
  ------------------
  |  Branch (434:9): [True: 2.99k, False: 40.0k]
  ------------------
  435|  36.7k|        case CKM_SHA224_HMAC:
  ------------------
  |  |  888|  36.7k|#define CKM_SHA224_HMAC 0x00000256UL
  ------------------
  |  Branch (435:9): [True: 0, False: 43.0k]
  ------------------
  436|  40.0k|        case CKM_SHA256_HMAC:
  ------------------
  |  |  877|  40.0k|#define CKM_SHA256_HMAC 0x00000251UL
  ------------------
  |  Branch (436:9): [True: 3.27k, False: 39.8k]
  ------------------
  437|  43.0k|        case CKM_SHA384_HMAC:
  ------------------
  |  |  880|  43.0k|#define CKM_SHA384_HMAC 0x00000261UL
  ------------------
  |  Branch (437:9): [True: 3.03k, False: 40.0k]
  ------------------
  438|  43.0k|        case CKM_SHA512_HMAC:
  ------------------
  |  |  883|  43.0k|#define CKM_SHA512_HMAC 0x00000271UL
  ------------------
  |  Branch (438:9): [True: 0, False: 43.0k]
  ------------------
  439|  43.0k|        case CKM_SHA3_224_HMAC:
  ------------------
  |  |  903|  43.0k|#define CKM_SHA3_224_HMAC 0x000002B6UL
  ------------------
  |  Branch (439:9): [True: 0, False: 43.0k]
  ------------------
  440|  43.0k|        case CKM_SHA3_256_HMAC:
  ------------------
  |  |  899|  43.0k|#define CKM_SHA3_256_HMAC 0x000002B1UL
  ------------------
  |  Branch (440:9): [True: 0, False: 43.0k]
  ------------------
  441|  43.0k|        case CKM_SHA3_384_HMAC:
  ------------------
  |  |  907|  43.0k|#define CKM_SHA3_384_HMAC 0x000002C1UL
  ------------------
  |  Branch (441:9): [True: 0, False: 43.0k]
  ------------------
  442|  43.0k|        case CKM_SHA3_512_HMAC:
  ------------------
  |  |  911|  43.0k|#define CKM_SHA3_512_HMAC 0x000002D1UL
  ------------------
  |  Branch (442:9): [True: 0, False: 43.0k]
  ------------------
  443|       |            /* HMAC doesn't indicate failure in the return code. Additionally,
  444|       |             * unlike CMAC, it doesn't support partial results. This means that we
  445|       |             * need to allocate a buffer if max_result_len < ctx->mac_size. */
  446|  43.0k|            if (max_result_len >= ctx->mac_size) {
  ------------------
  |  Branch (446:17): [True: 43.0k, False: 0]
  ------------------
  447|       |                /* Split this into two calls to avoid an unnecessary stack
  448|       |                 * allocation and memcpy when possible. */
  449|  43.0k|                HMAC_Finish(ctx->mac.hmac, result, &actual_result_len, max_result_len);
  450|  43.0k|            } else {
  451|      0|                uint8_t tmp_buffer[SFTK_MAX_MAC_LENGTH];
  452|       |
  453|       |                /* Assumption: buffer is large enough to hold this HMAC's
  454|       |                 * output. */
  455|      0|                PR_ASSERT(SFTK_MAX_MAC_LENGTH >= ctx->mac_size);
  ------------------
  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  456|       |
  457|      0|                HMAC_Finish(ctx->mac.hmac, tmp_buffer, &actual_result_len, SFTK_MAX_MAC_LENGTH);
  ------------------
  |  |  255|      0|#define SFTK_MAX_MAC_LENGTH 64
  ------------------
  458|       |
  459|      0|                if (actual_result_len > max_result_len) {
  ------------------
  |  Branch (459:21): [True: 0, False: 0]
  ------------------
  460|       |                    /* This should always be true since:
  461|       |                     *
  462|       |                     *   (SFTK_MAX_MAC_LENGTH >= ctx->mac_size =
  463|       |                     *       actual_result_len) > max_result_len,
  464|       |                     *
  465|       |                     * but guard this truncation just in case. */
  466|      0|                    actual_result_len = max_result_len;
  467|      0|                }
  468|       |
  469|      0|                PORT_Memcpy(result, tmp_buffer, actual_result_len);
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
  470|      0|            }
  471|  43.0k|            break;
  472|      0|        case CKM_AES_CMAC:
  ------------------
  |  | 1119|      0|#define CKM_AES_CMAC 0x0000108AUL
  ------------------
  |  Branch (472:9): [True: 0, False: 43.0k]
  ------------------
  473|       |            /* CMAC indicates failure in the return code, however this is
  474|       |             * unlikely to occur. */
  475|      0|            if (CMAC_Finish(ctx->mac.cmac, result, &actual_result_len, max_result_len) != SECSuccess) {
  ------------------
  |  Branch (475:17): [True: 0, False: 0]
  ------------------
  476|      0|                return CKR_FUNCTION_FAILED;
  ------------------
  |  | 1397|      0|#define CKR_FUNCTION_FAILED 0x00000006UL
  ------------------
  477|      0|            }
  478|      0|            break;
  479|      0|        default:
  ------------------
  |  Branch (479:9): [True: 0, False: 43.0k]
  ------------------
  480|       |            /* This shouldn't happen -- asserting indicates partial support
  481|       |             * for a new MAC type. */
  482|      0|            PR_ASSERT(PR_FALSE);
  ------------------
  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  ------------------
  ------------------
  483|      0|            return CKR_FUNCTION_FAILED;
  ------------------
  |  | 1397|      0|#define CKR_FUNCTION_FAILED 0x00000006UL
  ------------------
  484|  43.0k|    }
  485|       |
  486|  43.0k|    if (result_len) {
  ------------------
  |  Branch (486:9): [True: 43.0k, False: 0]
  ------------------
  487|       |        /* When result length is passed, inform the caller of its value. */
  488|  43.0k|        *result_len = actual_result_len;
  489|  43.0k|    } else if (max_result_len == ctx->mac_size) {
  ------------------
  |  Branch (489:16): [True: 0, False: 0]
  ------------------
  490|       |        /* Validate that the amount requested was what was actually given; the
  491|       |         * caller assumes that what they passed was the output size of the
  492|       |         * underlying MAC and that they got all the bytes the asked for. */
  493|      0|        PR_ASSERT(actual_result_len == max_result_len);
  ------------------
  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  494|      0|    }
  495|       |
  496|  43.0k|    return CKR_OK;
  ------------------
  |  | 1388|  43.0k|#define CKR_OK 0x00000000UL
  ------------------
  497|  43.0k|}
sftk_MAC_DestroyContext:
  501|  44.3k|{
  502|  44.3k|    if (ctx == NULL) {
  ------------------
  |  Branch (502:9): [True: 0, False: 44.3k]
  ------------------
  503|      0|        return;
  504|      0|    }
  505|       |
  506|  44.3k|    if (ctx->mac.raw != NULL && ctx->destroy_func != NULL) {
  ------------------
  |  Branch (506:9): [True: 44.3k, False: 0]
  |  Branch (506:33): [True: 44.3k, False: 0]
  ------------------
  507|  44.3k|        ctx->destroy_func(ctx->mac.raw, PR_TRUE);
  ------------------
  |  |  437|  44.3k|#define PR_TRUE 1
  ------------------
  508|  44.3k|    }
  509|       |
  510|       |    /* Clean up the struct so we don't double free accidentally. */
  511|  44.3k|    PORT_Memset(ctx, 0, sizeof(sftk_MACCtx));
  ------------------
  |  |  182|  44.3k|#define PORT_Memset memset
  ------------------
  512|       |
  513|  44.3k|    if (free_it == PR_TRUE) {
  ------------------
  |  |  437|  44.3k|#define PR_TRUE 1
  ------------------
  |  Branch (513:9): [True: 44.3k, False: 0]
  ------------------
  514|  44.3k|        PORT_Free(ctx);
  ------------------
  |  |   60|  44.3k|#define PORT_Free PORT_Free_Util
  ------------------
  515|  44.3k|    }
  516|  44.3k|}
sftkhmac.c:SetupMAC:
   63|  8.99k|{
   64|  8.99k|    CK_NSS_MAC_CONSTANT_TIME_PARAMS *params =
   65|  8.99k|        (CK_NSS_MAC_CONSTANT_TIME_PARAMS *)mech->pParameter;
   66|  8.99k|    sftk_MACConstantTimeCtx *ctx;
   67|  8.99k|    HASH_HashType alg;
   68|  8.99k|    SFTKAttribute *keyval;
   69|  8.99k|    unsigned char secret[sizeof(ctx->secret)];
   70|  8.99k|    unsigned int secretLength;
   71|       |
   72|  8.99k|    if (mech->ulParameterLen != sizeof(CK_NSS_MAC_CONSTANT_TIME_PARAMS)) {
  ------------------
  |  Branch (72:9): [True: 0, False: 8.99k]
  ------------------
   73|      0|        return NULL;
   74|      0|    }
   75|       |
   76|  8.99k|    alg = sftk_HMACMechanismToHash(params->macAlg);
   77|  8.99k|    if (alg == HASH_AlgNULL) {
  ------------------
  |  Branch (77:9): [True: 0, False: 8.99k]
  ------------------
   78|      0|        return NULL;
   79|      0|    }
   80|       |
   81|  8.99k|    keyval = sftk_FindAttribute(key, CKA_VALUE);
  ------------------
  |  |  516|  8.99k|#define CKA_VALUE 0x00000011UL
  ------------------
   82|  8.99k|    if (keyval == NULL) {
  ------------------
  |  Branch (82:9): [True: 0, False: 8.99k]
  ------------------
   83|      0|        return NULL;
   84|      0|    }
   85|  8.99k|    secretLength = keyval->attrib.ulValueLen;
   86|  8.99k|    if (secretLength > sizeof(secret)) {
  ------------------
  |  Branch (86:9): [True: 0, False: 8.99k]
  ------------------
   87|      0|        sftk_FreeAttribute(keyval);
   88|      0|        return NULL;
   89|      0|    }
   90|  8.99k|    memcpy(secret, keyval->attrib.pValue, secretLength);
   91|  8.99k|    sftk_FreeAttribute(keyval);
   92|       |
   93|  8.99k|    ctx = PORT_Alloc(sizeof(sftk_MACConstantTimeCtx));
  ------------------
  |  |   52|  8.99k|#define PORT_Alloc PORT_Alloc_Util
  ------------------
   94|  8.99k|    if (!ctx) {
  ------------------
  |  Branch (94:9): [True: 0, False: 8.99k]
  ------------------
   95|      0|        PORT_Memset(secret, 0, secretLength);
  ------------------
  |  |  182|      0|#define PORT_Memset memset
  ------------------
   96|      0|        return NULL;
   97|      0|    }
   98|       |
   99|  8.99k|    memcpy(ctx->secret, secret, secretLength);
  100|  8.99k|    ctx->secretLength = secretLength;
  101|  8.99k|    ctx->hash = HASH_GetRawHashObject(alg);
  102|  8.99k|    ctx->totalLength = params->ulBodyTotalLen;
  103|  8.99k|    PORT_Memset(secret, 0, secretLength);
  ------------------
  |  |  182|  8.99k|#define PORT_Memset memset
  ------------------
  104|       |
  105|  8.99k|    return ctx;
  106|  8.99k|}
sftkhmac.c:SFTKMAC_HMAC_Destroy:
   22|  44.3k|{
   23|  44.3k|    HMACContext *hctx = ctx;
   24|  44.3k|    HMAC_Destroy(hctx, freeit);
   25|  44.3k|}

sftk_ChaCha20Poly1305_DestroyContext:
   50|    220|{
   51|    220|    ChaCha20Poly1305Context *ctx = vctx;
   52|    220|    ChaCha20Poly1305_DestroyContext(ctx, freeit);
   53|    220|}
sftk_AES_DestroyContext:
   70|  1.63k|{
   71|  1.63k|    AESContext *actx = ctx;
   72|  1.63k|    AES_DestroyContext(actx, freeit);
   73|  1.63k|}
NSC_MessageEncryptInit:
  233|    298|{
  234|    298|    return sftk_MessageCryptInit(hSession, pMechanism, hKey,
  235|    298|                                 SFTK_MESSAGE_ENCRYPT, CKA_ENCRYPT, PR_TRUE);
  ------------------
  |  |  547|    298|#define CKA_ENCRYPT 0x00000104UL
  ------------------
                                               SFTK_MESSAGE_ENCRYPT, CKA_ENCRYPT, PR_TRUE);
  ------------------
  |  |  437|    298|#define PR_TRUE 1
  ------------------
  236|    298|}
NSC_EncryptMessage:
  244|    303|{
  245|    303|    return sftk_CryptMessage(hSession, pParameter, ulParameterLen,
  246|    303|                             pAssociatedData, ulAssociatedDataLen, pPlaintext,
  247|    303|                             ulPlaintextLen, pCiphertext, pulCiphertextLen,
  248|    303|                             SFTK_MESSAGE_ENCRYPT);
  249|    303|}
NSC_MessageDecryptInit:
  284|  1.55k|{
  285|  1.55k|    return sftk_MessageCryptInit(hSession, pMechanism, hKey,
  286|  1.55k|                                 SFTK_MESSAGE_DECRYPT, CKA_DECRYPT, PR_FALSE);
  ------------------
  |  |  548|  1.55k|#define CKA_DECRYPT 0x00000105UL
  ------------------
                                               SFTK_MESSAGE_DECRYPT, CKA_DECRYPT, PR_FALSE);
  ------------------
  |  |  438|  1.55k|#define PR_FALSE 0
  ------------------
  287|  1.55k|}
NSC_DecryptMessage:
  295|  10.9k|{
  296|  10.9k|    return sftk_CryptMessage(hSession, pParameter, ulParameterLen,
  297|  10.9k|                             pAssociatedData, ulAssociatedDataLen, pCiphertext,
  298|  10.9k|                             ulCiphertextLen, pPlaintext, pulPlaintextLen,
  299|  10.9k|                             SFTK_MESSAGE_DECRYPT);
  300|  10.9k|}
sftkmessage.c:sftk_MessageCryptInit:
   86|  1.85k|{
   87|  1.85k|    SFTKSession *session;
   88|  1.85k|    SFTKObject *key;
   89|  1.85k|    SFTKSessionContext *context;
   90|  1.85k|    SFTKAttribute *att;
   91|  1.85k|    CK_KEY_TYPE key_type;
   92|  1.85k|    CK_RV crv = CKR_OK;
  ------------------
  |  | 1388|  1.85k|#define CKR_OK 0x00000000UL
  ------------------
   93|       |
   94|  1.85k|    if (!pMechanism) {
  ------------------
  |  Branch (94:9): [True: 0, False: 1.85k]
  ------------------
   95|      0|        return CKR_MECHANISM_PARAM_INVALID;
  ------------------
  |  | 1448|      0|#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
  ------------------
   96|      0|    }
   97|       |
   98|  1.85k|    crv = sftk_MechAllowsOperation(pMechanism->mechanism,
   99|  1.85k|                                   CKA_NSS_MESSAGE | operation);
  ------------------
  |  |   69|  1.85k|#define CKA_NSS_MESSAGE 0x82000000L
  ------------------
  100|  1.85k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  1.85k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (100:9): [True: 0, False: 1.85k]
  ------------------
  101|      0|        return crv;
  102|       |
  103|  1.85k|    session = sftk_SessionFromHandle(hSession);
  104|  1.85k|    if (session == NULL)
  ------------------
  |  Branch (104:9): [True: 0, False: 1.85k]
  ------------------
  105|      0|        return CKR_SESSION_HANDLE_INVALID;
  ------------------
  |  | 1465|      0|#define CKR_SESSION_HANDLE_INVALID 0x000000B3UL
  ------------------
  106|       |
  107|  1.85k|    crv = sftk_InitGeneric(session, pMechanism, &context, contextType, &key,
  108|  1.85k|                           hKey, &key_type, CKO_SECRET_KEY, operation);
  ------------------
  |  |  329|  1.85k|#define CKO_SECRET_KEY 0x00000004UL
  ------------------
  109|  1.85k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  1.85k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (109:9): [True: 0, False: 1.85k]
  ------------------
  110|      0|        sftk_FreeSession(session);
  111|      0|        return crv;
  112|      0|    }
  113|       |
  114|  1.85k|    att = sftk_FindAttribute(key, CKA_VALUE);
  ------------------
  |  |  516|  1.85k|#define CKA_VALUE 0x00000011UL
  ------------------
  115|  1.85k|    if (att == NULL) {
  ------------------
  |  Branch (115:9): [True: 0, False: 1.85k]
  ------------------
  116|      0|        sftk_FreeSession(session);
  117|      0|        sftk_FreeContext(context);
  118|      0|        return CKR_KEY_HANDLE_INVALID;
  ------------------
  |  | 1428|      0|#define CKR_KEY_HANDLE_INVALID 0x00000060UL
  ------------------
  119|      0|    }
  120|       |
  121|  1.85k|    context->doPad = PR_FALSE;
  ------------------
  |  |  438|  1.85k|#define PR_FALSE 0
  ------------------
  122|  1.85k|    context->multi = PR_TRUE; /* All message are 'multi' operations */
  ------------------
  |  |  437|  1.85k|#define PR_TRUE 1
  ------------------
  123|       |
  124|  1.85k|    switch (pMechanism->mechanism) {
  125|  1.63k|        case CKM_AES_GCM:
  ------------------
  |  | 1115|  1.63k|#define CKM_AES_GCM 0x00001087UL
  ------------------
  |  Branch (125:9): [True: 1.63k, False: 220]
  ------------------
  126|  1.63k|            context->cipherInfo = AES_CreateContext(
  127|  1.63k|                (unsigned char *)att->attrib.pValue,
  128|  1.63k|                NULL, NSS_AES_GCM, encrypt, att->attrib.ulValueLen,
  ------------------
  |  |   39|  1.63k|#define NSS_AES_GCM 4
  ------------------
  129|  1.63k|                AES_BLOCK_SIZE);
  ------------------
  |  |  130|  1.63k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  130|  1.63k|            context->aeadUpdate = sftk_AES_AEAD;
  131|  1.63k|            context->destroy = sftk_AES_DestroyContext;
  132|  1.63k|            break;
  133|    220|        case CKM_CHACHA20_POLY1305:
  ------------------
  |  | 1287|    220|#define CKM_CHACHA20_POLY1305 0x00004021UL
  ------------------
  |  Branch (133:9): [True: 220, False: 1.63k]
  ------------------
  134|    220|            context->cipherInfo = ChaCha20Poly1305_CreateContext(
  135|    220|                (unsigned char *)att->attrib.pValue, att->attrib.ulValueLen,
  136|    220|                16);
  137|    220|            context->aeadUpdate = (encrypt ? sftk_ChaCha20_Poly1305_Message_Encrypt : sftk_ChaCha20_Poly1305_Message_Decrypt);
  ------------------
  |  Branch (137:36): [True: 4, False: 216]
  ------------------
  138|    220|            context->destroy = sftk_ChaCha20Poly1305_DestroyContext;
  139|    220|            break;
  140|      0|        default:
  ------------------
  |  Branch (140:9): [True: 0, False: 1.85k]
  ------------------
  141|      0|            crv = CKR_MECHANISM_INVALID;
  ------------------
  |  | 1447|      0|#define CKR_MECHANISM_INVALID 0x00000070UL
  ------------------
  142|      0|            break;
  143|  1.85k|    }
  144|  1.85k|    if (context->cipherInfo == NULL) {
  ------------------
  |  Branch (144:9): [True: 0, False: 1.85k]
  ------------------
  145|      0|        crv = sftk_MapCryptError(PORT_GetError());
  ------------------
  |  |   62|      0|#define PORT_GetError PORT_GetError_Util
  ------------------
  146|      0|        if (crv == CKR_OK) {
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (146:13): [True: 0, False: 0]
  ------------------
  147|      0|            crv = CKR_GENERAL_ERROR;
  ------------------
  |  | 1396|      0|#define CKR_GENERAL_ERROR 0x00000005UL
  ------------------
  148|      0|        }
  149|      0|    }
  150|  1.85k|    if (crv != CKR_OK) {
  ------------------
  |  | 1388|  1.85k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (150:9): [True: 0, False: 1.85k]
  ------------------
  151|      0|        sftk_FreeContext(context);
  152|      0|        sftk_FreeSession(session);
  153|      0|        return crv;
  154|      0|    }
  155|  1.85k|    sftk_SetContextByType(session, contextType, context);
  156|  1.85k|    sftk_FreeSession(session);
  157|  1.85k|    return CKR_OK;
  ------------------
  |  | 1388|  1.85k|#define CKR_OK 0x00000000UL
  ------------------
  158|  1.85k|}
sftkmessage.c:sftk_AES_AEAD:
   63|  6.38k|{
   64|  6.38k|    AESContext *ctx = vctx;
   65|  6.38k|    return AES_AEAD(ctx, plainText, plainTextLen, maxOutLen, cipherText, cipherTextLen, params, paramsLen, aad, aadLen);
   66|  6.38k|}
sftkmessage.c:sftk_ChaCha20_Poly1305_Message_Encrypt:
   24|      4|{
   25|      4|    ChaCha20Poly1305Context *ctx = vctx;
   26|      4|    CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS *params = vparams;
   27|      4|    return ChaCha20Poly1305_Encrypt(ctx, cipherText, cipherTextLen, maxOutLen,
   28|      4|                                    plainText, plainTextLen, params->pNonce, params->ulNonceLen,
   29|      4|                                    aad, aadLen, params->pTag);
   30|      4|}
sftkmessage.c:sftk_ChaCha20_Poly1305_Message_Decrypt:
   40|  4.84k|{
   41|  4.84k|    ChaCha20Poly1305Context *ctx = vctx;
   42|  4.84k|    CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS *params = vparams;
   43|  4.84k|    return ChaCha20Poly1305_Decrypt(ctx, plainText, plainTextLen, maxOutLen,
   44|  4.84k|                                    cipherText, cipherTextLen, params->pNonce, params->ulNonceLen,
   45|  4.84k|                                    aad, aadLen, params->pTag);
   46|  4.84k|}
sftkmessage.c:sftk_CryptMessage:
  172|  11.2k|{
  173|  11.2k|    SFTKSessionContext *context;
  174|  11.2k|    unsigned int outlen;
  175|  11.2k|    unsigned int maxout = *pulOuttextLen;
  176|  11.2k|    CK_RV crv;
  177|  11.2k|    SECStatus rv;
  178|       |
  179|  11.2k|    CHECK_FORK();
  180|       |
  181|       |    /* make sure we're legal */
  182|  11.2k|    crv = sftk_GetContext(hSession, &context, contextType, PR_TRUE, NULL);
  ------------------
  |  |  437|  11.2k|#define PR_TRUE 1
  ------------------
  183|  11.2k|    if (crv != CKR_OK)
  ------------------
  |  | 1388|  11.2k|#define CKR_OK 0x00000000UL
  ------------------
  |  Branch (183:9): [True: 0, False: 11.2k]
  ------------------
  184|      0|        return crv;
  185|       |
  186|  11.2k|    if (!pOuttext) {
  ------------------
  |  Branch (186:9): [True: 0, False: 11.2k]
  ------------------
  187|      0|        *pulOuttextLen = ulIntextLen;
  188|      0|        return CKR_OK;
  ------------------
  |  | 1388|      0|#define CKR_OK 0x00000000UL
  ------------------
  189|      0|    }
  190|  11.2k|    rv = (*context->aeadUpdate)(context->cipherInfo, pOuttext, &outlen,
  191|  11.2k|                                maxout, pIntext, ulIntextLen,
  192|  11.2k|                                pParameter, ulParameterLen,
  193|  11.2k|                                pAssociatedData, ulAssociatedDataLen);
  194|       |
  195|  11.2k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (195:9): [True: 10.9k, False: 303]
  ------------------
  196|  10.9k|        if (contextType == SFTK_MESSAGE_ENCRYPT) {
  ------------------
  |  Branch (196:13): [True: 0, False: 10.9k]
  ------------------
  197|      0|            return sftk_MapCryptError(PORT_GetError());
  ------------------
  |  |   62|      0|#define PORT_GetError PORT_GetError_Util
  ------------------
  198|  10.9k|        } else {
  199|  10.9k|            return sftk_MapDecryptError(PORT_GetError());
  ------------------
  |  |   62|  10.9k|#define PORT_GetError PORT_GetError_Util
  ------------------
  200|  10.9k|        }
  201|  10.9k|    }
  202|    303|    *pulOuttextLen = (CK_ULONG)(outlen);
  203|    303|    return CKR_OK;
  ------------------
  |  | 1388|    303|#define CKR_OK 0x00000000UL
  ------------------
  204|  11.2k|}

sftk_parseParameters:
  127|      1|{
  128|      1|    int next;
  129|      1|    char *tmp = NULL;
  130|      1|    const char *index;
  131|      1|    char *certPrefix = NULL, *keyPrefix = NULL;
  132|      1|    char *tokdes = NULL, *ptokdes = NULL, *pupdtokdes = NULL;
  133|      1|    char *slotdes = NULL, *pslotdes = NULL;
  134|      1|    char *fslotdes = NULL, *ftokdes = NULL;
  135|      1|    char *minPW = NULL;
  136|      1|    index = NSSUTIL_ArgStrip(param);
  137|       |
  138|      1|    PORT_Memset(parsed, 0, sizeof(sftk_parameters));
  ------------------
  |  |  182|      1|#define PORT_Memset memset
  ------------------
  139|       |
  140|     11|    while (*index) {
  ------------------
  |  Branch (140:12): [True: 10, False: 1]
  ------------------
  141|     10|        NSSUTIL_HANDLE_STRING_ARG(index, parsed->configdir, "configDir=", ;)
  ------------------
  |  |   21|     10|    if (PORT_Strncasecmp(param, value, sizeof(value) - 1) == 0) { \
  |  |  ------------------
  |  |  |  |  191|     10|#define PORT_Strncasecmp PL_strncasecmp
  |  |  ------------------
  |  |  |  Branch (21:9): [True: 1, False: 9]
  |  |  ------------------
  |  |   22|      1|        param += sizeof(value) - 1;                               \
  |  |   23|      1|        if (target)                                               \
  |  |  ------------------
  |  |  |  Branch (23:13): [True: 0, False: 1]
  |  |  ------------------
  |  |   24|      1|            PORT_Free(target);                                    \
  |  |  ------------------
  |  |  |  |   60|      0|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   25|      1|        target = NSSUTIL_ArgFetchValue(param, &next);             \
  |  |   26|      1|        param += next;                                            \
  |  |   27|      1|        command;                                                  \
  |  |   28|      1|    } else
  ------------------
  142|      9|        NSSUTIL_HANDLE_STRING_ARG(index, parsed->updatedir, "updateDir=", ;)
  ------------------
  |  |   21|      9|    if (PORT_Strncasecmp(param, value, sizeof(value) - 1) == 0) { \
  |  |  ------------------
  |  |  |  |  191|      9|#define PORT_Strncasecmp PL_strncasecmp
  |  |  ------------------
  |  |  |  Branch (21:9): [True: 1, False: 8]
  |  |  ------------------
  |  |   22|      1|        param += sizeof(value) - 1;                               \
  |  |   23|      1|        if (target)                                               \
  |  |  ------------------
  |  |  |  Branch (23:13): [True: 0, False: 1]
  |  |  ------------------
  |  |   24|      1|            PORT_Free(target);                                    \
  |  |  ------------------
  |  |  |  |   60|      0|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   25|      1|        target = NSSUTIL_ArgFetchValue(param, &next);             \
  |  |   26|      1|        param += next;                                            \
  |  |   27|      1|        command;                                                  \
  |  |   28|      1|    } else
  ------------------
  143|      8|        NSSUTIL_HANDLE_STRING_ARG(index, parsed->updateID, "updateID=", ;)
  ------------------
  |  |   21|      8|    if (PORT_Strncasecmp(param, value, sizeof(value) - 1) == 0) { \
  |  |  ------------------
  |  |  |  |  191|      8|#define PORT_Strncasecmp PL_strncasecmp
  |  |  ------------------
  |  |  |  Branch (21:9): [True: 1, False: 7]
  |  |  ------------------
  |  |   22|      1|        param += sizeof(value) - 1;                               \
  |  |   23|      1|        if (target)                                               \
  |  |  ------------------
  |  |  |  Branch (23:13): [True: 0, False: 1]
  |  |  ------------------
  |  |   24|      1|            PORT_Free(target);                                    \
  |  |  ------------------
  |  |  |  |   60|      0|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   25|      1|        target = NSSUTIL_ArgFetchValue(param, &next);             \
  |  |   26|      1|        param += next;                                            \
  |  |   27|      1|        command;                                                  \
  |  |   28|      1|    } else
  ------------------
  144|      7|        NSSUTIL_HANDLE_STRING_ARG(index, parsed->secmodName, "secmod=", ;)
  ------------------
  |  |   21|      7|    if (PORT_Strncasecmp(param, value, sizeof(value) - 1) == 0) { \
  |  |  ------------------
  |  |  |  |  191|      7|#define PORT_Strncasecmp PL_strncasecmp
  |  |  ------------------
  |  |  |  Branch (21:9): [True: 1, False: 6]
  |  |  ------------------
  |  |   22|      1|        param += sizeof(value) - 1;                               \
  |  |   23|      1|        if (target)                                               \
  |  |  ------------------
  |  |  |  Branch (23:13): [True: 0, False: 1]
  |  |  ------------------
  |  |   24|      1|            PORT_Free(target);                                    \
  |  |  ------------------
  |  |  |  |   60|      0|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   25|      1|        target = NSSUTIL_ArgFetchValue(param, &next);             \
  |  |   26|      1|        param += next;                                            \
  |  |   27|      1|        command;                                                  \
  |  |   28|      1|    } else
  ------------------
  145|      6|        NSSUTIL_HANDLE_STRING_ARG(index, parsed->man, "manufacturerID=", ;)
  ------------------
  |  |   21|      6|    if (PORT_Strncasecmp(param, value, sizeof(value) - 1) == 0) { \
  |  |  ------------------
  |  |  |  |  191|      6|#define PORT_Strncasecmp PL_strncasecmp
  |  |  ------------------
  |  |  |  Branch (21:9): [True: 0, False: 6]
  |  |  ------------------
  |  |   22|      0|        param += sizeof(value) - 1;                               \
  |  |   23|      0|        if (target)                                               \
  |  |  ------------------
  |  |  |  Branch (23:13): [True: 0, False: 0]
  |  |  ------------------
  |  |   24|      0|            PORT_Free(target);                                    \
  |  |  ------------------
  |  |  |  |   60|      0|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   25|      0|        target = NSSUTIL_ArgFetchValue(param, &next);             \
  |  |   26|      0|        param += next;                                            \
  |  |   27|      0|        command;                                                  \
  |  |   28|      0|    } else
  ------------------
  146|      6|        NSSUTIL_HANDLE_STRING_ARG(index, parsed->libdes, "libraryDescription=", ;)
  ------------------
  |  |   21|      6|    if (PORT_Strncasecmp(param, value, sizeof(value) - 1) == 0) { \
  |  |  ------------------
  |  |  |  |  191|      6|#define PORT_Strncasecmp PL_strncasecmp
  |  |  ------------------
  |  |  |  Branch (21:9): [True: 0, False: 6]
  |  |  ------------------
  |  |   22|      0|        param += sizeof(value) - 1;                               \
  |  |   23|      0|        if (target)                                               \
  |  |  ------------------
  |  |  |  Branch (23:13): [True: 0, False: 0]
  |  |  ------------------
  |  |   24|      0|            PORT_Free(target);                                    \
  |  |  ------------------
  |  |  |  |   60|      0|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   25|      0|        target = NSSUTIL_ArgFetchValue(param, &next);             \
  |  |   26|      0|        param += next;                                            \
  |  |   27|      0|        command;                                                  \
  |  |   28|      0|    } else
  ------------------
  147|       |        /* constructed values, used so legacy interfaces still work */
  148|      6|        NSSUTIL_HANDLE_STRING_ARG(index, certPrefix, "certPrefix=", ;)
  ------------------
  |  |   21|      6|    if (PORT_Strncasecmp(param, value, sizeof(value) - 1) == 0) { \
  |  |  ------------------
  |  |  |  |  191|      6|#define PORT_Strncasecmp PL_strncasecmp
  |  |  ------------------
  |  |  |  Branch (21:9): [True: 1, False: 5]
  |  |  ------------------
  |  |   22|      1|        param += sizeof(value) - 1;                               \
  |  |   23|      1|        if (target)                                               \
  |  |  ------------------
  |  |  |  Branch (23:13): [True: 0, False: 1]
  |  |  ------------------
  |  |   24|      1|            PORT_Free(target);                                    \
  |  |  ------------------
  |  |  |  |   60|      0|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   25|      1|        target = NSSUTIL_ArgFetchValue(param, &next);             \
  |  |   26|      1|        param += next;                                            \
  |  |   27|      1|        command;                                                  \
  |  |   28|      1|    } else
  ------------------
  149|      5|        NSSUTIL_HANDLE_STRING_ARG(index, keyPrefix, "keyPrefix=", ;)
  ------------------
  |  |   21|      5|    if (PORT_Strncasecmp(param, value, sizeof(value) - 1) == 0) { \
  |  |  ------------------
  |  |  |  |  191|      5|#define PORT_Strncasecmp PL_strncasecmp
  |  |  ------------------
  |  |  |  Branch (21:9): [True: 1, False: 4]
  |  |  ------------------
  |  |   22|      1|        param += sizeof(value) - 1;                               \
  |  |   23|      1|        if (target)                                               \
  |  |  ------------------
  |  |  |  Branch (23:13): [True: 0, False: 1]
  |  |  ------------------
  |  |   24|      1|            PORT_Free(target);                                    \
  |  |  ------------------
  |  |  |  |   60|      0|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   25|      1|        target = NSSUTIL_ArgFetchValue(param, &next);             \
  |  |   26|      1|        param += next;                                            \
  |  |   27|      1|        command;                                                  \
  |  |   28|      1|    } else
  ------------------
  150|      4|        NSSUTIL_HANDLE_STRING_ARG(index, tokdes, "cryptoTokenDescription=", ;)
  ------------------
  |  |   21|      4|    if (PORT_Strncasecmp(param, value, sizeof(value) - 1) == 0) { \
  |  |  ------------------
  |  |  |  |  191|      4|#define PORT_Strncasecmp PL_strncasecmp
  |  |  ------------------
  |  |  |  Branch (21:9): [True: 0, False: 4]
  |  |  ------------------
  |  |   22|      0|        param += sizeof(value) - 1;                               \
  |  |   23|      0|        if (target)                                               \
  |  |  ------------------
  |  |  |  Branch (23:13): [True: 0, False: 0]
  |  |  ------------------
  |  |   24|      0|            PORT_Free(target);                                    \
  |  |  ------------------
  |  |  |  |   60|      0|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   25|      0|        target = NSSUTIL_ArgFetchValue(param, &next);             \
  |  |   26|      0|        param += next;                                            \
  |  |   27|      0|        command;                                                  \
  |  |   28|      0|    } else
  ------------------
  151|      4|        NSSUTIL_HANDLE_STRING_ARG(index, ptokdes, "dbTokenDescription=", ;)
  ------------------
  |  |   21|      4|    if (PORT_Strncasecmp(param, value, sizeof(value) - 1) == 0) { \
  |  |  ------------------
  |  |  |  |  191|      4|#define PORT_Strncasecmp PL_strncasecmp
  |  |  ------------------
  |  |  |  Branch (21:9): [True: 0, False: 4]
  |  |  ------------------
  |  |   22|      0|        param += sizeof(value) - 1;                               \
  |  |   23|      0|        if (target)                                               \
  |  |  ------------------
  |  |  |  Branch (23:13): [True: 0, False: 0]
  |  |  ------------------
  |  |   24|      0|            PORT_Free(target);                                    \
  |  |  ------------------
  |  |  |  |   60|      0|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   25|      0|        target = NSSUTIL_ArgFetchValue(param, &next);             \
  |  |   26|      0|        param += next;                                            \
  |  |   27|      0|        command;                                                  \
  |  |   28|      0|    } else
  ------------------
  152|      4|        NSSUTIL_HANDLE_STRING_ARG(index, slotdes, "cryptoSlotDescription=", ;)
  ------------------
  |  |   21|      4|    if (PORT_Strncasecmp(param, value, sizeof(value) - 1) == 0) { \
  |  |  ------------------
  |  |  |  |  191|      4|#define PORT_Strncasecmp PL_strncasecmp
  |  |  ------------------
  |  |  |  Branch (21:9): [True: 0, False: 4]
  |  |  ------------------
  |  |   22|      0|        param += sizeof(value) - 1;                               \
  |  |   23|      0|        if (target)                                               \
  |  |  ------------------
  |  |  |  Branch (23:13): [True: 0, False: 0]
  |  |  ------------------
  |  |   24|      0|            PORT_Free(target);                                    \
  |  |  ------------------
  |  |  |  |   60|      0|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   25|      0|        target = NSSUTIL_ArgFetchValue(param, &next);             \
  |  |   26|      0|        param += next;                                            \
  |  |   27|      0|        command;                                                  \
  |  |   28|      0|    } else
  ------------------
  153|      4|        NSSUTIL_HANDLE_STRING_ARG(index, pslotdes, "dbSlotDescription=", ;)
  ------------------
  |  |   21|      4|    if (PORT_Strncasecmp(param, value, sizeof(value) - 1) == 0) { \
  |  |  ------------------
  |  |  |  |  191|      4|#define PORT_Strncasecmp PL_strncasecmp
  |  |  ------------------
  |  |  |  Branch (21:9): [True: 0, False: 4]
  |  |  ------------------
  |  |   22|      0|        param += sizeof(value) - 1;                               \
  |  |   23|      0|        if (target)                                               \
  |  |  ------------------
  |  |  |  Branch (23:13): [True: 0, False: 0]
  |  |  ------------------
  |  |   24|      0|            PORT_Free(target);                                    \
  |  |  ------------------
  |  |  |  |   60|      0|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   25|      0|        target = NSSUTIL_ArgFetchValue(param, &next);             \
  |  |   26|      0|        param += next;                                            \
  |  |   27|      0|        command;                                                  \
  |  |   28|      0|    } else
  ------------------
  154|      4|        NSSUTIL_HANDLE_STRING_ARG(index, fslotdes, "FIPSSlotDescription=", ;)
  ------------------
  |  |   21|      4|    if (PORT_Strncasecmp(param, value, sizeof(value) - 1) == 0) { \
  |  |  ------------------
  |  |  |  |  191|      4|#define PORT_Strncasecmp PL_strncasecmp
  |  |  ------------------
  |  |  |  Branch (21:9): [True: 0, False: 4]
  |  |  ------------------
  |  |   22|      0|        param += sizeof(value) - 1;                               \
  |  |   23|      0|        if (target)                                               \
  |  |  ------------------
  |  |  |  Branch (23:13): [True: 0, False: 0]
  |  |  ------------------
  |  |   24|      0|            PORT_Free(target);                                    \
  |  |  ------------------
  |  |  |  |   60|      0|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   25|      0|        target = NSSUTIL_ArgFetchValue(param, &next);             \
  |  |   26|      0|        param += next;                                            \
  |  |   27|      0|        command;                                                  \
  |  |   28|      0|    } else
  ------------------
  155|      4|        NSSUTIL_HANDLE_STRING_ARG(index, ftokdes, "FIPSTokenDescription=", ;)
  ------------------
  |  |   21|      4|    if (PORT_Strncasecmp(param, value, sizeof(value) - 1) == 0) { \
  |  |  ------------------
  |  |  |  |  191|      4|#define PORT_Strncasecmp PL_strncasecmp
  |  |  ------------------
  |  |  |  Branch (21:9): [True: 0, False: 4]
  |  |  ------------------
  |  |   22|      0|        param += sizeof(value) - 1;                               \
  |  |   23|      0|        if (target)                                               \
  |  |  ------------------
  |  |  |  Branch (23:13): [True: 0, False: 0]
  |  |  ------------------
  |  |   24|      0|            PORT_Free(target);                                    \
  |  |  ------------------
  |  |  |  |   60|      0|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   25|      0|        target = NSSUTIL_ArgFetchValue(param, &next);             \
  |  |   26|      0|        param += next;                                            \
  |  |   27|      0|        command;                                                  \
  |  |   28|      0|    } else
  ------------------
  156|      4|        NSSUTIL_HANDLE_STRING_ARG(index, pupdtokdes, "updateTokenDescription=", ;)
  ------------------
  |  |   21|      4|    if (PORT_Strncasecmp(param, value, sizeof(value) - 1) == 0) { \
  |  |  ------------------
  |  |  |  |  191|      4|#define PORT_Strncasecmp PL_strncasecmp
  |  |  ------------------
  |  |  |  Branch (21:9): [True: 1, False: 3]
  |  |  ------------------
  |  |   22|      1|        param += sizeof(value) - 1;                               \
  |  |   23|      1|        if (target)                                               \
  |  |  ------------------
  |  |  |  Branch (23:13): [True: 0, False: 1]
  |  |  ------------------
  |  |   24|      1|            PORT_Free(target);                                    \
  |  |  ------------------
  |  |  |  |   60|      0|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   25|      1|        target = NSSUTIL_ArgFetchValue(param, &next);             \
  |  |   26|      1|        param += next;                                            \
  |  |   27|      1|        command;                                                  \
  |  |   28|      1|    } else
  ------------------
  157|      3|        NSSUTIL_HANDLE_STRING_ARG(index, minPW, "minPWLen=", ;)
  ------------------
  |  |   21|      3|    if (PORT_Strncasecmp(param, value, sizeof(value) - 1) == 0) { \
  |  |  ------------------
  |  |  |  |  191|      3|#define PORT_Strncasecmp PL_strncasecmp
  |  |  ------------------
  |  |  |  Branch (21:9): [True: 0, False: 3]
  |  |  ------------------
  |  |   22|      0|        param += sizeof(value) - 1;                               \
  |  |   23|      0|        if (target)                                               \
  |  |  ------------------
  |  |  |  Branch (23:13): [True: 0, False: 0]
  |  |  ------------------
  |  |   24|      0|            PORT_Free(target);                                    \
  |  |  ------------------
  |  |  |  |   60|      0|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   25|      0|        target = NSSUTIL_ArgFetchValue(param, &next);             \
  |  |   26|      0|        param += next;                                            \
  |  |   27|      0|        command;                                                  \
  |  |   28|      0|    } else
  ------------------
  158|       |
  159|      3|        NSSUTIL_HANDLE_STRING_ARG(
  ------------------
  |  |   21|      3|    if (PORT_Strncasecmp(param, value, sizeof(value) - 1) == 0) { \
  |  |  ------------------
  |  |  |  |  191|      3|#define PORT_Strncasecmp PL_strncasecmp
  |  |  ------------------
  |  |  |  Branch (21:9): [True: 1, False: 2]
  |  |  ------------------
  |  |   22|      1|        param += sizeof(value) - 1;                               \
  |  |   23|      1|        if (target)                                               \
  |  |  ------------------
  |  |  |  Branch (23:13): [True: 0, False: 1]
  |  |  ------------------
  |  |   24|      1|            PORT_Free(target);                                    \
  |  |  ------------------
  |  |  |  |   60|      0|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   25|      1|        target = NSSUTIL_ArgFetchValue(param, &next);             \
  |  |   26|      1|        param += next;                                            \
  |  |   27|      2|        command;                                                  \
  |  |  ------------------
  |  |  |  Branch (27:9): [True: 1, False: 0]
  |  |  ------------------
  |  |   28|      1|    } else
  ------------------
  160|      3|            index, tmp, "flags=",
  161|      3|            if (tmp) { sftk_parseFlags(param,parsed); PORT_Free(tmp); tmp = NULL; })
  162|      2|        NSSUTIL_HANDLE_STRING_ARG(
  ------------------
  |  |   21|      2|    if (PORT_Strncasecmp(param, value, sizeof(value) - 1) == 0) { \
  |  |  ------------------
  |  |  |  |  191|      2|#define PORT_Strncasecmp PL_strncasecmp
  |  |  ------------------
  |  |  |  Branch (21:9): [True: 0, False: 2]
  |  |  ------------------
  |  |   22|      0|        param += sizeof(value) - 1;                               \
  |  |   23|      0|        if (target)                                               \
  |  |  ------------------
  |  |  |  Branch (23:13): [True: 0, False: 0]
  |  |  ------------------
  |  |   24|      0|            PORT_Free(target);                                    \
  |  |  ------------------
  |  |  |  |   60|      0|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   25|      0|        target = NSSUTIL_ArgFetchValue(param, &next);             \
  |  |   26|      0|        param += next;                                            \
  |  |   27|      0|        command;                                                  \
  |  |  ------------------
  |  |  |  Branch (27:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   28|      0|    } else
  ------------------
  163|      2|            index, tmp, "tokens=",
  164|      2|            if (tmp) { sftk_parseTokens(tmp,parsed); PORT_Free(tmp); tmp = NULL; })
  165|      2|        NSSUTIL_HANDLE_FINAL_ARG(index)
  ------------------
  |  |   31|      2|    {                                            \
  |  |   32|      2|        param = NSSUTIL_ArgSkipParameter(param); \
  |  |   33|      2|    }                                            \
  |  |   34|     10|    param = NSSUTIL_ArgStrip(param);
  ------------------
  166|     10|    }
  167|      1|    if (parsed->tokens == NULL) {
  ------------------
  |  Branch (167:9): [True: 1, False: 0]
  ------------------
  168|      1|        int count = isFIPS ? 1 : 2;
  ------------------
  |  Branch (168:21): [True: 0, False: 1]
  ------------------
  169|      1|        int i = count - 1;
  170|      1|        sftk_token_parameters *tokens = NULL;
  171|       |
  172|      1|        tokens = (sftk_token_parameters *)
  173|      1|            PORT_ZAlloc(count * sizeof(sftk_token_parameters));
  ------------------
  |  |   72|      1|#define PORT_ZAlloc PORT_ZAlloc_Util
  ------------------
  174|      1|        if (tokens == NULL) {
  ------------------
  |  Branch (174:13): [True: 0, False: 1]
  ------------------
  175|      0|            goto loser;
  176|      0|        }
  177|      1|        parsed->tokens = tokens;
  178|      1|        parsed->token_count = count;
  179|      1|        tokens[i].slotID = isFIPS ? FIPS_SLOT_ID : PRIVATE_KEY_SLOT_ID;
  ------------------
  |  |  500|      0|#define FIPS_SLOT_ID 3
  ------------------
                      tokens[i].slotID = isFIPS ? FIPS_SLOT_ID : PRIVATE_KEY_SLOT_ID;
  ------------------
  |  |  499|      2|#define PRIVATE_KEY_SLOT_ID 2
  ------------------
  |  Branch (179:28): [True: 0, False: 1]
  ------------------
  180|      1|        tokens[i].certPrefix = certPrefix;
  181|      1|        tokens[i].keyPrefix = keyPrefix;
  182|      1|        tokens[i].minPW = minPW ? atoi(minPW) : 0;
  ------------------
  |  Branch (182:27): [True: 0, False: 1]
  ------------------
  183|      1|        tokens[i].readOnly = parsed->readOnly;
  184|      1|        tokens[i].noCertDB = parsed->noCertDB;
  185|      1|        tokens[i].noKeyDB = parsed->noCertDB;
  186|      1|        tokens[i].forceOpen = parsed->forceOpen;
  187|      1|        tokens[i].pwRequired = parsed->pwRequired;
  188|      1|        tokens[i].optimizeSpace = parsed->optimizeSpace;
  189|      1|        tokens[0].optimizeSpace = parsed->optimizeSpace;
  190|      1|        certPrefix = NULL;
  191|      1|        keyPrefix = NULL;
  192|      1|        if (isFIPS) {
  ------------------
  |  Branch (192:13): [True: 0, False: 1]
  ------------------
  193|      0|            tokens[i].tokdes = ftokdes;
  194|      0|            tokens[i].updtokdes = pupdtokdes;
  195|      0|            tokens[i].slotdes = fslotdes;
  196|      0|            fslotdes = NULL;
  197|      0|            ftokdes = NULL;
  198|      0|            pupdtokdes = NULL;
  199|      1|        } else {
  200|      1|            tokens[i].tokdes = ptokdes;
  201|      1|            tokens[i].updtokdes = pupdtokdes;
  202|      1|            tokens[i].slotdes = pslotdes;
  203|      1|            tokens[0].slotID = NETSCAPE_SLOT_ID;
  ------------------
  |  |  498|      1|#define NETSCAPE_SLOT_ID 1
  ------------------
  204|      1|            tokens[0].tokdes = tokdes;
  205|      1|            tokens[0].slotdes = slotdes;
  206|      1|            tokens[0].noCertDB = PR_TRUE;
  ------------------
  |  |  437|      1|#define PR_TRUE 1
  ------------------
  207|      1|            tokens[0].noKeyDB = PR_TRUE;
  ------------------
  |  |  437|      1|#define PR_TRUE 1
  ------------------
  208|      1|            pupdtokdes = NULL;
  209|      1|            ptokdes = NULL;
  210|      1|            pslotdes = NULL;
  211|      1|            tokdes = NULL;
  212|      1|            slotdes = NULL;
  213|      1|        }
  214|      1|    }
  215|       |
  216|      1|loser:
  217|      1|    FREE_CLEAR(certPrefix);
  ------------------
  |  |   16|      1|    if (p) {          \
  |  |  ------------------
  |  |  |  Branch (16:9): [True: 0, False: 1]
  |  |  ------------------
  |  |   17|      0|        PORT_Free(p); \
  |  |  ------------------
  |  |  |  |   60|      0|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   18|      0|        p = NULL;     \
  |  |   19|      0|    }
  ------------------
  218|      1|    FREE_CLEAR(keyPrefix);
  ------------------
  |  |   16|      1|    if (p) {          \
  |  |  ------------------
  |  |  |  Branch (16:9): [True: 0, False: 1]
  |  |  ------------------
  |  |   17|      0|        PORT_Free(p); \
  |  |  ------------------
  |  |  |  |   60|      0|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   18|      0|        p = NULL;     \
  |  |   19|      0|    }
  ------------------
  219|      1|    FREE_CLEAR(tokdes);
  ------------------
  |  |   16|      1|    if (p) {          \
  |  |  ------------------
  |  |  |  Branch (16:9): [True: 0, False: 1]
  |  |  ------------------
  |  |   17|      0|        PORT_Free(p); \
  |  |  ------------------
  |  |  |  |   60|      0|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   18|      0|        p = NULL;     \
  |  |   19|      0|    }
  ------------------
  220|      1|    FREE_CLEAR(ptokdes);
  ------------------
  |  |   16|      1|    if (p) {          \
  |  |  ------------------
  |  |  |  Branch (16:9): [True: 0, False: 1]
  |  |  ------------------
  |  |   17|      0|        PORT_Free(p); \
  |  |  ------------------
  |  |  |  |   60|      0|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   18|      0|        p = NULL;     \
  |  |   19|      0|    }
  ------------------
  221|      1|    FREE_CLEAR(pupdtokdes);
  ------------------
  |  |   16|      1|    if (p) {          \
  |  |  ------------------
  |  |  |  Branch (16:9): [True: 0, False: 1]
  |  |  ------------------
  |  |   17|      0|        PORT_Free(p); \
  |  |  ------------------
  |  |  |  |   60|      0|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   18|      0|        p = NULL;     \
  |  |   19|      0|    }
  ------------------
  222|      1|    FREE_CLEAR(slotdes);
  ------------------
  |  |   16|      1|    if (p) {          \
  |  |  ------------------
  |  |  |  Branch (16:9): [True: 0, False: 1]
  |  |  ------------------
  |  |   17|      0|        PORT_Free(p); \
  |  |  ------------------
  |  |  |  |   60|      0|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   18|      0|        p = NULL;     \
  |  |   19|      0|    }
  ------------------
  223|      1|    FREE_CLEAR(pslotdes);
  ------------------
  |  |   16|      1|    if (p) {          \
  |  |  ------------------
  |  |  |  Branch (16:9): [True: 0, False: 1]
  |  |  ------------------
  |  |   17|      0|        PORT_Free(p); \
  |  |  ------------------
  |  |  |  |   60|      0|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   18|      0|        p = NULL;     \
  |  |   19|      0|    }
  ------------------
  224|      1|    FREE_CLEAR(fslotdes);
  ------------------
  |  |   16|      1|    if (p) {          \
  |  |  ------------------
  |  |  |  Branch (16:9): [True: 0, False: 1]
  |  |  ------------------
  |  |   17|      0|        PORT_Free(p); \
  |  |  ------------------
  |  |  |  |   60|      0|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   18|      0|        p = NULL;     \
  |  |   19|      0|    }
  ------------------
  225|      1|    FREE_CLEAR(ftokdes);
  ------------------
  |  |   16|      1|    if (p) {          \
  |  |  ------------------
  |  |  |  Branch (16:9): [True: 0, False: 1]
  |  |  ------------------
  |  |   17|      0|        PORT_Free(p); \
  |  |  ------------------
  |  |  |  |   60|      0|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   18|      0|        p = NULL;     \
  |  |   19|      0|    }
  ------------------
  226|      1|    FREE_CLEAR(minPW);
  ------------------
  |  |   16|      1|    if (p) {          \
  |  |  ------------------
  |  |  |  Branch (16:9): [True: 0, False: 1]
  |  |  ------------------
  |  |   17|      0|        PORT_Free(p); \
  |  |  ------------------
  |  |  |  |   60|      0|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   18|      0|        p = NULL;     \
  |  |   19|      0|    }
  ------------------
  227|      1|    return CKR_OK;
  ------------------
  |  | 1388|      1|#define CKR_OK 0x00000000UL
  ------------------
  228|      1|}
sftk_freeParams:
  232|      1|{
  233|      1|    int i;
  234|       |
  235|      3|    for (i = 0; i < params->token_count; i++) {
  ------------------
  |  Branch (235:17): [True: 2, False: 1]
  ------------------
  236|      2|        FREE_CLEAR(params->tokens[i].configdir);
  ------------------
  |  |   16|      2|    if (p) {          \
  |  |  ------------------
  |  |  |  Branch (16:9): [True: 0, False: 2]
  |  |  ------------------
  |  |   17|      0|        PORT_Free(p); \
  |  |  ------------------
  |  |  |  |   60|      0|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   18|      0|        p = NULL;     \
  |  |   19|      0|    }
  ------------------
  237|      2|        FREE_CLEAR(params->tokens[i].certPrefix);
  ------------------
  |  |   16|      2|    if (p) {          \
  |  |  ------------------
  |  |  |  Branch (16:9): [True: 1, False: 1]
  |  |  ------------------
  |  |   17|      1|        PORT_Free(p); \
  |  |  ------------------
  |  |  |  |   60|      1|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   18|      1|        p = NULL;     \
  |  |   19|      1|    }
  ------------------
  238|      2|        FREE_CLEAR(params->tokens[i].keyPrefix);
  ------------------
  |  |   16|      2|    if (p) {          \
  |  |  ------------------
  |  |  |  Branch (16:9): [True: 1, False: 1]
  |  |  ------------------
  |  |   17|      1|        PORT_Free(p); \
  |  |  ------------------
  |  |  |  |   60|      1|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   18|      1|        p = NULL;     \
  |  |   19|      1|    }
  ------------------
  239|      2|        FREE_CLEAR(params->tokens[i].tokdes);
  ------------------
  |  |   16|      2|    if (p) {          \
  |  |  ------------------
  |  |  |  Branch (16:9): [True: 0, False: 2]
  |  |  ------------------
  |  |   17|      0|        PORT_Free(p); \
  |  |  ------------------
  |  |  |  |   60|      0|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   18|      0|        p = NULL;     \
  |  |   19|      0|    }
  ------------------
  240|      2|        FREE_CLEAR(params->tokens[i].slotdes);
  ------------------
  |  |   16|      2|    if (p) {          \
  |  |  ------------------
  |  |  |  Branch (16:9): [True: 0, False: 2]
  |  |  ------------------
  |  |   17|      0|        PORT_Free(p); \
  |  |  ------------------
  |  |  |  |   60|      0|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   18|      0|        p = NULL;     \
  |  |   19|      0|    }
  ------------------
  241|      2|        FREE_CLEAR(params->tokens[i].updatedir);
  ------------------
  |  |   16|      2|    if (p) {          \
  |  |  ------------------
  |  |  |  Branch (16:9): [True: 0, False: 2]
  |  |  ------------------
  |  |   17|      0|        PORT_Free(p); \
  |  |  ------------------
  |  |  |  |   60|      0|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   18|      0|        p = NULL;     \
  |  |   19|      0|    }
  ------------------
  242|      2|        FREE_CLEAR(params->tokens[i].updCertPrefix);
  ------------------
  |  |   16|      2|    if (p) {          \
  |  |  ------------------
  |  |  |  Branch (16:9): [True: 0, False: 2]
  |  |  ------------------
  |  |   17|      0|        PORT_Free(p); \
  |  |  ------------------
  |  |  |  |   60|      0|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   18|      0|        p = NULL;     \
  |  |   19|      0|    }
  ------------------
  243|      2|        FREE_CLEAR(params->tokens[i].updKeyPrefix);
  ------------------
  |  |   16|      2|    if (p) {          \
  |  |  ------------------
  |  |  |  Branch (16:9): [True: 0, False: 2]
  |  |  ------------------
  |  |   17|      0|        PORT_Free(p); \
  |  |  ------------------
  |  |  |  |   60|      0|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   18|      0|        p = NULL;     \
  |  |   19|      0|    }
  ------------------
  244|      2|        FREE_CLEAR(params->tokens[i].updateID);
  ------------------
  |  |   16|      2|    if (p) {          \
  |  |  ------------------
  |  |  |  Branch (16:9): [True: 0, False: 2]
  |  |  ------------------
  |  |   17|      0|        PORT_Free(p); \
  |  |  ------------------
  |  |  |  |   60|      0|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   18|      0|        p = NULL;     \
  |  |   19|      0|    }
  ------------------
  245|      2|        FREE_CLEAR(params->tokens[i].updtokdes);
  ------------------
  |  |   16|      2|    if (p) {          \
  |  |  ------------------
  |  |  |  Branch (16:9): [True: 1, False: 1]
  |  |  ------------------
  |  |   17|      1|        PORT_Free(p); \
  |  |  ------------------
  |  |  |  |   60|      1|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   18|      1|        p = NULL;     \
  |  |   19|      1|    }
  ------------------
  246|      2|    }
  247|       |
  248|      1|    FREE_CLEAR(params->configdir);
  ------------------
  |  |   16|      1|    if (p) {          \
  |  |  ------------------
  |  |  |  Branch (16:9): [True: 1, False: 0]
  |  |  ------------------
  |  |   17|      1|        PORT_Free(p); \
  |  |  ------------------
  |  |  |  |   60|      1|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   18|      1|        p = NULL;     \
  |  |   19|      1|    }
  ------------------
  249|      1|    FREE_CLEAR(params->secmodName);
  ------------------
  |  |   16|      1|    if (p) {          \
  |  |  ------------------
  |  |  |  Branch (16:9): [True: 1, False: 0]
  |  |  ------------------
  |  |   17|      1|        PORT_Free(p); \
  |  |  ------------------
  |  |  |  |   60|      1|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   18|      1|        p = NULL;     \
  |  |   19|      1|    }
  ------------------
  250|      1|    FREE_CLEAR(params->man);
  ------------------
  |  |   16|      1|    if (p) {          \
  |  |  ------------------
  |  |  |  Branch (16:9): [True: 0, False: 1]
  |  |  ------------------
  |  |   17|      0|        PORT_Free(p); \
  |  |  ------------------
  |  |  |  |   60|      0|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   18|      0|        p = NULL;     \
  |  |   19|      0|    }
  ------------------
  251|      1|    FREE_CLEAR(params->libdes);
  ------------------
  |  |   16|      1|    if (p) {          \
  |  |  ------------------
  |  |  |  Branch (16:9): [True: 0, False: 1]
  |  |  ------------------
  |  |   17|      0|        PORT_Free(p); \
  |  |  ------------------
  |  |  |  |   60|      0|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   18|      0|        p = NULL;     \
  |  |   19|      0|    }
  ------------------
  252|      1|    FREE_CLEAR(params->tokens);
  ------------------
  |  |   16|      1|    if (p) {          \
  |  |  ------------------
  |  |  |  Branch (16:9): [True: 1, False: 0]
  |  |  ------------------
  |  |   17|      1|        PORT_Free(p); \
  |  |  ------------------
  |  |  |  |   60|      1|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   18|      1|        p = NULL;     \
  |  |   19|      1|    }
  ------------------
  253|      1|    FREE_CLEAR(params->updatedir);
  ------------------
  |  |   16|      1|    if (p) {          \
  |  |  ------------------
  |  |  |  Branch (16:9): [True: 1, False: 0]
  |  |  ------------------
  |  |   17|      1|        PORT_Free(p); \
  |  |  ------------------
  |  |  |  |   60|      1|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   18|      1|        p = NULL;     \
  |  |   19|      1|    }
  ------------------
  254|      1|    FREE_CLEAR(params->updateID);
  ------------------
  |  |   16|      1|    if (p) {          \
  |  |  ------------------
  |  |  |  Branch (16:9): [True: 1, False: 0]
  |  |  ------------------
  |  |   17|      1|        PORT_Free(p); \
  |  |  ------------------
  |  |  |  |   60|      1|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   18|      1|        p = NULL;     \
  |  |   19|      1|    }
  ------------------
  255|      1|}
sftkpars.c:sftk_parseFlags:
   35|      1|{
   36|      1|    parsed->noModDB = NSSUTIL_ArgHasFlag("flags", "noModDB", tmp);
   37|      1|    parsed->readOnly = NSSUTIL_ArgHasFlag("flags", "readOnly", tmp);
   38|       |    /* keep legacy interface working */
   39|      1|    parsed->noCertDB = NSSUTIL_ArgHasFlag("flags", "noCertDB", tmp);
   40|      1|    parsed->forceOpen = NSSUTIL_ArgHasFlag("flags", "forceOpen", tmp);
   41|      1|    parsed->pwRequired = NSSUTIL_ArgHasFlag("flags", "passwordRequired", tmp);
   42|      1|    parsed->optimizeSpace = NSSUTIL_ArgHasFlag("flags", "optimizeSpace", tmp);
   43|      1|    return;
   44|      1|}

sftk_TLSPRFInit:
  158|  1.62k|{
  159|  1.62k|    SFTKAttribute *keyVal;
  160|  1.62k|    TLSPRFContext *prf_cx;
  161|  1.62k|    CK_RV crv = CKR_HOST_MEMORY;
  ------------------
  |  | 1390|  1.62k|#define CKR_HOST_MEMORY 0x00000002UL
  ------------------
  162|  1.62k|    PRUint32 keySize;
  163|  1.62k|    PRUint32 blockSize;
  164|       |
  165|  1.62k|    if (key_type != CKK_GENERIC_SECRET)
  ------------------
  |  |  383|  1.62k|#define CKK_GENERIC_SECRET 0x00000010UL
  ------------------
  |  Branch (165:9): [True: 0, False: 1.62k]
  ------------------
  166|      0|        return CKR_KEY_TYPE_INCONSISTENT; /* CKR_KEY_FUNCTION_NOT_PERMITTED */
  ------------------
  |  | 1433|      0|#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
  ------------------
  167|       |
  168|  1.62k|    context->multi = PR_TRUE;
  ------------------
  |  |  437|  1.62k|#define PR_TRUE 1
  ------------------
  169|       |
  170|  1.62k|    keyVal = sftk_FindAttribute(key, CKA_VALUE);
  ------------------
  |  |  516|  1.62k|#define CKA_VALUE 0x00000011UL
  ------------------
  171|  1.62k|    keySize = (!keyVal) ? 0 : keyVal->attrib.ulValueLen;
  ------------------
  |  Branch (171:15): [True: 0, False: 1.62k]
  ------------------
  172|  1.62k|    blockSize = keySize + sizeof(TLSPRFContext);
  173|  1.62k|    prf_cx = (TLSPRFContext *)PORT_Alloc(blockSize);
  ------------------
  |  |   52|  1.62k|#define PORT_Alloc PORT_Alloc_Util
  ------------------
  174|  1.62k|    if (!prf_cx)
  ------------------
  |  Branch (174:9): [True: 0, False: 1.62k]
  ------------------
  175|      0|        goto done;
  176|  1.62k|    prf_cx->cxSize = blockSize;
  177|  1.62k|    prf_cx->cxKeyLen = keySize;
  178|  1.62k|    prf_cx->cxDataLen = 0;
  179|  1.62k|    prf_cx->cxBufSize = blockSize - offsetof(TLSPRFContext, cxBuf);
  180|  1.62k|    prf_cx->cxRv = SECSuccess;
  181|  1.62k|    prf_cx->cxIsFIPS = sftk_isFIPS(key->slot->slotID);
  ------------------
  |  |  506|  1.62k|    (((id) == FIPS_SLOT_ID) || ((id) >= SFTK_MIN_FIPS_USER_SLOT_ID))
  |  |  ------------------
  |  |  |  |  500|  1.62k|#define FIPS_SLOT_ID 3
  |  |  ------------------
  |  |                   (((id) == FIPS_SLOT_ID) || ((id) >= SFTK_MIN_FIPS_USER_SLOT_ID))
  |  |  ------------------
  |  |  |  |  567|  1.62k|#define SFTK_MIN_FIPS_USER_SLOT_ID 101
  |  |  ------------------
  |  |  |  Branch (506:6): [True: 0, False: 1.62k]
  |  |  |  Branch (506:32): [True: 0, False: 1.62k]
  |  |  ------------------
  ------------------
  182|  1.62k|    prf_cx->cxBufPtr = prf_cx->cxBuf;
  183|  1.62k|    prf_cx->cxHashAlg = hash_alg;
  184|  1.62k|    prf_cx->cxOutLen = out_len;
  185|  1.62k|    if (keySize)
  ------------------
  |  Branch (185:9): [True: 1.62k, False: 0]
  ------------------
  186|  1.62k|        PORT_Memcpy(prf_cx->cxBufPtr, keyVal->attrib.pValue, keySize);
  ------------------
  |  |  180|  1.62k|#define PORT_Memcpy memcpy
  ------------------
  187|       |
  188|  1.62k|    context->hashInfo = (void *)prf_cx;
  189|  1.62k|    context->cipherInfo = (void *)prf_cx;
  190|  1.62k|    context->hashUpdate = sftk_TLSPRFHashUpdate;
  191|  1.62k|    context->end = sftk_TLSPRFEnd;
  192|  1.62k|    context->update = sftk_TLSPRFUpdate;
  193|  1.62k|    context->verify = sftk_TLSPRFVerify;
  194|  1.62k|    context->destroy = sftk_TLSPRFNull;
  195|  1.62k|    context->hashdestroy = sftk_TLSPRFHashDestroy;
  196|  1.62k|    crv = CKR_OK;
  ------------------
  |  | 1388|  1.62k|#define CKR_OK 0x00000000UL
  ------------------
  197|       |
  198|  1.62k|done:
  199|  1.62k|    if (keyVal)
  ------------------
  |  Branch (199:9): [True: 1.62k, False: 0]
  ------------------
  200|  1.62k|        sftk_FreeAttribute(keyVal);
  201|  1.62k|    return crv;
  202|  1.62k|}
tlsprf.c:sftk_TLSPRFHashUpdate:
   33|  3.25k|{
   34|  3.25k|    TLSPRFContext *cx = ctx;
   35|  3.25k|    PRUint32 bytesUsed = cx->cxKeyLen + cx->cxDataLen;
   36|       |
   37|  3.25k|    if (cx->cxRv != SECSuccess) /* function has previously failed. */
  ------------------
  |  Branch (37:9): [True: 0, False: 3.25k]
  ------------------
   38|      0|        return;
   39|  3.25k|    if (bytesUsed + data_len > cx->cxBufSize) {
  ------------------
  |  Branch (39:9): [True: 0, False: 3.25k]
  ------------------
   40|       |        /* We don't use realloc here because
   41|       |        ** (a) realloc doesn't zero out the old block, and
   42|       |        ** (b) if realloc fails, we lose the old block.
   43|       |        */
   44|      0|        PRUint32 newBufSize = bytesUsed + data_len + 512;
   45|      0|        unsigned char *newBuf = (unsigned char *)PORT_Alloc(newBufSize);
  ------------------
  |  |   52|      0|#define PORT_Alloc PORT_Alloc_Util
  ------------------
   46|      0|        if (!newBuf) {
  ------------------
  |  Branch (46:13): [True: 0, False: 0]
  ------------------
   47|      0|            cx->cxRv = SECFailure;
   48|      0|            return;
   49|      0|        }
   50|      0|        PORT_Memcpy(newBuf, cx->cxBufPtr, bytesUsed);
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
   51|      0|        if (cx->cxBufPtr != cx->cxBuf) {
  ------------------
  |  Branch (51:13): [True: 0, False: 0]
  ------------------
   52|      0|            PORT_ZFree(cx->cxBufPtr, bytesUsed);
  ------------------
  |  |   75|      0|#define PORT_ZFree PORT_ZFree_Util
  ------------------
   53|      0|        }
   54|      0|        cx->cxBufPtr = newBuf;
   55|      0|        cx->cxBufSize = newBufSize;
   56|      0|    }
   57|  3.25k|    PORT_Memcpy(cx->cxBufPtr + bytesUsed, data, data_len);
  ------------------
  |  |  180|  3.25k|#define PORT_Memcpy memcpy
  ------------------
   58|  3.25k|    cx->cxDataLen += data_len;
   59|  3.25k|}
tlsprf.c:sftk_TLSPRFEnd:
   64|  1.62k|{
   65|  1.62k|    *pDigestLen = 0; /* tells Verify that no data has been input yet. */
   66|  1.62k|}
tlsprf.c:sftk_TLSPRFUpdate:
   76|  1.62k|{
   77|  1.62k|    TLSPRFContext *cx = ctx;
   78|  1.62k|    SECStatus rv;
   79|  1.62k|    SECItem sigItem;
   80|  1.62k|    SECItem seedItem;
   81|  1.62k|    SECItem secretItem;
   82|       |
   83|  1.62k|    if (cx->cxRv != SECSuccess)
  ------------------
  |  Branch (83:9): [True: 0, False: 1.62k]
  ------------------
   84|      0|        return cx->cxRv;
   85|       |
   86|  1.62k|    secretItem.data = cx->cxBufPtr;
   87|  1.62k|    secretItem.len = cx->cxKeyLen;
   88|       |
   89|  1.62k|    seedItem.data = cx->cxBufPtr + cx->cxKeyLen;
   90|  1.62k|    seedItem.len = cx->cxDataLen;
   91|       |
   92|  1.62k|    sigItem.data = sig;
   93|  1.62k|    if (cx->cxOutLen == 0) {
  ------------------
  |  Branch (93:9): [True: 0, False: 1.62k]
  ------------------
   94|      0|        sigItem.len = maxLen;
   95|  1.62k|    } else if (cx->cxOutLen <= maxLen) {
  ------------------
  |  Branch (95:16): [True: 1.62k, False: 0]
  ------------------
   96|  1.62k|        sigItem.len = cx->cxOutLen;
   97|  1.62k|    } else {
   98|      0|        PORT_SetError(SEC_ERROR_OUTPUT_LEN);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
   99|      0|        return SECFailure;
  100|      0|    }
  101|       |
  102|  1.62k|    if (cx->cxHashAlg != HASH_AlgNULL) {
  ------------------
  |  Branch (102:9): [True: 1.55k, False: 66]
  ------------------
  103|  1.55k|        rv = TLS_P_hash(cx->cxHashAlg, &secretItem, NULL, &seedItem, &sigItem,
  104|  1.55k|                        cx->cxIsFIPS);
  105|  1.55k|    } else {
  106|     66|        rv = TLS_PRF(&secretItem, NULL, &seedItem, &sigItem, cx->cxIsFIPS);
  107|     66|    }
  108|  1.62k|    if (rv == SECSuccess && sigLen != NULL)
  ------------------
  |  Branch (108:9): [True: 1.62k, False: 0]
  |  Branch (108:29): [True: 1.62k, False: 0]
  ------------------
  109|  1.62k|        *sigLen = sigItem.len;
  110|  1.62k|    return rv;
  111|  1.62k|}
tlsprf.c:sftk_TLSPRFNull:
   13|  1.62k|{
   14|  1.62k|    return;
   15|  1.62k|}
tlsprf.c:sftk_TLSPRFHashDestroy:
  143|  1.62k|{
  144|  1.62k|    TLSPRFContext *cx = ctx;
  145|  1.62k|    if (freeit) {
  ------------------
  |  Branch (145:9): [True: 1.62k, False: 0]
  ------------------
  146|  1.62k|        if (cx->cxBufPtr != cx->cxBuf)
  ------------------
  |  Branch (146:13): [True: 0, False: 1.62k]
  ------------------
  147|      0|            PORT_ZFree(cx->cxBufPtr, cx->cxBufSize);
  ------------------
  |  |   75|      0|#define PORT_ZFree PORT_ZFree_Util
  ------------------
  148|  1.62k|        PORT_ZFree(cx, cx->cxSize);
  ------------------
  |  |   75|  1.62k|#define PORT_ZFree PORT_ZFree_Util
  ------------------
  149|  1.62k|    }
  150|  1.62k|}

dtls13_InsertCipherTextHeader:
   61|    346|{
   62|       |    /* Avoid using short records for the handshake.  We pack multiple records
   63|       |     * into the one datagram for the handshake. */
   64|       |
   65|       |    /* The short header here means that the S bit is set to 0 (8-bit sequence number) */
   66|    346|    if (ss->opt.enableDtlsShortHeader &&
  ------------------
  |  Branch (66:9): [True: 180, False: 166]
  ------------------
   67|    346|        cwSpec->epoch > TrafficKeyHandshake) {
  ------------------
  |  Branch (67:9): [True: 0, False: 180]
  ------------------
   68|      0|        *needsLength = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
   69|       |        /* The short header is comprised of two octets in the form
   70|       |         * 0b001000eessssssss where 'e' is the low two bits of the
   71|       |         * epoch and 's' is the low 8 bits of the sequence number. */
   72|      0|        PRUint8 ct = UNIFIED_HEADER_SHORT | ((uint64_t)cwSpec->epoch & MASK_TWO_LOW_BITS);
  ------------------
  |  |   51|      0|#define UNIFIED_HEADER_SHORT 0x20
  ------------------
                      PRUint8 ct = UNIFIED_HEADER_SHORT | ((uint64_t)cwSpec->epoch & MASK_TWO_LOW_BITS);
  ------------------
  |  |   37|      0|#define MASK_TWO_LOW_BITS 0x3
  ------------------
   73|      0|        if (sslBuffer_AppendNumber(wrBuf, ct, sizeof(ct)) != SECSuccess) {
  ------------------
  |  Branch (73:13): [True: 0, False: 0]
  ------------------
   74|      0|            return SECFailure;
   75|      0|        }
   76|      0|        PRUint8 seq = cwSpec->nextSeqNum & MASK_SEQUENCE_NUMBER_SHORT;
  ------------------
  |  |   54|      0|#define MASK_SEQUENCE_NUMBER_SHORT 0xff
  ------------------
   77|      0|        return sslBuffer_AppendNumber(wrBuf, seq, sizeof(seq));
   78|      0|    }
   79|       |
   80|    346|    PRUint8 ct = UNIFIED_HEADER_LONG | ((PRUint8)cwSpec->epoch & MASK_TWO_LOW_BITS);
  ------------------
  |  |   46|    346|#define UNIFIED_HEADER_LONG 0x2c
  ------------------
                  PRUint8 ct = UNIFIED_HEADER_LONG | ((PRUint8)cwSpec->epoch & MASK_TWO_LOW_BITS);
  ------------------
  |  |   37|    346|#define MASK_TWO_LOW_BITS 0x3
  ------------------
   81|    346|    if (sslBuffer_AppendNumber(wrBuf, ct, sizeof(ct)) != SECSuccess) {
  ------------------
  |  Branch (81:9): [True: 0, False: 346]
  ------------------
   82|      0|        return SECFailure;
   83|      0|    }
   84|    346|    PRUint16 seq = cwSpec->nextSeqNum & MASK_SEQUENCE_NUMBER_LONG;
  ------------------
  |  |   55|    346|#define MASK_SEQUENCE_NUMBER_LONG 0xffff
  ------------------
   85|    346|    if (sslBuffer_AppendNumber(wrBuf, seq, sizeof(seq)) != SECSuccess) {
  ------------------
  |  Branch (85:9): [True: 0, False: 346]
  ------------------
   86|      0|        return SECFailure;
   87|      0|    }
   88|    346|    *needsLength = PR_TRUE;
  ------------------
  |  |  437|    346|#define PR_TRUE 1
  ------------------
   89|    346|    return SECSuccess;
   90|    346|}
dtls13_RememberFragment:
  128|  19.5k|{
  129|  19.5k|    DTLSHandshakeRecordEntry *entry;
  130|       |
  131|  19.5k|    PORT_Assert(IS_DTLS(ss));
  ------------------
  |  |  120|  19.5k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  19.5k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 19.5k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  132|       |    /* We should never send an empty fragment with offset > 0. */
  133|  19.5k|    PORT_Assert(length || !offset);
  ------------------
  |  |  120|  19.5k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  24.4k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 14.7k, False: 4.81k]
  |  |  |  |  |  Branch (208:7): [True: 4.81k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  134|       |
  135|  19.5k|    if (!tls13_MaybeTls13(ss)) {
  ------------------
  |  Branch (135:9): [True: 4.73k, False: 14.8k]
  ------------------
  136|  4.73k|        return SECSuccess;
  137|  4.73k|    }
  138|       |
  139|  14.8k|    SSL_TRC(20, ("%d: SSL3[%d]: %s remembering %s record=%llx msg=%d offset=%d",
  ------------------
  |  |   71|  14.8k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 14.8k]
  |  |  ------------------
  |  |   72|  14.8k|    ssl_Trace b
  |  |  ------------------
  |  |  |  Branch (72:15): [True: 0, False: 0]
  |  |  |  Branch (72:15): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  140|  14.8k|                 SSL_GETPID(), ss->fd,
  141|  14.8k|                 SSL_ROLE(ss),
  142|  14.8k|                 list == &ss->ssl3.hs.dtlsSentHandshake ? "sent" : "received",
  143|  14.8k|                 dtls_CombineSequenceNumber(epoch, record), sequence, offset));
  144|       |
  145|  14.8k|    entry = PORT_ZAlloc(sizeof(DTLSHandshakeRecordEntry));
  ------------------
  |  |   72|  14.8k|#define PORT_ZAlloc PORT_ZAlloc_Util
  ------------------
  146|  14.8k|    if (!entry) {
  ------------------
  |  Branch (146:9): [True: 0, False: 14.8k]
  ------------------
  147|      0|        return SECFailure;
  148|      0|    }
  149|       |
  150|  14.8k|    entry->messageSeq = sequence;
  151|  14.8k|    entry->offset = offset;
  152|  14.8k|    entry->length = length;
  153|  14.8k|    entry->record = dtls_CombineSequenceNumber(epoch, record);
  154|  14.8k|    entry->acked = PR_FALSE;
  ------------------
  |  |  438|  14.8k|#define PR_FALSE 0
  ------------------
  155|       |
  156|  14.8k|    PR_APPEND_LINK(&entry->link, list);
  ------------------
  |  |   57|  14.8k|#define PR_APPEND_LINK(_e,_l) PR_INSERT_BEFORE(_e,_l)
  |  |  ------------------
  |  |  |  |   25|  14.8k|    PR_BEGIN_MACRO       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  123|  14.8k|#define PR_BEGIN_MACRO  do {
  |  |  |  |  ------------------
  |  |  |  |   26|  14.8k|    (_e)->next = (_l);   \
  |  |  |  |   27|  14.8k|    (_e)->prev = (_l)->prev; \
  |  |  |  |   28|  14.8k|    (_l)->prev->next = (_e); \
  |  |  |  |   29|  14.8k|    (_l)->prev = (_e);   \
  |  |  |  |   30|  14.8k|    PR_END_MACRO
  |  |  |  |  ------------------
  |  |  |  |  |  |  124|  14.8k|#define PR_END_MACRO    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  157|       |
  158|  14.8k|    return SECSuccess;
  159|  14.8k|}
dtls13_SendAck:
  164|     11|{
  165|     11|    sslBuffer buf = SSL_BUFFER_EMPTY;
  ------------------
  |  |   23|     11|    {                        \
  |  |   24|     11|        NULL, 0, 0, PR_FALSE \
  |  |  ------------------
  |  |  |  |  438|     11|#define PR_FALSE 0
  |  |  ------------------
  |  |   25|     11|    }
  ------------------
  166|     11|    SECStatus rv = SECSuccess;
  167|     11|    PRCList *cursor;
  168|     11|    PRInt32 sent;
  169|     11|    unsigned int offset = 0;
  170|       |
  171|     11|    SSL_TRC(10, ("%d: SSL3[%d]: Sending ACK",
  ------------------
  |  |   71|     11|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 11]
  |  |  ------------------
  |  |   72|     11|    ssl_Trace b
  ------------------
  172|     11|                 SSL_GETPID(), ss->fd));
  173|       |
  174|       |    /*    RecordNumber record_numbers<0..2^16-1>;
  175|       |    2 length bytes for the list of ACKs*/
  176|     11|    PRUint32 sizeOfListACK = 2;
  177|     11|    rv = sslBuffer_Skip(&buf, sizeOfListACK, &offset);
  178|     11|    if (rv != SECSuccess) {
  ------------------
  |  Branch (178:9): [True: 0, False: 11]
  ------------------
  179|      0|        goto loser;
  180|      0|    }
  181|     11|    for (cursor = PR_LIST_HEAD(&ss->ssl3.hs.dtlsRcvdHandshake);
  ------------------
  |  |   65|     11|#define PR_LIST_HEAD(_l) (_l)->next
  ------------------
  182|     22|         cursor != &ss->ssl3.hs.dtlsRcvdHandshake;
  ------------------
  |  Branch (182:10): [True: 11, False: 11]
  ------------------
  183|     11|         cursor = PR_NEXT_LINK(cursor)) {
  ------------------
  |  |   47|     11|        ((_e)->next)
  ------------------
  184|     11|        DTLSHandshakeRecordEntry *entry = (DTLSHandshakeRecordEntry *)cursor;
  185|       |
  186|     11|        SSL_TRC(10, ("%d: SSL3[%d]: ACK for record=%llx",
  ------------------
  |  |   71|     11|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 11]
  |  |  ------------------
  |  |   72|     11|    ssl_Trace b
  ------------------
  187|     11|                     SSL_GETPID(), ss->fd, entry->record));
  188|       |
  189|       |        /*See dtls_CombineSequenceNumber function */
  190|     11|        PRUint64 epoch = entry->record >> 48;
  191|     11|        PRUint64 seqNum = entry->record & 0xffffffffffff;
  192|       |
  193|     11|        rv = sslBuffer_AppendNumber(&buf, epoch, 8);
  194|     11|        if (rv != SECSuccess) {
  ------------------
  |  Branch (194:13): [True: 0, False: 11]
  ------------------
  195|      0|            goto loser;
  196|      0|        }
  197|       |
  198|     11|        rv = sslBuffer_AppendNumber(&buf, seqNum, 8);
  199|     11|        if (rv != SECSuccess) {
  ------------------
  |  Branch (199:13): [True: 0, False: 11]
  ------------------
  200|      0|            goto loser;
  201|      0|        }
  202|     11|    }
  203|       |
  204|     11|    rv = sslBuffer_InsertLength(&buf, offset, sizeOfListACK);
  205|     11|    if (rv != SECSuccess) {
  ------------------
  |  Branch (205:9): [True: 0, False: 11]
  ------------------
  206|      0|        goto loser;
  207|      0|    }
  208|       |
  209|     11|    ssl_GetXmitBufLock(ss);
  ------------------
  |  | 1466|     11|    {                                           \
  |  | 1467|     11|        if (!ss->opt.noLocks)                   \
  |  |  ------------------
  |  |  |  Branch (1467:13): [True: 5, False: 6]
  |  |  ------------------
  |  | 1468|     11|            PZ_EnterMonitor((ss)->xmitBufLock); \
  |  |  ------------------
  |  |  |  |  256|      5|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1469|     11|    }
  ------------------
  210|     11|    sent = ssl3_SendRecord(ss, NULL, ssl_ct_ack,
  211|     11|                           buf.buf, buf.len, 0);
  212|     11|    ssl_ReleaseXmitBufLock(ss);
  ------------------
  |  | 1471|     11|    {                                          \
  |  | 1472|     11|        if (!ss->opt.noLocks)                  \
  |  |  ------------------
  |  |  |  Branch (1472:13): [True: 5, False: 6]
  |  |  ------------------
  |  | 1473|     11|            PZ_ExitMonitor((ss)->xmitBufLock); \
  |  |  ------------------
  |  |  |  |  257|      5|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1474|     11|    }
  ------------------
  213|     11|    if (sent != buf.len) {
  ------------------
  |  Branch (213:9): [True: 0, False: 11]
  ------------------
  214|      0|        rv = SECFailure;
  215|      0|        if (sent != -1) {
  ------------------
  |  Branch (215:13): [True: 0, False: 0]
  ------------------
  216|      0|            PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  217|      0|        }
  218|      0|    }
  219|       |
  220|     11|loser:
  221|     11|    sslBuffer_Clear(&buf);
  222|     11|    return rv;
  223|     11|}
dtls13_SendAckCb:
  227|     11|{
  228|     11|    if (!IS_DTLS(ss)) {
  ------------------
  |  |  892|     11|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  ------------------
  |  Branch (228:9): [True: 0, False: 11]
  ------------------
  229|      0|        return;
  230|      0|    }
  231|     11|    (void)dtls13_SendAck(ss);
  232|     11|}
dtls13_AeadLimitReached:
  237|  59.5k|{
  238|  59.5k|    if (spec->version >= SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|  59.5k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (238:9): [True: 11.0k, False: 48.5k]
  ------------------
  239|  11.0k|        switch (spec->cipherDef->calg) {
  240|  5.09k|            case ssl_calg_chacha20:
  ------------------
  |  Branch (240:13): [True: 5.09k, False: 5.98k]
  ------------------
  241|  11.0k|            case ssl_calg_aes_gcm:
  ------------------
  |  Branch (241:13): [True: 5.98k, False: 5.09k]
  ------------------
  242|  11.0k|                return spec->deprotectionFailures >= (1ULL << 36);
  243|       |#ifdef UNSAFE_FUZZER_MODE
  244|       |            case ssl_calg_null:
  245|       |                return PR_FALSE;
  246|       |#endif
  247|      0|            default:
  ------------------
  |  Branch (247:13): [True: 0, False: 11.0k]
  ------------------
  248|      0|                PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  249|      0|                break;
  250|  11.0k|        }
  251|  11.0k|    }
  252|  48.5k|    return PR_FALSE;
  ------------------
  |  |  438|  48.5k|#define PR_FALSE 0
  ------------------
  253|  59.5k|}
dtls_NextUnackedRange:
  326|  14.8k|{
  327|  14.8k|    PRCList *cur_p;
  328|  14.8k|    PRBool done = PR_FALSE;
  ------------------
  |  |  438|  14.8k|#define PR_FALSE 0
  ------------------
  329|  14.8k|    DTLSHandshakeRecordEntry *entry;
  330|  14.8k|    PRUint32 start;
  331|  14.8k|    PRUint32 end;
  332|       |
  333|  14.8k|    PORT_Assert(IS_DTLS(ss));
  ------------------
  |  |  120|  14.8k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  14.8k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 14.8k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  334|       |
  335|  14.8k|    *startOut = offset;
  336|  14.8k|    *endOut = len;
  337|  14.8k|    if (!tls13_MaybeTls13(ss)) {
  ------------------
  |  Branch (337:9): [True: 4.73k, False: 10.1k]
  ------------------
  338|  4.73k|        return PR_TRUE;
  ------------------
  |  |  437|  4.73k|#define PR_TRUE 1
  ------------------
  339|  4.73k|    }
  340|       |
  341|       |    /* The message is empty. Use a simple search. */
  342|  10.1k|    if (!len) {
  ------------------
  |  Branch (342:9): [True: 0, False: 10.1k]
  ------------------
  343|      0|        PORT_Assert(!offset);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  344|      0|        return !dtls_IsEmptyMessageAcknowledged(ss, msgSeq, offset);
  345|      0|    }
  346|       |
  347|       |    /* This iterates multiple times over the acknowledgments and only terminates
  348|       |     * when an entire iteration happens without start or end moving.  If that
  349|       |     * happens without start and end crossing each other, then there is a range
  350|       |     * of unacknowledged data.  If they meet, then the message is fully
  351|       |     * acknowledged. */
  352|  10.1k|    start = offset;
  353|  10.1k|    end = len;
  354|  20.2k|    while (!done) {
  ------------------
  |  Branch (354:12): [True: 10.1k, False: 10.0k]
  ------------------
  355|  10.1k|        done = PR_TRUE;
  ------------------
  |  |  437|  10.1k|#define PR_TRUE 1
  ------------------
  356|  10.1k|        for (cur_p = PR_LIST_HEAD(&ss->ssl3.hs.dtlsSentHandshake);
  ------------------
  |  |   65|  10.1k|#define PR_LIST_HEAD(_l) (_l)->next
  ------------------
  357|  13.9k|             cur_p != &ss->ssl3.hs.dtlsSentHandshake;
  ------------------
  |  Branch (357:14): [True: 3.85k, False: 10.0k]
  ------------------
  358|  10.1k|             cur_p = PR_NEXT_LINK(cur_p)) {
  ------------------
  |  |   47|  3.72k|        ((_e)->next)
  ------------------
  359|  3.85k|            entry = (DTLSHandshakeRecordEntry *)cur_p;
  360|  3.85k|            if (!entry->acked || msgSeq != entry->messageSeq) {
  ------------------
  |  Branch (360:17): [True: 3.57k, False: 283]
  |  Branch (360:34): [True: 94, False: 189]
  ------------------
  361|  3.66k|                continue;
  362|  3.66k|            }
  363|       |
  364|    189|            if (dtls_MoveUnackedStartForward(entry, &start) ||
  ------------------
  |  Branch (364:17): [True: 100, False: 89]
  ------------------
  365|    189|                dtls_MoveUnackedEndBackward(entry, &end)) {
  ------------------
  |  Branch (365:17): [True: 28, False: 61]
  ------------------
  366|    128|                if (start >= end) {
  ------------------
  |  Branch (366:21): [True: 68, False: 60]
  ------------------
  367|       |                    /* The message is all acknowledged. */
  368|     68|                    return PR_FALSE;
  ------------------
  |  |  438|     68|#define PR_FALSE 0
  ------------------
  369|     68|                }
  370|       |                /* Start over again and keep going until we don't move either
  371|       |                 * start or end. */
  372|     60|                done = PR_FALSE;
  ------------------
  |  |  438|     60|#define PR_FALSE 0
  ------------------
  373|     60|                break;
  374|    128|            }
  375|    189|        }
  376|  10.1k|    }
  377|  10.0k|    PORT_Assert(start < end);
  ------------------
  |  |  120|  10.0k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  10.0k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 10.0k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  378|       |
  379|  10.0k|    *startOut = start;
  380|  10.0k|    *endOut = end;
  381|  10.0k|    return PR_TRUE;
  ------------------
  |  |  437|  10.0k|#define PR_TRUE 1
  ------------------
  382|  10.1k|}
dtls13_SetupAcks:
  386|  18.5k|{
  387|  18.5k|    if (ss->version < SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|  18.5k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (387:9): [True: 15.8k, False: 2.70k]
  ------------------
  388|  15.8k|        return SECSuccess;
  389|  15.8k|    }
  390|       |
  391|  2.70k|    if (ss->ssl3.hs.endOfFlight) {
  ------------------
  |  Branch (391:9): [True: 0, False: 2.70k]
  ------------------
  392|      0|        dtls_CancelTimer(ss, ss->ssl3.hs.ackTimer);
  393|       |
  394|      0|        if (ss->ssl3.hs.ws == idle_handshake && ss->sec.isServer) {
  ------------------
  |  Branch (394:13): [True: 0, False: 0]
  |  Branch (394:49): [True: 0, False: 0]
  ------------------
  395|      0|            SSL_TRC(10, ("%d: SSL3[%d]: dtls_HandleHandshake, sending ACK",
  ------------------
  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    ssl_Trace b
  ------------------
  396|      0|                         SSL_GETPID(), ss->fd));
  397|      0|            return dtls13_SendAck(ss);
  398|      0|        }
  399|      0|        return SECSuccess;
  400|      0|    }
  401|       |
  402|       |    /* We need to send an ACK. */
  403|  2.70k|    if (!ss->ssl3.hs.ackTimer->cb) {
  ------------------
  |  Branch (403:9): [True: 1.74k, False: 959]
  ------------------
  404|       |        /* We're not armed, so arm. */
  405|  1.74k|        SSL_TRC(10, ("%d: SSL3[%d]: dtls_HandleHandshake, arming ack timer",
  ------------------
  |  |   71|  1.74k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 1.74k]
  |  |  ------------------
  |  |   72|  1.74k|    ssl_Trace b
  ------------------
  406|  1.74k|                     SSL_GETPID(), ss->fd));
  407|  1.74k|        return dtls_StartTimer(ss, ss->ssl3.hs.ackTimer,
  408|  1.74k|                               DTLS_RETRANSMIT_INITIAL_MS / 4,
  ------------------
  |  |  126|  1.74k|#define DTLS_RETRANSMIT_INITIAL_MS 50
  ------------------
  409|  1.74k|                               dtls13_SendAckCb);
  410|  1.74k|    }
  411|       |    /* The ack timer is already armed, so just return. */
  412|    959|    return SECSuccess;
  413|  2.70k|}
dtls13_maybeProcessKeyUpdateAck:
  500|    593|{
  501|       |    /*    RFC 9147. Section 8.
  502|       |    Due to the possibility of an ACK message for a KeyUpdate being lost
  503|       |    and thereby preventing the sender of KeyUpdate from updating its
  504|       |    keying material, receivers MUST retain the pre-update keying material
  505|       |    until receipt and successful decryption of a message using the new
  506|       |    keys.*/
  507|       |
  508|    593|    if (ss->ssl3.hs.isKeyUpdateInProgress && entrySeq == ss->ssl3.hs.dtlsHandhakeKeyUpdateMessage) {
  ------------------
  |  Branch (508:9): [True: 0, False: 593]
  |  Branch (508:46): [True: 0, False: 0]
  ------------------
  509|      0|        SSL_TRC(30, ("%d: DTLS13[%d]: %s key update is completed", SSL_GETPID(), ss->fd, SSL_ROLE(ss)));
  ------------------
  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    ssl_Trace b
  |  |  ------------------
  |  |  |  Branch (72:15): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  510|      0|        PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  511|       |
  512|      0|        SECStatus rv = SECSuccess;
  513|      0|        rv = tls13_UpdateTrafficKeys(ss, ssl_secret_write);
  514|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (514:13): [True: 0, False: 0]
  ------------------
  515|      0|            return SECFailure;
  516|      0|        }
  517|      0|        PORT_Assert(ss->ssl3.hs.isKeyUpdateInProgress);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  518|      0|        ss->ssl3.hs.isKeyUpdateInProgress = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  519|       |
  520|      0|        return rv;
  521|      0|    }
  522|       |
  523|    593|    else
  524|    593|        return SECSuccess;
  525|    593|}
dtls13_HandleAck:
  529|    673|{
  530|    673|    PRUint8 *b = databuf->buf;
  531|    673|    PRUint32 l = databuf->len;
  532|    673|    unsigned int length;
  533|    673|    SECStatus rv;
  534|       |
  535|    673|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|    673|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.00k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 339, False: 334]
  |  |  |  |  |  Branch (208:7): [True: 334, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  536|       |
  537|       |    /* Ensure we don't loop. */
  538|    673|    databuf->len = 0;
  539|       |
  540|    673|    PORT_Assert(IS_DTLS(ss));
  ------------------
  |  |  120|    673|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    673|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 673, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  541|    673|    if (!tls13_MaybeTls13(ss)) {
  ------------------
  |  Branch (541:9): [True: 0, False: 673]
  ------------------
  542|      0|        tls13_FatalError(ss, SSL_ERROR_RX_UNKNOWN_RECORD_TYPE, illegal_parameter);
  543|      0|        return SECFailure;
  544|      0|    }
  545|       |
  546|    673|    SSL_TRC(10, ("%d: SSL3[%d]: Handling ACK", SSL_GETPID(), ss->fd));
  ------------------
  |  |   71|    673|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 673]
  |  |  ------------------
  |  |   72|    673|    ssl_Trace b
  ------------------
  547|    673|    rv = ssl3_ConsumeHandshakeNumber(ss, &length, 2, &b, &l);
  548|    673|    if (rv != SECSuccess) {
  ------------------
  |  Branch (548:9): [True: 23, False: 650]
  ------------------
  549|     23|        goto loser;
  550|     23|    }
  551|    650|    if (length != l) {
  ------------------
  |  Branch (551:9): [True: 38, False: 612]
  ------------------
  552|     38|        goto loser;
  553|     38|    }
  554|       |
  555|  4.00k|    while (l > 0) {
  ------------------
  |  Branch (555:12): [True: 3.59k, False: 415]
  ------------------
  556|  3.59k|        PRUint64 seq;
  557|  3.59k|        PRUint64 epoch;
  558|  3.59k|        PRCList *cursor;
  559|       |
  560|  3.59k|        rv = ssl3_ConsumeHandshakeNumber64(ss, &epoch, 8, &b, &l);
  561|  3.59k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (561:13): [True: 10, False: 3.58k]
  ------------------
  562|     10|            goto loser;
  563|     10|        }
  564|       |
  565|  3.58k|        rv = ssl3_ConsumeHandshakeNumber64(ss, &seq, 8, &b, &l);
  566|  3.58k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (566:13): [True: 187, False: 3.39k]
  ------------------
  567|    187|            goto loser;
  568|    187|        }
  569|       |
  570|  3.39k|        if (epoch > RECORD_EPOCH_MAX) {
  ------------------
  |  |   16|  3.39k|#define RECORD_EPOCH_MAX UINT16_MAX
  ------------------
  |  Branch (570:13): [True: 2.16k, False: 1.23k]
  ------------------
  571|  2.16k|            SSL_TRC(50, ("%d: SSL3[%d]: ACK message was rejected: the epoch exceeds the limit", SSL_GETPID(), ss->fd));
  ------------------
  |  |   71|  2.16k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 2.16k]
  |  |  ------------------
  |  |   72|  2.16k|    ssl_Trace b
  ------------------
  572|  2.16k|            continue;
  573|  2.16k|        }
  574|  1.23k|        if (seq > RECORD_SEQ_MAX) {
  ------------------
  |  |  126|  1.23k|#define RECORD_SEQ_MAX RECORD_SEQ_MASK
  |  |  ------------------
  |  |  |  |  125|  1.23k|#define RECORD_SEQ_MASK ((1ULL << 48) - 1)
  |  |  ------------------
  ------------------
  |  Branch (574:13): [True: 292, False: 939]
  ------------------
  575|    292|            SSL_TRC(50, ("%d: SSL3[%d]: ACK message was rejected: the sequence number exceeds the limit", SSL_GETPID(), ss->fd));
  ------------------
  |  |   71|    292|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 292]
  |  |  ------------------
  |  |   72|    292|    ssl_Trace b
  ------------------
  576|    292|            continue;
  577|    292|        }
  578|       |
  579|    939|        seq = dtls_CombineSequenceNumber(epoch, seq);
  580|       |
  581|    939|        for (cursor = PR_LIST_HEAD(&ss->ssl3.hs.dtlsSentHandshake);
  ------------------
  |  |   65|    939|#define PR_LIST_HEAD(_l) (_l)->next
  ------------------
  582|  2.64k|             cursor != &ss->ssl3.hs.dtlsSentHandshake;
  ------------------
  |  Branch (582:14): [True: 1.70k, False: 939]
  ------------------
  583|  1.70k|             cursor = PR_NEXT_LINK(cursor)) {
  ------------------
  |  |   47|  1.70k|        ((_e)->next)
  ------------------
  584|  1.70k|            DTLSHandshakeRecordEntry *entry = (DTLSHandshakeRecordEntry *)cursor;
  585|       |
  586|  1.70k|            if (entry->record == seq) {
  ------------------
  |  Branch (586:17): [True: 593, False: 1.11k]
  ------------------
  587|    593|                SSL_TRC(30, (
  ------------------
  |  |   71|    593|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 593]
  |  |  ------------------
  |  |   72|    593|    ssl_Trace b
  ------------------
  588|    593|                                "%d: DTLS13[%d]: Marking record=%llx message %d offset %d length=%d as ACKed",
  589|    593|                                SSL_GETPID(), ss->fd,
  590|    593|                                entry->record, entry->messageSeq, entry->offset, entry->length));
  591|    593|                entry->acked = PR_TRUE;
  ------------------
  |  |  437|    593|#define PR_TRUE 1
  ------------------
  592|       |
  593|       |                /* When we sent a KeyUpdate message, we have recorded the identifier of the message.
  594|       |                During the HandleACK we check if we received an ack for the KeyUpdate message we sent.*/
  595|    593|                rv = dtls13_maybeProcessKeyUpdateAck(ss, entry->messageSeq);
  596|    593|                if (rv != SECSuccess) {
  ------------------
  |  Branch (596:21): [True: 0, False: 593]
  ------------------
  597|      0|                    return SECFailure;
  598|      0|                }
  599|    593|            }
  600|  1.70k|        }
  601|    939|    }
  602|       |    /* Try to flush. */
  603|    415|    rv = dtls_TransmitMessageFlight(ss);
  604|    415|    if (rv != SECSuccess) {
  ------------------
  |  Branch (604:9): [True: 0, False: 415]
  ------------------
  605|      0|        return SECFailure;
  606|      0|    }
  607|       |
  608|       |    /* Reset the retransmit timer. */
  609|    415|    if (ss->ssl3.hs.rtTimer->cb) {
  ------------------
  |  Branch (609:9): [True: 362, False: 53]
  ------------------
  610|    362|        (void)dtls_RestartTimer(ss, ss->ssl3.hs.rtTimer);
  611|    362|    }
  612|       |
  613|       |    /* If there are no more messages to send, cleanup. */
  614|    415|    if (PR_CLIST_IS_EMPTY(&ss->ssl3.hs.lastMessageFlight)) {
  ------------------
  |  |   94|    415|    ((_l)->next == (_l))
  |  |  ------------------
  |  |  |  Branch (94:5): [True: 93, False: 322]
  |  |  ------------------
  ------------------
  615|     93|        SSL_TRC(10, ("%d: SSL3[%d]: No more unacked handshake messages",
  ------------------
  |  |   71|     93|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 93]
  |  |  ------------------
  |  |   72|     93|    ssl_Trace b
  ------------------
  616|     93|                     SSL_GETPID(), ss->fd));
  617|       |
  618|     93|        dtls_CancelTimer(ss, ss->ssl3.hs.rtTimer);
  619|     93|        ssl_ClearPRCList(&ss->ssl3.hs.dtlsSentHandshake, NULL);
  620|       |        /* If the handshake is finished, and we're the client then
  621|       |         * also clean up the handshake read cipher spec. Any ACKs
  622|       |         * we receive will be with the application data cipher spec.
  623|       |         * The server needs to keep the handshake cipher spec around
  624|       |         * for the holddown period to process retransmitted Finisheds.
  625|       |         */
  626|     93|        if (!ss->sec.isServer && (ss->ssl3.hs.ws == idle_handshake)) {
  ------------------
  |  Branch (626:13): [True: 93, False: 0]
  |  Branch (626:34): [True: 0, False: 93]
  ------------------
  627|      0|            ssl_CipherSpecReleaseByEpoch(ss, ssl_secret_read,
  628|      0|                                         TrafficKeyHandshake);
  629|      0|        }
  630|     93|    }
  631|    415|    return SECSuccess;
  632|       |
  633|    258|loser:
  634|       |    /* Due to bug 1829391 we may incorrectly send an alert rather than
  635|       |     * ignore an invalid record here. */
  636|    258|    SSL_TRC(11, ("%d: SSL3[%d]: Error processing DTLS1.3 ACK.",
  ------------------
  |  |   71|    258|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 258]
  |  |  ------------------
  |  |   72|    258|    ssl_Trace b
  ------------------
  637|    258|                 SSL_GETPID(), ss->fd));
  638|    258|    PORT_SetError(SSL_ERROR_RX_MALFORMED_DTLS_ACK);
  ------------------
  |  |   65|    258|#define PORT_SetError PORT_SetError_Util
  ------------------
  639|    258|    return SECFailure;
  640|    415|}
dtls13_MaskSequenceNumber:
  671|   752k|{
  672|   752k|    PORT_Assert(IS_DTLS(ss));
  ------------------
  |  |  120|   752k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|   752k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 752k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  673|   752k|    if (spec->version < SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|   752k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (673:9): [True: 729k, False: 22.3k]
  ------------------
  674|   729k|        return SECSuccess;
  675|   729k|    }
  676|       |
  677|  22.3k|    if (spec->maskContext) {
  ------------------
  |  Branch (677:9): [True: 11.6k, False: 10.7k]
  ------------------
  678|       |#ifdef UNSAFE_FUZZER_MODE
  679|       |        /* Use a null mask. */
  680|       |        PRUint8 mask[2] = { 0 };
  681|       |#else
  682|       |        /* "This procedure requires the ciphertext length be at least 16 bytes.
  683|       |         * Receivers MUST reject shorter records as if they had failed
  684|       |         * deprotection, as described in Section 4.5.2." */
  685|  11.6k|        if (cipherTextLen < 16) {
  ------------------
  |  Branch (685:13): [True: 16, False: 11.6k]
  ------------------
  686|     16|            PORT_SetError(SSL_ERROR_BAD_MAC_READ);
  ------------------
  |  |   65|     16|#define PORT_SetError PORT_SetError_Util
  ------------------
  687|     16|            return SECFailure;
  688|     16|        }
  689|       |
  690|  11.6k|        PRUint8 mask[2];
  691|  11.6k|        SECStatus rv = ssl_CreateMaskInner(spec->maskContext, cipherText, cipherTextLen, mask, sizeof(mask));
  692|       |
  693|  11.6k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (693:13): [True: 0, False: 11.6k]
  ------------------
  694|      0|            PORT_SetError(SSL_ERROR_BAD_MAC_READ);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  695|      0|            return SECFailure;
  696|      0|        }
  697|  11.6k|#endif
  698|       |
  699|       |        /*
  700|       |        The encrypted sequence number is computed by XORing the leading bytes
  701|       |        of the mask with the on-the-wire representation of the sequence
  702|       |        number.  Decryption is accomplished by the same process.
  703|       |        */
  704|       |
  705|  11.6k|        PRUint32 maskSBitIsSet = 0x08;
  706|  11.6k|        hdr[1] ^= mask[0];
  707|  11.6k|        if (hdr[0] & maskSBitIsSet) {
  ------------------
  |  Branch (707:13): [True: 9.01k, False: 2.60k]
  ------------------
  708|  9.01k|            hdr[2] ^= mask[1];
  709|  9.01k|        }
  710|  11.6k|    }
  711|  22.3k|    return SECSuccess;
  712|  22.3k|}
tls13_SequenceNumberEncryptionMechanism:
  716|  1.60k|{
  717|       |    /*
  718|       |    When the AEAD is based on AES, then the mask is generated by
  719|       |        computing AES-ECB on the first 16 bytes of the ciphertext:
  720|       |
  721|       |    When the AEAD is based on ChaCha20, then the mask is generated by
  722|       |    treating the first 4 bytes of the ciphertext as the block counter and
  723|       |    the next 12 bytes as the nonce, passing them to the ChaCha20 block
  724|       |    function.
  725|       |    */
  726|       |
  727|  1.60k|    switch (bulkAlgorithm) {
  728|  1.38k|        case ssl_calg_aes_gcm:
  ------------------
  |  Branch (728:9): [True: 1.38k, False: 220]
  ------------------
  729|  1.38k|            return CKM_AES_ECB;
  ------------------
  |  | 1107|  1.38k|#define CKM_AES_ECB 0x00001081UL
  ------------------
  730|    220|        case ssl_calg_chacha20:
  ------------------
  |  Branch (730:9): [True: 220, False: 1.38k]
  ------------------
  731|    220|            return CKM_NSS_CHACHA20_CTR;
  ------------------
  |  |  251|    220|#define CKM_NSS_CHACHA20_CTR (CKM_NSS + 33)
  |  |  ------------------
  |  |  |  |  162|    220|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|    220|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|    220|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  732|      0|        default:
  ------------------
  |  Branch (732:9): [True: 0, False: 1.60k]
  ------------------
  733|      0|            PORT_Assert(PR_FALSE);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  734|  1.60k|    }
  735|      0|    return CKM_INVALID_MECHANISM;
  ------------------
  |  |  155|      0|#define CKM_INVALID_MECHANISM 0xffffffffUL
  ------------------
  736|  1.60k|}
dtls13con.c:dtls_CombineSequenceNumber:
  115|  15.8k|{
  116|  15.8k|    PORT_Assert(seqNum <= RECORD_SEQ_MAX);
  ------------------
  |  |  120|  15.8k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  15.8k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 15.8k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  117|  15.8k|    return ((sslSequenceNumber)epoch << LENGTH_SEQ_NUMBER) | seqNum;
  ------------------
  |  |  110|  15.8k|#define LENGTH_SEQ_NUMBER 48
  ------------------
  118|  15.8k|}
dtls13con.c:dtls_MoveUnackedStartForward:
  282|    189|{
  283|       |    /* This entry starts too late. */
  284|    189|    if (*start < entry->offset) {
  ------------------
  |  Branch (284:9): [True: 57, False: 132]
  ------------------
  285|     57|        return PR_FALSE;
  ------------------
  |  |  438|     57|#define PR_FALSE 0
  ------------------
  286|     57|    }
  287|       |    /* This entry ends too early. */
  288|    132|    if (*start >= entry->offset + entry->length) {
  ------------------
  |  Branch (288:9): [True: 32, False: 100]
  ------------------
  289|     32|        return PR_FALSE;
  ------------------
  |  |  438|     32|#define PR_FALSE 0
  ------------------
  290|     32|    }
  291|    100|    *start = entry->offset + entry->length;
  292|    100|    return PR_TRUE;
  ------------------
  |  |  437|    100|#define PR_TRUE 1
  ------------------
  293|    132|}
dtls13con.c:dtls_MoveUnackedEndBackward:
  300|     89|{
  301|       |    /* This entry ends too early. */
  302|     89|    if (*end > entry->offset + entry->length) {
  ------------------
  |  Branch (302:9): [True: 32, False: 57]
  ------------------
  303|     32|        return PR_FALSE;
  ------------------
  |  |  438|     32|#define PR_FALSE 0
  ------------------
  304|     32|    }
  305|       |    /* This entry starts too late. */
  306|     57|    if (*end <= entry->offset) {
  ------------------
  |  Branch (306:9): [True: 29, False: 28]
  ------------------
  307|     29|        return PR_FALSE;
  ------------------
  |  |  438|     29|#define PR_FALSE 0
  ------------------
  308|     29|    }
  309|     28|    *end = entry->offset;
  310|     28|    return PR_TRUE;
  ------------------
  |  |  437|     28|#define PR_TRUE 1
  ------------------
  311|     57|}

dtls_TLSVersionToDTLSVersion:
   60|  57.0k|{
   61|  57.0k|    if (tlsv == SSL_LIBRARY_VERSION_TLS_1_1) {
  ------------------
  |  |   19|  57.0k|#define SSL_LIBRARY_VERSION_TLS_1_1             0x0302
  ------------------
  |  Branch (61:9): [True: 8.21k, False: 48.8k]
  ------------------
   62|  8.21k|        return SSL_LIBRARY_VERSION_DTLS_1_0_WIRE;
  ------------------
  |  |   32|  8.21k|#define SSL_LIBRARY_VERSION_DTLS_1_0_WIRE       ((~0x0100) & 0xffff)
  ------------------
   63|  8.21k|    }
   64|  48.8k|    if (tlsv == SSL_LIBRARY_VERSION_TLS_1_2) {
  ------------------
  |  |   20|  48.8k|#define SSL_LIBRARY_VERSION_TLS_1_2             0x0303
  ------------------
  |  Branch (64:9): [True: 36.4k, False: 12.4k]
  ------------------
   65|  36.4k|        return SSL_LIBRARY_VERSION_DTLS_1_2_WIRE;
  ------------------
  |  |   33|  36.4k|#define SSL_LIBRARY_VERSION_DTLS_1_2_WIRE       ((~0x0102) & 0xffff)
  ------------------
   66|  36.4k|    }
   67|  12.4k|    if (tlsv == SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|  12.4k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (67:9): [True: 12.4k, False: 0]
  ------------------
   68|  12.4k|        return SSL_LIBRARY_VERSION_DTLS_1_3_WIRE;
  ------------------
  |  |   34|  12.4k|#define SSL_LIBRARY_VERSION_DTLS_1_3_WIRE       ((~0x0103) & 0xffff)
  ------------------
   69|  12.4k|    }
   70|       |
   71|       |    /* Anything else is an error, so return
   72|       |     * the invalid version 0xffff. */
   73|      0|    return 0xffff;
   74|  12.4k|}
dtls_DTLSVersionToTLSVersion:
   82|  10.3k|{
   83|  10.3k|    if (MSB(dtlsv) == 0xff) {
  ------------------
  |  |   94|  10.3k|#define MSB(x) ((unsigned char)(((unsigned)(x)) >> 8))
  ------------------
  |  Branch (83:9): [True: 2, False: 10.3k]
  ------------------
   84|      2|        return 0;
   85|      2|    }
   86|       |
   87|  10.3k|    if (dtlsv == SSL_LIBRARY_VERSION_DTLS_1_0_WIRE) {
  ------------------
  |  |   32|  10.3k|#define SSL_LIBRARY_VERSION_DTLS_1_0_WIRE       ((~0x0100) & 0xffff)
  ------------------
  |  Branch (87:9): [True: 382, False: 9.95k]
  ------------------
   88|    382|        return SSL_LIBRARY_VERSION_TLS_1_1;
  ------------------
  |  |   19|    382|#define SSL_LIBRARY_VERSION_TLS_1_1             0x0302
  ------------------
   89|    382|    }
   90|       |    /* Handle the skipped version of DTLS 1.1 by returning
   91|       |     * an error. */
   92|  9.95k|    if (dtlsv == ((~0x0101) & 0xffff)) {
  ------------------
  |  Branch (92:9): [True: 2, False: 9.95k]
  ------------------
   93|      2|        return 0;
   94|      2|    }
   95|  9.95k|    if (dtlsv == SSL_LIBRARY_VERSION_DTLS_1_2_WIRE) {
  ------------------
  |  |   33|  9.95k|#define SSL_LIBRARY_VERSION_DTLS_1_2_WIRE       ((~0x0102) & 0xffff)
  ------------------
  |  Branch (95:9): [True: 9.92k, False: 31]
  ------------------
   96|  9.92k|        return SSL_LIBRARY_VERSION_TLS_1_2;
  ------------------
  |  |   20|  9.92k|#define SSL_LIBRARY_VERSION_TLS_1_2             0x0303
  ------------------
   97|  9.92k|    }
   98|     31|    if (dtlsv == SSL_LIBRARY_VERSION_DTLS_1_3_WIRE) {
  ------------------
  |  |   34|     31|#define SSL_LIBRARY_VERSION_DTLS_1_3_WIRE       ((~0x0103) & 0xffff)
  ------------------
  |  Branch (98:9): [True: 2, False: 29]
  ------------------
   99|      2|        return SSL_LIBRARY_VERSION_TLS_1_3;
  ------------------
  |  |   21|      2|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  100|      2|    }
  101|       |
  102|       |    /* Return a fictional higher version than we know of */
  103|     29|    return SSL_LIBRARY_VERSION_MAX_SUPPORTED + 1;
  ------------------
  |  | 1497|     29|#define SSL_LIBRARY_VERSION_MAX_SUPPORTED SSL_LIBRARY_VERSION_TLS_1_3
  |  |  ------------------
  |  |  |  |   21|     29|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  |  |  ------------------
  ------------------
  104|     31|}
ssl3_DisableNonDTLSSuites:
  109|  11.0k|{
  110|  11.0k|    const ssl3CipherSuite *suite;
  111|       |
  112|  88.0k|    for (suite = nonDTLSSuites; *suite; ++suite) {
  ------------------
  |  Branch (112:33): [True: 77.0k, False: 11.0k]
  ------------------
  113|  77.0k|        PORT_CheckSuccess(ssl3_CipherPrefSet(ss, *suite, PR_FALSE));
  ------------------
  |  |  144|  77.0k|#define PORT_CheckSuccess(f) PR_ASSERT((f) == SECSuccess)
  |  |  ------------------
  |  |  |  |  208|  77.0k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 77.0k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  114|  77.0k|    }
  115|  11.0k|    return SECSuccess;
  116|  11.0k|}
dtls_FreeHandshakeMessage:
  156|  15.8k|{
  157|  15.8k|    if (!msg)
  ------------------
  |  Branch (157:9): [True: 0, False: 15.8k]
  ------------------
  158|      0|        return;
  159|       |
  160|       |    /* Safe if we are < 1.3, since the refct is
  161|       |     * already very high. */
  162|  15.8k|    ssl_CipherSpecRelease(msg->cwSpec);
  163|  15.8k|    PORT_ZFree(msg->data, msg->len);
  ------------------
  |  |   75|  15.8k|#define PORT_ZFree PORT_ZFree_Util
  ------------------
  164|  15.8k|    PORT_Free(msg);
  ------------------
  |  |   60|  15.8k|#define PORT_Free PORT_Free_Util
  ------------------
  165|  15.8k|}
dtls_FreeHandshakeMessages:
  176|  18.1k|{
  177|  18.1k|    PRCList *cur_p;
  178|       |
  179|  34.0k|    while (!PR_CLIST_IS_EMPTY(list)) {
  ------------------
  |  |   94|  34.0k|    ((_l)->next == (_l))
  ------------------
  |  Branch (179:12): [True: 15.8k, False: 18.1k]
  ------------------
  180|  15.8k|        cur_p = PR_LIST_TAIL(list);
  ------------------
  |  |   66|  15.8k|#define PR_LIST_TAIL(_l) (_l)->prev
  ------------------
  181|  15.8k|        PR_REMOVE_LINK(cur_p);
  ------------------
  |  |   72|  15.8k|    PR_BEGIN_MACRO             \
  |  |  ------------------
  |  |  |  |  123|  15.8k|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |   73|  15.8k|    (_e)->prev->next = (_e)->next; \
  |  |   74|  15.8k|    (_e)->next->prev = (_e)->prev; \
  |  |   75|  15.8k|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|  15.8k|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  182|  15.8k|        dtls_FreeHandshakeMessage((DTLSQueuedMessage *)cur_p);
  183|  15.8k|    }
  184|  18.1k|}
dtls_HandleHandshake:
  272|  23.3k|{
  273|  23.3k|    sslBuffer buf = *origBuf;
  274|  23.3k|    SECStatus rv = SECSuccess;
  275|  23.3k|    PRBool discarded = PR_FALSE;
  ------------------
  |  |  438|  23.3k|#define PR_FALSE 0
  ------------------
  276|       |
  277|  23.3k|    ss->ssl3.hs.endOfFlight = PR_FALSE;
  ------------------
  |  |  438|  23.3k|#define PR_FALSE 0
  ------------------
  278|       |
  279|  23.3k|    PORT_Assert(ss->opt.noLocks || ssl_HaveRecvBufLock(ss));
  ------------------
  |  |  120|  23.3k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  35.0k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 11.6k, False: 11.6k]
  |  |  |  |  |  Branch (208:7): [True: 11.6k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  280|  23.3k|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|  23.3k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  35.0k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 11.6k, False: 11.6k]
  |  |  |  |  |  Branch (208:7): [True: 11.6k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  281|       |
  282|  40.0k|    while (buf.len > 0) {
  ------------------
  |  Branch (282:12): [True: 21.5k, False: 18.5k]
  ------------------
  283|  21.5k|        PRUint8 type;
  284|  21.5k|        PRUint32 message_length;
  285|  21.5k|        PRUint16 message_seq;
  286|  21.5k|        PRUint32 fragment_offset;
  287|  21.5k|        PRUint32 fragment_length;
  288|  21.5k|        PRUint32 offset;
  289|       |
  290|  21.5k|        if (buf.len < 12) {
  ------------------
  |  Branch (290:13): [True: 49, False: 21.4k]
  ------------------
  291|     49|            PORT_SetError(SSL_ERROR_RX_MALFORMED_HANDSHAKE);
  ------------------
  |  |   65|     49|#define PORT_SetError PORT_SetError_Util
  ------------------
  292|     49|            rv = SECFailure;
  293|     49|            goto loser;
  294|     49|        }
  295|       |
  296|       |        /* Parse the header */
  297|  21.4k|        type = buf.buf[0];
  298|  21.4k|        message_length = (buf.buf[1] << 16) | (buf.buf[2] << 8) | buf.buf[3];
  299|  21.4k|        message_seq = (buf.buf[4] << 8) | buf.buf[5];
  300|  21.4k|        fragment_offset = (buf.buf[6] << 16) | (buf.buf[7] << 8) | buf.buf[8];
  301|  21.4k|        fragment_length = (buf.buf[9] << 16) | (buf.buf[10] << 8) | buf.buf[11];
  302|       |
  303|  21.4k|#define MAX_HANDSHAKE_MSG_LEN 0x1ffff /* 128k - 1 */
  304|  21.4k|        if (message_length > MAX_HANDSHAKE_MSG_LEN) {
  ------------------
  |  |  303|  21.4k|#define MAX_HANDSHAKE_MSG_LEN 0x1ffff /* 128k - 1 */
  ------------------
  |  Branch (304:13): [True: 19, False: 21.4k]
  ------------------
  305|     19|            (void)ssl3_DecodeError(ss);
  306|     19|            PORT_SetError(SSL_ERROR_RX_MALFORMED_HANDSHAKE);
  ------------------
  |  |   65|     19|#define PORT_SetError PORT_SetError_Util
  ------------------
  307|     19|            rv = SECFailure;
  308|     19|            goto loser;
  309|     19|        }
  310|  21.4k|#undef MAX_HANDSHAKE_MSG_LEN
  311|       |
  312|  21.4k|        buf.buf += 12;
  313|  21.4k|        buf.len -= 12;
  314|       |
  315|       |        /* This fragment must be complete */
  316|  21.4k|        if (buf.len < fragment_length) {
  ------------------
  |  Branch (316:13): [True: 23, False: 21.4k]
  ------------------
  317|     23|            PORT_SetError(SSL_ERROR_RX_MALFORMED_HANDSHAKE);
  ------------------
  |  |   65|     23|#define PORT_SetError PORT_SetError_Util
  ------------------
  318|     23|            rv = SECFailure;
  319|     23|            goto loser;
  320|     23|        }
  321|       |
  322|       |        /* Sanity check the packet contents */
  323|  21.4k|        if ((fragment_length + fragment_offset) > message_length) {
  ------------------
  |  Branch (323:13): [True: 37, False: 21.4k]
  ------------------
  324|     37|            PORT_SetError(SSL_ERROR_RX_MALFORMED_HANDSHAKE);
  ------------------
  |  |   65|     37|#define PORT_SetError PORT_SetError_Util
  ------------------
  325|     37|            rv = SECFailure;
  326|     37|            goto loser;
  327|     37|        }
  328|       |
  329|       |        /* If we're a server and we receive what appears to be a retried
  330|       |         * ClientHello, and we are expecting a ClientHello, move the receive
  331|       |         * sequence number forward.  This allows for a retried ClientHello if we
  332|       |         * send a stateless HelloRetryRequest. */
  333|  21.4k|        if (message_seq > ss->ssl3.hs.recvMessageSeq &&
  ------------------
  |  Branch (333:13): [True: 337, False: 21.0k]
  ------------------
  334|  21.4k|            message_seq == 1 &&
  ------------------
  |  Branch (334:13): [True: 110, False: 227]
  ------------------
  335|  21.4k|            fragment_offset == 0 &&
  ------------------
  |  Branch (335:13): [True: 59, False: 51]
  ------------------
  336|  21.4k|            ss->ssl3.hs.ws == wait_client_hello &&
  ------------------
  |  Branch (336:13): [True: 0, False: 59]
  ------------------
  337|  21.4k|            (SSLHandshakeType)type == ssl_hs_client_hello) {
  ------------------
  |  Branch (337:13): [True: 0, False: 0]
  ------------------
  338|      0|            SSL_TRC(5, ("%d: DTLS[%d]: Received apparent 2nd ClientHello",
  ------------------
  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    ssl_Trace b
  ------------------
  339|      0|                        SSL_GETPID(), ss->fd));
  340|      0|            ss->ssl3.hs.recvMessageSeq = 1;
  341|      0|            ss->ssl3.hs.helloRetry = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  342|      0|        }
  343|       |
  344|       |        /* There are three ways we could not be ready for this packet.
  345|       |         *
  346|       |         * 1. It's a partial next message.
  347|       |         * 2. It's a partial or complete message beyond the next
  348|       |         * 3. It's a message we've already seen
  349|       |         *
  350|       |         * If it's the complete next message we accept it right away.
  351|       |         * This is the common case for short messages
  352|       |         */
  353|  21.4k|        if ((message_seq == ss->ssl3.hs.recvMessageSeq) &&
  ------------------
  |  Branch (353:13): [True: 20.8k, False: 571]
  ------------------
  354|  21.4k|            (fragment_offset == 0) &&
  ------------------
  |  Branch (354:13): [True: 19.3k, False: 1.45k]
  ------------------
  355|  21.4k|            (fragment_length == message_length)) {
  ------------------
  |  Branch (355:13): [True: 18.2k, False: 1.08k]
  ------------------
  356|       |            /* Complete next message. Process immediately */
  357|  18.2k|            ss->ssl3.hs.msg_type = (SSLHandshakeType)type;
  358|  18.2k|            ss->ssl3.hs.msg_len = message_length;
  359|       |
  360|  18.2k|            rv = dtls_HandleHandshakeMessage(ss, buf.buf,
  361|  18.2k|                                             buf.len == fragment_length);
  362|  18.2k|            if (rv != SECSuccess) {
  ------------------
  |  Branch (362:17): [True: 4.42k, False: 13.8k]
  ------------------
  363|  4.42k|                goto loser;
  364|  4.42k|            }
  365|  18.2k|        } else {
  366|  3.11k|            if (message_seq < ss->ssl3.hs.recvMessageSeq) {
  ------------------
  |  Branch (366:17): [True: 234, False: 2.88k]
  ------------------
  367|       |                /* Case 3: we do an immediate retransmit if we're
  368|       |                 * in a waiting state. */
  369|    234|                rv = dtls_RetransmitDetected(ss);
  370|    234|                goto loser;
  371|  2.88k|            } else if (message_seq > ss->ssl3.hs.recvMessageSeq) {
  ------------------
  |  Branch (371:24): [True: 337, False: 2.54k]
  ------------------
  372|       |                /* Case 2
  373|       |                 *
  374|       |                 * Ignore this message. This means we don't handle out of
  375|       |                 * order complete messages that well, but we're still
  376|       |                 * compliant and this probably does not happen often
  377|       |                 *
  378|       |                 * XXX OK for now. Maybe do something smarter at some point?
  379|       |                 */
  380|    337|                SSL_TRC(10, ("%d: SSL3[%d]: dtls_HandleHandshake, discarding handshake message",
  ------------------
  |  |   71|    337|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 337]
  |  |  ------------------
  |  |   72|    337|    ssl_Trace b
  ------------------
  381|    337|                             SSL_GETPID(), ss->fd));
  382|    337|                discarded = PR_TRUE;
  ------------------
  |  |  437|    337|#define PR_TRUE 1
  ------------------
  383|  2.54k|            } else {
  384|  2.54k|                PRInt32 end = fragment_offset + fragment_length;
  385|       |
  386|       |                /* Case 1
  387|       |                 *
  388|       |                 * Buffer the fragment for reassembly
  389|       |                 */
  390|       |                /* Make room for the message */
  391|  2.54k|                if (ss->ssl3.hs.recvdHighWater == -1) {
  ------------------
  |  Branch (391:21): [True: 1.08k, False: 1.46k]
  ------------------
  392|  1.08k|                    PRUint32 map_length = OFFSET_BYTE(message_length) + 1;
  ------------------
  |  |  266|  1.08k|#define OFFSET_BYTE(o) (o / 8)
  ------------------
  393|       |
  394|  1.08k|                    rv = sslBuffer_Grow(&ss->ssl3.hs.msg_body, message_length);
  395|  1.08k|                    if (rv != SECSuccess)
  ------------------
  |  Branch (395:25): [True: 0, False: 1.08k]
  ------------------
  396|      0|                        goto loser;
  397|       |                    /* Make room for the fragment map */
  398|  1.08k|                    rv = sslBuffer_Grow(&ss->ssl3.hs.recvdFragments,
  399|  1.08k|                                        map_length);
  400|  1.08k|                    if (rv != SECSuccess)
  ------------------
  |  Branch (400:25): [True: 0, False: 1.08k]
  ------------------
  401|      0|                        goto loser;
  402|       |
  403|       |                    /* Reset the reassembly map */
  404|  1.08k|                    ss->ssl3.hs.recvdHighWater = 0;
  405|  1.08k|                    PORT_Memset(ss->ssl3.hs.recvdFragments.buf, 0,
  ------------------
  |  |  182|  1.08k|#define PORT_Memset memset
  ------------------
  406|  1.08k|                                ss->ssl3.hs.recvdFragments.space);
  407|  1.08k|                    ss->ssl3.hs.msg_type = (SSLHandshakeType)type;
  408|  1.08k|                    ss->ssl3.hs.msg_len = message_length;
  409|  1.08k|                }
  410|       |
  411|       |                /* If we have a message length mismatch, abandon the reassembly
  412|       |                 * in progress and hope that the next retransmit will give us
  413|       |                 * something sane
  414|       |                 */
  415|  2.54k|                if (message_length != ss->ssl3.hs.msg_len) {
  ------------------
  |  Branch (415:21): [True: 29, False: 2.51k]
  ------------------
  416|     29|                    ss->ssl3.hs.recvdHighWater = -1;
  417|     29|                    PORT_SetError(SSL_ERROR_RX_MALFORMED_HANDSHAKE);
  ------------------
  |  |   65|     29|#define PORT_SetError PORT_SetError_Util
  ------------------
  418|     29|                    rv = SECFailure;
  419|     29|                    goto loser;
  420|     29|                }
  421|       |
  422|       |                /* Now copy this fragment into the buffer. */
  423|  2.51k|                if (end > ss->ssl3.hs.recvdHighWater) {
  ------------------
  |  Branch (423:21): [True: 2.26k, False: 255]
  ------------------
  424|  2.26k|                    PORT_Memcpy(ss->ssl3.hs.msg_body.buf + fragment_offset,
  ------------------
  |  |  180|  2.26k|#define PORT_Memcpy memcpy
  ------------------
  425|  2.26k|                                buf.buf, fragment_length);
  426|  2.26k|                }
  427|       |
  428|       |                /* This logic is a bit tricky. We have two values for
  429|       |                 * reassembly state:
  430|       |                 *
  431|       |                 * - recvdHighWater contains the highest contiguous number of
  432|       |                 *   bytes received
  433|       |                 * - recvdFragments contains a bitmask of packets received
  434|       |                 *   above recvdHighWater
  435|       |                 *
  436|       |                 * This avoids having to fill in the bitmask in the common
  437|       |                 * case of adjacent fragments received in sequence
  438|       |                 */
  439|  2.51k|                if (fragment_offset <= (unsigned int)ss->ssl3.hs.recvdHighWater) {
  ------------------
  |  Branch (439:21): [True: 1.77k, False: 744]
  ------------------
  440|       |                    /* Either this is the adjacent fragment or an overlapping
  441|       |                     * fragment */
  442|  1.77k|                    if (end > ss->ssl3.hs.recvdHighWater) {
  ------------------
  |  Branch (442:25): [True: 1.51k, False: 255]
  ------------------
  443|  1.51k|                        ss->ssl3.hs.recvdHighWater = end;
  444|  1.51k|                    }
  445|  1.77k|                } else {
  446|  79.0k|                    for (offset = fragment_offset; offset < end; offset++) {
  ------------------
  |  Branch (446:52): [True: 78.3k, False: 744]
  ------------------
  447|  78.3k|                        ss->ssl3.hs.recvdFragments.buf[OFFSET_BYTE(offset)] |=
  ------------------
  |  |  266|  78.3k|#define OFFSET_BYTE(o) (o / 8)
  ------------------
  448|  78.3k|                            OFFSET_MASK(offset);
  ------------------
  |  |  267|  78.3k|#define OFFSET_MASK(o) (1 << (o % 8))
  ------------------
  449|  78.3k|                    }
  450|    744|                }
  451|       |
  452|       |                /* Now figure out the new high water mark if appropriate */
  453|  2.51k|                for (offset = ss->ssl3.hs.recvdHighWater;
  454|  78.0k|                     offset < ss->ssl3.hs.msg_len; offset++) {
  ------------------
  |  Branch (454:22): [True: 77.1k, False: 858]
  ------------------
  455|       |                    /* Note that this loop is not efficient, since it counts
  456|       |                     * bit by bit. If we have a lot of out-of-order packets,
  457|       |                     * we should optimize this */
  458|  77.1k|                    if (ss->ssl3.hs.recvdFragments.buf[OFFSET_BYTE(offset)] &
  ------------------
  |  |  266|  77.1k|#define OFFSET_BYTE(o) (o / 8)
  ------------------
  |  Branch (458:25): [True: 75.5k, False: 1.65k]
  ------------------
  459|  77.1k|                        OFFSET_MASK(offset)) {
  ------------------
  |  |  267|  77.1k|#define OFFSET_MASK(o) (1 << (o % 8))
  ------------------
  460|  75.5k|                        ss->ssl3.hs.recvdHighWater++;
  461|  75.5k|                    } else {
  462|  1.65k|                        break;
  463|  1.65k|                    }
  464|  77.1k|                }
  465|       |
  466|       |                /* If we have all the bytes, then we are good to go */
  467|  2.51k|                if (ss->ssl3.hs.recvdHighWater == ss->ssl3.hs.msg_len) {
  ------------------
  |  Branch (467:21): [True: 858, False: 1.65k]
  ------------------
  468|    858|                    rv = dtls_HandleHandshakeMessage(ss, ss->ssl3.hs.msg_body.buf,
  469|    858|                                                     buf.len == fragment_length);
  470|       |
  471|    858|                    if (rv != SECSuccess) {
  ------------------
  |  Branch (471:25): [True: 43, False: 815]
  ------------------
  472|     43|                        goto loser;
  473|     43|                    }
  474|    858|                }
  475|  2.51k|            }
  476|  3.11k|        }
  477|       |
  478|  16.6k|        buf.buf += fragment_length;
  479|  16.6k|        buf.len -= fragment_length;
  480|  16.6k|    }
  481|       |
  482|       |    // This should never happen, but belt and suspenders.
  483|  18.5k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (483:9): [True: 0, False: 18.5k]
  ------------------
  484|      0|        PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  485|      0|        goto loser;
  486|      0|    }
  487|       |
  488|       |    /* If we processed all the fragments in this message, then mark it as remembered.
  489|       |     * TODO(ekr@rtfm.com): Store out of order messages for DTLS 1.3 so ACKs work
  490|       |     * better. Bug 1392620.*/
  491|  18.5k|    if (!discarded && tls13_MaybeTls13(ss)) {
  ------------------
  |  Branch (491:9): [True: 18.3k, False: 157]
  |  Branch (491:23): [True: 4.81k, False: 13.5k]
  ------------------
  492|  4.81k|        rv = dtls13_RememberFragment(ss, &ss->ssl3.hs.dtlsRcvdHandshake,
  493|  4.81k|                                     0, 0, 0, epoch, seqNum);
  494|  4.81k|    }
  495|  18.5k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (495:9): [True: 0, False: 18.5k]
  ------------------
  496|      0|        goto loser;
  497|      0|    }
  498|  18.5k|    rv = dtls13_SetupAcks(ss);
  499|       |
  500|  23.3k|loser:
  501|  23.3k|    origBuf->len = 0; /* So ssl3_GatherAppDataRecord will keep looping. */
  502|  23.3k|    return rv;
  503|  18.5k|}
dtls_QueueMessage:
  514|  15.8k|{
  515|  15.8k|    SECStatus rv = SECSuccess;
  516|  15.8k|    DTLSQueuedMessage *msg = NULL;
  517|  15.8k|    ssl3CipherSpec *spec;
  518|       |
  519|  15.8k|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|  15.8k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  23.6k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 8.08k, False: 7.80k]
  |  |  |  |  |  Branch (208:7): [True: 7.80k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  520|  15.8k|    PORT_Assert(ss->opt.noLocks || ssl_HaveXmitBufLock(ss));
  ------------------
  |  |  120|  15.8k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  23.6k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 8.08k, False: 7.80k]
  |  |  |  |  |  Branch (208:7): [True: 7.80k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  521|       |
  522|  15.8k|    spec = ss->ssl3.cwSpec;
  523|  15.8k|    msg = dtls_AllocQueuedMessage(spec, ct, pIn, nIn);
  524|       |
  525|  15.8k|    if (!msg) {
  ------------------
  |  Branch (525:9): [True: 0, False: 15.8k]
  ------------------
  526|      0|        PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  527|      0|        rv = SECFailure;
  528|  15.8k|    } else {
  529|  15.8k|        PR_APPEND_LINK(&msg->link, &ss->ssl3.hs.lastMessageFlight);
  ------------------
  |  |   57|  15.8k|#define PR_APPEND_LINK(_e,_l) PR_INSERT_BEFORE(_e,_l)
  |  |  ------------------
  |  |  |  |   25|  15.8k|    PR_BEGIN_MACRO       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  123|  15.8k|#define PR_BEGIN_MACRO  do {
  |  |  |  |  ------------------
  |  |  |  |   26|  15.8k|    (_e)->next = (_l);   \
  |  |  |  |   27|  15.8k|    (_e)->prev = (_l)->prev; \
  |  |  |  |   28|  15.8k|    (_l)->prev->next = (_e); \
  |  |  |  |   29|  15.8k|    (_l)->prev = (_e);   \
  |  |  |  |   30|  15.8k|    PR_END_MACRO
  |  |  |  |  ------------------
  |  |  |  |  |  |  124|  15.8k|#define PR_END_MACRO    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  530|  15.8k|    }
  531|       |
  532|  15.8k|    return rv;
  533|  15.8k|}
dtls_StageHandshakeMessage:
  545|  34.7k|{
  546|  34.7k|    SECStatus rv = SECSuccess;
  547|       |
  548|  34.7k|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|  34.7k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  51.7k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 17.7k, False: 17.0k]
  |  |  |  |  |  Branch (208:7): [True: 17.0k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  549|  34.7k|    PORT_Assert(ss->opt.noLocks || ssl_HaveXmitBufLock(ss));
  ------------------
  |  |  120|  34.7k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  51.7k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 17.7k, False: 17.0k]
  |  |  |  |  |  Branch (208:7): [True: 17.0k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  550|       |
  551|       |    /* This function is sometimes called when no data is actually to
  552|       |     * be staged, so just return SECSuccess. */
  553|  34.7k|    if (!ss->sec.ci.sendBuf.buf || !ss->sec.ci.sendBuf.len)
  ------------------
  |  Branch (553:9): [True: 9.36k, False: 25.4k]
  |  Branch (553:36): [True: 11.1k, False: 14.2k]
  ------------------
  554|  20.5k|        return rv;
  555|       |
  556|  14.2k|    rv = dtls_QueueMessage(ss, ssl_ct_handshake,
  557|  14.2k|                           ss->sec.ci.sendBuf.buf, ss->sec.ci.sendBuf.len);
  558|       |
  559|       |    /* Whether we succeeded or failed, toss the old handshake data. */
  560|  14.2k|    ss->sec.ci.sendBuf.len = 0;
  561|  14.2k|    return rv;
  562|  34.7k|}
dtls_FlushHandshakeMessages:
  572|  20.5k|{
  573|  20.5k|    SECStatus rv = SECSuccess;
  574|       |
  575|  20.5k|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|  20.5k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  30.5k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 10.5k, False: 9.99k]
  |  |  |  |  |  Branch (208:7): [True: 9.99k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  576|  20.5k|    PORT_Assert(ss->opt.noLocks || ssl_HaveXmitBufLock(ss));
  ------------------
  |  |  120|  20.5k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  30.5k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 10.5k, False: 9.99k]
  |  |  |  |  |  Branch (208:7): [True: 9.99k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  577|       |
  578|  20.5k|    rv = dtls_StageHandshakeMessage(ss);
  579|  20.5k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (579:9): [True: 0, False: 20.5k]
  ------------------
  580|      0|        return rv;
  581|      0|    }
  582|       |
  583|  20.5k|    if (!(flags & ssl_SEND_FLAG_FORCE_INTO_BUFFER)) {
  ------------------
  |  |  223|  20.5k|#define ssl_SEND_FLAG_FORCE_INTO_BUFFER 0x40000000
  ------------------
  |  Branch (583:9): [True: 12.6k, False: 7.87k]
  ------------------
  584|  12.6k|        rv = dtls_TransmitMessageFlight(ss);
  585|  12.6k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (585:13): [True: 0, False: 12.6k]
  ------------------
  586|      0|            return rv;
  587|      0|        }
  588|       |
  589|  12.6k|        if (!(flags & ssl_SEND_FLAG_NO_RETRANSMIT)) {
  ------------------
  |  |  225|  12.6k|#define ssl_SEND_FLAG_NO_RETRANSMIT 0x08000000 /* DTLS only */
  ------------------
  |  Branch (589:13): [True: 12.6k, False: 0]
  ------------------
  590|  12.6k|            rv = dtls_StartRetransmitTimer(ss);
  591|  12.6k|        } else {
  592|      0|            PORT_Assert(ss->version < SSL_LIBRARY_VERSION_TLS_1_3);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  593|      0|        }
  594|  12.6k|    }
  595|       |
  596|  20.5k|    return rv;
  597|  20.5k|}
dtls_TransmitMessageFlight:
  812|  13.0k|{
  813|  13.0k|    SECStatus rv = SECSuccess;
  814|  13.0k|    PRCList *msg_p;
  815|       |
  816|  13.0k|    SSL_TRC(10, ("%d: SSL3[%d]: dtls_TransmitMessageFlight",
  ------------------
  |  |   71|  13.0k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 13.0k]
  |  |  ------------------
  |  |   72|  13.0k|    ssl_Trace b
  ------------------
  817|  13.0k|                 SSL_GETPID(), ss->fd));
  818|       |
  819|  13.0k|    ssl_GetXmitBufLock(ss);
  ------------------
  |  | 1466|  13.0k|    {                                           \
  |  | 1467|  13.0k|        if (!ss->opt.noLocks)                   \
  |  |  ------------------
  |  |  |  Branch (1467:13): [True: 6.42k, False: 6.62k]
  |  |  ------------------
  |  | 1468|  13.0k|            PZ_EnterMonitor((ss)->xmitBufLock); \
  |  |  ------------------
  |  |  |  |  256|  6.42k|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1469|  13.0k|    }
  ------------------
  820|  13.0k|    ssl_GetSpecReadLock(ss);
  ------------------
  |  | 1422|  13.0k|    {                                           \
  |  | 1423|  13.0k|        if (!ss->opt.noLocks)                   \
  |  |  ------------------
  |  |  |  Branch (1423:13): [True: 6.42k, False: 6.62k]
  |  |  ------------------
  |  | 1424|  13.0k|            NSSRWLock_LockRead((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   47|  6.42k|#define NSSRWLock_LockRead NSSRWLock_LockRead_Util
  |  |  ------------------
  |  | 1425|  13.0k|    }
  ------------------
  821|       |
  822|       |    /* DTLS does not buffer its handshake messages in ss->pendingBuf, but rather
  823|       |     * in the lastMessageFlight structure. This is just a sanity check that some
  824|       |     * programming error hasn't inadvertantly stuffed something in
  825|       |     * ss->pendingBuf.  This function uses ss->pendingBuf temporarily and it
  826|       |     * needs to be empty to start.
  827|       |     */
  828|  13.0k|    PORT_Assert(!ss->pendingBuf.len);
  ------------------
  |  |  120|  13.0k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  13.0k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 13.0k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  829|       |
  830|  13.0k|    for (msg_p = PR_LIST_HEAD(&ss->ssl3.hs.lastMessageFlight);
  ------------------
  |  |   65|  13.0k|#define PR_LIST_HEAD(_l) (_l)->next
  ------------------
  831|  29.2k|         msg_p != &ss->ssl3.hs.lastMessageFlight;) {
  ------------------
  |  Branch (831:10): [True: 16.2k, False: 13.0k]
  ------------------
  832|  16.2k|        DTLSQueuedMessage *msg = (DTLSQueuedMessage *)msg_p;
  833|       |
  834|       |        /* Move the pointer forward so that the functions below are free to
  835|       |         * remove messages from the list. */
  836|  16.2k|        msg_p = PR_NEXT_LINK(msg_p);
  ------------------
  |  |   47|  16.2k|        ((_e)->next)
  ------------------
  837|       |
  838|       |        /* Note: This function fragments messages so that each record is close
  839|       |         * to full.  This produces fewer records, but it means that messages can
  840|       |         * be quite fragmented.  Adding an extra flush here would push new
  841|       |         * messages into new records and reduce fragmentation. */
  842|  16.2k|        if (msg->type == ssl_ct_handshake) {
  ------------------
  |  Branch (842:13): [True: 14.6k, False: 1.62k]
  ------------------
  843|  14.6k|            rv = dtls_FragmentHandshake(ss, msg);
  844|  14.6k|        } else {
  845|  1.62k|            PORT_Assert(!tls13_MaybeTls13(ss));
  ------------------
  |  |  120|  1.62k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.62k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.62k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  846|  1.62k|            rv = dtls_SendFragment(ss, msg, msg->data, msg->len);
  847|  1.62k|        }
  848|  16.2k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (848:13): [True: 0, False: 16.2k]
  ------------------
  849|      0|            break;
  850|      0|        }
  851|  16.2k|    }
  852|       |
  853|       |    /* Finally, flush any data that wasn't flushed already. */
  854|  13.0k|    if (rv == SECSuccess) {
  ------------------
  |  Branch (854:9): [True: 13.0k, False: 0]
  ------------------
  855|  13.0k|        rv = dtls_SendSavedWriteData(ss);
  856|  13.0k|    }
  857|       |
  858|       |    /* Give up the locks */
  859|  13.0k|    ssl_ReleaseSpecReadLock(ss);
  ------------------
  |  | 1427|  13.0k|    {                                             \
  |  | 1428|  13.0k|        if (!ss->opt.noLocks)                     \
  |  |  ------------------
  |  |  |  Branch (1428:13): [True: 6.42k, False: 6.62k]
  |  |  ------------------
  |  | 1429|  13.0k|            NSSRWLock_UnlockRead((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   50|  6.42k|#define NSSRWLock_UnlockRead NSSRWLock_UnlockRead_Util
  |  |  ------------------
  |  | 1430|  13.0k|    }
  ------------------
  860|  13.0k|    ssl_ReleaseXmitBufLock(ss);
  ------------------
  |  | 1471|  13.0k|    {                                          \
  |  | 1472|  13.0k|        if (!ss->opt.noLocks)                  \
  |  |  ------------------
  |  |  |  Branch (1472:13): [True: 6.42k, False: 6.62k]
  |  |  ------------------
  |  | 1473|  13.0k|            PZ_ExitMonitor((ss)->xmitBufLock); \
  |  |  ------------------
  |  |  |  |  257|  6.42k|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1474|  13.0k|    }
  ------------------
  861|       |
  862|  13.0k|    return rv;
  863|  13.0k|}
dtls_InitTimers:
  897|  9.36k|{
  898|  9.36k|    unsigned int i;
  899|  9.36k|    dtlsTimer **timers[PR_ARRAY_SIZE(ss->ssl3.hs.timers)] = {
  900|  9.36k|        &ss->ssl3.hs.rtTimer,
  901|  9.36k|        &ss->ssl3.hs.ackTimer,
  902|  9.36k|        &ss->ssl3.hs.hdTimer
  903|  9.36k|    };
  904|  9.36k|    static const char *timerLabels[] = {
  905|  9.36k|        "retransmit", "ack", "holddown"
  906|  9.36k|    };
  907|       |
  908|  9.36k|    PORT_Assert(PR_ARRAY_SIZE(timers) == PR_ARRAY_SIZE(timerLabels));
  ------------------
  |  |  120|  9.36k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  9.36k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  909|  37.4k|    for (i = 0; i < PR_ARRAY_SIZE(ss->ssl3.hs.timers); ++i) {
  ------------------
  |  |  167|  37.4k|#define PR_ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
  ------------------
  |  Branch (909:17): [True: 28.0k, False: 9.36k]
  ------------------
  910|  28.0k|        *timers[i] = &ss->ssl3.hs.timers[i];
  911|  28.0k|        ss->ssl3.hs.timers[i].label = timerLabels[i];
  912|  28.0k|    }
  913|  9.36k|}
dtls_StartTimer:
  917|  14.3k|{
  918|  14.3k|    PORT_Assert(timer->cb == NULL);
  ------------------
  |  |  120|  14.3k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  14.3k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 14.3k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  919|       |
  920|  14.3k|    SSL_TRC(10, ("%d: SSL3[%d]: %s dtls_StartTimer %s timeout=%d",
  ------------------
  |  |   71|  14.3k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 14.3k]
  |  |  ------------------
  |  |   72|  14.3k|    ssl_Trace b
  |  |  ------------------
  |  |  |  Branch (72:15): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  921|  14.3k|                 SSL_GETPID(), ss->fd, SSL_ROLE(ss), timer->label, time));
  922|       |
  923|  14.3k|    timer->started = PR_IntervalNow();
  924|  14.3k|    timer->timeout = time;
  925|  14.3k|    timer->cb = cb;
  926|  14.3k|    return SECSuccess;
  927|  14.3k|}
dtls_RestartTimer:
  931|    362|{
  932|    362|    timer->started = PR_IntervalNow();
  933|    362|    return SECSuccess;
  934|    362|}
dtls_CancelTimer:
  969|  8.91k|{
  970|  8.91k|    SSL_TRC(30, ("%d: SSL3[%d]: %s dtls_CancelTimer %s",
  ------------------
  |  |   71|  8.91k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 8.91k]
  |  |  ------------------
  |  |   72|  8.91k|    ssl_Trace b
  |  |  ------------------
  |  |  |  Branch (72:15): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  971|  8.91k|                 SSL_GETPID(), ss->fd, SSL_ROLE(ss),
  972|  8.91k|                 timer->label));
  973|       |
  974|  8.91k|    PORT_Assert(ss->opt.noLocks || ssl_HaveRecvBufLock(ss));
  ------------------
  |  |  120|  8.91k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  13.2k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 4.59k, False: 4.32k]
  |  |  |  |  |  Branch (208:7): [True: 4.32k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  975|       |
  976|  8.91k|    timer->cb = NULL;
  977|  8.91k|}
dtls_CheckTimer:
  995|  3.56k|{
  996|  3.56k|    unsigned int i;
  997|  3.56k|    SSL_TRC(30, ("%d: SSL3[%d]: dtls_CheckTimer (%s)",
  ------------------
  |  |   71|  3.56k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 3.56k]
  |  |  ------------------
  |  |   72|  3.56k|    ssl_Trace b
  |  |  ------------------
  |  |  |  Branch (72:15): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  998|  3.56k|                 SSL_GETPID(), ss->fd, ss->sec.isServer ? "server" : "client"));
  999|       |
 1000|  3.56k|    ssl_GetSSL3HandshakeLock(ss);
  ------------------
  |  | 1407|  3.56k|    {                                                 \
  |  | 1408|  3.56k|        if (!ss->opt.noLocks) {                       \
  |  |  ------------------
  |  |  |  Branch (1408:13): [True: 1.71k, False: 1.85k]
  |  |  ------------------
  |  | 1409|  1.71k|            PORT_Assert(!ssl_HaveXmitBufLock(ss));    \
  |  |  ------------------
  |  |  |  |  120|  1.71k|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|  1.71k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 1.71k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1410|  1.71k|            PZ_EnterMonitor((ss)->ssl3HandshakeLock); \
  |  |  ------------------
  |  |  |  |  256|  1.71k|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1411|  1.71k|        }                                             \
  |  | 1412|  3.56k|    }
  ------------------
 1001|       |
 1002|  14.2k|    for (i = 0; i < PR_ARRAY_SIZE(ss->ssl3.hs.timers); ++i) {
  ------------------
  |  |  167|  14.2k|#define PR_ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
  ------------------
  |  Branch (1002:17): [True: 10.7k, False: 3.56k]
  ------------------
 1003|  10.7k|        dtlsTimer *timer = &ss->ssl3.hs.timers[i];
 1004|  10.7k|        if (!timer->cb) {
  ------------------
  |  Branch (1004:13): [True: 6.18k, False: 4.52k]
  ------------------
 1005|  6.18k|            continue;
 1006|  6.18k|        }
 1007|       |
 1008|  4.52k|        if ((PR_IntervalNow() - timer->started) >=
  ------------------
  |  Branch (1008:13): [True: 11, False: 4.51k]
  ------------------
 1009|  4.52k|            PR_MillisecondsToInterval(timer->timeout)) {
 1010|       |            /* Timer has expired */
 1011|     11|            DTLSTimerCb cb = timer->cb;
 1012|       |
 1013|     11|            SSL_TRC(10, ("%d: SSL3[%d]: %s firing timer %s",
  ------------------
  |  |   71|     11|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 11]
  |  |  ------------------
  |  |   72|     11|    ssl_Trace b
  |  |  ------------------
  |  |  |  Branch (72:15): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1014|     11|                         SSL_GETPID(), ss->fd, SSL_ROLE(ss),
 1015|     11|                         timer->label));
 1016|       |
 1017|       |            /* Cancel the timer so that we can call the CB safely */
 1018|     11|            dtls_CancelTimer(ss, timer);
 1019|       |
 1020|       |            /* Now call the CB */
 1021|     11|            cb(ss);
 1022|     11|        }
 1023|  4.52k|    }
 1024|  3.56k|    ssl_ReleaseSSL3HandshakeLock(ss);
  ------------------
  |  | 1414|  3.56k|    {                                                \
  |  | 1415|  3.56k|        if (!ss->opt.noLocks)                        \
  |  |  ------------------
  |  |  |  Branch (1415:13): [True: 1.71k, False: 1.85k]
  |  |  ------------------
  |  | 1416|  3.56k|            PZ_ExitMonitor((ss)->ssl3HandshakeLock); \
  |  |  ------------------
  |  |  |  |  257|  1.71k|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1417|  3.56k|    }
  ------------------
 1025|  3.56k|}
dtls_SetMTU:
 1073|  9.36k|{
 1074|  9.36k|    int i;
 1075|       |
 1076|  9.36k|    if (advertised == 0) {
  ------------------
  |  Branch (1076:9): [True: 9.36k, False: 0]
  ------------------
 1077|  9.36k|        ss->ssl3.mtu = COMMON_MTU_VALUES[0];
 1078|  9.36k|        SSL_TRC(30, ("Resetting MTU to %d", ss->ssl3.mtu));
  ------------------
  |  |   71|  9.36k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 9.36k]
  |  |  ------------------
  |  |   72|  9.36k|    ssl_Trace b
  ------------------
 1079|  9.36k|        return;
 1080|  9.36k|    }
 1081|       |
 1082|      0|    for (i = 0; i < PR_ARRAY_SIZE(COMMON_MTU_VALUES); i++) {
  ------------------
  |  |  167|      0|#define PR_ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
  ------------------
  |  Branch (1082:17): [True: 0, False: 0]
  ------------------
 1083|      0|        if (COMMON_MTU_VALUES[i] <= advertised) {
  ------------------
  |  Branch (1083:13): [True: 0, False: 0]
  ------------------
 1084|      0|            ss->ssl3.mtu = COMMON_MTU_VALUES[i];
 1085|      0|            SSL_TRC(30, ("Resetting MTU to %d", ss->ssl3.mtu));
  ------------------
  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    ssl_Trace b
  ------------------
 1086|      0|            return;
 1087|      0|        }
 1088|      0|    }
 1089|       |
 1090|       |    /* Fallback */
 1091|      0|    ss->ssl3.mtu = COMMON_MTU_VALUES[PR_ARRAY_SIZE(COMMON_MTU_VALUES) - 1];
  ------------------
  |  |  167|      0|#define PR_ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
  ------------------
 1092|      0|    SSL_TRC(30, ("Resetting MTU to %d", ss->ssl3.mtu));
  ------------------
  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    ssl_Trace b
  ------------------
 1093|      0|}
dtls_HandleHelloVerifyRequest:
 1101|    414|{
 1102|    414|    int errCode = SSL_ERROR_RX_MALFORMED_HELLO_VERIFY_REQUEST;
 1103|    414|    SECStatus rv;
 1104|    414|    SSL3ProtocolVersion temp;
 1105|    414|    SSL3AlertDescription desc = illegal_parameter;
 1106|       |
 1107|    414|    SSL_TRC(3, ("%d: SSL3[%d]: handle hello_verify_request handshake",
  ------------------
  |  |   71|    414|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 414]
  |  |  ------------------
  |  |   72|    414|    ssl_Trace b
  ------------------
 1108|    414|                SSL_GETPID(), ss->fd));
 1109|    414|    PORT_Assert(ss->opt.noLocks || ssl_HaveRecvBufLock(ss));
  ------------------
  |  |  120|    414|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    618|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 210, False: 204]
  |  |  |  |  |  Branch (208:7): [True: 204, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1110|    414|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|    414|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    618|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 210, False: 204]
  |  |  |  |  |  Branch (208:7): [True: 204, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1111|       |
 1112|    414|    if (ss->ssl3.hs.ws != wait_server_hello) {
  ------------------
  |  Branch (1112:9): [True: 5, False: 409]
  ------------------
 1113|      5|        errCode = SSL_ERROR_RX_UNEXPECTED_HELLO_VERIFY_REQUEST;
 1114|      5|        desc = unexpected_message;
 1115|      5|        goto alert_loser;
 1116|      5|    }
 1117|       |
 1118|    409|    dtls_ReceivedFirstMessageInFlight(ss);
 1119|       |
 1120|       |    /* The version.
 1121|       |     *
 1122|       |     * RFC 4347 required that you verify that the server versions
 1123|       |     * match (Section 4.2.1) in the HelloVerifyRequest and the
 1124|       |     * ServerHello.
 1125|       |     *
 1126|       |     * RFC 6347 (Section 4.2.1) suggests (SHOULD) that servers always use 1.0 in
 1127|       |     * HelloVerifyRequest and allows the versions not to match,
 1128|       |     * especially when 1.2 is being negotiated.
 1129|       |     *
 1130|       |     * Therefore we do not do anything to enforce a match, just
 1131|       |     * read and check that this value is sane.
 1132|       |     */
 1133|    409|    rv = ssl_ClientReadVersion(ss, &b, &length, &temp);
 1134|    409|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1134:9): [True: 20, False: 389]
  ------------------
 1135|     20|        goto loser; /* alert has been sent */
 1136|     20|    }
 1137|       |
 1138|       |    /* Read the cookie.
 1139|       |     * IMPORTANT: The value of ss->ssl3.hs.cookie is only valid while the
 1140|       |     * HelloVerifyRequest message remains valid. */
 1141|    389|    rv = ssl3_ConsumeHandshakeVariable(ss, &ss->ssl3.hs.cookie, 1, &b, &length);
 1142|    389|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1142:9): [True: 13, False: 376]
  ------------------
 1143|     13|        goto loser; /* alert has been sent */
 1144|     13|    }
 1145|    376|    if (ss->ssl3.hs.cookie.len > DTLS_COOKIE_BYTES) {
  ------------------
  |  |   33|    376|#define DTLS_COOKIE_BYTES 32
  ------------------
  |  Branch (1145:9): [True: 3, False: 373]
  ------------------
 1146|      3|        desc = decode_error;
 1147|      3|        goto alert_loser; /* malformed. */
 1148|      3|    }
 1149|       |
 1150|    373|    ssl_GetXmitBufLock(ss); /*******************************/
  ------------------
  |  | 1466|    373|    {                                           \
  |  | 1467|    373|        if (!ss->opt.noLocks)                   \
  |  |  ------------------
  |  |  |  Branch (1467:13): [True: 190, False: 183]
  |  |  ------------------
  |  | 1468|    373|            PZ_EnterMonitor((ss)->xmitBufLock); \
  |  |  ------------------
  |  |  |  |  256|    190|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1469|    373|    }
  ------------------
 1151|       |
 1152|       |    /* Now re-send the client hello */
 1153|    373|    rv = ssl3_SendClientHello(ss, client_hello_retransmit);
 1154|       |
 1155|    373|    ssl_ReleaseXmitBufLock(ss); /*******************************/
  ------------------
  |  | 1471|    373|    {                                          \
  |  | 1472|    373|        if (!ss->opt.noLocks)                  \
  |  |  ------------------
  |  |  |  Branch (1472:13): [True: 190, False: 183]
  |  |  ------------------
  |  | 1473|    373|            PZ_ExitMonitor((ss)->xmitBufLock); \
  |  |  ------------------
  |  |  |  |  257|    190|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1474|    373|    }
  ------------------
 1156|       |
 1157|    373|    if (rv == SECSuccess)
  ------------------
  |  Branch (1157:9): [True: 373, False: 0]
  ------------------
 1158|    373|        return rv;
 1159|       |
 1160|      8|alert_loser:
 1161|      8|    (void)SSL3_SendAlert(ss, alert_fatal, desc);
 1162|       |
 1163|     41|loser:
 1164|     41|    ssl_MapLowLevelError(errCode);
 1165|     41|    return SECFailure;
 1166|      8|}
dtls_InitRecvdRecords:
 1176|  25.7k|{
 1177|  25.7k|    PORT_Memset(records->data, 0, sizeof(records->data));
  ------------------
  |  |  182|  25.7k|#define PORT_Memset memset
  ------------------
 1178|  25.7k|    records->left = 0;
 1179|  25.7k|    records->right = DTLS_RECVD_RECORDS_WINDOW - 1;
  ------------------
  |  |  124|  25.7k|#define DTLS_RECVD_RECORDS_WINDOW 1024
  ------------------
 1180|  25.7k|}
dtls_RecordGetRecvd:
 1192|   741k|{
 1193|   741k|    PRUint64 offset;
 1194|       |
 1195|       |    /* Out of range to the left */
 1196|   741k|    if (seq < records->left) {
  ------------------
  |  Branch (1196:9): [True: 586k, False: 154k]
  ------------------
 1197|   586k|        return -1;
 1198|   586k|    }
 1199|       |
 1200|       |    /* Out of range to the right; since we advance the window on
 1201|       |     * receipt, that means that this packet has not been received
 1202|       |     * yet */
 1203|   154k|    if (seq > records->right)
  ------------------
  |  Branch (1203:9): [True: 51.7k, False: 103k]
  ------------------
 1204|  51.7k|        return 0;
 1205|       |
 1206|   103k|    offset = seq % DTLS_RECVD_RECORDS_WINDOW;
  ------------------
  |  |  124|   103k|#define DTLS_RECVD_RECORDS_WINDOW 1024
  ------------------
 1207|       |
 1208|   103k|    return !!(records->data[offset / 8] & (1 << (offset % 8)));
 1209|   154k|}
dtls_RecordSetRecvd:
 1217|  25.8k|{
 1218|  25.8k|    PRUint64 offset;
 1219|       |
 1220|  25.8k|    if (seq < records->left)
  ------------------
  |  Branch (1220:9): [True: 0, False: 25.8k]
  ------------------
 1221|      0|        return;
 1222|       |
 1223|  25.8k|    if (seq > records->right) {
  ------------------
  |  Branch (1223:9): [True: 6.03k, False: 19.8k]
  ------------------
 1224|  6.03k|        sslSequenceNumber new_left;
 1225|  6.03k|        sslSequenceNumber new_right;
 1226|  6.03k|        sslSequenceNumber right;
 1227|       |
 1228|       |        /* Slide to the right; this is the tricky part
 1229|       |         *
 1230|       |         * 1. new_top is set to have room for seq, on the
 1231|       |         *    next byte boundary by setting the right 8
 1232|       |         *    bits of seq
 1233|       |         * 2. new_left is set to compensate.
 1234|       |         * 3. Zero all bits between top and new_top. Since
 1235|       |         *    this is a ring, this zeroes everything as-yet
 1236|       |         *    unseen. Because we always operate on byte
 1237|       |         *    boundaries, we can zero one byte at a time
 1238|       |         */
 1239|  6.03k|        new_right = seq | 0x07;
 1240|  6.03k|        new_left = (new_right - DTLS_RECVD_RECORDS_WINDOW) + 1;
  ------------------
  |  |  124|  6.03k|#define DTLS_RECVD_RECORDS_WINDOW 1024
  ------------------
 1241|       |
 1242|  6.03k|        if (new_right > records->right + DTLS_RECVD_RECORDS_WINDOW) {
  ------------------
  |  |  124|  6.03k|#define DTLS_RECVD_RECORDS_WINDOW 1024
  ------------------
  |  Branch (1242:13): [True: 5.45k, False: 585]
  ------------------
 1243|  5.45k|            PORT_Memset(records->data, 0, sizeof(records->data));
  ------------------
  |  |  182|  5.45k|#define PORT_Memset memset
  ------------------
 1244|  5.45k|        } else {
 1245|  16.5k|            for (right = records->right + 8; right <= new_right; right += 8) {
  ------------------
  |  Branch (1245:46): [True: 15.9k, False: 585]
  ------------------
 1246|  15.9k|                offset = right % DTLS_RECVD_RECORDS_WINDOW;
  ------------------
  |  |  124|  15.9k|#define DTLS_RECVD_RECORDS_WINDOW 1024
  ------------------
 1247|  15.9k|                records->data[offset / 8] = 0;
 1248|  15.9k|            }
 1249|    585|        }
 1250|       |
 1251|  6.03k|        records->right = new_right;
 1252|  6.03k|        records->left = new_left;
 1253|  6.03k|    }
 1254|       |
 1255|  25.8k|    offset = seq % DTLS_RECVD_RECORDS_WINDOW;
  ------------------
  |  |  124|  25.8k|#define DTLS_RECVD_RECORDS_WINDOW 1024
  ------------------
 1256|       |
 1257|  25.8k|    records->data[offset / 8] |= (1 << (offset % 8));
 1258|  25.8k|}
dtls_IsLongHeader:
 1318|  3.05M|{
 1319|  3.05M|#ifndef UNSAFE_FUZZER_MODE
 1320|  3.05M|    return version < SSL_LIBRARY_VERSION_TLS_1_3 ||
  ------------------
  |  |   21|  6.10M|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (1320:12): [True: 3.00M, False: 42.9k]
  ------------------
 1321|  3.05M|           firstOctet == ssl_ct_handshake ||
  ------------------
  |  Branch (1321:12): [True: 3.63k, False: 39.3k]
  ------------------
 1322|  3.05M|           firstOctet == ssl_ct_ack ||
  ------------------
  |  Branch (1322:12): [True: 1.37k, False: 37.9k]
  ------------------
 1323|  3.05M|           firstOctet == ssl_ct_alert;
  ------------------
  |  Branch (1323:12): [True: 418, False: 37.5k]
  ------------------
 1324|       |#else
 1325|       |    return PR_TRUE;
 1326|       |#endif
 1327|  3.05M|}
dtls_IsDtls13Ciphertext:
 1331|  38.0k|{
 1332|       |    // Allow no version in case we haven't negotiated one yet.
 1333|  38.0k|    return (version == 0 || version >= SSL_LIBRARY_VERSION_TLS_1_3) &&
  ------------------
  |  |   21|  11.1k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (1333:13): [True: 26.8k, False: 11.1k]
  |  Branch (1333:29): [True: 11.1k, False: 0]
  ------------------
 1334|  38.0k|           (firstOctet & 0xe0) == 0x20;
  ------------------
  |  Branch (1334:12): [True: 11.5k, False: 26.5k]
  ------------------
 1335|  38.0k|}
dtls_ReadEpoch:
 1339|  1.15M|{
 1340|  1.15M|    if (dtls_IsLongHeader(version, hdr[0])) {
  ------------------
  |  Branch (1340:9): [True: 1.14M, False: 11.6k]
  ------------------
 1341|  1.14M|        return ((DTLSEpoch)hdr[3] << 8) | hdr[4];
 1342|  1.14M|    }
 1343|       |
 1344|  11.6k|    DTLSEpoch epoch = (specEpoch & ~3) | (hdr[0] & 3);
 1345|       |    /* The epoch cannot be higher than the current read epoch,
 1346|       |        though guard against underflow. */
 1347|  11.6k|    if (epoch > specEpoch && epoch > 4) {
  ------------------
  |  Branch (1347:9): [True: 703, False: 10.9k]
  |  Branch (1347:30): [True: 0, False: 703]
  ------------------
 1348|      0|        epoch -= 4;
 1349|      0|    }
 1350|       |
 1351|  11.6k|    return epoch;
 1352|  1.15M|}
dtls_IsRelevant:
 1415|   741k|{
 1416|   741k|    sslSequenceNumber seqNum = dtls_ReadSequenceNumber(spec, cText->hdr);
 1417|   741k|    if (dtls_RecordGetRecvd(&spec->recvdRecords, seqNum) != 0) {
  ------------------
  |  Branch (1417:9): [True: 655k, False: 85.8k]
  ------------------
 1418|   655k|        SSL_TRC(10, ("%d: SSL3[%d]: dtls_IsRelevant, rejecting "
  ------------------
  |  |   71|   655k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 655k]
  |  |  ------------------
  |  |   72|   655k|    ssl_Trace b
  ------------------
 1419|   655k|                     "potentially replayed packet",
 1420|   655k|                     SSL_GETPID(), ss->fd));
 1421|   655k|        return PR_FALSE;
  ------------------
  |  |  438|   655k|#define PR_FALSE 0
  ------------------
 1422|   655k|    }
 1423|       |
 1424|  85.8k|    *seqNumOut = seqNum;
 1425|  85.8k|    return PR_TRUE;
  ------------------
  |  |  437|  85.8k|#define PR_TRUE 1
  ------------------
 1426|   741k|}
dtls_ReceivedFirstMessageInFlight:
 1430|  8.81k|{
 1431|  8.81k|    if (!IS_DTLS(ss))
  ------------------
  |  |  892|  8.81k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  ------------------
  |  Branch (1431:9): [True: 0, False: 8.81k]
  ------------------
 1432|      0|        return;
 1433|       |
 1434|       |    /* At this point we are advancing our state machine, so we can free our last
 1435|       |     * flight of messages. */
 1436|  8.81k|    if (ss->ssl3.hs.ws != idle_handshake ||
  ------------------
  |  Branch (1436:9): [True: 8.81k, False: 0]
  ------------------
 1437|  8.81k|        ss->version >= SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|      0|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (1437:9): [True: 0, False: 0]
  ------------------
 1438|       |        /* We need to keep our last flight around in DTLS 1.2 and below,
 1439|       |         * so we can retransmit it in response to other people's
 1440|       |         * retransmits. */
 1441|  8.81k|        dtls_FreeHandshakeMessages(&ss->ssl3.hs.lastMessageFlight);
 1442|       |
 1443|       |        /* Reset the timer to the initial value if the retry counter
 1444|       |         * is 0, per RFC 6347, Sec. 4.2.4.1 */
 1445|  8.81k|        dtls_CancelTimer(ss, ss->ssl3.hs.rtTimer);
 1446|  8.81k|        if (ss->ssl3.hs.rtRetries == 0) {
  ------------------
  |  Branch (1446:13): [True: 8.81k, False: 0]
  ------------------
 1447|  8.81k|            ss->ssl3.hs.rtTimer->timeout = DTLS_RETRANSMIT_INITIAL_MS;
  ------------------
  |  |  126|  8.81k|#define DTLS_RETRANSMIT_INITIAL_MS 50
  ------------------
 1448|  8.81k|        }
 1449|  8.81k|    }
 1450|       |
 1451|       |    /* Empty the ACK queue (TLS 1.3 only). */
 1452|  8.81k|    ssl_ClearPRCList(&ss->ssl3.hs.dtlsRcvdHandshake, NULL);
 1453|  8.81k|}
dtlscon.c:dtls_HandleHandshakeMessage:
  245|  19.1k|{
  246|  19.1k|    ss->ssl3.hs.recvdHighWater = -1;
  247|       |
  248|  19.1k|    return ssl3_HandleHandshakeMessage(ss, data, ss->ssl3.hs.msg_len,
  249|  19.1k|                                       last);
  250|  19.1k|}
dtlscon.c:dtls_RetransmitDetected:
  190|    234|{
  191|    234|    dtlsTimer *timer = ss->ssl3.hs.rtTimer;
  192|    234|    SECStatus rv = SECSuccess;
  193|       |
  194|    234|    PORT_Assert(ss->opt.noLocks || ssl_HaveRecvBufLock(ss));
  ------------------
  |  |  120|    234|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    370|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 98, False: 136]
  |  |  |  |  |  Branch (208:7): [True: 136, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  195|    234|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|    234|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    370|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 98, False: 136]
  |  |  |  |  |  Branch (208:7): [True: 136, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  196|       |
  197|    234|    if (timer->cb == dtls_RetransmitTimerExpiredCb) {
  ------------------
  |  Branch (197:9): [True: 161, False: 73]
  ------------------
  198|       |        /* Check to see if we retransmitted recently. If so,
  199|       |         * suppress the triggered retransmit. This avoids
  200|       |         * retransmit wars after packet loss.
  201|       |         * This is not in RFC 5346 but it should be.
  202|       |         */
  203|    161|        if ((PR_IntervalNow() - timer->started) >
  ------------------
  |  Branch (203:13): [True: 1, False: 160]
  ------------------
  204|    161|            (timer->timeout / 4)) {
  205|      1|            SSL_TRC(30,
  ------------------
  |  |   71|      1|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 1]
  |  |  ------------------
  |  |   72|      1|    ssl_Trace b
  ------------------
  206|      1|                    ("%d: SSL3[%d]: Shortcutting retransmit timer",
  207|      1|                     SSL_GETPID(), ss->fd));
  208|       |
  209|       |            /* Cancel the timer and call the CB,
  210|       |             * which re-arms the timer */
  211|      1|            dtls_CancelTimer(ss, ss->ssl3.hs.rtTimer);
  212|      1|            dtls_RetransmitTimerExpiredCb(ss);
  213|    160|        } else {
  214|    160|            SSL_TRC(30,
  ------------------
  |  |   71|    160|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 160]
  |  |  ------------------
  |  |   72|    160|    ssl_Trace b
  ------------------
  215|    160|                    ("%d: SSL3[%d]: Ignoring retransmission: "
  216|    160|                     "last retransmission %dms ago, suppressed for %dms",
  217|    160|                     SSL_GETPID(), ss->fd,
  218|    160|                     PR_IntervalNow() - timer->started,
  219|    160|                     timer->timeout / 4));
  220|    160|        }
  221|       |
  222|    161|    } else if (timer->cb == dtls_FinishedTimerCb) {
  ------------------
  |  Branch (222:16): [True: 0, False: 73]
  ------------------
  223|      0|        SSL_TRC(30, ("%d: SSL3[%d]: Retransmit detected in holddown",
  ------------------
  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    ssl_Trace b
  ------------------
  224|      0|                     SSL_GETPID(), ss->fd));
  225|       |        /* Retransmit the messages and re-arm the timer
  226|       |         * Note that we are not backing off the timer here.
  227|       |         * The spec isn't clear and my reasoning is that this
  228|       |         * may be a re-ordered packet rather than slowness,
  229|       |         * so let's be aggressive. */
  230|      0|        dtls_CancelTimer(ss, ss->ssl3.hs.rtTimer);
  231|      0|        rv = dtls_TransmitMessageFlight(ss);
  232|      0|        if (rv == SECSuccess) {
  ------------------
  |  Branch (232:13): [True: 0, False: 0]
  ------------------
  233|      0|            rv = dtls_StartHolddownTimer(ss);
  234|      0|        }
  235|       |
  236|     73|    } else {
  237|     73|        PORT_Assert(timer->cb == NULL);
  ------------------
  |  |  120|     73|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|     73|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 73, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  238|       |        /* ... and ignore it. */
  239|     73|    }
  240|    234|    return rv;
  241|    234|}
dtlscon.c:dtls_RetransmitTimerExpiredCb:
  607|      1|{
  608|      1|    SECStatus rv;
  609|      1|    dtlsTimer *timer = ss->ssl3.hs.rtTimer;
  610|      1|    ss->ssl3.hs.rtRetries++;
  611|       |
  612|      1|    if (!(ss->ssl3.hs.rtRetries % 3)) {
  ------------------
  |  Branch (612:9): [True: 0, False: 1]
  ------------------
  613|       |        /* If one of the messages was potentially greater than > MTU,
  614|       |         * then downgrade. Do this every time we have retransmitted a
  615|       |         * message twice, per RFC 9147 Sec. 4.4 */
  616|      0|        dtls_SetMTU(ss, ss->ssl3.hs.maxMessageSent - 1);
  617|      0|    }
  618|       |
  619|      1|    rv = dtls_TransmitMessageFlight(ss);
  620|      1|    if (rv == SECSuccess) {
  ------------------
  |  Branch (620:9): [True: 1, False: 0]
  ------------------
  621|       |        /* Re-arm the timer */
  622|      1|        timer->timeout *= 2;
  623|      1|        if (timer->timeout > DTLS_RETRANSMIT_MAX_MS) {
  ------------------
  |  |  128|      1|#define DTLS_RETRANSMIT_MAX_MS 10000
  ------------------
  |  Branch (623:13): [True: 0, False: 1]
  ------------------
  624|      0|            timer->timeout = DTLS_RETRANSMIT_MAX_MS;
  ------------------
  |  |  128|      0|#define DTLS_RETRANSMIT_MAX_MS 10000
  ------------------
  625|      0|        }
  626|       |
  627|      1|        timer->started = PR_IntervalNow();
  628|      1|        timer->cb = dtls_RetransmitTimerExpiredCb;
  629|       |
  630|      1|        SSL_TRC(30,
  ------------------
  |  |   71|      1|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 1]
  |  |  ------------------
  |  |   72|      1|    ssl_Trace b
  ------------------
  631|      1|                ("%d: SSL3[%d]: Retransmit #%d, next in %d",
  632|      1|                 SSL_GETPID(), ss->fd,
  633|      1|                 ss->ssl3.hs.rtRetries, timer->timeout));
  634|      1|    }
  635|       |    /* else: OK for now. In future maybe signal the stack that we couldn't
  636|       |     * transmit. For now, let the read handle any real network errors */
  637|      1|}
dtlscon.c:dtls_AllocQueuedMessage:
  125|  15.8k|{
  126|  15.8k|    DTLSQueuedMessage *msg;
  127|       |
  128|  15.8k|    msg = PORT_ZNew(DTLSQueuedMessage);
  ------------------
  |  |  148|  15.8k|#define PORT_ZNew(type) (type *)PORT_ZAlloc(sizeof(type))
  |  |  ------------------
  |  |  |  |   72|  15.8k|#define PORT_ZAlloc PORT_ZAlloc_Util
  |  |  ------------------
  ------------------
  129|  15.8k|    if (!msg)
  ------------------
  |  Branch (129:9): [True: 0, False: 15.8k]
  ------------------
  130|      0|        return NULL;
  131|       |
  132|  15.8k|    msg->data = PORT_Alloc(len);
  ------------------
  |  |   52|  15.8k|#define PORT_Alloc PORT_Alloc_Util
  ------------------
  133|  15.8k|    if (!msg->data) {
  ------------------
  |  Branch (133:9): [True: 0, False: 15.8k]
  ------------------
  134|      0|        PORT_Free(msg);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
  135|      0|        return NULL;
  136|      0|    }
  137|  15.8k|    PORT_Memcpy(msg->data, data, len);
  ------------------
  |  |  180|  15.8k|#define PORT_Memcpy memcpy
  ------------------
  138|       |
  139|  15.8k|    msg->len = len;
  140|  15.8k|    msg->cwSpec = cwSpec;
  141|  15.8k|    msg->type = ct;
  142|       |    /* Safe if we are < 1.3, since the refct is
  143|       |     * already very high. */
  144|  15.8k|    ssl_CipherSpecAddRef(cwSpec);
  145|       |
  146|  15.8k|    return msg;
  147|  15.8k|}
dtlscon.c:dtls_FragmentHandshake:
  676|  14.6k|{
  677|  14.6k|    PRBool fragmentWritten = PR_FALSE;
  ------------------
  |  |  438|  14.6k|#define PR_FALSE 0
  ------------------
  678|  14.6k|    PRUint16 msgSeq;
  679|  14.6k|    PRUint8 *fragment;
  680|  14.6k|    PRUint32 fragmentOffset = 0;
  681|  14.6k|    PRUint32 fragmentLen;
  682|  14.6k|    const PRUint8 *content = msg->data + DTLS_HS_HDR_LEN;
  ------------------
  |  |  639|  14.6k|#define DTLS_HS_HDR_LEN 12
  ------------------
  683|  14.6k|    PRUint32 contentLen = msg->len - DTLS_HS_HDR_LEN;
  ------------------
  |  |  639|  14.6k|#define DTLS_HS_HDR_LEN 12
  ------------------
  684|  14.6k|    SECStatus rv;
  685|       |
  686|       |    /* The headers consume 12 bytes so the smallest possible message (i.e., an
  687|       |     * empty one) is 12 bytes. */
  688|  14.6k|    PORT_Assert(msg->len >= DTLS_HS_HDR_LEN);
  ------------------
  |  |  120|  14.6k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  14.6k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 14.6k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  689|       |
  690|       |    /* DTLS only supports fragmenting handshaking messages. */
  691|  14.6k|    PORT_Assert(msg->type == ssl_ct_handshake);
  ------------------
  |  |  120|  14.6k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  14.6k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 14.6k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  692|       |
  693|  14.6k|    msgSeq = (msg->data[4] << 8) | msg->data[5];
  694|       |
  695|       |    /* do {} while() so that empty messages are sent at least once. */
  696|  14.8k|    do {
  697|  14.8k|        PRUint8 buf[DTLS_MAX_MTU]; /* >= than largest plausible MTU */
  698|  14.8k|        PRBool hasUnackedRange;
  699|  14.8k|        PRUint32 end;
  700|       |
  701|  14.8k|        hasUnackedRange = dtls_NextUnackedRange(ss, msgSeq,
  702|  14.8k|                                                fragmentOffset, contentLen,
  703|  14.8k|                                                &fragmentOffset, &end);
  704|  14.8k|        if (!hasUnackedRange) {
  ------------------
  |  Branch (704:13): [True: 68, False: 14.7k]
  ------------------
  705|     68|            SSL_TRC(20, ("%d: SSL3[%d]: FragmentHandshake %d: all acknowledged",
  ------------------
  |  |   71|     68|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 68]
  |  |  ------------------
  |  |   72|     68|    ssl_Trace b
  ------------------
  706|     68|                         SSL_GETPID(), ss->fd, msgSeq));
  707|     68|            break;
  708|     68|        }
  709|       |
  710|  14.7k|        SSL_TRC(20, ("%d: SSL3[%d]: FragmentHandshake %d: unacked=%u-%u",
  ------------------
  |  |   71|  14.7k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 14.7k]
  |  |  ------------------
  |  |   72|  14.7k|    ssl_Trace b
  ------------------
  711|  14.7k|                     SSL_GETPID(), ss->fd, msgSeq, fragmentOffset, end));
  712|       |
  713|       |        /* Cut down to the data we have available. */
  714|  14.7k|        PORT_Assert(fragmentOffset <= contentLen);
  ------------------
  |  |  120|  14.7k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  14.7k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 14.7k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  715|  14.7k|        PORT_Assert(fragmentOffset <= end);
  ------------------
  |  |  120|  14.7k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  14.7k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 14.7k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  716|  14.7k|        PORT_Assert(end <= contentLen);
  ------------------
  |  |  120|  14.7k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  14.7k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 14.7k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  717|  14.7k|        fragmentLen = PR_MIN(end, contentLen) - fragmentOffset;
  ------------------
  |  |  158|  14.7k|#define PR_MIN(x,y)     ((x)<(y)?(x):(y))
  |  |  ------------------
  |  |  |  Branch (158:26): [True: 28, False: 14.7k]
  |  |  ------------------
  ------------------
  718|       |
  719|       |        /* Limit further by the record size limit.  Account for the header. */
  720|  14.7k|        fragmentLen = PR_MIN(fragmentLen,
  ------------------
  |  |  158|  14.7k|#define PR_MIN(x,y)     ((x)<(y)?(x):(y))
  |  |  ------------------
  |  |  |  Branch (158:26): [True: 14.7k, False: 0]
  |  |  ------------------
  ------------------
  721|  14.7k|                             msg->cwSpec->recordSizeLimit - DTLS_HS_HDR_LEN);
  722|       |
  723|       |        /* Reduce to the space remaining in the MTU. */
  724|  14.7k|        fragmentLen = PR_MIN(fragmentLen,
  ------------------
  |  |  158|  14.7k|#define PR_MIN(x,y)     ((x)<(y)?(x):(y))
  |  |  ------------------
  |  |  |  Branch (158:26): [True: 14.5k, False: 234]
  |  |  ------------------
  ------------------
  725|  14.7k|                             ss->ssl3.mtu -           /* MTU estimate. */
  726|  14.7k|                                 ss->pendingBuf.len - /* Less any unsent records. */
  727|  14.7k|                                 DTLS_MAX_EXPANSION - /* Allow for expansion. */
  728|  14.7k|                                 DTLS_HS_HDR_LEN);    /* And the handshake header. */
  729|  14.7k|        PORT_Assert(fragmentLen > 0 || fragmentOffset == 0);
  ------------------
  |  |  120|  14.7k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  14.7k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 14.7k, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  730|       |
  731|       |        /* Make totally sure that we will fit in the buffer. This should be
  732|       |         * impossible; DTLS_MAX_MTU should always be more than ss->ssl3.mtu. */
  733|  14.7k|        if (fragmentLen >= (DTLS_MAX_MTU - DTLS_HS_HDR_LEN)) {
  ------------------
  |  |  891|  14.7k|#define DTLS_MAX_MTU 1500U
  ------------------
                      if (fragmentLen >= (DTLS_MAX_MTU - DTLS_HS_HDR_LEN)) {
  ------------------
  |  |  639|  14.7k|#define DTLS_HS_HDR_LEN 12
  ------------------
  |  Branch (733:13): [True: 0, False: 14.7k]
  ------------------
  734|      0|            PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  735|      0|            PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  736|      0|            return SECFailure;
  737|      0|        }
  738|       |
  739|  14.7k|        if (fragmentLen == contentLen) {
  ------------------
  |  Branch (739:13): [True: 14.3k, False: 467]
  ------------------
  740|  14.3k|            fragment = msg->data;
  741|  14.3k|        } else {
  742|    467|            sslBuffer tmp = SSL_BUFFER_FIXED(buf, sizeof(buf));
  ------------------
  |  |   27|    467|    {                               \
  |  |   28|    467|        b, 0, maxlen, PR_TRUE       \
  |  |  ------------------
  |  |  |  |  437|    467|#define PR_TRUE 1
  |  |  ------------------
  |  |   29|    467|    }
  ------------------
  743|       |
  744|       |            /* Construct an appropriate-sized fragment */
  745|       |            /* Type, length, sequence */
  746|    467|            rv = sslBuffer_Append(&tmp, msg->data, 6);
  747|    467|            if (rv != SECSuccess) {
  ------------------
  |  Branch (747:17): [True: 0, False: 467]
  ------------------
  748|      0|                return SECFailure;
  749|      0|            }
  750|       |            /* Offset. */
  751|    467|            rv = sslBuffer_AppendNumber(&tmp, fragmentOffset, 3);
  752|    467|            if (rv != SECSuccess) {
  ------------------
  |  Branch (752:17): [True: 0, False: 467]
  ------------------
  753|      0|                return SECFailure;
  754|      0|            }
  755|       |            /* Length. */
  756|    467|            rv = sslBuffer_AppendNumber(&tmp, fragmentLen, 3);
  757|    467|            if (rv != SECSuccess) {
  ------------------
  |  Branch (757:17): [True: 0, False: 467]
  ------------------
  758|      0|                return SECFailure;
  759|      0|            }
  760|       |            /* Data. */
  761|    467|            rv = sslBuffer_Append(&tmp, content + fragmentOffset, fragmentLen);
  762|    467|            if (rv != SECSuccess) {
  ------------------
  |  Branch (762:17): [True: 0, False: 467]
  ------------------
  763|      0|                return SECFailure;
  764|      0|            }
  765|       |
  766|    467|            fragment = SSL_BUFFER_BASE(&tmp);
  ------------------
  |  |   35|    467|#define SSL_BUFFER_BASE(b) ((b)->buf)
  ------------------
  767|    467|        }
  768|       |
  769|       |        /* Record that we are sending first, because encrypting
  770|       |         * increments the sequence number. */
  771|  14.7k|        rv = dtls13_RememberFragment(ss, &ss->ssl3.hs.dtlsSentHandshake,
  772|  14.7k|                                     msgSeq, fragmentOffset, fragmentLen,
  773|  14.7k|                                     msg->cwSpec->epoch,
  774|  14.7k|                                     msg->cwSpec->nextSeqNum);
  775|  14.7k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (775:13): [True: 0, False: 14.7k]
  ------------------
  776|      0|            return SECFailure;
  777|      0|        }
  778|       |
  779|  14.7k|        rv = dtls_SendFragment(ss, msg, fragment,
  780|  14.7k|                               fragmentLen + DTLS_HS_HDR_LEN);
  ------------------
  |  |  639|  14.7k|#define DTLS_HS_HDR_LEN 12
  ------------------
  781|  14.7k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (781:13): [True: 0, False: 14.7k]
  ------------------
  782|      0|            return SECFailure;
  783|      0|        }
  784|       |
  785|  14.7k|        fragmentWritten = PR_TRUE;
  ------------------
  |  |  437|  14.7k|#define PR_TRUE 1
  ------------------
  786|  14.7k|        fragmentOffset += fragmentLen;
  787|  14.7k|    } while (fragmentOffset < contentLen);
  ------------------
  |  Branch (787:14): [True: 233, False: 14.5k]
  ------------------
  788|       |
  789|  14.6k|    if (!fragmentWritten) {
  ------------------
  |  Branch (789:9): [True: 40, False: 14.5k]
  ------------------
  790|       |        /* Nothing was written if we got here, so the whole message must have
  791|       |         * been acknowledged.  Discard it. */
  792|     40|        SSL_TRC(10, ("%d: SSL3[%d]: FragmentHandshake %d: removed",
  ------------------
  |  |   71|     40|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 40]
  |  |  ------------------
  |  |   72|     40|    ssl_Trace b
  ------------------
  793|     40|                     SSL_GETPID(), ss->fd, msgSeq));
  794|     40|        PR_REMOVE_LINK(&msg->link);
  ------------------
  |  |   72|     40|    PR_BEGIN_MACRO             \
  |  |  ------------------
  |  |  |  |  123|     40|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |   73|     40|    (_e)->prev->next = (_e)->next; \
  |  |   74|     40|    (_e)->next->prev = (_e)->prev; \
  |  |   75|     40|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|     40|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  795|     40|        dtls_FreeHandshakeMessage(msg);
  796|     40|    }
  797|       |
  798|  14.6k|    return SECSuccess;
  799|  14.6k|}
dtlscon.c:dtls_SendFragment:
  647|  16.4k|{
  648|  16.4k|    PRInt32 sent;
  649|  16.4k|    SECStatus rv;
  650|       |
  651|  16.4k|    PRINT_BUF(40, (ss, "dtls_SendFragment", data, len));
  ------------------
  |  |   74|  16.4k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 16.4k]
  |  |  ------------------
  |  |   75|  16.4k|    ssl_PrintBuf b
  ------------------
  652|  16.4k|    sent = ssl3_SendRecord(ss, msg->cwSpec, msg->type, data, len,
  653|  16.4k|                           ssl_SEND_FLAG_FORCE_INTO_BUFFER);
  ------------------
  |  |  223|  16.4k|#define ssl_SEND_FLAG_FORCE_INTO_BUFFER 0x40000000
  ------------------
  654|  16.4k|    if (sent != len) {
  ------------------
  |  Branch (654:9): [True: 0, False: 16.4k]
  ------------------
  655|      0|        if (sent != -1) {
  ------------------
  |  Branch (655:13): [True: 0, False: 0]
  ------------------
  656|      0|            PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  657|      0|        }
  658|      0|        return SECFailure;
  659|      0|    }
  660|       |
  661|       |    /* If another fragment won't fit, flush. */
  662|  16.4k|    if (ss->ssl3.mtu < ss->pendingBuf.len + DTLS_MIN_FRAGMENT) {
  ------------------
  |  |  640|  16.4k|#define DTLS_MIN_FRAGMENT (DTLS_HS_HDR_LEN + 1 + DTLS_MAX_EXPANSION)
  |  |  ------------------
  |  |  |  |  639|  16.4k|#define DTLS_HS_HDR_LEN 12
  |  |  ------------------
  |  |               #define DTLS_MIN_FRAGMENT (DTLS_HS_HDR_LEN + 1 + DTLS_MAX_EXPANSION)
  |  |  ------------------
  |  |  |  |   36|  16.4k|#define DTLS_MAX_EXPANSION (DTLS_RECORD_HEADER_LENGTH + 16 + 16 + 32)
  |  |  |  |  ------------------
  |  |  |  |  |  |   29|  16.4k|#define DTLS_RECORD_HEADER_LENGTH 13
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (662:9): [True: 353, False: 16.0k]
  ------------------
  663|    353|        SSL_TRC(20, ("%d: DTLS[%d]: dtls_SendFragment: flush",
  ------------------
  |  |   71|    353|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 353]
  |  |  ------------------
  |  |   72|    353|    ssl_Trace b
  ------------------
  664|    353|                     SSL_GETPID(), ss->fd));
  665|    353|        rv = dtls_SendSavedWriteData(ss);
  666|    353|        if (rv != SECSuccess) {
  ------------------
  |  Branch (666:13): [True: 0, False: 353]
  ------------------
  667|      0|            return SECFailure;
  668|      0|        }
  669|    353|    }
  670|  16.4k|    return SECSuccess;
  671|  16.4k|}
dtlscon.c:dtls_SendSavedWriteData:
  873|  13.4k|{
  874|  13.4k|    PRInt32 sent;
  875|       |
  876|  13.4k|    sent = ssl_SendSavedWriteData(ss);
  877|  13.4k|    if (sent < 0)
  ------------------
  |  Branch (877:9): [True: 0, False: 13.4k]
  ------------------
  878|      0|        return SECFailure;
  879|       |
  880|       |    /* We should always have complete writes b/c datagram sockets
  881|       |     * don't really block */
  882|  13.4k|    if (ss->pendingBuf.len > 0) {
  ------------------
  |  Branch (882:9): [True: 0, False: 13.4k]
  ------------------
  883|      0|        ssl_MapLowLevelError(SSL_ERROR_SOCKET_WRITE_FAILURE);
  884|      0|        return SECFailure;
  885|      0|    }
  886|       |
  887|       |    /* Update the largest message sent so we can adjust the MTU
  888|       |     * estimate if necessary */
  889|  13.4k|    if (sent > ss->ssl3.hs.maxMessageSent)
  ------------------
  |  Branch (889:9): [True: 10.7k, False: 2.65k]
  ------------------
  890|  10.7k|        ss->ssl3.hs.maxMessageSent = sent;
  891|       |
  892|  13.4k|    return SECSuccess;
  893|  13.4k|}
dtlscon.c:dtls_StartRetransmitTimer:
  944|  12.6k|{
  945|  12.6k|    ss->ssl3.hs.rtRetries = 0;
  946|  12.6k|    return dtls_StartTimer(ss, ss->ssl3.hs.rtTimer,
  947|  12.6k|                           DTLS_RETRANSMIT_INITIAL_MS,
  ------------------
  |  |  126|  12.6k|#define DTLS_RETRANSMIT_INITIAL_MS 50
  ------------------
  948|  12.6k|                           dtls_RetransmitTimerExpiredCb);
  949|  12.6k|}
dtlscon.c:dtls_ReadSequenceNumber:
 1356|   741k|{
 1357|   741k|    sslSequenceNumber cap;
 1358|   741k|    sslSequenceNumber partial;
 1359|   741k|    sslSequenceNumber seqNum;
 1360|   741k|    sslSequenceNumber mask;
 1361|       |
 1362|   741k|    if (dtls_IsLongHeader(spec->version, hdr[0])) {
  ------------------
  |  Branch (1362:9): [True: 730k, False: 10.8k]
  ------------------
 1363|   730k|        static const unsigned int seqNumOffset = 5; /* type, version, epoch */
 1364|   730k|        static const unsigned int seqNumLength = 6;
 1365|   730k|        sslReader r = SSL_READER(hdr + seqNumOffset, seqNumLength);
  ------------------
  |  |   85|   730k|    {                    \
  |  |   86|   730k|        { b, l }, 0      \
  |  |   87|   730k|    }
  ------------------
 1366|   730k|        (void)sslRead_ReadNumber(&r, seqNumLength, &seqNum);
 1367|   730k|        return seqNum;
 1368|   730k|    }
 1369|       |
 1370|       |    /* Only the least significant bits of the sequence number is available here.
 1371|       |     * This recovers the value based on the next expected sequence number.
 1372|       |     *
 1373|       |     * This works by determining the maximum possible sequence number, which is
 1374|       |     * half the range of possible values above the expected next value (the
 1375|       |     * expected next value is in |spec->seqNum|).  Then, the last part of the
 1376|       |     * sequence number is replaced.  If that causes the value to exceed the
 1377|       |     * maximum, subtract an entire range.
 1378|       |     */
 1379|  10.8k|    if (hdr[0] & 0x08) {
  ------------------
  |  Branch (1379:9): [True: 8.61k, False: 2.27k]
  ------------------
 1380|  8.61k|        cap = spec->nextSeqNum + (1ULL << 15);
 1381|  8.61k|        partial = (((sslSequenceNumber)hdr[1]) << 8) |
 1382|  8.61k|                  (sslSequenceNumber)hdr[2];
 1383|  8.61k|        mask = (1ULL << 16) - 1;
 1384|  8.61k|    } else {
 1385|  2.27k|        cap = spec->nextSeqNum + (1ULL << 7);
 1386|  2.27k|        partial = (sslSequenceNumber)hdr[1];
 1387|  2.27k|        mask = (1ULL << 8) - 1;
 1388|  2.27k|    }
 1389|  10.8k|    seqNum = (cap & ~mask) | partial;
 1390|       |    /* The second check prevents the value from underflowing if we get a large
 1391|       |     * gap at the start of a connection, where this subtraction would cause the
 1392|       |     * sequence number to wrap to near UINT64_MAX. */
 1393|  10.8k|    if ((partial > (cap & mask)) && (seqNum > mask)) {
  ------------------
  |  Branch (1393:9): [True: 5.33k, False: 5.54k]
  |  Branch (1393:37): [True: 0, False: 5.33k]
  ------------------
 1394|      0|        seqNum -= mask + 1;
 1395|      0|    }
 1396|  10.8k|    return seqNum;
 1397|   741k|}

ssl3_CheckCipherSuiteOrderConsistency:
  218|      1|{
  219|      1|    unsigned int i;
  220|       |
  221|      1|    PORT_Assert(SSL_NumImplementedCiphers == PR_ARRAY_SIZE(cipherSuites));
  ------------------
  |  |  120|      1|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      1|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  222|       |
  223|     72|    for (i = 0; i < PR_ARRAY_SIZE(cipherSuites); ++i) {
  ------------------
  |  |  167|     72|#define PR_ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
  ------------------
  |  Branch (223:17): [True: 71, False: 1]
  ------------------
  224|     71|        PORT_Assert(SSL_ImplementedCiphers[i] == cipherSuites[i].cipher_suite);
  ------------------
  |  |  120|     71|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|     71|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 71, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  225|     71|    }
  226|      1|}
ssl3_Alg2Mech:
  437|  1.31M|{
  438|  1.31M|    PORT_Assert(alg2Mech[calg].calg == calg);
  ------------------
  |  |  120|  1.31M|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.31M|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.31M, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  439|  1.31M|    return alg2Mech[calg].cmech;
  440|  1.31M|}
SSL_GetStatistics:
  545|  11.0k|{
  546|  11.0k|    return &ssl3stats;
  547|  11.0k|}
SSL_AtomicIncrementLong:
  561|  16.4k|{
  562|  16.4k|    if ((sizeof *x) == sizeof(PRInt32)) {
  ------------------
  |  Branch (562:9): [Folded - Ignored]
  ------------------
  563|      0|        PR_ATOMIC_INCREMENT((PRInt32 *)x);
  ------------------
  |  |  122|      0|#define PR_ATOMIC_INCREMENT(val) __sync_add_and_fetch(val, 1)
  ------------------
  564|  16.4k|    } else {
  565|  16.4k|        tooLong *tl = (tooLong *)x;
  566|  16.4k|        if (PR_ATOMIC_INCREMENT(&tl->low) == 0)
  ------------------
  |  |  122|  16.4k|#define PR_ATOMIC_INCREMENT(val) __sync_add_and_fetch(val, 1)
  ------------------
  |  Branch (566:13): [True: 0, False: 16.4k]
  ------------------
  567|      0|            PR_ATOMIC_INCREMENT(&tl->high);
  ------------------
  |  |  122|      0|#define PR_ATOMIC_INCREMENT(val) __sync_add_and_fetch(val, 1)
  ------------------
  568|  16.4k|    }
  569|  16.4k|}
ssl3_CipherSuiteAllowedForVersionRange:
  574|   714k|{
  575|   714k|    switch (cipherSuite) {
  576|  11.0k|        case TLS_DHE_RSA_WITH_AES_256_CBC_SHA256:
  ------------------
  |  |  128|  11.0k|#define TLS_DHE_RSA_WITH_AES_256_CBC_SHA256     0x006B
  ------------------
  |  Branch (576:9): [True: 11.0k, False: 703k]
  ------------------
  577|  22.1k|        case TLS_RSA_WITH_AES_256_CBC_SHA256:
  ------------------
  |  |  115|  22.1k|#define TLS_RSA_WITH_AES_256_CBC_SHA256         0x003D
  ------------------
  |  Branch (577:9): [True: 11.1k, False: 703k]
  ------------------
  578|  33.1k|        case TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256:
  ------------------
  |  |  190|  33.1k|#define TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 0xC023
  ------------------
  |  Branch (578:9): [True: 11.0k, False: 703k]
  ------------------
  579|  44.2k|        case TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384:
  ------------------
  |  |  191|  44.2k|#define TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 0xC024
  ------------------
  |  Branch (579:9): [True: 11.0k, False: 703k]
  ------------------
  580|  55.2k|        case TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256:
  ------------------
  |  |  192|  55.2k|#define TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256   0xC027
  ------------------
  |  Branch (580:9): [True: 11.0k, False: 703k]
  ------------------
  581|  66.3k|        case TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384:
  ------------------
  |  |  193|  66.3k|#define TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384   0xC028
  ------------------
  |  Branch (581:9): [True: 11.1k, False: 703k]
  ------------------
  582|  77.3k|        case TLS_DHE_RSA_WITH_AES_128_CBC_SHA256:
  ------------------
  |  |  126|  77.3k|#define TLS_DHE_RSA_WITH_AES_128_CBC_SHA256     0x0067
  ------------------
  |  Branch (582:9): [True: 11.0k, False: 703k]
  ------------------
  583|  88.3k|        case TLS_RSA_WITH_AES_128_CBC_SHA256:
  ------------------
  |  |  114|  88.3k|#define TLS_RSA_WITH_AES_128_CBC_SHA256         0x003C
  ------------------
  |  Branch (583:9): [True: 11.0k, False: 703k]
  ------------------
  584|  99.4k|        case TLS_RSA_WITH_AES_128_GCM_SHA256:
  ------------------
  |  |  139|  99.4k|#define TLS_RSA_WITH_AES_128_GCM_SHA256         0x009C
  ------------------
  |  Branch (584:9): [True: 11.0k, False: 703k]
  ------------------
  585|   110k|        case TLS_RSA_WITH_AES_256_GCM_SHA384:
  ------------------
  |  |  140|   110k|#define TLS_RSA_WITH_AES_256_GCM_SHA384         0x009D
  ------------------
  |  Branch (585:9): [True: 11.1k, False: 703k]
  ------------------
  586|   122k|        case TLS_DHE_DSS_WITH_AES_128_CBC_SHA256:
  ------------------
  |  |  117|   122k|#define TLS_DHE_DSS_WITH_AES_128_CBC_SHA256     0x0040
  ------------------
  |  Branch (586:9): [True: 11.6k, False: 702k]
  ------------------
  587|   133k|        case TLS_DHE_DSS_WITH_AES_256_CBC_SHA256:
  ------------------
  |  |  127|   133k|#define TLS_DHE_DSS_WITH_AES_256_CBC_SHA256     0x006A
  ------------------
  |  Branch (587:9): [True: 11.0k, False: 703k]
  ------------------
  588|   144k|        case TLS_RSA_WITH_NULL_SHA256:
  ------------------
  |  |  113|   144k|#define TLS_RSA_WITH_NULL_SHA256                0x003B
  ------------------
  |  Branch (588:9): [True: 11.1k, False: 703k]
  ------------------
  589|   155k|        case TLS_DHE_DSS_WITH_AES_128_GCM_SHA256:
  ------------------
  |  |  143|   155k|#define TLS_DHE_DSS_WITH_AES_128_GCM_SHA256     0x00A2
  ------------------
  |  Branch (589:9): [True: 11.0k, False: 703k]
  ------------------
  590|   166k|        case TLS_DHE_DSS_WITH_AES_256_GCM_SHA384:
  ------------------
  |  |  144|   166k|#define TLS_DHE_DSS_WITH_AES_256_GCM_SHA384     0x00A3
  ------------------
  |  Branch (590:9): [True: 11.0k, False: 703k]
  ------------------
  591|   177k|        case TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256:
  ------------------
  |  |  195|   177k|#define TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 0xC02B
  ------------------
  |  Branch (591:9): [True: 11.2k, False: 703k]
  ------------------
  592|   188k|        case TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384:
  ------------------
  |  |  196|   188k|#define TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 0xC02C
  ------------------
  |  Branch (592:9): [True: 11.0k, False: 703k]
  ------------------
  593|   199k|        case TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256:
  ------------------
  |  |  198|   199k|#define TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256   0xC02F
  ------------------
  |  Branch (593:9): [True: 11.0k, False: 703k]
  ------------------
  594|   211k|        case TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384:
  ------------------
  |  |  199|   211k|#define TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384   0xC030
  ------------------
  |  Branch (594:9): [True: 12.1k, False: 702k]
  ------------------
  595|   222k|        case TLS_DHE_RSA_WITH_AES_128_GCM_SHA256:
  ------------------
  |  |  141|   222k|#define TLS_DHE_RSA_WITH_AES_128_GCM_SHA256     0x009E
  ------------------
  |  Branch (595:9): [True: 11.0k, False: 703k]
  ------------------
  596|   233k|        case TLS_DHE_RSA_WITH_AES_256_GCM_SHA384:
  ------------------
  |  |  142|   233k|#define TLS_DHE_RSA_WITH_AES_256_GCM_SHA384     0x009F
  ------------------
  |  Branch (596:9): [True: 11.0k, False: 703k]
  ------------------
  597|   244k|        case TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256:
  ------------------
  |  |  204|   244k|#define TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 0xCCA9
  ------------------
  |  Branch (597:9): [True: 11.0k, False: 703k]
  ------------------
  598|   255k|        case TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256:
  ------------------
  |  |  203|   255k|#define TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256   0xCCA8
  ------------------
  |  Branch (598:9): [True: 11.0k, False: 703k]
  ------------------
  599|   266k|        case TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256:
  ------------------
  |  |  205|   266k|#define TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256     0xCCAA
  ------------------
  |  Branch (599:9): [True: 11.0k, False: 703k]
  ------------------
  600|   266k|            return vrange->max >= SSL_LIBRARY_VERSION_TLS_1_2 &&
  ------------------
  |  |   20|   533k|#define SSL_LIBRARY_VERSION_TLS_1_2             0x0303
  ------------------
  |  Branch (600:20): [True: 263k, False: 3.72k]
  ------------------
  601|   266k|                   vrange->min < SSL_LIBRARY_VERSION_TLS_1_3;
  ------------------
  |  |   21|   263k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (601:20): [True: 236k, False: 26.4k]
  ------------------
  602|       |
  603|       |        /* RFC 4492: ECC cipher suites need TLS extensions to negotiate curves and
  604|       |         * point formats.*/
  605|  11.0k|        case TLS_ECDH_ECDSA_WITH_NULL_SHA:
  ------------------
  |  |  160|  11.0k|#define TLS_ECDH_ECDSA_WITH_NULL_SHA            0xC001
  ------------------
  |  Branch (605:9): [True: 11.0k, False: 703k]
  ------------------
  606|  11.0k|        case TLS_ECDH_ECDSA_WITH_RC4_128_SHA:
  ------------------
  |  |  161|  11.0k|#define TLS_ECDH_ECDSA_WITH_RC4_128_SHA         0xC002
  ------------------
  |  Branch (606:9): [True: 1, False: 714k]
  ------------------
  607|  22.2k|        case TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA:
  ------------------
  |  |  162|  22.2k|#define TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA    0xC003
  ------------------
  |  Branch (607:9): [True: 11.2k, False: 703k]
  ------------------
  608|  33.3k|        case TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA:
  ------------------
  |  |  163|  33.3k|#define TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA     0xC004
  ------------------
  |  Branch (608:9): [True: 11.0k, False: 703k]
  ------------------
  609|  44.4k|        case TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA:
  ------------------
  |  |  164|  44.4k|#define TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA     0xC005
  ------------------
  |  Branch (609:9): [True: 11.1k, False: 703k]
  ------------------
  610|  55.5k|        case TLS_ECDHE_ECDSA_WITH_NULL_SHA:
  ------------------
  |  |  166|  55.5k|#define TLS_ECDHE_ECDSA_WITH_NULL_SHA           0xC006
  ------------------
  |  Branch (610:9): [True: 11.0k, False: 703k]
  ------------------
  611|  55.5k|        case TLS_ECDHE_ECDSA_WITH_RC4_128_SHA:
  ------------------
  |  |  167|  55.5k|#define TLS_ECDHE_ECDSA_WITH_RC4_128_SHA        0xC007
  ------------------
  |  Branch (611:9): [True: 2, False: 714k]
  ------------------
  612|  66.5k|        case TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA:
  ------------------
  |  |  168|  66.5k|#define TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA   0xC008
  ------------------
  |  Branch (612:9): [True: 11.0k, False: 703k]
  ------------------
  613|  77.5k|        case TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA:
  ------------------
  |  |  169|  77.5k|#define TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA    0xC009
  ------------------
  |  Branch (613:9): [True: 11.0k, False: 703k]
  ------------------
  614|  88.5k|        case TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA:
  ------------------
  |  |  170|  88.5k|#define TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA    0xC00A
  ------------------
  |  Branch (614:9): [True: 11.0k, False: 703k]
  ------------------
  615|  99.6k|        case TLS_ECDH_RSA_WITH_NULL_SHA:
  ------------------
  |  |  172|  99.6k|#define TLS_ECDH_RSA_WITH_NULL_SHA              0xC00B
  ------------------
  |  Branch (615:9): [True: 11.1k, False: 703k]
  ------------------
  616|  99.6k|        case TLS_ECDH_RSA_WITH_RC4_128_SHA:
  ------------------
  |  |  173|  99.6k|#define TLS_ECDH_RSA_WITH_RC4_128_SHA           0xC00C
  ------------------
  |  Branch (616:9): [True: 1, False: 714k]
  ------------------
  617|   110k|        case TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA:
  ------------------
  |  |  174|   110k|#define TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA      0xC00D
  ------------------
  |  Branch (617:9): [True: 11.0k, False: 703k]
  ------------------
  618|   121k|        case TLS_ECDH_RSA_WITH_AES_128_CBC_SHA:
  ------------------
  |  |  175|   121k|#define TLS_ECDH_RSA_WITH_AES_128_CBC_SHA       0xC00E
  ------------------
  |  Branch (618:9): [True: 11.0k, False: 703k]
  ------------------
  619|   132k|        case TLS_ECDH_RSA_WITH_AES_256_CBC_SHA:
  ------------------
  |  |  176|   132k|#define TLS_ECDH_RSA_WITH_AES_256_CBC_SHA       0xC00F
  ------------------
  |  Branch (619:9): [True: 11.0k, False: 703k]
  ------------------
  620|   143k|        case TLS_ECDHE_RSA_WITH_NULL_SHA:
  ------------------
  |  |  178|   143k|#define TLS_ECDHE_RSA_WITH_NULL_SHA             0xC010
  ------------------
  |  Branch (620:9): [True: 11.0k, False: 703k]
  ------------------
  621|   143k|        case TLS_ECDHE_RSA_WITH_RC4_128_SHA:
  ------------------
  |  |  179|   143k|#define TLS_ECDHE_RSA_WITH_RC4_128_SHA          0xC011
  ------------------
  |  Branch (621:9): [True: 1, False: 714k]
  ------------------
  622|   154k|        case TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA:
  ------------------
  |  |  180|   154k|#define TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA     0xC012
  ------------------
  |  Branch (622:9): [True: 11.0k, False: 703k]
  ------------------
  623|   165k|        case TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA:
  ------------------
  |  |  181|   165k|#define TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA      0xC013
  ------------------
  |  Branch (623:9): [True: 11.0k, False: 703k]
  ------------------
  624|   176k|        case TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA:
  ------------------
  |  |  182|   176k|#define TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA      0xC014
  ------------------
  |  Branch (624:9): [True: 11.0k, False: 703k]
  ------------------
  625|   176k|            return vrange->max >= SSL_LIBRARY_VERSION_TLS_1_0 &&
  ------------------
  |  |   18|   353k|#define SSL_LIBRARY_VERSION_TLS_1_0             0x0301
  ------------------
  |  Branch (625:20): [True: 176k, False: 0]
  ------------------
  626|   176k|                   vrange->min < SSL_LIBRARY_VERSION_TLS_1_3;
  ------------------
  |  |   21|   176k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (626:20): [True: 159k, False: 17.6k]
  ------------------
  627|       |
  628|  14.7k|        case TLS_AES_128_GCM_SHA256:
  ------------------
  |  |  208|  14.7k|#define TLS_AES_128_GCM_SHA256                0x1301
  ------------------
  |  Branch (628:9): [True: 14.7k, False: 699k]
  ------------------
  629|  26.0k|        case TLS_AES_256_GCM_SHA384:
  ------------------
  |  |  209|  26.0k|#define TLS_AES_256_GCM_SHA384                0x1302
  ------------------
  |  Branch (629:9): [True: 11.2k, False: 703k]
  ------------------
  630|  37.5k|        case TLS_CHACHA20_POLY1305_SHA256:
  ------------------
  |  |  210|  37.5k|#define TLS_CHACHA20_POLY1305_SHA256          0x1303
  ------------------
  |  Branch (630:9): [True: 11.4k, False: 702k]
  ------------------
  631|  37.5k|            return vrange->max >= SSL_LIBRARY_VERSION_TLS_1_3;
  ------------------
  |  |   21|  37.5k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  632|       |
  633|   233k|        default:
  ------------------
  |  Branch (633:9): [True: 233k, False: 481k]
  ------------------
  634|   233k|            return vrange->min < SSL_LIBRARY_VERSION_TLS_1_3;
  ------------------
  |  |   21|   233k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  635|   714k|    }
  636|   714k|}
ssl_LookupCipherSuiteDef:
  642|  2.03M|{
  643|  2.03M|    int cipher_suite_def_len =
  644|  2.03M|        sizeof(cipher_suite_defs) / sizeof(cipher_suite_defs[0]);
  645|  2.03M|    int i;
  646|       |
  647|  75.8M|    for (i = 0; i < cipher_suite_def_len; i++) {
  ------------------
  |  Branch (647:17): [True: 75.8M, False: 0]
  ------------------
  648|  75.8M|        if (cipher_suite_defs[i].cipher_suite == suite)
  ------------------
  |  Branch (648:13): [True: 2.03M, False: 73.7M]
  ------------------
  649|  2.03M|            return &cipher_suite_defs[i];
  650|  75.8M|    }
  651|      0|    PORT_Assert(PR_FALSE); /* We should never get here. */
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  652|      0|    PORT_SetError(SSL_ERROR_UNKNOWN_CIPHER_SUITE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  653|      0|    return NULL;
  654|  2.03M|}
ssl_LookupCipherSuiteCfg:
  675|  13.1k|{
  676|  13.1k|    return ssl_LookupCipherSuiteCfgMutable(suite,
  677|  13.1k|                                           CONST_CAST(ssl3CipherSuiteCfg, suites));
  ------------------
  |  |   96|  13.1k|#define CONST_CAST(T, X) ((T *)(X))
  ------------------
  678|  13.1k|}
ssl3_config_match_init:
  940|  19.4k|{
  941|  19.4k|    ssl3CipherSuiteCfg *suite;
  942|  19.4k|    const ssl3CipherSuiteDef *cipher_def;
  943|  19.4k|    SSLCipherAlgorithm cipher_alg;
  944|  19.4k|    CK_MECHANISM_TYPE cipher_mech;
  945|  19.4k|    SSLAuthType authType;
  946|  19.4k|    SSLKEAType keaType;
  947|  19.4k|    unsigned int i;
  948|  19.4k|    unsigned int numPresent = 0;
  949|  19.4k|    unsigned int numEnabled = 0;
  950|       |
  951|  19.4k|    PORT_Assert(ss);
  ------------------
  |  |  120|  19.4k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  19.4k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 19.4k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  952|  19.4k|    if (!ss) {
  ------------------
  |  Branch (952:9): [True: 0, False: 19.4k]
  ------------------
  953|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  954|      0|        return 0;
  955|      0|    }
  956|  19.4k|    if (SSL_ALL_VERSIONS_DISABLED(&ss->vrange)) {
  ------------------
  |  | 1503|  19.4k|    ((vrange)->min == SSL_LIBRARY_VERSION_NONE)
  |  |  ------------------
  |  |  |  | 1481|  19.4k|#define SSL_LIBRARY_VERSION_NONE 0
  |  |  ------------------
  |  |  |  Branch (1503:5): [True: 0, False: 19.4k]
  |  |  ------------------
  ------------------
  957|      0|        return 0;
  958|      0|    }
  959|  19.4k|    if (ss->sec.isServer && ss->psk &&
  ------------------
  |  Branch (959:9): [True: 0, False: 19.4k]
  |  Branch (959:29): [True: 0, False: 0]
  ------------------
  960|  19.4k|        PR_CLIST_IS_EMPTY(&ss->serverCerts) &&
  ------------------
  |  |   94|  19.4k|    ((_l)->next == (_l))
  |  |  ------------------
  |  |  |  Branch (94:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  961|  19.4k|        (ss->opt.requestCertificate || ss->opt.requireCertificate)) {
  ------------------
  |  Branch (961:10): [True: 0, False: 0]
  |  Branch (961:40): [True: 0, False: 0]
  ------------------
  962|       |        /* PSK and certificate auth cannot be combined. */
  963|      0|        PORT_SetError(SSL_ERROR_NO_CERTIFICATE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  964|      0|        return 0;
  965|      0|    }
  966|  19.4k|    if (ssl_CheckSignatureSchemes(ss) != SECSuccess) {
  ------------------
  |  Branch (966:9): [True: 0, False: 19.4k]
  ------------------
  967|      0|        return 0; /* Code already set. */
  968|      0|    }
  969|       |
  970|  19.4k|    ssl_FilterSupportedGroups(ss);
  971|  1.39M|    for (i = 0; i < ssl_V3_SUITES_IMPLEMENTED; i++) {
  ------------------
  |  |  245|  1.39M|#define ssl_V3_SUITES_IMPLEMENTED 71
  ------------------
  |  Branch (971:17): [True: 1.38M, False: 19.4k]
  ------------------
  972|  1.38M|        suite = &ss->cipherSuites[i];
  973|  1.38M|        if (suite->enabled) {
  ------------------
  |  Branch (973:13): [True: 1.30M, False: 70.5k]
  ------------------
  974|  1.30M|            ++numEnabled;
  975|       |            /* We need the cipher defs to see if we have a token that can handle
  976|       |             * this cipher.  It isn't part of the static definition.
  977|       |             */
  978|  1.30M|            cipher_def = ssl_LookupCipherSuiteDef(suite->cipher_suite);
  979|  1.30M|            if (!cipher_def) {
  ------------------
  |  Branch (979:17): [True: 0, False: 1.30M]
  ------------------
  980|      0|                suite->isPresent = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  981|      0|                continue;
  982|      0|            }
  983|  1.30M|            cipher_alg = ssl_GetBulkCipherDef(cipher_def)->calg;
  984|  1.30M|            cipher_mech = ssl3_Alg2Mech(cipher_alg);
  985|       |
  986|       |            /* Mark the suites that are backed by real tokens, certs and keys */
  987|  1.30M|            suite->isPresent = PR_TRUE;
  ------------------
  |  |  437|  1.30M|#define PR_TRUE 1
  ------------------
  988|       |
  989|  1.30M|            authType = kea_defs[cipher_def->key_exchange_alg].authKeyType;
  990|  1.30M|            if (authType != ssl_auth_null && authType != ssl_auth_tls13_any) {
  ------------------
  |  Branch (990:17): [True: 1.30M, False: 0]
  |  Branch (990:46): [True: 1.25M, False: 58.3k]
  ------------------
  991|  1.25M|                if (ss->sec.isServer &&
  ------------------
  |  Branch (991:21): [True: 0, False: 1.25M]
  ------------------
  992|  1.25M|                    !(ssl_HasCert(ss, ss->vrange.max, authType) &&
  ------------------
  |  Branch (992:23): [True: 0, False: 0]
  ------------------
  993|      0|                      ssl_HasSignatureScheme(ss, authType))) {
  ------------------
  |  Branch (993:23): [True: 0, False: 0]
  ------------------
  994|      0|                    suite->isPresent = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  995|  1.25M|                } else if (!PK11_TokenExists(auth_alg_defs[authType])) {
  ------------------
  |  Branch (995:28): [True: 0, False: 1.25M]
  ------------------
  996|      0|                    suite->isPresent = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  997|      0|                }
  998|  1.25M|            }
  999|       |
 1000|  1.30M|            keaType = kea_defs[cipher_def->key_exchange_alg].exchKeyType;
 1001|  1.30M|            if (keaType != ssl_kea_null &&
  ------------------
  |  Branch (1001:17): [True: 1.30M, False: 0]
  ------------------
 1002|  1.30M|                keaType != ssl_kea_tls13_any &&
  ------------------
  |  Branch (1002:17): [True: 1.25M, False: 58.3k]
  ------------------
 1003|  1.30M|                !PK11_TokenExists(kea_alg_defs[keaType])) {
  ------------------
  |  Branch (1003:17): [True: 0, False: 1.25M]
  ------------------
 1004|      0|                suite->isPresent = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 1005|      0|            }
 1006|       |
 1007|  1.30M|            if (cipher_alg != ssl_calg_null &&
  ------------------
  |  Branch (1007:17): [True: 1.17M, False: 136k]
  ------------------
 1008|  1.30M|                !PK11_TokenExists(cipher_mech)) {
  ------------------
  |  Branch (1008:17): [True: 0, False: 1.17M]
  ------------------
 1009|      0|                suite->isPresent = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 1010|      0|            }
 1011|       |
 1012|  1.30M|            if (suite->isPresent) {
  ------------------
  |  Branch (1012:17): [True: 1.30M, False: 0]
  ------------------
 1013|  1.30M|                ++numPresent;
 1014|  1.30M|            }
 1015|  1.30M|        }
 1016|  1.38M|    }
 1017|  19.4k|    PORT_AssertArg(numPresent > 0 || numEnabled == 0);
  ------------------
  |  |  124|  19.4k|#define PORT_AssertArg PR_ASSERT_ARG
  |  |  ------------------
  |  |  |  |  210|  19.4k|#define PR_ASSERT_ARG(_expr) PR_ASSERT(_expr)
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|  19.4k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:7): [True: 19.4k, False: 0]
  |  |  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1018|  19.4k|    if (numPresent == 0) {
  ------------------
  |  Branch (1018:9): [True: 0, False: 19.4k]
  ------------------
 1019|      0|        PORT_SetError(SSL_ERROR_NO_CIPHERS_SUPPORTED);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1020|      0|    }
 1021|  19.4k|    return numPresent;
 1022|  19.4k|}
ssl3_config_match:
 1030|   789k|{
 1031|   789k|    const ssl3CipherSuiteDef *cipher_def;
 1032|   789k|    const ssl3KEADef *kea_def;
 1033|       |
 1034|   789k|    if (!suite) {
  ------------------
  |  Branch (1034:9): [True: 0, False: 789k]
  ------------------
 1035|      0|        PORT_Assert(suite);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1036|      0|        return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 1037|      0|    }
 1038|       |
 1039|   789k|    PORT_Assert(policy != SSL_NOT_ALLOWED);
  ------------------
  |  |  120|   789k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|   789k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 789k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1040|   789k|    if (policy == SSL_NOT_ALLOWED)
  ------------------
  |  |  699|   789k|#define SSL_NOT_ALLOWED 0 /* or invalid or unimplemented */
  ------------------
  |  Branch (1040:9): [True: 0, False: 789k]
  ------------------
 1041|      0|        return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 1042|       |
 1043|   789k|    if (!suite->enabled || !suite->isPresent)
  ------------------
  |  Branch (1043:9): [True: 77.0k, False: 712k]
  |  Branch (1043:28): [True: 0, False: 712k]
  ------------------
 1044|  77.0k|        return PR_FALSE;
  ------------------
  |  |  438|  77.0k|#define PR_FALSE 0
  ------------------
 1045|       |
 1046|   712k|    if ((suite->policy == SSL_NOT_ALLOWED) ||
  ------------------
  |  |  699|   712k|#define SSL_NOT_ALLOWED 0 /* or invalid or unimplemented */
  ------------------
  |  Branch (1046:9): [True: 0, False: 712k]
  ------------------
 1047|   712k|        (suite->policy > policy))
  ------------------
  |  Branch (1047:9): [True: 0, False: 712k]
  ------------------
 1048|      0|        return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 1049|       |
 1050|   712k|    PORT_Assert(ss != NULL);
  ------------------
  |  |  120|   712k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|   712k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 712k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1051|   712k|    cipher_def = ssl_LookupCipherSuiteDef(suite->cipher_suite);
 1052|   712k|    PORT_Assert(cipher_def != NULL);
  ------------------
  |  |  120|   712k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|   712k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 712k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1053|   712k|    kea_def = &kea_defs[cipher_def->key_exchange_alg];
 1054|   712k|    PORT_Assert(kea_def != NULL);
  ------------------
  |  |  120|   712k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|   712k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 712k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1055|   712k|    if (!ssl_KEAEnabled(ss, kea_def->exchKeyType)) {
  ------------------
  |  Branch (1055:9): [True: 0, False: 712k]
  ------------------
 1056|      0|        return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 1057|      0|    }
 1058|       |
 1059|   712k|    if (ss->sec.isServer && !ssl_HasCert(ss, vrange->max, kea_def->authKeyType)) {
  ------------------
  |  Branch (1059:9): [True: 0, False: 712k]
  |  Branch (1059:29): [True: 0, False: 0]
  ------------------
 1060|      0|        return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 1061|      0|    }
 1062|       |
 1063|       |    /* If a PSK is selected, disable suites that use a different hash than
 1064|       |     * the PSK. We advertise non-PSK-compatible suites in the CH, as we could
 1065|       |     * fallback to certificate auth. The client handler will check hash
 1066|       |     * compatibility before committing to use the PSK. */
 1067|   712k|    if (ss->xtnData.selectedPsk) {
  ------------------
  |  Branch (1067:9): [True: 0, False: 712k]
  ------------------
 1068|      0|        if (ss->xtnData.selectedPsk->hash != cipher_def->prf_hash) {
  ------------------
  |  Branch (1068:13): [True: 0, False: 0]
  ------------------
 1069|      0|            return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 1070|      0|        }
 1071|      0|    }
 1072|       |
 1073|   712k|    return ssl3_CipherSuiteAllowedForVersionRange(suite->cipher_suite, vrange);
 1074|   712k|}
Null_Cipher:
 1103|  68.8k|{
 1104|  68.8k|    if (inputLen > maxOutputLen) {
  ------------------
  |  Branch (1104:9): [True: 0, False: 68.8k]
  ------------------
 1105|      0|        *outputLen = 0; /* Match PK11_CipherOp in setting outputLen */
 1106|      0|        PORT_SetError(SEC_ERROR_OUTPUT_LEN);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1107|      0|        return SECFailure;
 1108|      0|    }
 1109|  68.8k|    *outputLen = inputLen;
 1110|  68.8k|    if (inputLen > 0 && input != output) {
  ------------------
  |  Branch (1110:9): [True: 68.8k, False: 0]
  |  Branch (1110:25): [True: 61.3k, False: 7.52k]
  ------------------
 1111|  61.3k|        PORT_Memcpy(output, input, inputLen);
  ------------------
  |  |  180|  61.3k|#define PORT_Memcpy memcpy
  ------------------
 1112|  61.3k|    }
 1113|  68.8k|    return SECSuccess;
 1114|  68.8k|}
ssl_ClientReadVersion:
 1195|  9.08k|{
 1196|  9.08k|    SSL3ProtocolVersion v;
 1197|  9.08k|    PRUint32 temp;
 1198|  9.08k|    SECStatus rv;
 1199|       |
 1200|  9.08k|    rv = ssl3_ConsumeHandshakeNumber(ss, &temp, 2, b, len);
 1201|  9.08k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1201:9): [True: 9, False: 9.07k]
  ------------------
 1202|      9|        return SECFailure; /* alert has been sent */
 1203|      9|    }
 1204|  9.07k|    v = (SSL3ProtocolVersion)temp;
 1205|       |
 1206|  9.07k|    if (IS_DTLS(ss)) {
  ------------------
  |  |  892|  9.07k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 9.07k, False: 0]
  |  |  ------------------
  ------------------
 1207|  9.07k|        v = dtls_DTLSVersionToTLSVersion(v);
 1208|       |        /* Check for failure. */
 1209|  9.07k|        if (!v || v > SSL_LIBRARY_VERSION_MAX_SUPPORTED) {
  ------------------
  |  | 1497|  9.07k|#define SSL_LIBRARY_VERSION_MAX_SUPPORTED SSL_LIBRARY_VERSION_TLS_1_3
  |  |  ------------------
  |  |  |  |   21|  9.07k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  |  |  ------------------
  ------------------
  |  Branch (1209:13): [True: 4, False: 9.07k]
  |  Branch (1209:19): [True: 29, False: 9.04k]
  ------------------
 1210|     33|            SSL3_SendAlert(ss, alert_fatal, illegal_parameter);
 1211|     33|            return SECFailure;
 1212|     33|        }
 1213|  9.07k|    }
 1214|       |
 1215|       |    /* You can't negotiate TLS 1.3 this way. */
 1216|  9.04k|    if (v >= SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|  9.04k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (1216:9): [True: 2, False: 9.03k]
  ------------------
 1217|      2|        SSL3_SendAlert(ss, alert_fatal, illegal_parameter);
 1218|      2|        return SECFailure;
 1219|      2|    }
 1220|  9.03k|    *version = v;
 1221|  9.03k|    return SECSuccess;
 1222|  9.04k|}
ssl3_GetNewRandom:
 1226|  9.36k|{
 1227|  9.36k|    SECStatus rv;
 1228|       |
 1229|  9.36k|    rv = PK11_GenerateRandom(random, SSL3_RANDOM_LENGTH);
  ------------------
  |  |   24|  9.36k|#define SSL3_RANDOM_LENGTH 32
  ------------------
 1230|  9.36k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1230:9): [True: 0, False: 9.36k]
  ------------------
 1231|      0|        ssl_MapLowLevelError(SSL_ERROR_GENERATE_RANDOM_FAILURE);
 1232|      0|    }
 1233|  9.36k|    return rv;
 1234|  9.36k|}
ssl_VerifySignedHashesWithPubKey:
 1378|  2.48k|{
 1379|  2.48k|    SECItem *signature = NULL;
 1380|  2.48k|    SECStatus rv = SECFailure;
 1381|  2.48k|    SECItem hashItem;
 1382|  2.48k|    SECOidTag encAlg;
 1383|  2.48k|    SECOidTag hashAlg;
 1384|  2.48k|    void *pwArg = ss->pkcs11PinArg;
 1385|  2.48k|    PRBool isRsaPssScheme = ssl_IsRsaPssSignatureScheme(scheme);
 1386|       |
 1387|  2.48k|    PRINT_BUF(60, (NULL, "check signed hashes", buf->data, buf->len));
  ------------------
  |  |   74|  2.48k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 2.48k]
  |  |  ------------------
  |  |   75|  2.48k|    ssl_PrintBuf b
  ------------------
 1388|       |
 1389|  2.48k|    hashAlg = ssl3_HashTypeToOID(hash->hashAlg);
 1390|  2.48k|    switch (SECKEY_GetPublicKeyType(key)) {
 1391|  1.15k|        case rsaKey:
  ------------------
  |  Branch (1391:9): [True: 1.15k, False: 1.32k]
  ------------------
 1392|  1.15k|            encAlg = SEC_OID_PKCS1_RSA_ENCRYPTION;
 1393|  1.15k|            hashItem.data = hash->u.raw;
 1394|  1.15k|            hashItem.len = hash->len;
 1395|  1.15k|            if (scheme == ssl_sig_none) {
  ------------------
  |  Branch (1395:17): [True: 27, False: 1.13k]
  ------------------
 1396|     27|                scheme = ssl_sig_rsa_pkcs1_sha1md5;
 1397|     27|            }
 1398|  1.15k|            break;
 1399|  1.13k|        case dsaKey:
  ------------------
  |  Branch (1399:9): [True: 1.13k, False: 1.34k]
  ------------------
 1400|  1.13k|            encAlg = SEC_OID_ANSIX9_DSA_SIGNATURE;
 1401|       |            /* ssl_hash_none is used to specify the MD5/SHA1 concatenated hash.
 1402|       |             * In that case, we use just the SHA1 part. */
 1403|  1.13k|            if (hash->hashAlg == ssl_hash_none) {
  ------------------
  |  Branch (1403:17): [True: 2, False: 1.13k]
  ------------------
 1404|      2|                hashItem.data = hash->u.s.sha;
 1405|      2|                hashItem.len = sizeof(hash->u.s.sha);
 1406|  1.13k|            } else {
 1407|  1.13k|                hashItem.data = hash->u.raw;
 1408|  1.13k|                hashItem.len = hash->len;
 1409|  1.13k|            }
 1410|       |            /* Allow DER encoded DSA signatures in SSL 3.0 */
 1411|  1.13k|            if (ss->ssl3.prSpec->version > SSL_LIBRARY_VERSION_3_0 ||
  ------------------
  |  |   17|  2.27k|#define SSL_LIBRARY_VERSION_3_0                 0x0300
  ------------------
  |  Branch (1411:17): [True: 1.13k, False: 0]
  ------------------
 1412|  1.13k|                buf->len != SECKEY_SignatureLen(key)) {
  ------------------
  |  Branch (1412:17): [True: 0, False: 0]
  ------------------
 1413|  1.13k|                signature = DSAU_DecodeDerSigToLen(buf, SECKEY_SignatureLen(key));
 1414|  1.13k|                if (!signature) {
  ------------------
  |  Branch (1414:21): [True: 2, False: 1.13k]
  ------------------
 1415|      2|                    PORT_SetError(SSL_ERROR_BAD_HANDSHAKE_HASH_VALUE);
  ------------------
  |  |   65|      2|#define PORT_SetError PORT_SetError_Util
  ------------------
 1416|      2|                    goto loser;
 1417|      2|                }
 1418|  1.13k|                buf = signature;
 1419|  1.13k|            }
 1420|  1.13k|            if (scheme == ssl_sig_none) {
  ------------------
  |  Branch (1420:17): [True: 0, False: 1.13k]
  ------------------
 1421|      0|                scheme = ssl_sig_dsa_sha1;
 1422|      0|            }
 1423|  1.13k|            break;
 1424|       |
 1425|    187|        case ecKey:
  ------------------
  |  Branch (1425:9): [True: 187, False: 2.29k]
  ------------------
 1426|    187|            encAlg = SEC_OID_ANSIX962_EC_PUBLIC_KEY;
 1427|       |            /* ssl_hash_none is used to specify the MD5/SHA1 concatenated hash.
 1428|       |             * In that case, we use just the SHA1 part.
 1429|       |             * ECDSA signatures always encode the integers r and s using ASN.1
 1430|       |             * (unlike DSA where ASN.1 encoding is used with TLS but not with
 1431|       |             * SSL3). So we can use VFY_VerifyDigestDirect for ECDSA.
 1432|       |             */
 1433|    187|            if (hash->hashAlg == ssl_hash_none) {
  ------------------
  |  Branch (1433:17): [True: 8, False: 179]
  ------------------
 1434|      8|                hashAlg = SEC_OID_SHA1;
 1435|      8|                hashItem.data = hash->u.s.sha;
 1436|      8|                hashItem.len = sizeof(hash->u.s.sha);
 1437|    179|            } else {
 1438|    179|                hashItem.data = hash->u.raw;
 1439|    179|                hashItem.len = hash->len;
 1440|    179|            }
 1441|    187|            if (scheme == ssl_sig_none) {
  ------------------
  |  Branch (1441:17): [True: 8, False: 179]
  ------------------
 1442|      8|                scheme = ssl_sig_ecdsa_sha1;
 1443|      8|            }
 1444|    187|            break;
 1445|       |
 1446|      1|        default:
  ------------------
  |  Branch (1446:9): [True: 1, False: 2.48k]
  ------------------
 1447|      1|            PORT_SetError(SEC_ERROR_UNSUPPORTED_KEYALG);
  ------------------
  |  |   65|      1|#define PORT_SetError PORT_SetError_Util
  ------------------
 1448|      1|            goto loser;
 1449|  2.48k|    }
 1450|       |
 1451|  2.48k|    PRINT_BUF(60, (NULL, "hash(es) to be verified",
  ------------------
  |  |   74|  2.48k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 2.48k]
  |  |  ------------------
  |  |   75|  2.48k|    ssl_PrintBuf b
  ------------------
 1452|  2.48k|                   hashItem.data, hashItem.len));
 1453|       |
 1454|  2.48k|    if (isRsaPssScheme ||
  ------------------
  |  Branch (1454:9): [True: 1.11k, False: 1.36k]
  ------------------
 1455|  2.48k|        hashAlg == SEC_OID_UNKNOWN ||
  ------------------
  |  Branch (1455:9): [True: 27, False: 1.34k]
  ------------------
 1456|  2.48k|        SECKEY_GetPublicKeyType(key) == dsaKey) {
  ------------------
  |  Branch (1456:9): [True: 1.13k, False: 205]
  ------------------
 1457|       |        /* VFY_VerifyDigestDirect requires DSA signatures to be DER-encoded.
 1458|       |         * DSA signatures are DER-encoded in TLS but not in SSL3 and the code
 1459|       |         * above always removes the DER encoding of DSA signatures when
 1460|       |         * present. Thus DSA signatures are always verified with PK11_Verify.
 1461|       |         */
 1462|  2.27k|        CK_MECHANISM_TYPE mech = PK11_MapSignKeyType(key->keyType);
 1463|       |
 1464|  2.27k|        SECItem *params = NULL;
 1465|  2.27k|        CK_RSA_PKCS_PSS_PARAMS pssParams;
 1466|  2.27k|        SECItem pssParamsItem = { siBuffer,
 1467|  2.27k|                                  (unsigned char *)&pssParams,
 1468|  2.27k|                                  sizeof(pssParams) };
 1469|       |
 1470|  2.27k|        if (isRsaPssScheme) {
  ------------------
  |  Branch (1470:13): [True: 1.11k, False: 1.16k]
  ------------------
 1471|  1.11k|            pssParams.hashAlg = ssl3_GetHashMechanismByHashType(hash->hashAlg);
 1472|  1.11k|            pssParams.mgf = ssl3_GetMgfMechanismByHashType(hash->hashAlg);
 1473|  1.11k|            pssParams.sLen = hashItem.len;
 1474|  1.11k|            params = &pssParamsItem;
 1475|  1.11k|            mech = CKM_RSA_PKCS_PSS;
  ------------------
  |  |  741|  1.11k|#define CKM_RSA_PKCS_PSS 0x0000000DUL
  ------------------
 1476|  1.11k|        }
 1477|       |
 1478|  2.27k|        rv = PK11_VerifyWithMechanism(key, mech, params, buf, &hashItem, pwArg);
 1479|  2.27k|    } else {
 1480|    205|        rv = VFY_VerifyDigestDirect(&hashItem, key, buf, encAlg, hashAlg,
 1481|    205|                                    pwArg);
 1482|    205|    }
 1483|  2.48k|    if (signature) {
  ------------------
  |  Branch (1483:9): [True: 1.13k, False: 1.34k]
  ------------------
 1484|  1.13k|        SECITEM_FreeItem(signature, PR_TRUE);
  ------------------
  |  |  108|  1.13k|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                      SECITEM_FreeItem(signature, PR_TRUE);
  ------------------
  |  |  437|  1.13k|#define PR_TRUE 1
  ------------------
 1485|  1.13k|    }
 1486|  2.48k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1486:9): [True: 2.48k, False: 0]
  ------------------
 1487|  2.48k|        ssl_MapLowLevelError(SSL_ERROR_BAD_HANDSHAKE_HASH_VALUE);
 1488|  2.48k|    }
 1489|  2.48k|    if (!ss->sec.isServer) {
  ------------------
  |  Branch (1489:9): [True: 2.48k, False: 0]
  ------------------
 1490|  2.48k|        ss->sec.signatureScheme = scheme;
 1491|  2.48k|        ss->sec.authType = ssl_SignatureSchemeToAuthType(scheme);
 1492|  2.48k|    }
 1493|       |
 1494|  2.48k|loser:
 1495|       |#ifdef UNSAFE_FUZZER_MODE
 1496|       |    rv = SECSuccess;
 1497|       |    PORT_SetError(0);
 1498|       |#endif
 1499|  2.48k|    return rv;
 1500|  2.48k|}
ssl3_VerifySignedHashes:
 1506|  2.48k|{
 1507|  2.48k|    SECKEYPublicKey *pubKey =
 1508|  2.48k|        SECKEY_ExtractPublicKey(&ss->sec.peerCert->subjectPublicKeyInfo);
 1509|  2.48k|    if (pubKey == NULL) {
  ------------------
  |  Branch (1509:9): [True: 0, False: 2.48k]
  ------------------
 1510|      0|        ssl_MapLowLevelError(SSL_ERROR_EXTRACT_PUBLIC_KEY_FAILURE);
 1511|      0|        return SECFailure;
 1512|      0|    }
 1513|  2.48k|    SECStatus rv = ssl_VerifySignedHashesWithPubKey(ss, pubKey, scheme,
 1514|  2.48k|                                                    hash, buf);
 1515|  2.48k|    SECKEY_DestroyPublicKey(pubKey);
 1516|  2.48k|    return rv;
 1517|  2.48k|}
ssl3_ComputeCommonKeyHash:
 1529|  2.48k|{
 1530|  2.48k|    SECStatus rv;
 1531|  2.48k|    SECOidTag hashOID;
 1532|  2.48k|    PRUint32 policy;
 1533|       |
 1534|  2.48k|    if (hashAlg == ssl_hash_none) {
  ------------------
  |  Branch (1534:9): [True: 38, False: 2.44k]
  ------------------
 1535|     38|        if ((NSS_GetAlgorithmPolicy(SEC_OID_SHA1, &policy) == SECSuccess) &&
  ------------------
  |  Branch (1535:13): [True: 38, False: 0]
  ------------------
 1536|     38|            !(policy & NSS_USE_ALG_IN_SSL_KX)) {
  ------------------
  |  |  572|     38|#define NSS_USE_ALG_IN_SSL_KX 0x00000004           /* used in SSL key exchange */
  ------------------
  |  Branch (1536:13): [True: 0, False: 38]
  ------------------
 1537|      0|            ssl_MapLowLevelError(SSL_ERROR_UNSUPPORTED_HASH_ALGORITHM);
 1538|      0|            return SECFailure;
 1539|      0|        }
 1540|     38|        rv = PK11_HashBuf(SEC_OID_MD5, hashes->u.s.md5, hashBuf, bufLen);
 1541|     38|        if (rv != SECSuccess) {
  ------------------
  |  Branch (1541:13): [True: 0, False: 38]
  ------------------
 1542|      0|            ssl_MapLowLevelError(SSL_ERROR_MD5_DIGEST_FAILURE);
 1543|      0|            return rv;
 1544|      0|        }
 1545|     38|        rv = PK11_HashBuf(SEC_OID_SHA1, hashes->u.s.sha, hashBuf, bufLen);
 1546|     38|        if (rv != SECSuccess) {
  ------------------
  |  Branch (1546:13): [True: 0, False: 38]
  ------------------
 1547|      0|            ssl_MapLowLevelError(SSL_ERROR_SHA_DIGEST_FAILURE);
 1548|      0|            return rv;
 1549|      0|        }
 1550|     38|        hashes->len = MD5_LENGTH + SHA1_LENGTH;
  ------------------
  |  |   38|     38|#define MD5_LENGTH 16
  ------------------
                      hashes->len = MD5_LENGTH + SHA1_LENGTH;
  ------------------
  |  |   39|     38|#define SHA1_LENGTH 20
  ------------------
 1551|  2.44k|    } else {
 1552|  2.44k|        hashOID = ssl3_HashTypeToOID(hashAlg);
 1553|  2.44k|        if ((NSS_GetAlgorithmPolicy(hashOID, &policy) == SECSuccess) &&
  ------------------
  |  Branch (1553:13): [True: 2.44k, False: 0]
  ------------------
 1554|  2.44k|            !(policy & NSS_USE_ALG_IN_SSL_KX)) {
  ------------------
  |  |  572|  2.44k|#define NSS_USE_ALG_IN_SSL_KX 0x00000004           /* used in SSL key exchange */
  ------------------
  |  Branch (1554:13): [True: 0, False: 2.44k]
  ------------------
 1555|      0|            ssl_MapLowLevelError(SSL_ERROR_UNSUPPORTED_HASH_ALGORITHM);
 1556|      0|            return SECFailure;
 1557|      0|        }
 1558|  2.44k|        hashes->len = HASH_ResultLenByOidTag(hashOID);
 1559|  2.44k|        if (hashes->len == 0 || hashes->len > sizeof(hashes->u.raw)) {
  ------------------
  |  Branch (1559:13): [True: 0, False: 2.44k]
  |  Branch (1559:33): [True: 0, False: 2.44k]
  ------------------
 1560|      0|            ssl_MapLowLevelError(SSL_ERROR_UNSUPPORTED_HASH_ALGORITHM);
 1561|      0|            return SECFailure;
 1562|      0|        }
 1563|  2.44k|        rv = PK11_HashBuf(hashOID, hashes->u.raw, hashBuf, bufLen);
 1564|  2.44k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (1564:13): [True: 0, False: 2.44k]
  ------------------
 1565|      0|            ssl_MapLowLevelError(SSL_ERROR_DIGEST_FAILURE);
 1566|      0|            return rv;
 1567|      0|        }
 1568|  2.44k|    }
 1569|  2.48k|    hashes->hashAlg = hashAlg;
 1570|  2.48k|    return SECSuccess;
 1571|  2.48k|}
ssl3_SetupBothPendingCipherSpecs:
 1693|  5.45k|{
 1694|  5.45k|    ssl3CipherSuite suite = ss->ssl3.hs.cipher_suite;
 1695|  5.45k|    SSL3KeyExchangeAlgorithm kea;
 1696|  5.45k|    const ssl3CipherSuiteDef *suiteDef;
 1697|  5.45k|    SECStatus rv;
 1698|       |
 1699|  5.45k|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|  5.45k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  8.06k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 2.84k, False: 2.60k]
  |  |  |  |  |  Branch (208:7): [True: 2.60k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1700|  5.45k|    PORT_Assert(ss->version < SSL_LIBRARY_VERSION_TLS_1_3);
  ------------------
  |  |  120|  5.45k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  5.45k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 5.45k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1701|       |
 1702|  5.45k|    ssl_GetSpecWriteLock(ss); /*******************************/
  ------------------
  |  | 1435|  5.45k|    {                                            \
  |  | 1436|  5.45k|        if (!ss->opt.noLocks)                    \
  |  |  ------------------
  |  |  |  Branch (1436:13): [True: 2.60k, False: 2.84k]
  |  |  ------------------
  |  | 1437|  5.45k|            NSSRWLock_LockWrite((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   48|  2.60k|#define NSSRWLock_LockWrite NSSRWLock_LockWrite_Util
  |  |  ------------------
  |  | 1438|  5.45k|    }
  ------------------
 1703|       |
 1704|       |    /* This hack provides maximal interoperability with SSL 3 servers. */
 1705|  5.45k|    if (ss->ssl3.cwSpec->macDef->mac == ssl_mac_null) {
  ------------------
  |  Branch (1705:9): [True: 5.45k, False: 0]
  ------------------
 1706|       |        /* SSL records are not being MACed. */
 1707|  5.45k|        ss->ssl3.cwSpec->version = ss->version;
 1708|  5.45k|    }
 1709|       |
 1710|  5.45k|    SSL_TRC(3, ("%d: SSL3[%d]: Set XXX Pending Cipher Suite to 0x%04x",
  ------------------
  |  |   71|  5.45k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 5.45k]
  |  |  ------------------
  |  |   72|  5.45k|    ssl_Trace b
  ------------------
 1711|  5.45k|                SSL_GETPID(), ss->fd, suite));
 1712|       |
 1713|  5.45k|    suiteDef = ssl_LookupCipherSuiteDef(suite);
 1714|  5.45k|    if (suiteDef == NULL) {
  ------------------
  |  Branch (1714:9): [True: 0, False: 5.45k]
  ------------------
 1715|      0|        goto loser;
 1716|      0|    }
 1717|       |
 1718|  5.45k|    if (IS_DTLS(ss)) {
  ------------------
  |  |  892|  5.45k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 5.45k, False: 0]
  |  |  ------------------
  ------------------
 1719|       |        /* Double-check that we did not pick an RC4 suite */
 1720|  5.45k|        PORT_Assert(suiteDef->bulk_cipher_alg != cipher_rc4);
  ------------------
  |  |  120|  5.45k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  5.45k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 5.45k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1721|  5.45k|    }
 1722|       |
 1723|  5.45k|    ss->ssl3.hs.suite_def = suiteDef;
 1724|       |
 1725|  5.45k|    kea = suiteDef->key_exchange_alg;
 1726|  5.45k|    ss->ssl3.hs.kea_def = &kea_defs[kea];
 1727|  5.45k|    PORT_Assert(ss->ssl3.hs.kea_def->kea == kea);
  ------------------
  |  |  120|  5.45k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  5.45k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 5.45k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1728|       |
 1729|  5.45k|    rv = ssl3_SetupPendingCipherSpec(ss, ssl_secret_read, suiteDef,
 1730|  5.45k|                                     &ss->ssl3.prSpec);
 1731|  5.45k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1731:9): [True: 0, False: 5.45k]
  ------------------
 1732|      0|        goto loser;
 1733|      0|    }
 1734|  5.45k|    rv = ssl3_SetupPendingCipherSpec(ss, ssl_secret_write, suiteDef,
 1735|  5.45k|                                     &ss->ssl3.pwSpec);
 1736|  5.45k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1736:9): [True: 0, False: 5.45k]
  ------------------
 1737|      0|        goto loser;
 1738|      0|    }
 1739|       |
 1740|  5.45k|    if (ssl3_ExtensionNegotiated(ss, ssl_record_size_limit_xtn)) {
  ------------------
  |  Branch (1740:9): [True: 260, False: 5.19k]
  ------------------
 1741|    260|        ss->ssl3.prSpec->recordSizeLimit = PR_MIN(MAX_FRAGMENT_LENGTH,
  ------------------
  |  |  158|    260|#define PR_MIN(x,y)     ((x)<(y)?(x):(y))
  |  |  ------------------
  |  |  |  Branch (158:26): [True: 260, False: 0]
  |  |  ------------------
  ------------------
 1742|    260|                                                  ss->opt.recordSizeLimit);
 1743|    260|        ss->ssl3.pwSpec->recordSizeLimit = PR_MIN(MAX_FRAGMENT_LENGTH,
  ------------------
  |  |  158|    260|#define PR_MIN(x,y)     ((x)<(y)?(x):(y))
  |  |  ------------------
  |  |  |  Branch (158:26): [True: 0, False: 260]
  |  |  ------------------
  ------------------
 1744|    260|                                                  ss->xtnData.recordSizeLimit);
 1745|    260|    }
 1746|       |
 1747|  5.45k|    ssl_ReleaseSpecWriteLock(ss); /*******************************/
  ------------------
  |  | 1440|  5.45k|    {                                              \
  |  | 1441|  5.45k|        if (!ss->opt.noLocks)                      \
  |  |  ------------------
  |  |  |  Branch (1441:13): [True: 2.60k, False: 2.84k]
  |  |  ------------------
  |  | 1442|  5.45k|            NSSRWLock_UnlockWrite((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   51|  2.60k|#define NSSRWLock_UnlockWrite NSSRWLock_UnlockWrite_Util
  |  |  ------------------
  |  | 1443|  5.45k|    }
  ------------------
 1748|  5.45k|    return SECSuccess;
 1749|       |
 1750|      0|loser:
 1751|      0|    ssl_ReleaseSpecWriteLock(ss);
  ------------------
  |  | 1440|      0|    {                                              \
  |  | 1441|      0|        if (!ss->opt.noLocks)                      \
  |  |  ------------------
  |  |  |  Branch (1441:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1442|      0|            NSSRWLock_UnlockWrite((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   51|      0|#define NSSRWLock_UnlockWrite NSSRWLock_UnlockWrite_Util
  |  |  ------------------
  |  | 1443|      0|    }
  ------------------
 1752|      0|    return SECFailure;
 1753|  5.45k|}
ssl3_InitPendingCipherSpecs:
 1898|  1.62k|{
 1899|  1.62k|    PK11SymKey *masterSecret;
 1900|  1.62k|    ssl3CipherSpec *pwSpec;
 1901|  1.62k|    ssl3CipherSpec *prSpec;
 1902|  1.62k|    SECStatus rv;
 1903|       |
 1904|  1.62k|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|  1.62k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  2.41k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 836, False: 789]
  |  |  |  |  |  Branch (208:7): [True: 789, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1905|  1.62k|    PORT_Assert(secret);
  ------------------
  |  |  120|  1.62k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.62k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.62k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1906|       |
 1907|  1.62k|    ssl_GetSpecWriteLock(ss); /**************************************/
  ------------------
  |  | 1435|  1.62k|    {                                            \
  |  | 1436|  1.62k|        if (!ss->opt.noLocks)                    \
  |  |  ------------------
  |  |  |  Branch (1436:13): [True: 789, False: 836]
  |  |  ------------------
  |  | 1437|  1.62k|            NSSRWLock_LockWrite((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   48|    789|#define NSSRWLock_LockWrite NSSRWLock_LockWrite_Util
  |  |  ------------------
  |  | 1438|  1.62k|    }
  ------------------
 1908|       |
 1909|  1.62k|    PORT_Assert(ss->ssl3.pwSpec);
  ------------------
  |  |  120|  1.62k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.62k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.62k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1910|  1.62k|    PORT_Assert(ss->ssl3.cwSpec->epoch == ss->ssl3.crSpec->epoch);
  ------------------
  |  |  120|  1.62k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.62k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.62k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1911|  1.62k|    prSpec = ss->ssl3.prSpec;
 1912|  1.62k|    pwSpec = ss->ssl3.pwSpec;
 1913|       |
 1914|  1.62k|    if (ss->ssl3.cwSpec->epoch == PR_UINT16_MAX) {
  ------------------
  |  |  270|  1.62k|#define PR_UINT16_MAX 65535U
  ------------------
  |  Branch (1914:9): [True: 0, False: 1.62k]
  ------------------
 1915|       |        /* The problem here is that we have rehandshaked too many
 1916|       |         * times (you are not allowed to wrap the epoch). The
 1917|       |         * spec says you should be discarding the connection
 1918|       |         * and start over, so not much we can do here. */
 1919|      0|        PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1920|      0|        goto loser;
 1921|      0|    }
 1922|       |
 1923|  1.62k|    if (derive) {
  ------------------
  |  Branch (1923:9): [True: 1.62k, False: 0]
  ------------------
 1924|  1.62k|        rv = ssl3_ComputeMasterSecret(ss, secret, &masterSecret);
 1925|  1.62k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (1925:13): [True: 0, False: 1.62k]
  ------------------
 1926|      0|            goto loser;
 1927|      0|        }
 1928|  1.62k|    } else {
 1929|      0|        masterSecret = secret;
 1930|      0|    }
 1931|       |
 1932|  1.62k|    PORT_Assert(masterSecret);
  ------------------
  |  |  120|  1.62k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.62k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.62k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1933|  1.62k|    rv = ssl3_DeriveConnectionKeys(ss, masterSecret);
 1934|  1.62k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1934:9): [True: 0, False: 1.62k]
  ------------------
 1935|      0|        if (derive) {
  ------------------
  |  Branch (1935:13): [True: 0, False: 0]
  ------------------
 1936|       |            /* masterSecret was created here. */
 1937|      0|            PK11_FreeSymKey(masterSecret);
 1938|      0|        }
 1939|      0|        goto loser;
 1940|      0|    }
 1941|       |
 1942|       |    /* Both cipher specs maintain a reference to the master secret, since each
 1943|       |     * is managed and freed independently. */
 1944|  1.62k|    prSpec->masterSecret = masterSecret;
 1945|  1.62k|    pwSpec->masterSecret = PK11_ReferenceSymKey(masterSecret);
 1946|  1.62k|    rv = ssl3_InitPendingContexts(ss, ss->ssl3.prSpec);
 1947|  1.62k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1947:9): [True: 0, False: 1.62k]
  ------------------
 1948|      0|        goto loser;
 1949|      0|    }
 1950|       |
 1951|  1.62k|    rv = ssl3_InitPendingContexts(ss, ss->ssl3.pwSpec);
 1952|  1.62k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1952:9): [True: 0, False: 1.62k]
  ------------------
 1953|      0|        goto loser;
 1954|      0|    }
 1955|       |
 1956|  1.62k|    ssl_ReleaseSpecWriteLock(ss); /******************************/
  ------------------
  |  | 1440|  1.62k|    {                                              \
  |  | 1441|  1.62k|        if (!ss->opt.noLocks)                      \
  |  |  ------------------
  |  |  |  Branch (1441:13): [True: 789, False: 836]
  |  |  ------------------
  |  | 1442|  1.62k|            NSSRWLock_UnlockWrite((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   51|    789|#define NSSRWLock_UnlockWrite NSSRWLock_UnlockWrite_Util
  |  |  ------------------
  |  | 1443|  1.62k|    }
  ------------------
 1957|  1.62k|    return SECSuccess;
 1958|       |
 1959|      0|loser:
 1960|      0|    ssl_ReleaseSpecWriteLock(ss); /******************************/
  ------------------
  |  | 1440|      0|    {                                              \
  |  | 1441|      0|        if (!ss->opt.noLocks)                      \
  |  |  ------------------
  |  |  |  Branch (1441:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1442|      0|            NSSRWLock_UnlockWrite((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   51|      0|#define NSSRWLock_UnlockWrite NSSRWLock_UnlockWrite_Util
  |  |  ------------------
  |  | 1443|      0|    }
  ------------------
 1961|      0|    ssl_MapLowLevelError(SSL_ERROR_SESSION_KEY_GEN_FAILURE);
 1962|      0|    return SECFailure;
 1963|  1.62k|}
ssl3_MACEncryptRecord:
 2143|  9.98k|{
 2144|  9.98k|    SECStatus rv;
 2145|  9.98k|    PRUint32 macLen = 0;
 2146|  9.98k|    PRUint32 fragLen;
 2147|  9.98k|    PRUint32 p1Len, p2Len, oddLen = 0;
 2148|  9.98k|    unsigned int ivLen = 0;
 2149|  9.98k|    unsigned char pseudoHeaderBuf[13];
 2150|  9.98k|    sslBuffer pseudoHeader = SSL_BUFFER(pseudoHeaderBuf);
  ------------------
  |  |   34|  9.98k|#define SSL_BUFFER(b) SSL_BUFFER_FIXED(b, sizeof(b))
  |  |  ------------------
  |  |  |  |   27|  9.98k|    {                               \
  |  |  |  |   28|  9.98k|        b, 0, maxlen, PR_TRUE       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  437|  9.98k|#define PR_TRUE 1
  |  |  |  |  ------------------
  |  |  |  |   29|  9.98k|    }
  |  |  ------------------
  ------------------
 2151|  9.98k|    unsigned int len;
 2152|       |
 2153|  9.98k|    if (cwSpec->cipherDef->type == type_block &&
  ------------------
  |  Branch (2153:9): [True: 978, False: 9.01k]
  ------------------
 2154|  9.98k|        cwSpec->version >= SSL_LIBRARY_VERSION_TLS_1_1) {
  ------------------
  |  |   19|    978|#define SSL_LIBRARY_VERSION_TLS_1_1             0x0302
  ------------------
  |  Branch (2154:9): [True: 978, False: 0]
  ------------------
 2155|       |        /* Prepend the per-record explicit IV using technique 2b from
 2156|       |         * RFC 4346 section 6.2.3.2: The IV is a cryptographically
 2157|       |         * strong random number XORed with the CBC residue from the previous
 2158|       |         * record.
 2159|       |         */
 2160|    978|        ivLen = cwSpec->cipherDef->iv_size;
 2161|    978|        if (ivLen > SSL_BUFFER_SPACE(wrBuf)) {
  ------------------
  |  |   38|    978|#define SSL_BUFFER_SPACE(b) ((b)->space - (b)->len)
  ------------------
  |  Branch (2161:13): [True: 0, False: 978]
  ------------------
 2162|      0|            PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2163|      0|            return SECFailure;
 2164|      0|        }
 2165|    978|        rv = PK11_GenerateRandom(SSL_BUFFER_NEXT(wrBuf), ivLen);
  ------------------
  |  |   37|    978|#define SSL_BUFFER_NEXT(b) ((b)->buf + (b)->len)
  ------------------
 2166|    978|        if (rv != SECSuccess) {
  ------------------
  |  Branch (2166:13): [True: 0, False: 978]
  ------------------
 2167|      0|            ssl_MapLowLevelError(SSL_ERROR_GENERATE_RANDOM_FAILURE);
 2168|      0|            return rv;
 2169|      0|        }
 2170|    978|        rv = cwSpec->cipher(cwSpec->cipherContext,
 2171|    978|                            SSL_BUFFER_NEXT(wrBuf), /* output */
  ------------------
  |  |   37|    978|#define SSL_BUFFER_NEXT(b) ((b)->buf + (b)->len)
  ------------------
 2172|    978|                            &len,                   /* outlen */
 2173|    978|                            ivLen,                  /* max outlen */
 2174|    978|                            SSL_BUFFER_NEXT(wrBuf), /* input */
  ------------------
  |  |   37|    978|#define SSL_BUFFER_NEXT(b) ((b)->buf + (b)->len)
  ------------------
 2175|    978|                            ivLen);                 /* input len */
 2176|    978|        if (rv != SECSuccess || len != ivLen) {
  ------------------
  |  Branch (2176:13): [True: 0, False: 978]
  |  Branch (2176:33): [True: 0, False: 978]
  ------------------
 2177|      0|            PORT_SetError(SSL_ERROR_ENCRYPTION_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2178|      0|            return SECFailure;
 2179|      0|        }
 2180|       |
 2181|    978|        rv = sslBuffer_Skip(wrBuf, len, NULL);
 2182|    978|        PORT_Assert(rv == SECSuccess); /* Can't fail. */
  ------------------
  |  |  120|    978|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    978|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 978, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2183|    978|    }
 2184|  9.98k|    rv = ssl3_BuildRecordPseudoHeader(
 2185|  9.98k|        cwSpec->epoch, cwSpec->nextSeqNum, ct,
 2186|  9.98k|        cwSpec->version >= SSL_LIBRARY_VERSION_TLS_1_0, cwSpec->recordVersion,
  ------------------
  |  |   18|  9.98k|#define SSL_LIBRARY_VERSION_TLS_1_0             0x0301
  ------------------
 2187|  9.98k|        isDTLS, contentLen, &pseudoHeader, cwSpec->version);
 2188|  9.98k|    PORT_Assert(rv == SECSuccess);
  ------------------
  |  |  120|  9.98k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  9.98k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 9.98k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2189|  9.98k|    if (cwSpec->cipherDef->type == type_aead) {
  ------------------
  |  Branch (2189:9): [True: 130, False: 9.85k]
  ------------------
 2190|    130|        const unsigned int nonceLen = cwSpec->cipherDef->explicit_nonce_size;
 2191|    130|        const unsigned int tagLen = cwSpec->cipherDef->tag_size;
 2192|    130|        unsigned int ivOffset = 0;
 2193|    130|        CK_GENERATOR_FUNCTION gen;
 2194|       |        /* ivOut includes the iv and the nonce and is the internal iv/nonce
 2195|       |         * for the AEAD function. On Encrypt, this is an in/out parameter */
 2196|    130|        unsigned char ivOut[MAX_IV_LENGTH];
 2197|    130|        ivLen = cwSpec->cipherDef->iv_size;
 2198|       |
 2199|    130|        PORT_Assert((ivLen + nonceLen) <= MAX_IV_LENGTH);
  ------------------
  |  |  120|    130|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    130|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 130, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2200|    130|        PORT_Assert((ivLen + nonceLen) >= sizeof(sslSequenceNumber));
  ------------------
  |  |  120|    130|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    130|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 130, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2201|       |
 2202|    130|        if (nonceLen + contentLen + tagLen > SSL_BUFFER_SPACE(wrBuf)) {
  ------------------
  |  |   38|    130|#define SSL_BUFFER_SPACE(b) ((b)->space - (b)->len)
  ------------------
  |  Branch (2202:13): [True: 0, False: 130]
  ------------------
 2203|      0|            PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2204|      0|            return SECFailure;
 2205|      0|        }
 2206|       |
 2207|    130|        if (nonceLen == 0) {
  ------------------
  |  Branch (2207:13): [True: 0, False: 130]
  ------------------
 2208|      0|            ivOffset = ivLen - sizeof(sslSequenceNumber);
 2209|      0|            gen = CKG_GENERATE_COUNTER_XOR;
  ------------------
  |  | 1995|      0|#define CKG_GENERATE_COUNTER_XOR 0x00000004UL
  ------------------
 2210|    130|        } else {
 2211|    130|            ivOffset = ivLen;
 2212|    130|            gen = CKG_GENERATE_COUNTER;
  ------------------
  |  | 1993|    130|#define CKG_GENERATE_COUNTER 0x00000002UL
  ------------------
 2213|    130|        }
 2214|    130|        ivOffset = tls13_SetupAeadIv(isDTLS, cwSpec->version, ivOut, cwSpec->keyMaterial.iv,
 2215|    130|                                     ivOffset, ivLen, cwSpec->epoch);
 2216|    130|        rv = tls13_AEAD(cwSpec->cipherContext,
 2217|    130|                        PR_FALSE,
  ------------------
  |  |  438|    130|#define PR_FALSE 0
  ------------------
 2218|    130|                        gen, ivOffset * BPB,                /* iv generator params */
  ------------------
  |  |  122|    130|#define BPB 8 /* Bits Per Byte */
  ------------------
 2219|    130|                        ivOut,                              /* iv in  */
 2220|    130|                        ivOut,                              /* iv out */
 2221|    130|                        ivLen + nonceLen,                   /* full iv length */
 2222|    130|                        NULL, 0,                            /* nonce is generated*/
 2223|    130|                        SSL_BUFFER_BASE(&pseudoHeader),     /* aad */
  ------------------
  |  |   35|    130|#define SSL_BUFFER_BASE(b) ((b)->buf)
  ------------------
 2224|    130|                        SSL_BUFFER_LEN(&pseudoHeader),      /* aadlen */
  ------------------
  |  |   36|    130|#define SSL_BUFFER_LEN(b) ((b)->len)
  ------------------
 2225|    130|                        SSL_BUFFER_NEXT(wrBuf) + nonceLen,  /* output  */
  ------------------
  |  |   37|    130|#define SSL_BUFFER_NEXT(b) ((b)->buf + (b)->len)
  ------------------
 2226|    130|                        &len,                               /* out len */
 2227|    130|                        SSL_BUFFER_SPACE(wrBuf) - nonceLen, /* max out */
  ------------------
  |  |   38|    130|#define SSL_BUFFER_SPACE(b) ((b)->space - (b)->len)
  ------------------
 2228|    130|                        tagLen,
 2229|    130|                        pIn, contentLen); /* input   */
 2230|    130|        if (rv != SECSuccess) {
  ------------------
  |  Branch (2230:13): [True: 0, False: 130]
  ------------------
 2231|      0|            PORT_SetError(SSL_ERROR_ENCRYPTION_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2232|      0|            return SECFailure;
 2233|      0|        }
 2234|    130|        len += nonceLen; /* include the nonce at the beginning */
 2235|       |        /* copy out the generated iv if we are using explict nonces */
 2236|    130|        if (nonceLen) {
  ------------------
  |  Branch (2236:13): [True: 130, False: 0]
  ------------------
 2237|    130|            PORT_Memcpy(SSL_BUFFER_NEXT(wrBuf), ivOut + ivLen, nonceLen);
  ------------------
  |  |  180|    130|#define PORT_Memcpy memcpy
  ------------------
                          PORT_Memcpy(SSL_BUFFER_NEXT(wrBuf), ivOut + ivLen, nonceLen);
  ------------------
  |  |   37|    130|#define SSL_BUFFER_NEXT(b) ((b)->buf + (b)->len)
  ------------------
 2238|    130|        }
 2239|       |
 2240|    130|        rv = sslBuffer_Skip(wrBuf, len, NULL);
 2241|    130|        PORT_Assert(rv == SECSuccess); /* Can't fail. */
  ------------------
  |  |  120|    130|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    130|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 130, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2242|  9.85k|    } else {
 2243|  9.85k|        int blockSize = cwSpec->cipherDef->block_size;
 2244|       |
 2245|       |        /*
 2246|       |         * Add the MAC
 2247|       |         */
 2248|  9.85k|        rv = ssl3_ComputeRecordMAC(cwSpec, SSL_BUFFER_BASE(&pseudoHeader),
  ------------------
  |  |   35|  9.85k|#define SSL_BUFFER_BASE(b) ((b)->buf)
  ------------------
 2249|  9.85k|                                   SSL_BUFFER_LEN(&pseudoHeader),
  ------------------
  |  |   36|  9.85k|#define SSL_BUFFER_LEN(b) ((b)->len)
  ------------------
 2250|  9.85k|                                   pIn, contentLen,
 2251|  9.85k|                                   SSL_BUFFER_NEXT(wrBuf) + contentLen, &macLen);
  ------------------
  |  |   37|  9.85k|#define SSL_BUFFER_NEXT(b) ((b)->buf + (b)->len)
  ------------------
 2252|  9.85k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (2252:13): [True: 0, False: 9.85k]
  ------------------
 2253|      0|            ssl_MapLowLevelError(SSL_ERROR_MAC_COMPUTATION_FAILURE);
 2254|      0|            return SECFailure;
 2255|      0|        }
 2256|  9.85k|        p1Len = contentLen;
 2257|  9.85k|        p2Len = macLen;
 2258|  9.85k|        fragLen = contentLen + macLen; /* needs to be encrypted */
 2259|  9.85k|        PORT_Assert(fragLen <= MAX_FRAGMENT_LENGTH + 1024);
  ------------------
  |  |  120|  9.85k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  9.85k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 9.85k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2260|       |
 2261|       |        /*
 2262|       |         * Pad the text (if we're doing a block cipher)
 2263|       |         * then Encrypt it
 2264|       |         */
 2265|  9.85k|        if (cwSpec->cipherDef->type == type_block) {
  ------------------
  |  Branch (2265:13): [True: 978, False: 8.88k]
  ------------------
 2266|    978|            unsigned char *pBuf;
 2267|    978|            int padding_length;
 2268|    978|            int i;
 2269|       |
 2270|    978|            oddLen = contentLen % blockSize;
 2271|       |            /* Assume blockSize is a power of two */
 2272|    978|            padding_length = blockSize - 1 - ((fragLen) & (blockSize - 1));
 2273|    978|            fragLen += padding_length + 1;
 2274|    978|            PORT_Assert((fragLen % blockSize) == 0);
  ------------------
  |  |  120|    978|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    978|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 978, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2275|       |
 2276|       |            /* Pad according to TLS rules (also acceptable to SSL3). */
 2277|    978|            pBuf = SSL_BUFFER_NEXT(wrBuf) + fragLen - 1;
  ------------------
  |  |   37|    978|#define SSL_BUFFER_NEXT(b) ((b)->buf + (b)->len)
  ------------------
 2278|  5.34k|            for (i = padding_length + 1; i > 0; --i) {
  ------------------
  |  Branch (2278:42): [True: 4.36k, False: 978]
  ------------------
 2279|  4.36k|                *pBuf-- = padding_length;
 2280|  4.36k|            }
 2281|       |            /* now, if contentLen is not a multiple of block size, fix it */
 2282|    978|            p2Len = fragLen - p1Len;
 2283|    978|        }
 2284|  9.85k|        if (p1Len < 256) {
  ------------------
  |  Branch (2284:13): [True: 8.50k, False: 1.35k]
  ------------------
 2285|  8.50k|            oddLen = p1Len;
 2286|  8.50k|            p1Len = 0;
 2287|  8.50k|        } else {
 2288|  1.35k|            p1Len -= oddLen;
 2289|  1.35k|        }
 2290|  9.85k|        if (oddLen) {
  ------------------
  |  Branch (2290:13): [True: 8.50k, False: 1.35k]
  ------------------
 2291|  8.50k|            p2Len += oddLen;
 2292|  8.50k|            PORT_Assert((blockSize < 2) ||
  ------------------
  |  |  120|  8.50k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  9.48k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 7.52k, False: 978]
  |  |  |  |  |  Branch (208:7): [True: 978, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2293|  8.50k|                        (p2Len % blockSize) == 0);
 2294|  8.50k|            memmove(SSL_BUFFER_NEXT(wrBuf) + p1Len, pIn + p1Len, oddLen);
  ------------------
  |  |   37|  8.50k|#define SSL_BUFFER_NEXT(b) ((b)->buf + (b)->len)
  ------------------
 2295|  8.50k|        }
 2296|  9.85k|        if (p1Len > 0) {
  ------------------
  |  Branch (2296:13): [True: 1.35k, False: 8.50k]
  ------------------
 2297|  1.35k|            unsigned int cipherBytesPart1 = 0;
 2298|  1.35k|            rv = cwSpec->cipher(cwSpec->cipherContext,
 2299|  1.35k|                                SSL_BUFFER_NEXT(wrBuf), /* output */
  ------------------
  |  |   37|  1.35k|#define SSL_BUFFER_NEXT(b) ((b)->buf + (b)->len)
  ------------------
 2300|  1.35k|                                &cipherBytesPart1,      /* actual outlen */
 2301|  1.35k|                                p1Len,                  /* max outlen */
 2302|  1.35k|                                pIn,
 2303|  1.35k|                                p1Len); /* input, and inputlen */
 2304|  1.35k|            PORT_Assert(rv == SECSuccess && cipherBytesPart1 == p1Len);
  ------------------
  |  |  120|  1.35k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  2.70k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 1.35k, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 1.35k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2305|  1.35k|            if (rv != SECSuccess || cipherBytesPart1 != p1Len) {
  ------------------
  |  Branch (2305:17): [True: 0, False: 1.35k]
  |  Branch (2305:37): [True: 0, False: 1.35k]
  ------------------
 2306|      0|                PORT_SetError(SSL_ERROR_ENCRYPTION_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2307|      0|                return SECFailure;
 2308|      0|            }
 2309|  1.35k|            rv = sslBuffer_Skip(wrBuf, p1Len, NULL);
 2310|  1.35k|            PORT_Assert(rv == SECSuccess);
  ------------------
  |  |  120|  1.35k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.35k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.35k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2311|  1.35k|        }
 2312|  9.85k|        if (p2Len > 0) {
  ------------------
  |  Branch (2312:13): [True: 8.50k, False: 1.35k]
  ------------------
 2313|  8.50k|            unsigned int cipherBytesPart2 = 0;
 2314|  8.50k|            rv = cwSpec->cipher(cwSpec->cipherContext,
 2315|  8.50k|                                SSL_BUFFER_NEXT(wrBuf),
  ------------------
  |  |   37|  8.50k|#define SSL_BUFFER_NEXT(b) ((b)->buf + (b)->len)
  ------------------
 2316|  8.50k|                                &cipherBytesPart2, /* output and actual outLen */
 2317|  8.50k|                                p2Len,             /* max outlen */
 2318|  8.50k|                                SSL_BUFFER_NEXT(wrBuf),
  ------------------
  |  |   37|  8.50k|#define SSL_BUFFER_NEXT(b) ((b)->buf + (b)->len)
  ------------------
 2319|  8.50k|                                p2Len); /* input and inputLen*/
 2320|  8.50k|            PORT_Assert(rv == SECSuccess && cipherBytesPart2 == p2Len);
  ------------------
  |  |  120|  8.50k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  17.0k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 8.50k, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 8.50k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2321|  8.50k|            if (rv != SECSuccess || cipherBytesPart2 != p2Len) {
  ------------------
  |  Branch (2321:17): [True: 0, False: 8.50k]
  |  Branch (2321:37): [True: 0, False: 8.50k]
  ------------------
 2322|      0|                PORT_SetError(SSL_ERROR_ENCRYPTION_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2323|      0|                return SECFailure;
 2324|      0|            }
 2325|  8.50k|            rv = sslBuffer_Skip(wrBuf, p2Len, NULL);
 2326|  8.50k|            PORT_Assert(rv == SECSuccess);
  ------------------
  |  |  120|  8.50k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  8.50k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 8.50k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2327|  8.50k|        }
 2328|  9.85k|    }
 2329|       |
 2330|  9.98k|    return SECSuccess;
 2331|  9.98k|}
ssl_InsertRecordHeader:
 2338|  21.0k|{
 2339|  21.0k|    SECStatus rv;
 2340|       |
 2341|  21.0k|#ifndef UNSAFE_FUZZER_MODE
 2342|  21.0k|    if (cwSpec->version >= SSL_LIBRARY_VERSION_TLS_1_3 &&
  ------------------
  |  |   21|  42.1k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (2342:9): [True: 11.0k, False: 9.98k]
  ------------------
 2343|  21.0k|        cwSpec->epoch > TrafficKeyClearText) {
  ------------------
  |  Branch (2343:9): [True: 346, False: 10.7k]
  ------------------
 2344|    346|        if (IS_DTLS(ss)) {
  ------------------
  |  |  892|    346|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 346, False: 0]
  |  |  ------------------
  ------------------
 2345|    346|            return dtls13_InsertCipherTextHeader(ss, cwSpec, wrBuf,
 2346|    346|                                                 needsLength);
 2347|    346|        }
 2348|      0|        contentType = ssl_ct_application_data;
 2349|      0|    }
 2350|  20.7k|#endif
 2351|  20.7k|    rv = sslBuffer_AppendNumber(wrBuf, contentType, 1);
 2352|  20.7k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (2352:9): [True: 0, False: 20.7k]
  ------------------
 2353|      0|        return SECFailure;
 2354|      0|    }
 2355|       |
 2356|  20.7k|    rv = sslBuffer_AppendNumber(wrBuf, cwSpec->recordVersion, 2);
 2357|  20.7k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (2357:9): [True: 0, False: 20.7k]
  ------------------
 2358|      0|        return SECFailure;
 2359|      0|    }
 2360|  20.7k|    if (IS_DTLS(ss)) {
  ------------------
  |  |  892|  20.7k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 20.7k, False: 0]
  |  |  ------------------
  ------------------
 2361|  20.7k|        rv = sslBuffer_AppendNumber(wrBuf, cwSpec->epoch, 2);
 2362|  20.7k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (2362:13): [True: 0, False: 20.7k]
  ------------------
 2363|      0|            return SECFailure;
 2364|      0|        }
 2365|  20.7k|        rv = sslBuffer_AppendNumber(wrBuf, cwSpec->nextSeqNum, 6);
 2366|  20.7k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (2366:13): [True: 0, False: 20.7k]
  ------------------
 2367|      0|            return SECFailure;
 2368|      0|        }
 2369|  20.7k|    }
 2370|  20.7k|    *needsLength = PR_TRUE;
  ------------------
  |  |  437|  20.7k|#define PR_TRUE 1
  ------------------
 2371|  20.7k|    return SECSuccess;
 2372|  20.7k|}
ssl_ProtectRecord:
 2377|  20.9k|{
 2378|  20.9k|    PRBool needsLength;
 2379|  20.9k|    unsigned int lenOffset;
 2380|  20.9k|    SECStatus rv;
 2381|       |
 2382|  20.9k|    PORT_Assert(cwSpec->direction == ssl_secret_write);
  ------------------
  |  |  120|  20.9k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  20.9k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 20.9k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2383|  20.9k|    PORT_Assert(SSL_BUFFER_LEN(wrBuf) == 0);
  ------------------
  |  |  120|  20.9k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  20.9k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 20.9k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2384|  20.9k|    PORT_Assert(cwSpec->cipherDef->max_records <= RECORD_SEQ_MAX);
  ------------------
  |  |  120|  20.9k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  20.9k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 20.9k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2385|       |
 2386|  20.9k|    if (cwSpec->nextSeqNum >= cwSpec->cipherDef->max_records) {
  ------------------
  |  Branch (2386:9): [True: 0, False: 20.9k]
  ------------------
 2387|      0|        SSL_TRC(3, ("%d: SSL[-]: write sequence number at limit 0x%0llx",
  ------------------
  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    ssl_Trace b
  ------------------
 2388|      0|                    SSL_GETPID(), cwSpec->nextSeqNum));
 2389|      0|        PORT_SetError(SSL_ERROR_TOO_MANY_RECORDS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2390|      0|        return SECFailure;
 2391|      0|    }
 2392|       |
 2393|  20.9k|    rv = ssl_InsertRecordHeader(ss, cwSpec, ct, wrBuf, &needsLength);
 2394|  20.9k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (2394:9): [True: 0, False: 20.9k]
  ------------------
 2395|      0|        return SECFailure;
 2396|      0|    }
 2397|  20.9k|    if (needsLength) {
  ------------------
  |  Branch (2397:9): [True: 20.9k, False: 0]
  ------------------
 2398|  20.9k|        rv = sslBuffer_Skip(wrBuf, 2, &lenOffset);
 2399|  20.9k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (2399:13): [True: 0, False: 20.9k]
  ------------------
 2400|      0|            return SECFailure;
 2401|      0|        }
 2402|  20.9k|    }
 2403|       |
 2404|       |#ifdef UNSAFE_FUZZER_MODE
 2405|       |    {
 2406|       |        unsigned int len;
 2407|       |        rv = Null_Cipher(NULL, SSL_BUFFER_NEXT(wrBuf), &len,
 2408|       |                         SSL_BUFFER_SPACE(wrBuf), pIn, contentLen);
 2409|       |        if (rv != SECSuccess) {
 2410|       |            return SECFailure; /* error was set */
 2411|       |        }
 2412|       |        rv = sslBuffer_Skip(wrBuf, len, NULL);
 2413|       |        PORT_Assert(rv == SECSuccess); /* Can't fail. */
 2414|       |    }
 2415|       |#else
 2416|  20.9k|    if (cwSpec->version >= SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|  20.9k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (2416:9): [True: 10.9k, False: 9.98k]
  ------------------
 2417|  10.9k|        PRUint8 *cipherText = SSL_BUFFER_NEXT(wrBuf);
  ------------------
  |  |   37|  10.9k|#define SSL_BUFFER_NEXT(b) ((b)->buf + (b)->len)
  ------------------
 2418|  10.9k|        unsigned int bufLen = SSL_BUFFER_LEN(wrBuf);
  ------------------
  |  |   36|  10.9k|#define SSL_BUFFER_LEN(b) ((b)->len)
  ------------------
 2419|  10.9k|        rv = tls13_ProtectRecord(ss, cwSpec, ct, pIn, contentLen, wrBuf);
 2420|  10.9k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (2420:13): [True: 0, False: 10.9k]
  ------------------
 2421|      0|            return SECFailure;
 2422|      0|        }
 2423|  10.9k|        if (IS_DTLS(ss)) {
  ------------------
  |  |  892|  10.9k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 10.9k, False: 0]
  |  |  ------------------
  ------------------
 2424|  10.9k|            bufLen = SSL_BUFFER_LEN(wrBuf) - bufLen;
  ------------------
  |  |   36|  10.9k|#define SSL_BUFFER_LEN(b) ((b)->len)
  ------------------
 2425|  10.9k|            rv = dtls13_MaskSequenceNumber(ss, cwSpec,
 2426|  10.9k|                                           SSL_BUFFER_BASE(wrBuf),
  ------------------
  |  |   35|  10.9k|#define SSL_BUFFER_BASE(b) ((b)->buf)
  ------------------
 2427|  10.9k|                                           cipherText, bufLen);
 2428|  10.9k|        }
 2429|  10.9k|    } else {
 2430|  9.98k|        rv = ssl3_MACEncryptRecord(cwSpec, ss->sec.isServer, IS_DTLS(ss), ct,
  ------------------
  |  |  892|  9.98k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  ------------------
 2431|  9.98k|                                   pIn, contentLen, wrBuf);
 2432|  9.98k|    }
 2433|  20.9k|#endif
 2434|  20.9k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (2434:9): [True: 0, False: 20.9k]
  ------------------
 2435|      0|        return SECFailure; /* error was set */
 2436|      0|    }
 2437|       |
 2438|  20.9k|    if (needsLength) {
  ------------------
  |  Branch (2438:9): [True: 20.9k, False: 0]
  ------------------
 2439|       |        /* Insert the length. */
 2440|  20.9k|        rv = sslBuffer_InsertLength(wrBuf, lenOffset, 2);
 2441|  20.9k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (2441:13): [True: 0, False: 20.9k]
  ------------------
 2442|      0|            PORT_Assert(0); /* Can't fail. */
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2443|      0|            return SECFailure;
 2444|      0|        }
 2445|  20.9k|    }
 2446|       |
 2447|  20.9k|    ++cwSpec->nextSeqNum;
 2448|  20.9k|    return SECSuccess;
 2449|  20.9k|}
ssl_ProtectNextRecord:
 2455|  20.9k|{
 2456|  20.9k|    sslBuffer *wrBuf = &ss->sec.writeBuf;
 2457|  20.9k|    unsigned int contentLen;
 2458|  20.9k|    unsigned int spaceNeeded;
 2459|  20.9k|    SECStatus rv;
 2460|       |
 2461|  20.9k|    contentLen = PR_MIN(nIn, spec->recordSizeLimit);
  ------------------
  |  |  158|  20.9k|#define PR_MIN(x,y)     ((x)<(y)?(x):(y))
  |  |  ------------------
  |  |  |  Branch (158:26): [True: 20.9k, False: 0]
  |  |  ------------------
  ------------------
 2462|  20.9k|    spaceNeeded = contentLen + SSL3_BUFFER_FUDGE;
  ------------------
  |  | 1373|  20.9k|#define SSL3_BUFFER_FUDGE 100
  ------------------
 2463|  20.9k|    if (spec->version >= SSL_LIBRARY_VERSION_TLS_1_1 &&
  ------------------
  |  |   19|  41.8k|#define SSL_LIBRARY_VERSION_TLS_1_1             0x0302
  ------------------
  |  Branch (2463:9): [True: 20.9k, False: 0]
  ------------------
 2464|  20.9k|        spec->cipherDef->type == type_block) {
  ------------------
  |  Branch (2464:9): [True: 978, False: 19.9k]
  ------------------
 2465|    978|        spaceNeeded += spec->cipherDef->iv_size;
 2466|    978|    }
 2467|  20.9k|    if (spaceNeeded > SSL_BUFFER_SPACE(wrBuf)) {
  ------------------
  |  |   38|  20.9k|#define SSL_BUFFER_SPACE(b) ((b)->space - (b)->len)
  ------------------
  |  Branch (2467:9): [True: 0, False: 20.9k]
  ------------------
 2468|      0|        rv = sslBuffer_Grow(wrBuf, spaceNeeded);
 2469|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (2469:13): [True: 0, False: 0]
  ------------------
 2470|      0|            SSL_DBG(("%d: SSL3[%d]: failed to expand write buffer to %d",
  ------------------
  |  |   87|      0|    if (ssl_debug) \
  |  |  ------------------
  |  |  |  Branch (87:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   88|      0|    ssl_Trace b
  ------------------
 2471|      0|                     SSL_GETPID(), ss->fd, spaceNeeded));
 2472|      0|            return SECFailure;
 2473|      0|        }
 2474|      0|    }
 2475|       |
 2476|  20.9k|    rv = ssl_ProtectRecord(ss, spec, ct, pIn, contentLen, wrBuf);
 2477|  20.9k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (2477:9): [True: 0, False: 20.9k]
  ------------------
 2478|      0|        return SECFailure;
 2479|      0|    }
 2480|  20.9k|    PRINT_BUF(50, (ss, "send (encrypted) record data:",
  ------------------
  |  |   74|  20.9k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 20.9k]
  |  |  ------------------
  |  |   75|  20.9k|    ssl_PrintBuf b
  ------------------
 2481|  20.9k|                   SSL_BUFFER_BASE(wrBuf), SSL_BUFFER_LEN(wrBuf)));
 2482|  20.9k|    *written = contentLen;
 2483|  20.9k|    return SECSuccess;
 2484|  20.9k|}
ssl3_SendRecord:
 2514|  21.0k|{
 2515|  21.0k|    sslBuffer *wrBuf = &ss->sec.writeBuf;
 2516|  21.0k|    ssl3CipherSpec *spec;
 2517|  21.0k|    SECStatus rv;
 2518|  21.0k|    PRInt32 totalSent = 0;
 2519|       |
 2520|  21.0k|    SSL_TRC(3, ("%d: SSL3[%d] SendRecord type: %s nIn=%d",
  ------------------
  |  |   71|  21.0k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 21.0k]
  |  |  ------------------
  |  |   72|  21.0k|    ssl_Trace b
  ------------------
 2521|  21.0k|                SSL_GETPID(), ss->fd, ssl3_DecodeContentType(ct),
 2522|  21.0k|                nIn));
 2523|  21.0k|    PRINT_BUF(50, (ss, "Send record (plain text)", pIn, nIn));
  ------------------
  |  |   74|  21.0k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 21.0k]
  |  |  ------------------
  |  |   75|  21.0k|    ssl_PrintBuf b
  ------------------
 2524|       |
 2525|  21.0k|    PORT_Assert(ss->opt.noLocks || ssl_HaveXmitBufLock(ss));
  ------------------
  |  |  120|  21.0k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  31.3k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 10.7k, False: 10.2k]
  |  |  |  |  |  Branch (208:7): [True: 10.2k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2526|  21.0k|    PORT_Assert(SSL_BUFFER_LEN(wrBuf) == 0);
  ------------------
  |  |  120|  21.0k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  21.0k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 21.0k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2527|       |
 2528|  21.0k|    if (ss->ssl3.fatalAlertSent) {
  ------------------
  |  Branch (2528:9): [True: 164, False: 20.9k]
  ------------------
 2529|    164|        SSL_TRC(3, ("%d: SSL3[%d] Suppress write, fatal alert already sent",
  ------------------
  |  |   71|    164|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 164]
  |  |  ------------------
  |  |   72|    164|    ssl_Trace b
  ------------------
 2530|    164|                    SSL_GETPID(), ss->fd));
 2531|    164|        if (ct != ssl_ct_alert) {
  ------------------
  |  Branch (2531:13): [True: 0, False: 164]
  ------------------
 2532|       |            /* If we are sending an alert, then we already have an
 2533|       |             * error, so don't overwrite. */
 2534|      0|            PORT_SetError(SSL_ERROR_HANDSHAKE_FAILED);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2535|      0|        }
 2536|    164|        return -1;
 2537|    164|    }
 2538|       |
 2539|       |    /* check for Token Presence */
 2540|  20.9k|    if (!ssl3_ClientAuthTokenPresent(ss->sec.ci.sid)) {
  ------------------
  |  Branch (2540:9): [True: 0, False: 20.9k]
  ------------------
 2541|      0|        PORT_SetError(SSL_ERROR_TOKEN_INSERTION_REMOVAL);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2542|      0|        return -1;
 2543|      0|    }
 2544|       |
 2545|  20.9k|    if (ss->recordWriteCallback) {
  ------------------
  |  Branch (2545:9): [True: 0, False: 20.9k]
  ------------------
 2546|      0|        PRUint16 epoch;
 2547|      0|        ssl_GetSpecReadLock(ss);
  ------------------
  |  | 1422|      0|    {                                           \
  |  | 1423|      0|        if (!ss->opt.noLocks)                   \
  |  |  ------------------
  |  |  |  Branch (1423:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1424|      0|            NSSRWLock_LockRead((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   47|      0|#define NSSRWLock_LockRead NSSRWLock_LockRead_Util
  |  |  ------------------
  |  | 1425|      0|    }
  ------------------
 2548|      0|        epoch = ss->ssl3.cwSpec->epoch;
 2549|      0|        ssl_ReleaseSpecReadLock(ss);
  ------------------
  |  | 1427|      0|    {                                             \
  |  | 1428|      0|        if (!ss->opt.noLocks)                     \
  |  |  ------------------
  |  |  |  Branch (1428:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1429|      0|            NSSRWLock_UnlockRead((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   50|      0|#define NSSRWLock_UnlockRead NSSRWLock_UnlockRead_Util
  |  |  ------------------
  |  | 1430|      0|    }
  ------------------
 2550|      0|        rv = ss->recordWriteCallback(ss->fd, epoch, ct, pIn, nIn,
 2551|      0|                                     ss->recordWriteCallbackArg);
 2552|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (2552:13): [True: 0, False: 0]
  ------------------
 2553|      0|            return -1;
 2554|      0|        }
 2555|      0|        return nIn;
 2556|      0|    }
 2557|       |
 2558|  20.9k|    if (cwSpec) {
  ------------------
  |  Branch (2558:9): [True: 16.4k, False: 4.49k]
  ------------------
 2559|       |        /* cwSpec can only be set for retransmissions of the DTLS handshake. */
 2560|  16.4k|        PORT_Assert(IS_DTLS(ss) &&
  ------------------
  |  |  120|  16.4k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  50.8k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 14.7k, False: 1.62k]
  |  |  |  |  |  Branch (208:7): [True: 1.62k, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 16.4k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2561|  16.4k|                    (ct == ssl_ct_handshake ||
 2562|  16.4k|                     ct == ssl_ct_change_cipher_spec));
 2563|  16.4k|        spec = cwSpec;
 2564|  16.4k|    } else {
 2565|  4.49k|        spec = ss->ssl3.cwSpec;
 2566|  4.49k|    }
 2567|       |
 2568|  41.8k|    while (nIn > 0) {
  ------------------
  |  Branch (2568:12): [True: 20.9k, False: 20.9k]
  ------------------
 2569|  20.9k|        unsigned int written = 0;
 2570|  20.9k|        PRInt32 sent;
 2571|       |
 2572|  20.9k|        ssl_GetSpecReadLock(ss);
  ------------------
  |  | 1422|  20.9k|    {                                           \
  |  | 1423|  20.9k|        if (!ss->opt.noLocks)                   \
  |  |  ------------------
  |  |  |  Branch (1423:13): [True: 10.1k, False: 10.7k]
  |  |  ------------------
  |  | 1424|  20.9k|            NSSRWLock_LockRead((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   47|  10.1k|#define NSSRWLock_LockRead NSSRWLock_LockRead_Util
  |  |  ------------------
  |  | 1425|  20.9k|    }
  ------------------
 2573|  20.9k|        rv = ssl_ProtectNextRecord(ss, spec, ct, pIn, nIn, &written);
 2574|  20.9k|        ssl_ReleaseSpecReadLock(ss);
  ------------------
  |  | 1427|  20.9k|    {                                             \
  |  | 1428|  20.9k|        if (!ss->opt.noLocks)                     \
  |  |  ------------------
  |  |  |  Branch (1428:13): [True: 10.1k, False: 10.7k]
  |  |  ------------------
  |  | 1429|  20.9k|            NSSRWLock_UnlockRead((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   50|  10.1k|#define NSSRWLock_UnlockRead NSSRWLock_UnlockRead_Util
  |  |  ------------------
  |  | 1430|  20.9k|    }
  ------------------
 2575|  20.9k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (2575:13): [True: 0, False: 20.9k]
  ------------------
 2576|      0|            goto loser;
 2577|      0|        }
 2578|       |
 2579|  20.9k|        PORT_Assert(written > 0);
  ------------------
  |  |  120|  20.9k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  20.9k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 20.9k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2580|       |        /* DTLS should not fragment non-application data here. */
 2581|  20.9k|        if (IS_DTLS(ss) && ct != ssl_ct_application_data) {
  ------------------
  |  |  892|  41.8k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 20.9k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2581:28): [True: 20.9k, False: 0]
  ------------------
 2582|  20.9k|            PORT_Assert(written == nIn);
  ------------------
  |  |  120|  20.9k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  20.9k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 20.9k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2583|  20.9k|        }
 2584|       |
 2585|  20.9k|        pIn += written;
 2586|  20.9k|        nIn -= written;
 2587|  20.9k|        PORT_Assert(nIn >= 0);
  ------------------
  |  |  120|  20.9k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  20.9k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 20.9k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2588|       |
 2589|       |        /* If there's still some previously saved ciphertext,
 2590|       |         * or the caller doesn't want us to send the data yet,
 2591|       |         * then add all our new ciphertext to the amount previously saved.
 2592|       |         */
 2593|  20.9k|        if ((ss->pendingBuf.len > 0) ||
  ------------------
  |  Branch (2593:13): [True: 3.25k, False: 17.6k]
  ------------------
 2594|  20.9k|            (flags & ssl_SEND_FLAG_FORCE_INTO_BUFFER)) {
  ------------------
  |  |  223|  17.6k|#define ssl_SEND_FLAG_FORCE_INTO_BUFFER 0x40000000
  ------------------
  |  Branch (2594:13): [True: 13.1k, False: 4.49k]
  ------------------
 2595|       |
 2596|  16.4k|            rv = ssl_SaveWriteData(ss, SSL_BUFFER_BASE(wrBuf),
  ------------------
  |  |   35|  16.4k|#define SSL_BUFFER_BASE(b) ((b)->buf)
  ------------------
 2597|  16.4k|                                   SSL_BUFFER_LEN(wrBuf));
  ------------------
  |  |   36|  16.4k|#define SSL_BUFFER_LEN(b) ((b)->len)
  ------------------
 2598|  16.4k|            if (rv != SECSuccess) {
  ------------------
  |  Branch (2598:17): [True: 0, False: 16.4k]
  ------------------
 2599|       |                /* presumably a memory error, SEC_ERROR_NO_MEMORY */
 2600|      0|                goto loser;
 2601|      0|            }
 2602|       |
 2603|  16.4k|            if (!(flags & ssl_SEND_FLAG_FORCE_INTO_BUFFER)) {
  ------------------
  |  |  223|  16.4k|#define ssl_SEND_FLAG_FORCE_INTO_BUFFER 0x40000000
  ------------------
  |  Branch (2603:17): [True: 0, False: 16.4k]
  ------------------
 2604|      0|                ss->handshakeBegun = 1;
 2605|      0|                sent = ssl_SendSavedWriteData(ss);
 2606|      0|                if (sent < 0 && PR_GetError() != PR_WOULD_BLOCK_ERROR) {
  ------------------
  |  |   22|      0|#define PR_WOULD_BLOCK_ERROR                     (-5998L)
  ------------------
  |  Branch (2606:21): [True: 0, False: 0]
  |  Branch (2606:33): [True: 0, False: 0]
  ------------------
 2607|      0|                    ssl_MapLowLevelError(SSL_ERROR_SOCKET_WRITE_FAILURE);
 2608|      0|                    goto loser;
 2609|      0|                }
 2610|      0|                if (ss->pendingBuf.len) {
  ------------------
  |  Branch (2610:21): [True: 0, False: 0]
  ------------------
 2611|      0|                    flags |= ssl_SEND_FLAG_FORCE_INTO_BUFFER;
  ------------------
  |  |  223|      0|#define ssl_SEND_FLAG_FORCE_INTO_BUFFER 0x40000000
  ------------------
 2612|      0|                }
 2613|      0|            }
 2614|  16.4k|        } else {
 2615|  4.49k|            PORT_Assert(SSL_BUFFER_LEN(wrBuf) > 0);
  ------------------
  |  |  120|  4.49k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  4.49k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 4.49k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2616|  4.49k|            ss->handshakeBegun = 1;
 2617|  4.49k|            sent = ssl_DefSend(ss, SSL_BUFFER_BASE(wrBuf),
  ------------------
  |  |   35|  4.49k|#define SSL_BUFFER_BASE(b) ((b)->buf)
  ------------------
 2618|  4.49k|                               SSL_BUFFER_LEN(wrBuf),
  ------------------
  |  |   36|  4.49k|#define SSL_BUFFER_LEN(b) ((b)->len)
  ------------------
 2619|  4.49k|                               flags & ~ssl_SEND_FLAG_MASK);
  ------------------
  |  |  226|  4.49k|#define ssl_SEND_FLAG_MASK 0x7f000000
  ------------------
 2620|  4.49k|            if (sent < 0) {
  ------------------
  |  Branch (2620:17): [True: 0, False: 4.49k]
  ------------------
 2621|      0|                if (PORT_GetError() != PR_WOULD_BLOCK_ERROR) {
  ------------------
  |  |   62|      0|#define PORT_GetError PORT_GetError_Util
  ------------------
                              if (PORT_GetError() != PR_WOULD_BLOCK_ERROR) {
  ------------------
  |  |   22|      0|#define PR_WOULD_BLOCK_ERROR                     (-5998L)
  ------------------
  |  Branch (2621:21): [True: 0, False: 0]
  ------------------
 2622|      0|                    ssl_MapLowLevelError(SSL_ERROR_SOCKET_WRITE_FAILURE);
 2623|      0|                    goto loser;
 2624|      0|                }
 2625|       |                /* we got PR_WOULD_BLOCK_ERROR, which means none was sent. */
 2626|      0|                sent = 0;
 2627|      0|            }
 2628|  4.49k|            if (SSL_BUFFER_LEN(wrBuf) > (unsigned int)sent) {
  ------------------
  |  |   36|  4.49k|#define SSL_BUFFER_LEN(b) ((b)->len)
  ------------------
  |  Branch (2628:17): [True: 0, False: 4.49k]
  ------------------
 2629|      0|                if (IS_DTLS(ss)) {
  ------------------
  |  |  892|      0|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2630|       |                    /* DTLS just says no in this case. No buffering */
 2631|      0|                    PORT_SetError(PR_WOULD_BLOCK_ERROR);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
                                  PORT_SetError(PR_WOULD_BLOCK_ERROR);
  ------------------
  |  |   22|      0|#define PR_WOULD_BLOCK_ERROR                     (-5998L)
  ------------------
 2632|      0|                    goto loser;
 2633|      0|                }
 2634|       |                /* now take all the remaining unsent new ciphertext and
 2635|       |                 * append it to the buffer of previously unsent ciphertext.
 2636|       |                 */
 2637|      0|                rv = ssl_SaveWriteData(ss, SSL_BUFFER_BASE(wrBuf) + sent,
  ------------------
  |  |   35|      0|#define SSL_BUFFER_BASE(b) ((b)->buf)
  ------------------
 2638|      0|                                       SSL_BUFFER_LEN(wrBuf) - sent);
  ------------------
  |  |   36|      0|#define SSL_BUFFER_LEN(b) ((b)->len)
  ------------------
 2639|      0|                if (rv != SECSuccess) {
  ------------------
  |  Branch (2639:21): [True: 0, False: 0]
  ------------------
 2640|       |                    /* presumably a memory error, SEC_ERROR_NO_MEMORY */
 2641|      0|                    goto loser;
 2642|      0|                }
 2643|      0|            }
 2644|  4.49k|        }
 2645|  20.9k|        wrBuf->len = 0;
 2646|  20.9k|        totalSent += written;
 2647|  20.9k|    }
 2648|  20.9k|    return totalSent;
 2649|       |
 2650|      0|loser:
 2651|       |    /* Don't leave bits of buffer lying around. */
 2652|      0|    wrBuf->len = 0;
 2653|      0|    return -1;
 2654|  20.9k|}
ssl3_FlushHandshake:
 2780|  20.5k|{
 2781|  20.5k|    if (IS_DTLS(ss)) {
  ------------------
  |  |  892|  20.5k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 20.5k, False: 0]
  |  |  ------------------
  ------------------
 2782|  20.5k|        return dtls_FlushHandshakeMessages(ss, flags);
 2783|  20.5k|    }
 2784|      0|    return ssl3_FlushHandshakeMessages(ss, flags);
 2785|  20.5k|}
SSL3_SendAlert:
 2907|  4.64k|{
 2908|  4.64k|    PRUint8 bytes[2];
 2909|  4.64k|    SECStatus rv;
 2910|  4.64k|    PRBool needHsLock = !ssl_HaveSSL3HandshakeLock(ss);
  ------------------
  |  | 1419|  4.64k|    (PZ_InMonitor((ss)->ssl3HandshakeLock))
  |  |  ------------------
  |  |  |  |  258|  4.64k|#define PZ_InMonitor(m) PR_InMonitor((m))
  |  |  |  |  ------------------
  |  |  |  |  |  |  281|  4.64k|#define PR_InMonitor(m)     (PR_GetMonitorEntryCount(m) > 0)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2911|       |
 2912|       |    /* Check that if I need the HS lock I also need the Xmit lock */
 2913|  4.64k|    PORT_Assert(!needHsLock || !ssl_HaveXmitBufLock(ss));
  ------------------
  |  |  120|  4.64k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  7.08k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 2.20k, False: 2.43k]
  |  |  |  |  |  Branch (208:7): [True: 2.43k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2914|       |
 2915|  4.64k|    SSL_TRC(3, ("%d: SSL3[%d]: send alert record, level=%d desc=%d",
  ------------------
  |  |   71|  4.64k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 4.64k]
  |  |  ------------------
  |  |   72|  4.64k|    ssl_Trace b
  ------------------
 2916|  4.64k|                SSL_GETPID(), ss->fd, level, desc));
 2917|       |
 2918|  4.64k|    bytes[0] = level;
 2919|  4.64k|    bytes[1] = desc;
 2920|       |
 2921|  4.64k|    if (needHsLock) {
  ------------------
  |  Branch (2921:9): [True: 2.43k, False: 2.20k]
  ------------------
 2922|  2.43k|        ssl_GetSSL3HandshakeLock(ss);
  ------------------
  |  | 1407|  2.43k|    {                                                 \
  |  | 1408|  2.43k|        if (!ss->opt.noLocks) {                       \
  |  |  ------------------
  |  |  |  Branch (1408:13): [True: 8, False: 2.42k]
  |  |  ------------------
  |  | 1409|      8|            PORT_Assert(!ssl_HaveXmitBufLock(ss));    \
  |  |  ------------------
  |  |  |  |  120|      8|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|      8|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 8, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1410|      8|            PZ_EnterMonitor((ss)->ssl3HandshakeLock); \
  |  |  ------------------
  |  |  |  |  256|      8|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1411|      8|        }                                             \
  |  | 1412|  2.43k|    }
  ------------------
 2923|  2.43k|    }
 2924|  4.64k|    if (level == alert_fatal) {
  ------------------
  |  Branch (2924:9): [True: 4.64k, False: 0]
  ------------------
 2925|  4.64k|        if (ss->sec.ci.sid) {
  ------------------
  |  Branch (2925:13): [True: 4.64k, False: 0]
  ------------------
 2926|  4.64k|            ssl_UncacheSessionID(ss);
 2927|  4.64k|        }
 2928|  4.64k|    }
 2929|       |
 2930|  4.64k|    rv = tls13_SetAlertCipherSpec(ss);
 2931|  4.64k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (2931:9): [True: 0, False: 4.64k]
  ------------------
 2932|      0|        if (needHsLock) {
  ------------------
  |  Branch (2932:13): [True: 0, False: 0]
  ------------------
 2933|      0|            ssl_ReleaseSSL3HandshakeLock(ss);
  ------------------
  |  | 1414|      0|    {                                                \
  |  | 1415|      0|        if (!ss->opt.noLocks)                        \
  |  |  ------------------
  |  |  |  Branch (1415:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1416|      0|            PZ_ExitMonitor((ss)->ssl3HandshakeLock); \
  |  |  ------------------
  |  |  |  |  257|      0|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1417|      0|    }
  ------------------
 2934|      0|        }
 2935|      0|        return rv;
 2936|      0|    }
 2937|       |
 2938|  4.64k|    ssl_GetXmitBufLock(ss);
  ------------------
  |  | 1466|  4.64k|    {                                           \
  |  | 1467|  4.64k|        if (!ss->opt.noLocks)                   \
  |  |  ------------------
  |  |  |  Branch (1467:13): [True: 2.21k, False: 2.42k]
  |  |  ------------------
  |  | 1468|  4.64k|            PZ_EnterMonitor((ss)->xmitBufLock); \
  |  |  ------------------
  |  |  |  |  256|  2.21k|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1469|  4.64k|    }
  ------------------
 2939|  4.64k|    rv = ssl3_FlushHandshake(ss, ssl_SEND_FLAG_FORCE_INTO_BUFFER);
  ------------------
  |  |  223|  4.64k|#define ssl_SEND_FLAG_FORCE_INTO_BUFFER 0x40000000
  ------------------
 2940|  4.64k|    if (rv == SECSuccess) {
  ------------------
  |  Branch (2940:9): [True: 4.64k, False: 0]
  ------------------
 2941|  4.64k|        PRInt32 sent;
 2942|  4.64k|        sent = ssl3_SendRecord(ss, NULL, ssl_ct_alert, bytes, 2,
 2943|  4.64k|                               (desc == no_certificate) ? ssl_SEND_FLAG_FORCE_INTO_BUFFER : 0);
  ------------------
  |  |  223|      0|#define ssl_SEND_FLAG_FORCE_INTO_BUFFER 0x40000000
  ------------------
  |  Branch (2943:32): [True: 0, False: 4.64k]
  ------------------
 2944|  4.64k|        rv = (sent >= 0) ? SECSuccess : (SECStatus)sent;
  ------------------
  |  Branch (2944:14): [True: 4.48k, False: 164]
  ------------------
 2945|  4.64k|    }
 2946|  4.64k|    if (level == alert_fatal) {
  ------------------
  |  Branch (2946:9): [True: 4.64k, False: 0]
  ------------------
 2947|  4.64k|        ss->ssl3.fatalAlertSent = PR_TRUE;
  ------------------
  |  |  437|  4.64k|#define PR_TRUE 1
  ------------------
 2948|  4.64k|    }
 2949|  4.64k|    ssl_ReleaseXmitBufLock(ss);
  ------------------
  |  | 1471|  4.64k|    {                                          \
  |  | 1472|  4.64k|        if (!ss->opt.noLocks)                  \
  |  |  ------------------
  |  |  |  Branch (1472:13): [True: 2.21k, False: 2.42k]
  |  |  ------------------
  |  | 1473|  4.64k|            PZ_ExitMonitor((ss)->xmitBufLock); \
  |  |  ------------------
  |  |  |  |  257|  2.21k|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1474|  4.64k|    }
  ------------------
 2950|  4.64k|    if (needHsLock) {
  ------------------
  |  Branch (2950:9): [True: 2.43k, False: 2.20k]
  ------------------
 2951|  2.43k|        ssl_ReleaseSSL3HandshakeLock(ss);
  ------------------
  |  | 1414|  2.43k|    {                                                \
  |  | 1415|  2.43k|        if (!ss->opt.noLocks)                        \
  |  |  ------------------
  |  |  |  Branch (1415:13): [True: 8, False: 2.42k]
  |  |  ------------------
  |  | 1416|  2.43k|            PZ_ExitMonitor((ss)->ssl3HandshakeLock); \
  |  |  ------------------
  |  |  |  |  257|      8|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1417|  2.43k|    }
  ------------------
 2952|  2.43k|    }
 2953|  4.64k|    if (rv == SECSuccess && ss->alertSentCallback) {
  ------------------
  |  Branch (2953:9): [True: 4.48k, False: 164]
  |  Branch (2953:29): [True: 0, False: 4.48k]
  ------------------
 2954|      0|        SSLAlert alert = { level, desc };
 2955|      0|        ss->alertSentCallback(ss->fd, ss->alertSentCallbackArg, &alert);
 2956|      0|    }
 2957|  4.64k|    return rv; /* error set by ssl3_FlushHandshake or ssl3_SendRecord */
 2958|  4.64k|}
ssl3_SendAlertForCertError:
 2986|    286|{
 2987|    286|    SSL3AlertDescription desc = bad_certificate;
 2988|    286|    PRBool isTLS = ss->version >= SSL_LIBRARY_VERSION_3_1_TLS;
  ------------------
  |  |   29|    286|#define SSL_LIBRARY_VERSION_3_1_TLS SSL_LIBRARY_VERSION_TLS_1_0
  |  |  ------------------
  |  |  |  |   18|    286|#define SSL_LIBRARY_VERSION_TLS_1_0             0x0301
  |  |  ------------------
  ------------------
 2989|       |
 2990|    286|    switch (errCode) {
 2991|     46|        case SEC_ERROR_LIBRARY_FAILURE:
  ------------------
  |  Branch (2991:9): [True: 46, False: 240]
  ------------------
 2992|     46|            desc = unsupported_certificate;
 2993|     46|            break;
 2994|      0|        case SEC_ERROR_EXPIRED_CERTIFICATE:
  ------------------
  |  Branch (2994:9): [True: 0, False: 286]
  ------------------
 2995|      0|            desc = certificate_expired;
 2996|      0|            break;
 2997|      0|        case SEC_ERROR_REVOKED_CERTIFICATE:
  ------------------
  |  Branch (2997:9): [True: 0, False: 286]
  ------------------
 2998|      0|            desc = certificate_revoked;
 2999|      0|            break;
 3000|      0|        case SEC_ERROR_INADEQUATE_KEY_USAGE:
  ------------------
  |  Branch (3000:9): [True: 0, False: 286]
  ------------------
 3001|      0|        case SEC_ERROR_INADEQUATE_CERT_TYPE:
  ------------------
  |  Branch (3001:9): [True: 0, False: 286]
  ------------------
 3002|      0|            desc = certificate_unknown;
 3003|      0|            break;
 3004|      0|        case SEC_ERROR_UNTRUSTED_CERT:
  ------------------
  |  Branch (3004:9): [True: 0, False: 286]
  ------------------
 3005|      0|            desc = isTLS ? access_denied : certificate_unknown;
  ------------------
  |  Branch (3005:20): [True: 0, False: 0]
  ------------------
 3006|      0|            break;
 3007|      0|        case SEC_ERROR_UNKNOWN_ISSUER:
  ------------------
  |  Branch (3007:9): [True: 0, False: 286]
  ------------------
 3008|      0|        case SEC_ERROR_UNTRUSTED_ISSUER:
  ------------------
  |  Branch (3008:9): [True: 0, False: 286]
  ------------------
 3009|      0|            desc = isTLS ? unknown_ca : certificate_unknown;
  ------------------
  |  Branch (3009:20): [True: 0, False: 0]
  ------------------
 3010|      0|            break;
 3011|      0|        case SEC_ERROR_EXPIRED_ISSUER_CERTIFICATE:
  ------------------
  |  Branch (3011:9): [True: 0, False: 286]
  ------------------
 3012|      0|            desc = isTLS ? unknown_ca : certificate_expired;
  ------------------
  |  Branch (3012:20): [True: 0, False: 0]
  ------------------
 3013|      0|            break;
 3014|       |
 3015|      0|        case SEC_ERROR_CERT_NOT_IN_NAME_SPACE:
  ------------------
  |  Branch (3015:9): [True: 0, False: 286]
  ------------------
 3016|      0|        case SEC_ERROR_PATH_LEN_CONSTRAINT_INVALID:
  ------------------
  |  Branch (3016:9): [True: 0, False: 286]
  ------------------
 3017|      0|        case SEC_ERROR_CA_CERT_INVALID:
  ------------------
  |  Branch (3017:9): [True: 0, False: 286]
  ------------------
 3018|      0|        case SEC_ERROR_BAD_SIGNATURE:
  ------------------
  |  Branch (3018:9): [True: 0, False: 286]
  ------------------
 3019|    240|        default:
  ------------------
  |  Branch (3019:9): [True: 240, False: 46]
  ------------------
 3020|    240|            desc = bad_certificate;
 3021|    240|            break;
 3022|    286|    }
 3023|    286|    SSL_DBG(("%d: SSL3[%d]: peer certificate is no good: error=%d",
  ------------------
  |  |   87|    286|    if (ssl_debug) \
  |  |  ------------------
  |  |  |  Branch (87:9): [True: 0, False: 286]
  |  |  ------------------
  |  |   88|    286|    ssl_Trace b
  ------------------
 3024|    286|             SSL_GETPID(), ss->fd, errCode));
 3025|       |
 3026|    286|    (void)SSL3_SendAlert(ss, alert_fatal, desc);
 3027|    286|}
ssl3_DecodeError:
 3034|    573|{
 3035|    573|    (void)SSL3_SendAlert(ss, alert_fatal,
 3036|    573|                         ss->version > SSL_LIBRARY_VERSION_3_0 ? decode_error
  ------------------
  |  |   17|    573|#define SSL_LIBRARY_VERSION_3_0                 0x0300
  ------------------
  |  Branch (3036:26): [True: 260, False: 313]
  ------------------
 3037|    573|                                                               : illegal_parameter);
 3038|    573|    PORT_SetError(ss->sec.isServer ? SSL_ERROR_BAD_CLIENT
  ------------------
  |  |   65|    573|#define PORT_SetError PORT_SetError_Util
  ------------------
  |  Branch (3038:19): [True: 0, False: 573]
  ------------------
 3039|    573|                                   : SSL_ERROR_BAD_SERVER);
 3040|    573|    return SECFailure;
 3041|    573|}
ssl3_SendChangeCipherSpecsInt:
 3234|  1.62k|{
 3235|  1.62k|    PRUint8 change = change_cipher_spec_choice;
 3236|  1.62k|    SECStatus rv;
 3237|       |
 3238|  1.62k|    SSL_TRC(3, ("%d: SSL3[%d]: send change_cipher_spec record",
  ------------------
  |  |   71|  1.62k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 1.62k]
  |  |  ------------------
  |  |   72|  1.62k|    ssl_Trace b
  ------------------
 3239|  1.62k|                SSL_GETPID(), ss->fd));
 3240|       |
 3241|  1.62k|    rv = ssl3_FlushHandshake(ss, ssl_SEND_FLAG_FORCE_INTO_BUFFER);
  ------------------
  |  |  223|  1.62k|#define ssl_SEND_FLAG_FORCE_INTO_BUFFER 0x40000000
  ------------------
 3242|  1.62k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (3242:9): [True: 0, False: 1.62k]
  ------------------
 3243|      0|        return SECFailure; /* error code set by ssl3_FlushHandshake */
 3244|      0|    }
 3245|       |
 3246|  1.62k|    if (!IS_DTLS(ss)) {
  ------------------
  |  |  892|  1.62k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  ------------------
  |  Branch (3246:9): [True: 0, False: 1.62k]
  ------------------
 3247|      0|        PRInt32 sent;
 3248|      0|        sent = ssl3_SendRecord(ss, NULL, ssl_ct_change_cipher_spec,
 3249|      0|                               &change, 1, ssl_SEND_FLAG_FORCE_INTO_BUFFER);
  ------------------
  |  |  223|      0|#define ssl_SEND_FLAG_FORCE_INTO_BUFFER 0x40000000
  ------------------
 3250|      0|        if (sent < 0) {
  ------------------
  |  Branch (3250:13): [True: 0, False: 0]
  ------------------
 3251|      0|            return SECFailure; /* error code set by ssl3_SendRecord */
 3252|      0|        }
 3253|  1.62k|    } else {
 3254|  1.62k|        rv = dtls_QueueMessage(ss, ssl_ct_change_cipher_spec, &change, 1);
 3255|  1.62k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (3255:13): [True: 0, False: 1.62k]
  ------------------
 3256|      0|            return SECFailure;
 3257|      0|        }
 3258|  1.62k|    }
 3259|  1.62k|    return SECSuccess;
 3260|  1.62k|}
ssl3_InitHandshakeHashes:
 3861|  7.11k|{
 3862|  7.11k|    SSL_TRC(30, ("%d: SSL3[%d]: start handshake hashes", SSL_GETPID(), ss->fd));
  ------------------
  |  |   71|  7.11k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 7.11k]
  |  |  ------------------
  |  |   72|  7.11k|    ssl_Trace b
  ------------------
 3863|       |
 3864|  7.11k|    PORT_Assert(ss->ssl3.hs.hashType == handshake_hash_unknown);
  ------------------
  |  |  120|  7.11k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  7.11k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 7.11k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3865|  7.11k|    if (ss->version == SSL_LIBRARY_VERSION_TLS_1_2) {
  ------------------
  |  |   20|  7.11k|#define SSL_LIBRARY_VERSION_TLS_1_2             0x0303
  ------------------
  |  Branch (3865:9): [True: 5.29k, False: 1.81k]
  ------------------
 3866|  5.29k|        ss->ssl3.hs.hashType = handshake_hash_record;
 3867|  5.29k|    } else {
 3868|  1.81k|        PORT_Assert(!ss->ssl3.hs.md5 && !ss->ssl3.hs.sha);
  ------------------
  |  |  120|  1.81k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  3.62k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 1.81k, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 1.81k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3869|       |        /*
 3870|       |         * note: We should probably lookup an SSL3 slot for these
 3871|       |         * handshake hashes in hopes that we wind up with the same slots
 3872|       |         * that the master secret will wind up in ...
 3873|       |         */
 3874|  1.81k|        if (ss->version >= SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|  1.81k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (3874:13): [True: 1.58k, False: 230]
  ------------------
 3875|       |            /* determine the hash from the prf */
 3876|  1.58k|            const SECOidData *hash_oid =
 3877|  1.58k|                SECOID_FindOIDByMechanism(ssl3_GetPrfHashMechanism(ss));
 3878|       |
 3879|       |            /* Get the PKCS #11 mechanism for the Hash from the cipher suite (prf_hash)
 3880|       |             * Convert that to the OidTag. We can then use that OidTag to create our
 3881|       |             * PK11Context */
 3882|  1.58k|            PORT_Assert(hash_oid != NULL);
  ------------------
  |  |  120|  1.58k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.58k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.58k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3883|  1.58k|            if (hash_oid == NULL) {
  ------------------
  |  Branch (3883:17): [True: 0, False: 1.58k]
  ------------------
 3884|      0|                ssl_MapLowLevelError(SSL_ERROR_DIGEST_FAILURE);
 3885|      0|                return SECFailure;
 3886|      0|            }
 3887|       |
 3888|  1.58k|            ss->ssl3.hs.sha = PK11_CreateDigestContext(hash_oid->offset);
 3889|  1.58k|            if (ss->ssl3.hs.sha == NULL) {
  ------------------
  |  Branch (3889:17): [True: 0, False: 1.58k]
  ------------------
 3890|      0|                ssl_MapLowLevelError(SSL_ERROR_SHA_DIGEST_FAILURE);
 3891|      0|                return SECFailure;
 3892|      0|            }
 3893|  1.58k|            ss->ssl3.hs.hashType = handshake_hash_single;
 3894|  1.58k|            if (PK11_DigestBegin(ss->ssl3.hs.sha) != SECSuccess) {
  ------------------
  |  Branch (3894:17): [True: 0, False: 1.58k]
  ------------------
 3895|      0|                ssl_MapLowLevelError(SSL_ERROR_DIGEST_FAILURE);
 3896|      0|                return SECFailure;
 3897|      0|            }
 3898|       |
 3899|       |            /* Transcript hash used on ECH client. */
 3900|  1.58k|            if (!ss->sec.isServer && ss->ssl3.hs.echHpkeCtx) {
  ------------------
  |  Branch (3900:17): [True: 1.58k, False: 0]
  |  Branch (3900:38): [True: 0, False: 1.58k]
  ------------------
 3901|      0|                ss->ssl3.hs.shaEchInner = PK11_CreateDigestContext(hash_oid->offset);
 3902|      0|                if (ss->ssl3.hs.shaEchInner == NULL) {
  ------------------
  |  Branch (3902:21): [True: 0, False: 0]
  ------------------
 3903|      0|                    ssl_MapLowLevelError(SSL_ERROR_SHA_DIGEST_FAILURE);
 3904|      0|                    return SECFailure;
 3905|      0|                }
 3906|      0|                if (PK11_DigestBegin(ss->ssl3.hs.shaEchInner) != SECSuccess) {
  ------------------
  |  Branch (3906:21): [True: 0, False: 0]
  ------------------
 3907|      0|                    ssl_MapLowLevelError(SSL_ERROR_DIGEST_FAILURE);
 3908|      0|                    return SECFailure;
 3909|      0|                }
 3910|      0|            }
 3911|  1.58k|        } else {
 3912|       |            /* Both ss->ssl3.hs.md5 and ss->ssl3.hs.sha should be NULL or
 3913|       |             * created successfully. */
 3914|    230|            ss->ssl3.hs.md5 = PK11_CreateDigestContext(SEC_OID_MD5);
 3915|    230|            if (ss->ssl3.hs.md5 == NULL) {
  ------------------
  |  Branch (3915:17): [True: 0, False: 230]
  ------------------
 3916|      0|                ssl_MapLowLevelError(SSL_ERROR_MD5_DIGEST_FAILURE);
 3917|      0|                return SECFailure;
 3918|      0|            }
 3919|    230|            ss->ssl3.hs.sha = PK11_CreateDigestContext(SEC_OID_SHA1);
 3920|    230|            if (ss->ssl3.hs.sha == NULL) {
  ------------------
  |  Branch (3920:17): [True: 0, False: 230]
  ------------------
 3921|      0|                PK11_DestroyContext(ss->ssl3.hs.md5, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 3922|      0|                ss->ssl3.hs.md5 = NULL;
 3923|      0|                ssl_MapLowLevelError(SSL_ERROR_SHA_DIGEST_FAILURE);
 3924|      0|                return SECFailure;
 3925|      0|            }
 3926|    230|            ss->ssl3.hs.hashType = handshake_hash_combo;
 3927|       |
 3928|    230|            if (PK11_DigestBegin(ss->ssl3.hs.md5) != SECSuccess) {
  ------------------
  |  Branch (3928:17): [True: 0, False: 230]
  ------------------
 3929|      0|                ssl_MapLowLevelError(SSL_ERROR_MD5_DIGEST_FAILURE);
 3930|      0|                return SECFailure;
 3931|      0|            }
 3932|    230|            if (PK11_DigestBegin(ss->ssl3.hs.sha) != SECSuccess) {
  ------------------
  |  Branch (3932:17): [True: 0, False: 230]
  ------------------
 3933|      0|                ssl_MapLowLevelError(SSL_ERROR_SHA_DIGEST_FAILURE);
 3934|      0|                return SECFailure;
 3935|      0|            }
 3936|    230|        }
 3937|  1.81k|    }
 3938|       |
 3939|  7.11k|    if (ss->ssl3.hs.hashType != handshake_hash_record &&
  ------------------
  |  Branch (3939:9): [True: 1.81k, False: 5.29k]
  ------------------
 3940|  7.11k|        ss->ssl3.hs.messages.len > 0) {
  ------------------
  |  Branch (3940:9): [True: 1.81k, False: 0]
  ------------------
 3941|       |        /* When doing ECH, ssl3_UpdateHandshakeHashes will store outer messages
 3942|       |         * into the both the outer and inner transcripts.
 3943|       |         * ssl3_UpdateDefaultHandshakeHashes uses the default context which is
 3944|       |         * the outer when doing client ECH. For ECH shared-mode or backend
 3945|       |         * servers only the hs.messages buffer is used. */
 3946|  1.81k|        if (ssl3_UpdateDefaultHandshakeHashes(ss, ss->ssl3.hs.messages.buf,
  ------------------
  |  Branch (3946:13): [True: 0, False: 1.81k]
  ------------------
 3947|  1.81k|                                              ss->ssl3.hs.messages.len) != SECSuccess) {
 3948|      0|            return SECFailure;
 3949|      0|        }
 3950|       |        /* When doing ECH, deriving the accept_confirmation value requires all
 3951|       |         * messages up to and including the ServerHello
 3952|       |         * (see draft-ietf-tls-esni-14, Section 7.2).
 3953|       |         *
 3954|       |         * Don't free the transcript buffer until confirmation calculation. */
 3955|  1.81k|        if (!ss->ssl3.hs.echHpkeCtx && !ss->opt.enableTls13BackendEch) {
  ------------------
  |  Branch (3955:13): [True: 1.81k, False: 0]
  |  Branch (3955:40): [True: 1.81k, False: 0]
  ------------------
 3956|  1.81k|            sslBuffer_Clear(&ss->ssl3.hs.messages);
 3957|  1.81k|        }
 3958|  1.81k|    }
 3959|  7.11k|    if (ss->ssl3.hs.shaEchInner &&
  ------------------
  |  Branch (3959:9): [True: 0, False: 7.11k]
  ------------------
 3960|  7.11k|        ss->ssl3.hs.echInnerMessages.len > 0) {
  ------------------
  |  Branch (3960:9): [True: 0, False: 0]
  ------------------
 3961|      0|        if (PK11_DigestOp(ss->ssl3.hs.shaEchInner, ss->ssl3.hs.echInnerMessages.buf,
  ------------------
  |  Branch (3961:13): [True: 0, False: 0]
  ------------------
 3962|      0|                          ss->ssl3.hs.echInnerMessages.len) != SECSuccess) {
 3963|      0|            ssl_MapLowLevelError(SSL_ERROR_DIGEST_FAILURE);
 3964|      0|            return SECFailure;
 3965|      0|        }
 3966|      0|        if (!ss->ssl3.hs.echHpkeCtx) {
  ------------------
  |  Branch (3966:13): [True: 0, False: 0]
  ------------------
 3967|      0|            sslBuffer_Clear(&ss->ssl3.hs.echInnerMessages);
 3968|      0|        }
 3969|      0|    }
 3970|       |
 3971|  7.11k|    return SECSuccess;
 3972|  7.11k|}
ssl3_RestartHandshakeHashes:
 3976|  11.0k|{
 3977|  11.0k|    SSL_TRC(30, ("%d: SSL3[%d]: reset handshake hashes",
  ------------------
  |  |   71|  11.0k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 11.0k]
  |  |  ------------------
  |  |   72|  11.0k|    ssl_Trace b
  ------------------
 3978|  11.0k|                 SSL_GETPID(), ss->fd));
 3979|  11.0k|    ss->ssl3.hs.hashType = handshake_hash_unknown;
 3980|  11.0k|    ss->ssl3.hs.messages.len = 0;
 3981|  11.0k|    ss->ssl3.hs.echInnerMessages.len = 0;
 3982|  11.0k|    if (ss->ssl3.hs.md5) {
  ------------------
  |  Branch (3982:9): [True: 2, False: 11.0k]
  ------------------
 3983|      2|        PK11_DestroyContext(ss->ssl3.hs.md5, PR_TRUE);
  ------------------
  |  |  437|      2|#define PR_TRUE 1
  ------------------
 3984|      2|        ss->ssl3.hs.md5 = NULL;
 3985|      2|    }
 3986|  11.0k|    if (ss->ssl3.hs.sha) {
  ------------------
  |  Branch (3986:9): [True: 2, False: 11.0k]
  ------------------
 3987|      2|        PK11_DestroyContext(ss->ssl3.hs.sha, PR_TRUE);
  ------------------
  |  |  437|      2|#define PR_TRUE 1
  ------------------
 3988|      2|        ss->ssl3.hs.sha = NULL;
 3989|      2|    }
 3990|  11.0k|    if (ss->ssl3.hs.shaEchInner) {
  ------------------
  |  Branch (3990:9): [True: 0, False: 11.0k]
  ------------------
 3991|      0|        PK11_DestroyContext(ss->ssl3.hs.shaEchInner, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 3992|      0|        ss->ssl3.hs.shaEchInner = NULL;
 3993|      0|    }
 3994|  11.0k|    if (ss->ssl3.hs.shaPostHandshake) {
  ------------------
  |  Branch (3994:9): [True: 0, False: 11.0k]
  ------------------
 3995|      0|        PK11_DestroyContext(ss->ssl3.hs.shaPostHandshake, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 3996|      0|        ss->ssl3.hs.shaPostHandshake = NULL;
 3997|      0|    }
 3998|  11.0k|}
ssl3_UpdateHandshakeHashesInt:
 4007|  89.0k|{
 4008|       |
 4009|  89.0k|    SECStatus rv = SECSuccess;
 4010|  89.0k|    PRBool explicit = (target != NULL);
 4011|  89.0k|    PRBool appendToEchInner = !ss->sec.isServer &&
  ------------------
  |  Branch (4011:31): [True: 89.0k, False: 0]
  ------------------
 4012|  89.0k|                              ss->ssl3.hs.echHpkeCtx &&
  ------------------
  |  Branch (4012:31): [True: 0, False: 89.0k]
  ------------------
 4013|  89.0k|                              !explicit;
  ------------------
  |  Branch (4013:31): [True: 0, False: 0]
  ------------------
 4014|  89.0k|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|  89.0k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|   131k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 46.1k, False: 42.8k]
  |  |  |  |  |  Branch (208:7): [True: 42.8k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4015|  89.0k|    PORT_Assert(target != &ss->ssl3.hs.echInnerMessages ||
  ------------------
  |  |  120|  89.0k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  89.0k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 89.0k, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4016|  89.0k|                !ss->sec.isServer);
 4017|       |
 4018|  89.0k|    if (target == NULL) {
  ------------------
  |  Branch (4018:9): [True: 84.7k, False: 4.35k]
  ------------------
 4019|       |        /* Default context. */
 4020|  84.7k|        target = &ss->ssl3.hs.messages;
 4021|  84.7k|    }
 4022|       |    /* With TLS 1.3, and versions TLS.1.1 and older, we keep the hash(es)
 4023|       |     * always up to date. However, we must initially buffer the handshake
 4024|       |     * messages, until we know what to do.
 4025|       |     * If ss->ssl3.hs.hashType != handshake_hash_unknown,
 4026|       |     * it means we know what to do. We calculate (hash our input),
 4027|       |     * and we stop appending to the buffer.
 4028|       |     *
 4029|       |     * With TLS 1.2, we always append all handshake messages,
 4030|       |     * and never update the hash, because the hash function we must use for
 4031|       |     * certificate_verify might be different from the hash function we use
 4032|       |     * when signing other handshake hashes. */
 4033|  89.0k|    if (ss->ssl3.hs.hashType == handshake_hash_unknown ||
  ------------------
  |  Branch (4033:9): [True: 16.9k, False: 72.0k]
  ------------------
 4034|  89.0k|        ss->ssl3.hs.hashType == handshake_hash_record) {
  ------------------
  |  Branch (4034:9): [True: 64.6k, False: 7.45k]
  ------------------
 4035|  81.6k|        rv = sslBuffer_Append(target, b, l);
 4036|  81.6k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (4036:13): [True: 0, False: 81.6k]
  ------------------
 4037|      0|            return SECFailure;
 4038|      0|        }
 4039|  81.6k|        if (appendToEchInner) {
  ------------------
  |  Branch (4039:13): [True: 0, False: 81.6k]
  ------------------
 4040|      0|            return sslBuffer_Append(&ss->ssl3.hs.echInnerMessages, b, l);
 4041|      0|        }
 4042|  81.6k|        return SECSuccess;
 4043|  81.6k|    }
 4044|       |
 4045|  7.45k|    PRINT_BUF(90, (ss, "handshake hash input:", b, l));
  ------------------
  |  |   74|  7.45k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 7.45k]
  |  |  ------------------
  |  |   75|  7.45k|    ssl_PrintBuf b
  ------------------
 4046|       |
 4047|  7.45k|    if (ss->ssl3.hs.hashType == handshake_hash_single) {
  ------------------
  |  Branch (4047:9): [True: 4.60k, False: 2.84k]
  ------------------
 4048|  4.60k|        PORT_Assert(ss->version >= SSL_LIBRARY_VERSION_TLS_1_3);
  ------------------
  |  |  120|  4.60k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  4.60k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 4.60k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4049|  4.60k|        if (target == &ss->ssl3.hs.messages) {
  ------------------
  |  Branch (4049:13): [True: 4.60k, False: 0]
  ------------------
 4050|  4.60k|            rv = PK11_DigestOp(ss->ssl3.hs.sha, b, l);
 4051|  4.60k|            if (rv != SECSuccess) {
  ------------------
  |  Branch (4051:17): [True: 0, False: 4.60k]
  ------------------
 4052|      0|                ssl_MapLowLevelError(SSL_ERROR_DIGEST_FAILURE);
 4053|      0|                return rv;
 4054|      0|            }
 4055|  4.60k|        }
 4056|  4.60k|        if (ss->ssl3.hs.shaEchInner &&
  ------------------
  |  Branch (4056:13): [True: 0, False: 4.60k]
  ------------------
 4057|  4.60k|            (target == &ss->ssl3.hs.echInnerMessages || !explicit)) {
  ------------------
  |  Branch (4057:14): [True: 0, False: 0]
  |  Branch (4057:57): [True: 0, False: 0]
  ------------------
 4058|      0|            rv = PK11_DigestOp(ss->ssl3.hs.shaEchInner, b, l);
 4059|      0|            if (rv != SECSuccess) {
  ------------------
  |  Branch (4059:17): [True: 0, False: 0]
  ------------------
 4060|      0|                ssl_MapLowLevelError(SSL_ERROR_DIGEST_FAILURE);
 4061|      0|                return rv;
 4062|      0|            }
 4063|      0|        }
 4064|  4.60k|    } else if (ss->ssl3.hs.hashType == handshake_hash_combo) {
  ------------------
  |  Branch (4064:16): [True: 2.84k, False: 0]
  ------------------
 4065|  2.84k|        rv = PK11_DigestOp(ss->ssl3.hs.md5, b, l);
 4066|  2.84k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (4066:13): [True: 0, False: 2.84k]
  ------------------
 4067|      0|            ssl_MapLowLevelError(SSL_ERROR_MD5_DIGEST_FAILURE);
 4068|      0|            return rv;
 4069|      0|        }
 4070|  2.84k|        rv = PK11_DigestOp(ss->ssl3.hs.sha, b, l);
 4071|  2.84k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (4071:13): [True: 0, False: 2.84k]
  ------------------
 4072|      0|            ssl_MapLowLevelError(SSL_ERROR_SHA_DIGEST_FAILURE);
 4073|      0|            return rv;
 4074|      0|        }
 4075|  2.84k|    }
 4076|  7.45k|    return rv;
 4077|  7.45k|}
ssl3_UpdateHandshakeHashes:
 4106|  84.7k|{
 4107|  84.7k|    return ssl3_UpdateHandshakeHashesInt(ss, b, l, NULL);
 4108|  84.7k|}
ssl3_AppendHandshakeHeaderAndStashSeqNum:
 4135|  3.25k|{
 4136|  3.25k|    PORT_Assert(t != ssl_hs_client_hello);
  ------------------
  |  |  120|  3.25k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  3.25k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 3.25k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4137|  3.25k|    SECStatus rv;
 4138|       |
 4139|       |    /* If we already have a message in place, we need to enqueue it.
 4140|       |     * This empties the buffer. This is a convenient place to call
 4141|       |     * dtls_StageHandshakeMessage to mark the message boundary.
 4142|       |     */
 4143|  3.25k|    if (IS_DTLS(ss)) {
  ------------------
  |  |  892|  3.25k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 3.25k, False: 0]
  |  |  ------------------
  ------------------
 4144|  3.25k|        rv = dtls_StageHandshakeMessage(ss);
 4145|  3.25k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (4145:13): [True: 0, False: 3.25k]
  ------------------
 4146|      0|            return rv;
 4147|      0|        }
 4148|  3.25k|    }
 4149|       |
 4150|  3.25k|    SSL_TRC(30, ("%d: SSL3[%d]: append handshake header: type %s",
  ------------------
  |  |   71|  3.25k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 3.25k]
  |  |  ------------------
  |  |   72|  3.25k|    ssl_Trace b
  ------------------
 4151|  3.25k|                 SSL_GETPID(), ss->fd, ssl3_DecodeHandshakeType(t)));
 4152|       |
 4153|  3.25k|    rv = ssl3_AppendHandshakeNumber(ss, t, 1);
 4154|  3.25k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (4154:9): [True: 0, False: 3.25k]
  ------------------
 4155|      0|        return rv; /* error code set by AppendHandshake, if applicable. */
 4156|      0|    }
 4157|  3.25k|    rv = ssl3_AppendHandshakeNumber(ss, length, 3);
 4158|  3.25k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (4158:9): [True: 0, False: 3.25k]
  ------------------
 4159|      0|        return rv; /* error code set by AppendHandshake, if applicable. */
 4160|      0|    }
 4161|       |
 4162|  3.25k|    if (IS_DTLS(ss)) {
  ------------------
  |  |  892|  3.25k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 3.25k, False: 0]
  |  |  ------------------
  ------------------
 4163|       |        /* RFC 9147. 5.2.  DTLS Handshake Message Format.
 4164|       |         * In DTLS 1.3, the message transcript is computed over the original TLS
 4165|       |         * 1.3-style Handshake messages without the message_seq,
 4166|       |         * fragment_offset, and fragment_length values.  Note that this is a
 4167|       |         * change from DTLS 1.2 where those values were included in the transcript. */
 4168|  3.25k|        PRBool suppressHash = ss->version == SSL_LIBRARY_VERSION_TLS_1_3 ? PR_TRUE : PR_FALSE;
  ------------------
  |  |   21|  3.25k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
                      PRBool suppressHash = ss->version == SSL_LIBRARY_VERSION_TLS_1_3 ? PR_TRUE : PR_FALSE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
                      PRBool suppressHash = ss->version == SSL_LIBRARY_VERSION_TLS_1_3 ? PR_TRUE : PR_FALSE;
  ------------------
  |  |  438|  3.25k|#define PR_FALSE 0
  ------------------
  |  Branch (4168:31): [True: 0, False: 3.25k]
  ------------------
 4169|       |
 4170|       |        /* Note that we make an unfragmented message here. We fragment in the
 4171|       |         * transmission code, if necessary */
 4172|  3.25k|        rv = ssl3_AppendHandshakeNumberSuppressHash(ss, ss->ssl3.hs.sendMessageSeq, 2, suppressHash);
 4173|  3.25k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (4173:13): [True: 0, False: 3.25k]
  ------------------
 4174|      0|            return rv; /* error code set by AppendHandshake, if applicable. */
 4175|      0|        }
 4176|       |        /* In case if we provide a buffer for the sequence message,
 4177|       |        we write down sendMessageSeq to the buffer. */
 4178|  3.25k|        if (sendMessageSeqOut != NULL) {
  ------------------
  |  Branch (4178:13): [True: 0, False: 3.25k]
  ------------------
 4179|      0|            *sendMessageSeqOut = ss->ssl3.hs.sendMessageSeq;
 4180|      0|        }
 4181|  3.25k|        ss->ssl3.hs.sendMessageSeq++;
 4182|       |
 4183|       |        /* 0 is the fragment offset, because it's not fragmented yet */
 4184|  3.25k|        rv = ssl3_AppendHandshakeNumberSuppressHash(ss, 0, 3, suppressHash);
 4185|  3.25k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (4185:13): [True: 0, False: 3.25k]
  ------------------
 4186|      0|            return rv; /* error code set by AppendHandshake, if applicable. */
 4187|      0|        }
 4188|       |
 4189|       |        /* Fragment length -- set to the packet length because not fragmented */
 4190|  3.25k|        rv = ssl3_AppendHandshakeNumberSuppressHash(ss, length, 3, suppressHash);
 4191|  3.25k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (4191:13): [True: 0, False: 3.25k]
  ------------------
 4192|      0|            return rv; /* error code set by AppendHandshake, if applicable. */
 4193|      0|        }
 4194|  3.25k|    }
 4195|       |
 4196|  3.25k|    return rv; /* error code set by AppendHandshake, if applicable. */
 4197|  3.25k|}
ssl3_AppendHandshakeHeader:
 4204|  3.25k|{
 4205|  3.25k|    return ssl3_AppendHandshakeHeaderAndStashSeqNum(ss, t, length, NULL);
 4206|  3.25k|}
ssl3_ConsumeHandshake:
 4226|  10.0k|{
 4227|  10.0k|    PORT_Assert(ss->opt.noLocks || ssl_HaveRecvBufLock(ss));
  ------------------
  |  |  120|  10.0k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  14.8k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 5.21k, False: 4.82k]
  |  |  |  |  |  Branch (208:7): [True: 4.82k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4228|  10.0k|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|  10.0k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  14.8k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 5.21k, False: 4.82k]
  |  |  |  |  |  Branch (208:7): [True: 4.82k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4229|       |
 4230|  10.0k|    if ((PRUint32)bytes > *length) {
  ------------------
  |  Branch (4230:9): [True: 4, False: 10.0k]
  ------------------
 4231|      4|        return ssl3_DecodeError(ss);
 4232|      4|    }
 4233|  10.0k|    PORT_Memcpy(v, *b, bytes);
  ------------------
  |  |  180|  10.0k|#define PORT_Memcpy memcpy
  ------------------
 4234|  10.0k|    PRINT_BUF(60, (ss, "consume bytes:", *b, bytes));
  ------------------
  |  |   74|  10.0k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 10.0k]
  |  |  ------------------
  |  |   75|  10.0k|    ssl_PrintBuf b
  ------------------
 4235|  10.0k|    *b += bytes;
 4236|  10.0k|    *length -= bytes;
 4237|  10.0k|    return SECSuccess;
 4238|  10.0k|}
ssl3_ConsumeHandshakeNumber64:
 4250|   106k|{
 4251|   106k|    PRUint8 *buf = *b;
 4252|   106k|    PRUint32 i;
 4253|       |
 4254|   106k|    PORT_Assert(ss->opt.noLocks || ssl_HaveRecvBufLock(ss));
  ------------------
  |  |  120|   106k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|   160k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 52.9k, False: 53.6k]
  |  |  |  |  |  Branch (208:7): [True: 53.6k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4255|   106k|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|   106k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|   160k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 52.9k, False: 53.6k]
  |  |  |  |  |  Branch (208:7): [True: 53.6k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4256|       |
 4257|   106k|    *num = 0;
 4258|   106k|    if (bytes > sizeof(*num)) {
  ------------------
  |  Branch (4258:9): [True: 0, False: 106k]
  ------------------
 4259|      0|        PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 4260|      0|        return SECFailure;
 4261|      0|    }
 4262|       |
 4263|   106k|    if (bytes > *length) {
  ------------------
  |  Branch (4263:9): [True: 297, False: 106k]
  ------------------
 4264|    297|        return ssl3_DecodeError(ss);
 4265|    297|    }
 4266|   106k|    PRINT_BUF(60, (ss, "consume bytes:", *b, bytes));
  ------------------
  |  |   74|   106k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 106k]
  |  |  ------------------
  |  |   75|   106k|    ssl_PrintBuf b
  ------------------
 4267|       |
 4268|   353k|    for (i = 0; i < bytes; i++) {
  ------------------
  |  Branch (4268:17): [True: 247k, False: 106k]
  ------------------
 4269|   247k|        *num = (*num << 8) + buf[i];
 4270|   247k|    }
 4271|   106k|    *b += bytes;
 4272|   106k|    *length -= bytes;
 4273|   106k|    return SECSuccess;
 4274|   106k|}
ssl3_ConsumeHandshakeNumber:
 4279|  99.4k|{
 4280|  99.4k|    PRUint64 num64;
 4281|  99.4k|    SECStatus rv;
 4282|       |
 4283|  99.4k|    PORT_Assert(bytes <= sizeof(*num));
  ------------------
  |  |  120|  99.4k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  99.4k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 99.4k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4284|  99.4k|    if (bytes > sizeof(*num)) {
  ------------------
  |  Branch (4284:9): [True: 0, False: 99.4k]
  ------------------
 4285|      0|        PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 4286|      0|        return SECFailure;
 4287|      0|    }
 4288|  99.4k|    rv = ssl3_ConsumeHandshakeNumber64(ss, &num64, bytes, b, length);
 4289|  99.4k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (4289:9): [True: 100, False: 99.3k]
  ------------------
 4290|    100|        return SECFailure;
 4291|    100|    }
 4292|  99.3k|    *num = num64 & 0xffffffff;
 4293|  99.3k|    return SECSuccess;
 4294|  99.4k|}
ssl3_ConsumeHandshakeVariable:
 4313|  26.3k|{
 4314|  26.3k|    PRUint32 count;
 4315|  26.3k|    SECStatus rv;
 4316|       |
 4317|  26.3k|    PORT_Assert(bytes <= 3);
  ------------------
  |  |  120|  26.3k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  26.3k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 26.3k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4318|  26.3k|    i->len = 0;
 4319|  26.3k|    i->data = NULL;
 4320|  26.3k|    i->type = siBuffer;
 4321|  26.3k|    rv = ssl3_ConsumeHandshakeNumber(ss, &count, bytes, b, length);
 4322|  26.3k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (4322:9): [True: 15, False: 26.3k]
  ------------------
 4323|     15|        return SECFailure;
 4324|     15|    }
 4325|  26.3k|    if (count > 0) {
  ------------------
  |  Branch (4325:9): [True: 17.9k, False: 8.42k]
  ------------------
 4326|  17.9k|        if (count > *length) {
  ------------------
  |  Branch (4326:13): [True: 145, False: 17.7k]
  ------------------
 4327|    145|            return ssl3_DecodeError(ss);
 4328|    145|        }
 4329|  17.7k|        i->data = *b;
 4330|  17.7k|        i->len = count;
 4331|  17.7k|        *b += count;
 4332|  17.7k|        *length -= count;
 4333|  17.7k|    }
 4334|  26.2k|    return SECSuccess;
 4335|  26.3k|}
ssl3_HashTypeToOID:
 4343|   228k|{
 4344|   228k|    switch (hashType) {
 4345|  37.6k|        case ssl_hash_sha1:
  ------------------
  |  Branch (4345:9): [True: 37.6k, False: 191k]
  ------------------
 4346|  37.6k|            return SEC_OID_SHA1;
 4347|  83.2k|        case ssl_hash_sha256:
  ------------------
  |  Branch (4347:9): [True: 83.2k, False: 145k]
  ------------------
 4348|  83.2k|            return SEC_OID_SHA256;
 4349|  56.0k|        case ssl_hash_sha384:
  ------------------
  |  Branch (4349:9): [True: 56.0k, False: 172k]
  ------------------
 4350|  56.0k|            return SEC_OID_SHA384;
 4351|  51.7k|        case ssl_hash_sha512:
  ------------------
  |  Branch (4351:9): [True: 51.7k, False: 177k]
  ------------------
 4352|  51.7k|            return SEC_OID_SHA512;
 4353|     38|        default:
  ------------------
  |  Branch (4353:9): [True: 38, False: 228k]
  ------------------
 4354|     38|            break;
 4355|   228k|    }
 4356|     38|    return SEC_OID_UNKNOWN;
 4357|   228k|}
ssl3_AuthTypeToOID:
 4361|   173k|{
 4362|   173k|    switch (authType) {
 4363|  44.8k|        case ssl_auth_rsa_sign:
  ------------------
  |  Branch (4363:9): [True: 44.8k, False: 128k]
  ------------------
 4364|  44.8k|            return SEC_OID_PKCS1_RSA_ENCRYPTION;
 4365|      5|        case ssl_auth_rsa_pss:
  ------------------
  |  Branch (4365:9): [True: 5, False: 173k]
  ------------------
 4366|      5|            return SEC_OID_PKCS1_RSA_PSS_SIGNATURE;
 4367|  86.2k|        case ssl_auth_ecdsa:
  ------------------
  |  Branch (4367:9): [True: 86.2k, False: 87.4k]
  ------------------
 4368|  86.2k|            return SEC_OID_ANSIX962_EC_PUBLIC_KEY;
 4369|  42.6k|        case ssl_auth_dsa:
  ------------------
  |  Branch (4369:9): [True: 42.6k, False: 131k]
  ------------------
 4370|  42.6k|            return SEC_OID_ANSIX9_DSA_SIGNATURE;
 4371|      0|        default:
  ------------------
  |  Branch (4371:9): [True: 0, False: 173k]
  ------------------
 4372|      0|            break;
 4373|   173k|    }
 4374|       |    /* shouldn't ever get there */
 4375|      0|    PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4376|      0|    return SEC_OID_UNKNOWN;
 4377|   173k|}
ssl_SignatureSchemeToHashType:
 4381|   212k|{
 4382|   212k|    switch (scheme) {
  ------------------
  |  Branch (4382:13): [True: 0, False: 212k]
  ------------------
 4383|  10.9k|        case ssl_sig_rsa_pkcs1_sha1:
  ------------------
  |  Branch (4383:9): [True: 10.9k, False: 201k]
  ------------------
 4384|  20.8k|        case ssl_sig_dsa_sha1:
  ------------------
  |  Branch (4384:9): [True: 9.87k, False: 202k]
  ------------------
 4385|  37.5k|        case ssl_sig_ecdsa_sha1:
  ------------------
  |  Branch (4385:9): [True: 16.7k, False: 195k]
  ------------------
 4386|  37.5k|            return ssl_hash_sha1;
 4387|  10.9k|        case ssl_sig_rsa_pkcs1_sha256:
  ------------------
  |  Branch (4387:9): [True: 10.9k, False: 201k]
  ------------------
 4388|  47.0k|        case ssl_sig_ecdsa_secp256r1_sha256:
  ------------------
  |  Branch (4388:9): [True: 36.0k, False: 175k]
  ------------------
 4389|  62.0k|        case ssl_sig_rsa_pss_rsae_sha256:
  ------------------
  |  Branch (4389:9): [True: 15.0k, False: 197k]
  ------------------
 4390|  62.0k|        case ssl_sig_rsa_pss_pss_sha256:
  ------------------
  |  Branch (4390:9): [True: 20, False: 212k]
  ------------------
 4391|  73.6k|        case ssl_sig_dsa_sha256:
  ------------------
  |  Branch (4391:9): [True: 11.6k, False: 200k]
  ------------------
 4392|  73.6k|            return ssl_hash_sha256;
 4393|  10.9k|        case ssl_sig_rsa_pkcs1_sha384:
  ------------------
  |  Branch (4393:9): [True: 10.9k, False: 201k]
  ------------------
 4394|  27.7k|        case ssl_sig_ecdsa_secp384r1_sha384:
  ------------------
  |  Branch (4394:9): [True: 16.8k, False: 195k]
  ------------------
 4395|  39.8k|        case ssl_sig_rsa_pss_rsae_sha384:
  ------------------
  |  Branch (4395:9): [True: 12.0k, False: 199k]
  ------------------
 4396|  39.8k|        case ssl_sig_rsa_pss_pss_sha384:
  ------------------
  |  Branch (4396:9): [True: 18, False: 212k]
  ------------------
 4397|  49.6k|        case ssl_sig_dsa_sha384:
  ------------------
  |  Branch (4397:9): [True: 9.80k, False: 202k]
  ------------------
 4398|  49.6k|            return ssl_hash_sha384;
 4399|  10.9k|        case ssl_sig_rsa_pkcs1_sha512:
  ------------------
  |  Branch (4399:9): [True: 10.9k, False: 201k]
  ------------------
 4400|  27.5k|        case ssl_sig_ecdsa_secp521r1_sha512:
  ------------------
  |  Branch (4400:9): [True: 16.6k, False: 195k]
  ------------------
 4401|  39.7k|        case ssl_sig_rsa_pss_rsae_sha512:
  ------------------
  |  Branch (4401:9): [True: 12.2k, False: 199k]
  ------------------
 4402|  39.8k|        case ssl_sig_rsa_pss_pss_sha512:
  ------------------
  |  Branch (4402:9): [True: 68, False: 211k]
  ------------------
 4403|  51.1k|        case ssl_sig_dsa_sha512:
  ------------------
  |  Branch (4403:9): [True: 11.2k, False: 200k]
  ------------------
 4404|  51.1k|            return ssl_hash_sha512;
 4405|      0|        case ssl_sig_rsa_pkcs1_sha1md5:
  ------------------
  |  Branch (4405:9): [True: 0, False: 212k]
  ------------------
 4406|      0|            return ssl_hash_none; /* Special for TLS 1.0/1.1. */
 4407|      0|        case ssl_sig_none:
  ------------------
  |  Branch (4407:9): [True: 0, False: 212k]
  ------------------
 4408|      0|        case ssl_sig_ed25519:
  ------------------
  |  Branch (4408:9): [True: 0, False: 212k]
  ------------------
 4409|      0|        case ssl_sig_ed448:
  ------------------
  |  Branch (4409:9): [True: 0, False: 212k]
  ------------------
 4410|      0|            break;
 4411|   212k|    }
 4412|      0|    PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4413|      0|    return ssl_hash_none;
 4414|   212k|}
ssl_SignatureSchemeValid:
 4435|  15.5k|{
 4436|  15.5k|    if (!ssl_IsSupportedSignatureScheme(scheme)) {
  ------------------
  |  Branch (4436:9): [True: 12.2k, False: 3.34k]
  ------------------
 4437|  12.2k|        return PR_FALSE;
  ------------------
  |  |  438|  12.2k|#define PR_FALSE 0
  ------------------
 4438|  12.2k|    }
 4439|       |    /* if we are purposefully passed SEC_OID_UNKNOWN, it means
 4440|       |     * we not checking the scheme against a potential key, so skip
 4441|       |     * the call */
 4442|  3.34k|    if ((spkiOid != SEC_OID_UNKNOWN) &&
  ------------------
  |  Branch (4442:9): [True: 2.46k, False: 888]
  ------------------
 4443|  3.34k|        !ssl_SignatureSchemeMatchesSpkiOid(scheme, spkiOid)) {
  ------------------
  |  Branch (4443:9): [True: 11, False: 2.44k]
  ------------------
 4444|     11|        return PR_FALSE;
  ------------------
  |  |  438|     11|#define PR_FALSE 0
  ------------------
 4445|     11|    }
 4446|  3.33k|    if (isTls13) {
  ------------------
  |  Branch (4446:9): [True: 0, False: 3.33k]
  ------------------
 4447|      0|        if (ssl_SignatureSchemeToHashType(scheme) == ssl_hash_sha1) {
  ------------------
  |  Branch (4447:13): [True: 0, False: 0]
  ------------------
 4448|      0|            return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 4449|      0|        }
 4450|      0|        if (ssl_IsRsaPkcs1SignatureScheme(scheme)) {
  ------------------
  |  Branch (4450:13): [True: 0, False: 0]
  ------------------
 4451|      0|            return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 4452|      0|        }
 4453|      0|        if (ssl_IsDsaSignatureScheme(scheme)) {
  ------------------
  |  Branch (4453:13): [True: 0, False: 0]
  ------------------
 4454|      0|            return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 4455|      0|        }
 4456|       |        /* With TLS 1.3, EC keys should have been selected based on calling
 4457|       |         * ssl_SignatureSchemeFromSpki(), reject them otherwise. */
 4458|      0|        return spkiOid != SEC_OID_ANSIX962_EC_PUBLIC_KEY;
 4459|      0|    }
 4460|  3.33k|    return PR_TRUE;
  ------------------
  |  |  437|  3.33k|#define PR_TRUE 1
  ------------------
 4461|  3.33k|}
ssl_SignatureSchemeFromSpki:
 4552|  2.47k|{
 4553|  2.47k|    SECOidTag spkiOid = SECOID_GetAlgorithmTag(&spki->algorithm);
  ------------------
  |  |  119|  2.47k|#define SECOID_GetAlgorithmTag SECOID_GetAlgorithmTag_Util
  ------------------
 4554|       |
 4555|  2.47k|    if (spkiOid == SEC_OID_PKCS1_RSA_PSS_SIGNATURE) {
  ------------------
  |  Branch (4555:9): [True: 12, False: 2.46k]
  ------------------
 4556|     12|        return ssl_SignatureSchemeFromPssSpki(spki, scheme);
 4557|     12|    }
 4558|       |
 4559|       |    /* Only do this lookup for TLS 1.3, where the scheme can be determined from
 4560|       |     * the SPKI alone because the ECDSA key size determines the hash. Earlier
 4561|       |     * TLS versions allow the same EC key to be used with different hashes. */
 4562|  2.46k|    if (isTls13 && spkiOid == SEC_OID_ANSIX962_EC_PUBLIC_KEY) {
  ------------------
  |  Branch (4562:9): [True: 0, False: 2.46k]
  |  Branch (4562:20): [True: 0, False: 0]
  ------------------
 4563|      0|        return ssl_SignatureSchemeFromEcSpki(spki, scheme);
 4564|      0|    }
 4565|       |
 4566|  2.46k|    *scheme = ssl_sig_none;
 4567|  2.46k|    return SECSuccess;
 4568|  2.46k|}
ssl_SignatureSchemeEnabled:
 4573|  2.45k|{
 4574|  2.45k|    unsigned int i;
 4575|  21.0k|    for (i = 0; i < ss->ssl3.signatureSchemeCount; ++i) {
  ------------------
  |  Branch (4575:17): [True: 21.0k, False: 2]
  ------------------
 4576|  21.0k|        if (scheme == ss->ssl3.signatureSchemes[i]) {
  ------------------
  |  Branch (4576:13): [True: 2.44k, False: 18.5k]
  ------------------
 4577|  2.44k|            return PR_TRUE;
  ------------------
  |  |  437|  2.44k|#define PR_TRUE 1
  ------------------
 4578|  2.44k|        }
 4579|  21.0k|    }
 4580|      2|    return PR_FALSE;
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
 4581|  2.45k|}
ssl_CheckSignatureSchemeConsistency:
 4609|  2.47k|{
 4610|  2.47k|    SSLSignatureScheme spkiScheme;
 4611|  2.47k|    PRBool isTLS13 = ss->version == SSL_LIBRARY_VERSION_TLS_1_3;
  ------------------
  |  |   21|  2.47k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
 4612|  2.47k|    SECOidTag spkiOid;
 4613|  2.47k|    SECStatus rv;
 4614|       |
 4615|  2.47k|    rv = ssl_SignatureSchemeFromSpki(spki, isTLS13, &spkiScheme);
 4616|  2.47k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (4616:9): [True: 4, False: 2.47k]
  ------------------
 4617|      4|        return SECFailure;
 4618|      4|    }
 4619|  2.47k|    if (spkiScheme != ssl_sig_none) {
  ------------------
  |  Branch (4619:9): [True: 7, False: 2.46k]
  ------------------
 4620|       |        /* The SPKI in the certificate can only be used for a single scheme. */
 4621|      7|        if (spkiScheme != scheme ||
  ------------------
  |  Branch (4621:13): [True: 6, False: 1]
  ------------------
 4622|      7|            !ssl_SignatureSchemeEnabled(ss, scheme)) {
  ------------------
  |  Branch (4622:13): [True: 1, False: 0]
  ------------------
 4623|      7|            PORT_SetError(SSL_ERROR_INCORRECT_SIGNATURE_ALGORITHM);
  ------------------
  |  |   65|      7|#define PORT_SetError PORT_SetError_Util
  ------------------
 4624|      7|            return SECFailure;
 4625|      7|        }
 4626|      0|        return SECSuccess;
 4627|      7|    }
 4628|       |
 4629|  2.46k|    spkiOid = SECOID_GetAlgorithmTag(&spki->algorithm);
  ------------------
  |  |  119|  2.46k|#define SECOID_GetAlgorithmTag SECOID_GetAlgorithmTag_Util
  ------------------
 4630|       |
 4631|       |    /* If we're a client, check that the signature algorithm matches the signing
 4632|       |     * key type of the cipher suite. */
 4633|  2.46k|    if (!isTLS13 && !ss->sec.isServer) {
  ------------------
  |  Branch (4633:9): [True: 2.46k, False: 0]
  |  Branch (4633:21): [True: 2.46k, False: 0]
  ------------------
 4634|  2.46k|        if (!ssl_SignatureKeyMatchesSpkiOid(ss->ssl3.hs.kea_def, spkiOid)) {
  ------------------
  |  Branch (4634:13): [True: 6, False: 2.46k]
  ------------------
 4635|      6|            PORT_SetError(SSL_ERROR_INCORRECT_SIGNATURE_ALGORITHM);
  ------------------
  |  |   65|      6|#define PORT_SetError PORT_SetError_Util
  ------------------
 4636|      6|            return SECFailure;
 4637|      6|        }
 4638|  2.46k|    }
 4639|       |
 4640|       |    /* Verify that the signature scheme matches the signing key. */
 4641|  2.46k|    if ((spkiOid == SEC_OID_UNKNOWN) ||
  ------------------
  |  Branch (4641:9): [True: 0, False: 2.46k]
  ------------------
 4642|  2.46k|        !ssl_SignatureSchemeValid(scheme, spkiOid, isTLS13)) {
  ------------------
  |  Branch (4642:9): [True: 11, False: 2.44k]
  ------------------
 4643|     11|        PORT_SetError(SSL_ERROR_INCORRECT_SIGNATURE_ALGORITHM);
  ------------------
  |  |   65|     11|#define PORT_SetError PORT_SetError_Util
  ------------------
 4644|     11|        return SECFailure;
 4645|     11|    }
 4646|       |
 4647|  2.44k|    if (!ssl_SignatureSchemeEnabled(ss, scheme)) {
  ------------------
  |  Branch (4647:9): [True: 1, False: 2.44k]
  ------------------
 4648|      1|        PORT_SetError(SSL_ERROR_UNSUPPORTED_SIGNATURE_ALGORITHM);
  ------------------
  |  |   65|      1|#define PORT_SetError PORT_SetError_Util
  ------------------
 4649|      1|        return SECFailure;
 4650|      1|    }
 4651|       |
 4652|  2.44k|    return SECSuccess;
 4653|  2.44k|}
ssl_IsSupportedSignatureScheme:
 4657|  18.0k|{
 4658|  18.0k|    switch (scheme) {
  ------------------
  |  Branch (4658:13): [True: 9.65k, False: 8.39k]
  ------------------
 4659|     85|        case ssl_sig_rsa_pkcs1_sha1:
  ------------------
  |  Branch (4659:9): [True: 85, False: 17.9k]
  ------------------
 4660|    165|        case ssl_sig_rsa_pkcs1_sha256:
  ------------------
  |  Branch (4660:9): [True: 80, False: 17.9k]
  ------------------
 4661|    254|        case ssl_sig_rsa_pkcs1_sha384:
  ------------------
  |  Branch (4661:9): [True: 89, False: 17.9k]
  ------------------
 4662|    305|        case ssl_sig_rsa_pkcs1_sha512:
  ------------------
  |  Branch (4662:9): [True: 51, False: 17.9k]
  ------------------
 4663|  2.35k|        case ssl_sig_rsa_pss_rsae_sha256:
  ------------------
  |  Branch (4663:9): [True: 2.04k, False: 15.9k]
  ------------------
 4664|  2.45k|        case ssl_sig_rsa_pss_rsae_sha384:
  ------------------
  |  Branch (4664:9): [True: 97, False: 17.9k]
  ------------------
 4665|  2.67k|        case ssl_sig_rsa_pss_rsae_sha512:
  ------------------
  |  Branch (4665:9): [True: 226, False: 17.8k]
  ------------------
 4666|  2.69k|        case ssl_sig_rsa_pss_pss_sha256:
  ------------------
  |  Branch (4666:9): [True: 20, False: 18.0k]
  ------------------
 4667|  2.71k|        case ssl_sig_rsa_pss_pss_sha384:
  ------------------
  |  Branch (4667:9): [True: 18, False: 18.0k]
  ------------------
 4668|  2.78k|        case ssl_sig_rsa_pss_pss_sha512:
  ------------------
  |  Branch (4668:9): [True: 68, False: 17.9k]
  ------------------
 4669|  2.96k|        case ssl_sig_ecdsa_secp256r1_sha256:
  ------------------
  |  Branch (4669:9): [True: 184, False: 17.8k]
  ------------------
 4670|  3.15k|        case ssl_sig_ecdsa_secp384r1_sha384:
  ------------------
  |  Branch (4670:9): [True: 190, False: 17.8k]
  ------------------
 4671|  3.21k|        case ssl_sig_ecdsa_secp521r1_sha512:
  ------------------
  |  Branch (4671:9): [True: 60, False: 17.9k]
  ------------------
 4672|  3.32k|        case ssl_sig_dsa_sha1:
  ------------------
  |  Branch (4672:9): [True: 104, False: 17.9k]
  ------------------
 4673|  4.60k|        case ssl_sig_dsa_sha256:
  ------------------
  |  Branch (4673:9): [True: 1.28k, False: 16.7k]
  ------------------
 4674|  4.66k|        case ssl_sig_dsa_sha384:
  ------------------
  |  Branch (4674:9): [True: 57, False: 17.9k]
  ------------------
 4675|  5.68k|        case ssl_sig_dsa_sha512:
  ------------------
  |  Branch (4675:9): [True: 1.02k, False: 17.0k]
  ------------------
 4676|  5.82k|        case ssl_sig_ecdsa_sha1:
  ------------------
  |  Branch (4676:9): [True: 137, False: 17.9k]
  ------------------
 4677|  5.82k|            return ssl_SchemePolicyOK(scheme, kSSLSigSchemePolicy);
 4678|      0|            break;
 4679|       |
 4680|      0|        case ssl_sig_rsa_pkcs1_sha1md5:
  ------------------
  |  Branch (4680:9): [True: 0, False: 18.0k]
  ------------------
 4681|  2.55k|        case ssl_sig_none:
  ------------------
  |  Branch (4681:9): [True: 2.55k, False: 15.4k]
  ------------------
 4682|  2.55k|        case ssl_sig_ed25519:
  ------------------
  |  Branch (4682:9): [True: 0, False: 18.0k]
  ------------------
 4683|  2.56k|        case ssl_sig_ed448:
  ------------------
  |  Branch (4683:9): [True: 9, False: 18.0k]
  ------------------
 4684|  2.56k|            return PR_FALSE;
  ------------------
  |  |  438|  2.56k|#define PR_FALSE 0
  ------------------
 4685|  18.0k|    }
 4686|  9.65k|    return PR_FALSE;
  ------------------
  |  |  438|  9.65k|#define PR_FALSE 0
  ------------------
 4687|  18.0k|}
ssl_IsRsaPssSignatureScheme:
 4691|   474k|{
 4692|   474k|    switch (scheme) {
 4693|  26.9k|        case ssl_sig_rsa_pss_rsae_sha256:
  ------------------
  |  Branch (4693:9): [True: 26.9k, False: 447k]
  ------------------
 4694|  50.9k|        case ssl_sig_rsa_pss_rsae_sha384:
  ------------------
  |  Branch (4694:9): [True: 24.0k, False: 450k]
  ------------------
 4695|  75.2k|        case ssl_sig_rsa_pss_rsae_sha512:
  ------------------
  |  Branch (4695:9): [True: 24.2k, False: 450k]
  ------------------
 4696|  75.2k|        case ssl_sig_rsa_pss_pss_sha256:
  ------------------
  |  Branch (4696:9): [True: 20, False: 474k]
  ------------------
 4697|  75.2k|        case ssl_sig_rsa_pss_pss_sha384:
  ------------------
  |  Branch (4697:9): [True: 18, False: 474k]
  ------------------
 4698|  75.3k|        case ssl_sig_rsa_pss_pss_sha512:
  ------------------
  |  Branch (4698:9): [True: 68, False: 474k]
  ------------------
 4699|  75.3k|            return PR_TRUE;
  ------------------
  |  |  437|  75.3k|#define PR_TRUE 1
  ------------------
 4700|       |
 4701|   399k|        default:
  ------------------
  |  Branch (4701:9): [True: 399k, False: 75.3k]
  ------------------
 4702|   399k|            return PR_FALSE;
  ------------------
  |  |  438|   399k|#define PR_FALSE 0
  ------------------
 4703|   474k|    }
 4704|      0|    return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 4705|   474k|}
ssl_IsRsaeSignatureScheme:
 4709|  69.1k|{
 4710|  69.1k|    switch (scheme) {
 4711|  4.60k|        case ssl_sig_rsa_pss_rsae_sha256:
  ------------------
  |  Branch (4711:9): [True: 4.60k, False: 64.5k]
  ------------------
 4712|  9.21k|        case ssl_sig_rsa_pss_rsae_sha384:
  ------------------
  |  Branch (4712:9): [True: 4.60k, False: 64.5k]
  ------------------
 4713|  13.8k|        case ssl_sig_rsa_pss_rsae_sha512:
  ------------------
  |  Branch (4713:9): [True: 4.60k, False: 64.5k]
  ------------------
 4714|  13.8k|            return PR_TRUE;
  ------------------
  |  |  437|  13.8k|#define PR_TRUE 1
  ------------------
 4715|       |
 4716|  55.2k|        default:
  ------------------
  |  Branch (4716:9): [True: 55.2k, False: 13.8k]
  ------------------
 4717|  55.2k|            return PR_FALSE;
  ------------------
  |  |  438|  55.2k|#define PR_FALSE 0
  ------------------
 4718|  69.1k|    }
 4719|      0|    return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 4720|  69.1k|}
ssl_IsRsaPkcs1SignatureScheme:
 4724|   101k|{
 4725|   101k|    switch (scheme) {
 4726|  6.81k|        case ssl_sig_rsa_pkcs1_sha256:
  ------------------
  |  Branch (4726:9): [True: 6.81k, False: 94.1k]
  ------------------
 4727|  13.6k|        case ssl_sig_rsa_pkcs1_sha384:
  ------------------
  |  Branch (4727:9): [True: 6.81k, False: 94.1k]
  ------------------
 4728|  20.4k|        case ssl_sig_rsa_pkcs1_sha512:
  ------------------
  |  Branch (4728:9): [True: 6.81k, False: 94.1k]
  ------------------
 4729|  27.2k|        case ssl_sig_rsa_pkcs1_sha1:
  ------------------
  |  Branch (4729:9): [True: 6.81k, False: 94.1k]
  ------------------
 4730|  27.2k|            return PR_TRUE;
  ------------------
  |  |  437|  27.2k|#define PR_TRUE 1
  ------------------
 4731|       |
 4732|  73.7k|        default:
  ------------------
  |  Branch (4732:9): [True: 73.7k, False: 27.2k]
  ------------------
 4733|  73.7k|            return PR_FALSE;
  ------------------
  |  |  438|  73.7k|#define PR_FALSE 0
  ------------------
 4734|   101k|    }
 4735|      0|    return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 4736|   101k|}
ssl_IsDsaSignatureScheme:
 4740|   199k|{
 4741|   199k|    switch (scheme) {
 4742|  17.6k|        case ssl_sig_dsa_sha256:
  ------------------
  |  Branch (4742:9): [True: 17.6k, False: 181k]
  ------------------
 4743|  35.3k|        case ssl_sig_dsa_sha384:
  ------------------
  |  Branch (4743:9): [True: 17.6k, False: 181k]
  ------------------
 4744|  52.9k|        case ssl_sig_dsa_sha512:
  ------------------
  |  Branch (4744:9): [True: 17.6k, False: 181k]
  ------------------
 4745|  70.6k|        case ssl_sig_dsa_sha1:
  ------------------
  |  Branch (4745:9): [True: 17.6k, False: 181k]
  ------------------
 4746|  70.6k|            return PR_TRUE;
  ------------------
  |  |  437|  70.6k|#define PR_TRUE 1
  ------------------
 4747|       |
 4748|   128k|        default:
  ------------------
  |  Branch (4748:9): [True: 128k, False: 70.6k]
  ------------------
 4749|   128k|            return PR_FALSE;
  ------------------
  |  |  438|   128k|#define PR_FALSE 0
  ------------------
 4750|   199k|    }
 4751|      0|    return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 4752|   199k|}
ssl_SignatureSchemeToAuthType:
 4756|   176k|{
 4757|   176k|    switch (scheme) {
 4758|  10.9k|        case ssl_sig_rsa_pkcs1_sha1:
  ------------------
  |  Branch (4758:9): [True: 10.9k, False: 165k]
  ------------------
 4759|  10.9k|        case ssl_sig_rsa_pkcs1_sha1md5:
  ------------------
  |  Branch (4759:9): [True: 27, False: 176k]
  ------------------
 4760|  21.9k|        case ssl_sig_rsa_pkcs1_sha256:
  ------------------
  |  Branch (4760:9): [True: 10.9k, False: 165k]
  ------------------
 4761|  32.8k|        case ssl_sig_rsa_pkcs1_sha384:
  ------------------
  |  Branch (4761:9): [True: 10.9k, False: 165k]
  ------------------
 4762|  43.7k|        case ssl_sig_rsa_pkcs1_sha512:
  ------------------
  |  Branch (4762:9): [True: 10.9k, False: 165k]
  ------------------
 4763|       |        /* We report based on the key type for PSS signatures. */
 4764|  45.7k|        case ssl_sig_rsa_pss_rsae_sha256:
  ------------------
  |  Branch (4764:9): [True: 2.00k, False: 174k]
  ------------------
 4765|  45.8k|        case ssl_sig_rsa_pss_rsae_sha384:
  ------------------
  |  Branch (4765:9): [True: 53, False: 176k]
  ------------------
 4766|  46.0k|        case ssl_sig_rsa_pss_rsae_sha512:
  ------------------
  |  Branch (4766:9): [True: 175, False: 176k]
  ------------------
 4767|  46.0k|            return ssl_auth_rsa_sign;
 4768|      2|        case ssl_sig_rsa_pss_pss_sha256:
  ------------------
  |  Branch (4768:9): [True: 2, False: 176k]
  ------------------
 4769|      3|        case ssl_sig_rsa_pss_pss_sha384:
  ------------------
  |  Branch (4769:9): [True: 1, False: 176k]
  ------------------
 4770|      5|        case ssl_sig_rsa_pss_pss_sha512:
  ------------------
  |  Branch (4770:9): [True: 2, False: 176k]
  ------------------
 4771|      5|            return ssl_auth_rsa_pss;
 4772|  36.1k|        case ssl_sig_ecdsa_secp256r1_sha256:
  ------------------
  |  Branch (4772:9): [True: 36.1k, False: 140k]
  ------------------
 4773|  53.0k|        case ssl_sig_ecdsa_secp384r1_sha384:
  ------------------
  |  Branch (4773:9): [True: 16.9k, False: 159k]
  ------------------
 4774|  69.6k|        case ssl_sig_ecdsa_secp521r1_sha512:
  ------------------
  |  Branch (4774:9): [True: 16.6k, False: 159k]
  ------------------
 4775|  86.4k|        case ssl_sig_ecdsa_sha1:
  ------------------
  |  Branch (4775:9): [True: 16.7k, False: 159k]
  ------------------
 4776|  86.4k|            return ssl_auth_ecdsa;
 4777|  9.89k|        case ssl_sig_dsa_sha1:
  ------------------
  |  Branch (4777:9): [True: 9.89k, False: 166k]
  ------------------
 4778|  22.1k|        case ssl_sig_dsa_sha256:
  ------------------
  |  Branch (4778:9): [True: 12.2k, False: 163k]
  ------------------
 4779|  31.9k|        case ssl_sig_dsa_sha384:
  ------------------
  |  Branch (4779:9): [True: 9.81k, False: 166k]
  ------------------
 4780|  43.7k|        case ssl_sig_dsa_sha512:
  ------------------
  |  Branch (4780:9): [True: 11.7k, False: 164k]
  ------------------
 4781|  43.7k|            return ssl_auth_dsa;
 4782|       |
 4783|      0|        default:
  ------------------
  |  Branch (4783:9): [True: 0, False: 176k]
  ------------------
 4784|      0|            PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4785|   176k|    }
 4786|      0|    return ssl_auth_null;
 4787|   176k|}
ssl_ConsumeSignatureScheme:
 4797|  2.48k|{
 4798|  2.48k|    PRUint32 tmp;
 4799|  2.48k|    SECStatus rv;
 4800|       |
 4801|  2.48k|    rv = ssl3_ConsumeHandshakeNumber(ss, &tmp, 2, b, length);
 4802|  2.48k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (4802:9): [True: 1, False: 2.48k]
  ------------------
 4803|      1|        return SECFailure; /* Alert sent, Error code set already. */
 4804|      1|    }
 4805|  2.48k|    if (!ssl_IsSupportedSignatureScheme((SSLSignatureScheme)tmp)) {
  ------------------
  |  Branch (4805:9): [True: 7, False: 2.47k]
  ------------------
 4806|      7|        SSL3_SendAlert(ss, alert_fatal, illegal_parameter);
 4807|      7|        PORT_SetError(SSL_ERROR_UNSUPPORTED_SIGNATURE_ALGORITHM);
  ------------------
  |  |   65|      7|#define PORT_SetError PORT_SetError_Util
  ------------------
 4808|      7|        return SECFailure;
 4809|      7|    }
 4810|  2.47k|    *out = (SSLSignatureScheme)tmp;
 4811|  2.47k|    return SECSuccess;
 4812|  2.48k|}
ssl3_ComputeHandshakeHashes:
 4858|  1.63k|{
 4859|  1.63k|    SECStatus rv = SECSuccess;
 4860|  1.63k|    PRBool isTLS = (PRBool)(spec->version > SSL_LIBRARY_VERSION_3_0);
  ------------------
  |  |   17|  1.63k|#define SSL_LIBRARY_VERSION_3_0                 0x0300
  ------------------
 4861|  1.63k|    unsigned int outLength;
 4862|  1.63k|    PRUint8 md5_inner[MAX_MAC_LENGTH];
 4863|  1.63k|    PRUint8 sha_inner[MAX_MAC_LENGTH];
 4864|       |
 4865|  1.63k|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|  1.63k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  2.42k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 839, False: 791]
  |  |  |  |  |  Branch (208:7): [True: 791, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4866|  1.63k|    if (ss->ssl3.hs.hashType == handshake_hash_unknown) {
  ------------------
  |  Branch (4866:9): [True: 0, False: 1.63k]
  ------------------
 4867|      0|        PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 4868|      0|        return SECFailure;
 4869|      0|    }
 4870|       |
 4871|  1.63k|    hashes->hashAlg = ssl_hash_none;
 4872|       |
 4873|  1.63k|    if (ss->ssl3.hs.hashType == handshake_hash_single) {
  ------------------
  |  Branch (4873:9): [True: 0, False: 1.63k]
  ------------------
 4874|      0|        PK11Context *h;
 4875|      0|        unsigned int stateLen;
 4876|      0|        unsigned char stackBuf[1024];
 4877|      0|        unsigned char *stateBuf = NULL;
 4878|       |
 4879|      0|        h = ss->ssl3.hs.sha;
 4880|      0|        stateBuf = PK11_SaveContextAlloc(h, stackBuf,
 4881|      0|                                         sizeof(stackBuf), &stateLen);
 4882|      0|        if (stateBuf == NULL) {
  ------------------
  |  Branch (4882:13): [True: 0, False: 0]
  ------------------
 4883|      0|            ssl_MapLowLevelError(SSL_ERROR_DIGEST_FAILURE);
 4884|      0|            rv = SECFailure;
 4885|      0|            goto tls12_loser;
 4886|      0|        }
 4887|      0|        rv |= PK11_DigestFinal(h, hashes->u.raw, &hashes->len,
 4888|      0|                               sizeof(hashes->u.raw));
 4889|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (4889:13): [True: 0, False: 0]
  ------------------
 4890|      0|            ssl_MapLowLevelError(SSL_ERROR_DIGEST_FAILURE);
 4891|      0|            rv = SECFailure;
 4892|      0|            goto tls12_loser;
 4893|      0|        }
 4894|       |
 4895|      0|        hashes->hashAlg = ssl3_GetSuitePrfHash(ss);
 4896|       |
 4897|      0|    tls12_loser:
 4898|      0|        if (stateBuf) {
  ------------------
  |  Branch (4898:13): [True: 0, False: 0]
  ------------------
 4899|      0|            if (PK11_RestoreContext(h, stateBuf, stateLen) != SECSuccess) {
  ------------------
  |  Branch (4899:17): [True: 0, False: 0]
  ------------------
 4900|      0|                ssl_MapLowLevelError(SSL_ERROR_DIGEST_FAILURE);
 4901|      0|                rv = SECFailure;
 4902|      0|            }
 4903|      0|            if (stateBuf != stackBuf) {
  ------------------
  |  Branch (4903:17): [True: 0, False: 0]
  ------------------
 4904|      0|                PORT_ZFree(stateBuf, stateLen);
  ------------------
  |  |   75|      0|#define PORT_ZFree PORT_ZFree_Util
  ------------------
 4905|      0|            }
 4906|      0|        }
 4907|  1.63k|    } else if (ss->ssl3.hs.hashType == handshake_hash_record) {
  ------------------
  |  Branch (4907:16): [True: 1.56k, False: 67]
  ------------------
 4908|  1.56k|        rv = ssl3_ComputeHandshakeHash(ss->ssl3.hs.messages.buf,
 4909|  1.56k|                                       ss->ssl3.hs.messages.len,
 4910|  1.56k|                                       ssl3_GetSuitePrfHash(ss),
 4911|  1.56k|                                       hashes);
 4912|  1.56k|    } else {
 4913|     67|        PK11Context *md5;
 4914|     67|        PK11Context *sha = NULL;
 4915|     67|        unsigned char *md5StateBuf = NULL;
 4916|     67|        unsigned char *shaStateBuf = NULL;
 4917|     67|        unsigned int md5StateLen, shaStateLen;
 4918|     67|        unsigned char md5StackBuf[256];
 4919|     67|        unsigned char shaStackBuf[512];
 4920|     67|        const int md5Pad = ssl_GetMacDefByAlg(ssl_mac_md5)->pad_size;
 4921|     67|        const int shaPad = ssl_GetMacDefByAlg(ssl_mac_sha)->pad_size;
 4922|       |
 4923|     67|        md5StateBuf = PK11_SaveContextAlloc(ss->ssl3.hs.md5, md5StackBuf,
 4924|     67|                                            sizeof md5StackBuf, &md5StateLen);
 4925|     67|        if (md5StateBuf == NULL) {
  ------------------
  |  Branch (4925:13): [True: 0, False: 67]
  ------------------
 4926|      0|            ssl_MapLowLevelError(SSL_ERROR_MD5_DIGEST_FAILURE);
 4927|      0|            rv = SECFailure;
 4928|      0|            goto loser;
 4929|      0|        }
 4930|     67|        md5 = ss->ssl3.hs.md5;
 4931|       |
 4932|     67|        shaStateBuf = PK11_SaveContextAlloc(ss->ssl3.hs.sha, shaStackBuf,
 4933|     67|                                            sizeof shaStackBuf, &shaStateLen);
 4934|     67|        if (shaStateBuf == NULL) {
  ------------------
  |  Branch (4934:13): [True: 0, False: 67]
  ------------------
 4935|      0|            ssl_MapLowLevelError(SSL_ERROR_SHA_DIGEST_FAILURE);
 4936|      0|            rv = SECFailure;
 4937|      0|            goto loser;
 4938|      0|        }
 4939|     67|        sha = ss->ssl3.hs.sha;
 4940|       |
 4941|     67|        if (!isTLS) {
  ------------------
  |  Branch (4941:13): [True: 0, False: 67]
  ------------------
 4942|       |            /* compute hashes for SSL3. */
 4943|      0|            unsigned char s[4];
 4944|       |
 4945|      0|            if (!spec->masterSecret) {
  ------------------
  |  Branch (4945:17): [True: 0, False: 0]
  ------------------
 4946|      0|                PORT_SetError(SSL_ERROR_RX_UNEXPECTED_HANDSHAKE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 4947|      0|                rv = SECFailure;
 4948|      0|                goto loser;
 4949|      0|            }
 4950|       |
 4951|      0|            s[0] = (unsigned char)(sender >> 24);
 4952|      0|            s[1] = (unsigned char)(sender >> 16);
 4953|      0|            s[2] = (unsigned char)(sender >> 8);
 4954|      0|            s[3] = (unsigned char)sender;
 4955|       |
 4956|      0|            if (sender != 0) {
  ------------------
  |  Branch (4956:17): [True: 0, False: 0]
  ------------------
 4957|      0|                rv |= PK11_DigestOp(md5, s, 4);
 4958|      0|                PRINT_BUF(95, (NULL, "MD5 inner: sender", s, 4));
  ------------------
  |  |   74|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   75|      0|    ssl_PrintBuf b
  ------------------
 4959|      0|            }
 4960|       |
 4961|      0|            PRINT_BUF(95, (NULL, "MD5 inner: MAC Pad 1", mac_pad_1, md5Pad));
  ------------------
  |  |   74|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   75|      0|    ssl_PrintBuf b
  ------------------
 4962|       |
 4963|      0|            rv |= PK11_DigestKey(md5, spec->masterSecret);
 4964|      0|            rv |= PK11_DigestOp(md5, mac_pad_1, md5Pad);
 4965|      0|            rv |= PK11_DigestFinal(md5, md5_inner, &outLength, MD5_LENGTH);
  ------------------
  |  |   38|      0|#define MD5_LENGTH 16
  ------------------
 4966|      0|            PORT_Assert(rv != SECSuccess || outLength == MD5_LENGTH);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4967|      0|            if (rv != SECSuccess) {
  ------------------
  |  Branch (4967:17): [True: 0, False: 0]
  ------------------
 4968|      0|                ssl_MapLowLevelError(SSL_ERROR_MD5_DIGEST_FAILURE);
 4969|      0|                rv = SECFailure;
 4970|      0|                goto loser;
 4971|      0|            }
 4972|       |
 4973|      0|            PRINT_BUF(95, (NULL, "MD5 inner: result", md5_inner, outLength));
  ------------------
  |  |   74|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   75|      0|    ssl_PrintBuf b
  ------------------
 4974|       |
 4975|      0|            if (sender != 0) {
  ------------------
  |  Branch (4975:17): [True: 0, False: 0]
  ------------------
 4976|      0|                rv |= PK11_DigestOp(sha, s, 4);
 4977|      0|                PRINT_BUF(95, (NULL, "SHA inner: sender", s, 4));
  ------------------
  |  |   74|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   75|      0|    ssl_PrintBuf b
  ------------------
 4978|      0|            }
 4979|       |
 4980|      0|            PRINT_BUF(95, (NULL, "SHA inner: MAC Pad 1", mac_pad_1, shaPad));
  ------------------
  |  |   74|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   75|      0|    ssl_PrintBuf b
  ------------------
 4981|       |
 4982|      0|            rv |= PK11_DigestKey(sha, spec->masterSecret);
 4983|      0|            rv |= PK11_DigestOp(sha, mac_pad_1, shaPad);
 4984|      0|            rv |= PK11_DigestFinal(sha, sha_inner, &outLength, SHA1_LENGTH);
  ------------------
  |  |   39|      0|#define SHA1_LENGTH 20
  ------------------
 4985|      0|            PORT_Assert(rv != SECSuccess || outLength == SHA1_LENGTH);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4986|      0|            if (rv != SECSuccess) {
  ------------------
  |  Branch (4986:17): [True: 0, False: 0]
  ------------------
 4987|      0|                ssl_MapLowLevelError(SSL_ERROR_SHA_DIGEST_FAILURE);
 4988|      0|                rv = SECFailure;
 4989|      0|                goto loser;
 4990|      0|            }
 4991|       |
 4992|      0|            PRINT_BUF(95, (NULL, "SHA inner: result", sha_inner, outLength));
  ------------------
  |  |   74|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   75|      0|    ssl_PrintBuf b
  ------------------
 4993|       |
 4994|      0|            PRINT_BUF(95, (NULL, "MD5 outer: MAC Pad 2", mac_pad_2, md5Pad));
  ------------------
  |  |   74|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   75|      0|    ssl_PrintBuf b
  ------------------
 4995|      0|            PRINT_BUF(95, (NULL, "MD5 outer: MD5 inner", md5_inner, MD5_LENGTH));
  ------------------
  |  |   74|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   75|      0|    ssl_PrintBuf b
  ------------------
 4996|       |
 4997|      0|            rv |= PK11_DigestBegin(md5);
 4998|      0|            rv |= PK11_DigestKey(md5, spec->masterSecret);
 4999|      0|            rv |= PK11_DigestOp(md5, mac_pad_2, md5Pad);
 5000|      0|            rv |= PK11_DigestOp(md5, md5_inner, MD5_LENGTH);
  ------------------
  |  |   38|      0|#define MD5_LENGTH 16
  ------------------
 5001|      0|        }
 5002|     67|        rv |= PK11_DigestFinal(md5, hashes->u.s.md5, &outLength, MD5_LENGTH);
  ------------------
  |  |   38|     67|#define MD5_LENGTH 16
  ------------------
 5003|     67|        PORT_Assert(rv != SECSuccess || outLength == MD5_LENGTH);
  ------------------
  |  |  120|     67|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    134|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 0, False: 67]
  |  |  |  |  |  Branch (208:7): [True: 67, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5004|     67|        if (rv != SECSuccess) {
  ------------------
  |  Branch (5004:13): [True: 0, False: 67]
  ------------------
 5005|      0|            ssl_MapLowLevelError(SSL_ERROR_MD5_DIGEST_FAILURE);
 5006|      0|            rv = SECFailure;
 5007|      0|            goto loser;
 5008|      0|        }
 5009|       |
 5010|     67|        PRINT_BUF(60, (NULL, "MD5 outer: result", hashes->u.s.md5, MD5_LENGTH));
  ------------------
  |  |   74|     67|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 67]
  |  |  ------------------
  |  |   75|     67|    ssl_PrintBuf b
  ------------------
 5011|       |
 5012|     67|        if (!isTLS) {
  ------------------
  |  Branch (5012:13): [True: 0, False: 67]
  ------------------
 5013|      0|            PRINT_BUF(95, (NULL, "SHA outer: MAC Pad 2", mac_pad_2, shaPad));
  ------------------
  |  |   74|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   75|      0|    ssl_PrintBuf b
  ------------------
 5014|      0|            PRINT_BUF(95, (NULL, "SHA outer: SHA inner", sha_inner, SHA1_LENGTH));
  ------------------
  |  |   74|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   75|      0|    ssl_PrintBuf b
  ------------------
 5015|       |
 5016|      0|            rv |= PK11_DigestBegin(sha);
 5017|      0|            rv |= PK11_DigestKey(sha, spec->masterSecret);
 5018|      0|            rv |= PK11_DigestOp(sha, mac_pad_2, shaPad);
 5019|      0|            rv |= PK11_DigestOp(sha, sha_inner, SHA1_LENGTH);
  ------------------
  |  |   39|      0|#define SHA1_LENGTH 20
  ------------------
 5020|      0|        }
 5021|     67|        rv |= PK11_DigestFinal(sha, hashes->u.s.sha, &outLength, SHA1_LENGTH);
  ------------------
  |  |   39|     67|#define SHA1_LENGTH 20
  ------------------
 5022|     67|        PORT_Assert(rv != SECSuccess || outLength == SHA1_LENGTH);
  ------------------
  |  |  120|     67|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    134|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 0, False: 67]
  |  |  |  |  |  Branch (208:7): [True: 67, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5023|     67|        if (rv != SECSuccess) {
  ------------------
  |  Branch (5023:13): [True: 0, False: 67]
  ------------------
 5024|      0|            ssl_MapLowLevelError(SSL_ERROR_SHA_DIGEST_FAILURE);
 5025|      0|            rv = SECFailure;
 5026|      0|            goto loser;
 5027|      0|        }
 5028|       |
 5029|     67|        PRINT_BUF(60, (NULL, "SHA outer: result", hashes->u.s.sha, SHA1_LENGTH));
  ------------------
  |  |   74|     67|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 67]
  |  |  ------------------
  |  |   75|     67|    ssl_PrintBuf b
  ------------------
 5030|       |
 5031|     67|        hashes->len = MD5_LENGTH + SHA1_LENGTH;
  ------------------
  |  |   38|     67|#define MD5_LENGTH 16
  ------------------
                      hashes->len = MD5_LENGTH + SHA1_LENGTH;
  ------------------
  |  |   39|     67|#define SHA1_LENGTH 20
  ------------------
 5032|       |
 5033|     67|    loser:
 5034|     67|        if (md5StateBuf) {
  ------------------
  |  Branch (5034:13): [True: 67, False: 0]
  ------------------
 5035|     67|            if (PK11_RestoreContext(ss->ssl3.hs.md5, md5StateBuf, md5StateLen) !=
  ------------------
  |  Branch (5035:17): [True: 0, False: 67]
  ------------------
 5036|     67|                SECSuccess) {
 5037|      0|                ssl_MapLowLevelError(SSL_ERROR_MD5_DIGEST_FAILURE);
 5038|      0|                rv = SECFailure;
 5039|      0|            }
 5040|     67|            if (md5StateBuf != md5StackBuf) {
  ------------------
  |  Branch (5040:17): [True: 0, False: 67]
  ------------------
 5041|      0|                PORT_ZFree(md5StateBuf, md5StateLen);
  ------------------
  |  |   75|      0|#define PORT_ZFree PORT_ZFree_Util
  ------------------
 5042|      0|            }
 5043|     67|        }
 5044|     67|        if (shaStateBuf) {
  ------------------
  |  Branch (5044:13): [True: 67, False: 0]
  ------------------
 5045|     67|            if (PK11_RestoreContext(ss->ssl3.hs.sha, shaStateBuf, shaStateLen) !=
  ------------------
  |  Branch (5045:17): [True: 0, False: 67]
  ------------------
 5046|     67|                SECSuccess) {
 5047|      0|                ssl_MapLowLevelError(SSL_ERROR_SHA_DIGEST_FAILURE);
 5048|      0|                rv = SECFailure;
 5049|      0|            }
 5050|     67|            if (shaStateBuf != shaStackBuf) {
  ------------------
  |  Branch (5050:17): [True: 0, False: 67]
  ------------------
 5051|      0|                PORT_ZFree(shaStateBuf, shaStateLen);
  ------------------
  |  |   75|      0|#define PORT_ZFree PORT_ZFree_Util
  ------------------
 5052|      0|            }
 5053|     67|        }
 5054|     67|    }
 5055|  1.63k|    return rv;
 5056|  1.63k|}
ssl3_InsertChHeaderSize:
 5127|  22.0k|{
 5128|  22.0k|    SECStatus rv;
 5129|  22.0k|    unsigned int msgLen = preamble->len;
 5130|  22.0k|    msgLen += extensions->len ? (2 + extensions->len) : 0;
  ------------------
  |  Branch (5130:15): [True: 22.0k, False: 0]
  ------------------
 5131|  22.0k|    unsigned int headerLen = IS_DTLS(ss) ? 12 : 4;
  ------------------
  |  |  892|  22.0k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 22.0k, False: 0]
  |  |  ------------------
  ------------------
 5132|       |
 5133|       |    /* Record the message length. */
 5134|  22.0k|    rv = sslBuffer_InsertNumber(preamble, 1, msgLen - headerLen, 3);
 5135|  22.0k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (5135:9): [True: 0, False: 22.0k]
  ------------------
 5136|      0|        return SECFailure; /* code set */
 5137|      0|    }
 5138|  22.0k|    if (IS_DTLS(ss)) {
  ------------------
  |  |  892|  22.0k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 22.0k, False: 0]
  |  |  ------------------
  ------------------
 5139|       |        /* Record the (unfragmented) fragment length. */
 5140|  22.0k|        unsigned int offset = 1 /* ch */ + 3 /* len */ +
 5141|  22.0k|                              2 /* seq */ + 3 /* fragment offset */;
 5142|  22.0k|        rv = sslBuffer_InsertNumber(preamble, offset, msgLen - headerLen, 3);
 5143|  22.0k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (5143:13): [True: 0, False: 22.0k]
  ------------------
 5144|      0|            return SECFailure; /* code set */
 5145|      0|        }
 5146|  22.0k|    }
 5147|       |
 5148|  22.0k|    return SECSuccess;
 5149|  22.0k|}
ssl3_CreateClientHelloPreamble:
 5217|  11.0k|{
 5218|  11.0k|    SECStatus rv;
 5219|  11.0k|    sslBuffer constructed = SSL_BUFFER_EMPTY;
  ------------------
  |  |   23|  11.0k|    {                        \
  |  |   24|  11.0k|        NULL, 0, 0, PR_FALSE \
  |  |  ------------------
  |  |  |  |  438|  11.0k|#define PR_FALSE 0
  |  |  ------------------
  |  |   25|  11.0k|    }
  ------------------
 5220|  11.0k|    const PRUint8 *client_random = isEchInner ? ss->ssl3.hs.client_inner_random : ss->ssl3.hs.client_random;
  ------------------
  |  Branch (5220:36): [True: 0, False: 11.0k]
  ------------------
 5221|  11.0k|    PORT_Assert(sid);
  ------------------
  |  |  120|  11.0k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  11.0k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 11.0k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5222|  11.0k|    PRBool fallbackSCSV = ss->opt.enableFallbackSCSV && !isEchInner &&
  ------------------
  |  Branch (5222:27): [True: 5.48k, False: 5.52k]
  |  Branch (5222:57): [True: 5.48k, False: 0]
  ------------------
 5223|  11.0k|                          (!realSid || version < sid->version);
  ------------------
  |  Branch (5223:28): [True: 5.48k, False: 0]
  |  Branch (5223:40): [True: 0, False: 0]
  ------------------
 5224|       |
 5225|  11.0k|    rv = sslBuffer_AppendNumber(&constructed, ssl_hs_client_hello, 1);
 5226|  11.0k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (5226:9): [True: 0, False: 11.0k]
  ------------------
 5227|      0|        goto loser;
 5228|      0|    }
 5229|       |
 5230|  11.0k|    rv = sslBuffer_Skip(&constructed, 3, NULL);
 5231|  11.0k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (5231:9): [True: 0, False: 11.0k]
  ------------------
 5232|      0|        goto loser;
 5233|      0|    }
 5234|       |
 5235|  11.0k|    if (IS_DTLS(ss)) {
  ------------------
  |  |  892|  11.0k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 11.0k, False: 0]
  |  |  ------------------
  ------------------
 5236|       |        /* Note that we make an unfragmented message here. We fragment in the
 5237|       |         * transmission code, if necessary */
 5238|  11.0k|        rv = sslBuffer_AppendNumber(&constructed, ss->ssl3.hs.sendMessageSeq, 2);
 5239|  11.0k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (5239:13): [True: 0, False: 11.0k]
  ------------------
 5240|      0|            goto loser;
 5241|      0|        }
 5242|  11.0k|        ss->ssl3.hs.sendMessageSeq++;
 5243|       |
 5244|       |        /* 0 is the fragment offset, because it's not fragmented yet */
 5245|  11.0k|        rv = sslBuffer_AppendNumber(&constructed, 0, 3);
 5246|  11.0k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (5246:13): [True: 0, False: 11.0k]
  ------------------
 5247|      0|            goto loser;
 5248|      0|        }
 5249|       |
 5250|       |        /* Fragment length -- set to the packet length because not fragmented */
 5251|  11.0k|        rv = sslBuffer_Skip(&constructed, 3, NULL);
 5252|  11.0k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (5252:13): [True: 0, False: 11.0k]
  ------------------
 5253|      0|            goto loser;
 5254|      0|        }
 5255|  11.0k|    }
 5256|       |
 5257|  11.0k|    if (ss->firstHsDone) {
  ------------------
  |  Branch (5257:9): [True: 0, False: 11.0k]
  ------------------
 5258|       |        /* The client hello version must stay unchanged to work around
 5259|       |         * the Windows SChannel bug described in ssl3_SendClientHello. */
 5260|      0|        PORT_Assert(version == ss->clientHelloVersion);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5261|      0|    }
 5262|       |
 5263|  11.0k|    ss->clientHelloVersion = PR_MIN(version, SSL_LIBRARY_VERSION_TLS_1_2);
  ------------------
  |  |  158|  11.0k|#define PR_MIN(x,y)     ((x)<(y)?(x):(y))
  |  |  ------------------
  |  |  |  Branch (158:26): [True: 155, False: 10.8k]
  |  |  ------------------
  ------------------
 5264|  11.0k|    if (IS_DTLS(ss)) {
  ------------------
  |  |  892|  11.0k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 11.0k, False: 0]
  |  |  ------------------
  ------------------
 5265|  11.0k|        PRUint16 dtlsVersion = dtls_TLSVersionToDTLSVersion(ss->clientHelloVersion);
 5266|  11.0k|        rv = sslBuffer_AppendNumber(&constructed, dtlsVersion, 2);
 5267|  11.0k|    } else {
 5268|      0|        rv = sslBuffer_AppendNumber(&constructed, ss->clientHelloVersion, 2);
 5269|      0|    }
 5270|  11.0k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (5270:9): [True: 0, False: 11.0k]
  ------------------
 5271|      0|        goto loser;
 5272|      0|    }
 5273|       |
 5274|  11.0k|    rv = sslBuffer_Append(&constructed, client_random, SSL3_RANDOM_LENGTH);
  ------------------
  |  |   24|  11.0k|#define SSL3_RANDOM_LENGTH 32
  ------------------
 5275|  11.0k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (5275:9): [True: 0, False: 11.0k]
  ------------------
 5276|      0|        goto loser;
 5277|      0|    }
 5278|       |
 5279|  11.0k|    if (sid->version < SSL_LIBRARY_VERSION_TLS_1_3 && !isEchInner) {
  ------------------
  |  |   21|  22.0k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (5279:9): [True: 1.47k, False: 9.52k]
  |  Branch (5279:55): [True: 1.47k, False: 0]
  ------------------
 5280|  1.47k|        rv = sslBuffer_AppendVariable(&constructed, sid->u.ssl3.sessionID,
 5281|  1.47k|                                      sid->u.ssl3.sessionIDLength, 1);
 5282|  9.52k|    } else if (ss->opt.enableTls13CompatMode && !IS_DTLS(ss)) {
  ------------------
  |  |  892|  4.82k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  ------------------
  |  Branch (5282:16): [True: 4.82k, False: 4.70k]
  |  Branch (5282:49): [True: 0, False: 4.82k]
  ------------------
 5283|       |        /* We're faking session resumption, so rather than create new
 5284|       |         * randomness, just mix up the client random a little. */
 5285|      0|        PRUint8 buf[SSL3_SESSIONID_BYTES];
 5286|      0|        ssl_MakeFakeSid(ss, buf);
 5287|      0|        rv = sslBuffer_AppendVariable(&constructed, buf, SSL3_SESSIONID_BYTES, 1);
  ------------------
  |  |  107|      0|#define SSL3_SESSIONID_BYTES 32
  ------------------
 5288|  9.52k|    } else {
 5289|  9.52k|        rv = sslBuffer_AppendNumber(&constructed, 0, 1);
 5290|  9.52k|    }
 5291|  11.0k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (5291:9): [True: 0, False: 11.0k]
  ------------------
 5292|      0|        goto loser;
 5293|      0|    }
 5294|       |
 5295|  11.0k|    if (IS_DTLS(ss)) {
  ------------------
  |  |  892|  11.0k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 11.0k, False: 0]
  |  |  ------------------
  ------------------
 5296|       |        /* This cookieLen applies to the cookie that appears in the DTLS
 5297|       |         * ClientHello, which isn't used in DTLS 1.3. */
 5298|  11.0k|        rv = sslBuffer_AppendVariable(&constructed, ss->ssl3.hs.cookie.data,
 5299|  11.0k|                                      ss->ssl3.hs.helloRetry ? 0 : ss->ssl3.hs.cookie.len,
  ------------------
  |  Branch (5299:39): [True: 1.27k, False: 9.73k]
  ------------------
 5300|  11.0k|                                      1);
 5301|  11.0k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (5301:13): [True: 0, False: 11.0k]
  ------------------
 5302|      0|            goto loser;
 5303|      0|        }
 5304|  11.0k|    }
 5305|       |
 5306|  11.0k|    rv = ssl3_AppendCipherSuites(ss, fallbackSCSV, &constructed);
 5307|  11.0k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (5307:9): [True: 0, False: 11.0k]
  ------------------
 5308|      0|        goto loser;
 5309|      0|    }
 5310|       |
 5311|       |    /* Compression methods: count is always 1, null compression. */
 5312|  11.0k|    rv = sslBuffer_AppendNumber(&constructed, 1, 1);
 5313|  11.0k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (5313:9): [True: 0, False: 11.0k]
  ------------------
 5314|      0|        goto loser;
 5315|      0|    }
 5316|  11.0k|    rv = sslBuffer_AppendNumber(&constructed, ssl_compression_null, 1);
 5317|  11.0k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (5317:9): [True: 0, False: 11.0k]
  ------------------
 5318|      0|        goto loser;
 5319|      0|    }
 5320|       |
 5321|  11.0k|    rv = ssl3_InsertChHeaderSize(ss, &constructed, extensions);
 5322|  11.0k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (5322:9): [True: 0, False: 11.0k]
  ------------------
 5323|      0|        goto loser;
 5324|      0|    }
 5325|       |
 5326|  11.0k|    *preamble = constructed;
 5327|  11.0k|    return SECSuccess;
 5328|      0|loser:
 5329|      0|    sslBuffer_Clear(&constructed);
 5330|      0|    return SECFailure;
 5331|  11.0k|}
ssl3_SendClientHello:
 5347|  11.0k|{
 5348|  11.0k|    sslSessionID *sid;
 5349|  11.0k|    SECStatus rv;
 5350|  11.0k|    PRBool isTLS = PR_FALSE;
  ------------------
  |  |  438|  11.0k|#define PR_FALSE 0
  ------------------
 5351|  11.0k|    PRBool requestingResume = PR_FALSE;
  ------------------
  |  |  438|  11.0k|#define PR_FALSE 0
  ------------------
 5352|  11.0k|    PRBool unlockNeeded = PR_FALSE;
  ------------------
  |  |  438|  11.0k|#define PR_FALSE 0
  ------------------
 5353|  11.0k|    sslBuffer extensionBuf = SSL_BUFFER_EMPTY;
  ------------------
  |  |   23|  11.0k|    {                        \
  |  |   24|  11.0k|        NULL, 0, 0, PR_FALSE \
  |  |  ------------------
  |  |  |  |  438|  11.0k|#define PR_FALSE 0
  |  |  ------------------
  |  |   25|  11.0k|    }
  ------------------
 5354|  11.0k|    PRUint16 version = ss->vrange.max;
 5355|  11.0k|    PRInt32 flags;
 5356|  11.0k|    sslBuffer chBuf = SSL_BUFFER_EMPTY;
  ------------------
  |  |   23|  11.0k|    {                        \
  |  |   24|  11.0k|        NULL, 0, 0, PR_FALSE \
  |  |  ------------------
  |  |  |  |  438|  11.0k|#define PR_FALSE 0
  |  |  ------------------
  |  |   25|  11.0k|    }
  ------------------
 5357|       |
 5358|  11.0k|    SSL_TRC(3, ("%d: SSL3[%d]: send %s ClientHello handshake", SSL_GETPID(),
  ------------------
  |  |   71|  11.0k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 11.0k]
  |  |  ------------------
  |  |   72|  11.0k|    ssl_Trace b
  ------------------
 5359|  11.0k|                ss->fd, ssl_ClientHelloTypeName(type)));
 5360|       |
 5361|  11.0k|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|  11.0k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  16.4k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 5.57k, False: 5.43k]
  |  |  |  |  |  Branch (208:7): [True: 5.43k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5362|  11.0k|    PORT_Assert(ss->opt.noLocks || ssl_HaveXmitBufLock(ss));
  ------------------
  |  |  120|  11.0k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  16.4k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 5.57k, False: 5.43k]
  |  |  |  |  |  Branch (208:7): [True: 5.43k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5363|       |
 5364|       |    /* shouldn't get here if SSL3 is disabled, but ... */
 5365|  11.0k|    if (SSL_ALL_VERSIONS_DISABLED(&ss->vrange)) {
  ------------------
  |  | 1503|  11.0k|    ((vrange)->min == SSL_LIBRARY_VERSION_NONE)
  |  |  ------------------
  |  |  |  | 1481|  11.0k|#define SSL_LIBRARY_VERSION_NONE 0
  |  |  ------------------
  |  |  |  Branch (1503:5): [True: 0, False: 11.0k]
  |  |  ------------------
  ------------------
 5366|      0|        PR_NOT_REACHED("No versions of SSL 3.0 or later are enabled");
  ------------------
  |  |  213|      0|    PR_Assert(_reasonStr,__FILE__,__LINE__)
  ------------------
 5367|      0|        PORT_SetError(SSL_ERROR_SSL_DISABLED);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 5368|      0|        return SECFailure;
 5369|      0|    }
 5370|       |
 5371|       |    /* If we are responding to a HelloRetryRequest, don't reinitialize. We need
 5372|       |     * to maintain the handshake hashes. */
 5373|  11.0k|    if (!ss->ssl3.hs.helloRetry) {
  ------------------
  |  Branch (5373:9): [True: 9.73k, False: 1.27k]
  ------------------
 5374|  9.73k|        ssl3_RestartHandshakeHashes(ss);
 5375|  9.73k|    }
 5376|  11.0k|    PORT_Assert(!ss->ssl3.hs.helloRetry || type == client_hello_retry);
  ------------------
  |  |  120|  11.0k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  12.2k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 9.73k, False: 1.27k]
  |  |  |  |  |  Branch (208:7): [True: 1.27k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5377|       |
 5378|  11.0k|    if (type == client_hello_initial) {
  ------------------
  |  Branch (5378:9): [True: 9.36k, False: 1.64k]
  ------------------
 5379|  9.36k|        ssl_SetClientHelloSpecVersion(ss, ss->ssl3.cwSpec);
 5380|  9.36k|    }
 5381|       |    /* These must be reset every handshake. */
 5382|  11.0k|    ssl3_ResetExtensionData(&ss->xtnData, ss);
 5383|  11.0k|    ss->ssl3.hs.sendingSCSV = PR_FALSE;
  ------------------
  |  |  438|  11.0k|#define PR_FALSE 0
  ------------------
 5384|  11.0k|    ss->ssl3.hs.preliminaryInfo = 0;
 5385|  11.0k|    PORT_Assert(IS_DTLS(ss) || type != client_hello_retransmit);
  ------------------
  |  |  120|  11.0k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  11.0k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 11.0k, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5386|  11.0k|    SECITEM_FreeItem(&ss->ssl3.hs.newSessionTicket.ticket, PR_FALSE);
  ------------------
  |  |  108|  11.0k|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                  SECITEM_FreeItem(&ss->ssl3.hs.newSessionTicket.ticket, PR_FALSE);
  ------------------
  |  |  438|  11.0k|#define PR_FALSE 0
  ------------------
 5387|  11.0k|    ss->ssl3.hs.receivedNewSessionTicket = PR_FALSE;
  ------------------
  |  |  438|  11.0k|#define PR_FALSE 0
  ------------------
 5388|       |
 5389|       |    /* How many suites does our PKCS11 support (regardless of policy)? */
 5390|  11.0k|    if (ssl3_config_match_init(ss) == 0) {
  ------------------
  |  Branch (5390:9): [True: 0, False: 11.0k]
  ------------------
 5391|      0|        return SECFailure; /* ssl3_config_match_init has set error code. */
 5392|      0|    }
 5393|       |
 5394|       |    /*
 5395|       |     * During a renegotiation, ss->clientHelloVersion will be used again to
 5396|       |     * work around a Windows SChannel bug. Ensure that it is still enabled.
 5397|       |     */
 5398|  11.0k|    if (ss->firstHsDone) {
  ------------------
  |  Branch (5398:9): [True: 0, False: 11.0k]
  ------------------
 5399|      0|        PORT_Assert(type != client_hello_initial);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5400|      0|        if (SSL_ALL_VERSIONS_DISABLED(&ss->vrange)) {
  ------------------
  |  | 1503|      0|    ((vrange)->min == SSL_LIBRARY_VERSION_NONE)
  |  |  ------------------
  |  |  |  | 1481|      0|#define SSL_LIBRARY_VERSION_NONE 0
  |  |  ------------------
  |  |  |  Branch (1503:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5401|      0|            PORT_SetError(SSL_ERROR_SSL_DISABLED);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 5402|      0|            return SECFailure;
 5403|      0|        }
 5404|       |
 5405|      0|        if (ss->clientHelloVersion < ss->vrange.min ||
  ------------------
  |  Branch (5405:13): [True: 0, False: 0]
  ------------------
 5406|      0|            ss->clientHelloVersion > ss->vrange.max) {
  ------------------
  |  Branch (5406:13): [True: 0, False: 0]
  ------------------
 5407|      0|            PORT_SetError(SSL_ERROR_NO_CYPHER_OVERLAP);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 5408|      0|            return SECFailure;
 5409|      0|        }
 5410|      0|    }
 5411|       |
 5412|       |    /* Check if we have a ss->sec.ci.sid.
 5413|       |     * Check that it's not expired.
 5414|       |     * If we have an sid and it comes from an external cache, we use it. */
 5415|  11.0k|    if (ss->sec.ci.sid && ss->sec.ci.sid->cached == in_external_cache) {
  ------------------
  |  Branch (5415:9): [True: 11.0k, False: 0]
  |  Branch (5415:27): [True: 0, False: 11.0k]
  ------------------
 5416|      0|        PORT_Assert(!ss->sec.isServer);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5417|      0|        sid = ssl_ReferenceSID(ss->sec.ci.sid);
 5418|      0|        SSL_TRC(3, ("%d: SSL3[%d]: using external resumption token in ClientHello",
  ------------------
  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    ssl_Trace b
  ------------------
 5419|      0|                    SSL_GETPID(), ss->fd));
 5420|  11.0k|    } else if (ss->sec.ci.sid && ss->statelessResume && type == client_hello_retry) {
  ------------------
  |  Branch (5420:16): [True: 11.0k, False: 0]
  |  Branch (5420:34): [True: 0, False: 11.0k]
  |  Branch (5420:57): [True: 0, False: 0]
  ------------------
 5421|       |        /* If we are sending a second ClientHello, reuse the same SID
 5422|       |         * as the original one. */
 5423|      0|        sid = ssl_ReferenceSID(ss->sec.ci.sid);
 5424|  11.0k|    } else if (!ss->opt.noCache) {
  ------------------
  |  Branch (5424:16): [True: 5.67k, False: 5.33k]
  ------------------
 5425|       |        /* We ignore ss->sec.ci.sid here, and use ssl_Lookup because Lookup
 5426|       |         * handles expired entries and other details.
 5427|       |         * XXX If we've been called from ssl_BeginClientHandshake, then
 5428|       |         * this lookup is duplicative and wasteful.
 5429|       |         */
 5430|  5.67k|        sid = ssl_LookupSID(ssl_Time(ss), &ss->sec.ci.peer,
 5431|  5.67k|                            ss->sec.ci.port, ss->peerID, ss->url);
 5432|  5.67k|    } else {
 5433|  5.33k|        sid = NULL;
 5434|  5.33k|    }
 5435|       |
 5436|       |    /* We can't resume based on a different token. If the sid exists,
 5437|       |     * make sure the token that holds the master secret still exists ...
 5438|       |     * If we previously did client-auth, make sure that the token that holds
 5439|       |     * the private key still exists, is logged in, hasn't been removed, etc.
 5440|       |     */
 5441|  11.0k|    if (sid) {
  ------------------
  |  Branch (5441:9): [True: 0, False: 11.0k]
  ------------------
 5442|      0|        PRBool sidOK = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 5443|       |
 5444|      0|        if (sid->version >= SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|      0|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (5444:13): [True: 0, False: 0]
  ------------------
 5445|      0|            if (!tls13_ResumptionCompatible(ss, sid->u.ssl3.cipherSuite)) {
  ------------------
  |  Branch (5445:17): [True: 0, False: 0]
  ------------------
 5446|      0|                sidOK = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5447|      0|            }
 5448|      0|        } else {
 5449|       |            /* Check that the cipher suite we need is enabled. */
 5450|      0|            const ssl3CipherSuiteCfg *suite =
 5451|      0|                ssl_LookupCipherSuiteCfg(sid->u.ssl3.cipherSuite,
 5452|      0|                                         ss->cipherSuites);
 5453|      0|            SSLVersionRange vrange = { sid->version, sid->version };
 5454|      0|            if (!suite || !ssl3_config_match(suite, ss->ssl3.policy, &vrange, ss)) {
  ------------------
  |  Branch (5454:17): [True: 0, False: 0]
  |  Branch (5454:27): [True: 0, False: 0]
  ------------------
 5455|      0|                sidOK = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5456|      0|            }
 5457|       |
 5458|       |            /* Check that no (valid) ECHConfigs are setup in combination with a
 5459|       |             * (resumable) TLS < 1.3 session id. */
 5460|      0|            if (!PR_CLIST_IS_EMPTY(&ss->echConfigs)) {
  ------------------
  |  |   94|      0|    ((_l)->next == (_l))
  ------------------
  |  Branch (5460:17): [True: 0, False: 0]
  ------------------
 5461|       |                /* If there are ECH configs, the client must not resume but
 5462|       |                 * offer ECH. */
 5463|      0|                sidOK = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5464|      0|            }
 5465|      0|        }
 5466|       |
 5467|       |        /* Check that we can recover the master secret. */
 5468|      0|        if (sidOK) {
  ------------------
  |  Branch (5468:13): [True: 0, False: 0]
  ------------------
 5469|      0|            PK11SlotInfo *slot = NULL;
 5470|      0|            if (sid->u.ssl3.masterValid) {
  ------------------
  |  Branch (5470:17): [True: 0, False: 0]
  ------------------
 5471|      0|                slot = SECMOD_LookupSlot(sid->u.ssl3.masterModuleID,
 5472|      0|                                         sid->u.ssl3.masterSlotID);
 5473|      0|            }
 5474|      0|            if (slot == NULL) {
  ------------------
  |  Branch (5474:17): [True: 0, False: 0]
  ------------------
 5475|      0|                sidOK = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5476|      0|            } else {
 5477|      0|                PK11SymKey *wrapKey = NULL;
 5478|      0|                if (!PK11_IsPresent(slot) ||
  ------------------
  |  Branch (5478:21): [True: 0, False: 0]
  ------------------
 5479|      0|                    ((wrapKey = PK11_GetWrapKey(slot,
  ------------------
  |  Branch (5479:21): [True: 0, False: 0]
  ------------------
 5480|      0|                                                sid->u.ssl3.masterWrapIndex,
 5481|      0|                                                sid->u.ssl3.masterWrapMech,
 5482|      0|                                                sid->u.ssl3.masterWrapSeries,
 5483|      0|                                                ss->pkcs11PinArg)) == NULL)) {
 5484|      0|                    sidOK = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5485|      0|                }
 5486|      0|                if (wrapKey)
  ------------------
  |  Branch (5486:21): [True: 0, False: 0]
  ------------------
 5487|      0|                    PK11_FreeSymKey(wrapKey);
 5488|      0|                PK11_FreeSlot(slot);
 5489|      0|                slot = NULL;
 5490|      0|            }
 5491|      0|        }
 5492|       |        /* If we previously did client-auth, make sure that the token that
 5493|       |        ** holds the private key still exists, is logged in, hasn't been
 5494|       |        ** removed, etc.
 5495|       |        */
 5496|      0|        if (sidOK && !ssl3_ClientAuthTokenPresent(sid)) {
  ------------------
  |  Branch (5496:13): [True: 0, False: 0]
  |  Branch (5496:22): [True: 0, False: 0]
  ------------------
 5497|      0|            sidOK = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5498|      0|        }
 5499|       |
 5500|      0|        if (sidOK) {
  ------------------
  |  Branch (5500:13): [True: 0, False: 0]
  ------------------
 5501|       |            /* Set version based on the sid. */
 5502|      0|            if (ss->firstHsDone) {
  ------------------
  |  Branch (5502:17): [True: 0, False: 0]
  ------------------
 5503|       |                /*
 5504|       |                 * Windows SChannel compares the client_version inside the RSA
 5505|       |                 * EncryptedPreMasterSecret of a renegotiation with the
 5506|       |                 * client_version of the initial ClientHello rather than the
 5507|       |                 * ClientHello in the renegotiation. To work around this bug, we
 5508|       |                 * continue to use the client_version used in the initial
 5509|       |                 * ClientHello when renegotiating.
 5510|       |                 *
 5511|       |                 * The client_version of the initial ClientHello is still
 5512|       |                 * available in ss->clientHelloVersion. Ensure that
 5513|       |                 * sid->version is bounded within
 5514|       |                 * [ss->vrange.min, ss->clientHelloVersion], otherwise we
 5515|       |                 * can't use sid.
 5516|       |                 */
 5517|      0|                if (sid->version >= ss->vrange.min &&
  ------------------
  |  Branch (5517:21): [True: 0, False: 0]
  ------------------
 5518|      0|                    sid->version <= ss->clientHelloVersion) {
  ------------------
  |  Branch (5518:21): [True: 0, False: 0]
  ------------------
 5519|      0|                    version = ss->clientHelloVersion;
 5520|      0|                } else {
 5521|      0|                    sidOK = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5522|      0|                }
 5523|      0|            } else {
 5524|       |                /*
 5525|       |                 * Check sid->version is OK first.
 5526|       |                 * Previously, we would cap the version based on sid->version,
 5527|       |                 * but that prevents negotiation of a higher version if the
 5528|       |                 * previous session was reduced (e.g., with version fallback)
 5529|       |                 */
 5530|      0|                if (sid->version < ss->vrange.min ||
  ------------------
  |  Branch (5530:21): [True: 0, False: 0]
  ------------------
 5531|      0|                    sid->version > ss->vrange.max) {
  ------------------
  |  Branch (5531:21): [True: 0, False: 0]
  ------------------
 5532|      0|                    sidOK = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5533|      0|                }
 5534|      0|            }
 5535|      0|        }
 5536|       |
 5537|      0|        if (!sidOK) {
  ------------------
  |  Branch (5537:13): [True: 0, False: 0]
  ------------------
 5538|      0|            SSL_AtomicIncrementLong(&ssl3stats.sch_sid_cache_not_ok);
 5539|      0|            ssl_UncacheSessionID(ss);
 5540|      0|            ssl_FreeSID(sid);
 5541|      0|            sid = NULL;
 5542|      0|        }
 5543|      0|    }
 5544|       |
 5545|  11.0k|    if (sid) {
  ------------------
  |  Branch (5545:9): [True: 0, False: 11.0k]
  ------------------
 5546|      0|        requestingResume = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 5547|      0|        SSL_AtomicIncrementLong(&ssl3stats.sch_sid_cache_hits);
 5548|       |
 5549|      0|        PRINT_BUF(4, (ss, "client, found session-id:", sid->u.ssl3.sessionID,
  ------------------
  |  |   74|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   75|      0|    ssl_PrintBuf b
  ------------------
 5550|      0|                      sid->u.ssl3.sessionIDLength));
 5551|       |
 5552|      0|        ss->ssl3.policy = sid->u.ssl3.policy;
 5553|  11.0k|    } else {
 5554|  11.0k|        SSL_AtomicIncrementLong(&ssl3stats.sch_sid_cache_misses);
 5555|       |
 5556|       |        /*
 5557|       |         * Windows SChannel compares the client_version inside the RSA
 5558|       |         * EncryptedPreMasterSecret of a renegotiation with the
 5559|       |         * client_version of the initial ClientHello rather than the
 5560|       |         * ClientHello in the renegotiation. To work around this bug, we
 5561|       |         * continue to use the client_version used in the initial
 5562|       |         * ClientHello when renegotiating.
 5563|       |         */
 5564|  11.0k|        if (ss->firstHsDone) {
  ------------------
  |  Branch (5564:13): [True: 0, False: 11.0k]
  ------------------
 5565|      0|            version = ss->clientHelloVersion;
 5566|      0|        }
 5567|       |
 5568|  11.0k|        sid = ssl3_NewSessionID(ss, PR_FALSE);
  ------------------
  |  |  438|  11.0k|#define PR_FALSE 0
  ------------------
 5569|  11.0k|        if (!sid) {
  ------------------
  |  Branch (5569:13): [True: 0, False: 11.0k]
  ------------------
 5570|      0|            return SECFailure; /* memory error is set */
 5571|      0|        }
 5572|       |        /* ss->version isn't set yet, but the sid needs a sane value. */
 5573|  11.0k|        sid->version = version;
 5574|  11.0k|    }
 5575|       |
 5576|  11.0k|    isTLS = (version > SSL_LIBRARY_VERSION_3_0);
  ------------------
  |  |   17|  11.0k|#define SSL_LIBRARY_VERSION_3_0                 0x0300
  ------------------
 5577|  11.0k|    ssl_GetSpecWriteLock(ss);
  ------------------
  |  | 1435|  11.0k|    {                                            \
  |  | 1436|  11.0k|        if (!ss->opt.noLocks)                    \
  |  |  ------------------
  |  |  |  Branch (1436:13): [True: 5.43k, False: 5.57k]
  |  |  ------------------
  |  | 1437|  11.0k|            NSSRWLock_LockWrite((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   48|  5.43k|#define NSSRWLock_LockWrite NSSRWLock_LockWrite_Util
  |  |  ------------------
  |  | 1438|  11.0k|    }
  ------------------
 5578|  11.0k|    if (ss->ssl3.cwSpec->macDef->mac == ssl_mac_null) {
  ------------------
  |  Branch (5578:9): [True: 11.0k, False: 0]
  ------------------
 5579|       |        /* SSL records are not being MACed. */
 5580|  11.0k|        ss->ssl3.cwSpec->version = version;
 5581|  11.0k|    }
 5582|  11.0k|    ssl_ReleaseSpecWriteLock(ss);
  ------------------
  |  | 1440|  11.0k|    {                                              \
  |  | 1441|  11.0k|        if (!ss->opt.noLocks)                      \
  |  |  ------------------
  |  |  |  Branch (1441:13): [True: 5.43k, False: 5.57k]
  |  |  ------------------
  |  | 1442|  11.0k|            NSSRWLock_UnlockWrite((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   51|  5.43k|#define NSSRWLock_UnlockWrite NSSRWLock_UnlockWrite_Util
  |  |  ------------------
  |  | 1443|  11.0k|    }
  ------------------
 5583|       |
 5584|  11.0k|    ssl_FreeSID(ss->sec.ci.sid); /* release the old sid */
 5585|  11.0k|    ss->sec.ci.sid = sid;
 5586|       |
 5587|       |    /* HACK for SCSV in SSL 3.0.  On initial handshake, prepend SCSV,
 5588|       |     * only if TLS is disabled.
 5589|       |     */
 5590|  11.0k|    if (!ss->firstHsDone && !isTLS) {
  ------------------
  |  Branch (5590:9): [True: 11.0k, False: 0]
  |  Branch (5590:29): [True: 0, False: 11.0k]
  ------------------
 5591|       |        /* Must set this before calling Hello Extension Senders,
 5592|       |         * to suppress sending of empty RI extension.
 5593|       |         */
 5594|      0|        ss->ssl3.hs.sendingSCSV = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 5595|      0|    }
 5596|       |
 5597|       |    /* When we attempt session resumption (only), we must lock the sid to
 5598|       |     * prevent races with other resumption connections that receive a
 5599|       |     * NewSessionTicket that will cause the ticket in the sid to be replaced.
 5600|       |     * Once we've copied the session ticket into our ClientHello message, it
 5601|       |     * is OK for the ticket to change, so we just need to make sure we hold
 5602|       |     * the lock across the calls to ssl_ConstructExtensions.
 5603|       |     */
 5604|  11.0k|    if (sid->u.ssl3.lock) {
  ------------------
  |  Branch (5604:9): [True: 0, False: 11.0k]
  ------------------
 5605|      0|        unlockNeeded = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 5606|      0|        PR_RWLock_Rlock(sid->u.ssl3.lock);
 5607|      0|    }
 5608|       |
 5609|       |    /* Generate a new random if this is the first attempt or renegotiation. */
 5610|  11.0k|    if (type == client_hello_initial ||
  ------------------
  |  Branch (5610:9): [True: 9.36k, False: 1.64k]
  ------------------
 5611|  11.0k|        type == client_hello_renegotiation) {
  ------------------
  |  Branch (5611:9): [True: 0, False: 1.64k]
  ------------------
 5612|  9.36k|        rv = ssl3_GetNewRandom(ss->ssl3.hs.client_random);
 5613|  9.36k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (5613:13): [True: 0, False: 9.36k]
  ------------------
 5614|      0|            goto loser; /* err set by GetNewRandom. */
 5615|      0|        }
 5616|  9.36k|    }
 5617|       |
 5618|  11.0k|    if (ss->vrange.max >= SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|  11.0k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (5618:9): [True: 9.52k, False: 1.47k]
  ------------------
 5619|  9.52k|        rv = tls13_SetupClientHello(ss, type);
 5620|  9.52k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (5620:13): [True: 0, False: 9.52k]
  ------------------
 5621|      0|            goto loser;
 5622|      0|        }
 5623|  9.52k|    }
 5624|       |
 5625|       |    /* Setup TLS ClientHello Extension Permutation? */
 5626|  11.0k|    if (type == client_hello_initial &&
  ------------------
  |  Branch (5626:9): [True: 9.36k, False: 1.64k]
  ------------------
 5627|  11.0k|        ss->vrange.max > SSL_LIBRARY_VERSION_3_0 &&
  ------------------
  |  |   17|  20.3k|#define SSL_LIBRARY_VERSION_3_0                 0x0300
  ------------------
  |  Branch (5627:9): [True: 9.36k, False: 0]
  ------------------
 5628|  11.0k|        ss->opt.enableChXtnPermutation) {
  ------------------
  |  Branch (5628:9): [True: 4.85k, False: 4.50k]
  ------------------
 5629|  4.85k|        rv = tls_ClientHelloExtensionPermutationSetup(ss);
 5630|  4.85k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (5630:13): [True: 0, False: 4.85k]
  ------------------
 5631|      0|            goto loser;
 5632|      0|        }
 5633|  4.85k|    }
 5634|       |
 5635|  11.0k|    if (isTLS || (ss->firstHsDone && ss->peerRequestedProtection)) {
  ------------------
  |  Branch (5635:9): [True: 11.0k, False: 0]
  |  Branch (5635:19): [True: 0, False: 0]
  |  Branch (5635:38): [True: 0, False: 0]
  ------------------
 5636|  11.0k|        rv = ssl_ConstructExtensions(ss, &extensionBuf, ssl_hs_client_hello);
 5637|  11.0k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (5637:13): [True: 0, False: 11.0k]
  ------------------
 5638|      0|            goto loser;
 5639|      0|        }
 5640|  11.0k|    }
 5641|       |
 5642|  11.0k|    if (IS_DTLS(ss)) {
  ------------------
  |  |  892|  11.0k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 11.0k, False: 0]
  |  |  ------------------
  ------------------
 5643|  11.0k|        ssl3_DisableNonDTLSSuites(ss);
 5644|  11.0k|    }
 5645|       |
 5646|  11.0k|    rv = ssl3_CreateClientHelloPreamble(ss, sid, requestingResume, version,
 5647|  11.0k|                                        PR_FALSE, &extensionBuf, &chBuf);
  ------------------
  |  |  438|  11.0k|#define PR_FALSE 0
  ------------------
 5648|  11.0k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (5648:9): [True: 0, False: 11.0k]
  ------------------
 5649|      0|        goto loser; /* err set by ssl3_CreateClientHelloPreamble. */
 5650|      0|    }
 5651|       |
 5652|  11.0k|    if (!ss->ssl3.hs.echHpkeCtx) {
  ------------------
  |  Branch (5652:9): [True: 11.0k, False: 0]
  ------------------
 5653|  11.0k|        if (extensionBuf.len) {
  ------------------
  |  Branch (5653:13): [True: 11.0k, False: 0]
  ------------------
 5654|  11.0k|            rv = tls13_MaybeGreaseEch(ss, &chBuf, &extensionBuf);
 5655|  11.0k|            if (rv != SECSuccess) {
  ------------------
  |  Branch (5655:17): [True: 0, False: 11.0k]
  ------------------
 5656|      0|                goto loser; /* err set by tls13_MaybeGreaseEch. */
 5657|      0|            }
 5658|  11.0k|            rv = ssl_InsertPaddingExtension(ss, chBuf.len, &extensionBuf);
 5659|  11.0k|            if (rv != SECSuccess) {
  ------------------
  |  Branch (5659:17): [True: 0, False: 11.0k]
  ------------------
 5660|      0|                goto loser; /* err set by ssl_InsertPaddingExtension. */
 5661|      0|            }
 5662|       |
 5663|  11.0k|            rv = ssl3_InsertChHeaderSize(ss, &chBuf, &extensionBuf);
 5664|  11.0k|            if (rv != SECSuccess) {
  ------------------
  |  Branch (5664:17): [True: 0, False: 11.0k]
  ------------------
 5665|      0|                goto loser; /* err set by ssl3_InsertChHeaderSize. */
 5666|      0|            }
 5667|       |
 5668|       |            /* If we are sending a PSK binder, replace the dummy value. */
 5669|  11.0k|            if (ssl3_ExtensionAdvertised(ss, ssl_tls13_pre_shared_key_xtn)) {
  ------------------
  |  Branch (5669:17): [True: 4.51k, False: 6.49k]
  ------------------
 5670|  4.51k|                rv = tls13_WriteExtensionsWithBinder(ss, &extensionBuf, &chBuf);
 5671|  6.49k|            } else {
 5672|  6.49k|                rv = sslBuffer_AppendNumber(&chBuf, extensionBuf.len, 2);
 5673|  6.49k|                if (rv != SECSuccess) {
  ------------------
  |  Branch (5673:21): [True: 0, False: 6.49k]
  ------------------
 5674|      0|                    goto loser;
 5675|      0|                }
 5676|  6.49k|                rv = sslBuffer_AppendBuffer(&chBuf, &extensionBuf);
 5677|  6.49k|            }
 5678|  11.0k|            if (rv != SECSuccess) {
  ------------------
  |  Branch (5678:17): [True: 0, False: 11.0k]
  ------------------
 5679|      0|                goto loser; /* err set by sslBuffer_Append*. */
 5680|      0|            }
 5681|  11.0k|        }
 5682|       |
 5683|       |        /* If we already have a message in place, we need to enqueue it.
 5684|       |         * This empties the buffer. This is a convenient place to call
 5685|       |         * dtls_StageHandshakeMessage to mark the message boundary.  */
 5686|  11.0k|        if (IS_DTLS(ss)) {
  ------------------
  |  |  892|  11.0k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 11.0k, False: 0]
  |  |  ------------------
  ------------------
 5687|  11.0k|            rv = dtls_StageHandshakeMessage(ss);
 5688|  11.0k|            if (rv != SECSuccess) {
  ------------------
  |  Branch (5688:17): [True: 0, False: 11.0k]
  ------------------
 5689|      0|                goto loser;
 5690|      0|            }
 5691|  11.0k|        }
 5692|       |
 5693|       |        /* As here the function takes the full message and hashes it in one go,
 5694|       |         * For DTLS1.3, we skip hashing the unnecessary header fields.
 5695|       |         * See ssl3_AppendHandshakeHeader. */
 5696|  11.0k|        if (IS_DTLS(ss) && ss->vrange.max >= SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |  892|  22.0k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 11.0k, False: 0]
  |  |  ------------------
  ------------------
                      if (IS_DTLS(ss) && ss->vrange.max >= SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|  11.0k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (5696:28): [True: 9.52k, False: 1.47k]
  ------------------
 5697|  9.52k|            rv = ssl3_AppendHandshakeSuppressHash(ss, chBuf.buf, chBuf.len);
 5698|  9.52k|            if (rv != SECSuccess) {
  ------------------
  |  Branch (5698:17): [True: 0, False: 9.52k]
  ------------------
 5699|      0|                goto loser; /* code set */
 5700|      0|            }
 5701|  9.52k|            if (!ss->firstHsDone) {
  ------------------
  |  Branch (5701:17): [True: 9.52k, False: 0]
  ------------------
 5702|  9.52k|                PORT_Assert(type == client_hello_retransmit ||
  ------------------
  |  |  120|  9.52k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  18.7k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 287, False: 9.24k]
  |  |  |  |  |  Branch (208:7): [True: 9.24k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5703|  9.52k|                            ss->ssl3.hs.dtls13ClientMessageBuffer.len == 0);
 5704|  9.52k|                sslBuffer_Clear(&ss->ssl3.hs.dtls13ClientMessageBuffer);
 5705|       |                /* Here instead of computing the hash, we copy the data to a buffer.*/
 5706|  9.52k|                rv = sslBuffer_Append(&ss->ssl3.hs.dtls13ClientMessageBuffer, chBuf.buf, chBuf.len);
 5707|  9.52k|            }
 5708|  9.52k|        } else {
 5709|  1.47k|            rv = ssl3_AppendHandshake(ss, chBuf.buf, chBuf.len);
 5710|  1.47k|        }
 5711|       |
 5712|  11.0k|    } else {
 5713|      0|        PORT_Assert(!IS_DTLS(ss));
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5714|      0|        rv = tls13_ConstructClientHelloWithEch(ss, sid, !requestingResume, &chBuf, &extensionBuf);
 5715|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (5715:13): [True: 0, False: 0]
  ------------------
 5716|      0|            goto loser; /* code set */
 5717|      0|        }
 5718|      0|        rv = ssl3_UpdateDefaultHandshakeHashes(ss, chBuf.buf, chBuf.len);
 5719|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (5719:13): [True: 0, False: 0]
  ------------------
 5720|      0|            goto loser; /* code set */
 5721|      0|        }
 5722|       |
 5723|      0|        if (IS_DTLS(ss)) {
  ------------------
  |  |  892|      0|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5724|      0|            rv = dtls_StageHandshakeMessage(ss);
 5725|      0|            if (rv != SECSuccess) {
  ------------------
  |  Branch (5725:17): [True: 0, False: 0]
  ------------------
 5726|      0|                goto loser;
 5727|      0|            }
 5728|      0|        }
 5729|       |        /* By default, all messagess are added to both the inner and
 5730|       |         * outer transcripts. For CH (or CH2 if HRR), that's problematic. */
 5731|      0|        rv = ssl3_AppendHandshakeSuppressHash(ss, chBuf.buf, chBuf.len);
 5732|      0|    }
 5733|  11.0k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (5733:9): [True: 0, False: 11.0k]
  ------------------
 5734|      0|        goto loser;
 5735|      0|    }
 5736|       |
 5737|  11.0k|    if (unlockNeeded) {
  ------------------
  |  Branch (5737:9): [True: 0, False: 11.0k]
  ------------------
 5738|       |        /* Note: goto loser can't be used past this point. */
 5739|      0|        PR_RWLock_Unlock(sid->u.ssl3.lock);
 5740|      0|    }
 5741|       |
 5742|  11.0k|    if (ss->xtnData.sentSessionTicketInClientHello) {
  ------------------
  |  Branch (5742:9): [True: 0, False: 11.0k]
  ------------------
 5743|      0|        SSL_AtomicIncrementLong(&ssl3stats.sch_sid_stateless_resumes);
 5744|      0|    }
 5745|       |
 5746|  11.0k|    if (ss->ssl3.hs.sendingSCSV) {
  ------------------
  |  Branch (5746:9): [True: 0, False: 11.0k]
  ------------------
 5747|       |        /* Since we sent the SCSV, pretend we sent empty RI extension. */
 5748|      0|        TLSExtensionData *xtnData = &ss->xtnData;
 5749|      0|        xtnData->advertised[xtnData->numAdvertised++] =
 5750|      0|            ssl_renegotiation_info_xtn;
 5751|      0|    }
 5752|       |
 5753|  11.0k|    flags = 0;
 5754|  11.0k|    rv = ssl3_FlushHandshake(ss, flags);
 5755|  11.0k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (5755:9): [True: 0, False: 11.0k]
  ------------------
 5756|      0|        return rv; /* error code set by ssl3_FlushHandshake */
 5757|      0|    }
 5758|       |
 5759|  11.0k|    if (version >= SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|  11.0k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (5759:9): [True: 9.52k, False: 1.47k]
  ------------------
 5760|  9.52k|        rv = tls13_MaybeDo0RTTHandshake(ss);
 5761|  9.52k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (5761:13): [True: 0, False: 9.52k]
  ------------------
 5762|      0|            return SECFailure; /* error code set already. */
 5763|      0|        }
 5764|  9.52k|    }
 5765|       |
 5766|  11.0k|    ss->ssl3.hs.ws = wait_server_hello;
 5767|  11.0k|    sslBuffer_Clear(&chBuf);
 5768|  11.0k|    sslBuffer_Clear(&extensionBuf);
 5769|  11.0k|    return SECSuccess;
 5770|       |
 5771|      0|loser:
 5772|      0|    if (unlockNeeded) {
  ------------------
  |  Branch (5772:9): [True: 0, False: 0]
  ------------------
 5773|      0|        PR_RWLock_Unlock(sid->u.ssl3.lock);
 5774|      0|    }
 5775|      0|    sslBuffer_Clear(&chBuf);
 5776|      0|    sslBuffer_Clear(&extensionBuf);
 5777|      0|    return SECFailure;
 5778|  11.0k|}
ssl_FreeSymWrapKeysLock:
 5997|      1|{
 5998|      1|    if (symWrapKeysLock) {
  ------------------
  |  Branch (5998:9): [True: 1, False: 0]
  ------------------
 5999|      1|        PZ_DestroyLock(symWrapKeysLock);
  ------------------
  |  |  244|      1|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
 6000|      1|        symWrapKeysLock = NULL;
 6001|      1|        return SECSuccess;
 6002|      1|    }
 6003|      0|    PORT_SetError(SEC_ERROR_NOT_INITIALIZED);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 6004|      0|    return SECFailure;
 6005|      1|}
ssl_InitSymWrapKeysLock:
 6034|      1|{
 6035|      1|    symWrapKeysLock = PZ_NewLock(nssILockOther);
  ------------------
  |  |  243|      1|#define PZ_NewLock(t) PR_NewLock()
  ------------------
 6036|      1|    return symWrapKeysLock ? SECSuccess : SECFailure;
  ------------------
  |  Branch (6036:12): [True: 1, False: 0]
  ------------------
 6037|      1|}
ssl_AppendPaddedDHKeyShare:
 6414|  1.12k|{
 6415|  1.12k|    SECStatus rv;
 6416|  1.12k|    unsigned int pad = pubKey->u.dh.prime.len - pubKey->u.dh.publicValue.len;
 6417|       |
 6418|  1.12k|    if (appendLength) {
  ------------------
  |  Branch (6418:9): [True: 0, False: 1.12k]
  ------------------
 6419|      0|        rv = sslBuffer_AppendNumber(buf, pubKey->u.dh.prime.len, 2);
 6420|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (6420:13): [True: 0, False: 0]
  ------------------
 6421|      0|            return rv;
 6422|      0|        }
 6423|      0|    }
 6424|  1.12k|    while (pad) {
  ------------------
  |  Branch (6424:12): [True: 0, False: 1.12k]
  ------------------
 6425|      0|        rv = sslBuffer_AppendNumber(buf, 0, 1);
 6426|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (6426:13): [True: 0, False: 0]
  ------------------
 6427|      0|            return rv;
 6428|      0|        }
 6429|      0|        --pad;
 6430|      0|    }
 6431|  1.12k|    rv = sslBuffer_Append(buf, pubKey->u.dh.publicValue.data,
 6432|  1.12k|                          pubKey->u.dh.publicValue.len);
 6433|  1.12k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (6433:9): [True: 0, False: 1.12k]
  ------------------
 6434|      0|        return rv;
 6435|      0|    }
 6436|  1.12k|    return SECSuccess;
 6437|  1.12k|}
ssl3_SetupCipherSuite:
 6920|  8.40k|{
 6921|  8.40k|    ss->ssl3.hs.suite_def = ssl_LookupCipherSuiteDef(ss->ssl3.hs.cipher_suite);
 6922|  8.40k|    if (!ss->ssl3.hs.suite_def) {
  ------------------
  |  Branch (6922:9): [True: 0, False: 8.40k]
  ------------------
 6923|      0|        PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6924|      0|        PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 6925|      0|        return SECFailure;
 6926|      0|    }
 6927|       |
 6928|  8.40k|    ss->ssl3.hs.kea_def = &kea_defs[ss->ssl3.hs.suite_def->key_exchange_alg];
 6929|  8.40k|    ss->ssl3.hs.preliminaryInfo |= ssl_preinfo_cipher_suite;
  ------------------
  |  |  393|  8.40k|#define ssl_preinfo_cipher_suite (1U << 1)
  ------------------
 6930|       |
 6931|  8.40k|    if (!initHashes) {
  ------------------
  |  Branch (6931:9): [True: 1.29k, False: 7.11k]
  ------------------
 6932|  1.29k|        return SECSuccess;
 6933|  1.29k|    }
 6934|       |    /* Now we have a cipher suite, initialize the handshake hashes. */
 6935|  7.11k|    return ssl3_InitHandshakeHashes(ss);
 6936|  8.40k|}
ssl_ClientSetCipherSuite:
 6941|  8.43k|{
 6942|  8.43k|    unsigned int i;
 6943|  8.43k|    if (ssl3_config_match_init(ss) == 0) {
  ------------------
  |  Branch (6943:9): [True: 0, False: 8.43k]
  ------------------
 6944|      0|        PORT_Assert(PR_FALSE);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6945|      0|        return SECFailure;
 6946|      0|    }
 6947|   230k|    for (i = 0; i < ssl_V3_SUITES_IMPLEMENTED; i++) {
  ------------------
  |  |  245|   230k|#define ssl_V3_SUITES_IMPLEMENTED 71
  ------------------
  |  Branch (6947:17): [True: 230k, False: 15]
  ------------------
 6948|   230k|        ssl3CipherSuiteCfg *suiteCfg = &ss->cipherSuites[i];
 6949|   230k|        if (suite == suiteCfg->cipher_suite) {
  ------------------
  |  Branch (6949:13): [True: 8.42k, False: 221k]
  ------------------
 6950|  8.42k|            SSLVersionRange vrange = { version, version };
 6951|  8.42k|            if (!ssl3_config_match(suiteCfg, ss->ssl3.policy, &vrange, ss)) {
  ------------------
  |  Branch (6951:17): [True: 20, False: 8.40k]
  ------------------
 6952|       |                /* config_match already checks whether the cipher suite is
 6953|       |                 * acceptable for the version, but the check is repeated here
 6954|       |                 * in order to give a more precise error code. */
 6955|     20|                if (!ssl3_CipherSuiteAllowedForVersionRange(suite, &vrange)) {
  ------------------
  |  Branch (6955:21): [True: 14, False: 6]
  ------------------
 6956|     14|                    PORT_SetError(SSL_ERROR_CIPHER_DISALLOWED_FOR_VERSION);
  ------------------
  |  |   65|     14|#define PORT_SetError PORT_SetError_Util
  ------------------
 6957|     14|                } else {
 6958|      6|                    PORT_SetError(SSL_ERROR_NO_CYPHER_OVERLAP);
  ------------------
  |  |   65|      6|#define PORT_SetError PORT_SetError_Util
  ------------------
 6959|      6|                }
 6960|     20|                return SECFailure;
 6961|     20|            }
 6962|  8.40k|            break;
 6963|  8.42k|        }
 6964|   230k|    }
 6965|  8.41k|    if (i >= ssl_V3_SUITES_IMPLEMENTED) {
  ------------------
  |  |  245|  8.41k|#define ssl_V3_SUITES_IMPLEMENTED 71
  ------------------
  |  Branch (6965:9): [True: 15, False: 8.40k]
  ------------------
 6966|     15|        PORT_SetError(SSL_ERROR_NO_CYPHER_OVERLAP);
  ------------------
  |  |   65|     15|#define PORT_SetError PORT_SetError_Util
  ------------------
 6967|     15|        return SECFailure;
 6968|     15|    }
 6969|       |
 6970|       |    /* Don't let the server change its mind. */
 6971|  8.40k|    if (ss->ssl3.hs.helloRetry && suite != ss->ssl3.hs.cipher_suite) {
  ------------------
  |  Branch (6971:9): [True: 1.01k, False: 7.39k]
  |  Branch (6971:35): [True: 2, False: 1.00k]
  ------------------
 6972|      2|        (void)SSL3_SendAlert(ss, alert_fatal, illegal_parameter);
 6973|      2|        PORT_SetError(SSL_ERROR_RX_MALFORMED_SERVER_HELLO);
  ------------------
  |  |   65|      2|#define PORT_SetError PORT_SetError_Util
  ------------------
 6974|      2|        return SECFailure;
 6975|      2|    }
 6976|       |
 6977|  8.40k|    ss->ssl3.hs.cipher_suite = (ssl3CipherSuite)suite;
 6978|  8.40k|    return ssl3_SetupCipherSuite(ss, initHashes);
 6979|  8.40k|}
ssl3_ParseCertificateRequestCAs:
 7776|    133|{
 7777|    133|    PRUint32 remaining;
 7778|    133|    int nnames = 0;
 7779|    133|    dnameNode *node;
 7780|    133|    SECStatus rv;
 7781|    133|    int i;
 7782|       |
 7783|    133|    rv = ssl3_ConsumeHandshakeNumber(ss, &remaining, 2, b, length);
 7784|    133|    if (rv != SECSuccess)
  ------------------
  |  Branch (7784:9): [True: 8, False: 125]
  ------------------
 7785|      8|        return SECFailure; /* malformed, alert has been sent */
 7786|       |
 7787|    125|    if (remaining > *length)
  ------------------
  |  Branch (7787:9): [True: 65, False: 60]
  ------------------
 7788|     65|        goto alert_loser;
 7789|       |
 7790|     60|    ca_list->head = node = PORT_ArenaZNew(ca_list->arena, dnameNode);
  ------------------
  |  |  155|     60|    (type *)PORT_ArenaZAlloc(poolp, sizeof(type))
  |  |  ------------------
  |  |  |  |   59|     60|#define PORT_ArenaZAlloc PORT_ArenaZAlloc_Util
  |  |  ------------------
  ------------------
 7791|     60|    if (node == NULL)
  ------------------
  |  Branch (7791:9): [True: 0, False: 60]
  ------------------
 7792|      0|        goto no_mem;
 7793|       |
 7794|    134|    while (remaining > 0) {
  ------------------
  |  Branch (7794:12): [True: 111, False: 23]
  ------------------
 7795|    111|        PRUint32 len;
 7796|       |
 7797|    111|        if (remaining < 2)
  ------------------
  |  Branch (7797:13): [True: 1, False: 110]
  ------------------
 7798|      1|            goto alert_loser; /* malformed */
 7799|       |
 7800|    110|        rv = ssl3_ConsumeHandshakeNumber(ss, &len, 2, b, length);
 7801|    110|        if (rv != SECSuccess)
  ------------------
  |  Branch (7801:13): [True: 0, False: 110]
  ------------------
 7802|      0|            return SECFailure; /* malformed, alert has been sent */
 7803|    110|        if (len == 0 || remaining < len + 2)
  ------------------
  |  Branch (7803:13): [True: 4, False: 106]
  |  Branch (7803:25): [True: 27, False: 79]
  ------------------
 7804|     31|            goto alert_loser; /* malformed */
 7805|       |
 7806|     79|        remaining -= 2;
 7807|     79|        if (SECITEM_MakeItem(ca_list->arena, &node->name, *b, len) != SECSuccess) {
  ------------------
  |  Branch (7807:13): [True: 0, False: 79]
  ------------------
 7808|      0|            goto no_mem;
 7809|      0|        }
 7810|     79|        node->name.len = len;
 7811|     79|        *b += len;
 7812|     79|        *length -= len;
 7813|     79|        remaining -= len;
 7814|     79|        nnames++;
 7815|     79|        if (remaining <= 0)
  ------------------
  |  Branch (7815:13): [True: 5, False: 74]
  ------------------
 7816|      5|            break; /* success */
 7817|       |
 7818|     74|        node->next = PORT_ArenaZNew(ca_list->arena, dnameNode);
  ------------------
  |  |  155|     74|    (type *)PORT_ArenaZAlloc(poolp, sizeof(type))
  |  |  ------------------
  |  |  |  |   59|     74|#define PORT_ArenaZAlloc PORT_ArenaZAlloc_Util
  |  |  ------------------
  ------------------
 7819|     74|        node = node->next;
 7820|     74|        if (node == NULL)
  ------------------
  |  Branch (7820:13): [True: 0, False: 74]
  ------------------
 7821|      0|            goto no_mem;
 7822|     74|    }
 7823|       |
 7824|     28|    ca_list->nnames = nnames;
 7825|     28|    ca_list->names = PORT_ArenaNewArray(ca_list->arena, SECItem, nnames);
  ------------------
  |  |  161|     28|    (type *)PORT_ArenaAlloc(poolp, sizeof(type) * (num))
  |  |  ------------------
  |  |  |  |   53|     28|#define PORT_ArenaAlloc PORT_ArenaAlloc_Util
  |  |  ------------------
  ------------------
 7826|     28|    if (nnames > 0 && ca_list->names == NULL)
  ------------------
  |  Branch (7826:9): [True: 5, False: 23]
  |  Branch (7826:23): [True: 0, False: 5]
  ------------------
 7827|      0|        goto no_mem;
 7828|       |
 7829|     28|    for (i = 0, node = (dnameNode *)ca_list->head;
 7830|     54|         i < nnames;
  ------------------
  |  Branch (7830:10): [True: 26, False: 28]
  ------------------
 7831|     28|         i++, node = node->next) {
 7832|     26|        ca_list->names[i] = node->name;
 7833|     26|    }
 7834|       |
 7835|     28|    return SECSuccess;
 7836|       |
 7837|      0|no_mem:
 7838|      0|    return SECFailure;
 7839|       |
 7840|     97|alert_loser:
 7841|     97|    (void)SSL3_SendAlert(ss, alert_fatal,
 7842|     97|                         ss->version < SSL_LIBRARY_VERSION_TLS_1_0 ? illegal_parameter
  ------------------
  |  |   18|     97|#define SSL_LIBRARY_VERSION_TLS_1_0             0x0301
  ------------------
  |  Branch (7842:26): [True: 0, False: 97]
  ------------------
 7843|     97|                                                                   : decode_error);
 7844|     97|    PORT_SetError(SSL_ERROR_RX_MALFORMED_CERT_REQUEST);
  ------------------
  |  |   65|     97|#define PORT_SetError PORT_SetError_Util
  ------------------
 7845|     97|    return SECFailure;
 7846|     28|}
ssl_ParseSignatureSchemes:
 7853|    129|{
 7854|    129|    SECStatus rv;
 7855|    129|    SECItem buf;
 7856|    129|    SSLSignatureScheme *schemes = NULL;
 7857|    129|    unsigned int numSupported = 0;
 7858|    129|    unsigned int numRemaining = 0;
 7859|    129|    unsigned int max;
 7860|       |
 7861|    129|    rv = ssl3_ExtConsumeHandshakeVariable(ss, &buf, 2, b, len);
 7862|    129|    if (rv != SECSuccess) {
  ------------------
  |  Branch (7862:9): [True: 1, False: 128]
  ------------------
 7863|      1|        return SECFailure;
 7864|      1|    }
 7865|       |    /* An odd-length value is invalid. */
 7866|    128|    if ((buf.len & 1) != 0) {
  ------------------
  |  Branch (7866:9): [True: 1, False: 127]
  ------------------
 7867|      1|        ssl3_ExtSendAlert(ss, alert_fatal, decode_error);
 7868|      1|        return SECFailure;
 7869|      1|    }
 7870|       |
 7871|       |    /* Let the caller decide whether to alert here. */
 7872|    127|    if (buf.len == 0) {
  ------------------
  |  Branch (7872:9): [True: 1, False: 126]
  ------------------
 7873|      1|        goto done;
 7874|      1|    }
 7875|       |
 7876|       |    /* Limit the number of schemes we read. */
 7877|    126|    numRemaining = buf.len / 2;
 7878|    126|    max = PR_MIN(numRemaining, MAX_SIGNATURE_SCHEMES);
  ------------------
  |  |  158|    126|#define PR_MIN(x,y)     ((x)<(y)?(x):(y))
  |  |  ------------------
  |  |  |  Branch (158:26): [True: 66, False: 60]
  |  |  ------------------
  ------------------
 7879|       |
 7880|    126|    if (arena) {
  ------------------
  |  Branch (7880:9): [True: 126, False: 0]
  ------------------
 7881|    126|        schemes = PORT_ArenaZNewArray(arena, SSLSignatureScheme, max);
  ------------------
  |  |  163|    126|    (type *)PORT_ArenaZAlloc(poolp, sizeof(type) * (num))
  |  |  ------------------
  |  |  |  |   59|    126|#define PORT_ArenaZAlloc PORT_ArenaZAlloc_Util
  |  |  ------------------
  ------------------
 7882|    126|    } else {
 7883|      0|        schemes = PORT_ZNewArray(SSLSignatureScheme, max);
  ------------------
  |  |  159|      0|    (type *)PORT_ZAlloc(sizeof(type) * (num))
  |  |  ------------------
  |  |  |  |   72|      0|#define PORT_ZAlloc PORT_ZAlloc_Util
  |  |  ------------------
  ------------------
 7884|      0|    }
 7885|    126|    if (!schemes) {
  ------------------
  |  Branch (7885:9): [True: 0, False: 126]
  ------------------
 7886|      0|        ssl3_ExtSendAlert(ss, alert_fatal, internal_error);
 7887|      0|        return SECFailure;
 7888|      0|    }
 7889|       |
 7890|  13.2k|    for (; numRemaining && numSupported < MAX_SIGNATURE_SCHEMES; --numRemaining) {
  ------------------
  |  |  250|  13.1k|#define MAX_SIGNATURE_SCHEMES 18
  ------------------
  |  Branch (7890:12): [True: 13.1k, False: 107]
  |  Branch (7890:28): [True: 13.1k, False: 19]
  ------------------
 7891|  13.1k|        PRUint32 tmp;
 7892|  13.1k|        rv = ssl3_ExtConsumeHandshakeNumber(ss, &tmp, 2, &buf.data, &buf.len);
 7893|  13.1k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (7893:13): [True: 0, False: 13.1k]
  ------------------
 7894|      0|            PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7895|      0|            PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 7896|      0|            return SECFailure;
 7897|      0|        }
 7898|  13.1k|        if (ssl_SignatureSchemeValid((SSLSignatureScheme)tmp, SEC_OID_UNKNOWN,
  ------------------
  |  Branch (7898:13): [True: 888, False: 12.2k]
  ------------------
 7899|  13.1k|                                     (PRBool)ss->version >= SSL_LIBRARY_VERSION_TLS_1_3)) {
  ------------------
  |  |   21|  13.1k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
 7900|    888|            ;
 7901|    888|            schemes[numSupported++] = (SSLSignatureScheme)tmp;
 7902|    888|        }
 7903|  13.1k|    }
 7904|       |
 7905|    126|    if (!numSupported) {
  ------------------
  |  Branch (7905:9): [True: 6, False: 120]
  ------------------
 7906|      6|        if (!arena) {
  ------------------
  |  Branch (7906:13): [True: 0, False: 6]
  ------------------
 7907|      0|            PORT_Free(schemes);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 7908|      0|        }
 7909|      6|        schemes = NULL;
 7910|      6|    }
 7911|       |
 7912|    127|done:
 7913|    127|    *schemesOut = schemes;
 7914|    127|    *numSchemesOut = numSupported;
 7915|    127|    return SECSuccess;
 7916|    126|}
ssl3_BeginHandleCertificateRequest:
 8083|     13|{
 8084|     13|    SECStatus rv;
 8085|       |
 8086|     13|    PR_ASSERT(!ss->ssl3.hs.clientCertificatePending);
  ------------------
  |  |  208|     13|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 13, False: 0]
  |  |  ------------------
  ------------------
 8087|       |
 8088|       |    /* Should not send a client cert when (non-GREASE) ECH is rejected. */
 8089|     13|    if (ss->ssl3.hs.echHpkeCtx && !ss->ssl3.hs.echAccepted) {
  ------------------
  |  Branch (8089:9): [True: 0, False: 13]
  |  Branch (8089:35): [True: 0, False: 0]
  ------------------
 8090|      0|        PORT_Assert(ssl3_ExtensionAdvertised(ss, ssl_tls13_encrypted_client_hello_xtn));
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8091|      0|        rv = SECFailure;
 8092|     13|    } else if (ss->getClientAuthData != NULL) {
  ------------------
  |  Branch (8092:16): [True: 0, False: 13]
  ------------------
 8093|      0|        PORT_Assert(signatureSchemes || !signatureSchemeCount);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8094|      0|        PORT_Assert((ss->ssl3.hs.preliminaryInfo & ssl_preinfo_all) ==
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8095|      0|                    ssl_preinfo_all);
 8096|      0|        PORT_Assert(ss->ssl3.clientPrivateKey == NULL);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8097|      0|        PORT_Assert(ss->ssl3.clientCertificate == NULL);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8098|      0|        PORT_Assert(ss->ssl3.clientCertChain == NULL);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8099|       |
 8100|       |        /* Previously cached parameters should be empty */
 8101|      0|        PORT_Assert(ss->ssl3.hs.clientAuthSignatureSchemes == NULL);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8102|      0|        PORT_Assert(ss->ssl3.hs.clientAuthSignatureSchemesLen == 0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8103|       |        /*
 8104|       |         * Peer signatures are only available while in the context of
 8105|       |         * of a getClientAuthData callback. It is required for proper
 8106|       |         * functioning of SSL_CertIsUsable and SSL_FilterClientCertListBySocket
 8107|       |         * Calling these functions outside the context of a getClientAuthData
 8108|       |         * callback will result in no filtering.*/
 8109|       |
 8110|      0|        ss->ssl3.hs.clientAuthSignatureSchemes = PORT_ZNewArray(SSLSignatureScheme, signatureSchemeCount);
  ------------------
  |  |  159|      0|    (type *)PORT_ZAlloc(sizeof(type) * (num))
  |  |  ------------------
  |  |  |  |   72|      0|#define PORT_ZAlloc PORT_ZAlloc_Util
  |  |  ------------------
  ------------------
 8111|      0|        if (signatureSchemes) {
  ------------------
  |  Branch (8111:13): [True: 0, False: 0]
  ------------------
 8112|      0|            PORT_Memcpy(ss->ssl3.hs.clientAuthSignatureSchemes, signatureSchemes, signatureSchemeCount * sizeof(SSLSignatureScheme));
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
 8113|      0|        }
 8114|      0|        ss->ssl3.hs.clientAuthSignatureSchemesLen = signatureSchemeCount;
 8115|       |
 8116|      0|        rv = (SECStatus)(*ss->getClientAuthData)(ss->getClientAuthDataArg,
 8117|      0|                                                 ss->fd, ca_list,
 8118|      0|                                                 &ss->ssl3.clientCertificate,
 8119|      0|                                                 &ss->ssl3.clientPrivateKey);
 8120|     13|    } else {
 8121|     13|        rv = SECFailure; /* force it to send a no_certificate alert */
 8122|     13|    }
 8123|       |
 8124|     13|    if (rv == SECWouldBlock) {
  ------------------
  |  Branch (8124:9): [True: 0, False: 13]
  ------------------
 8125|       |        /* getClientAuthData needs more time (e.g. for user interaction) */
 8126|       |
 8127|       |        /* The out parameters should not have changed. */
 8128|      0|        PORT_Assert(ss->ssl3.clientCertificate == NULL);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8129|      0|        PORT_Assert(ss->ssl3.clientPrivateKey == NULL);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8130|       |
 8131|       |        /* Mark the handshake as blocked */
 8132|      0|        ss->ssl3.hs.clientCertificatePending = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 8133|       |
 8134|      0|        rv = SECSuccess;
 8135|     13|    } else {
 8136|       |        /* getClientAuthData returned SECSuccess or SECFailure immediately, handle accordingly */
 8137|     13|        ssl3_ClientAuthCallbackOutcome(ss, rv);
 8138|     13|        rv = SECSuccess;
 8139|     13|    }
 8140|     13|    return rv;
 8141|     13|}
ssl3_WaitingForServerSecondRound:
 8230|  7.93k|{
 8231|  7.93k|    PRBool result;
 8232|       |
 8233|  7.93k|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|  7.93k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  11.7k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 4.08k, False: 3.85k]
  |  |  |  |  |  Branch (208:7): [True: 3.85k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8234|       |
 8235|  7.93k|    switch (ss->ssl3.hs.ws) {
 8236|    203|        case wait_new_session_ticket:
  ------------------
  |  Branch (8236:9): [True: 203, False: 7.73k]
  ------------------
 8237|  2.60k|        case wait_change_cipher:
  ------------------
  |  Branch (8237:9): [True: 2.40k, False: 5.53k]
  ------------------
 8238|  7.93k|        case wait_finished:
  ------------------
  |  Branch (8238:9): [True: 5.32k, False: 2.60k]
  ------------------
 8239|  7.93k|            result = PR_TRUE;
  ------------------
  |  |  437|  7.93k|#define PR_TRUE 1
  ------------------
 8240|  7.93k|            break;
 8241|      0|        default:
  ------------------
  |  Branch (8241:9): [True: 0, False: 7.93k]
  ------------------
 8242|      0|            result = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 8243|      0|            break;
 8244|  7.93k|    }
 8245|       |
 8246|  7.93k|    return result;
 8247|  7.93k|}
ssl3_NewSessionID:
 8482|  27.3k|{
 8483|  27.3k|    sslSessionID *sid;
 8484|       |
 8485|  27.3k|    sid = PORT_ZNew(sslSessionID);
  ------------------
  |  |  148|  27.3k|#define PORT_ZNew(type) (type *)PORT_ZAlloc(sizeof(type))
  |  |  ------------------
  |  |  |  |   72|  27.3k|#define PORT_ZAlloc PORT_ZAlloc_Util
  |  |  ------------------
  ------------------
 8486|  27.3k|    if (sid == NULL)
  ------------------
  |  Branch (8486:9): [True: 0, False: 27.3k]
  ------------------
 8487|      0|        return sid;
 8488|       |
 8489|  27.3k|    if (is_server) {
  ------------------
  |  Branch (8489:9): [True: 0, False: 27.3k]
  ------------------
 8490|      0|        const SECItem *srvName;
 8491|      0|        SECStatus rv = SECSuccess;
 8492|       |
 8493|      0|        ssl_GetSpecReadLock(ss); /********************************/
  ------------------
  |  | 1422|      0|    {                                           \
  |  | 1423|      0|        if (!ss->opt.noLocks)                   \
  |  |  ------------------
  |  |  |  Branch (1423:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1424|      0|            NSSRWLock_LockRead((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   47|      0|#define NSSRWLock_LockRead NSSRWLock_LockRead_Util
  |  |  ------------------
  |  | 1425|      0|    }
  ------------------
 8494|      0|        srvName = &ss->ssl3.hs.srvVirtName;
 8495|      0|        if (srvName->len && srvName->data) {
  ------------------
  |  Branch (8495:13): [True: 0, False: 0]
  |  Branch (8495:29): [True: 0, False: 0]
  ------------------
 8496|      0|            rv = SECITEM_CopyItem(NULL, &sid->u.ssl3.srvName, srvName);
  ------------------
  |  |  106|      0|#define SECITEM_CopyItem SECITEM_CopyItem_Util
  ------------------
 8497|      0|        }
 8498|      0|        ssl_ReleaseSpecReadLock(ss); /************************************/
  ------------------
  |  | 1427|      0|    {                                             \
  |  | 1428|      0|        if (!ss->opt.noLocks)                     \
  |  |  ------------------
  |  |  |  Branch (1428:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1429|      0|            NSSRWLock_UnlockRead((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   50|      0|#define NSSRWLock_UnlockRead NSSRWLock_UnlockRead_Util
  |  |  ------------------
  |  | 1430|      0|    }
  ------------------
 8499|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (8499:13): [True: 0, False: 0]
  ------------------
 8500|      0|            PORT_Free(sid);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 8501|      0|            return NULL;
 8502|      0|        }
 8503|      0|    }
 8504|  27.3k|    sid->peerID = (ss->peerID == NULL) ? NULL : PORT_Strdup(ss->peerID);
  ------------------
  |  |   69|      0|#define PORT_Strdup PORT_Strdup_Util
  ------------------
  |  Branch (8504:19): [True: 27.3k, False: 0]
  ------------------
 8505|  27.3k|    sid->urlSvrName = (ss->url == NULL) ? NULL : PORT_Strdup(ss->url);
  ------------------
  |  |   69|  27.3k|#define PORT_Strdup PORT_Strdup_Util
  ------------------
  |  Branch (8505:23): [True: 0, False: 27.3k]
  ------------------
 8506|  27.3k|    sid->addr = ss->sec.ci.peer;
 8507|  27.3k|    sid->port = ss->sec.ci.port;
 8508|  27.3k|    sid->references = 1;
 8509|  27.3k|    sid->cached = never_cached;
 8510|  27.3k|    sid->version = ss->version;
 8511|  27.3k|    sid->sigScheme = ssl_sig_none;
 8512|       |
 8513|  27.3k|    sid->u.ssl3.keys.resumable = PR_TRUE;
  ------------------
  |  |  437|  27.3k|#define PR_TRUE 1
  ------------------
 8514|  27.3k|    sid->u.ssl3.policy = SSL_ALLOWED;
  ------------------
  |  |  700|  27.3k|#define SSL_ALLOWED 1
  ------------------
 8515|  27.3k|    sid->u.ssl3.keys.extendedMasterSecretUsed = PR_FALSE;
  ------------------
  |  |  438|  27.3k|#define PR_FALSE 0
  ------------------
 8516|       |
 8517|  27.3k|    if (is_server) {
  ------------------
  |  Branch (8517:9): [True: 0, False: 27.3k]
  ------------------
 8518|      0|        SECStatus rv;
 8519|      0|        int pid = SSL_GETPID();
  ------------------
  |  | 2059|      0|#define SSL_GETPID getpid
  ------------------
 8520|       |
 8521|      0|        sid->u.ssl3.sessionIDLength = SSL3_SESSIONID_BYTES;
  ------------------
  |  |  107|      0|#define SSL3_SESSIONID_BYTES 32
  ------------------
 8522|      0|        sid->u.ssl3.sessionID[0] = (pid >> 8) & 0xff;
 8523|      0|        sid->u.ssl3.sessionID[1] = pid & 0xff;
 8524|      0|        rv = PK11_GenerateRandom(sid->u.ssl3.sessionID + 2,
 8525|      0|                                 SSL3_SESSIONID_BYTES - 2);
  ------------------
  |  |  107|      0|#define SSL3_SESSIONID_BYTES 32
  ------------------
 8526|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (8526:13): [True: 0, False: 0]
  ------------------
 8527|      0|            ssl_FreeSID(sid);
 8528|      0|            ssl_MapLowLevelError(SSL_ERROR_GENERATE_RANDOM_FAILURE);
 8529|      0|            return NULL;
 8530|      0|        }
 8531|      0|    }
 8532|  27.3k|    return sid;
 8533|  27.3k|}
ssl_CreateDHEKeyPair:
10150|  1.13k|{
10151|  1.13k|    SECKEYDHParams dhParam;
10152|  1.13k|    SECKEYPublicKey *pubKey = NULL;   /* Ephemeral DH key */
10153|  1.13k|    SECKEYPrivateKey *privKey = NULL; /* Ephemeral DH key */
10154|  1.13k|    sslEphemeralKeyPair *pair;
10155|       |
10156|  1.13k|    dhParam.prime.data = params->prime.data;
10157|  1.13k|    dhParam.prime.len = params->prime.len;
10158|  1.13k|    dhParam.base.data = params->base.data;
10159|  1.13k|    dhParam.base.len = params->base.len;
10160|       |
10161|  1.13k|    PRINT_BUF(60, (NULL, "Server DH p", dhParam.prime.data,
  ------------------
  |  |   74|  1.13k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 1.13k]
  |  |  ------------------
  |  |   75|  1.13k|    ssl_PrintBuf b
  ------------------
10162|  1.13k|                   dhParam.prime.len));
10163|  1.13k|    PRINT_BUF(60, (NULL, "Server DH g", dhParam.base.data,
  ------------------
  |  |   74|  1.13k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 1.13k]
  |  |  ------------------
  |  |   75|  1.13k|    ssl_PrintBuf b
  ------------------
10164|  1.13k|                   dhParam.base.len));
10165|       |
10166|       |    /* Generate ephemeral DH keypair */
10167|  1.13k|    privKey = SECKEY_CreateDHPrivateKey(&dhParam, &pubKey, NULL);
10168|  1.13k|    if (!privKey || !pubKey) {
  ------------------
  |  Branch (10168:9): [True: 0, False: 1.13k]
  |  Branch (10168:21): [True: 0, False: 1.13k]
  ------------------
10169|      0|        ssl_MapLowLevelError(SEC_ERROR_KEYGEN_FAIL);
10170|      0|        return SECFailure;
10171|      0|    }
10172|       |
10173|  1.13k|    pair = ssl_NewEphemeralKeyPair(groupDef, privKey, pubKey);
10174|  1.13k|    if (!pair) {
  ------------------
  |  Branch (10174:9): [True: 0, False: 1.13k]
  ------------------
10175|      0|        SECKEY_DestroyPrivateKey(privKey);
10176|      0|        SECKEY_DestroyPublicKey(pubKey);
10177|       |
10178|      0|        return SECFailure;
10179|      0|    }
10180|       |
10181|  1.13k|    *keyPair = pair;
10182|  1.13k|    return SECSuccess;
10183|  1.13k|}
ssl3_EncodeSigAlgs:
10344|  10.8k|{
10345|  10.8k|    SSLSignatureScheme filtered[MAX_SIGNATURE_SCHEMES] = { 0 };
10346|  10.8k|    unsigned int filteredCount = 0;
10347|       |
10348|  10.8k|    SECStatus rv = ssl3_FilterSigAlgs(ss, minVersion, PR_FALSE, forCert,
  ------------------
  |  |  438|  10.8k|#define PR_FALSE 0
  ------------------
10349|  10.8k|                                      PR_ARRAY_SIZE(filtered),
  ------------------
  |  |  167|  10.8k|#define PR_ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
  ------------------
10350|  10.8k|                                      filtered, &filteredCount);
10351|  10.8k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (10351:9): [True: 0, False: 10.8k]
  ------------------
10352|      0|        return SECFailure;
10353|      0|    }
10354|  10.8k|    return ssl3_EncodeFilteredSigAlgs(ss, filtered, filteredCount, grease, buf);
10355|  10.8k|}
ssl3_EncodeFilteredSigAlgs:
10360|  15.4k|{
10361|  15.4k|    if (!numSchemes) {
  ------------------
  |  Branch (10361:9): [True: 0, False: 15.4k]
  ------------------
10362|      0|        PORT_SetError(SSL_ERROR_NO_SUPPORTED_SIGNATURE_ALGORITHM);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
10363|      0|        return SECFailure;
10364|      0|    }
10365|       |
10366|  15.4k|    unsigned int lengthOffset;
10367|  15.4k|    SECStatus rv;
10368|       |
10369|  15.4k|    rv = sslBuffer_Skip(buf, 2, &lengthOffset);
10370|  15.4k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (10370:9): [True: 0, False: 15.4k]
  ------------------
10371|      0|        return SECFailure;
10372|      0|    }
10373|       |
10374|   192k|    for (unsigned int i = 0; i < numSchemes; ++i) {
  ------------------
  |  Branch (10374:30): [True: 176k, False: 15.4k]
  ------------------
10375|   176k|        rv = sslBuffer_AppendNumber(buf, schemes[i], 2);
10376|   176k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (10376:13): [True: 0, False: 176k]
  ------------------
10377|      0|            return SECFailure;
10378|      0|        }
10379|   176k|    }
10380|       |
10381|       |    /* GREASE SignatureAlgorithms:
10382|       |     * A client MAY select one or more GREASE signature algorithm values and
10383|       |     * advertise them in the "signature_algorithms" or
10384|       |     * "signature_algorithms_cert" extensions, if sent [RFC8701, Section 3.1].
10385|       |     *
10386|       |     * When sending a CertificateRequest in TLS 1.3, a server MAY behave as
10387|       |     * follows: [...] A server MAY select one or more GREASE signature
10388|       |     * algorithm values and advertise them in the "signature_algorithms" or
10389|       |     * "signature_algorithms_cert" extensions, if present
10390|       |     * [RFC8701, Section 4.1]. */
10391|  15.4k|    if (grease &&
  ------------------
  |  Branch (10391:9): [True: 5.43k, False: 10.0k]
  ------------------
10392|  15.4k|        ((!ss->sec.isServer && ss->vrange.max >= SSL_LIBRARY_VERSION_TLS_1_3) ||
  ------------------
  |  |   21|  5.43k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (10392:11): [True: 5.43k, False: 0]
  |  Branch (10392:32): [True: 4.76k, False: 665]
  ------------------
10393|  5.43k|         (ss->sec.isServer && ss->version >= SSL_LIBRARY_VERSION_TLS_1_3))) {
  ------------------
  |  |   21|      0|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (10393:11): [True: 0, False: 665]
  |  Branch (10393:31): [True: 0, False: 0]
  ------------------
10394|  4.76k|        PRUint16 value;
10395|  4.76k|        if (ss->sec.isServer) {
  ------------------
  |  Branch (10395:13): [True: 0, False: 4.76k]
  ------------------
10396|      0|            rv = tls13_RandomGreaseValue(&value);
10397|      0|            if (rv != SECSuccess) {
  ------------------
  |  Branch (10397:17): [True: 0, False: 0]
  ------------------
10398|      0|                return SECFailure;
10399|      0|            }
10400|  4.76k|        } else {
10401|  4.76k|            value = ss->ssl3.hs.grease->idx[grease_sigalg];
10402|  4.76k|        }
10403|  4.76k|        rv = sslBuffer_AppendNumber(buf, value, 2);
10404|  4.76k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (10404:13): [True: 0, False: 4.76k]
  ------------------
10405|      0|            return SECFailure;
10406|      0|        }
10407|  4.76k|    }
10408|       |
10409|  15.4k|    return sslBuffer_InsertLength(buf, lengthOffset, 2);
10410|  15.4k|}
ssl3_FilterSigAlgs:
10429|  15.4k|{
10430|  15.4k|    PORT_Assert(filteredSchemes);
  ------------------
  |  |  120|  15.4k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  15.4k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 15.4k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
10431|  15.4k|    PORT_Assert(numFilteredSchemes);
  ------------------
  |  |  120|  15.4k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  15.4k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 15.4k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
10432|  15.4k|    PORT_Assert(maxSchemes >= ss->ssl3.signatureSchemeCount);
  ------------------
  |  |  120|  15.4k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  15.4k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 15.4k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
10433|  15.4k|    if (maxSchemes < ss->ssl3.signatureSchemeCount) {
  ------------------
  |  Branch (10433:9): [True: 0, False: 15.4k]
  ------------------
10434|      0|        return SECFailure;
10435|      0|    }
10436|       |
10437|  15.4k|    *numFilteredSchemes = 0;
10438|  15.4k|    PRBool allowUnsortedPkcs1 = forCert && minVersion < SSL_LIBRARY_VERSION_TLS_1_3;
  ------------------
  |  |   21|  10.8k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (10438:33): [True: 10.8k, False: 4.60k]
  |  Branch (10438:44): [True: 9.74k, False: 1.10k]
  ------------------
10439|   247k|    for (unsigned int i = 0; i < ss->ssl3.signatureSchemeCount; ++i) {
  ------------------
  |  Branch (10439:30): [True: 231k, False: 15.4k]
  ------------------
10440|   231k|        if (disableRsae && ssl_IsRsaeSignatureScheme(ss->ssl3.signatureSchemes[i])) {
  ------------------
  |  Branch (10440:13): [True: 69.1k, False: 162k]
  |  Branch (10440:28): [True: 13.8k, False: 55.2k]
  ------------------
10441|  13.8k|            continue;
10442|  13.8k|        }
10443|   218k|        if (ssl_SignatureSchemeAccepted(minVersion,
  ------------------
  |  Branch (10443:13): [True: 172k, False: 45.6k]
  ------------------
10444|   218k|                                        ss->ssl3.signatureSchemes[i],
10445|   218k|                                        allowUnsortedPkcs1)) {
10446|   172k|            filteredSchemes[(*numFilteredSchemes)++] = ss->ssl3.signatureSchemes[i];
10447|   172k|        }
10448|   218k|    }
10449|  15.4k|    if (forCert && !allowUnsortedPkcs1) {
  ------------------
  |  Branch (10449:9): [True: 10.8k, False: 4.60k]
  |  Branch (10449:20): [True: 1.10k, False: 9.74k]
  ------------------
10450|  17.6k|        for (unsigned int i = 0; i < ss->ssl3.signatureSchemeCount; ++i) {
  ------------------
  |  Branch (10450:34): [True: 16.5k, False: 1.10k]
  ------------------
10451|  16.5k|            if (disableRsae && ssl_IsRsaeSignatureScheme(ss->ssl3.signatureSchemes[i])) {
  ------------------
  |  Branch (10451:17): [True: 0, False: 16.5k]
  |  Branch (10451:32): [True: 0, False: 0]
  ------------------
10452|      0|                continue;
10453|      0|            }
10454|  16.5k|            if (!ssl_SignatureSchemeAccepted(minVersion,
  ------------------
  |  Branch (10454:17): [True: 8.81k, False: 7.71k]
  ------------------
10455|  16.5k|                                             ss->ssl3.signatureSchemes[i],
10456|  16.5k|                                             PR_FALSE) &&
  ------------------
  |  |  438|  16.5k|#define PR_FALSE 0
  ------------------
10457|  16.5k|                ssl_SignatureSchemeAccepted(minVersion,
  ------------------
  |  Branch (10457:17): [True: 4.40k, False: 4.40k]
  ------------------
10458|  8.81k|                                            ss->ssl3.signatureSchemes[i],
10459|  8.81k|                                            PR_TRUE)) {
  ------------------
  |  |  437|  8.81k|#define PR_TRUE 1
  ------------------
10460|  4.40k|                filteredSchemes[(*numFilteredSchemes)++] = ss->ssl3.signatureSchemes[i];
10461|  4.40k|            }
10462|  16.5k|        }
10463|  1.10k|    }
10464|  15.4k|    return SECSuccess;
10465|  15.4k|}
ssl3_SendEmptyCertificate:
11021|      5|{
11022|      5|    SECStatus rv;
11023|      5|    unsigned int len = 0;
11024|      5|    PRBool isTLS13 = PR_FALSE;
  ------------------
  |  |  438|      5|#define PR_FALSE 0
  ------------------
11025|      5|    const SECItem *context;
11026|       |
11027|      5|    if (ss->version >= SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|      5|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (11027:9): [True: 0, False: 5]
  ------------------
11028|      0|        PORT_Assert(ss->ssl3.hs.clientCertRequested);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11029|      0|        context = &ss->xtnData.certReqContext;
11030|      0|        len = context->len + 1;
11031|      0|        isTLS13 = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
11032|      0|    }
11033|       |
11034|      5|    rv = ssl3_AppendHandshakeHeader(ss, ssl_hs_certificate, len + 3);
11035|      5|    if (rv != SECSuccess) {
  ------------------
  |  Branch (11035:9): [True: 0, False: 5]
  ------------------
11036|      0|        return rv;
11037|      0|    }
11038|       |
11039|      5|    if (isTLS13) {
  ------------------
  |  Branch (11039:9): [True: 0, False: 5]
  ------------------
11040|      0|        rv = ssl3_AppendHandshakeVariable(ss, context->data, context->len, 1);
11041|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (11041:13): [True: 0, False: 0]
  ------------------
11042|      0|            return rv;
11043|      0|        }
11044|      0|    }
11045|       |
11046|      5|    return ssl3_AppendHandshakeNumber(ss, 0, 3);
11047|      5|}
ssl3_CleanupPeerCerts:
11377|  10.6k|{
11378|  10.6k|    PLArenaPool *arena = ss->ssl3.peerCertArena;
11379|       |
11380|  10.6k|    if (arena)
  ------------------
  |  Branch (11380:9): [True: 5.32k, False: 5.35k]
  ------------------
11381|  5.32k|        PORT_FreeArena(arena, PR_FALSE);
  ------------------
  |  |   61|  5.32k|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                      PORT_FreeArena(arena, PR_FALSE);
  ------------------
  |  |  438|  5.32k|#define PR_FALSE 0
  ------------------
11382|  10.6k|    ss->ssl3.peerCertArena = NULL;
11383|  10.6k|    ss->ssl3.peerCertChain = NULL;
11384|       |
11385|  10.6k|    if (ss->sec.peerCert != NULL) {
  ------------------
  |  Branch (11385:9): [True: 0, False: 10.6k]
  ------------------
11386|      0|        if (ss->sec.peerKey) {
  ------------------
  |  Branch (11386:13): [True: 0, False: 0]
  ------------------
11387|      0|            SECKEY_DestroyPublicKey(ss->sec.peerKey);
11388|      0|            ss->sec.peerKey = NULL;
11389|      0|        }
11390|      0|        CERT_DestroyCertificate(ss->sec.peerCert);
11391|      0|        ss->sec.peerCert = NULL;
11392|      0|    }
11393|  10.6k|}
ssl_ReadCertificateStatus:
11420|     25|{
11421|     25|    PRUint32 status, len;
11422|     25|    SECStatus rv;
11423|       |
11424|     25|    PORT_Assert(!ss->sec.isServer);
  ------------------
  |  |  120|     25|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|     25|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 25, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11425|       |
11426|       |    /* Consume the CertificateStatusType enum */
11427|     25|    rv = ssl3_ConsumeHandshakeNumber(ss, &status, 1, &b, &length);
11428|     25|    if (rv != SECSuccess || status != 1 /* ocsp */) {
  ------------------
  |  Branch (11428:9): [True: 1, False: 24]
  |  Branch (11428:29): [True: 4, False: 20]
  ------------------
11429|      5|        return ssl3_DecodeError(ss);
11430|      5|    }
11431|       |
11432|     20|    rv = ssl3_ConsumeHandshakeNumber(ss, &len, 3, &b, &length);
11433|     20|    if (rv != SECSuccess || len != length) {
  ------------------
  |  Branch (11433:9): [True: 0, False: 20]
  |  Branch (11433:29): [True: 18, False: 2]
  ------------------
11434|     18|        return ssl3_DecodeError(ss);
11435|     18|    }
11436|       |
11437|      2|#define MAX_CERTSTATUS_LEN 0x1ffff /* 128k - 1 */
11438|      2|    if (length > MAX_CERTSTATUS_LEN) {
  ------------------
  |  |11437|      2|#define MAX_CERTSTATUS_LEN 0x1ffff /* 128k - 1 */
  ------------------
  |  Branch (11438:9): [True: 0, False: 2]
  ------------------
11439|      0|        ssl3_DecodeError(ss); /* sets error code */
11440|      0|        return SECFailure;
11441|      0|    }
11442|      2|#undef MAX_CERTSTATUS_LEN
11443|       |
11444|       |    /* Array size 1, because we currently implement single-stapling only */
11445|      2|    SECITEM_AllocArray(NULL, &ss->sec.ci.sid->peerCertStatus, 1);
11446|      2|    if (!ss->sec.ci.sid->peerCertStatus.items)
  ------------------
  |  Branch (11446:9): [True: 0, False: 2]
  ------------------
11447|      0|        return SECFailure; /* code already set */
11448|       |
11449|      2|    ss->sec.ci.sid->peerCertStatus.items[0].data = PORT_Alloc(length);
  ------------------
  |  |   52|      2|#define PORT_Alloc PORT_Alloc_Util
  ------------------
11450|       |
11451|      2|    if (!ss->sec.ci.sid->peerCertStatus.items[0].data) {
  ------------------
  |  Branch (11451:9): [True: 0, False: 2]
  ------------------
11452|      0|        SECITEM_FreeArray(&ss->sec.ci.sid->peerCertStatus, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
11453|      0|        return SECFailure; /* code already set */
11454|      0|    }
11455|       |
11456|      2|    PORT_Memcpy(ss->sec.ci.sid->peerCertStatus.items[0].data, b, length);
  ------------------
  |  |  180|      2|#define PORT_Memcpy memcpy
  ------------------
11457|      2|    ss->sec.ci.sid->peerCertStatus.items[0].len = length;
11458|      2|    ss->sec.ci.sid->peerCertStatus.items[0].type = siBuffer;
11459|      2|    return SECSuccess;
11460|      2|}
ssl3_CompleteHandleCertificate:
11492|  5.35k|{
11493|  5.35k|    ssl3CertNode *c;
11494|  5.35k|    ssl3CertNode *lastCert = NULL;
11495|  5.35k|    PRUint32 remaining = 0;
11496|  5.35k|    PRUint32 size;
11497|  5.35k|    SECStatus rv;
11498|  5.35k|    PRBool isServer = ss->sec.isServer;
11499|  5.35k|    PRBool isTLS;
11500|  5.35k|    SSL3AlertDescription desc;
11501|  5.35k|    int errCode = SSL_ERROR_RX_MALFORMED_CERTIFICATE;
11502|  5.35k|    SECItem certItem;
11503|       |
11504|  5.35k|    ssl3_CleanupPeerCerts(ss);
11505|  5.35k|    isTLS = (PRBool)(ss->ssl3.prSpec->version > SSL_LIBRARY_VERSION_3_0);
  ------------------
  |  |   17|  5.35k|#define SSL_LIBRARY_VERSION_3_0                 0x0300
  ------------------
11506|       |
11507|       |    /* It is reported that some TLS client sends a Certificate message
11508|       |    ** with a zero-length message body.  We'll treat that case like a
11509|       |    ** normal no_certificates message to maximize interoperability.
11510|       |    */
11511|  5.35k|    if (length) {
  ------------------
  |  Branch (11511:9): [True: 5.35k, False: 1]
  ------------------
11512|  5.35k|        rv = ssl3_ConsumeHandshakeNumber(ss, &remaining, 3, &b, &length);
11513|  5.35k|        if (rv != SECSuccess)
  ------------------
  |  Branch (11513:13): [True: 1, False: 5.35k]
  ------------------
11514|      1|            goto loser; /* fatal alert already sent by ConsumeHandshake. */
11515|  5.35k|        if (remaining > length)
  ------------------
  |  Branch (11515:13): [True: 28, False: 5.32k]
  ------------------
11516|     28|            goto decode_loser;
11517|  5.35k|    }
11518|       |
11519|  5.33k|    if (!remaining) {
  ------------------
  |  Branch (11519:9): [True: 2, False: 5.32k]
  ------------------
11520|      2|        if (!(isTLS && isServer)) {
  ------------------
  |  Branch (11520:15): [True: 2, False: 0]
  |  Branch (11520:24): [True: 0, False: 2]
  ------------------
11521|      2|            desc = bad_certificate;
11522|      2|            goto alert_loser;
11523|      2|        }
11524|       |        /* This is TLS's version of a no_certificate alert. */
11525|       |        /* I'm a server. I've requested a client cert. He hasn't got one. */
11526|      0|        rv = ssl3_HandleNoCertificate(ss);
11527|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (11527:13): [True: 0, False: 0]
  ------------------
11528|      0|            errCode = PORT_GetError();
  ------------------
  |  |   62|      0|#define PORT_GetError PORT_GetError_Util
  ------------------
11529|      0|            goto loser;
11530|      0|        }
11531|       |
11532|      0|        if (ss->version < SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|      0|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (11532:13): [True: 0, False: 0]
  ------------------
11533|      0|            ss->ssl3.hs.ws = wait_client_key;
11534|      0|        } else {
11535|      0|            TLS13_SET_HS_STATE(ss, wait_finished);
  ------------------
  |  |   37|      0|    tls13_SetHsState(ss, ws, __func__, __FILE__, __LINE__)
  ------------------
11536|      0|        }
11537|      0|        return SECSuccess;
11538|      0|    }
11539|       |
11540|  5.32k|    ss->ssl3.peerCertArena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
  ------------------
  |  |   63|  5.32k|#define PORT_NewArena PORT_NewArena_Util
  ------------------
                  ss->ssl3.peerCertArena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
  ------------------
  |  |   60|  5.32k|#define DER_DEFAULT_CHUNKSIZE (2048)
  ------------------
11541|  5.32k|    if (ss->ssl3.peerCertArena == NULL) {
  ------------------
  |  Branch (11541:9): [True: 0, False: 5.32k]
  ------------------
11542|      0|        goto loser; /* don't send alerts on memory errors */
11543|      0|    }
11544|       |
11545|       |    /* First get the peer cert. */
11546|  5.32k|    if (remaining < 3)
  ------------------
  |  Branch (11546:9): [True: 1, False: 5.32k]
  ------------------
11547|      1|        goto decode_loser;
11548|       |
11549|  5.32k|    remaining -= 3;
11550|  5.32k|    rv = ssl3_ConsumeHandshakeNumber(ss, &size, 3, &b, &length);
11551|  5.32k|    if (rv != SECSuccess)
  ------------------
  |  Branch (11551:9): [True: 0, False: 5.32k]
  ------------------
11552|      0|        goto loser; /* fatal alert already sent by ConsumeHandshake. */
11553|  5.32k|    if (size == 0 || remaining < size)
  ------------------
  |  Branch (11553:9): [True: 1, False: 5.32k]
  |  Branch (11553:22): [True: 24, False: 5.30k]
  ------------------
11554|     25|        goto decode_loser;
11555|       |
11556|  5.30k|    certItem.data = b;
11557|  5.30k|    certItem.len = size;
11558|  5.30k|    b += size;
11559|  5.30k|    length -= size;
11560|  5.30k|    remaining -= size;
11561|       |
11562|  5.30k|    ss->sec.peerCert = CERT_NewTempCertificate(ss->dbHandle, &certItem, NULL,
11563|  5.30k|                                               PR_FALSE, PR_TRUE);
  ------------------
  |  |  438|  5.30k|#define PR_FALSE 0
  ------------------
                                                             PR_FALSE, PR_TRUE);
  ------------------
  |  |  437|  5.30k|#define PR_TRUE 1
  ------------------
11564|  5.30k|    if (ss->sec.peerCert == NULL) {
  ------------------
  |  Branch (11564:9): [True: 211, False: 5.09k]
  ------------------
11565|       |        /* We should report an alert if the cert was bad, but not if the
11566|       |         * problem was just some local problem, like memory error.
11567|       |         */
11568|    211|        goto ambiguous_err;
11569|    211|    }
11570|       |
11571|       |    /* Now get all of the CA certs. */
11572|  6.09k|    while (remaining > 0) {
  ------------------
  |  Branch (11572:12): [True: 1.08k, False: 5.01k]
  ------------------
11573|  1.08k|        if (remaining < 3)
  ------------------
  |  Branch (11573:13): [True: 7, False: 1.07k]
  ------------------
11574|      7|            goto decode_loser;
11575|       |
11576|  1.07k|        remaining -= 3;
11577|  1.07k|        rv = ssl3_ConsumeHandshakeNumber(ss, &size, 3, &b, &length);
11578|  1.07k|        if (rv != SECSuccess)
  ------------------
  |  Branch (11578:13): [True: 0, False: 1.07k]
  ------------------
11579|      0|            goto loser; /* fatal alert already sent by ConsumeHandshake. */
11580|  1.07k|        if (size == 0 || remaining < size)
  ------------------
  |  Branch (11580:13): [True: 4, False: 1.07k]
  |  Branch (11580:26): [True: 68, False: 1.00k]
  ------------------
11581|     72|            goto decode_loser;
11582|       |
11583|  1.00k|        certItem.data = b;
11584|  1.00k|        certItem.len = size;
11585|  1.00k|        b += size;
11586|  1.00k|        length -= size;
11587|  1.00k|        remaining -= size;
11588|       |
11589|  1.00k|        c = PORT_ArenaNew(ss->ssl3.peerCertArena, ssl3CertNode);
  ------------------
  |  |  153|  1.00k|    (type *)PORT_ArenaAlloc(poolp, sizeof(type))
  |  |  ------------------
  |  |  |  |   53|  1.00k|#define PORT_ArenaAlloc PORT_ArenaAlloc_Util
  |  |  ------------------
  ------------------
11590|  1.00k|        if (c == NULL) {
  ------------------
  |  Branch (11590:13): [True: 0, False: 1.00k]
  ------------------
11591|      0|            goto loser; /* don't send alerts on memory errors */
11592|      0|        }
11593|       |
11594|  1.00k|        c->derCert = SECITEM_ArenaDupItem(ss->ssl3.peerCertArena,
  ------------------
  |  |  104|  1.00k|#define SECITEM_ArenaDupItem SECITEM_ArenaDupItem_Util
  ------------------
11595|  1.00k|                                          &certItem);
11596|  1.00k|        if (c->derCert == NULL) {
  ------------------
  |  Branch (11596:13): [True: 0, False: 1.00k]
  ------------------
11597|      0|            goto loser;
11598|      0|        }
11599|       |
11600|  1.00k|        c->next = NULL;
11601|  1.00k|        if (lastCert) {
  ------------------
  |  Branch (11601:13): [True: 160, False: 847]
  ------------------
11602|    160|            lastCert->next = c;
11603|    847|        } else {
11604|    847|            ss->ssl3.peerCertChain = c;
11605|    847|        }
11606|  1.00k|        lastCert = c;
11607|  1.00k|    }
11608|       |
11609|  5.01k|    SECKEY_UpdateCertPQG(ss->sec.peerCert);
11610|       |
11611|  5.01k|    if (!isServer &&
  ------------------
  |  Branch (11611:9): [True: 5.01k, False: 0]
  ------------------
11612|  5.01k|        ss->version < SSL_LIBRARY_VERSION_TLS_1_3 &&
  ------------------
  |  |   21|  10.0k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (11612:9): [True: 5.01k, False: 0]
  ------------------
11613|  5.01k|        ssl3_ExtensionNegotiated(ss, ssl_cert_status_xtn)) {
  ------------------
  |  Branch (11613:9): [True: 34, False: 4.97k]
  ------------------
11614|     34|        ss->ssl3.hs.ws = wait_certificate_status;
11615|     34|        rv = SECSuccess;
11616|  4.97k|    } else {
11617|  4.97k|        rv = ssl3_AuthCertificate(ss); /* sets ss->ssl3.hs.ws */
11618|  4.97k|    }
11619|       |
11620|  5.01k|    return rv;
11621|       |
11622|    211|ambiguous_err:
11623|    211|    errCode = PORT_GetError();
  ------------------
  |  |   62|    211|#define PORT_GetError PORT_GetError_Util
  ------------------
11624|    211|    switch (errCode) {
  ------------------
  |  Branch (11624:13): [True: 211, False: 0]
  ------------------
11625|      0|        case PR_OUT_OF_MEMORY_ERROR:
  ------------------
  |  |   16|      0|#define PR_OUT_OF_MEMORY_ERROR                   (-6000L)
  ------------------
  |  Branch (11625:9): [True: 0, False: 211]
  ------------------
11626|      0|        case SEC_ERROR_BAD_DATABASE:
  ------------------
  |  Branch (11626:9): [True: 0, False: 211]
  ------------------
11627|      0|        case SEC_ERROR_NO_MEMORY:
  ------------------
  |  Branch (11627:9): [True: 0, False: 211]
  ------------------
11628|      0|            if (isTLS) {
  ------------------
  |  Branch (11628:17): [True: 0, False: 0]
  ------------------
11629|      0|                desc = internal_error;
11630|      0|                goto alert_loser;
11631|      0|            }
11632|      0|            goto loser;
11633|    211|    }
11634|    211|    ssl3_SendAlertForCertError(ss, errCode);
11635|    211|    goto loser;
11636|       |
11637|    133|decode_loser:
11638|    133|    desc = isTLS ? decode_error : bad_certificate;
  ------------------
  |  Branch (11638:12): [True: 133, False: 0]
  ------------------
11639|       |
11640|    135|alert_loser:
11641|    135|    (void)SSL3_SendAlert(ss, alert_fatal, desc);
11642|       |
11643|    347|loser:
11644|    347|    (void)ssl_MapLowLevelError(errCode);
11645|    347|    return SECFailure;
11646|    135|}
ssl_SetAuthKeyBits:
11650|  4.74k|{
11651|  4.74k|    SECStatus rv;
11652|  4.74k|    PRUint32 minKey = 0;
11653|  4.74k|    PRInt32 optval;
11654|  4.74k|    PRBool usePolicyLength = PR_TRUE;
  ------------------
  |  |  437|  4.74k|#define PR_TRUE 1
  ------------------
11655|       |
11656|  4.74k|    rv = NSS_OptionGet(NSS_KEY_SIZE_POLICY_FLAGS, &optval);
  ------------------
  |  |  317|  4.74k|#define NSS_KEY_SIZE_POLICY_FLAGS 0x00e
  ------------------
11657|  4.74k|    if (rv == SECSuccess) {
  ------------------
  |  Branch (11657:9): [True: 4.74k, False: 0]
  ------------------
11658|  4.74k|        usePolicyLength = (PRBool)((optval & NSS_KEY_SIZE_POLICY_SSL_FLAG) == NSS_KEY_SIZE_POLICY_SSL_FLAG);
  ------------------
  |  |  321|  4.74k|#define NSS_KEY_SIZE_POLICY_SSL_FLAG 1
  ------------------
                      usePolicyLength = (PRBool)((optval & NSS_KEY_SIZE_POLICY_SSL_FLAG) == NSS_KEY_SIZE_POLICY_SSL_FLAG);
  ------------------
  |  |  321|  4.74k|#define NSS_KEY_SIZE_POLICY_SSL_FLAG 1
  ------------------
11659|  4.74k|    }
11660|       |
11661|  4.74k|    ss->sec.authKeyBits = SECKEY_PublicKeyStrengthInBits(pubKey);
11662|  4.74k|    switch (SECKEY_GetPublicKeyType(pubKey)) {
11663|  2.49k|        case rsaKey:
  ------------------
  |  Branch (11663:9): [True: 2.49k, False: 2.24k]
  ------------------
11664|  2.49k|        case rsaPssKey:
  ------------------
  |  Branch (11664:9): [True: 0, False: 4.74k]
  ------------------
11665|  2.49k|        case rsaOaepKey:
  ------------------
  |  Branch (11665:9): [True: 0, False: 4.74k]
  ------------------
11666|  2.49k|            rv = usePolicyLength ? NSS_OptionGet(NSS_RSA_MIN_KEY_SIZE, &optval)
  ------------------
  |  |  286|  2.49k|#define NSS_RSA_MIN_KEY_SIZE 0x001
  ------------------
  |  Branch (11666:18): [True: 2.49k, False: 0]
  ------------------
11667|  2.49k|                                 : SECFailure;
11668|  2.49k|            if (rv == SECSuccess && optval > 0) {
  ------------------
  |  Branch (11668:17): [True: 2.49k, False: 0]
  |  Branch (11668:37): [True: 2.49k, False: 0]
  ------------------
11669|  2.49k|                minKey = (PRUint32)optval;
11670|  2.49k|            } else {
11671|      0|                minKey = SSL_RSA_MIN_MODULUS_BITS;
  ------------------
  |  |   15|      0|#define SSL_RSA_MIN_MODULUS_BITS 1023
  ------------------
11672|      0|            }
11673|  2.49k|            break;
11674|       |
11675|  1.15k|        case dsaKey:
  ------------------
  |  Branch (11675:9): [True: 1.15k, False: 3.58k]
  ------------------
11676|  1.15k|            rv = usePolicyLength ? NSS_OptionGet(NSS_DSA_MIN_KEY_SIZE, &optval)
  ------------------
  |  |  288|  1.15k|#define NSS_DSA_MIN_KEY_SIZE 0x004
  ------------------
  |  Branch (11676:18): [True: 1.15k, False: 0]
  ------------------
11677|  1.15k|                                 : SECFailure;
11678|  1.15k|            if (rv == SECSuccess && optval > 0) {
  ------------------
  |  Branch (11678:17): [True: 1.15k, False: 0]
  |  Branch (11678:37): [True: 1.15k, False: 0]
  ------------------
11679|  1.15k|                minKey = (PRUint32)optval;
11680|  1.15k|            } else {
11681|      0|                minKey = SSL_DSA_MIN_P_BITS;
  ------------------
  |  |   20|      0|#define SSL_DSA_MIN_P_BITS 1023
  ------------------
11682|      0|            }
11683|  1.15k|            break;
11684|       |
11685|     15|        case dhKey:
  ------------------
  |  Branch (11685:9): [True: 15, False: 4.72k]
  ------------------
11686|     15|            rv = usePolicyLength ? NSS_OptionGet(NSS_DH_MIN_KEY_SIZE, &optval)
  ------------------
  |  |  287|     15|#define NSS_DH_MIN_KEY_SIZE 0x002
  ------------------
  |  Branch (11686:18): [True: 15, False: 0]
  ------------------
11687|     15|                                 : SECFailure;
11688|     15|            if (rv == SECSuccess && optval > 0) {
  ------------------
  |  Branch (11688:17): [True: 15, False: 0]
  |  Branch (11688:37): [True: 15, False: 0]
  ------------------
11689|     15|                minKey = (PRUint32)optval;
11690|     15|            } else {
11691|      0|                minKey = SSL_DH_MIN_P_BITS;
  ------------------
  |  |   19|      0|#define SSL_DH_MIN_P_BITS 1023
  ------------------
11692|      0|            }
11693|     15|            break;
11694|       |
11695|  1.07k|        case ecKey:
  ------------------
  |  Branch (11695:9): [True: 1.07k, False: 3.66k]
  ------------------
11696|  1.07k|            rv = usePolicyLength ? NSS_OptionGet(NSS_ECC_MIN_KEY_SIZE, &optval)
  ------------------
  |  |  327|  1.07k|#define NSS_ECC_MIN_KEY_SIZE 0x011
  ------------------
  |  Branch (11696:18): [True: 1.07k, False: 0]
  ------------------
11697|  1.07k|                                 : SECFailure;
11698|  1.07k|            if (rv == SECSuccess && optval > 0) {
  ------------------
  |  Branch (11698:17): [True: 1.07k, False: 0]
  |  Branch (11698:37): [True: 1.07k, False: 0]
  ------------------
11699|  1.07k|                minKey = (PRUint32)optval;
11700|  1.07k|            } else {
11701|       |                /* Don't check EC strength here on the understanding that we
11702|       |                 * only support curves we like. */
11703|      0|                minKey = ss->sec.authKeyBits;
11704|      0|            }
11705|  1.07k|            break;
11706|       |
11707|      0|        default:
  ------------------
  |  Branch (11707:9): [True: 0, False: 4.74k]
  ------------------
11708|      0|            FATAL_ERROR(ss, SEC_ERROR_LIBRARY_FAILURE, internal_error);
  ------------------
  |  |  175|      0|    do {                                     \
  |  |  176|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |  167|      0|    do {                                                                           \
  |  |  |  |  168|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |  169|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |  170|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |  171|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (171:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  177|      0|        tls13_FatalError(ss, prError, desc); \
  |  |  178|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (178:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
11709|      0|            return SECFailure;
11710|  4.74k|    }
11711|       |
11712|       |    /* Too small: not good enough. Send a fatal alert. */
11713|  4.74k|    if (ss->sec.authKeyBits < minKey) {
  ------------------
  |  Branch (11713:9): [True: 123, False: 4.61k]
  ------------------
11714|    123|        FATAL_ERROR(ss, SSL_ERROR_WEAK_SERVER_CERT_KEY,
  ------------------
  |  |  175|    123|    do {                                     \
  |  |  176|    123|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |  167|    123|    do {                                                                           \
  |  |  |  |  168|    123|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|    123|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 123]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|    123|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |  169|    123|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |  170|    123|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|    123|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |  171|    123|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (171:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  177|    246|        tls13_FatalError(ss, prError, desc); \
  |  |  ------------------
  |  |  |  Branch (177:39): [True: 123, False: 0]
  |  |  ------------------
  |  |  178|    123|    } while (0)
  |  |  ------------------
  |  |  |  Branch (178:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
11715|    123|                    ss->version >= SSL_LIBRARY_VERSION_TLS_1_0
11716|    123|                        ? insufficient_security
11717|    123|                        : illegal_parameter);
11718|    123|        return SECFailure;
11719|    123|    }
11720|       |
11721|       |    /* PreliminaryChannelInfo.authKeyBits, scheme, and peerDelegCred are now valid. */
11722|  4.61k|    ss->ssl3.hs.preliminaryInfo |= ssl_preinfo_peer_auth;
  ------------------
  |  |  397|  4.61k|#define ssl_preinfo_peer_auth (1U << 3)
  ------------------
11723|       |
11724|  4.61k|    return SECSuccess;
11725|  4.74k|}
ssl3_HandleServerSpki:
11729|  4.98k|{
11730|  4.98k|    PORT_Assert(!ss->sec.isServer);
  ------------------
  |  |  120|  4.98k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  4.98k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 4.98k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11731|  4.98k|    SECKEYPublicKey *pubKey;
11732|       |
11733|  4.98k|    if (ss->version >= SSL_LIBRARY_VERSION_TLS_1_3 &&
  ------------------
  |  |   21|  9.97k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (11733:9): [True: 0, False: 4.98k]
  ------------------
11734|  4.98k|        tls13_IsVerifyingWithDelegatedCredential(ss)) {
  ------------------
  |  Branch (11734:9): [True: 0, False: 0]
  ------------------
11735|      0|        sslDelegatedCredential *dc = ss->xtnData.peerDelegCred;
11736|      0|        pubKey = SECKEY_ExtractPublicKey(dc->spki);
11737|      0|        if (!pubKey) {
  ------------------
  |  Branch (11737:13): [True: 0, False: 0]
  ------------------
11738|      0|            PORT_SetError(SSL_ERROR_EXTRACT_PUBLIC_KEY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
11739|      0|            return SECFailure;
11740|      0|        }
11741|       |
11742|       |        /* Because we have only a single authType (ssl_auth_tls13_any)
11743|       |         * for TLS 1.3 at this point, set the scheme so that the
11744|       |         * callback can interpret |authKeyBits| correctly.
11745|       |         */
11746|      0|        ss->sec.signatureScheme = dc->expectedCertVerifyAlg;
11747|  4.98k|    } else {
11748|  4.98k|        pubKey = CERT_ExtractPublicKey(ss->sec.peerCert);
11749|  4.98k|        if (!pubKey) {
  ------------------
  |  Branch (11749:13): [True: 247, False: 4.74k]
  ------------------
11750|    247|            PORT_SetError(SSL_ERROR_EXTRACT_PUBLIC_KEY_FAILURE);
  ------------------
  |  |   65|    247|#define PORT_SetError PORT_SetError_Util
  ------------------
11751|    247|            return SECFailure;
11752|    247|        }
11753|  4.98k|    }
11754|       |
11755|  4.74k|    SECStatus rv = ssl_SetAuthKeyBits(ss, pubKey);
11756|  4.74k|    SECKEY_DestroyPublicKey(pubKey);
11757|  4.74k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (11757:9): [True: 123, False: 4.61k]
  ------------------
11758|    123|        return rv; /* Alert sent and code set. */
11759|    123|    }
11760|       |
11761|  4.61k|    return SECSuccess;
11762|  4.74k|}
ssl3_AuthCertificate:
11766|  4.98k|{
11767|  4.98k|    SECStatus rv;
11768|  4.98k|    PRBool isServer = ss->sec.isServer;
11769|  4.98k|    int errCode;
11770|       |
11771|  4.98k|    ss->ssl3.hs.authCertificatePending = PR_FALSE;
  ------------------
  |  |  438|  4.98k|#define PR_FALSE 0
  ------------------
11772|       |
11773|  4.98k|    PORT_Assert((ss->ssl3.hs.preliminaryInfo & ssl_preinfo_all) ==
  ------------------
  |  |  120|  4.98k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  4.98k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 4.98k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11774|  4.98k|                ssl_preinfo_all);
11775|       |
11776|  4.98k|    if (!ss->sec.isServer) {
  ------------------
  |  Branch (11776:9): [True: 4.98k, False: 0]
  ------------------
11777|       |        /* Set the |spki| used to verify the handshake. When verifying with a
11778|       |         * delegated credential (DC), this corresponds to the DC public key;
11779|       |         * otherwise it correspond to the public key of the peer's end-entity
11780|       |         * certificate. */
11781|  4.98k|        rv = ssl3_HandleServerSpki(ss);
11782|  4.98k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (11782:13): [True: 370, False: 4.61k]
  ------------------
11783|       |            /* Alert sent and code set (if not SSL_ERROR_EXTRACT_PUBLIC_KEY_FAILURE).
11784|       |             * In either case, we're done here. */
11785|    370|            errCode = PORT_GetError();
  ------------------
  |  |   62|    370|#define PORT_GetError PORT_GetError_Util
  ------------------
11786|    370|            goto loser;
11787|    370|        }
11788|       |
11789|  4.61k|        if (ss->version < SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|  4.61k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (11789:13): [True: 4.61k, False: 0]
  ------------------
11790|  4.61k|            ss->sec.authType = ss->ssl3.hs.kea_def->authKeyType;
11791|  4.61k|            ss->sec.keaType = ss->ssl3.hs.kea_def->exchKeyType;
11792|  4.61k|        }
11793|  4.61k|    }
11794|       |
11795|       |    /*
11796|       |     * Ask caller-supplied callback function to validate cert chain.
11797|       |     */
11798|  4.61k|    rv = (SECStatus)(*ss->authCertificate)(ss->authCertificateArg, ss->fd,
11799|  4.61k|                                           PR_TRUE, isServer);
  ------------------
  |  |  437|  4.61k|#define PR_TRUE 1
  ------------------
11800|  4.61k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (11800:9): [True: 75, False: 4.54k]
  ------------------
11801|     75|        errCode = PORT_GetError();
  ------------------
  |  |   62|     75|#define PORT_GetError PORT_GetError_Util
  ------------------
11802|     75|        if (errCode == 0) {
  ------------------
  |  Branch (11802:13): [True: 2, False: 73]
  ------------------
11803|      2|            errCode = SSL_ERROR_BAD_CERTIFICATE;
11804|      2|        }
11805|     75|        if (rv != SECWouldBlock) {
  ------------------
  |  Branch (11805:13): [True: 75, False: 0]
  ------------------
11806|     75|            if (ss->handleBadCert) {
  ------------------
  |  Branch (11806:17): [True: 0, False: 75]
  ------------------
11807|      0|                rv = (*ss->handleBadCert)(ss->badCertArg, ss->fd);
11808|      0|            }
11809|     75|        }
11810|       |
11811|     75|        if (rv == SECWouldBlock) {
  ------------------
  |  Branch (11811:13): [True: 0, False: 75]
  ------------------
11812|      0|            if (ss->sec.isServer) {
  ------------------
  |  Branch (11812:17): [True: 0, False: 0]
  ------------------
11813|      0|                errCode = SSL_ERROR_FEATURE_NOT_SUPPORTED_FOR_SERVERS;
11814|      0|                goto loser;
11815|      0|            }
11816|       |
11817|      0|            ss->ssl3.hs.authCertificatePending = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
11818|      0|            rv = SECSuccess;
11819|      0|        }
11820|       |
11821|     75|        if (rv != SECSuccess) {
  ------------------
  |  Branch (11821:13): [True: 75, False: 0]
  ------------------
11822|     75|            ssl3_SendAlertForCertError(ss, errCode);
11823|     75|            goto loser;
11824|     75|        }
11825|     75|    }
11826|       |
11827|  4.54k|    if (ss->sec.ci.sid->peerCert) {
  ------------------
  |  Branch (11827:9): [True: 0, False: 4.54k]
  ------------------
11828|      0|        CERT_DestroyCertificate(ss->sec.ci.sid->peerCert);
11829|      0|    }
11830|  4.54k|    ss->sec.ci.sid->peerCert = CERT_DupCertificate(ss->sec.peerCert);
11831|       |
11832|  4.54k|    if (!ss->sec.isServer) {
  ------------------
  |  Branch (11832:9): [True: 4.54k, False: 0]
  ------------------
11833|  4.54k|        if (ss->version >= SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|  4.54k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (11833:13): [True: 0, False: 4.54k]
  ------------------
11834|      0|            TLS13_SET_HS_STATE(ss, wait_cert_verify);
  ------------------
  |  |   37|      0|    tls13_SetHsState(ss, ws, __func__, __FILE__, __LINE__)
  ------------------
11835|  4.54k|        } else {
11836|       |            /* Ephemeral suites require ServerKeyExchange. */
11837|  4.54k|            if (ss->ssl3.hs.kea_def->ephemeral) {
  ------------------
  |  Branch (11837:17): [True: 2.63k, False: 1.90k]
  ------------------
11838|       |                /* require server_key_exchange */
11839|  2.63k|                ss->ssl3.hs.ws = wait_server_key;
11840|  2.63k|            } else {
11841|       |                /* disallow server_key_exchange */
11842|  1.90k|                ss->ssl3.hs.ws = wait_cert_request;
11843|       |                /* This is static RSA key exchange so set the key exchange
11844|       |                 * details to compensate for that. */
11845|  1.90k|                ss->sec.keaKeyBits = ss->sec.authKeyBits;
11846|  1.90k|                ss->sec.signatureScheme = ssl_sig_none;
11847|  1.90k|                ss->sec.keaGroup = NULL;
11848|  1.90k|            }
11849|  4.54k|        }
11850|  4.54k|    } else {
11851|       |        /* Server */
11852|      0|        if (ss->version < SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|      0|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (11852:13): [True: 0, False: 0]
  ------------------
11853|      0|            ss->ssl3.hs.ws = wait_client_key;
11854|      0|        } else {
11855|      0|            TLS13_SET_HS_STATE(ss, wait_cert_verify);
  ------------------
  |  |   37|      0|    tls13_SetHsState(ss, ws, __func__, __FILE__, __LINE__)
  ------------------
11856|      0|        }
11857|      0|    }
11858|       |
11859|  4.54k|    PORT_Assert(rv == SECSuccess);
  ------------------
  |  |  120|  4.54k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  4.54k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 4.54k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11860|  4.54k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (11860:9): [True: 0, False: 4.54k]
  ------------------
11861|      0|        errCode = SEC_ERROR_LIBRARY_FAILURE;
11862|      0|        goto loser;
11863|      0|    }
11864|       |
11865|  4.54k|    return SECSuccess;
11866|       |
11867|    445|loser:
11868|    445|    (void)ssl_MapLowLevelError(errCode);
11869|    445|    return SECFailure;
11870|  4.54k|}
ssl3_RecordKeyLog:
12083|  4.49k|{
12084|  4.49k|#ifdef NSS_ALLOW_SSLKEYLOGFILE
12085|  4.49k|    SECStatus rv;
12086|  4.49k|    SECItem *keyData;
12087|       |    /* Longest label is "CLIENT_HANDSHAKE_TRAFFIC_SECRET", master secret is 48
12088|       |     * bytes which happens to be the largest in TLS 1.3 as well (SHA384).
12089|       |     * Maximum line length: "CLIENT_HANDSHAKE_TRAFFIC_SECRET" (31) + " " (1) +
12090|       |     * client_random (32*2) + " " (1) +
12091|       |     * traffic_secret (48*2) + "\n" (1) = 194. */
12092|  4.49k|    char buf[200];
12093|  4.49k|    unsigned int offset, len;
12094|       |
12095|  4.49k|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|  4.49k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  6.66k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 2.31k, False: 2.17k]
  |  |  |  |  |  Branch (208:7): [True: 2.17k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12096|       |
12097|  4.49k|    if (!ssl_keylog_iob)
  ------------------
  |  Branch (12097:9): [True: 4.49k, False: 0]
  ------------------
12098|  4.49k|        return;
12099|       |
12100|      0|    rv = PK11_ExtractKeyValue(secret);
12101|      0|    if (rv != SECSuccess)
  ------------------
  |  Branch (12101:9): [True: 0, False: 0]
  ------------------
12102|      0|        return;
12103|       |
12104|       |    /* keyData does not need to be freed. */
12105|      0|    keyData = PK11_GetKeyData(secret);
12106|      0|    if (!keyData || !keyData->data)
  ------------------
  |  Branch (12106:9): [True: 0, False: 0]
  |  Branch (12106:21): [True: 0, False: 0]
  ------------------
12107|      0|        return;
12108|       |
12109|      0|    len = strlen(label) + 1 +          /* label + space */
12110|      0|          SSL3_RANDOM_LENGTH * 2 + 1 + /* client random (hex) + space */
  ------------------
  |  |   24|      0|#define SSL3_RANDOM_LENGTH 32
  ------------------
12111|      0|          keyData->len * 2 + 1;        /* secret (hex) + newline */
12112|      0|    PORT_Assert(len <= sizeof(buf));
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12113|      0|    if (len > sizeof(buf))
  ------------------
  |  Branch (12113:9): [True: 0, False: 0]
  ------------------
12114|      0|        return;
12115|       |
12116|       |    /* https://developer.mozilla.org/en/NSS_Key_Log_Format */
12117|       |
12118|       |    /* There could be multiple, concurrent writers to the
12119|       |     * keylog, so we have to do everything in a single call to
12120|       |     * fwrite. */
12121|       |
12122|      0|    strcpy(buf, label);
12123|      0|    offset = strlen(label);
12124|      0|    buf[offset++] += ' ';
12125|      0|    hexEncode(buf + offset, ss->ssl3.hs.client_random, SSL3_RANDOM_LENGTH);
  ------------------
  |  |   24|      0|#define SSL3_RANDOM_LENGTH 32
  ------------------
12126|      0|    offset += SSL3_RANDOM_LENGTH * 2;
  ------------------
  |  |   24|      0|#define SSL3_RANDOM_LENGTH 32
  ------------------
12127|      0|    buf[offset++] = ' ';
12128|      0|    hexEncode(buf + offset, keyData->data, keyData->len);
12129|      0|    offset += keyData->len * 2;
12130|      0|    buf[offset++] = '\n';
12131|       |
12132|      0|    PORT_Assert(offset == len);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12133|       |
12134|      0|    PZ_Lock(ssl_keylog_lock);
  ------------------
  |  |  245|      0|#define PZ_Lock(k) PR_Lock((k))
  ------------------
12135|      0|    if (fwrite(buf, len, 1, ssl_keylog_iob) == 1)
  ------------------
  |  Branch (12135:9): [True: 0, False: 0]
  ------------------
12136|      0|        fflush(ssl_keylog_iob);
12137|      0|    PZ_Unlock(ssl_keylog_lock);
  ------------------
  |  |  246|      0|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
12138|      0|#endif
12139|      0|}
ssl_HashHandshakeMessageInt:
12577|  19.4k|{
12578|  19.4k|    PRUint8 hdr[4];
12579|  19.4k|    PRUint8 dtlsData[8];
12580|  19.4k|    SECStatus rv;
12581|       |
12582|  19.4k|    PRINT_BUF(50, (ss, "Hash handshake message:", b, length));
  ------------------
  |  |   74|  19.4k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 19.4k]
  |  |  ------------------
  |  |   75|  19.4k|    ssl_PrintBuf b
  ------------------
12583|       |
12584|  19.4k|    hdr[0] = (PRUint8)ct;
12585|  19.4k|    hdr[1] = (PRUint8)(length >> 16);
12586|  19.4k|    hdr[2] = (PRUint8)(length >> 8);
12587|  19.4k|    hdr[3] = (PRUint8)(length);
12588|       |
12589|  19.4k|    rv = updateHashes(ss, (unsigned char *)hdr, 4);
12590|  19.4k|    if (rv != SECSuccess)
  ------------------
  |  Branch (12590:9): [True: 0, False: 19.4k]
  ------------------
12591|      0|        return rv; /* err code already set. */
12592|       |
12593|       |    /* Extra data to simulate a complete DTLS handshake fragment */
12594|  19.4k|    if (IS_DTLS_1_OR_12(ss)) {
  ------------------
  |  |  893|  19.4k|#define IS_DTLS_1_OR_12(ss) (IS_DTLS(ss) && ss->version < SSL_LIBRARY_VERSION_TLS_1_3)
  |  |  ------------------
  |  |  |  |  892|  38.9k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (892:21): [True: 19.4k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IS_DTLS_1_OR_12(ss) (IS_DTLS(ss) && ss->version < SSL_LIBRARY_VERSION_TLS_1_3)
  |  |  ------------------
  |  |  |  |   21|  38.9k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  |  |  ------------------
  |  |  |  Branch (893:45): [True: 15.3k, False: 4.06k]
  |  |  ------------------
  ------------------
12595|       |        /* Sequence number */
12596|  15.3k|        dtlsData[0] = MSB(dtlsSeq);
  ------------------
  |  |   94|  15.3k|#define MSB(x) ((unsigned char)(((unsigned)(x)) >> 8))
  ------------------
12597|  15.3k|        dtlsData[1] = LSB(dtlsSeq);
  ------------------
  |  |   93|  15.3k|#define LSB(x) ((unsigned char)((x)&0xff))
  ------------------
12598|       |
12599|       |        /* Fragment offset */
12600|  15.3k|        dtlsData[2] = 0;
12601|  15.3k|        dtlsData[3] = 0;
12602|  15.3k|        dtlsData[4] = 0;
12603|       |
12604|       |        /* Fragment length */
12605|  15.3k|        dtlsData[5] = (PRUint8)(length >> 16);
12606|  15.3k|        dtlsData[6] = (PRUint8)(length >> 8);
12607|  15.3k|        dtlsData[7] = (PRUint8)(length);
12608|       |
12609|  15.3k|        rv = updateHashes(ss, (unsigned char *)dtlsData, sizeof(dtlsData));
12610|  15.3k|        if (rv != SECSuccess)
  ------------------
  |  Branch (12610:13): [True: 0, False: 15.3k]
  ------------------
12611|      0|            return rv; /* err code already set. */
12612|  15.3k|    }
12613|       |
12614|       |    /* The message body */
12615|  19.4k|    rv = updateHashes(ss, b, length);
12616|  19.4k|    if (rv != SECSuccess)
  ------------------
  |  Branch (12616:9): [True: 0, False: 19.4k]
  ------------------
12617|      0|        return rv; /* err code already set. */
12618|       |
12619|  19.4k|    return SECSuccess;
12620|  19.4k|}
ssl_HashHandshakeMessage:
12625|  18.1k|{
12626|  18.1k|    return ssl_HashHandshakeMessageInt(ss, ct, ss->ssl3.hs.recvMessageSeq,
12627|  18.1k|                                       b, length, ssl3_UpdateHandshakeHashes);
12628|  18.1k|}
ssl_HashHandshakeMessageDefault:
12633|  1.27k|{
12634|  1.27k|    return ssl_HashHandshakeMessageInt(ss, ct, ss->ssl3.hs.recvMessageSeq,
12635|  1.27k|                                       b, length, ssl3_UpdateDefaultHandshakeHashes);
12636|  1.27k|}
ssl3_HandleHandshakeMessage:
12660|  19.1k|{
12661|  19.1k|    SECStatus rv = SECSuccess;
12662|  19.1k|    PRUint16 epoch;
12663|       |
12664|  19.1k|    PORT_Assert(ss->opt.noLocks || ssl_HaveRecvBufLock(ss));
  ------------------
  |  |  120|  19.1k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  28.3k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 9.97k, False: 9.17k]
  |  |  |  |  |  Branch (208:7): [True: 9.17k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12665|  19.1k|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|  19.1k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  28.3k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 9.97k, False: 9.17k]
  |  |  |  |  |  Branch (208:7): [True: 9.17k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12666|       |
12667|  19.1k|    SSL_TRC(30, ("%d: SSL3[%d]: handle handshake message: %s", SSL_GETPID(),
  ------------------
  |  |   71|  19.1k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 19.1k]
  |  |  ------------------
  |  |   72|  19.1k|    ssl_Trace b
  ------------------
12668|  19.1k|                 ss->fd, ssl3_DecodeHandshakeType(ss->ssl3.hs.msg_type)));
12669|       |
12670|       |    /* Start new handshake hashes when we start a new handshake. */
12671|  19.1k|    if (ss->ssl3.hs.msg_type == ssl_hs_client_hello) {
  ------------------
  |  Branch (12671:9): [True: 5, False: 19.1k]
  ------------------
12672|      5|        ssl3_RestartHandshakeHashes(ss);
12673|      5|    }
12674|  19.1k|    switch (ss->ssl3.hs.msg_type) {
12675|    114|        case ssl_hs_hello_request:
  ------------------
  |  Branch (12675:9): [True: 114, False: 19.0k]
  ------------------
12676|    528|        case ssl_hs_hello_verify_request:
  ------------------
  |  Branch (12676:9): [True: 414, False: 18.7k]
  ------------------
12677|       |            /* We don't include hello_request and hello_verify_request messages
12678|       |             * in the handshake hashes */
12679|    528|            break;
12680|       |
12681|       |        /* Defer hashing of these messages until the message handlers. */
12682|      5|        case ssl_hs_client_hello:
  ------------------
  |  Branch (12682:9): [True: 5, False: 19.1k]
  ------------------
12683|  8.68k|        case ssl_hs_server_hello:
  ------------------
  |  Branch (12683:9): [True: 8.67k, False: 10.4k]
  ------------------
12684|  8.68k|        case ssl_hs_certificate_verify:
  ------------------
  |  Branch (12684:9): [True: 4, False: 19.1k]
  ------------------
12685|  8.69k|        case ssl_hs_finished:
  ------------------
  |  Branch (12685:9): [True: 6, False: 19.1k]
  ------------------
12686|  8.69k|            break;
12687|       |
12688|  9.92k|        default:
  ------------------
  |  Branch (12688:9): [True: 9.92k, False: 9.21k]
  ------------------
12689|  9.92k|            if (!tls13_IsPostHandshake(ss)) {
  ------------------
  |  Branch (12689:17): [True: 9.92k, False: 0]
  ------------------
12690|  9.92k|                rv = ssl_HashHandshakeMessage(ss, ss->ssl3.hs.msg_type, b, length);
12691|  9.92k|                if (rv != SECSuccess) {
  ------------------
  |  Branch (12691:21): [True: 0, False: 9.92k]
  ------------------
12692|      0|                    return SECFailure;
12693|      0|                }
12694|  9.92k|            }
12695|  19.1k|    }
12696|       |
12697|  19.1k|    PORT_SetError(0); /* each message starts with no error. */
  ------------------
  |  |   65|  19.1k|#define PORT_SetError PORT_SetError_Util
  ------------------
12698|       |
12699|  19.1k|    if (ss->ssl3.hs.ws == wait_certificate_status &&
  ------------------
  |  Branch (12699:9): [True: 32, False: 19.1k]
  ------------------
12700|  19.1k|        ss->ssl3.hs.msg_type != ssl_hs_certificate_status) {
  ------------------
  |  Branch (12700:9): [True: 7, False: 25]
  ------------------
12701|       |        /* If we negotiated the certificate_status extension then we deferred
12702|       |         * certificate validation until we get the CertificateStatus messsage.
12703|       |         * But the CertificateStatus message is optional. If the server did
12704|       |         * not send it then we need to validate the certificate now. If the
12705|       |         * server does send the CertificateStatus message then we will
12706|       |         * authenticate the certificate in ssl3_HandleCertificateStatus.
12707|       |         */
12708|      7|        rv = ssl3_AuthCertificate(ss); /* sets ss->ssl3.hs.ws */
12709|      7|        if (rv != SECSuccess) {
  ------------------
  |  Branch (12709:13): [True: 4, False: 3]
  ------------------
12710|       |            /* This can't block. */
12711|      4|            PORT_Assert(PORT_GetError() != PR_WOULD_BLOCK_ERROR);
  ------------------
  |  |  120|      4|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      4|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 4, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12712|      4|            return SECFailure;
12713|      4|        }
12714|      7|    }
12715|       |
12716|  19.1k|    epoch = ss->ssl3.crSpec->epoch;
12717|  19.1k|    switch (ss->ssl3.hs.msg_type) {
12718|      5|        case ssl_hs_client_hello:
  ------------------
  |  Branch (12718:9): [True: 5, False: 19.1k]
  ------------------
12719|      5|            if (!ss->sec.isServer) {
  ------------------
  |  Branch (12719:17): [True: 5, False: 0]
  ------------------
12720|      5|                (void)SSL3_SendAlert(ss, alert_fatal, unexpected_message);
12721|      5|                PORT_SetError(SSL_ERROR_RX_UNEXPECTED_CLIENT_HELLO);
  ------------------
  |  |   65|      5|#define PORT_SetError PORT_SetError_Util
  ------------------
12722|      5|                return SECFailure;
12723|      5|            }
12724|      0|            rv = ssl3_HandleClientHello(ss, b, length);
12725|      0|            break;
12726|  8.67k|        case ssl_hs_server_hello:
  ------------------
  |  Branch (12726:9): [True: 8.67k, False: 10.4k]
  ------------------
12727|  8.67k|            if (ss->sec.isServer) {
  ------------------
  |  Branch (12727:17): [True: 0, False: 8.67k]
  ------------------
12728|      0|                (void)SSL3_SendAlert(ss, alert_fatal, unexpected_message);
12729|      0|                PORT_SetError(SSL_ERROR_RX_UNEXPECTED_SERVER_HELLO);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
12730|      0|                return SECFailure;
12731|      0|            }
12732|  8.67k|            rv = ssl3_HandleServerHello(ss, b, length);
12733|  8.67k|            break;
12734|  10.4k|        default:
  ------------------
  |  Branch (12734:9): [True: 10.4k, False: 8.68k]
  ------------------
12735|  10.4k|            if (ss->version < SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|  10.4k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (12735:17): [True: 10.4k, False: 17]
  ------------------
12736|  10.4k|                rv = ssl3_HandlePostHelloHandshakeMessage(ss, b, length);
12737|  10.4k|            } else {
12738|     17|                rv = tls13_HandlePostHelloHandshakeMessage(ss, b, length);
12739|     17|            }
12740|  10.4k|            break;
12741|  19.1k|    }
12742|  19.1k|    if (ss->version >= SSL_LIBRARY_VERSION_TLS_1_3 &&
  ------------------
  |  |   21|  38.2k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (12742:9): [True: 2.89k, False: 16.2k]
  ------------------
12743|  19.1k|        (epoch != ss->ssl3.crSpec->epoch) && !endOfRecord) {
  ------------------
  |  Branch (12743:9): [True: 1.43k, False: 1.46k]
  |  Branch (12743:46): [True: 173, False: 1.26k]
  ------------------
12744|       |        /* If we changed read cipher states, there must not be any
12745|       |         * data in the input queue. */
12746|    173|        (void)SSL3_SendAlert(ss, alert_fatal, unexpected_message);
12747|    173|        PORT_SetError(SSL_ERROR_RX_UNEXPECTED_HANDSHAKE);
  ------------------
  |  |   65|    173|#define PORT_SetError PORT_SetError_Util
  ------------------
12748|    173|        return SECFailure;
12749|    173|    }
12750|       |    /* We consider the record to have been handled if SECSuccess or else WOULD_BLOCK is set
12751|       |     * Whoever set WOULD_BLOCK must handle any remaining actions required to finsih processing the record.
12752|       |     * e.g. by setting restartTarget.
12753|       |     */
12754|  18.9k|    if (IS_DTLS(ss) && (rv == SECSuccess || (rv == SECFailure && PR_GetError() == PR_WOULD_BLOCK_ERROR))) {
  ------------------
  |  |  892|  37.9k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 18.9k, False: 0]
  |  |  ------------------
  ------------------
                  if (IS_DTLS(ss) && (rv == SECSuccess || (rv == SECFailure && PR_GetError() == PR_WOULD_BLOCK_ERROR))) {
  ------------------
  |  |   22|  4.28k|#define PR_WOULD_BLOCK_ERROR                     (-5998L)
  ------------------
  |  Branch (12754:25): [True: 14.6k, False: 4.28k]
  |  Branch (12754:46): [True: 4.28k, False: 0]
  |  Branch (12754:66): [True: 0, False: 4.28k]
  ------------------
12755|       |        /* Increment the expected sequence number */
12756|  14.6k|        ss->ssl3.hs.recvMessageSeq++;
12757|  14.6k|    }
12758|       |
12759|       |    /* Taint the message so that it's easier to detect UAFs. */
12760|  18.9k|    PORT_Memset(b, 'N', length);
  ------------------
  |  |  182|  18.9k|#define PORT_Memset memset
  ------------------
12761|       |
12762|  18.9k|    return rv;
12763|  19.1k|}
ssl_RemoveTLSCBCPadding:
13031|  8.99k|{
13032|  8.99k|    unsigned int paddingLength, good, toCheck, i;
13033|  8.99k|    const unsigned int overhead = 1 /* padding length byte */ + macSize;
13034|       |
13035|       |    /* These lengths are all public so we can test them in non-constant
13036|       |     * time. */
13037|  8.99k|    if (overhead > plaintext->len) {
  ------------------
  |  Branch (13037:9): [True: 0, False: 8.99k]
  ------------------
13038|      0|        return SECFailure;
13039|      0|    }
13040|       |
13041|  8.99k|    paddingLength = plaintext->buf[plaintext->len - 1];
13042|  8.99k|    good = PORT_CT_GE(plaintext->len, paddingLength + overhead);
  ------------------
  |  |  364|  8.99k|#define PORT_CT_GE(a, b) (~PORT_CT_LT(a, b))
  |  |  ------------------
  |  |  |  |  363|  8.99k|#define PORT_CT_LT(a, b) PORT_CT_DUPLICATE_MSB_TO_ALL((a) - (b))
  |  |  |  |  ------------------
  |  |  |  |  |  |  344|  8.99k|#define PORT_CT_DUPLICATE_MSB_TO_ALL(x) ((PRUint32)((PRInt32)(x) >> (sizeof(PRInt32) * 8 - 1)))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
13043|       |
13044|       |    /* The padding consists of a length byte at the end of the record and then
13045|       |     * that many bytes of padding, all with the same value as the length byte.
13046|       |     * Thus, with the length byte included, there are paddingLength+1 bytes of
13047|       |     * padding.
13048|       |     *
13049|       |     * We can't check just |paddingLength+1| bytes because that leaks
13050|       |     * decrypted information. Therefore we always have to check the maximum
13051|       |     * amount of padding possible. (Again, the length of the record is
13052|       |     * public information so we can use it.) */
13053|  8.99k|    toCheck = 256; /* maximum amount of padding + 1. */
13054|  8.99k|    if (toCheck > plaintext->len) {
  ------------------
  |  Branch (13054:9): [True: 8.48k, False: 505]
  ------------------
13055|  8.48k|        toCheck = plaintext->len;
13056|  8.48k|    }
13057|       |
13058|   392k|    for (i = 0; i < toCheck; i++) {
  ------------------
  |  Branch (13058:17): [True: 383k, False: 8.99k]
  ------------------
13059|       |        /* If i <= paddingLength then the MSB of t is zero and mask is
13060|       |         * 0xff.  Otherwise, mask is 0. */
13061|   383k|        unsigned char mask = PORT_CT_LE(i, paddingLength);
  ------------------
  |  |  365|   383k|#define PORT_CT_LE(a, b) (~PORT_CT_GT(a, b))
  |  |  ------------------
  |  |  |  |  362|   383k|#define PORT_CT_GT(a, b) PORT_CT_DUPLICATE_MSB_TO_ALL((b) - (a))
  |  |  |  |  ------------------
  |  |  |  |  |  |  344|   383k|#define PORT_CT_DUPLICATE_MSB_TO_ALL(x) ((PRUint32)((PRInt32)(x) >> (sizeof(PRInt32) * 8 - 1)))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
13062|   383k|        unsigned char b = plaintext->buf[plaintext->len - 1 - i];
13063|       |        /* The final |paddingLength+1| bytes should all have the value
13064|       |         * |paddingLength|. Therefore the XOR should be zero. */
13065|   383k|        good &= ~(mask & (paddingLength ^ b));
13066|   383k|    }
13067|       |
13068|       |    /* If any of the final |paddingLength+1| bytes had the wrong value,
13069|       |     * one or more of the lower eight bits of |good| will be cleared. We
13070|       |     * AND the bottom 8 bits together and duplicate the result to all the
13071|       |     * bits. */
13072|  8.99k|    good &= good >> 4;
13073|  8.99k|    good &= good >> 2;
13074|  8.99k|    good &= good >> 1;
13075|  8.99k|    good <<= sizeof(good) * 8 - 1;
13076|  8.99k|    good = PORT_CT_DUPLICATE_MSB_TO_ALL(good);
  ------------------
  |  |  344|  8.99k|#define PORT_CT_DUPLICATE_MSB_TO_ALL(x) ((PRUint32)((PRInt32)(x) >> (sizeof(PRInt32) * 8 - 1)))
  ------------------
13077|       |
13078|  8.99k|    plaintext->len -= good & (paddingLength + 1);
13079|  8.99k|    return (good & SECSuccess) | (~good & SECFailure);
13080|  8.99k|}
ssl3_HandleNonApplicationData:
13425|  25.8k|{
13426|  25.8k|    SECStatus rv;
13427|       |
13428|       |    /* check for Token Presence */
13429|  25.8k|    if (!ssl3_ClientAuthTokenPresent(ss->sec.ci.sid)) {
  ------------------
  |  Branch (13429:9): [True: 0, False: 25.8k]
  ------------------
13430|      0|        PORT_SetError(SSL_ERROR_TOKEN_INSERTION_REMOVAL);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
13431|      0|        return SECFailure;
13432|      0|    }
13433|       |
13434|  25.8k|    ssl_GetSSL3HandshakeLock(ss);
  ------------------
  |  | 1407|  25.8k|    {                                                 \
  |  | 1408|  25.8k|        if (!ss->opt.noLocks) {                       \
  |  |  ------------------
  |  |  |  Branch (1408:13): [True: 12.9k, False: 12.8k]
  |  |  ------------------
  |  | 1409|  12.9k|            PORT_Assert(!ssl_HaveXmitBufLock(ss));    \
  |  |  ------------------
  |  |  |  |  120|  12.9k|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|  12.9k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 12.9k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1410|  12.9k|            PZ_EnterMonitor((ss)->ssl3HandshakeLock); \
  |  |  ------------------
  |  |  |  |  256|  12.9k|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1411|  12.9k|        }                                             \
  |  | 1412|  25.8k|    }
  ------------------
13435|       |
13436|       |    /* All the functions called in this switch MUST set error code if
13437|       |    ** they return SECFailure.
13438|       |    */
13439|  25.8k|    switch (rType) {
13440|    746|        case ssl_ct_change_cipher_spec:
  ------------------
  |  Branch (13440:9): [True: 746, False: 25.0k]
  ------------------
13441|    746|            rv = ssl3_HandleChangeCipherSpecs(ss, databuf);
13442|    746|            break;
13443|    970|        case ssl_ct_alert:
  ------------------
  |  Branch (13443:9): [True: 970, False: 24.8k]
  ------------------
13444|    970|            rv = ssl3_HandleAlert(ss, databuf);
13445|    970|            break;
13446|  23.3k|        case ssl_ct_handshake:
  ------------------
  |  Branch (13446:9): [True: 23.3k, False: 2.44k]
  ------------------
13447|  23.3k|            if (!IS_DTLS(ss)) {
  ------------------
  |  |  892|  23.3k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  ------------------
  |  Branch (13447:17): [True: 0, False: 23.3k]
  ------------------
13448|      0|                rv = ssl3_HandleHandshake(ss, databuf);
13449|  23.3k|            } else {
13450|  23.3k|                rv = dtls_HandleHandshake(ss, epoch, seqNum, databuf);
13451|  23.3k|            }
13452|  23.3k|            break;
13453|    676|        case ssl_ct_ack:
  ------------------
  |  Branch (13453:9): [True: 676, False: 25.1k]
  ------------------
13454|    676|            if (IS_DTLS(ss) && tls13_MaybeTls13(ss)) {
  ------------------
  |  |  892|  1.35k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 676, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (13454:32): [True: 673, False: 3]
  ------------------
13455|    673|                rv = dtls13_HandleAck(ss, databuf);
13456|    673|                break;
13457|    673|            }
13458|       |        /* Fall through. */
13459|     56|        default:
  ------------------
  |  Branch (13459:9): [True: 53, False: 25.7k]
  ------------------
13460|       |            /* If a TLS implementation receives an unexpected record type,
13461|       |             * it MUST terminate the connection with an "unexpected_message"
13462|       |             * alert [RFC8446, Section 5].
13463|       |             *
13464|       |             * For TLS 1.3 the outer content type is checked before in
13465|       |             * tls13con.c/tls13_UnprotectRecord(),
13466|       |             * For DTLS 1.3 the outer content type is checked before in
13467|       |             * ssl3gthr.c/dtls_GatherData.
13468|       |             * The inner content types will be checked here.
13469|       |             *
13470|       |             * In DTLS generally invalid records SHOULD be silently discarded,
13471|       |             * no alert is sent [RFC6347, Section 4.1.2.7].
13472|       |             */
13473|     56|            if (!IS_DTLS(ss)) {
  ------------------
  |  |  892|     56|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  ------------------
  |  Branch (13473:17): [True: 0, False: 56]
  ------------------
13474|      0|                SSL3_SendAlert(ss, alert_fatal, unexpected_message);
13475|      0|            }
13476|     56|            PORT_SetError(SSL_ERROR_RX_UNKNOWN_RECORD_TYPE);
  ------------------
  |  |   65|     56|#define PORT_SetError PORT_SetError_Util
  ------------------
13477|     56|            SSL_DBG(("%d: SSL3[%d]: bogus content type=%d",
  ------------------
  |  |   87|     56|    if (ssl_debug) \
  |  |  ------------------
  |  |  |  Branch (87:9): [True: 0, False: 56]
  |  |  ------------------
  |  |   88|     56|    ssl_Trace b
  ------------------
13478|     56|                     SSL_GETPID(), ss->fd, rType));
13479|     56|            rv = SECFailure;
13480|     56|            break;
13481|  25.8k|    }
13482|       |
13483|  25.8k|    ssl_ReleaseSSL3HandshakeLock(ss);
  ------------------
  |  | 1414|  25.8k|    {                                                \
  |  | 1415|  25.8k|        if (!ss->opt.noLocks)                        \
  |  |  ------------------
  |  |  |  Branch (1415:13): [True: 12.9k, False: 12.8k]
  |  |  ------------------
  |  | 1416|  25.8k|            PZ_ExitMonitor((ss)->ssl3HandshakeLock); \
  |  |  ------------------
  |  |  |  |  257|  12.9k|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1417|  25.8k|    }
  ------------------
13484|  25.8k|    return rv;
13485|  25.8k|}
ssl3_HandleRecord:
13544|  1.15M|{
13545|  1.15M|    SECStatus rv = SECFailure;
13546|  1.15M|    PRBool isTLS, isTLS13;
13547|  1.15M|    DTLSEpoch epoch;
13548|  1.15M|    ssl3CipherSpec *spec = NULL;
13549|  1.15M|    PRUint16 recordSizeLimit, cTextSizeLimit;
13550|  1.15M|    PRBool outOfOrderSpec = PR_FALSE;
  ------------------
  |  |  438|  1.15M|#define PR_FALSE 0
  ------------------
13551|  1.15M|    SSLContentType rType;
13552|  1.15M|    sslBuffer *plaintext = &ss->gs.buf;
13553|  1.15M|    SSL3AlertDescription alert = internal_error;
13554|  1.15M|    PORT_Assert(ss->opt.noLocks || ssl_HaveRecvBufLock(ss));
  ------------------
  |  |  120|  1.15M|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.71M|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 587k, False: 566k]
  |  |  |  |  |  Branch (208:7): [True: 566k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
13555|       |
13556|       |    /* check for Token Presence */
13557|  1.15M|    if (!ssl3_ClientAuthTokenPresent(ss->sec.ci.sid)) {
  ------------------
  |  Branch (13557:9): [True: 0, False: 1.15M]
  ------------------
13558|      0|        PORT_SetError(SSL_ERROR_TOKEN_INSERTION_REMOVAL);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
13559|      0|        return SECFailure;
13560|      0|    }
13561|       |
13562|       |    /* Clear out the buffer in case this exits early.  Any data then won't be
13563|       |     * processed twice. */
13564|  1.15M|    plaintext->len = 0;
13565|       |
13566|       |    /* We're waiting for another ClientHello, which will appear unencrypted.
13567|       |     * Use the content type to tell whether this should be discarded. */
13568|  1.15M|    if (ss->ssl3.hs.zeroRttIgnore == ssl_0rtt_ignore_hrr &&
  ------------------
  |  Branch (13568:9): [True: 0, False: 1.15M]
  ------------------
13569|  1.15M|        cText->hdr[0] == ssl_ct_application_data) {
  ------------------
  |  Branch (13569:9): [True: 0, False: 0]
  ------------------
13570|      0|        PORT_Assert(ss->ssl3.hs.ws == wait_client_hello);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
13571|      0|        return SECSuccess;
13572|      0|    }
13573|       |
13574|  1.15M|    ssl_GetSpecReadLock(ss); /******************************************/
  ------------------
  |  | 1422|  1.15M|    {                                           \
  |  | 1423|  1.15M|        if (!ss->opt.noLocks)                   \
  |  |  ------------------
  |  |  |  Branch (1423:13): [True: 566k, False: 587k]
  |  |  ------------------
  |  | 1424|  1.15M|            NSSRWLock_LockRead((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   47|   566k|#define NSSRWLock_LockRead NSSRWLock_LockRead_Util
  |  |  ------------------
  |  | 1425|  1.15M|    }
  ------------------
13575|  1.15M|    spec = ssl3_GetCipherSpec(ss, cText);
13576|  1.15M|    if (!spec) {
  ------------------
  |  Branch (13576:9): [True: 412k, False: 741k]
  ------------------
13577|   412k|        PORT_Assert(IS_DTLS(ss));
  ------------------
  |  |  120|   412k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|   412k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 412k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
13578|   412k|        ssl_ReleaseSpecReadLock(ss); /*****************************/
  ------------------
  |  | 1427|   412k|    {                                             \
  |  | 1428|   412k|        if (!ss->opt.noLocks)                     \
  |  |  ------------------
  |  |  |  Branch (1428:13): [True: 302k, False: 110k]
  |  |  ------------------
  |  | 1429|   412k|            NSSRWLock_UnlockRead((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   50|   302k|#define NSSRWLock_UnlockRead NSSRWLock_UnlockRead_Util
  |  |  ------------------
  |  | 1430|   412k|    }
  ------------------
13579|   412k|        return SECSuccess;
13580|   412k|    }
13581|   741k|    if (spec != ss->ssl3.crSpec) {
  ------------------
  |  Branch (13581:9): [True: 0, False: 741k]
  ------------------
13582|      0|        PORT_Assert(IS_DTLS(ss));
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
13583|      0|        SSL_TRC(3, ("%d: DTLS[%d]: Handling out-of-epoch record from epoch=%d",
  ------------------
  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    ssl_Trace b
  ------------------
13584|      0|                    SSL_GETPID(), ss->fd, spec->epoch));
13585|      0|        outOfOrderSpec = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
13586|      0|    }
13587|   741k|    isTLS = (PRBool)(spec->version > SSL_LIBRARY_VERSION_3_0);
  ------------------
  |  |   17|   741k|#define SSL_LIBRARY_VERSION_3_0                 0x0300
  ------------------
13588|   741k|    if (IS_DTLS(ss)) {
  ------------------
  |  |  892|   741k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 741k, False: 0]
  |  |  ------------------
  ------------------
13589|   741k|        if (dtls13_MaskSequenceNumber(ss, spec, cText->hdr,
  ------------------
  |  Branch (13589:13): [True: 16, False: 741k]
  ------------------
13590|   741k|                                      SSL_BUFFER_BASE(cText->buf), SSL_BUFFER_LEN(cText->buf)) != SECSuccess) {
  ------------------
  |  |   35|   741k|#define SSL_BUFFER_BASE(b) ((b)->buf)
  ------------------
                                                    SSL_BUFFER_BASE(cText->buf), SSL_BUFFER_LEN(cText->buf)) != SECSuccess) {
  ------------------
  |  |   36|   741k|#define SSL_BUFFER_LEN(b) ((b)->len)
  ------------------
13591|     16|            ssl_ReleaseSpecReadLock(ss); /*****************************/
  ------------------
  |  | 1427|     16|    {                                             \
  |  | 1428|     16|        if (!ss->opt.noLocks)                     \
  |  |  ------------------
  |  |  |  Branch (1428:13): [True: 8, False: 8]
  |  |  ------------------
  |  | 1429|     16|            NSSRWLock_UnlockRead((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   50|      8|#define NSSRWLock_UnlockRead NSSRWLock_UnlockRead_Util
  |  |  ------------------
  |  | 1430|     16|    }
  ------------------
13592|       |            /* code already set. */
13593|     16|            return SECFailure;
13594|     16|        }
13595|   741k|        if (!dtls_IsRelevant(ss, spec, cText, &cText->seqNum)) {
  ------------------
  |  Branch (13595:13): [True: 655k, False: 85.8k]
  ------------------
13596|   655k|            ssl_ReleaseSpecReadLock(ss); /*****************************/
  ------------------
  |  | 1427|   655k|    {                                             \
  |  | 1428|   655k|        if (!ss->opt.noLocks)                     \
  |  |  ------------------
  |  |  |  Branch (1428:13): [True: 220k, False: 434k]
  |  |  ------------------
  |  | 1429|   655k|            NSSRWLock_UnlockRead((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   50|   220k|#define NSSRWLock_UnlockRead NSSRWLock_UnlockRead_Util
  |  |  ------------------
  |  | 1430|   655k|    }
  ------------------
13597|   655k|            return SECSuccess;
13598|   655k|        }
13599|   741k|    } else {
13600|      0|        cText->seqNum = spec->nextSeqNum;
13601|      0|    }
13602|  85.8k|    if (cText->seqNum >= spec->cipherDef->max_records) {
  ------------------
  |  Branch (13602:9): [True: 44, False: 85.7k]
  ------------------
13603|     44|        ssl_ReleaseSpecReadLock(ss); /*****************************/
  ------------------
  |  | 1427|     44|    {                                             \
  |  | 1428|     44|        if (!ss->opt.noLocks)                     \
  |  |  ------------------
  |  |  |  Branch (1428:13): [True: 25, False: 19]
  |  |  ------------------
  |  | 1429|     44|            NSSRWLock_UnlockRead((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   50|     25|#define NSSRWLock_UnlockRead NSSRWLock_UnlockRead_Util
  |  |  ------------------
  |  | 1430|     44|    }
  ------------------
13604|     44|        SSL_TRC(3, ("%d: SSL[%d]: read sequence number at limit 0x%0llx",
  ------------------
  |  |   71|     44|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 44]
  |  |  ------------------
  |  |   72|     44|    ssl_Trace b
  ------------------
13605|     44|                    SSL_GETPID(), ss->fd, cText->seqNum));
13606|     44|        PORT_SetError(SSL_ERROR_TOO_MANY_RECORDS);
  ------------------
  |  |   65|     44|#define PORT_SetError PORT_SetError_Util
  ------------------
13607|     44|        return SECFailure;
13608|     44|    }
13609|       |
13610|  85.7k|    isTLS13 = (PRBool)(ss->version >= SSL_LIBRARY_VERSION_TLS_1_3);
  ------------------
  |  |   21|  85.7k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
13611|  85.7k|    recordSizeLimit = spec->recordSizeLimit;
13612|  85.7k|    cTextSizeLimit = recordSizeLimit;
13613|  85.7k|    cTextSizeLimit += (isTLS13) ? TLS_1_3_MAX_EXPANSION : TLS_1_2_MAX_EXPANSION;
  ------------------
  |  |   37|  12.8k|#define TLS_1_3_MAX_EXPANSION (255 + 1)
  ------------------
                  cTextSizeLimit += (isTLS13) ? TLS_1_3_MAX_EXPANSION : TLS_1_2_MAX_EXPANSION;
  ------------------
  |  |   36|   158k|#define TLS_1_2_MAX_EXPANSION 2048
  ------------------
  |  Branch (13613:23): [True: 12.8k, False: 72.9k]
  ------------------
13614|       |
13615|       |    /* Check if the specified recordSizeLimit and the RFC8446 specified max
13616|       |     * expansion are respected. recordSizeLimit is probably at the default for
13617|       |     * the first (hello) handshake message and then set to a smaller size by
13618|       |     * the Record Size Limit Extension.
13619|       |     * Stricter expansion size checks dependent on implemented cipher suites
13620|       |     * are performed in ssl3con.c/ssl3_UnprotectRecord() OR
13621|       |     * tls13con.c/tls13_UnprotextRecord().
13622|       |     * After Decryption the plaintext size is checked (l. 13424). This also
13623|       |     * applies to unencrypted records. */
13624|  85.7k|    if (cText->buf->len > cTextSizeLimit) {
  ------------------
  |  Branch (13624:9): [True: 344, False: 85.4k]
  ------------------
13625|    344|        ssl_ReleaseSpecReadLock(ss); /*****************************/
  ------------------
  |  | 1427|    344|    {                                             \
  |  | 1428|    344|        if (!ss->opt.noLocks)                     \
  |  |  ------------------
  |  |  |  Branch (1428:13): [True: 140, False: 204]
  |  |  ------------------
  |  | 1429|    344|            NSSRWLock_UnlockRead((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   50|    140|#define NSSRWLock_UnlockRead NSSRWLock_UnlockRead_Util
  |  |  ------------------
  |  | 1430|    344|    }
  ------------------
13626|       |        /* Drop DTLS Record Errors silently [RFC6347, Section 4.1.2.7] */
13627|    344|        if (IS_DTLS(ss)) {
  ------------------
  |  |  892|    344|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 344, False: 0]
  |  |  ------------------
  ------------------
13628|    344|            return SECSuccess;
13629|    344|        }
13630|      0|        SSL3_SendAlert(ss, alert_fatal, record_overflow);
13631|      0|        PORT_SetError(SSL_ERROR_RX_RECORD_TOO_LONG);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
13632|      0|        return SECFailure;
13633|    344|    }
13634|       |
13635|  85.4k|#ifdef DEBUG
13636|       |    /* In debug builds the gather buffers are freed after the handling of each
13637|       |     * record for advanced ASAN coverage. Allocate the buffer again to the
13638|       |     * maximum possibly needed size as on gather initialization in
13639|       |     * ssl3gthr.c/ssl3_InitGather(). */
13640|  85.4k|    PR_ASSERT(sslBuffer_Grow(plaintext, TLS_1_2_MAX_CTEXT_LENGTH) == SECSuccess);
  ------------------
  |  |  208|  85.4k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 85.4k, False: 0]
  |  |  ------------------
  ------------------
13641|  85.4k|#endif
13642|       |    /* This replaces a dynamic plaintext buffer size check, since the buffer is
13643|       |     * allocated to the maximum size in ssl3gthr.c/ssl3_InitGather(). The buffer
13644|       |     * was always grown to the maximum size at first record gathering before. */
13645|  85.4k|    PR_ASSERT(plaintext->space >= cTextSizeLimit);
  ------------------
  |  |  208|  85.4k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 85.4k, False: 0]
  |  |  ------------------
  ------------------
13646|       |
13647|       |    /* Most record types aside from protected TLS 1.3 records carry the content
13648|       |     * type in the first octet. TLS 1.3 will override this value later. */
13649|  85.4k|    rType = cText->hdr[0];
13650|       |    /* Encrypted application data records could arrive before the handshake
13651|       |     * completes in DTLS 1.3. These can look like valid TLS 1.2 application_data
13652|       |     * records in epoch 0, which is never valid. Pretend they didn't decrypt. */
13653|  85.4k|    if (spec->epoch == 0 && ((IS_DTLS(ss) &&
  ------------------
  |  |  892|  53.7k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 26.8k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (13653:9): [True: 26.8k, False: 58.5k]
  ------------------
13654|  26.8k|                              dtls_IsDtls13Ciphertext(0, rType)) ||
  ------------------
  |  Branch (13654:31): [True: 419, False: 26.4k]
  ------------------
13655|  26.8k|                             rType == ssl_ct_application_data)) {
  ------------------
  |  Branch (13655:30): [True: 553, False: 25.9k]
  ------------------
13656|    972|        PORT_SetError(SSL_ERROR_RX_UNEXPECTED_APPLICATION_DATA);
  ------------------
  |  |   65|    972|#define PORT_SetError PORT_SetError_Util
  ------------------
13657|    972|        alert = unexpected_message;
13658|    972|        rv = SECFailure;
13659|  84.4k|    } else {
13660|       |#ifdef UNSAFE_FUZZER_MODE
13661|       |        rv = Null_Cipher(NULL, plaintext->buf, &plaintext->len,
13662|       |                         plaintext->space, cText->buf->buf, cText->buf->len);
13663|       |#else
13664|       |        /* IMPORTANT:
13665|       |         * Unprotect functions MUST NOT send alerts
13666|       |         * because we still hold the spec read lock. Instead, if they
13667|       |         * return SECFailure, they set *alert to the alert to be sent.
13668|       |         * Additionaly, this is used to silently drop DTLS encryption/record
13669|       |         * errors/alerts using the error handling below as suggested in the
13670|       |         * DTLS specification [RFC6347, Section 4.1.2.7]. */
13671|  84.4k|        if (spec->cipherDef->cipher == cipher_null && cText->buf->len == 0) {
  ------------------
  |  Branch (13671:13): [True: 62.9k, False: 21.4k]
  |  Branch (13671:55): [True: 2.91k, False: 60.0k]
  ------------------
13672|       |            /* Handle a zero-length unprotected record
13673|       |             * In this case, we treat it as a no-op and let later functions decide
13674|       |             * whether to ignore or alert accordingly. */
13675|  2.91k|            PR_ASSERT(plaintext->len == 0);
  ------------------
  |  |  208|  2.91k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 2.91k, False: 0]
  |  |  ------------------
  ------------------
13676|  2.91k|            rv = SECSuccess;
13677|  81.5k|        } else if (spec->version < SSL_LIBRARY_VERSION_TLS_1_3 || spec->epoch == 0) {
  ------------------
  |  |   21|   163k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (13677:20): [True: 70.4k, False: 11.0k]
  |  Branch (13677:67): [True: 0, False: 11.0k]
  ------------------
13678|  70.4k|            rv = ssl3_UnprotectRecord(ss, spec, cText, plaintext, &alert);
13679|  70.4k|        } else {
13680|  11.0k|            rv = tls13_UnprotectRecord(ss, spec, cText, plaintext, &rType,
13681|  11.0k|                                       &alert);
13682|  11.0k|        }
13683|  84.4k|#endif
13684|  84.4k|    }
13685|       |
13686|       |    /* Error/Alert handling for ssl3/tls13_UnprotectRecord */
13687|  85.4k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (13687:9): [True: 59.5k, False: 25.8k]
  ------------------
13688|  59.5k|        ssl_ReleaseSpecReadLock(ss); /***************************/
  ------------------
  |  | 1427|  59.5k|    {                                             \
  |  | 1428|  59.5k|        if (!ss->opt.noLocks)                     \
  |  |  ------------------
  |  |  |  Branch (1428:13): [True: 30.1k, False: 29.3k]
  |  |  ------------------
  |  | 1429|  59.5k|            NSSRWLock_UnlockRead((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   50|  30.1k|#define NSSRWLock_UnlockRead NSSRWLock_UnlockRead_Util
  |  |  ------------------
  |  | 1430|  59.5k|    }
  ------------------
13689|       |
13690|  59.5k|        SSL_DBG(("%d: SSL3[%d]: decryption failed", SSL_GETPID(), ss->fd));
  ------------------
  |  |   87|  59.5k|    if (ssl_debug) \
  |  |  ------------------
  |  |  |  Branch (87:9): [True: 0, False: 59.5k]
  |  |  ------------------
  |  |   88|  59.5k|    ssl_Trace b
  ------------------
13691|       |
13692|       |        /* Ensure that we don't process this data again. */
13693|  59.5k|        plaintext->len = 0;
13694|       |
13695|       |        /* Ignore a CCS if compatibility mode is negotiated.  Note that this
13696|       |         * will fail if the server fails to negotiate compatibility mode in a
13697|       |         * 0-RTT session that is resumed from a session that did negotiate it.
13698|       |         * We don't care about that corner case right now. */
13699|  59.5k|        if (ss->version >= SSL_LIBRARY_VERSION_TLS_1_3 &&
  ------------------
  |  |   21|   119k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (13699:13): [True: 11.0k, False: 48.4k]
  ------------------
13700|  59.5k|            cText->hdr[0] == ssl_ct_change_cipher_spec &&
  ------------------
  |  Branch (13700:13): [True: 0, False: 11.0k]
  ------------------
13701|  59.5k|            ss->ssl3.hs.ws != idle_handshake &&
  ------------------
  |  Branch (13701:13): [True: 0, False: 0]
  ------------------
13702|  59.5k|            cText->buf->len == 1 &&
  ------------------
  |  Branch (13702:13): [True: 0, False: 0]
  ------------------
13703|  59.5k|            cText->buf->buf[0] == change_cipher_spec_choice) {
  ------------------
  |  Branch (13703:13): [True: 0, False: 0]
  ------------------
13704|      0|            if (!ss->ssl3.hs.rejectCcs) {
  ------------------
  |  Branch (13704:17): [True: 0, False: 0]
  ------------------
13705|       |                /* Allow only the first CCS. */
13706|      0|                ss->ssl3.hs.rejectCcs = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
13707|      0|                return SECSuccess;
13708|      0|            } else {
13709|      0|                alert = unexpected_message;
13710|      0|                PORT_SetError(SSL_ERROR_RX_MALFORMED_CHANGE_CIPHER);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
13711|      0|            }
13712|      0|        }
13713|       |
13714|       |        /* All errors/alerts that might occur during unprotection are related
13715|       |         * to invalid records (e.g. invalid formatting, length, MAC, ...).
13716|       |         * Following the DTLS specification such errors/alerts SHOULD be
13717|       |         * dropped silently [RFC9147, Section 4.5.2].
13718|       |         * This is done below. */
13719|       |
13720|  59.5k|        if ((IS_DTLS(ss) && !dtls13_AeadLimitReached(spec)) ||
  ------------------
  |  |  892|   119k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 59.5k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (13720:29): [True: 59.5k, False: 0]
  ------------------
13721|  59.5k|            (!IS_DTLS(ss) && ss->sec.isServer &&
  ------------------
  |  |  892|      0|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  ------------------
  |  Branch (13721:14): [True: 0, False: 0]
  |  Branch (13721:30): [True: 0, False: 0]
  ------------------
13722|  59.5k|             ss->ssl3.hs.zeroRttIgnore == ssl_0rtt_ignore_trial)) {
  ------------------
  |  Branch (13722:14): [True: 0, False: 0]
  ------------------
13723|       |            /* Silently drop the packet unless we set ss->ssl3.fatalAlertSent.
13724|       |             * (Manually or by using functions like
13725|       |             * SSL3_SendAlert(.., alert_fatal,..))
13726|       |             * This is not currently used in the unprotection functions since
13727|       |             * all TLS and DTLS errors are propagated to this handler. */
13728|  59.5k|            if (ss->ssl3.fatalAlertSent) {
  ------------------
  |  Branch (13728:17): [True: 0, False: 59.5k]
  ------------------
13729|      0|                return SECFailure;
13730|      0|            }
13731|  59.5k|            return SECSuccess;
13732|  59.5k|        }
13733|       |
13734|      0|        int errCode = PORT_GetError();
  ------------------
  |  |   62|      0|#define PORT_GetError PORT_GetError_Util
  ------------------
13735|      0|        SSL3_SendAlert(ss, alert_fatal, alert);
13736|       |        /* Reset the error code in case SSL3_SendAlert called
13737|       |         * PORT_SetError(). */
13738|      0|        PORT_SetError(errCode);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
13739|      0|        return SECFailure;
13740|  59.5k|    }
13741|       |
13742|       |    /* SECSuccess */
13743|  25.8k|    if (IS_DTLS(ss)) {
  ------------------
  |  |  892|  25.8k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 25.8k, False: 0]
  |  |  ------------------
  ------------------
13744|  25.8k|        dtls_RecordSetRecvd(&spec->recvdRecords, cText->seqNum);
13745|  25.8k|        spec->nextSeqNum = PR_MAX(spec->nextSeqNum, cText->seqNum + 1);
  ------------------
  |  |  159|  25.8k|#define PR_MAX(x,y)     ((x)>(y)?(x):(y))
  |  |  ------------------
  |  |  |  Branch (159:26): [True: 3.13k, False: 22.7k]
  |  |  ------------------
  ------------------
13746|  25.8k|    } else {
13747|      0|        ++spec->nextSeqNum;
13748|      0|    }
13749|  25.8k|    epoch = spec->epoch;
13750|       |
13751|  25.8k|    ssl_ReleaseSpecReadLock(ss); /*****************************************/
  ------------------
  |  | 1427|  25.8k|    {                                             \
  |  | 1428|  25.8k|        if (!ss->opt.noLocks)                     \
  |  |  ------------------
  |  |  |  Branch (1428:13): [True: 12.9k, False: 12.8k]
  |  |  ------------------
  |  | 1429|  25.8k|            NSSRWLock_UnlockRead((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   50|  12.9k|#define NSSRWLock_UnlockRead NSSRWLock_UnlockRead_Util
  |  |  ------------------
  |  | 1430|  25.8k|    }
  ------------------
13752|       |
13753|       |    /*
13754|       |     * The decrypted data is now in plaintext.
13755|       |     */
13756|       |
13757|       |    /* IMPORTANT: We are in DTLS 1.3 mode and we have processed something
13758|       |     * from the wrong epoch. Divert to a divert processing function to make
13759|       |     * sure we don't accidentally use the data unsafely. */
13760|       |
13761|       |    /* We temporary allowed reading the records from the previous epoch n-1
13762|       |    until the moment we get a message from the new epoch n. */
13763|       |
13764|  25.8k|    if (outOfOrderSpec) {
  ------------------
  |  Branch (13764:9): [True: 0, False: 25.8k]
  ------------------
13765|      0|        PORT_Assert(IS_DTLS(ss) && ss->version >= SSL_LIBRARY_VERSION_TLS_1_3);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
13766|      0|        ssl_GetSSL3HandshakeLock(ss);
  ------------------
  |  | 1407|      0|    {                                                 \
  |  | 1408|      0|        if (!ss->opt.noLocks) {                       \
  |  |  ------------------
  |  |  |  Branch (1408:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1409|      0|            PORT_Assert(!ssl_HaveXmitBufLock(ss));    \
  |  |  ------------------
  |  |  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1410|      0|            PZ_EnterMonitor((ss)->ssl3HandshakeLock); \
  |  |  ------------------
  |  |  |  |  256|      0|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1411|      0|        }                                             \
  |  | 1412|      0|    }
  ------------------
13767|      0|        if (ss->ssl3.hs.allowPreviousEpoch && spec->epoch == ss->ssl3.crSpec->epoch - 1) {
  ------------------
  |  Branch (13767:13): [True: 0, False: 0]
  |  Branch (13767:47): [True: 0, False: 0]
  ------------------
13768|      0|            SSL_TRC(30, ("%d: DTLS13[%d]: Out of order message %d is accepted",
  ------------------
  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    ssl_Trace b
  ------------------
13769|      0|                         SSL_GETPID(), ss->fd, spec->epoch));
13770|      0|            ssl_ReleaseSSL3HandshakeLock(ss);
  ------------------
  |  | 1414|      0|    {                                                \
  |  | 1415|      0|        if (!ss->opt.noLocks)                        \
  |  |  ------------------
  |  |  |  Branch (1415:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1416|      0|            PZ_ExitMonitor((ss)->ssl3HandshakeLock); \
  |  |  ------------------
  |  |  |  |  257|      0|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1417|      0|    }
  ------------------
13771|      0|        } else {
13772|      0|            ssl_ReleaseSSL3HandshakeLock(ss);
  ------------------
  |  | 1414|      0|    {                                                \
  |  | 1415|      0|        if (!ss->opt.noLocks)                        \
  |  |  ------------------
  |  |  |  Branch (1415:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1416|      0|            PZ_ExitMonitor((ss)->ssl3HandshakeLock); \
  |  |  ------------------
  |  |  |  |  257|      0|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1417|      0|    }
  ------------------
13773|      0|            return dtls13_HandleOutOfEpochRecord(ss, spec, rType, plaintext);
13774|      0|        }
13775|  25.8k|    } else {
13776|  25.8k|        ssl_GetSSL3HandshakeLock(ss);
  ------------------
  |  | 1407|  25.8k|    {                                                 \
  |  | 1408|  25.8k|        if (!ss->opt.noLocks) {                       \
  |  |  ------------------
  |  |  |  Branch (1408:13): [True: 12.9k, False: 12.8k]
  |  |  ------------------
  |  | 1409|  12.9k|            PORT_Assert(!ssl_HaveXmitBufLock(ss));    \
  |  |  ------------------
  |  |  |  |  120|  12.9k|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|  12.9k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 12.9k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1410|  12.9k|            PZ_EnterMonitor((ss)->ssl3HandshakeLock); \
  |  |  ------------------
  |  |  |  |  256|  12.9k|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1411|  12.9k|        }                                             \
  |  | 1412|  25.8k|    }
  ------------------
13777|       |        /* Forbid (application) messages from the previous epoch.
13778|       |           From now, messages that arrive out of order will be discarded. */
13779|  25.8k|        ss->ssl3.hs.allowPreviousEpoch = PR_FALSE;
  ------------------
  |  |  438|  25.8k|#define PR_FALSE 0
  ------------------
13780|  25.8k|        ssl_ReleaseSSL3HandshakeLock(ss);
  ------------------
  |  | 1414|  25.8k|    {                                                \
  |  | 1415|  25.8k|        if (!ss->opt.noLocks)                        \
  |  |  ------------------
  |  |  |  Branch (1415:13): [True: 12.9k, False: 12.8k]
  |  |  ------------------
  |  | 1416|  25.8k|            PZ_ExitMonitor((ss)->ssl3HandshakeLock); \
  |  |  ------------------
  |  |  |  |  257|  12.9k|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1417|  25.8k|    }
  ------------------
13781|  25.8k|    }
13782|       |
13783|       |    /* Check the length of the plaintext. */
13784|  25.8k|    if (isTLS && plaintext->len > recordSizeLimit) {
  ------------------
  |  Branch (13784:9): [True: 25.8k, False: 0]
  |  Branch (13784:18): [True: 13, False: 25.8k]
  ------------------
13785|     13|        plaintext->len = 0;
13786|       |        /* Drop DTLS Record Errors silently [RFC6347, Section 4.1.2.7] */
13787|     13|        if (IS_DTLS(ss)) {
  ------------------
  |  |  892|     13|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 13, False: 0]
  |  |  ------------------
  ------------------
13788|     13|            return SECSuccess;
13789|     13|        }
13790|      0|        SSL3_SendAlert(ss, alert_fatal, record_overflow);
13791|      0|        PORT_SetError(SSL_ERROR_RX_RECORD_TOO_LONG);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
13792|      0|        return SECFailure;
13793|     13|    }
13794|       |
13795|       |    /* Application data records are processed by the caller of this
13796|       |    ** function, not by this function.
13797|       |    */
13798|  25.8k|    if (rType == ssl_ct_application_data) {
  ------------------
  |  Branch (13798:9): [True: 11, False: 25.8k]
  ------------------
13799|     11|        if (ss->firstHsDone)
  ------------------
  |  Branch (13799:13): [True: 0, False: 11]
  ------------------
13800|      0|            return SECSuccess;
13801|     11|        if (ss->version >= SSL_LIBRARY_VERSION_TLS_1_3 &&
  ------------------
  |  |   21|     22|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (13801:13): [True: 0, False: 11]
  ------------------
13802|     11|            ss->sec.isServer &&
  ------------------
  |  Branch (13802:13): [True: 0, False: 0]
  ------------------
13803|     11|            ss->ssl3.hs.zeroRttState == ssl_0rtt_accepted) {
  ------------------
  |  Branch (13803:13): [True: 0, False: 0]
  ------------------
13804|      0|            return tls13_HandleEarlyApplicationData(ss, plaintext);
13805|      0|        }
13806|     11|        plaintext->len = 0;
13807|     11|        (void)SSL3_SendAlert(ss, alert_fatal, unexpected_message);
13808|     11|        PORT_SetError(SSL_ERROR_RX_UNEXPECTED_APPLICATION_DATA);
  ------------------
  |  |   65|     11|#define PORT_SetError PORT_SetError_Util
  ------------------
13809|     11|        return SECFailure;
13810|     11|    }
13811|       |
13812|  25.8k|    rv = ssl3_HandleNonApplicationData(ss, rType, epoch, cText->seqNum,
13813|  25.8k|                                       plaintext);
13814|       |
13815|  25.8k|#ifdef DEBUG
13816|       |    /* In Debug builds free and zero gather plaintext buffer after its content
13817|       |     * has been used/copied for advanced ASAN coverage/utilization.
13818|       |     * This frees buffer for non application data records, for application data
13819|       |     * records it is freed in sslsecur.c/DoRecv(). */
13820|  25.8k|    sslBuffer_Clear(&ss->gs.buf);
13821|  25.8k|#endif
13822|       |
13823|  25.8k|    return rv;
13824|  25.8k|}
ssl_InitSecState:
13832|  9.36k|{
13833|  9.36k|    sec->authType = ssl_auth_null;
13834|  9.36k|    sec->authKeyBits = 0;
13835|  9.36k|    sec->signatureScheme = ssl_sig_none;
13836|  9.36k|    sec->keaType = ssl_kea_null;
13837|  9.36k|    sec->keaKeyBits = 0;
13838|  9.36k|    sec->keaGroup = NULL;
13839|  9.36k|}
ssl3_InitState:
13843|  9.36k|{
13844|  9.36k|    SECStatus rv;
13845|       |
13846|  9.36k|    ss->ssl3.policy = SSL_ALLOWED;
  ------------------
  |  |  700|  9.36k|#define SSL_ALLOWED 1
  ------------------
13847|       |
13848|  9.36k|    ssl_InitSecState(&ss->sec);
13849|       |
13850|  9.36k|    ssl_GetSpecWriteLock(ss);
  ------------------
  |  | 1435|  9.36k|    {                                            \
  |  | 1436|  9.36k|        if (!ss->opt.noLocks)                    \
  |  |  ------------------
  |  |  |  Branch (1436:13): [True: 9.36k, False: 0]
  |  |  ------------------
  |  | 1437|  9.36k|            NSSRWLock_LockWrite((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   48|  9.36k|#define NSSRWLock_LockWrite NSSRWLock_LockWrite_Util
  |  |  ------------------
  |  | 1438|  9.36k|    }
  ------------------
13851|  9.36k|    PR_INIT_CLIST(&ss->ssl3.hs.cipherSpecs);
  ------------------
  |  |  100|  9.36k|    PR_BEGIN_MACRO     \
  |  |  ------------------
  |  |  |  |  123|  9.36k|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |  101|  9.36k|    (_l)->next = (_l); \
  |  |  102|  9.36k|    (_l)->prev = (_l); \
  |  |  103|  9.36k|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|  9.36k|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
13852|  9.36k|    rv = ssl_SetupNullCipherSpec(ss, ssl_secret_read);
13853|  9.36k|    rv |= ssl_SetupNullCipherSpec(ss, ssl_secret_write);
13854|  9.36k|    ss->ssl3.pwSpec = ss->ssl3.prSpec = NULL;
13855|  9.36k|    ssl_ReleaseSpecWriteLock(ss);
  ------------------
  |  | 1440|  9.36k|    {                                              \
  |  | 1441|  9.36k|        if (!ss->opt.noLocks)                      \
  |  |  ------------------
  |  |  |  Branch (1441:13): [True: 9.36k, False: 0]
  |  |  ------------------
  |  | 1442|  9.36k|            NSSRWLock_UnlockWrite((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   51|  9.36k|#define NSSRWLock_UnlockWrite NSSRWLock_UnlockWrite_Util
  |  |  ------------------
  |  | 1443|  9.36k|    }
  ------------------
13856|  9.36k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (13856:9): [True: 0, False: 9.36k]
  ------------------
13857|       |        /* Rely on ssl_CreateNullCipherSpec() to set error code. */
13858|      0|        return SECFailure;
13859|      0|    }
13860|       |
13861|  9.36k|    ss->ssl3.hs.sendingSCSV = PR_FALSE;
  ------------------
  |  |  438|  9.36k|#define PR_FALSE 0
  ------------------
13862|  9.36k|    ss->ssl3.hs.preliminaryInfo = 0;
13863|  9.36k|    ss->ssl3.hs.ws = (ss->sec.isServer) ? wait_client_hello : idle_handshake;
  ------------------
  |  Branch (13863:22): [True: 0, False: 9.36k]
  ------------------
13864|       |
13865|  9.36k|    ssl3_ResetExtensionData(&ss->xtnData, ss);
13866|  9.36k|    PR_INIT_CLIST(&ss->ssl3.hs.remoteExtensions);
  ------------------
  |  |  100|  9.36k|    PR_BEGIN_MACRO     \
  |  |  ------------------
  |  |  |  |  123|  9.36k|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |  101|  9.36k|    (_l)->next = (_l); \
  |  |  102|  9.36k|    (_l)->prev = (_l); \
  |  |  103|  9.36k|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|  9.36k|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
13867|  9.36k|    PR_INIT_CLIST(&ss->ssl3.hs.echOuterExtensions);
  ------------------
  |  |  100|  9.36k|    PR_BEGIN_MACRO     \
  |  |  ------------------
  |  |  |  |  123|  9.36k|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |  101|  9.36k|    (_l)->next = (_l); \
  |  |  102|  9.36k|    (_l)->prev = (_l); \
  |  |  103|  9.36k|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|  9.36k|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
13868|  9.36k|    if (IS_DTLS(ss)) {
  ------------------
  |  |  892|  9.36k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 9.36k, False: 0]
  |  |  ------------------
  ------------------
13869|  9.36k|        ss->ssl3.hs.sendMessageSeq = 0;
13870|  9.36k|        ss->ssl3.hs.recvMessageSeq = 0;
13871|  9.36k|        ss->ssl3.hs.rtTimer->timeout = DTLS_RETRANSMIT_INITIAL_MS;
  ------------------
  |  |  126|  9.36k|#define DTLS_RETRANSMIT_INITIAL_MS 50
  ------------------
13872|  9.36k|        ss->ssl3.hs.rtRetries = 0;
13873|  9.36k|        ss->ssl3.hs.recvdHighWater = -1;
13874|  9.36k|        PR_INIT_CLIST(&ss->ssl3.hs.lastMessageFlight);
  ------------------
  |  |  100|  9.36k|    PR_BEGIN_MACRO     \
  |  |  ------------------
  |  |  |  |  123|  9.36k|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |  101|  9.36k|    (_l)->next = (_l); \
  |  |  102|  9.36k|    (_l)->prev = (_l); \
  |  |  103|  9.36k|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|  9.36k|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
13875|  9.36k|        dtls_SetMTU(ss, 0); /* Set the MTU to the highest plateau */
13876|  9.36k|    }
13877|       |
13878|  9.36k|    ss->ssl3.hs.currentSecret = NULL;
13879|  9.36k|    ss->ssl3.hs.resumptionMasterSecret = NULL;
13880|  9.36k|    ss->ssl3.hs.dheSecret = NULL;
13881|  9.36k|    ss->ssl3.hs.clientEarlyTrafficSecret = NULL;
13882|  9.36k|    ss->ssl3.hs.clientHsTrafficSecret = NULL;
13883|  9.36k|    ss->ssl3.hs.serverHsTrafficSecret = NULL;
13884|  9.36k|    ss->ssl3.hs.clientTrafficSecret = NULL;
13885|  9.36k|    ss->ssl3.hs.serverTrafficSecret = NULL;
13886|  9.36k|    ss->ssl3.hs.echHpkeCtx = NULL;
13887|  9.36k|    ss->ssl3.hs.greaseEchSize = 100;
13888|  9.36k|    ss->ssl3.hs.echAccepted = PR_FALSE;
  ------------------
  |  |  438|  9.36k|#define PR_FALSE 0
  ------------------
13889|  9.36k|    ss->ssl3.hs.echDecided = PR_FALSE;
  ------------------
  |  |  438|  9.36k|#define PR_FALSE 0
  ------------------
13890|       |
13891|  9.36k|    ss->ssl3.hs.clientAuthSignatureSchemes = NULL;
13892|  9.36k|    ss->ssl3.hs.clientAuthSignatureSchemesLen = 0;
13893|       |
13894|  9.36k|    PORT_Assert(!ss->ssl3.hs.messages.buf && !ss->ssl3.hs.messages.space);
  ------------------
  |  |  120|  9.36k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  18.7k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 9.36k, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 9.36k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
13895|  9.36k|    ss->ssl3.hs.messages.buf = NULL;
13896|  9.36k|    ss->ssl3.hs.messages.space = 0;
13897|       |
13898|  9.36k|    ss->ssl3.hs.receivedNewSessionTicket = PR_FALSE;
  ------------------
  |  |  438|  9.36k|#define PR_FALSE 0
  ------------------
13899|  9.36k|    PORT_Memset(&ss->ssl3.hs.newSessionTicket, 0,
  ------------------
  |  |  182|  9.36k|#define PORT_Memset memset
  ------------------
13900|  9.36k|                sizeof(ss->ssl3.hs.newSessionTicket));
13901|       |
13902|  9.36k|    ss->ssl3.hs.zeroRttState = ssl_0rtt_none;
13903|  9.36k|    return SECSuccess;
13904|  9.36k|}
ssl3_CipherPrefSet:
13976|   741k|{
13977|   741k|    ssl3CipherSuiteCfg *suite;
13978|       |
13979|   741k|    suite = ssl_LookupCipherSuiteCfgMutable(which, ss->cipherSuites);
13980|   741k|    if (suite == NULL) {
  ------------------
  |  Branch (13980:9): [True: 0, False: 741k]
  ------------------
13981|      0|        return SECFailure; /* err code was set by ssl_LookupCipherSuiteCfg */
13982|      0|    }
13983|   741k|    suite->enabled = enabled;
13984|   741k|    return SECSuccess;
13985|   741k|}
ssl3_CipherPrefGet:
13989|  13.1k|{
13990|  13.1k|    const ssl3CipherSuiteCfg *suite;
13991|  13.1k|    PRBool pref;
13992|  13.1k|    SECStatus rv;
13993|       |
13994|  13.1k|    suite = ssl_LookupCipherSuiteCfg(which, ss->cipherSuites);
13995|  13.1k|    if (suite) {
  ------------------
  |  Branch (13995:9): [True: 13.1k, False: 0]
  ------------------
13996|  13.1k|        pref = suite->enabled;
13997|  13.1k|        rv = SECSuccess;
13998|  13.1k|    } else {
13999|      0|        pref = SSL_NOT_ALLOWED;
  ------------------
  |  |  699|      0|#define SSL_NOT_ALLOWED 0 /* or invalid or unimplemented */
  ------------------
14000|      0|        rv = SECFailure; /* err code was set by Lookup. */
14001|      0|    }
14002|  13.1k|    *enabled = pref;
14003|  13.1k|    return rv;
14004|  13.1k|}
ssl3_InitSocketPolicy:
14134|  9.36k|{
14135|  9.36k|    PORT_Memcpy(ss->cipherSuites, cipherSuites, sizeof(cipherSuites));
  ------------------
  |  |  180|  9.36k|#define PORT_Memcpy memcpy
  ------------------
14136|  9.36k|    PORT_Memcpy(ss->ssl3.signatureSchemes, defaultSignatureSchemes,
  ------------------
  |  |  180|  9.36k|#define PORT_Memcpy memcpy
  ------------------
14137|  9.36k|                sizeof(defaultSignatureSchemes));
14138|  9.36k|    ss->ssl3.signatureSchemeCount = PR_ARRAY_SIZE(defaultSignatureSchemes);
  ------------------
  |  |  167|  9.36k|#define PR_ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
  ------------------
14139|  9.36k|}
ssl3_DestroySSL3Info:
14198|  9.36k|{
14199|       |
14200|  9.36k|    if (ss->ssl3.clientCertificate != NULL)
  ------------------
  |  Branch (14200:9): [True: 0, False: 9.36k]
  ------------------
14201|      0|        CERT_DestroyCertificate(ss->ssl3.clientCertificate);
14202|       |
14203|  9.36k|    if (ss->ssl3.clientPrivateKey != NULL)
  ------------------
  |  Branch (14203:9): [True: 0, False: 9.36k]
  ------------------
14204|      0|        SECKEY_DestroyPrivateKey(ss->ssl3.clientPrivateKey);
14205|       |
14206|  9.36k|    if (ss->ssl3.hs.clientAuthSignatureSchemes != NULL) {
  ------------------
  |  Branch (14206:9): [True: 0, False: 9.36k]
  ------------------
14207|      0|        PORT_Free(ss->ssl3.hs.clientAuthSignatureSchemes);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
14208|      0|        ss->ssl3.hs.clientAuthSignatureSchemes = NULL;
14209|      0|        ss->ssl3.hs.clientAuthSignatureSchemesLen = 0;
14210|      0|    }
14211|       |
14212|  9.36k|    if (ss->ssl3.peerCertArena != NULL)
  ------------------
  |  Branch (14212:9): [True: 5.32k, False: 4.03k]
  ------------------
14213|  5.32k|        ssl3_CleanupPeerCerts(ss);
14214|       |
14215|  9.36k|    if (ss->ssl3.clientCertChain != NULL) {
  ------------------
  |  Branch (14215:9): [True: 0, False: 9.36k]
  ------------------
14216|      0|        CERT_DestroyCertificateList(ss->ssl3.clientCertChain);
14217|      0|        ss->ssl3.clientCertChain = NULL;
14218|      0|    }
14219|  9.36k|    if (ss->ssl3.ca_list) {
  ------------------
  |  Branch (14219:9): [True: 0, False: 9.36k]
  ------------------
14220|      0|        CERT_FreeDistNames(ss->ssl3.ca_list);
14221|      0|    }
14222|       |
14223|       |    /* clean up handshake */
14224|  9.36k|    if (ss->ssl3.hs.md5) {
  ------------------
  |  Branch (14224:9): [True: 228, False: 9.13k]
  ------------------
14225|    228|        PK11_DestroyContext(ss->ssl3.hs.md5, PR_TRUE);
  ------------------
  |  |  437|    228|#define PR_TRUE 1
  ------------------
14226|    228|    }
14227|  9.36k|    if (ss->ssl3.hs.sha) {
  ------------------
  |  Branch (14227:9): [True: 1.81k, False: 7.55k]
  ------------------
14228|  1.81k|        PK11_DestroyContext(ss->ssl3.hs.sha, PR_TRUE);
  ------------------
  |  |  437|  1.81k|#define PR_TRUE 1
  ------------------
14229|  1.81k|    }
14230|  9.36k|    if (ss->ssl3.hs.shaEchInner) {
  ------------------
  |  Branch (14230:9): [True: 0, False: 9.36k]
  ------------------
14231|      0|        PK11_DestroyContext(ss->ssl3.hs.shaEchInner, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
14232|      0|    }
14233|  9.36k|    if (ss->ssl3.hs.shaPostHandshake) {
  ------------------
  |  Branch (14233:9): [True: 0, False: 9.36k]
  ------------------
14234|      0|        PK11_DestroyContext(ss->ssl3.hs.shaPostHandshake, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
14235|      0|    }
14236|  9.36k|    if (ss->ssl3.hs.messages.buf) {
  ------------------
  |  Branch (14236:9): [True: 6.02k, False: 3.33k]
  ------------------
14237|  6.02k|        sslBuffer_Clear(&ss->ssl3.hs.messages);
14238|  6.02k|    }
14239|  9.36k|    if (ss->ssl3.hs.echInnerMessages.buf) {
  ------------------
  |  Branch (14239:9): [True: 0, False: 9.36k]
  ------------------
14240|      0|        sslBuffer_Clear(&ss->ssl3.hs.echInnerMessages);
14241|      0|    }
14242|  9.36k|    if (ss->ssl3.hs.dtls13ClientMessageBuffer.buf) {
  ------------------
  |  Branch (14242:9): [True: 1.79k, False: 7.56k]
  ------------------
14243|  1.79k|        sslBuffer_Clear(&ss->ssl3.hs.dtls13ClientMessageBuffer);
14244|  1.79k|    }
14245|       |
14246|       |    /* free the SSL3Buffer (msg_body) */
14247|  9.36k|    PORT_Free(ss->ssl3.hs.msg_body.buf);
  ------------------
  |  |   60|  9.36k|#define PORT_Free PORT_Free_Util
  ------------------
14248|       |
14249|  9.36k|    SECITEM_FreeItem(&ss->ssl3.hs.newSessionTicket.ticket, PR_FALSE);
  ------------------
  |  |  108|  9.36k|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                  SECITEM_FreeItem(&ss->ssl3.hs.newSessionTicket.ticket, PR_FALSE);
  ------------------
  |  |  438|  9.36k|#define PR_FALSE 0
  ------------------
14250|  9.36k|    SECITEM_FreeItem(&ss->ssl3.hs.srvVirtName, PR_FALSE);
  ------------------
  |  |  108|  9.36k|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                  SECITEM_FreeItem(&ss->ssl3.hs.srvVirtName, PR_FALSE);
  ------------------
  |  |  438|  9.36k|#define PR_FALSE 0
  ------------------
14251|  9.36k|    SECITEM_FreeItem(&ss->ssl3.hs.fakeSid, PR_FALSE);
  ------------------
  |  |  108|  9.36k|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                  SECITEM_FreeItem(&ss->ssl3.hs.fakeSid, PR_FALSE);
  ------------------
  |  |  438|  9.36k|#define PR_FALSE 0
  ------------------
14252|       |
14253|       |    /* Destroy the DTLS data */
14254|  9.36k|    if (IS_DTLS(ss)) {
  ------------------
  |  |  892|  9.36k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 9.36k, False: 0]
  |  |  ------------------
  ------------------
14255|  9.36k|        dtls_FreeHandshakeMessages(&ss->ssl3.hs.lastMessageFlight);
14256|  9.36k|        if (ss->ssl3.hs.recvdFragments.buf) {
  ------------------
  |  Branch (14256:13): [True: 1.03k, False: 8.32k]
  ------------------
14257|  1.03k|            PORT_Free(ss->ssl3.hs.recvdFragments.buf);
  ------------------
  |  |   60|  1.03k|#define PORT_Free PORT_Free_Util
  ------------------
14258|  1.03k|        }
14259|  9.36k|    }
14260|       |
14261|       |    /* Destroy remote extensions */
14262|  9.36k|    ssl3_DestroyRemoteExtensions(&ss->ssl3.hs.remoteExtensions);
14263|  9.36k|    ssl3_DestroyRemoteExtensions(&ss->ssl3.hs.echOuterExtensions);
14264|  9.36k|    ssl3_DestroyExtensionData(&ss->xtnData);
14265|       |
14266|       |    /* Destroy cipher specs */
14267|  9.36k|    ssl_DestroyCipherSpecs(&ss->ssl3.hs.cipherSpecs);
14268|       |
14269|       |    /* Destroy TLS 1.3 keys */
14270|  9.36k|    if (ss->ssl3.hs.currentSecret)
  ------------------
  |  Branch (14270:9): [True: 4.67k, False: 4.69k]
  ------------------
14271|  4.67k|        PK11_FreeSymKey(ss->ssl3.hs.currentSecret);
14272|  9.36k|    if (ss->ssl3.hs.resumptionMasterSecret)
  ------------------
  |  Branch (14272:9): [True: 0, False: 9.36k]
  ------------------
14273|      0|        PK11_FreeSymKey(ss->ssl3.hs.resumptionMasterSecret);
14274|  9.36k|    if (ss->ssl3.hs.dheSecret)
  ------------------
  |  Branch (14274:9): [True: 0, False: 9.36k]
  ------------------
14275|      0|        PK11_FreeSymKey(ss->ssl3.hs.dheSecret);
14276|  9.36k|    if (ss->ssl3.hs.clientEarlyTrafficSecret)
  ------------------
  |  Branch (14276:9): [True: 0, False: 9.36k]
  ------------------
14277|      0|        PK11_FreeSymKey(ss->ssl3.hs.clientEarlyTrafficSecret);
14278|  9.36k|    if (ss->ssl3.hs.clientHsTrafficSecret)
  ------------------
  |  Branch (14278:9): [True: 1.43k, False: 7.92k]
  ------------------
14279|  1.43k|        PK11_FreeSymKey(ss->ssl3.hs.clientHsTrafficSecret);
14280|  9.36k|    if (ss->ssl3.hs.serverHsTrafficSecret)
  ------------------
  |  Branch (14280:9): [True: 1.43k, False: 7.92k]
  ------------------
14281|  1.43k|        PK11_FreeSymKey(ss->ssl3.hs.serverHsTrafficSecret);
14282|  9.36k|    if (ss->ssl3.hs.clientTrafficSecret)
  ------------------
  |  Branch (14282:9): [True: 0, False: 9.36k]
  ------------------
14283|      0|        PK11_FreeSymKey(ss->ssl3.hs.clientTrafficSecret);
14284|  9.36k|    if (ss->ssl3.hs.serverTrafficSecret)
  ------------------
  |  Branch (14284:9): [True: 0, False: 9.36k]
  ------------------
14285|      0|        PK11_FreeSymKey(ss->ssl3.hs.serverTrafficSecret);
14286|  9.36k|    if (ss->ssl3.hs.earlyExporterSecret)
  ------------------
  |  Branch (14286:9): [True: 0, False: 9.36k]
  ------------------
14287|      0|        PK11_FreeSymKey(ss->ssl3.hs.earlyExporterSecret);
14288|  9.36k|    if (ss->ssl3.hs.exporterSecret)
  ------------------
  |  Branch (14288:9): [True: 0, False: 9.36k]
  ------------------
14289|      0|        PK11_FreeSymKey(ss->ssl3.hs.exporterSecret);
14290|       |
14291|  9.36k|    ss->ssl3.hs.zeroRttState = ssl_0rtt_none;
14292|       |    /* Destroy TLS 1.3 buffered early data. */
14293|  9.36k|    tls13_DestroyEarlyData(&ss->ssl3.hs.bufferedEarlyData);
14294|       |
14295|       |    /* Destroy TLS 1.3 PSKs. */
14296|  9.36k|    tls13_DestroyPskList(&ss->ssl3.hs.psks);
14297|       |
14298|       |    /* TLS 1.3 ECH state. */
14299|  9.36k|    PK11_HPKE_DestroyContext(ss->ssl3.hs.echHpkeCtx, PR_TRUE);
  ------------------
  |  |  437|  9.36k|#define PR_TRUE 1
  ------------------
14300|  9.36k|    PORT_Free((void *)ss->ssl3.hs.echPublicName); /* CONST */
  ------------------
  |  |   60|  9.36k|#define PORT_Free PORT_Free_Util
  ------------------
14301|  9.36k|    sslBuffer_Clear(&ss->ssl3.hs.greaseEchBuf);
14302|       |
14303|       |    /* TLS 1.3 GREASE (client) state. */
14304|  9.36k|    tls13_ClientGreaseDestroy(ss);
14305|       |
14306|       |    /* TLS ClientHello Extension Permutation state. */
14307|  9.36k|    tls_ClientHelloExtensionPermutationDestroy(ss);
14308|  9.36k|}
ssl3_ApplyNSSPolicy:
14404|      1|{
14405|      1|    unsigned i;
14406|      1|    SECStatus rv;
14407|      1|    PRUint32 policy = 0;
14408|       |
14409|      1|    rv = NSS_GetAlgorithmPolicy(SEC_OID_APPLY_SSL_POLICY, &policy);
14410|      1|    if (rv != SECSuccess || !(policy & NSS_USE_POLICY_IN_SSL)) {
  ------------------
  |  |  574|      1|#define NSS_USE_POLICY_IN_SSL 0x00000010           /* enable policy in SSL protocol */
  ------------------
  |  Branch (14410:9): [True: 0, False: 1]
  |  Branch (14410:29): [True: 1, False: 0]
  ------------------
14411|      1|        return SECSuccess; /* do nothing */
14412|      1|    }
14413|       |
14414|       |    /* disable every ciphersuite */
14415|      0|    for (i = 1; i < PR_ARRAY_SIZE(cipher_suite_defs); ++i) {
  ------------------
  |  |  167|      0|#define PR_ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
  ------------------
  |  Branch (14415:17): [True: 0, False: 0]
  ------------------
14416|      0|        const ssl3CipherSuiteDef *suite = &cipher_suite_defs[i];
14417|      0|        SECOidTag policyOid;
14418|      0|        PRBool isDisabled = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
14419|       |
14420|       |        /* if we haven't explicitly disabled it below enable by policy */
14421|      0|        ssl_CipherPolicySet(suite->cipher_suite, SSL_ALLOWED);
  ------------------
  |  |  700|      0|#define SSL_ALLOWED 1
  ------------------
14422|       |
14423|       |        /* now check the various key exchange, ciphers and macs and
14424|       |         * if we ever disallow by policy, we are done, go to the next cipher
14425|       |         */
14426|      0|        policyOid = MAP_NULL(kea_defs[suite->key_exchange_alg].oid);
  ------------------
  |  |14400|      0|#define MAP_NULL(x) (((x) != 0) ? (x) : SEC_OID_NULL_CIPHER)
  |  |  ------------------
  |  |  |  Branch (14400:22): [True: 0, False: 0]
  |  |  ------------------
  ------------------
14427|      0|        if (ssl_HandlePolicy(suite->cipher_suite, policyOid,
  ------------------
  |  Branch (14427:13): [True: 0, False: 0]
  ------------------
14428|      0|                             NSS_USE_ALG_IN_SSL_KX, &isDisabled)) {
  ------------------
  |  |  572|      0|#define NSS_USE_ALG_IN_SSL_KX 0x00000004           /* used in SSL key exchange */
  ------------------
14429|      0|            continue;
14430|      0|        }
14431|       |
14432|      0|        policyOid = MAP_NULL(ssl_GetBulkCipherDef(suite)->oid);
  ------------------
  |  |14400|      0|#define MAP_NULL(x) (((x) != 0) ? (x) : SEC_OID_NULL_CIPHER)
  |  |  ------------------
  |  |  |  Branch (14400:22): [True: 0, False: 0]
  |  |  ------------------
  ------------------
14433|      0|        if (ssl_HandlePolicy(suite->cipher_suite, policyOid,
  ------------------
  |  Branch (14433:13): [True: 0, False: 0]
  ------------------
14434|      0|                             NSS_USE_ALG_IN_SSL, &isDisabled)) {
  ------------------
  |  |  573|      0|#define NSS_USE_ALG_IN_SSL 0x00000008              /* used in SSL record protocol */
  ------------------
14435|      0|            continue;
14436|      0|        }
14437|       |
14438|      0|        if (ssl_GetBulkCipherDef(suite)->type != type_aead) {
  ------------------
  |  Branch (14438:13): [True: 0, False: 0]
  ------------------
14439|      0|            policyOid = MAP_NULL(ssl_GetMacDefByAlg(suite->mac_alg)->oid);
  ------------------
  |  |14400|      0|#define MAP_NULL(x) (((x) != 0) ? (x) : SEC_OID_NULL_CIPHER)
  |  |  ------------------
  |  |  |  Branch (14400:22): [True: 0, False: 0]
  |  |  ------------------
  ------------------
14440|      0|            if (ssl_HandlePolicy(suite->cipher_suite, policyOid,
  ------------------
  |  Branch (14440:17): [True: 0, False: 0]
  ------------------
14441|      0|                                 NSS_USE_ALG_IN_SSL, &isDisabled)) {
  ------------------
  |  |  573|      0|#define NSS_USE_ALG_IN_SSL 0x00000008              /* used in SSL record protocol */
  ------------------
14442|      0|                continue;
14443|      0|            }
14444|      0|        }
14445|      0|    }
14446|       |
14447|      0|    rv = ssl3_ConstrainRangeByPolicy();
14448|       |
14449|      0|    return rv;
14450|      1|}
ssl3con.c:ssl_LookupCipherSuiteCfgMutable:
  661|   754k|{
  662|   754k|    int i;
  663|       |
  664|  27.4M|    for (i = 0; i < ssl_V3_SUITES_IMPLEMENTED; i++) {
  ------------------
  |  |  245|  27.4M|#define ssl_V3_SUITES_IMPLEMENTED 71
  ------------------
  |  Branch (664:17): [True: 27.4M, False: 0]
  ------------------
  665|  27.4M|        if (suites[i].cipher_suite == suite)
  ------------------
  |  Branch (665:13): [True: 754k, False: 26.7M]
  ------------------
  666|   754k|            return &suites[i];
  667|  27.4M|    }
  668|       |    /* return NULL and let the caller handle it.  */
  669|      0|    PORT_SetError(SSL_ERROR_UNKNOWN_CIPHER_SUITE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  670|      0|    return NULL;
  671|   754k|}
ssl3con.c:ssl_CheckSignatureSchemes:
  867|  19.4k|{
  868|  19.4k|    if (ss->vrange.max < SSL_LIBRARY_VERSION_TLS_1_2) {
  ------------------
  |  |   20|  19.4k|#define SSL_LIBRARY_VERSION_TLS_1_2             0x0303
  ------------------
  |  Branch (868:9): [True: 178, False: 19.2k]
  ------------------
  869|    178|        return SECSuccess;
  870|    178|    }
  871|       |
  872|       |    /* If this is a server using TLS 1.3, we just need to have one signature
  873|       |     * scheme for which we have a usable certificate.
  874|       |     *
  875|       |     * Note: Certificates for earlier TLS versions are checked along with the
  876|       |     * cipher suite in ssl3_config_match_init. */
  877|  19.2k|    if (ss->sec.isServer && ss->vrange.max >= SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|      0|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (877:9): [True: 0, False: 19.2k]
  |  Branch (877:29): [True: 0, False: 0]
  ------------------
  878|      0|        PRBool foundCert = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  879|      0|        for (unsigned int i = 0; i < ss->ssl3.signatureSchemeCount; ++i) {
  ------------------
  |  Branch (879:34): [True: 0, False: 0]
  ------------------
  880|      0|            SSLAuthType authType =
  881|      0|                ssl_SignatureSchemeToAuthType(ss->ssl3.signatureSchemes[i]);
  882|      0|            if (ssl_HasCert(ss, ss->vrange.max, authType)) {
  ------------------
  |  Branch (882:17): [True: 0, False: 0]
  ------------------
  883|      0|                foundCert = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  884|      0|                break;
  885|      0|            }
  886|      0|        }
  887|      0|        if (!foundCert) {
  ------------------
  |  Branch (887:13): [True: 0, False: 0]
  ------------------
  888|      0|            PORT_SetError(SSL_ERROR_NO_SUPPORTED_SIGNATURE_ALGORITHM);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  889|      0|            return SECFailure;
  890|      0|        }
  891|      0|    }
  892|       |
  893|       |    /* Ensure that there is a signature scheme that can be accepted.*/
  894|  19.2k|    for (unsigned int i = 0; i < ss->ssl3.signatureSchemeCount; ++i) {
  ------------------
  |  Branch (894:30): [True: 19.2k, False: 0]
  ------------------
  895|  19.2k|        if (ssl_SignatureSchemeAccepted(ss->vrange.min,
  ------------------
  |  Branch (895:13): [True: 19.2k, False: 0]
  ------------------
  896|  19.2k|                                        ss->ssl3.signatureSchemes[i],
  897|  19.2k|                                        PR_FALSE /* forCert */)) {
  ------------------
  |  |  438|  19.2k|#define PR_FALSE 0
  ------------------
  898|  19.2k|            return SECSuccess;
  899|  19.2k|        }
  900|  19.2k|    }
  901|      0|    PORT_SetError(SSL_ERROR_NO_SUPPORTED_SIGNATURE_ALGORITHM);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  902|      0|    return SECFailure;
  903|  19.2k|}
ssl3con.c:ssl_KEAEnabled:
  695|   712k|{
  696|   712k|    switch (keaType) {
  697|   155k|        case ssl_kea_rsa:
  ------------------
  |  Branch (697:9): [True: 155k, False: 556k]
  ------------------
  698|   155k|            return PR_TRUE;
  ------------------
  |  |  437|   155k|#define PR_TRUE 1
  ------------------
  699|       |
  700|   232k|        case ssl_kea_dh:
  ------------------
  |  Branch (700:9): [True: 232k, False: 480k]
  ------------------
  701|   232k|        case ssl_kea_dh_psk: {
  ------------------
  |  Branch (701:9): [True: 0, False: 712k]
  ------------------
  702|   232k|            if (ss->sec.isServer && !ss->opt.enableServerDhe) {
  ------------------
  |  Branch (702:17): [True: 0, False: 232k]
  |  Branch (702:37): [True: 0, False: 0]
  ------------------
  703|      0|                return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  704|      0|            }
  705|       |
  706|   232k|            if (ss->sec.isServer) {
  ------------------
  |  Branch (706:17): [True: 0, False: 232k]
  ------------------
  707|       |                /* If the server requires named FFDHE groups, then the client
  708|       |                 * must have included an FFDHE group. peerSupportsFfdheGroups
  709|       |                 * is set to true in ssl_HandleSupportedGroupsXtn(). */
  710|      0|                if (ss->opt.requireDHENamedGroups &&
  ------------------
  |  Branch (710:21): [True: 0, False: 0]
  ------------------
  711|      0|                    !ss->xtnData.peerSupportsFfdheGroups) {
  ------------------
  |  Branch (711:21): [True: 0, False: 0]
  ------------------
  712|      0|                    return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  713|      0|                }
  714|       |
  715|       |                /* We can use the weak DH group if all of these are true:
  716|       |                 * 1. We don't require named groups.
  717|       |                 * 2. The peer doesn't support named groups.
  718|       |                 * 3. This isn't TLS 1.3.
  719|       |                 * 4. The weak group is enabled. */
  720|      0|                if (!ss->opt.requireDHENamedGroups &&
  ------------------
  |  Branch (720:21): [True: 0, False: 0]
  ------------------
  721|      0|                    !ss->xtnData.peerSupportsFfdheGroups &&
  ------------------
  |  Branch (721:21): [True: 0, False: 0]
  ------------------
  722|      0|                    ss->version < SSL_LIBRARY_VERSION_TLS_1_3 &&
  ------------------
  |  |   21|      0|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (722:21): [True: 0, False: 0]
  ------------------
  723|      0|                    ss->ssl3.dheWeakGroupEnabled) {
  ------------------
  |  Branch (723:21): [True: 0, False: 0]
  ------------------
  724|      0|                    return PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  725|      0|                }
  726|   232k|            } else {
  727|   232k|                if (ss->vrange.min < SSL_LIBRARY_VERSION_TLS_1_3 &&
  ------------------
  |  |   21|   464k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (727:21): [True: 209k, False: 23.1k]
  ------------------
  728|   232k|                    !ss->opt.requireDHENamedGroups) {
  ------------------
  |  Branch (728:21): [True: 113k, False: 96.2k]
  ------------------
  729|       |                    /* The client enables DHE cipher suites even if no DHE groups
  730|       |                     * are enabled. Only if this isn't TLS 1.3 and named groups
  731|       |                     * are not required. */
  732|   113k|                    return PR_TRUE;
  ------------------
  |  |  437|   113k|#define PR_TRUE 1
  ------------------
  733|   113k|                }
  734|   232k|            }
  735|   119k|            return ssl_NamedGroupTypeEnabled(ss, ssl_kea_dh);
  736|   232k|        }
  737|       |
  738|   288k|        case ssl_kea_ecdh:
  ------------------
  |  Branch (738:9): [True: 288k, False: 424k]
  ------------------
  739|   288k|        case ssl_kea_ecdh_psk:
  ------------------
  |  Branch (739:9): [True: 0, False: 712k]
  ------------------
  740|   288k|            return ssl_NamedGroupTypeEnabled(ss, ssl_kea_ecdh);
  741|       |
  742|      0|        case ssl_kea_ecdh_hybrid:
  ------------------
  |  Branch (742:9): [True: 0, False: 712k]
  ------------------
  743|      0|        case ssl_kea_ecdh_hybrid_psk:
  ------------------
  |  Branch (743:9): [True: 0, False: 712k]
  ------------------
  744|      0|            if (ss->version < SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|      0|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (744:17): [True: 0, False: 0]
  ------------------
  745|      0|                return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  746|      0|            }
  747|      0|            return ssl_NamedGroupTypeEnabled(ss, ssl_kea_ecdh_hybrid);
  748|       |
  749|  35.9k|        case ssl_kea_tls13_any:
  ------------------
  |  Branch (749:9): [True: 35.9k, False: 676k]
  ------------------
  750|  35.9k|            return PR_TRUE;
  ------------------
  |  |  437|  35.9k|#define PR_TRUE 1
  ------------------
  751|       |
  752|      0|        case ssl_kea_fortezza:
  ------------------
  |  Branch (752:9): [True: 0, False: 712k]
  ------------------
  753|      0|        default:
  ------------------
  |  Branch (753:9): [True: 0, False: 712k]
  ------------------
  754|      0|            PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  755|   712k|    }
  756|      0|    return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  757|   712k|}
ssl3con.c:ssl_NamedGroupTypeEnabled:
  682|   407k|{
  683|   407k|    unsigned int i;
  684|  1.12M|    for (i = 0; i < SSL_NAMED_GROUP_COUNT; ++i) {
  ------------------
  |  |  133|  1.12M|#define SSL_NAMED_GROUP_COUNT 33
  ------------------
  |  Branch (684:17): [True: 1.12M, False: 0]
  ------------------
  685|  1.12M|        if (ss->namedGroupPreferences[i] &&
  ------------------
  |  Branch (685:13): [True: 1.00M, False: 119k]
  ------------------
  686|  1.12M|            ss->namedGroupPreferences[i]->keaType == keaType) {
  ------------------
  |  Branch (686:13): [True: 407k, False: 596k]
  ------------------
  687|   407k|            return PR_TRUE;
  ------------------
  |  |  437|   407k|#define PR_TRUE 1
  ------------------
  688|   407k|        }
  689|  1.12M|    }
  690|      0|    return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  691|   407k|}
ssl3con.c:ssl3_SetupPendingCipherSpec:
 1655|  10.9k|{
 1656|  10.9k|    ssl3CipherSpec *spec;
 1657|  10.9k|    const ssl3CipherSpec *prev;
 1658|       |
 1659|  10.9k|    prev = (direction == ssl_secret_write) ? ss->ssl3.cwSpec : ss->ssl3.crSpec;
  ------------------
  |  Branch (1659:12): [True: 5.45k, False: 5.45k]
  ------------------
 1660|  10.9k|    if (prev->epoch == PR_UINT16_MAX) {
  ------------------
  |  |  270|  10.9k|#define PR_UINT16_MAX 65535U
  ------------------
  |  Branch (1660:9): [True: 0, False: 10.9k]
  ------------------
 1661|      0|        PORT_SetError(SSL_ERROR_RENEGOTIATION_NOT_ALLOWED);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1662|      0|        return SECFailure;
 1663|      0|    }
 1664|       |
 1665|  10.9k|    spec = ssl_CreateCipherSpec(ss, direction);
 1666|  10.9k|    if (!spec) {
  ------------------
  |  Branch (1666:9): [True: 0, False: 10.9k]
  ------------------
 1667|      0|        return SECFailure;
 1668|      0|    }
 1669|       |
 1670|  10.9k|    spec->cipherDef = ssl_GetBulkCipherDef(suiteDef);
 1671|  10.9k|    spec->macDef = ssl_GetMacDef(ss, suiteDef);
 1672|       |
 1673|  10.9k|    spec->epoch = prev->epoch + 1;
 1674|  10.9k|    spec->nextSeqNum = 0;
 1675|  10.9k|    if (IS_DTLS(ss) && direction == ssl_secret_read) {
  ------------------
  |  |  892|  21.8k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 10.9k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1675:24): [True: 5.45k, False: 5.45k]
  ------------------
 1676|  5.45k|        dtls_InitRecvdRecords(&spec->recvdRecords);
 1677|  5.45k|    }
 1678|  10.9k|    ssl_SetSpecVersions(ss, spec);
 1679|       |
 1680|  10.9k|    ssl_SaveCipherSpec(ss, spec);
 1681|  10.9k|    *specp = spec;
 1682|  10.9k|    return SECSuccess;
 1683|  10.9k|}
ssl3con.c:ssl3_InitPendingContexts:
 1817|  3.25k|{
 1818|  3.25k|    CK_MECHANISM_TYPE encMechanism;
 1819|  3.25k|    CK_ATTRIBUTE_TYPE encMode;
 1820|  3.25k|    SECItem macParam;
 1821|  3.25k|    CK_ULONG macLength;
 1822|  3.25k|    SECItem iv;
 1823|  3.25k|    SSLCipherAlgorithm calg;
 1824|       |
 1825|  3.25k|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|  3.25k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  4.82k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 1.67k, False: 1.57k]
  |  |  |  |  |  Branch (208:7): [True: 1.57k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1826|  3.25k|    PORT_Assert(ss->opt.noLocks || ssl_HaveSpecWriteLock(ss));
  ------------------
  |  |  120|  3.25k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  4.82k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 1.67k, False: 1.57k]
  |  |  |  |  |  Branch (208:7): [True: 1.57k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1827|       |
 1828|  3.25k|    calg = spec->cipherDef->calg;
 1829|  3.25k|    PORT_Assert(alg2Mech[calg].calg == calg);
  ------------------
  |  |  120|  3.25k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  3.25k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 3.25k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1830|       |
 1831|  3.25k|    if (spec->cipherDef->type != type_aead) {
  ------------------
  |  Branch (1831:9): [True: 3.00k, False: 250]
  ------------------
 1832|  3.00k|        macLength = spec->macDef->mac_size;
 1833|       |
 1834|       |        /*
 1835|       |        ** Now setup the MAC contexts,
 1836|       |        **   crypto contexts are setup below.
 1837|       |        */
 1838|  3.00k|        macParam.data = (unsigned char *)&macLength;
 1839|  3.00k|        macParam.len = sizeof(macLength);
 1840|  3.00k|        macParam.type = siBuffer;
 1841|       |
 1842|  3.00k|        spec->keyMaterial.macContext = PK11_CreateContextBySymKey(
 1843|  3.00k|            spec->macDef->mmech, CKA_SIGN, spec->keyMaterial.macKey, &macParam);
  ------------------
  |  |  551|  3.00k|#define CKA_SIGN 0x00000108UL
  ------------------
 1844|  3.00k|        if (!spec->keyMaterial.macContext) {
  ------------------
  |  Branch (1844:13): [True: 0, False: 3.00k]
  ------------------
 1845|      0|            ssl_MapLowLevelError(SSL_ERROR_SYM_KEY_CONTEXT_FAILURE);
 1846|      0|            return SECFailure;
 1847|      0|        }
 1848|  3.00k|    }
 1849|       |
 1850|       |    /*
 1851|       |    ** Now setup the crypto contexts.
 1852|       |    */
 1853|  3.25k|    if (calg == ssl_calg_null) {
  ------------------
  |  Branch (1853:9): [True: 1.10k, False: 2.15k]
  ------------------
 1854|  1.10k|        spec->cipher = Null_Cipher;
 1855|  1.10k|        return SECSuccess;
 1856|  1.10k|    }
 1857|       |
 1858|  2.15k|    encMechanism = ssl3_Alg2Mech(calg);
 1859|  2.15k|    encMode = (spec->direction == ssl_secret_write) ? CKA_ENCRYPT : CKA_DECRYPT;
  ------------------
  |  |  547|  1.07k|#define CKA_ENCRYPT 0x00000104UL
  ------------------
                  encMode = (spec->direction == ssl_secret_write) ? CKA_ENCRYPT : CKA_DECRYPT;
  ------------------
  |  |  548|  3.22k|#define CKA_DECRYPT 0x00000105UL
  ------------------
  |  Branch (1859:15): [True: 1.07k, False: 1.07k]
  ------------------
 1860|  2.15k|    if (spec->cipherDef->type == type_aead) {
  ------------------
  |  Branch (1860:9): [True: 250, False: 1.90k]
  ------------------
 1861|    250|        encMode |= CKA_NSS_MESSAGE;
  ------------------
  |  |   69|    250|#define CKA_NSS_MESSAGE 0x82000000L
  ------------------
 1862|    250|        iv.data = NULL;
 1863|    250|        iv.len = 0;
 1864|  1.90k|    } else {
 1865|  1.90k|        spec->cipher = SSLCipher_PK11_CipherOp;
 1866|  1.90k|        iv.data = spec->keyMaterial.iv;
 1867|  1.90k|        iv.len = spec->cipherDef->iv_size;
 1868|  1.90k|    }
 1869|       |
 1870|       |    /*
 1871|       |     * build the context
 1872|       |     */
 1873|  2.15k|    spec->cipherContext = PK11_CreateContextBySymKey(encMechanism, encMode,
 1874|  2.15k|                                                     spec->keyMaterial.key,
 1875|  2.15k|                                                     &iv);
 1876|  2.15k|    if (!spec->cipherContext) {
  ------------------
  |  Branch (1876:9): [True: 0, False: 2.15k]
  ------------------
 1877|      0|        ssl_MapLowLevelError(SSL_ERROR_SYM_KEY_CONTEXT_FAILURE);
 1878|      0|        return SECFailure;
 1879|      0|    }
 1880|       |
 1881|  2.15k|    return SECSuccess;
 1882|  2.15k|}
ssl3con.c:SSLCipher_PK11_CipherOp:
 1122|  20.1k|{
 1123|  20.1k|    PK11Context *pctx = ctx;
 1124|  20.1k|    PORT_Assert(maxOutputLen <= INT_MAX);
  ------------------
  |  |  120|  20.1k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  20.1k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 20.1k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1125|  20.1k|    int signedOutputLen = maxOutputLen;
 1126|  20.1k|    SECStatus rv = PK11_CipherOp(pctx, output, &signedOutputLen, maxOutputLen, input, inputLen);
 1127|  20.1k|    PORT_Assert(signedOutputLen >= 0);
  ------------------
  |  |  120|  20.1k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  20.1k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 20.1k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1128|  20.1k|    *outputLen = signedOutputLen;
 1129|  20.1k|    return rv;
 1130|  20.1k|}
ssl3con.c:ssl3_BuildRecordPseudoHeader:
 1776|  79.3k|{
 1777|  79.3k|    SECStatus rv;
 1778|  79.3k|    if (isDTLS && v < SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|  79.3k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (1778:9): [True: 79.3k, False: 0]
  |  Branch (1778:19): [True: 79.3k, False: 0]
  ------------------
 1779|  79.3k|        rv = sslBuffer_AppendNumber(buf, epoch, 2);
 1780|  79.3k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (1780:13): [True: 0, False: 79.3k]
  ------------------
 1781|      0|            return SECFailure;
 1782|      0|        }
 1783|  79.3k|        rv = sslBuffer_AppendNumber(buf, seqNum, 6);
 1784|  79.3k|    } else {
 1785|      0|        rv = sslBuffer_AppendNumber(buf, seqNum, 8);
 1786|      0|    }
 1787|  79.3k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1787:9): [True: 0, False: 79.3k]
  ------------------
 1788|      0|        return SECFailure;
 1789|      0|    }
 1790|  79.3k|    rv = sslBuffer_AppendNumber(buf, ct, 1);
 1791|  79.3k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1791:9): [True: 0, False: 79.3k]
  ------------------
 1792|      0|        return SECFailure;
 1793|      0|    }
 1794|       |
 1795|       |    /* SSL3 MAC doesn't include the record's version field. */
 1796|  79.3k|    if (includesVersion) {
  ------------------
  |  Branch (1796:9): [True: 79.3k, False: 0]
  ------------------
 1797|       |        /* TLS MAC and AEAD additional data include version. */
 1798|  79.3k|        rv = sslBuffer_AppendNumber(buf, version, 2);
 1799|  79.3k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (1799:13): [True: 0, False: 79.3k]
  ------------------
 1800|      0|            return SECFailure;
 1801|      0|        }
 1802|  79.3k|    }
 1803|  79.3k|    rv = sslBuffer_AppendNumber(buf, length, 2);
 1804|  79.3k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1804:9): [True: 0, False: 79.3k]
  ------------------
 1805|      0|        return SECFailure;
 1806|      0|    }
 1807|       |
 1808|  79.3k|    return SECSuccess;
 1809|  79.3k|}
ssl3con.c:ssl3_ComputeRecordMAC:
 2001|  69.8k|{
 2002|  69.8k|    PK11Context *context;
 2003|  69.8k|    int macSize = spec->macDef->mac_size;
 2004|  69.8k|    SECStatus rv;
 2005|       |
 2006|  69.8k|    PRINT_BUF(95, (NULL, "frag hash1: header", header, headerLen));
  ------------------
  |  |   74|  69.8k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 69.8k]
  |  |  ------------------
  |  |   75|  69.8k|    ssl_PrintBuf b
  ------------------
 2007|  69.8k|    PRINT_BUF(95, (NULL, "frag hash1: input", input, inputLen));
  ------------------
  |  |   74|  69.8k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 69.8k]
  |  |  ------------------
  |  |   75|  69.8k|    ssl_PrintBuf b
  ------------------
 2008|       |
 2009|  69.8k|    if (spec->macDef->mac == ssl_mac_null) {
  ------------------
  |  Branch (2009:9): [True: 31.2k, False: 38.5k]
  ------------------
 2010|  31.2k|        *outLen = 0;
 2011|  31.2k|        return SECSuccess;
 2012|  31.2k|    }
 2013|       |
 2014|  38.5k|    context = spec->keyMaterial.macContext;
 2015|  38.5k|    rv = PK11_DigestBegin(context);
 2016|  38.5k|    rv |= PK11_DigestOp(context, header, headerLen);
 2017|  38.5k|    rv |= PK11_DigestOp(context, input, inputLen);
 2018|  38.5k|    rv |= PK11_DigestFinal(context, outbuf, outLen, macSize);
 2019|  38.5k|    PORT_Assert(rv != SECSuccess || *outLen == (unsigned)macSize);
  ------------------
  |  |  120|  38.5k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  77.1k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 0, False: 38.5k]
  |  |  |  |  |  Branch (208:7): [True: 38.5k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2020|       |
 2021|  38.5k|    PRINT_BUF(95, (NULL, "frag hash2: result", outbuf, *outLen));
  ------------------
  |  |   74|  38.5k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 38.5k]
  |  |  ------------------
  |  |   75|  38.5k|    ssl_PrintBuf b
  ------------------
 2022|       |
 2023|  38.5k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (2023:9): [True: 0, False: 38.5k]
  ------------------
 2024|      0|        rv = SECFailure;
 2025|      0|        ssl_MapLowLevelError(SSL_ERROR_MAC_COMPUTATION_FAILURE);
 2026|      0|    }
 2027|  38.5k|    return rv;
 2028|  69.8k|}
ssl3con.c:ssl3_ClientAuthTokenPresent:
 2108|  1.20M|{
 2109|  1.20M|    PK11SlotInfo *slot = NULL;
 2110|  1.20M|    PRBool isPresent = PR_TRUE;
  ------------------
  |  |  437|  1.20M|#define PR_TRUE 1
  ------------------
 2111|       |
 2112|       |    /* we only care if we are doing client auth */
 2113|  1.20M|    if (!sid || !sid->u.ssl3.clAuthValid) {
  ------------------
  |  Branch (2113:9): [True: 0, False: 1.20M]
  |  Branch (2113:17): [True: 1.20M, False: 0]
  ------------------
 2114|  1.20M|        return PR_TRUE;
  ------------------
  |  |  437|  1.20M|#define PR_TRUE 1
  ------------------
 2115|  1.20M|    }
 2116|       |
 2117|       |    /* get the slot */
 2118|      0|    slot = SECMOD_LookupSlot(sid->u.ssl3.clAuthModuleID,
 2119|      0|                             sid->u.ssl3.clAuthSlotID);
 2120|      0|    if (slot == NULL ||
  ------------------
  |  Branch (2120:9): [True: 0, False: 0]
  ------------------
 2121|      0|        !PK11_IsPresent(slot) ||
  ------------------
  |  Branch (2121:9): [True: 0, False: 0]
  ------------------
 2122|      0|        sid->u.ssl3.clAuthSeries != PK11_GetSlotSeries(slot) ||
  ------------------
  |  Branch (2122:9): [True: 0, False: 0]
  ------------------
 2123|      0|        sid->u.ssl3.clAuthSlotID != PK11_GetSlotID(slot) ||
  ------------------
  |  Branch (2123:9): [True: 0, False: 0]
  ------------------
 2124|      0|        sid->u.ssl3.clAuthModuleID != PK11_GetModuleID(slot) ||
  ------------------
  |  Branch (2124:9): [True: 0, False: 0]
  ------------------
 2125|      0|        (PK11_NeedLogin(slot) && !PK11_IsLoggedIn(slot, NULL))) {
  ------------------
  |  Branch (2125:10): [True: 0, False: 0]
  |  Branch (2125:34): [True: 0, False: 0]
  ------------------
 2126|      0|        isPresent = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 2127|      0|    }
 2128|      0|    if (slot) {
  ------------------
  |  Branch (2128:9): [True: 0, False: 0]
  ------------------
 2129|      0|        PK11_FreeSlot(slot);
 2130|      0|    }
 2131|      0|    return isPresent;
 2132|  1.20M|}
ssl3con.c:ssl3_GetMgfMechanismByHashType:
 3386|  1.11k|{
 3387|  1.11k|    switch (hash) {
 3388|  1.00k|        case ssl_hash_sha256:
  ------------------
  |  Branch (3388:9): [True: 1.00k, False: 113]
  ------------------
 3389|  1.00k|            return CKG_MGF1_SHA256;
  ------------------
  |  | 1649|  1.00k|#define CKG_MGF1_SHA256 0x00000002UL
  ------------------
 3390|     26|        case ssl_hash_sha384:
  ------------------
  |  Branch (3390:9): [True: 26, False: 1.08k]
  ------------------
 3391|     26|            return CKG_MGF1_SHA384;
  ------------------
  |  | 1650|     26|#define CKG_MGF1_SHA384 0x00000003UL
  ------------------
 3392|     87|        case ssl_hash_sha512:
  ------------------
  |  Branch (3392:9): [True: 87, False: 1.02k]
  ------------------
 3393|     87|            return CKG_MGF1_SHA512;
  ------------------
  |  | 1651|     87|#define CKG_MGF1_SHA512 0x00000004UL
  ------------------
 3394|      0|        default:
  ------------------
  |  Branch (3394:9): [True: 0, False: 1.11k]
  ------------------
 3395|      0|            PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3396|  1.11k|    }
 3397|      0|    return CKG_MGF1_SHA256;
  ------------------
  |  | 1649|      0|#define CKG_MGF1_SHA256 0x00000002UL
  ------------------
 3398|  1.11k|}
ssl3con.c:ssl3_GetHashMechanismByHashType:
 3403|  7.37k|{
 3404|  7.37k|    switch (hashType) {
 3405|     87|        case ssl_hash_sha512:
  ------------------
  |  Branch (3405:9): [True: 87, False: 7.28k]
  ------------------
 3406|     87|            return CKM_SHA512;
  ------------------
  |  |  882|     87|#define CKM_SHA512 0x00000270UL
  ------------------
 3407|    440|        case ssl_hash_sha384:
  ------------------
  |  Branch (3407:9): [True: 440, False: 6.93k]
  ------------------
 3408|    440|            return CKM_SHA384;
  ------------------
  |  |  879|    440|#define CKM_SHA384 0x00000260UL
  ------------------
 3409|  3.03k|        case ssl_hash_sha256:
  ------------------
  |  Branch (3409:9): [True: 3.03k, False: 4.33k]
  ------------------
 3410|  6.84k|        case ssl_hash_none:
  ------------------
  |  Branch (3410:9): [True: 3.81k, False: 3.56k]
  ------------------
 3411|       |            /* ssl_hash_none is for pre-1.2 suites, which use SHA-256. */
 3412|  6.84k|            return CKM_SHA256;
  ------------------
  |  |  876|  6.84k|#define CKM_SHA256 0x00000250UL
  ------------------
 3413|      0|        case ssl_hash_sha1:
  ------------------
  |  Branch (3413:9): [True: 0, False: 7.37k]
  ------------------
 3414|      0|            return CKM_SHA_1;
  ------------------
  |  |  859|      0|#define CKM_SHA_1 0x00000220UL
  ------------------
 3415|      0|        default:
  ------------------
  |  Branch (3415:9): [True: 0, False: 7.37k]
  ------------------
 3416|      0|            PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3417|  7.37k|    }
 3418|      0|    return CKM_SHA256;
  ------------------
  |  |  876|      0|#define CKM_SHA256 0x00000250UL
  ------------------
 3419|  7.37k|}
ssl3con.c:ssl3_ComputeMasterSecret:
 3665|  1.62k|{
 3666|  1.62k|    PORT_Assert(pms != NULL);
  ------------------
  |  |  120|  1.62k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.62k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.62k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3667|  1.62k|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|  1.62k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  2.41k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 836, False: 789]
  |  |  |  |  |  Branch (208:7): [True: 789, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3668|       |
 3669|  1.62k|    if (ssl3_ExtensionNegotiated(ss, ssl_extended_master_secret_xtn)) {
  ------------------
  |  Branch (3669:9): [True: 5, False: 1.62k]
  ------------------
 3670|      5|        return tls_ComputeExtendedMasterSecretInt(ss, pms, msp);
 3671|  1.62k|    } else {
 3672|  1.62k|        return ssl3_ComputeMasterSecretInt(ss, pms, msp);
 3673|  1.62k|    }
 3674|  1.62k|}
ssl3con.c:tls_ComputeExtendedMasterSecretInt:
 3600|      5|{
 3601|      5|    ssl3CipherSpec *pwSpec = ss->ssl3.pwSpec;
 3602|      5|    CK_NSS_TLS_EXTENDED_MASTER_KEY_DERIVE_PARAMS extended_master_params;
 3603|      5|    SSL3Hashes hashes;
 3604|       |
 3605|       |    /*
 3606|       |     * Determine whether to use the DH/ECDH or RSA derivation modes.
 3607|       |     */
 3608|       |    /*
 3609|       |     * TODO(ekr@rtfm.com): Verify that the slot can handle this key expansion
 3610|       |     * mode. Bug 1198298 */
 3611|      5|    PRBool isDH = (PRBool)((ss->ssl3.hs.kea_def->exchKeyType == ssl_kea_dh) ||
  ------------------
  |  Branch (3611:28): [True: 0, False: 5]
  ------------------
 3612|      5|                           (ss->ssl3.hs.kea_def->exchKeyType == ssl_kea_ecdh) ||
  ------------------
  |  Branch (3612:28): [True: 2, False: 3]
  ------------------
 3613|      5|                           (ss->ssl3.hs.kea_def->exchKeyType == ssl_kea_ecdh_hybrid));
  ------------------
  |  Branch (3613:28): [True: 0, False: 3]
  ------------------
 3614|      5|    CK_MECHANISM_TYPE master_derive;
 3615|      5|    CK_MECHANISM_TYPE key_derive;
 3616|      5|    SECItem params;
 3617|      5|    const CK_FLAGS keyFlags = CKF_SIGN | CKF_VERIFY;
  ------------------
  |  | 1356|      5|#define CKF_SIGN 0x00000800UL
  ------------------
                  const CK_FLAGS keyFlags = CKF_SIGN | CKF_VERIFY;
  ------------------
  |  | 1358|      5|#define CKF_VERIFY 0x00002000
  ------------------
 3618|      5|    CK_VERSION pms_version;
 3619|      5|    CK_VERSION *pms_version_ptr = NULL;
 3620|      5|    SECStatus rv;
 3621|       |
 3622|      5|    rv = ssl3_ComputeHandshakeHashes(ss, pwSpec, &hashes, 0);
 3623|      5|    if (rv != SECSuccess) {
  ------------------
  |  Branch (3623:9): [True: 0, False: 5]
  ------------------
 3624|      0|        PORT_Assert(0); /* Should never fail */
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3625|      0|        ssl_MapLowLevelError(SSL_ERROR_SESSION_KEY_GEN_FAILURE);
 3626|      0|        return SECFailure;
 3627|      0|    }
 3628|       |
 3629|      5|    if (isDH) {
  ------------------
  |  Branch (3629:9): [True: 2, False: 3]
  ------------------
 3630|      2|        master_derive = CKM_NSS_TLS_EXTENDED_MASTER_KEY_DERIVE_DH;
  ------------------
  |  |  240|      2|#define CKM_NSS_TLS_EXTENDED_MASTER_KEY_DERIVE_DH (CKM_NSS + 26)
  |  |  ------------------
  |  |  |  |  162|      2|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      2|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      2|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3631|      3|    } else {
 3632|      3|        master_derive = CKM_NSS_TLS_EXTENDED_MASTER_KEY_DERIVE;
  ------------------
  |  |  239|      3|#define CKM_NSS_TLS_EXTENDED_MASTER_KEY_DERIVE (CKM_NSS + 25)
  |  |  ------------------
  |  |  |  |  162|      3|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      3|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      3|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3633|      3|        pms_version_ptr = &pms_version;
 3634|      3|    }
 3635|       |
 3636|      5|    if (ss->version >= SSL_LIBRARY_VERSION_TLS_1_2) {
  ------------------
  |  |   20|      5|#define SSL_LIBRARY_VERSION_TLS_1_2             0x0303
  ------------------
  |  Branch (3636:9): [True: 4, False: 1]
  ------------------
 3637|       |        /* TLS 1.2+ */
 3638|      4|        extended_master_params.prfHashMechanism = ssl3_GetPrfHashMechanism(ss);
 3639|      4|        key_derive = CKM_TLS12_KEY_AND_MAC_DERIVE;
  ------------------
  |  | 1027|      4|#define CKM_TLS12_KEY_AND_MAC_DERIVE 0x000003E1UL
  ------------------
 3640|      4|    } else {
 3641|       |        /* TLS < 1.2 */
 3642|      1|        extended_master_params.prfHashMechanism = CKM_TLS_PRF;
  ------------------
  |  |  973|      1|#define CKM_TLS_PRF 0x00000378UL
  ------------------
 3643|      1|        key_derive = CKM_TLS_KEY_AND_MAC_DERIVE;
  ------------------
  |  |  969|      1|#define CKM_TLS_KEY_AND_MAC_DERIVE 0x00000376UL
  ------------------
 3644|      1|    }
 3645|       |
 3646|      5|    extended_master_params.pVersion = pms_version_ptr;
 3647|      5|    extended_master_params.pSessionHash = hashes.u.raw;
 3648|      5|    extended_master_params.ulSessionHashLen = hashes.len;
 3649|       |
 3650|      5|    params.data = (unsigned char *)&extended_master_params;
 3651|      5|    params.len = sizeof extended_master_params;
 3652|       |
 3653|      5|    return ssl3_ComputeMasterSecretFinish(ss, master_derive, key_derive,
 3654|      5|                                          pms_version_ptr, &params,
 3655|      5|                                          keyFlags, pms, msp);
 3656|      5|}
ssl3con.c:ssl3_ComputeMasterSecretFinish:
 3458|  1.62k|{
 3459|  1.62k|    PK11SymKey *ms = NULL;
 3460|       |
 3461|  1.62k|    ms = PK11_DeriveWithFlags(pms, master_derive,
 3462|  1.62k|                              params, key_derive,
 3463|  1.62k|                              CKA_DERIVE, 0, keyFlags);
  ------------------
  |  |  555|  1.62k|#define CKA_DERIVE 0x0000010CUL
  ------------------
 3464|  1.62k|    if (!ms) {
  ------------------
  |  Branch (3464:9): [True: 0, False: 1.62k]
  ------------------
 3465|      0|        ssl_MapLowLevelError(SSL_ERROR_SESSION_KEY_GEN_FAILURE);
 3466|      0|        return SECFailure;
 3467|      0|    }
 3468|       |
 3469|  1.62k|    if (pms_version && ss->opt.detectRollBack) {
  ------------------
  |  Branch (3469:9): [True: 1.26k, False: 357]
  |  Branch (3469:24): [True: 1.26k, False: 0]
  ------------------
 3470|  1.26k|        SSL3ProtocolVersion client_version;
 3471|  1.26k|        client_version = pms_version->major << 8 | pms_version->minor;
 3472|       |
 3473|  1.26k|        if (IS_DTLS(ss)) {
  ------------------
  |  |  892|  1.26k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 1.26k, False: 0]
  |  |  ------------------
  ------------------
 3474|  1.26k|            client_version = dtls_DTLSVersionToTLSVersion(client_version);
 3475|  1.26k|        }
 3476|       |
 3477|  1.26k|        if (client_version != ss->clientHelloVersion) {
  ------------------
  |  Branch (3477:13): [True: 0, False: 1.26k]
  ------------------
 3478|       |            /* Destroy MS.  Version roll-back detected. */
 3479|      0|            PK11_FreeSymKey(ms);
 3480|      0|            ssl_MapLowLevelError(SSL_ERROR_SESSION_KEY_GEN_FAILURE);
 3481|      0|            return SECFailure;
 3482|      0|        }
 3483|  1.26k|    }
 3484|       |
 3485|  1.62k|    if (msp) {
  ------------------
  |  Branch (3485:9): [True: 1.62k, False: 0]
  ------------------
 3486|  1.62k|        *msp = ms;
 3487|  1.62k|    } else {
 3488|      0|        PK11_FreeSymKey(ms);
 3489|      0|    }
 3490|       |
 3491|  1.62k|    return SECSuccess;
 3492|  1.62k|}
ssl3con.c:ssl3_ComputeMasterSecretInt:
 3502|  1.62k|{
 3503|  1.62k|    PRBool isTLS = (PRBool)(ss->version > SSL_LIBRARY_VERSION_3_0);
  ------------------
  |  |   17|  1.62k|#define SSL_LIBRARY_VERSION_3_0                 0x0300
  ------------------
 3504|  1.62k|    PRBool isTLS12 = (PRBool)(ss->version >= SSL_LIBRARY_VERSION_TLS_1_2);
  ------------------
  |  |   20|  1.62k|#define SSL_LIBRARY_VERSION_TLS_1_2             0x0303
  ------------------
 3505|       |    /*
 3506|       |     * Whenever isDH is true, we need to use CKM_TLS_MASTER_KEY_DERIVE_DH
 3507|       |     * which, unlike CKM_TLS_MASTER_KEY_DERIVE, converts arbitrary size
 3508|       |     * data into a 48-byte value, and does not expect to return the version.
 3509|       |     */
 3510|  1.62k|    PRBool isDH = (PRBool)((ss->ssl3.hs.kea_def->exchKeyType == ssl_kea_dh) ||
  ------------------
  |  Branch (3510:28): [True: 0, False: 1.62k]
  ------------------
 3511|  1.62k|                           (ss->ssl3.hs.kea_def->exchKeyType == ssl_kea_ecdh) ||
  ------------------
  |  Branch (3511:28): [True: 355, False: 1.26k]
  ------------------
 3512|  1.62k|                           (ss->ssl3.hs.kea_def->exchKeyType == ssl_kea_ecdh_hybrid));
  ------------------
  |  Branch (3512:28): [True: 0, False: 1.26k]
  ------------------
 3513|  1.62k|    CK_MECHANISM_TYPE master_derive;
 3514|  1.62k|    CK_MECHANISM_TYPE key_derive;
 3515|  1.62k|    SECItem params;
 3516|  1.62k|    CK_FLAGS keyFlags;
 3517|  1.62k|    CK_VERSION pms_version;
 3518|  1.62k|    CK_VERSION *pms_version_ptr = NULL;
 3519|       |    /* master_params may be used as a CK_SSL3_MASTER_KEY_DERIVE_PARAMS */
 3520|  1.62k|    CK_TLS12_MASTER_KEY_DERIVE_PARAMS master_params;
 3521|  1.62k|    unsigned int master_params_len;
 3522|       |
 3523|       |    /* if we are using TLS and we aren't using the extended master secret,
 3524|       |     * and SEC_OID_TLS_REQUIRE_EMS policy is true, fail. The caller will
 3525|       |     * send an alert (eventually). In the RSA Server case, the alert
 3526|       |     * won't happen until Finish time because the upper level code
 3527|       |     * can't tell a difference between this failure and an RSA decrypt
 3528|       |     * failure, so it will proceed with a faux key */
 3529|  1.62k|    if (isTLS) {
  ------------------
  |  Branch (3529:9): [True: 1.62k, False: 0]
  ------------------
 3530|  1.62k|        PRUint32 policy;
 3531|  1.62k|        SECStatus rv;
 3532|       |
 3533|       |        /* first fetch the policy for this algorithm */
 3534|  1.62k|        rv = NSS_GetAlgorithmPolicy(SEC_OID_TLS_REQUIRE_EMS, &policy);
 3535|       |        /* we only look at the policy if we can fetch it. */
 3536|  1.62k|        if ((rv == SECSuccess) && (policy & NSS_USE_ALG_IN_SSL_KX)) {
  ------------------
  |  |  572|  1.62k|#define NSS_USE_ALG_IN_SSL_KX 0x00000004           /* used in SSL key exchange */
  ------------------
  |  Branch (3536:13): [True: 1.62k, False: 0]
  |  Branch (3536:35): [True: 0, False: 1.62k]
  ------------------
 3537|       |            /* just set the error, we don't want to map any errors
 3538|       |             * set by NSS_GetAlgorithmPolicy here */
 3539|      0|            PORT_SetError(SSL_ERROR_MISSING_EXTENDED_MASTER_SECRET);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 3540|      0|            return SECFailure;
 3541|      0|        }
 3542|  1.62k|    }
 3543|       |
 3544|  1.62k|    if (isTLS12) {
  ------------------
  |  Branch (3544:9): [True: 1.55k, False: 65]
  ------------------
 3545|  1.55k|        if (isDH)
  ------------------
  |  Branch (3545:13): [True: 330, False: 1.22k]
  ------------------
 3546|    330|            master_derive = CKM_TLS12_MASTER_KEY_DERIVE_DH;
  ------------------
  |  | 1028|    330|#define CKM_TLS12_MASTER_KEY_DERIVE_DH 0x000003E2UL
  ------------------
 3547|  1.22k|        else
 3548|  1.22k|            master_derive = CKM_TLS12_MASTER_KEY_DERIVE;
  ------------------
  |  | 1026|  1.22k|#define CKM_TLS12_MASTER_KEY_DERIVE 0x000003E0UL
  ------------------
 3549|  1.55k|        key_derive = CKM_TLS12_KEY_AND_MAC_DERIVE;
  ------------------
  |  | 1027|  1.55k|#define CKM_TLS12_KEY_AND_MAC_DERIVE 0x000003E1UL
  ------------------
 3550|  1.55k|        keyFlags = CKF_SIGN | CKF_VERIFY;
  ------------------
  |  | 1356|  1.55k|#define CKF_SIGN 0x00000800UL
  ------------------
                      keyFlags = CKF_SIGN | CKF_VERIFY;
  ------------------
  |  | 1358|  1.55k|#define CKF_VERIFY 0x00002000
  ------------------
 3551|  1.55k|    } else if (isTLS) {
  ------------------
  |  Branch (3551:16): [True: 65, False: 0]
  ------------------
 3552|     65|        if (isDH)
  ------------------
  |  Branch (3552:13): [True: 25, False: 40]
  ------------------
 3553|     25|            master_derive = CKM_TLS_MASTER_KEY_DERIVE_DH;
  ------------------
  |  |  970|     25|#define CKM_TLS_MASTER_KEY_DERIVE_DH 0x00000377UL
  ------------------
 3554|     40|        else
 3555|     40|            master_derive = CKM_TLS_MASTER_KEY_DERIVE;
  ------------------
  |  |  968|     40|#define CKM_TLS_MASTER_KEY_DERIVE 0x00000375UL
  ------------------
 3556|     65|        key_derive = CKM_TLS_KEY_AND_MAC_DERIVE;
  ------------------
  |  |  969|     65|#define CKM_TLS_KEY_AND_MAC_DERIVE 0x00000376UL
  ------------------
 3557|     65|        keyFlags = CKF_SIGN | CKF_VERIFY;
  ------------------
  |  | 1356|     65|#define CKF_SIGN 0x00000800UL
  ------------------
                      keyFlags = CKF_SIGN | CKF_VERIFY;
  ------------------
  |  | 1358|     65|#define CKF_VERIFY 0x00002000
  ------------------
 3558|     65|    } else {
 3559|      0|        if (isDH)
  ------------------
  |  Branch (3559:13): [True: 0, False: 0]
  ------------------
 3560|      0|            master_derive = CKM_SSL3_MASTER_KEY_DERIVE_DH;
  ------------------
  |  |  966|      0|#define CKM_SSL3_MASTER_KEY_DERIVE_DH 0x00000373UL
  ------------------
 3561|      0|        else
 3562|      0|            master_derive = CKM_SSL3_MASTER_KEY_DERIVE;
  ------------------
  |  |  960|      0|#define CKM_SSL3_MASTER_KEY_DERIVE 0x00000371UL
  ------------------
 3563|      0|        key_derive = CKM_SSL3_KEY_AND_MAC_DERIVE;
  ------------------
  |  |  961|      0|#define CKM_SSL3_KEY_AND_MAC_DERIVE 0x00000372UL
  ------------------
 3564|      0|        keyFlags = 0;
 3565|      0|    }
 3566|       |
 3567|  1.62k|    if (!isDH) {
  ------------------
  |  Branch (3567:9): [True: 1.26k, False: 355]
  ------------------
 3568|  1.26k|        pms_version_ptr = &pms_version;
 3569|  1.26k|    }
 3570|       |
 3571|  1.62k|    master_params.pVersion = pms_version_ptr;
 3572|  1.62k|    master_params.RandomInfo.pClientRandom = ss->ssl3.hs.client_random;
 3573|  1.62k|    master_params.RandomInfo.ulClientRandomLen = SSL3_RANDOM_LENGTH;
  ------------------
  |  |   24|  1.62k|#define SSL3_RANDOM_LENGTH 32
  ------------------
 3574|  1.62k|    master_params.RandomInfo.pServerRandom = ss->ssl3.hs.server_random;
 3575|  1.62k|    master_params.RandomInfo.ulServerRandomLen = SSL3_RANDOM_LENGTH;
  ------------------
  |  |   24|  1.62k|#define SSL3_RANDOM_LENGTH 32
  ------------------
 3576|  1.62k|    if (isTLS12) {
  ------------------
  |  Branch (3576:9): [True: 1.55k, False: 65]
  ------------------
 3577|  1.55k|        master_params.prfHashMechanism = ssl3_GetPrfHashMechanism(ss);
 3578|  1.55k|        master_params_len = sizeof(CK_TLS12_MASTER_KEY_DERIVE_PARAMS);
 3579|  1.55k|    } else {
 3580|       |        /* prfHashMechanism is not relevant with this PRF */
 3581|     65|        master_params_len = sizeof(CK_SSL3_MASTER_KEY_DERIVE_PARAMS);
 3582|     65|    }
 3583|       |
 3584|  1.62k|    params.data = (unsigned char *)&master_params;
 3585|  1.62k|    params.len = master_params_len;
 3586|       |
 3587|  1.62k|    return ssl3_ComputeMasterSecretFinish(ss, master_derive, key_derive,
 3588|  1.62k|                                          pms_version_ptr, &params,
 3589|  1.62k|                                          keyFlags, pms, msp);
 3590|  1.62k|}
ssl3con.c:ssl3_DeriveConnectionKeys:
 3693|  1.62k|{
 3694|  1.62k|    ssl3CipherSpec *pwSpec = ss->ssl3.pwSpec;
 3695|  1.62k|    ssl3CipherSpec *prSpec = ss->ssl3.prSpec;
 3696|  1.62k|    ssl3CipherSpec *clientSpec;
 3697|  1.62k|    ssl3CipherSpec *serverSpec;
 3698|  1.62k|    PRBool isTLS = (PRBool)(ss->version > SSL_LIBRARY_VERSION_3_0);
  ------------------
  |  |   17|  1.62k|#define SSL_LIBRARY_VERSION_3_0                 0x0300
  ------------------
 3699|  1.62k|    PRBool isTLS12 =
 3700|  1.62k|        (PRBool)(isTLS && ss->version >= SSL_LIBRARY_VERSION_TLS_1_2);
  ------------------
  |  |   20|  1.62k|#define SSL_LIBRARY_VERSION_TLS_1_2             0x0303
  ------------------
  |  Branch (3700:18): [True: 1.62k, False: 0]
  |  Branch (3700:27): [True: 1.55k, False: 66]
  ------------------
 3701|  1.62k|    const ssl3BulkCipherDef *cipher_def = pwSpec->cipherDef;
 3702|  1.62k|    PK11SlotInfo *slot = NULL;
 3703|  1.62k|    PK11SymKey *derivedKeyHandle = NULL;
 3704|  1.62k|    void *pwArg = ss->pkcs11PinArg;
 3705|  1.62k|    int keySize;
 3706|  1.62k|    CK_TLS12_KEY_MAT_PARAMS key_material_params; /* may be used as a
 3707|       |                                                  * CK_SSL3_KEY_MAT_PARAMS */
 3708|  1.62k|    unsigned int key_material_params_len;
 3709|  1.62k|    CK_SSL3_KEY_MAT_OUT returnedKeys;
 3710|  1.62k|    CK_MECHANISM_TYPE key_derive;
 3711|  1.62k|    CK_MECHANISM_TYPE bulk_mechanism;
 3712|  1.62k|    SSLCipherAlgorithm calg;
 3713|  1.62k|    SECItem params;
 3714|  1.62k|    PRBool skipKeysAndIVs = (PRBool)(cipher_def->calg == ssl_calg_null);
 3715|       |
 3716|  1.62k|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|  1.62k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  2.41k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 836, False: 789]
  |  |  |  |  |  Branch (208:7): [True: 789, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3717|  1.62k|    PORT_Assert(ss->opt.noLocks || ssl_HaveSpecWriteLock(ss));
  ------------------
  |  |  120|  1.62k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  2.41k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 836, False: 789]
  |  |  |  |  |  Branch (208:7): [True: 789, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3718|  1.62k|    PORT_Assert(masterSecret);
  ------------------
  |  |  120|  1.62k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.62k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.62k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3719|       |
 3720|       |    /* These functions operate in terms of who is writing specs. */
 3721|  1.62k|    if (ss->sec.isServer) {
  ------------------
  |  Branch (3721:9): [True: 0, False: 1.62k]
  ------------------
 3722|      0|        clientSpec = prSpec;
 3723|      0|        serverSpec = pwSpec;
 3724|  1.62k|    } else {
 3725|  1.62k|        clientSpec = pwSpec;
 3726|  1.62k|        serverSpec = prSpec;
 3727|  1.62k|    }
 3728|       |
 3729|       |    /*
 3730|       |     * generate the key material
 3731|       |     */
 3732|  1.62k|    if (cipher_def->type == type_block &&
  ------------------
  |  Branch (3732:9): [True: 950, False: 675]
  ------------------
 3733|  1.62k|        ss->version >= SSL_LIBRARY_VERSION_TLS_1_1) {
  ------------------
  |  |   19|    950|#define SSL_LIBRARY_VERSION_TLS_1_1             0x0302
  ------------------
  |  Branch (3733:9): [True: 950, False: 0]
  ------------------
 3734|       |        /* Block ciphers in >= TLS 1.1 use a per-record, explicit IV. */
 3735|    950|        key_material_params.ulIVSizeInBits = 0;
 3736|    950|        PORT_Memset(clientSpec->keyMaterial.iv, 0, cipher_def->iv_size);
  ------------------
  |  |  182|    950|#define PORT_Memset memset
  ------------------
 3737|    950|        PORT_Memset(serverSpec->keyMaterial.iv, 0, cipher_def->iv_size);
  ------------------
  |  |  182|    950|#define PORT_Memset memset
  ------------------
 3738|    950|    }
 3739|       |
 3740|  1.62k|    key_material_params.bIsExport = PR_FALSE;
  ------------------
  |  |  438|  1.62k|#define PR_FALSE 0
  ------------------
 3741|  1.62k|    key_material_params.RandomInfo.pClientRandom = ss->ssl3.hs.client_random;
 3742|  1.62k|    key_material_params.RandomInfo.ulClientRandomLen = SSL3_RANDOM_LENGTH;
  ------------------
  |  |   24|  1.62k|#define SSL3_RANDOM_LENGTH 32
  ------------------
 3743|  1.62k|    key_material_params.RandomInfo.pServerRandom = ss->ssl3.hs.server_random;
 3744|  1.62k|    key_material_params.RandomInfo.ulServerRandomLen = SSL3_RANDOM_LENGTH;
  ------------------
  |  |   24|  1.62k|#define SSL3_RANDOM_LENGTH 32
  ------------------
 3745|  1.62k|    key_material_params.pReturnedKeyMaterial = &returnedKeys;
 3746|       |
 3747|  1.62k|    if (skipKeysAndIVs) {
  ------------------
  |  Branch (3747:9): [True: 550, False: 1.07k]
  ------------------
 3748|    550|        keySize = 0;
 3749|    550|        returnedKeys.pIVClient = NULL;
 3750|    550|        returnedKeys.pIVServer = NULL;
 3751|    550|        key_material_params.ulKeySizeInBits = 0;
 3752|    550|        key_material_params.ulIVSizeInBits = 0;
 3753|  1.07k|    } else {
 3754|  1.07k|        keySize = cipher_def->key_size;
 3755|  1.07k|        returnedKeys.pIVClient = clientSpec->keyMaterial.iv;
 3756|  1.07k|        returnedKeys.pIVServer = serverSpec->keyMaterial.iv;
 3757|  1.07k|        key_material_params.ulKeySizeInBits = cipher_def->secret_key_size * BPB;
  ------------------
  |  |  122|  1.07k|#define BPB 8 /* Bits Per Byte */
  ------------------
 3758|  1.07k|        key_material_params.ulIVSizeInBits = cipher_def->iv_size * BPB;
  ------------------
  |  |  122|  1.07k|#define BPB 8 /* Bits Per Byte */
  ------------------
 3759|  1.07k|    }
 3760|  1.62k|    key_material_params.ulMacSizeInBits = pwSpec->macDef->mac_size * BPB;
  ------------------
  |  |  122|  1.62k|#define BPB 8 /* Bits Per Byte */
  ------------------
 3761|       |
 3762|  1.62k|    calg = cipher_def->calg;
 3763|  1.62k|    bulk_mechanism = ssl3_Alg2Mech(calg);
 3764|       |
 3765|  1.62k|    if (isTLS12) {
  ------------------
  |  Branch (3765:9): [True: 1.55k, False: 66]
  ------------------
 3766|  1.55k|        key_derive = CKM_TLS12_KEY_AND_MAC_DERIVE;
  ------------------
  |  | 1027|  1.55k|#define CKM_TLS12_KEY_AND_MAC_DERIVE 0x000003E1UL
  ------------------
 3767|  1.55k|        key_material_params.prfHashMechanism = ssl3_GetPrfHashMechanism(ss);
 3768|  1.55k|        key_material_params_len = sizeof(CK_TLS12_KEY_MAT_PARAMS);
 3769|  1.55k|    } else if (isTLS) {
  ------------------
  |  Branch (3769:16): [True: 66, False: 0]
  ------------------
 3770|     66|        key_derive = CKM_TLS_KEY_AND_MAC_DERIVE;
  ------------------
  |  |  969|     66|#define CKM_TLS_KEY_AND_MAC_DERIVE 0x00000376UL
  ------------------
 3771|     66|        key_material_params_len = sizeof(CK_SSL3_KEY_MAT_PARAMS);
 3772|     66|    } else {
 3773|      0|        key_derive = CKM_SSL3_KEY_AND_MAC_DERIVE;
  ------------------
  |  |  961|      0|#define CKM_SSL3_KEY_AND_MAC_DERIVE 0x00000372UL
  ------------------
 3774|      0|        key_material_params_len = sizeof(CK_SSL3_KEY_MAT_PARAMS);
 3775|      0|    }
 3776|       |
 3777|  1.62k|    params.data = (unsigned char *)&key_material_params;
 3778|  1.62k|    params.len = key_material_params_len;
 3779|       |
 3780|       |    /* CKM_SSL3_KEY_AND_MAC_DERIVE is defined to set ENCRYPT, DECRYPT, and
 3781|       |     * DERIVE by DEFAULT */
 3782|  1.62k|    derivedKeyHandle = PK11_Derive(masterSecret, key_derive, &params,
 3783|  1.62k|                                   bulk_mechanism, CKA_ENCRYPT, keySize);
  ------------------
  |  |  547|  1.62k|#define CKA_ENCRYPT 0x00000104UL
  ------------------
 3784|  1.62k|    if (!derivedKeyHandle) {
  ------------------
  |  Branch (3784:9): [True: 0, False: 1.62k]
  ------------------
 3785|      0|        ssl_MapLowLevelError(SSL_ERROR_SESSION_KEY_GEN_FAILURE);
 3786|      0|        return SECFailure;
 3787|      0|    }
 3788|       |    /* we really should use the actual mac'ing mechanism here, but we
 3789|       |     * don't because these types are used to map keytype anyway and both
 3790|       |     * mac's map to the same keytype.
 3791|       |     */
 3792|  1.62k|    slot = PK11_GetSlotFromKey(derivedKeyHandle);
 3793|       |
 3794|  1.62k|    PK11_FreeSlot(slot); /* slot is held until the key is freed */
 3795|  1.62k|    clientSpec->keyMaterial.macKey =
 3796|  1.62k|        PK11_SymKeyFromHandle(slot, derivedKeyHandle, PK11_OriginDerive,
 3797|  1.62k|                              CKM_SSL3_SHA1_MAC, returnedKeys.hClientMacSecret,
  ------------------
  |  |  976|  1.62k|#define CKM_SSL3_SHA1_MAC 0x00000381UL
  ------------------
 3798|  1.62k|                              PR_TRUE, pwArg);
  ------------------
  |  |  437|  1.62k|#define PR_TRUE 1
  ------------------
 3799|  1.62k|    if (clientSpec->keyMaterial.macKey == NULL) {
  ------------------
  |  Branch (3799:9): [True: 0, False: 1.62k]
  ------------------
 3800|      0|        goto loser; /* loser sets err */
 3801|      0|    }
 3802|  1.62k|    serverSpec->keyMaterial.macKey =
 3803|  1.62k|        PK11_SymKeyFromHandle(slot, derivedKeyHandle, PK11_OriginDerive,
 3804|  1.62k|                              CKM_SSL3_SHA1_MAC, returnedKeys.hServerMacSecret,
  ------------------
  |  |  976|  1.62k|#define CKM_SSL3_SHA1_MAC 0x00000381UL
  ------------------
 3805|  1.62k|                              PR_TRUE, pwArg);
  ------------------
  |  |  437|  1.62k|#define PR_TRUE 1
  ------------------
 3806|  1.62k|    if (serverSpec->keyMaterial.macKey == NULL) {
  ------------------
  |  Branch (3806:9): [True: 0, False: 1.62k]
  ------------------
 3807|      0|        goto loser; /* loser sets err */
 3808|      0|    }
 3809|  1.62k|    if (!skipKeysAndIVs) {
  ------------------
  |  Branch (3809:9): [True: 1.07k, False: 550]
  ------------------
 3810|  1.07k|        clientSpec->keyMaterial.key =
 3811|  1.07k|            PK11_SymKeyFromHandle(slot, derivedKeyHandle, PK11_OriginDerive,
 3812|  1.07k|                                  bulk_mechanism, returnedKeys.hClientKey,
 3813|  1.07k|                                  PR_TRUE, pwArg);
  ------------------
  |  |  437|  1.07k|#define PR_TRUE 1
  ------------------
 3814|  1.07k|        if (clientSpec->keyMaterial.key == NULL) {
  ------------------
  |  Branch (3814:13): [True: 0, False: 1.07k]
  ------------------
 3815|      0|            goto loser; /* loser sets err */
 3816|      0|        }
 3817|  1.07k|        serverSpec->keyMaterial.key =
 3818|  1.07k|            PK11_SymKeyFromHandle(slot, derivedKeyHandle, PK11_OriginDerive,
 3819|  1.07k|                                  bulk_mechanism, returnedKeys.hServerKey,
 3820|  1.07k|                                  PR_TRUE, pwArg);
  ------------------
  |  |  437|  1.07k|#define PR_TRUE 1
  ------------------
 3821|  1.07k|        if (serverSpec->keyMaterial.key == NULL) {
  ------------------
  |  Branch (3821:13): [True: 0, False: 1.07k]
  ------------------
 3822|      0|            goto loser; /* loser sets err */
 3823|      0|        }
 3824|  1.07k|    }
 3825|  1.62k|    PK11_FreeSymKey(derivedKeyHandle);
 3826|  1.62k|    return SECSuccess;
 3827|       |
 3828|      0|loser:
 3829|      0|    PK11_FreeSymKey(derivedKeyHandle);
 3830|      0|    ssl_MapLowLevelError(SSL_ERROR_SESSION_KEY_GEN_FAILURE);
 3831|      0|    return SECFailure;
 3832|  1.62k|}
ssl3con.c:ssl3_GetPrfHashMechanism:
 3424|  6.25k|{
 3425|  6.25k|    return ssl3_GetHashMechanismByHashType(ss->ssl3.hs.suite_def->prf_hash);
 3426|  6.25k|}
ssl3con.c:ssl3_UpdateDefaultHandshakeHashes:
 4082|  4.35k|{
 4083|  4.35k|    return ssl3_UpdateHandshakeHashesInt(ss, b, l,
 4084|  4.35k|                                         &ss->ssl3.hs.messages);
 4085|  4.35k|}
ssl3con.c:ssl_SignatureSchemeMatchesSpkiOid:
 4418|  2.46k|{
 4419|  2.46k|    SECOidTag authOid = ssl3_AuthTypeToOID(ssl_SignatureSchemeToAuthType(scheme));
 4420|       |
 4421|  2.46k|    if (spkiOid == authOid) {
  ------------------
  |  Branch (4421:9): [True: 2.44k, False: 11]
  ------------------
 4422|  2.44k|        return PR_TRUE;
  ------------------
  |  |  437|  2.44k|#define PR_TRUE 1
  ------------------
 4423|  2.44k|    }
 4424|     11|    if ((authOid == SEC_OID_PKCS1_RSA_ENCRYPTION) &&
  ------------------
  |  Branch (4424:9): [True: 4, False: 7]
  ------------------
 4425|     11|        (spkiOid == SEC_OID_X500_RSA_ENCRYPTION)) {
  ------------------
  |  Branch (4425:9): [True: 0, False: 4]
  ------------------
 4426|      0|        return PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 4427|      0|    }
 4428|     11|    return PR_FALSE;
  ------------------
  |  |  438|     11|#define PR_FALSE 0
  ------------------
 4429|     11|}
ssl3con.c:ssl_SignatureSchemeFromPssSpki:
 4466|     12|{
 4467|     12|    SECKEYRSAPSSParams pssParam = { 0 };
 4468|     12|    PORTCheapArenaPool arena;
 4469|     12|    SECStatus rv;
 4470|       |
 4471|       |    /* The key doesn't have parameters, boo. */
 4472|     12|    if (!spki->algorithm.parameters.len) {
  ------------------
  |  Branch (4472:9): [True: 1, False: 11]
  ------------------
 4473|      1|        *scheme = ssl_sig_none;
 4474|      1|        return SECSuccess;
 4475|      1|    }
 4476|       |
 4477|     11|    PORT_InitCheapArena(&arena, DER_DEFAULT_CHUNKSIZE);
  ------------------
  |  |   60|     11|#define DER_DEFAULT_CHUNKSIZE (2048)
  ------------------
 4478|     11|    rv = SEC_QuickDERDecodeItem(&arena.arena, &pssParam,
  ------------------
  |  |  102|     11|#define SEC_QuickDERDecodeItem SEC_QuickDERDecodeItem_Util
  ------------------
 4479|     11|                                SEC_ASN1_GET(SECKEY_RSAPSSParamsTemplate),
  ------------------
  |  |  188|     11|#define SEC_ASN1_GET(x) x
  ------------------
 4480|     11|                                &spki->algorithm.parameters);
 4481|     11|    if (rv != SECSuccess) {
  ------------------
  |  Branch (4481:9): [True: 2, False: 9]
  ------------------
 4482|      2|        goto loser;
 4483|      2|    }
 4484|       |    /* Not having hashAlg means SHA-1 and we don't accept that. */
 4485|      9|    if (!pssParam.hashAlg) {
  ------------------
  |  Branch (4485:9): [True: 1, False: 8]
  ------------------
 4486|      1|        goto loser;
 4487|      1|    }
 4488|      8|    switch (SECOID_GetAlgorithmTag(pssParam.hashAlg)) {
  ------------------
  |  |  119|      8|#define SECOID_GetAlgorithmTag SECOID_GetAlgorithmTag_Util
  ------------------
 4489|      3|        case SEC_OID_SHA256:
  ------------------
  |  Branch (4489:9): [True: 3, False: 5]
  ------------------
 4490|      3|            *scheme = ssl_sig_rsa_pss_pss_sha256;
 4491|      3|            break;
 4492|      1|        case SEC_OID_SHA384:
  ------------------
  |  Branch (4492:9): [True: 1, False: 7]
  ------------------
 4493|      1|            *scheme = ssl_sig_rsa_pss_pss_sha384;
 4494|      1|            break;
 4495|      3|        case SEC_OID_SHA512:
  ------------------
  |  Branch (4495:9): [True: 3, False: 5]
  ------------------
 4496|      3|            *scheme = ssl_sig_rsa_pss_pss_sha512;
 4497|      3|            break;
 4498|      1|        default:
  ------------------
  |  Branch (4498:9): [True: 1, False: 7]
  ------------------
 4499|      1|            goto loser;
 4500|      8|    }
 4501|       |
 4502|      7|    PORT_DestroyCheapArena(&arena);
 4503|      7|    return SECSuccess;
 4504|       |
 4505|      4|loser:
 4506|      4|    PORT_DestroyCheapArena(&arena);
 4507|      4|    PORT_SetError(SSL_ERROR_BAD_CERTIFICATE);
  ------------------
  |  |   65|      4|#define PORT_SetError PORT_SetError_Util
  ------------------
 4508|      4|    return SECFailure;
 4509|      8|}
ssl3con.c:ssl_SignatureKeyMatchesSpkiOid:
 4585|  2.46k|{
 4586|  2.46k|    switch (spkiOid) {
 4587|      0|        case SEC_OID_X500_RSA_ENCRYPTION:
  ------------------
  |  Branch (4587:9): [True: 0, False: 2.46k]
  ------------------
 4588|  1.13k|        case SEC_OID_PKCS1_RSA_ENCRYPTION:
  ------------------
  |  Branch (4588:9): [True: 1.13k, False: 1.33k]
  ------------------
 4589|  1.13k|        case SEC_OID_PKCS1_RSA_PSS_SIGNATURE:
  ------------------
  |  Branch (4589:9): [True: 1, False: 2.46k]
  ------------------
 4590|  1.13k|            return keaDef->signKeyType == rsaKey;
 4591|  1.13k|        case SEC_OID_ANSIX9_DSA_SIGNATURE:
  ------------------
  |  Branch (4591:9): [True: 1.13k, False: 1.32k]
  ------------------
 4592|  1.13k|            return keaDef->signKeyType == dsaKey;
 4593|    191|        case SEC_OID_ANSIX962_EC_PUBLIC_KEY:
  ------------------
  |  Branch (4593:9): [True: 191, False: 2.27k]
  ------------------
 4594|    191|            return keaDef->signKeyType == ecKey;
 4595|      1|        default:
  ------------------
  |  Branch (4595:9): [True: 1, False: 2.46k]
  ------------------
 4596|      1|            break;
 4597|  2.46k|    }
 4598|      1|    return PR_FALSE;
  ------------------
  |  |  438|      1|#define PR_FALSE 0
  ------------------
 4599|  2.46k|}
ssl3con.c:ssl_SchemePolicyOK:
  805|   209k|{
  806|       |    /* Hash policy. */
  807|   209k|    PRUint32 policy;
  808|   209k|    SECOidTag hashOID = ssl3_HashTypeToOID(ssl_SignatureSchemeToHashType(scheme));
  809|   209k|    SECOidTag sigOID;
  810|       |
  811|       |    /* policy bits needed to enable a SignatureScheme */
  812|   209k|    SECStatus rv = NSS_GetAlgorithmPolicy(hashOID, &policy);
  813|   209k|    if (rv == SECSuccess &&
  ------------------
  |  Branch (813:9): [True: 209k, False: 0]
  ------------------
  814|   209k|        (policy & require) != require) {
  ------------------
  |  Branch (814:9): [True: 0, False: 209k]
  ------------------
  815|      0|        return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  816|      0|    }
  817|       |
  818|       |    /* ssl_SignatureSchemeToAuthType reports rsa for rsa_pss_rsae, but we
  819|       |     * actually implement pss signatures when we sign, so just use RSA_PSS
  820|       |     * for all RSA PSS Siganture schemes */
  821|   209k|    if (ssl_IsRsaPssSignatureScheme(scheme)) {
  ------------------
  |  Branch (821:9): [True: 38.3k, False: 171k]
  ------------------
  822|  38.3k|        sigOID = SEC_OID_PKCS1_RSA_PSS_SIGNATURE;
  823|   171k|    } else {
  824|   171k|        sigOID = ssl3_AuthTypeToOID(ssl_SignatureSchemeToAuthType(scheme));
  825|   171k|    }
  826|       |    /* Signature Policy. */
  827|   209k|    rv = NSS_GetAlgorithmPolicy(sigOID, &policy);
  828|   209k|    if (rv == SECSuccess &&
  ------------------
  |  Branch (828:9): [True: 209k, False: 0]
  ------------------
  829|   209k|        (policy & require) != require) {
  ------------------
  |  Branch (829:9): [True: 0, False: 209k]
  ------------------
  830|      0|        return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  831|      0|    }
  832|   209k|    return PR_TRUE;
  ------------------
  |  |  437|   209k|#define PR_TRUE 1
  ------------------
  833|   209k|}
ssl3con.c:ssl3_GetSuitePrfHash:
 3430|  1.56k|{
 3431|       |    /* ssl_hash_none is for pre-1.2 suites, which use SHA-256. */
 3432|  1.56k|    if (ss->ssl3.hs.suite_def->prf_hash == ssl_hash_none) {
  ------------------
  |  Branch (3432:9): [True: 1.27k, False: 291]
  ------------------
 3433|  1.27k|        return ssl_hash_sha256;
 3434|  1.27k|    }
 3435|    291|    return ss->ssl3.hs.suite_def->prf_hash;
 3436|  1.56k|}
ssl3con.c:ssl3_ComputeHandshakeHash:
 4821|  1.56k|{
 4822|  1.56k|    SECStatus rv = SECFailure;
 4823|  1.56k|    PK11Context *hashContext = PK11_CreateDigestContext(
 4824|  1.56k|        ssl3_HashTypeToOID(hashAlg));
 4825|       |
 4826|  1.56k|    if (!hashContext) {
  ------------------
  |  Branch (4826:9): [True: 0, False: 1.56k]
  ------------------
 4827|      0|        return rv;
 4828|      0|    }
 4829|  1.56k|    rv = PK11_DigestBegin(hashContext);
 4830|  1.56k|    if (rv == SECSuccess) {
  ------------------
  |  Branch (4830:9): [True: 1.56k, False: 0]
  ------------------
 4831|  1.56k|        rv = PK11_DigestOp(hashContext, buf, len);
 4832|  1.56k|    }
 4833|  1.56k|    if (rv == SECSuccess) {
  ------------------
  |  Branch (4833:9): [True: 1.56k, False: 0]
  ------------------
 4834|  1.56k|        rv = PK11_DigestFinal(hashContext, hashes->u.raw, &hashes->len,
 4835|  1.56k|                              sizeof(hashes->u.raw));
 4836|  1.56k|    }
 4837|  1.56k|    if (rv == SECSuccess) {
  ------------------
  |  Branch (4837:9): [True: 1.56k, False: 0]
  ------------------
 4838|  1.56k|        hashes->hashAlg = hashAlg;
 4839|  1.56k|    }
 4840|  1.56k|    PK11_DestroyContext(hashContext, PR_TRUE);
  ------------------
  |  |  437|  1.56k|#define PR_TRUE 1
  ------------------
 4841|  1.56k|    return rv;
 4842|  1.56k|}
ssl3con.c:ssl3_AppendCipherSuites:
 5153|  11.0k|{
 5154|  11.0k|    SECStatus rv;
 5155|  11.0k|    unsigned int offset;
 5156|  11.0k|    unsigned int i;
 5157|  11.0k|    unsigned int saveLen;
 5158|       |
 5159|  11.0k|    rv = sslBuffer_Skip(buf, 2, &offset);
 5160|  11.0k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (5160:9): [True: 0, False: 11.0k]
  ------------------
 5161|      0|        return SECFailure;
 5162|      0|    }
 5163|       |
 5164|  11.0k|    if (ss->ssl3.hs.sendingSCSV) {
  ------------------
  |  Branch (5164:9): [True: 0, False: 11.0k]
  ------------------
 5165|       |        /* Add the actual SCSV */
 5166|      0|        rv = sslBuffer_AppendNumber(buf, TLS_EMPTY_RENEGOTIATION_INFO_SCSV,
  ------------------
  |  |  150|      0|#define TLS_EMPTY_RENEGOTIATION_INFO_SCSV       0x00FF
  ------------------
 5167|      0|                                    sizeof(ssl3CipherSuite));
 5168|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (5168:13): [True: 0, False: 0]
  ------------------
 5169|      0|            return SECFailure;
 5170|      0|        }
 5171|      0|    }
 5172|  11.0k|    if (fallbackSCSV) {
  ------------------
  |  Branch (5172:9): [True: 5.48k, False: 5.52k]
  ------------------
 5173|  5.48k|        rv = sslBuffer_AppendNumber(buf, TLS_FALLBACK_SCSV,
  ------------------
  |  |  155|  5.48k|#define TLS_FALLBACK_SCSV                       0x5600
  ------------------
 5174|  5.48k|                                    sizeof(ssl3CipherSuite));
 5175|  5.48k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (5175:13): [True: 0, False: 5.48k]
  ------------------
 5176|      0|            return SECFailure;
 5177|      0|        }
 5178|  5.48k|    }
 5179|       |
 5180|  11.0k|    saveLen = SSL_BUFFER_LEN(buf);
  ------------------
  |  |   36|  11.0k|#define SSL_BUFFER_LEN(b) ((b)->len)
  ------------------
 5181|       |    /* CipherSuites are appended to Hello message here */
 5182|   792k|    for (i = 0; i < ssl_V3_SUITES_IMPLEMENTED; i++) {
  ------------------
  |  |  245|   792k|#define ssl_V3_SUITES_IMPLEMENTED 71
  ------------------
  |  Branch (5182:17): [True: 781k, False: 11.0k]
  ------------------
 5183|   781k|        ssl3CipherSuiteCfg *suite = &ss->cipherSuites[i];
 5184|   781k|        if (ssl3_config_match(suite, ss->ssl3.policy, &ss->vrange, ss)) {
  ------------------
  |  Branch (5184:13): [True: 629k, False: 152k]
  ------------------
 5185|   629k|            rv = sslBuffer_AppendNumber(buf, suite->cipher_suite,
 5186|   629k|                                        sizeof(ssl3CipherSuite));
 5187|   629k|            if (rv != SECSuccess) {
  ------------------
  |  Branch (5187:17): [True: 0, False: 629k]
  ------------------
 5188|      0|                return SECFailure;
 5189|      0|            }
 5190|   629k|        }
 5191|   781k|    }
 5192|       |
 5193|       |    /* GREASE CipherSuites:
 5194|       |     * A client MAY select one or more GREASE cipher suite values and advertise
 5195|       |     * them in the "cipher_suites" field [RFC8701, Section 3.1]. */
 5196|  11.0k|    if (ss->opt.enableGrease && ss->vrange.max >= SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|  5.49k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (5196:9): [True: 5.49k, False: 5.51k]
  |  Branch (5196:33): [True: 4.76k, False: 723]
  ------------------
 5197|  4.76k|        rv = sslBuffer_AppendNumber(buf, ss->ssl3.hs.grease->idx[grease_cipher],
 5198|  4.76k|                                    sizeof(ssl3CipherSuite));
 5199|  4.76k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (5199:13): [True: 0, False: 4.76k]
  ------------------
 5200|      0|            return SECFailure;
 5201|      0|        }
 5202|  4.76k|    }
 5203|       |
 5204|  11.0k|    if (SSL_ALL_VERSIONS_DISABLED(&ss->vrange) ||
  ------------------
  |  | 1503|  22.0k|    ((vrange)->min == SSL_LIBRARY_VERSION_NONE)
  |  |  ------------------
  |  |  |  | 1481|  11.0k|#define SSL_LIBRARY_VERSION_NONE 0
  |  |  ------------------
  |  |  |  Branch (1503:5): [True: 0, False: 11.0k]
  |  |  ------------------
  ------------------
 5205|  11.0k|        (SSL_BUFFER_LEN(buf) - saveLen) == 0) {
  ------------------
  |  |   36|  11.0k|#define SSL_BUFFER_LEN(b) ((b)->len)
  ------------------
  |  Branch (5205:9): [True: 0, False: 11.0k]
  ------------------
 5206|      0|        PORT_SetError(SSL_ERROR_SSL_DISABLED);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 5207|      0|        return SECFailure;
 5208|      0|    }
 5209|       |
 5210|  11.0k|    return sslBuffer_InsertLength(buf, offset, 2);
 5211|  11.0k|}
ssl3con.c:ssl_SetClientHelloSpecVersion:
 5098|  9.36k|{
 5099|  9.36k|    ssl_GetSpecWriteLock(ss);
  ------------------
  |  | 1435|  9.36k|    {                                            \
  |  | 1436|  9.36k|        if (!ss->opt.noLocks)                    \
  |  |  ------------------
  |  |  |  Branch (1436:13): [True: 4.61k, False: 4.75k]
  |  |  ------------------
  |  | 1437|  9.36k|            NSSRWLock_LockWrite((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   48|  4.61k|#define NSSRWLock_LockWrite NSSRWLock_LockWrite_Util
  |  |  ------------------
  |  | 1438|  9.36k|    }
  ------------------
 5100|  9.36k|    PORT_Assert(spec->cipherDef->cipher == cipher_null);
  ------------------
  |  |  120|  9.36k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  9.36k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 9.36k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5101|       |    /* This is - a best guess - but it doesn't matter here. */
 5102|  9.36k|    spec->version = ss->vrange.max;
 5103|  9.36k|    if (IS_DTLS(ss)) {
  ------------------
  |  |  892|  9.36k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 9.36k, False: 0]
  |  |  ------------------
  ------------------
 5104|  9.36k|        spec->recordVersion = SSL_LIBRARY_VERSION_DTLS_1_0_WIRE;
  ------------------
  |  |   32|  9.36k|#define SSL_LIBRARY_VERSION_DTLS_1_0_WIRE       ((~0x0100) & 0xffff)
  ------------------
 5105|  9.36k|    } else {
 5106|       |        /* For new connections, cap the record layer version number of TLS
 5107|       |         * ClientHello to { 3, 1 } (TLS 1.0). Some TLS 1.0 servers (which seem
 5108|       |         * to use F5 BIG-IP) ignore ClientHello.client_version and use the
 5109|       |         * record layer version number (TLSPlaintext.version) instead when
 5110|       |         * negotiating protocol versions. In addition, if the record layer
 5111|       |         * version number of ClientHello is { 3, 2 } (TLS 1.1) or higher, these
 5112|       |         * servers reset the TCP connections. Lastly, some F5 BIG-IP servers
 5113|       |         * hang if a record containing a ClientHello has a version greater than
 5114|       |         * { 3, 1 } and a length greater than 255. Set this flag to work around
 5115|       |         * such servers.
 5116|       |         *
 5117|       |         * The final version is set when a version is negotiated.
 5118|       |         */
 5119|      0|        spec->recordVersion = PR_MIN(SSL_LIBRARY_VERSION_TLS_1_0,
  ------------------
  |  |  158|      0|#define PR_MIN(x,y)     ((x)<(y)?(x):(y))
  |  |  ------------------
  |  |  |  Branch (158:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5120|      0|                                     ss->vrange.max);
 5121|      0|    }
 5122|  9.36k|    ssl_ReleaseSpecWriteLock(ss);
  ------------------
  |  | 1440|  9.36k|    {                                              \
  |  | 1441|  9.36k|        if (!ss->opt.noLocks)                      \
  |  |  ------------------
  |  |  |  Branch (1441:13): [True: 4.61k, False: 4.75k]
  |  |  ------------------
  |  | 1442|  9.36k|            NSSRWLock_UnlockWrite((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   51|  4.61k|#define NSSRWLock_UnlockWrite NSSRWLock_UnlockWrite_Util
  |  |  ------------------
  |  | 1443|  9.36k|    }
  ------------------
 5123|  9.36k|}
ssl3con.c:ssl3_ClientAuthCallbackOutcome:
 8016|     13|{
 8017|     13|    SECStatus rv;
 8018|     13|    switch (outcome) {
 8019|      0|        case SECSuccess:
  ------------------
  |  Branch (8019:9): [True: 0, False: 13]
  ------------------
 8020|       |            /* check what the callback function returned */
 8021|      0|            if ((!ss->ssl3.clientCertificate) || (!ss->ssl3.clientPrivateKey)) {
  ------------------
  |  Branch (8021:17): [True: 0, False: 0]
  |  Branch (8021:50): [True: 0, False: 0]
  ------------------
 8022|       |                /* we are missing either the key or cert */
 8023|      0|                goto send_no_certificate;
 8024|      0|            }
 8025|       |            /* Setting ssl3.clientCertChain non-NULL will cause
 8026|       |             * ssl3_HandleServerHelloDone to call SendCertificate.
 8027|       |             */
 8028|      0|            ss->ssl3.clientCertChain = CERT_CertChainFromCert(
 8029|      0|                ss->ssl3.clientCertificate,
 8030|      0|                certUsageSSLClient, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 8031|      0|            if (ss->ssl3.clientCertChain == NULL) {
  ------------------
  |  Branch (8031:17): [True: 0, False: 0]
  ------------------
 8032|      0|                goto send_no_certificate;
 8033|      0|            }
 8034|      0|            if (ss->ssl3.hs.hashType == handshake_hash_record ||
  ------------------
  |  Branch (8034:17): [True: 0, False: 0]
  ------------------
 8035|      0|                ss->ssl3.hs.hashType == handshake_hash_single) {
  ------------------
  |  Branch (8035:17): [True: 0, False: 0]
  ------------------
 8036|      0|                rv = ssl_PickClientSignatureScheme(ss,
 8037|      0|                                                   ss->ssl3.clientCertificate,
 8038|      0|                                                   ss->ssl3.clientPrivateKey,
 8039|      0|                                                   ss->ssl3.hs.clientAuthSignatureSchemes,
 8040|      0|                                                   ss->ssl3.hs.clientAuthSignatureSchemesLen,
 8041|      0|                                                   &ss->ssl3.hs.signatureScheme);
 8042|      0|                if (rv != SECSuccess) {
  ------------------
  |  Branch (8042:21): [True: 0, False: 0]
  ------------------
 8043|       |                    /* This should only happen if our schemes changed or
 8044|       |                     * if an RSA-PSS cert was selected, but the token
 8045|       |                     * does not support PSS schemes.
 8046|       |                     */
 8047|      0|                    goto send_no_certificate;
 8048|      0|                }
 8049|      0|            }
 8050|      0|            break;
 8051|       |
 8052|     13|        case SECFailure:
  ------------------
  |  Branch (8052:9): [True: 13, False: 0]
  ------------------
 8053|     13|        default:
  ------------------
  |  Branch (8053:9): [True: 0, False: 13]
  ------------------
 8054|     13|        send_no_certificate:
 8055|     13|            CERT_DestroyCertificate(ss->ssl3.clientCertificate);
 8056|     13|            SECKEY_DestroyPrivateKey(ss->ssl3.clientPrivateKey);
 8057|     13|            ss->ssl3.clientCertificate = NULL;
 8058|     13|            ss->ssl3.clientPrivateKey = NULL;
 8059|     13|            if (ss->ssl3.clientCertChain) {
  ------------------
  |  Branch (8059:17): [True: 0, False: 13]
  ------------------
 8060|      0|                CERT_DestroyCertificateList(ss->ssl3.clientCertChain);
 8061|      0|                ss->ssl3.clientCertChain = NULL;
 8062|      0|            }
 8063|       |
 8064|     13|            if (ss->version > SSL_LIBRARY_VERSION_3_0) {
  ------------------
  |  |   17|     13|#define SSL_LIBRARY_VERSION_3_0                 0x0300
  ------------------
  |  Branch (8064:17): [True: 13, False: 0]
  ------------------
 8065|     13|                ss->ssl3.sendEmptyCert = PR_TRUE;
  ------------------
  |  |  437|     13|#define PR_TRUE 1
  ------------------
 8066|     13|            } else {
 8067|      0|                (void)SSL3_SendAlert(ss, alert_warning, no_certificate);
 8068|      0|            }
 8069|     13|            break;
 8070|     13|    }
 8071|       |
 8072|       |    /* Release the cached parameters */
 8073|     13|    PORT_Free(ss->ssl3.hs.clientAuthSignatureSchemes);
  ------------------
  |  |   60|     13|#define PORT_Free PORT_Free_Util
  ------------------
 8074|     13|    ss->ssl3.hs.clientAuthSignatureSchemes = NULL;
 8075|     13|    ss->ssl3.hs.clientAuthSignatureSchemesLen = 0;
 8076|     13|}
ssl3con.c:ssl_SetSpecVersions:
 1138|  18.0k|{
 1139|  18.0k|    spec->version = ss->version;
 1140|  18.0k|    if (ss->version >= SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|  18.0k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (1140:9): [True: 1.58k, False: 16.4k]
  ------------------
 1141|  1.58k|        tls13_SetSpecRecordVersion(ss, spec);
 1142|  16.4k|    } else if (IS_DTLS(ss)) {
  ------------------
  |  |  892|  16.4k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 16.4k, False: 0]
  |  |  ------------------
  ------------------
 1143|  16.4k|        spec->recordVersion = dtls_TLSVersionToDTLSVersion(ss->version);
 1144|  16.4k|    } else {
 1145|      0|        spec->recordVersion = ss->version;
 1146|      0|    }
 1147|  18.0k|}
ssl3con.c:ssl3_ComputeDHKeyHash:
 1578|  1.14k|{
 1579|  1.14k|    sslBuffer buf = SSL_BUFFER_EMPTY;
  ------------------
  |  |   23|  1.14k|    {                        \
  |  |   24|  1.14k|        NULL, 0, 0, PR_FALSE \
  |  |  ------------------
  |  |  |  |  438|  1.14k|#define PR_FALSE 0
  |  |  ------------------
  |  |   25|  1.14k|    }
  ------------------
 1580|  1.14k|    SECStatus rv;
 1581|  1.14k|    unsigned int yLen;
 1582|  1.14k|    unsigned int i;
 1583|       |
 1584|  1.14k|    PORT_Assert(dh_p.data);
  ------------------
  |  |  120|  1.14k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.14k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.14k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1585|  1.14k|    PORT_Assert(dh_g.data);
  ------------------
  |  |  120|  1.14k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.14k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.14k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1586|  1.14k|    PORT_Assert(dh_Ys.data);
  ------------------
  |  |  120|  1.14k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.14k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.14k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1587|       |
 1588|  1.14k|    rv = sslBuffer_Append(&buf, ss->ssl3.hs.client_random, SSL3_RANDOM_LENGTH);
  ------------------
  |  |   24|  1.14k|#define SSL3_RANDOM_LENGTH 32
  ------------------
 1589|  1.14k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1589:9): [True: 0, False: 1.14k]
  ------------------
 1590|      0|        goto loser;
 1591|      0|    }
 1592|  1.14k|    rv = sslBuffer_Append(&buf, ss->ssl3.hs.server_random, SSL3_RANDOM_LENGTH);
  ------------------
  |  |   24|  1.14k|#define SSL3_RANDOM_LENGTH 32
  ------------------
 1593|  1.14k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1593:9): [True: 0, False: 1.14k]
  ------------------
 1594|      0|        goto loser;
 1595|      0|    }
 1596|       |    /* p */
 1597|  1.14k|    rv = sslBuffer_AppendVariable(&buf, dh_p.data, dh_p.len, 2);
 1598|  1.14k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1598:9): [True: 0, False: 1.14k]
  ------------------
 1599|      0|        goto loser;
 1600|      0|    }
 1601|       |    /* g */
 1602|  1.14k|    rv = sslBuffer_AppendVariable(&buf, dh_g.data, dh_g.len, 2);
 1603|  1.14k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1603:9): [True: 0, False: 1.14k]
  ------------------
 1604|      0|        goto loser;
 1605|      0|    }
 1606|       |    /* y - complicated by padding */
 1607|  1.14k|    yLen = padY ? dh_p.len : dh_Ys.len;
  ------------------
  |  Branch (1607:12): [True: 0, False: 1.14k]
  ------------------
 1608|  1.14k|    rv = sslBuffer_AppendNumber(&buf, yLen, 2);
 1609|  1.14k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1609:9): [True: 0, False: 1.14k]
  ------------------
 1610|      0|        goto loser;
 1611|      0|    }
 1612|       |    /* If we're padding Y, dh_Ys can't be longer than dh_p. */
 1613|  1.14k|    PORT_Assert(!padY || dh_p.len >= dh_Ys.len);
  ------------------
  |  |  120|  1.14k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.14k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 1.14k, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1614|  1.14k|    for (i = dh_Ys.len; i < yLen; ++i) {
  ------------------
  |  Branch (1614:25): [True: 0, False: 1.14k]
  ------------------
 1615|      0|        rv = sslBuffer_AppendNumber(&buf, 0, 1);
 1616|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (1616:13): [True: 0, False: 0]
  ------------------
 1617|      0|            goto loser;
 1618|      0|        }
 1619|      0|    }
 1620|  1.14k|    rv = sslBuffer_Append(&buf, dh_Ys.data, dh_Ys.len);
 1621|  1.14k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1621:9): [True: 0, False: 1.14k]
  ------------------
 1622|      0|        goto loser;
 1623|      0|    }
 1624|       |
 1625|  1.14k|    rv = ssl3_ComputeCommonKeyHash(hashAlg, SSL_BUFFER_BASE(&buf),
  ------------------
  |  |   35|  1.14k|#define SSL_BUFFER_BASE(b) ((b)->buf)
  ------------------
 1626|  1.14k|                                   SSL_BUFFER_LEN(&buf), hashes);
  ------------------
  |  |   36|  1.14k|#define SSL_BUFFER_LEN(b) ((b)->len)
  ------------------
 1627|  1.14k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1627:9): [True: 0, False: 1.14k]
  ------------------
 1628|      0|        goto loser;
 1629|      0|    }
 1630|       |
 1631|  1.14k|    PRINT_BUF(95, (NULL, "DHkey hash: ", SSL_BUFFER_BASE(&buf),
  ------------------
  |  |   74|  1.14k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 1.14k]
  |  |  ------------------
  |  |   75|  1.14k|    ssl_PrintBuf b
  ------------------
 1632|  1.14k|                   SSL_BUFFER_LEN(&buf)));
 1633|  1.14k|    if (hashAlg == ssl_hash_none) {
  ------------------
  |  Branch (1633:9): [True: 3, False: 1.13k]
  ------------------
 1634|      3|        PRINT_BUF(95, (NULL, "DHkey hash: MD5 result",
  ------------------
  |  |   74|      3|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 3]
  |  |  ------------------
  |  |   75|      3|    ssl_PrintBuf b
  ------------------
 1635|      3|                       hashes->u.s.md5, MD5_LENGTH));
 1636|      3|        PRINT_BUF(95, (NULL, "DHkey hash: SHA1 result",
  ------------------
  |  |   74|      3|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 3]
  |  |  ------------------
  |  |   75|      3|    ssl_PrintBuf b
  ------------------
 1637|      3|                       hashes->u.s.sha, SHA1_LENGTH));
 1638|  1.13k|    } else {
 1639|  1.13k|        PRINT_BUF(95, (NULL, "DHkey hash: result",
  ------------------
  |  |   74|  1.13k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 1.13k]
  |  |  ------------------
  |  |   75|  1.13k|    ssl_PrintBuf b
  ------------------
 1640|  1.13k|                       hashes->u.raw, hashes->len));
 1641|  1.13k|    }
 1642|       |
 1643|  1.14k|    sslBuffer_Clear(&buf);
 1644|  1.14k|    return SECSuccess;
 1645|       |
 1646|      0|loser:
 1647|      0|    sslBuffer_Clear(&buf);
 1648|      0|    return SECFailure;
 1649|  1.14k|}
ssl3con.c:ssl_SignatureSchemeAccepted:
  841|   262k|{
  842|       |    /* Disable RSA-PSS schemes if there are no tokens to verify them. */
  843|   262k|    if (ssl_IsRsaPssSignatureScheme(scheme)) {
  ------------------
  |  Branch (843:9): [True: 35.8k, False: 226k]
  ------------------
  844|  35.8k|        if (!PK11_TokenExists(auth_alg_defs[ssl_auth_rsa_pss])) {
  ------------------
  |  Branch (844:13): [True: 0, False: 35.8k]
  ------------------
  845|      0|            return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  846|      0|        }
  847|   226k|    } else if (!forCert && ssl_IsRsaPkcs1SignatureScheme(scheme)) {
  ------------------
  |  Branch (847:16): [True: 101k, False: 125k]
  |  Branch (847:28): [True: 27.2k, False: 73.7k]
  ------------------
  848|       |        /* Disable PKCS#1 signatures if we are limited to TLS 1.3.
  849|       |         * We still need to advertise PKCS#1 signatures in CH and CR
  850|       |         * for certificate signatures.
  851|       |         */
  852|  27.2k|        if (minVersion >= SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|  27.2k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (852:13): [True: 27.2k, False: 0]
  ------------------
  853|  27.2k|            return PR_FALSE;
  ------------------
  |  |  438|  27.2k|#define PR_FALSE 0
  ------------------
  854|  27.2k|        }
  855|   199k|    } else if (ssl_IsDsaSignatureScheme(scheme)) {
  ------------------
  |  Branch (855:16): [True: 70.6k, False: 128k]
  ------------------
  856|       |        /* DSA: not in TLS 1.3, and check policy. */
  857|  70.6k|        if (minVersion >= SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|  70.6k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (857:13): [True: 31.6k, False: 38.9k]
  ------------------
  858|  31.6k|            return PR_FALSE;
  ------------------
  |  |  438|  31.6k|#define PR_FALSE 0
  ------------------
  859|  31.6k|        }
  860|  70.6k|    }
  861|       |
  862|   203k|    return ssl_SchemePolicyOK(scheme, kSSLSigSchemePolicy);
  863|   262k|}
ssl3con.c:ssl3_CheckFalseStart:
 8168|    794|{
 8169|    794|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|    794|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.19k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 392, False: 402]
  |  |  |  |  |  Branch (208:7): [True: 402, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8170|    794|    PORT_Assert(!ss->ssl3.hs.authCertificatePending);
  ------------------
  |  |  120|    794|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    794|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 794, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8171|    794|    PORT_Assert(!ss->ssl3.hs.canFalseStart);
  ------------------
  |  |  120|    794|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    794|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 794, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8172|       |
 8173|    794|    if (!ss->canFalseStartCallback) {
  ------------------
  |  Branch (8173:9): [True: 0, False: 794]
  ------------------
 8174|      0|        SSL_TRC(3, ("%d: SSL[%d]: no false start callback so no false start",
  ------------------
  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    ssl_Trace b
  ------------------
 8175|      0|                    SSL_GETPID(), ss->fd));
 8176|    794|    } else {
 8177|    794|        SECStatus rv;
 8178|       |
 8179|    794|        rv = ssl_CheckServerRandom(ss);
 8180|    794|        if (rv != SECSuccess) {
  ------------------
  |  Branch (8180:13): [True: 0, False: 794]
  ------------------
 8181|      0|            SSL_TRC(3, ("%d: SSL[%d]: no false start due to possible downgrade",
  ------------------
  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    ssl_Trace b
  ------------------
 8182|      0|                        SSL_GETPID(), ss->fd));
 8183|      0|            goto no_false_start;
 8184|      0|        }
 8185|       |
 8186|       |        /* An attacker can control the selected ciphersuite so we only wish to
 8187|       |         * do False Start in the case that the selected ciphersuite is
 8188|       |         * sufficiently strong that the attack can gain no advantage.
 8189|       |         * Therefore we always require an 80-bit cipher. */
 8190|    794|        ssl_GetSpecReadLock(ss);
  ------------------
  |  | 1422|    794|    {                                           \
  |  | 1423|    794|        if (!ss->opt.noLocks)                   \
  |  |  ------------------
  |  |  |  Branch (1423:13): [True: 402, False: 392]
  |  |  ------------------
  |  | 1424|    794|            NSSRWLock_LockRead((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   47|    402|#define NSSRWLock_LockRead NSSRWLock_LockRead_Util
  |  |  ------------------
  |  | 1425|    794|    }
  ------------------
 8191|    794|        PRBool weakCipher = ss->ssl3.cwSpec->cipherDef->secret_key_size < 10;
 8192|    794|        ssl_ReleaseSpecReadLock(ss);
  ------------------
  |  | 1427|    794|    {                                             \
  |  | 1428|    794|        if (!ss->opt.noLocks)                     \
  |  |  ------------------
  |  |  |  Branch (1428:13): [True: 402, False: 392]
  |  |  ------------------
  |  | 1429|    794|            NSSRWLock_UnlockRead((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   50|    402|#define NSSRWLock_UnlockRead NSSRWLock_UnlockRead_Util
  |  |  ------------------
  |  | 1430|    794|    }
  ------------------
 8193|    794|        if (weakCipher) {
  ------------------
  |  Branch (8193:13): [True: 276, False: 518]
  ------------------
 8194|    276|            SSL_TRC(3, ("%d: SSL[%d]: no false start due to weak cipher",
  ------------------
  |  |   71|    276|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 276]
  |  |  ------------------
  |  |   72|    276|    ssl_Trace b
  ------------------
 8195|    276|                        SSL_GETPID(), ss->fd));
 8196|    276|            goto no_false_start;
 8197|    276|        }
 8198|       |
 8199|    518|        if (ssl3_ExtensionAdvertised(ss, ssl_tls13_encrypted_client_hello_xtn)) {
  ------------------
  |  Branch (8199:13): [True: 0, False: 518]
  ------------------
 8200|      0|            SSL_TRC(3, ("%d: SSL[%d]: no false start due to lower version after ECH",
  ------------------
  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    ssl_Trace b
  ------------------
 8201|      0|                        SSL_GETPID(), ss->fd));
 8202|      0|            goto no_false_start;
 8203|      0|        }
 8204|       |
 8205|    518|        PORT_Assert((ss->ssl3.hs.preliminaryInfo & ssl_preinfo_all) ==
  ------------------
  |  |  120|    518|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    518|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 518, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8206|    518|                    ssl_preinfo_all);
 8207|    518|        rv = (ss->canFalseStartCallback)(ss->fd,
 8208|    518|                                         ss->canFalseStartCallbackData,
 8209|    518|                                         &ss->ssl3.hs.canFalseStart);
 8210|    518|        if (rv == SECSuccess) {
  ------------------
  |  Branch (8210:13): [True: 518, False: 0]
  ------------------
 8211|    518|            SSL_TRC(3, ("%d: SSL[%d]: false start callback returned %s",
  ------------------
  |  |   71|    518|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 518]
  |  |  ------------------
  |  |   72|    518|    ssl_Trace b
  |  |  ------------------
  |  |  |  Branch (72:15): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 8212|    518|                        SSL_GETPID(), ss->fd,
 8213|    518|                        ss->ssl3.hs.canFalseStart ? "TRUE"
 8214|    518|                                                  : "FALSE"));
 8215|    518|        } else {
 8216|      0|            SSL_TRC(3, ("%d: SSL[%d]: false start callback failed (%s)",
  ------------------
  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    ssl_Trace b
  ------------------
 8217|      0|                        SSL_GETPID(), ss->fd,
 8218|      0|                        PR_ErrorToName(PR_GetError())));
 8219|      0|        }
 8220|    518|        return rv;
 8221|    518|    }
 8222|       |
 8223|    276|no_false_start:
 8224|    276|    ss->ssl3.hs.canFalseStart = PR_FALSE;
  ------------------
  |  |  438|    276|#define PR_FALSE 0
  ------------------
 8225|    276|    return SECSuccess;
 8226|    794|}
ssl3con.c:ssl_CheckServerRandom:
 7028|  9.23k|{
 7029|       |    /* Check the ServerHello.random per [RFC 8446 Section 4.1.3].
 7030|       |     *
 7031|       |     * TLS 1.3 clients receiving a ServerHello indicating TLS 1.2 or below
 7032|       |     * MUST check that the last 8 bytes are not equal to either of these
 7033|       |     * values.  TLS 1.2 clients SHOULD also check that the last 8 bytes are
 7034|       |     * not equal to the second value if the ServerHello indicates TLS 1.1 or
 7035|       |     * below.  If a match is found, the client MUST abort the handshake with
 7036|       |     * an "illegal_parameter" alert.
 7037|       |     */
 7038|  9.23k|    SSL3ProtocolVersion checkVersion =
 7039|  9.23k|        ss->ssl3.downgradeCheckVersion ? ss->ssl3.downgradeCheckVersion
  ------------------
  |  Branch (7039:9): [True: 0, False: 9.23k]
  ------------------
 7040|  9.23k|                                       : ss->vrange.max;
 7041|       |
 7042|  9.23k|    if (checkVersion >= SSL_LIBRARY_VERSION_TLS_1_2 &&
  ------------------
  |  |   20|  18.4k|#define SSL_LIBRARY_VERSION_TLS_1_2             0x0303
  ------------------
  |  Branch (7042:9): [True: 9.20k, False: 29]
  ------------------
 7043|  9.23k|        checkVersion > ss->version) {
  ------------------
  |  Branch (7043:9): [True: 5.24k, False: 3.95k]
  ------------------
 7044|       |        /* Both sections use the same sentinel region. */
 7045|  5.24k|        PRUint8 *downgrade_sentinel =
 7046|  5.24k|            ss->ssl3.hs.server_random +
 7047|  5.24k|            SSL3_RANDOM_LENGTH - sizeof(tls12_downgrade_random);
  ------------------
  |  |   24|  5.24k|#define SSL3_RANDOM_LENGTH 32
  ------------------
 7048|       |
 7049|  5.24k|        if (!PORT_Memcmp(downgrade_sentinel,
  ------------------
  |  |  179|  5.24k|#define PORT_Memcmp memcmp
  ------------------
  |  Branch (7049:13): [True: 2, False: 5.24k]
  ------------------
 7050|  5.24k|                         tls12_downgrade_random,
 7051|  5.24k|                         sizeof(tls12_downgrade_random)) ||
 7052|  5.24k|            !PORT_Memcmp(downgrade_sentinel,
  ------------------
  |  |  179|  5.24k|#define PORT_Memcmp memcmp
  ------------------
  |  Branch (7052:13): [True: 1, False: 5.24k]
  ------------------
 7053|  5.24k|                         tls1_downgrade_random,
 7054|  5.24k|                         sizeof(tls1_downgrade_random))) {
 7055|      3|            return SECFailure;
 7056|      3|        }
 7057|  5.24k|    }
 7058|       |
 7059|  9.23k|    return SECSuccess;
 7060|  9.23k|}
ssl3con.c:ssl3_SendChangeCipherSpecs:
 3264|  1.62k|{
 3265|  1.62k|    SECStatus rv;
 3266|       |
 3267|  1.62k|    PORT_Assert(ss->opt.noLocks || ssl_HaveXmitBufLock(ss));
  ------------------
  |  |  120|  1.62k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  2.41k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 836, False: 789]
  |  |  |  |  |  Branch (208:7): [True: 789, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3268|  1.62k|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|  1.62k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  2.41k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 836, False: 789]
  |  |  |  |  |  Branch (208:7): [True: 789, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3269|       |
 3270|  1.62k|    rv = ssl3_SendChangeCipherSpecsInt(ss);
 3271|  1.62k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (3271:9): [True: 0, False: 1.62k]
  ------------------
 3272|      0|        return rv; /* Error code set. */
 3273|      0|    }
 3274|       |
 3275|       |    /* swap the pending and current write specs. */
 3276|  1.62k|    ssl_GetSpecWriteLock(ss); /**************************************/
  ------------------
  |  | 1435|  1.62k|    {                                            \
  |  | 1436|  1.62k|        if (!ss->opt.noLocks)                    \
  |  |  ------------------
  |  |  |  Branch (1436:13): [True: 789, False: 836]
  |  |  ------------------
  |  | 1437|  1.62k|            NSSRWLock_LockWrite((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   48|    789|#define NSSRWLock_LockWrite NSSRWLock_LockWrite_Util
  |  |  ------------------
  |  | 1438|  1.62k|    }
  ------------------
 3277|       |
 3278|  1.62k|    ssl_CipherSpecRelease(ss->ssl3.cwSpec);
 3279|  1.62k|    ss->ssl3.cwSpec = ss->ssl3.pwSpec;
 3280|  1.62k|    ss->ssl3.pwSpec = NULL;
 3281|       |
 3282|  1.62k|    SSL_TRC(3, ("%d: SSL3[%d] Set Current Write Cipher Suite to Pending",
  ------------------
  |  |   71|  1.62k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 1.62k]
  |  |  ------------------
  |  |   72|  1.62k|    ssl_Trace b
  ------------------
 3283|  1.62k|                SSL_GETPID(), ss->fd));
 3284|       |
 3285|       |    /* With DTLS, we need to set a holddown timer in case the final
 3286|       |     * message got lost */
 3287|  1.62k|    if (IS_DTLS(ss) && ss->ssl3.crSpec->epoch == ss->ssl3.cwSpec->epoch) {
  ------------------
  |  |  892|  3.25k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 1.62k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (3287:24): [True: 0, False: 1.62k]
  ------------------
 3288|      0|        rv = dtls_StartHolddownTimer(ss);
 3289|      0|    }
 3290|  1.62k|    ssl_ReleaseSpecWriteLock(ss); /**************************************/
  ------------------
  |  | 1440|  1.62k|    {                                              \
  |  | 1441|  1.62k|        if (!ss->opt.noLocks)                      \
  |  |  ------------------
  |  |  |  Branch (1441:13): [True: 789, False: 836]
  |  |  ------------------
  |  | 1442|  1.62k|            NSSRWLock_UnlockWrite((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   51|    789|#define NSSRWLock_UnlockWrite NSSRWLock_UnlockWrite_Util
  |  |  ------------------
  |  | 1443|  1.62k|    }
  ------------------
 3291|       |
 3292|  1.62k|    return rv;
 3293|  1.62k|}
ssl3con.c:ssl3_SendFinished:
12147|  1.62k|{
12148|  1.62k|    ssl3CipherSpec *cwSpec;
12149|  1.62k|    PRBool isTLS;
12150|  1.62k|    PRBool isServer = ss->sec.isServer;
12151|  1.62k|    SECStatus rv;
12152|  1.62k|    SSL3Sender sender = isServer ? sender_server : sender_client;
  ------------------
  |  Branch (12152:25): [True: 0, False: 1.62k]
  ------------------
12153|  1.62k|    SSL3Hashes hashes;
12154|  1.62k|    TLSFinished tlsFinished;
12155|       |
12156|  1.62k|    SSL_TRC(3, ("%d: SSL3[%d]: send finished handshake", SSL_GETPID(), ss->fd));
  ------------------
  |  |   71|  1.62k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 1.62k]
  |  |  ------------------
  |  |   72|  1.62k|    ssl_Trace b
  ------------------
12157|       |
12158|  1.62k|    PORT_Assert(ss->opt.noLocks || ssl_HaveXmitBufLock(ss));
  ------------------
  |  |  120|  1.62k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  2.41k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 836, False: 789]
  |  |  |  |  |  Branch (208:7): [True: 789, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12159|  1.62k|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|  1.62k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  2.41k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 836, False: 789]
  |  |  |  |  |  Branch (208:7): [True: 789, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12160|  1.62k|    PR_ASSERT(!ss->ssl3.hs.clientCertificatePending);
  ------------------
  |  |  208|  1.62k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 1.62k, False: 0]
  |  |  ------------------
  ------------------
12161|       |
12162|  1.62k|    ssl_GetSpecReadLock(ss);
  ------------------
  |  | 1422|  1.62k|    {                                           \
  |  | 1423|  1.62k|        if (!ss->opt.noLocks)                   \
  |  |  ------------------
  |  |  |  Branch (1423:13): [True: 789, False: 836]
  |  |  ------------------
  |  | 1424|  1.62k|            NSSRWLock_LockRead((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   47|    789|#define NSSRWLock_LockRead NSSRWLock_LockRead_Util
  |  |  ------------------
  |  | 1425|  1.62k|    }
  ------------------
12163|  1.62k|    cwSpec = ss->ssl3.cwSpec;
12164|  1.62k|    isTLS = (PRBool)(cwSpec->version > SSL_LIBRARY_VERSION_3_0);
  ------------------
  |  |   17|  1.62k|#define SSL_LIBRARY_VERSION_3_0                 0x0300
  ------------------
12165|  1.62k|    rv = ssl3_ComputeHandshakeHashes(ss, cwSpec, &hashes, sender);
12166|  1.62k|    if (isTLS && rv == SECSuccess) {
  ------------------
  |  Branch (12166:9): [True: 1.62k, False: 0]
  |  Branch (12166:18): [True: 1.62k, False: 0]
  ------------------
12167|  1.62k|        rv = ssl3_ComputeTLSFinished(ss, cwSpec, isServer, &hashes, &tlsFinished);
12168|  1.62k|    }
12169|  1.62k|    ssl_ReleaseSpecReadLock(ss);
  ------------------
  |  | 1427|  1.62k|    {                                             \
  |  | 1428|  1.62k|        if (!ss->opt.noLocks)                     \
  |  |  ------------------
  |  |  |  Branch (1428:13): [True: 789, False: 836]
  |  |  ------------------
  |  | 1429|  1.62k|            NSSRWLock_UnlockRead((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   50|    789|#define NSSRWLock_UnlockRead NSSRWLock_UnlockRead_Util
  |  |  ------------------
  |  | 1430|  1.62k|    }
  ------------------
12170|  1.62k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (12170:9): [True: 0, False: 1.62k]
  ------------------
12171|      0|        goto fail; /* err code was set by ssl3_ComputeHandshakeHashes */
12172|      0|    }
12173|       |
12174|  1.62k|    if (isTLS) {
  ------------------
  |  Branch (12174:9): [True: 1.62k, False: 0]
  ------------------
12175|  1.62k|        if (isServer)
  ------------------
  |  Branch (12175:13): [True: 0, False: 1.62k]
  ------------------
12176|      0|            ss->ssl3.hs.finishedMsgs.tFinished[1] = tlsFinished;
12177|  1.62k|        else
12178|  1.62k|            ss->ssl3.hs.finishedMsgs.tFinished[0] = tlsFinished;
12179|  1.62k|        ss->ssl3.hs.finishedBytes = sizeof tlsFinished;
12180|  1.62k|        rv = ssl3_AppendHandshakeHeader(ss, ssl_hs_finished, sizeof tlsFinished);
12181|  1.62k|        if (rv != SECSuccess)
  ------------------
  |  Branch (12181:13): [True: 0, False: 1.62k]
  ------------------
12182|      0|            goto fail; /* err set by AppendHandshake. */
12183|  1.62k|        rv = ssl3_AppendHandshake(ss, &tlsFinished, sizeof tlsFinished);
12184|  1.62k|        if (rv != SECSuccess)
  ------------------
  |  Branch (12184:13): [True: 0, False: 1.62k]
  ------------------
12185|      0|            goto fail; /* err set by AppendHandshake. */
12186|  1.62k|    } else {
12187|      0|        if (isServer)
  ------------------
  |  Branch (12187:13): [True: 0, False: 0]
  ------------------
12188|      0|            ss->ssl3.hs.finishedMsgs.sFinished[1] = hashes.u.s;
12189|      0|        else
12190|      0|            ss->ssl3.hs.finishedMsgs.sFinished[0] = hashes.u.s;
12191|      0|        PORT_Assert(hashes.len == sizeof hashes.u.s);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12192|      0|        ss->ssl3.hs.finishedBytes = sizeof hashes.u.s;
12193|      0|        rv = ssl3_AppendHandshakeHeader(ss, ssl_hs_finished, sizeof hashes.u.s);
12194|      0|        if (rv != SECSuccess)
  ------------------
  |  Branch (12194:13): [True: 0, False: 0]
  ------------------
12195|      0|            goto fail; /* err set by AppendHandshake. */
12196|      0|        rv = ssl3_AppendHandshake(ss, &hashes.u.s, sizeof hashes.u.s);
12197|      0|        if (rv != SECSuccess)
  ------------------
  |  Branch (12197:13): [True: 0, False: 0]
  ------------------
12198|      0|            goto fail; /* err set by AppendHandshake. */
12199|      0|    }
12200|  1.62k|    rv = ssl3_FlushHandshake(ss, flags);
12201|  1.62k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (12201:9): [True: 0, False: 1.62k]
  ------------------
12202|      0|        goto fail; /* error code set by ssl3_FlushHandshake */
12203|      0|    }
12204|       |
12205|  1.62k|    ssl3_RecordKeyLog(ss, "CLIENT_RANDOM", ss->ssl3.cwSpec->masterSecret);
12206|       |
12207|  1.62k|    return SECSuccess;
12208|       |
12209|      0|fail:
12210|      0|    return rv;
12211|  1.62k|}
ssl3con.c:ssl3_ComputeTLSFinished:
11957|  1.62k|{
11958|  1.62k|    SECStatus rv;
11959|  1.62k|    CK_TLS_MAC_PARAMS tls_mac_params;
11960|  1.62k|    SECItem param = { siBuffer, NULL, 0 };
11961|  1.62k|    PK11Context *prf_context;
11962|  1.62k|    unsigned int retLen;
11963|       |
11964|  1.62k|    PORT_Assert(spec->masterSecret);
  ------------------
  |  |  120|  1.62k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.62k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.62k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11965|  1.62k|    if (!spec->masterSecret) {
  ------------------
  |  Branch (11965:9): [True: 0, False: 1.62k]
  ------------------
11966|      0|        PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
11967|      0|        return SECFailure;
11968|      0|    }
11969|       |
11970|  1.62k|    if (spec->version < SSL_LIBRARY_VERSION_TLS_1_2) {
  ------------------
  |  |   20|  1.62k|#define SSL_LIBRARY_VERSION_TLS_1_2             0x0303
  ------------------
  |  Branch (11970:9): [True: 66, False: 1.55k]
  ------------------
11971|     66|        tls_mac_params.prfHashMechanism = CKM_TLS_PRF;
  ------------------
  |  |  973|     66|#define CKM_TLS_PRF 0x00000378UL
  ------------------
11972|  1.55k|    } else {
11973|  1.55k|        tls_mac_params.prfHashMechanism = ssl3_GetPrfHashMechanism(ss);
11974|  1.55k|    }
11975|  1.62k|    tls_mac_params.ulMacLength = 12;
11976|  1.62k|    tls_mac_params.ulServerOrClient = isServer ? 1 : 2;
  ------------------
  |  Branch (11976:39): [True: 0, False: 1.62k]
  ------------------
11977|  1.62k|    param.data = (unsigned char *)&tls_mac_params;
11978|  1.62k|    param.len = sizeof(tls_mac_params);
11979|  1.62k|    prf_context = PK11_CreateContextBySymKey(CKM_TLS_MAC, CKA_SIGN,
  ------------------
  |  | 1032|  1.62k|#define CKM_TLS_MAC 0x000003E4UL
  ------------------
                  prf_context = PK11_CreateContextBySymKey(CKM_TLS_MAC, CKA_SIGN,
  ------------------
  |  |  551|  1.62k|#define CKA_SIGN 0x00000108UL
  ------------------
11980|  1.62k|                                             spec->masterSecret, &param);
11981|  1.62k|    if (!prf_context)
  ------------------
  |  Branch (11981:9): [True: 0, False: 1.62k]
  ------------------
11982|      0|        return SECFailure;
11983|       |
11984|  1.62k|    rv = PK11_DigestBegin(prf_context);
11985|  1.62k|    rv |= PK11_DigestOp(prf_context, hashes->u.raw, hashes->len);
11986|  1.62k|    rv |= PK11_DigestFinal(prf_context, tlsFinished->verify_data, &retLen,
11987|  1.62k|                           sizeof tlsFinished->verify_data);
11988|  1.62k|    PORT_Assert(rv != SECSuccess || retLen == sizeof tlsFinished->verify_data);
  ------------------
  |  |  120|  1.62k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  3.25k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 0, False: 1.62k]
  |  |  |  |  |  Branch (208:7): [True: 1.62k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11989|       |
11990|  1.62k|    PK11_DestroyContext(prf_context, PR_TRUE);
  ------------------
  |  |  437|  1.62k|#define PR_TRUE 1
  ------------------
11991|       |
11992|  1.62k|    return rv;
11993|  1.62k|}
ssl3con.c:ssl3_HandleServerHello:
 7068|  8.67k|{
 7069|  8.67k|    PRUint32 cipher;
 7070|  8.67k|    int errCode = SSL_ERROR_RX_MALFORMED_SERVER_HELLO;
 7071|  8.67k|    PRUint32 compression;
 7072|  8.67k|    SECStatus rv;
 7073|  8.67k|    SECItem sidBytes = { siBuffer, NULL, 0 };
 7074|  8.67k|    PRBool isHelloRetry;
 7075|  8.67k|    SSL3AlertDescription desc = illegal_parameter;
 7076|  8.67k|    const PRUint8 *savedMsg = b;
 7077|  8.67k|    const PRUint32 savedLength = length;
 7078|       |
 7079|  8.67k|    SSL_TRC(3, ("%d: SSL3[%d]: handle server_hello handshake",
  ------------------
  |  |   71|  8.67k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 8.67k]
  |  |  ------------------
  |  |   72|  8.67k|    ssl_Trace b
  ------------------
 7080|  8.67k|                SSL_GETPID(), ss->fd));
 7081|  8.67k|    PORT_Assert(ss->opt.noLocks || ssl_HaveRecvBufLock(ss));
  ------------------
  |  |  120|  8.67k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  12.8k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 4.47k, False: 4.20k]
  |  |  |  |  |  Branch (208:7): [True: 4.20k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7082|  8.67k|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|  8.67k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  12.8k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 4.47k, False: 4.20k]
  |  |  |  |  |  Branch (208:7): [True: 4.20k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7083|       |
 7084|  8.67k|    if (ss->ssl3.hs.ws != wait_server_hello) {
  ------------------
  |  Branch (7084:9): [True: 2, False: 8.67k]
  ------------------
 7085|      2|        errCode = SSL_ERROR_RX_UNEXPECTED_SERVER_HELLO;
 7086|      2|        desc = unexpected_message;
 7087|      2|        goto alert_loser;
 7088|      2|    }
 7089|       |
 7090|       |    /* clean up anything left from previous handshake. */
 7091|  8.67k|    if (ss->ssl3.clientCertChain != NULL) {
  ------------------
  |  Branch (7091:9): [True: 0, False: 8.67k]
  ------------------
 7092|      0|        CERT_DestroyCertificateList(ss->ssl3.clientCertChain);
 7093|      0|        ss->ssl3.clientCertChain = NULL;
 7094|      0|    }
 7095|  8.67k|    if (ss->ssl3.clientCertificate != NULL) {
  ------------------
  |  Branch (7095:9): [True: 0, False: 8.67k]
  ------------------
 7096|      0|        CERT_DestroyCertificate(ss->ssl3.clientCertificate);
 7097|      0|        ss->ssl3.clientCertificate = NULL;
 7098|      0|    }
 7099|  8.67k|    if (ss->ssl3.clientPrivateKey != NULL) {
  ------------------
  |  Branch (7099:9): [True: 0, False: 8.67k]
  ------------------
 7100|      0|        SECKEY_DestroyPrivateKey(ss->ssl3.clientPrivateKey);
 7101|      0|        ss->ssl3.clientPrivateKey = NULL;
 7102|      0|    }
 7103|       |    // TODO(djackson) - Bob removed this. Why?
 7104|  8.67k|    if (ss->ssl3.hs.clientAuthSignatureSchemes != NULL) {
  ------------------
  |  Branch (7104:9): [True: 0, False: 8.67k]
  ------------------
 7105|      0|        PR_Free(ss->ssl3.hs.clientAuthSignatureSchemes);
 7106|      0|        ss->ssl3.hs.clientAuthSignatureSchemes = NULL;
 7107|      0|        ss->ssl3.hs.clientAuthSignatureSchemesLen = 0;
 7108|      0|    }
 7109|       |
 7110|       |    /* Note that if the server selects TLS 1.3, this will set the version to TLS
 7111|       |     * 1.2.  We will amend that once all other fields have been read. */
 7112|  8.67k|    rv = ssl_ClientReadVersion(ss, &b, &length, &ss->version);
 7113|  8.67k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (7113:9): [True: 24, False: 8.65k]
  ------------------
 7114|     24|        goto loser; /* alert has been sent */
 7115|     24|    }
 7116|       |
 7117|  8.65k|    rv = ssl3_ConsumeHandshake(
 7118|  8.65k|        ss, ss->ssl3.hs.server_random, SSL3_RANDOM_LENGTH, &b, &length);
  ------------------
  |  |   24|  8.65k|#define SSL3_RANDOM_LENGTH 32
  ------------------
 7119|  8.65k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (7119:9): [True: 3, False: 8.64k]
  ------------------
 7120|      3|        goto loser; /* alert has been sent */
 7121|      3|    }
 7122|  8.64k|    isHelloRetry = !PORT_Memcmp(ss->ssl3.hs.server_random,
  ------------------
  |  |  179|  8.64k|#define PORT_Memcmp memcmp
  ------------------
 7123|  8.64k|                                ssl_hello_retry_random, SSL3_RANDOM_LENGTH);
  ------------------
  |  |   24|  8.64k|#define SSL3_RANDOM_LENGTH 32
  ------------------
 7124|       |
 7125|  8.64k|    rv = ssl3_ConsumeHandshakeVariable(ss, &sidBytes, 1, &b, &length);
 7126|  8.64k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (7126:9): [True: 76, False: 8.57k]
  ------------------
 7127|     76|        goto loser; /* alert has been sent */
 7128|     76|    }
 7129|  8.57k|    if (sidBytes.len > SSL3_SESSIONID_BYTES) {
  ------------------
  |  |  107|  8.57k|#define SSL3_SESSIONID_BYTES 32
  ------------------
  |  Branch (7129:9): [True: 2, False: 8.56k]
  ------------------
 7130|      2|        if (ss->version >= SSL_LIBRARY_VERSION_TLS_1_0)
  ------------------
  |  |   18|      2|#define SSL_LIBRARY_VERSION_TLS_1_0             0x0301
  ------------------
  |  Branch (7130:13): [True: 2, False: 0]
  ------------------
 7131|      2|            desc = decode_error;
 7132|      2|        goto alert_loser; /* malformed. */
 7133|      2|    }
 7134|       |
 7135|       |    /* Read the cipher suite. */
 7136|  8.56k|    rv = ssl3_ConsumeHandshakeNumber(ss, &cipher, 2, &b, &length);
 7137|  8.56k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (7137:9): [True: 31, False: 8.53k]
  ------------------
 7138|     31|        goto loser; /* alert has been sent */
 7139|     31|    }
 7140|       |
 7141|       |    /* Compression method. */
 7142|  8.53k|    rv = ssl3_ConsumeHandshakeNumber(ss, &compression, 1, &b, &length);
 7143|  8.53k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (7143:9): [True: 1, False: 8.53k]
  ------------------
 7144|      1|        goto loser; /* alert has been sent */
 7145|      1|    }
 7146|  8.53k|    if (compression != ssl_compression_null) {
  ------------------
  |  Branch (7146:9): [True: 4, False: 8.53k]
  ------------------
 7147|      4|        desc = illegal_parameter;
 7148|      4|        errCode = SSL_ERROR_RX_MALFORMED_SERVER_HELLO;
 7149|      4|        goto alert_loser;
 7150|      4|    }
 7151|       |
 7152|       |    /* Parse extensions. */
 7153|  8.53k|    if (length != 0) {
  ------------------
  |  Branch (7153:9): [True: 4.55k, False: 3.97k]
  ------------------
 7154|  4.55k|        PRUint32 extensionLength;
 7155|  4.55k|        rv = ssl3_ConsumeHandshakeNumber(ss, &extensionLength, 2, &b, &length);
 7156|  4.55k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (7156:13): [True: 2, False: 4.55k]
  ------------------
 7157|      2|            goto loser; /* alert already sent */
 7158|      2|        }
 7159|  4.55k|        if (extensionLength != length) {
  ------------------
  |  Branch (7159:13): [True: 27, False: 4.53k]
  ------------------
 7160|     27|            desc = decode_error;
 7161|     27|            goto alert_loser;
 7162|     27|        }
 7163|  4.53k|        rv = ssl3_ParseExtensions(ss, &b, &length);
 7164|  4.53k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (7164:13): [True: 30, False: 4.50k]
  ------------------
 7165|     30|            goto alert_loser; /* malformed */
 7166|     30|        }
 7167|  4.53k|    }
 7168|       |
 7169|       |    /* Read supported_versions if present. */
 7170|  8.47k|    rv = tls13_ClientReadSupportedVersion(ss);
 7171|  8.47k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (7171:9): [True: 15, False: 8.45k]
  ------------------
 7172|     15|        goto loser;
 7173|     15|    }
 7174|       |
 7175|       |    /* RFC 9147. 5.2.
 7176|       |     * DTLS Handshake Message Format states the difference between the computation
 7177|       |     * of the transcript if the version is DTLS1.2 or DTLS1.3.
 7178|       |     *
 7179|       |     * At this moment we are sure which version
 7180|       |     * we are planning to use during the connection, so we can compute the hash. */
 7181|  8.45k|    rv = ssl3_MaybeUpdateHashWithSavedRecord(ss);
 7182|  8.45k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (7182:9): [True: 0, False: 8.45k]
  ------------------
 7183|      0|        goto loser;
 7184|      0|    }
 7185|       |
 7186|  8.45k|    PORT_Assert(!SSL_ALL_VERSIONS_DISABLED(&ss->vrange));
  ------------------
  |  |  120|  8.45k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  8.45k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 8.45k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7187|       |    /* Check that the version is within the configured range. */
 7188|  8.45k|    if (ss->vrange.min > ss->version || ss->vrange.max < ss->version) {
  ------------------
  |  Branch (7188:9): [True: 7, False: 8.45k]
  |  Branch (7188:41): [True: 2, False: 8.45k]
  ------------------
 7189|      9|        desc = (ss->version > SSL_LIBRARY_VERSION_3_0)
  ------------------
  |  |   17|      9|#define SSL_LIBRARY_VERSION_3_0                 0x0300
  ------------------
  |  Branch (7189:16): [True: 9, False: 0]
  ------------------
 7190|      9|                   ? protocol_version
 7191|      9|                   : handshake_failure;
 7192|      9|        errCode = SSL_ERROR_UNSUPPORTED_VERSION;
 7193|      9|        goto alert_loser;
 7194|      9|    }
 7195|       |
 7196|  8.45k|    if (isHelloRetry && ss->ssl3.hs.helloRetry) {
  ------------------
  |  Branch (7196:9): [True: 1.29k, False: 7.15k]
  |  Branch (7196:25): [True: 1, False: 1.29k]
  ------------------
 7197|      1|        SSL_TRC(3, ("%d: SSL3[%d]: received a second hello_retry_request",
  ------------------
  |  |   71|      1|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 1]
  |  |  ------------------
  |  |   72|      1|    ssl_Trace b
  ------------------
 7198|      1|                    SSL_GETPID(), ss->fd));
 7199|      1|        desc = unexpected_message;
 7200|      1|        errCode = SSL_ERROR_RX_UNEXPECTED_HELLO_RETRY_REQUEST;
 7201|      1|        goto alert_loser;
 7202|      1|    }
 7203|       |
 7204|       |    /* There are three situations in which the server must pick
 7205|       |     * TLS 1.3.
 7206|       |     *
 7207|       |     * 1. We received HRR
 7208|       |     * 2. We sent early app data
 7209|       |     * 3. ECH was accepted (checked in MaybeHandleEchSignal)
 7210|       |     *
 7211|       |     * If we offered ECH and the server negotiated a lower version,
 7212|       |     * authenticate to the public name for secure disablement.
 7213|       |     *
 7214|       |     */
 7215|  8.44k|    if (ss->version < SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|  8.44k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (7215:9): [True: 5.57k, False: 2.87k]
  ------------------
 7216|  5.57k|        if (isHelloRetry || ss->ssl3.hs.helloRetry) {
  ------------------
  |  Branch (7216:13): [True: 4, False: 5.56k]
  |  Branch (7216:29): [True: 3, False: 5.56k]
  ------------------
 7217|       |            /* SSL3_SendAlert() will uncache the SID. */
 7218|      7|            desc = illegal_parameter;
 7219|      7|            errCode = SSL_ERROR_RX_MALFORMED_SERVER_HELLO;
 7220|      7|            goto alert_loser;
 7221|      7|        }
 7222|  5.56k|        if (ss->ssl3.hs.zeroRttState == ssl_0rtt_sent) {
  ------------------
  |  Branch (7222:13): [True: 0, False: 5.56k]
  ------------------
 7223|       |            /* SSL3_SendAlert() will uncache the SID. */
 7224|      0|            desc = illegal_parameter;
 7225|      0|            errCode = SSL_ERROR_DOWNGRADE_WITH_EARLY_DATA;
 7226|      0|            goto alert_loser;
 7227|      0|        }
 7228|  5.56k|    }
 7229|       |
 7230|       |    /* Check that the server negotiated the same version as it did
 7231|       |     * in the first handshake. This isn't really the best place for
 7232|       |     * us to be getting this version number, but it's what we have.
 7233|       |     * (1294697). */
 7234|  8.44k|    if (ss->firstHsDone && (ss->version != ss->ssl3.crSpec->version)) {
  ------------------
  |  Branch (7234:9): [True: 0, False: 8.44k]
  |  Branch (7234:28): [True: 0, False: 0]
  ------------------
 7235|      0|        desc = protocol_version;
 7236|      0|        errCode = SSL_ERROR_UNSUPPORTED_VERSION;
 7237|      0|        goto alert_loser;
 7238|      0|    }
 7239|       |
 7240|  8.44k|    if (ss->opt.enableHelloDowngradeCheck) {
  ------------------
  |  Branch (7240:9): [True: 8.44k, False: 0]
  ------------------
 7241|  8.44k|        rv = ssl_CheckServerRandom(ss);
 7242|  8.44k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (7242:13): [True: 3, False: 8.43k]
  ------------------
 7243|      3|            desc = illegal_parameter;
 7244|      3|            errCode = SSL_ERROR_RX_MALFORMED_SERVER_HELLO;
 7245|      3|            goto alert_loser;
 7246|      3|        }
 7247|  8.44k|    }
 7248|       |
 7249|       |    /* Finally, now all the version-related checks have passed. */
 7250|  8.43k|    ss->ssl3.hs.preliminaryInfo |= ssl_preinfo_version;
  ------------------
  |  |  392|  8.43k|#define ssl_preinfo_version (1U << 0)
  ------------------
 7251|       |    /* Update the write cipher spec to match the version. But not after
 7252|       |     * HelloRetryRequest, because cwSpec might be a 0-RTT cipher spec,
 7253|       |     * in which case this is a no-op. */
 7254|  8.43k|    if (!ss->firstHsDone && !isHelloRetry) {
  ------------------
  |  Branch (7254:9): [True: 8.43k, False: 0]
  |  Branch (7254:29): [True: 7.14k, False: 1.29k]
  ------------------
 7255|  7.14k|        ssl_GetSpecWriteLock(ss);
  ------------------
  |  | 1435|  7.14k|    {                                            \
  |  | 1436|  7.14k|        if (!ss->opt.noLocks)                    \
  |  |  ------------------
  |  |  |  Branch (1436:13): [True: 3.43k, False: 3.71k]
  |  |  ------------------
  |  | 1437|  7.14k|            NSSRWLock_LockWrite((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   48|  3.43k|#define NSSRWLock_LockWrite NSSRWLock_LockWrite_Util
  |  |  ------------------
  |  | 1438|  7.14k|    }
  ------------------
 7256|  7.14k|        ssl_SetSpecVersions(ss, ss->ssl3.cwSpec);
 7257|  7.14k|        ssl_ReleaseSpecWriteLock(ss);
  ------------------
  |  | 1440|  7.14k|    {                                              \
  |  | 1441|  7.14k|        if (!ss->opt.noLocks)                      \
  |  |  ------------------
  |  |  |  Branch (1441:13): [True: 3.43k, False: 3.71k]
  |  |  ------------------
  |  | 1442|  7.14k|            NSSRWLock_UnlockWrite((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   51|  3.43k|#define NSSRWLock_UnlockWrite NSSRWLock_UnlockWrite_Util
  |  |  ------------------
  |  | 1443|  7.14k|    }
  ------------------
 7258|  7.14k|    }
 7259|       |
 7260|       |    /* Check that the session ID is as expected. */
 7261|  8.43k|    if (!ssl_CheckServerSessionIdCorrectness(ss, &sidBytes)) {
  ------------------
  |  Branch (7261:9): [True: 1, False: 8.43k]
  ------------------
 7262|      1|        desc = illegal_parameter;
 7263|      1|        errCode = SSL_ERROR_RX_MALFORMED_SERVER_HELLO;
 7264|      1|        goto alert_loser;
 7265|      1|    }
 7266|       |
 7267|       |    /* Only initialize hashes if this isn't a Hello Retry. */
 7268|  8.43k|    rv = ssl_ClientSetCipherSuite(ss, ss->version, cipher,
 7269|  8.43k|                                  !isHelloRetry);
 7270|  8.43k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (7270:9): [True: 37, False: 8.40k]
  ------------------
 7271|     37|        desc = illegal_parameter;
 7272|     37|        errCode = PORT_GetError();
  ------------------
  |  |   62|     37|#define PORT_GetError PORT_GetError_Util
  ------------------
 7273|     37|        goto alert_loser;
 7274|     37|    }
 7275|       |
 7276|  8.40k|    dtls_ReceivedFirstMessageInFlight(ss);
 7277|       |
 7278|  8.40k|    if (isHelloRetry) {
  ------------------
  |  Branch (7278:9): [True: 1.29k, False: 7.11k]
  ------------------
 7279|  1.29k|        rv = tls13_HandleHelloRetryRequest(ss, savedMsg, savedLength);
 7280|  1.29k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (7280:13): [True: 21, False: 1.27k]
  ------------------
 7281|     21|            goto loser;
 7282|     21|        }
 7283|  1.27k|        return SECSuccess;
 7284|  1.29k|    }
 7285|       |
 7286|  7.11k|    rv = ssl3_HandleParsedExtensions(ss, ssl_hs_server_hello);
 7287|  7.11k|    ssl3_DestroyRemoteExtensions(&ss->ssl3.hs.remoteExtensions);
 7288|  7.11k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (7288:9): [True: 126, False: 6.98k]
  ------------------
 7289|    126|        goto alert_loser;
 7290|    126|    }
 7291|       |
 7292|  6.98k|    rv = ssl_HashHandshakeMessage(ss, ssl_hs_server_hello,
 7293|  6.98k|                                  savedMsg, savedLength);
 7294|  6.98k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (7294:9): [True: 0, False: 6.98k]
  ------------------
 7295|      0|        goto loser;
 7296|      0|    }
 7297|       |
 7298|  6.98k|    if (ss->version >= SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|  6.98k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (7298:9): [True: 1.51k, False: 5.47k]
  ------------------
 7299|  1.51k|        rv = tls13_HandleServerHelloPart2(ss, savedMsg, savedLength);
 7300|  1.51k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (7300:13): [True: 77, False: 1.43k]
  ------------------
 7301|     77|            errCode = PORT_GetError();
  ------------------
  |  |   62|     77|#define PORT_GetError PORT_GetError_Util
  ------------------
 7302|     77|            goto loser;
 7303|     77|        }
 7304|  5.47k|    } else {
 7305|  5.47k|        rv = ssl3_HandleServerHelloPart2(ss, &sidBytes, &errCode);
 7306|  5.47k|        if (rv != SECSuccess)
  ------------------
  |  Branch (7306:13): [True: 17, False: 5.45k]
  ------------------
 7307|     17|            goto loser;
 7308|  5.47k|    }
 7309|       |
 7310|  6.89k|    ss->ssl3.hs.preliminaryInfo |= ssl_preinfo_ech;
  ------------------
  |  |  398|  6.89k|#define ssl_preinfo_ech (1U << 4)
  ------------------
 7311|  6.89k|    return SECSuccess;
 7312|       |
 7313|    249|alert_loser:
 7314|    249|    (void)SSL3_SendAlert(ss, alert_fatal, desc);
 7315|       |
 7316|    516|loser:
 7317|       |    /* Clean up the temporary pointer to the handshake buffer. */
 7318|    516|    ss->xtnData.signedCertTimestamps.len = 0;
 7319|    516|    ssl_MapLowLevelError(errCode);
 7320|    516|    return SECFailure;
 7321|    249|}
ssl3con.c:ssl_CheckServerSessionIdCorrectness:
 6987|  8.43k|{
 6988|  8.43k|    sslSessionID *sid = ss->sec.ci.sid;
 6989|  8.43k|    PRBool sidMatch = PR_FALSE;
  ------------------
  |  |  438|  8.43k|#define PR_FALSE 0
  ------------------
 6990|  8.43k|    PRBool sentFakeSid = PR_FALSE;
  ------------------
  |  |  438|  8.43k|#define PR_FALSE 0
  ------------------
 6991|  8.43k|    PRBool sentRealSid = sid && sid->version < SSL_LIBRARY_VERSION_TLS_1_3;
  ------------------
  |  |   21|  8.43k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (6991:26): [True: 8.43k, False: 0]
  |  Branch (6991:33): [True: 1.01k, False: 7.42k]
  ------------------
 6992|       |
 6993|       |    /* If attempting to resume a TLS 1.2 connection, the session ID won't be a
 6994|       |     * fake. Check for the real value. */
 6995|  8.43k|    if (sentRealSid) {
  ------------------
  |  Branch (6995:9): [True: 1.01k, False: 7.42k]
  ------------------
 6996|  1.01k|        sidMatch = (sidBytes->len == sid->u.ssl3.sessionIDLength) &&
  ------------------
  |  Branch (6996:20): [True: 718, False: 292]
  ------------------
 6997|  1.01k|                   (!sidBytes->len || PORT_Memcmp(sid->u.ssl3.sessionID, sidBytes->data, sidBytes->len) == 0);
  ------------------
  |  |  179|      0|#define PORT_Memcmp memcmp
  ------------------
  |  Branch (6997:21): [True: 718, False: 0]
  |  Branch (6997:39): [True: 0, False: 0]
  ------------------
 6998|  7.42k|    } else {
 6999|       |        /* Otherwise, the session ID was a fake if TLS 1.3 compat mode is
 7000|       |         * enabled.  If so, check for the fake value. */
 7001|  7.42k|        sentFakeSid = ss->opt.enableTls13CompatMode && !IS_DTLS(ss);
  ------------------
  |  |  892|  11.2k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  ------------------
  |  Branch (7001:23): [True: 3.77k, False: 3.65k]
  |  Branch (7001:56): [True: 0, False: 3.77k]
  ------------------
 7002|  7.42k|        if (sentFakeSid && sidBytes->len == SSL3_SESSIONID_BYTES) {
  ------------------
  |  |  107|      0|#define SSL3_SESSIONID_BYTES 32
  ------------------
  |  Branch (7002:13): [True: 0, False: 7.42k]
  |  Branch (7002:28): [True: 0, False: 0]
  ------------------
 7003|      0|            PRUint8 buf[SSL3_SESSIONID_BYTES];
 7004|      0|            ssl_MakeFakeSid(ss, buf);
 7005|      0|            sidMatch = PORT_Memcmp(buf, sidBytes->data, sidBytes->len) == 0;
  ------------------
  |  |  179|      0|#define PORT_Memcmp memcmp
  ------------------
 7006|      0|        }
 7007|  7.42k|    }
 7008|       |
 7009|       |    /* TLS 1.2: Session ID shouldn't match if we sent a fake. */
 7010|  8.43k|    if (ss->version < SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|  8.43k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (7010:9): [True: 5.56k, False: 2.87k]
  ------------------
 7011|  5.56k|        if (sentFakeSid) {
  ------------------
  |  Branch (7011:13): [True: 0, False: 5.56k]
  ------------------
 7012|      0|            return !sidMatch;
 7013|      0|        }
 7014|  5.56k|        return PR_TRUE;
  ------------------
  |  |  437|  5.56k|#define PR_TRUE 1
  ------------------
 7015|  5.56k|    }
 7016|       |
 7017|       |    /* TLS 1.3: We sent a session ID.  The server's should match. */
 7018|  2.87k|    if (!IS_DTLS(ss) && (sentRealSid || sentFakeSid)) {
  ------------------
  |  |  892|  5.75k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  ------------------
  |  Branch (7018:9): [True: 0, False: 2.87k]
  |  Branch (7018:26): [True: 0, False: 0]
  |  Branch (7018:41): [True: 0, False: 0]
  ------------------
 7019|      0|        return sidMatch;
 7020|      0|    }
 7021|       |
 7022|       |    /* TLS 1.3 (no SID)/DTLS 1.3: The server shouldn't send a session ID. */
 7023|  2.87k|    return sidBytes->len == 0;
 7024|  2.87k|}
ssl3con.c:ssl3_HandleServerHelloPart2:
 7371|  5.47k|{
 7372|  5.47k|    SSL3AlertDescription desc = handshake_failure;
 7373|  5.47k|    int errCode = SSL_ERROR_RX_MALFORMED_SERVER_HELLO;
 7374|  5.47k|    SECStatus rv;
 7375|  5.47k|    PRBool sid_match;
 7376|  5.47k|    sslSessionID *sid = ss->sec.ci.sid;
 7377|       |
 7378|  5.47k|    if ((ss->opt.requireSafeNegotiation ||
  ------------------
  |  Branch (7378:10): [True: 787, False: 4.68k]
  ------------------
 7379|  5.47k|         (ss->firstHsDone && (ss->peerRequestedProtection ||
  ------------------
  |  Branch (7379:11): [True: 0, False: 4.68k]
  |  Branch (7379:31): [True: 0, False: 0]
  ------------------
 7380|      0|                              ss->opt.enableRenegotiation ==
  ------------------
  |  Branch (7380:31): [True: 0, False: 0]
  ------------------
 7381|      0|                                  SSL_RENEGOTIATE_REQUIRES_XTN))) &&
  ------------------
  |  |  717|      0|#define SSL_RENEGOTIATE_REQUIRES_XTN ((PRBool)2)
  ------------------
 7382|  5.47k|        !ssl3_ExtensionNegotiated(ss, ssl_renegotiation_info_xtn)) {
  ------------------
  |  Branch (7382:9): [True: 17, False: 770]
  ------------------
 7383|     17|        desc = handshake_failure;
 7384|     17|        errCode = ss->firstHsDone ? SSL_ERROR_RENEGOTIATION_NOT_ALLOWED
  ------------------
  |  Branch (7384:19): [True: 0, False: 17]
  ------------------
 7385|     17|                                  : SSL_ERROR_UNSAFE_NEGOTIATION;
 7386|     17|        goto alert_loser;
 7387|     17|    }
 7388|       |
 7389|       |    /* Any errors after this point are not "malformed" errors. */
 7390|  5.45k|    desc = handshake_failure;
 7391|       |
 7392|       |    /* we need to call ssl3_SetupPendingCipherSpec here so we can check the
 7393|       |     * key exchange algorithm. */
 7394|  5.45k|    rv = ssl3_SetupBothPendingCipherSpecs(ss);
 7395|  5.45k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (7395:9): [True: 0, False: 5.45k]
  ------------------
 7396|      0|        goto alert_loser; /* error code is set. */
 7397|      0|    }
 7398|       |
 7399|       |    /* We may or may not have sent a session id, we may get one back or
 7400|       |     * not and if so it may match the one we sent.
 7401|       |     * Attempt to restore the master secret to see if this is so...
 7402|       |     * Don't consider failure to find a matching SID an error.
 7403|       |     */
 7404|  5.45k|    sid_match = (PRBool)(sidBytes->len > 0 &&
  ------------------
  |  Branch (7404:26): [True: 1.52k, False: 3.92k]
  ------------------
 7405|  5.45k|                         sidBytes->len ==
  ------------------
  |  Branch (7405:26): [True: 0, False: 1.52k]
  ------------------
 7406|  1.52k|                             sid->u.ssl3.sessionIDLength &&
 7407|  5.45k|                         !PORT_Memcmp(sid->u.ssl3.sessionID,
  ------------------
  |  |  179|      0|#define PORT_Memcmp memcmp
  ------------------
  |  Branch (7407:26): [True: 0, False: 0]
  ------------------
 7408|      0|                                      sidBytes->data, sidBytes->len));
 7409|       |
 7410|  5.45k|    if (sid_match) {
  ------------------
  |  Branch (7410:9): [True: 0, False: 5.45k]
  ------------------
 7411|      0|        if (sid->version != ss->version ||
  ------------------
  |  Branch (7411:13): [True: 0, False: 0]
  ------------------
 7412|      0|            sid->u.ssl3.cipherSuite != ss->ssl3.hs.cipher_suite) {
  ------------------
  |  Branch (7412:13): [True: 0, False: 0]
  ------------------
 7413|      0|            errCode = SSL_ERROR_RX_MALFORMED_SERVER_HELLO;
 7414|      0|            goto alert_loser;
 7415|      0|        }
 7416|      0|        do {
 7417|      0|            PK11SymKey *masterSecret;
 7418|       |
 7419|       |            /* [draft-ietf-tls-session-hash-06; Section 5.3]
 7420|       |             *
 7421|       |             * o  If the original session did not use the "extended_master_secret"
 7422|       |             *    extension but the new ServerHello contains the extension, the
 7423|       |             *    client MUST abort the handshake.
 7424|       |             */
 7425|      0|            if (!sid->u.ssl3.keys.extendedMasterSecretUsed &&
  ------------------
  |  Branch (7425:17): [True: 0, False: 0]
  ------------------
 7426|      0|                ssl3_ExtensionNegotiated(ss, ssl_extended_master_secret_xtn)) {
  ------------------
  |  Branch (7426:17): [True: 0, False: 0]
  ------------------
 7427|      0|                errCode = SSL_ERROR_UNEXPECTED_EXTENDED_MASTER_SECRET;
 7428|      0|                goto alert_loser;
 7429|      0|            }
 7430|       |
 7431|       |            /*
 7432|       |             *   o  If the original session used an extended master secret but the new
 7433|       |             *      ServerHello does not contain the "extended_master_secret"
 7434|       |             *      extension, the client SHOULD abort the handshake.
 7435|       |             *
 7436|       |             * TODO(ekr@rtfm.com): Add option to refuse to resume when EMS is not
 7437|       |             * used at all (bug 1176526).
 7438|       |             */
 7439|      0|            if (sid->u.ssl3.keys.extendedMasterSecretUsed &&
  ------------------
  |  Branch (7439:17): [True: 0, False: 0]
  ------------------
 7440|      0|                !ssl3_ExtensionNegotiated(ss, ssl_extended_master_secret_xtn)) {
  ------------------
  |  Branch (7440:17): [True: 0, False: 0]
  ------------------
 7441|      0|                errCode = SSL_ERROR_MISSING_EXTENDED_MASTER_SECRET;
 7442|      0|                goto alert_loser;
 7443|      0|            }
 7444|       |
 7445|      0|            ss->sec.authType = sid->authType;
 7446|      0|            ss->sec.authKeyBits = sid->authKeyBits;
 7447|      0|            ss->sec.keaType = sid->keaType;
 7448|      0|            ss->sec.keaKeyBits = sid->keaKeyBits;
 7449|      0|            ss->sec.originalKeaGroup = ssl_LookupNamedGroup(sid->keaGroup);
 7450|      0|            ss->sec.signatureScheme = sid->sigScheme;
 7451|       |
 7452|      0|            rv = ssl3_UnwrapMasterSecretClient(ss, sid, &masterSecret);
 7453|      0|            if (rv != SECSuccess) {
  ------------------
  |  Branch (7453:17): [True: 0, False: 0]
  ------------------
 7454|      0|                break; /* not considered an error */
 7455|      0|            }
 7456|       |
 7457|       |            /* Got a Match */
 7458|      0|            SSL_AtomicIncrementLong(&ssl3stats.hsh_sid_cache_hits);
 7459|       |
 7460|       |            /* If we sent a session ticket, then this is a stateless resume. */
 7461|      0|            if (ss->xtnData.sentSessionTicketInClientHello)
  ------------------
  |  Branch (7461:17): [True: 0, False: 0]
  ------------------
 7462|      0|                SSL_AtomicIncrementLong(&ssl3stats.hsh_sid_stateless_resumes);
 7463|       |
 7464|      0|            if (ssl3_ExtensionNegotiated(ss, ssl_session_ticket_xtn))
  ------------------
  |  Branch (7464:17): [True: 0, False: 0]
  ------------------
 7465|      0|                ss->ssl3.hs.ws = wait_new_session_ticket;
 7466|      0|            else
 7467|      0|                ss->ssl3.hs.ws = wait_change_cipher;
 7468|       |
 7469|      0|            ss->ssl3.hs.isResuming = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 7470|       |
 7471|       |            /* copy the peer cert from the SID */
 7472|      0|            if (sid->peerCert != NULL) {
  ------------------
  |  Branch (7472:17): [True: 0, False: 0]
  ------------------
 7473|      0|                ss->sec.peerCert = CERT_DupCertificate(sid->peerCert);
 7474|      0|            }
 7475|       |
 7476|       |            /* We are re-using the old MS, so no need to derive again. */
 7477|      0|            rv = ssl3_InitPendingCipherSpecs(ss, masterSecret, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 7478|      0|            if (rv != SECSuccess) {
  ------------------
  |  Branch (7478:17): [True: 0, False: 0]
  ------------------
 7479|      0|                goto alert_loser; /* err code was set */
 7480|      0|            }
 7481|      0|            return SECSuccess;
 7482|      0|        } while (0);
  ------------------
  |  Branch (7482:18): [Folded - Ignored]
  ------------------
 7483|      0|    }
 7484|       |
 7485|  5.45k|    if (sid_match)
  ------------------
  |  Branch (7485:9): [True: 0, False: 5.45k]
  ------------------
 7486|      0|        SSL_AtomicIncrementLong(&ssl3stats.hsh_sid_cache_not_ok);
 7487|  5.45k|    else
 7488|  5.45k|        SSL_AtomicIncrementLong(&ssl3stats.hsh_sid_cache_misses);
 7489|       |
 7490|       |    /* We tried to resume a 1.3 session but the server negotiated 1.2. */
 7491|  5.45k|    if (ss->statelessResume) {
  ------------------
  |  Branch (7491:9): [True: 0, False: 5.45k]
  ------------------
 7492|      0|        PORT_Assert(sid->version == SSL_LIBRARY_VERSION_TLS_1_3);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7493|      0|        PORT_Assert(ss->ssl3.hs.currentSecret);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7494|       |
 7495|       |        /* Reset resumption state, only used by 1.3 code. */
 7496|      0|        ss->statelessResume = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 7497|       |
 7498|       |        /* Clear TLS 1.3 early data traffic key. */
 7499|      0|        PK11_FreeSymKey(ss->ssl3.hs.currentSecret);
 7500|      0|        ss->ssl3.hs.currentSecret = NULL;
 7501|      0|    }
 7502|       |
 7503|       |    /* throw the old one away */
 7504|  5.45k|    sid->u.ssl3.keys.resumable = PR_FALSE;
  ------------------
  |  |  438|  5.45k|#define PR_FALSE 0
  ------------------
 7505|  5.45k|    ssl_UncacheSessionID(ss);
 7506|  5.45k|    ssl_FreeSID(sid);
 7507|       |
 7508|       |    /* get a new sid */
 7509|  5.45k|    ss->sec.ci.sid = sid = ssl3_NewSessionID(ss, PR_FALSE);
  ------------------
  |  |  438|  5.45k|#define PR_FALSE 0
  ------------------
 7510|  5.45k|    if (sid == NULL) {
  ------------------
  |  Branch (7510:9): [True: 0, False: 5.45k]
  ------------------
 7511|      0|        goto alert_loser; /* memory error is set. */
 7512|      0|    }
 7513|       |
 7514|  5.45k|    sid->version = ss->version;
 7515|  5.45k|    sid->u.ssl3.sessionIDLength = sidBytes->len;
 7516|  5.45k|    if (sidBytes->len > 0) {
  ------------------
  |  Branch (7516:9): [True: 1.52k, False: 3.92k]
  ------------------
 7517|  1.52k|        PORT_Memcpy(sid->u.ssl3.sessionID, sidBytes->data, sidBytes->len);
  ------------------
  |  |  180|  1.52k|#define PORT_Memcpy memcpy
  ------------------
 7518|  1.52k|    }
 7519|       |
 7520|  5.45k|    sid->u.ssl3.keys.extendedMasterSecretUsed =
 7521|  5.45k|        ssl3_ExtensionNegotiated(ss, ssl_extended_master_secret_xtn);
 7522|       |
 7523|       |    /* Copy Signed Certificate Timestamps, if any. */
 7524|  5.45k|    if (ss->xtnData.signedCertTimestamps.len) {
  ------------------
  |  Branch (7524:9): [True: 0, False: 5.45k]
  ------------------
 7525|      0|        rv = SECITEM_CopyItem(NULL, &sid->u.ssl3.signedCertTimestamps,
  ------------------
  |  |  106|      0|#define SECITEM_CopyItem SECITEM_CopyItem_Util
  ------------------
 7526|      0|                              &ss->xtnData.signedCertTimestamps);
 7527|      0|        ss->xtnData.signedCertTimestamps.len = 0;
 7528|      0|        if (rv != SECSuccess)
  ------------------
  |  Branch (7528:13): [True: 0, False: 0]
  ------------------
 7529|      0|            goto loser;
 7530|      0|    }
 7531|       |
 7532|  5.45k|    ss->ssl3.hs.isResuming = PR_FALSE;
  ------------------
  |  |  438|  5.45k|#define PR_FALSE 0
  ------------------
 7533|  5.45k|    if (ss->ssl3.hs.kea_def->authKeyType != ssl_auth_null) {
  ------------------
  |  Branch (7533:9): [True: 5.45k, False: 0]
  ------------------
 7534|       |        /* All current cipher suites other than those with ssl_auth_null (i.e.,
 7535|       |         * (EC)DH_anon_* suites) require a certificate, so use that signal. */
 7536|  5.45k|        ss->ssl3.hs.ws = wait_server_cert;
 7537|  5.45k|    } else {
 7538|       |        /* All the remaining cipher suites must be (EC)DH_anon_* and so
 7539|       |         * must be ephemeral. Note, if we ever add PSK this might
 7540|       |         * change. */
 7541|      0|        PORT_Assert(ss->ssl3.hs.kea_def->ephemeral);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7542|      0|        ss->ssl3.hs.ws = wait_server_key;
 7543|      0|    }
 7544|  5.45k|    return SECSuccess;
 7545|       |
 7546|     17|alert_loser:
 7547|     17|    (void)SSL3_SendAlert(ss, alert_fatal, desc);
 7548|       |
 7549|     17|loser:
 7550|     17|    *retErrCode = errCode;
 7551|     17|    return SECFailure;
 7552|     17|}
ssl3con.c:ssl3_HandlePostHelloHandshakeMessage:
12768|  10.4k|{
12769|  10.4k|    SECStatus rv;
12770|  10.4k|    PORT_Assert(ss->version < SSL_LIBRARY_VERSION_TLS_1_3);
  ------------------
  |  |  120|  10.4k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  10.4k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 10.4k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12771|       |
12772|  10.4k|    switch (ss->ssl3.hs.msg_type) {
12773|    114|        case ssl_hs_hello_request:
  ------------------
  |  Branch (12773:9): [True: 114, False: 10.3k]
  ------------------
12774|    114|            if (length != 0) {
  ------------------
  |  Branch (12774:17): [True: 2, False: 112]
  ------------------
12775|      2|                (void)ssl3_DecodeError(ss);
12776|      2|                PORT_SetError(SSL_ERROR_RX_MALFORMED_HELLO_REQUEST);
  ------------------
  |  |   65|      2|#define PORT_SetError PORT_SetError_Util
  ------------------
12777|      2|                return SECFailure;
12778|      2|            }
12779|    112|            if (ss->sec.isServer) {
  ------------------
  |  Branch (12779:17): [True: 0, False: 112]
  ------------------
12780|      0|                (void)SSL3_SendAlert(ss, alert_fatal, unexpected_message);
12781|      0|                PORT_SetError(SSL_ERROR_RX_UNEXPECTED_HELLO_REQUEST);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
12782|      0|                return SECFailure;
12783|      0|            }
12784|    112|            rv = ssl3_HandleHelloRequest(ss);
12785|    112|            break;
12786|       |
12787|    414|        case ssl_hs_hello_verify_request:
  ------------------
  |  Branch (12787:9): [True: 414, False: 10.0k]
  ------------------
12788|    414|            if (!IS_DTLS(ss) || ss->sec.isServer) {
  ------------------
  |  |  892|    828|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  ------------------
  |  Branch (12788:17): [True: 0, False: 414]
  |  Branch (12788:33): [True: 0, False: 414]
  ------------------
12789|      0|                (void)SSL3_SendAlert(ss, alert_fatal, unexpected_message);
12790|      0|                PORT_SetError(SSL_ERROR_RX_UNEXPECTED_HELLO_VERIFY_REQUEST);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
12791|      0|                return SECFailure;
12792|      0|            }
12793|    414|            rv = dtls_HandleHelloVerifyRequest(ss, b, length);
12794|    414|            break;
12795|  5.36k|        case ssl_hs_certificate:
  ------------------
  |  Branch (12795:9): [True: 5.36k, False: 5.08k]
  ------------------
12796|  5.36k|            rv = ssl3_HandleCertificate(ss, b, length);
12797|  5.36k|            break;
12798|     27|        case ssl_hs_certificate_status:
  ------------------
  |  Branch (12798:9): [True: 27, False: 10.4k]
  ------------------
12799|     27|            rv = ssl3_HandleCertificateStatus(ss, b, length);
12800|     27|            break;
12801|  2.61k|        case ssl_hs_server_key_exchange:
  ------------------
  |  Branch (12801:9): [True: 2.61k, False: 7.83k]
  ------------------
12802|  2.61k|            if (ss->sec.isServer) {
  ------------------
  |  Branch (12802:17): [True: 0, False: 2.61k]
  ------------------
12803|      0|                (void)SSL3_SendAlert(ss, alert_fatal, unexpected_message);
12804|      0|                PORT_SetError(SSL_ERROR_RX_UNEXPECTED_SERVER_KEY_EXCH);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
12805|      0|                return SECFailure;
12806|      0|            }
12807|  2.61k|            rv = ssl3_HandleServerKeyExchange(ss, b, length);
12808|  2.61k|            break;
12809|    151|        case ssl_hs_certificate_request:
  ------------------
  |  Branch (12809:9): [True: 151, False: 10.2k]
  ------------------
12810|    151|            if (ss->sec.isServer) {
  ------------------
  |  Branch (12810:17): [True: 0, False: 151]
  ------------------
12811|      0|                (void)SSL3_SendAlert(ss, alert_fatal, unexpected_message);
12812|      0|                PORT_SetError(SSL_ERROR_RX_UNEXPECTED_CERT_REQUEST);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
12813|      0|                return SECFailure;
12814|      0|            }
12815|    151|            rv = ssl3_HandleCertificateRequest(ss, b, length);
12816|    151|            break;
12817|  1.73k|        case ssl_hs_server_hello_done:
  ------------------
  |  Branch (12817:9): [True: 1.73k, False: 8.71k]
  ------------------
12818|  1.73k|            if (length != 0) {
  ------------------
  |  Branch (12818:17): [True: 2, False: 1.73k]
  ------------------
12819|      2|                (void)ssl3_DecodeError(ss);
12820|      2|                PORT_SetError(SSL_ERROR_RX_MALFORMED_HELLO_DONE);
  ------------------
  |  |   65|      2|#define PORT_SetError PORT_SetError_Util
  ------------------
12821|      2|                return SECFailure;
12822|      2|            }
12823|  1.73k|            if (ss->sec.isServer) {
  ------------------
  |  Branch (12823:17): [True: 0, False: 1.73k]
  ------------------
12824|      0|                (void)SSL3_SendAlert(ss, alert_fatal, unexpected_message);
12825|      0|                PORT_SetError(SSL_ERROR_RX_UNEXPECTED_HELLO_DONE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
12826|      0|                return SECFailure;
12827|      0|            }
12828|  1.73k|            rv = ssl3_HandleServerHelloDone(ss);
12829|  1.73k|            break;
12830|      2|        case ssl_hs_certificate_verify:
  ------------------
  |  Branch (12830:9): [True: 2, False: 10.4k]
  ------------------
12831|      2|            if (!ss->sec.isServer) {
  ------------------
  |  Branch (12831:17): [True: 2, False: 0]
  ------------------
12832|      2|                (void)SSL3_SendAlert(ss, alert_fatal, unexpected_message);
12833|      2|                PORT_SetError(SSL_ERROR_RX_UNEXPECTED_CERT_VERIFY);
  ------------------
  |  |   65|      2|#define PORT_SetError PORT_SetError_Util
  ------------------
12834|      2|                return SECFailure;
12835|      2|            }
12836|      0|            rv = ssl3_HandleCertificateVerify(ss, b, length);
12837|      0|            break;
12838|      3|        case ssl_hs_client_key_exchange:
  ------------------
  |  Branch (12838:9): [True: 3, False: 10.4k]
  ------------------
12839|      3|            if (!ss->sec.isServer) {
  ------------------
  |  Branch (12839:17): [True: 3, False: 0]
  ------------------
12840|      3|                (void)SSL3_SendAlert(ss, alert_fatal, unexpected_message);
12841|      3|                PORT_SetError(SSL_ERROR_RX_UNEXPECTED_CLIENT_KEY_EXCH);
  ------------------
  |  |   65|      3|#define PORT_SetError PORT_SetError_Util
  ------------------
12842|      3|                return SECFailure;
12843|      3|            }
12844|      0|            rv = ssl3_HandleClientKeyExchange(ss, b, length);
12845|      0|            break;
12846|     10|        case ssl_hs_new_session_ticket:
  ------------------
  |  Branch (12846:9): [True: 10, False: 10.4k]
  ------------------
12847|     10|            if (ss->sec.isServer) {
  ------------------
  |  Branch (12847:17): [True: 0, False: 10]
  ------------------
12848|      0|                (void)SSL3_SendAlert(ss, alert_fatal, unexpected_message);
12849|      0|                PORT_SetError(SSL_ERROR_RX_UNEXPECTED_NEW_SESSION_TICKET);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
12850|      0|                return SECFailure;
12851|      0|            }
12852|     10|            rv = ssl3_HandleNewSessionTicket(ss, b, length);
12853|     10|            break;
12854|      4|        case ssl_hs_finished:
  ------------------
  |  Branch (12854:9): [True: 4, False: 10.4k]
  ------------------
12855|      4|            rv = ssl3_HandleFinished(ss, b, length);
12856|      4|            break;
12857|     10|        default:
  ------------------
  |  Branch (12857:9): [True: 10, False: 10.4k]
  ------------------
12858|     10|            (void)SSL3_SendAlert(ss, alert_fatal, unexpected_message);
12859|     10|            PORT_SetError(SSL_ERROR_RX_UNKNOWN_HANDSHAKE);
  ------------------
  |  |   65|     10|#define PORT_SetError PORT_SetError_Util
  ------------------
12860|     10|            rv = SECFailure;
12861|  10.4k|    }
12862|       |
12863|  10.4k|    return rv;
12864|  10.4k|}
ssl3con.c:ssl3_HandleHelloRequest:
 5786|    112|{
 5787|    112|    sslSessionID *sid = ss->sec.ci.sid;
 5788|    112|    SECStatus rv;
 5789|       |
 5790|    112|    SSL_TRC(3, ("%d: SSL3[%d]: handle hello_request handshake",
  ------------------
  |  |   71|    112|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 112]
  |  |  ------------------
  |  |   72|    112|    ssl_Trace b
  ------------------
 5791|    112|                SSL_GETPID(), ss->fd));
 5792|       |
 5793|    112|    PORT_Assert(ss->opt.noLocks || ssl_HaveRecvBufLock(ss));
  ------------------
  |  |  120|    112|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    151|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 73, False: 39]
  |  |  |  |  |  Branch (208:7): [True: 39, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5794|    112|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|    112|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    151|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 73, False: 39]
  |  |  |  |  |  Branch (208:7): [True: 39, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5795|    112|    PORT_Assert(ss->version < SSL_LIBRARY_VERSION_TLS_1_3);
  ------------------
  |  |  120|    112|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    112|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 112, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5796|       |
 5797|    112|    if (ss->ssl3.hs.ws == wait_server_hello)
  ------------------
  |  Branch (5797:9): [True: 110, False: 2]
  ------------------
 5798|    110|        return SECSuccess;
 5799|      2|    if (ss->ssl3.hs.ws != idle_handshake || ss->sec.isServer) {
  ------------------
  |  Branch (5799:9): [True: 2, False: 0]
  |  Branch (5799:45): [True: 0, False: 0]
  ------------------
 5800|      2|        (void)SSL3_SendAlert(ss, alert_fatal, unexpected_message);
 5801|      2|        PORT_SetError(SSL_ERROR_RX_UNEXPECTED_HELLO_REQUEST);
  ------------------
  |  |   65|      2|#define PORT_SetError PORT_SetError_Util
  ------------------
 5802|      2|        return SECFailure;
 5803|      2|    }
 5804|      0|    if (ss->opt.enableRenegotiation == SSL_RENEGOTIATE_NEVER) {
  ------------------
  |  |  711|      0|#define SSL_RENEGOTIATE_NEVER ((PRBool)0)
  ------------------
  |  Branch (5804:9): [True: 0, False: 0]
  ------------------
 5805|      0|        (void)SSL3_SendAlert(ss, alert_warning, no_renegotiation);
 5806|      0|        PORT_SetError(SSL_ERROR_RENEGOTIATION_NOT_ALLOWED);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 5807|      0|        return SECFailure;
 5808|      0|    }
 5809|       |
 5810|      0|    if (sid) {
  ------------------
  |  Branch (5810:9): [True: 0, False: 0]
  ------------------
 5811|      0|        ssl_UncacheSessionID(ss);
 5812|      0|        ssl_FreeSID(sid);
 5813|      0|        ss->sec.ci.sid = NULL;
 5814|      0|    }
 5815|       |
 5816|      0|    if (IS_DTLS(ss)) {
  ------------------
  |  |  892|      0|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5817|      0|        dtls_RehandshakeCleanup(ss);
 5818|      0|    }
 5819|       |
 5820|      0|    ssl_GetXmitBufLock(ss);
  ------------------
  |  | 1466|      0|    {                                           \
  |  | 1467|      0|        if (!ss->opt.noLocks)                   \
  |  |  ------------------
  |  |  |  Branch (1467:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1468|      0|            PZ_EnterMonitor((ss)->xmitBufLock); \
  |  |  ------------------
  |  |  |  |  256|      0|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1469|      0|    }
  ------------------
 5821|      0|    rv = ssl3_SendClientHello(ss, client_hello_renegotiation);
 5822|      0|    ssl_ReleaseXmitBufLock(ss);
  ------------------
  |  | 1471|      0|    {                                          \
  |  | 1472|      0|        if (!ss->opt.noLocks)                  \
  |  |  ------------------
  |  |  |  Branch (1472:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1473|      0|            PZ_ExitMonitor((ss)->xmitBufLock); \
  |  |  ------------------
  |  |  |  |  257|      0|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1474|      0|    }
  ------------------
 5823|       |
 5824|      0|    return rv;
 5825|      0|}
ssl3con.c:ssl3_HandleCertificate:
11468|  5.36k|{
11469|  5.36k|    SSL_TRC(3, ("%d: SSL3[%d]: handle certificate handshake",
  ------------------
  |  |   71|  5.36k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 5.36k]
  |  |  ------------------
  |  |   72|  5.36k|    ssl_Trace b
  ------------------
11470|  5.36k|                SSL_GETPID(), ss->fd));
11471|  5.36k|    PORT_Assert(ss->opt.noLocks || ssl_HaveRecvBufLock(ss));
  ------------------
  |  |  120|  5.36k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  7.92k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 2.80k, False: 2.55k]
  |  |  |  |  |  Branch (208:7): [True: 2.55k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11472|  5.36k|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|  5.36k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  7.92k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 2.80k, False: 2.55k]
  |  |  |  |  |  Branch (208:7): [True: 2.55k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11473|       |
11474|  5.36k|    if ((ss->sec.isServer && ss->ssl3.hs.ws != wait_client_cert) ||
  ------------------
  |  Branch (11474:10): [True: 0, False: 5.36k]
  |  Branch (11474:30): [True: 0, False: 0]
  ------------------
11475|  5.36k|        (!ss->sec.isServer && ss->ssl3.hs.ws != wait_server_cert)) {
  ------------------
  |  Branch (11475:10): [True: 5.36k, False: 0]
  |  Branch (11475:31): [True: 6, False: 5.35k]
  ------------------
11476|      6|        (void)SSL3_SendAlert(ss, alert_fatal, unexpected_message);
11477|      6|        PORT_SetError(SSL_ERROR_RX_UNEXPECTED_CERTIFICATE);
  ------------------
  |  |   65|      6|#define PORT_SetError PORT_SetError_Util
  ------------------
11478|      6|        return SECFailure;
11479|      6|    }
11480|       |
11481|  5.35k|    if (ss->sec.isServer) {
  ------------------
  |  Branch (11481:9): [True: 0, False: 5.35k]
  ------------------
11482|      0|        dtls_ReceivedFirstMessageInFlight(ss);
11483|      0|    }
11484|       |
11485|  5.35k|    return ssl3_CompleteHandleCertificate(ss, b, length);
11486|  5.36k|}
ssl3con.c:ssl3_HandleCertificateStatus:
11401|     27|{
11402|     27|    SECStatus rv;
11403|       |
11404|     27|    if (ss->ssl3.hs.ws != wait_certificate_status) {
  ------------------
  |  Branch (11404:9): [True: 2, False: 25]
  ------------------
11405|      2|        (void)SSL3_SendAlert(ss, alert_fatal, unexpected_message);
11406|      2|        PORT_SetError(SSL_ERROR_RX_UNEXPECTED_CERT_STATUS);
  ------------------
  |  |   65|      2|#define PORT_SetError PORT_SetError_Util
  ------------------
11407|      2|        return SECFailure;
11408|      2|    }
11409|       |
11410|     25|    rv = ssl_ReadCertificateStatus(ss, b, length);
11411|     25|    if (rv != SECSuccess) {
  ------------------
  |  Branch (11411:9): [True: 23, False: 2]
  ------------------
11412|     23|        return SECFailure; /* code already set */
11413|     23|    }
11414|       |
11415|      2|    return ssl3_AuthCertificate(ss);
11416|     25|}
ssl3con.c:ssl3_HandleServerKeyExchange:
 7724|  2.61k|{
 7725|  2.61k|    SECStatus rv;
 7726|       |
 7727|  2.61k|    SSL_TRC(3, ("%d: SSL3[%d]: handle server_key_exchange handshake",
  ------------------
  |  |   71|  2.61k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 2.61k]
  |  |  ------------------
  |  |   72|  2.61k|    ssl_Trace b
  ------------------
 7728|  2.61k|                SSL_GETPID(), ss->fd));
 7729|  2.61k|    PORT_Assert(ss->opt.noLocks || ssl_HaveRecvBufLock(ss));
  ------------------
  |  |  120|  2.61k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  3.82k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 1.40k, False: 1.20k]
  |  |  |  |  |  Branch (208:7): [True: 1.20k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7730|  2.61k|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|  2.61k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  3.82k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 1.40k, False: 1.20k]
  |  |  |  |  |  Branch (208:7): [True: 1.20k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7731|       |
 7732|  2.61k|    if (ss->ssl3.hs.ws != wait_server_key) {
  ------------------
  |  Branch (7732:9): [True: 6, False: 2.60k]
  ------------------
 7733|      6|        SSL3_SendAlert(ss, alert_fatal, unexpected_message);
 7734|      6|        PORT_SetError(SSL_ERROR_RX_UNEXPECTED_SERVER_KEY_EXCH);
  ------------------
  |  |   65|      6|#define PORT_SetError PORT_SetError_Util
  ------------------
 7735|      6|        return SECFailure;
 7736|      6|    }
 7737|       |
 7738|  2.60k|    switch (ss->ssl3.hs.kea_def->exchKeyType) {
 7739|  1.21k|        case ssl_kea_dh:
  ------------------
  |  Branch (7739:9): [True: 1.21k, False: 1.39k]
  ------------------
 7740|  1.21k|            rv = ssl_HandleDHServerKeyExchange(ss, b, length);
 7741|  1.21k|            break;
 7742|       |
 7743|  1.39k|        case ssl_kea_ecdh:
  ------------------
  |  Branch (7743:9): [True: 1.39k, False: 1.21k]
  ------------------
 7744|  1.39k|            rv = ssl3_HandleECDHServerKeyExchange(ss, b, length);
 7745|  1.39k|            break;
 7746|       |
 7747|      0|        default:
  ------------------
  |  Branch (7747:9): [True: 0, False: 2.60k]
  ------------------
 7748|      0|            SSL3_SendAlert(ss, alert_fatal, handshake_failure);
 7749|      0|            PORT_SetError(SEC_ERROR_UNSUPPORTED_KEYALG);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 7750|      0|            rv = SECFailure;
 7751|      0|            break;
 7752|  2.60k|    }
 7753|       |
 7754|  2.60k|    if (rv == SECSuccess) {
  ------------------
  |  Branch (7754:9): [True: 0, False: 2.60k]
  ------------------
 7755|      0|        ss->ssl3.hs.ws = wait_cert_request;
 7756|      0|    }
 7757|       |    /* All Handle*ServerKeyExchange functions set the error code. */
 7758|  2.60k|    return rv;
 7759|  2.60k|}
ssl3con.c:ssl_HandleDHServerKeyExchange:
 7556|  1.21k|{
 7557|  1.21k|    SECStatus rv;
 7558|  1.21k|    int errCode = SSL_ERROR_RX_MALFORMED_SERVER_KEY_EXCH;
 7559|  1.21k|    SSL3AlertDescription desc = illegal_parameter;
 7560|  1.21k|    SSLHashType hashAlg;
 7561|  1.21k|    PRBool isTLS = ss->ssl3.prSpec->version > SSL_LIBRARY_VERSION_3_0;
  ------------------
  |  |   17|  1.21k|#define SSL_LIBRARY_VERSION_3_0                 0x0300
  ------------------
 7562|  1.21k|    SSLSignatureScheme sigScheme;
 7563|       |
 7564|  1.21k|    SECItem dh_p = { siBuffer, NULL, 0 };
 7565|  1.21k|    SECItem dh_g = { siBuffer, NULL, 0 };
 7566|  1.21k|    SECItem dh_Ys = { siBuffer, NULL, 0 };
 7567|  1.21k|    unsigned dh_p_bits;
 7568|  1.21k|    unsigned dh_g_bits;
 7569|  1.21k|    PRInt32 minDH = 0;
 7570|  1.21k|    PRInt32 optval;
 7571|       |
 7572|  1.21k|    SSL3Hashes hashes;
 7573|  1.21k|    SECItem signature = { siBuffer, NULL, 0 };
 7574|  1.21k|    PLArenaPool *arena = NULL;
 7575|  1.21k|    SECKEYPublicKey *peerKey = NULL;
 7576|       |
 7577|  1.21k|    rv = ssl3_ConsumeHandshakeVariable(ss, &dh_p, 2, &b, &length);
 7578|  1.21k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (7578:9): [True: 9, False: 1.20k]
  ------------------
 7579|      9|        goto loser; /* malformed. */
 7580|      9|    }
 7581|  1.20k|    rv = NSS_OptionGet(NSS_KEY_SIZE_POLICY_FLAGS, &optval);
  ------------------
  |  |  317|  1.20k|#define NSS_KEY_SIZE_POLICY_FLAGS 0x00e
  ------------------
 7582|  1.20k|    if ((rv == SECSuccess) && (optval & NSS_KEY_SIZE_POLICY_SSL_FLAG)) {
  ------------------
  |  |  321|  1.20k|#define NSS_KEY_SIZE_POLICY_SSL_FLAG 1
  ------------------
  |  Branch (7582:9): [True: 1.20k, False: 0]
  |  Branch (7582:31): [True: 1.20k, False: 0]
  ------------------
 7583|  1.20k|        (void)NSS_OptionGet(NSS_DH_MIN_KEY_SIZE, &minDH);
  ------------------
  |  |  287|  1.20k|#define NSS_DH_MIN_KEY_SIZE 0x002
  ------------------
 7584|  1.20k|    }
 7585|       |
 7586|  1.20k|    if (minDH <= 0) {
  ------------------
  |  Branch (7586:9): [True: 0, False: 1.20k]
  ------------------
 7587|      0|        minDH = SSL_DH_MIN_P_BITS;
  ------------------
  |  |   19|      0|#define SSL_DH_MIN_P_BITS 1023
  ------------------
 7588|      0|    }
 7589|  1.20k|    dh_p_bits = SECKEY_BigIntegerBitLength(&dh_p);
 7590|  1.20k|    if (dh_p_bits < (unsigned)minDH) {
  ------------------
  |  Branch (7590:9): [True: 5, False: 1.19k]
  ------------------
 7591|      5|        errCode = SSL_ERROR_WEAK_SERVER_EPHEMERAL_DH_KEY;
 7592|      5|        goto alert_loser;
 7593|      5|    }
 7594|  1.19k|    if (dh_p_bits > SSL_MAX_DH_KEY_BITS) {
  ------------------
  |  |  136|  1.19k|#define SSL_MAX_DH_KEY_BITS 8192
  ------------------
  |  Branch (7594:9): [True: 1, False: 1.19k]
  ------------------
 7595|      1|        errCode = SSL_ERROR_DH_KEY_TOO_LONG;
 7596|      1|        goto alert_loser;
 7597|      1|    }
 7598|  1.19k|    rv = ssl3_ConsumeHandshakeVariable(ss, &dh_g, 2, &b, &length);
 7599|  1.19k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (7599:9): [True: 21, False: 1.17k]
  ------------------
 7600|     21|        goto loser; /* malformed. */
 7601|     21|    }
 7602|       |    /* Abort if dh_g is 0, 1, or obviously too big. */
 7603|  1.17k|    dh_g_bits = SECKEY_BigIntegerBitLength(&dh_g);
 7604|  1.17k|    if (dh_g_bits > dh_p_bits || dh_g_bits <= 1) {
  ------------------
  |  Branch (7604:9): [True: 1, False: 1.17k]
  |  Branch (7604:34): [True: 1, False: 1.17k]
  ------------------
 7605|      2|        goto alert_loser;
 7606|      2|    }
 7607|  1.17k|    if (ss->opt.requireDHENamedGroups) {
  ------------------
  |  Branch (7607:9): [True: 107, False: 1.06k]
  ------------------
 7608|       |        /* If we're doing named groups, make sure it's good. */
 7609|    107|        rv = ssl_ValidateDHENamedGroup(ss, &dh_p, &dh_g, NULL, NULL);
 7610|    107|        if (rv != SECSuccess) {
  ------------------
  |  Branch (7610:13): [True: 5, False: 102]
  ------------------
 7611|      5|            errCode = SSL_ERROR_WEAK_SERVER_EPHEMERAL_DH_KEY;
 7612|      5|            goto alert_loser;
 7613|      5|        }
 7614|    107|    }
 7615|       |
 7616|  1.17k|    rv = ssl3_ConsumeHandshakeVariable(ss, &dh_Ys, 2, &b, &length);
 7617|  1.17k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (7617:9): [True: 4, False: 1.16k]
  ------------------
 7618|      4|        goto loser; /* malformed. */
 7619|      4|    }
 7620|  1.16k|    if (!ssl_IsValidDHEShare(&dh_p, &dh_Ys)) {
  ------------------
  |  Branch (7620:9): [True: 16, False: 1.15k]
  ------------------
 7621|     16|        errCode = SSL_ERROR_RX_MALFORMED_DHE_KEY_SHARE;
 7622|     16|        goto alert_loser;
 7623|     16|    }
 7624|       |
 7625|  1.15k|    if (ss->version >= SSL_LIBRARY_VERSION_TLS_1_2) {
  ------------------
  |  |   20|  1.15k|#define SSL_LIBRARY_VERSION_TLS_1_2             0x0303
  ------------------
  |  Branch (7625:9): [True: 1.14k, False: 6]
  ------------------
 7626|  1.14k|        rv = ssl_ConsumeSignatureScheme(ss, &b, &length, &sigScheme);
 7627|  1.14k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (7627:13): [True: 5, False: 1.13k]
  ------------------
 7628|      5|            goto loser; /* alert already sent */
 7629|      5|        }
 7630|  1.13k|        rv = ssl_CheckSignatureSchemeConsistency(
 7631|  1.13k|            ss, sigScheme, &ss->sec.peerCert->subjectPublicKeyInfo);
 7632|  1.13k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (7632:13): [True: 2, False: 1.13k]
  ------------------
 7633|      2|            goto alert_loser;
 7634|      2|        }
 7635|  1.13k|        hashAlg = ssl_SignatureSchemeToHashType(sigScheme);
 7636|  1.13k|    } else {
 7637|       |        /* Use ssl_hash_none to represent the MD5+SHA1 combo. */
 7638|      6|        hashAlg = ssl_hash_none;
 7639|      6|        sigScheme = ssl_sig_none;
 7640|      6|    }
 7641|  1.14k|    rv = ssl3_ConsumeHandshakeVariable(ss, &signature, 2, &b, &length);
 7642|  1.14k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (7642:9): [True: 2, False: 1.14k]
  ------------------
 7643|      2|        goto loser; /* malformed. */
 7644|      2|    }
 7645|  1.14k|    if (length != 0) {
  ------------------
  |  Branch (7645:9): [True: 1, False: 1.14k]
  ------------------
 7646|      1|        if (isTLS) {
  ------------------
  |  Branch (7646:13): [True: 1, False: 0]
  ------------------
 7647|      1|            desc = decode_error;
 7648|      1|        }
 7649|      1|        goto alert_loser; /* malformed. */
 7650|      1|    }
 7651|       |
 7652|  1.14k|    PRINT_BUF(60, (NULL, "Server DH p", dh_p.data, dh_p.len));
  ------------------
  |  |   74|  1.14k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 1.14k]
  |  |  ------------------
  |  |   75|  1.14k|    ssl_PrintBuf b
  ------------------
 7653|  1.14k|    PRINT_BUF(60, (NULL, "Server DH g", dh_g.data, dh_g.len));
  ------------------
  |  |   74|  1.14k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 1.14k]
  |  |  ------------------
  |  |   75|  1.14k|    ssl_PrintBuf b
  ------------------
 7654|  1.14k|    PRINT_BUF(60, (NULL, "Server DH Ys", dh_Ys.data, dh_Ys.len));
  ------------------
  |  |   74|  1.14k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 1.14k]
  |  |  ------------------
  |  |   75|  1.14k|    ssl_PrintBuf b
  ------------------
 7655|       |
 7656|       |    /* failures after this point are not malformed handshakes. */
 7657|       |    /* TLS: send decrypt_error if signature failed. */
 7658|  1.14k|    desc = isTLS ? decrypt_error : handshake_failure;
  ------------------
  |  Branch (7658:12): [True: 1.14k, False: 0]
  ------------------
 7659|       |
 7660|       |    /*
 7661|       |     * Check to make sure the hash is signed by right guy.
 7662|       |     */
 7663|  1.14k|    rv = ssl3_ComputeDHKeyHash(ss, hashAlg, &hashes,
 7664|  1.14k|                               dh_p, dh_g, dh_Ys, PR_FALSE /* padY */);
  ------------------
  |  |  438|  1.14k|#define PR_FALSE 0
  ------------------
 7665|  1.14k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (7665:9): [True: 0, False: 1.14k]
  ------------------
 7666|      0|        errCode =
 7667|      0|            ssl_MapLowLevelError(SSL_ERROR_SERVER_KEY_EXCHANGE_FAILURE);
 7668|      0|        goto alert_loser;
 7669|      0|    }
 7670|  1.14k|    rv = ssl3_VerifySignedHashes(ss, sigScheme, &hashes, &signature);
 7671|  1.14k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (7671:9): [True: 1.14k, False: 0]
  ------------------
 7672|  1.14k|        errCode =
 7673|  1.14k|            ssl_MapLowLevelError(SSL_ERROR_SERVER_KEY_EXCHANGE_FAILURE);
 7674|  1.14k|        goto alert_loser;
 7675|  1.14k|    }
 7676|       |
 7677|       |    /*
 7678|       |     * we really need to build a new key here because we can no longer
 7679|       |     * ignore calling SECKEY_DestroyPublicKey. Using the key may allocate
 7680|       |     * pkcs11 slots and ID's.
 7681|       |     */
 7682|      0|    arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
  ------------------
  |  |   63|      0|#define PORT_NewArena PORT_NewArena_Util
  ------------------
                  arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
  ------------------
  |  |   60|      0|#define DER_DEFAULT_CHUNKSIZE (2048)
  ------------------
 7683|      0|    if (arena == NULL) {
  ------------------
  |  Branch (7683:9): [True: 0, False: 0]
  ------------------
 7684|      0|        errCode = SEC_ERROR_NO_MEMORY;
 7685|      0|        goto loser;
 7686|      0|    }
 7687|       |
 7688|      0|    peerKey = PORT_ArenaZNew(arena, SECKEYPublicKey);
  ------------------
  |  |  155|      0|    (type *)PORT_ArenaZAlloc(poolp, sizeof(type))
  |  |  ------------------
  |  |  |  |   59|      0|#define PORT_ArenaZAlloc PORT_ArenaZAlloc_Util
  |  |  ------------------
  ------------------
 7689|      0|    if (peerKey == NULL) {
  ------------------
  |  Branch (7689:9): [True: 0, False: 0]
  ------------------
 7690|      0|        errCode = SEC_ERROR_NO_MEMORY;
 7691|      0|        goto loser;
 7692|      0|    }
 7693|       |
 7694|      0|    peerKey->arena = arena;
 7695|      0|    peerKey->keyType = dhKey;
 7696|      0|    peerKey->pkcs11Slot = NULL;
 7697|      0|    peerKey->pkcs11ID = CK_INVALID_HANDLE;
  ------------------
  |  |   78|      0|#define CK_INVALID_HANDLE 0
  ------------------
 7698|       |
 7699|      0|    if (SECITEM_CopyItem(arena, &peerKey->u.dh.prime, &dh_p) ||
  ------------------
  |  |  106|      0|#define SECITEM_CopyItem SECITEM_CopyItem_Util
  ------------------
  |  Branch (7699:9): [True: 0, False: 0]
  ------------------
 7700|      0|        SECITEM_CopyItem(arena, &peerKey->u.dh.base, &dh_g) ||
  ------------------
  |  |  106|      0|#define SECITEM_CopyItem SECITEM_CopyItem_Util
  ------------------
  |  Branch (7700:9): [True: 0, False: 0]
  ------------------
 7701|      0|        SECITEM_CopyItem(arena, &peerKey->u.dh.publicValue, &dh_Ys)) {
  ------------------
  |  |  106|      0|#define SECITEM_CopyItem SECITEM_CopyItem_Util
  ------------------
  |  Branch (7701:9): [True: 0, False: 0]
  ------------------
 7702|      0|        errCode = SEC_ERROR_NO_MEMORY;
 7703|      0|        goto loser;
 7704|      0|    }
 7705|      0|    ss->sec.peerKey = peerKey;
 7706|      0|    return SECSuccess;
 7707|       |
 7708|  1.17k|alert_loser:
 7709|  1.17k|    (void)SSL3_SendAlert(ss, alert_fatal, desc);
 7710|  1.21k|loser:
 7711|  1.21k|    if (arena) {
  ------------------
  |  Branch (7711:9): [True: 0, False: 1.21k]
  ------------------
 7712|      0|        PORT_FreeArena(arena, PR_FALSE);
  ------------------
  |  |   61|      0|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                      PORT_FreeArena(arena, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 7713|      0|    }
 7714|  1.21k|    PORT_SetError(ssl_MapLowLevelError(errCode));
  ------------------
  |  |   65|  1.21k|#define PORT_SetError PORT_SetError_Util
  ------------------
 7715|  1.21k|    return SECFailure;
 7716|  1.17k|}
ssl3con.c:ssl3_HandleCertificateRequest:
 7924|    151|{
 7925|    151|    PLArenaPool *arena = NULL;
 7926|    151|    PRBool isTLS = PR_FALSE;
  ------------------
  |  |  438|    151|#define PR_FALSE 0
  ------------------
 7927|    151|    PRBool isTLS12 = PR_FALSE;
  ------------------
  |  |  438|    151|#define PR_FALSE 0
  ------------------
 7928|    151|    int errCode = SSL_ERROR_RX_MALFORMED_CERT_REQUEST;
 7929|    151|    SECStatus rv;
 7930|    151|    SSL3AlertDescription desc = illegal_parameter;
 7931|    151|    SECItem cert_types = { siBuffer, NULL, 0 };
 7932|    151|    SSLSignatureScheme *signatureSchemes = NULL;
 7933|    151|    unsigned int signatureSchemeCount = 0;
 7934|    151|    CERTDistNames ca_list;
 7935|       |
 7936|    151|    SSL_TRC(3, ("%d: SSL3[%d]: handle certificate_request handshake",
  ------------------
  |  |   71|    151|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 151]
  |  |  ------------------
  |  |   72|    151|    ssl_Trace b
  ------------------
 7937|    151|                SSL_GETPID(), ss->fd));
 7938|    151|    PORT_Assert(ss->opt.noLocks || ssl_HaveRecvBufLock(ss));
  ------------------
  |  |  120|    151|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    233|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 69, False: 82]
  |  |  |  |  |  Branch (208:7): [True: 82, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7939|    151|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|    151|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    233|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 69, False: 82]
  |  |  |  |  |  Branch (208:7): [True: 82, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7940|       |
 7941|    151|    if (ss->ssl3.hs.ws != wait_cert_request) {
  ------------------
  |  Branch (7941:9): [True: 4, False: 147]
  ------------------
 7942|      4|        desc = unexpected_message;
 7943|      4|        errCode = SSL_ERROR_RX_UNEXPECTED_CERT_REQUEST;
 7944|      4|        goto alert_loser;
 7945|      4|    }
 7946|       |
 7947|    147|    PORT_Assert(ss->ssl3.clientCertChain == NULL);
  ------------------
  |  |  120|    147|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    147|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 147, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7948|    147|    PORT_Assert(ss->ssl3.clientCertificate == NULL);
  ------------------
  |  |  120|    147|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    147|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 147, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7949|    147|    PORT_Assert(ss->ssl3.clientPrivateKey == NULL);
  ------------------
  |  |  120|    147|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    147|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 147, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7950|       |
 7951|    147|    isTLS = (PRBool)(ss->ssl3.prSpec->version > SSL_LIBRARY_VERSION_3_0);
  ------------------
  |  |   17|    147|#define SSL_LIBRARY_VERSION_3_0                 0x0300
  ------------------
 7952|    147|    isTLS12 = (PRBool)(ss->ssl3.prSpec->version >= SSL_LIBRARY_VERSION_TLS_1_2);
  ------------------
  |  |   20|    147|#define SSL_LIBRARY_VERSION_TLS_1_2             0x0303
  ------------------
 7953|    147|    rv = ssl3_ConsumeHandshakeVariable(ss, &cert_types, 1, &b, &length);
 7954|    147|    if (rv != SECSuccess)
  ------------------
  |  Branch (7954:9): [True: 5, False: 142]
  ------------------
 7955|      5|        goto loser; /* malformed, alert has been sent */
 7956|       |
 7957|    142|    arena = ca_list.arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
  ------------------
  |  |   63|    142|#define PORT_NewArena PORT_NewArena_Util
  ------------------
                  arena = ca_list.arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
  ------------------
  |  |   60|    142|#define DER_DEFAULT_CHUNKSIZE (2048)
  ------------------
 7958|    142|    if (arena == NULL)
  ------------------
  |  Branch (7958:9): [True: 0, False: 142]
  ------------------
 7959|      0|        goto no_mem;
 7960|       |
 7961|    142|    if (isTLS12) {
  ------------------
  |  Branch (7961:9): [True: 129, False: 13]
  ------------------
 7962|    129|        rv = ssl_ParseSignatureSchemes(ss, arena,
 7963|    129|                                       &signatureSchemes,
 7964|    129|                                       &signatureSchemeCount,
 7965|    129|                                       &b, &length);
 7966|    129|        if (rv != SECSuccess) {
  ------------------
  |  Branch (7966:13): [True: 2, False: 127]
  ------------------
 7967|      2|            PORT_SetError(SSL_ERROR_RX_MALFORMED_CERT_REQUEST);
  ------------------
  |  |   65|      2|#define PORT_SetError PORT_SetError_Util
  ------------------
 7968|      2|            goto loser; /* malformed, alert has been sent */
 7969|      2|        }
 7970|    127|        if (signatureSchemeCount == 0) {
  ------------------
  |  Branch (7970:13): [True: 7, False: 120]
  ------------------
 7971|      7|            errCode = SSL_ERROR_UNSUPPORTED_SIGNATURE_ALGORITHM;
 7972|      7|            desc = handshake_failure;
 7973|      7|            goto alert_loser;
 7974|      7|        }
 7975|    127|    }
 7976|       |
 7977|    133|    rv = ssl3_ParseCertificateRequestCAs(ss, &b, &length, &ca_list);
 7978|    133|    if (rv != SECSuccess)
  ------------------
  |  Branch (7978:9): [True: 105, False: 28]
  ------------------
 7979|    105|        goto done; /* alert sent in ssl3_ParseCertificateRequestCAs */
 7980|       |
 7981|     28|    if (length != 0)
  ------------------
  |  Branch (7981:9): [True: 15, False: 13]
  ------------------
 7982|     15|        goto alert_loser; /* malformed */
 7983|       |
 7984|     13|    ss->ssl3.hs.ws = wait_hello_done;
 7985|       |
 7986|     13|    rv = ssl3_BeginHandleCertificateRequest(ss, signatureSchemes,
 7987|     13|                                            signatureSchemeCount, &ca_list);
 7988|     13|    if (rv != SECSuccess) {
  ------------------
  |  Branch (7988:9): [True: 0, False: 13]
  ------------------
 7989|      0|        PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7990|      0|        errCode = SEC_ERROR_LIBRARY_FAILURE;
 7991|      0|        desc = internal_error;
 7992|      0|        goto alert_loser;
 7993|      0|    }
 7994|     13|    goto done;
 7995|       |
 7996|     13|no_mem:
 7997|      0|    rv = SECFailure;
 7998|      0|    PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 7999|      0|    goto done;
 8000|       |
 8001|     26|alert_loser:
 8002|     26|    if (isTLS && desc == illegal_parameter)
  ------------------
  |  Branch (8002:9): [True: 22, False: 4]
  |  Branch (8002:18): [True: 15, False: 7]
  ------------------
 8003|     15|        desc = decode_error;
 8004|     26|    (void)SSL3_SendAlert(ss, alert_fatal, desc);
 8005|     33|loser:
 8006|     33|    PORT_SetError(errCode);
  ------------------
  |  |   65|     33|#define PORT_SetError PORT_SetError_Util
  ------------------
 8007|     33|    rv = SECFailure;
 8008|    151|done:
 8009|    151|    if (arena != NULL)
  ------------------
  |  Branch (8009:9): [True: 142, False: 9]
  ------------------
 8010|    142|        PORT_FreeArena(arena, PR_FALSE);
  ------------------
  |  |   61|    142|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                      PORT_FreeArena(arena, PR_FALSE);
  ------------------
  |  |  438|    142|#define PR_FALSE 0
  ------------------
 8011|    151|    return rv;
 8012|     33|}
ssl3con.c:ssl3_HandleServerHelloDone:
 8257|  1.73k|{
 8258|  1.73k|    SECStatus rv;
 8259|  1.73k|    SSL3WaitState ws = ss->ssl3.hs.ws;
 8260|       |
 8261|  1.73k|    SSL_TRC(3, ("%d: SSL3[%d]: handle server_hello_done handshake",
  ------------------
  |  |   71|  1.73k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 1.73k]
  |  |  ------------------
  |  |   72|  1.73k|    ssl_Trace b
  ------------------
 8262|  1.73k|                SSL_GETPID(), ss->fd));
 8263|  1.73k|    PORT_Assert(ss->opt.noLocks || ssl_HaveRecvBufLock(ss));
  ------------------
  |  |  120|  1.73k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  2.57k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 890, False: 840]
  |  |  |  |  |  Branch (208:7): [True: 840, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8264|  1.73k|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|  1.73k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  2.57k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 890, False: 840]
  |  |  |  |  |  Branch (208:7): [True: 840, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8265|       |
 8266|       |    /* Skipping CertificateRequest is always permitted. */
 8267|  1.73k|    if (ws != wait_hello_done &&
  ------------------
  |  Branch (8267:9): [True: 1.72k, False: 5]
  ------------------
 8268|  1.73k|        ws != wait_cert_request) {
  ------------------
  |  Branch (8268:9): [True: 7, False: 1.71k]
  ------------------
 8269|      7|        SSL3_SendAlert(ss, alert_fatal, unexpected_message);
 8270|      7|        PORT_SetError(SSL_ERROR_RX_UNEXPECTED_HELLO_DONE);
  ------------------
  |  |   65|      7|#define PORT_SetError PORT_SetError_Util
  ------------------
 8271|      7|        return SECFailure;
 8272|      7|    }
 8273|       |
 8274|  1.72k|    rv = ssl3_SendClientSecondRound(ss);
 8275|       |
 8276|  1.72k|    return rv;
 8277|  1.73k|}
ssl3con.c:ssl3_SendClientSecondRound:
 8285|  1.72k|{
 8286|  1.72k|    SECStatus rv;
 8287|  1.72k|    PRBool sendClientCert;
 8288|       |
 8289|  1.72k|    PORT_Assert(ss->opt.noLocks || ssl_HaveRecvBufLock(ss));
  ------------------
  |  |  120|  1.72k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  2.55k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 888, False: 835]
  |  |  |  |  |  Branch (208:7): [True: 835, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8290|  1.72k|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|  1.72k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  2.55k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 888, False: 835]
  |  |  |  |  |  Branch (208:7): [True: 835, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8291|       |
 8292|  1.72k|    sendClientCert = !ss->ssl3.sendEmptyCert &&
  ------------------
  |  Branch (8292:22): [True: 1.71k, False: 5]
  ------------------
 8293|  1.72k|                     ss->ssl3.clientCertChain != NULL &&
  ------------------
  |  Branch (8293:22): [True: 0, False: 1.71k]
  ------------------
 8294|  1.72k|                     ss->ssl3.clientPrivateKey != NULL;
  ------------------
  |  Branch (8294:22): [True: 0, False: 0]
  ------------------
 8295|       |
 8296|       |    /* We must wait for the server's certificate to be authenticated before
 8297|       |     * sending the client certificate in order to disclosing the client
 8298|       |     * certificate to an attacker that does not have a valid cert for the
 8299|       |     * domain we are connecting to.
 8300|       |     *
 8301|       |     * During the initial handshake on a connection, we never send/receive
 8302|       |     * application data until we have authenticated the server's certificate;
 8303|       |     * i.e. we have fully authenticated the handshake before using the cipher
 8304|       |     * specs agreed upon for that handshake. During a renegotiation, we may
 8305|       |     * continue sending and receiving application data during the handshake
 8306|       |     * interleaved with the handshake records. If we were to send the client's
 8307|       |     * second round for a renegotiation before the server's certificate was
 8308|       |     * authenticated, then the application data sent/received after this point
 8309|       |     * would be using cipher spec that hadn't been authenticated. By waiting
 8310|       |     * until the server's certificate has been authenticated during
 8311|       |     * renegotiations, we ensure that renegotiations have the same property
 8312|       |     * as initial handshakes; i.e. we have fully authenticated the handshake
 8313|       |     * before using the cipher specs agreed upon for that handshake for
 8314|       |     * application data.
 8315|       |     */
 8316|  1.72k|    if (ss->ssl3.hs.restartTarget) {
  ------------------
  |  Branch (8316:9): [True: 0, False: 1.72k]
  ------------------
 8317|      0|        PR_NOT_REACHED("unexpected ss->ssl3.hs.restartTarget");
  ------------------
  |  |  213|      0|    PR_Assert(_reasonStr,__FILE__,__LINE__)
  ------------------
 8318|      0|        PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 8319|      0|        return SECFailure;
 8320|      0|    }
 8321|       |    /* Check whether waiting for client certificate selection OR
 8322|       |       waiting on server certificate verification AND
 8323|       |       going to send client cert */
 8324|  1.72k|    if ((ss->ssl3.hs.clientCertificatePending) ||
  ------------------
  |  Branch (8324:9): [True: 0, False: 1.72k]
  ------------------
 8325|  1.72k|        (ss->ssl3.hs.authCertificatePending && (sendClientCert || ss->ssl3.sendEmptyCert || ss->firstHsDone))) {
  ------------------
  |  Branch (8325:10): [True: 0, False: 1.72k]
  |  Branch (8325:49): [True: 0, False: 0]
  |  Branch (8325:67): [True: 0, False: 0]
  |  Branch (8325:93): [True: 0, False: 0]
  ------------------
 8326|      0|        SSL_TRC(3, ("%d: SSL3[%p]: deferring ssl3_SendClientSecondRound because"
  ------------------
  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    ssl_Trace b
  ------------------
 8327|      0|                    " certificate authentication is still pending.",
 8328|      0|                    SSL_GETPID(), ss->fd));
 8329|      0|        ss->ssl3.hs.restartTarget = ssl3_SendClientSecondRound;
 8330|      0|        PORT_SetError(PR_WOULD_BLOCK_ERROR);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
                      PORT_SetError(PR_WOULD_BLOCK_ERROR);
  ------------------
  |  |   22|      0|#define PR_WOULD_BLOCK_ERROR                     (-5998L)
  ------------------
 8331|      0|        return SECFailure;
 8332|      0|    }
 8333|       |
 8334|  1.72k|    ssl_GetXmitBufLock(ss); /*******************************/
  ------------------
  |  | 1466|  1.72k|    {                                           \
  |  | 1467|  1.72k|        if (!ss->opt.noLocks)                   \
  |  |  ------------------
  |  |  |  Branch (1467:13): [True: 835, False: 888]
  |  |  ------------------
  |  | 1468|  1.72k|            PZ_EnterMonitor((ss)->xmitBufLock); \
  |  |  ------------------
  |  |  |  |  256|    835|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1469|  1.72k|    }
  ------------------
 8335|       |
 8336|  1.72k|    if (ss->ssl3.sendEmptyCert) {
  ------------------
  |  Branch (8336:9): [True: 5, False: 1.71k]
  ------------------
 8337|      5|        ss->ssl3.sendEmptyCert = PR_FALSE;
  ------------------
  |  |  438|      5|#define PR_FALSE 0
  ------------------
 8338|      5|        rv = ssl3_SendEmptyCertificate(ss);
 8339|       |        /* Don't send verify */
 8340|      5|        if (rv != SECSuccess) {
  ------------------
  |  Branch (8340:13): [True: 0, False: 5]
  ------------------
 8341|      0|            goto loser; /* error code is set. */
 8342|      0|        }
 8343|  1.71k|    } else if (sendClientCert) {
  ------------------
  |  Branch (8343:16): [True: 0, False: 1.71k]
  ------------------
 8344|      0|        rv = ssl3_SendCertificate(ss);
 8345|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (8345:13): [True: 0, False: 0]
  ------------------
 8346|      0|            goto loser; /* error code is set. */
 8347|      0|        }
 8348|      0|    }
 8349|       |
 8350|  1.72k|    rv = ssl3_SendClientKeyExchange(ss);
 8351|  1.72k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (8351:9): [True: 98, False: 1.62k]
  ------------------
 8352|     98|        goto loser; /* err is set. */
 8353|     98|    }
 8354|       |
 8355|  1.62k|    if (sendClientCert) {
  ------------------
  |  Branch (8355:9): [True: 0, False: 1.62k]
  ------------------
 8356|      0|        rv = ssl3_SendCertificateVerify(ss, ss->ssl3.clientPrivateKey);
 8357|      0|        SECKEY_DestroyPrivateKey(ss->ssl3.clientPrivateKey);
 8358|      0|        ss->ssl3.clientPrivateKey = NULL;
 8359|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (8359:13): [True: 0, False: 0]
  ------------------
 8360|      0|            goto loser; /* err is set. */
 8361|      0|        }
 8362|      0|    }
 8363|       |
 8364|  1.62k|    rv = ssl3_SendChangeCipherSpecs(ss);
 8365|  1.62k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (8365:9): [True: 0, False: 1.62k]
  ------------------
 8366|      0|        goto loser; /* err code was set. */
 8367|      0|    }
 8368|       |
 8369|       |    /* This must be done after we've set ss->ssl3.cwSpec in
 8370|       |     * ssl3_SendChangeCipherSpecs because SSL_GetChannelInfo uses information
 8371|       |     * from cwSpec. This must be done before we call ssl3_CheckFalseStart
 8372|       |     * because the false start callback (if any) may need the information from
 8373|       |     * the functions that depend on this being set.
 8374|       |     */
 8375|  1.62k|    ss->enoughFirstHsDone = PR_TRUE;
  ------------------
  |  |  437|  1.62k|#define PR_TRUE 1
  ------------------
 8376|       |
 8377|  1.62k|    if (!ss->firstHsDone) {
  ------------------
  |  Branch (8377:9): [True: 1.62k, False: 0]
  ------------------
 8378|  1.62k|        if (ss->opt.enableFalseStart) {
  ------------------
  |  Branch (8378:13): [True: 794, False: 831]
  ------------------
 8379|    794|            if (!ss->ssl3.hs.authCertificatePending) {
  ------------------
  |  Branch (8379:17): [True: 794, False: 0]
  ------------------
 8380|       |                /* When we fix bug 589047, we will need to know whether we are
 8381|       |                 * false starting before we try to flush the client second
 8382|       |                 * round to the network. With that in mind, we purposefully
 8383|       |                 * call ssl3_CheckFalseStart before calling ssl3_SendFinished,
 8384|       |                 * which includes a call to ssl3_FlushHandshake, so that
 8385|       |                 * no application develops a reliance on such flushing being
 8386|       |                 * done before its false start callback is called.
 8387|       |                 */
 8388|    794|                ssl_ReleaseXmitBufLock(ss);
  ------------------
  |  | 1471|    794|    {                                          \
  |  | 1472|    794|        if (!ss->opt.noLocks)                  \
  |  |  ------------------
  |  |  |  Branch (1472:13): [True: 402, False: 392]
  |  |  ------------------
  |  | 1473|    794|            PZ_ExitMonitor((ss)->xmitBufLock); \
  |  |  ------------------
  |  |  |  |  257|    402|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1474|    794|    }
  ------------------
 8389|    794|                rv = ssl3_CheckFalseStart(ss);
 8390|    794|                ssl_GetXmitBufLock(ss);
  ------------------
  |  | 1466|    794|    {                                           \
  |  | 1467|    794|        if (!ss->opt.noLocks)                   \
  |  |  ------------------
  |  |  |  Branch (1467:13): [True: 402, False: 392]
  |  |  ------------------
  |  | 1468|    794|            PZ_EnterMonitor((ss)->xmitBufLock); \
  |  |  ------------------
  |  |  |  |  256|    402|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1469|    794|    }
  ------------------
 8391|    794|                if (rv != SECSuccess) {
  ------------------
  |  Branch (8391:21): [True: 0, False: 794]
  ------------------
 8392|      0|                    goto loser;
 8393|      0|                }
 8394|    794|            } else {
 8395|       |                /* The certificate authentication and the server's Finished
 8396|       |                 * message are racing each other. If the certificate
 8397|       |                 * authentication wins, then we will try to false start in
 8398|       |                 * ssl3_AuthCertificateComplete.
 8399|       |                 */
 8400|      0|                SSL_TRC(3, ("%d: SSL3[%p]: deferring false start check because"
  ------------------
  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    ssl_Trace b
  ------------------
 8401|      0|                            " certificate authentication is still pending.",
 8402|      0|                            SSL_GETPID(), ss->fd));
 8403|      0|            }
 8404|    794|        }
 8405|  1.62k|    }
 8406|       |
 8407|  1.62k|    rv = ssl3_SendFinished(ss, 0);
 8408|  1.62k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (8408:9): [True: 0, False: 1.62k]
  ------------------
 8409|      0|        goto loser; /* err code was set. */
 8410|      0|    }
 8411|       |
 8412|  1.62k|    ssl_ReleaseXmitBufLock(ss); /*******************************/
  ------------------
  |  | 1471|  1.62k|    {                                          \
  |  | 1472|  1.62k|        if (!ss->opt.noLocks)                  \
  |  |  ------------------
  |  |  |  Branch (1472:13): [True: 789, False: 836]
  |  |  ------------------
  |  | 1473|  1.62k|            PZ_ExitMonitor((ss)->xmitBufLock); \
  |  |  ------------------
  |  |  |  |  257|    789|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1474|  1.62k|    }
  ------------------
 8413|       |
 8414|  1.62k|    if (ssl3_ExtensionNegotiated(ss, ssl_session_ticket_xtn))
  ------------------
  |  Branch (8414:9): [True: 13, False: 1.61k]
  ------------------
 8415|     13|        ss->ssl3.hs.ws = wait_new_session_ticket;
 8416|  1.61k|    else
 8417|  1.61k|        ss->ssl3.hs.ws = wait_change_cipher;
 8418|       |
 8419|  1.62k|    PORT_Assert(ssl3_WaitingForServerSecondRound(ss));
  ------------------
  |  |  120|  1.62k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.62k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.62k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8420|       |
 8421|  1.62k|    return SECSuccess;
 8422|       |
 8423|     98|loser:
 8424|     98|    ssl_ReleaseXmitBufLock(ss);
  ------------------
  |  | 1471|     98|    {                                          \
  |  | 1472|     98|        if (!ss->opt.noLocks)                  \
  |  |  ------------------
  |  |  |  Branch (1472:13): [True: 46, False: 52]
  |  |  ------------------
  |  | 1473|     98|            PZ_ExitMonitor((ss)->xmitBufLock); \
  |  |  ------------------
  |  |  |  |  257|     46|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1474|     98|    }
  ------------------
 8425|     98|    return rv;
 8426|  1.62k|}
ssl3con.c:ssl3_SendClientKeyExchange:
 6554|  1.72k|{
 6555|  1.72k|    SECKEYPublicKey *serverKey = NULL;
 6556|  1.72k|    SECStatus rv = SECFailure;
 6557|       |
 6558|  1.72k|    SSL_TRC(3, ("%d: SSL3[%d]: send client_key_exchange handshake",
  ------------------
  |  |   71|  1.72k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 1.72k]
  |  |  ------------------
  |  |   72|  1.72k|    ssl_Trace b
  ------------------
 6559|  1.72k|                SSL_GETPID(), ss->fd));
 6560|       |
 6561|  1.72k|    PORT_Assert(ss->opt.noLocks || ssl_HaveXmitBufLock(ss));
  ------------------
  |  |  120|  1.72k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  2.55k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 888, False: 835]
  |  |  |  |  |  Branch (208:7): [True: 835, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6562|  1.72k|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|  1.72k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  2.55k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 888, False: 835]
  |  |  |  |  |  Branch (208:7): [True: 835, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6563|       |
 6564|  1.72k|    if (ss->sec.peerKey == NULL) {
  ------------------
  |  Branch (6564:9): [True: 1.72k, False: 0]
  ------------------
 6565|  1.72k|        serverKey = CERT_ExtractPublicKey(ss->sec.peerCert);
 6566|  1.72k|        if (serverKey == NULL) {
  ------------------
  |  Branch (6566:13): [True: 0, False: 1.72k]
  ------------------
 6567|      0|            ssl_MapLowLevelError(SSL_ERROR_EXTRACT_PUBLIC_KEY_FAILURE);
 6568|      0|            return SECFailure;
 6569|      0|        }
 6570|  1.72k|    } else {
 6571|      0|        serverKey = ss->sec.peerKey;
 6572|      0|        ss->sec.peerKey = NULL; /* we're done with it now */
 6573|      0|    }
 6574|       |
 6575|  1.72k|    ss->sec.keaType = ss->ssl3.hs.kea_def->exchKeyType;
 6576|  1.72k|    ss->sec.keaKeyBits = SECKEY_PublicKeyStrengthInBits(serverKey);
 6577|       |
 6578|  1.72k|    switch (ss->ssl3.hs.kea_def->exchKeyType) {
 6579|  1.31k|        case ssl_kea_rsa:
  ------------------
  |  Branch (6579:9): [True: 1.31k, False: 406]
  ------------------
 6580|  1.31k|            rv = ssl3_SendRSAClientKeyExchange(ss, serverKey);
 6581|  1.31k|            break;
 6582|       |
 6583|      0|        case ssl_kea_dh:
  ------------------
  |  Branch (6583:9): [True: 0, False: 1.72k]
  ------------------
 6584|      0|            rv = ssl3_SendDHClientKeyExchange(ss, serverKey);
 6585|      0|            break;
 6586|       |
 6587|    406|        case ssl_kea_ecdh:
  ------------------
  |  Branch (6587:9): [True: 406, False: 1.31k]
  ------------------
 6588|    406|            rv = ssl3_SendECDHClientKeyExchange(ss, serverKey);
 6589|    406|            break;
 6590|       |
 6591|      0|        default:
  ------------------
  |  Branch (6591:9): [True: 0, False: 1.72k]
  ------------------
 6592|      0|            PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6593|      0|            PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 6594|      0|            break;
 6595|  1.72k|    }
 6596|       |
 6597|  1.72k|    SSL_TRC(3, ("%d: SSL3[%d]: DONE sending client_key_exchange",
  ------------------
  |  |   71|  1.72k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 1.72k]
  |  |  ------------------
  |  |   72|  1.72k|    ssl_Trace b
  ------------------
 6598|  1.72k|                SSL_GETPID(), ss->fd));
 6599|       |
 6600|  1.72k|    SECKEY_DestroyPublicKey(serverKey);
 6601|  1.72k|    return rv; /* err code already set. */
 6602|  1.72k|}
ssl3con.c:ssl3_SendRSAClientKeyExchange:
 6319|  1.31k|{
 6320|  1.31k|    PK11SymKey *pms = NULL;
 6321|  1.31k|    SECStatus rv = SECFailure;
 6322|  1.31k|    SECItem enc_pms = { siBuffer, NULL, 0 };
 6323|  1.31k|    PRBool isTLS;
 6324|       |
 6325|  1.31k|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|  1.31k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.95k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 681, False: 636]
  |  |  |  |  |  Branch (208:7): [True: 636, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6326|  1.31k|    PORT_Assert(ss->opt.noLocks || ssl_HaveXmitBufLock(ss));
  ------------------
  |  |  120|  1.31k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.95k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 681, False: 636]
  |  |  |  |  |  Branch (208:7): [True: 636, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6327|       |
 6328|       |    /* Generate the pre-master secret ...  */
 6329|  1.31k|    ssl_GetSpecWriteLock(ss);
  ------------------
  |  | 1435|  1.31k|    {                                            \
  |  | 1436|  1.31k|        if (!ss->opt.noLocks)                    \
  |  |  ------------------
  |  |  |  Branch (1436:13): [True: 636, False: 681]
  |  |  ------------------
  |  | 1437|  1.31k|            NSSRWLock_LockWrite((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   48|    636|#define NSSRWLock_LockWrite NSSRWLock_LockWrite_Util
  |  |  ------------------
  |  | 1438|  1.31k|    }
  ------------------
 6330|  1.31k|    isTLS = (PRBool)(ss->version > SSL_LIBRARY_VERSION_3_0);
  ------------------
  |  |   17|  1.31k|#define SSL_LIBRARY_VERSION_3_0                 0x0300
  ------------------
 6331|       |
 6332|  1.31k|    pms = ssl3_GenerateRSAPMS(ss, ss->ssl3.pwSpec, NULL);
 6333|  1.31k|    ssl_ReleaseSpecWriteLock(ss);
  ------------------
  |  | 1440|  1.31k|    {                                              \
  |  | 1441|  1.31k|        if (!ss->opt.noLocks)                      \
  |  |  ------------------
  |  |  |  Branch (1441:13): [True: 636, False: 681]
  |  |  ------------------
  |  | 1442|  1.31k|            NSSRWLock_UnlockWrite((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   51|    636|#define NSSRWLock_UnlockWrite NSSRWLock_UnlockWrite_Util
  |  |  ------------------
  |  | 1443|  1.31k|    }
  ------------------
 6334|  1.31k|    if (pms == NULL) {
  ------------------
  |  Branch (6334:9): [True: 0, False: 1.31k]
  ------------------
 6335|      0|        ssl_MapLowLevelError(SSL_ERROR_CLIENT_KEY_EXCHANGE_FAILURE);
 6336|      0|        goto loser;
 6337|      0|    }
 6338|       |
 6339|       |    /* Get the wrapped (encrypted) pre-master secret, enc_pms */
 6340|  1.31k|    unsigned int svrPubKeyBits = SECKEY_PublicKeyStrengthInBits(svrPubKey);
 6341|  1.31k|    enc_pms.len = (svrPubKeyBits + 7) / 8;
 6342|       |    /* Check that the RSA key isn't larger than 8k bit. */
 6343|  1.31k|    if (svrPubKeyBits > SSL_MAX_RSA_KEY_BITS) {
  ------------------
  |  |  137|  1.31k|#define SSL_MAX_RSA_KEY_BITS 8192
  ------------------
  |  Branch (6343:9): [True: 1, False: 1.31k]
  ------------------
 6344|      1|        (void)SSL3_SendAlert(ss, alert_fatal, illegal_parameter);
 6345|      1|        ssl_MapLowLevelError(SSL_ERROR_CLIENT_KEY_EXCHANGE_FAILURE);
 6346|      1|        goto loser;
 6347|      1|    }
 6348|  1.31k|    enc_pms.data = (unsigned char *)PORT_Alloc(enc_pms.len);
  ------------------
  |  |   52|  1.31k|#define PORT_Alloc PORT_Alloc_Util
  ------------------
 6349|  1.31k|    if (enc_pms.data == NULL) {
  ------------------
  |  Branch (6349:9): [True: 0, False: 1.31k]
  ------------------
 6350|      0|        goto loser; /* err set by PORT_Alloc */
 6351|      0|    }
 6352|       |
 6353|       |    /* Wrap pre-master secret in server's public key. */
 6354|  1.31k|    rv = PK11_PubWrapSymKey(CKM_RSA_PKCS, svrPubKey, pms, &enc_pms);
  ------------------
  |  |  720|  1.31k|#define CKM_RSA_PKCS 0x00000001UL
  ------------------
 6355|  1.31k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (6355:9): [True: 48, False: 1.26k]
  ------------------
 6356|     48|        ssl_MapLowLevelError(SSL_ERROR_CLIENT_KEY_EXCHANGE_FAILURE);
 6357|     48|        goto loser;
 6358|     48|    }
 6359|       |
 6360|  1.26k|#ifdef TRACE
 6361|  1.26k|    if (ssl_trace >= 100) {
  ------------------
  |  Branch (6361:9): [True: 0, False: 1.26k]
  ------------------
 6362|      0|        SECStatus extractRV = PK11_ExtractKeyValue(pms);
 6363|      0|        if (extractRV == SECSuccess) {
  ------------------
  |  Branch (6363:13): [True: 0, False: 0]
  ------------------
 6364|      0|            SECItem *keyData = PK11_GetKeyData(pms);
 6365|      0|            if (keyData && keyData->data && keyData->len) {
  ------------------
  |  Branch (6365:17): [True: 0, False: 0]
  |  Branch (6365:28): [True: 0, False: 0]
  |  Branch (6365:45): [True: 0, False: 0]
  ------------------
 6366|      0|                ssl_PrintBuf(ss, "Pre-Master Secret",
 6367|      0|                             keyData->data, keyData->len);
 6368|      0|            }
 6369|      0|        }
 6370|      0|    }
 6371|  1.26k|#endif
 6372|       |
 6373|  1.26k|    rv = ssl3_AppendHandshakeHeader(ss, ssl_hs_client_key_exchange,
 6374|  1.26k|                                    isTLS ? enc_pms.len + 2
  ------------------
  |  Branch (6374:37): [True: 1.26k, False: 0]
  ------------------
 6375|  1.26k|                                          : enc_pms.len);
 6376|  1.26k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (6376:9): [True: 0, False: 1.26k]
  ------------------
 6377|      0|        goto loser; /* err set by ssl3_AppendHandshake* */
 6378|      0|    }
 6379|  1.26k|    if (isTLS) {
  ------------------
  |  Branch (6379:9): [True: 1.26k, False: 0]
  ------------------
 6380|  1.26k|        rv = ssl3_AppendHandshakeVariable(ss, enc_pms.data, enc_pms.len, 2);
 6381|  1.26k|    } else {
 6382|      0|        rv = ssl3_AppendHandshake(ss, enc_pms.data, enc_pms.len);
 6383|      0|    }
 6384|  1.26k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (6384:9): [True: 0, False: 1.26k]
  ------------------
 6385|      0|        goto loser; /* err set by ssl3_AppendHandshake* */
 6386|      0|    }
 6387|       |
 6388|  1.26k|    rv = ssl3_InitPendingCipherSpecs(ss, pms, PR_TRUE);
  ------------------
  |  |  437|  1.26k|#define PR_TRUE 1
  ------------------
 6389|  1.26k|    PK11_FreeSymKey(pms);
 6390|  1.26k|    pms = NULL;
 6391|       |
 6392|  1.26k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (6392:9): [True: 0, False: 1.26k]
  ------------------
 6393|      0|        ssl_MapLowLevelError(SSL_ERROR_CLIENT_KEY_EXCHANGE_FAILURE);
 6394|      0|        goto loser;
 6395|      0|    }
 6396|       |
 6397|  1.26k|    rv = SECSuccess;
 6398|       |
 6399|  1.31k|loser:
 6400|  1.31k|    if (enc_pms.data != NULL) {
  ------------------
  |  Branch (6400:9): [True: 1.31k, False: 1]
  ------------------
 6401|  1.31k|        PORT_Free(enc_pms.data);
  ------------------
  |  |   60|  1.31k|#define PORT_Free PORT_Free_Util
  ------------------
 6402|  1.31k|    }
 6403|  1.31k|    if (pms != NULL) {
  ------------------
  |  Branch (6403:9): [True: 49, False: 1.26k]
  ------------------
 6404|     49|        PK11_FreeSymKey(pms);
 6405|     49|    }
 6406|  1.31k|    return rv;
 6407|  1.26k|}
ssl3con.c:ssl3_GenerateRSAPMS:
10675|  1.31k|{
10676|  1.31k|    PK11SymKey *pms = NULL;
10677|  1.31k|    PK11SlotInfo *slot = serverKeySlot;
10678|  1.31k|    void *pwArg = ss->pkcs11PinArg;
10679|  1.31k|    SECItem param;
10680|  1.31k|    CK_VERSION version;
10681|  1.31k|    CK_MECHANISM_TYPE mechanism_array[3];
10682|       |
10683|  1.31k|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|  1.31k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.95k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 681, False: 636]
  |  |  |  |  |  Branch (208:7): [True: 636, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
10684|       |
10685|  1.31k|    if (slot == NULL) {
  ------------------
  |  Branch (10685:9): [True: 1.31k, False: 0]
  ------------------
10686|  1.31k|        SSLCipherAlgorithm calg;
10687|       |        /* The specReadLock would suffice here, but we cannot assert on
10688|       |        ** read locks.  Also, all the callers who call with a non-null
10689|       |        ** slot already hold the SpecWriteLock.
10690|       |        */
10691|  1.31k|        PORT_Assert(ss->opt.noLocks || ssl_HaveSpecWriteLock(ss));
  ------------------
  |  |  120|  1.31k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.95k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 681, False: 636]
  |  |  |  |  |  Branch (208:7): [True: 636, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
10692|  1.31k|        PORT_Assert(ss->ssl3.prSpec->epoch == ss->ssl3.pwSpec->epoch);
  ------------------
  |  |  120|  1.31k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.31k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.31k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
10693|       |
10694|  1.31k|        calg = spec->cipherDef->calg;
10695|       |
10696|       |        /* First get an appropriate slot.  */
10697|  1.31k|        mechanism_array[0] = CKM_SSL3_PRE_MASTER_KEY_GEN;
  ------------------
  |  |  959|  1.31k|#define CKM_SSL3_PRE_MASTER_KEY_GEN 0x00000370UL
  ------------------
10698|  1.31k|        mechanism_array[1] = CKM_RSA_PKCS;
  ------------------
  |  |  720|  1.31k|#define CKM_RSA_PKCS 0x00000001UL
  ------------------
10699|  1.31k|        mechanism_array[2] = ssl3_Alg2Mech(calg);
10700|       |
10701|  1.31k|        slot = PK11_GetBestSlotMultiple(mechanism_array, 3, pwArg);
10702|  1.31k|        if (slot == NULL) {
  ------------------
  |  Branch (10702:13): [True: 494, False: 823]
  ------------------
10703|       |            /* can't find a slot with all three, find a slot with the minimum */
10704|    494|            slot = PK11_GetBestSlotMultiple(mechanism_array, 2, pwArg);
10705|    494|            if (slot == NULL) {
  ------------------
  |  Branch (10705:17): [True: 0, False: 494]
  ------------------
10706|      0|                PORT_SetError(SSL_ERROR_TOKEN_SLOT_NOT_FOUND);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
10707|      0|                return pms; /* which is NULL */
10708|      0|            }
10709|    494|        }
10710|  1.31k|    }
10711|       |
10712|       |    /* Generate the pre-master secret ...  */
10713|  1.31k|    if (IS_DTLS(ss)) {
  ------------------
  |  |  892|  1.31k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 1.31k, False: 0]
  |  |  ------------------
  ------------------
10714|  1.31k|        SSL3ProtocolVersion temp;
10715|       |
10716|  1.31k|        temp = dtls_TLSVersionToDTLSVersion(ss->clientHelloVersion);
10717|  1.31k|        version.major = MSB(temp);
  ------------------
  |  |   94|  1.31k|#define MSB(x) ((unsigned char)(((unsigned)(x)) >> 8))
  ------------------
10718|  1.31k|        version.minor = LSB(temp);
  ------------------
  |  |   93|  1.31k|#define LSB(x) ((unsigned char)((x)&0xff))
  ------------------
10719|  1.31k|    } else {
10720|      0|        version.major = MSB(ss->clientHelloVersion);
  ------------------
  |  |   94|      0|#define MSB(x) ((unsigned char)(((unsigned)(x)) >> 8))
  ------------------
10721|      0|        version.minor = LSB(ss->clientHelloVersion);
  ------------------
  |  |   93|      0|#define LSB(x) ((unsigned char)((x)&0xff))
  ------------------
10722|      0|    }
10723|       |
10724|  1.31k|    param.data = (unsigned char *)&version;
10725|  1.31k|    param.len = sizeof version;
10726|       |
10727|  1.31k|    pms = PK11_KeyGen(slot, CKM_SSL3_PRE_MASTER_KEY_GEN, &param, 0, pwArg);
  ------------------
  |  |  959|  1.31k|#define CKM_SSL3_PRE_MASTER_KEY_GEN 0x00000370UL
  ------------------
10728|  1.31k|    if (!serverKeySlot)
  ------------------
  |  Branch (10728:9): [True: 1.31k, False: 0]
  ------------------
10729|  1.31k|        PK11_FreeSlot(slot);
10730|  1.31k|    if (pms == NULL) {
  ------------------
  |  Branch (10730:9): [True: 0, False: 1.31k]
  ------------------
10731|      0|        ssl_MapLowLevelError(SSL_ERROR_CLIENT_KEY_EXCHANGE_FAILURE);
10732|      0|    }
10733|  1.31k|    return pms;
10734|  1.31k|}
ssl3con.c:ssl3_HandleNewSessionTicket:
11093|     10|{
11094|     10|    SECStatus rv;
11095|     10|    SECItem ticketData;
11096|     10|    PRUint32 temp;
11097|       |
11098|     10|    SSL_TRC(3, ("%d: SSL3[%d]: handle session_ticket handshake",
  ------------------
  |  |   71|     10|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 10]
  |  |  ------------------
  |  |   72|     10|    ssl_Trace b
  ------------------
11099|     10|                SSL_GETPID(), ss->fd));
11100|       |
11101|     10|    PORT_Assert(ss->opt.noLocks || ssl_HaveRecvBufLock(ss));
  ------------------
  |  |  120|     10|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|     14|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 6, False: 4]
  |  |  |  |  |  Branch (208:7): [True: 4, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11102|     10|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|     10|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|     14|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 6, False: 4]
  |  |  |  |  |  Branch (208:7): [True: 4, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11103|       |
11104|     10|    PORT_Assert(!ss->ssl3.hs.newSessionTicket.ticket.data);
  ------------------
  |  |  120|     10|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|     10|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 10, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11105|     10|    PORT_Assert(!ss->ssl3.hs.receivedNewSessionTicket);
  ------------------
  |  |  120|     10|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|     10|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 10, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11106|       |
11107|     10|    if (ss->ssl3.hs.ws != wait_new_session_ticket) {
  ------------------
  |  Branch (11107:9): [True: 5, False: 5]
  ------------------
11108|      5|        SSL3_SendAlert(ss, alert_fatal, unexpected_message);
11109|      5|        PORT_SetError(SSL_ERROR_RX_UNEXPECTED_NEW_SESSION_TICKET);
  ------------------
  |  |   65|      5|#define PORT_SetError PORT_SetError_Util
  ------------------
11110|      5|        return SECFailure;
11111|      5|    }
11112|       |
11113|       |    /* RFC5077 Section 3.3: "The client MUST NOT treat the ticket as valid
11114|       |     * until it has verified the server's Finished message." See the comment in
11115|       |     * ssl3_FinishHandshake for more details.
11116|       |     */
11117|      5|    ss->ssl3.hs.newSessionTicket.received_timestamp = ssl_Time(ss);
11118|      5|    if (length < 4) {
  ------------------
  |  Branch (11118:9): [True: 0, False: 5]
  ------------------
11119|      0|        (void)SSL3_SendAlert(ss, alert_fatal, decode_error);
11120|      0|        PORT_SetError(SSL_ERROR_RX_MALFORMED_NEW_SESSION_TICKET);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
11121|      0|        return SECFailure;
11122|      0|    }
11123|       |
11124|      5|    rv = ssl3_ConsumeHandshakeNumber(ss, &temp, 4, &b, &length);
11125|      5|    if (rv != SECSuccess) {
  ------------------
  |  Branch (11125:9): [True: 0, False: 5]
  ------------------
11126|      0|        PORT_SetError(SSL_ERROR_RX_MALFORMED_NEW_SESSION_TICKET);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
11127|      0|        return SECFailure;
11128|      0|    }
11129|      5|    ss->ssl3.hs.newSessionTicket.ticket_lifetime_hint = temp;
11130|       |
11131|      5|    rv = ssl3_ConsumeHandshakeVariable(ss, &ticketData, 2, &b, &length);
11132|      5|    if (rv != SECSuccess || length != 0) {
  ------------------
  |  Branch (11132:9): [True: 2, False: 3]
  |  Branch (11132:29): [True: 2, False: 1]
  ------------------
11133|      4|        (void)SSL3_SendAlert(ss, alert_fatal, decode_error);
11134|      4|        PORT_SetError(SSL_ERROR_RX_MALFORMED_NEW_SESSION_TICKET);
  ------------------
  |  |   65|      4|#define PORT_SetError PORT_SetError_Util
  ------------------
11135|      4|        return SECFailure; /* malformed */
11136|      4|    }
11137|       |    /* If the server sent a zero-length ticket, ignore it and keep the
11138|       |     * existing ticket. */
11139|      1|    if (ticketData.len != 0) {
  ------------------
  |  Branch (11139:9): [True: 1, False: 0]
  ------------------
11140|      1|        rv = SECITEM_CopyItem(NULL, &ss->ssl3.hs.newSessionTicket.ticket,
  ------------------
  |  |  106|      1|#define SECITEM_CopyItem SECITEM_CopyItem_Util
  ------------------
11141|      1|                              &ticketData);
11142|      1|        if (rv != SECSuccess) {
  ------------------
  |  Branch (11142:13): [True: 0, False: 1]
  ------------------
11143|      0|            return rv;
11144|      0|        }
11145|      1|        ss->ssl3.hs.receivedNewSessionTicket = PR_TRUE;
  ------------------
  |  |  437|      1|#define PR_TRUE 1
  ------------------
11146|      1|    }
11147|       |
11148|      1|    ss->ssl3.hs.ws = wait_change_cipher;
11149|      1|    return SECSuccess;
11150|      1|}
ssl3con.c:ssl3_HandleFinished:
12314|      4|{
12315|      4|    SECStatus rv = SECSuccess;
12316|      4|    PRBool isServer = ss->sec.isServer;
12317|      4|    PRBool isTLS;
12318|      4|    SSL3Hashes hashes;
12319|       |
12320|      4|    PORT_Assert(ss->opt.noLocks || ssl_HaveRecvBufLock(ss));
  ------------------
  |  |  120|      4|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      7|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 1, False: 3]
  |  |  |  |  |  Branch (208:7): [True: 3, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12321|      4|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|      4|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      7|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 1, False: 3]
  |  |  |  |  |  Branch (208:7): [True: 3, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12322|       |
12323|      4|    SSL_TRC(3, ("%d: SSL3[%d]: handle finished handshake",
  ------------------
  |  |   71|      4|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 4]
  |  |  ------------------
  |  |   72|      4|    ssl_Trace b
  ------------------
12324|      4|                SSL_GETPID(), ss->fd));
12325|       |
12326|      4|    if (ss->ssl3.hs.ws != wait_finished) {
  ------------------
  |  Branch (12326:9): [True: 4, False: 0]
  ------------------
12327|      4|        SSL3_SendAlert(ss, alert_fatal, unexpected_message);
12328|      4|        PORT_SetError(SSL_ERROR_RX_UNEXPECTED_FINISHED);
  ------------------
  |  |   65|      4|#define PORT_SetError PORT_SetError_Util
  ------------------
12329|      4|        return SECFailure;
12330|      4|    }
12331|       |
12332|      0|    if (!ss->sec.isServer || !ss->opt.requestCertificate) {
  ------------------
  |  Branch (12332:9): [True: 0, False: 0]
  |  Branch (12332:30): [True: 0, False: 0]
  ------------------
12333|      0|        dtls_ReceivedFirstMessageInFlight(ss);
12334|      0|    }
12335|       |
12336|      0|    rv = ssl3_ComputeHandshakeHashes(ss, ss->ssl3.crSpec, &hashes,
12337|      0|                                     isServer ? sender_client : sender_server);
  ------------------
  |  Branch (12337:38): [True: 0, False: 0]
  ------------------
12338|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (12338:9): [True: 0, False: 0]
  ------------------
12339|      0|        PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
12340|      0|        return SECFailure;
12341|      0|    }
12342|       |
12343|      0|    rv = ssl_HashHandshakeMessage(ss, ssl_hs_finished, b, length);
12344|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (12344:9): [True: 0, False: 0]
  ------------------
12345|      0|        PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
12346|      0|        return rv;
12347|      0|    }
12348|       |
12349|      0|    isTLS = (PRBool)(ss->ssl3.crSpec->version > SSL_LIBRARY_VERSION_3_0);
  ------------------
  |  |   17|      0|#define SSL_LIBRARY_VERSION_3_0                 0x0300
  ------------------
12350|      0|    if (isTLS) {
  ------------------
  |  Branch (12350:9): [True: 0, False: 0]
  ------------------
12351|      0|        TLSFinished tlsFinished;
12352|       |
12353|      0|        if (length != sizeof(tlsFinished)) {
  ------------------
  |  Branch (12353:13): [True: 0, False: 0]
  ------------------
12354|      0|#ifndef UNSAFE_FUZZER_MODE
12355|      0|            (void)SSL3_SendAlert(ss, alert_fatal, decode_error);
12356|      0|            PORT_SetError(SSL_ERROR_RX_MALFORMED_FINISHED);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
12357|      0|            return SECFailure;
12358|      0|#endif
12359|      0|        }
12360|      0|        rv = ssl3_ComputeTLSFinished(ss, ss->ssl3.crSpec, !isServer,
12361|      0|                                     &hashes, &tlsFinished);
12362|      0|        if (!isServer)
  ------------------
  |  Branch (12362:13): [True: 0, False: 0]
  ------------------
12363|      0|            ss->ssl3.hs.finishedMsgs.tFinished[1] = tlsFinished;
12364|      0|        else
12365|      0|            ss->ssl3.hs.finishedMsgs.tFinished[0] = tlsFinished;
12366|      0|        ss->ssl3.hs.finishedBytes = sizeof(tlsFinished);
12367|      0|        if (rv != SECSuccess ||
  ------------------
  |  Branch (12367:13): [True: 0, False: 0]
  ------------------
12368|      0|            0 != NSS_SecureMemcmp(&tlsFinished, b,
  ------------------
  |  Branch (12368:13): [True: 0, False: 0]
  ------------------
12369|      0|                                  PR_MIN(length, ss->ssl3.hs.finishedBytes))) {
  ------------------
  |  |  158|      0|#define PR_MIN(x,y)     ((x)<(y)?(x):(y))
  |  |  ------------------
  |  |  |  Branch (158:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
12370|      0|#ifndef UNSAFE_FUZZER_MODE
12371|      0|            (void)SSL3_SendAlert(ss, alert_fatal, decrypt_error);
12372|      0|            PORT_SetError(SSL_ERROR_BAD_HANDSHAKE_HASH_VALUE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
12373|      0|            return SECFailure;
12374|      0|#endif
12375|      0|        }
12376|      0|    } else {
12377|      0|        if (length != sizeof(SSL3Finished)) {
  ------------------
  |  Branch (12377:13): [True: 0, False: 0]
  ------------------
12378|      0|            (void)ssl3_IllegalParameter(ss);
12379|      0|            PORT_SetError(SSL_ERROR_RX_MALFORMED_FINISHED);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
12380|      0|            return SECFailure;
12381|      0|        }
12382|       |
12383|      0|        if (!isServer)
  ------------------
  |  Branch (12383:13): [True: 0, False: 0]
  ------------------
12384|      0|            ss->ssl3.hs.finishedMsgs.sFinished[1] = hashes.u.s;
12385|      0|        else
12386|      0|            ss->ssl3.hs.finishedMsgs.sFinished[0] = hashes.u.s;
12387|      0|        PORT_Assert(hashes.len == sizeof hashes.u.s);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12388|      0|        ss->ssl3.hs.finishedBytes = sizeof hashes.u.s;
12389|      0|        if (0 != NSS_SecureMemcmp(&hashes.u.s, b, length)) {
  ------------------
  |  Branch (12389:13): [True: 0, False: 0]
  ------------------
12390|      0|            (void)ssl3_HandshakeFailure(ss);
12391|      0|            PORT_SetError(SSL_ERROR_BAD_HANDSHAKE_HASH_VALUE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
12392|      0|            return SECFailure;
12393|      0|        }
12394|      0|    }
12395|       |
12396|      0|    ssl_GetXmitBufLock(ss); /*************************************/
  ------------------
  |  | 1466|      0|    {                                           \
  |  | 1467|      0|        if (!ss->opt.noLocks)                   \
  |  |  ------------------
  |  |  |  Branch (1467:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1468|      0|            PZ_EnterMonitor((ss)->xmitBufLock); \
  |  |  ------------------
  |  |  |  |  256|      0|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1469|      0|    }
  ------------------
12397|       |
12398|      0|    if ((isServer && !ss->ssl3.hs.isResuming) ||
  ------------------
  |  Branch (12398:10): [True: 0, False: 0]
  |  Branch (12398:22): [True: 0, False: 0]
  ------------------
12399|      0|        (!isServer && ss->ssl3.hs.isResuming)) {
  ------------------
  |  Branch (12399:10): [True: 0, False: 0]
  |  Branch (12399:23): [True: 0, False: 0]
  ------------------
12400|      0|        PRInt32 flags = 0;
12401|       |
12402|       |        /* Send a NewSessionTicket message if the client sent us
12403|       |         * either an empty session ticket, or one that did not verify.
12404|       |         * (Note that if either of these conditions was met, then the
12405|       |         * server has sent a SessionTicket extension in the
12406|       |         * ServerHello message.)
12407|       |         */
12408|      0|        if (isServer && !ss->ssl3.hs.isResuming &&
  ------------------
  |  Branch (12408:13): [True: 0, False: 0]
  |  Branch (12408:25): [True: 0, False: 0]
  ------------------
12409|      0|            ssl3_ExtensionNegotiated(ss, ssl_session_ticket_xtn) &&
  ------------------
  |  Branch (12409:13): [True: 0, False: 0]
  ------------------
12410|      0|            ssl3_KEASupportsTickets(ss->ssl3.hs.kea_def)) {
  ------------------
  |  Branch (12410:13): [True: 0, False: 0]
  ------------------
12411|       |            /* RFC 5077 Section 3.3: "In the case of a full handshake, the
12412|       |             * server MUST verify the client's Finished message before sending
12413|       |             * the ticket." Presumably, this also means that the client's
12414|       |             * certificate, if any, must be verified beforehand too.
12415|       |             */
12416|      0|            rv = ssl3_SendNewSessionTicket(ss);
12417|      0|            if (rv != SECSuccess) {
  ------------------
  |  Branch (12417:17): [True: 0, False: 0]
  ------------------
12418|      0|                goto xmit_loser;
12419|      0|            }
12420|      0|        }
12421|       |
12422|      0|        rv = ssl3_SendChangeCipherSpecs(ss);
12423|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (12423:13): [True: 0, False: 0]
  ------------------
12424|      0|            goto xmit_loser; /* err is set. */
12425|      0|        }
12426|       |        /* If this thread is in SSL_SecureSend (trying to write some data)
12427|       |        ** then set the ssl_SEND_FLAG_FORCE_INTO_BUFFER flag, so that the
12428|       |        ** last two handshake messages (change cipher spec and finished)
12429|       |        ** will be sent in the same send/write call as the application data.
12430|       |        */
12431|      0|        if (ss->writerThread == PR_GetCurrentThread()) {
  ------------------
  |  Branch (12431:13): [True: 0, False: 0]
  ------------------
12432|      0|            flags = ssl_SEND_FLAG_FORCE_INTO_BUFFER;
  ------------------
  |  |  223|      0|#define ssl_SEND_FLAG_FORCE_INTO_BUFFER 0x40000000
  ------------------
12433|      0|        }
12434|       |
12435|      0|        if (!isServer && !ss->firstHsDone) {
  ------------------
  |  Branch (12435:13): [True: 0, False: 0]
  |  Branch (12435:26): [True: 0, False: 0]
  ------------------
12436|      0|            rv = ssl3_SendNextProto(ss);
12437|      0|            if (rv != SECSuccess) {
  ------------------
  |  Branch (12437:17): [True: 0, False: 0]
  ------------------
12438|      0|                goto xmit_loser; /* err code was set. */
12439|      0|            }
12440|      0|        }
12441|       |
12442|      0|        if (IS_DTLS(ss)) {
  ------------------
  |  |  892|      0|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 0, False: 0]
  |  |  ------------------
  ------------------
12443|      0|            flags |= ssl_SEND_FLAG_NO_RETRANSMIT;
  ------------------
  |  |  225|      0|#define ssl_SEND_FLAG_NO_RETRANSMIT 0x08000000 /* DTLS only */
  ------------------
12444|      0|        }
12445|       |
12446|      0|        rv = ssl3_SendFinished(ss, flags);
12447|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (12447:13): [True: 0, False: 0]
  ------------------
12448|      0|            goto xmit_loser; /* err is set. */
12449|      0|        }
12450|      0|    }
12451|       |
12452|      0|xmit_loser:
12453|      0|    ssl_ReleaseXmitBufLock(ss); /*************************************/
  ------------------
  |  | 1471|      0|    {                                          \
  |  | 1472|      0|        if (!ss->opt.noLocks)                  \
  |  |  ------------------
  |  |  |  Branch (1472:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1473|      0|            PZ_ExitMonitor((ss)->xmitBufLock); \
  |  |  ------------------
  |  |  |  |  257|      0|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1474|      0|    }
  ------------------
12454|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (12454:9): [True: 0, False: 0]
  ------------------
12455|      0|        return rv;
12456|      0|    }
12457|       |
12458|      0|    if (ss->ssl3.hs.authCertificatePending) {
  ------------------
  |  Branch (12458:9): [True: 0, False: 0]
  ------------------
12459|      0|        if (ss->ssl3.hs.restartTarget) {
  ------------------
  |  Branch (12459:13): [True: 0, False: 0]
  ------------------
12460|      0|            PR_NOT_REACHED("ssl3_HandleFinished: unexpected restartTarget");
  ------------------
  |  |  213|      0|    PR_Assert(_reasonStr,__FILE__,__LINE__)
  ------------------
12461|      0|            PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
12462|      0|            return SECFailure;
12463|      0|        }
12464|       |
12465|      0|        ss->ssl3.hs.restartTarget = ssl3_FinishHandshake;
12466|      0|        PORT_SetError(PR_WOULD_BLOCK_ERROR);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
                      PORT_SetError(PR_WOULD_BLOCK_ERROR);
  ------------------
  |  |   22|      0|#define PR_WOULD_BLOCK_ERROR                     (-5998L)
  ------------------
12467|      0|        return SECFailure;
12468|      0|    }
12469|       |
12470|      0|    rv = ssl3_FinishHandshake(ss);
12471|      0|    return rv;
12472|      0|}
ssl3con.c:ssl3_IllegalParameter:
 2965|      9|{
 2966|      9|    (void)SSL3_SendAlert(ss, alert_fatal, illegal_parameter);
 2967|      9|    PORT_SetError(ss->sec.isServer ? SSL_ERROR_BAD_CLIENT
  ------------------
  |  |   65|      9|#define PORT_SetError PORT_SetError_Util
  ------------------
  |  Branch (2967:19): [True: 0, False: 9]
  ------------------
 2968|      9|                                   : SSL_ERROR_BAD_SERVER);
 2969|      9|    return SECFailure;
 2970|      9|}
ssl3con.c:ssl3_HandleChangeCipherSpecs:
 3303|    746|{
 3304|    746|    SSL3WaitState ws = ss->ssl3.hs.ws;
 3305|    746|    SSL3ChangeCipherSpecChoice change;
 3306|       |
 3307|    746|    PORT_Assert(ss->opt.noLocks || ssl_HaveRecvBufLock(ss));
  ------------------
  |  |  120|    746|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.13k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 362, False: 384]
  |  |  |  |  |  Branch (208:7): [True: 384, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3308|    746|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|    746|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.13k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 362, False: 384]
  |  |  |  |  |  Branch (208:7): [True: 384, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3309|       |
 3310|    746|    SSL_TRC(3, ("%d: SSL3[%d]: handle change_cipher_spec record",
  ------------------
  |  |   71|    746|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 746]
  |  |  ------------------
  |  |   72|    746|    ssl_Trace b
  ------------------
 3311|    746|                SSL_GETPID(), ss->fd));
 3312|       |
 3313|       |    /* For DTLS: Ignore this if we aren't expecting it.  Don't kill a connection
 3314|       |     *           as a result of receiving trash.
 3315|       |     * For TLS: Maybe ignore, but only after checking format. */
 3316|    746|    if (ws != wait_change_cipher && IS_DTLS(ss)) {
  ------------------
  |  |  892|    109|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 109, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (3316:9): [True: 109, False: 637]
  ------------------
 3317|       |        /* Ignore this because it's out of order. */
 3318|    109|        SSL_TRC(3, ("%d: SSL3[%d]: discard out of order "
  ------------------
  |  |   71|    109|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 109]
  |  |  ------------------
  |  |   72|    109|    ssl_Trace b
  ------------------
 3319|    109|                    "DTLS change_cipher_spec",
 3320|    109|                    SSL_GETPID(), ss->fd));
 3321|    109|        buf->len = 0;
 3322|    109|        return SECSuccess;
 3323|    109|    }
 3324|       |
 3325|       |    /* Handshake messages should not span ChangeCipherSpec. */
 3326|    637|    if (ss->ssl3.hs.header_bytes) {
  ------------------
  |  Branch (3326:9): [True: 0, False: 637]
  ------------------
 3327|      0|        (void)SSL3_SendAlert(ss, alert_fatal, unexpected_message);
 3328|      0|        PORT_SetError(SSL_ERROR_RX_UNEXPECTED_CHANGE_CIPHER);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 3329|      0|        return SECFailure;
 3330|      0|    }
 3331|    637|    if (buf->len != 1) {
  ------------------
  |  Branch (3331:9): [True: 9, False: 628]
  ------------------
 3332|      9|        (void)ssl3_DecodeError(ss);
 3333|      9|        PORT_SetError(SSL_ERROR_RX_MALFORMED_CHANGE_CIPHER);
  ------------------
  |  |   65|      9|#define PORT_SetError PORT_SetError_Util
  ------------------
 3334|      9|        return SECFailure;
 3335|      9|    }
 3336|    628|    change = (SSL3ChangeCipherSpecChoice)buf->buf[0];
 3337|    628|    if (change != change_cipher_spec_choice) {
  ------------------
  |  Branch (3337:9): [True: 9, False: 619]
  ------------------
 3338|       |        /* illegal_parameter is correct here for both SSL3 and TLS. */
 3339|      9|        (void)ssl3_IllegalParameter(ss);
 3340|      9|        PORT_SetError(SSL_ERROR_RX_MALFORMED_CHANGE_CIPHER);
  ------------------
  |  |   65|      9|#define PORT_SetError PORT_SetError_Util
  ------------------
 3341|      9|        return SECFailure;
 3342|      9|    }
 3343|       |
 3344|    619|    buf->len = 0;
 3345|    619|    if (ws != wait_change_cipher) {
  ------------------
  |  Branch (3345:9): [True: 0, False: 619]
  ------------------
 3346|       |        /* Ignore a CCS for TLS 1.3. This only happens if the server sends a
 3347|       |         * HelloRetryRequest.  In other cases, the CCS will fail decryption and
 3348|       |         * will be discarded by ssl3_HandleRecord(). */
 3349|      0|        if (ws == wait_server_hello &&
  ------------------
  |  Branch (3349:13): [True: 0, False: 0]
  ------------------
 3350|      0|            ss->version >= SSL_LIBRARY_VERSION_TLS_1_3 &&
  ------------------
  |  |   21|      0|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (3350:13): [True: 0, False: 0]
  ------------------
 3351|      0|            ss->ssl3.hs.helloRetry) {
  ------------------
  |  Branch (3351:13): [True: 0, False: 0]
  ------------------
 3352|      0|            PORT_Assert(!ss->sec.isServer);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3353|      0|            return SECSuccess;
 3354|      0|        }
 3355|       |        /* Note: For a server, we can't test ss->ssl3.hs.helloRetry or
 3356|       |         * ss->version because the server might be stateless (and so it won't
 3357|       |         * have set either value yet). Set a flag so that at least we will
 3358|       |         * guarantee that the server will treat any ClientHello properly. */
 3359|      0|        if (ws == wait_client_hello &&
  ------------------
  |  Branch (3359:13): [True: 0, False: 0]
  ------------------
 3360|      0|            ss->vrange.max >= SSL_LIBRARY_VERSION_TLS_1_3 &&
  ------------------
  |  |   21|      0|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (3360:13): [True: 0, False: 0]
  ------------------
 3361|      0|            !ss->ssl3.hs.receivedCcs) {
  ------------------
  |  Branch (3361:13): [True: 0, False: 0]
  ------------------
 3362|      0|            PORT_Assert(ss->sec.isServer);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3363|      0|            ss->ssl3.hs.receivedCcs = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 3364|      0|            return SECSuccess;
 3365|      0|        }
 3366|      0|        (void)SSL3_SendAlert(ss, alert_fatal, unexpected_message);
 3367|      0|        PORT_SetError(SSL_ERROR_RX_UNEXPECTED_CHANGE_CIPHER);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 3368|      0|        return SECFailure;
 3369|      0|    }
 3370|       |
 3371|    619|    SSL_TRC(3, ("%d: SSL3[%d] Set Current Read Cipher Suite to Pending",
  ------------------
  |  |   71|    619|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 619]
  |  |  ------------------
  |  |   72|    619|    ssl_Trace b
  ------------------
 3372|    619|                SSL_GETPID(), ss->fd));
 3373|    619|    ssl_GetSpecWriteLock(ss); /*************************************/
  ------------------
  |  | 1435|    619|    {                                            \
  |  | 1436|    619|        if (!ss->opt.noLocks)                    \
  |  |  ------------------
  |  |  |  Branch (1436:13): [True: 335, False: 284]
  |  |  ------------------
  |  | 1437|    619|            NSSRWLock_LockWrite((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   48|    335|#define NSSRWLock_LockWrite NSSRWLock_LockWrite_Util
  |  |  ------------------
  |  | 1438|    619|    }
  ------------------
 3374|    619|    PORT_Assert(ss->ssl3.prSpec);
  ------------------
  |  |  120|    619|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    619|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 619, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3375|    619|    ssl_CipherSpecRelease(ss->ssl3.crSpec);
 3376|    619|    ss->ssl3.crSpec = ss->ssl3.prSpec;
 3377|    619|    ss->ssl3.prSpec = NULL;
 3378|    619|    ssl_ReleaseSpecWriteLock(ss); /*************************************/
  ------------------
  |  | 1440|    619|    {                                              \
  |  | 1441|    619|        if (!ss->opt.noLocks)                      \
  |  |  ------------------
  |  |  |  Branch (1441:13): [True: 335, False: 284]
  |  |  ------------------
  |  | 1442|    619|            NSSRWLock_UnlockWrite((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   51|    335|#define NSSRWLock_UnlockWrite NSSRWLock_UnlockWrite_Util
  |  |  ------------------
  |  | 1443|    619|    }
  ------------------
 3379|       |
 3380|    619|    ss->ssl3.hs.ws = wait_finished;
 3381|    619|    return SECSuccess;
 3382|    619|}
ssl3con.c:ssl3_HandleAlert:
 3048|    970|{
 3049|    970|    SSL3AlertLevel level;
 3050|    970|    SSL3AlertDescription desc;
 3051|    970|    int error;
 3052|       |
 3053|    970|    PORT_Assert(ss->opt.noLocks || ssl_HaveRecvBufLock(ss));
  ------------------
  |  |  120|    970|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.48k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 460, False: 510]
  |  |  |  |  |  Branch (208:7): [True: 510, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3054|    970|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|    970|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.48k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 460, False: 510]
  |  |  |  |  |  Branch (208:7): [True: 510, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3055|       |
 3056|    970|    SSL_TRC(3, ("%d: SSL3[%d]: handle alert record", SSL_GETPID(), ss->fd));
  ------------------
  |  |   71|    970|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 970]
  |  |  ------------------
  |  |   72|    970|    ssl_Trace b
  ------------------
 3057|       |
 3058|    970|    if (buf->len != 2) {
  ------------------
  |  Branch (3058:9): [True: 60, False: 910]
  ------------------
 3059|     60|        (void)ssl3_DecodeError(ss);
 3060|     60|        PORT_SetError(SSL_ERROR_RX_MALFORMED_ALERT);
  ------------------
  |  |   65|     60|#define PORT_SetError PORT_SetError_Util
  ------------------
 3061|     60|        return SECFailure;
 3062|     60|    }
 3063|    910|    level = (SSL3AlertLevel)buf->buf[0];
 3064|    910|    desc = (SSL3AlertDescription)buf->buf[1];
 3065|    910|    buf->len = 0;
 3066|    910|    SSL_TRC(5, ("%d: SSL3[%d] received alert, level = %d, description = %d",
  ------------------
  |  |   71|    910|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 910]
  |  |  ------------------
  |  |   72|    910|    ssl_Trace b
  ------------------
 3067|    910|                SSL_GETPID(), ss->fd, level, desc));
 3068|       |
 3069|    910|    if (ss->alertReceivedCallback) {
  ------------------
  |  Branch (3069:9): [True: 0, False: 910]
  ------------------
 3070|      0|        SSLAlert alert = { level, desc };
 3071|      0|        ss->alertReceivedCallback(ss->fd, ss->alertReceivedCallbackArg, &alert);
 3072|      0|    }
 3073|       |
 3074|    910|    switch (desc) {
 3075|      6|        case close_notify:
  ------------------
  |  Branch (3075:9): [True: 6, False: 904]
  ------------------
 3076|      6|            ss->recvdCloseNotify = 1;
 3077|      6|            error = SSL_ERROR_CLOSE_NOTIFY_ALERT;
 3078|      6|            break;
 3079|     23|        case unexpected_message:
  ------------------
  |  Branch (3079:9): [True: 23, False: 887]
  ------------------
 3080|     23|            error = SSL_ERROR_HANDSHAKE_UNEXPECTED_ALERT;
 3081|     23|            break;
 3082|     19|        case bad_record_mac:
  ------------------
  |  Branch (3082:9): [True: 19, False: 891]
  ------------------
 3083|     19|            error = SSL_ERROR_BAD_MAC_ALERT;
 3084|     19|            break;
 3085|     79|        case decryption_failed_RESERVED:
  ------------------
  |  Branch (3085:9): [True: 79, False: 831]
  ------------------
 3086|     79|            error = SSL_ERROR_DECRYPTION_FAILED_ALERT;
 3087|     79|            break;
 3088|     17|        case record_overflow:
  ------------------
  |  Branch (3088:9): [True: 17, False: 893]
  ------------------
 3089|     17|            error = SSL_ERROR_RECORD_OVERFLOW_ALERT;
 3090|     17|            break;
 3091|     19|        case decompression_failure:
  ------------------
  |  Branch (3091:9): [True: 19, False: 891]
  ------------------
 3092|     19|            error = SSL_ERROR_DECOMPRESSION_FAILURE_ALERT;
 3093|     19|            break;
 3094|     40|        case handshake_failure:
  ------------------
  |  Branch (3094:9): [True: 40, False: 870]
  ------------------
 3095|     40|            error = SSL_ERROR_HANDSHAKE_FAILURE_ALERT;
 3096|     40|            break;
 3097|     22|        case no_certificate:
  ------------------
  |  Branch (3097:9): [True: 22, False: 888]
  ------------------
 3098|     22|            error = SSL_ERROR_NO_CERTIFICATE;
 3099|     22|            break;
 3100|     10|        case certificate_required:
  ------------------
  |  Branch (3100:9): [True: 10, False: 900]
  ------------------
 3101|     10|            error = SSL_ERROR_RX_CERTIFICATE_REQUIRED_ALERT;
 3102|     10|            break;
 3103|     32|        case bad_certificate:
  ------------------
  |  Branch (3103:9): [True: 32, False: 878]
  ------------------
 3104|     32|            error = SSL_ERROR_BAD_CERT_ALERT;
 3105|     32|            break;
 3106|     19|        case unsupported_certificate:
  ------------------
  |  Branch (3106:9): [True: 19, False: 891]
  ------------------
 3107|     19|            error = SSL_ERROR_UNSUPPORTED_CERT_ALERT;
 3108|     19|            break;
 3109|     12|        case certificate_revoked:
  ------------------
  |  Branch (3109:9): [True: 12, False: 898]
  ------------------
 3110|     12|            error = SSL_ERROR_REVOKED_CERT_ALERT;
 3111|     12|            break;
 3112|     10|        case certificate_expired:
  ------------------
  |  Branch (3112:9): [True: 10, False: 900]
  ------------------
 3113|     10|            error = SSL_ERROR_EXPIRED_CERT_ALERT;
 3114|     10|            break;
 3115|     22|        case certificate_unknown:
  ------------------
  |  Branch (3115:9): [True: 22, False: 888]
  ------------------
 3116|     22|            error = SSL_ERROR_CERTIFICATE_UNKNOWN_ALERT;
 3117|     22|            break;
 3118|     18|        case illegal_parameter:
  ------------------
  |  Branch (3118:9): [True: 18, False: 892]
  ------------------
 3119|     18|            error = SSL_ERROR_ILLEGAL_PARAMETER_ALERT;
 3120|     18|            break;
 3121|     13|        case inappropriate_fallback:
  ------------------
  |  Branch (3121:9): [True: 13, False: 897]
  ------------------
 3122|     13|            error = SSL_ERROR_INAPPROPRIATE_FALLBACK_ALERT;
 3123|     13|            break;
 3124|       |
 3125|       |        /* All alerts below are TLS only. */
 3126|     21|        case unknown_ca:
  ------------------
  |  Branch (3126:9): [True: 21, False: 889]
  ------------------
 3127|     21|            error = SSL_ERROR_UNKNOWN_CA_ALERT;
 3128|     21|            break;
 3129|     15|        case access_denied:
  ------------------
  |  Branch (3129:9): [True: 15, False: 895]
  ------------------
 3130|     15|            error = SSL_ERROR_ACCESS_DENIED_ALERT;
 3131|     15|            break;
 3132|     18|        case decode_error:
  ------------------
  |  Branch (3132:9): [True: 18, False: 892]
  ------------------
 3133|     18|            error = SSL_ERROR_DECODE_ERROR_ALERT;
 3134|     18|            break;
 3135|     21|        case decrypt_error:
  ------------------
  |  Branch (3135:9): [True: 21, False: 889]
  ------------------
 3136|     21|            error = SSL_ERROR_DECRYPT_ERROR_ALERT;
 3137|     21|            break;
 3138|     28|        case export_restriction:
  ------------------
  |  Branch (3138:9): [True: 28, False: 882]
  ------------------
 3139|     28|            error = SSL_ERROR_EXPORT_RESTRICTION_ALERT;
 3140|     28|            break;
 3141|     18|        case protocol_version:
  ------------------
  |  Branch (3141:9): [True: 18, False: 892]
  ------------------
 3142|     18|            error = SSL_ERROR_PROTOCOL_VERSION_ALERT;
 3143|     18|            break;
 3144|     15|        case insufficient_security:
  ------------------
  |  Branch (3144:9): [True: 15, False: 895]
  ------------------
 3145|     15|            error = SSL_ERROR_INSUFFICIENT_SECURITY_ALERT;
 3146|     15|            break;
 3147|     20|        case internal_error:
  ------------------
  |  Branch (3147:9): [True: 20, False: 890]
  ------------------
 3148|     20|            error = SSL_ERROR_INTERNAL_ERROR_ALERT;
 3149|     20|            break;
 3150|     34|        case user_canceled:
  ------------------
  |  Branch (3150:9): [True: 34, False: 876]
  ------------------
 3151|     34|            error = SSL_ERROR_USER_CANCELED_ALERT;
 3152|     34|            break;
 3153|     20|        case no_renegotiation:
  ------------------
  |  Branch (3153:9): [True: 20, False: 890]
  ------------------
 3154|     20|            error = SSL_ERROR_NO_RENEGOTIATION_ALERT;
 3155|     20|            break;
 3156|       |
 3157|       |        /* Alerts for TLS client hello extensions */
 3158|     22|        case missing_extension:
  ------------------
  |  Branch (3158:9): [True: 22, False: 888]
  ------------------
 3159|     22|            error = SSL_ERROR_MISSING_EXTENSION_ALERT;
 3160|     22|            break;
 3161|     11|        case unsupported_extension:
  ------------------
  |  Branch (3161:9): [True: 11, False: 899]
  ------------------
 3162|     11|            error = SSL_ERROR_UNSUPPORTED_EXTENSION_ALERT;
 3163|     11|            break;
 3164|     19|        case certificate_unobtainable:
  ------------------
  |  Branch (3164:9): [True: 19, False: 891]
  ------------------
 3165|     19|            error = SSL_ERROR_CERTIFICATE_UNOBTAINABLE_ALERT;
 3166|     19|            break;
 3167|     19|        case unrecognized_name:
  ------------------
  |  Branch (3167:9): [True: 19, False: 891]
  ------------------
 3168|     19|            error = SSL_ERROR_UNRECOGNIZED_NAME_ALERT;
 3169|     19|            break;
 3170|     10|        case bad_certificate_status_response:
  ------------------
  |  Branch (3170:9): [True: 10, False: 900]
  ------------------
 3171|     10|            error = SSL_ERROR_BAD_CERT_STATUS_RESPONSE_ALERT;
 3172|     10|            break;
 3173|    147|        case bad_certificate_hash_value:
  ------------------
  |  Branch (3173:9): [True: 147, False: 763]
  ------------------
 3174|    147|            error = SSL_ERROR_BAD_CERT_HASH_VALUE_ALERT;
 3175|    147|            break;
 3176|     12|        case no_application_protocol:
  ------------------
  |  Branch (3176:9): [True: 12, False: 898]
  ------------------
 3177|     12|            error = SSL_ERROR_NEXT_PROTOCOL_NO_PROTOCOL;
 3178|     12|            break;
 3179|     24|        case ech_required:
  ------------------
  |  Branch (3179:9): [True: 24, False: 886]
  ------------------
 3180|     24|            error = SSL_ERROR_ECH_REQUIRED_ALERT;
 3181|     24|            break;
 3182|     75|        default:
  ------------------
  |  Branch (3182:9): [True: 75, False: 835]
  ------------------
 3183|     75|            error = SSL_ERROR_RX_UNKNOWN_ALERT;
 3184|     75|            break;
 3185|    910|    }
 3186|    910|    if ((ss->version >= SSL_LIBRARY_VERSION_TLS_1_3) &&
  ------------------
  |  |   21|    910|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (3186:9): [True: 40, False: 870]
  ------------------
 3187|    910|        (ss->ssl3.hs.ws != wait_server_hello)) {
  ------------------
  |  Branch (3187:9): [True: 0, False: 40]
  ------------------
 3188|       |        /* TLS 1.3 requires all but "end of data" alerts to be
 3189|       |         * treated as fatal. */
 3190|      0|        switch (desc) {
 3191|      0|            case close_notify:
  ------------------
  |  Branch (3191:13): [True: 0, False: 0]
  ------------------
 3192|      0|            case user_canceled:
  ------------------
  |  Branch (3192:13): [True: 0, False: 0]
  ------------------
 3193|      0|                break;
 3194|      0|            default:
  ------------------
  |  Branch (3194:13): [True: 0, False: 0]
  ------------------
 3195|      0|                level = alert_fatal;
 3196|      0|        }
 3197|      0|    }
 3198|    910|    if (level == alert_fatal) {
  ------------------
  |  Branch (3198:9): [True: 15, False: 895]
  ------------------
 3199|     15|        ssl_UncacheSessionID(ss);
 3200|     15|        if ((ss->ssl3.hs.ws == wait_server_hello) &&
  ------------------
  |  Branch (3200:13): [True: 14, False: 1]
  ------------------
 3201|     15|            (desc == handshake_failure)) {
  ------------------
  |  Branch (3201:13): [True: 1, False: 13]
  ------------------
 3202|       |            /* XXX This is a hack.  We're assuming that any handshake failure
 3203|       |             * XXX on the client hello is a failure to match ciphers.
 3204|       |             */
 3205|      1|            error = SSL_ERROR_NO_CYPHER_OVERLAP;
 3206|      1|        }
 3207|     15|        PORT_SetError(error);
  ------------------
  |  |   65|     15|#define PORT_SetError PORT_SetError_Util
  ------------------
 3208|     15|        return SECFailure;
 3209|     15|    }
 3210|    895|    if ((desc == no_certificate) && (ss->ssl3.hs.ws == wait_client_cert)) {
  ------------------
  |  Branch (3210:9): [True: 22, False: 873]
  |  Branch (3210:37): [True: 0, False: 22]
  ------------------
 3211|       |        /* I'm a server. I've requested a client cert. He hasn't got one. */
 3212|      0|        SECStatus rv;
 3213|       |
 3214|      0|        PORT_Assert(ss->sec.isServer);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3215|      0|        ss->ssl3.hs.ws = wait_client_key;
 3216|      0|        rv = ssl3_HandleNoCertificate(ss);
 3217|      0|        return rv;
 3218|      0|    }
 3219|    895|    return SECSuccess;
 3220|    895|}
ssl3con.c:ssl3_GetCipherSpec:
13495|  1.15M|{
13496|  1.15M|    ssl3CipherSpec *crSpec = ss->ssl3.crSpec;
13497|  1.15M|    ssl3CipherSpec *newSpec = NULL;
13498|  1.15M|    DTLSEpoch epoch;
13499|       |
13500|  1.15M|    if (!IS_DTLS(ss)) {
  ------------------
  |  |  892|  1.15M|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  ------------------
  |  Branch (13500:9): [True: 0, False: 1.15M]
  ------------------
13501|      0|        return crSpec;
13502|      0|    }
13503|  1.15M|    epoch = dtls_ReadEpoch(crSpec->version, crSpec->epoch, cText->hdr);
13504|  1.15M|    if (crSpec->epoch == epoch) {
  ------------------
  |  Branch (13504:9): [True: 741k, False: 412k]
  ------------------
13505|   741k|        return crSpec;
13506|   741k|    }
13507|   412k|    if (ss->version >= SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|   412k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (13507:9): [True: 3.78k, False: 408k]
  ------------------
13508|       |        /* Try to find the cipher spec. */
13509|  3.78k|        newSpec = ssl_FindCipherSpecByEpoch(ss, ssl_secret_read,
13510|  3.78k|                                            epoch);
13511|  3.78k|        if (newSpec != NULL) {
  ------------------
  |  Branch (13511:13): [True: 0, False: 3.78k]
  ------------------
13512|      0|            return newSpec;
13513|      0|        }
13514|  3.78k|    }
13515|   412k|    SSL_TRC(10, ("%d: DTLS[%d]: %s couldn't find cipherspec from epoch %d",
  ------------------
  |  |   71|   412k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 412k]
  |  |  ------------------
  |  |   72|   412k|    ssl_Trace b
  |  |  ------------------
  |  |  |  Branch (72:15): [True: 0, False: 0]
  |  |  ------------------
  ------------------
13516|   412k|                 SSL_GETPID(), ss->fd, SSL_ROLE(ss), epoch));
13517|   412k|    return NULL;
13518|   412k|}
ssl3con.c:ssl3_UnprotectRecord:
13198|  70.4k|{
13199|  70.4k|    const ssl3BulkCipherDef *cipher_def = spec->cipherDef;
13200|  70.4k|    PRBool isTLS;
13201|  70.4k|    unsigned int good;
13202|  70.4k|    unsigned int ivLen = 0;
13203|  70.4k|    SSLContentType rType;
13204|  70.4k|    SSL3ProtocolVersion rVersion;
13205|  70.4k|    unsigned int minLength;
13206|  70.4k|    unsigned int originalLen = 0;
13207|  70.4k|    PRUint8 headerBuf[13];
13208|  70.4k|    sslBuffer header = SSL_BUFFER(headerBuf);
  ------------------
  |  |   34|  70.4k|#define SSL_BUFFER(b) SSL_BUFFER_FIXED(b, sizeof(b))
  |  |  ------------------
  |  |  |  |   27|  70.4k|    {                               \
  |  |  |  |   28|  70.4k|        b, 0, maxlen, PR_TRUE       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  437|  70.4k|#define PR_TRUE 1
  |  |  |  |  ------------------
  |  |  |  |   29|  70.4k|    }
  |  |  ------------------
  ------------------
13209|  70.4k|    PRUint8 hash[MAX_MAC_LENGTH];
13210|  70.4k|    PRUint8 givenHashBuf[MAX_MAC_LENGTH];
13211|  70.4k|    PRUint8 *givenHash;
13212|  70.4k|    unsigned int hashBytes = MAX_MAC_LENGTH + 1;
  ------------------
  |  |   20|  70.4k|#define MAX_MAC_LENGTH 64
  ------------------
13213|  70.4k|    SECStatus rv;
13214|       |
13215|  70.4k|    PORT_Assert(spec->direction == ssl_secret_read);
  ------------------
  |  |  120|  70.4k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  70.4k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 70.4k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
13216|       |
13217|  70.4k|    good = ~0U;
13218|  70.4k|    minLength = spec->macDef->mac_size;
13219|  70.4k|    if (cipher_def->type == type_block) {
  ------------------
  |  Branch (13219:9): [True: 9.80k, False: 60.6k]
  ------------------
13220|       |        /* CBC records have a padding length byte at the end. */
13221|  9.80k|        minLength++;
13222|  9.80k|        if (spec->version >= SSL_LIBRARY_VERSION_TLS_1_1) {
  ------------------
  |  |   19|  9.80k|#define SSL_LIBRARY_VERSION_TLS_1_1             0x0302
  ------------------
  |  Branch (13222:13): [True: 9.80k, False: 0]
  ------------------
13223|       |            /* With >= TLS 1.1, CBC records have an explicit IV. */
13224|  9.80k|            minLength += cipher_def->iv_size;
13225|  9.80k|        }
13226|  60.6k|    } else if (cipher_def->type == type_aead) {
  ------------------
  |  Branch (13226:16): [True: 598, False: 60.0k]
  ------------------
13227|    598|        minLength = cipher_def->explicit_nonce_size + cipher_def->tag_size;
13228|    598|    }
13229|       |
13230|       |    /* We can perform this test in variable time because the record's total
13231|       |     * length and the ciphersuite are both public knowledge. */
13232|  70.4k|    if (cText->buf->len < minLength) {
  ------------------
  |  Branch (13232:9): [True: 795, False: 69.6k]
  ------------------
13233|    795|        goto decrypt_loser;
13234|    795|    }
13235|       |
13236|  69.6k|    if (cipher_def->type == type_block &&
  ------------------
  |  Branch (13236:9): [True: 9.23k, False: 60.4k]
  ------------------
13237|  69.6k|        spec->version >= SSL_LIBRARY_VERSION_TLS_1_1) {
  ------------------
  |  |   19|  9.23k|#define SSL_LIBRARY_VERSION_TLS_1_1             0x0302
  ------------------
  |  Branch (13237:9): [True: 9.23k, False: 0]
  ------------------
13238|       |        /* Consume the per-record explicit IV. RFC 4346 Section 6.2.3.2 states
13239|       |         * "The receiver decrypts the entire GenericBlockCipher structure and
13240|       |         * then discards the first cipher block corresponding to the IV
13241|       |         * component." Instead, we decrypt the first cipher block and then
13242|       |         * discard it before decrypting the rest.
13243|       |         */
13244|  9.23k|        PRUint8 iv[MAX_IV_LENGTH];
13245|  9.23k|        unsigned int decoded;
13246|       |
13247|  9.23k|        ivLen = cipher_def->iv_size;
13248|  9.23k|        if (ivLen < 8 || ivLen > sizeof(iv)) {
  ------------------
  |  Branch (13248:13): [True: 0, False: 9.23k]
  |  Branch (13248:26): [True: 0, False: 9.23k]
  ------------------
13249|      0|            *alert = internal_error;
13250|      0|            PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
13251|      0|            return SECFailure;
13252|      0|        }
13253|       |
13254|  9.23k|        PRINT_BUF(80, (ss, "IV (ciphertext):", cText->buf->buf, ivLen));
  ------------------
  |  |   74|  9.23k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 9.23k]
  |  |  ------------------
  |  |   75|  9.23k|    ssl_PrintBuf b
  ------------------
13255|       |
13256|       |        /* The decryption result is garbage, but since we just throw away
13257|       |         * the block it doesn't matter.  The decryption of the next block
13258|       |         * depends only on the ciphertext of the IV block.
13259|       |         */
13260|  9.23k|        rv = spec->cipher(spec->cipherContext, iv, &decoded,
13261|  9.23k|                          sizeof(iv), cText->buf->buf, ivLen);
13262|       |
13263|  9.23k|        good &= SECStatusToMask(rv);
13264|  9.23k|    }
13265|       |
13266|  69.6k|    PRINT_BUF(80, (ss, "ciphertext:", cText->buf->buf + ivLen,
  ------------------
  |  |   74|  69.6k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 69.6k]
  |  |  ------------------
  |  |   75|  69.6k|    ssl_PrintBuf b
  ------------------
13267|  69.6k|                   cText->buf->len - ivLen));
13268|       |
13269|       |    /* Check if the ciphertext can be valid if we assume maximum plaintext and
13270|       |     * add the maximum possible ciphersuite expansion.
13271|       |     * This way we detect overlong plaintexts/padding before decryption.
13272|       |     * This check enforces size limitations more strict than the RFC.
13273|       |     * [RFC5246, Section 6.2.3] */
13274|  69.6k|    if (cText->buf->len > (spec->recordSizeLimit + MAX_EXPANSION)) {
  ------------------
  |  |13181|  69.6k|#define MAX_EXPANSION (256 + 48 + 16)
  ------------------
  |  Branch (13274:9): [True: 72, False: 69.5k]
  ------------------
13275|     72|        *alert = record_overflow;
13276|     72|        PORT_SetError(SSL_ERROR_RX_RECORD_TOO_LONG);
  ------------------
  |  |   65|     72|#define PORT_SetError PORT_SetError_Util
  ------------------
13277|     72|        return SECFailure;
13278|     72|    }
13279|       |
13280|  69.5k|    isTLS = (PRBool)(spec->version > SSL_LIBRARY_VERSION_3_0);
  ------------------
  |  |   17|  69.5k|#define SSL_LIBRARY_VERSION_3_0                 0x0300
  ------------------
13281|  69.5k|    rType = (SSLContentType)cText->hdr[0];
13282|  69.5k|    rVersion = ((SSL3ProtocolVersion)cText->hdr[1] << 8) |
13283|  69.5k|               (SSL3ProtocolVersion)cText->hdr[2];
13284|  69.5k|    if (cipher_def->type == type_aead) {
  ------------------
  |  Branch (13284:9): [True: 404, False: 69.1k]
  ------------------
13285|       |        /* XXX For many AEAD ciphers, the plaintext is shorter than the
13286|       |         * ciphertext by a fixed byte count, but it is not true in general.
13287|       |         * Each AEAD cipher should provide a function that returns the
13288|       |         * plaintext length for a given ciphertext. */
13289|    404|        const unsigned int explicitNonceLen = cipher_def->explicit_nonce_size;
13290|    404|        const unsigned int tagLen = cipher_def->tag_size;
13291|    404|        unsigned int nonceLen = explicitNonceLen;
13292|    404|        unsigned int decryptedLen = cText->buf->len - nonceLen - tagLen;
13293|       |        /* even though read doesn't return and IV, we still need a space to put
13294|       |         * the combined iv/nonce n the gcm 1.2 case*/
13295|    404|        unsigned char ivOut[MAX_IV_LENGTH];
13296|    404|        unsigned char *iv = NULL;
13297|    404|        unsigned char *nonce = NULL;
13298|       |
13299|    404|        ivLen = cipher_def->iv_size;
13300|       |
13301|    404|        rv = ssl3_BuildRecordPseudoHeader(
13302|    404|            spec->epoch, cText->seqNum,
13303|    404|            rType, isTLS, rVersion, IS_DTLS(ss), decryptedLen, &header, spec->version);
  ------------------
  |  |  892|    404|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  ------------------
13304|    404|        PORT_Assert(rv == SECSuccess);
  ------------------
  |  |  120|    404|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    404|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 404, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
13305|       |
13306|       |        /* build the iv */
13307|    404|        if (explicitNonceLen == 0) {
  ------------------
  |  Branch (13307:13): [True: 0, False: 404]
  ------------------
13308|      0|            nonceLen = sizeof(cText->seqNum);
13309|      0|            iv = spec->keyMaterial.iv;
13310|      0|            nonce = SSL_BUFFER_BASE(&header);
  ------------------
  |  |   35|      0|#define SSL_BUFFER_BASE(b) ((b)->buf)
  ------------------
13311|    404|        } else {
13312|    404|            PORT_Memcpy(ivOut, spec->keyMaterial.iv, ivLen);
  ------------------
  |  |  180|    404|#define PORT_Memcpy memcpy
  ------------------
13313|    404|            PORT_Memset(ivOut + ivLen, 0, explicitNonceLen);
  ------------------
  |  |  182|    404|#define PORT_Memset memset
  ------------------
13314|    404|            iv = ivOut;
13315|    404|            nonce = cText->buf->buf;
13316|    404|            nonceLen = explicitNonceLen;
13317|    404|        }
13318|    404|        rv = tls13_AEAD(spec->cipherContext, PR_TRUE,
  ------------------
  |  |  437|    404|#define PR_TRUE 1
  ------------------
13319|    404|                        CKG_NO_GENERATE, 0,       /* iv generator params
  ------------------
  |  | 1991|    404|#define CKG_NO_GENERATE 0x00000000UL
  ------------------
13320|       |                                                   * (not used in decrypt)*/
13321|    404|                        iv,                       /* iv in */
13322|    404|                        NULL,                     /* iv out */
13323|    404|                        ivLen + explicitNonceLen, /* full iv length */
13324|    404|                        nonce, nonceLen,          /* nonce in */
13325|    404|                        SSL_BUFFER_BASE(&header), /* aad */
  ------------------
  |  |   35|    404|#define SSL_BUFFER_BASE(b) ((b)->buf)
  ------------------
13326|    404|                        SSL_BUFFER_LEN(&header),  /* aadlen */
  ------------------
  |  |   36|    404|#define SSL_BUFFER_LEN(b) ((b)->len)
  ------------------
13327|    404|                        plaintext->buf,           /* output  */
13328|    404|                        &plaintext->len,          /* out len */
13329|    404|                        plaintext->space,         /* max out */
13330|    404|                        tagLen,
13331|    404|                        cText->buf->buf + explicitNonceLen,  /* input */
13332|    404|                        cText->buf->len - explicitNonceLen); /* input len */
13333|    404|        if (rv != SECSuccess) {
  ------------------
  |  Branch (13333:13): [True: 404, False: 0]
  ------------------
13334|    404|            good = 0;
13335|    404|        }
13336|  69.1k|    } else {
13337|  69.1k|        if (cipher_def->type == type_block &&
  ------------------
  |  Branch (13337:13): [True: 9.23k, False: 59.9k]
  ------------------
13338|  69.1k|            ((cText->buf->len - ivLen) % cipher_def->block_size) != 0) {
  ------------------
  |  Branch (13338:13): [True: 239, False: 8.99k]
  ------------------
13339|    239|            goto decrypt_loser;
13340|    239|        }
13341|       |
13342|       |        /* decrypt from cText buf to plaintext. */
13343|  68.9k|        rv = spec->cipher(
13344|  68.9k|            spec->cipherContext, plaintext->buf, &plaintext->len,
13345|  68.9k|            plaintext->space, cText->buf->buf + ivLen, cText->buf->len - ivLen);
13346|  68.9k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (13346:13): [True: 0, False: 68.9k]
  ------------------
13347|      0|            goto decrypt_loser;
13348|      0|        }
13349|       |
13350|  68.9k|        PRINT_BUF(80, (ss, "cleartext:", plaintext->buf, plaintext->len));
  ------------------
  |  |   74|  68.9k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 68.9k]
  |  |  ------------------
  |  |   75|  68.9k|    ssl_PrintBuf b
  ------------------
13351|       |
13352|  68.9k|        originalLen = plaintext->len;
13353|       |
13354|       |        /* If it's a block cipher, check and strip the padding. */
13355|  68.9k|        if (cipher_def->type == type_block) {
  ------------------
  |  Branch (13355:13): [True: 8.99k, False: 59.9k]
  ------------------
13356|  8.99k|            const unsigned int blockSize = cipher_def->block_size;
13357|  8.99k|            const unsigned int macSize = spec->macDef->mac_size;
13358|       |
13359|  8.99k|            if (!isTLS) {
  ------------------
  |  Branch (13359:17): [True: 0, False: 8.99k]
  ------------------
13360|      0|                good &= SECStatusToMask(ssl_RemoveSSLv3CBCPadding(
13361|      0|                    plaintext, blockSize, macSize));
13362|  8.99k|            } else {
13363|  8.99k|                good &= SECStatusToMask(ssl_RemoveTLSCBCPadding(
13364|  8.99k|                    plaintext, macSize));
13365|  8.99k|            }
13366|  8.99k|        }
13367|       |
13368|       |        /* compute the MAC */
13369|  68.9k|        rv = ssl3_BuildRecordPseudoHeader(
13370|  68.9k|            spec->epoch, cText->seqNum,
13371|  68.9k|            rType, isTLS, rVersion, IS_DTLS(ss),
  ------------------
  |  |  892|  68.9k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  ------------------
13372|  68.9k|            plaintext->len - spec->macDef->mac_size, &header, spec->version);
13373|  68.9k|        PORT_Assert(rv == SECSuccess);
  ------------------
  |  |  120|  68.9k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  68.9k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 68.9k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
13374|  68.9k|        if (cipher_def->type == type_block) {
  ------------------
  |  Branch (13374:13): [True: 8.99k, False: 59.9k]
  ------------------
13375|  8.99k|            rv = ssl3_ComputeRecordMACConstantTime(
13376|  8.99k|                spec, SSL_BUFFER_BASE(&header), SSL_BUFFER_LEN(&header),
  ------------------
  |  |   35|  8.99k|#define SSL_BUFFER_BASE(b) ((b)->buf)
  ------------------
                              spec, SSL_BUFFER_BASE(&header), SSL_BUFFER_LEN(&header),
  ------------------
  |  |   36|  8.99k|#define SSL_BUFFER_LEN(b) ((b)->len)
  ------------------
13377|  8.99k|                plaintext->buf, plaintext->len, originalLen,
13378|  8.99k|                hash, &hashBytes);
13379|       |
13380|  8.99k|            ssl_CBCExtractMAC(plaintext, originalLen, givenHashBuf,
13381|  8.99k|                              spec->macDef->mac_size);
13382|  8.99k|            givenHash = givenHashBuf;
13383|       |
13384|       |            /* plaintext->len will always have enough space to remove the MAC
13385|       |             * because in ssl_Remove{SSLv3|TLS}CBCPadding we only adjust
13386|       |             * plaintext->len if the result has enough space for the MAC and we
13387|       |             * tested the unadjusted size against minLength, above. */
13388|  8.99k|            plaintext->len -= spec->macDef->mac_size;
13389|  59.9k|        } else {
13390|       |            /* This is safe because we checked the minLength above. */
13391|  59.9k|            plaintext->len -= spec->macDef->mac_size;
13392|       |
13393|  59.9k|            rv = ssl3_ComputeRecordMAC(
13394|  59.9k|                spec, SSL_BUFFER_BASE(&header), SSL_BUFFER_LEN(&header),
  ------------------
  |  |   35|  59.9k|#define SSL_BUFFER_BASE(b) ((b)->buf)
  ------------------
                              spec, SSL_BUFFER_BASE(&header), SSL_BUFFER_LEN(&header),
  ------------------
  |  |   36|  59.9k|#define SSL_BUFFER_LEN(b) ((b)->len)
  ------------------
13395|  59.9k|                plaintext->buf, plaintext->len, hash, &hashBytes);
13396|       |
13397|       |            /* We can read the MAC directly from the record because its location
13398|       |             * is public when a stream cipher is used. */
13399|  59.9k|            givenHash = plaintext->buf + plaintext->len;
13400|  59.9k|        }
13401|       |
13402|  68.9k|        good &= SECStatusToMask(rv);
13403|       |
13404|  68.9k|        if (hashBytes != (unsigned)spec->macDef->mac_size ||
  ------------------
  |  Branch (13404:13): [True: 0, False: 68.9k]
  ------------------
13405|  68.9k|            NSS_SecureMemcmp(givenHash, hash, spec->macDef->mac_size) != 0) {
  ------------------
  |  Branch (13405:13): [True: 46.0k, False: 22.9k]
  ------------------
13406|       |            /* We're allowed to leak whether or not the MAC check was correct */
13407|  46.0k|            good = 0;
13408|  46.0k|        }
13409|  68.9k|    }
13410|       |
13411|  69.3k|    if (good == 0) {
  ------------------
  |  Branch (13411:9): [True: 46.4k, False: 22.9k]
  ------------------
13412|  47.4k|    decrypt_loser:
13413|       |        /* always log mac error, in case attacker can read server logs. */
13414|  47.4k|        PORT_SetError(SSL_ERROR_BAD_MAC_READ);
  ------------------
  |  |   65|  47.4k|#define PORT_SetError PORT_SetError_Util
  ------------------
13415|  47.4k|        *alert = bad_record_mac;
13416|  47.4k|        return SECFailure;
13417|  46.4k|    }
13418|  22.9k|    return SECSuccess;
13419|  69.3k|}
ssl3con.c:SECStatusToMask:
12981|  87.1k|{
12982|  87.1k|    return PORT_CT_EQ(rv, SECSuccess);
  ------------------
  |  |  360|  87.1k|#define PORT_CT_EQ(a, b) PORT_CT_ZERO(((a) - (b)))
  |  |  ------------------
  |  |  |  |  356|  87.1k|#define PORT_CT_ZERO(x) (~PORT_CT_DUPLICATE_MSB_TO_ALL(((x) | (0 - (x)))))
  |  |  |  |  ------------------
  |  |  |  |  |  |  344|  87.1k|#define PORT_CT_DUPLICATE_MSB_TO_ALL(x) ((PRUint32)((PRInt32)(x) >> (sizeof(PRInt32) * 8 - 1)))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12983|  87.1k|}
ssl3con.c:ssl3_ComputeRecordMACConstantTime:
 2046|  8.99k|{
 2047|  8.99k|    CK_MECHANISM_TYPE macType;
 2048|  8.99k|    CK_NSS_MAC_CONSTANT_TIME_PARAMS params;
 2049|  8.99k|    SECItem param, inputItem, outputItem;
 2050|  8.99k|    int macSize = spec->macDef->mac_size;
 2051|  8.99k|    SECStatus rv;
 2052|       |
 2053|  8.99k|    PORT_Assert(inputLen >= spec->macDef->mac_size);
  ------------------
  |  |  120|  8.99k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  8.99k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 8.99k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2054|  8.99k|    PORT_Assert(originalLen >= inputLen);
  ------------------
  |  |  120|  8.99k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  8.99k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 8.99k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2055|       |
 2056|  8.99k|    if (spec->macDef->mac == ssl_mac_null) {
  ------------------
  |  Branch (2056:9): [True: 0, False: 8.99k]
  ------------------
 2057|      0|        *outLen = 0;
 2058|      0|        return SECSuccess;
 2059|      0|    }
 2060|       |
 2061|  8.99k|    macType = CKM_NSS_HMAC_CONSTANT_TIME;
  ------------------
  |  |  229|  8.99k|#define CKM_NSS_HMAC_CONSTANT_TIME (CKM_NSS + 19)
  |  |  ------------------
  |  |  |  |  162|  8.99k|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|  8.99k|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  8.99k|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2062|  8.99k|    if (spec->version == SSL_LIBRARY_VERSION_3_0) {
  ------------------
  |  |   17|  8.99k|#define SSL_LIBRARY_VERSION_3_0                 0x0300
  ------------------
  |  Branch (2062:9): [True: 0, False: 8.99k]
  ------------------
 2063|      0|        macType = CKM_NSS_SSL3_MAC_CONSTANT_TIME;
  ------------------
  |  |  230|      0|#define CKM_NSS_SSL3_MAC_CONSTANT_TIME (CKM_NSS + 20)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2064|      0|    }
 2065|       |
 2066|  8.99k|    params.macAlg = spec->macDef->mmech;
 2067|  8.99k|    params.ulBodyTotalLen = originalLen;
 2068|  8.99k|    params.pHeader = (unsigned char *)header; /* const cast */
 2069|  8.99k|    params.ulHeaderLen = headerLen;
 2070|       |
 2071|  8.99k|    param.data = (unsigned char *)&params;
 2072|  8.99k|    param.len = sizeof(params);
 2073|  8.99k|    param.type = 0;
 2074|       |
 2075|  8.99k|    inputItem.data = (unsigned char *)input;
 2076|  8.99k|    inputItem.len = inputLen;
 2077|  8.99k|    inputItem.type = 0;
 2078|       |
 2079|  8.99k|    outputItem.data = outbuf;
 2080|  8.99k|    outputItem.len = *outLen;
 2081|  8.99k|    outputItem.type = 0;
 2082|       |
 2083|  8.99k|    rv = PK11_SignWithSymKey(spec->keyMaterial.macKey, macType, &param,
 2084|  8.99k|                             &outputItem, &inputItem);
 2085|  8.99k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (2085:9): [True: 0, False: 8.99k]
  ------------------
 2086|      0|        if (PORT_GetError() == SEC_ERROR_INVALID_ALGORITHM) {
  ------------------
  |  |   62|      0|#define PORT_GetError PORT_GetError_Util
  ------------------
  |  Branch (2086:13): [True: 0, False: 0]
  ------------------
 2087|       |            /* ssl3_ComputeRecordMAC() expects the MAC to have been removed
 2088|       |             * from the input length already. */
 2089|      0|            return ssl3_ComputeRecordMAC(spec, header, headerLen,
 2090|      0|                                         input, inputLen - macSize,
 2091|      0|                                         outbuf, outLen);
 2092|      0|        }
 2093|       |
 2094|      0|        *outLen = 0;
 2095|      0|        rv = SECFailure;
 2096|      0|        ssl_MapLowLevelError(SSL_ERROR_MAC_COMPUTATION_FAILURE);
 2097|      0|        return rv;
 2098|      0|    }
 2099|       |
 2100|  8.99k|    PORT_Assert(outputItem.len == (unsigned)macSize);
  ------------------
  |  |  120|  8.99k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  8.99k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 8.99k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2101|  8.99k|    *outLen = outputItem.len;
 2102|       |
 2103|  8.99k|    return rv;
 2104|  8.99k|}
ssl3con.c:ssl_CBCExtractMAC:
13092|  8.99k|{
13093|  8.99k|    unsigned char rotatedMac[MAX_MAC_LENGTH];
13094|       |    /* macEnd is the index of |plaintext->buf| just after the end of the
13095|       |     * MAC. */
13096|  8.99k|    unsigned macEnd = plaintext->len;
13097|  8.99k|    unsigned macStart = macEnd - macSize;
13098|       |    /* scanStart contains the number of bytes that we can ignore because
13099|       |     * the MAC's position can only vary by 255 bytes. */
13100|  8.99k|    unsigned scanStart = 0;
13101|  8.99k|    unsigned i, j;
13102|  8.99k|    unsigned char rotateOffset;
13103|       |
13104|  8.99k|    if (originalLength > macSize + 255 + 1) {
  ------------------
  |  Branch (13104:9): [True: 325, False: 8.66k]
  ------------------
13105|    325|        scanStart = originalLength - (macSize + 255 + 1);
13106|    325|    }
13107|       |
13108|       |    /* We want to compute
13109|       |     * rotateOffset = (macStart - scanStart) % macSize
13110|       |     * But the time to compute this varies based on the amount of padding. Thus
13111|       |     * we explicitely handle all mac sizes with (hopefully) constant time modulo
13112|       |     * using Barrett reduction:
13113|       |     *  q := (rotateOffset * m) >> k
13114|       |     *  rotateOffset -= q * n
13115|       |     *  if (n <= rotateOffset) rotateOffset -= n
13116|       |     */
13117|  8.99k|    rotateOffset = macStart - scanStart;
13118|       |    /* rotateOffset < 255 + 1 + 48 = 304 */
13119|  8.99k|    if (macSize == 16) {
  ------------------
  |  Branch (13119:9): [True: 0, False: 8.99k]
  ------------------
13120|      0|        rotateOffset &= 15;
13121|  8.99k|    } else if (macSize == 20) {
  ------------------
  |  Branch (13121:16): [True: 7.90k, False: 1.08k]
  ------------------
13122|       |        /*
13123|       |         * Correctness: rotateOffset * ( 1/20 - 25/2^9 ) < 1
13124|       |         *              with rotateOffset <= 853
13125|       |         */
13126|  7.90k|        unsigned q = (rotateOffset * 25) >> 9;
13127|  7.90k|        rotateOffset -= q * 20;
13128|  7.90k|        rotateOffset -= ssl_constantTimeSelect(ssl_ConstantTimeGE(rotateOffset, 20),
13129|  7.90k|                                               20, 0);
13130|  7.90k|    } else if (macSize == 32) {
  ------------------
  |  Branch (13130:16): [True: 1.08k, False: 0]
  ------------------
13131|  1.08k|        rotateOffset &= 31;
13132|  1.08k|    } else if (macSize == 48) {
  ------------------
  |  Branch (13132:16): [True: 0, False: 0]
  ------------------
13133|       |        /*
13134|       |         * Correctness: rotateOffset * ( 1/48 - 10/2^9 ) < 1
13135|       |         *              with rotateOffset < 768
13136|       |         */
13137|      0|        unsigned q = (rotateOffset * 10) >> 9;
13138|      0|        rotateOffset -= q * 48;
13139|      0|        rotateOffset -= ssl_constantTimeSelect(ssl_ConstantTimeGE(rotateOffset, 48),
13140|      0|                                               48, 0);
13141|      0|    } else {
13142|       |        /*
13143|       |         * SHA384 (macSize == 48) is the largest we support. We should never
13144|       |         * get here.
13145|       |         */
13146|      0|        PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
13147|      0|        rotateOffset = rotateOffset % macSize;
13148|      0|    }
13149|       |
13150|  8.99k|    memset(rotatedMac, 0, macSize);
13151|  33.3k|    for (i = scanStart; i < originalLength;) {
  ------------------
  |  Branch (13151:25): [True: 24.3k, False: 8.99k]
  ------------------
13152|   414k|        for (j = 0; j < macSize && i < originalLength; i++, j++) {
  ------------------
  |  Branch (13152:21): [True: 399k, False: 15.4k]
  |  Branch (13152:36): [True: 390k, False: 8.88k]
  ------------------
13153|   390k|            unsigned char macStarted = ssl_ConstantTimeGE(i, macStart);
13154|   390k|            unsigned char macEnded = ssl_ConstantTimeGE(i, macEnd);
13155|   390k|            unsigned char b = 0;
13156|   390k|            b = plaintext->buf[i];
13157|   390k|            rotatedMac[j] |= b & macStarted & ~macEnded;
13158|   390k|        }
13159|  24.3k|    }
13160|       |
13161|       |    /* Now rotate the MAC. If we knew that the MAC fit into a CPU cache line
13162|       |     * we could line-align |rotatedMac| and rotate in place. */
13163|  8.99k|    memset(out, 0, macSize);
13164|  8.99k|    rotateOffset = macSize - rotateOffset;
13165|  8.99k|    rotateOffset = ssl_constantTimeSelect(ssl_ConstantTimeGE(rotateOffset, macSize),
13166|  8.99k|                                          0, rotateOffset);
13167|   201k|    for (i = 0; i < macSize; i++) {
  ------------------
  |  Branch (13167:17): [True: 192k, False: 8.99k]
  ------------------
13168|  4.46M|        for (j = 0; j < macSize; j++) {
  ------------------
  |  Branch (13168:21): [True: 4.27M, False: 192k]
  ------------------
13169|  4.27M|            out[j] |= rotatedMac[i] & ssl_ConstantTimeEQ(j, rotateOffset);
13170|  4.27M|        }
13171|   192k|        rotateOffset++;
13172|   192k|        rotateOffset = ssl_constantTimeSelect(ssl_ConstantTimeGE(rotateOffset, macSize),
13173|   192k|                                              0, rotateOffset);
13174|   192k|    }
13175|  8.99k|}
ssl3con.c:ssl_constantTimeSelect:
13002|   209k|{
13003|   209k|    return (mask & a) | (~mask & b);
13004|   209k|}
ssl3con.c:ssl_ConstantTimeGE:
12988|   990k|{
12989|   990k|    return PORT_CT_GE(a, b);
  ------------------
  |  |  364|   990k|#define PORT_CT_GE(a, b) (~PORT_CT_LT(a, b))
  |  |  ------------------
  |  |  |  |  363|   990k|#define PORT_CT_LT(a, b) PORT_CT_DUPLICATE_MSB_TO_ALL((a) - (b))
  |  |  |  |  ------------------
  |  |  |  |  |  |  344|   990k|#define PORT_CT_DUPLICATE_MSB_TO_ALL(x) ((PRUint32)((PRInt32)(x) >> (sizeof(PRInt32) * 8 - 1)))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12990|   990k|}
ssl3con.c:ssl_ConstantTimeEQ:
12995|  4.27M|{
12996|  4.27M|    return PORT_CT_EQ(a, b);
  ------------------
  |  |  360|  4.27M|#define PORT_CT_EQ(a, b) PORT_CT_ZERO(((a) - (b)))
  |  |  ------------------
  |  |  |  |  356|  4.27M|#define PORT_CT_ZERO(x) (~PORT_CT_DUPLICATE_MSB_TO_ALL(((x) | (0 - (x)))))
  |  |  |  |  ------------------
  |  |  |  |  |  |  344|  4.27M|#define PORT_CT_DUPLICATE_MSB_TO_ALL(x) ((PRUint32)((PRInt32)(x) >> (sizeof(PRInt32) * 8 - 1)))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12997|  4.27M|}

ssl_NamedGroup2ECParams:
   37|  9.07k|{
   38|  9.07k|    SECOidData *oidData = NULL;
   39|       |
   40|  9.07k|    if (!params) {
  ------------------
  |  Branch (40:9): [True: 0, False: 9.07k]
  ------------------
   41|      0|        PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   42|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
   43|      0|        return SECFailure;
   44|      0|    }
   45|       |
   46|  9.07k|    if (!ecGroup || ecGroup->keaType != ssl_kea_ecdh ||
  ------------------
  |  Branch (46:9): [True: 0, False: 9.07k]
  |  Branch (46:21): [True: 0, False: 9.07k]
  ------------------
   47|  9.07k|        (oidData = SECOID_FindOIDByTag(ecGroup->oidTag)) == NULL) {
  ------------------
  |  |  116|  9.07k|#define SECOID_FindOIDByTag SECOID_FindOIDByTag_Util
  ------------------
  |  Branch (47:9): [True: 0, False: 9.07k]
  ------------------
   48|      0|        PORT_SetError(SEC_ERROR_UNSUPPORTED_ELLIPTIC_CURVE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
   49|      0|        return SECFailure;
   50|      0|    }
   51|       |
   52|  9.07k|    if (SECITEM_AllocItem(arena, params, (2 + oidData->oid.len)) == NULL) {
  ------------------
  |  |  103|  9.07k|#define SECITEM_AllocItem SECITEM_AllocItem_Util
  ------------------
  |  Branch (52:9): [True: 0, False: 9.07k]
  ------------------
   53|      0|        PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
   54|      0|        return SECFailure;
   55|      0|    }
   56|       |
   57|       |    /*
   58|       |     * params->data needs to contain the ASN encoding of an object ID (OID)
   59|       |     * representing the named curve. The actual OID is in
   60|       |     * oidData->oid.data so we simply prepend 0x06 and OID length
   61|       |     */
   62|  9.07k|    params->data[0] = SEC_ASN1_OBJECT_ID;
  ------------------
  |  |   82|  9.07k|#define SEC_ASN1_OBJECT_ID 0x06
  ------------------
   63|  9.07k|    params->data[1] = oidData->oid.len;
   64|  9.07k|    memcpy(params->data + 2, oidData->oid.data, oidData->oid.len);
   65|       |
   66|  9.07k|    return SECSuccess;
   67|  9.07k|}
ssl_ECPubKey2NamedGroup:
   71|    400|{
   72|    400|    SECItem oid = { siBuffer, NULL, 0 };
   73|    400|    SECOidData *oidData = NULL;
   74|    400|    PRUint32 policyFlags = 0;
   75|    400|    unsigned int i;
   76|    400|    const SECKEYECParams *params;
   77|       |
   78|    400|    if (pubKey->keyType != ecKey) {
  ------------------
  |  Branch (78:9): [True: 0, False: 400]
  ------------------
   79|      0|        PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   80|      0|        return NULL;
   81|      0|    }
   82|       |
   83|    400|    params = &pubKey->u.ec.DEREncodedParams;
   84|       |
   85|       |    /*
   86|       |     * params->data needs to contain the ASN encoding of an object ID (OID)
   87|       |     * representing a named curve. Here, we strip away everything
   88|       |     * before the actual OID and use the OID to look up a named curve.
   89|       |     */
   90|    400|    if (params->data[0] != SEC_ASN1_OBJECT_ID)
  ------------------
  |  |   82|    400|#define SEC_ASN1_OBJECT_ID 0x06
  ------------------
  |  Branch (90:9): [True: 0, False: 400]
  ------------------
   91|      0|        return NULL;
   92|    400|    oid.len = params->len - 2;
   93|    400|    oid.data = params->data + 2;
   94|    400|    if ((oidData = SECOID_FindOID(&oid)) == NULL)
  ------------------
  |  |  115|    400|#define SECOID_FindOID SECOID_FindOID_Util
  ------------------
  |  Branch (94:9): [True: 0, False: 400]
  ------------------
   95|      0|        return NULL;
   96|    400|    if ((NSS_GetAlgorithmPolicy(oidData->offset, &policyFlags) ==
  ------------------
  |  Branch (96:9): [True: 400, False: 0]
  ------------------
   97|    400|         SECSuccess) &&
   98|    400|        !(policyFlags & NSS_USE_ALG_IN_SSL_KX)) {
  ------------------
  |  |  572|    400|#define NSS_USE_ALG_IN_SSL_KX 0x00000004           /* used in SSL key exchange */
  ------------------
  |  Branch (98:9): [True: 0, False: 400]
  ------------------
   99|      0|        return NULL;
  100|      0|    }
  101|  1.17k|    for (i = 0; i < SSL_NAMED_GROUP_COUNT; ++i) {
  ------------------
  |  |  133|  1.17k|#define SSL_NAMED_GROUP_COUNT 33
  ------------------
  |  Branch (101:17): [True: 1.16k, False: 5]
  ------------------
  102|  1.16k|        if (ssl_named_groups[i].oidTag == oidData->offset) {
  ------------------
  |  Branch (102:13): [True: 395, False: 771]
  ------------------
  103|    395|            return &ssl_named_groups[i];
  104|    395|        }
  105|  1.16k|    }
  106|       |
  107|      5|    return NULL;
  108|    400|}
ssl3_SendECDHClientKeyExchange:
  166|    406|{
  167|    406|    PK11SymKey *pms = NULL;
  168|    406|    SECStatus rv = SECFailure;
  169|    406|    PRBool isTLS, isTLS12;
  170|    406|    CK_MECHANISM_TYPE target;
  171|    406|    const sslNamedGroupDef *groupDef;
  172|    406|    sslEphemeralKeyPair *keyPair = NULL;
  173|    406|    SECKEYPublicKey *pubKey;
  174|       |
  175|    406|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|    406|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    605|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 207, False: 199]
  |  |  |  |  |  Branch (208:7): [True: 199, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  176|    406|    PORT_Assert(ss->opt.noLocks || ssl_HaveXmitBufLock(ss));
  ------------------
  |  |  120|    406|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    605|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 207, False: 199]
  |  |  |  |  |  Branch (208:7): [True: 199, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  177|       |
  178|    406|    isTLS = (PRBool)(ss->version > SSL_LIBRARY_VERSION_3_0);
  ------------------
  |  |   17|    406|#define SSL_LIBRARY_VERSION_3_0                 0x0300
  ------------------
  179|    406|    isTLS12 = (PRBool)(ss->version >= SSL_LIBRARY_VERSION_TLS_1_2);
  ------------------
  |  |   20|    406|#define SSL_LIBRARY_VERSION_TLS_1_2             0x0303
  ------------------
  180|       |
  181|       |    /* Generate ephemeral EC keypair */
  182|    406|    if (svrPubKey->keyType != ecKey) {
  ------------------
  |  Branch (182:9): [True: 6, False: 400]
  ------------------
  183|      6|        PORT_SetError(SEC_ERROR_BAD_KEY);
  ------------------
  |  |   65|      6|#define PORT_SetError PORT_SetError_Util
  ------------------
  184|      6|        goto loser;
  185|      6|    }
  186|    400|    groupDef = ssl_ECPubKey2NamedGroup(svrPubKey);
  187|    400|    if (!groupDef) {
  ------------------
  |  Branch (187:9): [True: 5, False: 395]
  ------------------
  188|      5|        PORT_SetError(SEC_ERROR_BAD_KEY);
  ------------------
  |  |   65|      5|#define PORT_SetError PORT_SetError_Util
  ------------------
  189|      5|        goto loser;
  190|      5|    }
  191|    395|    ss->sec.keaGroup = groupDef;
  192|    395|    rv = ssl_CreateECDHEphemeralKeyPair(ss, groupDef, &keyPair);
  193|    395|    if (rv != SECSuccess) {
  ------------------
  |  Branch (193:9): [True: 6, False: 389]
  ------------------
  194|      6|        ssl_MapLowLevelError(SEC_ERROR_KEYGEN_FAIL);
  195|      6|        goto loser;
  196|      6|    }
  197|       |
  198|    389|    pubKey = keyPair->keys->pubKey;
  199|    389|    PRINT_BUF(50, (ss, "ECDH public value:",
  ------------------
  |  |   74|    389|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 389]
  |  |  ------------------
  |  |   75|    389|    ssl_PrintBuf b
  ------------------
  200|    389|                   pubKey->u.ec.publicValue.data,
  201|    389|                   pubKey->u.ec.publicValue.len));
  202|       |
  203|    389|    if (isTLS12) {
  ------------------
  |  Branch (203:9): [True: 360, False: 29]
  ------------------
  204|    360|        target = CKM_TLS12_MASTER_KEY_DERIVE_DH;
  ------------------
  |  | 1028|    360|#define CKM_TLS12_MASTER_KEY_DERIVE_DH 0x000003E2UL
  ------------------
  205|    360|    } else if (isTLS) {
  ------------------
  |  Branch (205:16): [True: 29, False: 0]
  ------------------
  206|     29|        target = CKM_TLS_MASTER_KEY_DERIVE_DH;
  ------------------
  |  |  970|     29|#define CKM_TLS_MASTER_KEY_DERIVE_DH 0x00000377UL
  ------------------
  207|     29|    } else {
  208|      0|        target = CKM_SSL3_MASTER_KEY_DERIVE_DH;
  ------------------
  |  |  966|      0|#define CKM_SSL3_MASTER_KEY_DERIVE_DH 0x00000373UL
  ------------------
  209|      0|    }
  210|       |
  211|       |    /* Determine the PMS */
  212|    389|    pms = PK11_PubDeriveWithKDF(keyPair->keys->privKey, svrPubKey,
  213|    389|                                PR_FALSE, NULL, NULL, CKM_ECDH1_DERIVE, target,
  ------------------
  |  |  438|    389|#define PR_FALSE 0
  ------------------
                                              PR_FALSE, NULL, NULL, CKM_ECDH1_DERIVE, target,
  ------------------
  |  | 1086|    389|#define CKM_ECDH1_DERIVE 0x00001050UL
  ------------------
  214|    389|                                CKA_DERIVE, 0, CKD_NULL, NULL, NULL);
  ------------------
  |  |  555|    389|#define CKA_DERIVE 0x0000010CUL
  ------------------
                                              CKA_DERIVE, 0, CKD_NULL, NULL, NULL);
  ------------------
  |  | 1702|    389|#define CKD_NULL 0x00000001UL
  ------------------
  215|       |
  216|    389|    if (pms == NULL) {
  ------------------
  |  Branch (216:9): [True: 32, False: 357]
  ------------------
  217|     32|        (void)SSL3_SendAlert(ss, alert_fatal, illegal_parameter);
  218|     32|        ssl_MapLowLevelError(SSL_ERROR_CLIENT_KEY_EXCHANGE_FAILURE);
  219|     32|        goto loser;
  220|     32|    }
  221|       |
  222|    357|    rv = ssl3_AppendHandshakeHeader(ss, ssl_hs_client_key_exchange,
  223|    357|                                    pubKey->u.ec.publicValue.len + 1);
  224|    357|    if (rv != SECSuccess) {
  ------------------
  |  Branch (224:9): [True: 0, False: 357]
  ------------------
  225|      0|        goto loser; /* err set by ssl3_AppendHandshake* */
  226|      0|    }
  227|       |
  228|    357|    rv = ssl3_AppendHandshakeVariable(ss, pubKey->u.ec.publicValue.data,
  229|    357|                                      pubKey->u.ec.publicValue.len, 1);
  230|       |
  231|    357|    if (rv != SECSuccess) {
  ------------------
  |  Branch (231:9): [True: 0, False: 357]
  ------------------
  232|      0|        goto loser; /* err set by ssl3_AppendHandshake* */
  233|      0|    }
  234|       |
  235|    357|    rv = ssl3_InitPendingCipherSpecs(ss, pms, PR_TRUE);
  ------------------
  |  |  437|    357|#define PR_TRUE 1
  ------------------
  236|    357|    if (rv != SECSuccess) {
  ------------------
  |  Branch (236:9): [True: 0, False: 357]
  ------------------
  237|      0|        ssl_MapLowLevelError(SSL_ERROR_CLIENT_KEY_EXCHANGE_FAILURE);
  238|      0|        goto loser;
  239|      0|    }
  240|       |
  241|    357|    PK11_FreeSymKey(pms);
  242|    357|    ssl_FreeEphemeralKeyPair(keyPair);
  243|    357|    return SECSuccess;
  244|       |
  245|     49|loser:
  246|     49|    if (pms)
  ------------------
  |  Branch (246:9): [True: 0, False: 49]
  ------------------
  247|      0|        PK11_FreeSymKey(pms);
  248|     49|    if (keyPair)
  ------------------
  |  Branch (248:9): [True: 32, False: 17]
  ------------------
  249|     32|        ssl_FreeEphemeralKeyPair(keyPair);
  250|     49|    return SECFailure;
  251|    357|}
ssl_ImportECDHKeyShare:
  333|    541|{
  334|    541|    SECStatus rv;
  335|    541|    SECItem ecPoint = { siBuffer, NULL, 0 };
  336|       |
  337|    541|    if (!length) {
  ------------------
  |  Branch (337:9): [True: 0, False: 541]
  ------------------
  338|      0|        PORT_SetError(SSL_ERROR_RX_MALFORMED_ECDHE_KEY_SHARE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  339|      0|        return SECFailure;
  340|      0|    }
  341|       |
  342|       |    /* Fail if the ec point uses compressed representation */
  343|    541|    if (b[0] != EC_POINT_FORM_UNCOMPRESSED &&
  ------------------
  |  |   92|  1.08k|#define EC_POINT_FORM_UNCOMPRESSED 0x04
  ------------------
  |  Branch (343:9): [True: 492, False: 49]
  ------------------
  344|    541|        ecGroup->name != ssl_grp_ec_curve25519) {
  ------------------
  |  Branch (344:9): [True: 1, False: 491]
  ------------------
  345|      1|        PORT_SetError(SEC_ERROR_UNSUPPORTED_EC_POINT_FORM);
  ------------------
  |  |   65|      1|#define PORT_SetError PORT_SetError_Util
  ------------------
  346|      1|        return SECFailure;
  347|      1|    }
  348|       |
  349|    540|    peerKey->keyType = ecKey;
  350|       |    /* Set up the encoded params */
  351|    540|    rv = ssl_NamedGroup2ECParams(peerKey->arena, ecGroup,
  352|    540|                                 &peerKey->u.ec.DEREncodedParams);
  353|    540|    if (rv != SECSuccess) {
  ------------------
  |  Branch (353:9): [True: 0, False: 540]
  ------------------
  354|      0|        ssl_MapLowLevelError(SSL_ERROR_RX_MALFORMED_ECDHE_KEY_SHARE);
  355|      0|        return SECFailure;
  356|      0|    }
  357|    540|    peerKey->u.ec.encoding = ECPoint_Undefined;
  358|       |
  359|       |    /* copy publicValue in peerKey */
  360|    540|    ecPoint.data = b;
  361|    540|    ecPoint.len = length;
  362|       |
  363|    540|    rv = SECITEM_CopyItem(peerKey->arena, &peerKey->u.ec.publicValue, &ecPoint);
  ------------------
  |  |  106|    540|#define SECITEM_CopyItem SECITEM_CopyItem_Util
  ------------------
  364|    540|    if (rv != SECSuccess) {
  ------------------
  |  Branch (364:9): [True: 0, False: 540]
  ------------------
  365|      0|        return SECFailure;
  366|      0|    }
  367|       |
  368|    540|    return SECSuccess;
  369|    540|}
ssl_CreateECDHEphemeralKeyPair:
  473|  8.53k|{
  474|  8.53k|    SECKEYPrivateKey *privKey = NULL;
  475|  8.53k|    SECKEYPublicKey *pubKey = NULL;
  476|  8.53k|    SECKEYECParams ecParams = { siBuffer, NULL, 0 };
  477|  8.53k|    sslEphemeralKeyPair *pair;
  478|       |
  479|  8.53k|    if (ssl_NamedGroup2ECParams(NULL, ecGroup, &ecParams) != SECSuccess) {
  ------------------
  |  Branch (479:9): [True: 0, False: 8.53k]
  ------------------
  480|      0|        return SECFailure;
  481|      0|    }
  482|  8.53k|    privKey = ssl_CreateECDHEPrivateKey(&ecParams, &pubKey, ss->pkcs11PinArg);
  483|  8.53k|    SECITEM_FreeItem(&ecParams, PR_FALSE);
  ------------------
  |  |  108|  8.53k|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                  SECITEM_FreeItem(&ecParams, PR_FALSE);
  ------------------
  |  |  438|  8.53k|#define PR_FALSE 0
  ------------------
  484|       |
  485|  8.53k|    if (!privKey || !pubKey ||
  ------------------
  |  Branch (485:9): [True: 28, False: 8.50k]
  |  Branch (485:21): [True: 0, False: 8.50k]
  ------------------
  486|  8.53k|        !(pair = ssl_NewEphemeralKeyPair(ecGroup, privKey, pubKey))) {
  ------------------
  |  Branch (486:9): [True: 0, False: 8.50k]
  ------------------
  487|     28|        if (privKey) {
  ------------------
  |  Branch (487:13): [True: 0, False: 28]
  ------------------
  488|      0|            SECKEY_DestroyPrivateKey(privKey);
  489|      0|        }
  490|     28|        if (pubKey) {
  ------------------
  |  Branch (490:13): [True: 0, False: 28]
  ------------------
  491|      0|            SECKEY_DestroyPublicKey(pubKey);
  492|      0|        }
  493|     28|        ssl_MapLowLevelError(SEC_ERROR_KEYGEN_FAIL);
  494|     28|        return SECFailure;
  495|     28|    }
  496|       |
  497|  8.50k|    *keyPair = pair;
  498|  8.50k|    SSL_TRC(50, ("%d: SSL[%d]: Create ECDH ephemeral key %d",
  ------------------
  |  |   71|  8.50k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 8.50k]
  |  |  ------------------
  |  |   72|  8.50k|    ssl_Trace b
  |  |  ------------------
  |  |  |  Branch (72:15): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  499|  8.50k|                 SSL_GETPID(), ss ? ss->fd : NULL, ecGroup->name));
  500|  8.50k|    PRINT_BUF(50, (ss, "Public Key", pubKey->u.ec.publicValue.data,
  ------------------
  |  |   74|  8.50k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 8.50k]
  |  |  ------------------
  |  |   75|  8.50k|    ssl_PrintBuf b
  ------------------
  501|  8.50k|                   pubKey->u.ec.publicValue.len));
  502|  8.50k|#ifdef TRACE
  503|  8.50k|    if (ssl_trace >= 50) {
  ------------------
  |  Branch (503:9): [True: 0, False: 8.50k]
  ------------------
  504|      0|        SECItem d = { siBuffer, NULL, 0 };
  505|      0|        SECStatus rv = PK11_ReadRawAttribute(PK11_TypePrivKey, privKey,
  506|      0|                                             CKA_VALUE, &d);
  ------------------
  |  |  516|      0|#define CKA_VALUE 0x00000011UL
  ------------------
  507|      0|        if (rv == SECSuccess) {
  ------------------
  |  Branch (507:13): [True: 0, False: 0]
  ------------------
  508|      0|            PRINT_BUF(50, (ss, "Private Key", d.data, d.len));
  ------------------
  |  |   74|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   75|      0|    ssl_PrintBuf b
  ------------------
  509|      0|            SECITEM_FreeItem(&d, PR_FALSE);
  ------------------
  |  |  108|      0|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                          SECITEM_FreeItem(&d, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  510|      0|        } else {
  511|      0|            SSL_TRC(50, ("Error extracting private key"));
  ------------------
  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    ssl_Trace b
  ------------------
  512|      0|        }
  513|      0|    }
  514|  8.50k|#endif
  515|  8.50k|    return SECSuccess;
  516|  8.53k|}
ssl3_HandleECDHServerKeyExchange:
  520|  1.39k|{
  521|  1.39k|    PLArenaPool *arena = NULL;
  522|  1.39k|    SECKEYPublicKey *peerKey = NULL;
  523|  1.39k|    PRBool isTLS;
  524|  1.39k|    SECStatus rv;
  525|  1.39k|    int errCode = SSL_ERROR_RX_MALFORMED_SERVER_KEY_EXCH;
  526|  1.39k|    SSL3AlertDescription desc = illegal_parameter;
  527|  1.39k|    SSL3Hashes hashes;
  528|  1.39k|    SECItem signature = { siBuffer, NULL, 0 };
  529|  1.39k|    SSLHashType hashAlg;
  530|  1.39k|    SSLSignatureScheme sigScheme;
  531|       |
  532|  1.39k|    SECItem ec_params = { siBuffer, NULL, 0 };
  533|  1.39k|    SECItem ec_point = { siBuffer, NULL, 0 };
  534|  1.39k|    unsigned char paramBuf[3];
  535|  1.39k|    const sslNamedGroupDef *ecGroup;
  536|       |
  537|  1.39k|    isTLS = (PRBool)(ss->ssl3.prSpec->version > SSL_LIBRARY_VERSION_3_0);
  ------------------
  |  |   17|  1.39k|#define SSL_LIBRARY_VERSION_3_0                 0x0300
  ------------------
  538|       |
  539|  1.39k|    ec_params.len = sizeof paramBuf;
  540|  1.39k|    ec_params.data = paramBuf;
  541|  1.39k|    rv = ssl3_ConsumeHandshake(ss, ec_params.data, ec_params.len, &b, &length);
  542|  1.39k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (542:9): [True: 1, False: 1.39k]
  ------------------
  543|      1|        goto loser; /* malformed. */
  544|      1|    }
  545|       |
  546|       |    /* Fail if the curve is not a named curve */
  547|  1.39k|    if (ec_params.data[0] != ec_type_named) {
  ------------------
  |  Branch (547:9): [True: 6, False: 1.38k]
  ------------------
  548|      6|        errCode = SEC_ERROR_UNSUPPORTED_ELLIPTIC_CURVE;
  549|      6|        desc = handshake_failure;
  550|      6|        goto alert_loser;
  551|      6|    }
  552|  1.38k|    ecGroup = ssl_LookupNamedGroup(ec_params.data[1] << 8 | ec_params.data[2]);
  553|  1.38k|    if (!ecGroup || ecGroup->keaType != ssl_kea_ecdh) {
  ------------------
  |  Branch (553:9): [True: 1, False: 1.38k]
  |  Branch (553:21): [True: 2, False: 1.38k]
  ------------------
  554|      3|        errCode = SEC_ERROR_UNSUPPORTED_ELLIPTIC_CURVE;
  555|      3|        desc = handshake_failure;
  556|      3|        goto alert_loser;
  557|      3|    }
  558|       |
  559|  1.38k|    rv = ssl3_ConsumeHandshakeVariable(ss, &ec_point, 1, &b, &length);
  560|  1.38k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (560:9): [True: 1, False: 1.38k]
  ------------------
  561|      1|        goto loser; /* malformed. */
  562|      1|    }
  563|       |
  564|       |    /* Fail if the provided point has length 0. */
  565|  1.38k|    if (!ec_point.len) {
  ------------------
  |  Branch (565:9): [True: 1, False: 1.38k]
  ------------------
  566|       |        /* desc and errCode are initialized already */
  567|      1|        goto alert_loser;
  568|      1|    }
  569|       |
  570|       |    /* Fail if the ec point is not uncompressed for any curve that's not 25519. */
  571|  1.38k|    if (ecGroup->name != ssl_grp_ec_curve25519 &&
  ------------------
  |  Branch (571:9): [True: 32, False: 1.35k]
  ------------------
  572|  1.38k|        ec_point.data[0] != EC_POINT_FORM_UNCOMPRESSED) {
  ------------------
  |  |   92|     32|#define EC_POINT_FORM_UNCOMPRESSED 0x04
  ------------------
  |  Branch (572:9): [True: 7, False: 25]
  ------------------
  573|      7|        errCode = SEC_ERROR_UNSUPPORTED_EC_POINT_FORM;
  574|      7|        desc = handshake_failure;
  575|      7|        goto alert_loser;
  576|      7|    }
  577|       |
  578|  1.37k|    PORT_Assert(ss->ssl3.prSpec->version <= SSL_LIBRARY_VERSION_TLS_1_2);
  ------------------
  |  |  120|  1.37k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.37k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.37k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  579|  1.37k|    if (ss->ssl3.prSpec->version == SSL_LIBRARY_VERSION_TLS_1_2) {
  ------------------
  |  |   20|  1.37k|#define SSL_LIBRARY_VERSION_TLS_1_2             0x0303
  ------------------
  |  Branch (579:9): [True: 1.34k, False: 35]
  ------------------
  580|  1.34k|        rv = ssl_ConsumeSignatureScheme(ss, &b, &length, &sigScheme);
  581|  1.34k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (581:13): [True: 3, False: 1.33k]
  ------------------
  582|      3|            errCode = PORT_GetError();
  ------------------
  |  |   62|      3|#define PORT_GetError PORT_GetError_Util
  ------------------
  583|      3|            goto alert_loser; /* malformed or unsupported. */
  584|      3|        }
  585|  1.33k|        rv = ssl_CheckSignatureSchemeConsistency(
  586|  1.33k|            ss, sigScheme, &ss->sec.peerCert->subjectPublicKeyInfo);
  587|  1.33k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (587:13): [True: 27, False: 1.31k]
  ------------------
  588|     27|            errCode = PORT_GetError();
  ------------------
  |  |   62|     27|#define PORT_GetError PORT_GetError_Util
  ------------------
  589|     27|            goto alert_loser;
  590|     27|        }
  591|  1.31k|        hashAlg = ssl_SignatureSchemeToHashType(sigScheme);
  592|  1.31k|    } else {
  593|       |        /* Use ssl_hash_none to represent the MD5+SHA1 combo. */
  594|     35|        hashAlg = ssl_hash_none;
  595|     35|        sigScheme = ssl_sig_none;
  596|     35|    }
  597|       |
  598|  1.34k|    rv = ssl3_ConsumeHandshakeVariable(ss, &signature, 2, &b, &length);
  599|  1.34k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (599:9): [True: 1, False: 1.34k]
  ------------------
  600|      1|        goto loser; /* malformed. */
  601|      1|    }
  602|       |
  603|  1.34k|    if (length != 0) {
  ------------------
  |  Branch (603:9): [True: 1, False: 1.34k]
  ------------------
  604|      1|        if (isTLS)
  ------------------
  |  Branch (604:13): [True: 1, False: 0]
  ------------------
  605|      1|            desc = decode_error;
  606|      1|        goto alert_loser; /* malformed. */
  607|      1|    }
  608|       |
  609|  1.34k|    PRINT_BUF(60, (NULL, "Server EC params", ec_params.data, ec_params.len));
  ------------------
  |  |   74|  1.34k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 1.34k]
  |  |  ------------------
  |  |   75|  1.34k|    ssl_PrintBuf b
  ------------------
  610|  1.34k|    PRINT_BUF(60, (NULL, "Server EC point", ec_point.data, ec_point.len));
  ------------------
  |  |   74|  1.34k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 1.34k]
  |  |  ------------------
  |  |   75|  1.34k|    ssl_PrintBuf b
  ------------------
  611|       |
  612|       |    /* failures after this point are not malformed handshakes. */
  613|       |    /* TLS: send decrypt_error if signature failed. */
  614|  1.34k|    desc = isTLS ? decrypt_error : handshake_failure;
  ------------------
  |  Branch (614:12): [True: 1.34k, False: 0]
  ------------------
  615|       |
  616|       |    /*
  617|       |     *  check to make sure the hash is signed by right guy
  618|       |     */
  619|  1.34k|    rv = ssl3_ComputeECDHKeyHash(hashAlg, ec_params, ec_point,
  620|  1.34k|                                 ss->ssl3.hs.client_random,
  621|  1.34k|                                 ss->ssl3.hs.server_random,
  622|  1.34k|                                 &hashes);
  623|       |
  624|  1.34k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (624:9): [True: 0, False: 1.34k]
  ------------------
  625|      0|        errCode =
  626|      0|            ssl_MapLowLevelError(SSL_ERROR_SERVER_KEY_EXCHANGE_FAILURE);
  627|      0|        goto alert_loser;
  628|      0|    }
  629|  1.34k|    rv = ssl3_VerifySignedHashes(ss, sigScheme, &hashes, &signature);
  630|  1.34k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (630:9): [True: 1.34k, False: 0]
  ------------------
  631|  1.34k|        errCode =
  632|  1.34k|            ssl_MapLowLevelError(SSL_ERROR_SERVER_KEY_EXCHANGE_FAILURE);
  633|  1.34k|        goto alert_loser;
  634|  1.34k|    }
  635|       |
  636|      0|    arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
  ------------------
  |  |   63|      0|#define PORT_NewArena PORT_NewArena_Util
  ------------------
                  arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
  ------------------
  |  |   60|      0|#define DER_DEFAULT_CHUNKSIZE (2048)
  ------------------
  637|      0|    if (arena == NULL) {
  ------------------
  |  Branch (637:9): [True: 0, False: 0]
  ------------------
  638|      0|        errCode = SEC_ERROR_NO_MEMORY;
  639|      0|        goto loser;
  640|      0|    }
  641|       |
  642|      0|    peerKey = PORT_ArenaZNew(arena, SECKEYPublicKey);
  ------------------
  |  |  155|      0|    (type *)PORT_ArenaZAlloc(poolp, sizeof(type))
  |  |  ------------------
  |  |  |  |   59|      0|#define PORT_ArenaZAlloc PORT_ArenaZAlloc_Util
  |  |  ------------------
  ------------------
  643|      0|    if (peerKey == NULL) {
  ------------------
  |  Branch (643:9): [True: 0, False: 0]
  ------------------
  644|      0|        errCode = SEC_ERROR_NO_MEMORY;
  645|      0|        goto loser;
  646|      0|    }
  647|      0|    peerKey->arena = arena;
  648|       |
  649|       |    /* create public key from point data */
  650|      0|    rv = ssl_ImportECDHKeyShare(peerKey, ec_point.data, ec_point.len,
  651|      0|                                ecGroup);
  652|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (652:9): [True: 0, False: 0]
  ------------------
  653|       |        /* error code is set */
  654|      0|        desc = handshake_failure;
  655|      0|        errCode = PORT_GetError();
  ------------------
  |  |   62|      0|#define PORT_GetError PORT_GetError_Util
  ------------------
  656|      0|        goto alert_loser;
  657|      0|    }
  658|      0|    peerKey->pkcs11Slot = NULL;
  659|      0|    peerKey->pkcs11ID = CK_INVALID_HANDLE;
  ------------------
  |  |   78|      0|#define CK_INVALID_HANDLE 0
  ------------------
  660|       |
  661|      0|    ss->sec.peerKey = peerKey;
  662|      0|    return SECSuccess;
  663|       |
  664|  1.39k|alert_loser:
  665|  1.39k|    (void)SSL3_SendAlert(ss, alert_fatal, desc);
  666|  1.39k|loser:
  667|  1.39k|    if (arena) {
  ------------------
  |  Branch (667:9): [True: 0, False: 1.39k]
  ------------------
  668|      0|        PORT_FreeArena(arena, PR_FALSE);
  ------------------
  |  |   61|      0|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                      PORT_FreeArena(arena, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  669|      0|    }
  670|  1.39k|    PORT_SetError(errCode);
  ------------------
  |  |   65|  1.39k|#define PORT_SetError PORT_SetError_Util
  ------------------
  671|  1.39k|    return SECFailure;
  672|  1.39k|}
ssl_IsECCEnabled:
  872|  12.4k|{
  873|  12.4k|    PK11SlotInfo *slot;
  874|       |
  875|       |    /* make sure we can do ECC */
  876|  12.4k|    slot = PK11_GetBestSlot(CKM_ECDH1_DERIVE, ss->pkcs11PinArg);
  ------------------
  |  | 1086|  12.4k|#define CKM_ECDH1_DERIVE 0x00001050UL
  ------------------
  877|  12.4k|    if (!slot) {
  ------------------
  |  Branch (877:9): [True: 0, False: 12.4k]
  ------------------
  878|      0|        return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  879|      0|    }
  880|  12.4k|    PK11_FreeSlot(slot);
  881|       |
  882|       |    /* make sure an ECC cipher is enabled */
  883|  12.4k|    return ssl_IsSuiteEnabled(ss, ssl_all_ec_suites);
  884|  12.4k|}
ssl_IsDHEEnabled:
  888|    700|{
  889|    700|    return ssl_IsSuiteEnabled(ss, ssl_dhe_suites);
  890|    700|}
ssl_SendSupportedGroupsXtn:
  896|  11.0k|{
  897|  11.0k|    unsigned int i;
  898|  11.0k|    PRBool ec;
  899|  11.0k|    PRBool ec_hybrid = PR_FALSE;
  ------------------
  |  |  438|  11.0k|#define PR_FALSE 0
  ------------------
  900|  11.0k|    PRBool ff = PR_FALSE;
  ------------------
  |  |  438|  11.0k|#define PR_FALSE 0
  ------------------
  901|  11.0k|    PRBool found = PR_FALSE;
  ------------------
  |  |  438|  11.0k|#define PR_FALSE 0
  ------------------
  902|  11.0k|    SECStatus rv;
  903|  11.0k|    unsigned int lengthOffset;
  904|       |
  905|       |    /* We only send FF supported groups if we require DH named groups
  906|       |     * or if TLS 1.3 is a possibility. */
  907|  11.0k|    if (ss->vrange.max < SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|  11.0k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (907:9): [True: 1.47k, False: 9.52k]
  ------------------
  908|  1.47k|        ec = ssl_IsECCEnabled(ss);
  909|  1.47k|        if (ss->opt.requireDHENamedGroups) {
  ------------------
  |  Branch (909:13): [True: 700, False: 777]
  ------------------
  910|    700|            ff = ssl_IsDHEEnabled(ss);
  911|    700|        }
  912|  1.47k|        if (!ec && !ff) {
  ------------------
  |  Branch (912:13): [True: 0, False: 1.47k]
  |  Branch (912:20): [True: 0, False: 0]
  ------------------
  913|      0|            return SECSuccess;
  914|      0|        }
  915|  9.52k|    } else {
  916|  9.52k|        ec = ec_hybrid = ff = PR_TRUE;
  ------------------
  |  |  437|  9.52k|#define PR_TRUE 1
  ------------------
  917|  9.52k|    }
  918|       |
  919|       |    /* Mark the location of the length. */
  920|  11.0k|    rv = sslBuffer_Skip(buf, 2, &lengthOffset);
  921|  11.0k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (921:9): [True: 0, False: 11.0k]
  ------------------
  922|      0|        return SECFailure;
  923|      0|    }
  924|       |
  925|   374k|    for (i = 0; i < SSL_NAMED_GROUP_COUNT; ++i) {
  ------------------
  |  |  133|   374k|#define SSL_NAMED_GROUP_COUNT 33
  ------------------
  |  Branch (925:17): [True: 363k, False: 11.0k]
  ------------------
  926|   363k|        const sslNamedGroupDef *group = ss->namedGroupPreferences[i];
  927|   363k|        if (!group) {
  ------------------
  |  Branch (927:13): [True: 253k, False: 110k]
  ------------------
  928|   253k|            continue;
  929|   253k|        }
  930|   110k|        if (group->keaType == ssl_kea_ecdh && !ec) {
  ------------------
  |  Branch (930:13): [True: 44.0k, False: 66.0k]
  |  Branch (930:47): [True: 0, False: 44.0k]
  ------------------
  931|      0|            continue;
  932|      0|        }
  933|   110k|        if (group->keaType == ssl_kea_ecdh_hybrid && !ec_hybrid) {
  ------------------
  |  Branch (933:13): [True: 11.0k, False: 99.0k]
  |  Branch (933:54): [True: 1.47k, False: 9.52k]
  ------------------
  934|  1.47k|            continue;
  935|  1.47k|        }
  936|   108k|        if (group->keaType == ssl_kea_dh && !ff) {
  ------------------
  |  Branch (936:13): [True: 55.0k, False: 53.5k]
  |  Branch (936:45): [True: 3.88k, False: 51.1k]
  ------------------
  937|  3.88k|            continue;
  938|  3.88k|        }
  939|       |
  940|   104k|        found = PR_TRUE;
  ------------------
  |  |  437|   104k|#define PR_TRUE 1
  ------------------
  941|   104k|        rv = sslBuffer_AppendNumber(buf, group->name, 2);
  942|   104k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (942:13): [True: 0, False: 104k]
  ------------------
  943|      0|            return SECFailure;
  944|      0|        }
  945|   104k|    }
  946|       |
  947|       |    /* GREASE SupportedGroups:
  948|       |     * A client MAY select one or more GREASE named group values and advertise
  949|       |     * them in the "supported_groups" extension, if sent [RFC8701, Section 3.1].
  950|       |     */
  951|  11.0k|    if (!ss->sec.isServer &&
  ------------------
  |  Branch (951:9): [True: 11.0k, False: 0]
  ------------------
  952|  11.0k|        ss->opt.enableGrease &&
  ------------------
  |  Branch (952:9): [True: 5.49k, False: 5.51k]
  ------------------
  953|  11.0k|        ss->vrange.max >= SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|  5.49k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (953:9): [True: 4.76k, False: 723]
  ------------------
  954|  4.76k|        rv = sslBuffer_AppendNumber(buf, ss->ssl3.hs.grease->idx[grease_group], 2);
  955|  4.76k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (955:13): [True: 0, False: 4.76k]
  ------------------
  956|      0|            return SECFailure;
  957|      0|        }
  958|  4.76k|        found = PR_TRUE;
  ------------------
  |  |  437|  4.76k|#define PR_TRUE 1
  ------------------
  959|  4.76k|    }
  960|       |
  961|  11.0k|    if (!found) {
  ------------------
  |  Branch (961:9): [True: 0, False: 11.0k]
  ------------------
  962|       |        /* We added nothing, don't send the extension. */
  963|      0|        return SECSuccess;
  964|      0|    }
  965|       |
  966|  11.0k|    rv = sslBuffer_InsertLength(buf, lengthOffset, 2);
  967|  11.0k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (967:9): [True: 0, False: 11.0k]
  ------------------
  968|      0|        return SECFailure;
  969|      0|    }
  970|       |
  971|  11.0k|    *added = PR_TRUE;
  ------------------
  |  |  437|  11.0k|#define PR_TRUE 1
  ------------------
  972|  11.0k|    return SECSuccess;
  973|  11.0k|}
ssl3_SendSupportedPointFormatsXtn:
  981|  11.0k|{
  982|  11.0k|    SECStatus rv;
  983|       |
  984|       |    /* No point in doing this unless we have a socket that supports ECC.
  985|       |     * Similarly, no point if we are going to do TLS 1.3 only or we have already
  986|       |     * picked TLS 1.3 (server) given that it doesn't use point formats. */
  987|  11.0k|    if (!ss || !ssl_IsECCEnabled(ss) ||
  ------------------
  |  Branch (987:9): [True: 0, False: 11.0k]
  |  Branch (987:16): [True: 0, False: 11.0k]
  ------------------
  988|  11.0k|        ss->vrange.min >= SSL_LIBRARY_VERSION_TLS_1_3 ||
  ------------------
  |  |   21|  22.0k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (988:9): [True: 1.10k, False: 9.90k]
  ------------------
  989|  11.0k|        (ss->sec.isServer && ss->version >= SSL_LIBRARY_VERSION_TLS_1_3)) {
  ------------------
  |  |   21|      0|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (989:10): [True: 0, False: 9.90k]
  |  Branch (989:30): [True: 0, False: 0]
  ------------------
  990|  1.10k|        return SECSuccess;
  991|  1.10k|    }
  992|  9.90k|    rv = sslBuffer_AppendNumber(buf, 1, 1); /* length */
  993|  9.90k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (993:9): [True: 0, False: 9.90k]
  ------------------
  994|      0|        return SECFailure;
  995|      0|    }
  996|  9.90k|    rv = sslBuffer_AppendNumber(buf, 0, 1); /* uncompressed type only */
  997|  9.90k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (997:9): [True: 0, False: 9.90k]
  ------------------
  998|      0|        return SECFailure;
  999|      0|    }
 1000|       |
 1001|  9.90k|    *added = PR_TRUE;
  ------------------
  |  |  437|  9.90k|#define PR_TRUE 1
  ------------------
 1002|  9.90k|    return SECSuccess;
 1003|  9.90k|}
ssl3ecc.c:ssl_CreateECDHEPrivateKey:
  443|  8.53k|{
  444|  8.53k|    SECKEYPrivateKey *privk = NULL;
  445|  8.53k|    CK_MECHANISM_TYPE type = CKM_NSS_ECDHE_NO_PAIRWISE_CHECK_KEY_PAIR_GEN;
  ------------------
  |  |  274|  8.53k|#define CKM_NSS_ECDHE_NO_PAIRWISE_CHECK_KEY_PAIR_GEN (CKM_NSS + 47)
  |  |  ------------------
  |  |  |  |  162|  8.53k|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|  8.53k|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  8.53k|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  446|       |
  447|  8.53k|    PK11SlotInfo *slot = PK11_GetInternalSlot();
  448|  8.53k|    if (!slot || !PK11_DoesMechanism(slot, type) || PK11_IsFIPS()) {
  ------------------
  |  Branch (448:9): [True: 0, False: 8.53k]
  |  Branch (448:18): [True: 0, False: 8.53k]
  |  Branch (448:53): [True: 0, False: 8.53k]
  ------------------
  449|      0|        if (slot) {
  ------------------
  |  Branch (449:13): [True: 0, False: 0]
  ------------------
  450|      0|            PK11_FreeSlot(slot);
  451|      0|        }
  452|      0|        return SECKEY_CreateECPrivateKey(param, pubk, cx);
  453|      0|    }
  454|       |
  455|  8.53k|    privk = PK11_GenerateKeyPairWithOpFlags(slot, type, param, pubk,
  456|  8.53k|                                            PK11_ATTR_SESSION | PK11_ATTR_INSENSITIVE | PK11_ATTR_PUBLIC,
  ------------------
  |  |  195|  8.53k|#define PK11_ATTR_SESSION 0x00000002L
  ------------------
                                                          PK11_ATTR_SESSION | PK11_ATTR_INSENSITIVE | PK11_ATTR_PUBLIC,
  ------------------
  |  |  261|  8.53k|#define PK11_ATTR_INSENSITIVE 0x00000080L
  ------------------
                                                          PK11_ATTR_SESSION | PK11_ATTR_INSENSITIVE | PK11_ATTR_PUBLIC,
  ------------------
  |  |  217|  8.53k|#define PK11_ATTR_PUBLIC 0x00000008L
  ------------------
  457|  8.53k|                                            CKF_DERIVE, CKF_DERIVE, cx);
  ------------------
  |  | 1364|  8.53k|#define CKF_DERIVE 0x00080000UL
  ------------------
                                                          CKF_DERIVE, CKF_DERIVE, cx);
  ------------------
  |  | 1364|  8.53k|#define CKF_DERIVE 0x00080000UL
  ------------------
  458|  8.53k|    if (!privk) {
  ------------------
  |  Branch (458:9): [True: 28, False: 8.50k]
  ------------------
  459|     28|        privk = PK11_GenerateKeyPairWithOpFlags(slot, type, param, pubk,
  460|     28|                                                PK11_ATTR_SESSION | PK11_ATTR_SENSITIVE | PK11_ATTR_PRIVATE,
  ------------------
  |  |  195|     28|#define PK11_ATTR_SESSION 0x00000002L
  ------------------
                                                              PK11_ATTR_SESSION | PK11_ATTR_SENSITIVE | PK11_ATTR_PRIVATE,
  ------------------
  |  |  260|     28|#define PK11_ATTR_SENSITIVE 0x00000040L
  ------------------
                                                              PK11_ATTR_SESSION | PK11_ATTR_SENSITIVE | PK11_ATTR_PRIVATE,
  ------------------
  |  |  216|     28|#define PK11_ATTR_PRIVATE 0x00000004L
  ------------------
  461|     28|                                                CKF_DERIVE, CKF_DERIVE, cx);
  ------------------
  |  | 1364|     28|#define CKF_DERIVE 0x00080000UL
  ------------------
                                                              CKF_DERIVE, CKF_DERIVE, cx);
  ------------------
  |  | 1364|     28|#define CKF_DERIVE 0x00080000UL
  ------------------
  462|     28|    }
  463|       |
  464|  8.53k|    PK11_FreeSlot(slot);
  465|  8.53k|    return privk;
  466|  8.53k|}
ssl3ecc.c:ssl3_ComputeECDHKeyHash:
  116|  1.34k|{
  117|  1.34k|    PRUint8 *hashBuf;
  118|  1.34k|    PRUint8 *pBuf;
  119|  1.34k|    SECStatus rv = SECSuccess;
  120|  1.34k|    unsigned int bufLen;
  121|       |    /*
  122|       |     * We only support named curves (the appropriate checks are made before this
  123|       |     * method is called) so ec_params takes up only two bytes. ECPoint needs to
  124|       |     * fit in 256 bytes because the spec says the length must fit in one byte.
  125|       |     */
  126|  1.34k|    PRUint8 buf[2 * SSL3_RANDOM_LENGTH + 2 + 1 + 256];
  127|       |
  128|  1.34k|    bufLen = 2 * SSL3_RANDOM_LENGTH + ec_params.len + 1 + server_ecpoint.len;
  ------------------
  |  |   24|  1.34k|#define SSL3_RANDOM_LENGTH 32
  ------------------
  129|  1.34k|    if (bufLen <= sizeof buf) {
  ------------------
  |  Branch (129:9): [True: 1.34k, False: 0]
  ------------------
  130|  1.34k|        hashBuf = buf;
  131|  1.34k|    } else {
  132|      0|        hashBuf = PORT_Alloc(bufLen);
  ------------------
  |  |   52|      0|#define PORT_Alloc PORT_Alloc_Util
  ------------------
  133|      0|        if (!hashBuf) {
  ------------------
  |  Branch (133:13): [True: 0, False: 0]
  ------------------
  134|      0|            return SECFailure;
  135|      0|        }
  136|      0|    }
  137|       |
  138|  1.34k|    memcpy(hashBuf, client_rand, SSL3_RANDOM_LENGTH);
  ------------------
  |  |   24|  1.34k|#define SSL3_RANDOM_LENGTH 32
  ------------------
  139|  1.34k|    pBuf = hashBuf + SSL3_RANDOM_LENGTH;
  ------------------
  |  |   24|  1.34k|#define SSL3_RANDOM_LENGTH 32
  ------------------
  140|  1.34k|    memcpy(pBuf, server_rand, SSL3_RANDOM_LENGTH);
  ------------------
  |  |   24|  1.34k|#define SSL3_RANDOM_LENGTH 32
  ------------------
  141|  1.34k|    pBuf += SSL3_RANDOM_LENGTH;
  ------------------
  |  |   24|  1.34k|#define SSL3_RANDOM_LENGTH 32
  ------------------
  142|  1.34k|    memcpy(pBuf, ec_params.data, ec_params.len);
  143|  1.34k|    pBuf += ec_params.len;
  144|  1.34k|    pBuf[0] = (PRUint8)(server_ecpoint.len);
  145|  1.34k|    pBuf += 1;
  146|  1.34k|    memcpy(pBuf, server_ecpoint.data, server_ecpoint.len);
  147|  1.34k|    pBuf += server_ecpoint.len;
  148|  1.34k|    PORT_Assert((unsigned int)(pBuf - hashBuf) == bufLen);
  ------------------
  |  |  120|  1.34k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.34k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.34k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  149|       |
  150|  1.34k|    rv = ssl3_ComputeCommonKeyHash(hashAlg, hashBuf, bufLen, hashes);
  151|       |
  152|  1.34k|    PRINT_BUF(95, (NULL, "ECDHkey hash: ", hashBuf, bufLen));
  ------------------
  |  |   74|  1.34k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 1.34k]
  |  |  ------------------
  |  |   75|  1.34k|    ssl_PrintBuf b
  ------------------
  153|  1.34k|    PRINT_BUF(95, (NULL, "ECDHkey hash: MD5 result",
  ------------------
  |  |   74|  1.34k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 1.34k]
  |  |  ------------------
  |  |   75|  1.34k|    ssl_PrintBuf b
  ------------------
  154|  1.34k|                   hashes->u.s.md5, MD5_LENGTH));
  155|  1.34k|    PRINT_BUF(95, (NULL, "ECDHkey hash: SHA1 result",
  ------------------
  |  |   74|  1.34k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 1.34k]
  |  |  ------------------
  |  |   75|  1.34k|    ssl_PrintBuf b
  ------------------
  156|  1.34k|                   hashes->u.s.sha, SHA1_LENGTH));
  157|       |
  158|  1.34k|    if (hashBuf != buf)
  ------------------
  |  Branch (158:9): [True: 0, False: 1.34k]
  ------------------
  159|      0|        PORT_Free(hashBuf);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
  160|  1.34k|    return rv;
  161|  1.34k|}
ssl3ecc.c:ssl_IsSuiteEnabled:
  855|  13.1k|{
  856|  13.1k|    const ssl3CipherSuite *suite;
  857|       |
  858|  13.1k|    for (suite = list; *suite; ++suite) {
  ------------------
  |  Branch (858:24): [True: 13.1k, False: 0]
  ------------------
  859|  13.1k|        PRBool enabled = PR_FALSE;
  ------------------
  |  |  438|  13.1k|#define PR_FALSE 0
  ------------------
  860|  13.1k|        SECStatus rv = ssl3_CipherPrefGet(ss, *suite, &enabled);
  861|       |
  862|  13.1k|        PORT_Assert(rv == SECSuccess); /* else is coding error */
  ------------------
  |  |  120|  13.1k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  13.1k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 13.1k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  863|  13.1k|        if (rv == SECSuccess && enabled)
  ------------------
  |  Branch (863:13): [True: 13.1k, False: 0]
  |  Branch (863:33): [True: 13.1k, False: 0]
  ------------------
  864|  13.1k|            return PR_TRUE;
  ------------------
  |  |  437|  13.1k|#define PR_TRUE 1
  ------------------
  865|  13.1k|    }
  866|      0|    return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  867|  13.1k|}

ssl_FindCustomExtensionHooks:
  294|   268k|{
  295|   268k|    PRCList *cursor;
  296|       |
  297|   268k|    for (cursor = PR_NEXT_LINK(&ss->extensionHooks);
  ------------------
  |  |   47|   268k|        ((_e)->next)
  ------------------
  298|   268k|         cursor != &ss->extensionHooks;
  ------------------
  |  Branch (298:10): [True: 0, False: 268k]
  ------------------
  299|   268k|         cursor = PR_NEXT_LINK(cursor)) {
  ------------------
  |  |   47|      0|        ((_e)->next)
  ------------------
  300|      0|        sslCustomExtensionHooks *hook = (sslCustomExtensionHooks *)cursor;
  301|      0|        if (hook->type == extension) {
  ------------------
  |  Branch (301:13): [True: 0, False: 0]
  ------------------
  302|      0|            return hook;
  303|      0|        }
  304|      0|    }
  305|       |
  306|   268k|    return NULL;
  307|   268k|}
ssl3_ExtensionNegotiated:
  322|  23.0k|{
  323|  23.0k|    const TLSExtensionData *xtnData = &ss->xtnData;
  324|  23.0k|    return arrayContainsExtension(xtnData->negotiated,
  325|  23.0k|                                  xtnData->numNegotiated, ex_type);
  326|  23.0k|}
ssl3_ExtensionAdvertised:
  333|  50.9k|{
  334|  50.9k|    const TLSExtensionData *xtnData = &ss->xtnData;
  335|  50.9k|    return arrayContainsExtension(xtnData->advertised,
  336|  50.9k|                                  xtnData->numAdvertised, ex_type);
  337|  50.9k|}
ssl3_ParseExtensions:
  356|  4.53k|{
  357|       |    /* Clean out the extensions list. */
  358|  4.53k|    ssl3_DestroyRemoteExtensions(&ss->ssl3.hs.remoteExtensions);
  359|       |
  360|  13.9k|    while (*length) {
  ------------------
  |  Branch (360:12): [True: 9.47k, False: 4.50k]
  ------------------
  361|  9.47k|        SECStatus rv;
  362|  9.47k|        PRUint32 extension_type;
  363|  9.47k|        SECItem extension_data = { siBuffer, NULL, 0 };
  364|  9.47k|        TLSExtension *extension;
  365|  9.47k|        PRCList *cursor;
  366|       |
  367|       |        /* Get the extension's type field */
  368|  9.47k|        rv = ssl3_ConsumeHandshakeNumber(ss, &extension_type, 2, b, length);
  369|  9.47k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (369:13): [True: 4, False: 9.46k]
  ------------------
  370|      4|            return SECFailure; /* alert already sent */
  371|      4|        }
  372|       |
  373|       |        /* Check whether an extension has been sent multiple times. */
  374|  9.46k|        for (cursor = PR_NEXT_LINK(&ss->ssl3.hs.remoteExtensions);
  ------------------
  |  |   47|  9.46k|        ((_e)->next)
  ------------------
  375|  15.6k|             cursor != &ss->ssl3.hs.remoteExtensions;
  ------------------
  |  Branch (375:14): [True: 6.17k, False: 9.46k]
  ------------------
  376|  9.46k|             cursor = PR_NEXT_LINK(cursor)) {
  ------------------
  |  |   47|  6.17k|        ((_e)->next)
  ------------------
  377|  6.17k|            if (((TLSExtension *)cursor)->type == extension_type) {
  ------------------
  |  Branch (377:17): [True: 2, False: 6.17k]
  ------------------
  378|      2|                (void)SSL3_SendAlert(ss, alert_fatal, illegal_parameter);
  379|      2|                PORT_SetError(SSL_ERROR_RX_UNEXPECTED_EXTENSION);
  ------------------
  |  |   65|      2|#define PORT_SetError PORT_SetError_Util
  ------------------
  380|      2|                return SECFailure;
  381|      2|            }
  382|  6.17k|        }
  383|       |
  384|       |        /* Get the data for this extension, so we can pass it or skip it. */
  385|  9.46k|        rv = ssl3_ConsumeHandshakeVariable(ss, &extension_data, 2, b, length);
  386|  9.46k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (386:13): [True: 24, False: 9.44k]
  ------------------
  387|     24|            return rv; /* alert already sent */
  388|     24|        }
  389|       |
  390|  9.44k|        SSL_TRC(10, ("%d: SSL3[%d]: parsed extension %d len=%u",
  ------------------
  |  |   71|  9.44k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 9.44k]
  |  |  ------------------
  |  |   72|  9.44k|    ssl_Trace b
  ------------------
  391|  9.44k|                     SSL_GETPID(), ss->fd, extension_type, extension_data.len));
  392|       |
  393|  9.44k|        extension = PORT_ZNew(TLSExtension);
  ------------------
  |  |  148|  9.44k|#define PORT_ZNew(type) (type *)PORT_ZAlloc(sizeof(type))
  |  |  ------------------
  |  |  |  |   72|  9.44k|#define PORT_ZAlloc PORT_ZAlloc_Util
  |  |  ------------------
  ------------------
  394|  9.44k|        if (!extension) {
  ------------------
  |  Branch (394:13): [True: 0, False: 9.44k]
  ------------------
  395|      0|            return SECFailure;
  396|      0|        }
  397|       |
  398|  9.44k|        extension->type = (PRUint16)extension_type;
  399|  9.44k|        extension->data = extension_data;
  400|  9.44k|        PR_APPEND_LINK(&extension->link, &ss->ssl3.hs.remoteExtensions);
  ------------------
  |  |   57|  9.44k|#define PR_APPEND_LINK(_e,_l) PR_INSERT_BEFORE(_e,_l)
  |  |  ------------------
  |  |  |  |   25|  9.44k|    PR_BEGIN_MACRO       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  123|  9.44k|#define PR_BEGIN_MACRO  do {
  |  |  |  |  ------------------
  |  |  |  |   26|  9.44k|    (_e)->next = (_l);   \
  |  |  |  |   27|  9.44k|    (_e)->prev = (_l)->prev; \
  |  |  |  |   28|  9.44k|    (_l)->prev->next = (_e); \
  |  |  |  |   29|  9.44k|    (_l)->prev = (_e);   \
  |  |  |  |   30|  9.44k|    PR_END_MACRO
  |  |  |  |  ------------------
  |  |  |  |  |  |  124|  9.44k|#define PR_END_MACRO    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  401|  9.44k|    }
  402|       |
  403|  4.50k|    return SECSuccess;
  404|  4.53k|}
ssl3_FindExtension:
  408|  8.47k|{
  409|  8.47k|    PRCList *cursor;
  410|       |
  411|  8.47k|    for (cursor = PR_NEXT_LINK(&ss->ssl3.hs.remoteExtensions);
  ------------------
  |  |   47|  8.47k|        ((_e)->next)
  ------------------
  412|  13.7k|         cursor != &ss->ssl3.hs.remoteExtensions;
  ------------------
  |  Branch (412:10): [True: 8.19k, False: 5.58k]
  ------------------
  413|  8.47k|         cursor = PR_NEXT_LINK(cursor)) {
  ------------------
  |  |   47|  5.30k|        ((_e)->next)
  ------------------
  414|  8.19k|        TLSExtension *extension = (TLSExtension *)cursor;
  415|       |
  416|  8.19k|        if (extension->type == extension_type) {
  ------------------
  |  Branch (416:13): [True: 2.89k, False: 5.30k]
  ------------------
  417|  2.89k|            return extension;
  418|  2.89k|        }
  419|  8.19k|    }
  420|       |
  421|  5.58k|    return NULL;
  422|  8.47k|}
ssl3_HandleParsedExtensions:
  475|  8.40k|{
  476|  8.40k|    const ssl3ExtensionHandler *handlers;
  477|       |    /* HelloRetryRequest doesn't set ss->version. It might be safe to
  478|       |     * do so, but we weren't entirely sure. TODO(ekr@rtfm.com). */
  479|  8.40k|    PRBool isTLS13 = (ss->version >= SSL_LIBRARY_VERSION_TLS_1_3) ||
  ------------------
  |  |   21|  8.40k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (479:22): [True: 2.87k, False: 5.52k]
  ------------------
  480|  8.40k|                     (message == ssl_hs_hello_retry_request);
  ------------------
  |  Branch (480:22): [True: 0, False: 5.52k]
  ------------------
  481|       |    /* The following messages can include extensions that were not included in
  482|       |     * the original ClientHello. */
  483|  8.40k|    PRBool allowNotOffered = (message == ssl_hs_client_hello) ||
  ------------------
  |  Branch (483:30): [True: 0, False: 8.40k]
  ------------------
  484|  8.40k|                             (message == ssl_hs_certificate_request) ||
  ------------------
  |  Branch (484:30): [True: 0, False: 8.40k]
  ------------------
  485|  8.40k|                             (message == ssl_hs_new_session_ticket);
  ------------------
  |  Branch (485:30): [True: 0, False: 8.40k]
  ------------------
  486|  8.40k|    PRCList *cursor;
  487|       |
  488|  8.40k|    switch (message) {
  489|      0|        case ssl_hs_client_hello:
  ------------------
  |  Branch (489:9): [True: 0, False: 8.40k]
  ------------------
  490|      0|            handlers = clientHelloHandlers;
  491|      0|            break;
  492|      0|        case ssl_hs_new_session_ticket:
  ------------------
  |  Branch (492:9): [True: 0, False: 8.40k]
  ------------------
  493|      0|            PORT_Assert(ss->version >= SSL_LIBRARY_VERSION_TLS_1_3);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  494|      0|            handlers = newSessionTicketHandlers;
  495|      0|            break;
  496|  1.29k|        case ssl_hs_hello_retry_request:
  ------------------
  |  Branch (496:9): [True: 1.29k, False: 7.11k]
  ------------------
  497|  1.29k|            handlers = helloRetryRequestHandlers;
  498|  1.29k|            break;
  499|      0|        case ssl_hs_encrypted_extensions:
  ------------------
  |  Branch (499:9): [True: 0, False: 8.40k]
  ------------------
  500|      0|            PORT_Assert(ss->version >= SSL_LIBRARY_VERSION_TLS_1_3);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  501|       |        /* fall through */
  502|  7.11k|        case ssl_hs_server_hello:
  ------------------
  |  Branch (502:9): [True: 7.11k, False: 1.29k]
  ------------------
  503|  7.11k|            if (ss->version > SSL_LIBRARY_VERSION_3_0) {
  ------------------
  |  |   17|  7.11k|#define SSL_LIBRARY_VERSION_3_0                 0x0300
  ------------------
  |  Branch (503:17): [True: 7.11k, False: 0]
  ------------------
  504|  7.11k|                handlers = serverHelloHandlersTLS;
  505|  7.11k|            } else {
  506|      0|                handlers = serverHelloHandlersSSL3;
  507|      0|            }
  508|  7.11k|            break;
  509|      0|        case ssl_hs_certificate:
  ------------------
  |  Branch (509:9): [True: 0, False: 8.40k]
  ------------------
  510|      0|            PORT_Assert(!ss->sec.isServer);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  511|      0|            handlers = serverCertificateHandlers;
  512|      0|            break;
  513|      0|        case ssl_hs_certificate_request:
  ------------------
  |  Branch (513:9): [True: 0, False: 8.40k]
  ------------------
  514|      0|            PORT_Assert(!ss->sec.isServer);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  515|      0|            handlers = certificateRequestHandlers;
  516|      0|            break;
  517|      0|        default:
  ------------------
  |  Branch (517:9): [True: 0, False: 8.40k]
  ------------------
  518|      0|            PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  519|      0|            PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  520|      0|            return SECFailure;
  521|  8.40k|    }
  522|       |
  523|  8.40k|    for (cursor = PR_NEXT_LINK(&ss->ssl3.hs.remoteExtensions);
  ------------------
  |  |   47|  8.40k|        ((_e)->next)
  ------------------
  524|  17.4k|         cursor != &ss->ssl3.hs.remoteExtensions;
  ------------------
  |  Branch (524:10): [True: 9.17k, False: 8.25k]
  ------------------
  525|  9.17k|         cursor = PR_NEXT_LINK(cursor)) {
  ------------------
  |  |   47|  9.02k|        ((_e)->next)
  ------------------
  526|  9.17k|        TLSExtension *extension = (TLSExtension *)cursor;
  527|  9.17k|        SECStatus rv;
  528|       |
  529|       |        /* Check whether the server sent an extension which was not advertised
  530|       |         * in the ClientHello.
  531|       |         *
  532|       |         * Note that a TLS 1.3 server should check if CertificateRequest
  533|       |         * extensions were sent.  But the extensions used for CertificateRequest
  534|       |         * do not have any response, so we rely on
  535|       |         * ssl3_ExtensionAdvertised to return false on the server.  That
  536|       |         * results in the server only rejecting any extension. */
  537|  9.17k|        if (!allowNotOffered && (extension->type != ssl_tls13_cookie_xtn)) {
  ------------------
  |  Branch (537:13): [True: 9.17k, False: 0]
  |  Branch (537:33): [True: 9.03k, False: 144]
  ------------------
  538|  9.03k|            if (!ssl3_ExtensionAdvertised(ss, extension->type)) {
  ------------------
  |  Branch (538:17): [True: 25, False: 9.00k]
  ------------------
  539|     25|                SSL_TRC(10, ("Server sent xtn type=%d which is invalid for the CHO", extension->type));
  ------------------
  |  |   71|     25|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 25]
  |  |  ------------------
  |  |   72|     25|    ssl_Trace b
  ------------------
  540|     25|                (void)SSL3_SendAlert(ss, alert_fatal, unsupported_extension);
  541|     25|                PORT_SetError(SSL_ERROR_RX_UNEXPECTED_EXTENSION);
  ------------------
  |  |   65|     25|#define PORT_SetError PORT_SetError_Util
  ------------------
  542|     25|                return SECFailure;
  543|     25|            }
  544|       |            /* If we offered ECH, we also check whether the extension is compatible with
  545|       |             * the Client Hello Inner. We don't yet know whether the server accepted ECH,
  546|       |             * so we only store this for now. If we later accept, we check this boolean
  547|       |             * and reject with an unsupported_extension alert if it is set. */
  548|  9.00k|            if (ss->ssl3.hs.echHpkeCtx && !ssl3_ExtensionAdvertisedClientHelloInner(ss, extension->type)) {
  ------------------
  |  Branch (548:17): [True: 0, False: 9.00k]
  |  Branch (548:43): [True: 0, False: 0]
  ------------------
  549|      0|                SSL_TRC(10, ("Server sent xtn type=%d which is invalid for the CHI", extension->type));
  ------------------
  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    ssl_Trace b
  ------------------
  550|      0|                ss->ssl3.hs.echInvalidExtension = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  551|      0|            }
  552|  9.00k|        }
  553|       |
  554|       |        /* Check that this is a legal extension in TLS 1.3 */
  555|  9.15k|        if (isTLS13 &&
  ------------------
  |  Branch (555:13): [True: 5.81k, False: 3.33k]
  ------------------
  556|  9.15k|            !ssl_FindCustomExtensionHooks(ss, extension->type)) {
  ------------------
  |  Branch (556:13): [True: 5.81k, False: 0]
  ------------------
  557|  5.81k|            switch (tls13_ExtensionStatus(extension->type, message)) {
  ------------------
  |  Branch (557:21): [True: 0, False: 5.81k]
  ------------------
  558|  5.81k|                case tls13_extension_allowed:
  ------------------
  |  Branch (558:17): [True: 5.81k, False: 6]
  ------------------
  559|  5.81k|                    break;
  560|      1|                case tls13_extension_unknown:
  ------------------
  |  Branch (560:17): [True: 1, False: 5.81k]
  ------------------
  561|      1|                    if (allowNotOffered) {
  ------------------
  |  Branch (561:25): [True: 0, False: 1]
  ------------------
  562|      0|                        continue; /* Skip over unknown extensions. */
  563|      0|                    }
  564|       |                    /* RFC8446 Section 4.2 - Implementations MUST NOT send extension responses if
  565|       |                     * the remote endpoint did not send the corresponding extension request ...
  566|       |                     * Upon receiving such an extension, an endpoint MUST abort the handshake with
  567|       |                     * an "unsupported_extension" alert. */
  568|      1|                    SSL_TRC(3, ("%d: TLS13: unknown extension %d in message %d",
  ------------------
  |  |   71|      1|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 1]
  |  |  ------------------
  |  |   72|      1|    ssl_Trace b
  ------------------
  569|      1|                                SSL_GETPID(), extension, message));
  570|      1|                    tls13_FatalError(ss, SSL_ERROR_RX_UNEXPECTED_EXTENSION,
  571|      1|                                     unsupported_extension);
  572|      1|                    return SECFailure;
  573|      5|                case tls13_extension_disallowed:
  ------------------
  |  Branch (573:17): [True: 5, False: 5.81k]
  ------------------
  574|       |                    /* RFC8446 Section 4.2 - If an implementation receives an extension which it
  575|       |                     * recognizes and which is not specified for the message in which it appears,
  576|       |                     * it MUST abort the handshake with an "illegal_parameter" alert. */
  577|      5|                    SSL_TRC(3, ("%d: TLS13: disallowed extension %d in message %d",
  ------------------
  |  |   71|      5|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 5]
  |  |  ------------------
  |  |   72|      5|    ssl_Trace b
  ------------------
  578|      5|                                SSL_GETPID(), extension, message));
  579|      5|                    tls13_FatalError(ss, SSL_ERROR_EXTENSION_DISALLOWED_FOR_VERSION,
  580|      5|                                     illegal_parameter);
  581|      5|                    return SECFailure;
  582|  5.81k|            }
  583|  5.81k|        }
  584|       |
  585|       |        /* Special check for this being the last extension if it's
  586|       |         * PreSharedKey */
  587|  9.14k|        if (ss->sec.isServer && isTLS13 &&
  ------------------
  |  Branch (587:13): [True: 0, False: 9.14k]
  |  Branch (587:33): [True: 0, False: 0]
  ------------------
  588|  9.14k|            (extension->type == ssl_tls13_pre_shared_key_xtn) &&
  ------------------
  |  Branch (588:13): [True: 0, False: 0]
  ------------------
  589|  9.14k|            (PR_NEXT_LINK(cursor) != &ss->ssl3.hs.remoteExtensions)) {
  ------------------
  |  |   47|      0|        ((_e)->next)
  ------------------
  |  Branch (589:13): [True: 0, False: 0]
  ------------------
  590|      0|            tls13_FatalError(ss,
  591|      0|                             SSL_ERROR_RX_MALFORMED_CLIENT_HELLO,
  592|      0|                             illegal_parameter);
  593|      0|            return SECFailure;
  594|      0|        }
  595|       |
  596|  9.14k|        rv = ssl_CallExtensionHandler(ss, message, extension, handlers);
  597|  9.14k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (597:13): [True: 115, False: 9.02k]
  ------------------
  598|    115|            return SECFailure;
  599|    115|        }
  600|  9.14k|    }
  601|  8.25k|    return SECSuccess;
  602|  8.40k|}
ssl_ConstructExtensions:
  760|  11.0k|{
  761|  11.0k|    const sslExtensionBuilder *sender;
  762|  11.0k|    SECStatus rv;
  763|       |
  764|  11.0k|    PORT_Assert(buf->len == 0);
  ------------------
  |  |  120|  11.0k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  11.0k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 11.0k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  765|       |
  766|       |    /* Clear out any extensions previously advertised */
  767|  11.0k|    ss->xtnData.numAdvertised = 0;
  768|  11.0k|    ss->xtnData.echNumAdvertised = 0;
  769|       |
  770|  11.0k|    switch (message) {
  771|  11.0k|        case ssl_hs_client_hello:
  ------------------
  |  Branch (771:9): [True: 11.0k, False: 0]
  ------------------
  772|  11.0k|            if (ss->vrange.max > SSL_LIBRARY_VERSION_3_0) {
  ------------------
  |  |   17|  11.0k|#define SSL_LIBRARY_VERSION_3_0                 0x0300
  ------------------
  |  Branch (772:17): [True: 11.0k, False: 0]
  ------------------
  773|       |                /* Use TLS ClientHello Extension Permutation? */
  774|  11.0k|                if (ss->opt.enableChXtnPermutation) {
  ------------------
  |  Branch (774:21): [True: 5.69k, False: 5.31k]
  ------------------
  775|  5.69k|                    sender = ss->ssl3.hs.chExtensionPermutation;
  776|  5.69k|                } else {
  777|  5.31k|                    sender = clientHelloSendersTLS;
  778|  5.31k|                }
  779|  11.0k|            } else {
  780|      0|                sender = clientHelloSendersSSL3;
  781|      0|            }
  782|  11.0k|            break;
  783|       |
  784|      0|        case ssl_hs_server_hello:
  ------------------
  |  Branch (784:9): [True: 0, False: 11.0k]
  ------------------
  785|      0|            sender = ss->xtnData.serverHelloSenders;
  786|      0|            break;
  787|       |
  788|      0|        case ssl_hs_certificate_request:
  ------------------
  |  Branch (788:9): [True: 0, False: 11.0k]
  ------------------
  789|      0|            PORT_Assert(ss->version >= SSL_LIBRARY_VERSION_TLS_1_3);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  790|      0|            sender = tls13_cert_req_senders;
  791|      0|            break;
  792|       |
  793|      0|        case ssl_hs_certificate:
  ------------------
  |  Branch (793:9): [True: 0, False: 11.0k]
  ------------------
  794|      0|            PORT_Assert(ss->version >= SSL_LIBRARY_VERSION_TLS_1_3);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  795|      0|            sender = ss->xtnData.certificateSenders;
  796|      0|            break;
  797|       |
  798|      0|        case ssl_hs_encrypted_extensions:
  ------------------
  |  Branch (798:9): [True: 0, False: 11.0k]
  ------------------
  799|      0|            PORT_Assert(ss->version >= SSL_LIBRARY_VERSION_TLS_1_3);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  800|      0|            sender = ss->xtnData.encryptedExtensionsSenders;
  801|      0|            break;
  802|       |
  803|      0|        case ssl_hs_hello_retry_request:
  ------------------
  |  Branch (803:9): [True: 0, False: 11.0k]
  ------------------
  804|      0|            PORT_Assert(ss->version >= SSL_LIBRARY_VERSION_TLS_1_3);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  805|      0|            sender = tls13_hrr_senders;
  806|      0|            break;
  807|       |
  808|      0|        default:
  ------------------
  |  Branch (808:9): [True: 0, False: 11.0k]
  ------------------
  809|      0|            PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  810|      0|            PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  811|      0|            return SECFailure;
  812|  11.0k|    }
  813|       |
  814|   264k|    for (; sender->ex_sender != NULL; ++sender) {
  ------------------
  |  Branch (814:12): [True: 253k, False: 11.0k]
  ------------------
  815|   253k|        PRUint16 ex_type = sender->ex_type;
  816|   253k|        PRBool append = PR_FALSE;
  ------------------
  |  |  438|   253k|#define PR_FALSE 0
  ------------------
  817|   253k|        unsigned int start = buf->len;
  818|   253k|        unsigned int length;
  819|       |
  820|   253k|        if (ssl_FindCustomExtensionHooks(ss, sender->ex_type)) {
  ------------------
  |  Branch (820:13): [True: 0, False: 253k]
  ------------------
  821|      0|            continue;
  822|      0|        }
  823|       |
  824|       |        /* Save space for the extension type and length. Note that we don't grow
  825|       |         * the buffer now; rely on sslBuffer_Append* to do that. */
  826|   253k|        buf->len += 4;
  827|   253k|        rv = (*sender->ex_sender)(ss, &ss->xtnData, buf, &append);
  828|   253k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (828:13): [True: 0, False: 253k]
  ------------------
  829|      0|            goto loser;
  830|      0|        }
  831|       |
  832|       |        /* Save the length and go back to the start. */
  833|   253k|        length = buf->len - start - 4;
  834|   253k|        buf->len = start;
  835|   253k|        if (!append) {
  ------------------
  |  Branch (835:13): [True: 124k, False: 128k]
  ------------------
  836|   124k|            continue;
  837|   124k|        }
  838|       |
  839|       |        /* If TLS 1.3 GREASE is enabled, replace ssl_tls13_grease_xtn dummy
  840|       |         * GREASE extension types with randomly generated GREASE value. */
  841|   128k|        rv = tls13_MaybeGreaseExtensionType(ss, message, &ex_type);
  842|   128k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (842:13): [True: 0, False: 128k]
  ------------------
  843|      0|            goto loser; /* Code already set. */
  844|      0|        }
  845|       |
  846|   128k|        rv = sslBuffer_AppendNumber(buf, ex_type, 2);
  847|   128k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (847:13): [True: 0, False: 128k]
  ------------------
  848|      0|            goto loser; /* Code already set. */
  849|      0|        }
  850|   128k|        rv = sslBuffer_AppendNumber(buf, length, 2);
  851|   128k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (851:13): [True: 0, False: 128k]
  ------------------
  852|      0|            goto loser; /* Code already set. */
  853|      0|        }
  854|       |        /* Skip over the extension body. */
  855|   128k|        buf->len += length;
  856|       |
  857|   128k|        if (message == ssl_hs_client_hello ||
  ------------------
  |  Branch (857:13): [True: 128k, False: 0]
  ------------------
  858|   128k|            message == ssl_hs_certificate_request) {
  ------------------
  |  Branch (858:13): [True: 0, False: 0]
  ------------------
  859|   128k|            ss->xtnData.advertised[ss->xtnData.numAdvertised++] =
  860|   128k|                ex_type;
  861|   128k|        }
  862|   128k|    }
  863|       |
  864|  11.0k|    if (!PR_CLIST_IS_EMPTY(&ss->extensionHooks)) {
  ------------------
  |  |   94|  11.0k|    ((_l)->next == (_l))
  ------------------
  |  Branch (864:9): [True: 0, False: 11.0k]
  ------------------
  865|      0|        if (message == ssl_hs_client_hello && ss->opt.callExtensionWriterOnEchInner) {
  ------------------
  |  Branch (865:13): [True: 0, False: 0]
  |  Branch (865:47): [True: 0, False: 0]
  ------------------
  866|      0|            message = ssl_hs_ech_outer_client_hello;
  867|      0|        }
  868|      0|        rv = ssl_CallCustomExtensionSenders(ss, buf, message);
  869|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (869:13): [True: 0, False: 0]
  ------------------
  870|      0|            goto loser;
  871|      0|        }
  872|      0|    }
  873|       |
  874|  11.0k|    if (buf->len > 0xffff) {
  ------------------
  |  Branch (874:9): [True: 0, False: 11.0k]
  ------------------
  875|      0|        PORT_SetError(SSL_ERROR_TX_RECORD_TOO_LONG);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  876|      0|        goto loser;
  877|      0|    }
  878|       |
  879|  11.0k|    return SECSuccess;
  880|       |
  881|      0|loser:
  882|      0|    sslBuffer_Clear(buf);
  883|      0|    return SECFailure;
  884|  11.0k|}
ssl_InsertPaddingExtension:
  993|  11.0k|{
  994|  11.0k|    static unsigned char padding[252] = { 0 };
  995|  11.0k|    unsigned int paddingLen;
  996|       |    /* Exit early if an application-provided extension hook
  997|       |     * already added padding. */
  998|  11.0k|    if (ssl3_ExtensionAdvertised(ss, ssl_padding_xtn)) {
  ------------------
  |  Branch (998:9): [True: 0, False: 11.0k]
  ------------------
  999|      0|        return SECSuccess;
 1000|      0|    }
 1001|       |
 1002|       |    /* Account for the size of the header, the length field of the extensions
 1003|       |     * block and the size of the existing extensions. */
 1004|  11.0k|    paddingLen = ssl_CalculatePaddingExtLen(ss, prefixLen + 2 + buf->len);
 1005|  11.0k|    if (!paddingLen) {
  ------------------
  |  Branch (1005:9): [True: 11.0k, False: 0]
  ------------------
 1006|  11.0k|        return SECSuccess;
 1007|  11.0k|    }
 1008|       |
 1009|      0|    return ssl3_EmplaceExtension(ss, buf, ssl_padding_xtn, padding, paddingLen, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 1010|  11.0k|}
ssl3_DestroyRemoteExtensions:
 1025|  50.3k|{
 1026|  50.3k|    PRCList *cur_p;
 1027|       |
 1028|  59.8k|    while (!PR_CLIST_IS_EMPTY(list)) {
  ------------------
  |  |   94|  59.8k|    ((_l)->next == (_l))
  ------------------
  |  Branch (1028:12): [True: 9.44k, False: 50.3k]
  ------------------
 1029|  9.44k|        cur_p = PR_LIST_TAIL(list);
  ------------------
  |  |   66|  9.44k|#define PR_LIST_TAIL(_l) (_l)->prev
  ------------------
 1030|  9.44k|        PR_REMOVE_LINK(cur_p);
  ------------------
  |  |   72|  9.44k|    PR_BEGIN_MACRO             \
  |  |  ------------------
  |  |  |  |  123|  9.44k|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |   73|  9.44k|    (_e)->prev->next = (_e)->next; \
  |  |   74|  9.44k|    (_e)->next->prev = (_e)->prev; \
  |  |   75|  9.44k|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|  9.44k|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1031|  9.44k|        PORT_Free(cur_p);
  ------------------
  |  |   60|  9.44k|#define PORT_Free PORT_Free_Util
  ------------------
 1032|  9.44k|    }
 1033|  50.3k|}
ssl3_InitExtensionData:
 1038|  39.0k|{
 1039|  39.0k|    unsigned int advertisedMax;
 1040|  39.0k|    PRCList *cursor;
 1041|       |
 1042|       |    /* Set things up to the right starting state. */
 1043|  39.0k|    PORT_Memset(xtnData, 0, sizeof(*xtnData));
  ------------------
  |  |  182|  39.0k|#define PORT_Memset memset
  ------------------
 1044|  39.0k|    xtnData->peerSupportsFfdheGroups = PR_FALSE;
  ------------------
  |  |  438|  39.0k|#define PR_FALSE 0
  ------------------
 1045|  39.0k|    PR_INIT_CLIST(&xtnData->remoteKeyShares);
  ------------------
  |  |  100|  39.0k|    PR_BEGIN_MACRO     \
  |  |  ------------------
  |  |  |  |  123|  39.0k|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |  101|  39.0k|    (_l)->next = (_l); \
  |  |  102|  39.0k|    (_l)->prev = (_l); \
  |  |  103|  39.0k|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|  39.0k|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1046|       |
 1047|       |    /* Allocate enough to allow for native extensions, plus any custom ones. */
 1048|  39.0k|    if (ss->sec.isServer) {
  ------------------
  |  Branch (1048:9): [True: 0, False: 39.0k]
  ------------------
 1049|      0|        advertisedMax = PR_MAX(PR_ARRAY_SIZE(certificateRequestHandlers),
  ------------------
  |  |  159|      0|#define PR_MAX(x,y)     ((x)>(y)?(x):(y))
  |  |  ------------------
  |  |  |  Branch (159:26): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1050|      0|                               PR_ARRAY_SIZE(tls13_cert_req_senders));
 1051|  39.0k|    } else {
 1052|  39.0k|        advertisedMax = PR_MAX(PR_ARRAY_SIZE(clientHelloHandlers),
  ------------------
  |  |  159|  39.0k|#define PR_MAX(x,y)     ((x)>(y)?(x):(y))
  |  |  ------------------
  |  |  |  Branch (159:26): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1053|  39.0k|                               PR_ARRAY_SIZE(clientHelloSendersTLS));
 1054|  39.0k|        ++advertisedMax; /* For the RI SCSV, which we also track. */
 1055|  39.0k|    }
 1056|  39.0k|    for (cursor = PR_NEXT_LINK(&ss->extensionHooks);
  ------------------
  |  |   47|  39.0k|        ((_e)->next)
  ------------------
 1057|  39.0k|         cursor != &ss->extensionHooks;
  ------------------
  |  Branch (1057:10): [True: 0, False: 39.0k]
  ------------------
 1058|  39.0k|         cursor = PR_NEXT_LINK(cursor)) {
  ------------------
  |  |   47|      0|        ((_e)->next)
  ------------------
 1059|      0|        ++advertisedMax;
 1060|      0|    }
 1061|  39.0k|    xtnData->advertised = PORT_ZNewArray(PRUint16, advertisedMax);
  ------------------
  |  |  159|  39.0k|    (type *)PORT_ZAlloc(sizeof(type) * (num))
  |  |  ------------------
  |  |  |  |   72|  39.0k|#define PORT_ZAlloc PORT_ZAlloc_Util
  |  |  ------------------
  ------------------
 1062|  39.0k|    xtnData->echAdvertised = PORT_ZNewArray(PRUint16, advertisedMax);
  ------------------
  |  |  159|  39.0k|    (type *)PORT_ZAlloc(sizeof(type) * (num))
  |  |  ------------------
  |  |  |  |   72|  39.0k|#define PORT_ZAlloc PORT_ZAlloc_Util
  |  |  ------------------
  ------------------
 1063|       |
 1064|  39.0k|    xtnData->peerDelegCred = NULL;
 1065|  39.0k|    xtnData->peerRequestedDelegCred = PR_FALSE;
  ------------------
  |  |  438|  39.0k|#define PR_FALSE 0
  ------------------
 1066|  39.0k|    xtnData->sendingDelegCredToPeer = PR_FALSE;
  ------------------
  |  |  438|  39.0k|#define PR_FALSE 0
  ------------------
 1067|  39.0k|    xtnData->selectedPsk = NULL;
 1068|  39.0k|}
ssl3_DestroyExtensionData:
 1072|  39.0k|{
 1073|  39.0k|    ssl3_FreeSniNameArray(xtnData);
 1074|  39.0k|    PORT_Free(xtnData->sigSchemes);
  ------------------
  |  |   60|  39.0k|#define PORT_Free PORT_Free_Util
  ------------------
 1075|  39.0k|    PORT_Free(xtnData->delegCredSigSchemes);
  ------------------
  |  |   60|  39.0k|#define PORT_Free PORT_Free_Util
  ------------------
 1076|  39.0k|    PORT_Free(xtnData->delegCredSigSchemesAdvertised);
  ------------------
  |  |   60|  39.0k|#define PORT_Free PORT_Free_Util
  ------------------
 1077|  39.0k|    SECITEM_FreeItem(&xtnData->nextProto, PR_FALSE);
  ------------------
  |  |  108|  39.0k|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                  SECITEM_FreeItem(&xtnData->nextProto, PR_FALSE);
  ------------------
  |  |  438|  39.0k|#define PR_FALSE 0
  ------------------
 1078|  39.0k|    tls13_DestroyKeyShares(&xtnData->remoteKeyShares);
 1079|  39.0k|    SECITEM_FreeItem(&xtnData->certReqContext, PR_FALSE);
  ------------------
  |  |  108|  39.0k|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                  SECITEM_FreeItem(&xtnData->certReqContext, PR_FALSE);
  ------------------
  |  |  438|  39.0k|#define PR_FALSE 0
  ------------------
 1080|  39.0k|    SECITEM_FreeItem(&xtnData->applicationToken, PR_FALSE);
  ------------------
  |  |  108|  39.0k|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                  SECITEM_FreeItem(&xtnData->applicationToken, PR_FALSE);
  ------------------
  |  |  438|  39.0k|#define PR_FALSE 0
  ------------------
 1081|  39.0k|    if (xtnData->certReqAuthorities.arena) {
  ------------------
  |  Branch (1081:9): [True: 0, False: 39.0k]
  ------------------
 1082|      0|        PORT_FreeArena(xtnData->certReqAuthorities.arena, PR_FALSE);
  ------------------
  |  |   61|      0|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                      PORT_FreeArena(xtnData->certReqAuthorities.arena, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 1083|      0|        xtnData->certReqAuthorities.arena = NULL;
 1084|      0|    }
 1085|  39.0k|    PORT_Free(xtnData->advertised);
  ------------------
  |  |   60|  39.0k|#define PORT_Free PORT_Free_Util
  ------------------
 1086|  39.0k|    PORT_Free(xtnData->echAdvertised);
  ------------------
  |  |   60|  39.0k|#define PORT_Free PORT_Free_Util
  ------------------
 1087|  39.0k|    tls13_DestroyDelegatedCredential(xtnData->peerDelegCred);
 1088|       |
 1089|  39.0k|    tls13_DestroyEchXtnState(xtnData->ech);
 1090|  39.0k|    xtnData->ech = NULL;
 1091|  39.0k|}
ssl3_ResetExtensionData:
 1097|  29.7k|{
 1098|  29.7k|    ssl3_DestroyExtensionData(xtnData);
 1099|  29.7k|    ssl3_InitExtensionData(xtnData, ss);
 1100|  29.7k|}
ssl3_ExtSendAlert:
 1106|     82|{
 1107|     82|    (void)SSL3_SendAlert((sslSocket *)ss, level, desc);
 1108|     82|}
ssl3_ExtDecodeError:
 1112|     12|{
 1113|     12|    (void)ssl3_DecodeError((sslSocket *)ss);
 1114|     12|}
ssl3_ExtConsumeHandshakeNumber:
 1126|  14.6k|{
 1127|  14.6k|    return ssl3_ConsumeHandshakeNumber((sslSocket *)ss, num, bytes, b, length);
 1128|  14.6k|}
ssl3_ExtConsumeHandshakeVariable:
 1134|    270|{
 1135|    270|    return ssl3_ConsumeHandshakeVariable((sslSocket *)ss, i, bytes, b, length);
 1136|    270|}
tls_ClientHelloExtensionPermutationSetup:
 1140|  4.85k|{
 1141|  4.85k|    size_t buildersLen = PR_ARRAY_SIZE(clientHelloSendersTLS);
  ------------------
  |  |  167|  4.85k|#define PR_ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
  ------------------
 1142|  4.85k|    const size_t buildersSize = (sizeof(sslExtensionBuilder) * buildersLen);
 1143|       |    /* Psk Extension and then NULL entry MUST be last. */
 1144|  4.85k|    const size_t permutationLen = buildersLen - 2;
 1145|       |
 1146|       |    /* There shouldn't already be a stored permutation. */
 1147|  4.85k|    PR_ASSERT(!ss->ssl3.hs.chExtensionPermutation);
  ------------------
  |  |  208|  4.85k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 4.85k, False: 0]
  |  |  ------------------
  ------------------
 1148|       |
 1149|       |    /* This shuffle handles up to 256 extensions. */
 1150|  4.85k|    PR_ASSERT(buildersLen < 256);
  ------------------
  |  |  208|  4.85k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 4.85k, False: 0]
  |  |  ------------------
  ------------------
 1151|  4.85k|    uint8_t permutation[256] = { 0 };
 1152|       |
 1153|  4.85k|    sslExtensionBuilder *builders = PORT_ZAlloc(buildersSize);
  ------------------
  |  |   72|  4.85k|#define PORT_ZAlloc PORT_ZAlloc_Util
  ------------------
 1154|  4.85k|    if (!builders) {
  ------------------
  |  Branch (1154:9): [True: 0, False: 4.85k]
  ------------------
 1155|      0|        return SECFailure;
 1156|      0|    }
 1157|       |
 1158|       |    /* Get a working copy of default builders. */
 1159|  4.85k|    PORT_Memcpy(builders, clientHelloSendersTLS, buildersSize);
  ------------------
  |  |  180|  4.85k|#define PORT_Memcpy memcpy
  ------------------
 1160|       |
 1161|       |    /* Get permutation randoms. */
 1162|  4.85k|    if (PK11_GenerateRandom(permutation, permutationLen) != SECSuccess) {
  ------------------
  |  Branch (1162:9): [True: 0, False: 4.85k]
  ------------------
 1163|      0|        PORT_Free(builders);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 1164|      0|        return SECFailure;
 1165|      0|    }
 1166|       |
 1167|       |    /* Fisher-Yates Shuffle */
 1168|   106k|    for (size_t i = permutationLen - 1; i > 0; i--) {
  ------------------
  |  Branch (1168:41): [True: 102k, False: 4.85k]
  ------------------
 1169|   102k|        size_t idx = permutation[i - 1] % (i + 1);
 1170|   102k|        sslExtensionBuilder tmp = builders[i];
 1171|   102k|        builders[i] = builders[idx];
 1172|   102k|        builders[idx] = tmp;
 1173|   102k|    }
 1174|       |
 1175|       |    /* Make sure that Psk extension is penultimate (before NULL entry). */
 1176|  4.85k|    PR_ASSERT(builders[buildersLen - 2].ex_type == ssl_tls13_pre_shared_key_xtn);
  ------------------
  |  |  208|  4.85k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 4.85k, False: 0]
  |  |  ------------------
  ------------------
 1177|  4.85k|    PR_ASSERT(builders[buildersLen - 2].ex_sender == clientHelloSendersTLS[buildersLen - 2].ex_sender);
  ------------------
  |  |  208|  4.85k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 4.85k, False: 0]
  |  |  ------------------
  ------------------
 1178|       |
 1179|  4.85k|    ss->ssl3.hs.chExtensionPermutation = builders;
 1180|  4.85k|    return SECSuccess;
 1181|  4.85k|}
tls_ClientHelloExtensionPermutationDestroy:
 1185|  18.7k|{
 1186|  18.7k|    if (ss->ssl3.hs.chExtensionPermutation) {
  ------------------
  |  Branch (1186:9): [True: 4.85k, False: 13.8k]
  ------------------
 1187|  4.85k|        PORT_Free(ss->ssl3.hs.chExtensionPermutation);
  ------------------
  |  |   60|  4.85k|#define PORT_Free PORT_Free_Util
  ------------------
 1188|  4.85k|        ss->ssl3.hs.chExtensionPermutation = NULL;
 1189|  4.85k|    }
 1190|  18.7k|}
ssl3ext.c:arrayContainsExtension:
  311|  73.9k|{
  312|  73.9k|    unsigned int i;
  313|   515k|    for (i = 0; i < len; i++) {
  ------------------
  |  Branch (313:17): [True: 461k, False: 54.3k]
  ------------------
  314|   461k|        if (ex_type == array[i])
  ------------------
  |  Branch (314:13): [True: 19.6k, False: 441k]
  ------------------
  315|  19.6k|            return PR_TRUE;
  ------------------
  |  |  437|  19.6k|#define PR_TRUE 1
  ------------------
  316|   461k|    }
  317|  54.3k|    return PR_FALSE;
  ------------------
  |  |  438|  54.3k|#define PR_FALSE 0
  ------------------
  318|  73.9k|}
ssl3ext.c:ssl_CallExtensionHandler:
  428|  9.14k|{
  429|  9.14k|    SECStatus rv = SECSuccess;
  430|  9.14k|    SSLAlertDescription alert = handshake_failure;
  431|  9.14k|    sslCustomExtensionHooks *customHooks;
  432|       |
  433|  9.14k|    customHooks = ssl_FindCustomExtensionHooks(ss, extension->type);
  434|  9.14k|    if (customHooks) {
  ------------------
  |  Branch (434:9): [True: 0, False: 9.14k]
  ------------------
  435|      0|        if (customHooks->handler) {
  ------------------
  |  Branch (435:13): [True: 0, False: 0]
  ------------------
  436|      0|            rv = customHooks->handler(ss->fd, handshakeMessage,
  437|      0|                                      extension->data.data,
  438|      0|                                      extension->data.len,
  439|      0|                                      &alert, customHooks->handlerArg);
  440|      0|        }
  441|  9.14k|    } else {
  442|       |        /* Find extension_type in table of Hello Extension Handlers. */
  443|  57.7k|        for (; handler->ex_handler != NULL; ++handler) {
  ------------------
  |  Branch (443:16): [True: 54.5k, False: 3.21k]
  ------------------
  444|  54.5k|            if (handler->ex_type == extension->type) {
  ------------------
  |  Branch (444:17): [True: 5.93k, False: 48.5k]
  ------------------
  445|  5.93k|                SECItem tmp = extension->data;
  446|       |
  447|  5.93k|                rv = (*handler->ex_handler)(ss, &ss->xtnData, &tmp);
  448|  5.93k|                break;
  449|  5.93k|            }
  450|  54.5k|        }
  451|  9.14k|    }
  452|       |
  453|  9.14k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (453:9): [True: 115, False: 9.02k]
  ------------------
  454|    115|        if (!ss->ssl3.fatalAlertSent) {
  ------------------
  |  Branch (454:13): [True: 18, False: 97]
  ------------------
  455|       |            /* Send an alert if the handler didn't already. */
  456|     18|            (void)SSL3_SendAlert(ss, alert_fatal, alert);
  457|     18|        }
  458|    115|        return SECFailure;
  459|    115|    }
  460|       |
  461|  9.02k|    return SECSuccess;
  462|  9.14k|}
ssl3ext.c:ssl_CalculatePaddingExtLen:
  901|  11.0k|{
  902|  11.0k|    unsigned int extensionLen;
  903|       |
  904|       |    /* Don't pad for DTLS, for SSLv3, or for renegotiation. */
  905|  11.0k|    if (IS_DTLS(ss) ||
  ------------------
  |  |  892|  22.0k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 11.0k, False: 0]
  |  |  ------------------
  ------------------
  906|  11.0k|        ss->vrange.max < SSL_LIBRARY_VERSION_TLS_1_0 ||
  ------------------
  |  |   18|  11.0k|#define SSL_LIBRARY_VERSION_TLS_1_0             0x0301
  ------------------
  |  Branch (906:9): [True: 0, False: 0]
  ------------------
  907|  11.0k|        ss->firstHsDone) {
  ------------------
  |  Branch (907:9): [True: 0, False: 0]
  ------------------
  908|  11.0k|        return 0;
  909|  11.0k|    }
  910|       |
  911|       |    /* A padding extension may be included to ensure that the record containing
  912|       |     * the ClientHello doesn't have a length between 256 and 511 bytes
  913|       |     * (inclusive). Initial ClientHello records with such lengths trigger bugs
  914|       |     * in F5 devices. */
  915|      0|    if (clientHelloLength < 256 || clientHelloLength >= 512) {
  ------------------
  |  Branch (915:9): [True: 0, False: 0]
  |  Branch (915:36): [True: 0, False: 0]
  ------------------
  916|      0|        return 0;
  917|      0|    }
  918|       |
  919|      0|    extensionLen = 512 - clientHelloLength;
  920|       |    /* Extensions take at least four bytes to encode. Always include at least
  921|       |     * one byte of data if we are padding. Some servers will time out or
  922|       |     * terminate the connection if the last ClientHello extension is empty. */
  923|      0|    if (extensionLen < 5) {
  ------------------
  |  Branch (923:9): [True: 0, False: 0]
  ------------------
  924|      0|        extensionLen = 5;
  925|      0|    }
  926|       |
  927|      0|    return extensionLen - 4;
  928|      0|}

ssl_ShouldSendSNIExtension:
   23|  11.0k|{
   24|  11.0k|    PRNetAddr netAddr;
   25|       |
   26|       |    /* must have a hostname */
   27|  11.0k|    if (!url || !url[0]) {
  ------------------
  |  Branch (27:9): [True: 0, False: 11.0k]
  |  Branch (27:17): [True: 0, False: 11.0k]
  ------------------
   28|      0|        return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
   29|      0|    }
   30|       |    /* must not be an IPv4 or IPv6 address */
   31|  11.0k|    if (PR_SUCCESS == PR_StringToNetAddr(url, &netAddr)) {
  ------------------
  |  Branch (31:9): [True: 0, False: 11.0k]
  ------------------
   32|       |        /* is an IP address (v4 or v6) */
   33|      0|        return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
   34|      0|    }
   35|       |
   36|  11.0k|    return PR_TRUE;
  ------------------
  |  |  437|  11.0k|#define PR_TRUE 1
  ------------------
   37|  11.0k|}
ssl3_ClientFormatServerNameXtn:
   47|  11.0k|{
   48|  11.0k|    SECStatus rv;
   49|       |
   50|       |    /* length of server_name_list */
   51|  11.0k|    rv = sslBuffer_AppendNumber(buf, len + 3, 2);
   52|  11.0k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (52:9): [True: 0, False: 11.0k]
  ------------------
   53|      0|        return SECFailure;
   54|      0|    }
   55|       |    /* Name Type (sni_host_name) */
   56|  11.0k|    rv = sslBuffer_AppendNumber(buf, 0, 1);
   57|  11.0k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (57:9): [True: 0, False: 11.0k]
  ------------------
   58|      0|        return SECFailure;
   59|      0|    }
   60|       |    /* HostName (length and value) */
   61|  11.0k|    rv = sslBuffer_AppendVariable(buf, (const PRUint8 *)url, len, 2);
   62|  11.0k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (62:9): [True: 0, False: 11.0k]
  ------------------
   63|      0|        return SECFailure;
   64|      0|    }
   65|       |
   66|  11.0k|    return SECSuccess;
   67|  11.0k|}
ssl3_ClientSendServerNameXtn:
   72|  11.0k|{
   73|  11.0k|    SECStatus rv;
   74|       |
   75|  11.0k|    const char *url = ss->url;
   76|       |
   77|  11.0k|    if (!ssl_ShouldSendSNIExtension(ss, url)) {
  ------------------
  |  Branch (77:9): [True: 0, False: 11.0k]
  ------------------
   78|      0|        return SECSuccess;
   79|      0|    }
   80|       |
   81|       |    /* If ECH, write the public name. The real server name
   82|       |     * is emplaced while constructing CHInner extensions. */
   83|  11.0k|    sslEchConfig *cfg = (sslEchConfig *)PR_LIST_HEAD(&ss->echConfigs);
  ------------------
  |  |   65|  11.0k|#define PR_LIST_HEAD(_l) (_l)->next
  ------------------
   84|  11.0k|    const char *sniContents = PR_CLIST_IS_EMPTY(&ss->echConfigs) ? url : cfg->contents.publicName;
  ------------------
  |  |   94|  11.0k|    ((_l)->next == (_l))
  |  |  ------------------
  |  |  |  Branch (94:5): [True: 11.0k, False: 0]
  |  |  ------------------
  ------------------
   85|  11.0k|    rv = ssl3_ClientFormatServerNameXtn(ss, sniContents, strlen(sniContents), xtnData, buf);
   86|  11.0k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (86:9): [True: 0, False: 11.0k]
  ------------------
   87|      0|        return SECFailure;
   88|      0|    }
   89|       |
   90|  11.0k|    *added = PR_TRUE;
  ------------------
  |  |  437|  11.0k|#define PR_TRUE 1
  ------------------
   91|  11.0k|    return SECSuccess;
   92|  11.0k|}
ssl3_HandleServerNameXtn:
   97|  1.02k|{
   98|  1.02k|    SECItem *names = NULL;
   99|  1.02k|    PRUint32 listLenBytes = 0;
  100|  1.02k|    SECStatus rv;
  101|       |
  102|  1.02k|    if (!ss->sec.isServer) {
  ------------------
  |  Branch (102:9): [True: 1.02k, False: 0]
  ------------------
  103|  1.02k|        return SECSuccess; /* ignore extension */
  104|  1.02k|    }
  105|       |
  106|       |    /* Server side - consume client data and register server sender. */
  107|       |    /* do not parse the data if don't have user extension handling function. */
  108|      0|    if (!ss->sniSocketConfig) {
  ------------------
  |  Branch (108:9): [True: 0, False: 0]
  ------------------
  109|      0|        return SECSuccess;
  110|      0|    }
  111|       |
  112|       |    /* length of server_name_list */
  113|      0|    rv = ssl3_ExtConsumeHandshakeNumber(ss, &listLenBytes, 2, &data->data, &data->len);
  114|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (114:9): [True: 0, False: 0]
  ------------------
  115|      0|        goto loser; /* alert already sent */
  116|      0|    }
  117|      0|    if (listLenBytes == 0 || listLenBytes != data->len) {
  ------------------
  |  Branch (117:9): [True: 0, False: 0]
  |  Branch (117:30): [True: 0, False: 0]
  ------------------
  118|      0|        goto alert_loser;
  119|      0|    }
  120|       |
  121|       |    /* Read ServerNameList. */
  122|      0|    while (data->len > 0) {
  ------------------
  |  Branch (122:12): [True: 0, False: 0]
  ------------------
  123|      0|        SECItem tmp;
  124|      0|        PRUint32 type;
  125|       |
  126|       |        /* Read Name Type. */
  127|      0|        rv = ssl3_ExtConsumeHandshakeNumber(ss, &type, 1, &data->data, &data->len);
  128|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (128:13): [True: 0, False: 0]
  ------------------
  129|       |            /* alert sent in ConsumeHandshakeNumber */
  130|      0|            goto loser;
  131|      0|        }
  132|       |
  133|       |        /* Read ServerName (length and value). */
  134|      0|        rv = ssl3_ExtConsumeHandshakeVariable(ss, &tmp, 2, &data->data, &data->len);
  135|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (135:13): [True: 0, False: 0]
  ------------------
  136|      0|            goto loser;
  137|      0|        }
  138|       |
  139|       |        /* Record the value for host_name(0). */
  140|      0|        if (type == sni_nametype_hostname) {
  ------------------
  |  Branch (140:13): [True: 0, False: 0]
  ------------------
  141|       |            /* Fail if we encounter a second host_name entry. */
  142|      0|            if (names) {
  ------------------
  |  Branch (142:17): [True: 0, False: 0]
  ------------------
  143|      0|                goto alert_loser;
  144|      0|            }
  145|       |
  146|       |            /* Create an array for the only supported NameType. */
  147|      0|            names = PORT_ZNewArray(SECItem, 1);
  ------------------
  |  |  159|      0|    (type *)PORT_ZAlloc(sizeof(type) * (num))
  |  |  ------------------
  |  |  |  |   72|      0|#define PORT_ZAlloc PORT_ZAlloc_Util
  |  |  ------------------
  ------------------
  148|      0|            if (!names) {
  ------------------
  |  Branch (148:17): [True: 0, False: 0]
  ------------------
  149|      0|                goto loser;
  150|      0|            }
  151|       |
  152|       |            /* Copy ServerName into the array. */
  153|      0|            if (SECITEM_CopyItem(NULL, &names[0], &tmp) != SECSuccess) {
  ------------------
  |  |  106|      0|#define SECITEM_CopyItem SECITEM_CopyItem_Util
  ------------------
  |  Branch (153:17): [True: 0, False: 0]
  ------------------
  154|      0|                goto loser;
  155|      0|            }
  156|      0|        }
  157|       |
  158|       |        /* Even if we don't support NameTypes other than host_name at the
  159|       |         * moment, we continue parsing the whole list to check its validity.
  160|       |         * We do not check for duplicate entries with NameType != host_name(0).
  161|       |         */
  162|      0|    }
  163|      0|    if (names) {
  ------------------
  |  Branch (163:9): [True: 0, False: 0]
  ------------------
  164|       |        /* Free old and set the new data. */
  165|      0|        ssl3_FreeSniNameArray(xtnData);
  166|      0|        xtnData->sniNameArr = names;
  167|      0|        xtnData->sniNameArrSize = 1;
  168|      0|        xtnData->negotiated[xtnData->numNegotiated++] = ssl_server_name_xtn;
  169|      0|    }
  170|      0|    return SECSuccess;
  171|       |
  172|      0|alert_loser:
  173|      0|    ssl3_ExtDecodeError(ss);
  174|      0|loser:
  175|      0|    if (names) {
  ------------------
  |  Branch (175:9): [True: 0, False: 0]
  ------------------
  176|      0|        PORT_Free(names);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
  177|      0|    }
  178|      0|    return SECFailure;
  179|      0|}
ssl3_FreeSniNameArray:
  184|  48.4k|{
  185|  48.4k|    PRUint32 i;
  186|       |
  187|  48.4k|    if (!xtnData->sniNameArr) {
  ------------------
  |  Branch (187:9): [True: 48.4k, False: 0]
  ------------------
  188|  48.4k|        return;
  189|  48.4k|    }
  190|       |
  191|      0|    for (i = 0; i < xtnData->sniNameArrSize; i++) {
  ------------------
  |  Branch (191:17): [True: 0, False: 0]
  ------------------
  192|      0|        SECITEM_FreeItem(&xtnData->sniNameArr[i], PR_FALSE);
  ------------------
  |  |  108|      0|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                      SECITEM_FreeItem(&xtnData->sniNameArr[i], PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  193|      0|    }
  194|       |
  195|      0|    PORT_Free(xtnData->sniNameArr);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
  196|      0|    xtnData->sniNameArr = NULL;
  197|      0|    xtnData->sniNameArrSize = 0;
  198|      0|}
ssl3_ClientSendSessionTicketXtn:
  207|  11.0k|{
  208|  11.0k|    NewSessionTicket *session_ticket = NULL;
  209|  11.0k|    sslSessionID *sid = ss->sec.ci.sid;
  210|  11.0k|    SECStatus rv;
  211|       |
  212|  11.0k|    PORT_Assert(!ss->sec.isServer);
  ------------------
  |  |  120|  11.0k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  11.0k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 11.0k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  213|       |
  214|       |    /* Never send an extension with a ticket for TLS 1.3, but
  215|       |     * OK to send the empty one in case the server does 1.2. */
  216|  11.0k|    if ((sid->cached == in_client_cache || sid->cached == in_external_cache) &&
  ------------------
  |  Branch (216:10): [True: 0, False: 11.0k]
  |  Branch (216:44): [True: 0, False: 11.0k]
  ------------------
  217|  11.0k|        sid->version >= SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|      0|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (217:9): [True: 0, False: 0]
  ------------------
  218|      0|        return SECSuccess;
  219|      0|    }
  220|       |
  221|       |    /* Ignore the SessionTicket extension if processing is disabled. */
  222|  11.0k|    if (!ss->opt.enableSessionTickets) {
  ------------------
  |  Branch (222:9): [True: 5.66k, False: 5.34k]
  ------------------
  223|  5.66k|        return SECSuccess;
  224|  5.66k|    }
  225|       |
  226|       |    /* Send a session ticket if one is available.
  227|       |     *
  228|       |     * The caller must be holding sid->u.ssl3.lock for reading. We cannot
  229|       |     * just acquire and release the lock within this function because the
  230|       |     * caller will call this function twice, and we need the inputs to be
  231|       |     * consistent between the two calls. Note that currently the caller
  232|       |     * will only be holding the lock when we are the client and when we're
  233|       |     * attempting to resume an existing session.
  234|       |     */
  235|  5.34k|    session_ticket = &sid->u.ssl3.locked.sessionTicket;
  236|  5.34k|    if (session_ticket->ticket.data &&
  ------------------
  |  Branch (236:9): [True: 0, False: 5.34k]
  ------------------
  237|  5.34k|        (xtnData->ticketTimestampVerified ||
  ------------------
  |  Branch (237:10): [True: 0, False: 0]
  ------------------
  238|      0|         ssl_TicketTimeValid(ss, session_ticket))) {
  ------------------
  |  Branch (238:10): [True: 0, False: 0]
  ------------------
  239|       |
  240|      0|        xtnData->ticketTimestampVerified = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  241|       |
  242|      0|        rv = sslBuffer_Append(buf, session_ticket->ticket.data,
  243|      0|                              session_ticket->ticket.len);
  244|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (244:13): [True: 0, False: 0]
  ------------------
  245|      0|            return SECFailure;
  246|      0|        }
  247|       |
  248|      0|        xtnData->sentSessionTicketInClientHello = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  249|      0|    }
  250|       |
  251|  5.34k|    *added = PR_TRUE;
  ------------------
  |  |  437|  5.34k|#define PR_TRUE 1
  ------------------
  252|  5.34k|    return SECSuccess;
  253|  5.34k|}
ssl3_ClientSendAppProtoXtn:
  457|  11.0k|{
  458|  11.0k|    SECStatus rv;
  459|       |
  460|       |    /* Renegotiations do not send this extension. */
  461|  11.0k|    if (!ss->opt.enableALPN || !ss->opt.nextProtoNego.len || ss->firstHsDone) {
  ------------------
  |  Branch (461:9): [True: 5.56k, False: 5.44k]
  |  Branch (461:32): [True: 5.44k, False: 0]
  |  Branch (461:62): [True: 0, False: 0]
  ------------------
  462|  11.0k|        PR_ASSERT(!ss->opt.nextProtoNego.data);
  ------------------
  |  |  208|  11.0k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 11.0k, False: 0]
  |  |  ------------------
  ------------------
  463|  11.0k|        return SECSuccess;
  464|  11.0k|    }
  465|      0|    PRBool addGrease = ss->opt.enableGrease && ss->vrange.max >= SSL_LIBRARY_VERSION_TLS_1_3;
  ------------------
  |  |   21|      0|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (465:24): [True: 0, False: 0]
  |  Branch (465:48): [True: 0, False: 0]
  ------------------
  466|       |
  467|       |    /* The list of protocol strings is prefixed with a 2-byte length */
  468|      0|    rv = sslBuffer_AppendNumber(buf, ss->opt.nextProtoNego.len + (addGrease ? 3 : 0), 2);
  ------------------
  |  Branch (468:67): [True: 0, False: 0]
  ------------------
  469|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (469:9): [True: 0, False: 0]
  ------------------
  470|      0|        return SECFailure;
  471|      0|    }
  472|       |    /* The list of protocol strings */
  473|      0|    rv = sslBuffer_Append(buf, ss->opt.nextProtoNego.data, ss->opt.nextProtoNego.len);
  474|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (474:9): [True: 0, False: 0]
  ------------------
  475|      0|        return SECFailure;
  476|      0|    }
  477|       |    /* A client MAY select one or more GREASE ALPN identifiers and advertise
  478|       |     * them in the "application_layer_protocol_negotiation" extension, if sent
  479|       |     * [RFC8701, Section 3.1]. */
  480|      0|    if (addGrease) {
  ------------------
  |  Branch (480:9): [True: 0, False: 0]
  ------------------
  481|      0|        rv = sslBuffer_AppendNumber(buf, 2, 1);
  482|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (482:13): [True: 0, False: 0]
  ------------------
  483|      0|            return SECFailure;
  484|      0|        }
  485|      0|        rv = sslBuffer_AppendNumber(buf, ss->ssl3.hs.grease->idx[grease_alpn], 2);
  486|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (486:13): [True: 0, False: 0]
  ------------------
  487|      0|            return SECFailure;
  488|      0|        }
  489|      0|    }
  490|       |
  491|      0|    *added = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  492|      0|    return SECSuccess;
  493|      0|}
ssl3_ClientSendStatusRequestXtn:
  561|  11.0k|{
  562|  11.0k|    SECStatus rv;
  563|       |
  564|  11.0k|    if (!ss->opt.enableOCSPStapling) {
  ------------------
  |  Branch (564:9): [True: 5.50k, False: 5.49k]
  ------------------
  565|  5.50k|        return SECSuccess;
  566|  5.50k|    }
  567|       |
  568|  5.49k|    rv = sslBuffer_AppendNumber(buf, 1 /* status_type ocsp */, 1);
  569|  5.49k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (569:9): [True: 0, False: 5.49k]
  ------------------
  570|      0|        return SECFailure;
  571|      0|    }
  572|       |    /* A zero length responder_id_list means that the responders are
  573|       |     * implicitly known to the server. */
  574|  5.49k|    rv = sslBuffer_AppendNumber(buf, 0, 2);
  575|  5.49k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (575:9): [True: 0, False: 5.49k]
  ------------------
  576|      0|        return SECFailure;
  577|      0|    }
  578|       |    /* A zero length request_extensions means that there are no extensions.
  579|       |     * Specifically, we don't set the id-pkix-ocsp-nonce extension. This
  580|       |     * means that the server can replay a cached OCSP response to us. */
  581|  5.49k|    rv = sslBuffer_AppendNumber(buf, 0, 2);
  582|  5.49k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (582:9): [True: 0, False: 5.49k]
  ------------------
  583|      0|        return SECFailure;
  584|      0|    }
  585|       |
  586|  5.49k|    *added = PR_TRUE;
  ------------------
  |  |  437|  5.49k|#define PR_TRUE 1
  ------------------
  587|  5.49k|    return SECSuccess;
  588|  5.49k|}
ssl3_ClientHandleStatusRequestXtn:
  593|     39|{
  594|       |    /* In TLS 1.3, the extension carries the OCSP response. */
  595|     39|    if (ss->version >= SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|     39|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (595:9): [True: 0, False: 39]
  ------------------
  596|      0|        SECStatus rv;
  597|      0|        rv = ssl_ReadCertificateStatus(CONST_CAST(sslSocket, ss),
  ------------------
  |  |   96|      0|#define CONST_CAST(T, X) ((T *)(X))
  ------------------
  598|      0|                                       data->data, data->len);
  599|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (599:13): [True: 0, False: 0]
  ------------------
  600|      0|            return SECFailure; /* code already set */
  601|      0|        }
  602|     39|    } else if (data->len != 0) {
  ------------------
  |  Branch (602:16): [True: 1, False: 38]
  ------------------
  603|      1|        ssl3_ExtSendAlert(ss, alert_fatal, illegal_parameter);
  604|      1|        PORT_SetError(SSL_ERROR_RX_MALFORMED_SERVER_HELLO);
  ------------------
  |  |   65|      1|#define PORT_SetError PORT_SetError_Util
  ------------------
  605|      1|        return SECFailure;
  606|      1|    }
  607|       |
  608|       |    /* Keep track of negotiated extensions. */
  609|     38|    xtnData->negotiated[xtnData->numNegotiated++] = ssl_cert_status_xtn;
  610|     38|    return SECSuccess;
  611|     39|}
ssl3_ClientHandleSessionTicketXtn:
  854|     18|{
  855|     18|    PORT_Assert(ss->version < SSL_LIBRARY_VERSION_TLS_1_3);
  ------------------
  |  |  120|     18|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|     18|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 18, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  856|       |
  857|     18|    if (data->len != 0) {
  ------------------
  |  Branch (857:9): [True: 1, False: 17]
  ------------------
  858|      1|        return SECSuccess; /* Ignore the extension. */
  859|      1|    }
  860|       |
  861|       |    /* Keep track of negotiated extensions. */
  862|     17|    xtnData->negotiated[xtnData->numNegotiated++] = ssl_session_ticket_xtn;
  863|     17|    return SECSuccess;
  864|     18|}
ssl3_SendRenegotiationInfoXtn:
 1337|  11.0k|{
 1338|  11.0k|    PRInt32 len = 0;
 1339|  11.0k|    SECStatus rv;
 1340|       |
 1341|       |    /* In RFC 5746, it is NOT RECOMMENDED to send both the SCSV and the empty
 1342|       |     * RI, so when we send SCSV in the initial handshake, we don't also send RI.
 1343|       |     */
 1344|  11.0k|    if (ss->ssl3.hs.sendingSCSV) {
  ------------------
  |  Branch (1344:9): [True: 0, False: 11.0k]
  ------------------
 1345|      0|        return 0;
 1346|      0|    }
 1347|  11.0k|    if (ss->firstHsDone) {
  ------------------
  |  Branch (1347:9): [True: 0, False: 11.0k]
  ------------------
 1348|      0|        len = ss->sec.isServer ? ss->ssl3.hs.finishedBytes * 2
  ------------------
  |  Branch (1348:15): [True: 0, False: 0]
  ------------------
 1349|      0|                               : ss->ssl3.hs.finishedBytes;
 1350|      0|    }
 1351|       |
 1352|       |    /* verify_Data from previous Finished message(s) */
 1353|  11.0k|    rv = sslBuffer_AppendVariable(buf,
 1354|  11.0k|                                  ss->ssl3.hs.finishedMsgs.data, len, 1);
 1355|  11.0k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1355:9): [True: 0, False: 11.0k]
  ------------------
 1356|      0|        return SECFailure;
 1357|      0|    }
 1358|       |
 1359|  11.0k|    *added = PR_TRUE;
  ------------------
  |  |  437|  11.0k|#define PR_TRUE 1
  ------------------
 1360|  11.0k|    return SECSuccess;
 1361|  11.0k|}
ssl3_HandleRenegotiationInfoXtn:
 1367|  1.55k|{
 1368|  1.55k|    SECStatus rv = SECSuccess;
 1369|  1.55k|    PRUint32 len = 0;
 1370|       |
 1371|  1.55k|    PORT_Assert(ss->version < SSL_LIBRARY_VERSION_TLS_1_3);
  ------------------
  |  |  120|  1.55k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.55k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.55k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1372|       |
 1373|  1.55k|    if (ss->firstHsDone) {
  ------------------
  |  Branch (1373:9): [True: 0, False: 1.55k]
  ------------------
 1374|      0|        len = ss->sec.isServer ? ss->ssl3.hs.finishedBytes
  ------------------
  |  Branch (1374:15): [True: 0, False: 0]
  ------------------
 1375|      0|                               : ss->ssl3.hs.finishedBytes * 2;
 1376|      0|    }
 1377|  1.55k|    if (data->len != 1 + len || data->data[0] != len) {
  ------------------
  |  Branch (1377:9): [True: 4, False: 1.55k]
  |  Branch (1377:33): [True: 8, False: 1.54k]
  ------------------
 1378|     12|        ssl3_ExtDecodeError(ss);
 1379|     12|        return SECFailure;
 1380|     12|    }
 1381|  1.54k|    if (len && NSS_SecureMemcmp(ss->ssl3.hs.finishedMsgs.data,
  ------------------
  |  Branch (1381:9): [True: 0, False: 1.54k]
  |  Branch (1381:16): [True: 0, False: 0]
  ------------------
 1382|      0|                                data->data + 1, len)) {
 1383|      0|        ssl3_ExtSendAlert(ss, alert_fatal, handshake_failure);
 1384|      0|        PORT_SetError(SSL_ERROR_BAD_HANDSHAKE_HASH_VALUE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1385|      0|        return SECFailure;
 1386|      0|    }
 1387|       |    /* remember that we got this extension and it was correct. */
 1388|  1.54k|    CONST_CAST(sslSocket, ss)
  ------------------
  |  |   96|  1.54k|#define CONST_CAST(T, X) ((T *)(X))
  ------------------
 1389|  1.54k|        ->peerRequestedProtection = 1;
 1390|  1.54k|    xtnData->negotiated[xtnData->numNegotiated++] = ssl_renegotiation_info_xtn;
 1391|  1.54k|    if (ss->sec.isServer) {
  ------------------
  |  Branch (1391:9): [True: 0, False: 1.54k]
  ------------------
 1392|       |        /* prepare to send back the appropriate response */
 1393|      0|        rv = ssl3_RegisterExtensionSender(ss, xtnData,
 1394|      0|                                          ssl_renegotiation_info_xtn,
 1395|      0|                                          ssl3_SendRenegotiationInfoXtn);
 1396|      0|    }
 1397|  1.54k|    return rv;
 1398|  1.54k|}
ssl3_ClientSendUseSRTPXtn:
 1403|  11.0k|{
 1404|  11.0k|    unsigned int i;
 1405|  11.0k|    SECStatus rv;
 1406|       |
 1407|  11.0k|    if (!IS_DTLS(ss) || !ss->ssl3.dtlsSRTPCipherCount) {
  ------------------
  |  |  892|  22.0k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  ------------------
  |  Branch (1407:9): [True: 0, False: 11.0k]
  |  Branch (1407:25): [True: 11.0k, False: 0]
  ------------------
 1408|  11.0k|        return SECSuccess; /* Not relevant */
 1409|  11.0k|    }
 1410|       |
 1411|       |    /* Length of the SRTP cipher list */
 1412|      0|    rv = sslBuffer_AppendNumber(buf, 2 * ss->ssl3.dtlsSRTPCipherCount, 2);
 1413|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1413:9): [True: 0, False: 0]
  ------------------
 1414|      0|        return SECFailure;
 1415|      0|    }
 1416|       |    /* The SRTP ciphers */
 1417|      0|    for (i = 0; i < ss->ssl3.dtlsSRTPCipherCount; i++) {
  ------------------
  |  Branch (1417:17): [True: 0, False: 0]
  ------------------
 1418|      0|        rv = sslBuffer_AppendNumber(buf, ss->ssl3.dtlsSRTPCiphers[i], 2);
 1419|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (1419:13): [True: 0, False: 0]
  ------------------
 1420|      0|            return SECFailure;
 1421|      0|        }
 1422|      0|    }
 1423|       |    /* Empty MKI value */
 1424|      0|    rv = sslBuffer_AppendNumber(buf, 0, 1);
 1425|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1425:9): [True: 0, False: 0]
  ------------------
 1426|      0|        return SECFailure;
 1427|      0|    }
 1428|       |
 1429|      0|    *added = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 1430|      0|    return SECSuccess;
 1431|      0|}
ssl3_SendSigAlgsXtn:
 1652|  11.0k|{
 1653|  11.0k|    if (ss->vrange.max < SSL_LIBRARY_VERSION_TLS_1_2) {
  ------------------
  |  |   20|  11.0k|#define SSL_LIBRARY_VERSION_TLS_1_2             0x0303
  ------------------
  |  Branch (1653:9): [True: 155, False: 10.8k]
  ------------------
 1654|    155|        return SECSuccess;
 1655|    155|    }
 1656|       |
 1657|  10.8k|    PRUint16 minVersion;
 1658|  10.8k|    if (ss->sec.isServer) {
  ------------------
  |  Branch (1658:9): [True: 0, False: 10.8k]
  ------------------
 1659|      0|        minVersion = ss->version; /* CertificateRequest */
 1660|  10.8k|    } else {
 1661|  10.8k|        minVersion = ss->vrange.min; /* ClientHello */
 1662|  10.8k|    }
 1663|       |
 1664|  10.8k|    SECStatus rv = ssl3_EncodeSigAlgs(ss, minVersion, PR_TRUE /* forCert */,
  ------------------
  |  |  437|  10.8k|#define PR_TRUE 1
  ------------------
 1665|  10.8k|                                      ss->opt.enableGrease, buf);
 1666|  10.8k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1666:9): [True: 0, False: 10.8k]
  ------------------
 1667|      0|        return SECFailure;
 1668|      0|    }
 1669|       |
 1670|  10.8k|    *added = PR_TRUE;
  ------------------
  |  |  437|  10.8k|#define PR_TRUE 1
  ------------------
 1671|  10.8k|    return SECSuccess;
 1672|  10.8k|}
ssl3_SendExtendedMasterSecretXtn:
 1677|  11.0k|{
 1678|  11.0k|    if (!ss->opt.enableExtendedMS) {
  ------------------
  |  Branch (1678:9): [True: 5.62k, False: 5.37k]
  ------------------
 1679|  5.62k|        return SECSuccess;
 1680|  5.62k|    }
 1681|       |
 1682|       |    /* Always send the extension in this function, since the
 1683|       |     * client always sends it and this function is only called on
 1684|       |     * the server if we negotiated the extension. */
 1685|  5.37k|    *added = PR_TRUE;
  ------------------
  |  |  437|  5.37k|#define PR_TRUE 1
  ------------------
 1686|  5.37k|    return SECSuccess;
 1687|  11.0k|}
ssl3_HandleExtendedMasterSecretXtn:
 1692|     11|{
 1693|     11|    PORT_Assert(ss->version < SSL_LIBRARY_VERSION_TLS_1_3);
  ------------------
  |  |  120|     11|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|     11|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 11, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1694|       |
 1695|     11|    if (ss->version < SSL_LIBRARY_VERSION_TLS_1_0) {
  ------------------
  |  |   18|     11|#define SSL_LIBRARY_VERSION_TLS_1_0             0x0301
  ------------------
  |  Branch (1695:9): [True: 0, False: 11]
  ------------------
 1696|      0|        return SECSuccess;
 1697|      0|    }
 1698|       |
 1699|     11|    if (!ss->opt.enableExtendedMS) {
  ------------------
  |  Branch (1699:9): [True: 0, False: 11]
  ------------------
 1700|      0|        return SECSuccess;
 1701|      0|    }
 1702|       |
 1703|     11|    if (data->len != 0) {
  ------------------
  |  Branch (1703:9): [True: 1, False: 10]
  ------------------
 1704|      1|        SSL_TRC(30, ("%d: SSL3[%d]: Bogus extended master secret extension",
  ------------------
  |  |   71|      1|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 1]
  |  |  ------------------
  |  |   72|      1|    ssl_Trace b
  ------------------
 1705|      1|                     SSL_GETPID(), ss->fd));
 1706|      1|        ssl3_ExtSendAlert(ss, alert_fatal, decode_error);
 1707|      1|        return SECFailure;
 1708|      1|    }
 1709|       |
 1710|     10|    SSL_DBG(("%d: SSL[%d]: Negotiated extended master secret extension.",
  ------------------
  |  |   87|     10|    if (ssl_debug) \
  |  |  ------------------
  |  |  |  Branch (87:9): [True: 0, False: 10]
  |  |  ------------------
  |  |   88|     10|    ssl_Trace b
  ------------------
 1711|     10|             SSL_GETPID(), ss->fd));
 1712|       |
 1713|       |    /* Keep track of negotiated extensions. */
 1714|     10|    xtnData->negotiated[xtnData->numNegotiated++] = ssl_extended_master_secret_xtn;
 1715|       |
 1716|     10|    if (ss->sec.isServer) {
  ------------------
  |  Branch (1716:9): [True: 0, False: 10]
  ------------------
 1717|      0|        return ssl3_RegisterExtensionSender(ss, xtnData,
 1718|      0|                                            ssl_extended_master_secret_xtn,
 1719|      0|                                            ssl_SendEmptyExtension);
 1720|      0|    }
 1721|     10|    return SECSuccess;
 1722|     10|}
ssl3_ClientSendSignedCertTimestampXtn:
 1730|  11.0k|{
 1731|       |    /* Only send the extension if processing is enabled. */
 1732|  11.0k|    if (!ss->opt.enableSignedCertTimestamps) {
  ------------------
  |  Branch (1732:9): [True: 11.0k, False: 0]
  ------------------
 1733|  11.0k|        return SECSuccess;
 1734|  11.0k|    }
 1735|       |
 1736|      0|    *added = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 1737|      0|    return SECSuccess;
 1738|  11.0k|}
ssl_HandleRecordSizeLimitXtn:
 1945|    291|{
 1946|    291|    SECStatus rv;
 1947|    291|    PRUint32 limit;
 1948|    291|    PRUint32 maxLimit = (ss->version >= SSL_LIBRARY_VERSION_TLS_1_3)
  ------------------
  |  |   21|    291|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (1948:25): [True: 0, False: 291]
  ------------------
 1949|    291|                            ? (MAX_FRAGMENT_LENGTH + 1)
  ------------------
  |  |   35|      0|#define MAX_FRAGMENT_LENGTH 16384
  ------------------
 1950|    291|                            : MAX_FRAGMENT_LENGTH;
  ------------------
  |  |   35|    582|#define MAX_FRAGMENT_LENGTH 16384
  ------------------
 1951|       |
 1952|    291|    rv = ssl3_ExtConsumeHandshakeNumber(ss, &limit, 2, &data->data, &data->len);
 1953|    291|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1953:9): [True: 1, False: 290]
  ------------------
 1954|      1|        return SECFailure;
 1955|      1|    }
 1956|    290|    if (data->len != 0 || limit < 64) {
  ------------------
  |  Branch (1956:9): [True: 1, False: 289]
  |  Branch (1956:27): [True: 6, False: 283]
  ------------------
 1957|      7|        ssl3_ExtSendAlert(ss, alert_fatal, decode_error);
 1958|      7|        PORT_SetError(SSL_ERROR_RX_MALFORMED_HANDSHAKE);
  ------------------
  |  |   65|      7|#define PORT_SetError PORT_SetError_Util
  ------------------
 1959|      7|        return SECFailure;
 1960|      7|    }
 1961|       |
 1962|    283|    if (ss->sec.isServer) {
  ------------------
  |  Branch (1962:9): [True: 0, False: 283]
  ------------------
 1963|      0|        rv = ssl3_RegisterExtensionSender(ss, xtnData, ssl_record_size_limit_xtn,
 1964|      0|                                          &ssl_SendRecordSizeLimitXtn);
 1965|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (1965:13): [True: 0, False: 0]
  ------------------
 1966|      0|            return SECFailure; /* error already set. */
 1967|      0|        }
 1968|    283|    } else if (limit > maxLimit) {
  ------------------
  |  Branch (1968:16): [True: 16, False: 267]
  ------------------
 1969|       |        /* The client can sensibly check the maximum. */
 1970|     16|        ssl3_ExtSendAlert(ss, alert_fatal, illegal_parameter);
 1971|     16|        PORT_SetError(SSL_ERROR_RX_MALFORMED_HANDSHAKE);
  ------------------
  |  |   65|     16|#define PORT_SetError PORT_SetError_Util
  ------------------
 1972|     16|        return SECFailure;
 1973|     16|    }
 1974|       |
 1975|       |    /* We can't enforce the maximum on a server. But we do need to ensure
 1976|       |     * that we don't apply a limit that is too large. */
 1977|    267|    xtnData->recordSizeLimit = PR_MIN(maxLimit, limit);
  ------------------
  |  |  158|    267|#define PR_MIN(x,y)     ((x)<(y)?(x):(y))
  |  |  ------------------
  |  |  |  Branch (158:26): [True: 0, False: 267]
  |  |  ------------------
  ------------------
 1978|    267|    xtnData->negotiated[xtnData->numNegotiated++] = ssl_record_size_limit_xtn;
 1979|    267|    return SECSuccess;
 1980|    283|}
ssl_SendRecordSizeLimitXtn:
 1985|  11.0k|{
 1986|  11.0k|    PRUint32 maxLimit;
 1987|  11.0k|    if (ss->sec.isServer) {
  ------------------
  |  Branch (1987:9): [True: 0, False: 11.0k]
  ------------------
 1988|      0|        maxLimit = (ss->version >= SSL_LIBRARY_VERSION_TLS_1_3)
  ------------------
  |  |   21|      0|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (1988:20): [True: 0, False: 0]
  ------------------
 1989|      0|                       ? (MAX_FRAGMENT_LENGTH + 1)
  ------------------
  |  |   35|      0|#define MAX_FRAGMENT_LENGTH 16384
  ------------------
 1990|      0|                       : MAX_FRAGMENT_LENGTH;
  ------------------
  |  |   35|      0|#define MAX_FRAGMENT_LENGTH 16384
  ------------------
 1991|  11.0k|    } else {
 1992|  11.0k|        maxLimit = (ss->vrange.max >= SSL_LIBRARY_VERSION_TLS_1_3)
  ------------------
  |  |   21|  11.0k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (1992:20): [True: 9.52k, False: 1.47k]
  ------------------
 1993|  11.0k|                       ? (MAX_FRAGMENT_LENGTH + 1)
  ------------------
  |  |   35|  9.52k|#define MAX_FRAGMENT_LENGTH 16384
  ------------------
 1994|  11.0k|                       : MAX_FRAGMENT_LENGTH;
  ------------------
  |  |   35|  12.4k|#define MAX_FRAGMENT_LENGTH 16384
  ------------------
 1995|  11.0k|    }
 1996|  11.0k|    PRUint32 limit = PR_MIN(ss->opt.recordSizeLimit, maxLimit);
  ------------------
  |  |  158|  11.0k|#define PR_MIN(x,y)     ((x)<(y)?(x):(y))
  |  |  ------------------
  |  |  |  Branch (158:26): [True: 0, False: 11.0k]
  |  |  ------------------
  ------------------
 1997|  11.0k|    SECStatus rv = sslBuffer_AppendNumber(buf, limit, 2);
 1998|  11.0k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1998:9): [True: 0, False: 11.0k]
  ------------------
 1999|      0|        return SECFailure;
 2000|      0|    }
 2001|       |
 2002|  11.0k|    *added = PR_TRUE;
  ------------------
  |  |  437|  11.0k|#define PR_TRUE 1
  ------------------
 2003|  11.0k|    return SECSuccess;
 2004|  11.0k|}

ssl3_InitGather:
   28|  18.7k|{
   29|  18.7k|    gs->state = GS_INIT;
  ------------------
  |  |  381|  18.7k|#define GS_INIT 0
  ------------------
   30|  18.7k|    gs->writeOffset = 0;
   31|  18.7k|    gs->readOffset = 0;
   32|  18.7k|    gs->dtlsPacketOffset = 0;
   33|  18.7k|    gs->dtlsPacket.len = 0;
   34|  18.7k|    gs->rejectV2Records = PR_FALSE;
  ------------------
  |  |  438|  18.7k|#define PR_FALSE 0
  ------------------
   35|       |    /* Allocate plaintext buffer to maximum possibly needed size. It needs to
   36|       |     * be larger than recordSizeLimit for TLS 1.0 and 1.1 compatability.
   37|       |     * The TLS 1.2 ciphertext is larger than the TLS 1.3 ciphertext. */
   38|  18.7k|    return sslBuffer_Grow(&gs->buf, TLS_1_2_MAX_CTEXT_LENGTH);
  ------------------
  |  |   39|  18.7k|#define TLS_1_2_MAX_CTEXT_LENGTH ((MAX_FRAGMENT_LENGTH) + (TLS_1_2_MAX_EXPANSION))
  |  |  ------------------
  |  |  |  |   35|  18.7k|#define MAX_FRAGMENT_LENGTH 16384
  |  |  ------------------
  |  |               #define TLS_1_2_MAX_CTEXT_LENGTH ((MAX_FRAGMENT_LENGTH) + (TLS_1_2_MAX_EXPANSION))
  |  |  ------------------
  |  |  |  |   36|  18.7k|#define TLS_1_2_MAX_EXPANSION 2048
  |  |  ------------------
  ------------------
   39|  18.7k|}
ssl3_DestroyGather:
   44|  9.36k|{
   45|  9.36k|    if (gs) { /* the PORT_*Free functions check for NULL pointers. */
  ------------------
  |  Branch (45:9): [True: 9.36k, False: 0]
  ------------------
   46|  9.36k|        PORT_ZFree(gs->buf.buf, gs->buf.space);
  ------------------
  |  |   75|  9.36k|#define PORT_ZFree PORT_ZFree_Util
  ------------------
   47|  9.36k|        PORT_Free(gs->inbuf.buf);
  ------------------
  |  |   60|  9.36k|#define PORT_Free PORT_Free_Util
  ------------------
   48|  9.36k|        PORT_Free(gs->dtlsPacket.buf);
  ------------------
  |  |   60|  9.36k|#define PORT_Free PORT_Free_Util
  ------------------
   49|  9.36k|    }
   50|  9.36k|}
ssl3_GatherCompleteHandshake:
  449|  19.1k|{
  450|  19.1k|    int rv;
  451|  19.1k|    SSL3Ciphertext cText;
  452|  19.1k|    PRBool keepGoing = PR_TRUE;
  ------------------
  |  |  437|  19.1k|#define PR_TRUE 1
  ------------------
  453|       |
  454|  19.1k|    if (ss->ssl3.fatalAlertSent) {
  ------------------
  |  Branch (454:9): [True: 0, False: 19.1k]
  ------------------
  455|      0|        SSL_TRC(3, ("%d: SSL3[%d] Cannot gather data; fatal alert already sent",
  ------------------
  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    ssl_Trace b
  ------------------
  456|      0|                    SSL_GETPID(), ss->fd));
  457|      0|        PORT_SetError(SSL_ERROR_HANDSHAKE_FAILED);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  458|      0|        return -1;
  459|      0|    }
  460|       |
  461|  19.1k|    SSL_TRC(30, ("%d: SSL3[%d]: ssl3_GatherCompleteHandshake",
  ------------------
  |  |   71|  19.1k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 19.1k]
  |  |  ------------------
  |  |   72|  19.1k|    ssl_Trace b
  ------------------
  462|  19.1k|                 SSL_GETPID(), ss->fd));
  463|       |
  464|       |    /* ssl3_HandleRecord may end up eventually calling ssl_FinishHandshake,
  465|       |     * which requires the 1stHandshakeLock, which must be acquired before the
  466|       |     * RecvBufLock.
  467|       |     */
  468|  19.1k|    PORT_Assert(ss->opt.noLocks || ssl_Have1stHandshakeLock(ss));
  ------------------
  |  |  120|  19.1k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  28.5k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 9.82k, False: 9.35k]
  |  |  |  |  |  Branch (208:7): [True: 9.35k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  469|  19.1k|    PORT_Assert(ss->opt.noLocks || ssl_HaveRecvBufLock(ss));
  ------------------
  |  |  120|  19.1k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  28.5k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 9.82k, False: 9.35k]
  |  |  |  |  |  Branch (208:7): [True: 9.35k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  470|       |
  471|  1.16M|    do {
  472|  1.16M|        PRBool processingEarlyData;
  473|       |
  474|  1.16M|        ssl_GetSSL3HandshakeLock(ss);
  ------------------
  |  | 1407|  1.16M|    {                                                 \
  |  | 1408|  1.16M|        if (!ss->opt.noLocks) {                       \
  |  |  ------------------
  |  |  |  Branch (1408:13): [True: 569k, False: 591k]
  |  |  ------------------
  |  | 1409|   569k|            PORT_Assert(!ssl_HaveXmitBufLock(ss));    \
  |  |  ------------------
  |  |  |  |  120|   569k|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|   569k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 569k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1410|   569k|            PZ_EnterMonitor((ss)->ssl3HandshakeLock); \
  |  |  ------------------
  |  |  |  |  256|   569k|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1411|   569k|        }                                             \
  |  | 1412|  1.16M|    }
  ------------------
  475|       |
  476|  1.16M|        processingEarlyData = ss->ssl3.hs.zeroRttState == ssl_0rtt_accepted;
  477|       |
  478|       |        /* Without this, we may end up wrongly reporting
  479|       |         * SSL_ERROR_RX_UNEXPECTED_* errors if we receive any records from the
  480|       |         * peer while we are waiting to be restarted.
  481|       |         */
  482|  1.16M|        if (ss->ssl3.hs.restartTarget) {
  ------------------
  |  Branch (482:13): [True: 0, False: 1.16M]
  ------------------
  483|      0|            ssl_ReleaseSSL3HandshakeLock(ss);
  ------------------
  |  | 1414|      0|    {                                                \
  |  | 1415|      0|        if (!ss->opt.noLocks)                        \
  |  |  ------------------
  |  |  |  Branch (1415:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1416|      0|            PZ_ExitMonitor((ss)->ssl3HandshakeLock); \
  |  |  ------------------
  |  |  |  |  257|      0|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1417|      0|    }
  ------------------
  484|      0|            PORT_SetError(PR_WOULD_BLOCK_ERROR);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
                          PORT_SetError(PR_WOULD_BLOCK_ERROR);
  ------------------
  |  |   22|      0|#define PR_WOULD_BLOCK_ERROR                     (-5998L)
  ------------------
  485|      0|            return -1;
  486|      0|        }
  487|       |
  488|       |        /* If we have a detached record layer, don't ever gather. */
  489|  1.16M|        if (ss->recordWriteCallback) {
  ------------------
  |  Branch (489:13): [True: 0, False: 1.16M]
  ------------------
  490|      0|            PRBool done = ss->firstHsDone;
  491|      0|            ssl_ReleaseSSL3HandshakeLock(ss);
  ------------------
  |  | 1414|      0|    {                                                \
  |  | 1415|      0|        if (!ss->opt.noLocks)                        \
  |  |  ------------------
  |  |  |  Branch (1415:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1416|      0|            PZ_ExitMonitor((ss)->ssl3HandshakeLock); \
  |  |  ------------------
  |  |  |  |  257|      0|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1417|      0|    }
  ------------------
  492|      0|            if (done) {
  ------------------
  |  Branch (492:17): [True: 0, False: 0]
  ------------------
  493|      0|                return 1;
  494|      0|            }
  495|      0|            PORT_SetError(PR_WOULD_BLOCK_ERROR);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
                          PORT_SetError(PR_WOULD_BLOCK_ERROR);
  ------------------
  |  |   22|      0|#define PR_WOULD_BLOCK_ERROR                     (-5998L)
  ------------------
  496|      0|            return -1;
  497|      0|        }
  498|       |
  499|  1.16M|        ssl_ReleaseSSL3HandshakeLock(ss);
  ------------------
  |  | 1414|  1.16M|    {                                                \
  |  | 1415|  1.16M|        if (!ss->opt.noLocks)                        \
  |  |  ------------------
  |  |  |  Branch (1415:13): [True: 569k, False: 591k]
  |  |  ------------------
  |  | 1416|  1.16M|            PZ_ExitMonitor((ss)->ssl3HandshakeLock); \
  |  |  ------------------
  |  |  |  |  257|   569k|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1417|  1.16M|    }
  ------------------
  500|       |
  501|       |        /* State for SSLv2 client hello support. */
  502|  1.16M|        ssl2Gather ssl2gs = { PR_FALSE, 0 };
  ------------------
  |  |  438|  1.16M|#define PR_FALSE 0
  ------------------
  503|  1.16M|        ssl2Gather *ssl2gs_ptr = NULL;
  504|       |
  505|       |        /* If we're a server and waiting for a client hello, accept v2. */
  506|  1.16M|        if (ss->sec.isServer && ss->opt.enableV2CompatibleHello &&
  ------------------
  |  Branch (506:13): [True: 0, False: 1.16M]
  |  Branch (506:33): [True: 0, False: 0]
  ------------------
  507|  1.16M|            ss->ssl3.hs.ws == wait_client_hello) {
  ------------------
  |  Branch (507:13): [True: 0, False: 0]
  ------------------
  508|      0|            ssl2gs_ptr = &ssl2gs;
  509|      0|        }
  510|       |
  511|       |        /* bring in the next sslv3 record. */
  512|  1.16M|        if (ss->recvdCloseNotify) {
  ------------------
  |  Branch (512:13): [True: 5, False: 1.16M]
  ------------------
  513|       |            /* RFC 5246 Section 7.2.1:
  514|       |             *   Any data received after a closure alert is ignored.
  515|       |             */
  516|      5|            return 0;
  517|      5|        }
  518|       |
  519|  1.16M|        if (!IS_DTLS(ss)) {
  ------------------
  |  |  892|  1.16M|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  ------------------
  |  Branch (519:13): [True: 0, False: 1.16M]
  ------------------
  520|       |            /* If we're a server waiting for a ClientHello then pass
  521|       |             * ssl2gs to support SSLv2 ClientHello messages. */
  522|      0|            rv = ssl3_GatherData(ss, &ss->gs, flags, ssl2gs_ptr);
  523|  1.16M|        } else {
  524|  1.16M|            rv = dtls_GatherData(ss, &ss->gs, flags);
  525|       |
  526|       |            /* If we got a would block error, that means that no data was
  527|       |             * available, so we check the timer to see if it's time to
  528|       |             * retransmit */
  529|  1.16M|            if (rv == SECFailure &&
  ------------------
  |  Branch (529:17): [True: 3.67k, False: 1.15M]
  ------------------
  530|  1.16M|                (PORT_GetError() == PR_WOULD_BLOCK_ERROR)) {
  ------------------
  |  |   62|  3.67k|#define PORT_GetError PORT_GetError_Util
  ------------------
                              (PORT_GetError() == PR_WOULD_BLOCK_ERROR)) {
  ------------------
  |  |   22|  3.67k|#define PR_WOULD_BLOCK_ERROR                     (-5998L)
  ------------------
  |  Branch (530:17): [True: 3.56k, False: 110]
  ------------------
  531|  3.56k|                dtls_CheckTimer(ss);
  532|       |                /* Restore the error in case something succeeded */
  533|  3.56k|                PORT_SetError(PR_WOULD_BLOCK_ERROR);
  ------------------
  |  |   65|  3.56k|#define PORT_SetError PORT_SetError_Util
  ------------------
                              PORT_SetError(PR_WOULD_BLOCK_ERROR);
  ------------------
  |  |   22|  3.56k|#define PR_WOULD_BLOCK_ERROR                     (-5998L)
  ------------------
  534|  3.56k|            }
  535|  1.16M|        }
  536|       |
  537|  1.16M|        if (rv <= 0) {
  ------------------
  |  Branch (537:13): [True: 7.75k, False: 1.15M]
  ------------------
  538|  7.75k|            return rv;
  539|  7.75k|        }
  540|       |
  541|  1.15M|        if (ssl2gs.isV2) {
  ------------------
  |  Branch (541:13): [True: 0, False: 1.15M]
  ------------------
  542|      0|            rv = ssl3_HandleV2ClientHello(ss, ss->gs.inbuf.buf,
  543|      0|                                          ss->gs.inbuf.len,
  544|      0|                                          ssl2gs.padding);
  545|      0|            if (rv < 0) {
  ------------------
  |  Branch (545:17): [True: 0, False: 0]
  ------------------
  546|      0|                return rv;
  547|      0|            }
  548|  1.15M|        } else {
  549|       |            /* decipher it, and handle it if it's a handshake.
  550|       |             * If it's application data, ss->gs.buf will not be empty upon return.
  551|       |             * If it's a change cipher spec, alert, or handshake message,
  552|       |             * ss->gs.buf.len will be 0 when ssl3_HandleRecord returns SECSuccess.
  553|       |             *
  554|       |             * cText only needs to be valid for this next function call, so
  555|       |             * it can borrow gs.hdr.
  556|       |             */
  557|  1.15M|            cText.hdr = ss->gs.hdr;
  558|  1.15M|            cText.hdrLen = ss->gs.hdrLen;
  559|  1.15M|            cText.buf = &ss->gs.inbuf;
  560|  1.15M|            rv = ssl3_HandleRecord(ss, &cText);
  561|  1.15M|        }
  562|       |
  563|  1.15M|#ifdef DEBUG
  564|       |        /* In Debug builds free gather ciphertext buffer after each decryption
  565|       |         * for advanced ASAN coverage/utilization. The buffer content has been
  566|       |         * used at this point, ssl3_HandleRecord() and thereby the decryption
  567|       |         * functions are only called from this point of the implementation. */
  568|  1.15M|        sslBuffer_Clear(&ss->gs.inbuf);
  569|  1.15M|#endif
  570|       |
  571|  1.15M|        if (rv < 0) {
  ------------------
  |  Branch (571:13): [True: 5.10k, False: 1.14M]
  ------------------
  572|  5.10k|            return ss->recvdCloseNotify ? 0 : rv;
  ------------------
  |  Branch (572:20): [True: 1, False: 5.10k]
  ------------------
  573|  5.10k|        }
  574|  1.14M|        if (ss->gs.buf.len > 0) {
  ------------------
  |  Branch (574:13): [True: 0, False: 1.14M]
  ------------------
  575|       |            /* We have application data to return to the application. This
  576|       |             * prioritizes returning application data to the application over
  577|       |             * completing any renegotiation handshake we may be doing.
  578|       |             */
  579|      0|            PORT_Assert(ss->firstHsDone);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  580|      0|            break;
  581|      0|        }
  582|       |
  583|  1.14M|        PORT_Assert(keepGoing);
  ------------------
  |  |  120|  1.14M|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.14M|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.14M, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  584|  1.14M|        ssl_GetSSL3HandshakeLock(ss);
  ------------------
  |  | 1407|  1.14M|    {                                                 \
  |  | 1408|  1.14M|        if (!ss->opt.noLocks) {                       \
  |  |  ------------------
  |  |  |  Branch (1408:13): [True: 563k, False: 584k]
  |  |  ------------------
  |  | 1409|   563k|            PORT_Assert(!ssl_HaveXmitBufLock(ss));    \
  |  |  ------------------
  |  |  |  |  120|   563k|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|   563k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 563k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1410|   563k|            PZ_EnterMonitor((ss)->ssl3HandshakeLock); \
  |  |  ------------------
  |  |  |  |  256|   563k|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1411|   563k|        }                                             \
  |  | 1412|  1.14M|    }
  ------------------
  585|  1.14M|        if (ss->ssl3.hs.ws == idle_handshake) {
  ------------------
  |  Branch (585:13): [True: 0, False: 1.14M]
  ------------------
  586|       |            /* We are done with the current handshake so stop trying to
  587|       |             * handshake. Note that it would be safe to test ss->firstHsDone
  588|       |             * instead of ss->ssl3.hs.ws. By testing ss->ssl3.hs.ws instead,
  589|       |             * we prioritize completing a renegotiation handshake over sending
  590|       |             * application data.
  591|       |             */
  592|      0|            PORT_Assert(ss->firstHsDone);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  593|      0|            PORT_Assert(!ss->ssl3.hs.canFalseStart);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  594|      0|            keepGoing = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  595|  1.14M|        } else if (ss->ssl3.hs.canFalseStart) {
  ------------------
  |  Branch (595:20): [True: 6.30k, False: 1.14M]
  ------------------
  596|       |            /* Prioritize sending application data over trying to complete
  597|       |             * the handshake if we're false starting.
  598|       |             *
  599|       |             * If we were to do this check at the beginning of the loop instead
  600|       |             * of here, then this function would become be a no-op after
  601|       |             * receiving the ServerHelloDone in the false start case, and we
  602|       |             * would never complete the handshake.
  603|       |             */
  604|  6.30k|            PORT_Assert(!ss->firstHsDone);
  ------------------
  |  |  120|  6.30k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  6.30k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 6.30k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  605|       |
  606|  6.30k|            if (ssl3_WaitingForServerSecondRound(ss)) {
  ------------------
  |  Branch (606:17): [True: 6.30k, False: 0]
  ------------------
  607|  6.30k|                keepGoing = PR_FALSE;
  ------------------
  |  |  438|  6.30k|#define PR_FALSE 0
  ------------------
  608|  6.30k|            } else {
  609|      0|                ss->ssl3.hs.canFalseStart = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  610|      0|            }
  611|  1.14M|        } else if (processingEarlyData &&
  ------------------
  |  Branch (611:20): [True: 0, False: 1.14M]
  ------------------
  612|  1.14M|                   ss->ssl3.hs.zeroRttState == ssl_0rtt_done &&
  ------------------
  |  Branch (612:20): [True: 0, False: 0]
  ------------------
  613|  1.14M|                   !PR_CLIST_IS_EMPTY(&ss->ssl3.hs.bufferedEarlyData)) {
  ------------------
  |  |   94|      0|    ((_l)->next == (_l))
  ------------------
  |  Branch (613:20): [True: 0, False: 0]
  ------------------
  614|       |            /* If we were processing early data and we are no longer, then force
  615|       |             * the handshake to block.  This ensures that early data is
  616|       |             * delivered to the application before the handshake completes. */
  617|      0|            ssl_ReleaseSSL3HandshakeLock(ss);
  ------------------
  |  | 1414|      0|    {                                                \
  |  | 1415|      0|        if (!ss->opt.noLocks)                        \
  |  |  ------------------
  |  |  |  Branch (1415:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1416|      0|            PZ_ExitMonitor((ss)->ssl3HandshakeLock); \
  |  |  ------------------
  |  |  |  |  257|      0|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1417|      0|    }
  ------------------
  618|      0|            PORT_SetError(PR_WOULD_BLOCK_ERROR);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
                          PORT_SetError(PR_WOULD_BLOCK_ERROR);
  ------------------
  |  |   22|      0|#define PR_WOULD_BLOCK_ERROR                     (-5998L)
  ------------------
  619|      0|            return -1;
  620|      0|        }
  621|  1.14M|        ssl_ReleaseSSL3HandshakeLock(ss);
  ------------------
  |  | 1414|  1.14M|    {                                                \
  |  | 1415|  1.14M|        if (!ss->opt.noLocks)                        \
  |  |  ------------------
  |  |  |  Branch (1415:13): [True: 563k, False: 584k]
  |  |  ------------------
  |  | 1416|  1.14M|            PZ_ExitMonitor((ss)->ssl3HandshakeLock); \
  |  |  ------------------
  |  |  |  |  257|   563k|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1417|  1.14M|    }
  ------------------
  622|  1.14M|    } while (keepGoing);
  ------------------
  |  Branch (622:14): [True: 1.14M, False: 6.30k]
  ------------------
  623|       |
  624|       |    /* Service the DTLS timer so that the post-handshake timers
  625|       |     * fire. */
  626|  6.30k|    if (IS_DTLS(ss) && (ss->ssl3.hs.ws == idle_handshake)) {
  ------------------
  |  |  892|  12.6k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 6.30k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (626:24): [True: 0, False: 6.30k]
  ------------------
  627|      0|        dtls_CheckTimer(ss);
  628|      0|    }
  629|  6.30k|    ss->gs.readOffset = 0;
  630|  6.30k|    ss->gs.writeOffset = ss->gs.buf.len;
  631|  6.30k|    return 1;
  632|  19.1k|}
ssl3_GatherAppDataRecord:
  646|    514|{
  647|    514|    int rv;
  648|       |
  649|       |    /* ssl3_GatherCompleteHandshake requires both of these locks. */
  650|    514|    PORT_Assert(ss->opt.noLocks || ssl_Have1stHandshakeLock(ss));
  ------------------
  |  |  120|    514|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    761|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 267, False: 247]
  |  |  |  |  |  Branch (208:7): [True: 247, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  651|    514|    PORT_Assert(ss->opt.noLocks || ssl_HaveRecvBufLock(ss));
  ------------------
  |  |  120|    514|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    761|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 267, False: 247]
  |  |  |  |  |  Branch (208:7): [True: 247, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  652|       |
  653|  6.30k|    do {
  654|  6.30k|        rv = ssl3_GatherCompleteHandshake(ss, flags);
  655|  6.30k|    } while (rv > 0 && ss->gs.buf.len == 0);
  ------------------
  |  Branch (655:14): [True: 5.79k, False: 514]
  |  Branch (655:24): [True: 5.79k, False: 0]
  ------------------
  656|       |
  657|    514|    return rv;
  658|    514|}
ssl3gthr.c:dtls_GatherData:
  279|  1.16M|{
  280|  1.16M|    int nb;
  281|  1.16M|    PRUint8 contentType;
  282|  1.16M|    unsigned int headerLen;
  283|  1.16M|    SECStatus rv = SECSuccess;
  284|  1.16M|    PRBool dtlsLengthPresent = PR_TRUE;
  ------------------
  |  |  437|  1.16M|#define PR_TRUE 1
  ------------------
  285|       |
  286|  1.16M|    SSL_TRC(30, ("dtls_GatherData"));
  ------------------
  |  |   71|  1.16M|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 1.16M]
  |  |  ------------------
  |  |   72|  1.16M|    ssl_Trace b
  ------------------
  287|       |
  288|  1.16M|    PORT_Assert(ss->opt.noLocks || ssl_HaveRecvBufLock(ss));
  ------------------
  |  |  120|  1.16M|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.73M|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 591k, False: 569k]
  |  |  |  |  |  Branch (208:7): [True: 569k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  289|       |
  290|  1.16M|    gs->state = GS_HEADER;
  ------------------
  |  |  382|  1.16M|#define GS_HEADER 1
  ------------------
  291|  1.16M|    gs->offset = 0;
  292|       |
  293|  1.16M|    if (gs->dtlsPacketOffset == gs->dtlsPacket.len) { /* No data left */
  ------------------
  |  Branch (293:9): [True: 16.8k, False: 1.14M]
  ------------------
  294|  16.8k|        gs->dtlsPacketOffset = 0;
  295|  16.8k|        gs->dtlsPacket.len = 0;
  296|       |
  297|       |        /* Resize to the maximum possible size so we can fit a full datagram.
  298|       |         * This leads to record_overflow errors if records/ciphertexts greater
  299|       |         * than the buffer (= maximum record) size are to be received.
  300|       |         * DTLS Record errors are dropped silently. [RFC6347, Section 4.1.2.7].
  301|       |         * Checks for record size limit extension boundaries are performed in
  302|       |         * ssl3con.c/ssl3_HandleRecord() for tls and dtls records.
  303|       |         *
  304|       |         * -> For TLS 1.2 records MUST NOT be longer than 2^14 + 2048 bytes.
  305|       |         * -> For TLS 1.3 records MUST NOT exceed 2^14 + 256 bytes.
  306|       |         * -> For older versions this MAY be enforced, we do it.
  307|       |         * [RFC8446 Section 5.2, RFC5246 Section 6.2.3]. */
  308|  16.8k|        if (ss->version <= SSL_LIBRARY_VERSION_TLS_1_2) {
  ------------------
  |  |   20|  16.8k|#define SSL_LIBRARY_VERSION_TLS_1_2             0x0303
  ------------------
  |  Branch (308:13): [True: 13.8k, False: 3.01k]
  ------------------
  309|  13.8k|            if (gs->dtlsPacket.space < DTLS_1_2_MAX_PACKET_LENGTH) {
  ------------------
  |  |   44|  13.8k|#define DTLS_1_2_MAX_PACKET_LENGTH ((TLS_1_2_MAX_CTEXT_LENGTH) + (DTLS_RECORD_HEADER_LENGTH))
  |  |  ------------------
  |  |  |  |   39|  13.8k|#define TLS_1_2_MAX_CTEXT_LENGTH ((MAX_FRAGMENT_LENGTH) + (TLS_1_2_MAX_EXPANSION))
  |  |  |  |  ------------------
  |  |  |  |  |  |   35|  13.8k|#define MAX_FRAGMENT_LENGTH 16384
  |  |  |  |  ------------------
  |  |  |  |               #define TLS_1_2_MAX_CTEXT_LENGTH ((MAX_FRAGMENT_LENGTH) + (TLS_1_2_MAX_EXPANSION))
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  13.8k|#define TLS_1_2_MAX_EXPANSION 2048
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DTLS_1_2_MAX_PACKET_LENGTH ((TLS_1_2_MAX_CTEXT_LENGTH) + (DTLS_RECORD_HEADER_LENGTH))
  |  |  ------------------
  |  |  |  |   29|  13.8k|#define DTLS_RECORD_HEADER_LENGTH 13
  |  |  ------------------
  ------------------
  |  Branch (309:17): [True: 9.36k, False: 4.50k]
  ------------------
  310|  9.36k|                rv = sslBuffer_Grow(&gs->dtlsPacket, DTLS_1_2_MAX_PACKET_LENGTH);
  ------------------
  |  |   44|  9.36k|#define DTLS_1_2_MAX_PACKET_LENGTH ((TLS_1_2_MAX_CTEXT_LENGTH) + (DTLS_RECORD_HEADER_LENGTH))
  |  |  ------------------
  |  |  |  |   39|  9.36k|#define TLS_1_2_MAX_CTEXT_LENGTH ((MAX_FRAGMENT_LENGTH) + (TLS_1_2_MAX_EXPANSION))
  |  |  |  |  ------------------
  |  |  |  |  |  |   35|  9.36k|#define MAX_FRAGMENT_LENGTH 16384
  |  |  |  |  ------------------
  |  |  |  |               #define TLS_1_2_MAX_CTEXT_LENGTH ((MAX_FRAGMENT_LENGTH) + (TLS_1_2_MAX_EXPANSION))
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  9.36k|#define TLS_1_2_MAX_EXPANSION 2048
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DTLS_1_2_MAX_PACKET_LENGTH ((TLS_1_2_MAX_CTEXT_LENGTH) + (DTLS_RECORD_HEADER_LENGTH))
  |  |  ------------------
  |  |  |  |   29|  9.36k|#define DTLS_RECORD_HEADER_LENGTH 13
  |  |  ------------------
  ------------------
  311|  9.36k|            }
  312|  13.8k|        } else { /* version >= TLS 1.3 */
  313|  3.01k|            if (gs->dtlsPacket.space != DTLS_1_3_MAX_PACKET_LENGTH) {
  ------------------
  |  |   43|  3.01k|#define DTLS_1_3_MAX_PACKET_LENGTH ((TLS_1_3_MAX_CTEXT_LENGTH) + (SSL3_RECORD_HEADER_LENGTH))
  |  |  ------------------
  |  |  |  |   38|  3.01k|#define TLS_1_3_MAX_CTEXT_LENGTH ((MAX_FRAGMENT_LENGTH) + (TLS_1_3_MAX_EXPANSION))
  |  |  |  |  ------------------
  |  |  |  |  |  |   35|  3.01k|#define MAX_FRAGMENT_LENGTH 16384
  |  |  |  |  ------------------
  |  |  |  |               #define TLS_1_3_MAX_CTEXT_LENGTH ((MAX_FRAGMENT_LENGTH) + (TLS_1_3_MAX_EXPANSION))
  |  |  |  |  ------------------
  |  |  |  |  |  |   37|  3.01k|#define TLS_1_3_MAX_EXPANSION (255 + 1)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DTLS_1_3_MAX_PACKET_LENGTH ((TLS_1_3_MAX_CTEXT_LENGTH) + (SSL3_RECORD_HEADER_LENGTH))
  |  |  ------------------
  |  |  |  |   26|  3.01k|#define SSL3_RECORD_HEADER_LENGTH 5
  |  |  ------------------
  ------------------
  |  Branch (313:17): [True: 1.35k, False: 1.65k]
  ------------------
  314|       |                /* During Hello and version negotiation older DTLS versions with
  315|       |                 * greater possible packets are used. The buffer must therefore
  316|       |                 * be "truncated" by clearing and reallocating it */
  317|  1.35k|                sslBuffer_Clear(&gs->dtlsPacket);
  318|  1.35k|                rv = sslBuffer_Grow(&gs->dtlsPacket, DTLS_1_3_MAX_PACKET_LENGTH);
  ------------------
  |  |   43|  1.35k|#define DTLS_1_3_MAX_PACKET_LENGTH ((TLS_1_3_MAX_CTEXT_LENGTH) + (SSL3_RECORD_HEADER_LENGTH))
  |  |  ------------------
  |  |  |  |   38|  1.35k|#define TLS_1_3_MAX_CTEXT_LENGTH ((MAX_FRAGMENT_LENGTH) + (TLS_1_3_MAX_EXPANSION))
  |  |  |  |  ------------------
  |  |  |  |  |  |   35|  1.35k|#define MAX_FRAGMENT_LENGTH 16384
  |  |  |  |  ------------------
  |  |  |  |               #define TLS_1_3_MAX_CTEXT_LENGTH ((MAX_FRAGMENT_LENGTH) + (TLS_1_3_MAX_EXPANSION))
  |  |  |  |  ------------------
  |  |  |  |  |  |   37|  1.35k|#define TLS_1_3_MAX_EXPANSION (255 + 1)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DTLS_1_3_MAX_PACKET_LENGTH ((TLS_1_3_MAX_CTEXT_LENGTH) + (SSL3_RECORD_HEADER_LENGTH))
  |  |  ------------------
  |  |  |  |   26|  1.35k|#define SSL3_RECORD_HEADER_LENGTH 5
  |  |  ------------------
  ------------------
  319|  1.35k|            }
  320|  3.01k|        }
  321|       |
  322|  16.8k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (322:13): [True: 0, False: 16.8k]
  ------------------
  323|      0|            return -1; /* Code already set. */
  324|      0|        }
  325|       |
  326|       |        /* recv() needs to read a full datagram at a time */
  327|  16.8k|        nb = ssl_DefRecv(ss, gs->dtlsPacket.buf, gs->dtlsPacket.space, flags);
  328|  16.8k|        if (nb > 0) {
  ------------------
  |  Branch (328:13): [True: 12.8k, False: 4.07k]
  ------------------
  329|  12.8k|            PRINT_BUF(60, (ss, "raw gather data:", gs->dtlsPacket.buf, nb));
  ------------------
  |  |   74|  12.8k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 12.8k]
  |  |  ------------------
  |  |   75|  12.8k|    ssl_PrintBuf b
  ------------------
  330|  12.8k|        } else if (nb == 0) {
  ------------------
  |  Branch (330:20): [True: 4.07k, False: 0]
  ------------------
  331|       |            /* EOF */
  332|  4.07k|            SSL_TRC(30, ("%d: SSL3[%d]: EOF", SSL_GETPID(), ss->fd));
  ------------------
  |  |   71|  4.07k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 4.07k]
  |  |  ------------------
  |  |   72|  4.07k|    ssl_Trace b
  ------------------
  333|  4.07k|            return 0;
  334|  4.07k|        } else /* if (nb < 0) */ {
  335|      0|            SSL_DBG(("%d: SSL3[%d]: recv error %d", SSL_GETPID(), ss->fd,
  ------------------
  |  |   87|      0|    if (ssl_debug) \
  |  |  ------------------
  |  |  |  Branch (87:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   88|      0|    ssl_Trace b
  ------------------
  336|      0|                     PR_GetError()));
  337|       |            /* DTLS Record Errors, including overlong records, are silently
  338|       |             * dropped [RFC6347, Section 4.1.2.7]. */
  339|      0|            return -1;
  340|      0|        }
  341|       |
  342|  12.8k|        gs->dtlsPacket.len = nb;
  343|  12.8k|    }
  344|       |
  345|  1.15M|    contentType = gs->dtlsPacket.buf[gs->dtlsPacketOffset];
  346|  1.15M|    if (dtls_IsLongHeader(ss->version, contentType)) {
  ------------------
  |  Branch (346:9): [True: 1.14M, False: 15.0k]
  ------------------
  347|  1.14M|        headerLen = 13;
  348|  1.14M|    } else if (contentType == ssl_ct_application_data) {
  ------------------
  |  Branch (348:16): [True: 3.87k, False: 11.1k]
  ------------------
  349|  3.87k|        headerLen = 7;
  350|  11.1k|    } else if (dtls_IsDtls13Ciphertext(ss->version, contentType)) {
  ------------------
  |  Branch (350:16): [True: 11.0k, False: 106]
  ------------------
  351|       |        /* We don't support CIDs.
  352|       |         *
  353|       |         * This condition is met on all invalid outer content types.
  354|       |         * For lower DTLS versions as well as the inner content types,
  355|       |         * this is checked in ssl3con.c/ssl3_HandleNonApplicationData().
  356|       |         *
  357|       |         * In DTLS generally invalid records SHOULD be silently discarded,
  358|       |         * no alert is sent [RFC6347, Section 4.1.2.7].
  359|       |         */
  360|  11.0k|        if (contentType & 0x10) {
  ------------------
  |  Branch (360:13): [True: 4, False: 11.0k]
  ------------------
  361|      4|            PORT_SetError(SSL_ERROR_RX_UNKNOWN_RECORD_TYPE);
  ------------------
  |  |   65|      4|#define PORT_SetError PORT_SetError_Util
  ------------------
  362|      4|            gs->dtlsPacketOffset = 0;
  363|      4|            gs->dtlsPacket.len = 0;
  364|      4|            return -1;
  365|      4|        }
  366|       |
  367|  11.0k|        dtlsLengthPresent = (contentType & 0x04) == 0x04;
  368|  11.0k|        PRUint8 dtlsSeqNoSize = (contentType & 0x08) ? 2 : 1;
  ------------------
  |  Branch (368:33): [True: 8.71k, False: 2.36k]
  ------------------
  369|  11.0k|        PRUint8 dtlsLengthBytes = dtlsLengthPresent ? 2 : 0;
  ------------------
  |  Branch (369:35): [True: 10.4k, False: 610]
  ------------------
  370|  11.0k|        headerLen = 1 + dtlsSeqNoSize + dtlsLengthBytes;
  371|  11.0k|    } else {
  372|    106|        SSL_DBG(("%d: SSL3[%d]: invalid first octet (%d) for DTLS",
  ------------------
  |  |   87|    106|    if (ssl_debug) \
  |  |  ------------------
  |  |  |  Branch (87:9): [True: 0, False: 106]
  |  |  ------------------
  |  |   88|    106|    ssl_Trace b
  ------------------
  373|    106|                 SSL_GETPID(), ss->fd, contentType));
  374|    106|        PORT_SetError(SSL_ERROR_RX_UNKNOWN_RECORD_TYPE);
  ------------------
  |  |   65|    106|#define PORT_SetError PORT_SetError_Util
  ------------------
  375|    106|        gs->dtlsPacketOffset = 0;
  376|    106|        gs->dtlsPacket.len = 0;
  377|    106|        return -1;
  378|    106|    }
  379|       |
  380|       |    /* At this point we should have >=1 complete records lined up in
  381|       |     * dtlsPacket. Read off the header.
  382|       |     */
  383|  1.15M|    if ((gs->dtlsPacket.len - gs->dtlsPacketOffset) < headerLen) {
  ------------------
  |  Branch (383:9): [True: 1.14k, False: 1.15M]
  ------------------
  384|  1.14k|        SSL_DBG(("%d: SSL3[%d]: rest of DTLS packet "
  ------------------
  |  |   87|  1.14k|    if (ssl_debug) \
  |  |  ------------------
  |  |  |  Branch (87:9): [True: 0, False: 1.14k]
  |  |  ------------------
  |  |   88|  1.14k|    ssl_Trace b
  ------------------
  385|  1.14k|                 "too short to contain header",
  386|  1.14k|                 SSL_GETPID(), ss->fd));
  387|  1.14k|        PORT_SetError(PR_WOULD_BLOCK_ERROR);
  ------------------
  |  |   65|  1.14k|#define PORT_SetError PORT_SetError_Util
  ------------------
                      PORT_SetError(PR_WOULD_BLOCK_ERROR);
  ------------------
  |  |   22|  1.14k|#define PR_WOULD_BLOCK_ERROR                     (-5998L)
  ------------------
  388|  1.14k|        gs->dtlsPacketOffset = 0;
  389|  1.14k|        gs->dtlsPacket.len = 0;
  390|  1.14k|        return -1;
  391|  1.14k|    }
  392|  1.15M|    memcpy(gs->hdr, SSL_BUFFER_BASE(&gs->dtlsPacket) + gs->dtlsPacketOffset,
  ------------------
  |  |   35|  1.15M|#define SSL_BUFFER_BASE(b) ((b)->buf)
  ------------------
  393|  1.15M|           headerLen);
  394|  1.15M|    gs->hdrLen = headerLen;
  395|  1.15M|    gs->dtlsPacketOffset += headerLen;
  396|       |
  397|       |    /* Have received SSL3 record header in gs->hdr. */
  398|  1.15M|    if (dtlsLengthPresent) {
  ------------------
  |  Branch (398:9): [True: 1.15M, False: 609]
  ------------------
  399|  1.15M|        gs->remainder = (gs->hdr[headerLen - 2] << 8) |
  400|  1.15M|                        gs->hdr[headerLen - 1];
  401|  1.15M|    } else {
  402|    609|        gs->remainder = gs->dtlsPacket.len - gs->dtlsPacketOffset;
  403|    609|    }
  404|       |
  405|  1.15M|    if ((gs->dtlsPacket.len - gs->dtlsPacketOffset) < gs->remainder) {
  ------------------
  |  Branch (405:9): [True: 2.42k, False: 1.15M]
  ------------------
  406|  2.42k|        SSL_DBG(("%d: SSL3[%d]: rest of DTLS packet too short "
  ------------------
  |  |   87|  2.42k|    if (ssl_debug) \
  |  |  ------------------
  |  |  |  Branch (87:9): [True: 0, False: 2.42k]
  |  |  ------------------
  |  |   88|  2.42k|    ssl_Trace b
  ------------------
  407|  2.42k|                 "to contain rest of body",
  408|  2.42k|                 SSL_GETPID(), ss->fd));
  409|  2.42k|        PORT_SetError(PR_WOULD_BLOCK_ERROR);
  ------------------
  |  |   65|  2.42k|#define PORT_SetError PORT_SetError_Util
  ------------------
                      PORT_SetError(PR_WOULD_BLOCK_ERROR);
  ------------------
  |  |   22|  2.42k|#define PR_WOULD_BLOCK_ERROR                     (-5998L)
  ------------------
  410|  2.42k|        gs->dtlsPacketOffset = 0;
  411|  2.42k|        gs->dtlsPacket.len = 0;
  412|  2.42k|        return -1;
  413|  2.42k|    }
  414|       |
  415|       |    /* OK, we have at least one complete packet, copy into inbuf */
  416|  1.15M|    gs->inbuf.len = 0;
  417|  1.15M|    rv = sslBuffer_Append(&gs->inbuf,
  418|  1.15M|                          SSL_BUFFER_BASE(&gs->dtlsPacket) + gs->dtlsPacketOffset,
  ------------------
  |  |   35|  1.15M|#define SSL_BUFFER_BASE(b) ((b)->buf)
  ------------------
  419|  1.15M|                          gs->remainder);
  420|  1.15M|    if (rv != SECSuccess) {
  ------------------
  |  Branch (420:9): [True: 0, False: 1.15M]
  ------------------
  421|      0|        return -1; /* code already set. */
  422|      0|    }
  423|  1.15M|    gs->offset = gs->remainder;
  424|  1.15M|    gs->dtlsPacketOffset += gs->remainder;
  425|  1.15M|    gs->state = GS_INIT;
  ------------------
  |  |  381|  1.15M|#define GS_INIT 0
  ------------------
  426|       |
  427|  1.15M|    SSL_TRC(20, ("%d: SSL3[%d]: dtls gathered record type=%d len=%d",
  ------------------
  |  |   71|  1.15M|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 1.15M]
  |  |  ------------------
  |  |   72|  1.15M|    ssl_Trace b
  ------------------
  428|  1.15M|                 SSL_GETPID(), ss->fd, contentType, gs->inbuf.len));
  429|  1.15M|    return 1;
  430|  1.15M|}

SSL_AuthCertificateHook:
  238|  9.36k|{
  239|  9.36k|    sslSocket *ss;
  240|       |
  241|  9.36k|    ss = ssl_FindSocket(s);
  242|  9.36k|    if (!ss) {
  ------------------
  |  Branch (242:9): [True: 0, False: 9.36k]
  ------------------
  243|      0|        SSL_DBG(("%d: SSL[%d]: bad socket in AuthCertificateHook",
  ------------------
  |  |   87|      0|    if (ssl_debug) \
  |  |  ------------------
  |  |  |  Branch (87:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   88|      0|    ssl_Trace b
  ------------------
  244|      0|                 SSL_GETPID(), s));
  245|      0|        return SECFailure;
  246|      0|    }
  247|       |
  248|  9.36k|    ss->authCertificate = func;
  249|  9.36k|    ss->authCertificateArg = arg;
  250|       |
  251|  9.36k|    return SECSuccess;
  252|  9.36k|}

ssl_GatherRecord1stHandshake:
   65|  9.36k|{
   66|  9.36k|    int rv;
   67|       |
   68|  9.36k|    PORT_Assert(ss->opt.noLocks || ssl_Have1stHandshakeLock(ss));
  ------------------
  |  |  120|  9.36k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  13.9k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 4.75k, False: 4.61k]
  |  |  |  |  |  Branch (208:7): [True: 4.61k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   69|       |
   70|  9.36k|    ssl_GetRecvBufLock(ss);
  ------------------
  |  | 1449|  9.36k|    {                                                    \
  |  | 1450|  9.36k|        if (!ss->opt.noLocks) {                          \
  |  |  ------------------
  |  |  |  Branch (1450:13): [True: 4.61k, False: 4.75k]
  |  |  ------------------
  |  | 1451|  4.61k|            PORT_Assert(!ssl_HaveSSL3HandshakeLock(ss)); \
  |  |  ------------------
  |  |  |  |  120|  4.61k|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|  4.61k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 4.61k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1452|  4.61k|            PORT_Assert(!ssl_HaveXmitBufLock(ss));       \
  |  |  ------------------
  |  |  |  |  120|  4.61k|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|  4.61k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 4.61k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1453|  4.61k|            PZ_EnterMonitor((ss)->recvBufLock);          \
  |  |  ------------------
  |  |  |  |  256|  4.61k|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1454|  4.61k|        }                                                \
  |  | 1455|  9.36k|    }
  ------------------
   71|       |
   72|       |    /* Wait for handshake to complete, or application data to arrive.  */
   73|  9.36k|    rv = ssl3_GatherCompleteHandshake(ss, 0);
   74|  9.36k|    SSL_TRC(10, ("%d: SSL[%d]: handshake gathering, rv=%d",
  ------------------
  |  |   71|  9.36k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 9.36k]
  |  |  ------------------
  |  |   72|  9.36k|    ssl_Trace b
  ------------------
   75|  9.36k|                 SSL_GETPID(), ss->fd, rv));
   76|       |
   77|  9.36k|    ssl_ReleaseRecvBufLock(ss);
  ------------------
  |  | 1457|  9.36k|    {                                          \
  |  | 1458|  9.36k|        if (!ss->opt.noLocks)                  \
  |  |  ------------------
  |  |  |  Branch (1458:13): [True: 4.61k, False: 4.75k]
  |  |  ------------------
  |  | 1459|  9.36k|            PZ_ExitMonitor((ss)->recvBufLock); \
  |  |  ------------------
  |  |  |  |  257|  4.61k|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1460|  9.36k|    }
  ------------------
   78|       |
   79|  9.36k|    if (rv <= 0) {
  ------------------
  |  Branch (79:9): [True: 8.85k, False: 514]
  ------------------
   80|  8.85k|        if (rv == 0) {
  ------------------
  |  Branch (80:13): [True: 3.11k, False: 5.74k]
  ------------------
   81|       |            /* EOF. Loser  */
   82|  3.11k|            PORT_SetError(PR_END_OF_FILE_ERROR);
  ------------------
  |  |   65|  3.11k|#define PORT_SetError PORT_SetError_Util
  ------------------
                          PORT_SetError(PR_END_OF_FILE_ERROR);
  ------------------
  |  |  202|  3.11k|#define PR_END_OF_FILE_ERROR                     (-5938L)
  ------------------
   83|  3.11k|        }
   84|  8.85k|        if (PORT_GetError() == PR_WOULD_BLOCK_ERROR) {
  ------------------
  |  |   62|  8.85k|#define PORT_GetError PORT_GetError_Util
  ------------------
                      if (PORT_GetError() == PR_WOULD_BLOCK_ERROR) {
  ------------------
  |  |   22|  8.85k|#define PR_WOULD_BLOCK_ERROR                     (-5998L)
  ------------------
  |  Branch (84:13): [True: 593, False: 8.26k]
  ------------------
   85|    593|            SSL_TRC(10, ("%d: SSL[%d]: handshake blocked (need %d)",
  ------------------
  |  |   71|    593|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 593]
  |  |  ------------------
  |  |   72|    593|    ssl_Trace b
  ------------------
   86|    593|                         SSL_GETPID(), ss->fd, ss->gs.remainder));
   87|    593|        }
   88|  8.85k|        return SECFailure; /* rv is < 0 here. */
   89|  8.85k|    }
   90|       |
   91|    514|    ss->handshake = NULL;
   92|    514|    return SECSuccess;
   93|  9.36k|}
ssl_BeginClientHandshake:
  114|  9.36k|{
  115|  9.36k|    sslSessionID *sid = NULL;
  116|  9.36k|    SECStatus rv;
  117|       |
  118|  9.36k|    PORT_Assert(ss->opt.noLocks || ssl_Have1stHandshakeLock(ss));
  ------------------
  |  |  120|  9.36k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  13.9k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 4.75k, False: 4.61k]
  |  |  |  |  |  Branch (208:7): [True: 4.61k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  119|       |
  120|  9.36k|    ss->sec.isServer = PR_FALSE;
  ------------------
  |  |  438|  9.36k|#define PR_FALSE 0
  ------------------
  121|       |
  122|  9.36k|    rv = ssl_CheckConfigSanity(ss);
  123|  9.36k|    if (rv != SECSuccess)
  ------------------
  |  Branch (123:9): [True: 0, False: 9.36k]
  ------------------
  124|      0|        goto loser;
  125|       |
  126|       |    /* Get peer name of server */
  127|  9.36k|    rv = ssl_GetPeerInfo(ss);
  128|  9.36k|    if (rv < 0) {
  ------------------
  |  Branch (128:9): [True: 0, False: 9.36k]
  ------------------
  129|       |#ifdef HPUX11
  130|       |        /*
  131|       |         * On some HP-UX B.11.00 systems, getpeername() occasionally
  132|       |         * fails with ENOTCONN after a successful completion of
  133|       |         * non-blocking connect.  I found that if we do a write()
  134|       |         * and then retry getpeername(), it will work.
  135|       |         */
  136|       |        if (PR_GetError() == PR_NOT_CONNECTED_ERROR) {
  137|       |            char dummy;
  138|       |            (void)PR_Write(ss->fd->lower, &dummy, 0);
  139|       |            rv = ssl_GetPeerInfo(ss);
  140|       |            if (rv < 0) {
  141|       |                goto loser;
  142|       |            }
  143|       |        }
  144|       |#else
  145|      0|        goto loser;
  146|      0|#endif
  147|      0|    }
  148|       |
  149|  9.36k|    SSL_TRC(3, ("%d: SSL[%d]: sending client-hello", SSL_GETPID(), ss->fd));
  ------------------
  |  |   71|  9.36k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 9.36k]
  |  |  ------------------
  |  |   72|  9.36k|    ssl_Trace b
  ------------------
  150|       |
  151|       |    /* If there's an sid set from an external cache, use it. */
  152|  9.36k|    if (ss->sec.ci.sid && ss->sec.ci.sid->cached == in_external_cache) {
  ------------------
  |  Branch (152:9): [True: 0, False: 9.36k]
  |  Branch (152:27): [True: 0, False: 0]
  ------------------
  153|      0|        sid = ss->sec.ci.sid;
  154|      0|        SSL_TRC(3, ("%d: SSL[%d]: using external token", SSL_GETPID(), ss->fd));
  ------------------
  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    ssl_Trace b
  ------------------
  155|  9.36k|    } else if (!ss->opt.noCache) {
  ------------------
  |  Branch (155:16): [True: 4.84k, False: 4.51k]
  ------------------
  156|       |        /* Try to find server in our session-id cache */
  157|  4.84k|        sid = ssl_LookupSID(ssl_Time(ss), &ss->sec.ci.peer,
  158|  4.84k|                            ss->sec.ci.port, ss->peerID, ss->url);
  159|  4.84k|    }
  160|       |
  161|  9.36k|    if (sid) {
  ------------------
  |  Branch (161:9): [True: 0, False: 9.36k]
  ------------------
  162|      0|        if (sid->version >= ss->vrange.min && sid->version <= ss->vrange.max) {
  ------------------
  |  Branch (162:13): [True: 0, False: 0]
  |  Branch (162:47): [True: 0, False: 0]
  ------------------
  163|      0|            PORT_Assert(!ss->sec.localCert);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  164|      0|            ss->sec.localCert = CERT_DupCertificate(sid->localCert);
  165|      0|        } else {
  166|      0|            ssl_UncacheSessionID(ss);
  167|      0|            ssl_FreeSID(sid);
  168|      0|            sid = NULL;
  169|      0|        }
  170|      0|    }
  171|  9.36k|    if (!sid) {
  ------------------
  |  Branch (171:9): [True: 9.36k, False: 0]
  ------------------
  172|  9.36k|        sid = ssl3_NewSessionID(ss, PR_FALSE);
  ------------------
  |  |  438|  9.36k|#define PR_FALSE 0
  ------------------
  173|  9.36k|        if (!sid) {
  ------------------
  |  Branch (173:13): [True: 0, False: 9.36k]
  ------------------
  174|      0|            goto loser;
  175|      0|        }
  176|       |        /* This session is a dummy, which we don't want to resume. */
  177|  9.36k|        sid->u.ssl3.keys.resumable = PR_FALSE;
  ------------------
  |  |  438|  9.36k|#define PR_FALSE 0
  ------------------
  178|  9.36k|    }
  179|  9.36k|    ss->sec.ci.sid = sid;
  180|       |
  181|  9.36k|    ss->gs.state = GS_INIT;
  ------------------
  |  |  381|  9.36k|#define GS_INIT 0
  ------------------
  182|  9.36k|    ss->handshake = ssl_GatherRecord1stHandshake;
  183|       |
  184|       |    /* ssl3_SendClientHello will override this if it succeeds. */
  185|  9.36k|    ss->version = SSL_LIBRARY_VERSION_3_0;
  ------------------
  |  |   17|  9.36k|#define SSL_LIBRARY_VERSION_3_0                 0x0300
  ------------------
  186|       |
  187|  9.36k|    ssl_GetSSL3HandshakeLock(ss);
  ------------------
  |  | 1407|  9.36k|    {                                                 \
  |  | 1408|  9.36k|        if (!ss->opt.noLocks) {                       \
  |  |  ------------------
  |  |  |  Branch (1408:13): [True: 4.61k, False: 4.75k]
  |  |  ------------------
  |  | 1409|  4.61k|            PORT_Assert(!ssl_HaveXmitBufLock(ss));    \
  |  |  ------------------
  |  |  |  |  120|  4.61k|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|  4.61k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 4.61k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1410|  4.61k|            PZ_EnterMonitor((ss)->ssl3HandshakeLock); \
  |  |  ------------------
  |  |  |  |  256|  4.61k|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1411|  4.61k|        }                                             \
  |  | 1412|  9.36k|    }
  ------------------
  188|  9.36k|    ssl_GetXmitBufLock(ss);
  ------------------
  |  | 1466|  9.36k|    {                                           \
  |  | 1467|  9.36k|        if (!ss->opt.noLocks)                   \
  |  |  ------------------
  |  |  |  Branch (1467:13): [True: 4.61k, False: 4.75k]
  |  |  ------------------
  |  | 1468|  9.36k|            PZ_EnterMonitor((ss)->xmitBufLock); \
  |  |  ------------------
  |  |  |  |  256|  4.61k|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1469|  9.36k|    }
  ------------------
  189|  9.36k|    rv = ssl3_SendClientHello(ss, client_hello_initial);
  190|  9.36k|    ssl_ReleaseXmitBufLock(ss);
  ------------------
  |  | 1471|  9.36k|    {                                          \
  |  | 1472|  9.36k|        if (!ss->opt.noLocks)                  \
  |  |  ------------------
  |  |  |  Branch (1472:13): [True: 4.61k, False: 4.75k]
  |  |  ------------------
  |  | 1473|  9.36k|            PZ_ExitMonitor((ss)->xmitBufLock); \
  |  |  ------------------
  |  |  |  |  257|  4.61k|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1474|  9.36k|    }
  ------------------
  191|  9.36k|    ssl_ReleaseSSL3HandshakeLock(ss);
  ------------------
  |  | 1414|  9.36k|    {                                                \
  |  | 1415|  9.36k|        if (!ss->opt.noLocks)                        \
  |  |  ------------------
  |  |  |  Branch (1415:13): [True: 4.61k, False: 4.75k]
  |  |  ------------------
  |  | 1416|  9.36k|            PZ_ExitMonitor((ss)->ssl3HandshakeLock); \
  |  |  ------------------
  |  |  |  |  257|  4.61k|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1417|  9.36k|    }
  ------------------
  192|       |
  193|  9.36k|    return rv;
  194|       |
  195|      0|loser:
  196|      0|    return SECFailure;
  197|  9.36k|}
sslcon.c:ssl_CheckConfigSanity:
   99|  9.36k|{
  100|  9.36k|    if (SSL_ALL_VERSIONS_DISABLED(&ss->vrange)) {
  ------------------
  |  | 1503|  9.36k|    ((vrange)->min == SSL_LIBRARY_VERSION_NONE)
  |  |  ------------------
  |  |  |  | 1481|  9.36k|#define SSL_LIBRARY_VERSION_NONE 0
  |  |  ------------------
  |  |  |  Branch (1503:5): [True: 0, False: 9.36k]
  |  |  ------------------
  ------------------
  101|      0|        SSL_DBG(("%d: SSL[%d]: Can't handshake! all versions disabled.",
  ------------------
  |  |   87|      0|    if (ssl_debug) \
  |  |  ------------------
  |  |  |  Branch (87:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   88|      0|    ssl_Trace b
  ------------------
  102|      0|                 SSL_GETPID(), ss->fd));
  103|      0|        PORT_SetError(SSL_ERROR_SSL_DISABLED);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  104|      0|        return SECFailure;
  105|      0|    }
  106|  9.36k|    return SECSuccess;
  107|  9.36k|}

ssl_DefRecv:
   65|  16.8k|{
   66|  16.8k|    PRFileDesc *lower = ss->fd->lower;
   67|  16.8k|    int rv;
   68|       |
   69|  16.8k|    PORT_Assert(buf && len > 0);
  ------------------
  |  |  120|  16.8k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  33.7k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 16.8k, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 16.8k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   70|       |
   71|  16.8k|    rv = lower->methods->recv(lower, (void *)buf, len, flags, ss->rTimeout);
   72|  16.8k|    if (rv < 0) {
  ------------------
  |  Branch (72:9): [True: 0, False: 16.8k]
  ------------------
   73|      0|        DEFINE_ERROR
   74|      0|        MAP_ERROR(PR_SOCKET_SHUTDOWN_ERROR, PR_CONNECT_RESET_ERROR)
   75|  16.8k|    } else if (rv > len) {
  ------------------
  |  Branch (75:16): [True: 0, False: 16.8k]
  ------------------
   76|      0|        PORT_Assert(rv <= len);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   77|      0|        PORT_SetError(PR_BUFFER_OVERFLOW_ERROR);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
                      PORT_SetError(PR_BUFFER_OVERFLOW_ERROR);
  ------------------
  |  |  130|      0|#define PR_BUFFER_OVERFLOW_ERROR                 (-5962L)
  ------------------
   78|      0|        rv = SECFailure;
   79|      0|    }
   80|  16.8k|    return rv;
   81|  16.8k|}
ssl_DefSend:
   91|  17.6k|{
   92|  17.6k|    PRFileDesc *lower = ss->fd->lower;
   93|  17.6k|    int sent = 0;
   94|       |
   95|       |#if NSS_DISABLE_NAGLE_DELAYS
   96|       |    /* Although this is overkill, we disable Nagle delays completely for
   97|       |    ** SSL sockets.
   98|       |    */
   99|       |    if (ss->opt.useSecurity && !ss->delayDisabled) {
  100|       |        ssl_EnableNagleDelay(ss, PR_FALSE); /* ignore error */
  101|       |        ss->delayDisabled = 1;
  102|       |    }
  103|       |#endif
  104|  17.6k|    do {
  105|  17.6k|        int rv = lower->methods->send(lower, (const void *)(buf + sent),
  106|  17.6k|                                      len - sent, flags, ss->wTimeout);
  107|  17.6k|        if (rv < 0) {
  ------------------
  |  Branch (107:13): [True: 0, False: 17.6k]
  ------------------
  108|      0|            PRErrorCode err = PR_GetError();
  109|      0|            if (err == PR_WOULD_BLOCK_ERROR) {
  ------------------
  |  |   22|      0|#define PR_WOULD_BLOCK_ERROR                     (-5998L)
  ------------------
  |  Branch (109:17): [True: 0, False: 0]
  ------------------
  110|      0|                ss->lastWriteBlocked = 1;
  111|      0|                return sent ? sent : SECFailure;
  ------------------
  |  Branch (111:24): [True: 0, False: 0]
  ------------------
  112|      0|            }
  113|      0|            ss->lastWriteBlocked = 0;
  114|      0|            MAP_ERROR(PR_CONNECT_ABORTED_ERROR, PR_CONNECT_RESET_ERROR)
  115|       |            /* Loser */
  116|      0|            return rv;
  117|      0|        }
  118|  17.6k|        sent += rv;
  119|       |
  120|  17.6k|        if (IS_DTLS(ss) && (len > sent)) {
  ------------------
  |  |  892|  35.3k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 17.6k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (120:28): [True: 0, False: 17.6k]
  ------------------
  121|       |            /* We got a partial write so just return it */
  122|      0|            return sent;
  123|      0|        }
  124|  17.6k|    } while (len > sent);
  ------------------
  |  Branch (124:14): [True: 0, False: 17.6k]
  ------------------
  125|  17.6k|    ss->lastWriteBlocked = 0;
  126|  17.6k|    return sent;
  127|  17.6k|}
ssl_DefGetpeername:
  171|  9.36k|{
  172|  9.36k|    PRFileDesc *lower = ss->fd->lower;
  173|  9.36k|    int rv;
  174|       |
  175|  9.36k|    rv = lower->methods->getpeername(lower, name);
  176|  9.36k|    return rv;
  177|  9.36k|}
ssl_DefClose:
  191|  9.36k|{
  192|  9.36k|    PRFileDesc *fd;
  193|  9.36k|    PRFileDesc *popped;
  194|  9.36k|    int rv;
  195|       |
  196|  9.36k|    fd = ss->fd;
  197|       |
  198|       |    /* First, remove the SSL layer PRFileDesc from the socket's stack,
  199|       |    ** then invoke the SSL layer's PRFileDesc destructor.
  200|       |    ** This must happen before the next layer down is closed.
  201|       |    */
  202|  9.36k|    PORT_Assert(fd->higher == NULL);
  ------------------
  |  |  120|  9.36k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  9.36k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 9.36k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  203|  9.36k|    if (fd->higher) {
  ------------------
  |  Branch (203:9): [True: 0, False: 9.36k]
  ------------------
  204|      0|        PORT_SetError(PR_BAD_DESCRIPTOR_ERROR);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
                      PORT_SetError(PR_BAD_DESCRIPTOR_ERROR);
  ------------------
  |  |   19|      0|#define PR_BAD_DESCRIPTOR_ERROR                  (-5999L)
  ------------------
  205|      0|        return SECFailure;
  206|      0|    }
  207|  9.36k|    ss->fd = NULL;
  208|       |
  209|       |    /* PR_PopIOLayer will swap the contents of the top two PRFileDescs on
  210|       |    ** the stack, and then remove the second one.  This way, the address
  211|       |    ** of the PRFileDesc on the top of the stack doesn't change.
  212|       |    */
  213|  9.36k|    popped = PR_PopIOLayer(fd, PR_TOP_IO_LAYER);
  ------------------
  |  |  453|  9.36k|#define PR_TOP_IO_LAYER (PRDescIdentity)-2
  ------------------
  214|  9.36k|    popped->dtor(popped);
  215|       |
  216|       |    /* fd is now the PRFileDesc for the next layer down.
  217|       |    ** Now close the underlying socket.
  218|       |    */
  219|  9.36k|    rv = fd->methods->close(fd);
  220|       |
  221|  9.36k|    ssl_FreeSocket(ss);
  222|       |
  223|  9.36k|    SSL_TRC(5, ("%d: SSL[%d]: closing, rv=%d errno=%d",
  ------------------
  |  |   71|  9.36k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 9.36k]
  |  |  ------------------
  |  |   72|  9.36k|    ssl_Trace b
  ------------------
  224|  9.36k|                SSL_GETPID(), fd, rv, PORT_GetError()));
  225|  9.36k|    return rv;
  226|  9.36k|}

sslBuffer_Grow:
   32|  3.65M|{
   33|  3.65M|    PORT_Assert(b);
  ------------------
  |  |  120|  3.65M|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  3.65M|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 3.65M, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   34|  3.65M|    if (b->fixed) {
  ------------------
  |  Branch (34:9): [True: 515k, False: 3.14M]
  ------------------
   35|   515k|        PORT_Assert(newLen <= b->space);
  ------------------
  |  |  120|   515k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|   515k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 515k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   36|   515k|        if (newLen > b->space) {
  ------------------
  |  Branch (36:13): [True: 0, False: 515k]
  ------------------
   37|      0|            PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
   38|      0|            return SECFailure;
   39|      0|        }
   40|   515k|        return SECSuccess;
   41|   515k|    }
   42|       |
   43|       |    /* If buf is non-NULL, space must be non-zero;
   44|       |     * if buf is NULL, space must be zero. */
   45|  3.14M|    PORT_Assert((b->buf && b->space) || (!b->buf && !b->space));
  ------------------
  |  |  120|  3.14M|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  11.9M|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 1.88M, False: 1.26M]
  |  |  |  |  |  Branch (208:7): [True: 1.88M, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 1.26M, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 1.26M, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   46|  3.14M|    if (newLen > b->space) {
  ------------------
  |  Branch (46:9): [True: 203k, False: 2.94M]
  ------------------
   47|   203k|        newLen = PR_MAX(newLen, b->space + 2048);
  ------------------
  |  |  159|   203k|#define PR_MAX(x,y)     ((x)>(y)?(x):(y))
  |  |  ------------------
  |  |  |  Branch (159:26): [True: 61.4k, False: 141k]
  |  |  ------------------
  ------------------
   48|   203k|        unsigned char *newBuf;
   49|   203k|        if (b->buf) {
  ------------------
  |  Branch (49:13): [True: 1.20k, False: 202k]
  ------------------
   50|  1.20k|            newBuf = (unsigned char *)PORT_Realloc(b->buf, newLen);
  ------------------
  |  |   64|  1.20k|#define PORT_Realloc PORT_Realloc_Util
  ------------------
   51|   202k|        } else {
   52|   202k|            newBuf = (unsigned char *)PORT_Alloc(newLen);
  ------------------
  |  |   52|   202k|#define PORT_Alloc PORT_Alloc_Util
  ------------------
   53|   202k|        }
   54|   203k|        if (!newBuf) {
  ------------------
  |  Branch (54:13): [True: 0, False: 203k]
  ------------------
   55|      0|            return SECFailure;
   56|      0|        }
   57|   203k|        b->buf = newBuf;
   58|   203k|        b->space = newLen;
   59|   203k|    }
   60|  3.14M|    return SECSuccess;
   61|  3.14M|}
sslBuffer_Append:
   81|  1.35M|{
   82|  1.35M|    SECStatus rv = sslBuffer_Grow(b, b->len + len);
   83|  1.35M|    if (rv != SECSuccess) {
  ------------------
  |  Branch (83:9): [True: 0, False: 1.35M]
  ------------------
   84|      0|        return SECFailure; /* Code already set. */
   85|      0|    }
   86|  1.35M|    if (len > 0) {
  ------------------
  |  Branch (86:9): [True: 288k, False: 1.06M]
  ------------------
   87|   288k|        PORT_Assert(data);
  ------------------
  |  |  120|   288k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|   288k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 288k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   88|   288k|        PORT_Memcpy(SSL_BUFFER_NEXT(b), data, len);
  ------------------
  |  |  180|   288k|#define PORT_Memcpy memcpy
  ------------------
                      PORT_Memcpy(SSL_BUFFER_NEXT(b), data, len);
  ------------------
  |  |   37|   288k|#define SSL_BUFFER_NEXT(b) ((b)->buf + (b)->len)
  ------------------
   89|   288k|    }
   90|  1.35M|    b->len += len;
   91|  1.35M|    return SECSuccess;
   92|  1.35M|}
sslBuffer_AppendNumber:
   96|  1.96M|{
   97|  1.96M|    SECStatus rv = sslBuffer_Grow(b, b->len + size);
   98|  1.96M|    if (rv != SECSuccess) {
  ------------------
  |  Branch (98:9): [True: 0, False: 1.96M]
  ------------------
   99|      0|        return SECFailure;
  100|      0|    }
  101|  1.96M|    ssl_EncodeUintX(SSL_BUFFER_NEXT(b), v, size);
  ------------------
  |  |   37|  1.96M|#define SSL_BUFFER_NEXT(b) ((b)->buf + (b)->len)
  ------------------
  102|  1.96M|    b->len += size;
  103|  1.96M|    return SECSuccess;
  104|  1.96M|}
sslBuffer_AppendVariable:
  109|  74.7k|{
  110|  74.7k|    PORT_Assert(size <= 4 && size > 0);
  ------------------
  |  |  120|  74.7k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|   149k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 74.7k, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 74.7k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  111|  74.7k|    PORT_Assert(b);
  ------------------
  |  |  120|  74.7k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  74.7k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 74.7k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  112|  74.7k|    if (len >= (1ULL << (8 * size))) {
  ------------------
  |  Branch (112:9): [True: 0, False: 74.7k]
  ------------------
  113|      0|        PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  114|      0|        return SECFailure;
  115|      0|    }
  116|       |
  117|  74.7k|    if (sslBuffer_Grow(b, b->len + len + size) != SECSuccess) {
  ------------------
  |  Branch (117:9): [True: 0, False: 74.7k]
  ------------------
  118|      0|        return SECFailure;
  119|      0|    }
  120|       |
  121|  74.7k|    ssl_EncodeUintX(SSL_BUFFER_NEXT(b), len, size);
  ------------------
  |  |   37|  74.7k|#define SSL_BUFFER_NEXT(b) ((b)->buf + (b)->len)
  ------------------
  122|  74.7k|    b->len += size;
  123|  74.7k|    if (len != 0) {
  ------------------
  |  Branch (123:9): [True: 42.0k, False: 32.6k]
  ------------------
  124|  42.0k|        PORT_Assert(data);
  ------------------
  |  |  120|  42.0k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  42.0k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 42.0k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  125|       |        /* We sometimes pass NULL, 0 and memcpy() doesn't want NULL. */
  126|  42.0k|        PORT_Memcpy(SSL_BUFFER_NEXT(b), data, len);
  ------------------
  |  |  180|  42.0k|#define PORT_Memcpy memcpy
  ------------------
                      PORT_Memcpy(SSL_BUFFER_NEXT(b), data, len);
  ------------------
  |  |   37|  42.0k|#define SSL_BUFFER_NEXT(b) ((b)->buf + (b)->len)
  ------------------
  127|  42.0k|    }
  128|  74.7k|    b->len += len;
  129|  74.7k|    return SECSuccess;
  130|  74.7k|}
sslBuffer_AppendBuffer:
  134|  6.49k|{
  135|  6.49k|    return sslBuffer_Append(b, append->buf, append->len);
  136|  6.49k|}
sslBuffer_Skip:
  147|   121k|{
  148|   121k|    if (sslBuffer_Grow(b, b->len + size) != SECSuccess) {
  ------------------
  |  Branch (148:9): [True: 0, False: 121k]
  ------------------
  149|      0|        return SECFailure;
  150|      0|    }
  151|       |
  152|   121k|    if (savedOffset) {
  ------------------
  |  Branch (152:9): [True: 77.4k, False: 43.8k]
  ------------------
  153|  77.4k|        *savedOffset = b->len;
  154|  77.4k|    }
  155|   121k|    b->len += size;
  156|   121k|    return SECSuccess;
  157|   121k|}
sslBuffer_InsertLength:
  170|  77.4k|{
  171|  77.4k|    unsigned int len;
  172|       |
  173|  77.4k|    PORT_Assert(b->len >= at + size);
  ------------------
  |  |  120|  77.4k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  77.4k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 77.4k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  174|  77.4k|    PORT_Assert(b->space >= at + size);
  ------------------
  |  |  120|  77.4k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  77.4k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 77.4k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  175|  77.4k|    len = b->len - (at + size);
  176|       |
  177|  77.4k|    PORT_Assert(size <= 4 && size > 0);
  ------------------
  |  |  120|  77.4k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|   154k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 77.4k, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 77.4k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  178|  77.4k|    if (len >= (1ULL << (8 * size))) {
  ------------------
  |  Branch (178:9): [True: 0, False: 77.4k]
  ------------------
  179|      0|        PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  180|      0|        return SECFailure;
  181|      0|    }
  182|       |
  183|  77.4k|    ssl_EncodeUintX(SSL_BUFFER_BASE(b) + at, len, size);
  ------------------
  |  |   35|  77.4k|#define SSL_BUFFER_BASE(b) ((b)->buf)
  ------------------
  184|  77.4k|    return SECSuccess;
  185|  77.4k|}
sslBuffer_InsertNumber:
  190|  44.0k|{
  191|  44.0k|    PORT_Assert(b->len >= at + size);
  ------------------
  |  |  120|  44.0k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  44.0k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 44.0k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  192|  44.0k|    PORT_Assert(b->space >= at + size);
  ------------------
  |  |  120|  44.0k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  44.0k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 44.0k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  193|       |
  194|  44.0k|    PORT_Assert(size <= 4 && size > 0);
  ------------------
  |  |  120|  44.0k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  88.0k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 44.0k, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 44.0k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  195|  44.0k|    if (v >= (1ULL << (8 * size))) {
  ------------------
  |  Branch (195:9): [True: 0, False: 44.0k]
  ------------------
  196|      0|        PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  197|      0|        return SECFailure;
  198|      0|    }
  199|       |
  200|  44.0k|    ssl_EncodeUintX(SSL_BUFFER_BASE(b) + at, v, size);
  ------------------
  |  |   35|  44.0k|#define SSL_BUFFER_BASE(b) ((b)->buf)
  ------------------
  201|  44.0k|    return SECSuccess;
  202|  44.0k|}
sslBuffer_Clear:
  206|  1.24M|{
  207|  1.24M|    if (!b->fixed) {
  ------------------
  |  Branch (207:9): [True: 1.24M, False: 0]
  ------------------
  208|  1.24M|        if (b->buf) {
  ------------------
  |  Branch (208:13): [True: 161k, False: 1.08M]
  ------------------
  209|   161k|            PORT_Free(b->buf);
  ------------------
  |  |   60|   161k|#define PORT_Free PORT_Free_Util
  ------------------
  210|   161k|            b->buf = NULL;
  211|   161k|        }
  212|  1.24M|        b->space = 0;
  213|  1.24M|    }
  214|  1.24M|    b->len = 0;
  215|  1.24M|}
sslRead_Read:
  219|  1.53k|{
  220|  1.53k|    if (!reader || !out) {
  ------------------
  |  Branch (220:9): [True: 0, False: 1.53k]
  |  Branch (220:20): [True: 0, False: 1.53k]
  ------------------
  221|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  222|      0|        return SECFailure;
  223|      0|    }
  224|  1.53k|    if (reader->buf.len < reader->offset ||
  ------------------
  |  Branch (224:9): [True: 0, False: 1.53k]
  ------------------
  225|  1.53k|        count > SSL_READER_REMAINING(reader)) {
  ------------------
  |  |   91|  1.53k|    ((r)->buf.len - (r)->offset)
  ------------------
  |  Branch (225:9): [True: 17, False: 1.51k]
  ------------------
  226|     17|        PORT_SetError(SEC_ERROR_BAD_DATA);
  ------------------
  |  |   65|     17|#define PORT_SetError PORT_SetError_Util
  ------------------
  227|     17|        return SECFailure;
  228|     17|    }
  229|       |
  230|  1.51k|    out->buf = SSL_READER_CURRENT(reader);
  ------------------
  |  |   89|  1.51k|    ((r)->buf.buf + (r)->offset)
  ------------------
  231|  1.51k|    out->len = count;
  232|  1.51k|    reader->offset += count;
  233|       |
  234|  1.51k|    return SECSuccess;
  235|  1.53k|}
sslRead_ReadVariable:
  239|  1.54k|{
  240|  1.54k|    PRUint64 variableLen = 0;
  241|  1.54k|    SECStatus rv = sslRead_ReadNumber(reader, sizeLen, &variableLen);
  242|  1.54k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (242:9): [True: 10, False: 1.53k]
  ------------------
  243|     10|        PORT_SetError(SEC_ERROR_BAD_DATA);
  ------------------
  |  |   65|     10|#define PORT_SetError PORT_SetError_Util
  ------------------
  244|     10|        return SECFailure;
  245|     10|    }
  246|  1.53k|    if (!variableLen) {
  ------------------
  |  Branch (246:9): [True: 4, False: 1.53k]
  ------------------
  247|       |        // It is ok to have an empty variable.
  248|      4|        out->len = variableLen;
  249|      4|        return SECSuccess;
  250|      4|    }
  251|  1.53k|    return sslRead_Read(reader, variableLen, out);
  252|  1.53k|}
sslRead_ReadNumber:
  256|   733k|{
  257|   733k|    if (!reader || !num) {
  ------------------
  |  Branch (257:9): [True: 0, False: 733k]
  |  Branch (257:20): [True: 0, False: 733k]
  ------------------
  258|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  259|      0|        return SECFailure;
  260|      0|    }
  261|   733k|    if (reader->buf.len < reader->offset ||
  ------------------
  |  Branch (261:9): [True: 0, False: 733k]
  ------------------
  262|   733k|        bytes > SSL_READER_REMAINING(reader) ||
  ------------------
  |  |   91|  1.46M|    ((r)->buf.len - (r)->offset)
  ------------------
  |  Branch (262:9): [True: 11, False: 733k]
  ------------------
  263|   733k|        bytes > 8) {
  ------------------
  |  Branch (263:9): [True: 0, False: 733k]
  ------------------
  264|     11|        PORT_SetError(SEC_ERROR_BAD_DATA);
  ------------------
  |  |   65|     11|#define PORT_SetError PORT_SetError_Util
  ------------------
  265|     11|        return SECFailure;
  266|     11|    }
  267|   733k|    unsigned int i;
  268|   733k|    PRUint64 number = 0;
  269|  5.12M|    for (i = 0; i < bytes; i++) {
  ------------------
  |  Branch (269:17): [True: 4.38M, False: 733k]
  ------------------
  270|  4.38M|        number = (number << 8) + reader->buf.buf[i + reader->offset];
  271|  4.38M|    }
  272|       |
  273|   733k|    reader->offset = reader->offset + bytes;
  274|   733k|    *num = number;
  275|   733k|    return SECSuccess;
  276|   733k|}
ssl3_AppendHandshakeSuppressHash:
  334|  9.52k|{
  335|  9.52k|    return ssl3_AppendHandshakeInternal(ss, void_src, bytes, PR_TRUE);
  ------------------
  |  |  437|  9.52k|#define PR_TRUE 1
  ------------------
  336|  9.52k|}
ssl3_AppendHandshake:
  340|  4.72k|{
  341|  4.72k|    return ssl3_AppendHandshakeInternal(ss, void_src, bytes, PR_FALSE);
  ------------------
  |  |  438|  4.72k|#define PR_FALSE 0
  ------------------
  342|  4.72k|}
ssl3_AppendHandshakeNumberSuppressHash:
  346|  17.9k|{
  347|  17.9k|    if ((lenSize > 8) || ((lenSize < 8) && (num >= (1ULL << (8 * lenSize))))) {
  ------------------
  |  Branch (347:9): [True: 0, False: 17.9k]
  |  Branch (347:27): [True: 17.9k, False: 0]
  |  Branch (347:44): [True: 0, False: 17.9k]
  ------------------
  348|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  349|      0|        return SECFailure;
  350|      0|    }
  351|       |
  352|  17.9k|    PRUint8 b[sizeof(num)];
  353|  17.9k|    SSL_TRC(60, ("%d: number:", SSL_GETPID()));
  ------------------
  |  |   71|  17.9k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 17.9k]
  |  |  ------------------
  |  |   72|  17.9k|    ssl_Trace b
  ------------------
  354|  17.9k|    ssl_EncodeUintX(b, num, lenSize);
  355|  17.9k|    return ssl3_AppendHandshakeInternal(ss, b, lenSize, suppressHash);
  356|  17.9k|}
ssl3_AppendHandshakeNumber:
  360|  8.14k|{
  361|  8.14k|    return ssl3_AppendHandshakeNumberSuppressHash(ss, num, lenSize, PR_FALSE);
  ------------------
  |  |  438|  8.14k|#define PR_FALSE 0
  ------------------
  362|  8.14k|}
ssl3_AppendHandshakeVariable:
  367|  1.62k|{
  368|  1.62k|    SECStatus rv;
  369|       |
  370|  1.62k|    PORT_Assert((bytes < (1 << 8) && lenSize == 1) ||
  ------------------
  |  |  120|  1.62k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  10.2k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 1.59k, False: 29]
  |  |  |  |  |  Branch (208:7): [True: 357, False: 1.23k]
  |  |  |  |  |  Branch (208:7): [True: 1.26k, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 1.26k, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  371|  1.62k|                (bytes < (1L << 16) && lenSize == 2) ||
  372|  1.62k|                (bytes < (1L << 24) && lenSize == 3));
  373|       |
  374|  1.62k|    SSL_TRC(60, ("%d: append variable:", SSL_GETPID()));
  ------------------
  |  |   71|  1.62k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 1.62k]
  |  |  ------------------
  |  |   72|  1.62k|    ssl_Trace b
  ------------------
  375|  1.62k|    rv = ssl3_AppendHandshakeNumber(ss, bytes, lenSize);
  376|  1.62k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (376:9): [True: 0, False: 1.62k]
  ------------------
  377|      0|        return SECFailure; /* error code set by AppendHandshake. */
  378|      0|    }
  379|  1.62k|    SSL_TRC(60, ("data:"));
  ------------------
  |  |   71|  1.62k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 1.62k]
  |  |  ------------------
  |  |   72|  1.62k|    ssl_Trace b
  ------------------
  380|  1.62k|    return ssl3_AppendHandshake(ss, src, bytes);
  381|  1.62k|}
ssl3_MaybeUpdateHashWithSavedRecord:
  398|  8.45k|{
  399|  8.45k|    SECStatus rv;
  400|       |    /* dtls13ClientMessageBuffer is not empty if ClientHello has sent DTLS1.3 */
  401|  8.45k|    if (ss->ssl3.hs.dtls13ClientMessageBuffer.len == 0) {
  ------------------
  |  Branch (401:9): [True: 1.01k, False: 7.44k]
  ------------------
  402|  1.01k|        return SECSuccess;
  403|  1.01k|    }
  404|       |
  405|  7.44k|    size_t offset = 0;
  406|       |
  407|       |    /* the first clause checks the version that was received in ServerHello:
  408|       |     * only if it's DTLS1.3, we remove the necessary fields.
  409|       |     * the second clause checks if we send 0rtt (see TestTls13ZeroRttDowngrade).
  410|       |     */
  411|  7.44k|    if ((ss->version == ss->ssl3.cwSpec->version || ss->ssl3.hs.zeroRttState == ssl_0rtt_sent)) {
  ------------------
  |  Branch (411:10): [True: 2.87k, False: 4.56k]
  |  Branch (411:53): [True: 0, False: 4.56k]
  ------------------
  412|  2.87k|        if (ss->ssl3.hs.dtls13ClientMessageBuffer.len < 12) {
  ------------------
  |  Branch (412:13): [True: 0, False: 2.87k]
  ------------------
  413|      0|            PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  414|      0|            return SECFailure;
  415|      0|        }
  416|       |
  417|  2.87k|        rv = ssl3_UpdateHandshakeHashes(ss, ss->ssl3.hs.dtls13ClientMessageBuffer.buf, 4);
  418|  2.87k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (418:13): [True: 0, False: 2.87k]
  ------------------
  419|      0|            return SECFailure;
  420|      0|        }
  421|  2.87k|        offset = 12;
  422|  2.87k|    }
  423|       |
  424|  7.44k|    PORT_Assert(offset < ss->ssl3.hs.dtls13ClientMessageBuffer.len);
  ------------------
  |  |  120|  7.44k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  7.44k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 7.44k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  425|  7.44k|    rv = ssl3_UpdateHandshakeHashes(ss, ss->ssl3.hs.dtls13ClientMessageBuffer.buf + offset,
  426|  7.44k|                                    ss->ssl3.hs.dtls13ClientMessageBuffer.len - offset);
  427|  7.44k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (427:9): [True: 0, False: 7.44k]
  ------------------
  428|      0|        return SECFailure;
  429|      0|    }
  430|       |
  431|  7.44k|    sslBuffer_Clear(&ss->ssl3.hs.dtls13ClientMessageBuffer);
  432|  7.44k|    ss->ssl3.hs.dtls13ClientMessageBuffer.len = 0;
  433|  7.44k|    return SECSuccess;
  434|  7.44k|}
sslencode.c:ssl_EncodeUintX:
   18|  2.18M|{
   19|  2.18M|    PRUint64 encoded;
   20|       |
   21|  2.18M|    PORT_Assert(bytes > 0 && bytes <= sizeof(encoded));
  ------------------
  |  |  120|  2.18M|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  4.36M|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 2.18M, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 2.18M, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   22|       |
   23|  2.18M|    encoded = PR_htonll(value);
   24|  2.18M|    PORT_Memcpy(to, ((unsigned char *)(&encoded)) + (sizeof(encoded) - bytes),
  ------------------
  |  |  180|  2.18M|#define PORT_Memcpy memcpy
  ------------------
   25|  2.18M|                bytes);
   26|  2.18M|}
sslencode.c:ssl3_AppendHandshakeInternal:
  288|  32.1k|{
  289|  32.1k|    unsigned char *src = (unsigned char *)void_src;
  290|  32.1k|    int room = ss->sec.ci.sendBuf.space - ss->sec.ci.sendBuf.len;
  291|  32.1k|    SECStatus rv;
  292|       |
  293|  32.1k|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss)); /* protects sendBuf. */
  ------------------
  |  |  120|  32.1k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  47.8k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 16.4k, False: 15.7k]
  |  |  |  |  |  Branch (208:7): [True: 15.7k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  294|       |
  295|  32.1k|    if (!bytes)
  ------------------
  |  Branch (295:9): [True: 0, False: 32.1k]
  ------------------
  296|      0|        return SECSuccess;
  297|  32.1k|    if (ss->sec.ci.sendBuf.space < MAX_SEND_BUF_LENGTH && room < bytes) {
  ------------------
  |  |  283|  64.3k|#define MAX_SEND_BUF_LENGTH 32000 /* watch for 16-bit integer overflow */
  ------------------
  |  Branch (297:9): [True: 32.1k, False: 0]
  |  Branch (297:59): [True: 9.36k, False: 22.7k]
  ------------------
  298|  9.36k|        rv = sslBuffer_Grow(&ss->sec.ci.sendBuf, PR_MAX(MIN_SEND_BUF_LENGTH,
  ------------------
  |  |  159|  18.7k|#define PR_MAX(x,y)     ((x)>(y)?(x):(y))
  |  |  ------------------
  |  |  |  Branch (159:26): [True: 9.36k, False: 0]
  |  |  |  Branch (159:31): [True: 0, False: 9.36k]
  |  |  |  Branch (159:39): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  299|  9.36k|                                                        PR_MIN(MAX_SEND_BUF_LENGTH, ss->sec.ci.sendBuf.len + bytes)));
  300|  9.36k|        if (rv != SECSuccess)
  ------------------
  |  Branch (300:13): [True: 0, False: 9.36k]
  ------------------
  301|      0|            return SECFailure; /* sslBuffer_Grow sets a memory error code. */
  302|  9.36k|        room = ss->sec.ci.sendBuf.space - ss->sec.ci.sendBuf.len;
  303|  9.36k|    }
  304|       |
  305|  32.1k|    PRINT_BUF(60, (ss, "Append to Handshake", (unsigned char *)void_src, bytes));
  ------------------
  |  |   74|  32.1k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 32.1k]
  |  |  ------------------
  |  |   75|  32.1k|    ssl_PrintBuf b
  ------------------
  306|       |    // TODO: Move firstHsDone and version check into callers as a suppression.
  307|  32.1k|    if (!suppressHash && (!ss->firstHsDone || ss->version < SSL_LIBRARY_VERSION_TLS_1_3)) {
  ------------------
  |  |   21|      0|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (307:9): [True: 22.6k, False: 9.52k]
  |  Branch (307:27): [True: 22.6k, False: 0]
  |  Branch (307:47): [True: 0, False: 0]
  ------------------
  308|  22.6k|        rv = ssl3_UpdateHandshakeHashes(ss, src, bytes);
  309|  22.6k|        if (rv != SECSuccess)
  ------------------
  |  Branch (309:13): [True: 0, False: 22.6k]
  ------------------
  310|      0|            return SECFailure; /* error code set by ssl3_UpdateHandshakeHashes */
  311|  22.6k|    }
  312|       |
  313|  32.1k|    while (bytes > room) {
  ------------------
  |  Branch (313:12): [True: 0, False: 32.1k]
  ------------------
  314|      0|        if (room > 0)
  ------------------
  |  Branch (314:13): [True: 0, False: 0]
  ------------------
  315|      0|            PORT_Memcpy(ss->sec.ci.sendBuf.buf + ss->sec.ci.sendBuf.len, src,
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
  316|      0|                        room);
  317|      0|        ss->sec.ci.sendBuf.len += room;
  318|      0|        rv = ssl3_FlushHandshake(ss, ssl_SEND_FLAG_FORCE_INTO_BUFFER);
  ------------------
  |  |  223|      0|#define ssl_SEND_FLAG_FORCE_INTO_BUFFER 0x40000000
  ------------------
  319|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (319:13): [True: 0, False: 0]
  ------------------
  320|      0|            return SECFailure; /* error code set by ssl3_FlushHandshake */
  321|      0|        }
  322|      0|        bytes -= room;
  323|      0|        src += room;
  324|      0|        room = ss->sec.ci.sendBuf.space;
  325|      0|        PORT_Assert(ss->sec.ci.sendBuf.len == 0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  326|      0|    }
  327|  32.1k|    PORT_Memcpy(ss->sec.ci.sendBuf.buf + ss->sec.ci.sendBuf.len, src, bytes);
  ------------------
  |  |  180|  32.1k|#define PORT_Memcpy memcpy
  ------------------
  328|  32.1k|    ss->sec.ci.sendBuf.len += bytes;
  329|  32.1k|    return SECSuccess;
  330|  32.1k|}

ssl_MapLowLevelError:
   21|  7.68k|{
   22|  7.68k|    int oldErr = PORT_GetError();
  ------------------
  |  |   62|  7.68k|#define PORT_GetError PORT_GetError_Util
  ------------------
   23|       |
   24|  7.68k|    switch (oldErr) {
   25|       |
   26|    204|        case 0:
  ------------------
  |  Branch (26:9): [True: 204, False: 7.48k]
  ------------------
   27|    204|        case PR_IO_ERROR:
  ------------------
  |  |   43|    204|#define PR_IO_ERROR                              (-5991L)
  ------------------
  |  Branch (27:9): [True: 0, False: 7.68k]
  ------------------
   28|    204|        case SEC_ERROR_IO:
  ------------------
  |  Branch (28:9): [True: 0, False: 7.68k]
  ------------------
   29|    230|        case SEC_ERROR_BAD_DATA:
  ------------------
  |  Branch (29:9): [True: 26, False: 7.66k]
  ------------------
   30|    276|        case SEC_ERROR_LIBRARY_FAILURE:
  ------------------
  |  Branch (30:9): [True: 46, False: 7.64k]
  ------------------
   31|    300|        case SEC_ERROR_EXTENSION_NOT_FOUND:
  ------------------
  |  Branch (31:9): [True: 24, False: 7.66k]
  ------------------
   32|    300|        case SSL_ERROR_BAD_CLIENT:
  ------------------
  |  Branch (32:9): [True: 0, False: 7.68k]
  ------------------
   33|    516|        case SSL_ERROR_BAD_SERVER:
  ------------------
  |  Branch (33:9): [True: 216, False: 7.47k]
  ------------------
   34|    516|        case SSL_ERROR_SESSION_NOT_FOUND:
  ------------------
  |  Branch (34:9): [True: 0, False: 7.68k]
  ------------------
   35|    516|            PORT_SetError(hiLevelError);
  ------------------
  |  |   65|    516|#define PORT_SetError PORT_SetError_Util
  ------------------
   36|    516|            return hiLevelError;
   37|       |
   38|  7.17k|        default: /* leave the majority of error codes alone. */
  ------------------
  |  Branch (38:9): [True: 7.17k, False: 516]
  ------------------
   39|  7.17k|            return oldErr;
   40|  7.68k|    }
   41|  7.68k|}

ssl_InitializePRErrorTable:
   32|      1|{
   33|      1|    return (PR_SUCCESS == PR_CallOnce(&once, ssl_InitializePRErrorTableOnce))
  ------------------
  |  Branch (33:12): [True: 1, False: 0]
  ------------------
   34|      1|               ? SECSuccess
   35|      1|               : SECFailure;
   36|      1|}
sslerrstrs.c:ssl_InitializePRErrorTableOnce:
   24|      1|{
   25|      1|    return PR_ErrorInstallTable(&ssl_et);
   26|      1|}

ssl_FilterSupportedGroups:
   77|  19.4k|{
   78|  19.4k|    unsigned int i;
   79|  19.4k|    PRStatus prv;
   80|  19.4k|    sslSocketAndGroupArg arg = { NULL, ss };
   81|       |
   82|  19.4k|    prv = PR_CallOnce(&cleanupECDHEKeysOnce, ssl_SetupCleanupECDHEKeysOnce);
   83|  19.4k|    PORT_Assert(prv == PR_SUCCESS);
  ------------------
  |  |  120|  19.4k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  19.4k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 19.4k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   84|  19.4k|    if (prv != PR_SUCCESS) {
  ------------------
  |  Branch (84:9): [True: 0, False: 19.4k]
  ------------------
   85|      0|        return;
   86|      0|    }
   87|       |
   88|   661k|    for (i = 0; i < SSL_NAMED_GROUP_COUNT; ++i) {
  ------------------
  |  |  133|   661k|#define SSL_NAMED_GROUP_COUNT 33
  ------------------
  |  Branch (88:17): [True: 641k, False: 19.4k]
  ------------------
   89|   641k|        PRUint32 policy;
   90|   641k|        SECStatus srv;
   91|   641k|        unsigned int index;
   92|   641k|        const sslNamedGroupDef *group = ss->namedGroupPreferences[i];
   93|   641k|        if (!group) {
  ------------------
  |  Branch (93:13): [True: 231k, False: 409k]
  ------------------
   94|   231k|            continue;
   95|   231k|        }
   96|       |
   97|   409k|        srv = NSS_GetAlgorithmPolicy(group->oidTag, &policy);
   98|   409k|        if (srv == SECSuccess && !(policy & NSS_USE_ALG_IN_SSL_KX)) {
  ------------------
  |  |  572|   409k|#define NSS_USE_ALG_IN_SSL_KX 0x00000004           /* used in SSL key exchange */
  ------------------
  |  Branch (98:13): [True: 409k, False: 0]
  |  Branch (98:34): [True: 9.36k, False: 400k]
  ------------------
   99|  9.36k|            ss->namedGroupPreferences[i] = NULL;
  100|  9.36k|            continue;
  101|  9.36k|        }
  102|       |
  103|   400k|        if (group->assumeSupported) {
  ------------------
  |  Branch (103:13): [True: 194k, False: 205k]
  ------------------
  104|   194k|            continue;
  105|   194k|        }
  106|       |
  107|       |        /* For EC groups, we have to test that a key pair can be created. This
  108|       |         * is gross, and expensive, so only do it once. */
  109|   205k|        index = group - ssl_named_groups;
  110|   205k|        PORT_Assert(index < SSL_NAMED_GROUP_COUNT);
  ------------------
  |  |  120|   205k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|   205k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 205k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  111|       |
  112|   205k|        arg.group = group;
  113|   205k|        prv = PR_CallOnceWithArg(&gECDHEKeyPairs[index].once,
  114|   205k|                                 ssl_CreateStaticECDHEKeyPair,
  115|   205k|                                 (void *)&arg);
  116|   205k|        PORT_Assert(prv == PR_SUCCESS);
  ------------------
  |  |  120|   205k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|   205k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 205k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  117|   205k|        if (prv != PR_SUCCESS) {
  ------------------
  |  Branch (117:13): [True: 0, False: 205k]
  ------------------
  118|      0|            continue;
  119|      0|        }
  120|       |
  121|   205k|        if (!gECDHEKeyPairs[index].keyPair) {
  ------------------
  |  Branch (121:13): [True: 205k, False: 0]
  ------------------
  122|   205k|            ss->namedGroupPreferences[i] = NULL;
  123|   205k|        }
  124|   205k|    }
  125|  19.4k|}
sslgrp.c:ssl_SetupCleanupECDHEKeysOnce:
   43|      1|{
   44|      1|    SECStatus rv = NSS_RegisterShutdown(ssl_CleanupECDHEKeys, NULL);
   45|      1|    return (rv != SECSuccess) ? PR_FAILURE : PR_SUCCESS;
  ------------------
  |  Branch (45:12): [True: 0, False: 1]
  ------------------
   46|      1|}
sslgrp.c:ssl_CleanupECDHEKeys:
   27|      1|{
   28|      1|    unsigned int i;
   29|       |
   30|     34|    for (i = 0; i < SSL_NAMED_GROUP_COUNT; i++) {
  ------------------
  |  |  133|     34|#define SSL_NAMED_GROUP_COUNT 33
  ------------------
  |  Branch (30:17): [True: 33, False: 1]
  ------------------
   31|     33|        if (gECDHEKeyPairs[i].keyPair) {
  ------------------
  |  Branch (31:13): [True: 0, False: 33]
  ------------------
   32|      0|            ssl_FreeEphemeralKeyPair(gECDHEKeyPairs[i].keyPair);
   33|      0|        }
   34|     33|    }
   35|      1|    memset(gECDHEKeyPairs, 0, sizeof(gECDHEKeyPairs));
   36|      1|    return SECSuccess;
   37|      1|}
sslgrp.c:ssl_CreateStaticECDHEKeyPair:
   55|     22|{
   56|     22|    const sslSocketAndGroupArg *typed_arg = (sslSocketAndGroupArg *)arg;
   57|     22|    const sslNamedGroupDef *group = typed_arg->group;
   58|     22|    const sslSocket *ss = typed_arg->ss;
   59|     22|    unsigned int i = group - ssl_named_groups;
   60|     22|    SECStatus rv;
   61|       |
   62|     22|    PORT_Assert(group->keaType == ssl_kea_ecdh);
  ------------------
  |  |  120|     22|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|     22|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 22, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   63|     22|    PORT_Assert(i < SSL_NAMED_GROUP_COUNT);
  ------------------
  |  |  120|     22|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|     22|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 22, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   64|     22|    rv = ssl_CreateECDHEphemeralKeyPair(ss, group,
   65|     22|                                        &gECDHEKeyPairs[i].keyPair);
   66|     22|    if (rv != SECSuccess) {
  ------------------
  |  Branch (66:9): [True: 22, False: 0]
  ------------------
   67|     22|        gECDHEKeyPairs[i].keyPair = NULL;
   68|     22|        SSL_TRC(5, ("%d: SSL[-]: disabling group %d",
  ------------------
  |  |   71|     22|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 22]
  |  |  ------------------
  |  |   72|     22|    ssl_Trace b
  ------------------
   69|     22|                    SSL_GETPID(), group->name));
   70|     22|    }
   71|       |
   72|     22|    return PR_SUCCESS;
   73|     22|}

ssl_InitCallOnce:
   29|      1|{
   30|      1|    int *error = (int *)arg;
   31|      1|    SECStatus rv;
   32|       |
   33|      1|    rv = ssl_InitializePRErrorTable();
   34|      1|    if (rv != SECSuccess) {
  ------------------
  |  Branch (34:9): [True: 0, False: 1]
  ------------------
   35|      0|        *error = SEC_ERROR_NO_MEMORY;
   36|      0|        return PR_FAILURE;
   37|      0|    }
   38|      1|#ifdef DEBUG
   39|      1|    ssl3_CheckCipherSuiteOrderConsistency();
   40|      1|#endif
   41|       |
   42|      1|    rv = ssl3_ApplyNSSPolicy();
   43|      1|    if (rv != SECSuccess) {
  ------------------
  |  Branch (43:9): [True: 0, False: 1]
  ------------------
   44|      0|        *error = PORT_GetError();
  ------------------
  |  |   62|      0|#define PORT_GetError PORT_GetError_Util
  ------------------
   45|      0|        return PR_FAILURE;
   46|      0|    }
   47|       |
   48|      1|    rv = NSS_RegisterShutdown(ssl_InitShutdown, NULL);
   49|      1|    if (rv != SECSuccess) {
  ------------------
  |  Branch (49:9): [True: 0, False: 1]
  ------------------
   50|      0|        *error = PORT_GetError();
  ------------------
  |  |   62|      0|#define PORT_GetError PORT_GetError_Util
  ------------------
   51|      0|        return PR_FAILURE;
   52|      0|    }
   53|      1|    return PR_SUCCESS;
   54|      1|}
ssl_Init:
   58|  9.36k|{
   59|  9.36k|    int error;
   60|  9.36k|    PRStatus nrv = PR_CallOnceWithArg(&ssl_init, ssl_InitCallOnce, &error);
   61|  9.36k|    if (nrv != PR_SUCCESS) {
  ------------------
  |  Branch (61:9): [True: 0, False: 9.36k]
  ------------------
   62|      0|        PORT_SetError(error);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
   63|      0|        return SECFailure;
   64|      0|    }
   65|  9.36k|    return SECSuccess;
   66|  9.36k|}
sslinit.c:ssl_InitShutdown:
   22|      1|{
   23|      1|    memset(&ssl_init, 0, sizeof(ssl_init));
   24|      1|    return SECSuccess;
   25|      1|}

ssl_InitSessionCacheLocks:
  137|  52.4k|{
  138|  52.4k|    if (LocksInitializedEarly) {
  ------------------
  |  Branch (138:9): [True: 0, False: 52.4k]
  ------------------
  139|      0|        return SECSuccess;
  140|      0|    }
  141|       |
  142|  52.4k|    if (lazyInit) {
  ------------------
  |  Branch (142:9): [True: 52.4k, False: 0]
  ------------------
  143|  52.4k|        return (PR_SUCCESS ==
  ------------------
  |  Branch (143:16): [True: 52.4k, False: 0]
  ------------------
  144|  52.4k|                PR_CallOnce(&lockOnce, initSessionCacheLocksLazily))
  145|  52.4k|                   ? SECSuccess
  146|  52.4k|                   : SECFailure;
  147|  52.4k|    }
  148|       |
  149|      0|    if (SECSuccess == InitSessionCacheLocks()) {
  ------------------
  |  Branch (149:9): [True: 0, False: 0]
  ------------------
  150|      0|        LocksInitializedEarly = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  151|      0|        return SECSuccess;
  152|      0|    }
  153|       |
  154|      0|    return SECFailure;
  155|      0|}
ssl_DestroySID:
  169|  27.3k|{
  170|  27.3k|    SSL_TRC(8, ("SSL: destroy sid: sid=0x%x cached=%d", sid, sid->cached));
  ------------------
  |  |   71|  27.3k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 27.3k]
  |  |  ------------------
  |  |   72|  27.3k|    ssl_Trace b
  ------------------
  171|  27.3k|    PORT_Assert(sid->references == 0);
  ------------------
  |  |  120|  27.3k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  27.3k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 27.3k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  172|  27.3k|    PORT_Assert(sid->cached != in_client_cache);
  ------------------
  |  |  120|  27.3k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  27.3k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 27.3k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  173|       |
  174|  27.3k|    if (sid->u.ssl3.locked.sessionTicket.ticket.data) {
  ------------------
  |  Branch (174:9): [True: 0, False: 27.3k]
  ------------------
  175|      0|        SECITEM_FreeItem(&sid->u.ssl3.locked.sessionTicket.ticket,
  ------------------
  |  |  108|      0|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
  176|      0|                         PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  177|      0|    }
  178|  27.3k|    if (sid->u.ssl3.srvName.data) {
  ------------------
  |  Branch (178:9): [True: 0, False: 27.3k]
  ------------------
  179|      0|        SECITEM_FreeItem(&sid->u.ssl3.srvName, PR_FALSE);
  ------------------
  |  |  108|      0|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                      SECITEM_FreeItem(&sid->u.ssl3.srvName, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  180|      0|    }
  181|  27.3k|    if (sid->u.ssl3.signedCertTimestamps.data) {
  ------------------
  |  Branch (181:9): [True: 0, False: 27.3k]
  ------------------
  182|      0|        SECITEM_FreeItem(&sid->u.ssl3.signedCertTimestamps, PR_FALSE);
  ------------------
  |  |  108|      0|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                      SECITEM_FreeItem(&sid->u.ssl3.signedCertTimestamps, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  183|      0|    }
  184|       |
  185|  27.3k|    if (sid->u.ssl3.lock) {
  ------------------
  |  Branch (185:9): [True: 0, False: 27.3k]
  ------------------
  186|      0|        PR_DestroyRWLock(sid->u.ssl3.lock);
  187|      0|    }
  188|       |
  189|  27.3k|    PORT_Free((void *)sid->peerID);
  ------------------
  |  |   60|  27.3k|#define PORT_Free PORT_Free_Util
  ------------------
  190|  27.3k|    PORT_Free((void *)sid->urlSvrName);
  ------------------
  |  |   60|  27.3k|#define PORT_Free PORT_Free_Util
  ------------------
  191|       |
  192|  27.3k|    if (sid->peerCert) {
  ------------------
  |  Branch (192:9): [True: 4.54k, False: 22.7k]
  ------------------
  193|  4.54k|        CERT_DestroyCertificate(sid->peerCert);
  194|  4.54k|    }
  195|  27.3k|    if (sid->peerCertStatus.items) {
  ------------------
  |  Branch (195:9): [True: 2, False: 27.3k]
  ------------------
  196|      2|        SECITEM_FreeArray(&sid->peerCertStatus, PR_FALSE);
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
  197|      2|    }
  198|       |
  199|  27.3k|    if (sid->localCert) {
  ------------------
  |  Branch (199:9): [True: 0, False: 27.3k]
  ------------------
  200|      0|        CERT_DestroyCertificate(sid->localCert);
  201|      0|    }
  202|       |
  203|  27.3k|    SECITEM_FreeItem(&sid->u.ssl3.alpnSelection, PR_FALSE);
  ------------------
  |  |  108|  27.3k|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                  SECITEM_FreeItem(&sid->u.ssl3.alpnSelection, PR_FALSE);
  ------------------
  |  |  438|  27.3k|#define PR_FALSE 0
  ------------------
  204|       |
  205|  27.3k|    if (freeIt) {
  ------------------
  |  Branch (205:9): [True: 27.3k, False: 0]
  ------------------
  206|  27.3k|        PORT_ZFree(sid, sizeof(sslSessionID));
  ------------------
  |  |   75|  27.3k|#define PORT_ZFree PORT_ZFree_Util
  ------------------
  207|  27.3k|    }
  208|  27.3k|}
ssl_FreeSID:
  234|  27.3k|{
  235|  27.3k|    if (sid) {
  ------------------
  |  Branch (235:9): [True: 27.3k, False: 0]
  ------------------
  236|  27.3k|        LOCK_CACHE;
  ------------------
  |  |   35|  27.3k|#define LOCK_CACHE lock_cache()
  ------------------
  237|  27.3k|        ssl_FreeLockedSID(sid);
  238|  27.3k|        UNLOCK_CACHE;
  ------------------
  |  |   36|  27.3k|#define UNLOCK_CACHE PZ_Unlock(cacheLock)
  |  |  ------------------
  |  |  |  |  246|  27.3k|#define PZ_Unlock(k) PR_Unlock((k))
  |  |  ------------------
  ------------------
  239|  27.3k|    }
  240|  27.3k|}
ssl_LookupSID:
  262|  10.5k|{
  263|  10.5k|    sslSessionID **sidp;
  264|  10.5k|    sslSessionID *sid;
  265|       |
  266|  10.5k|    if (!urlSvrName)
  ------------------
  |  Branch (266:9): [True: 0, False: 10.5k]
  ------------------
  267|      0|        return NULL;
  268|  10.5k|    LOCK_CACHE;
  ------------------
  |  |   35|  10.5k|#define LOCK_CACHE lock_cache()
  ------------------
  269|  10.5k|    sidp = &cache;
  270|  10.5k|    while ((sid = *sidp) != 0) {
  ------------------
  |  Branch (270:12): [True: 0, False: 10.5k]
  ------------------
  271|      0|        PORT_Assert(sid->cached == in_client_cache);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  272|      0|        PORT_Assert(sid->references >= 1);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  273|       |
  274|      0|        SSL_TRC(8, ("SSL: lookup: sid=0x%x", sid));
  ------------------
  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    ssl_Trace b
  ------------------
  275|       |
  276|      0|        if (sid->expirationTime < now) {
  ------------------
  |  Branch (276:13): [True: 0, False: 0]
  ------------------
  277|       |            /*
  278|       |            ** This session-id timed out.
  279|       |            ** Don't even care who it belongs to, blow it out of our cache.
  280|       |            */
  281|      0|            SSL_TRC(7, ("SSL: lookup, throwing sid out, age=%d refs=%d",
  ------------------
  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    ssl_Trace b
  ------------------
  282|      0|                        now - sid->creationTime, sid->references));
  283|       |
  284|      0|            *sidp = sid->next;                                      /* delink it from the list. */
  285|      0|            sid->cached = invalid_cache;                            /* mark not on list. */
  286|      0|            ssl_FreeLockedSID(sid);                                 /* drop ref count, free. */
  287|      0|        } else if (!memcmp(&sid->addr, addr, sizeof(PRIPv6Addr)) && /* server IP addr matches */
  ------------------
  |  Branch (287:20): [True: 0, False: 0]
  ------------------
  288|      0|                   (sid->port == port) &&                           /* server port matches */
  ------------------
  |  Branch (288:20): [True: 0, False: 0]
  ------------------
  289|       |                   /* proxy (peerID) matches */
  290|      0|                   (((peerID == NULL) && (sid->peerID == NULL)) ||
  ------------------
  |  Branch (290:22): [True: 0, False: 0]
  |  Branch (290:42): [True: 0, False: 0]
  ------------------
  291|      0|                    ((peerID != NULL) && (sid->peerID != NULL) &&
  ------------------
  |  Branch (291:22): [True: 0, False: 0]
  |  Branch (291:42): [True: 0, False: 0]
  ------------------
  292|      0|                     PORT_Strcmp(sid->peerID, peerID) == 0)) &&
  ------------------
  |  |  188|      0|#define PORT_Strcmp strcmp
  ------------------
  |  Branch (292:22): [True: 0, False: 0]
  ------------------
  293|       |                   /* is cacheable */
  294|      0|                   (sid->u.ssl3.keys.resumable) &&
  ------------------
  |  Branch (294:20): [True: 0, False: 0]
  ------------------
  295|       |                   /* server hostname matches. */
  296|      0|                   (sid->urlSvrName != NULL) &&
  ------------------
  |  Branch (296:20): [True: 0, False: 0]
  ------------------
  297|      0|                   (0 == PORT_Strcmp(urlSvrName, sid->urlSvrName))) {
  ------------------
  |  |  188|      0|#define PORT_Strcmp strcmp
  ------------------
  |  Branch (297:20): [True: 0, False: 0]
  ------------------
  298|       |            /* Hit */
  299|      0|            sid->lastAccessTime = now;
  300|      0|            sid->references++;
  301|      0|            break;
  302|      0|        } else {
  303|      0|            sidp = &sid->next;
  304|      0|        }
  305|      0|    }
  306|  10.5k|    UNLOCK_CACHE;
  ------------------
  |  |   36|  10.5k|#define UNLOCK_CACHE PZ_Unlock(cacheLock)
  |  |  ------------------
  |  |  |  |  246|  10.5k|#define PZ_Unlock(k) PR_Unlock((k))
  |  |  ------------------
  ------------------
  307|  10.5k|    return sid;
  308|  10.5k|}
ssl_UncacheSessionID:
 1148|  10.1k|{
 1149|  10.1k|    if (ss->opt.noCache) {
  ------------------
  |  Branch (1149:9): [True: 4.84k, False: 5.26k]
  ------------------
 1150|  4.84k|        return;
 1151|  4.84k|    }
 1152|       |
 1153|  5.26k|    sslSecurityInfo *sec = &ss->sec;
 1154|  5.26k|    PORT_Assert(sec);
  ------------------
  |  |  120|  5.26k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  5.26k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 5.26k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1155|       |
 1156|  5.26k|    if (sec->ci.sid) {
  ------------------
  |  Branch (1156:9): [True: 5.26k, False: 0]
  ------------------
 1157|  5.26k|        if (sec->isServer) {
  ------------------
  |  Branch (1157:13): [True: 0, False: 5.26k]
  ------------------
 1158|      0|            ssl_ServerUncacheSessionID(sec->ci.sid);
 1159|  5.26k|        } else if (!ss->resumptionTokenCallback) {
  ------------------
  |  Branch (1159:20): [True: 5.26k, False: 0]
  ------------------
 1160|  5.26k|            LockAndUncacheSID(sec->ci.sid);
 1161|  5.26k|        }
 1162|  5.26k|    }
 1163|  5.26k|}
SSL_ClearSessionCache:
 1168|  9.36k|{
 1169|  9.36k|    LOCK_CACHE;
  ------------------
  |  |   35|  9.36k|#define LOCK_CACHE lock_cache()
  ------------------
 1170|  9.36k|    while (cache != NULL)
  ------------------
  |  Branch (1170:12): [True: 0, False: 9.36k]
  ------------------
 1171|      0|        UncacheSID(cache);
 1172|  9.36k|    UNLOCK_CACHE;
  ------------------
  |  |   36|  9.36k|#define UNLOCK_CACHE PZ_Unlock(cacheLock)
  |  |  ------------------
  |  |  |  |  246|  9.36k|#define PZ_Unlock(k) PR_Unlock((k))
  |  |  ------------------
  ------------------
 1173|  9.36k|}
sslnonce.c:FreeSessionCacheLocks:
   61|      1|{
   62|      1|    SECStatus rv1, rv2;
   63|      1|    rv1 = ssl_FreeSymWrapKeysLock();
   64|      1|    rv2 = ssl_FreeClientSessionCacheLock();
   65|      1|    if ((SECSuccess == rv1) && (SECSuccess == rv2)) {
  ------------------
  |  Branch (65:9): [True: 1, False: 0]
  |  Branch (65:32): [True: 1, False: 0]
  ------------------
   66|      1|        return SECSuccess;
   67|      1|    }
   68|      0|    return SECFailure;
   69|      1|}
sslnonce.c:ssl_FreeClientSessionCacheLock:
   47|      1|{
   48|      1|    if (cacheLock) {
  ------------------
  |  Branch (48:9): [True: 1, False: 0]
  ------------------
   49|      1|        PZ_DestroyLock(cacheLock);
  ------------------
  |  |  244|      1|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
   50|      1|        cacheLock = NULL;
   51|      1|        return SECSuccess;
   52|      1|    }
   53|      0|    PORT_SetError(SEC_ERROR_NOT_INITIALIZED);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
   54|      0|    return SECFailure;
   55|      1|}
sslnonce.c:initSessionCacheLocksLazily:
  119|      1|{
  120|      1|    SECStatus rv = InitSessionCacheLocks();
  121|      1|    if (SECSuccess != rv) {
  ------------------
  |  Branch (121:9): [True: 0, False: 1]
  ------------------
  122|      0|        return PR_FAILURE;
  123|      0|    }
  124|      1|    rv = NSS_RegisterShutdown(ssl_ShutdownLocks, NULL);
  125|      1|    PORT_Assert(SECSuccess == rv);
  ------------------
  |  |  120|      1|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      1|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  126|      1|    if (SECSuccess != rv) {
  ------------------
  |  Branch (126:9): [True: 0, False: 1]
  ------------------
  127|      0|        return PR_FAILURE;
  128|      0|    }
  129|      1|    return PR_SUCCESS;
  130|      1|}
sslnonce.c:ssl_ShutdownLocks:
  106|      1|{
  107|      1|    PORT_Assert(PR_FALSE == LocksInitializedEarly);
  ------------------
  |  |  120|      1|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      1|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  108|      1|    if (LocksInitializedEarly) {
  ------------------
  |  Branch (108:9): [True: 0, False: 1]
  ------------------
  109|      0|        PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  110|      0|        return SECFailure;
  111|      0|    }
  112|      1|    FreeSessionCacheLocks();
  113|      1|    memset(&lockOnce, 0, sizeof(lockOnce));
  114|      1|    return SECSuccess;
  115|      1|}
sslnonce.c:InitSessionCacheLocks:
   73|      1|{
   74|      1|    SECStatus rv1, rv2;
   75|      1|    PRErrorCode rc;
   76|      1|    rv1 = ssl_InitSymWrapKeysLock();
   77|      1|    rv2 = ssl_InitClientSessionCacheLock();
   78|      1|    if ((SECSuccess == rv1) && (SECSuccess == rv2)) {
  ------------------
  |  Branch (78:9): [True: 1, False: 0]
  |  Branch (78:32): [True: 1, False: 0]
  ------------------
   79|      1|        return SECSuccess;
   80|      1|    }
   81|      0|    rc = PORT_GetError();
  ------------------
  |  |   62|      0|#define PORT_GetError PORT_GetError_Util
  ------------------
   82|      0|    FreeSessionCacheLocks();
   83|      0|    PORT_SetError(rc);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
   84|      0|    return SECFailure;
   85|      1|}
sslnonce.c:ssl_InitClientSessionCacheLock:
   40|      1|{
   41|      1|    cacheLock = PZ_NewLock(nssILockCache);
  ------------------
  |  |  243|      1|#define PZ_NewLock(t) PR_NewLock()
  ------------------
   42|      1|    return cacheLock ? SECSuccess : SECFailure;
  ------------------
  |  Branch (42:12): [True: 1, False: 0]
  ------------------
   43|      1|}
sslnonce.c:lock_cache:
  159|  52.4k|{
  160|  52.4k|    ssl_InitSessionCacheLocks(PR_TRUE);
  ------------------
  |  |  437|  52.4k|#define PR_TRUE 1
  ------------------
  161|  52.4k|    PZ_Lock(cacheLock);
  ------------------
  |  |  245|  52.4k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
  162|  52.4k|}
sslnonce.c:ssl_FreeLockedSID:
  219|  27.3k|{
  220|  27.3k|    PORT_Assert(sid->references >= 1);
  ------------------
  |  |  120|  27.3k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  27.3k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 27.3k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  221|  27.3k|    if (--sid->references == 0) {
  ------------------
  |  Branch (221:9): [True: 27.3k, False: 0]
  ------------------
  222|  27.3k|        ssl_DestroySID(sid, PR_TRUE);
  ------------------
  |  |  437|  27.3k|#define PR_TRUE 1
  ------------------
  223|  27.3k|    }
  224|  27.3k|}
sslnonce.c:LockAndUncacheSID:
  421|  5.26k|{
  422|  5.26k|    LOCK_CACHE;
  ------------------
  |  |   35|  5.26k|#define LOCK_CACHE lock_cache()
  ------------------
  423|  5.26k|    UncacheSID(zap);
  424|  5.26k|    UNLOCK_CACHE;
  ------------------
  |  |   36|  5.26k|#define UNLOCK_CACHE PZ_Unlock(cacheLock)
  |  |  ------------------
  |  |  |  |  246|  5.26k|#define PZ_Unlock(k) PR_Unlock((k))
  |  |  ------------------
  ------------------
  425|  5.26k|}
sslnonce.c:UncacheSID:
  383|  5.26k|{
  384|  5.26k|    sslSessionID **sidp = &cache;
  385|  5.26k|    sslSessionID *sid;
  386|       |
  387|  5.26k|    if (zap->cached != in_client_cache) {
  ------------------
  |  Branch (387:9): [True: 5.26k, False: 0]
  ------------------
  388|  5.26k|        return;
  389|  5.26k|    }
  390|       |
  391|      0|    SSL_TRC(8, ("SSL: Uncache: zap=0x%x cached=%d addr=0x%08x%08x%08x%08x port=0x%04x "
  ------------------
  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    ssl_Trace b
  ------------------
  392|      0|                "time=%x cipherSuite=%d",
  393|      0|                zap, zap->cached, zap->addr.pr_s6_addr32[0],
  394|      0|                zap->addr.pr_s6_addr32[1], zap->addr.pr_s6_addr32[2],
  395|      0|                zap->addr.pr_s6_addr32[3], zap->port, zap->creationTime,
  396|      0|                zap->u.ssl3.cipherSuite));
  397|       |
  398|       |    /* See if it's in the cache, if so nuke it */
  399|      0|    while ((sid = *sidp) != 0) {
  ------------------
  |  Branch (399:12): [True: 0, False: 0]
  ------------------
  400|      0|        if (sid == zap) {
  ------------------
  |  Branch (400:13): [True: 0, False: 0]
  ------------------
  401|       |            /*
  402|       |            ** Bingo. Reduce reference count by one so that when
  403|       |            ** everyone is done with the sid we can free it up.
  404|       |            */
  405|      0|            *sidp = zap->next;
  406|      0|            zap->cached = invalid_cache;
  407|      0|            ssl_FreeLockedSID(zap);
  408|      0|            return;
  409|      0|        }
  410|      0|        sidp = &sid->next;
  411|      0|    }
  412|      0|}

ssl_CreateMaskingContextInner:
  297|  1.60k|{
  298|  1.60k|    if (!secret || !ctx || (!label && labelLen)) {
  ------------------
  |  Branch (298:9): [True: 0, False: 1.60k]
  |  Branch (298:20): [True: 0, False: 1.60k]
  |  Branch (298:29): [True: 0, False: 1.60k]
  |  Branch (298:39): [True: 0, False: 0]
  ------------------
  299|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  300|      0|        return SECFailure;
  301|      0|    }
  302|       |
  303|  1.60k|    SSLMaskingContext *out = PORT_ZNew(SSLMaskingContext);
  ------------------
  |  |  148|  1.60k|#define PORT_ZNew(type) (type *)PORT_ZAlloc(sizeof(type))
  |  |  ------------------
  |  |  |  |   72|  1.60k|#define PORT_ZAlloc PORT_ZAlloc_Util
  |  |  ------------------
  ------------------
  304|  1.60k|    if (out == NULL) {
  ------------------
  |  Branch (304:9): [True: 0, False: 1.60k]
  ------------------
  305|      0|        goto loser;
  306|      0|    }
  307|       |
  308|  1.60k|    SSLHashType hash;
  309|  1.60k|    const ssl3BulkCipherDef *cipher;
  310|  1.60k|    SECStatus rv = tls13_GetHashAndCipher(version, cipherSuite,
  311|  1.60k|                                          &hash, &cipher);
  312|  1.60k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (312:9): [True: 0, False: 1.60k]
  ------------------
  313|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  314|      0|        goto loser; /* Code already set. */
  315|      0|    }
  316|       |
  317|  1.60k|    out->mech = tls13_SequenceNumberEncryptionMechanism(cipher->calg);
  318|  1.60k|    if (out->mech == CKM_INVALID_MECHANISM) {
  ------------------
  |  |  155|  1.60k|#define CKM_INVALID_MECHANISM 0xffffffffUL
  ------------------
  |  Branch (318:9): [True: 0, False: 1.60k]
  ------------------
  319|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  320|      0|        goto loser;
  321|      0|    }
  322|       |
  323|       |    // Derive the masking key
  324|  1.60k|    rv = tls13_HkdfExpandLabel(secret, hash,
  325|  1.60k|                               NULL, 0, // Handshake hash.
  326|  1.60k|                               label, labelLen,
  327|  1.60k|                               out->mech,
  328|  1.60k|                               cipher->key_size, variant,
  329|  1.60k|                               &out->secret);
  330|  1.60k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (330:9): [True: 0, False: 1.60k]
  ------------------
  331|      0|        goto loser;
  332|      0|    }
  333|       |
  334|  1.60k|    out->version = version;
  335|  1.60k|    out->cipherSuite = cipherSuite;
  336|       |
  337|  1.60k|    *ctx = out;
  338|  1.60k|    return SECSuccess;
  339|      0|loser:
  340|      0|    SSLExp_DestroyMaskingContext(out);
  341|      0|    return SECFailure;
  342|  1.60k|}
ssl_CreateMaskInner:
  348|  11.6k|{
  349|  11.6k|    if (!ctx || !sample || !sampleLen || !outMask || !maskLen) {
  ------------------
  |  Branch (349:9): [True: 0, False: 11.6k]
  |  Branch (349:17): [True: 0, False: 11.6k]
  |  Branch (349:28): [True: 0, False: 11.6k]
  |  Branch (349:42): [True: 0, False: 11.6k]
  |  Branch (349:54): [True: 0, False: 11.6k]
  ------------------
  350|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  351|      0|        return SECFailure;
  352|      0|    }
  353|       |
  354|  11.6k|    if (ctx->secret == NULL) {
  ------------------
  |  Branch (354:9): [True: 0, False: 11.6k]
  ------------------
  355|      0|        PORT_SetError(SEC_ERROR_NO_KEY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  356|      0|        return SECFailure;
  357|      0|    }
  358|       |
  359|  11.6k|    SECStatus rv = SECFailure;
  360|  11.6k|    unsigned int outMaskLen = 0;
  361|  11.6k|    int paramLen = 0;
  362|       |
  363|       |    /* Internal output len/buf, for use if the caller allocated and requested
  364|       |     * less than one block of output. |oneBlock| should have size equal to the
  365|       |     * largest block size supported below. */
  366|  11.6k|    PRUint8 oneBlock[AES_BLOCK_SIZE];
  367|  11.6k|    PRUint8 *outMask_ = outMask;
  368|  11.6k|    unsigned int maskLen_ = maskLen;
  369|       |
  370|  11.6k|    switch (ctx->mech) {
  371|  6.29k|        case CKM_AES_ECB:
  ------------------
  |  | 1107|  6.29k|#define CKM_AES_ECB 0x00001081UL
  ------------------
  |  Branch (371:9): [True: 6.29k, False: 5.31k]
  ------------------
  372|  6.29k|            if (sampleLen < AES_BLOCK_SIZE) {
  ------------------
  |  |  130|  6.29k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  |  Branch (372:17): [True: 0, False: 6.29k]
  ------------------
  373|      0|                PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  374|      0|                return SECFailure;
  375|      0|            }
  376|  6.29k|            if (maskLen_ < AES_BLOCK_SIZE) {
  ------------------
  |  |  130|  6.29k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  |  Branch (376:17): [True: 6.29k, False: 0]
  ------------------
  377|  6.29k|                outMask_ = oneBlock;
  378|  6.29k|                maskLen_ = sizeof(oneBlock);
  379|  6.29k|            }
  380|  6.29k|            rv = PK11_Encrypt(ctx->secret,
  381|  6.29k|                              ctx->mech,
  382|  6.29k|                              NULL,
  383|  6.29k|                              outMask_, &outMaskLen, maskLen_,
  384|  6.29k|                              sample, AES_BLOCK_SIZE);
  ------------------
  |  |  130|  6.29k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  385|  6.29k|            if (rv == SECSuccess &&
  ------------------
  |  Branch (385:17): [True: 6.29k, False: 0]
  ------------------
  386|  6.29k|                maskLen < AES_BLOCK_SIZE) {
  ------------------
  |  |  130|  6.29k|#define AES_BLOCK_SIZE 16 /* bytes */
  ------------------
  |  Branch (386:17): [True: 6.29k, False: 0]
  ------------------
  387|  6.29k|                memcpy(outMask, outMask_, maskLen);
  388|  6.29k|            }
  389|  6.29k|            break;
  390|  5.31k|        case CKM_NSS_CHACHA20_CTR:
  ------------------
  |  |  251|  5.31k|#define CKM_NSS_CHACHA20_CTR (CKM_NSS + 33)
  |  |  ------------------
  |  |  |  |  162|  5.31k|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|  5.31k|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  5.31k|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (390:9): [True: 5.31k, False: 6.29k]
  ------------------
  391|  5.31k|            paramLen = 16;
  392|       |        /* fall through */
  393|  5.31k|        case CKM_CHACHA20:
  ------------------
  |  | 1204|  5.31k|#define CKM_CHACHA20 0x00001226UL
  ------------------
  |  Branch (393:9): [True: 0, False: 11.6k]
  ------------------
  394|  5.31k|            paramLen = (paramLen) ? paramLen : sizeof(CK_CHACHA20_PARAMS);
  ------------------
  |  Branch (394:24): [True: 5.31k, False: 0]
  ------------------
  395|  5.31k|            if (sampleLen < paramLen) {
  ------------------
  |  Branch (395:17): [True: 0, False: 5.31k]
  ------------------
  396|      0|                PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  397|      0|                return SECFailure;
  398|      0|            }
  399|       |
  400|  5.31k|            SECItem param;
  401|  5.31k|            param.type = siBuffer;
  402|  5.31k|            param.len = paramLen;
  403|  5.31k|            param.data = (PRUint8 *)sample; // const-cast :(
  404|  5.31k|            unsigned char zeros[128] = { 0 };
  405|       |
  406|  5.31k|            if (maskLen > sizeof(zeros)) {
  ------------------
  |  Branch (406:17): [True: 0, False: 5.31k]
  ------------------
  407|      0|                PORT_SetError(SEC_ERROR_OUTPUT_LEN);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  408|      0|                return SECFailure;
  409|      0|            }
  410|       |
  411|  5.31k|            rv = PK11_Encrypt(ctx->secret,
  412|  5.31k|                              ctx->mech,
  413|  5.31k|                              &param,
  414|  5.31k|                              outMask, &outMaskLen,
  415|  5.31k|                              maskLen,
  416|  5.31k|                              zeros, maskLen);
  417|  5.31k|            break;
  418|      0|        default:
  ------------------
  |  Branch (418:9): [True: 0, False: 11.6k]
  ------------------
  419|      0|            PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  420|      0|            return SECFailure;
  421|  11.6k|    }
  422|       |
  423|  11.6k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (423:9): [True: 0, False: 11.6k]
  ------------------
  424|      0|        PORT_SetError(SEC_ERROR_PKCS11_FUNCTION_FAILED);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  425|      0|        return SECFailure;
  426|      0|    }
  427|       |
  428|       |    // Ensure we produced at least as much material as requested.
  429|  11.6k|    if (outMaskLen < maskLen) {
  ------------------
  |  Branch (429:9): [True: 0, False: 11.6k]
  ------------------
  430|      0|        PORT_SetError(SEC_ERROR_OUTPUT_LEN);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  431|      0|        return SECFailure;
  432|      0|    }
  433|       |
  434|  11.6k|    return SECSuccess;
  435|  11.6k|}
ssl_DestroyMaskingContextInner:
  439|  31.2k|{
  440|  31.2k|    if (!ctx) {
  ------------------
  |  Branch (440:9): [True: 29.6k, False: 1.60k]
  ------------------
  441|  29.6k|        return SECSuccess;
  442|  29.6k|    }
  443|       |
  444|  1.60k|    PK11_FreeSymKey(ctx->secret);
  445|  1.60k|    PORT_ZFree(ctx, sizeof(*ctx));
  ------------------
  |  |   75|  1.60k|#define PORT_ZFree PORT_ZFree_Util
  ------------------
  446|  1.60k|    return SECSuccess;
  447|  31.2k|}

ssl_Do1stHandshake:
   34|  9.36k|{
   35|  9.36k|    SECStatus rv = SECSuccess;
   36|       |
   37|  28.0k|    while (ss->handshake && rv == SECSuccess) {
  ------------------
  |  Branch (37:12): [True: 27.5k, False: 514]
  |  Branch (37:29): [True: 18.7k, False: 8.85k]
  ------------------
   38|  18.7k|        PORT_Assert(ss->opt.noLocks || ssl_Have1stHandshakeLock(ss));
  ------------------
  |  |  120|  18.7k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  27.9k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 9.50k, False: 9.22k]
  |  |  |  |  |  Branch (208:7): [True: 9.22k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   39|  18.7k|        PORT_Assert(ss->opt.noLocks || !ssl_HaveRecvBufLock(ss));
  ------------------
  |  |  120|  18.7k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  27.9k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 9.50k, False: 9.22k]
  |  |  |  |  |  Branch (208:7): [True: 9.22k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   40|  18.7k|        PORT_Assert(ss->opt.noLocks || !ssl_HaveXmitBufLock(ss));
  ------------------
  |  |  120|  18.7k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  27.9k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 9.50k, False: 9.22k]
  |  |  |  |  |  Branch (208:7): [True: 9.22k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   41|  18.7k|        PORT_Assert(ss->opt.noLocks || !ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|  18.7k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  27.9k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 9.50k, False: 9.22k]
  |  |  |  |  |  Branch (208:7): [True: 9.22k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   42|       |
   43|  18.7k|        rv = (*ss->handshake)(ss);
   44|  18.7k|    };
   45|       |
   46|  9.36k|    PORT_Assert(ss->opt.noLocks || !ssl_HaveRecvBufLock(ss));
  ------------------
  |  |  120|  9.36k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  13.9k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 4.75k, False: 4.61k]
  |  |  |  |  |  Branch (208:7): [True: 4.61k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   47|  9.36k|    PORT_Assert(ss->opt.noLocks || !ssl_HaveXmitBufLock(ss));
  ------------------
  |  |  120|  9.36k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  13.9k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 4.75k, False: 4.61k]
  |  |  |  |  |  Branch (208:7): [True: 4.61k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   48|  9.36k|    PORT_Assert(ss->opt.noLocks || !ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|  9.36k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  13.9k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 4.75k, False: 4.61k]
  |  |  |  |  |  Branch (208:7): [True: 4.61k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   49|       |
   50|  9.36k|    return rv;
   51|  9.36k|}
SSL_ResetHandshake:
  149|  9.36k|{
  150|  9.36k|    sslSocket *ss;
  151|  9.36k|    SECStatus status;
  152|  9.36k|    PRNetAddr addr;
  153|       |
  154|  9.36k|    ss = ssl_FindSocket(s);
  155|  9.36k|    if (!ss) {
  ------------------
  |  Branch (155:9): [True: 0, False: 9.36k]
  ------------------
  156|      0|        SSL_DBG(("%d: SSL[%d]: bad socket in ResetHandshake", SSL_GETPID(), s));
  ------------------
  |  |   87|      0|    if (ssl_debug) \
  |  |  ------------------
  |  |  |  Branch (87:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   88|      0|    ssl_Trace b
  ------------------
  157|      0|        return SECFailure;
  158|      0|    }
  159|       |
  160|       |    /* Don't waste my time */
  161|  9.36k|    if (!ss->opt.useSecurity)
  ------------------
  |  Branch (161:9): [True: 0, False: 9.36k]
  ------------------
  162|      0|        return SECSuccess;
  163|       |
  164|  9.36k|    SSL_LOCK_READER(ss);
  ------------------
  |  | 1376|  9.36k|    if (ss->recvLock)       \
  |  |  ------------------
  |  |  |  Branch (1376:9): [True: 9.36k, False: 0]
  |  |  ------------------
  |  | 1377|  9.36k|    PZ_Lock(ss->recvLock)
  |  |  ------------------
  |  |  |  |  245|  9.36k|#define PZ_Lock(k) PR_Lock((k))
  |  |  ------------------
  ------------------
  165|  9.36k|    SSL_LOCK_WRITER(ss);
  ------------------
  |  | 1382|  9.36k|    if (ss->sendLock)       \
  |  |  ------------------
  |  |  |  Branch (1382:9): [True: 9.36k, False: 0]
  |  |  ------------------
  |  | 1383|  9.36k|    PZ_Lock(ss->sendLock)
  |  |  ------------------
  |  |  |  |  245|  9.36k|#define PZ_Lock(k) PR_Lock((k))
  |  |  ------------------
  ------------------
  166|       |
  167|       |    /* Reset handshake state */
  168|  9.36k|    ssl_Get1stHandshakeLock(ss);
  ------------------
  |  | 1390|  9.36k|    {                                                             \
  |  | 1391|  9.36k|        if (!ss->opt.noLocks) {                                   \
  |  |  ------------------
  |  |  |  Branch (1391:13): [True: 4.61k, False: 4.75k]
  |  |  ------------------
  |  | 1392|  4.61k|            PORT_Assert(PZ_InMonitor((ss)->firstHandshakeLock) || \
  |  |  ------------------
  |  |  |  |  120|  4.61k|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|  9.22k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:7): [True: 0, False: 4.61k]
  |  |  |  |  |  |  |  Branch (208:7): [True: 4.61k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1393|  4.61k|                        !ssl_HaveRecvBufLock(ss));                \
  |  | 1394|  4.61k|            PZ_EnterMonitor((ss)->firstHandshakeLock);            \
  |  |  ------------------
  |  |  |  |  256|  4.61k|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1395|  4.61k|        }                                                         \
  |  | 1396|  9.36k|    }
  ------------------
  169|       |
  170|  9.36k|    ss->firstHsDone = PR_FALSE;
  ------------------
  |  |  438|  9.36k|#define PR_FALSE 0
  ------------------
  171|  9.36k|    ss->enoughFirstHsDone = PR_FALSE;
  ------------------
  |  |  438|  9.36k|#define PR_FALSE 0
  ------------------
  172|  9.36k|    if (asServer) {
  ------------------
  |  Branch (172:9): [True: 0, False: 9.36k]
  ------------------
  173|      0|        ss->handshake = ssl_BeginServerHandshake;
  174|      0|        ss->handshaking = sslHandshakingAsServer;
  175|  9.36k|    } else {
  176|  9.36k|        ss->handshake = ssl_BeginClientHandshake;
  177|  9.36k|        ss->handshaking = sslHandshakingAsClient;
  178|  9.36k|    }
  179|       |
  180|  9.36k|    ssl_GetRecvBufLock(ss);
  ------------------
  |  | 1449|  9.36k|    {                                                    \
  |  | 1450|  9.36k|        if (!ss->opt.noLocks) {                          \
  |  |  ------------------
  |  |  |  Branch (1450:13): [True: 4.61k, False: 4.75k]
  |  |  ------------------
  |  | 1451|  4.61k|            PORT_Assert(!ssl_HaveSSL3HandshakeLock(ss)); \
  |  |  ------------------
  |  |  |  |  120|  4.61k|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|  4.61k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 4.61k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1452|  4.61k|            PORT_Assert(!ssl_HaveXmitBufLock(ss));       \
  |  |  ------------------
  |  |  |  |  120|  4.61k|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|  4.61k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 4.61k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1453|  4.61k|            PZ_EnterMonitor((ss)->recvBufLock);          \
  |  |  ------------------
  |  |  |  |  256|  4.61k|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1454|  4.61k|        }                                                \
  |  | 1455|  9.36k|    }
  ------------------
  181|  9.36k|    status = ssl3_InitGather(&ss->gs);
  182|  9.36k|    ssl_ReleaseRecvBufLock(ss);
  ------------------
  |  | 1457|  9.36k|    {                                          \
  |  | 1458|  9.36k|        if (!ss->opt.noLocks)                  \
  |  |  ------------------
  |  |  |  Branch (1458:13): [True: 4.61k, False: 4.75k]
  |  |  ------------------
  |  | 1459|  9.36k|            PZ_ExitMonitor((ss)->recvBufLock); \
  |  |  ------------------
  |  |  |  |  257|  4.61k|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1460|  9.36k|    }
  ------------------
  183|  9.36k|    if (status != SECSuccess)
  ------------------
  |  Branch (183:9): [True: 0, False: 9.36k]
  ------------------
  184|      0|        goto loser;
  185|       |
  186|  9.36k|    ssl_GetSSL3HandshakeLock(ss);
  ------------------
  |  | 1407|  9.36k|    {                                                 \
  |  | 1408|  9.36k|        if (!ss->opt.noLocks) {                       \
  |  |  ------------------
  |  |  |  Branch (1408:13): [True: 4.61k, False: 4.75k]
  |  |  ------------------
  |  | 1409|  4.61k|            PORT_Assert(!ssl_HaveXmitBufLock(ss));    \
  |  |  ------------------
  |  |  |  |  120|  4.61k|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|  4.61k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 4.61k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1410|  4.61k|            PZ_EnterMonitor((ss)->ssl3HandshakeLock); \
  |  |  ------------------
  |  |  |  |  256|  4.61k|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1411|  4.61k|        }                                             \
  |  | 1412|  9.36k|    }
  ------------------
  187|  9.36k|    ss->ssl3.hs.canFalseStart = PR_FALSE;
  ------------------
  |  |  438|  9.36k|#define PR_FALSE 0
  ------------------
  188|  9.36k|    ss->ssl3.hs.restartTarget = NULL;
  189|       |
  190|       |    /*
  191|       |    ** Blow away old security state and get a fresh setup.
  192|       |    */
  193|  9.36k|    ssl_GetXmitBufLock(ss);
  ------------------
  |  | 1466|  9.36k|    {                                           \
  |  | 1467|  9.36k|        if (!ss->opt.noLocks)                   \
  |  |  ------------------
  |  |  |  Branch (1467:13): [True: 4.61k, False: 4.75k]
  |  |  ------------------
  |  | 1468|  9.36k|            PZ_EnterMonitor((ss)->xmitBufLock); \
  |  |  ------------------
  |  |  |  |  256|  4.61k|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1469|  9.36k|    }
  ------------------
  194|  9.36k|    ssl_ResetSecurityInfo(&ss->sec, PR_TRUE);
  ------------------
  |  |  437|  9.36k|#define PR_TRUE 1
  ------------------
  195|  9.36k|    status = ssl_CreateSecurityInfo(ss);
  196|  9.36k|    ssl_ReleaseXmitBufLock(ss);
  ------------------
  |  | 1471|  9.36k|    {                                          \
  |  | 1472|  9.36k|        if (!ss->opt.noLocks)                  \
  |  |  ------------------
  |  |  |  Branch (1472:13): [True: 4.61k, False: 4.75k]
  |  |  ------------------
  |  | 1473|  9.36k|            PZ_ExitMonitor((ss)->xmitBufLock); \
  |  |  ------------------
  |  |  |  |  257|  4.61k|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1474|  9.36k|    }
  ------------------
  197|       |
  198|  9.36k|    ssl_ReleaseSSL3HandshakeLock(ss);
  ------------------
  |  | 1414|  9.36k|    {                                                \
  |  | 1415|  9.36k|        if (!ss->opt.noLocks)                        \
  |  |  ------------------
  |  |  |  Branch (1415:13): [True: 4.61k, False: 4.75k]
  |  |  ------------------
  |  | 1416|  9.36k|            PZ_ExitMonitor((ss)->ssl3HandshakeLock); \
  |  |  ------------------
  |  |  |  |  257|  4.61k|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1417|  9.36k|    }
  ------------------
  199|  9.36k|    ssl_Release1stHandshakeLock(ss);
  ------------------
  |  | 1398|  9.36k|    {                                                 \
  |  | 1399|  9.36k|        if (!ss->opt.noLocks)                         \
  |  |  ------------------
  |  |  |  Branch (1399:13): [True: 4.61k, False: 4.75k]
  |  |  ------------------
  |  | 1400|  9.36k|            PZ_ExitMonitor((ss)->firstHandshakeLock); \
  |  |  ------------------
  |  |  |  |  257|  4.61k|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1401|  9.36k|    }
  ------------------
  200|       |
  201|  9.36k|    ssl3_DestroyRemoteExtensions(&ss->ssl3.hs.remoteExtensions);
  202|  9.36k|    ssl3_DestroyRemoteExtensions(&ss->ssl3.hs.echOuterExtensions);
  203|  9.36k|    ssl3_ResetExtensionData(&ss->xtnData, ss);
  204|  9.36k|    tls13_ResetHandshakePsks(ss, &ss->ssl3.hs.psks);
  205|       |
  206|  9.36k|    if (ss->ssl3.hs.echHpkeCtx) {
  ------------------
  |  Branch (206:9): [True: 0, False: 9.36k]
  ------------------
  207|      0|        PK11_HPKE_DestroyContext(ss->ssl3.hs.echHpkeCtx, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  208|      0|        ss->ssl3.hs.echHpkeCtx = NULL;
  209|      0|        PORT_Assert(ss->ssl3.hs.echPublicName);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  210|      0|        PORT_Free((void *)ss->ssl3.hs.echPublicName); /* CONST */
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
  211|      0|        ss->ssl3.hs.echPublicName = NULL;
  212|      0|    }
  213|       |    /* Make sure greaseEchBuf is freed in ECH setups without echHpkeCtx. */
  214|  9.36k|    if (ss->ssl3.hs.echHpkeCtx ||
  ------------------
  |  Branch (214:9): [True: 0, False: 9.36k]
  ------------------
  215|  9.36k|        ss->opt.enableTls13BackendEch ||
  ------------------
  |  Branch (215:9): [True: 0, False: 9.36k]
  ------------------
  216|  9.36k|        ss->opt.enableTls13GreaseEch) {
  ------------------
  |  Branch (216:9): [True: 4.53k, False: 4.82k]
  ------------------
  217|  4.53k|        sslBuffer_Clear(&ss->ssl3.hs.greaseEchBuf);
  218|  4.53k|    }
  219|       |
  220|  9.36k|    tls13_ClientGreaseDestroy(ss);
  221|       |
  222|  9.36k|    tls_ClientHelloExtensionPermutationDestroy(ss);
  223|       |
  224|  9.36k|    if (!ss->TCPconnected)
  ------------------
  |  Branch (224:9): [True: 0, False: 9.36k]
  ------------------
  225|      0|        ss->TCPconnected = (PR_SUCCESS == ssl_DefGetpeername(ss, &addr));
  226|       |
  227|  9.36k|loser:
  228|  9.36k|    SSL_UNLOCK_WRITER(ss);
  ------------------
  |  | 1385|  9.36k|    if (ss->sendLock)         \
  |  |  ------------------
  |  |  |  Branch (1385:9): [True: 9.36k, False: 0]
  |  |  ------------------
  |  | 1386|  9.36k|    PZ_Unlock(ss->sendLock)
  |  |  ------------------
  |  |  |  |  246|  9.36k|#define PZ_Unlock(k) PR_Unlock((k))
  |  |  ------------------
  ------------------
  229|  9.36k|    SSL_UNLOCK_READER(ss);
  ------------------
  |  | 1379|  9.36k|    if (ss->recvLock)         \
  |  |  ------------------
  |  |  |  Branch (1379:9): [True: 9.36k, False: 0]
  |  |  ------------------
  |  | 1380|  9.36k|    PZ_Unlock(ss->recvLock)
  |  |  ------------------
  |  |  |  |  246|  9.36k|#define PZ_Unlock(k) PR_Unlock((k))
  |  |  ------------------
  ------------------
  230|       |
  231|  9.36k|    return status;
  232|  9.36k|}
SSL_SetCanFalseStartCallback:
  324|  9.36k|{
  325|  9.36k|    sslSocket *ss;
  326|       |
  327|  9.36k|    ss = ssl_FindSocket(fd);
  328|  9.36k|    if (!ss) {
  ------------------
  |  Branch (328:9): [True: 0, False: 9.36k]
  ------------------
  329|      0|        SSL_DBG(("%d: SSL[%d]: bad socket in SSL_SetCanFalseStartCallback",
  ------------------
  |  |   87|      0|    if (ssl_debug) \
  |  |  ------------------
  |  |  |  Branch (87:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   88|      0|    ssl_Trace b
  ------------------
  330|      0|                 SSL_GETPID(), fd));
  331|      0|        return SECFailure;
  332|      0|    }
  333|       |
  334|  9.36k|    if (!ss->opt.useSecurity) {
  ------------------
  |  Branch (334:9): [True: 0, False: 9.36k]
  ------------------
  335|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  336|      0|        return SECFailure;
  337|      0|    }
  338|       |
  339|  9.36k|    ssl_Get1stHandshakeLock(ss);
  ------------------
  |  | 1390|  9.36k|    {                                                             \
  |  | 1391|  9.36k|        if (!ss->opt.noLocks) {                                   \
  |  |  ------------------
  |  |  |  Branch (1391:13): [True: 9.36k, False: 0]
  |  |  ------------------
  |  | 1392|  9.36k|            PORT_Assert(PZ_InMonitor((ss)->firstHandshakeLock) || \
  |  |  ------------------
  |  |  |  |  120|  9.36k|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|  18.7k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:7): [True: 0, False: 9.36k]
  |  |  |  |  |  |  |  Branch (208:7): [True: 9.36k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1393|  9.36k|                        !ssl_HaveRecvBufLock(ss));                \
  |  | 1394|  9.36k|            PZ_EnterMonitor((ss)->firstHandshakeLock);            \
  |  |  ------------------
  |  |  |  |  256|  9.36k|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1395|  9.36k|        }                                                         \
  |  | 1396|  9.36k|    }
  ------------------
  340|  9.36k|    ssl_GetSSL3HandshakeLock(ss);
  ------------------
  |  | 1407|  9.36k|    {                                                 \
  |  | 1408|  9.36k|        if (!ss->opt.noLocks) {                       \
  |  |  ------------------
  |  |  |  Branch (1408:13): [True: 9.36k, False: 0]
  |  |  ------------------
  |  | 1409|  9.36k|            PORT_Assert(!ssl_HaveXmitBufLock(ss));    \
  |  |  ------------------
  |  |  |  |  120|  9.36k|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|  9.36k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 9.36k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1410|  9.36k|            PZ_EnterMonitor((ss)->ssl3HandshakeLock); \
  |  |  ------------------
  |  |  |  |  256|  9.36k|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1411|  9.36k|        }                                             \
  |  | 1412|  9.36k|    }
  ------------------
  341|       |
  342|  9.36k|    ss->canFalseStartCallback = cb;
  343|  9.36k|    ss->canFalseStartCallbackData = arg;
  344|       |
  345|  9.36k|    ssl_ReleaseSSL3HandshakeLock(ss);
  ------------------
  |  | 1414|  9.36k|    {                                                \
  |  | 1415|  9.36k|        if (!ss->opt.noLocks)                        \
  |  |  ------------------
  |  |  |  Branch (1415:13): [True: 9.36k, False: 0]
  |  |  ------------------
  |  | 1416|  9.36k|            PZ_ExitMonitor((ss)->ssl3HandshakeLock); \
  |  |  ------------------
  |  |  |  |  257|  9.36k|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1417|  9.36k|    }
  ------------------
  346|  9.36k|    ssl_Release1stHandshakeLock(ss);
  ------------------
  |  | 1398|  9.36k|    {                                                 \
  |  | 1399|  9.36k|        if (!ss->opt.noLocks)                         \
  |  |  ------------------
  |  |  |  Branch (1399:13): [True: 9.36k, False: 0]
  |  |  ------------------
  |  | 1400|  9.36k|            PZ_ExitMonitor((ss)->firstHandshakeLock); \
  |  |  ------------------
  |  |  |  |  257|  9.36k|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1401|  9.36k|    }
  ------------------
  347|       |
  348|  9.36k|    return SECSuccess;
  349|  9.36k|}
SSL_ForceHandshake:
  384|  12.8k|{
  385|  12.8k|    sslSocket *ss;
  386|  12.8k|    SECStatus rv = SECFailure;
  387|       |
  388|  12.8k|    ss = ssl_FindSocket(fd);
  389|  12.8k|    if (!ss) {
  ------------------
  |  Branch (389:9): [True: 0, False: 12.8k]
  ------------------
  390|      0|        SSL_DBG(("%d: SSL[%d]: bad socket in ForceHandshake",
  ------------------
  |  |   87|      0|    if (ssl_debug) \
  |  |  ------------------
  |  |  |  Branch (87:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   88|      0|    ssl_Trace b
  ------------------
  391|      0|                 SSL_GETPID(), fd));
  392|      0|        return rv;
  393|      0|    }
  394|       |
  395|       |    /* Don't waste my time */
  396|  12.8k|    if (!ss->opt.useSecurity)
  ------------------
  |  Branch (396:9): [True: 0, False: 12.8k]
  ------------------
  397|      0|        return SECSuccess;
  398|       |
  399|  12.8k|    if (!ssl_SocketIsBlocking(ss)) {
  ------------------
  |  Branch (399:9): [True: 12.8k, False: 0]
  ------------------
  400|  12.8k|        ssl_GetXmitBufLock(ss);
  ------------------
  |  | 1466|  12.8k|    {                                           \
  |  | 1467|  12.8k|        if (!ss->opt.noLocks)                   \
  |  |  ------------------
  |  |  |  Branch (1467:13): [True: 6.28k, False: 6.57k]
  |  |  ------------------
  |  | 1468|  12.8k|            PZ_EnterMonitor((ss)->xmitBufLock); \
  |  |  ------------------
  |  |  |  |  256|  6.28k|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1469|  12.8k|    }
  ------------------
  401|  12.8k|        if (ss->pendingBuf.len != 0) {
  ------------------
  |  Branch (401:13): [True: 0, False: 12.8k]
  ------------------
  402|      0|            int sent = ssl_SendSavedWriteData(ss);
  403|      0|            if ((sent < 0) && (PORT_GetError() != PR_WOULD_BLOCK_ERROR)) {
  ------------------
  |  |   62|      0|#define PORT_GetError PORT_GetError_Util
  ------------------
                          if ((sent < 0) && (PORT_GetError() != PR_WOULD_BLOCK_ERROR)) {
  ------------------
  |  |   22|      0|#define PR_WOULD_BLOCK_ERROR                     (-5998L)
  ------------------
  |  Branch (403:17): [True: 0, False: 0]
  |  Branch (403:31): [True: 0, False: 0]
  ------------------
  404|      0|                ssl_ReleaseXmitBufLock(ss);
  ------------------
  |  | 1471|      0|    {                                          \
  |  | 1472|      0|        if (!ss->opt.noLocks)                  \
  |  |  ------------------
  |  |  |  Branch (1472:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1473|      0|            PZ_ExitMonitor((ss)->xmitBufLock); \
  |  |  ------------------
  |  |  |  |  257|      0|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1474|      0|    }
  ------------------
  405|      0|                return SECFailure;
  406|      0|            }
  407|      0|        }
  408|  12.8k|        ssl_ReleaseXmitBufLock(ss);
  ------------------
  |  | 1471|  12.8k|    {                                          \
  |  | 1472|  12.8k|        if (!ss->opt.noLocks)                  \
  |  |  ------------------
  |  |  |  Branch (1472:13): [True: 6.28k, False: 6.57k]
  |  |  ------------------
  |  | 1473|  12.8k|            PZ_ExitMonitor((ss)->xmitBufLock); \
  |  |  ------------------
  |  |  |  |  257|  6.28k|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1474|  12.8k|    }
  ------------------
  409|  12.8k|    }
  410|       |
  411|  12.8k|    ssl_Get1stHandshakeLock(ss);
  ------------------
  |  | 1390|  12.8k|    {                                                             \
  |  | 1391|  12.8k|        if (!ss->opt.noLocks) {                                   \
  |  |  ------------------
  |  |  |  Branch (1391:13): [True: 6.28k, False: 6.57k]
  |  |  ------------------
  |  | 1392|  6.28k|            PORT_Assert(PZ_InMonitor((ss)->firstHandshakeLock) || \
  |  |  ------------------
  |  |  |  |  120|  6.28k|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|  12.5k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:7): [True: 0, False: 6.28k]
  |  |  |  |  |  |  |  Branch (208:7): [True: 6.28k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1393|  6.28k|                        !ssl_HaveRecvBufLock(ss));                \
  |  | 1394|  6.28k|            PZ_EnterMonitor((ss)->firstHandshakeLock);            \
  |  |  ------------------
  |  |  |  |  256|  6.28k|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1395|  6.28k|        }                                                         \
  |  | 1396|  12.8k|    }
  ------------------
  412|       |
  413|  12.8k|    if (ss->version >= SSL_LIBRARY_VERSION_3_0) {
  ------------------
  |  |   17|  12.8k|#define SSL_LIBRARY_VERSION_3_0                 0x0300
  ------------------
  |  Branch (413:9): [True: 3.50k, False: 9.36k]
  ------------------
  414|  3.50k|        int gatherResult;
  415|       |
  416|  3.50k|        ssl_GetRecvBufLock(ss);
  ------------------
  |  | 1449|  3.50k|    {                                                    \
  |  | 1450|  3.50k|        if (!ss->opt.noLocks) {                          \
  |  |  ------------------
  |  |  |  Branch (1450:13): [True: 1.67k, False: 1.82k]
  |  |  ------------------
  |  | 1451|  1.67k|            PORT_Assert(!ssl_HaveSSL3HandshakeLock(ss)); \
  |  |  ------------------
  |  |  |  |  120|  1.67k|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|  1.67k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 1.67k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1452|  1.67k|            PORT_Assert(!ssl_HaveXmitBufLock(ss));       \
  |  |  ------------------
  |  |  |  |  120|  1.67k|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|  1.67k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 1.67k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1453|  1.67k|            PZ_EnterMonitor((ss)->recvBufLock);          \
  |  |  ------------------
  |  |  |  |  256|  1.67k|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1454|  1.67k|        }                                                \
  |  | 1455|  3.50k|    }
  ------------------
  417|  3.50k|        gatherResult = ssl3_GatherCompleteHandshake(ss, 0);
  418|  3.50k|        ssl_ReleaseRecvBufLock(ss);
  ------------------
  |  | 1457|  3.50k|    {                                          \
  |  | 1458|  3.50k|        if (!ss->opt.noLocks)                  \
  |  |  ------------------
  |  |  |  Branch (1458:13): [True: 1.67k, False: 1.82k]
  |  |  ------------------
  |  | 1459|  3.50k|            PZ_ExitMonitor((ss)->recvBufLock); \
  |  |  ------------------
  |  |  |  |  257|  1.67k|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1460|  3.50k|    }
  ------------------
  419|  3.50k|        if (gatherResult > 0) {
  ------------------
  |  Branch (419:13): [True: 4, False: 3.49k]
  ------------------
  420|      4|            rv = SECSuccess;
  421|  3.49k|        } else {
  422|  3.49k|            if (gatherResult == 0) {
  ------------------
  |  Branch (422:17): [True: 554, False: 2.94k]
  ------------------
  423|    554|                PORT_SetError(PR_END_OF_FILE_ERROR);
  ------------------
  |  |   65|    554|#define PORT_SetError PORT_SetError_Util
  ------------------
                              PORT_SetError(PR_END_OF_FILE_ERROR);
  ------------------
  |  |  202|    554|#define PR_END_OF_FILE_ERROR                     (-5938L)
  ------------------
  424|    554|            }
  425|       |            /* We can rely on ssl3_GatherCompleteHandshake to set
  426|       |             * PR_WOULD_BLOCK_ERROR as needed here. */
  427|  3.49k|            rv = SECFailure;
  428|  3.49k|        }
  429|  9.36k|    } else {
  430|  9.36k|        PORT_Assert(!ss->firstHsDone);
  ------------------
  |  |  120|  9.36k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  9.36k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 9.36k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  431|  9.36k|        rv = ssl_Do1stHandshake(ss);
  432|  9.36k|    }
  433|       |
  434|  12.8k|    ssl_Release1stHandshakeLock(ss);
  ------------------
  |  | 1398|  12.8k|    {                                                 \
  |  | 1399|  12.8k|        if (!ss->opt.noLocks)                         \
  |  |  ------------------
  |  |  |  Branch (1399:13): [True: 6.28k, False: 6.57k]
  |  |  ------------------
  |  | 1400|  12.8k|            PZ_ExitMonitor((ss)->firstHandshakeLock); \
  |  |  ------------------
  |  |  |  |  257|  6.28k|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1401|  12.8k|    }
  ------------------
  435|       |
  436|  12.8k|    return rv;
  437|  12.8k|}
ssl_SaveWriteData:
  462|  16.4k|{
  463|  16.4k|    SECStatus rv;
  464|       |
  465|  16.4k|    PORT_Assert(ss->opt.noLocks || ssl_HaveXmitBufLock(ss));
  ------------------
  |  |  120|  16.4k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  24.4k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 8.35k, False: 8.05k]
  |  |  |  |  |  Branch (208:7): [True: 8.05k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  466|  16.4k|    rv = sslBuffer_Append(&ss->pendingBuf, data, len);
  467|  16.4k|    SSL_TRC(5, ("%d: SSL[%d]: saving %u bytes of data (%u total saved so far)",
  ------------------
  |  |   71|  16.4k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 16.4k]
  |  |  ------------------
  |  |   72|  16.4k|    ssl_Trace b
  ------------------
  468|  16.4k|                SSL_GETPID(), ss->fd, len, ss->pendingBuf.len));
  469|  16.4k|    return rv;
  470|  16.4k|}
ssl_SendSavedWriteData:
  480|  13.4k|{
  481|  13.4k|    int rv = 0;
  482|       |
  483|  13.4k|    PORT_Assert(ss->opt.noLocks || ssl_HaveXmitBufLock(ss));
  ------------------
  |  |  120|  13.4k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  20.0k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 6.79k, False: 6.60k]
  |  |  |  |  |  Branch (208:7): [True: 6.60k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  484|  13.4k|    if (ss->pendingBuf.len != 0) {
  ------------------
  |  Branch (484:9): [True: 13.1k, False: 241]
  ------------------
  485|  13.1k|        SSL_TRC(5, ("%d: SSL[%d]: sending %d bytes of saved data",
  ------------------
  |  |   71|  13.1k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 13.1k]
  |  |  ------------------
  |  |   72|  13.1k|    ssl_Trace b
  ------------------
  486|  13.1k|                    SSL_GETPID(), ss->fd, ss->pendingBuf.len));
  487|  13.1k|        rv = ssl_DefSend(ss, ss->pendingBuf.buf, ss->pendingBuf.len, 0);
  488|  13.1k|        if (rv < 0) {
  ------------------
  |  Branch (488:13): [True: 0, False: 13.1k]
  ------------------
  489|      0|            return rv;
  490|      0|        }
  491|  13.1k|        if (rv > ss->pendingBuf.len) {
  ------------------
  |  Branch (491:13): [True: 0, False: 13.1k]
  ------------------
  492|      0|            PORT_Assert(0); /* This shouldn't happen */
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  493|      0|            ss->pendingBuf.len = 0;
  494|  13.1k|        } else {
  495|  13.1k|            ss->pendingBuf.len -= rv;
  496|  13.1k|        }
  497|  13.1k|        if (ss->pendingBuf.len > 0 && rv > 0) {
  ------------------
  |  Branch (497:13): [True: 0, False: 13.1k]
  |  Branch (497:39): [True: 0, False: 0]
  ------------------
  498|       |            /* UGH !! This shifts the whole buffer down by copying it */
  499|      0|            PORT_Memmove(ss->pendingBuf.buf, ss->pendingBuf.buf + rv,
  ------------------
  |  |  181|      0|#define PORT_Memmove memmove
  ------------------
  500|      0|                         ss->pendingBuf.len);
  501|      0|        }
  502|  13.1k|    }
  503|  13.4k|    return rv;
  504|  13.4k|}
ssl_CreateSecurityInfo:
  619|  18.7k|{
  620|  18.7k|    SECStatus status;
  621|       |
  622|  18.7k|    ssl_GetXmitBufLock(ss);
  ------------------
  |  | 1466|  18.7k|    {                                           \
  |  | 1467|  18.7k|        if (!ss->opt.noLocks)                   \
  |  |  ------------------
  |  |  |  Branch (1467:13): [True: 13.9k, False: 4.75k]
  |  |  ------------------
  |  | 1468|  18.7k|            PZ_EnterMonitor((ss)->xmitBufLock); \
  |  |  ------------------
  |  |  |  |  256|  13.9k|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1469|  18.7k|    }
  ------------------
  623|  18.7k|    status = sslBuffer_Grow(&ss->sec.writeBuf, 4096);
  624|  18.7k|    ssl_ReleaseXmitBufLock(ss);
  ------------------
  |  | 1471|  18.7k|    {                                          \
  |  | 1472|  18.7k|        if (!ss->opt.noLocks)                  \
  |  |  ------------------
  |  |  |  Branch (1472:13): [True: 13.9k, False: 4.75k]
  |  |  ------------------
  |  | 1473|  18.7k|            PZ_ExitMonitor((ss)->xmitBufLock); \
  |  |  ------------------
  |  |  |  |  257|  13.9k|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1474|  18.7k|    }
  ------------------
  625|       |
  626|  18.7k|    return status;
  627|  18.7k|}
ssl_ResetSecurityInfo:
  649|  18.7k|{
  650|  18.7k|    if (sec->localCert) {
  ------------------
  |  Branch (650:9): [True: 0, False: 18.7k]
  ------------------
  651|      0|        CERT_DestroyCertificate(sec->localCert);
  652|      0|        sec->localCert = NULL;
  653|      0|    }
  654|  18.7k|    if (sec->peerCert) {
  ------------------
  |  Branch (654:9): [True: 5.09k, False: 13.6k]
  ------------------
  655|  5.09k|        CERT_DestroyCertificate(sec->peerCert);
  656|  5.09k|        sec->peerCert = NULL;
  657|  5.09k|    }
  658|  18.7k|    if (sec->peerKey) {
  ------------------
  |  Branch (658:9): [True: 0, False: 18.7k]
  ------------------
  659|      0|        SECKEY_DestroyPublicKey(sec->peerKey);
  660|      0|        sec->peerKey = NULL;
  661|      0|    }
  662|       |
  663|       |    /* cleanup the ci */
  664|  18.7k|    if (sec->ci.sid != NULL) {
  ------------------
  |  Branch (664:9): [True: 9.36k, False: 9.36k]
  ------------------
  665|  9.36k|        ssl_FreeSID(sec->ci.sid);
  666|  9.36k|    }
  667|  18.7k|    PORT_ZFree(sec->ci.sendBuf.buf, sec->ci.sendBuf.space);
  ------------------
  |  |   75|  18.7k|#define PORT_ZFree PORT_ZFree_Util
  ------------------
  668|  18.7k|    if (doMemset) {
  ------------------
  |  Branch (668:9): [True: 9.36k, False: 9.36k]
  ------------------
  669|  9.36k|        memset(&sec->ci, 0, sizeof sec->ci);
  670|  9.36k|    }
  671|  18.7k|}
ssl_DestroySecurityInfo:
  680|  9.36k|{
  681|  9.36k|    ssl_ResetSecurityInfo(sec, PR_FALSE);
  ------------------
  |  |  438|  9.36k|#define PR_FALSE 0
  ------------------
  682|       |
  683|  9.36k|    PORT_ZFree(sec->writeBuf.buf, sec->writeBuf.space);
  ------------------
  |  |   75|  9.36k|#define PORT_ZFree PORT_ZFree_Util
  ------------------
  684|  9.36k|    sec->writeBuf.buf = 0;
  685|       |
  686|  9.36k|    memset(sec, 0, sizeof *sec);
  687|  9.36k|}
ssl_SecureClose:
  732|  9.36k|{
  733|  9.36k|    int rv;
  734|       |
  735|  9.36k|    if (!(ss->shutdownHow & ssl_SHUTDOWN_SEND) &&
  ------------------
  |  |  316|  9.36k|#define ssl_SHUTDOWN_SEND 2 /* PR_SHUTDOWN_SEND +1 */
  ------------------
  |  Branch (735:9): [True: 9.36k, False: 0]
  ------------------
  736|  9.36k|        ss->firstHsDone) {
  ------------------
  |  Branch (736:9): [True: 0, False: 9.36k]
  ------------------
  737|       |
  738|       |        /* We don't want the final alert to be Nagle delayed. */
  739|      0|        if (!ss->delayDisabled) {
  ------------------
  |  Branch (739:13): [True: 0, False: 0]
  ------------------
  740|      0|            ssl_EnableNagleDelay(ss, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  741|      0|            ss->delayDisabled = 1;
  742|      0|        }
  743|       |
  744|      0|        (void)SSL3_SendAlert(ss, alert_warning, close_notify);
  745|      0|    }
  746|  9.36k|    rv = ssl_DefClose(ss);
  747|  9.36k|    return rv;
  748|  9.36k|}
ssl_SecureRecv:
  836|    518|{
  837|    518|    int rv = 0;
  838|       |
  839|    518|    if (ss->shutdownHow & ssl_SHUTDOWN_RCV) {
  ------------------
  |  |  315|    518|#define ssl_SHUTDOWN_RCV 1  /* PR_SHUTDOWN_RCV  +1 */
  ------------------
  |  Branch (839:9): [True: 0, False: 518]
  ------------------
  840|      0|        PORT_SetError(PR_SOCKET_SHUTDOWN_ERROR);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
                      PORT_SetError(PR_SOCKET_SHUTDOWN_ERROR);
  ------------------
  |  |  229|      0|#define PR_SOCKET_SHUTDOWN_ERROR                 (-5929L)
  ------------------
  841|      0|        return PR_FAILURE;
  842|      0|    }
  843|    518|    if (flags & ~PR_MSG_PEEK) {
  ------------------
  |  | 1441|    518|#define PR_MSG_PEEK 0x2
  ------------------
  |  Branch (843:9): [True: 0, False: 518]
  ------------------
  844|      0|        PORT_SetError(PR_INVALID_ARGUMENT_ERROR);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
                      PORT_SetError(PR_INVALID_ARGUMENT_ERROR);
  ------------------
  |  |   55|      0|#define PR_INVALID_ARGUMENT_ERROR                (-5987L)
  ------------------
  845|      0|        return PR_FAILURE;
  846|      0|    }
  847|       |
  848|    518|    if (!ssl_SocketIsBlocking(ss) && !ss->opt.fdx) {
  ------------------
  |  Branch (848:9): [True: 518, False: 0]
  |  Branch (848:38): [True: 518, False: 0]
  ------------------
  849|    518|        ssl_GetXmitBufLock(ss);
  ------------------
  |  | 1466|    518|    {                                           \
  |  | 1467|    518|        if (!ss->opt.noLocks)                   \
  |  |  ------------------
  |  |  |  Branch (1467:13): [True: 249, False: 269]
  |  |  ------------------
  |  | 1468|    518|            PZ_EnterMonitor((ss)->xmitBufLock); \
  |  |  ------------------
  |  |  |  |  256|    249|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1469|    518|    }
  ------------------
  850|    518|        if (ss->pendingBuf.len != 0) {
  ------------------
  |  Branch (850:13): [True: 0, False: 518]
  ------------------
  851|      0|            rv = ssl_SendSavedWriteData(ss);
  852|      0|            if ((rv < 0) && (PORT_GetError() != PR_WOULD_BLOCK_ERROR)) {
  ------------------
  |  |   62|      0|#define PORT_GetError PORT_GetError_Util
  ------------------
                          if ((rv < 0) && (PORT_GetError() != PR_WOULD_BLOCK_ERROR)) {
  ------------------
  |  |   22|      0|#define PR_WOULD_BLOCK_ERROR                     (-5998L)
  ------------------
  |  Branch (852:17): [True: 0, False: 0]
  |  Branch (852:29): [True: 0, False: 0]
  ------------------
  853|      0|                ssl_ReleaseXmitBufLock(ss);
  ------------------
  |  | 1471|      0|    {                                          \
  |  | 1472|      0|        if (!ss->opt.noLocks)                  \
  |  |  ------------------
  |  |  |  Branch (1472:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1473|      0|            PZ_ExitMonitor((ss)->xmitBufLock); \
  |  |  ------------------
  |  |  |  |  257|      0|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1474|      0|    }
  ------------------
  854|      0|                return SECFailure;
  855|      0|            }
  856|      0|        }
  857|    518|        ssl_ReleaseXmitBufLock(ss);
  ------------------
  |  | 1471|    518|    {                                          \
  |  | 1472|    518|        if (!ss->opt.noLocks)                  \
  |  |  ------------------
  |  |  |  Branch (1472:13): [True: 249, False: 269]
  |  |  ------------------
  |  | 1473|    518|            PZ_ExitMonitor((ss)->xmitBufLock); \
  |  |  ------------------
  |  |  |  |  257|    249|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1474|    518|    }
  ------------------
  858|    518|    }
  859|       |
  860|    518|    rv = 0;
  861|    518|    if (!PR_CLIST_IS_EMPTY(&ss->ssl3.hs.bufferedEarlyData)) {
  ------------------
  |  |   94|    518|    ((_l)->next == (_l))
  ------------------
  |  Branch (861:9): [True: 0, False: 518]
  ------------------
  862|      0|        PORT_Assert(ss->version >= SSL_LIBRARY_VERSION_TLS_1_3);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  863|      0|        return tls13_Read0RttData(ss, buf, len);
  864|      0|    }
  865|       |
  866|       |    /* If any of these is non-zero, the initial handshake is not done. */
  867|    518|    if (!ss->firstHsDone) {
  ------------------
  |  Branch (867:9): [True: 518, False: 0]
  ------------------
  868|    518|        ssl_Get1stHandshakeLock(ss);
  ------------------
  |  | 1390|    518|    {                                                             \
  |  | 1391|    518|        if (!ss->opt.noLocks) {                                   \
  |  |  ------------------
  |  |  |  Branch (1391:13): [True: 249, False: 269]
  |  |  ------------------
  |  | 1392|    249|            PORT_Assert(PZ_InMonitor((ss)->firstHandshakeLock) || \
  |  |  ------------------
  |  |  |  |  120|    249|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|    498|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:7): [True: 0, False: 249]
  |  |  |  |  |  |  |  Branch (208:7): [True: 249, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1393|    249|                        !ssl_HaveRecvBufLock(ss));                \
  |  | 1394|    249|            PZ_EnterMonitor((ss)->firstHandshakeLock);            \
  |  |  ------------------
  |  |  |  |  256|    249|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1395|    249|        }                                                         \
  |  | 1396|    518|    }
  ------------------
  869|    518|        if (ss->handshake) {
  ------------------
  |  Branch (869:13): [True: 4, False: 514]
  ------------------
  870|      4|            rv = ssl_Do1stHandshake(ss);
  871|      4|        }
  872|    518|        ssl_Release1stHandshakeLock(ss);
  ------------------
  |  | 1398|    518|    {                                                 \
  |  | 1399|    518|        if (!ss->opt.noLocks)                         \
  |  |  ------------------
  |  |  |  Branch (1399:13): [True: 249, False: 269]
  |  |  ------------------
  |  | 1400|    518|            PZ_ExitMonitor((ss)->firstHandshakeLock); \
  |  |  ------------------
  |  |  |  |  257|    249|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1401|    518|    }
  ------------------
  873|    518|    } else {
  874|      0|        if (tls13_CheckKeyUpdate(ss, ssl_secret_read) != SECSuccess) {
  ------------------
  |  Branch (874:13): [True: 0, False: 0]
  ------------------
  875|      0|            rv = PR_FAILURE;
  876|      0|        }
  877|      0|    }
  878|    518|    if (rv < 0) {
  ------------------
  |  Branch (878:9): [True: 4, False: 514]
  ------------------
  879|      4|        if (PORT_GetError() == PR_WOULD_BLOCK_ERROR &&
  ------------------
  |  |   62|      4|#define PORT_GetError PORT_GetError_Util
  ------------------
                      if (PORT_GetError() == PR_WOULD_BLOCK_ERROR &&
  ------------------
  |  |   22|      8|#define PR_WOULD_BLOCK_ERROR                     (-5998L)
  ------------------
  |  Branch (879:13): [True: 1, False: 3]
  ------------------
  880|      4|            !PR_CLIST_IS_EMPTY(&ss->ssl3.hs.bufferedEarlyData)) {
  ------------------
  |  |   94|      1|    ((_l)->next == (_l))
  ------------------
  |  Branch (880:13): [True: 0, False: 1]
  ------------------
  881|      0|            PORT_Assert(ss->version >= SSL_LIBRARY_VERSION_TLS_1_3);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  882|      0|            return tls13_Read0RttData(ss, buf, len);
  883|      0|        }
  884|      4|        return rv;
  885|      4|    }
  886|       |
  887|    514|    if (len == 0)
  ------------------
  |  Branch (887:9): [True: 0, False: 514]
  ------------------
  888|      0|        return 0;
  889|       |
  890|    514|    rv = DoRecv(ss, (unsigned char *)buf, len, flags);
  891|    514|    SSL_TRC(2, ("%d: SSL[%d]: recving %d bytes securely (errno=%d)",
  ------------------
  |  |   71|    514|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 514]
  |  |  ------------------
  |  |   72|    514|    ssl_Trace b
  ------------------
  892|    514|                SSL_GETPID(), ss->fd, rv, PORT_GetError()));
  893|    514|    return rv;
  894|    514|}
ssl_SecureRead:
  898|    518|{
  899|    518|    return ssl_SecureRecv(ss, buf, len, 0);
  900|    518|}
SSL_SetURL:
 1145|  9.36k|{
 1146|  9.36k|    sslSocket *ss = ssl_FindSocket(fd);
 1147|  9.36k|    SECStatus rv = SECSuccess;
 1148|       |
 1149|  9.36k|    if (!ss) {
  ------------------
  |  Branch (1149:9): [True: 0, False: 9.36k]
  ------------------
 1150|      0|        SSL_DBG(("%d: SSL[%d]: bad socket in SSLSetURL",
  ------------------
  |  |   87|      0|    if (ssl_debug) \
  |  |  ------------------
  |  |  |  Branch (87:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   88|      0|    ssl_Trace b
  ------------------
 1151|      0|                 SSL_GETPID(), fd));
 1152|      0|        return SECFailure;
 1153|      0|    }
 1154|  9.36k|    ssl_Get1stHandshakeLock(ss);
  ------------------
  |  | 1390|  9.36k|    {                                                             \
  |  | 1391|  9.36k|        if (!ss->opt.noLocks) {                                   \
  |  |  ------------------
  |  |  |  Branch (1391:13): [True: 9.36k, False: 0]
  |  |  ------------------
  |  | 1392|  9.36k|            PORT_Assert(PZ_InMonitor((ss)->firstHandshakeLock) || \
  |  |  ------------------
  |  |  |  |  120|  9.36k|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|  18.7k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:7): [True: 0, False: 9.36k]
  |  |  |  |  |  |  |  Branch (208:7): [True: 9.36k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1393|  9.36k|                        !ssl_HaveRecvBufLock(ss));                \
  |  | 1394|  9.36k|            PZ_EnterMonitor((ss)->firstHandshakeLock);            \
  |  |  ------------------
  |  |  |  |  256|  9.36k|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1395|  9.36k|        }                                                         \
  |  | 1396|  9.36k|    }
  ------------------
 1155|  9.36k|    ssl_GetSSL3HandshakeLock(ss);
  ------------------
  |  | 1407|  9.36k|    {                                                 \
  |  | 1408|  9.36k|        if (!ss->opt.noLocks) {                       \
  |  |  ------------------
  |  |  |  Branch (1408:13): [True: 9.36k, False: 0]
  |  |  ------------------
  |  | 1409|  9.36k|            PORT_Assert(!ssl_HaveXmitBufLock(ss));    \
  |  |  ------------------
  |  |  |  |  120|  9.36k|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|  9.36k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 9.36k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1410|  9.36k|            PZ_EnterMonitor((ss)->ssl3HandshakeLock); \
  |  |  ------------------
  |  |  |  |  256|  9.36k|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1411|  9.36k|        }                                             \
  |  | 1412|  9.36k|    }
  ------------------
 1156|       |
 1157|  9.36k|    if (ss->url) {
  ------------------
  |  Branch (1157:9): [True: 0, False: 9.36k]
  ------------------
 1158|      0|        PORT_Free((void *)ss->url); /* CONST */
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 1159|      0|    }
 1160|       |
 1161|  9.36k|    ss->url = (const char *)PORT_Strdup(url);
  ------------------
  |  |   69|  9.36k|#define PORT_Strdup PORT_Strdup_Util
  ------------------
 1162|  9.36k|    if (ss->url == NULL) {
  ------------------
  |  Branch (1162:9): [True: 0, False: 9.36k]
  ------------------
 1163|      0|        rv = SECFailure;
 1164|      0|    }
 1165|       |
 1166|  9.36k|    ssl_ReleaseSSL3HandshakeLock(ss);
  ------------------
  |  | 1414|  9.36k|    {                                                \
  |  | 1415|  9.36k|        if (!ss->opt.noLocks)                        \
  |  |  ------------------
  |  |  |  Branch (1415:13): [True: 9.36k, False: 0]
  |  |  ------------------
  |  | 1416|  9.36k|            PZ_ExitMonitor((ss)->ssl3HandshakeLock); \
  |  |  ------------------
  |  |  |  |  257|  9.36k|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1417|  9.36k|    }
  ------------------
 1167|  9.36k|    ssl_Release1stHandshakeLock(ss);
  ------------------
  |  | 1398|  9.36k|    {                                                 \
  |  | 1399|  9.36k|        if (!ss->opt.noLocks)                         \
  |  |  ------------------
  |  |  |  Branch (1399:13): [True: 9.36k, False: 0]
  |  |  ------------------
  |  | 1400|  9.36k|            PZ_ExitMonitor((ss)->firstHandshakeLock); \
  |  |  ------------------
  |  |  |  |  257|  9.36k|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1401|  9.36k|    }
  ------------------
 1168|       |
 1169|  9.36k|    return rv;
 1170|  9.36k|}
sslsecur.c:DoRecv:
  523|    514|{
  524|    514|    int rv;
  525|    514|    int amount;
  526|    514|    int available;
  527|       |
  528|       |    /* ssl3_GatherAppDataRecord may call ssl_FinishHandshake, which needs the
  529|       |     * 1stHandshakeLock. */
  530|    514|    ssl_Get1stHandshakeLock(ss);
  ------------------
  |  | 1390|    514|    {                                                             \
  |  | 1391|    514|        if (!ss->opt.noLocks) {                                   \
  |  |  ------------------
  |  |  |  Branch (1391:13): [True: 247, False: 267]
  |  |  ------------------
  |  | 1392|    247|            PORT_Assert(PZ_InMonitor((ss)->firstHandshakeLock) || \
  |  |  ------------------
  |  |  |  |  120|    247|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|    494|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:7): [True: 0, False: 247]
  |  |  |  |  |  |  |  Branch (208:7): [True: 247, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1393|    247|                        !ssl_HaveRecvBufLock(ss));                \
  |  | 1394|    247|            PZ_EnterMonitor((ss)->firstHandshakeLock);            \
  |  |  ------------------
  |  |  |  |  256|    247|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1395|    247|        }                                                         \
  |  | 1396|    514|    }
  ------------------
  531|    514|    ssl_GetRecvBufLock(ss);
  ------------------
  |  | 1449|    514|    {                                                    \
  |  | 1450|    514|        if (!ss->opt.noLocks) {                          \
  |  |  ------------------
  |  |  |  Branch (1450:13): [True: 247, False: 267]
  |  |  ------------------
  |  | 1451|    247|            PORT_Assert(!ssl_HaveSSL3HandshakeLock(ss)); \
  |  |  ------------------
  |  |  |  |  120|    247|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|    247|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 247, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1452|    247|            PORT_Assert(!ssl_HaveXmitBufLock(ss));       \
  |  |  ------------------
  |  |  |  |  120|    247|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|    247|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 247, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1453|    247|            PZ_EnterMonitor((ss)->recvBufLock);          \
  |  |  ------------------
  |  |  |  |  256|    247|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1454|    247|        }                                                \
  |  | 1455|    514|    }
  ------------------
  532|       |
  533|    514|    available = ss->gs.writeOffset - ss->gs.readOffset;
  534|    514|    if (available == 0) {
  ------------------
  |  Branch (534:9): [True: 514, False: 0]
  ------------------
  535|       |        /* Wait for application data to arrive.  */
  536|    514|        rv = ssl3_GatherAppDataRecord(ss, 0);
  537|    514|        if (rv <= 0) {
  ------------------
  |  Branch (537:13): [True: 514, False: 0]
  ------------------
  538|    514|            if (rv == 0) {
  ------------------
  |  Branch (538:17): [True: 417, False: 97]
  ------------------
  539|       |                /* EOF */
  540|    417|                SSL_TRC(10, ("%d: SSL[%d]: ssl_recv EOF",
  ------------------
  |  |   71|    417|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 417]
  |  |  ------------------
  |  |   72|    417|    ssl_Trace b
  ------------------
  541|    417|                             SSL_GETPID(), ss->fd));
  542|    417|                goto done;
  543|    417|            }
  544|     97|            if (PR_GetError() != PR_WOULD_BLOCK_ERROR) {
  ------------------
  |  |   22|     97|#define PR_WOULD_BLOCK_ERROR                     (-5998L)
  ------------------
  |  Branch (544:17): [True: 29, False: 68]
  ------------------
  545|       |                /* Some random error */
  546|     29|                goto done;
  547|     29|            }
  548|       |
  549|       |            /*
  550|       |            ** Gather record is blocked waiting for more record data to
  551|       |            ** arrive. Try to process what we have already received
  552|       |            */
  553|     97|        } else {
  554|       |            /* Gather record has finished getting a complete record */
  555|      0|        }
  556|       |
  557|       |        /* See if any clear data is now available */
  558|     68|        available = ss->gs.writeOffset - ss->gs.readOffset;
  559|     68|        if (available == 0) {
  ------------------
  |  Branch (559:13): [True: 68, False: 0]
  ------------------
  560|       |            /*
  561|       |            ** No partial data is available. Force error code to
  562|       |            ** EWOULDBLOCK so that caller will try again later. Note
  563|       |            ** that the error code is probably EWOULDBLOCK already,
  564|       |            ** but if it isn't (for example, if we received a zero
  565|       |            ** length record) then this will force it to be correct.
  566|       |            */
  567|     68|            PORT_SetError(PR_WOULD_BLOCK_ERROR);
  ------------------
  |  |   65|     68|#define PORT_SetError PORT_SetError_Util
  ------------------
                          PORT_SetError(PR_WOULD_BLOCK_ERROR);
  ------------------
  |  |   22|     68|#define PR_WOULD_BLOCK_ERROR                     (-5998L)
  ------------------
  568|     68|            rv = SECFailure;
  569|     68|            goto done;
  570|     68|        }
  571|      0|        SSL_TRC(30, ("%d: SSL[%d]: partial data ready, available=%d",
  ------------------
  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    ssl_Trace b
  ------------------
  572|      0|                     SSL_GETPID(), ss->fd, available));
  573|      0|    }
  574|       |
  575|      0|    if (IS_DTLS(ss) && (len < available)) {
  ------------------
  |  |  892|      0|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (575:24): [True: 0, False: 0]
  ------------------
  576|       |        /* DTLS does not allow you to do partial reads */
  577|      0|        SSL_TRC(30, ("%d: SSL[%d]: DTLS short read. len=%d available=%d",
  ------------------
  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    ssl_Trace b
  ------------------
  578|      0|                     SSL_GETPID(), ss->fd, len, available));
  579|      0|        ss->gs.readOffset += available;
  580|      0|        PORT_SetError(SSL_ERROR_RX_SHORT_DTLS_READ);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  581|      0|        rv = SECFailure;
  582|      0|        goto done;
  583|      0|    }
  584|       |
  585|       |    /* Dole out clear data to reader */
  586|      0|    amount = PR_MIN(len, available);
  ------------------
  |  |  158|      0|#define PR_MIN(x,y)     ((x)<(y)?(x):(y))
  |  |  ------------------
  |  |  |  Branch (158:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  587|      0|    PORT_Memcpy(out, ss->gs.buf.buf + ss->gs.readOffset, amount);
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
  588|      0|    if (!(flags & PR_MSG_PEEK)) {
  ------------------
  |  | 1441|      0|#define PR_MSG_PEEK 0x2
  ------------------
  |  Branch (588:9): [True: 0, False: 0]
  ------------------
  589|      0|        ss->gs.readOffset += amount;
  590|      0|    }
  591|      0|    PORT_Assert(ss->gs.readOffset <= ss->gs.writeOffset);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  592|      0|    rv = amount;
  593|       |
  594|      0|#ifdef DEBUG
  595|       |    /* In Debug builds free and zero gather plaintext buffer after its content
  596|       |     * has been used/copied for advanced ASAN coverage/utilization.
  597|       |     * This frees the buffer after reception of application data,
  598|       |     * non-application data is freed at the end of
  599|       |     * ssl3con.c/ssl3_HandleRecord(). */
  600|      0|    if (ss->gs.writeOffset == ss->gs.readOffset) {
  ------------------
  |  Branch (600:9): [True: 0, False: 0]
  ------------------
  601|      0|        sslBuffer_Clear(&ss->gs.buf);
  602|      0|    }
  603|      0|#endif
  604|       |
  605|      0|    SSL_TRC(30, ("%d: SSL[%d]: amount=%d available=%d",
  ------------------
  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    ssl_Trace b
  ------------------
  606|      0|                 SSL_GETPID(), ss->fd, amount, available));
  607|      0|    PRINT_BUF(4, (ss, "DoRecv receiving plaintext:", out, amount));
  ------------------
  |  |   74|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   75|      0|    ssl_PrintBuf b
  ------------------
  608|       |
  609|    514|done:
  610|    514|    ssl_ReleaseRecvBufLock(ss);
  ------------------
  |  | 1457|    514|    {                                          \
  |  | 1458|    514|        if (!ss->opt.noLocks)                  \
  |  |  ------------------
  |  |  |  Branch (1458:13): [True: 247, False: 267]
  |  |  ------------------
  |  | 1459|    514|            PZ_ExitMonitor((ss)->recvBufLock); \
  |  |  ------------------
  |  |  |  |  257|    247|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1460|    514|    }
  ------------------
  611|    514|    ssl_Release1stHandshakeLock(ss);
  ------------------
  |  | 1398|    514|    {                                                 \
  |  | 1399|    514|        if (!ss->opt.noLocks)                         \
  |  |  ------------------
  |  |  |  Branch (1399:13): [True: 247, False: 267]
  |  |  ------------------
  |  | 1400|    514|            PZ_ExitMonitor((ss)->firstHandshakeLock); \
  |  |  ------------------
  |  |  |  |  257|    247|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1401|    514|    }
  ------------------
  612|    514|    return rv;
  613|      0|}

ssl_FindSocket:
  250|   943k|{
  251|   943k|    PRFileDesc *layer;
  252|   943k|    sslSocket *ss;
  253|       |
  254|   943k|    PORT_Assert(fd != NULL);
  ------------------
  |  |  120|   943k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|   943k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 943k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  255|   943k|    PORT_Assert(ssl_layer_id != 0);
  ------------------
  |  |  120|   943k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|   943k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 943k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  256|       |
  257|   943k|    layer = PR_GetIdentitiesLayer(fd, ssl_layer_id);
  258|   943k|    if (layer == NULL) {
  ------------------
  |  Branch (258:9): [True: 0, False: 943k]
  ------------------
  259|      0|        PORT_SetError(PR_BAD_DESCRIPTOR_ERROR);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
                      PORT_SetError(PR_BAD_DESCRIPTOR_ERROR);
  ------------------
  |  |   19|      0|#define PR_BAD_DESCRIPTOR_ERROR                  (-5999L)
  ------------------
  260|      0|        return NULL;
  261|      0|    }
  262|       |
  263|   943k|    ss = (sslSocket *)layer->secret;
  264|       |    /* Set ss->fd lazily. We can't rely on the value of ss->fd set by
  265|       |     * ssl_PushIOLayer because another PR_PushIOLayer call will switch the
  266|       |     * contents of the PRFileDesc pointed by ss->fd and the new layer.
  267|       |     * See bug 807250.
  268|       |     */
  269|   943k|    ss->fd = layer;
  270|   943k|    return ss;
  271|   943k|}
ssl_FreeSocket:
  514|  9.36k|{
  515|       |    /* Get every lock you can imagine!
  516|       |    ** Caller already holds these:
  517|       |    **  SSL_LOCK_READER(ss);
  518|       |    **  SSL_LOCK_WRITER(ss);
  519|       |    */
  520|  9.36k|    ssl_Get1stHandshakeLock(ss);
  ------------------
  |  | 1390|  9.36k|    {                                                             \
  |  | 1391|  9.36k|        if (!ss->opt.noLocks) {                                   \
  |  |  ------------------
  |  |  |  Branch (1391:13): [True: 4.61k, False: 4.75k]
  |  |  ------------------
  |  | 1392|  4.61k|            PORT_Assert(PZ_InMonitor((ss)->firstHandshakeLock) || \
  |  |  ------------------
  |  |  |  |  120|  4.61k|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|  9.22k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:7): [True: 0, False: 4.61k]
  |  |  |  |  |  |  |  Branch (208:7): [True: 4.61k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1393|  4.61k|                        !ssl_HaveRecvBufLock(ss));                \
  |  | 1394|  4.61k|            PZ_EnterMonitor((ss)->firstHandshakeLock);            \
  |  |  ------------------
  |  |  |  |  256|  4.61k|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1395|  4.61k|        }                                                         \
  |  | 1396|  9.36k|    }
  ------------------
  521|  9.36k|    ssl_GetRecvBufLock(ss);
  ------------------
  |  | 1449|  9.36k|    {                                                    \
  |  | 1450|  9.36k|        if (!ss->opt.noLocks) {                          \
  |  |  ------------------
  |  |  |  Branch (1450:13): [True: 4.61k, False: 4.75k]
  |  |  ------------------
  |  | 1451|  4.61k|            PORT_Assert(!ssl_HaveSSL3HandshakeLock(ss)); \
  |  |  ------------------
  |  |  |  |  120|  4.61k|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|  4.61k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 4.61k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1452|  4.61k|            PORT_Assert(!ssl_HaveXmitBufLock(ss));       \
  |  |  ------------------
  |  |  |  |  120|  4.61k|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|  4.61k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 4.61k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1453|  4.61k|            PZ_EnterMonitor((ss)->recvBufLock);          \
  |  |  ------------------
  |  |  |  |  256|  4.61k|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1454|  4.61k|        }                                                \
  |  | 1455|  9.36k|    }
  ------------------
  522|  9.36k|    ssl_GetSSL3HandshakeLock(ss);
  ------------------
  |  | 1407|  9.36k|    {                                                 \
  |  | 1408|  9.36k|        if (!ss->opt.noLocks) {                       \
  |  |  ------------------
  |  |  |  Branch (1408:13): [True: 4.61k, False: 4.75k]
  |  |  ------------------
  |  | 1409|  4.61k|            PORT_Assert(!ssl_HaveXmitBufLock(ss));    \
  |  |  ------------------
  |  |  |  |  120|  4.61k|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|  4.61k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 4.61k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1410|  4.61k|            PZ_EnterMonitor((ss)->ssl3HandshakeLock); \
  |  |  ------------------
  |  |  |  |  256|  4.61k|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1411|  4.61k|        }                                             \
  |  | 1412|  9.36k|    }
  ------------------
  523|  9.36k|    ssl_GetXmitBufLock(ss);
  ------------------
  |  | 1466|  9.36k|    {                                           \
  |  | 1467|  9.36k|        if (!ss->opt.noLocks)                   \
  |  |  ------------------
  |  |  |  Branch (1467:13): [True: 4.61k, False: 4.75k]
  |  |  ------------------
  |  | 1468|  9.36k|            PZ_EnterMonitor((ss)->xmitBufLock); \
  |  |  ------------------
  |  |  |  |  256|  4.61k|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1469|  9.36k|    }
  ------------------
  524|  9.36k|    ssl_GetSpecWriteLock(ss);
  ------------------
  |  | 1435|  9.36k|    {                                            \
  |  | 1436|  9.36k|        if (!ss->opt.noLocks)                    \
  |  |  ------------------
  |  |  |  Branch (1436:13): [True: 4.61k, False: 4.75k]
  |  |  ------------------
  |  | 1437|  9.36k|            NSSRWLock_LockWrite((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   48|  4.61k|#define NSSRWLock_LockWrite NSSRWLock_LockWrite_Util
  |  |  ------------------
  |  | 1438|  9.36k|    }
  ------------------
  525|       |
  526|  9.36k|    ssl_DestroySocketContents(ss);
  527|       |
  528|       |    /* Release all the locks acquired above.  */
  529|  9.36k|    SSL_UNLOCK_READER(ss);
  ------------------
  |  | 1379|  9.36k|    if (ss->recvLock)         \
  |  |  ------------------
  |  |  |  Branch (1379:9): [True: 9.36k, False: 0]
  |  |  ------------------
  |  | 1380|  9.36k|    PZ_Unlock(ss->recvLock)
  |  |  ------------------
  |  |  |  |  246|  9.36k|#define PZ_Unlock(k) PR_Unlock((k))
  |  |  ------------------
  ------------------
  530|  9.36k|    SSL_UNLOCK_WRITER(ss);
  ------------------
  |  | 1385|  9.36k|    if (ss->sendLock)         \
  |  |  ------------------
  |  |  |  Branch (1385:9): [True: 9.36k, False: 0]
  |  |  ------------------
  |  | 1386|  9.36k|    PZ_Unlock(ss->sendLock)
  |  |  ------------------
  |  |  |  |  246|  9.36k|#define PZ_Unlock(k) PR_Unlock((k))
  |  |  ------------------
  ------------------
  531|  9.36k|    ssl_Release1stHandshakeLock(ss);
  ------------------
  |  | 1398|  9.36k|    {                                                 \
  |  | 1399|  9.36k|        if (!ss->opt.noLocks)                         \
  |  |  ------------------
  |  |  |  Branch (1399:13): [True: 4.61k, False: 4.75k]
  |  |  ------------------
  |  | 1400|  9.36k|            PZ_ExitMonitor((ss)->firstHandshakeLock); \
  |  |  ------------------
  |  |  |  |  257|  4.61k|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1401|  9.36k|    }
  ------------------
  532|  9.36k|    ssl_ReleaseRecvBufLock(ss);
  ------------------
  |  | 1457|  9.36k|    {                                          \
  |  | 1458|  9.36k|        if (!ss->opt.noLocks)                  \
  |  |  ------------------
  |  |  |  Branch (1458:13): [True: 4.61k, False: 4.75k]
  |  |  ------------------
  |  | 1459|  9.36k|            PZ_ExitMonitor((ss)->recvBufLock); \
  |  |  ------------------
  |  |  |  |  257|  4.61k|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1460|  9.36k|    }
  ------------------
  533|  9.36k|    ssl_ReleaseSSL3HandshakeLock(ss);
  ------------------
  |  | 1414|  9.36k|    {                                                \
  |  | 1415|  9.36k|        if (!ss->opt.noLocks)                        \
  |  |  ------------------
  |  |  |  Branch (1415:13): [True: 4.61k, False: 4.75k]
  |  |  ------------------
  |  | 1416|  9.36k|            PZ_ExitMonitor((ss)->ssl3HandshakeLock); \
  |  |  ------------------
  |  |  |  |  257|  4.61k|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1417|  9.36k|    }
  ------------------
  534|  9.36k|    ssl_ReleaseXmitBufLock(ss);
  ------------------
  |  | 1471|  9.36k|    {                                          \
  |  | 1472|  9.36k|        if (!ss->opt.noLocks)                  \
  |  |  ------------------
  |  |  |  Branch (1472:13): [True: 4.61k, False: 4.75k]
  |  |  ------------------
  |  | 1473|  9.36k|            PZ_ExitMonitor((ss)->xmitBufLock); \
  |  |  ------------------
  |  |  |  |  257|  4.61k|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1474|  9.36k|    }
  ------------------
  535|  9.36k|    ssl_ReleaseSpecWriteLock(ss);
  ------------------
  |  | 1440|  9.36k|    {                                              \
  |  | 1441|  9.36k|        if (!ss->opt.noLocks)                      \
  |  |  ------------------
  |  |  |  Branch (1441:13): [True: 4.61k, False: 4.75k]
  |  |  ------------------
  |  | 1442|  9.36k|            NSSRWLock_UnlockWrite((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   51|  4.61k|#define NSSRWLock_UnlockWrite NSSRWLock_UnlockWrite_Util
  |  |  ------------------
  |  | 1443|  9.36k|    }
  ------------------
  536|       |
  537|  9.36k|    ssl_DestroyLocks(ss);
  538|       |
  539|  9.36k|#ifdef DEBUG
  540|  9.36k|    PORT_Memset(ss, 0x1f, sizeof *ss);
  ------------------
  |  |  182|  9.36k|#define PORT_Memset memset
  ------------------
  541|  9.36k|#endif
  542|  9.36k|    PORT_Free(ss);
  ------------------
  |  |   60|  9.36k|#define PORT_Free PORT_Free_Util
  ------------------
  543|  9.36k|    return;
  544|  9.36k|}
SSL_OptionSet:
  669|   177k|{
  670|   177k|    sslSocket *ss = ssl_FindSocket(fd);
  671|   177k|    SECStatus rv = SECSuccess;
  672|   177k|    PRBool holdingLocks;
  673|       |
  674|   177k|    if (!ss) {
  ------------------
  |  Branch (674:9): [True: 0, False: 177k]
  ------------------
  675|      0|        SSL_DBG(("%d: SSL[%d]: bad socket in Enable", SSL_GETPID(), fd));
  ------------------
  |  |   87|      0|    if (ssl_debug) \
  |  |  ------------------
  |  |  |  Branch (87:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   88|      0|    ssl_Trace b
  ------------------
  676|      0|        return SECFailure;
  677|      0|    }
  678|       |
  679|   177k|    holdingLocks = (!ss->opt.noLocks);
  680|   177k|    ssl_Get1stHandshakeLock(ss);
  ------------------
  |  | 1390|   177k|    {                                                             \
  |  | 1391|   177k|        if (!ss->opt.noLocks) {                                   \
  |  |  ------------------
  |  |  |  Branch (1391:13): [True: 168k, False: 9.50k]
  |  |  ------------------
  |  | 1392|   168k|            PORT_Assert(PZ_InMonitor((ss)->firstHandshakeLock) || \
  |  |  ------------------
  |  |  |  |  120|   168k|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|   336k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:7): [True: 0, False: 168k]
  |  |  |  |  |  |  |  Branch (208:7): [True: 168k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1393|   168k|                        !ssl_HaveRecvBufLock(ss));                \
  |  | 1394|   168k|            PZ_EnterMonitor((ss)->firstHandshakeLock);            \
  |  |  ------------------
  |  |  |  |  256|   168k|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1395|   168k|        }                                                         \
  |  | 1396|   177k|    }
  ------------------
  681|   177k|    ssl_GetSSL3HandshakeLock(ss);
  ------------------
  |  | 1407|   177k|    {                                                 \
  |  | 1408|   177k|        if (!ss->opt.noLocks) {                       \
  |  |  ------------------
  |  |  |  Branch (1408:13): [True: 168k, False: 9.50k]
  |  |  ------------------
  |  | 1409|   168k|            PORT_Assert(!ssl_HaveXmitBufLock(ss));    \
  |  |  ------------------
  |  |  |  |  120|   168k|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|   168k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 168k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1410|   168k|            PZ_EnterMonitor((ss)->ssl3HandshakeLock); \
  |  |  ------------------
  |  |  |  |  256|   168k|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1411|   168k|        }                                             \
  |  | 1412|   177k|    }
  ------------------
  682|       |
  683|   177k|    switch (which) {
  684|      0|        case SSL_SOCKS:
  ------------------
  |  |   70|      0|#define SSL_SOCKS 2               /* (off by default) */
  ------------------
  |  Branch (684:9): [True: 0, False: 177k]
  ------------------
  685|      0|            ss->opt.useSocks = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  686|      0|            rv = PrepareSocket(ss);
  687|      0|            if (val) {
  ------------------
  |  Branch (687:17): [True: 0, False: 0]
  ------------------
  688|      0|                PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  689|      0|                rv = SECFailure;
  690|      0|            }
  691|      0|            break;
  692|       |
  693|      0|        case SSL_SECURITY:
  ------------------
  |  |   69|      0|#define SSL_SECURITY 1            /* (on by default) */
  ------------------
  |  Branch (693:9): [True: 0, False: 177k]
  ------------------
  694|      0|            ss->opt.useSecurity = val;
  695|      0|            rv = PrepareSocket(ss);
  696|      0|            break;
  697|       |
  698|      0|        case SSL_REQUEST_CERTIFICATE:
  ------------------
  |  |   71|      0|#define SSL_REQUEST_CERTIFICATE 3 /* (off by default) */
  ------------------
  |  Branch (698:9): [True: 0, False: 177k]
  ------------------
  699|      0|            ss->opt.requestCertificate = val;
  700|      0|            break;
  701|       |
  702|      0|        case SSL_REQUIRE_CERTIFICATE:
  ------------------
  |  |   87|      0|#define SSL_REQUIRE_CERTIFICATE 10 /* (SSL_REQUIRE_FIRST_HANDSHAKE */
  ------------------
  |  Branch (702:9): [True: 0, False: 177k]
  ------------------
  703|      0|            ss->opt.requireCertificate = val;
  704|      0|            break;
  705|       |
  706|      0|        case SSL_HANDSHAKE_AS_CLIENT:
  ------------------
  |  |   72|      0|#define SSL_HANDSHAKE_AS_CLIENT 5 /* force accept to hs as client */
  ------------------
  |  Branch (706:9): [True: 0, False: 177k]
  ------------------
  707|      0|            if (ss->opt.handshakeAsServer && val) {
  ------------------
  |  Branch (707:17): [True: 0, False: 0]
  |  Branch (707:46): [True: 0, False: 0]
  ------------------
  708|      0|                PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  709|      0|                rv = SECFailure;
  710|      0|                break;
  711|      0|            }
  712|      0|            ss->opt.handshakeAsClient = val;
  713|      0|            break;
  714|       |
  715|      0|        case SSL_HANDSHAKE_AS_SERVER:
  ------------------
  |  |   74|      0|#define SSL_HANDSHAKE_AS_SERVER 6 /* force connect to hs as server */
  ------------------
  |  Branch (715:9): [True: 0, False: 177k]
  ------------------
  716|      0|            if (ss->opt.handshakeAsClient && val) {
  ------------------
  |  Branch (716:17): [True: 0, False: 0]
  |  Branch (716:46): [True: 0, False: 0]
  ------------------
  717|      0|                PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  718|      0|                rv = SECFailure;
  719|      0|                break;
  720|      0|            }
  721|      0|            ss->opt.handshakeAsServer = val;
  722|      0|            break;
  723|       |
  724|      0|        case SSL_ENABLE_TLS:
  ------------------
  |  |  102|      0|#define SSL_ENABLE_TLS 13 /* enable TLS (on by default) */
  ------------------
  |  Branch (724:9): [True: 0, False: 177k]
  ------------------
  725|      0|            if (IS_DTLS(ss)) {
  ------------------
  |  |  892|      0|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  726|      0|                if (val) {
  ------------------
  |  Branch (726:21): [True: 0, False: 0]
  ------------------
  727|      0|                    PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  728|      0|                    rv = SECFailure; /* not allowed */
  729|      0|                }
  730|      0|                break;
  731|      0|            }
  732|      0|            ssl_EnableTLS(&ss->vrange, val);
  733|      0|            break;
  734|       |
  735|      0|        case SSL_ENABLE_SSL3:
  ------------------
  |  |   83|      0|#define SSL_ENABLE_SSL3 8 /* enable ssl v3 (on by default) */
  ------------------
  |  Branch (735:9): [True: 0, False: 177k]
  ------------------
  736|      0|            if (IS_DTLS(ss)) {
  ------------------
  |  |  892|      0|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  737|      0|                if (val) {
  ------------------
  |  Branch (737:21): [True: 0, False: 0]
  ------------------
  738|      0|                    PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  739|      0|                    rv = SECFailure; /* not allowed */
  740|      0|                }
  741|      0|                break;
  742|      0|            }
  743|      0|            ssl_EnableSSL3(&ss->vrange, val);
  744|      0|            break;
  745|       |
  746|      0|        case SSL_ENABLE_SSL2:
  ------------------
  |  |   78|      0|#define SSL_ENABLE_SSL2 7 /* enable ssl v2 (off by default) */
  ------------------
  |  Branch (746:9): [True: 0, False: 177k]
  ------------------
  747|      0|        case SSL_V2_COMPATIBLE_HELLO:
  ------------------
  |  |   96|      0|#define SSL_V2_COMPATIBLE_HELLO 12 /* send v3 client hello in v2 fmt */
  ------------------
  |  Branch (747:9): [True: 0, False: 177k]
  ------------------
  748|       |            /* We no longer support SSL v2.
  749|       |             * However, if an old application requests to disable SSL v2,
  750|       |             * we shouldn't fail.
  751|       |             */
  752|      0|            if (val) {
  ------------------
  |  Branch (752:17): [True: 0, False: 0]
  ------------------
  753|      0|                PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  754|      0|                rv = SECFailure;
  755|      0|            }
  756|      0|            break;
  757|       |
  758|  9.36k|        case SSL_NO_CACHE:
  ------------------
  |  |   85|  9.36k|#define SSL_NO_CACHE 9             /* don't use the session cache */
  ------------------
  |  Branch (758:9): [True: 9.36k, False: 168k]
  ------------------
  759|  9.36k|            ss->opt.noCache = val;
  760|  9.36k|            break;
  761|       |
  762|      0|        case SSL_ENABLE_FDX:
  ------------------
  |  |   89|      0|#define SSL_ENABLE_FDX 11          /* permit simultaneous read/write */
  ------------------
  |  Branch (762:9): [True: 0, False: 177k]
  ------------------
  763|      0|            if (val && ss->opt.noLocks) {
  ------------------
  |  Branch (763:17): [True: 0, False: 0]
  |  Branch (763:24): [True: 0, False: 0]
  ------------------
  764|      0|                PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  765|      0|                rv = SECFailure;
  766|      0|            }
  767|      0|            ss->opt.fdx = val;
  768|      0|            break;
  769|       |
  770|      0|        case SSL_ROLLBACK_DETECTION:
  ------------------
  |  |  104|      0|#define SSL_ROLLBACK_DETECTION 14       /* for compatibility, default: on */
  ------------------
  |  Branch (770:9): [True: 0, False: 177k]
  ------------------
  771|      0|            ss->opt.detectRollBack = val;
  772|      0|            break;
  773|       |
  774|      0|        case SSL_NO_STEP_DOWN:
  ------------------
  |  |  105|      0|#define SSL_NO_STEP_DOWN 15             /* (unsupported, deprecated, off) */
  ------------------
  |  Branch (774:9): [True: 0, False: 177k]
  ------------------
  775|      0|            break;
  776|       |
  777|      0|        case SSL_BYPASS_PKCS11:
  ------------------
  |  |  106|      0|#define SSL_BYPASS_PKCS11 16            /* (unsupported, deprecated, off) */
  ------------------
  |  Branch (777:9): [True: 0, False: 177k]
  ------------------
  778|      0|            break;
  779|       |
  780|  9.36k|        case SSL_NO_LOCKS:
  ------------------
  |  |  107|  9.36k|#define SSL_NO_LOCKS 17                 /* Don't use locks for protection */
  ------------------
  |  Branch (780:9): [True: 9.36k, False: 168k]
  ------------------
  781|  9.36k|            if (val && ss->opt.fdx) {
  ------------------
  |  Branch (781:17): [True: 4.75k, False: 4.61k]
  |  Branch (781:24): [True: 0, False: 4.75k]
  ------------------
  782|      0|                PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  783|      0|                rv = SECFailure;
  784|      0|            }
  785|  9.36k|            if (val && ssl_force_locks)
  ------------------
  |  Branch (785:17): [True: 4.75k, False: 4.61k]
  |  Branch (785:24): [True: 0, False: 4.75k]
  ------------------
  786|      0|                val = PR_FALSE; /* silent override */
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  787|  9.36k|            ss->opt.noLocks = val;
  788|  9.36k|            if (!val && !holdingLocks) {
  ------------------
  |  Branch (788:17): [True: 4.61k, False: 4.75k]
  |  Branch (788:25): [True: 0, False: 4.61k]
  ------------------
  789|      0|                rv = ssl_MakeLocks(ss);
  790|      0|                if (rv != SECSuccess) {
  ------------------
  |  Branch (790:21): [True: 0, False: 0]
  ------------------
  791|      0|                    ss->opt.noLocks = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  792|      0|                }
  793|      0|            }
  794|  9.36k|            break;
  795|       |
  796|  9.36k|        case SSL_ENABLE_SESSION_TICKETS:
  ------------------
  |  |  108|  9.36k|#define SSL_ENABLE_SESSION_TICKETS 18   /* Enable TLS SessionTicket       */
  ------------------
  |  Branch (796:9): [True: 9.36k, False: 168k]
  ------------------
  797|  9.36k|            ss->opt.enableSessionTickets = val;
  798|  9.36k|            break;
  799|       |
  800|  9.36k|        case SSL_ENABLE_DEFLATE:
  ------------------
  |  |  110|  9.36k|#define SSL_ENABLE_DEFLATE 19           /* (unsupported, deprecated, off) */
  ------------------
  |  Branch (800:9): [True: 9.36k, False: 168k]
  ------------------
  801|  9.36k|            ss->opt.enableDeflate = val;
  802|  9.36k|            break;
  803|       |
  804|      0|        case SSL_ENABLE_RENEGOTIATION:
  ------------------
  |  |  111|      0|#define SSL_ENABLE_RENEGOTIATION 20     /* Values below (default: never)  */
  ------------------
  |  Branch (804:9): [True: 0, False: 177k]
  ------------------
  805|      0|            if (IS_DTLS(ss) && val != SSL_RENEGOTIATE_NEVER) {
  ------------------
  |  |  892|      0|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                          if (IS_DTLS(ss) && val != SSL_RENEGOTIATE_NEVER) {
  ------------------
  |  |  711|      0|#define SSL_RENEGOTIATE_NEVER ((PRBool)0)
  ------------------
  |  Branch (805:32): [True: 0, False: 0]
  ------------------
  806|      0|                PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  807|      0|                rv = SECFailure;
  808|      0|                break;
  809|      0|            }
  810|      0|            ss->opt.enableRenegotiation = val;
  811|      0|            break;
  812|       |
  813|  9.36k|        case SSL_REQUIRE_SAFE_NEGOTIATION:
  ------------------
  |  |  112|  9.36k|#define SSL_REQUIRE_SAFE_NEGOTIATION 21 /* Peer must send Signaling       */
  ------------------
  |  Branch (813:9): [True: 9.36k, False: 168k]
  ------------------
  814|  9.36k|            ss->opt.requireSafeNegotiation = val;
  815|  9.36k|            break;
  816|       |
  817|  9.36k|        case SSL_ENABLE_FALSE_START:
  ------------------
  |  |  117|  9.36k|#define SSL_ENABLE_FALSE_START 22       /* Enable SSL false start (off by */
  ------------------
  |  Branch (817:9): [True: 9.36k, False: 168k]
  ------------------
  818|  9.36k|            ss->opt.enableFalseStart = val;
  819|  9.36k|            break;
  820|       |
  821|  9.36k|        case SSL_CBC_RANDOM_IV:
  ------------------
  |  |  158|  9.36k|#define SSL_CBC_RANDOM_IV 23
  ------------------
  |  Branch (821:9): [True: 9.36k, False: 168k]
  ------------------
  822|  9.36k|            ss->opt.cbcRandomIV = val;
  823|  9.36k|            break;
  824|       |
  825|  9.36k|        case SSL_ENABLE_OCSP_STAPLING:
  ------------------
  |  |  159|  9.36k|#define SSL_ENABLE_OCSP_STAPLING 24 /* Request OCSP stapling (client) */
  ------------------
  |  Branch (825:9): [True: 9.36k, False: 168k]
  ------------------
  826|  9.36k|            ss->opt.enableOCSPStapling = val;
  827|  9.36k|            break;
  828|       |
  829|  9.36k|        case SSL_ENABLE_DELEGATED_CREDENTIALS:
  ------------------
  |  |  328|  9.36k|#define SSL_ENABLE_DELEGATED_CREDENTIALS 40
  ------------------
  |  Branch (829:9): [True: 9.36k, False: 168k]
  ------------------
  830|  9.36k|            ss->opt.enableDelegatedCredentials = val;
  831|  9.36k|            break;
  832|       |
  833|      0|        case SSL_ENABLE_NPN:
  ------------------
  |  |  163|      0|#define SSL_ENABLE_NPN 25
  ------------------
  |  Branch (833:9): [True: 0, False: 177k]
  ------------------
  834|      0|            break;
  835|       |
  836|  9.36k|        case SSL_ENABLE_ALPN:
  ------------------
  |  |  174|  9.36k|#define SSL_ENABLE_ALPN 26
  ------------------
  |  Branch (836:9): [True: 9.36k, False: 168k]
  ------------------
  837|  9.36k|            ss->opt.enableALPN = val;
  838|  9.36k|            break;
  839|       |
  840|      0|        case SSL_REUSE_SERVER_ECDHE_KEY:
  ------------------
  |  |  181|      0|#define SSL_REUSE_SERVER_ECDHE_KEY 27
  ------------------
  |  Branch (840:9): [True: 0, False: 177k]
  ------------------
  841|      0|            ss->opt.reuseServerECDHEKey = val;
  842|      0|            break;
  843|       |
  844|  9.36k|        case SSL_ENABLE_FALLBACK_SCSV:
  ------------------
  |  |  183|  9.36k|#define SSL_ENABLE_FALLBACK_SCSV 28 /* Send fallback SCSV in \
  ------------------
  |  Branch (844:9): [True: 9.36k, False: 168k]
  ------------------
  845|  9.36k|            ss->opt.enableFallbackSCSV = val;
  846|  9.36k|            break;
  847|       |
  848|      0|        case SSL_ENABLE_SERVER_DHE:
  ------------------
  |  |  188|      0|#define SSL_ENABLE_SERVER_DHE 29
  ------------------
  |  Branch (848:9): [True: 0, False: 177k]
  ------------------
  849|      0|            ss->opt.enableServerDhe = val;
  850|      0|            break;
  851|       |
  852|  9.36k|        case SSL_ENABLE_EXTENDED_MASTER_SECRET:
  ------------------
  |  |  195|  9.36k|#define SSL_ENABLE_EXTENDED_MASTER_SECRET 30
  ------------------
  |  Branch (852:9): [True: 9.36k, False: 168k]
  ------------------
  853|  9.36k|            ss->opt.enableExtendedMS = val;
  854|  9.36k|            break;
  855|       |
  856|      0|        case SSL_ENABLE_SIGNED_CERT_TIMESTAMPS:
  ------------------
  |  |  198|      0|#define SSL_ENABLE_SIGNED_CERT_TIMESTAMPS 31
  ------------------
  |  Branch (856:9): [True: 0, False: 177k]
  ------------------
  857|      0|            ss->opt.enableSignedCertTimestamps = val;
  858|      0|            break;
  859|       |
  860|  9.36k|        case SSL_REQUIRE_DH_NAMED_GROUPS:
  ------------------
  |  |  214|  9.36k|#define SSL_REQUIRE_DH_NAMED_GROUPS 32
  ------------------
  |  Branch (860:9): [True: 9.36k, False: 168k]
  ------------------
  861|  9.36k|            ss->opt.requireDHENamedGroups = val;
  862|  9.36k|            break;
  863|       |
  864|  9.36k|        case SSL_ENABLE_0RTT_DATA:
  ------------------
  |  |  244|  9.36k|#define SSL_ENABLE_0RTT_DATA 33
  ------------------
  |  Branch (864:9): [True: 9.36k, False: 168k]
  ------------------
  865|  9.36k|            ss->opt.enable0RttData = val;
  866|  9.36k|            break;
  867|       |
  868|      0|        case SSL_RECORD_SIZE_LIMIT:
  ------------------
  |  |  266|      0|#define SSL_RECORD_SIZE_LIMIT 34
  ------------------
  |  Branch (868:9): [True: 0, False: 177k]
  ------------------
  869|      0|            if (val < 64 || val > (MAX_FRAGMENT_LENGTH + 1)) {
  ------------------
  |  |   35|      0|#define MAX_FRAGMENT_LENGTH 16384
  ------------------
  |  Branch (869:17): [True: 0, False: 0]
  |  Branch (869:29): [True: 0, False: 0]
  ------------------
  870|      0|                PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  871|      0|                rv = SECFailure;
  872|      0|            } else {
  873|      0|                ss->opt.recordSizeLimit = val;
  874|      0|            }
  875|      0|            break;
  876|       |
  877|  9.36k|        case SSL_ENABLE_TLS13_COMPAT_MODE:
  ------------------
  |  |  272|  9.36k|#define SSL_ENABLE_TLS13_COMPAT_MODE 35
  ------------------
  |  Branch (877:9): [True: 9.36k, False: 168k]
  ------------------
  878|  9.36k|            ss->opt.enableTls13CompatMode = val;
  879|  9.36k|            break;
  880|       |
  881|  9.36k|        case SSL_ENABLE_DTLS_SHORT_HEADER:
  ------------------
  |  |  283|  9.36k|#define SSL_ENABLE_DTLS_SHORT_HEADER 36
  ------------------
  |  Branch (881:9): [True: 9.36k, False: 168k]
  ------------------
  882|  9.36k|            ss->opt.enableDtlsShortHeader = val;
  883|  9.36k|            break;
  884|       |
  885|      0|        case SSL_ENABLE_HELLO_DOWNGRADE_CHECK:
  ------------------
  |  |  292|      0|#define SSL_ENABLE_HELLO_DOWNGRADE_CHECK 37
  ------------------
  |  Branch (885:9): [True: 0, False: 177k]
  ------------------
  886|      0|            ss->opt.enableHelloDowngradeCheck = val;
  887|      0|            break;
  888|       |
  889|      0|        case SSL_ENABLE_V2_COMPATIBLE_HELLO:
  ------------------
  |  |  300|      0|#define SSL_ENABLE_V2_COMPATIBLE_HELLO 38
  ------------------
  |  Branch (889:9): [True: 0, False: 177k]
  ------------------
  890|      0|            ss->opt.enableV2CompatibleHello = val;
  891|      0|            break;
  892|       |
  893|  9.36k|        case SSL_ENABLE_POST_HANDSHAKE_AUTH:
  ------------------
  |  |  311|  9.36k|#define SSL_ENABLE_POST_HANDSHAKE_AUTH 39
  ------------------
  |  Branch (893:9): [True: 9.36k, False: 168k]
  ------------------
  894|  9.36k|            ss->opt.enablePostHandshakeAuth = val;
  895|  9.36k|            break;
  896|       |
  897|      0|        case SSL_SUPPRESS_END_OF_EARLY_DATA:
  ------------------
  |  |  347|      0|#define SSL_SUPPRESS_END_OF_EARLY_DATA 41
  ------------------
  |  Branch (897:9): [True: 0, False: 177k]
  ------------------
  898|      0|            ss->opt.suppressEndOfEarlyData = val;
  899|      0|            break;
  900|       |
  901|  9.36k|        case SSL_ENABLE_GREASE:
  ------------------
  |  |  374|  9.36k|#define SSL_ENABLE_GREASE 42
  ------------------
  |  Branch (901:9): [True: 9.36k, False: 168k]
  ------------------
  902|  9.36k|            ss->opt.enableGrease = val;
  903|  9.36k|            break;
  904|       |
  905|  9.36k|        case SSL_ENABLE_CH_EXTENSION_PERMUTATION:
  ------------------
  |  |  381|  9.36k|#define SSL_ENABLE_CH_EXTENSION_PERMUTATION 43
  ------------------
  |  Branch (905:9): [True: 9.36k, False: 168k]
  ------------------
  906|  9.36k|            ss->opt.enableChXtnPermutation = val;
  907|  9.36k|            break;
  908|       |
  909|      0|        default:
  ------------------
  |  Branch (909:9): [True: 0, False: 177k]
  ------------------
  910|      0|            PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  911|      0|            rv = SECFailure;
  912|   177k|    }
  913|       |
  914|       |    /* We can't use the macros for releasing the locks here,
  915|       |     * because ss->opt.noLocks might have changed just above.
  916|       |     * We must release these locks (monitors) here, if we aquired them above,
  917|       |     * regardless of the current value of ss->opt.noLocks.
  918|       |     */
  919|   177k|    if (holdingLocks) {
  ------------------
  |  Branch (919:9): [True: 168k, False: 9.50k]
  ------------------
  920|   168k|        PZ_ExitMonitor((ss)->ssl3HandshakeLock);
  ------------------
  |  |  257|   168k|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  ------------------
  921|   168k|        PZ_ExitMonitor((ss)->firstHandshakeLock);
  ------------------
  |  |  257|   168k|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  ------------------
  922|   168k|    }
  923|       |
  924|   177k|    return rv;
  925|   177k|}
SSL_CipherPrefSet:
 1565|   664k|{
 1566|   664k|    sslSocket *ss = ssl_FindSocket(fd);
 1567|   664k|    PRInt32 locks;
 1568|   664k|    SECStatus rv;
 1569|       |
 1570|   664k|    if (!ss) {
  ------------------
  |  Branch (1570:9): [True: 0, False: 664k]
  ------------------
 1571|      0|        SSL_DBG(("%d: SSL[%d]: bad socket in CipherPrefSet", SSL_GETPID(), fd));
  ------------------
  |  |   87|      0|    if (ssl_debug) \
  |  |  ------------------
  |  |  |  Branch (87:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   88|      0|    ssl_Trace b
  ------------------
 1572|      0|        return SECFailure;
 1573|      0|    }
 1574|   664k|    rv = NSS_OptionGet(NSS_DEFAULT_LOCKS, &locks);
  ------------------
  |  |  302|   664k|#define NSS_DEFAULT_LOCKS 0x00d /* lock default values */
  ------------------
 1575|   664k|    if ((rv == SECSuccess) && (locks & NSS_DEFAULT_SSL_LOCK)) {
  ------------------
  |  |  303|   664k|#define NSS_DEFAULT_SSL_LOCK 1  /* lock the ssl default values */
  ------------------
  |  Branch (1575:9): [True: 664k, False: 0]
  |  Branch (1575:31): [True: 0, False: 664k]
  ------------------
 1576|      0|        return SECSuccess;
 1577|      0|    }
 1578|   664k|    if (ssl_IsRemovedCipherSuite(which))
  ------------------
  |  Branch (1578:9): [True: 0, False: 664k]
  ------------------
 1579|      0|        return SECSuccess;
 1580|   664k|    return ssl3_CipherPrefSet(ss, (ssl3CipherSuite)which, enabled);
 1581|   664k|}
ssl_GetDHEParams:
 1991|  1.25k|{
 1992|  1.25k|    switch (groupDef->name) {
 1993|    675|        case ssl_grp_ffdhe_2048:
  ------------------
  |  Branch (1993:9): [True: 675, False: 577]
  ------------------
 1994|    675|            return &ff_dhe_2048_params;
 1995|     43|        case ssl_grp_ffdhe_3072:
  ------------------
  |  Branch (1995:9): [True: 43, False: 1.20k]
  ------------------
 1996|     43|            return &ff_dhe_3072_params;
 1997|     28|        case ssl_grp_ffdhe_4096:
  ------------------
  |  Branch (1997:9): [True: 28, False: 1.22k]
  ------------------
 1998|     28|            return &ff_dhe_4096_params;
 1999|     22|        case ssl_grp_ffdhe_6144:
  ------------------
  |  Branch (1999:9): [True: 22, False: 1.23k]
  ------------------
 2000|     22|            return &ff_dhe_6144_params;
 2001|    484|        case ssl_grp_ffdhe_8192:
  ------------------
  |  Branch (2001:9): [True: 484, False: 768]
  ------------------
 2002|    484|            return &ff_dhe_8192_params;
 2003|      0|        case ssl_grp_ffdhe_custom:
  ------------------
  |  Branch (2003:9): [True: 0, False: 1.25k]
  ------------------
 2004|      0|            PORT_Assert(gWeakDHParams);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2005|      0|            return gWeakDHParams;
 2006|      0|        default:
  ------------------
  |  Branch (2006:9): [True: 0, False: 1.25k]
  ------------------
 2007|      0|            PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2008|  1.25k|    }
 2009|      0|    return NULL;
 2010|  1.25k|}
ssl_IsValidDHEShare:
 2015|  2.11k|{
 2016|  2.11k|    unsigned int size_p = SECKEY_BigIntegerBitLength(dh_p);
 2017|  2.11k|    unsigned int size_y = SECKEY_BigIntegerBitLength(dh_Ys);
 2018|  2.11k|    unsigned int commonPart;
 2019|  2.11k|    int cmp;
 2020|       |
 2021|  2.11k|    if (dh_p->len == 0 || dh_Ys->len == 0) {
  ------------------
  |  Branch (2021:9): [True: 0, False: 2.11k]
  |  Branch (2021:27): [True: 1, False: 2.11k]
  ------------------
 2022|      1|        return PR_FALSE;
  ------------------
  |  |  438|      1|#define PR_FALSE 0
  ------------------
 2023|      1|    }
 2024|       |    /* Check that the prime is at least odd. */
 2025|  2.11k|    if ((dh_p->data[dh_p->len - 1] & 0x01) == 0) {
  ------------------
  |  Branch (2025:9): [True: 2, False: 2.11k]
  ------------------
 2026|      2|        return PR_FALSE;
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
 2027|      2|    }
 2028|       |    /* dh_Ys can't be 1, or bigger than dh_p. */
 2029|  2.11k|    if (size_y <= 1 || size_y > size_p) {
  ------------------
  |  Branch (2029:9): [True: 3, False: 2.10k]
  |  Branch (2029:24): [True: 8, False: 2.10k]
  ------------------
 2030|     11|        return PR_FALSE;
  ------------------
  |  |  438|     11|#define PR_FALSE 0
  ------------------
 2031|     11|    }
 2032|       |    /* If dh_Ys is shorter, then it's definitely smaller than p-1. */
 2033|  2.10k|    if (size_y < size_p) {
  ------------------
  |  Branch (2033:9): [True: 786, False: 1.31k]
  ------------------
 2034|    786|        return PR_TRUE;
  ------------------
  |  |  437|    786|#define PR_TRUE 1
  ------------------
 2035|    786|    }
 2036|       |
 2037|       |    /* Compare the common part of each, minus the final octet. */
 2038|  1.31k|    commonPart = (size_p + 7) / 8;
 2039|  1.31k|    PORT_Assert(commonPart <= dh_Ys->len);
  ------------------
  |  |  120|  1.31k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.31k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.31k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2040|  1.31k|    PORT_Assert(commonPart <= dh_p->len);
  ------------------
  |  |  120|  1.31k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.31k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.31k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2041|  1.31k|    cmp = PORT_Memcmp(dh_Ys->data + dh_Ys->len - commonPart,
  ------------------
  |  |  179|  1.31k|#define PORT_Memcmp memcmp
  ------------------
 2042|  1.31k|                      dh_p->data + dh_p->len - commonPart, commonPart - 1);
 2043|  1.31k|    if (cmp < 0) {
  ------------------
  |  Branch (2043:9): [True: 1.30k, False: 12]
  ------------------
 2044|  1.30k|        return PR_TRUE;
  ------------------
  |  |  437|  1.30k|#define PR_TRUE 1
  ------------------
 2045|  1.30k|    }
 2046|     12|    if (cmp > 0) {
  ------------------
  |  Branch (2046:9): [True: 10, False: 2]
  ------------------
 2047|     10|        return PR_FALSE;
  ------------------
  |  |  438|     10|#define PR_FALSE 0
  ------------------
 2048|     10|    }
 2049|       |
 2050|       |    /* The last octet of the prime is the only thing that is different and that
 2051|       |     * has to be two greater than the share, otherwise we have Ys == p - 1,
 2052|       |     * and that means small subgroups. */
 2053|      2|    if (dh_Ys->data[dh_Ys->len - 1] >= (dh_p->data[dh_p->len - 1] - 1)) {
  ------------------
  |  Branch (2053:9): [True: 1, False: 1]
  ------------------
 2054|      1|        return PR_FALSE;
  ------------------
  |  |  438|      1|#define PR_FALSE 0
  ------------------
 2055|      1|    }
 2056|       |
 2057|      1|    return PR_TRUE;
  ------------------
  |  |  437|      1|#define PR_TRUE 1
  ------------------
 2058|      2|}
ssl_ValidateDHENamedGroup:
 2072|    107|{
 2073|    107|    unsigned int i;
 2074|       |
 2075|    833|    for (i = 0; i < SSL_NAMED_GROUP_COUNT; ++i) {
  ------------------
  |  |  133|    833|#define SSL_NAMED_GROUP_COUNT 33
  ------------------
  |  Branch (2075:17): [True: 830, False: 3]
  ------------------
 2076|    830|        const ssl3DHParams *params;
 2077|    830|        if (!ss->namedGroupPreferences[i]) {
  ------------------
  |  Branch (2077:13): [True: 173, False: 657]
  ------------------
 2078|    173|            continue;
 2079|    173|        }
 2080|    657|        if (ss->namedGroupPreferences[i]->keaType != ssl_kea_dh) {
  ------------------
  |  Branch (2080:13): [True: 535, False: 122]
  ------------------
 2081|    535|            continue;
 2082|    535|        }
 2083|       |
 2084|    122|        params = ssl_GetDHEParams(ss->namedGroupPreferences[i]);
 2085|    122|        PORT_Assert(params);
  ------------------
  |  |  120|    122|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    122|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 122, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2086|    122|        if (SECITEM_ItemsAreEqual(&params->prime, dh_p)) {
  ------------------
  |  |  109|    122|#define SECITEM_ItemsAreEqual SECITEM_ItemsAreEqual_Util
  ------------------
  |  Branch (2086:13): [True: 104, False: 18]
  ------------------
 2087|    104|            if (!SECITEM_ItemsAreEqual(&params->base, dh_g)) {
  ------------------
  |  |  109|    104|#define SECITEM_ItemsAreEqual SECITEM_ItemsAreEqual_Util
  ------------------
  |  Branch (2087:17): [True: 2, False: 102]
  ------------------
 2088|      2|                return SECFailure;
 2089|      2|            }
 2090|    102|            if (groupDef)
  ------------------
  |  Branch (2090:17): [True: 0, False: 102]
  ------------------
 2091|      0|                *groupDef = ss->namedGroupPreferences[i];
 2092|    102|            if (dhParams)
  ------------------
  |  Branch (2092:17): [True: 0, False: 102]
  ------------------
 2093|      0|                *dhParams = params;
 2094|    102|            return SECSuccess;
 2095|    104|        }
 2096|    122|    }
 2097|       |
 2098|      3|    return SECFailure;
 2099|    107|}
DTLS_ImportFD:
 2202|  9.36k|{
 2203|  9.36k|    return ssl_ImportFD(model, fd, ssl_variant_datagram);
 2204|  9.36k|}
ssl3_GetEffectiveVersionPolicy:
 2585|  50.3k|{
 2586|  50.3k|    SECStatus rv;
 2587|  50.3k|    PRUint32 policyFlag;
 2588|  50.3k|    PRInt32 minPolicy, maxPolicy;
 2589|       |
 2590|  50.3k|    if (variant == ssl_variant_stream) {
  ------------------
  |  Branch (2590:9): [True: 18.7k, False: 31.6k]
  ------------------
 2591|  18.7k|        effectivePolicy->min = SSL_LIBRARY_VERSION_MIN_SUPPORTED_STREAM;
  ------------------
  |  | 1489|  18.7k|#define SSL_LIBRARY_VERSION_MIN_SUPPORTED_STREAM SSL_LIBRARY_VERSION_3_0
  |  |  ------------------
  |  |  |  |   17|  18.7k|#define SSL_LIBRARY_VERSION_3_0                 0x0300
  |  |  ------------------
  ------------------
 2592|  18.7k|        effectivePolicy->max = SSL_LIBRARY_VERSION_MAX_SUPPORTED;
  ------------------
  |  | 1497|  18.7k|#define SSL_LIBRARY_VERSION_MAX_SUPPORTED SSL_LIBRARY_VERSION_TLS_1_3
  |  |  ------------------
  |  |  |  |   21|  18.7k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  |  |  ------------------
  ------------------
 2593|  31.6k|    } else {
 2594|  31.6k|        effectivePolicy->min = SSL_LIBRARY_VERSION_MIN_SUPPORTED_DATAGRAM;
  ------------------
  |  | 1488|  31.6k|#define SSL_LIBRARY_VERSION_MIN_SUPPORTED_DATAGRAM SSL_LIBRARY_VERSION_TLS_1_1
  |  |  ------------------
  |  |  |  |   19|  31.6k|#define SSL_LIBRARY_VERSION_TLS_1_1             0x0302
  |  |  ------------------
  ------------------
 2595|  31.6k|        effectivePolicy->max = SSL_LIBRARY_VERSION_MAX_SUPPORTED;
  ------------------
  |  | 1497|  31.6k|#define SSL_LIBRARY_VERSION_MAX_SUPPORTED SSL_LIBRARY_VERSION_TLS_1_3
  |  |  ------------------
  |  |  |  |   21|  31.6k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  |  |  ------------------
  ------------------
 2596|  31.6k|    }
 2597|       |
 2598|  50.3k|    rv = NSS_GetAlgorithmPolicy(SEC_OID_APPLY_SSL_POLICY, &policyFlag);
 2599|  50.3k|    if ((rv != SECSuccess) || !(policyFlag & NSS_USE_POLICY_IN_SSL)) {
  ------------------
  |  |  574|  50.3k|#define NSS_USE_POLICY_IN_SSL 0x00000010           /* enable policy in SSL protocol */
  ------------------
  |  Branch (2599:9): [True: 0, False: 50.3k]
  |  Branch (2599:31): [True: 50.3k, False: 0]
  ------------------
 2600|       |        /* Policy is not active, report library extents. */
 2601|  50.3k|        return SECSuccess;
 2602|  50.3k|    }
 2603|       |
 2604|      0|    rv = NSS_OptionGet(VERSIONS_POLICY_MIN(variant), &minPolicy);
  ------------------
  |  |  119|      0|    (variant == ssl_variant_stream ? NSS_TLS_VERSION_MIN_POLICY : NSS_DTLS_VERSION_MIN_POLICY)
  |  |  ------------------
  |  |  |  |  289|      0|#define NSS_TLS_VERSION_MIN_POLICY 0x008
  |  |  ------------------
  |  |                   (variant == ssl_variant_stream ? NSS_TLS_VERSION_MIN_POLICY : NSS_DTLS_VERSION_MIN_POLICY)
  |  |  ------------------
  |  |  |  |  291|      0|#define NSS_DTLS_VERSION_MIN_POLICY 0x00a
  |  |  ------------------
  |  |  |  Branch (119:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2605|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (2605:9): [True: 0, False: 0]
  ------------------
 2606|      0|        return SECFailure;
 2607|      0|    }
 2608|      0|    rv = NSS_OptionGet(VERSIONS_POLICY_MAX(variant), &maxPolicy);
  ------------------
  |  |  121|      0|    (variant == ssl_variant_stream ? NSS_TLS_VERSION_MAX_POLICY : NSS_DTLS_VERSION_MAX_POLICY)
  |  |  ------------------
  |  |  |  |  290|      0|#define NSS_TLS_VERSION_MAX_POLICY 0x009
  |  |  ------------------
  |  |                   (variant == ssl_variant_stream ? NSS_TLS_VERSION_MAX_POLICY : NSS_DTLS_VERSION_MAX_POLICY)
  |  |  ------------------
  |  |  |  |  292|      0|#define NSS_DTLS_VERSION_MAX_POLICY 0x00b
  |  |  ------------------
  |  |  |  Branch (121:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2609|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (2609:9): [True: 0, False: 0]
  ------------------
 2610|      0|        return SECFailure;
 2611|      0|    }
 2612|       |
 2613|      0|    if (minPolicy > effectivePolicy->max ||
  ------------------
  |  Branch (2613:9): [True: 0, False: 0]
  ------------------
 2614|      0|        maxPolicy < effectivePolicy->min ||
  ------------------
  |  Branch (2614:9): [True: 0, False: 0]
  ------------------
 2615|      0|        minPolicy > maxPolicy) {
  ------------------
  |  Branch (2615:9): [True: 0, False: 0]
  ------------------
 2616|      0|        return SECFailure;
 2617|      0|    }
 2618|      0|    effectivePolicy->min = PR_MAX(effectivePolicy->min, minPolicy);
  ------------------
  |  |  159|      0|#define PR_MAX(x,y)     ((x)>(y)?(x):(y))
  |  |  ------------------
  |  |  |  Branch (159:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2619|      0|    effectivePolicy->max = PR_MIN(effectivePolicy->max, maxPolicy);
  ------------------
  |  |  158|      0|#define PR_MIN(x,y)     ((x)<(y)?(x):(y))
  |  |  ------------------
  |  |  |  Branch (158:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2620|      0|    return SECSuccess;
 2621|      0|}
ssl3_VersionIsSupportedByCode:
 2700|  44.5k|{
 2701|  44.5k|    switch (protocolVariant) {
  ------------------
  |  Branch (2701:13): [True: 0, False: 44.5k]
  ------------------
 2702|  18.7k|        case ssl_variant_stream:
  ------------------
  |  Branch (2702:9): [True: 18.7k, False: 25.8k]
  ------------------
 2703|  18.7k|            return (version >= SSL_LIBRARY_VERSION_MIN_SUPPORTED_STREAM &&
  ------------------
  |  | 1489|  18.7k|#define SSL_LIBRARY_VERSION_MIN_SUPPORTED_STREAM SSL_LIBRARY_VERSION_3_0
  |  |  ------------------
  |  |  |  |   17|  37.4k|#define SSL_LIBRARY_VERSION_3_0                 0x0300
  |  |  ------------------
  ------------------
  |  Branch (2703:21): [True: 18.7k, False: 0]
  ------------------
 2704|  18.7k|                    version <= SSL_LIBRARY_VERSION_MAX_SUPPORTED);
  ------------------
  |  | 1497|  18.7k|#define SSL_LIBRARY_VERSION_MAX_SUPPORTED SSL_LIBRARY_VERSION_TLS_1_3
  |  |  ------------------
  |  |  |  |   21|  18.7k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  |  |  ------------------
  ------------------
  |  Branch (2704:21): [True: 18.7k, False: 0]
  ------------------
 2705|  25.8k|        case ssl_variant_datagram:
  ------------------
  |  Branch (2705:9): [True: 25.8k, False: 18.7k]
  ------------------
 2706|  25.8k|            return (version >= SSL_LIBRARY_VERSION_MIN_SUPPORTED_DATAGRAM &&
  ------------------
  |  | 1488|  25.8k|#define SSL_LIBRARY_VERSION_MIN_SUPPORTED_DATAGRAM SSL_LIBRARY_VERSION_TLS_1_1
  |  |  ------------------
  |  |  |  |   19|  51.6k|#define SSL_LIBRARY_VERSION_TLS_1_1             0x0302
  |  |  ------------------
  ------------------
  |  Branch (2706:21): [True: 25.8k, False: 0]
  ------------------
 2707|  25.8k|                    version <= SSL_LIBRARY_VERSION_MAX_SUPPORTED);
  ------------------
  |  | 1497|  25.8k|#define SSL_LIBRARY_VERSION_MAX_SUPPORTED SSL_LIBRARY_VERSION_TLS_1_3
  |  |  ------------------
  |  |  |  |   21|  25.8k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  |  |  ------------------
  ------------------
  |  Branch (2707:21): [True: 25.8k, False: 0]
  ------------------
 2708|  44.5k|    }
 2709|       |
 2710|       |    /* Can't get here */
 2711|      0|    PORT_Assert(PR_FALSE);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2712|      0|    return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 2713|  44.5k|}
SSL_VersionRangeGetSupported:
 2747|  18.7k|{
 2748|  18.7k|    SECStatus rv;
 2749|       |
 2750|  18.7k|    if (!vrange) {
  ------------------
  |  Branch (2750:9): [True: 0, False: 18.7k]
  ------------------
 2751|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2752|      0|        return SECFailure;
 2753|      0|    }
 2754|       |
 2755|  18.7k|    switch (protocolVariant) {
 2756|  9.36k|        case ssl_variant_stream:
  ------------------
  |  Branch (2756:9): [True: 9.36k, False: 9.36k]
  ------------------
 2757|  9.36k|            vrange->min = SSL_LIBRARY_VERSION_MIN_SUPPORTED_STREAM;
  ------------------
  |  | 1489|  9.36k|#define SSL_LIBRARY_VERSION_MIN_SUPPORTED_STREAM SSL_LIBRARY_VERSION_3_0
  |  |  ------------------
  |  |  |  |   17|  9.36k|#define SSL_LIBRARY_VERSION_3_0                 0x0300
  |  |  ------------------
  ------------------
 2758|  9.36k|            vrange->max = SSL_LIBRARY_VERSION_MAX_SUPPORTED;
  ------------------
  |  | 1497|  9.36k|#define SSL_LIBRARY_VERSION_MAX_SUPPORTED SSL_LIBRARY_VERSION_TLS_1_3
  |  |  ------------------
  |  |  |  |   21|  9.36k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  |  |  ------------------
  ------------------
 2759|       |            /* We don't allow SSLv3 and TLSv1.3 together.
 2760|       |             * However, don't check yet, apply the policy first.
 2761|       |             * Because if the effective supported range doesn't use TLS 1.3,
 2762|       |             * then we don't need to increase the minimum. */
 2763|  9.36k|            break;
 2764|  9.36k|        case ssl_variant_datagram:
  ------------------
  |  Branch (2764:9): [True: 9.36k, False: 9.36k]
  ------------------
 2765|  9.36k|            vrange->min = SSL_LIBRARY_VERSION_MIN_SUPPORTED_DATAGRAM;
  ------------------
  |  | 1488|  9.36k|#define SSL_LIBRARY_VERSION_MIN_SUPPORTED_DATAGRAM SSL_LIBRARY_VERSION_TLS_1_1
  |  |  ------------------
  |  |  |  |   19|  9.36k|#define SSL_LIBRARY_VERSION_TLS_1_1             0x0302
  |  |  ------------------
  ------------------
 2766|  9.36k|            vrange->max = SSL_LIBRARY_VERSION_MAX_SUPPORTED;
  ------------------
  |  | 1497|  9.36k|#define SSL_LIBRARY_VERSION_MAX_SUPPORTED SSL_LIBRARY_VERSION_TLS_1_3
  |  |  ------------------
  |  |  |  |   21|  9.36k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  |  |  ------------------
  ------------------
 2767|  9.36k|            break;
 2768|      0|        default:
  ------------------
  |  Branch (2768:9): [True: 0, False: 18.7k]
  ------------------
 2769|      0|            PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2770|      0|            return SECFailure;
 2771|  18.7k|    }
 2772|       |
 2773|  18.7k|    rv = ssl3_CreateOverlapWithPolicy(protocolVariant, vrange, vrange);
 2774|  18.7k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (2774:9): [True: 0, False: 18.7k]
  ------------------
 2775|       |        /* Library default and policy don't overlap. */
 2776|      0|        return rv;
 2777|      0|    }
 2778|       |
 2779|       |    /* We don't allow SSLv3 and TLSv1.3 together */
 2780|  18.7k|    if (vrange->max >= SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|  18.7k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (2780:9): [True: 18.7k, False: 0]
  ------------------
 2781|  18.7k|        vrange->min = PR_MAX(vrange->min, SSL_LIBRARY_VERSION_TLS_1_0);
  ------------------
  |  |  159|  18.7k|#define PR_MAX(x,y)     ((x)>(y)?(x):(y))
  |  |  ------------------
  |  |  |  Branch (159:26): [True: 9.36k, False: 9.36k]
  |  |  ------------------
  ------------------
 2782|  18.7k|    }
 2783|       |
 2784|  18.7k|    return SECSuccess;
 2785|  18.7k|}
SSL_VersionRangeSetDefault:
 2843|  18.7k|{
 2844|  18.7k|    SSLVersionRange constrainedRange;
 2845|  18.7k|    SECStatus rv;
 2846|       |
 2847|  18.7k|    if (!vrange) {
  ------------------
  |  Branch (2847:9): [True: 0, False: 18.7k]
  ------------------
 2848|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2849|      0|        return SECFailure;
 2850|      0|    }
 2851|       |
 2852|  18.7k|    constrainedRange = *vrange;
 2853|  18.7k|    rv = ssl3_CheckRangeValidAndConstrainByPolicy(protocolVariant,
 2854|  18.7k|                                                  &constrainedRange);
 2855|  18.7k|    if (rv != SECSuccess)
  ------------------
  |  Branch (2855:9): [True: 0, False: 18.7k]
  ------------------
 2856|      0|        return rv;
 2857|       |
 2858|  18.7k|    *VERSIONS_DEFAULTS(protocolVariant) = constrainedRange;
  ------------------
  |  |  117|  18.7k|    (variant == ssl_variant_stream ? &versions_defaults_stream : &versions_defaults_datagram)
  |  |  ------------------
  |  |  |  Branch (117:6): [True: 9.36k, False: 9.36k]
  |  |  ------------------
  ------------------
 2859|  18.7k|    return SECSuccess;
 2860|  18.7k|}
SSL_VersionRangeSet:
 2891|  3.56k|{
 2892|  3.56k|    SSLVersionRange constrainedRange;
 2893|  3.56k|    sslSocket *ss;
 2894|  3.56k|    SECStatus rv;
 2895|       |
 2896|  3.56k|    if (!vrange) {
  ------------------
  |  Branch (2896:9): [True: 0, False: 3.56k]
  ------------------
 2897|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2898|      0|        return SECFailure;
 2899|      0|    }
 2900|       |
 2901|  3.56k|    ss = ssl_FindSocket(fd);
 2902|  3.56k|    if (!ss) {
  ------------------
  |  Branch (2902:9): [True: 0, False: 3.56k]
  ------------------
 2903|      0|        SSL_DBG(("%d: SSL[%d]: bad socket in SSL_VersionRangeSet",
  ------------------
  |  |   87|      0|    if (ssl_debug) \
  |  |  ------------------
  |  |  |  Branch (87:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   88|      0|    ssl_Trace b
  ------------------
 2904|      0|                 SSL_GETPID(), fd));
 2905|      0|        return SECFailure;
 2906|      0|    }
 2907|       |
 2908|  3.56k|    constrainedRange = *vrange;
 2909|  3.56k|    rv = ssl3_CheckRangeValidAndConstrainByPolicy(ss->protocolVariant,
 2910|  3.56k|                                                  &constrainedRange);
 2911|  3.56k|    if (rv != SECSuccess)
  ------------------
  |  Branch (2911:9): [True: 0, False: 3.56k]
  ------------------
 2912|      0|        return rv;
 2913|       |
 2914|  3.56k|    ssl_Get1stHandshakeLock(ss);
  ------------------
  |  | 1390|  3.56k|    {                                                             \
  |  | 1391|  3.56k|        if (!ss->opt.noLocks) {                                   \
  |  |  ------------------
  |  |  |  Branch (1391:13): [True: 3.56k, False: 0]
  |  |  ------------------
  |  | 1392|  3.56k|            PORT_Assert(PZ_InMonitor((ss)->firstHandshakeLock) || \
  |  |  ------------------
  |  |  |  |  120|  3.56k|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|  7.12k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:7): [True: 0, False: 3.56k]
  |  |  |  |  |  |  |  Branch (208:7): [True: 3.56k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1393|  3.56k|                        !ssl_HaveRecvBufLock(ss));                \
  |  | 1394|  3.56k|            PZ_EnterMonitor((ss)->firstHandshakeLock);            \
  |  |  ------------------
  |  |  |  |  256|  3.56k|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1395|  3.56k|        }                                                         \
  |  | 1396|  3.56k|    }
  ------------------
 2915|  3.56k|    ssl_GetSSL3HandshakeLock(ss);
  ------------------
  |  | 1407|  3.56k|    {                                                 \
  |  | 1408|  3.56k|        if (!ss->opt.noLocks) {                       \
  |  |  ------------------
  |  |  |  Branch (1408:13): [True: 3.56k, False: 0]
  |  |  ------------------
  |  | 1409|  3.56k|            PORT_Assert(!ssl_HaveXmitBufLock(ss));    \
  |  |  ------------------
  |  |  |  |  120|  3.56k|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|  3.56k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 3.56k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1410|  3.56k|            PZ_EnterMonitor((ss)->ssl3HandshakeLock); \
  |  |  ------------------
  |  |  |  |  256|  3.56k|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1411|  3.56k|        }                                             \
  |  | 1412|  3.56k|    }
  ------------------
 2916|       |
 2917|  3.56k|    if (ss->ssl3.downgradeCheckVersion &&
  ------------------
  |  Branch (2917:9): [True: 0, False: 3.56k]
  ------------------
 2918|  3.56k|        ss->vrange.max > ss->ssl3.downgradeCheckVersion) {
  ------------------
  |  Branch (2918:9): [True: 0, False: 0]
  ------------------
 2919|      0|        PORT_SetError(SSL_ERROR_INVALID_VERSION_RANGE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2920|      0|        ssl_ReleaseSSL3HandshakeLock(ss);
  ------------------
  |  | 1414|      0|    {                                                \
  |  | 1415|      0|        if (!ss->opt.noLocks)                        \
  |  |  ------------------
  |  |  |  Branch (1415:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1416|      0|            PZ_ExitMonitor((ss)->ssl3HandshakeLock); \
  |  |  ------------------
  |  |  |  |  257|      0|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1417|      0|    }
  ------------------
 2921|      0|        ssl_Release1stHandshakeLock(ss);
  ------------------
  |  | 1398|      0|    {                                                 \
  |  | 1399|      0|        if (!ss->opt.noLocks)                         \
  |  |  ------------------
  |  |  |  Branch (1399:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1400|      0|            PZ_ExitMonitor((ss)->firstHandshakeLock); \
  |  |  ------------------
  |  |  |  |  257|      0|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1401|      0|    }
  ------------------
 2922|      0|        return SECFailure;
 2923|      0|    }
 2924|       |
 2925|  3.56k|    ss->vrange = constrainedRange;
 2926|       |
 2927|  3.56k|    ssl_ReleaseSSL3HandshakeLock(ss);
  ------------------
  |  | 1414|  3.56k|    {                                                \
  |  | 1415|  3.56k|        if (!ss->opt.noLocks)                        \
  |  |  ------------------
  |  |  |  Branch (1415:13): [True: 3.56k, False: 0]
  |  |  ------------------
  |  | 1416|  3.56k|            PZ_ExitMonitor((ss)->ssl3HandshakeLock); \
  |  |  ------------------
  |  |  |  |  257|  3.56k|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1417|  3.56k|    }
  ------------------
 2928|  3.56k|    ssl_Release1stHandshakeLock(ss);
  ------------------
  |  | 1398|  3.56k|    {                                                 \
  |  | 1399|  3.56k|        if (!ss->opt.noLocks)                         \
  |  |  ------------------
  |  |  |  Branch (1399:13): [True: 3.56k, False: 0]
  |  |  ------------------
  |  | 1400|  3.56k|            PZ_ExitMonitor((ss)->firstHandshakeLock); \
  |  |  ------------------
  |  |  |  |  257|  3.56k|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1401|  3.56k|    }
  ------------------
 2929|       |
 2930|  3.56k|    return SECSuccess;
 2931|  3.56k|}
ssl_GetPeerInfo:
 3281|  9.36k|{
 3282|  9.36k|    PRFileDesc *osfd;
 3283|  9.36k|    int rv;
 3284|  9.36k|    PRNetAddr sin;
 3285|       |
 3286|  9.36k|    osfd = ss->fd->lower;
 3287|       |
 3288|  9.36k|    PORT_Memset(&sin, 0, sizeof(sin));
  ------------------
  |  |  182|  9.36k|#define PORT_Memset memset
  ------------------
 3289|  9.36k|    rv = osfd->methods->getpeername(osfd, &sin);
 3290|  9.36k|    if (rv < 0) {
  ------------------
  |  Branch (3290:9): [True: 0, False: 9.36k]
  ------------------
 3291|      0|        return SECFailure;
 3292|      0|    }
 3293|  9.36k|    ss->TCPconnected = 1;
 3294|  9.36k|    if (sin.inet.family == PR_AF_INET) {
  ------------------
  |  |   96|  9.36k|#define PR_AF_INET AF_INET
  ------------------
  |  Branch (3294:9): [True: 9.36k, False: 0]
  ------------------
 3295|  9.36k|        PR_ConvertIPv4AddrToIPv6(sin.inet.ip, &ss->sec.ci.peer);
 3296|  9.36k|        ss->sec.ci.port = sin.inet.port;
 3297|  9.36k|    } else if (sin.ipv6.family == PR_AF_INET6) {
  ------------------
  |  |   27|      0|#define PR_AF_INET6 10  /* same as AF_INET6 */
  ------------------
  |  Branch (3297:16): [True: 0, False: 0]
  ------------------
 3298|      0|        ss->sec.ci.peer = sin.ipv6.ip;
 3299|      0|        ss->sec.ci.port = sin.ipv6.port;
 3300|      0|    } else {
 3301|      0|        PORT_SetError(PR_ADDRESS_NOT_SUPPORTED_ERROR);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
                      PORT_SetError(PR_ADDRESS_NOT_SUPPORTED_ERROR);
  ------------------
  |  |   61|      0|#define PR_ADDRESS_NOT_SUPPORTED_ERROR           (-5985L)
  ------------------
 3302|      0|        return SECFailure;
 3303|      0|    }
 3304|  9.36k|    return SECSuccess;
 3305|  9.36k|}
ssl_FdIsBlocking:
 3485|  13.3k|{
 3486|  13.3k|    PRSocketOptionData opt;
 3487|  13.3k|    PRStatus status;
 3488|       |
 3489|  13.3k|    opt.option = PR_SockOpt_Nonblocking;
 3490|  13.3k|    opt.value.non_blocking = PR_FALSE;
  ------------------
  |  |  438|  13.3k|#define PR_FALSE 0
  ------------------
 3491|  13.3k|    status = PR_GetSocketOption(fd, &opt);
 3492|  13.3k|    if (status != PR_SUCCESS)
  ------------------
  |  Branch (3492:9): [True: 0, False: 13.3k]
  ------------------
 3493|      0|        return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 3494|  13.3k|    return (PRBool)!opt.value.non_blocking;
 3495|  13.3k|}
ssl_SocketIsBlocking:
 3499|  13.3k|{
 3500|  13.3k|    return ssl_FdIsBlocking(ss->fd);
 3501|  13.3k|}
ssl_LookupNamedGroup:
 4001|  20.1k|{
 4002|  20.1k|    unsigned int i;
 4003|       |
 4004|   110k|    for (i = 0; i < SSL_NAMED_GROUP_COUNT; ++i) {
  ------------------
  |  |  133|   110k|#define SSL_NAMED_GROUP_COUNT 33
  ------------------
  |  Branch (4004:17): [True: 110k, False: 21]
  ------------------
 4005|   110k|        if (ssl_named_groups[i].name == group) {
  ------------------
  |  Branch (4005:13): [True: 20.1k, False: 90.0k]
  ------------------
 4006|  20.1k|            return &ssl_named_groups[i];
 4007|  20.1k|        }
 4008|   110k|    }
 4009|     21|    return NULL;
 4010|  20.1k|}
ssl_NamedGroupEnabled:
 4014|  2.76k|{
 4015|  2.76k|    unsigned int i;
 4016|       |
 4017|  2.76k|    if (!groupDef) {
  ------------------
  |  Branch (4017:9): [True: 3, False: 2.76k]
  ------------------
 4018|      3|        return PR_FALSE;
  ------------------
  |  |  438|      3|#define PR_FALSE 0
  ------------------
 4019|      3|    }
 4020|       |
 4021|  19.5k|    for (i = 0; i < SSL_NAMED_GROUP_COUNT; ++i) {
  ------------------
  |  |  133|  19.5k|#define SSL_NAMED_GROUP_COUNT 33
  ------------------
  |  Branch (4021:17): [True: 19.5k, False: 2]
  ------------------
 4022|  19.5k|        if (ss->namedGroupPreferences[i] &&
  ------------------
  |  Branch (4022:13): [True: 17.3k, False: 2.16k]
  ------------------
 4023|  19.5k|            ss->namedGroupPreferences[i] == groupDef) {
  ------------------
  |  Branch (4023:13): [True: 2.76k, False: 14.5k]
  ------------------
 4024|  2.76k|            return PR_TRUE;
  ------------------
  |  |  437|  2.76k|#define PR_TRUE 1
  ------------------
 4025|  2.76k|        }
 4026|  19.5k|    }
 4027|      2|    return PR_FALSE;
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
 4028|  2.76k|}
ssl_NewKeyPair:
 4036|  9.67k|{
 4037|  9.67k|    sslKeyPair *pair;
 4038|       |
 4039|  9.67k|    if (!privKey || !pubKey) {
  ------------------
  |  Branch (4039:9): [True: 0, False: 9.67k]
  |  Branch (4039:21): [True: 0, False: 9.67k]
  ------------------
 4040|      0|        PORT_SetError(PR_INVALID_ARGUMENT_ERROR);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
                      PORT_SetError(PR_INVALID_ARGUMENT_ERROR);
  ------------------
  |  |   55|      0|#define PR_INVALID_ARGUMENT_ERROR                (-5987L)
  ------------------
 4041|      0|        return NULL;
 4042|      0|    }
 4043|  9.67k|    pair = PORT_ZNew(sslKeyPair);
  ------------------
  |  |  148|  9.67k|#define PORT_ZNew(type) (type *)PORT_ZAlloc(sizeof(type))
  |  |  ------------------
  |  |  |  |   72|  9.67k|#define PORT_ZAlloc PORT_ZAlloc_Util
  |  |  ------------------
  ------------------
 4044|  9.67k|    if (!pair)
  ------------------
  |  Branch (4044:9): [True: 0, False: 9.67k]
  ------------------
 4045|      0|        return NULL; /* error code is set. */
 4046|  9.67k|    pair->privKey = privKey;
 4047|  9.67k|    pair->pubKey = pubKey;
 4048|  9.67k|    pair->refCount = 1;
 4049|  9.67k|    return pair; /* success */
 4050|  9.67k|}
ssl_FreeKeyPair:
 4061|  19.2k|{
 4062|  19.2k|    if (!keyPair) {
  ------------------
  |  Branch (4062:9): [True: 9.59k, False: 9.67k]
  ------------------
 4063|  9.59k|        return;
 4064|  9.59k|    }
 4065|       |
 4066|  9.67k|    PRInt32 newCount = PR_ATOMIC_DECREMENT(&keyPair->refCount);
  ------------------
  |  |  123|  9.67k|#define PR_ATOMIC_DECREMENT(val) __sync_sub_and_fetch(val, 1)
  ------------------
 4067|  9.67k|    if (!newCount) {
  ------------------
  |  Branch (4067:9): [True: 9.67k, False: 0]
  ------------------
 4068|  9.67k|        SECKEY_DestroyPrivateKey(keyPair->privKey);
 4069|  9.67k|        SECKEY_DestroyPublicKey(keyPair->pubKey);
 4070|  9.67k|        PORT_Free(keyPair);
  ------------------
  |  |   60|  9.67k|#define PORT_Free PORT_Free_Util
  ------------------
 4071|  9.67k|    }
 4072|  9.67k|}
ssl_NewEphemeralKeyPair:
 4078|  9.63k|{
 4079|  9.63k|    sslKeyPair *keys;
 4080|  9.63k|    sslEphemeralKeyPair *pair;
 4081|       |
 4082|  9.63k|    if (!group) {
  ------------------
  |  Branch (4082:9): [True: 0, False: 9.63k]
  ------------------
 4083|      0|        PORT_SetError(PR_INVALID_ARGUMENT_ERROR);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
                      PORT_SetError(PR_INVALID_ARGUMENT_ERROR);
  ------------------
  |  |   55|      0|#define PR_INVALID_ARGUMENT_ERROR                (-5987L)
  ------------------
 4084|      0|        return NULL;
 4085|      0|    }
 4086|       |
 4087|  9.63k|    keys = ssl_NewKeyPair(privKey, pubKey);
 4088|  9.63k|    if (!keys) {
  ------------------
  |  Branch (4088:9): [True: 0, False: 9.63k]
  ------------------
 4089|      0|        return NULL;
 4090|      0|    }
 4091|       |
 4092|  9.63k|    pair = PORT_ZNew(sslEphemeralKeyPair);
  ------------------
  |  |  148|  9.63k|#define PORT_ZNew(type) (type *)PORT_ZAlloc(sizeof(type))
  |  |  ------------------
  |  |  |  |   72|  9.63k|#define PORT_ZAlloc PORT_ZAlloc_Util
  |  |  ------------------
  ------------------
 4093|  9.63k|    if (!pair) {
  ------------------
  |  Branch (4093:9): [True: 0, False: 9.63k]
  ------------------
 4094|      0|        ssl_FreeKeyPair(keys);
 4095|      0|        return NULL; /* error already set */
 4096|      0|    }
 4097|       |
 4098|  9.63k|    PR_INIT_CLIST(&pair->link);
  ------------------
  |  |  100|  19.2k|    PR_BEGIN_MACRO     \
  |  |  ------------------
  |  |  |  |  123|  9.63k|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |  101|  19.2k|    (_l)->next = (_l); \
  |  |  102|  19.2k|    (_l)->prev = (_l); \
  |  |  103|  19.2k|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|  9.63k|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4099|  9.63k|    pair->group = group;
 4100|  9.63k|    pair->keys = keys;
 4101|  9.63k|    pair->kemKeys = NULL;
 4102|  9.63k|    pair->kemCt = NULL;
 4103|       |
 4104|  9.63k|    return pair;
 4105|  9.63k|}
ssl_FreeEphemeralKeyPair:
 4136|  9.63k|{
 4137|  9.63k|    if (!keyPair) {
  ------------------
  |  Branch (4137:9): [True: 0, False: 9.63k]
  ------------------
 4138|      0|        return;
 4139|      0|    }
 4140|       |
 4141|  9.63k|    ssl_FreeKeyPair(keyPair->keys);
 4142|  9.63k|    ssl_FreeKeyPair(keyPair->kemKeys);
 4143|  9.63k|    SECITEM_FreeItem(keyPair->kemCt, PR_TRUE);
  ------------------
  |  |  108|  9.63k|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                  SECITEM_FreeItem(keyPair->kemCt, PR_TRUE);
  ------------------
  |  |  437|  9.63k|#define PR_TRUE 1
  ------------------
 4144|  9.63k|    PR_REMOVE_LINK(&keyPair->link);
  ------------------
  |  |   72|  9.63k|    PR_BEGIN_MACRO             \
  |  |  ------------------
  |  |  |  |  123|  9.63k|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |   73|  9.63k|    (_e)->prev->next = (_e)->next; \
  |  |   74|  9.63k|    (_e)->next->prev = (_e)->prev; \
  |  |   75|  9.63k|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|  9.63k|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4145|  9.63k|    PORT_Free(keyPair);
  ------------------
  |  |   60|  9.63k|#define PORT_Free PORT_Free_Util
  ------------------
 4146|  9.63k|}
ssl_HaveEphemeralKeyPair:
 4150|  1.27k|{
 4151|  1.27k|    return ssl_LookupEphemeralKeyPair((sslSocket *)ss, groupDef) != NULL;
 4152|  1.27k|}
ssl_LookupEphemeralKeyPair:
 4156|  18.7k|{
 4157|  18.7k|    PRCList *cursor;
 4158|  18.7k|    for (cursor = PR_NEXT_LINK(&ss->ephemeralKeyPairs);
  ------------------
  |  |   47|  18.7k|        ((_e)->next)
  ------------------
 4159|  20.0k|         cursor != &ss->ephemeralKeyPairs;
  ------------------
  |  Branch (4159:10): [True: 2.77k, False: 17.2k]
  ------------------
 4160|  18.7k|         cursor = PR_NEXT_LINK(cursor)) {
  ------------------
  |  |   47|  1.28k|        ((_e)->next)
  ------------------
 4161|  2.77k|        sslEphemeralKeyPair *keyPair = (sslEphemeralKeyPair *)cursor;
 4162|  2.77k|        if (keyPair->group == groupDef) {
  ------------------
  |  Branch (4162:13): [True: 1.49k, False: 1.28k]
  ------------------
 4163|  1.49k|            return keyPair;
 4164|  1.49k|        }
 4165|  2.77k|    }
 4166|  17.2k|    return NULL;
 4167|  18.7k|}
ssl_FreeEphemeralKeyPairs:
 4171|  10.6k|{
 4172|  19.8k|    while (!PR_CLIST_IS_EMPTY(&ss->ephemeralKeyPairs)) {
  ------------------
  |  |   94|  19.8k|    ((_l)->next == (_l))
  ------------------
  |  Branch (4172:12): [True: 9.24k, False: 10.6k]
  ------------------
 4173|  9.24k|        PRCList *cursor = PR_LIST_TAIL(&ss->ephemeralKeyPairs);
  ------------------
  |  |   66|  9.24k|#define PR_LIST_TAIL(_l) (_l)->prev
  ------------------
 4174|  9.24k|        ssl_FreeEphemeralKeyPair((sslEphemeralKeyPair *)cursor);
 4175|  9.24k|    }
 4176|  10.6k|}
ssl_Time:
 4180|  10.5k|{
 4181|  10.5k|    if (!ss->now) {
  ------------------
  |  Branch (4181:9): [True: 0, False: 10.5k]
  ------------------
 4182|      0|        return PR_Now();
 4183|      0|    }
 4184|  10.5k|    return ss->now(ss->nowArg);
 4185|  10.5k|}
SSL_GetExperimentalAPI:
 4390|  74.7k|{
 4391|  74.7k|    unsigned int i;
 4392|  2.52M|    for (i = 0; i < PR_ARRAY_SIZE(ssl_experimental_functions); ++i) {
  ------------------
  |  |  167|  2.52M|#define PR_ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
  ------------------
  |  Branch (4392:17): [True: 2.52M, False: 0]
  ------------------
 4393|  2.52M|        if (strcmp(name, ssl_experimental_functions[i].name) == 0) {
  ------------------
  |  Branch (4393:13): [True: 74.7k, False: 2.45M]
  ------------------
 4394|  74.7k|            return ssl_experimental_functions[i].function;
 4395|  74.7k|        }
 4396|  2.52M|    }
 4397|      0|    PORT_SetError(SSL_ERROR_UNSUPPORTED_EXPERIMENTAL_API);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 4398|      0|    return NULL;
 4399|  74.7k|}
ssl_ClearPRCList:
 4403|  36.9k|{
 4404|  36.9k|    PRCList *cursor;
 4405|       |
 4406|  51.8k|    while (!PR_CLIST_IS_EMPTY(list)) {
  ------------------
  |  |   94|  51.8k|    ((_l)->next == (_l))
  ------------------
  |  Branch (4406:12): [True: 14.8k, False: 36.9k]
  ------------------
 4407|  14.8k|        cursor = PR_LIST_TAIL(list);
  ------------------
  |  |   66|  14.8k|#define PR_LIST_TAIL(_l) (_l)->prev
  ------------------
 4408|       |
 4409|  14.8k|        PR_REMOVE_LINK(cursor);
  ------------------
  |  |   72|  14.8k|    PR_BEGIN_MACRO             \
  |  |  ------------------
  |  |  |  |  123|  14.8k|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |   73|  14.8k|    (_e)->prev->next = (_e)->next; \
  |  |   74|  14.8k|    (_e)->next->prev = (_e)->prev; \
  |  |   75|  14.8k|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|  14.8k|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4410|  14.8k|        if (f) {
  ------------------
  |  Branch (4410:13): [True: 0, False: 14.8k]
  ------------------
 4411|      0|            f(cursor);
 4412|      0|        }
 4413|  14.8k|        PORT_Free(cursor);
  ------------------
  |  |   60|  14.8k|#define PORT_Free PORT_Free_Util
  ------------------
 4414|  14.8k|    }
 4415|  36.9k|}
SSLExp_EnableTls13GreaseEch:
 4419|  9.36k|{
 4420|  9.36k|    sslSocket *ss = ssl_FindSocket(fd);
 4421|  9.36k|    if (!ss) {
  ------------------
  |  Branch (4421:9): [True: 0, False: 9.36k]
  ------------------
 4422|      0|        return SECFailure;
 4423|      0|    }
 4424|  9.36k|    ss->opt.enableTls13GreaseEch = enabled;
 4425|  9.36k|    return SECSuccess;
 4426|  9.36k|}
SSLExp_SetDtls13VersionWorkaround:
 4470|  9.36k|{
 4471|  9.36k|    sslSocket *ss = ssl_FindSocket(fd);
 4472|  9.36k|    if (!ss) {
  ------------------
  |  Branch (4472:9): [True: 0, False: 9.36k]
  ------------------
 4473|      0|        return SECFailure;
 4474|      0|    }
 4475|  9.36k|    ss->opt.enableDtls13VersionCompat = enabled;
 4476|  9.36k|    return SECSuccess;
 4477|  9.36k|}
SSLExp_SetTimeFunc:
 4481|  9.36k|{
 4482|  9.36k|    sslSocket *ss = ssl_FindSocket(fd);
 4483|       |
 4484|  9.36k|    if (!ss) {
  ------------------
  |  Branch (4484:9): [True: 0, False: 9.36k]
  ------------------
 4485|      0|        SSL_DBG(("%d: SSL[%d]: bad socket in SSL_SetTimeFunc",
  ------------------
  |  |   87|      0|    if (ssl_debug) \
  |  |  ------------------
  |  |  |  Branch (87:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   88|      0|    ssl_Trace b
  ------------------
 4486|      0|                 SSL_GETPID(), fd));
 4487|      0|        return SECFailure;
 4488|      0|    }
 4489|  9.36k|    ss->now = f;
 4490|  9.36k|    ss->nowArg = arg;
 4491|  9.36k|    return SECSuccess;
 4492|  9.36k|}
sslsock.c:ssl_DestroySocketContents:
  465|  9.36k|{
  466|  9.36k|    PRCList *cursor;
  467|       |
  468|       |    /* Free up socket */
  469|  9.36k|    ssl_DestroySecurityInfo(&ss->sec);
  470|       |
  471|  9.36k|    ssl3_DestroySSL3Info(ss);
  472|       |
  473|  9.36k|    PORT_Free(ss->saveBuf.buf);
  ------------------
  |  |   60|  9.36k|#define PORT_Free PORT_Free_Util
  ------------------
  474|  9.36k|    PORT_Free(ss->pendingBuf.buf);
  ------------------
  |  |   60|  9.36k|#define PORT_Free PORT_Free_Util
  ------------------
  475|  9.36k|    ssl3_DestroyGather(&ss->gs);
  476|       |
  477|  9.36k|    if (ss->peerID != NULL)
  ------------------
  |  Branch (477:9): [True: 0, False: 9.36k]
  ------------------
  478|      0|        PORT_Free(ss->peerID);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
  479|  9.36k|    if (ss->url != NULL)
  ------------------
  |  Branch (479:9): [True: 9.36k, False: 0]
  ------------------
  480|  9.36k|        PORT_Free((void *)ss->url); /* CONST */
  ------------------
  |  |   60|  9.36k|#define PORT_Free PORT_Free_Util
  ------------------
  481|       |
  482|       |    /* Clean up server certificates and sundries. */
  483|  9.36k|    while (!PR_CLIST_IS_EMPTY(&ss->serverCerts)) {
  ------------------
  |  |   94|  9.36k|    ((_l)->next == (_l))
  ------------------
  |  Branch (483:12): [True: 0, False: 9.36k]
  ------------------
  484|      0|        cursor = PR_LIST_TAIL(&ss->serverCerts);
  ------------------
  |  |   66|      0|#define PR_LIST_TAIL(_l) (_l)->prev
  ------------------
  485|      0|        PR_REMOVE_LINK(cursor);
  ------------------
  |  |   72|      0|    PR_BEGIN_MACRO             \
  |  |  ------------------
  |  |  |  |  123|      0|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |   73|      0|    (_e)->prev->next = (_e)->next; \
  |  |   74|      0|    (_e)->next->prev = (_e)->prev; \
  |  |   75|      0|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|      0|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  486|      0|        ssl_FreeServerCert((sslServerCert *)cursor);
  487|      0|    }
  488|       |
  489|       |    /* Remove extension handlers. */
  490|  9.36k|    ssl_ClearPRCList(&ss->extensionHooks, NULL);
  491|       |
  492|  9.36k|    ssl_FreeEphemeralKeyPairs(ss);
  493|  9.36k|    SECITEM_FreeItem(&ss->opt.nextProtoNego, PR_FALSE);
  ------------------
  |  |  108|  9.36k|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                  SECITEM_FreeItem(&ss->opt.nextProtoNego, PR_FALSE);
  ------------------
  |  |  438|  9.36k|#define PR_FALSE 0
  ------------------
  494|  9.36k|    ssl3_FreeSniNameArray(&ss->xtnData);
  495|       |
  496|  9.36k|    ssl_ClearPRCList(&ss->ssl3.hs.dtlsSentHandshake, NULL);
  497|  9.36k|    ssl_ClearPRCList(&ss->ssl3.hs.dtlsRcvdHandshake, NULL);
  498|  9.36k|    tls13_DestroyPskList(&ss->ssl3.hs.psks);
  499|       |
  500|  9.36k|    tls13_ReleaseAntiReplayContext(ss->antiReplay);
  501|       |
  502|  9.36k|    tls13_DestroyPsk(ss->psk);
  503|       |
  504|  9.36k|    tls13_DestroyEchConfigs(&ss->echConfigs);
  505|  9.36k|    SECKEY_DestroyPrivateKey(ss->echPrivKey);
  506|  9.36k|    SECKEY_DestroyPublicKey(ss->echPubKey);
  507|  9.36k|}
sslsock.c:ssl_DestroyLocks:
  429|  9.36k|{
  430|       |    /* Destroy locks. */
  431|  9.36k|    if (ss->firstHandshakeLock) {
  ------------------
  |  Branch (431:9): [True: 9.36k, False: 0]
  ------------------
  432|  9.36k|        PZ_DestroyMonitor(ss->firstHandshakeLock);
  ------------------
  |  |  255|  9.36k|#define PZ_DestroyMonitor(m) PR_DestroyMonitor((m))
  ------------------
  433|  9.36k|        ss->firstHandshakeLock = NULL;
  434|  9.36k|    }
  435|  9.36k|    if (ss->ssl3HandshakeLock) {
  ------------------
  |  Branch (435:9): [True: 9.36k, False: 0]
  ------------------
  436|  9.36k|        PZ_DestroyMonitor(ss->ssl3HandshakeLock);
  ------------------
  |  |  255|  9.36k|#define PZ_DestroyMonitor(m) PR_DestroyMonitor((m))
  ------------------
  437|  9.36k|        ss->ssl3HandshakeLock = NULL;
  438|  9.36k|    }
  439|  9.36k|    if (ss->specLock) {
  ------------------
  |  Branch (439:9): [True: 9.36k, False: 0]
  ------------------
  440|  9.36k|        NSSRWLock_Destroy(ss->specLock);
  ------------------
  |  |   45|  9.36k|#define NSSRWLock_Destroy NSSRWLock_Destroy_Util
  ------------------
  441|  9.36k|        ss->specLock = NULL;
  442|  9.36k|    }
  443|       |
  444|  9.36k|    if (ss->recvLock) {
  ------------------
  |  Branch (444:9): [True: 9.36k, False: 0]
  ------------------
  445|  9.36k|        PZ_DestroyLock(ss->recvLock);
  ------------------
  |  |  244|  9.36k|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
  446|  9.36k|        ss->recvLock = NULL;
  447|  9.36k|    }
  448|  9.36k|    if (ss->sendLock) {
  ------------------
  |  Branch (448:9): [True: 9.36k, False: 0]
  ------------------
  449|  9.36k|        PZ_DestroyLock(ss->sendLock);
  ------------------
  |  |  244|  9.36k|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
  450|  9.36k|        ss->sendLock = NULL;
  451|  9.36k|    }
  452|  9.36k|    if (ss->xmitBufLock) {
  ------------------
  |  Branch (452:9): [True: 9.36k, False: 0]
  ------------------
  453|  9.36k|        PZ_DestroyMonitor(ss->xmitBufLock);
  ------------------
  |  |  255|  9.36k|#define PZ_DestroyMonitor(m) PR_DestroyMonitor((m))
  ------------------
  454|  9.36k|        ss->xmitBufLock = NULL;
  455|  9.36k|    }
  456|  9.36k|    if (ss->recvBufLock) {
  ------------------
  |  Branch (456:9): [True: 9.36k, False: 0]
  ------------------
  457|  9.36k|        PZ_DestroyMonitor(ss->recvBufLock);
  ------------------
  |  |  255|  9.36k|#define PZ_DestroyMonitor(m) PR_DestroyMonitor((m))
  ------------------
  458|  9.36k|        ss->recvBufLock = NULL;
  459|  9.36k|    }
  460|  9.36k|}
sslsock.c:ssl_ChooseOps:
  568|  9.36k|{
  569|  9.36k|    ss->ops = ss->opt.useSecurity ? &ssl_secure_ops : &ssl_default_ops;
  ------------------
  |  Branch (569:15): [True: 9.36k, False: 0]
  ------------------
  570|  9.36k|}
sslsock.c:ssl_IsRemovedCipherSuite:
 1440|   664k|{
 1441|   664k|    switch (suite) {
 1442|      0|        case SSL_FORTEZZA_DMS_WITH_NULL_SHA:
  ------------------
  |  |  275|      0|#define SSL_FORTEZZA_DMS_WITH_NULL_SHA          0x001c
  ------------------
  |  Branch (1442:9): [True: 0, False: 664k]
  ------------------
 1443|      0|        case SSL_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA:
  ------------------
  |  |  276|      0|#define SSL_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA  0x001d
  ------------------
  |  Branch (1443:9): [True: 0, False: 664k]
  ------------------
 1444|      0|        case SSL_FORTEZZA_DMS_WITH_RC4_128_SHA:
  ------------------
  |  |  277|      0|#define SSL_FORTEZZA_DMS_WITH_RC4_128_SHA       0x001e
  ------------------
  |  Branch (1444:9): [True: 0, False: 664k]
  ------------------
 1445|      0|            return PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 1446|   664k|        default:
  ------------------
  |  Branch (1446:9): [True: 664k, False: 0]
  ------------------
 1447|   664k|            return PR_FALSE;
  ------------------
  |  |  438|   664k|#define PR_FALSE 0
  ------------------
 1448|   664k|    }
 1449|   664k|}
sslsock.c:ssl_ImportFD:
 2153|  9.36k|{
 2154|  9.36k|    sslSocket *ns = NULL;
 2155|  9.36k|    PRStatus rv;
 2156|  9.36k|    PRNetAddr addr;
 2157|  9.36k|    SECStatus status = ssl_Init();
 2158|       |
 2159|  9.36k|    if (status != SECSuccess) {
  ------------------
  |  Branch (2159:9): [True: 0, False: 9.36k]
  ------------------
 2160|      0|        return NULL;
 2161|      0|    }
 2162|       |
 2163|  9.36k|    if (model == NULL) {
  ------------------
  |  Branch (2163:9): [True: 9.36k, False: 0]
  ------------------
 2164|       |        /* Just create a default socket if we're given NULL for the model */
 2165|  9.36k|        ns = ssl_NewSocket((PRBool)(!ssl_defaults.noLocks), variant);
 2166|  9.36k|    } else {
 2167|      0|        sslSocket *ss = ssl_FindSocket(model);
 2168|      0|        if (ss == NULL || ss->protocolVariant != variant) {
  ------------------
  |  Branch (2168:13): [True: 0, False: 0]
  |  Branch (2168:27): [True: 0, False: 0]
  ------------------
 2169|      0|            SSL_DBG(("%d: SSL[%d]: bad model socket in ssl_ImportFD",
  ------------------
  |  |   87|      0|    if (ssl_debug) \
  |  |  ------------------
  |  |  |  Branch (87:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   88|      0|    ssl_Trace b
  ------------------
 2170|      0|                     SSL_GETPID(), model));
 2171|      0|            return NULL;
 2172|      0|        }
 2173|      0|        ns = ssl_DupSocket(ss);
 2174|      0|    }
 2175|  9.36k|    if (ns == NULL)
  ------------------
  |  Branch (2175:9): [True: 0, False: 9.36k]
  ------------------
 2176|      0|        return NULL;
 2177|       |
 2178|  9.36k|    rv = ssl_PushIOLayer(ns, fd, PR_TOP_IO_LAYER);
  ------------------
  |  |  453|  9.36k|#define PR_TOP_IO_LAYER (PRDescIdentity)-2
  ------------------
 2179|  9.36k|    if (rv != PR_SUCCESS) {
  ------------------
  |  Branch (2179:9): [True: 0, False: 9.36k]
  ------------------
 2180|      0|        ssl_FreeSocket(ns);
 2181|      0|        PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2182|      0|        return NULL;
 2183|      0|    }
 2184|  9.36k|#if defined(DEBUG) || defined(FORCE_PR_ASSERT)
 2185|  9.36k|    {
 2186|  9.36k|        sslSocket *ss = ssl_FindSocket(fd);
 2187|  9.36k|        PORT_Assert(ss == ns);
  ------------------
  |  |  120|  9.36k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  9.36k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 9.36k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2188|  9.36k|    }
 2189|  9.36k|#endif
 2190|  9.36k|    ns->TCPconnected = (PR_SUCCESS == ssl_DefGetpeername(ns, &addr));
 2191|  9.36k|    return fd;
 2192|  9.36k|}
sslsock.c:ssl_NewSocket:
 4192|  9.36k|{
 4193|  9.36k|    SECStatus rv;
 4194|  9.36k|    sslSocket *ss;
 4195|  9.36k|    int i;
 4196|  9.36k|    ssl_SetDefaultsFromEnvironment();
 4197|       |
 4198|  9.36k|    if (ssl_force_locks)
  ------------------
  |  Branch (4198:9): [True: 0, False: 9.36k]
  ------------------
 4199|      0|        makeLocks = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 4200|       |
 4201|       |    /* Make a new socket and get it ready */
 4202|  9.36k|    ss = PORT_ZNew(sslSocket);
  ------------------
  |  |  148|  9.36k|#define PORT_ZNew(type) (type *)PORT_ZAlloc(sizeof(type))
  |  |  ------------------
  |  |  |  |   72|  9.36k|#define PORT_ZAlloc PORT_ZAlloc_Util
  |  |  ------------------
  ------------------
 4203|  9.36k|    if (!ss) {
  ------------------
  |  Branch (4203:9): [True: 0, False: 9.36k]
  ------------------
 4204|      0|        return NULL;
 4205|      0|    }
 4206|  9.36k|    ss->opt = ssl_defaults;
 4207|  9.36k|    if (protocolVariant == ssl_variant_datagram) {
  ------------------
  |  Branch (4207:9): [True: 9.36k, False: 0]
  ------------------
 4208|  9.36k|        ss->opt.enableRenegotiation = SSL_RENEGOTIATE_NEVER;
  ------------------
  |  |  711|  9.36k|#define SSL_RENEGOTIATE_NEVER ((PRBool)0)
  ------------------
 4209|  9.36k|    }
 4210|  9.36k|    ss->opt.useSocks = PR_FALSE;
  ------------------
  |  |  438|  9.36k|#define PR_FALSE 0
  ------------------
 4211|  9.36k|    ss->opt.noLocks = !makeLocks;
 4212|  9.36k|    ss->vrange = *VERSIONS_DEFAULTS(protocolVariant);
  ------------------
  |  |  117|  9.36k|    (variant == ssl_variant_stream ? &versions_defaults_stream : &versions_defaults_datagram)
  |  |  ------------------
  |  |  |  Branch (117:6): [True: 0, False: 9.36k]
  |  |  ------------------
  ------------------
 4213|  9.36k|    ss->protocolVariant = protocolVariant;
 4214|       |    /* Ignore overlap failures, because returning NULL would trigger assertion
 4215|       |     * failures elsewhere. We don't want this scenario to be fatal, it's just
 4216|       |     * a state where no SSL connectivity is possible. */
 4217|  9.36k|    ssl3_CreateOverlapWithPolicy(ss->protocolVariant, &ss->vrange, &ss->vrange);
 4218|  9.36k|    ss->peerID = NULL;
 4219|  9.36k|    ss->rTimeout = PR_INTERVAL_NO_TIMEOUT;
  ------------------
  |  |   54|  9.36k|#define PR_INTERVAL_NO_TIMEOUT 0xffffffffUL
  ------------------
 4220|  9.36k|    ss->wTimeout = PR_INTERVAL_NO_TIMEOUT;
  ------------------
  |  |   54|  9.36k|#define PR_INTERVAL_NO_TIMEOUT 0xffffffffUL
  ------------------
 4221|  9.36k|    ss->cTimeout = PR_INTERVAL_NO_TIMEOUT;
  ------------------
  |  |   54|  9.36k|#define PR_INTERVAL_NO_TIMEOUT 0xffffffffUL
  ------------------
 4222|  9.36k|    ss->url = NULL;
 4223|       |
 4224|  9.36k|    PR_INIT_CLIST(&ss->serverCerts);
  ------------------
  |  |  100|  9.36k|    PR_BEGIN_MACRO     \
  |  |  ------------------
  |  |  |  |  123|  9.36k|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |  101|  9.36k|    (_l)->next = (_l); \
  |  |  102|  9.36k|    (_l)->prev = (_l); \
  |  |  103|  9.36k|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|  9.36k|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4225|  9.36k|    PR_INIT_CLIST(&ss->ephemeralKeyPairs);
  ------------------
  |  |  100|  9.36k|    PR_BEGIN_MACRO     \
  |  |  ------------------
  |  |  |  |  123|  9.36k|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |  101|  9.36k|    (_l)->next = (_l); \
  |  |  102|  9.36k|    (_l)->prev = (_l); \
  |  |  103|  9.36k|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|  9.36k|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4226|  9.36k|    PR_INIT_CLIST(&ss->extensionHooks);
  ------------------
  |  |  100|  9.36k|    PR_BEGIN_MACRO     \
  |  |  ------------------
  |  |  |  |  123|  9.36k|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |  101|  9.36k|    (_l)->next = (_l); \
  |  |  102|  9.36k|    (_l)->prev = (_l); \
  |  |  103|  9.36k|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|  9.36k|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4227|  9.36k|    PR_INIT_CLIST(&ss->echConfigs);
  ------------------
  |  |  100|  9.36k|    PR_BEGIN_MACRO     \
  |  |  ------------------
  |  |  |  |  123|  9.36k|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |  101|  9.36k|    (_l)->next = (_l); \
  |  |  102|  9.36k|    (_l)->prev = (_l); \
  |  |  103|  9.36k|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|  9.36k|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4228|       |
 4229|  9.36k|    ss->dbHandle = CERT_GetDefaultCertDB();
 4230|       |
 4231|       |    /* Provide default implementation of hooks */
 4232|  9.36k|    ss->authCertificate = SSL_AuthCertificate;
 4233|  9.36k|    ss->authCertificateArg = (void *)ss->dbHandle;
 4234|  9.36k|    ss->sniSocketConfig = NULL;
 4235|  9.36k|    ss->sniSocketConfigArg = NULL;
 4236|  9.36k|    ss->getClientAuthData = NULL;
 4237|  9.36k|    ss->alertReceivedCallback = NULL;
 4238|  9.36k|    ss->alertReceivedCallbackArg = NULL;
 4239|  9.36k|    ss->alertSentCallback = NULL;
 4240|  9.36k|    ss->alertSentCallbackArg = NULL;
 4241|  9.36k|    ss->handleBadCert = NULL;
 4242|  9.36k|    ss->badCertArg = NULL;
 4243|  9.36k|    ss->pkcs11PinArg = NULL;
 4244|       |
 4245|  9.36k|    ssl_ChooseOps(ss);
 4246|  9.36k|    ssl3_InitSocketPolicy(ss);
 4247|   318k|    for (i = 0; i < SSL_NAMED_GROUP_COUNT; ++i) {
  ------------------
  |  |  133|   318k|#define SSL_NAMED_GROUP_COUNT 33
  ------------------
  |  Branch (4247:17): [True: 308k, False: 9.36k]
  ------------------
 4248|   308k|        ss->namedGroupPreferences[i] = &ssl_named_groups[i];
 4249|   308k|    }
 4250|  9.36k|    ss->additionalShares = 0;
 4251|  9.36k|    PR_INIT_CLIST(&ss->ssl3.hs.remoteExtensions);
  ------------------
  |  |  100|  9.36k|    PR_BEGIN_MACRO     \
  |  |  ------------------
  |  |  |  |  123|  9.36k|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |  101|  9.36k|    (_l)->next = (_l); \
  |  |  102|  9.36k|    (_l)->prev = (_l); \
  |  |  103|  9.36k|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|  9.36k|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4252|  9.36k|    PR_INIT_CLIST(&ss->ssl3.hs.lastMessageFlight);
  ------------------
  |  |  100|  9.36k|    PR_BEGIN_MACRO     \
  |  |  ------------------
  |  |  |  |  123|  9.36k|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |  101|  9.36k|    (_l)->next = (_l); \
  |  |  102|  9.36k|    (_l)->prev = (_l); \
  |  |  103|  9.36k|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|  9.36k|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4253|  9.36k|    PR_INIT_CLIST(&ss->ssl3.hs.cipherSpecs);
  ------------------
  |  |  100|  9.36k|    PR_BEGIN_MACRO     \
  |  |  ------------------
  |  |  |  |  123|  9.36k|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |  101|  9.36k|    (_l)->next = (_l); \
  |  |  102|  9.36k|    (_l)->prev = (_l); \
  |  |  103|  9.36k|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|  9.36k|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4254|  9.36k|    PR_INIT_CLIST(&ss->ssl3.hs.bufferedEarlyData);
  ------------------
  |  |  100|  9.36k|    PR_BEGIN_MACRO     \
  |  |  ------------------
  |  |  |  |  123|  9.36k|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |  101|  9.36k|    (_l)->next = (_l); \
  |  |  102|  9.36k|    (_l)->prev = (_l); \
  |  |  103|  9.36k|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|  9.36k|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4255|  9.36k|    ssl3_InitExtensionData(&ss->xtnData, ss);
 4256|  9.36k|    PR_INIT_CLIST(&ss->ssl3.hs.dtlsSentHandshake);
  ------------------
  |  |  100|  9.36k|    PR_BEGIN_MACRO     \
  |  |  ------------------
  |  |  |  |  123|  9.36k|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |  101|  9.36k|    (_l)->next = (_l); \
  |  |  102|  9.36k|    (_l)->prev = (_l); \
  |  |  103|  9.36k|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|  9.36k|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4257|  9.36k|    PR_INIT_CLIST(&ss->ssl3.hs.dtlsRcvdHandshake);
  ------------------
  |  |  100|  9.36k|    PR_BEGIN_MACRO     \
  |  |  ------------------
  |  |  |  |  123|  9.36k|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |  101|  9.36k|    (_l)->next = (_l); \
  |  |  102|  9.36k|    (_l)->prev = (_l); \
  |  |  103|  9.36k|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|  9.36k|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4258|  9.36k|    PR_INIT_CLIST(&ss->ssl3.hs.psks);
  ------------------
  |  |  100|  9.36k|    PR_BEGIN_MACRO     \
  |  |  ------------------
  |  |  |  |  123|  9.36k|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |  101|  9.36k|    (_l)->next = (_l); \
  |  |  102|  9.36k|    (_l)->prev = (_l); \
  |  |  103|  9.36k|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|  9.36k|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4259|  9.36k|    dtls_InitTimers(ss);
 4260|       |
 4261|  9.36k|    ss->echPrivKey = NULL;
 4262|  9.36k|    ss->echPubKey = NULL;
 4263|  9.36k|    ss->antiReplay = NULL;
 4264|  9.36k|    ss->psk = NULL;
 4265|       |
 4266|  9.36k|    if (makeLocks) {
  ------------------
  |  Branch (4266:9): [True: 9.36k, False: 0]
  ------------------
 4267|  9.36k|        rv = ssl_MakeLocks(ss);
 4268|  9.36k|        if (rv != SECSuccess)
  ------------------
  |  Branch (4268:13): [True: 0, False: 9.36k]
  ------------------
 4269|      0|            goto loser;
 4270|  9.36k|    }
 4271|  9.36k|    rv = ssl_CreateSecurityInfo(ss);
 4272|  9.36k|    if (rv != SECSuccess)
  ------------------
  |  Branch (4272:9): [True: 0, False: 9.36k]
  ------------------
 4273|      0|        goto loser;
 4274|  9.36k|    rv = ssl3_InitGather(&ss->gs);
 4275|  9.36k|    if (rv != SECSuccess)
  ------------------
  |  Branch (4275:9): [True: 0, False: 9.36k]
  ------------------
 4276|      0|        goto loser;
 4277|  9.36k|    rv = ssl3_InitState(ss);
 4278|  9.36k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (4278:9): [True: 0, False: 9.36k]
  ------------------
 4279|      0|        goto loser;
 4280|      0|    }
 4281|  9.36k|    return ss;
 4282|       |
 4283|      0|loser:
 4284|      0|    ssl_DestroySocketContents(ss);
 4285|      0|    ssl_DestroyLocks(ss);
 4286|      0|    PORT_Free(ss);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 4287|      0|    return NULL;
 4288|  9.36k|}
sslsock.c:ssl_PushIOLayer:
 3829|  9.36k|{
 3830|  9.36k|    PRFileDesc *layer = NULL;
 3831|  9.36k|    PRStatus status;
 3832|       |
 3833|  9.36k|    status = PR_CallOnce(&initIoLayerOnce, &ssl_InitIOLayer);
 3834|  9.36k|    if (status != PR_SUCCESS) {
  ------------------
  |  Branch (3834:9): [True: 0, False: 9.36k]
  ------------------
 3835|      0|        goto loser;
 3836|      0|    }
 3837|  9.36k|    if (ns == NULL) {
  ------------------
  |  Branch (3837:9): [True: 0, False: 9.36k]
  ------------------
 3838|      0|        goto loser;
 3839|      0|    }
 3840|  9.36k|    layer = PR_CreateIOLayerStub(ssl_layer_id, &combined_methods);
 3841|  9.36k|    if (layer == NULL)
  ------------------
  |  Branch (3841:9): [True: 0, False: 9.36k]
  ------------------
 3842|      0|        goto loser;
 3843|  9.36k|    layer->secret = (PRFilePrivate *)ns;
 3844|       |
 3845|       |    /* Here, "stack" points to the PRFileDesc on the top of the stack.
 3846|       |    ** "layer" points to a new FD that is to be inserted into the stack.
 3847|       |    ** If layer is being pushed onto the top of the stack, then
 3848|       |    ** PR_PushIOLayer switches the contents of stack and layer, and then
 3849|       |    ** puts stack on top of layer, so that after it is done, the top of
 3850|       |    ** stack is the same "stack" as it was before, and layer is now the
 3851|       |    ** FD for the former top of stack.
 3852|       |    ** After this call, stack always points to the top PRFD on the stack.
 3853|       |    ** If this function fails, the contents of stack and layer are as
 3854|       |    ** they were before the call.
 3855|       |    */
 3856|  9.36k|    status = PR_PushIOLayer(stack, id, layer);
 3857|  9.36k|    if (status != PR_SUCCESS)
  ------------------
  |  Branch (3857:9): [True: 0, False: 9.36k]
  ------------------
 3858|      0|        goto loser;
 3859|       |
 3860|  9.36k|    ns->fd = (id == PR_TOP_IO_LAYER) ? stack : layer;
  ------------------
  |  |  453|  9.36k|#define PR_TOP_IO_LAYER (PRDescIdentity)-2
  ------------------
  |  Branch (3860:14): [True: 9.36k, False: 0]
  ------------------
 3861|  9.36k|    return PR_SUCCESS;
 3862|       |
 3863|      0|loser:
 3864|      0|    if (layer) {
  ------------------
  |  Branch (3864:9): [True: 0, False: 0]
  ------------------
 3865|      0|        layer->dtor(layer); /* free layer */
 3866|      0|    }
 3867|      0|    return PR_FAILURE;
 3868|  9.36k|}
sslsock.c:ssl_InitIOLayer:
 3821|      1|{
 3822|      1|    ssl_layer_id = PR_GetUniqueIdentity("SSL");
 3823|      1|    ssl_SetupIOMethods();
 3824|      1|    return PR_SUCCESS;
 3825|      1|}
sslsock.c:ssl_SetupIOMethods:
 3779|      1|{
 3780|      1|    PRIOMethods *new_methods = &combined_methods;
 3781|      1|    const PRIOMethods *nspr_methods = PR_GetDefaultIOMethods();
 3782|      1|    const PRIOMethods *my_methods = &ssl_methods;
 3783|       |
 3784|      1|    *new_methods = *nspr_methods;
 3785|       |
 3786|      1|    new_methods->file_type = my_methods->file_type;
 3787|      1|    new_methods->close = my_methods->close;
 3788|      1|    new_methods->read = my_methods->read;
 3789|      1|    new_methods->write = my_methods->write;
 3790|      1|    new_methods->available = my_methods->available;
 3791|      1|    new_methods->available64 = my_methods->available64;
 3792|      1|    new_methods->fsync = my_methods->fsync;
 3793|      1|    new_methods->seek = my_methods->seek;
 3794|      1|    new_methods->seek64 = my_methods->seek64;
 3795|      1|    new_methods->fileInfo = my_methods->fileInfo;
 3796|      1|    new_methods->fileInfo64 = my_methods->fileInfo64;
 3797|      1|    new_methods->writev = my_methods->writev;
 3798|      1|    new_methods->connect = my_methods->connect;
 3799|      1|    new_methods->accept = my_methods->accept;
 3800|      1|    new_methods->bind = my_methods->bind;
 3801|      1|    new_methods->listen = my_methods->listen;
 3802|      1|    new_methods->shutdown = my_methods->shutdown;
 3803|      1|    new_methods->recv = my_methods->recv;
 3804|      1|    new_methods->send = my_methods->send;
 3805|      1|    new_methods->recvfrom = my_methods->recvfrom;
 3806|      1|    new_methods->sendto = my_methods->sendto;
 3807|      1|    new_methods->poll = my_methods->poll;
 3808|      1|    new_methods->acceptread = my_methods->acceptread;
 3809|      1|    new_methods->transmitfile = my_methods->transmitfile;
 3810|      1|    new_methods->getsockname = my_methods->getsockname;
 3811|      1|    new_methods->getpeername = my_methods->getpeername;
 3812|       |    /*  new_methods->getsocketoption   = my_methods->getsocketoption;       */
 3813|       |    /*  new_methods->setsocketoption   = my_methods->setsocketoption;       */
 3814|      1|    new_methods->sendfile = my_methods->sendfile;
 3815|      1|}
sslsock.c:ssl_Close:
 3157|  9.36k|{
 3158|  9.36k|    sslSocket *ss;
 3159|  9.36k|    PRStatus rv;
 3160|       |
 3161|  9.36k|    ss = ssl_GetPrivate(fd);
 3162|  9.36k|    if (!ss) {
  ------------------
  |  Branch (3162:9): [True: 0, False: 9.36k]
  ------------------
 3163|      0|        SSL_DBG(("%d: SSL[%d]: bad socket in close", SSL_GETPID(), fd));
  ------------------
  |  |   87|      0|    if (ssl_debug) \
  |  |  ------------------
  |  |  |  Branch (87:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   88|      0|    ssl_Trace b
  ------------------
 3164|      0|        return PR_FAILURE;
 3165|      0|    }
 3166|       |
 3167|       |    /* There must not be any I/O going on */
 3168|  9.36k|    SSL_LOCK_READER(ss);
  ------------------
  |  | 1376|  9.36k|    if (ss->recvLock)       \
  |  |  ------------------
  |  |  |  Branch (1376:9): [True: 9.36k, False: 0]
  |  |  ------------------
  |  | 1377|  9.36k|    PZ_Lock(ss->recvLock)
  |  |  ------------------
  |  |  |  |  245|  9.36k|#define PZ_Lock(k) PR_Lock((k))
  |  |  ------------------
  ------------------
 3169|  9.36k|    SSL_LOCK_WRITER(ss);
  ------------------
  |  | 1382|  9.36k|    if (ss->sendLock)       \
  |  |  ------------------
  |  |  |  Branch (1382:9): [True: 9.36k, False: 0]
  |  |  ------------------
  |  | 1383|  9.36k|    PZ_Lock(ss->sendLock)
  |  |  ------------------
  |  |  |  |  245|  9.36k|#define PZ_Lock(k) PR_Lock((k))
  |  |  ------------------
  ------------------
 3170|       |
 3171|       |    /* By the time this function returns,
 3172|       |    ** ss is an invalid pointer, and the locks to which it points have
 3173|       |    ** been unlocked and freed.  So, this is the ONE PLACE in all of SSL
 3174|       |    ** where the LOCK calls and the corresponding UNLOCK calls are not in
 3175|       |    ** the same function scope.  The unlock calls are in ssl_FreeSocket().
 3176|       |    */
 3177|  9.36k|    rv = (PRStatus)(*ss->ops->close)(ss);
 3178|       |
 3179|  9.36k|    return rv;
 3180|  9.36k|}
sslsock.c:ssl_GetPrivate:
  220|  9.88k|{
  221|  9.88k|    sslSocket *ss;
  222|       |
  223|  9.88k|    PORT_Assert(fd != NULL);
  ------------------
  |  |  120|  9.88k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  9.88k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 9.88k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  224|  9.88k|    PORT_Assert(fd->methods->file_type == PR_DESC_LAYERED);
  ------------------
  |  |  120|  9.88k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  9.88k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 9.88k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  225|  9.88k|    PORT_Assert(fd->identity == ssl_layer_id);
  ------------------
  |  |  120|  9.88k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  9.88k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 9.88k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  226|       |
  227|  9.88k|    if (fd->methods->file_type != PR_DESC_LAYERED ||
  ------------------
  |  Branch (227:9): [True: 0, False: 9.88k]
  ------------------
  228|  9.88k|        fd->identity != ssl_layer_id) {
  ------------------
  |  Branch (228:9): [True: 0, False: 9.88k]
  ------------------
  229|      0|        PORT_SetError(PR_BAD_DESCRIPTOR_ERROR);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
                      PORT_SetError(PR_BAD_DESCRIPTOR_ERROR);
  ------------------
  |  |   19|      0|#define PR_BAD_DESCRIPTOR_ERROR                  (-5999L)
  ------------------
  230|      0|        return NULL;
  231|      0|    }
  232|       |
  233|  9.88k|    ss = (sslSocket *)fd->secret;
  234|       |    /* Set ss->fd lazily. We can't rely on the value of ss->fd set by
  235|       |     * ssl_PushIOLayer because another PR_PushIOLayer call will switch the
  236|       |     * contents of the PRFileDesc pointed by ss->fd and the new layer.
  237|       |     * See bug 807250.
  238|       |     */
  239|  9.88k|    ss->fd = fd;
  240|  9.88k|    return ss;
  241|  9.88k|}
sslsock.c:ssl_Read:
 3226|    518|{
 3227|    518|    sslSocket *ss;
 3228|    518|    int rv;
 3229|       |
 3230|    518|    ss = ssl_GetPrivate(fd);
 3231|    518|    if (!ss) {
  ------------------
  |  Branch (3231:9): [True: 0, False: 518]
  ------------------
 3232|      0|        SSL_DBG(("%d: SSL[%d]: bad socket in read", SSL_GETPID(), fd));
  ------------------
  |  |   87|      0|    if (ssl_debug) \
  |  |  ------------------
  |  |  |  Branch (87:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   88|      0|    ssl_Trace b
  ------------------
 3233|      0|        return SECFailure;
 3234|      0|    }
 3235|    518|    SSL_LOCK_READER(ss);
  ------------------
  |  | 1376|    518|    if (ss->recvLock)       \
  |  |  ------------------
  |  |  |  Branch (1376:9): [True: 518, False: 0]
  |  |  ------------------
  |  | 1377|    518|    PZ_Lock(ss->recvLock)
  |  |  ------------------
  |  |  |  |  245|    518|#define PZ_Lock(k) PR_Lock((k))
  |  |  ------------------
  ------------------
 3236|    518|    ss->rTimeout = PR_INTERVAL_NO_TIMEOUT;
  ------------------
  |  |   54|    518|#define PR_INTERVAL_NO_TIMEOUT 0xffffffffUL
  ------------------
 3237|    518|    if (!ss->opt.fdx)
  ------------------
  |  Branch (3237:9): [True: 518, False: 0]
  ------------------
 3238|    518|        ss->wTimeout = PR_INTERVAL_NO_TIMEOUT;
  ------------------
  |  |   54|    518|#define PR_INTERVAL_NO_TIMEOUT 0xffffffffUL
  ------------------
 3239|    518|    rv = (*ss->ops->read)(ss, (unsigned char *)buf, len);
 3240|    518|    SSL_UNLOCK_READER(ss);
  ------------------
  |  | 1379|    518|    if (ss->recvLock)         \
  |  |  ------------------
  |  |  |  Branch (1379:9): [True: 518, False: 0]
  |  |  ------------------
  |  | 1380|    518|    PZ_Unlock(ss->recvLock)
  |  |  ------------------
  |  |  |  |  246|    518|#define PZ_Unlock(k) PR_Unlock((k))
  |  |  ------------------
  ------------------
 3241|    518|    return rv;
 3242|    518|}
sslsock.c:ssl3_CreateOverlapWithPolicy:
 2633|  50.3k|{
 2634|  50.3k|    SECStatus rv;
 2635|  50.3k|    SSLVersionRange effectivePolicyBoundary;
 2636|  50.3k|    SSLVersionRange vrange;
 2637|       |
 2638|  50.3k|    PORT_Assert(input != NULL);
  ------------------
  |  |  120|  50.3k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  50.3k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 50.3k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2639|       |
 2640|  50.3k|    rv = ssl3_GetEffectiveVersionPolicy(protocolVariant,
 2641|  50.3k|                                        &effectivePolicyBoundary);
 2642|  50.3k|    if (rv == SECFailure) {
  ------------------
  |  Branch (2642:9): [True: 0, False: 50.3k]
  ------------------
 2643|       |        /* SECFailure means internal failure or invalid configuration. */
 2644|      0|        overlap->min = overlap->max = SSL_LIBRARY_VERSION_NONE;
  ------------------
  |  | 1481|      0|#define SSL_LIBRARY_VERSION_NONE 0
  ------------------
 2645|      0|        return SECFailure;
 2646|      0|    }
 2647|       |
 2648|  50.3k|    vrange.min = PR_MAX(input->min, effectivePolicyBoundary.min);
  ------------------
  |  |  159|  50.3k|#define PR_MAX(x,y)     ((x)>(y)?(x):(y))
  |  |  ------------------
  |  |  |  Branch (159:26): [True: 11.6k, False: 38.7k]
  |  |  ------------------
  ------------------
 2649|  50.3k|    vrange.max = PR_MIN(input->max, effectivePolicyBoundary.max);
  ------------------
  |  |  158|  50.3k|#define PR_MIN(x,y)     ((x)<(y)?(x):(y))
  |  |  ------------------
  |  |  |  Branch (158:26): [True: 1.39k, False: 48.9k]
  |  |  ------------------
  ------------------
 2650|       |
 2651|  50.3k|    if (vrange.max < vrange.min) {
  ------------------
  |  Branch (2651:9): [True: 0, False: 50.3k]
  ------------------
 2652|       |        /* there was no overlap, turn off range altogether */
 2653|      0|        overlap->min = overlap->max = SSL_LIBRARY_VERSION_NONE;
  ------------------
  |  | 1481|      0|#define SSL_LIBRARY_VERSION_NONE 0
  ------------------
 2654|      0|        return SECFailure;
 2655|      0|    }
 2656|       |
 2657|  50.3k|    *overlap = vrange;
 2658|  50.3k|    return SECSuccess;
 2659|  50.3k|}
sslsock.c:ssl3_CheckRangeValidAndConstrainByPolicy:
 2812|  22.2k|{
 2813|  22.2k|    SECStatus rv;
 2814|       |
 2815|  22.2k|    if (vrange->min > vrange->max ||
  ------------------
  |  Branch (2815:9): [True: 0, False: 22.2k]
  ------------------
 2816|  22.2k|        !ssl3_VersionIsSupportedByCode(protocolVariant, vrange->min) ||
  ------------------
  |  Branch (2816:9): [True: 0, False: 22.2k]
  ------------------
 2817|  22.2k|        !ssl3_VersionIsSupportedByCode(protocolVariant, vrange->max) ||
  ------------------
  |  Branch (2817:9): [True: 0, False: 22.2k]
  ------------------
 2818|  22.2k|        ssl3_HasConflictingSSLVersions(vrange)) {
  ------------------
  |  Branch (2818:9): [True: 0, False: 22.2k]
  ------------------
 2819|      0|        PORT_SetError(SSL_ERROR_INVALID_VERSION_RANGE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2820|      0|        return SECFailure;
 2821|      0|    }
 2822|       |
 2823|       |    /* Try to adjust the received range using our policy.
 2824|       |     * If there's overlap, we'll use the (possibly reduced) range.
 2825|       |     * If there isn't overlap, it's failure. */
 2826|       |
 2827|  22.2k|    rv = ssl3_CreateOverlapWithPolicy(protocolVariant, vrange, vrange);
 2828|  22.2k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (2828:9): [True: 0, False: 22.2k]
  ------------------
 2829|      0|        return rv;
 2830|      0|    }
 2831|       |
 2832|       |    /* We don't allow SSLv3 and TLSv1.3 together */
 2833|  22.2k|    if (vrange->max >= SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|  22.2k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (2833:9): [True: 20.8k, False: 1.39k]
  ------------------
 2834|  20.8k|        vrange->min = PR_MAX(vrange->min, SSL_LIBRARY_VERSION_TLS_1_0);
  ------------------
  |  |  159|  20.8k|#define PR_MAX(x,y)     ((x)>(y)?(x):(y))
  |  |  ------------------
  |  |  |  Branch (159:26): [True: 11.5k, False: 9.36k]
  |  |  ------------------
  ------------------
 2835|  20.8k|    }
 2836|       |
 2837|  22.2k|    return SECSuccess;
 2838|  22.2k|}
sslsock.c:ssl3_HasConflictingSSLVersions:
 2804|  22.2k|{
 2805|  22.2k|    return (vrange->min <= SSL_LIBRARY_VERSION_3_0 &&
  ------------------
  |  |   17|  44.5k|#define SSL_LIBRARY_VERSION_3_0                 0x0300
  ------------------
  |  Branch (2805:13): [True: 0, False: 22.2k]
  ------------------
 2806|  22.2k|            vrange->max >= SSL_LIBRARY_VERSION_TLS_1_3);
  ------------------
  |  |   21|      0|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (2806:13): [True: 0, False: 0]
  ------------------
 2807|  22.2k|}
sslsock.c:ssl_MakeLocks:
 3873|  9.36k|{
 3874|  9.36k|    ss->firstHandshakeLock = PZ_NewMonitor(nssILockSSL);
  ------------------
  |  |  254|  9.36k|#define PZ_NewMonitor(t) PR_NewMonitor()
  ------------------
 3875|  9.36k|    if (!ss->firstHandshakeLock)
  ------------------
  |  Branch (3875:9): [True: 0, False: 9.36k]
  ------------------
 3876|      0|        goto loser;
 3877|  9.36k|    ss->ssl3HandshakeLock = PZ_NewMonitor(nssILockSSL);
  ------------------
  |  |  254|  9.36k|#define PZ_NewMonitor(t) PR_NewMonitor()
  ------------------
 3878|  9.36k|    if (!ss->ssl3HandshakeLock)
  ------------------
  |  Branch (3878:9): [True: 0, False: 9.36k]
  ------------------
 3879|      0|        goto loser;
 3880|  9.36k|    ss->specLock = NSSRWLock_New(SSL_LOCK_RANK_SPEC, NULL);
  ------------------
  |  |   49|  9.36k|#define NSSRWLock_New NSSRWLock_New_Util
  ------------------
                  ss->specLock = NSSRWLock_New(SSL_LOCK_RANK_SPEC, NULL);
  ------------------
  |  |  306|  9.36k|#define SSL_LOCK_RANK_SPEC 255
  ------------------
 3881|  9.36k|    if (!ss->specLock)
  ------------------
  |  Branch (3881:9): [True: 0, False: 9.36k]
  ------------------
 3882|      0|        goto loser;
 3883|  9.36k|    ss->recvBufLock = PZ_NewMonitor(nssILockSSL);
  ------------------
  |  |  254|  9.36k|#define PZ_NewMonitor(t) PR_NewMonitor()
  ------------------
 3884|  9.36k|    if (!ss->recvBufLock)
  ------------------
  |  Branch (3884:9): [True: 0, False: 9.36k]
  ------------------
 3885|      0|        goto loser;
 3886|  9.36k|    ss->xmitBufLock = PZ_NewMonitor(nssILockSSL);
  ------------------
  |  |  254|  9.36k|#define PZ_NewMonitor(t) PR_NewMonitor()
  ------------------
 3887|  9.36k|    if (!ss->xmitBufLock)
  ------------------
  |  Branch (3887:9): [True: 0, False: 9.36k]
  ------------------
 3888|      0|        goto loser;
 3889|  9.36k|    ss->writerThread = NULL;
 3890|  9.36k|    if (ssl_lock_readers) {
  ------------------
  |  Branch (3890:9): [True: 9.36k, False: 0]
  ------------------
 3891|  9.36k|        ss->recvLock = PZ_NewLock(nssILockSSL);
  ------------------
  |  |  243|  9.36k|#define PZ_NewLock(t) PR_NewLock()
  ------------------
 3892|  9.36k|        if (!ss->recvLock)
  ------------------
  |  Branch (3892:13): [True: 0, False: 9.36k]
  ------------------
 3893|      0|            goto loser;
 3894|  9.36k|        ss->sendLock = PZ_NewLock(nssILockSSL);
  ------------------
  |  |  243|  9.36k|#define PZ_NewLock(t) PR_NewLock()
  ------------------
 3895|  9.36k|        if (!ss->sendLock)
  ------------------
  |  Branch (3895:13): [True: 0, False: 9.36k]
  ------------------
 3896|      0|            goto loser;
 3897|  9.36k|    }
 3898|  9.36k|    return SECSuccess;
 3899|      0|loser:
 3900|      0|    ssl_DestroyLocks(ss);
 3901|      0|    return SECFailure;
 3902|  9.36k|}
sslsock.c:ssl_SetDefaultsFromEnvironment:
 3995|  9.36k|{
 3996|  9.36k|    PR_CallOnce(&ssl_setDefaultsFromEnvironment, ssl_SetDefaultsFromEnvironmentCallOnce);
 3997|  9.36k|}
sslsock.c:ssl_SetDefaultsFromEnvironmentCallOnce:
 3912|      1|{
 3913|      1|#if defined(NSS_HAVE_GETENV)
 3914|      1|    char *ev;
 3915|      1|#ifdef DEBUG
 3916|      1|    ssl_trace_iob = NULL;
 3917|      1|    ev = PR_GetEnvSecure("SSLDEBUGFILE");
 3918|      1|    if (ev && ev[0]) {
  ------------------
  |  Branch (3918:9): [True: 0, False: 1]
  |  Branch (3918:15): [True: 0, False: 0]
  ------------------
 3919|      0|        ssl_trace_iob = fopen(ev, "w");
 3920|      0|    }
 3921|      1|    if (!ssl_trace_iob) {
  ------------------
  |  Branch (3921:9): [True: 1, False: 0]
  ------------------
 3922|      1|        ssl_trace_iob = stderr;
 3923|      1|    }
 3924|      1|#ifdef TRACE
 3925|      1|    ev = PR_GetEnvSecure("SSLTRACE");
 3926|      1|    if (ev && ev[0]) {
  ------------------
  |  Branch (3926:9): [True: 0, False: 1]
  |  Branch (3926:15): [True: 0, False: 0]
  ------------------
 3927|      0|        ssl_trace = atoi(ev);
 3928|      0|        SSL_TRACE(("SSL: tracing set to %d", ssl_trace));
  ------------------
  |  | 1900|      0|#define SSL_TRACE(msg) ssl_Trace msg
  ------------------
 3929|      0|    }
 3930|      1|#endif /* TRACE */
 3931|      1|    ev = PR_GetEnvSecure("SSLDEBUG");
 3932|      1|    if (ev && ev[0]) {
  ------------------
  |  Branch (3932:9): [True: 0, False: 1]
  |  Branch (3932:15): [True: 0, False: 0]
  ------------------
 3933|      0|        ssl_debug = atoi(ev);
 3934|      0|        SSL_TRACE(("SSL: debugging set to %d", ssl_debug));
  ------------------
  |  | 1900|      0|#define SSL_TRACE(msg) ssl_Trace msg
  ------------------
 3935|      0|    }
 3936|      1|#endif /* DEBUG */
 3937|      1|#ifdef NSS_ALLOW_SSLKEYLOGFILE
 3938|      1|    ssl_keylog_iob = NULL;
 3939|      1|    ev = PR_GetEnvSecure("SSLKEYLOGFILE");
 3940|      1|    if (ev && ev[0]) {
  ------------------
  |  Branch (3940:9): [True: 0, False: 1]
  |  Branch (3940:15): [True: 0, False: 0]
  ------------------
 3941|      0|        ssl_keylog_iob = fopen(ev, "a");
 3942|      0|        if (!ssl_keylog_iob) {
  ------------------
  |  Branch (3942:13): [True: 0, False: 0]
  ------------------
 3943|      0|            SSL_TRACE(("SSL: failed to open key log file"));
  ------------------
  |  | 1900|      0|#define SSL_TRACE(msg) ssl_Trace msg
  ------------------
 3944|      0|        } else {
 3945|      0|            if (ftell(ssl_keylog_iob) == 0) {
  ------------------
  |  Branch (3945:17): [True: 0, False: 0]
  ------------------
 3946|      0|                fputs("# SSL/TLS secrets log file, generated by NSS\n",
 3947|      0|                      ssl_keylog_iob);
 3948|      0|            }
 3949|      0|            SSL_TRACE(("SSL: logging SSL/TLS secrets to %s", ev));
  ------------------
  |  | 1900|      0|#define SSL_TRACE(msg) ssl_Trace msg
  ------------------
 3950|      0|            ssl_keylog_lock = PR_NewLock();
 3951|      0|            if (!ssl_keylog_lock) {
  ------------------
  |  Branch (3951:17): [True: 0, False: 0]
  ------------------
 3952|      0|                SSL_TRACE(("SSL: failed to create key log lock"));
  ------------------
  |  | 1900|      0|#define SSL_TRACE(msg) ssl_Trace msg
  ------------------
 3953|      0|                fclose(ssl_keylog_iob);
 3954|      0|                ssl_keylog_iob = NULL;
 3955|      0|            }
 3956|      0|        }
 3957|      0|    }
 3958|      1|#endif
 3959|      1|    ev = PR_GetEnvSecure("SSLFORCELOCKS");
 3960|      1|    if (ev && ev[0] == '1') {
  ------------------
  |  Branch (3960:9): [True: 0, False: 1]
  |  Branch (3960:15): [True: 0, False: 0]
  ------------------
 3961|      0|        ssl_force_locks = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 3962|      0|        ssl_defaults.noLocks = 0;
 3963|      0|        SSL_TRACE(("SSL: force_locks set to %d", ssl_force_locks));
  ------------------
  |  | 1900|      0|#define SSL_TRACE(msg) ssl_Trace msg
  ------------------
 3964|      0|    }
 3965|      1|    ev = PR_GetEnvSecure("NSS_SSL_ENABLE_RENEGOTIATION");
 3966|      1|    if (ev) {
  ------------------
  |  Branch (3966:9): [True: 0, False: 1]
  ------------------
 3967|      0|        if (ev[0] == '1' || LOWER(ev[0]) == 'u')
  ------------------
  |  | 3908|      0|#define LOWER(x) (x | 0x20) /* cheap ToLower function ignores LOCALE */
  ------------------
  |  Branch (3967:13): [True: 0, False: 0]
  |  Branch (3967:29): [True: 0, False: 0]
  ------------------
 3968|      0|            ssl_defaults.enableRenegotiation = SSL_RENEGOTIATE_UNRESTRICTED;
  ------------------
  |  |  714|      0|#define SSL_RENEGOTIATE_UNRESTRICTED ((PRBool)1)
  ------------------
 3969|      0|        else if (ev[0] == '0' || LOWER(ev[0]) == 'n')
  ------------------
  |  | 3908|      0|#define LOWER(x) (x | 0x20) /* cheap ToLower function ignores LOCALE */
  ------------------
  |  Branch (3969:18): [True: 0, False: 0]
  |  Branch (3969:34): [True: 0, False: 0]
  ------------------
 3970|      0|            ssl_defaults.enableRenegotiation = SSL_RENEGOTIATE_NEVER;
  ------------------
  |  |  711|      0|#define SSL_RENEGOTIATE_NEVER ((PRBool)0)
  ------------------
 3971|      0|        else if (ev[0] == '2' || LOWER(ev[0]) == 'r')
  ------------------
  |  | 3908|      0|#define LOWER(x) (x | 0x20) /* cheap ToLower function ignores LOCALE */
  ------------------
  |  Branch (3971:18): [True: 0, False: 0]
  |  Branch (3971:34): [True: 0, False: 0]
  ------------------
 3972|      0|            ssl_defaults.enableRenegotiation = SSL_RENEGOTIATE_REQUIRES_XTN;
  ------------------
  |  |  717|      0|#define SSL_RENEGOTIATE_REQUIRES_XTN ((PRBool)2)
  ------------------
 3973|      0|        else if (ev[0] == '3' || LOWER(ev[0]) == 't')
  ------------------
  |  | 3908|      0|#define LOWER(x) (x | 0x20) /* cheap ToLower function ignores LOCALE */
  ------------------
  |  Branch (3973:18): [True: 0, False: 0]
  |  Branch (3973:34): [True: 0, False: 0]
  ------------------
 3974|      0|            ssl_defaults.enableRenegotiation = SSL_RENEGOTIATE_TRANSITIONAL;
  ------------------
  |  |  722|      0|#define SSL_RENEGOTIATE_TRANSITIONAL ((PRBool)3)
  ------------------
 3975|      0|        SSL_TRACE(("SSL: enableRenegotiation set to %d",
  ------------------
  |  | 1900|      0|#define SSL_TRACE(msg) ssl_Trace msg
  ------------------
 3976|      0|                   ssl_defaults.enableRenegotiation));
 3977|      0|    }
 3978|      1|    ev = PR_GetEnvSecure("NSS_SSL_REQUIRE_SAFE_NEGOTIATION");
 3979|      1|    if (ev && ev[0] == '1') {
  ------------------
  |  Branch (3979:9): [True: 0, False: 1]
  |  Branch (3979:15): [True: 0, False: 0]
  ------------------
 3980|      0|        ssl_defaults.requireSafeNegotiation = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 3981|      0|        SSL_TRACE(("SSL: requireSafeNegotiation set to %d",
  ------------------
  |  | 1900|      0|#define SSL_TRACE(msg) ssl_Trace msg
  ------------------
 3982|      0|                   PR_TRUE));
 3983|      0|    }
 3984|      1|    ev = PR_GetEnvSecure("NSS_SSL_CBC_RANDOM_IV");
 3985|      1|    if (ev && ev[0] == '0') {
  ------------------
  |  Branch (3985:9): [True: 0, False: 1]
  |  Branch (3985:15): [True: 0, False: 0]
  ------------------
 3986|      0|        ssl_defaults.cbcRandomIV = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 3987|      0|        SSL_TRACE(("SSL: cbcRandomIV set to 0"));
  ------------------
  |  | 1900|      0|#define SSL_TRACE(msg) ssl_Trace msg
  ------------------
 3988|      0|    }
 3989|      1|#endif /* NSS_HAVE_GETENV */
 3990|      1|    return PR_SUCCESS;
 3991|      1|}

ssl_GetBulkCipherDef:
   68|  1.32M|{
   69|  1.32M|    SSL3BulkCipher bulkCipher = suiteDef->bulk_cipher_alg;
   70|  1.32M|    PORT_Assert(bulkCipher < PR_ARRAY_SIZE(ssl_bulk_cipher_defs));
  ------------------
  |  |  120|  1.32M|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.32M|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.32M, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   71|  1.32M|    PORT_Assert(ssl_bulk_cipher_defs[bulkCipher].cipher == bulkCipher);
  ------------------
  |  |  120|  1.32M|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.32M|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.32M, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   72|  1.32M|    return &ssl_bulk_cipher_defs[bulkCipher];
   73|  1.32M|}
ssl_GetMacDefByAlg:
   91|  11.0k|{
   92|       |    /* Cast here for clang: https://bugs.llvm.org/show_bug.cgi?id=16154 */
   93|  11.0k|    PORT_Assert((size_t)mac < PR_ARRAY_SIZE(ssl_mac_defs));
  ------------------
  |  |  120|  11.0k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  11.0k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 11.0k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   94|  11.0k|    PORT_Assert(ssl_mac_defs[mac].mac == mac);
  ------------------
  |  |  120|  11.0k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  11.0k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 11.0k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   95|  11.0k|    return &ssl_mac_defs[mac];
   96|  11.0k|}
ssl_GetMacDef:
  100|  10.9k|{
  101|  10.9k|    SSL3MACAlgorithm mac = suiteDef->mac_alg;
  102|  10.9k|    if (ss->version > SSL_LIBRARY_VERSION_3_0) {
  ------------------
  |  |   17|  10.9k|#define SSL_LIBRARY_VERSION_3_0                 0x0300
  ------------------
  |  Branch (102:9): [True: 10.9k, False: 0]
  ------------------
  103|  10.9k|        switch (mac) {
  104|    936|            case ssl_mac_md5:
  ------------------
  |  Branch (104:13): [True: 936, False: 9.97k]
  ------------------
  105|    936|                mac = ssl_hmac_md5;
  106|    936|                break;
  107|  4.75k|            case ssl_mac_sha:
  ------------------
  |  Branch (107:13): [True: 4.75k, False: 6.16k]
  ------------------
  108|  4.75k|                mac = ssl_hmac_sha;
  109|  4.75k|                break;
  110|  5.22k|            default:
  ------------------
  |  Branch (110:13): [True: 5.22k, False: 5.68k]
  ------------------
  111|  5.22k|                break;
  112|  10.9k|        }
  113|  10.9k|    }
  114|  10.9k|    return ssl_GetMacDefByAlg(mac);
  115|  10.9k|}
ssl_FindCipherSpecByEpoch:
  120|  3.78k|{
  121|  3.78k|    PRCList *cur_p;
  122|  3.78k|    for (cur_p = PR_LIST_HEAD(&ss->ssl3.hs.cipherSpecs);
  ------------------
  |  |   65|  3.78k|#define PR_LIST_HEAD(_l) (_l)->next
  ------------------
  123|  11.3k|         cur_p != &ss->ssl3.hs.cipherSpecs;
  ------------------
  |  Branch (123:10): [True: 7.57k, False: 3.78k]
  ------------------
  124|  7.57k|         cur_p = PR_NEXT_LINK(cur_p)) {
  ------------------
  |  |   47|  7.57k|        ((_e)->next)
  ------------------
  125|  7.57k|        ssl3CipherSpec *spec = (ssl3CipherSpec *)cur_p;
  126|  7.57k|        if (spec->epoch != epoch) {
  ------------------
  |  Branch (126:13): [True: 6.92k, False: 649]
  ------------------
  127|  6.92k|            continue;
  128|  6.92k|        }
  129|    649|        if (direction != spec->direction) {
  ------------------
  |  Branch (129:13): [True: 649, False: 0]
  ------------------
  130|    649|            continue;
  131|    649|        }
  132|      0|        return spec;
  133|    649|    }
  134|  3.78k|    return NULL;
  135|  3.78k|}
ssl_CreateCipherSpec:
  139|  31.2k|{
  140|  31.2k|    ssl3CipherSpec *spec = PORT_ZNew(ssl3CipherSpec);
  ------------------
  |  |  148|  31.2k|#define PORT_ZNew(type) (type *)PORT_ZAlloc(sizeof(type))
  |  |  ------------------
  |  |  |  |   72|  31.2k|#define PORT_ZAlloc PORT_ZAlloc_Util
  |  |  ------------------
  ------------------
  141|  31.2k|    if (!spec) {
  ------------------
  |  Branch (141:9): [True: 0, False: 31.2k]
  ------------------
  142|      0|        return NULL;
  143|      0|    }
  144|  31.2k|    spec->refCt = 1;
  145|  31.2k|    spec->version = ss->version;
  146|  31.2k|    spec->direction = direction;
  147|  31.2k|    spec->recordSizeLimit = MAX_FRAGMENT_LENGTH;
  ------------------
  |  |   35|  31.2k|#define MAX_FRAGMENT_LENGTH 16384
  ------------------
  148|  31.2k|    SSL_TRC(10, ("%d: SSL[%d]: new %s spec %d ct=%d",
  ------------------
  |  |   71|  31.2k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 31.2k]
  |  |  ------------------
  |  |   72|  31.2k|    ssl_Trace b
  |  |  ------------------
  |  |  |  Branch (72:15): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  149|  31.2k|                 SSL_GETPID(), ss->fd, SPEC_DIR(spec), spec,
  150|  31.2k|                 spec->refCt));
  151|  31.2k|    return spec;
  152|  31.2k|}
ssl_SaveCipherSpec:
  156|  31.2k|{
  157|  31.2k|    PR_APPEND_LINK(&spec->link, &ss->ssl3.hs.cipherSpecs);
  ------------------
  |  |   57|  31.2k|#define PR_APPEND_LINK(_e,_l) PR_INSERT_BEFORE(_e,_l)
  |  |  ------------------
  |  |  |  |   25|  31.2k|    PR_BEGIN_MACRO       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  123|  31.2k|#define PR_BEGIN_MACRO  do {
  |  |  |  |  ------------------
  |  |  |  |   26|  31.2k|    (_e)->next = (_l);   \
  |  |  |  |   27|  31.2k|    (_e)->prev = (_l)->prev; \
  |  |  |  |   28|  31.2k|    (_l)->prev->next = (_e); \
  |  |  |  |   29|  31.2k|    (_l)->prev = (_e);   \
  |  |  |  |   30|  31.2k|    PR_END_MACRO
  |  |  |  |  ------------------
  |  |  |  |  |  |  124|  31.2k|#define PR_END_MACRO    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  158|  31.2k|}
ssl_SetupNullCipherSpec:
  164|  18.7k|{
  165|  18.7k|    ssl3CipherSpec *spec;
  166|       |
  167|  18.7k|    PORT_Assert(ss->opt.noLocks || ssl_HaveSpecWriteLock(ss));
  ------------------
  |  |  120|  18.7k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  37.4k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 0, False: 18.7k]
  |  |  |  |  |  Branch (208:7): [True: 18.7k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  168|       |
  169|  18.7k|    spec = ssl_CreateCipherSpec(ss, dir);
  170|  18.7k|    if (!spec) {
  ------------------
  |  Branch (170:9): [True: 0, False: 18.7k]
  ------------------
  171|      0|        return SECFailure;
  172|      0|    }
  173|       |
  174|       |    /* Set default versions.  This value will be used to generate and send
  175|       |     * alerts if a version is not negotiated.  These values are overridden when
  176|       |     * sending a ClientHello and when a version is negotiated. */
  177|  18.7k|    spec->version = SSL_LIBRARY_VERSION_TLS_1_0;
  ------------------
  |  |   18|  18.7k|#define SSL_LIBRARY_VERSION_TLS_1_0             0x0301
  ------------------
  178|  18.7k|    spec->recordVersion = IS_DTLS(ss)
  ------------------
  |  |  892|  18.7k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 18.7k, False: 0]
  |  |  ------------------
  ------------------
  179|  18.7k|                              ? SSL_LIBRARY_VERSION_DTLS_1_0_WIRE
  ------------------
  |  |   32|  18.7k|#define SSL_LIBRARY_VERSION_DTLS_1_0_WIRE       ((~0x0100) & 0xffff)
  ------------------
  180|  18.7k|                              : SSL_LIBRARY_VERSION_TLS_1_0;
  ------------------
  |  |   18|  18.7k|#define SSL_LIBRARY_VERSION_TLS_1_0             0x0301
  ------------------
  181|  18.7k|    spec->cipherDef = &ssl_bulk_cipher_defs[cipher_null];
  182|  18.7k|    PORT_Assert(spec->cipherDef->cipher == cipher_null);
  ------------------
  |  |  120|  18.7k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  18.7k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 18.7k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  183|  18.7k|    spec->macDef = &ssl_mac_defs[ssl_mac_null];
  184|  18.7k|    PORT_Assert(spec->macDef->mac == ssl_mac_null);
  ------------------
  |  |  120|  18.7k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  18.7k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 18.7k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  185|  18.7k|    spec->cipher = Null_Cipher;
  186|       |
  187|  18.7k|    spec->phase = "cleartext";
  188|  18.7k|    dtls_InitRecvdRecords(&spec->recvdRecords);
  189|       |
  190|  18.7k|    ssl_SaveCipherSpec(ss, spec);
  191|  18.7k|    if (dir == ssl_secret_read) {
  ------------------
  |  Branch (191:9): [True: 9.36k, False: 9.36k]
  ------------------
  192|  9.36k|        ss->ssl3.crSpec = spec;
  193|  9.36k|    } else {
  194|  9.36k|        ss->ssl3.cwSpec = spec;
  195|  9.36k|    }
  196|  18.7k|    return SECSuccess;
  197|  18.7k|}
ssl_CipherSpecAddRef:
  201|  17.3k|{
  202|  17.3k|    ++spec->refCt;
  203|  17.3k|    SSL_TRC(10, ("%d: SSL[-]: Increment ref ct for %s spec %d. new ct = %d",
  ------------------
  |  |   71|  17.3k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 17.3k]
  |  |  ------------------
  |  |   72|  17.3k|    ssl_Trace b
  |  |  ------------------
  |  |  |  Branch (72:15): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  204|  17.3k|                 SSL_GETPID(), SPEC_DIR(spec), spec, spec->refCt));
  205|  17.3k|}
ssl_DestroyKeyMaterial:
  209|  31.2k|{
  210|  31.2k|    PK11_FreeSymKey(keyMaterial->key);
  211|  31.2k|    PK11_FreeSymKey(keyMaterial->macKey);
  212|  31.2k|    if (keyMaterial->macContext != NULL) {
  ------------------
  |  Branch (212:9): [True: 3.00k, False: 28.2k]
  ------------------
  213|  3.00k|        PK11_DestroyContext(keyMaterial->macContext, PR_TRUE);
  ------------------
  |  |  437|  3.00k|#define PR_TRUE 1
  ------------------
  214|  3.00k|    }
  215|  31.2k|}
ssl_CipherSpecRelease:
  240|  19.7k|{
  241|  19.7k|    if (!spec) {
  ------------------
  |  Branch (241:9): [True: 0, False: 19.7k]
  ------------------
  242|      0|        return;
  243|      0|    }
  244|       |
  245|  19.7k|    PORT_Assert(spec->refCt > 0);
  ------------------
  |  |  120|  19.7k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  19.7k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 19.7k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  246|  19.7k|    --spec->refCt;
  247|  19.7k|    SSL_TRC(10, ("%d: SSL[-]: decrement refct for %s spec %d. epoch=%d new ct = %d",
  ------------------
  |  |   71|  19.7k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 19.7k]
  |  |  ------------------
  |  |   72|  19.7k|    ssl_Trace b
  |  |  ------------------
  |  |  |  Branch (72:15): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  248|  19.7k|                 SSL_GETPID(), SPEC_DIR(spec), spec, spec->epoch, spec->refCt));
  249|  19.7k|    if (!spec->refCt) {
  ------------------
  |  Branch (249:9): [True: 3.85k, False: 15.8k]
  ------------------
  250|  3.85k|        ssl_FreeCipherSpec(spec);
  251|  3.85k|    }
  252|  19.7k|}
ssl_DestroyCipherSpecs:
  256|  9.36k|{
  257|  36.7k|    while (!PR_CLIST_IS_EMPTY(list)) {
  ------------------
  |  |   94|  36.7k|    ((_l)->next == (_l))
  ------------------
  |  Branch (257:12): [True: 27.3k, False: 9.36k]
  ------------------
  258|  27.3k|        ssl3CipherSpec *spec = (ssl3CipherSpec *)PR_LIST_TAIL(list);
  ------------------
  |  |   66|  27.3k|#define PR_LIST_TAIL(_l) (_l)->prev
  ------------------
  259|  27.3k|        ssl_FreeCipherSpec(spec);
  260|  27.3k|    }
  261|  9.36k|}
sslspec.c:ssl_FreeCipherSpec:
  219|  31.2k|{
  220|  31.2k|    SSL_TRC(10, ("%d: SSL[-]: Freeing %s spec %d. epoch=%d",
  ------------------
  |  |   71|  31.2k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 31.2k]
  |  |  ------------------
  |  |   72|  31.2k|    ssl_Trace b
  |  |  ------------------
  |  |  |  Branch (72:15): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  221|  31.2k|                 SSL_GETPID(), SPEC_DIR(spec), spec, spec->epoch));
  222|       |
  223|  31.2k|    PR_REMOVE_LINK(&spec->link);
  ------------------
  |  |   72|  31.2k|    PR_BEGIN_MACRO             \
  |  |  ------------------
  |  |  |  |  123|  31.2k|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |   73|  31.2k|    (_e)->prev->next = (_e)->next; \
  |  |   74|  31.2k|    (_e)->next->prev = (_e)->prev; \
  |  |   75|  31.2k|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|  31.2k|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  224|       |
  225|       |    /*  PORT_Assert( ss->opt.noLocks || ssl_HaveSpecWriteLock(ss)); Don't have ss! */
  226|  31.2k|    if (spec->cipherContext) {
  ------------------
  |  Branch (226:9): [True: 3.75k, False: 27.4k]
  ------------------
  227|  3.75k|        PK11_DestroyContext(spec->cipherContext, PR_TRUE);
  ------------------
  |  |  437|  3.75k|#define PR_TRUE 1
  ------------------
  228|  3.75k|    }
  229|  31.2k|    PK11_FreeSymKey(spec->masterSecret);
  230|  31.2k|    ssl_DestroyKeyMaterial(&spec->keyMaterial);
  231|  31.2k|    ssl_DestroyMaskingContextInner(spec->maskContext);
  232|       |
  233|  31.2k|    PORT_ZFree(spec, sizeof(*spec));
  ------------------
  |  |   75|  31.2k|#define PORT_ZFree PORT_ZFree_Util
  ------------------
  234|  31.2k|}

tls13_FatalError:
  138|    238|{
  139|    238|    PORT_Assert(desc != internal_error); /* These should never happen */
  ------------------
  |  |  120|    238|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    238|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 238, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  140|    238|    (void)SSL3_SendAlert(ss, alert_fatal, desc);
  141|    238|    PORT_SetError(prError);
  ------------------
  |  |   65|    238|#define PORT_SetError PORT_SetError_Util
  ------------------
  142|    238|}
tls13_SetHsState:
  188|  1.43k|{
  189|  1.43k|#ifdef TRACE
  190|  1.43k|    const char *new_state_name =
  191|  1.43k|        tls13_HandshakeState(ws);
  192|       |
  193|  1.43k|    SSL_TRC(3, ("%d: TLS13[%d]: %s state change from %s->%s in %s (%s:%d)",
  ------------------
  |  |   71|  1.43k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 1.43k]
  |  |  ------------------
  |  |   72|  1.43k|    ssl_Trace b
  |  |  ------------------
  |  |  |  Branch (72:15): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  194|  1.43k|                SSL_GETPID(), ss->fd, SSL_ROLE(ss),
  195|  1.43k|                tls13_HandshakeState(TLS13_BASE_WAIT_STATE(ss->ssl3.hs.ws)),
  196|  1.43k|                new_state_name,
  197|  1.43k|                func, file, line));
  198|  1.43k|#endif
  199|       |
  200|  1.43k|    ss->ssl3.hs.ws = TLS13_WAIT_STATE(ws);
  ------------------
  |  |  180|  1.43k|#define TLS13_WAIT_STATE(ws) (((ws == idle_handshake) || (ws == wait_server_hello)) ? ws : ws | TLS13_WAIT_STATE_MASK)
  |  |  ------------------
  |  |  |  |  176|  2.86k|#define TLS13_WAIT_STATE_MASK 0x80
  |  |  ------------------
  |  |  |  Branch (180:32): [True: 0, False: 1.43k]
  |  |  |  Branch (180:58): [True: 0, False: 1.43k]
  |  |  ------------------
  ------------------
  201|  1.43k|}
tls13_InHsState:
  218|    439|{
  219|    439|    PRBool found;
  220|    439|    va_list ap;
  221|       |
  222|    439|    va_start(ap, ss);
  223|    439|    found = tls13_InHsStateV(ss, ap);
  224|    439|    va_end(ap);
  225|       |
  226|    439|    return found;
  227|    439|}
tls13_IsPostHandshake:
  253|  9.93k|{
  254|  9.93k|    return ss->version >= SSL_LIBRARY_VERSION_TLS_1_3 && ss->firstHsDone;
  ------------------
  |  |   21|  19.8k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (254:12): [True: 15, False: 9.91k]
  |  Branch (254:58): [True: 0, False: 15]
  ------------------
  255|  9.93k|}
tls13_GetHashForCipherSuite:
  259|     10|{
  260|     10|    const ssl3CipherSuiteDef *cipherDef =
  261|     10|        ssl_LookupCipherSuiteDef(suite);
  262|     10|    PORT_Assert(cipherDef);
  ------------------
  |  |  120|     10|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|     10|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 10, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  263|     10|    if (!cipherDef) {
  ------------------
  |  Branch (263:9): [True: 0, False: 10]
  ------------------
  264|      0|        return ssl_hash_none;
  265|      0|    }
  266|     10|    return cipherDef->prf_hash;
  267|     10|}
tls13_GetHash:
  271|  18.8k|{
  272|       |    /* suite_def may not be set yet when doing EPSK 0-Rtt. */
  273|  18.8k|    if (!ss->ssl3.hs.suite_def) {
  ------------------
  |  Branch (273:9): [True: 0, False: 18.8k]
  ------------------
  274|      0|        if (ss->xtnData.selectedPsk) {
  ------------------
  |  Branch (274:13): [True: 0, False: 0]
  ------------------
  275|      0|            return ss->xtnData.selectedPsk->hash;
  276|      0|        }
  277|       |        /* This should never happen. */
  278|      0|        PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  279|      0|        return ssl_hash_none;
  280|      0|    }
  281|       |
  282|       |    /* All TLS 1.3 cipher suites must have an explict PRF hash. */
  283|  18.8k|    PORT_Assert(ss->ssl3.hs.suite_def->prf_hash != ssl_hash_none);
  ------------------
  |  |  120|  18.8k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  18.8k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 18.8k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  284|  18.8k|    return ss->ssl3.hs.suite_def->prf_hash;
  285|  18.8k|}
tls13_GetHashAndCipher:
  290|  1.60k|{
  291|  1.60k|    if (version < SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|  1.60k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (291:9): [True: 0, False: 1.60k]
  ------------------
  292|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  293|      0|        return SECFailure;
  294|      0|    }
  295|       |
  296|       |    // Lookup and check the suite.
  297|  1.60k|    SSLVersionRange vrange = { version, version };
  298|  1.60k|    if (!ssl3_CipherSuiteAllowedForVersionRange(cipherSuite, &vrange)) {
  ------------------
  |  Branch (298:9): [True: 0, False: 1.60k]
  ------------------
  299|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  300|      0|        return SECFailure;
  301|      0|    }
  302|  1.60k|    const ssl3CipherSuiteDef *suiteDef = ssl_LookupCipherSuiteDef(cipherSuite);
  303|  1.60k|    const ssl3BulkCipherDef *cipherDef = ssl_GetBulkCipherDef(suiteDef);
  304|  1.60k|    if (cipherDef->type != type_aead) {
  ------------------
  |  Branch (304:9): [True: 0, False: 1.60k]
  ------------------
  305|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  306|      0|        return SECFailure;
  307|      0|    }
  308|  1.60k|    *hash = suiteDef->prf_hash;
  309|  1.60k|    if (cipher != NULL) {
  ------------------
  |  Branch (309:9): [True: 1.60k, False: 0]
  ------------------
  310|  1.60k|        *cipher = cipherDef;
  311|  1.60k|    }
  312|  1.60k|    return SECSuccess;
  313|  1.60k|}
tls13_GetHashSizeForHash:
  317|  43.3k|{
  318|  43.3k|    switch (hash) {
  319|  21.3k|        case ssl_hash_sha256:
  ------------------
  |  Branch (319:9): [True: 21.3k, False: 21.9k]
  ------------------
  320|  21.3k|            return 32;
  321|  21.9k|        case ssl_hash_sha384:
  ------------------
  |  Branch (321:9): [True: 21.9k, False: 21.3k]
  ------------------
  322|  21.9k|            return 48;
  323|      0|        default:
  ------------------
  |  Branch (323:9): [True: 0, False: 43.3k]
  ------------------
  324|      0|            PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  325|  43.3k|    }
  326|      0|    return 32;
  327|  43.3k|}
tls13_GetHashSize:
  331|  2.86k|{
  332|  2.86k|    return tls13_GetHashSizeForHash(tls13_GetHash(ss));
  333|  2.86k|}
tls13_ComputeHash:
  359|  8.13k|{
  360|  8.13k|    SECStatus rv;
  361|       |
  362|  8.13k|    rv = PK11_HashBuf(ssl3_HashTypeToOID(hash), hashes->u.raw, buf, len);
  363|  8.13k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (363:9): [True: 0, False: 8.13k]
  ------------------
  364|      0|        FATAL_ERROR(ss, SEC_ERROR_LIBRARY_FAILURE, internal_error);
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  365|      0|        return SECFailure;
  366|      0|    }
  367|  8.13k|    hashes->len = tls13_GetHashSizeForHash(hash);
  368|       |
  369|  8.13k|    return SECSuccess;
  370|  8.13k|}
tls13_CreateKeyShare:
  454|  9.24k|{
  455|  9.24k|    SECStatus rv;
  456|  9.24k|    const ssl3DHParams *params;
  457|  9.24k|    sslEphemeralKeyPair *keyPair = NULL;
  458|       |
  459|  9.24k|    PORT_Assert(groupDef);
  ------------------
  |  |  120|  9.24k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  9.24k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 9.24k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  460|  9.24k|    switch (groupDef->keaType) {
  461|     40|        case ssl_kea_ecdh_hybrid:
  ------------------
  |  Branch (461:9): [True: 40, False: 9.20k]
  ------------------
  462|     40|            if (groupDef->name != ssl_grp_kem_xyber768d00 && groupDef->name != ssl_grp_kem_mlkem768x25519) {
  ------------------
  |  Branch (462:17): [True: 40, False: 0]
  |  Branch (462:62): [True: 0, False: 40]
  ------------------
  463|      0|                PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  464|      0|                return SECFailure;
  465|      0|            }
  466|     40|            const sslNamedGroupDef *x25519 = ssl_LookupNamedGroup(ssl_grp_ec_curve25519);
  467|     40|            sslEphemeralKeyPair *x25519Pair = ssl_LookupEphemeralKeyPair(ss, x25519);
  468|     40|            if (x25519Pair) {
  ------------------
  |  Branch (468:17): [True: 0, False: 40]
  ------------------
  469|      0|                keyPair = ssl_CopyEphemeralKeyPair(x25519Pair);
  470|      0|            }
  471|     40|            if (!keyPair) {
  ------------------
  |  Branch (471:17): [True: 40, False: 0]
  ------------------
  472|     40|                rv = ssl_CreateECDHEphemeralKeyPair(ss, x25519, &keyPair);
  473|     40|                if (rv != SECSuccess) {
  ------------------
  |  Branch (473:21): [True: 0, False: 40]
  ------------------
  474|      0|                    return SECFailure;
  475|      0|                }
  476|     40|            }
  477|     40|            keyPair->group = groupDef;
  478|     40|            break;
  479|  8.07k|        case ssl_kea_ecdh:
  ------------------
  |  Branch (479:9): [True: 8.07k, False: 1.17k]
  ------------------
  480|  8.07k|            if (groupDef->name == ssl_grp_ec_curve25519) {
  ------------------
  |  Branch (480:17): [True: 7.97k, False: 101]
  ------------------
  481|  7.97k|                sslEphemeralKeyPair *hybridPair = ssl_LookupEphemeralKeyPair(ss, ssl_LookupNamedGroup(ssl_grp_kem_mlkem768x25519));
  482|  7.97k|                if (!hybridPair) {
  ------------------
  |  Branch (482:21): [True: 7.97k, False: 0]
  ------------------
  483|  7.97k|                    hybridPair = ssl_LookupEphemeralKeyPair(ss, ssl_LookupNamedGroup(ssl_grp_kem_xyber768d00));
  484|  7.97k|                }
  485|  7.97k|                if (hybridPair) {
  ------------------
  |  Branch (485:21): [True: 0, False: 7.97k]
  ------------------
  486|       |                    // We could use ssl_CopyEphemeralKeyPair here, but we would need to free
  487|       |                    // the KEM components. We should pull this out into a utility function when
  488|       |                    // we refactor to support multiple hybrid mechanisms.
  489|      0|                    keyPair = PORT_ZNew(sslEphemeralKeyPair);
  ------------------
  |  |  148|      0|#define PORT_ZNew(type) (type *)PORT_ZAlloc(sizeof(type))
  |  |  ------------------
  |  |  |  |   72|      0|#define PORT_ZAlloc PORT_ZAlloc_Util
  |  |  ------------------
  ------------------
  490|      0|                    if (!keyPair) {
  ------------------
  |  Branch (490:25): [True: 0, False: 0]
  ------------------
  491|      0|                        return SECFailure;
  492|      0|                    }
  493|      0|                    PR_INIT_CLIST(&keyPair->link);
  ------------------
  |  |  100|      0|    PR_BEGIN_MACRO     \
  |  |  ------------------
  |  |  |  |  123|      0|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |  101|      0|    (_l)->next = (_l); \
  |  |  102|      0|    (_l)->prev = (_l); \
  |  |  103|      0|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|      0|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  494|      0|                    keyPair->group = groupDef;
  495|      0|                    keyPair->keys = ssl_GetKeyPairRef(hybridPair->keys);
  496|      0|                }
  497|  7.97k|            }
  498|  8.07k|            if (!keyPair) {
  ------------------
  |  Branch (498:17): [True: 8.07k, False: 0]
  ------------------
  499|  8.07k|                rv = ssl_CreateECDHEphemeralKeyPair(ss, groupDef, &keyPair);
  500|  8.07k|                if (rv != SECSuccess) {
  ------------------
  |  Branch (500:21): [True: 0, False: 8.07k]
  ------------------
  501|      0|                    return SECFailure;
  502|      0|                }
  503|  8.07k|            }
  504|  8.07k|            break;
  505|  8.07k|        case ssl_kea_dh:
  ------------------
  |  Branch (505:9): [True: 1.13k, False: 8.11k]
  ------------------
  506|  1.13k|            params = ssl_GetDHEParams(groupDef);
  507|  1.13k|            PORT_Assert(params->name != ssl_grp_ffdhe_custom);
  ------------------
  |  |  120|  1.13k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.13k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.13k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  508|  1.13k|            rv = ssl_CreateDHEKeyPair(groupDef, params, &keyPair);
  509|  1.13k|            if (rv != SECSuccess) {
  ------------------
  |  Branch (509:17): [True: 0, False: 1.13k]
  ------------------
  510|      0|                return SECFailure;
  511|      0|            }
  512|  1.13k|            break;
  513|  1.13k|        default:
  ------------------
  |  Branch (513:9): [True: 0, False: 9.24k]
  ------------------
  514|      0|            PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  515|      0|            PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  516|      0|            return SECFailure;
  517|  9.24k|    }
  518|       |
  519|       |    // If we're creating an ECDH + KEM hybrid share and we're the client, then
  520|       |    // we still need to generate the KEM key pair. Otherwise we're done.
  521|  9.24k|    if (groupDef->keaType == ssl_kea_ecdh_hybrid && !ss->sec.isServer) {
  ------------------
  |  Branch (521:9): [True: 40, False: 9.20k]
  |  Branch (521:53): [True: 40, False: 0]
  ------------------
  522|     40|        rv = tls13_CreateKEMKeyPair(ss, groupDef, &keyPair->kemKeys);
  523|     40|        if (rv != SECSuccess) {
  ------------------
  |  Branch (523:13): [True: 0, False: 40]
  ------------------
  524|      0|            ssl_FreeEphemeralKeyPair(keyPair);
  525|      0|            return SECFailure;
  526|      0|        }
  527|     40|    }
  528|       |
  529|  9.24k|    *outKeyPair = keyPair;
  530|  9.24k|    return SECSuccess;
  531|  9.24k|}
tls13_AddKeyShare:
  535|  9.24k|{
  536|  9.24k|    sslEphemeralKeyPair *keyPair = NULL;
  537|  9.24k|    SECStatus rv;
  538|       |
  539|  9.24k|    rv = tls13_CreateKeyShare(ss, groupDef, &keyPair);
  540|  9.24k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (540:9): [True: 0, False: 9.24k]
  ------------------
  541|      0|        return SECFailure;
  542|      0|    }
  543|  9.24k|    PR_APPEND_LINK(&keyPair->link, &ss->ephemeralKeyPairs);
  ------------------
  |  |   57|  9.24k|#define PR_APPEND_LINK(_e,_l) PR_INSERT_BEFORE(_e,_l)
  |  |  ------------------
  |  |  |  |   25|  18.4k|    PR_BEGIN_MACRO       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  123|  9.24k|#define PR_BEGIN_MACRO  do {
  |  |  |  |  ------------------
  |  |  |  |   26|  18.4k|    (_e)->next = (_l);   \
  |  |  |  |   27|  18.4k|    (_e)->prev = (_l)->prev; \
  |  |  |  |   28|  18.4k|    (_l)->prev->next = (_e); \
  |  |  |  |   29|  18.4k|    (_l)->prev = (_e);   \
  |  |  |  |   30|  18.4k|    PR_END_MACRO
  |  |  |  |  ------------------
  |  |  |  |  |  |  124|  9.24k|#define PR_END_MACRO    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  544|  9.24k|    return SECSuccess;
  545|  9.24k|}
tls13_SetupClientHello:
  568|  9.52k|{
  569|  9.52k|    unsigned int i;
  570|  9.52k|    SSL3Statistics *ssl3stats = SSL_GetStatistics();
  571|  9.52k|    NewSessionTicket *session_ticket = NULL;
  572|  9.52k|    sslSessionID *sid = ss->sec.ci.sid;
  573|  9.52k|    unsigned int numShares = 0;
  574|  9.52k|    SECStatus rv;
  575|       |
  576|  9.52k|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|  9.52k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  14.2k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 4.76k, False: 4.76k]
  |  |  |  |  |  Branch (208:7): [True: 4.76k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  577|  9.52k|    PORT_Assert(ss->opt.noLocks || ssl_HaveXmitBufLock(ss));
  ------------------
  |  |  120|  9.52k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  14.2k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 4.76k, False: 4.76k]
  |  |  |  |  |  Branch (208:7): [True: 4.76k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  578|       |
  579|  9.52k|    rv = tls13_ClientSetupEch(ss, chType);
  580|  9.52k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (580:9): [True: 0, False: 9.52k]
  ------------------
  581|      0|        return SECFailure;
  582|      0|    }
  583|       |
  584|       |    /* Everything below here is only run on the first CH. */
  585|  9.52k|    if (chType != client_hello_initial) {
  ------------------
  |  Branch (585:9): [True: 1.55k, False: 7.97k]
  ------------------
  586|  1.55k|        return SECSuccess;
  587|  1.55k|    }
  588|       |
  589|  7.97k|    rv = tls13_ClientGreaseSetup(ss);
  590|  7.97k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (590:9): [True: 0, False: 7.97k]
  ------------------
  591|      0|        return SECFailure;
  592|      0|    }
  593|       |
  594|       |    /* Select the first enabled group.
  595|       |     * TODO(ekr@rtfm.com): be smarter about offering the group
  596|       |     * that the other side negotiated if we are resuming. */
  597|  7.97k|    PORT_Assert(PR_CLIST_IS_EMPTY(&ss->ephemeralKeyPairs));
  ------------------
  |  |  120|  7.97k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  7.97k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 7.97k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  598|  7.97k|    for (i = 0; i < SSL_NAMED_GROUP_COUNT; ++i) {
  ------------------
  |  |  133|  7.97k|#define SSL_NAMED_GROUP_COUNT 33
  ------------------
  |  Branch (598:17): [True: 7.97k, False: 0]
  ------------------
  599|  7.97k|        if (!ss->namedGroupPreferences[i]) {
  ------------------
  |  Branch (599:13): [True: 0, False: 7.97k]
  ------------------
  600|      0|            continue;
  601|      0|        }
  602|  7.97k|        rv = tls13_AddKeyShare(ss, ss->namedGroupPreferences[i]);
  603|  7.97k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (603:13): [True: 0, False: 7.97k]
  ------------------
  604|      0|            return SECFailure;
  605|      0|        }
  606|  7.97k|        if (++numShares > ss->additionalShares) {
  ------------------
  |  Branch (606:13): [True: 7.97k, False: 0]
  ------------------
  607|  7.97k|            break;
  608|  7.97k|        }
  609|  7.97k|    }
  610|       |
  611|  7.97k|    if (PR_CLIST_IS_EMPTY(&ss->ephemeralKeyPairs)) {
  ------------------
  |  |   94|  7.97k|    ((_l)->next == (_l))
  |  |  ------------------
  |  |  |  Branch (94:5): [True: 0, False: 7.97k]
  |  |  ------------------
  ------------------
  612|      0|        PORT_SetError(SSL_ERROR_NO_CIPHERS_SUPPORTED);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  613|      0|        return SECFailure;
  614|      0|    }
  615|       |
  616|       |    /* Try to do stateless resumption, if we can. */
  617|  7.97k|    if (sid->cached != never_cached &&
  ------------------
  |  Branch (617:9): [True: 0, False: 7.97k]
  ------------------
  618|  7.97k|        sid->version >= SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|      0|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (618:9): [True: 0, False: 0]
  ------------------
  619|       |        /* The caller must be holding sid->u.ssl3.lock for reading. */
  620|      0|        session_ticket = &sid->u.ssl3.locked.sessionTicket;
  621|      0|        PORT_Assert(session_ticket && session_ticket->ticket.data);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  622|       |
  623|      0|        if (ssl_TicketTimeValid(ss, session_ticket)) {
  ------------------
  |  Branch (623:13): [True: 0, False: 0]
  ------------------
  624|      0|            ss->statelessResume = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  625|      0|        }
  626|       |
  627|      0|        if (ss->statelessResume) {
  ------------------
  |  Branch (627:13): [True: 0, False: 0]
  ------------------
  628|      0|            PORT_Assert(ss->sec.ci.sid);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  629|      0|            rv = tls13_RecoverWrappedSharedSecret(ss, ss->sec.ci.sid);
  630|      0|            if (rv != SECSuccess) {
  ------------------
  |  Branch (630:17): [True: 0, False: 0]
  ------------------
  631|      0|                FATAL_ERROR(ss, SEC_ERROR_LIBRARY_FAILURE, internal_error);
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  632|      0|                SSL_AtomicIncrementLong(&ssl3stats->sch_sid_cache_not_ok);
  633|      0|                ssl_UncacheSessionID(ss);
  634|      0|                ssl_FreeSID(ss->sec.ci.sid);
  635|      0|                ss->sec.ci.sid = NULL;
  636|      0|                return SECFailure;
  637|      0|            }
  638|       |
  639|      0|            ss->ssl3.hs.cipher_suite = ss->sec.ci.sid->u.ssl3.cipherSuite;
  640|      0|            rv = ssl3_SetupCipherSuite(ss, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  641|      0|            if (rv != SECSuccess) {
  ------------------
  |  Branch (641:17): [True: 0, False: 0]
  ------------------
  642|      0|                FATAL_ERROR(ss, PORT_GetError(), internal_error);
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  643|      0|                return SECFailure;
  644|      0|            }
  645|      0|            PORT_Assert(!PR_CLIST_IS_EMPTY(&ss->ssl3.hs.psks));
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  646|      0|        }
  647|      0|    }
  648|       |
  649|       |    /* Derive the binder keys if any PSKs. */
  650|  7.97k|    if (!PR_CLIST_IS_EMPTY(&ss->ssl3.hs.psks)) {
  ------------------
  |  |   94|  7.97k|    ((_l)->next == (_l))
  ------------------
  |  Branch (650:9): [True: 3.99k, False: 3.97k]
  ------------------
  651|       |        /* If an External PSK specified a suite, use that. */
  652|  3.99k|        sslPsk *psk = (sslPsk *)PR_LIST_HEAD(&ss->ssl3.hs.psks);
  ------------------
  |  |   65|  3.99k|#define PR_LIST_HEAD(_l) (_l)->next
  ------------------
  653|  3.99k|        if (!ss->statelessResume &&
  ------------------
  |  Branch (653:13): [True: 3.99k, False: 0]
  ------------------
  654|  3.99k|            psk->type == ssl_psk_external &&
  ------------------
  |  Branch (654:13): [True: 3.99k, False: 0]
  ------------------
  655|  3.99k|            psk->zeroRttSuite != TLS_NULL_WITH_NULL_NULL) {
  ------------------
  |  |   76|  3.99k|#define TLS_NULL_WITH_NULL_NULL                 0x0000
  ------------------
  |  Branch (655:13): [True: 0, False: 3.99k]
  ------------------
  656|      0|            ss->ssl3.hs.cipher_suite = psk->zeroRttSuite;
  657|      0|        }
  658|       |
  659|  3.99k|        rv = tls13_ComputeEarlySecretsWithPsk(ss);
  660|  3.99k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (660:13): [True: 0, False: 3.99k]
  ------------------
  661|      0|            FATAL_ERROR(ss, SEC_ERROR_LIBRARY_FAILURE, internal_error);
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  662|      0|            return SECFailure;
  663|      0|        }
  664|  3.99k|    }
  665|       |
  666|  7.97k|    return SECSuccess;
  667|  7.97k|}
tls13_HandleKeyShare:
  850|  1.49k|{
  851|  1.49k|    PORTCheapArenaPool arena;
  852|  1.49k|    SECKEYPublicKey *peerKey;
  853|  1.49k|    CK_MECHANISM_TYPE mechanism;
  854|  1.49k|    PK11SymKey *key;
  855|  1.49k|    unsigned char *ec_data;
  856|  1.49k|    SECStatus rv;
  857|  1.49k|    int keySize = 0;
  858|       |
  859|  1.49k|    PORT_InitCheapArena(&arena, DER_DEFAULT_CHUNKSIZE);
  ------------------
  |  |   60|  1.49k|#define DER_DEFAULT_CHUNKSIZE (2048)
  ------------------
  860|  1.49k|    peerKey = PORT_ArenaZNew(&arena.arena, SECKEYPublicKey);
  ------------------
  |  |  155|  1.49k|    (type *)PORT_ArenaZAlloc(poolp, sizeof(type))
  |  |  ------------------
  |  |  |  |   59|  1.49k|#define PORT_ArenaZAlloc PORT_ArenaZAlloc_Util
  |  |  ------------------
  ------------------
  861|  1.49k|    if (peerKey == NULL) {
  ------------------
  |  Branch (861:9): [True: 0, False: 1.49k]
  ------------------
  862|      0|        goto loser;
  863|      0|    }
  864|  1.49k|    peerKey->arena = &arena.arena;
  865|  1.49k|    peerKey->pkcs11Slot = NULL;
  866|  1.49k|    peerKey->pkcs11ID = CK_INVALID_HANDLE;
  ------------------
  |  |   78|  1.49k|#define CK_INVALID_HANDLE 0
  ------------------
  867|       |
  868|  1.49k|    switch (entry->group->keaType) {
  869|      0|        case ssl_kea_ecdh_hybrid:
  ------------------
  |  Branch (869:9): [True: 0, False: 1.49k]
  ------------------
  870|      0|            switch (entry->group->name) {
  871|      0|                case ssl_grp_kem_xyber768d00:
  ------------------
  |  Branch (871:17): [True: 0, False: 0]
  ------------------
  872|       |                    // x25519 share is at the beginning
  873|      0|                    ec_data = entry->key_exchange.len < X25519_PUBLIC_KEY_BYTES
  ------------------
  |  |    8|      0|#define X25519_PUBLIC_KEY_BYTES 32U
  ------------------
  |  Branch (873:31): [True: 0, False: 0]
  ------------------
  874|      0|                                  ? NULL
  875|      0|                                  : entry->key_exchange.data;
  876|      0|                    break;
  877|      0|                case ssl_grp_kem_mlkem768x25519:
  ------------------
  |  Branch (877:17): [True: 0, False: 0]
  ------------------
  878|       |                    // x25519 share is at the end
  879|      0|                    ec_data = entry->key_exchange.len < X25519_PUBLIC_KEY_BYTES
  ------------------
  |  |    8|      0|#define X25519_PUBLIC_KEY_BYTES 32U
  ------------------
  |  Branch (879:31): [True: 0, False: 0]
  ------------------
  880|      0|                                  ? NULL
  881|      0|                                  : entry->key_exchange.data + entry->key_exchange.len - X25519_PUBLIC_KEY_BYTES;
  ------------------
  |  |    8|      0|#define X25519_PUBLIC_KEY_BYTES 32U
  ------------------
  882|      0|                    break;
  883|      0|                default:
  ------------------
  |  Branch (883:17): [True: 0, False: 0]
  ------------------
  884|      0|                    ec_data = NULL;
  885|      0|                    break;
  886|      0|            }
  887|      0|            if (!ec_data) {
  ------------------
  |  Branch (887:17): [True: 0, False: 0]
  ------------------
  888|      0|                PORT_SetError(SSL_ERROR_RX_MALFORMED_HYBRID_KEY_SHARE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  889|      0|                goto loser;
  890|      0|            }
  891|      0|            rv = ssl_ImportECDHKeyShare(peerKey,
  892|      0|                                        ec_data,
  893|      0|                                        X25519_PUBLIC_KEY_BYTES,
  ------------------
  |  |    8|      0|#define X25519_PUBLIC_KEY_BYTES 32U
  ------------------
  894|      0|                                        ssl_LookupNamedGroup(ssl_grp_ec_curve25519));
  895|      0|            mechanism = CKM_ECDH1_DERIVE;
  ------------------
  |  | 1086|      0|#define CKM_ECDH1_DERIVE 0x00001050UL
  ------------------
  896|      0|            break;
  897|    541|        case ssl_kea_ecdh:
  ------------------
  |  Branch (897:9): [True: 541, False: 949]
  ------------------
  898|    541|            rv = ssl_ImportECDHKeyShare(peerKey,
  899|    541|                                        entry->key_exchange.data,
  900|    541|                                        entry->key_exchange.len,
  901|    541|                                        entry->group);
  902|    541|            mechanism = CKM_ECDH1_DERIVE;
  ------------------
  |  | 1086|    541|#define CKM_ECDH1_DERIVE 0x00001050UL
  ------------------
  903|    541|            break;
  904|    949|        case ssl_kea_dh:
  ------------------
  |  Branch (904:9): [True: 949, False: 541]
  ------------------
  905|    949|            rv = tls13_ImportDHEKeyShare(peerKey,
  906|    949|                                         entry->key_exchange.data,
  907|    949|                                         entry->key_exchange.len,
  908|    949|                                         keyPair->pubKey);
  909|    949|            mechanism = CKM_DH_PKCS_DERIVE;
  ------------------
  |  |  759|    949|#define CKM_DH_PKCS_DERIVE 0x00000021UL
  ------------------
  910|    949|            keySize = peerKey->u.dh.publicValue.len;
  911|    949|            break;
  912|      0|        default:
  ------------------
  |  Branch (912:9): [True: 0, False: 1.49k]
  ------------------
  913|      0|            PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  914|      0|            goto loser;
  915|  1.49k|    }
  916|  1.49k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (916:9): [True: 10, False: 1.48k]
  ------------------
  917|     10|        goto loser;
  918|     10|    }
  919|       |
  920|  1.48k|    key = PK11_PubDeriveWithKDF(
  921|  1.48k|        keyPair->privKey, peerKey, PR_FALSE, NULL, NULL, mechanism,
  ------------------
  |  |  438|  1.48k|#define PR_FALSE 0
  ------------------
  922|  1.48k|        CKM_HKDF_DERIVE, CKA_DERIVE, keySize, CKD_NULL, NULL, NULL);
  ------------------
  |  | 1296|  1.48k|#define CKM_HKDF_DERIVE 0x0000402aUL
  ------------------
                      CKM_HKDF_DERIVE, CKA_DERIVE, keySize, CKD_NULL, NULL, NULL);
  ------------------
  |  |  555|  1.48k|#define CKA_DERIVE 0x0000010CUL
  ------------------
                      CKM_HKDF_DERIVE, CKA_DERIVE, keySize, CKD_NULL, NULL, NULL);
  ------------------
  |  | 1702|  1.48k|#define CKD_NULL 0x00000001UL
  ------------------
  923|  1.48k|    if (!key) {
  ------------------
  |  Branch (923:9): [True: 46, False: 1.43k]
  ------------------
  924|     46|        ssl_MapLowLevelError(SSL_ERROR_KEY_EXCHANGE_FAILURE);
  925|     46|        goto loser;
  926|     46|    }
  927|       |
  928|  1.43k|    *out = key;
  929|  1.43k|    PORT_DestroyCheapArena(&arena);
  930|  1.43k|    return SECSuccess;
  931|       |
  932|     56|loser:
  933|     56|    PORT_DestroyCheapArena(&arena);
  934|     56|    return SECFailure;
  935|  1.48k|}
SSLExp_SetCertificateCompressionAlgorithm:
 1107|  4.57k|{
 1108|  4.57k|    sslSocket *ss = ssl_FindSocket(fd);
 1109|  4.57k|    if (!ss) {
  ------------------
  |  Branch (1109:9): [True: 0, False: 4.57k]
  ------------------
 1110|      0|        return SECFailure; /* Code already set. */
 1111|      0|    }
 1112|       |
 1113|  4.57k|    ssl_GetSSL3HandshakeLock(ss);
  ------------------
  |  | 1407|  4.57k|    {                                                 \
  |  | 1408|  4.57k|        if (!ss->opt.noLocks) {                       \
  |  |  ------------------
  |  |  |  Branch (1408:13): [True: 4.57k, False: 0]
  |  |  ------------------
  |  | 1409|  4.57k|            PORT_Assert(!ssl_HaveXmitBufLock(ss));    \
  |  |  ------------------
  |  |  |  |  120|  4.57k|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|  4.57k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 4.57k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1410|  4.57k|            PZ_EnterMonitor((ss)->ssl3HandshakeLock); \
  |  |  ------------------
  |  |  |  |  256|  4.57k|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1411|  4.57k|        }                                             \
  |  | 1412|  4.57k|    }
  ------------------
 1114|  4.57k|    if (ss->ssl3.supportedCertCompressionAlgorithmsCount == MAX_SUPPORTED_CERTIFICATE_COMPRESSION_ALGS) {
  ------------------
  |  |  252|  4.57k|#define MAX_SUPPORTED_CERTIFICATE_COMPRESSION_ALGS 32
  ------------------
  |  Branch (1114:9): [True: 0, False: 4.57k]
  ------------------
 1115|      0|        goto loser;
 1116|      0|    }
 1117|       |
 1118|       |    /* Reserved ID */
 1119|  4.57k|    if (alg.id == 0) {
  ------------------
  |  Branch (1119:9): [True: 0, False: 4.57k]
  ------------------
 1120|      0|        goto loser;
 1121|      0|    }
 1122|       |
 1123|  4.57k|    if (alg.encode == NULL && alg.decode == NULL) {
  ------------------
  |  Branch (1123:9): [True: 0, False: 4.57k]
  |  Branch (1123:31): [True: 0, False: 0]
  ------------------
 1124|      0|        goto loser;
 1125|      0|    }
 1126|       |
 1127|       |    /* Checking that we have not yet registed an algorithm with the same ID. */
 1128|  4.57k|    for (int i = 0; i < ss->ssl3.supportedCertCompressionAlgorithmsCount; i++) {
  ------------------
  |  Branch (1128:21): [True: 0, False: 4.57k]
  ------------------
 1129|      0|        if (ss->ssl3.supportedCertCompressionAlgorithms[i].id == alg.id) {
  ------------------
  |  Branch (1129:13): [True: 0, False: 0]
  ------------------
 1130|      0|            goto loser;
 1131|      0|        }
 1132|      0|    }
 1133|       |
 1134|  4.57k|    PORT_Memcpy(&ss->ssl3.supportedCertCompressionAlgorithms
  ------------------
  |  |  180|  4.57k|#define PORT_Memcpy memcpy
  ------------------
 1135|  4.57k|                     [ss->ssl3.supportedCertCompressionAlgorithmsCount],
 1136|  4.57k|                &alg, sizeof(alg));
 1137|  4.57k|    ss->ssl3.supportedCertCompressionAlgorithmsCount += 1;
 1138|  4.57k|    ssl_ReleaseSSL3HandshakeLock(ss);
  ------------------
  |  | 1414|  4.57k|    {                                                \
  |  | 1415|  4.57k|        if (!ss->opt.noLocks)                        \
  |  |  ------------------
  |  |  |  Branch (1415:13): [True: 4.57k, False: 0]
  |  |  ------------------
  |  | 1416|  4.57k|            PZ_ExitMonitor((ss)->ssl3HandshakeLock); \
  |  |  ------------------
  |  |  |  |  257|  4.57k|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1417|  4.57k|    }
  ------------------
 1139|  4.57k|    return SECSuccess;
 1140|       |
 1141|      0|loser:
 1142|      0|    PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 1143|      0|    ssl_ReleaseSSL3HandshakeLock(ss);
  ------------------
  |  | 1414|      0|    {                                                \
  |  | 1415|      0|        if (!ss->opt.noLocks)                        \
  |  |  ------------------
  |  |  |  Branch (1415:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1416|      0|            PZ_ExitMonitor((ss)->ssl3HandshakeLock); \
  |  |  ------------------
  |  |  |  |  257|      0|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1417|      0|    }
  ------------------
 1144|      0|    return SECFailure;
 1145|  4.57k|}
tls13_HandlePostHelloHandshakeMessage:
 1293|     17|{
 1294|     17|    if (ss->sec.isServer && ss->ssl3.hs.zeroRttIgnore != ssl_0rtt_ignore_none) {
  ------------------
  |  Branch (1294:9): [True: 0, False: 17]
  |  Branch (1294:29): [True: 0, False: 0]
  ------------------
 1295|      0|        SSL_TRC(3, ("%d: TLS13[%d]: successfully decrypted handshake after "
  ------------------
  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    ssl_Trace b
  ------------------
 1296|      0|                    "failed 0-RTT",
 1297|      0|                    SSL_GETPID(), ss->fd));
 1298|      0|        ss->ssl3.hs.zeroRttIgnore = ssl_0rtt_ignore_none;
 1299|      0|    }
 1300|       |
 1301|       |    /* TODO(ekr@rtfm.com): Would it be better to check all the states here? */
 1302|     17|    switch (ss->ssl3.hs.msg_type) {
 1303|      2|        case ssl_hs_certificate:
  ------------------
  |  Branch (1303:9): [True: 2, False: 15]
  ------------------
 1304|      2|            return tls13_HandleCertificate(ss, b, length, PR_FALSE);
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
 1305|      2|        case ssl_hs_compressed_certificate:
  ------------------
  |  Branch (1305:9): [True: 2, False: 15]
  ------------------
 1306|      2|            return tls13_HandleCertificateDecode(ss, b, length);
 1307|      2|        case ssl_hs_certificate_request:
  ------------------
  |  Branch (1307:9): [True: 2, False: 15]
  ------------------
 1308|      2|            return tls13_HandleCertificateRequest(ss, b, length);
 1309|       |
 1310|      2|        case ssl_hs_certificate_verify:
  ------------------
  |  Branch (1310:9): [True: 2, False: 15]
  ------------------
 1311|      2|            return tls13_HandleCertificateVerify(ss, b, length);
 1312|       |
 1313|      2|        case ssl_hs_encrypted_extensions:
  ------------------
  |  Branch (1313:9): [True: 2, False: 15]
  ------------------
 1314|      2|            return tls13_HandleEncryptedExtensions(ss, b, length);
 1315|       |
 1316|      1|        case ssl_hs_new_session_ticket:
  ------------------
  |  Branch (1316:9): [True: 1, False: 16]
  ------------------
 1317|      1|            return tls13_HandleNewSessionTicket(ss, b, length);
 1318|       |
 1319|      2|        case ssl_hs_finished:
  ------------------
  |  Branch (1319:9): [True: 2, False: 15]
  ------------------
 1320|      2|            if (ss->sec.isServer) {
  ------------------
  |  Branch (1320:17): [True: 0, False: 2]
  ------------------
 1321|      0|                return tls13_ServerHandleFinished(ss, b, length);
 1322|      2|            } else {
 1323|      2|                return tls13_ClientHandleFinished(ss, b, length);
 1324|      2|            }
 1325|       |
 1326|      1|        case ssl_hs_end_of_early_data:
  ------------------
  |  Branch (1326:9): [True: 1, False: 16]
  ------------------
 1327|      1|            return tls13_HandleEndOfEarlyData(ss, b, length);
 1328|       |
 1329|      2|        case ssl_hs_key_update:
  ------------------
  |  Branch (1329:9): [True: 2, False: 15]
  ------------------
 1330|      2|            return tls13_HandleKeyUpdate(ss, b, length);
 1331|       |
 1332|      1|        default:
  ------------------
  |  Branch (1332:9): [True: 1, False: 16]
  ------------------
 1333|      1|            FATAL_ERROR(ss, SSL_ERROR_RX_UNKNOWN_HANDSHAKE, unexpected_message);
  ------------------
  |  |   22|      1|    do {                                     \
  |  |   23|      1|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      1|    do {                                                                           \
  |  |  |  |   15|      1|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      1|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      1|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      1|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      1|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      1|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      1|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      1|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      1|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1334|      1|            return SECFailure;
 1335|     17|    }
 1336|       |
 1337|      0|    PORT_Assert(0); /* Unreached */
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1338|      0|    return SECFailure;
 1339|     17|}
tls13_HandleHelloRetryRequest:
 2984|  1.29k|{
 2985|  1.29k|    SECStatus rv;
 2986|       |
 2987|  1.29k|    SSL_TRC(3, ("%d: TLS13[%d]: handle hello retry request",
  ------------------
  |  |   71|  1.29k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 1.29k]
  |  |  ------------------
  |  |   72|  1.29k|    ssl_Trace b
  ------------------
 2988|  1.29k|                SSL_GETPID(), ss->fd));
 2989|       |
 2990|  1.29k|    PORT_Assert(ss->opt.noLocks || ssl_HaveRecvBufLock(ss));
  ------------------
  |  |  120|  1.29k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.94k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 642, False: 649]
  |  |  |  |  |  Branch (208:7): [True: 649, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2991|  1.29k|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|  1.29k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.94k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 642, False: 649]
  |  |  |  |  |  Branch (208:7): [True: 649, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2992|       |
 2993|  1.29k|    if (ss->vrange.max < SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|  1.29k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (2993:9): [True: 0, False: 1.29k]
  ------------------
 2994|      0|        FATAL_ERROR(ss, SSL_ERROR_RX_UNEXPECTED_HELLO_RETRY_REQUEST,
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2995|      0|                    unexpected_message);
 2996|      0|        return SECFailure;
 2997|      0|    }
 2998|  1.29k|    PORT_Assert(ss->ssl3.hs.ws == wait_server_hello);
  ------------------
  |  |  120|  1.29k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.29k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.29k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2999|       |
 3000|  1.29k|    if (ss->ssl3.hs.zeroRttState == ssl_0rtt_sent) {
  ------------------
  |  Branch (3000:9): [True: 0, False: 1.29k]
  ------------------
 3001|      0|        ss->ssl3.hs.zeroRttState = ssl_0rtt_ignored;
 3002|       |        /* Restore the null cipher spec for writing. */
 3003|      0|        ssl_GetSpecWriteLock(ss);
  ------------------
  |  | 1435|      0|    {                                            \
  |  | 1436|      0|        if (!ss->opt.noLocks)                    \
  |  |  ------------------
  |  |  |  Branch (1436:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1437|      0|            NSSRWLock_LockWrite((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   48|      0|#define NSSRWLock_LockWrite NSSRWLock_LockWrite_Util
  |  |  ------------------
  |  | 1438|      0|    }
  ------------------
 3004|      0|        ssl_CipherSpecRelease(ss->ssl3.cwSpec);
 3005|      0|        ss->ssl3.cwSpec = ssl_FindCipherSpecByEpoch(ss, ssl_secret_write,
 3006|      0|                                                    TrafficKeyClearText);
 3007|      0|        PORT_Assert(ss->ssl3.cwSpec);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3008|      0|        ssl_ReleaseSpecWriteLock(ss);
  ------------------
  |  | 1440|      0|    {                                              \
  |  | 1441|      0|        if (!ss->opt.noLocks)                      \
  |  |  ------------------
  |  |  |  Branch (1441:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1442|      0|            NSSRWLock_UnlockWrite((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   51|      0|#define NSSRWLock_UnlockWrite NSSRWLock_UnlockWrite_Util
  |  |  ------------------
  |  | 1443|      0|    }
  ------------------
 3009|  1.29k|    } else {
 3010|  1.29k|        PORT_Assert(ss->ssl3.hs.zeroRttState == ssl_0rtt_none);
  ------------------
  |  |  120|  1.29k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.29k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.29k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3011|  1.29k|    }
 3012|       |    /* Set the spec version, because we want to send CH now with 0303 */
 3013|  1.29k|    tls13_SetSpecRecordVersion(ss, ss->ssl3.cwSpec);
 3014|       |
 3015|       |    /* Extensions must contain more than just supported_versions.  This will
 3016|       |     * ensure that a HelloRetryRequest isn't a no-op: we must have at least two
 3017|       |     * extensions, supported_versions plus one other.  That other must be one
 3018|       |     * that we understand and recognize as being valid for HelloRetryRequest,
 3019|       |     * and should alter our next Client Hello. */
 3020|  1.29k|    unsigned int requiredExtensions = 1;
 3021|       |    /* The ECH HRR extension is a no-op from the client's perspective. */
 3022|  1.29k|    if (ss->xtnData.ech) {
  ------------------
  |  Branch (3022:9): [True: 0, False: 1.29k]
  ------------------
 3023|      0|        requiredExtensions++;
 3024|      0|    }
 3025|  1.29k|    if (ssl_ListCount(&ss->ssl3.hs.remoteExtensions) <= requiredExtensions) {
  ------------------
  |  Branch (3025:9): [True: 1, False: 1.29k]
  ------------------
 3026|      1|        FATAL_ERROR(ss, SSL_ERROR_RX_MALFORMED_HELLO_RETRY_REQUEST,
  ------------------
  |  |   22|      1|    do {                                     \
  |  |   23|      1|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      1|    do {                                                                           \
  |  |  |  |   15|      1|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      1|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      1|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      1|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      1|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      1|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      1|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      1|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      1|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3027|      1|                    decode_error);
 3028|      1|        return SECFailure;
 3029|      1|    }
 3030|       |
 3031|  1.29k|    rv = ssl3_HandleParsedExtensions(ss, ssl_hs_hello_retry_request);
 3032|  1.29k|    ssl3_DestroyRemoteExtensions(&ss->ssl3.hs.remoteExtensions);
 3033|  1.29k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (3033:9): [True: 20, False: 1.27k]
  ------------------
 3034|     20|        return SECFailure; /* Error code set below */
 3035|     20|    }
 3036|  1.27k|    rv = tls13_MaybeHandleEchSignal(ss, savedMsg, savedLength, PR_TRUE);
  ------------------
  |  |  437|  1.27k|#define PR_TRUE 1
  ------------------
 3037|  1.27k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (3037:9): [True: 0, False: 1.27k]
  ------------------
 3038|      0|        return SECFailure;
 3039|      0|    }
 3040|  1.27k|    ss->ssl3.hs.helloRetry = PR_TRUE;
  ------------------
  |  |  437|  1.27k|#define PR_TRUE 1
  ------------------
 3041|  1.27k|    rv = tls13_ReinjectHandshakeTranscript(ss);
 3042|  1.27k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (3042:9): [True: 0, False: 1.27k]
  ------------------
 3043|      0|        return rv;
 3044|      0|    }
 3045|       |
 3046|  1.27k|    rv = ssl_HashHandshakeMessage(ss, ssl_hs_server_hello,
 3047|  1.27k|                                  savedMsg, savedLength);
 3048|  1.27k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (3048:9): [True: 0, False: 1.27k]
  ------------------
 3049|      0|        return SECFailure;
 3050|      0|    }
 3051|       |
 3052|  1.27k|    ssl_GetXmitBufLock(ss);
  ------------------
  |  | 1466|  1.27k|    {                                           \
  |  | 1467|  1.27k|        if (!ss->opt.noLocks)                   \
  |  |  ------------------
  |  |  |  Branch (1467:13): [True: 635, False: 635]
  |  |  ------------------
  |  | 1468|  1.27k|            PZ_EnterMonitor((ss)->xmitBufLock); \
  |  |  ------------------
  |  |  |  |  256|    635|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1469|  1.27k|    }
  ------------------
 3053|  1.27k|    if (ss->opt.enableTls13CompatMode && !IS_DTLS(ss) &&
  ------------------
  |  |  892|  1.93k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  ------------------
  |  Branch (3053:9): [True: 662, False: 608]
  |  Branch (3053:42): [True: 0, False: 662]
  ------------------
 3054|  1.27k|        ss->ssl3.hs.zeroRttState == ssl_0rtt_none) {
  ------------------
  |  Branch (3054:9): [True: 0, False: 0]
  ------------------
 3055|      0|        rv = ssl3_SendChangeCipherSpecsInt(ss);
 3056|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (3056:13): [True: 0, False: 0]
  ------------------
 3057|      0|            goto loser;
 3058|      0|        }
 3059|      0|    }
 3060|       |
 3061|  1.27k|    rv = ssl3_SendClientHello(ss, client_hello_retry);
 3062|  1.27k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (3062:9): [True: 0, False: 1.27k]
  ------------------
 3063|      0|        goto loser;
 3064|      0|    }
 3065|       |
 3066|  1.27k|    ssl_ReleaseXmitBufLock(ss);
  ------------------
  |  | 1471|  1.27k|    {                                          \
  |  | 1472|  1.27k|        if (!ss->opt.noLocks)                  \
  |  |  ------------------
  |  |  |  Branch (1472:13): [True: 635, False: 635]
  |  |  ------------------
  |  | 1473|  1.27k|            PZ_ExitMonitor((ss)->xmitBufLock); \
  |  |  ------------------
  |  |  |  |  257|    635|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1474|  1.27k|    }
  ------------------
 3067|  1.27k|    return SECSuccess;
 3068|       |
 3069|      0|loser:
 3070|      0|    ssl_ReleaseXmitBufLock(ss);
  ------------------
  |  | 1471|      0|    {                                          \
  |  | 1472|      0|        if (!ss->opt.noLocks)                  \
  |  |  ------------------
  |  |  |  Branch (1472:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1473|      0|            PZ_ExitMonitor((ss)->xmitBufLock); \
  |  |  ------------------
  |  |  |  |  257|      0|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1474|      0|    }
  ------------------
 3071|      0|    return SECFailure;
 3072|  1.27k|}
tls13_HandleServerHelloPart2:
 3428|  1.51k|{
 3429|  1.51k|    SECStatus rv;
 3430|  1.51k|    sslSessionID *sid = ss->sec.ci.sid;
 3431|  1.51k|    SSL3Statistics *ssl3stats = SSL_GetStatistics();
 3432|       |
 3433|  1.51k|    if (ssl3_ExtensionNegotiated(ss, ssl_tls13_pre_shared_key_xtn)) {
  ------------------
  |  Branch (3433:9): [True: 9, False: 1.50k]
  ------------------
 3434|      9|        PORT_Assert(!PR_CLIST_IS_EMPTY(&ss->ssl3.hs.psks));
  ------------------
  |  |  120|      9|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      9|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 9, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3435|      9|        PORT_Assert(ss->xtnData.selectedPsk);
  ------------------
  |  |  120|      9|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      9|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 9, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3436|       |
 3437|      9|        if (ss->xtnData.selectedPsk->type != ssl_psk_resume) {
  ------------------
  |  Branch (3437:13): [True: 9, False: 0]
  ------------------
 3438|      9|            ss->statelessResume = PR_FALSE;
  ------------------
  |  |  438|      9|#define PR_FALSE 0
  ------------------
 3439|      9|        }
 3440|  1.50k|    } else {
 3441|       |        /* We may have offered a PSK. If the server didn't negotiate
 3442|       |         * it, clear this state to re-extract the Early Secret. */
 3443|  1.50k|        if (ss->ssl3.hs.currentSecret) {
  ------------------
  |  Branch (3443:13): [True: 753, False: 749]
  ------------------
 3444|       |            /* We might have dropped incompatible PSKs on HRR
 3445|       |             * (see RFC8466, Section 4.1.4). */
 3446|    753|            PORT_Assert(ss->ssl3.hs.helloRetry ||
  ------------------
  |  |  120|    753|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.03k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 474, False: 279]
  |  |  |  |  |  Branch (208:7): [True: 279, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3447|    753|                        ssl3_ExtensionAdvertised(ss, ssl_tls13_pre_shared_key_xtn));
 3448|    753|            PK11_FreeSymKey(ss->ssl3.hs.currentSecret);
 3449|    753|            ss->ssl3.hs.currentSecret = NULL;
 3450|    753|        }
 3451|  1.50k|        ss->statelessResume = PR_FALSE;
  ------------------
  |  |  438|  1.50k|#define PR_FALSE 0
  ------------------
 3452|  1.50k|        ss->xtnData.selectedPsk = NULL;
 3453|  1.50k|    }
 3454|       |
 3455|  1.51k|    if (ss->statelessResume) {
  ------------------
  |  Branch (3455:9): [True: 0, False: 1.51k]
  ------------------
 3456|      0|        PORT_Assert(sid->version >= SSL_LIBRARY_VERSION_TLS_1_3);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3457|      0|        if (tls13_GetHash(ss) !=
  ------------------
  |  Branch (3457:13): [True: 0, False: 0]
  ------------------
 3458|      0|            tls13_GetHashForCipherSuite(sid->u.ssl3.cipherSuite)) {
 3459|      0|            FATAL_ERROR(ss, SSL_ERROR_RX_MALFORMED_SERVER_HELLO,
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3460|      0|                        illegal_parameter);
 3461|      0|            return SECFailure;
 3462|      0|        }
 3463|      0|    }
 3464|       |
 3465|       |    /* Now create a synthetic kea_def that we can tweak. */
 3466|  1.51k|    ss->ssl3.hs.kea_def_mutable = *ss->ssl3.hs.kea_def;
 3467|  1.51k|    ss->ssl3.hs.kea_def = &ss->ssl3.hs.kea_def_mutable;
 3468|       |
 3469|  1.51k|    if (ss->xtnData.selectedPsk) {
  ------------------
  |  Branch (3469:9): [True: 9, False: 1.50k]
  ------------------
 3470|      9|        ss->ssl3.hs.kea_def_mutable.authKeyType = ssl_auth_psk;
 3471|      9|        if (ss->statelessResume) {
  ------------------
  |  Branch (3471:13): [True: 0, False: 9]
  ------------------
 3472|      0|            tls13_RestoreCipherInfo(ss, sid);
 3473|      0|            if (sid->peerCert) {
  ------------------
  |  Branch (3473:17): [True: 0, False: 0]
  ------------------
 3474|      0|                ss->sec.peerCert = CERT_DupCertificate(sid->peerCert);
 3475|      0|            }
 3476|       |
 3477|      0|            SSL_AtomicIncrementLong(&ssl3stats->hsh_sid_cache_hits);
 3478|      0|            SSL_AtomicIncrementLong(&ssl3stats->hsh_sid_stateless_resumes);
 3479|      9|        } else {
 3480|      9|            ss->sec.authType = ssl_auth_psk;
 3481|      9|        }
 3482|  1.50k|    } else {
 3483|  1.50k|        if (ss->statelessResume &&
  ------------------
  |  Branch (3483:13): [True: 0, False: 1.50k]
  ------------------
 3484|  1.50k|            ssl3_ExtensionAdvertised(ss, ssl_tls13_pre_shared_key_xtn)) {
  ------------------
  |  Branch (3484:13): [True: 0, False: 0]
  ------------------
 3485|      0|            SSL_AtomicIncrementLong(&ssl3stats->hsh_sid_cache_misses);
 3486|      0|        }
 3487|  1.50k|        if (sid->cached == in_client_cache) {
  ------------------
  |  Branch (3487:13): [True: 0, False: 1.50k]
  ------------------
 3488|       |            /* If we tried to resume and failed, let's not try again. */
 3489|      0|            ssl_UncacheSessionID(ss);
 3490|      0|        }
 3491|  1.50k|    }
 3492|       |
 3493|       |    /* Discard current SID and make a new one, though it may eventually
 3494|       |     * end up looking a lot like the old one.
 3495|       |     */
 3496|  1.51k|    ssl_FreeSID(sid);
 3497|  1.51k|    ss->sec.ci.sid = sid = ssl3_NewSessionID(ss, PR_FALSE);
  ------------------
  |  |  438|  1.51k|#define PR_FALSE 0
  ------------------
 3498|  1.51k|    if (sid == NULL) {
  ------------------
  |  Branch (3498:9): [True: 0, False: 1.51k]
  ------------------
 3499|      0|        FATAL_ERROR(ss, PORT_GetError(), internal_error);
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3500|      0|        return SECFailure;
 3501|      0|    }
 3502|  1.51k|    if (ss->statelessResume) {
  ------------------
  |  Branch (3502:9): [True: 0, False: 1.51k]
  ------------------
 3503|      0|        PORT_Assert(ss->sec.peerCert);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3504|      0|        sid->peerCert = CERT_DupCertificate(ss->sec.peerCert);
 3505|      0|    }
 3506|  1.51k|    sid->version = ss->version;
 3507|       |
 3508|  1.51k|    rv = tls13_HandleServerKeyShare(ss);
 3509|  1.51k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (3509:9): [True: 77, False: 1.43k]
  ------------------
 3510|     77|        return SECFailure;
 3511|     77|    }
 3512|       |
 3513|  1.43k|    rv = tls13_ComputeHandshakeSecret(ss);
 3514|  1.43k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (3514:9): [True: 0, False: 1.43k]
  ------------------
 3515|      0|        return SECFailure; /* error code is set. */
 3516|      0|    }
 3517|       |
 3518|  1.43k|    rv = tls13_MaybeHandleEchSignal(ss, savedMsg, savedLength, PR_FALSE);
  ------------------
  |  |  438|  1.43k|#define PR_FALSE 0
  ------------------
 3519|  1.43k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (3519:9): [True: 0, False: 1.43k]
  ------------------
 3520|      0|        return SECFailure; /* error code is set. */
 3521|      0|    }
 3522|       |
 3523|  1.43k|    rv = tls13_ComputeHandshakeSecrets(ss);
 3524|  1.43k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (3524:9): [True: 0, False: 1.43k]
  ------------------
 3525|      0|        return SECFailure; /* error code is set. */
 3526|      0|    }
 3527|       |
 3528|  1.43k|    if (ss->ssl3.hs.zeroRttState == ssl_0rtt_sent) {
  ------------------
  |  Branch (3528:9): [True: 0, False: 1.43k]
  ------------------
 3529|       |        /* When we send 0-RTT, we saved the null spec in case we needed it to
 3530|       |         * send another ClientHello in response to a HelloRetryRequest.  Now
 3531|       |         * that we won't be receiving a HelloRetryRequest, release the spec. */
 3532|      0|        ssl_CipherSpecReleaseByEpoch(ss, ssl_secret_write, TrafficKeyClearText);
 3533|      0|    }
 3534|       |
 3535|  1.43k|    rv = tls13_SetCipherSpec(ss, TrafficKeyHandshake,
 3536|  1.43k|                             ssl_secret_read, PR_FALSE);
  ------------------
  |  |  438|  1.43k|#define PR_FALSE 0
  ------------------
 3537|  1.43k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (3537:9): [True: 0, False: 1.43k]
  ------------------
 3538|      0|        FATAL_ERROR(ss, SSL_ERROR_INIT_CIPHER_SUITE_FAILURE, internal_error);
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3539|      0|        return SECFailure;
 3540|      0|    }
 3541|  1.43k|    TLS13_SET_HS_STATE(ss, wait_encrypted_extensions);
  ------------------
  |  |   37|  1.43k|    tls13_SetHsState(ss, ws, __func__, __FILE__, __LINE__)
  ------------------
 3542|       |
 3543|  1.43k|    return SECSuccess;
 3544|  1.43k|}
tls13_DeriveSecret:
 4367|  9.73k|{
 4368|  9.73k|    SECStatus rv;
 4369|       |
 4370|  9.73k|    rv = tls13_HkdfExpandLabel(key, hash, hashes->u.raw, hashes->len,
 4371|  9.73k|                               label, labelLen, CKM_HKDF_DERIVE,
  ------------------
  |  | 1296|  9.73k|#define CKM_HKDF_DERIVE 0x0000402aUL
  ------------------
 4372|  9.73k|                               tls13_GetHashSizeForHash(hash),
 4373|  9.73k|                               ss->protocolVariant, dest);
 4374|  9.73k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (4374:9): [True: 0, False: 9.73k]
  ------------------
 4375|      0|        LOG_ERROR(ss, SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   14|      0|    do {                                                                           \
  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  ------------------
  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|    ssl_Trace b
  |  |  ------------------
  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  ------------------
  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  ------------------
  |  |   18|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 4376|      0|        return SECFailure;
 4377|      0|    }
 4378|  9.73k|    return SECSuccess;
 4379|  9.73k|}
tls13_DeriveSecretNullHash:
 4388|  6.86k|{
 4389|  6.86k|    SSL3Hashes hashes;
 4390|  6.86k|    SECStatus rv;
 4391|  6.86k|    PRUint8 buf[] = { 0 };
 4392|       |
 4393|  6.86k|    rv = tls13_ComputeHash(ss, &hashes, buf, 0, hash);
 4394|  6.86k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (4394:9): [True: 0, False: 6.86k]
  ------------------
 4395|      0|        return SECFailure;
 4396|      0|    }
 4397|       |
 4398|  6.86k|    return tls13_DeriveSecret(ss, key, label, labelLen, &hashes, dest, hash);
 4399|  6.86k|}
tls13_SetSpecRecordVersion:
 4565|  4.48k|{
 4566|       |    /* Set the record version to pretend to be (D)TLS 1.2. */
 4567|  4.48k|    if (IS_DTLS(ss)) {
  ------------------
  |  |  892|  4.48k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 4.48k, False: 0]
  |  |  ------------------
  ------------------
 4568|  4.48k|        spec->recordVersion = SSL_LIBRARY_VERSION_DTLS_1_2_WIRE;
  ------------------
  |  |   33|  4.48k|#define SSL_LIBRARY_VERSION_DTLS_1_2_WIRE       ((~0x0102) & 0xffff)
  ------------------
 4569|  4.48k|    } else {
 4570|      0|        spec->recordVersion = SSL_LIBRARY_VERSION_TLS_1_2;
  ------------------
  |  |   20|      0|#define SSL_LIBRARY_VERSION_TLS_1_2             0x0303
  ------------------
 4571|      0|    }
 4572|  4.48k|    SSL_TRC(10, ("%d: TLS13[%d]: set spec=%d record version to 0x%04x",
  ------------------
  |  |   71|  4.48k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 4.48k]
  |  |  ------------------
  |  |   72|  4.48k|    ssl_Trace b
  ------------------
 4573|  4.48k|                 SSL_GETPID(), ss->fd, spec, spec->recordVersion));
 4574|  4.48k|}
tls13_SetAlertCipherSpec:
 4662|  4.64k|{
 4663|  4.64k|    SECStatus rv;
 4664|       |
 4665|  4.64k|    if (ss->sec.isServer) {
  ------------------
  |  Branch (4665:9): [True: 0, False: 4.64k]
  ------------------
 4666|      0|        return SECSuccess;
 4667|      0|    }
 4668|  4.64k|    if (ss->version < SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|  4.64k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (4668:9): [True: 4.20k, False: 439]
  ------------------
 4669|  4.20k|        return SECSuccess;
 4670|  4.20k|    }
 4671|    439|    if (TLS13_IN_HS_STATE(ss, wait_server_hello)) {
  ------------------
  |  |   44|    439|    tls13_InHsState(ss, __VA_ARGS__, wait_invalid)
  |  |  ------------------
  |  |  |  Branch (44:5): [True: 266, False: 173]
  |  |  ------------------
  ------------------
 4672|    266|        return SECSuccess;
 4673|    266|    }
 4674|    173|    if ((ss->ssl3.cwSpec->epoch != TrafficKeyClearText) &&
  ------------------
  |  Branch (4674:9): [True: 0, False: 173]
  ------------------
 4675|    173|        (ss->ssl3.cwSpec->epoch != TrafficKeyEarlyApplicationData)) {
  ------------------
  |  Branch (4675:9): [True: 0, False: 0]
  ------------------
 4676|      0|        return SECSuccess;
 4677|      0|    }
 4678|       |
 4679|    173|    rv = tls13_SetCipherSpec(ss, TrafficKeyHandshake,
 4680|    173|                             ssl_secret_write, PR_FALSE);
  ------------------
  |  |  438|    173|#define PR_FALSE 0
  ------------------
 4681|    173|    if (rv != SECSuccess) {
  ------------------
  |  Branch (4681:9): [True: 0, False: 173]
  ------------------
 4682|      0|        PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 4683|      0|        return SECFailure;
 4684|      0|    }
 4685|    173|    return SECSuccess;
 4686|    173|}
tls13_ComputeHandshakeHashes:
 4757|  2.86k|{
 4758|  2.86k|    SECStatus rv;
 4759|  2.86k|    PK11Context *ctx = NULL;
 4760|  2.86k|    PRBool useEchInner;
 4761|  2.86k|    sslBuffer *transcript;
 4762|       |
 4763|  2.86k|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|  2.86k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  4.25k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 1.48k, False: 1.38k]
  |  |  |  |  |  Branch (208:7): [True: 1.38k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4764|  2.86k|    if (ss->ssl3.hs.hashType == handshake_hash_unknown) {
  ------------------
  |  Branch (4764:9): [True: 0, False: 2.86k]
  ------------------
 4765|       |        /* Backup: if we haven't done any hashing, then hash now.
 4766|       |         * This happens when we are doing 0-RTT on the client. */
 4767|      0|        ctx = PK11_CreateDigestContext(ssl3_HashTypeToOID(tls13_GetHash(ss)));
 4768|      0|        if (!ctx) {
  ------------------
  |  Branch (4768:13): [True: 0, False: 0]
  ------------------
 4769|      0|            ssl_MapLowLevelError(SSL_ERROR_SHA_DIGEST_FAILURE);
 4770|      0|            return SECFailure;
 4771|      0|        }
 4772|       |
 4773|      0|        if (PK11_DigestBegin(ctx) != SECSuccess) {
  ------------------
  |  Branch (4773:13): [True: 0, False: 0]
  ------------------
 4774|      0|            ssl_MapLowLevelError(SSL_ERROR_SHA_DIGEST_FAILURE);
 4775|      0|            goto loser;
 4776|      0|        }
 4777|       |
 4778|       |        /* One might expect this to use ss->ssl3.hs.echAccepted,
 4779|       |         * but with 0-RTT we don't know that yet. */
 4780|      0|        useEchInner = ss->sec.isServer ? PR_FALSE : !!ss->ssl3.hs.echHpkeCtx;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  |  Branch (4780:23): [True: 0, False: 0]
  ------------------
 4781|      0|        transcript = useEchInner ? &ss->ssl3.hs.echInnerMessages : &ss->ssl3.hs.messages;
  ------------------
  |  Branch (4781:22): [True: 0, False: 0]
  ------------------
 4782|       |
 4783|      0|        PRINT_BUF(10, (ss, "Handshake hash computed over saved messages",
  ------------------
  |  |   74|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   75|      0|    ssl_PrintBuf b
  ------------------
 4784|      0|                       transcript->buf,
 4785|      0|                       transcript->len));
 4786|       |
 4787|      0|        if (PK11_DigestOp(ctx,
  ------------------
  |  Branch (4787:13): [True: 0, False: 0]
  ------------------
 4788|      0|                          transcript->buf,
 4789|      0|                          transcript->len) != SECSuccess) {
 4790|      0|            ssl_MapLowLevelError(SSL_ERROR_SHA_DIGEST_FAILURE);
 4791|      0|            goto loser;
 4792|      0|        }
 4793|  2.86k|    } else {
 4794|  2.86k|        if (ss->firstHsDone) {
  ------------------
  |  Branch (4794:13): [True: 0, False: 2.86k]
  ------------------
 4795|      0|            ctx = PK11_CloneContext(ss->ssl3.hs.shaPostHandshake);
 4796|  2.86k|        } else {
 4797|  2.86k|            ctx = PK11_CloneContext(ss->ssl3.hs.sha);
 4798|  2.86k|        }
 4799|  2.86k|        if (!ctx) {
  ------------------
  |  Branch (4799:13): [True: 0, False: 2.86k]
  ------------------
 4800|      0|            ssl_MapLowLevelError(SSL_ERROR_SHA_DIGEST_FAILURE);
 4801|      0|            return SECFailure;
 4802|      0|        }
 4803|  2.86k|    }
 4804|       |
 4805|  2.86k|    rv = PK11_DigestFinal(ctx, hashes->u.raw,
 4806|  2.86k|                          &hashes->len,
 4807|  2.86k|                          sizeof(hashes->u.raw));
 4808|  2.86k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (4808:9): [True: 0, False: 2.86k]
  ------------------
 4809|      0|        ssl_MapLowLevelError(SSL_ERROR_DIGEST_FAILURE);
 4810|      0|        goto loser;
 4811|      0|    }
 4812|       |
 4813|  2.86k|    PRINT_BUF(10, (ss, "Handshake hash", hashes->u.raw, hashes->len));
  ------------------
  |  |   74|  2.86k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 2.86k]
  |  |  ------------------
  |  |   75|  2.86k|    ssl_PrintBuf b
  ------------------
 4814|  2.86k|    PORT_Assert(hashes->len == tls13_GetHashSize(ss));
  ------------------
  |  |  120|  2.86k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  2.86k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 2.86k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4815|  2.86k|    PK11_DestroyContext(ctx, PR_TRUE);
  ------------------
  |  |  437|  2.86k|#define PR_TRUE 1
  ------------------
 4816|       |
 4817|  2.86k|    return SECSuccess;
 4818|       |
 4819|      0|loser:
 4820|      0|    PK11_DestroyContext(ctx, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 4821|      0|    return SECFailure;
 4822|  2.86k|}
tls13_DestroyKeyShareEntry:
 4845|  1.54k|{
 4846|  1.54k|    if (!offer) {
  ------------------
  |  Branch (4846:9): [True: 28, False: 1.51k]
  ------------------
 4847|     28|        return;
 4848|     28|    }
 4849|  1.51k|    SECITEM_ZfreeItem(&offer->key_exchange, PR_FALSE);
  ------------------
  |  |  110|  1.51k|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                  SECITEM_ZfreeItem(&offer->key_exchange, PR_FALSE);
  ------------------
  |  |  438|  1.51k|#define PR_FALSE 0
  ------------------
 4850|  1.51k|    PORT_ZFree(offer, sizeof(*offer));
  ------------------
  |  |   75|  1.51k|#define PORT_ZFree PORT_ZFree_Util
  ------------------
 4851|  1.51k|}
tls13_DestroyKeyShares:
 4855|  39.0k|{
 4856|  39.0k|    PRCList *cur_p;
 4857|       |
 4858|       |    /* The list must be initialized. */
 4859|  39.0k|    PORT_Assert(PR_LIST_HEAD(list));
  ------------------
  |  |  120|  39.0k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  39.0k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 39.0k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4860|       |
 4861|  40.5k|    while (!PR_CLIST_IS_EMPTY(list)) {
  ------------------
  |  |   94|  40.5k|    ((_l)->next == (_l))
  ------------------
  |  Branch (4861:12): [True: 1.50k, False: 39.0k]
  ------------------
 4862|  1.50k|        cur_p = PR_LIST_TAIL(list);
  ------------------
  |  |   66|  1.50k|#define PR_LIST_TAIL(_l) (_l)->prev
  ------------------
 4863|  1.50k|        PR_REMOVE_LINK(cur_p);
  ------------------
  |  |   72|  1.50k|    PR_BEGIN_MACRO             \
  |  |  ------------------
  |  |  |  |  123|  1.50k|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |   73|  1.50k|    (_e)->prev->next = (_e)->next; \
  |  |   74|  1.50k|    (_e)->next->prev = (_e)->prev; \
  |  |   75|  1.50k|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|  1.50k|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4864|  1.50k|        tls13_DestroyKeyShareEntry((TLS13KeyShareEntry *)cur_p);
 4865|  1.50k|    }
 4866|  39.0k|}
tls13_DestroyEarlyData:
 4870|  9.36k|{
 4871|  9.36k|    PRCList *cur_p;
 4872|       |
 4873|  9.36k|    while (!PR_CLIST_IS_EMPTY(list)) {
  ------------------
  |  |   94|  9.36k|    ((_l)->next == (_l))
  ------------------
  |  Branch (4873:12): [True: 0, False: 9.36k]
  ------------------
 4874|      0|        TLS13EarlyData *msg;
 4875|       |
 4876|      0|        cur_p = PR_LIST_TAIL(list);
  ------------------
  |  |   66|      0|#define PR_LIST_TAIL(_l) (_l)->prev
  ------------------
 4877|      0|        msg = (TLS13EarlyData *)cur_p;
 4878|       |
 4879|      0|        PR_REMOVE_LINK(cur_p);
  ------------------
  |  |   72|      0|    PR_BEGIN_MACRO             \
  |  |  ------------------
  |  |  |  |  123|      0|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |   73|      0|    (_e)->prev->next = (_e)->next; \
  |  |   74|      0|    (_e)->next->prev = (_e)->prev; \
  |  |   75|      0|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|      0|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4880|      0|        SECITEM_ZfreeItem(&msg->data, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                      SECITEM_ZfreeItem(&msg->data, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 4881|      0|        PORT_ZFree(msg, sizeof(*msg));
  ------------------
  |  |   75|      0|#define PORT_ZFree PORT_ZFree_Util
  ------------------
 4882|      0|    }
 4883|  9.36k|}
tls13_SetupAeadIv:
 4932|    303|{
 4933|    303|    PORT_Memcpy(ivOut, ivIn, ivLen);
  ------------------
  |  |  180|    303|#define PORT_Memcpy memcpy
  ------------------
 4934|    303|    if (isDTLS && v < SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|    303|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (4934:9): [True: 303, False: 0]
  |  Branch (4934:19): [True: 130, False: 173]
  ------------------
 4935|       |        /* handle the tls 1.2 counter mode case, the epoc is copied
 4936|       |         * instead of xored. We accomplish this by clearing ivOut
 4937|       |         * before running xor. */
 4938|    130|        if (offset >= ivLen) {
  ------------------
  |  Branch (4938:13): [True: 130, False: 0]
  ------------------
 4939|    130|            ivOut[offset] = ivOut[offset + 1] = 0;
 4940|    130|        }
 4941|    130|        ivOut[offset] ^= (unsigned char)(epoch >> BPB) & 0xff;
  ------------------
  |  |  122|    130|#define BPB 8 /* Bits Per Byte */
  ------------------
 4942|    130|        ivOut[offset + 1] ^= (unsigned char)(epoch)&0xff;
 4943|    130|        offset += 2;
 4944|    130|    }
 4945|       |
 4946|    303|    return offset;
 4947|    303|}
tls13_AEAD:
 4968|  11.2k|{
 4969|  11.2k|    unsigned char *tag;
 4970|  11.2k|    unsigned char iv[MAX_IV_LENGTH];
 4971|  11.2k|    unsigned char tagbuf[HASH_LENGTH_MAX];
 4972|  11.2k|    SECStatus rv;
 4973|       |
 4974|       |    /* must have either context or the symKey set */
 4975|  11.2k|    if (!context) {
  ------------------
  |  Branch (4975:9): [True: 0, False: 11.2k]
  ------------------
 4976|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 4977|      0|        return SECFailure;
 4978|      0|    }
 4979|       |
 4980|  11.2k|    PORT_Assert(ivLen <= MAX_IV_LENGTH);
  ------------------
  |  |  120|  11.2k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  11.2k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 11.2k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4981|  11.2k|    PORT_Assert(tagLen <= HASH_LENGTH_MAX);
  ------------------
  |  |  120|  11.2k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  11.2k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 11.2k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4982|  11.2k|    if (!ivOut) {
  ------------------
  |  Branch (4982:9): [True: 10.9k, False: 303]
  ------------------
 4983|  10.9k|        ivOut = iv; /* caller doesn't need a returned, iv */
 4984|  10.9k|    }
 4985|       |
 4986|  11.2k|    if (ivGen == CKG_NO_GENERATE) {
  ------------------
  |  | 1991|  11.2k|#define CKG_NO_GENERATE 0x00000000UL
  ------------------
  |  Branch (4986:9): [True: 10.9k, False: 303]
  ------------------
 4987|  10.9k|        tls13_WriteNonce(ivIn, ivLen, nonceIn, nonceLen, ivOut, ivLen);
 4988|  10.9k|    } else if (ivIn != ivOut) {
  ------------------
  |  Branch (4988:16): [True: 0, False: 303]
  ------------------
 4989|      0|        PORT_Memcpy(ivOut, ivIn, ivLen);
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
 4990|      0|    }
 4991|  11.2k|    if (decrypt) {
  ------------------
  |  Branch (4991:9): [True: 10.9k, False: 303]
  ------------------
 4992|  10.9k|        inLen = inLen - tagLen;
 4993|  10.9k|        tag = (unsigned char *)in + inLen;
 4994|       |        /* tag is const on decrypt, but returned on encrypt */
 4995|  10.9k|    } else {
 4996|       |        /* tag is written to a separate buffer, then added to the end
 4997|       |         * of the actual output buffer. This allows output buffer to be larger
 4998|       |         * than the input buffer and everything still work */
 4999|    303|        tag = tagbuf;
 5000|    303|    }
 5001|  11.2k|    rv = PK11_AEADOp(context, ivGen, fixedbits, ivOut, ivLen, aad, aadLen,
 5002|  11.2k|                     out, (int *)outLen, maxout, tag, tagLen, in, inLen);
 5003|       |    /* on encrypt SSL always puts the tag at the end of the buffer */
 5004|  11.2k|    if ((rv == SECSuccess) && !(decrypt)) {
  ------------------
  |  Branch (5004:9): [True: 303, False: 10.9k]
  |  Branch (5004:31): [True: 303, False: 0]
  ------------------
 5005|    303|        unsigned int len = *outLen;
 5006|       |        /* make sure there is still space */
 5007|    303|        if (len + tagLen > maxout) {
  ------------------
  |  Branch (5007:13): [True: 0, False: 303]
  ------------------
 5008|      0|            PORT_SetError(SEC_ERROR_OUTPUT_LEN);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 5009|      0|            return SECFailure;
 5010|      0|        }
 5011|    303|        PORT_Memcpy(out + len, tag, tagLen);
  ------------------
  |  |  180|    303|#define PORT_Memcpy memcpy
  ------------------
 5012|    303|        *outLen += tagLen;
 5013|    303|    }
 5014|  11.2k|    return rv;
 5015|  11.2k|}
tls13_WriteExtensionsWithBinder:
 5471|  4.51k|{
 5472|  4.51k|    SSL3Hashes hashes;
 5473|  4.51k|    SECStatus rv;
 5474|       |
 5475|  4.51k|    PORT_Assert(!PR_CLIST_IS_EMPTY(&ss->ssl3.hs.psks));
  ------------------
  |  |  120|  4.51k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  4.51k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 4.51k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5476|  4.51k|    sslPsk *psk = (sslPsk *)PR_LIST_HEAD(&ss->ssl3.hs.psks);
  ------------------
  |  |   65|  4.51k|#define PR_LIST_HEAD(_l) (_l)->next
  ------------------
 5477|  4.51k|    unsigned int size = tls13_GetHashSizeForHash(psk->hash);
 5478|  4.51k|    unsigned int prefixLen = extensions->len - size - 3;
 5479|  4.51k|    unsigned int finishedLen;
 5480|       |
 5481|  4.51k|    PORT_Assert(extensions->len >= size + 3);
  ------------------
  |  |  120|  4.51k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  4.51k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 4.51k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5482|       |
 5483|  4.51k|    rv = sslBuffer_AppendNumber(chBuf, extensions->len, 2);
 5484|  4.51k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (5484:9): [True: 0, False: 4.51k]
  ------------------
 5485|      0|        return SECFailure;
 5486|      0|    }
 5487|       |
 5488|       |    /* Only write the extension up to the point before the binders.  Assume that
 5489|       |     * the pre_shared_key extension is at the end of the buffer.  Don't write
 5490|       |     * the binder, or the lengths that precede it (a 2 octet length for the list
 5491|       |     * of all binders, plus a 1 octet length for the binder length). */
 5492|  4.51k|    rv = sslBuffer_Append(chBuf, extensions->buf, prefixLen);
 5493|  4.51k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (5493:9): [True: 0, False: 4.51k]
  ------------------
 5494|      0|        return SECFailure;
 5495|      0|    }
 5496|       |
 5497|       |    /* Calculate the binder based on what has been written out. */
 5498|  4.51k|    rv = tls13_ComputePskBinderHash(ss, chBuf->buf, chBuf->len, &hashes, psk->hash);
 5499|  4.51k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (5499:9): [True: 0, False: 4.51k]
  ------------------
 5500|      0|        return SECFailure;
 5501|      0|    }
 5502|       |
 5503|       |    /* Write the binder into the extensions buffer, over the zeros we reserved
 5504|       |     * previously. This avoids an allocation and means that we don't need a
 5505|       |     * separate write for the extra bits that precede the binder. */
 5506|  4.51k|    PORT_Assert(psk->binderKey);
  ------------------
  |  |  120|  4.51k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  4.51k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 4.51k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5507|  4.51k|    rv = tls13_ComputeFinished(ss, psk->binderKey,
 5508|  4.51k|                               psk->hash, &hashes, PR_TRUE,
  ------------------
  |  |  437|  4.51k|#define PR_TRUE 1
  ------------------
 5509|  4.51k|                               extensions->buf + extensions->len - size,
 5510|  4.51k|                               &finishedLen, size);
 5511|  4.51k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (5511:9): [True: 0, False: 4.51k]
  ------------------
 5512|      0|        return SECFailure;
 5513|      0|    }
 5514|  4.51k|    PORT_Assert(finishedLen == size);
  ------------------
  |  |  120|  4.51k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  4.51k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 4.51k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5515|       |
 5516|       |    /* Write out the remainder of the extension. */
 5517|  4.51k|    rv = sslBuffer_Append(chBuf, extensions->buf + prefixLen,
 5518|  4.51k|                          extensions->len - prefixLen);
 5519|  4.51k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (5519:9): [True: 0, False: 4.51k]
  ------------------
 5520|      0|        return SECFailure;
 5521|      0|    }
 5522|       |
 5523|  4.51k|    return SECSuccess;
 5524|  4.51k|}
tls13_ExtensionStatus:
 6432|  5.81k|{
 6433|  5.81k|    unsigned int i;
 6434|       |
 6435|  5.81k|    PORT_Assert((message == ssl_hs_client_hello) ||
  ------------------
  |  |  120|  5.81k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  43.4k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 0, False: 5.81k]
  |  |  |  |  |  Branch (208:7): [True: 3.11k, False: 2.70k]
  |  |  |  |  |  Branch (208:7): [True: 2.70k, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6436|  5.81k|                (message == ssl_hs_server_hello) ||
 6437|  5.81k|                (message == ssl_hs_hello_retry_request) ||
 6438|  5.81k|                (message == ssl_hs_encrypted_extensions) ||
 6439|  5.81k|                (message == ssl_hs_new_session_ticket) ||
 6440|  5.81k|                (message == ssl_hs_certificate) ||
 6441|  5.81k|                (message == ssl_hs_certificate_request));
 6442|       |
 6443|  72.9k|    for (i = 0; i < PR_ARRAY_SIZE(KnownExtensions); i++) {
  ------------------
  |  |  167|  72.9k|#define PR_ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
  ------------------
  |  Branch (6443:17): [True: 72.9k, False: 1]
  ------------------
 6444|       |        /* Hacky check for message numbers > 30. */
 6445|  72.9k|        PORT_Assert(!(KnownExtensions[i].messages & (1U << 31)));
  ------------------
  |  |  120|  72.9k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  72.9k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 72.9k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6446|  72.9k|        if (KnownExtensions[i].ex_value == extension) {
  ------------------
  |  Branch (6446:13): [True: 5.81k, False: 67.1k]
  ------------------
 6447|  5.81k|            break;
 6448|  5.81k|        }
 6449|  72.9k|    }
 6450|  5.81k|    if (i >= PR_ARRAY_SIZE(KnownExtensions)) {
  ------------------
  |  |  167|  5.81k|#define PR_ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
  ------------------
  |  Branch (6450:9): [True: 1, False: 5.81k]
  ------------------
 6451|      1|        return tls13_extension_unknown;
 6452|      1|    }
 6453|       |
 6454|       |    /* Return "disallowed" if the message mask bit isn't set. */
 6455|  5.81k|    if (!(_M(message) & KnownExtensions[i].messages)) {
  ------------------
  |  | 6391|  5.81k|#define _M(a) (1 << PR_MIN(a, 31))
  |  |  ------------------
  |  |  |  |  158|  5.81k|#define PR_MIN(x,y)     ((x)<(y)?(x):(y))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (158:26): [True: 5.81k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (6455:9): [True: 5, False: 5.81k]
  ------------------
 6456|      5|        return tls13_extension_disallowed;
 6457|      5|    }
 6458|       |
 6459|  5.81k|    return tls13_extension_allowed;
 6460|  5.81k|}
tls13_ProtectRecord:
 6531|  10.9k|{
 6532|  10.9k|    const ssl3BulkCipherDef *cipher_def = cwSpec->cipherDef;
 6533|  10.9k|    const int tagLen = cipher_def->tag_size;
 6534|  10.9k|    SECStatus rv;
 6535|       |
 6536|  10.9k|    PORT_Assert(cwSpec->direction == ssl_secret_write);
  ------------------
  |  |  120|  10.9k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  10.9k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 10.9k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6537|  10.9k|    SSL_TRC(3, ("%d: TLS13[%d]: spec=%d epoch=%d (%s) protect 0x%0llx len=%u",
  ------------------
  |  |   71|  10.9k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 10.9k]
  |  |  ------------------
  |  |   72|  10.9k|    ssl_Trace b
  ------------------
 6538|  10.9k|                SSL_GETPID(), ss->fd, cwSpec, cwSpec->epoch, cwSpec->phase,
 6539|  10.9k|                cwSpec->nextSeqNum, contentLen));
 6540|       |
 6541|  10.9k|    if (contentLen + 1 + tagLen > SSL_BUFFER_SPACE(wrBuf)) {
  ------------------
  |  |   38|  10.9k|#define SSL_BUFFER_SPACE(b) ((b)->space - (b)->len)
  ------------------
  |  Branch (6541:9): [True: 0, False: 10.9k]
  ------------------
 6542|      0|        PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 6543|      0|        return SECFailure;
 6544|      0|    }
 6545|       |
 6546|       |    /* Copy the data into the wrBuf. We're going to encrypt in-place
 6547|       |     * in the AEAD branch anyway */
 6548|  10.9k|    PORT_Memcpy(SSL_BUFFER_NEXT(wrBuf), pIn, contentLen);
  ------------------
  |  |  180|  10.9k|#define PORT_Memcpy memcpy
  ------------------
                  PORT_Memcpy(SSL_BUFFER_NEXT(wrBuf), pIn, contentLen);
  ------------------
  |  |   37|  10.9k|#define SSL_BUFFER_NEXT(b) ((b)->buf + (b)->len)
  ------------------
 6549|       |
 6550|  10.9k|    if (cipher_def->calg == ssl_calg_null) {
  ------------------
  |  Branch (6550:9): [True: 10.7k, False: 173]
  ------------------
 6551|       |        /* Shortcut for plaintext */
 6552|  10.7k|        rv = sslBuffer_Skip(wrBuf, contentLen, NULL);
 6553|  10.7k|        PORT_Assert(rv == SECSuccess);
  ------------------
  |  |  120|  10.7k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  10.7k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 10.7k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6554|  10.7k|    } else {
 6555|    173|        PRUint8 hdr[13];
 6556|    173|        sslBuffer buf = SSL_BUFFER_FIXED(hdr, sizeof(hdr));
  ------------------
  |  |   27|    173|    {                               \
  |  |   28|    173|        b, 0, maxlen, PR_TRUE       \
  |  |  ------------------
  |  |  |  |  437|    173|#define PR_TRUE 1
  |  |  ------------------
  |  |   29|    173|    }
  ------------------
 6557|    173|        PRBool needsLength;
 6558|    173|        PRUint8 aad[21];
 6559|    173|        const int ivLen = cipher_def->iv_size + cipher_def->explicit_nonce_size;
 6560|    173|        unsigned int ivOffset = ivLen - sizeof(sslSequenceNumber);
 6561|    173|        unsigned char ivOut[MAX_IV_LENGTH];
 6562|       |
 6563|    173|        unsigned int aadLen;
 6564|    173|        unsigned int len;
 6565|       |
 6566|    173|        PORT_Assert(cipher_def->type == type_aead);
  ------------------
  |  |  120|    173|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    173|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 173, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6567|       |
 6568|       |        /* If the following condition holds, we can skip the padding logic for
 6569|       |         * DTLS 1.3 (4.2.3). This will be the case until we support a cipher
 6570|       |         * with tag length < 15B. */
 6571|    173|        PORT_Assert(tagLen + 1 /* cType */ >= 16);
  ------------------
  |  |  120|    173|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    173|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 173, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6572|       |
 6573|       |        /* Add the content type at the end. */
 6574|    173|        *(SSL_BUFFER_NEXT(wrBuf) + contentLen) = type;
  ------------------
  |  |   37|    173|#define SSL_BUFFER_NEXT(b) ((b)->buf + (b)->len)
  ------------------
 6575|       |
 6576|       |        /* Create the header (ugly that we have to do it twice). */
 6577|    173|        rv = ssl_InsertRecordHeader(ss, cwSpec, ssl_ct_application_data,
 6578|    173|                                    &buf, &needsLength);
 6579|    173|        if (rv != SECSuccess) {
  ------------------
  |  Branch (6579:13): [True: 0, False: 173]
  ------------------
 6580|      0|            return SECFailure;
 6581|      0|        }
 6582|    173|        if (needsLength) {
  ------------------
  |  Branch (6582:13): [True: 173, False: 0]
  ------------------
 6583|    173|            rv = sslBuffer_AppendNumber(&buf, contentLen + 1 + tagLen, 2);
 6584|    173|            if (rv != SECSuccess) {
  ------------------
  |  Branch (6584:17): [True: 0, False: 173]
  ------------------
 6585|      0|                return SECFailure;
 6586|      0|            }
 6587|    173|        }
 6588|    173|        rv = tls13_FormatAdditionalData(ss, SSL_BUFFER_BASE(&buf), SSL_BUFFER_LEN(&buf),
  ------------------
  |  |   35|    173|#define SSL_BUFFER_BASE(b) ((b)->buf)
  ------------------
                      rv = tls13_FormatAdditionalData(ss, SSL_BUFFER_BASE(&buf), SSL_BUFFER_LEN(&buf),
  ------------------
  |  |   36|    173|#define SSL_BUFFER_LEN(b) ((b)->len)
  ------------------
 6589|    173|                                        cwSpec->epoch, cwSpec->nextSeqNum,
 6590|    173|                                        aad, &aadLen, sizeof(aad));
 6591|    173|        if (rv != SECSuccess) {
  ------------------
  |  Branch (6591:13): [True: 0, False: 173]
  ------------------
 6592|      0|            return SECFailure;
 6593|      0|        }
 6594|       |        /* set up initial IV value */
 6595|    173|        ivOffset = tls13_SetupAeadIv(IS_DTLS(ss), cwSpec->version, ivOut, cwSpec->keyMaterial.iv,
  ------------------
  |  |  892|    173|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  ------------------
 6596|    173|                                     ivOffset, ivLen, cwSpec->epoch);
 6597|    173|        rv = tls13_AEAD(cwSpec->cipherContext, PR_FALSE,
  ------------------
  |  |  438|    173|#define PR_FALSE 0
  ------------------
 6598|    173|                        CKG_GENERATE_COUNTER_XOR, ivOffset * BPB,
  ------------------
  |  | 1995|    173|#define CKG_GENERATE_COUNTER_XOR 0x00000004UL
  ------------------
                                      CKG_GENERATE_COUNTER_XOR, ivOffset * BPB,
  ------------------
  |  |  122|    173|#define BPB 8 /* Bits Per Byte */
  ------------------
 6599|    173|                        ivOut, ivOut, ivLen,             /* iv */
 6600|    173|                        NULL, 0,                         /* nonce */
 6601|    173|                        aad + sizeof(sslSequenceNumber), /* aad */
 6602|    173|                        aadLen - sizeof(sslSequenceNumber),
 6603|    173|                        SSL_BUFFER_NEXT(wrBuf),  /* output  */
  ------------------
  |  |   37|    173|#define SSL_BUFFER_NEXT(b) ((b)->buf + (b)->len)
  ------------------
 6604|    173|                        &len,                    /* out len */
 6605|    173|                        SSL_BUFFER_SPACE(wrBuf), /* max out */
  ------------------
  |  |   38|    173|#define SSL_BUFFER_SPACE(b) ((b)->space - (b)->len)
  ------------------
 6606|    173|                        tagLen,
 6607|    173|                        SSL_BUFFER_NEXT(wrBuf), /* input */
  ------------------
  |  |   37|    173|#define SSL_BUFFER_NEXT(b) ((b)->buf + (b)->len)
  ------------------
 6608|    173|                        contentLen + 1);        /* input len */
 6609|    173|        if (rv != SECSuccess) {
  ------------------
  |  Branch (6609:13): [True: 0, False: 173]
  ------------------
 6610|      0|            PORT_SetError(SSL_ERROR_ENCRYPTION_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 6611|      0|            return SECFailure;
 6612|      0|        }
 6613|    173|        rv = sslBuffer_Skip(wrBuf, len, NULL);
 6614|    173|        PORT_Assert(rv == SECSuccess);
  ------------------
  |  |  120|    173|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    173|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 173, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6615|    173|    }
 6616|       |
 6617|  10.9k|    return SECSuccess;
 6618|  10.9k|}
tls13_UnprotectRecord:
 6636|  11.0k|{
 6637|  11.0k|    const ssl3BulkCipherDef *cipher_def = spec->cipherDef;
 6638|  11.0k|    const int ivLen = cipher_def->iv_size + cipher_def->explicit_nonce_size;
 6639|  11.0k|    const int tagLen = cipher_def->tag_size;
 6640|  11.0k|    const int innerTypeLen = 1;
 6641|       |
 6642|  11.0k|    PRUint8 aad[21];
 6643|  11.0k|    unsigned int aadLen;
 6644|  11.0k|    SECStatus rv;
 6645|       |
 6646|  11.0k|    *alert = bad_record_mac; /* Default alert for most issues. */
 6647|       |
 6648|  11.0k|    PORT_Assert(spec->direction == ssl_secret_read);
  ------------------
  |  |  120|  11.0k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  11.0k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 11.0k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6649|  11.0k|    SSL_TRC(3, ("%d: TLS13[%d]: spec=%d epoch=%d (%s) unprotect 0x%0llx len=%u",
  ------------------
  |  |   71|  11.0k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 11.0k]
  |  |  ------------------
  |  |   72|  11.0k|    ssl_Trace b
  ------------------
 6650|  11.0k|                SSL_GETPID(), ss->fd, spec, spec->epoch, spec->phase,
 6651|  11.0k|                cText->seqNum, cText->buf->len));
 6652|       |
 6653|       |    /* Verify that the outer content type is right.
 6654|       |     *
 6655|       |     * For the inner content type as well as lower TLS versions this is checked
 6656|       |     * in ssl3con.c/ssl3_HandleNonApllicationData().
 6657|       |     *
 6658|       |     * For DTLS 1.3 this is checked in ssl3gthr.c/dtls_GatherData(). DTLS drops
 6659|       |     * invalid records silently [RFC6347, Section 4.1.2.7].
 6660|       |     *
 6661|       |     * Also allow the DTLS short header in TLS 1.3. */
 6662|  11.0k|    if (!(cText->hdr[0] == ssl_ct_application_data ||
  ------------------
  |  Branch (6662:11): [True: 0, False: 11.0k]
  ------------------
 6663|  11.0k|          (IS_DTLS(ss) &&
  ------------------
  |  |  892|  22.1k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 11.0k, False: 0]
  |  |  ------------------
  ------------------
 6664|  11.0k|           ss->version >= SSL_LIBRARY_VERSION_TLS_1_3 &&
  ------------------
  |  |   21|  22.1k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (6664:12): [True: 11.0k, False: 0]
  ------------------
 6665|  11.0k|           (cText->hdr[0] & 0xe0) == 0x20))) {
  ------------------
  |  Branch (6665:12): [True: 10.5k, False: 538]
  ------------------
 6666|    538|        SSL_TRC(3,
  ------------------
  |  |   71|    538|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 538]
  |  |  ------------------
  |  |   72|    538|    ssl_Trace b
  ------------------
 6667|    538|                ("%d: TLS13[%d]: record has invalid exterior type=%2.2x",
 6668|    538|                 SSL_GETPID(), ss->fd, cText->hdr[0]));
 6669|    538|        PORT_SetError(SSL_ERROR_RX_UNEXPECTED_RECORD_TYPE);
  ------------------
  |  |   65|    538|#define PORT_SetError PORT_SetError_Util
  ------------------
 6670|    538|        *alert = unexpected_message;
 6671|    538|        return SECFailure;
 6672|    538|    }
 6673|       |
 6674|       |    /* We can perform this test in variable time because the record's total
 6675|       |     * length and the ciphersuite are both public knowledge. */
 6676|  10.5k|    if (cText->buf->len < tagLen) {
  ------------------
  |  Branch (6676:9): [True: 0, False: 10.5k]
  ------------------
 6677|      0|        SSL_TRC(3,
  ------------------
  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    ssl_Trace b
  ------------------
 6678|      0|                ("%d: TLS13[%d]: record too short to contain valid AEAD data",
 6679|      0|                 SSL_GETPID(), ss->fd));
 6680|      0|        PORT_SetError(SSL_ERROR_BAD_MAC_READ);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 6681|      0|        return SECFailure;
 6682|      0|    }
 6683|       |
 6684|       |    /* Check if the ciphertext can be valid if we assume maximum plaintext and
 6685|       |     * add the specific ciphersuite expansion.
 6686|       |     * This way we detect overlong plaintexts/padding before decryption.
 6687|       |     * This check enforces size limitations more strict than the RFC.
 6688|       |     * (see RFC8446, Section 5.2) */
 6689|  10.5k|    if (cText->buf->len > (spec->recordSizeLimit + innerTypeLen + tagLen)) {
  ------------------
  |  Branch (6689:9): [True: 13, False: 10.5k]
  ------------------
 6690|     13|        *alert = record_overflow;
 6691|     13|        PORT_SetError(SSL_ERROR_RX_RECORD_TOO_LONG);
  ------------------
  |  |   65|     13|#define PORT_SetError PORT_SetError_Util
  ------------------
 6692|     13|        return SECFailure;
 6693|     13|    }
 6694|       |
 6695|       |    /* Check the version number in the record. Stream only. */
 6696|  10.5k|    if (!IS_DTLS(ss)) {
  ------------------
  |  |  892|  10.5k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  ------------------
  |  Branch (6696:9): [True: 0, False: 10.5k]
  ------------------
 6697|      0|        SSL3ProtocolVersion version =
 6698|      0|            ((SSL3ProtocolVersion)cText->hdr[1] << 8) |
 6699|      0|            (SSL3ProtocolVersion)cText->hdr[2];
 6700|      0|        if (version != spec->recordVersion) {
  ------------------
  |  Branch (6700:13): [True: 0, False: 0]
  ------------------
 6701|       |            /* Do we need a better error here? */
 6702|      0|            SSL_TRC(3, ("%d: TLS13[%d]: record has bogus version",
  ------------------
  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    ssl_Trace b
  ------------------
 6703|      0|                        SSL_GETPID(), ss->fd));
 6704|      0|            return SECFailure;
 6705|      0|        }
 6706|      0|    }
 6707|       |
 6708|       |    /* Decrypt */
 6709|  10.5k|    PORT_Assert(cipher_def->type == type_aead);
  ------------------
  |  |  120|  10.5k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  10.5k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 10.5k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6710|  10.5k|    rv = tls13_FormatAdditionalData(ss, cText->hdr, cText->hdrLen,
 6711|  10.5k|                                    spec->epoch, cText->seqNum,
 6712|  10.5k|                                    aad, &aadLen, sizeof(aad));
 6713|  10.5k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (6713:9): [True: 0, False: 10.5k]
  ------------------
 6714|       |
 6715|      0|        return SECFailure;
 6716|      0|    }
 6717|  10.5k|    rv = tls13_AEAD(spec->cipherContext, PR_TRUE,
  ------------------
  |  |  437|  10.5k|#define PR_TRUE 1
  ------------------
 6718|  10.5k|                    CKG_NO_GENERATE, 0,                /* ignored for decrypt */
  ------------------
  |  | 1991|  10.5k|#define CKG_NO_GENERATE 0x00000000UL
  ------------------
 6719|  10.5k|                    spec->keyMaterial.iv, NULL, ivLen, /* iv */
 6720|  10.5k|                    aad, sizeof(sslSequenceNumber),    /* nonce */
 6721|  10.5k|                    aad + sizeof(sslSequenceNumber),   /* aad */
 6722|  10.5k|                    aadLen - sizeof(sslSequenceNumber),
 6723|  10.5k|                    plaintext->buf,   /* output  */
 6724|  10.5k|                    &plaintext->len,  /* outlen */
 6725|  10.5k|                    plaintext->space, /* maxout */
 6726|  10.5k|                    tagLen,
 6727|  10.5k|                    cText->buf->buf,  /* in */
 6728|  10.5k|                    cText->buf->len); /* inlen */
 6729|  10.5k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (6729:9): [True: 10.5k, False: 0]
  ------------------
 6730|  10.5k|        if (IS_DTLS(ss)) {
  ------------------
  |  |  892|  10.5k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 10.5k, False: 0]
  |  |  ------------------
  ------------------
 6731|  10.5k|            spec->deprotectionFailures++;
 6732|  10.5k|        }
 6733|       |
 6734|  10.5k|        SSL_TRC(3,
  ------------------
  |  |   71|  10.5k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 10.5k]
  |  |  ------------------
  |  |   72|  10.5k|    ssl_Trace b
  ------------------
 6735|  10.5k|                ("%d: TLS13[%d]: record has bogus MAC",
 6736|  10.5k|                 SSL_GETPID(), ss->fd));
 6737|  10.5k|        PORT_SetError(SSL_ERROR_BAD_MAC_READ);
  ------------------
  |  |   65|  10.5k|#define PORT_SetError PORT_SetError_Util
  ------------------
 6738|  10.5k|        return SECFailure;
 6739|  10.5k|    }
 6740|       |
 6741|       |    /* There is a similar test in ssl3_HandleRecord, but this test is needed to
 6742|       |     * account for padding. */
 6743|      0|    if (plaintext->len > spec->recordSizeLimit + innerTypeLen) {
  ------------------
  |  Branch (6743:9): [True: 0, False: 0]
  ------------------
 6744|      0|        *alert = record_overflow;
 6745|      0|        PORT_SetError(SSL_ERROR_RX_RECORD_TOO_LONG);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 6746|      0|        return SECFailure;
 6747|      0|    }
 6748|       |
 6749|       |    /* The record is right-padded with 0s, followed by the true
 6750|       |     * content type, so read from the right until we receive a
 6751|       |     * nonzero byte. */
 6752|      0|    while (plaintext->len > 0 && !(plaintext->buf[plaintext->len - 1])) {
  ------------------
  |  Branch (6752:12): [True: 0, False: 0]
  |  Branch (6752:34): [True: 0, False: 0]
  ------------------
 6753|      0|        --plaintext->len;
 6754|      0|    }
 6755|       |
 6756|       |    /* Bogus padding. */
 6757|      0|    if (plaintext->len < 1) {
  ------------------
  |  Branch (6757:9): [True: 0, False: 0]
  ------------------
 6758|      0|        SSL_TRC(3, ("%d: TLS13[%d]: empty record", SSL_GETPID(), ss->fd));
  ------------------
  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    ssl_Trace b
  ------------------
 6759|       |        /* It's safe to report this specifically because it happened
 6760|       |         * after the MAC has been verified. */
 6761|      0|        *alert = unexpected_message;
 6762|      0|        PORT_SetError(SSL_ERROR_BAD_BLOCK_PADDING);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 6763|      0|        return SECFailure;
 6764|      0|    }
 6765|       |
 6766|       |    /* Record the type. */
 6767|      0|    *innerType = (SSLContentType)plaintext->buf[plaintext->len - 1];
 6768|      0|    --plaintext->len;
 6769|       |
 6770|       |    /* Check for zero-length encrypted Alert and Handshake fragments
 6771|       |     * (zero-length + inner content type byte).
 6772|       |     *
 6773|       |     * Implementations MUST NOT send Handshake and Alert records that have a
 6774|       |     * zero-length TLSInnerPlaintext.content; if such a message is received,
 6775|       |     * the receiving implementation MUST terminate the connection with an
 6776|       |     * "unexpected_message" alert [RFC8446, Section 5.4]. */
 6777|      0|    if (!plaintext->len && ((!IS_DTLS(ss) && cText->hdr[0] == ssl_ct_application_data) ||
  ------------------
  |  |  892|      0|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  ------------------
  |  Branch (6777:9): [True: 0, False: 0]
  |  Branch (6777:30): [True: 0, False: 0]
  |  Branch (6777:46): [True: 0, False: 0]
  ------------------
 6778|      0|                            (IS_DTLS(ss) && dtls_IsDtls13Ciphertext(spec->version, cText->hdr[0])))) {
  ------------------
  |  |  892|      0|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (6778:45): [True: 0, False: 0]
  ------------------
 6779|      0|        switch (*innerType) {
 6780|      0|            case ssl_ct_alert:
  ------------------
  |  Branch (6780:13): [True: 0, False: 0]
  ------------------
 6781|      0|                *alert = unexpected_message;
 6782|      0|                PORT_SetError(SSL_ERROR_RX_MALFORMED_ALERT);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 6783|      0|                return SECFailure;
 6784|      0|            case ssl_ct_handshake:
  ------------------
  |  Branch (6784:13): [True: 0, False: 0]
  ------------------
 6785|      0|                *alert = unexpected_message;
 6786|      0|                PORT_SetError(SSL_ERROR_RX_MALFORMED_HANDSHAKE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 6787|      0|                return SECFailure;
 6788|      0|            default:
  ------------------
  |  Branch (6788:13): [True: 0, False: 0]
  ------------------
 6789|      0|                break;
 6790|      0|        }
 6791|      0|    }
 6792|       |
 6793|       |    /* Check that we haven't received too much 0-RTT data. */
 6794|      0|    if (spec->epoch == TrafficKeyEarlyApplicationData &&
  ------------------
  |  Branch (6794:9): [True: 0, False: 0]
  ------------------
 6795|      0|        *innerType == ssl_ct_application_data) {
  ------------------
  |  Branch (6795:9): [True: 0, False: 0]
  ------------------
 6796|      0|        if (plaintext->len > spec->earlyDataRemaining) {
  ------------------
  |  Branch (6796:13): [True: 0, False: 0]
  ------------------
 6797|      0|            *alert = unexpected_message;
 6798|      0|            PORT_SetError(SSL_ERROR_TOO_MUCH_EARLY_DATA);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 6799|      0|            return SECFailure;
 6800|      0|        }
 6801|      0|        spec->earlyDataRemaining -= plaintext->len;
 6802|      0|    }
 6803|       |
 6804|      0|    SSL_TRC(10,
  ------------------
  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    ssl_Trace b
  |  |  ------------------
  |  |  |  Branch (72:15): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 6805|      0|            ("%d: TLS13[%d]: %s received record of length=%d, type=%d",
 6806|      0|             SSL_GETPID(), ss->fd, SSL_ROLE(ss), plaintext->len, *innerType));
 6807|       |
 6808|      0|    return SECSuccess;
 6809|      0|}
tls13_ClientAllow0Rtt:
 6826|  11.0k|{
 6827|       |    /* We checked that the cipher suite was still allowed back in
 6828|       |     * ssl3_SendClientHello. */
 6829|  11.0k|    if (sid->version < SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|  11.0k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (6829:9): [True: 1.47k, False: 9.52k]
  ------------------
 6830|  1.47k|        return PR_FALSE;
  ------------------
  |  |  438|  1.47k|#define PR_FALSE 0
  ------------------
 6831|  1.47k|    }
 6832|  9.52k|    if (ss->ssl3.hs.helloRetry) {
  ------------------
  |  Branch (6832:9): [True: 1.27k, False: 8.25k]
  ------------------
 6833|  1.27k|        return PR_FALSE;
  ------------------
  |  |  438|  1.27k|#define PR_FALSE 0
  ------------------
 6834|  1.27k|    }
 6835|  8.25k|    if (!ss->opt.enable0RttData) {
  ------------------
  |  Branch (6835:9): [True: 4.20k, False: 4.05k]
  ------------------
 6836|  4.20k|        return PR_FALSE;
  ------------------
  |  |  438|  4.20k|#define PR_FALSE 0
  ------------------
 6837|  4.20k|    }
 6838|  4.05k|    if (PR_CLIST_IS_EMPTY(&ss->ssl3.hs.psks)) {
  ------------------
  |  |   94|  4.05k|    ((_l)->next == (_l))
  |  |  ------------------
  |  |  |  Branch (94:5): [True: 1.86k, False: 2.18k]
  |  |  ------------------
  ------------------
 6839|  1.86k|        return PR_FALSE;
  ------------------
  |  |  438|  1.86k|#define PR_FALSE 0
  ------------------
 6840|  1.86k|    }
 6841|  2.18k|    sslPsk *psk = (sslPsk *)PR_LIST_HEAD(&ss->ssl3.hs.psks);
  ------------------
  |  |   65|  2.18k|#define PR_LIST_HEAD(_l) (_l)->next
  ------------------
 6842|       |
 6843|  2.18k|    if (psk->zeroRttSuite == TLS_NULL_WITH_NULL_NULL) {
  ------------------
  |  |   76|  2.18k|#define TLS_NULL_WITH_NULL_NULL                 0x0000
  ------------------
  |  Branch (6843:9): [True: 2.18k, False: 0]
  ------------------
 6844|  2.18k|        return PR_FALSE;
  ------------------
  |  |  438|  2.18k|#define PR_FALSE 0
  ------------------
 6845|  2.18k|    }
 6846|      0|    if (!psk->maxEarlyData) {
  ------------------
  |  Branch (6846:9): [True: 0, False: 0]
  ------------------
 6847|      0|        return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 6848|      0|    }
 6849|       |
 6850|      0|    if (psk->type == ssl_psk_external) {
  ------------------
  |  Branch (6850:9): [True: 0, False: 0]
  ------------------
 6851|      0|        return psk->hash == tls13_GetHashForCipherSuite(psk->zeroRttSuite);
 6852|      0|    }
 6853|      0|    if (psk->type == ssl_psk_resume) {
  ------------------
  |  Branch (6853:9): [True: 0, False: 0]
  ------------------
 6854|      0|        if (!ss->statelessResume)
  ------------------
  |  Branch (6854:13): [True: 0, False: 0]
  ------------------
 6855|      0|            return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 6856|      0|        if ((sid->u.ssl3.locked.sessionTicket.flags & ticket_allow_early_data) == 0)
  ------------------
  |  Branch (6856:13): [True: 0, False: 0]
  ------------------
 6857|      0|            return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 6858|      0|        return ssl_AlpnTagAllowed(ss, &sid->u.ssl3.alpnSelection);
 6859|      0|    }
 6860|      0|    PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6861|      0|    return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 6862|      0|}
tls13_MaybeDo0RTTHandshake:
 6866|  9.52k|{
 6867|  9.52k|    SECStatus rv;
 6868|       |
 6869|       |    /* Don't do anything if there is no early_data xtn, which means we're
 6870|       |     * not doing early data. */
 6871|  9.52k|    if (!ssl3_ExtensionAdvertised(ss, ssl_tls13_early_data_xtn)) {
  ------------------
  |  Branch (6871:9): [True: 9.52k, False: 0]
  ------------------
 6872|  9.52k|        return SECSuccess;
 6873|  9.52k|    }
 6874|       |
 6875|      0|    ss->ssl3.hs.zeroRttState = ssl_0rtt_sent;
 6876|      0|    ss->ssl3.hs.zeroRttSuite = ss->ssl3.hs.cipher_suite;
 6877|       |    /* Note: Reset the preliminary info here rather than just add 0-RTT.  We are
 6878|       |     * only guessing what might happen at this point.*/
 6879|      0|    ss->ssl3.hs.preliminaryInfo = ssl_preinfo_0rtt_cipher_suite;
  ------------------
  |  |  394|      0|#define ssl_preinfo_0rtt_cipher_suite (1U << 2)
  ------------------
 6880|       |
 6881|      0|    SSL_TRC(3, ("%d: TLS13[%d]: in 0-RTT mode", SSL_GETPID(), ss->fd));
  ------------------
  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    ssl_Trace b
  ------------------
 6882|       |
 6883|       |    /* Set the ALPN data as if it was negotiated. We check in the ServerHello
 6884|       |     * handler that the server negotiates the same value. */
 6885|      0|    if (ss->sec.ci.sid->u.ssl3.alpnSelection.len) {
  ------------------
  |  Branch (6885:9): [True: 0, False: 0]
  ------------------
 6886|      0|        ss->xtnData.nextProtoState = SSL_NEXT_PROTO_EARLY_VALUE;
 6887|      0|        rv = SECITEM_CopyItem(NULL, &ss->xtnData.nextProto,
  ------------------
  |  |  106|      0|#define SECITEM_CopyItem SECITEM_CopyItem_Util
  ------------------
 6888|      0|                              &ss->sec.ci.sid->u.ssl3.alpnSelection);
 6889|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (6889:13): [True: 0, False: 0]
  ------------------
 6890|      0|            return SECFailure;
 6891|      0|        }
 6892|      0|    }
 6893|       |
 6894|      0|    if (ss->opt.enableTls13CompatMode && !IS_DTLS(ss)) {
  ------------------
  |  |  892|      0|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  ------------------
  |  Branch (6894:9): [True: 0, False: 0]
  |  Branch (6894:42): [True: 0, False: 0]
  ------------------
 6895|       |        /* Pretend that this is a proper ChangeCipherSpec even though it is sent
 6896|       |         * before receiving the ServerHello. */
 6897|      0|        ssl_GetSpecWriteLock(ss);
  ------------------
  |  | 1435|      0|    {                                            \
  |  | 1436|      0|        if (!ss->opt.noLocks)                    \
  |  |  ------------------
  |  |  |  Branch (1436:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1437|      0|            NSSRWLock_LockWrite((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   48|      0|#define NSSRWLock_LockWrite NSSRWLock_LockWrite_Util
  |  |  ------------------
  |  | 1438|      0|    }
  ------------------
 6898|      0|        tls13_SetSpecRecordVersion(ss, ss->ssl3.cwSpec);
 6899|      0|        ssl_ReleaseSpecWriteLock(ss);
  ------------------
  |  | 1440|      0|    {                                              \
  |  | 1441|      0|        if (!ss->opt.noLocks)                      \
  |  |  ------------------
  |  |  |  Branch (1441:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1442|      0|            NSSRWLock_UnlockWrite((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   51|      0|#define NSSRWLock_UnlockWrite NSSRWLock_UnlockWrite_Util
  |  |  ------------------
  |  | 1443|      0|    }
  ------------------
 6900|      0|        ssl_GetXmitBufLock(ss);
  ------------------
  |  | 1466|      0|    {                                           \
  |  | 1467|      0|        if (!ss->opt.noLocks)                   \
  |  |  ------------------
  |  |  |  Branch (1467:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1468|      0|            PZ_EnterMonitor((ss)->xmitBufLock); \
  |  |  ------------------
  |  |  |  |  256|      0|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1469|      0|    }
  ------------------
 6901|      0|        rv = ssl3_SendChangeCipherSpecsInt(ss);
 6902|      0|        ssl_ReleaseXmitBufLock(ss);
  ------------------
  |  | 1471|      0|    {                                          \
  |  | 1472|      0|        if (!ss->opt.noLocks)                  \
  |  |  ------------------
  |  |  |  Branch (1472:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1473|      0|            PZ_ExitMonitor((ss)->xmitBufLock); \
  |  |  ------------------
  |  |  |  |  257|      0|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1474|      0|    }
  ------------------
 6903|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (6903:13): [True: 0, False: 0]
  ------------------
 6904|      0|            return SECFailure;
 6905|      0|        }
 6906|      0|    }
 6907|       |
 6908|       |    /* If we have any message that was saved for later hashing.
 6909|       |     * The updated hash is then used in tls13_DeriveEarlySecrets. */
 6910|      0|    rv = ssl3_MaybeUpdateHashWithSavedRecord(ss);
 6911|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (6911:9): [True: 0, False: 0]
  ------------------
 6912|      0|        return SECFailure;
 6913|      0|    }
 6914|       |
 6915|       |    /* If we're trying 0-RTT, derive from the first PSK */
 6916|      0|    PORT_Assert(!PR_CLIST_IS_EMPTY(&ss->ssl3.hs.psks) && !ss->xtnData.selectedPsk);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6917|      0|    ss->xtnData.selectedPsk = (sslPsk *)PR_LIST_HEAD(&ss->ssl3.hs.psks);
  ------------------
  |  |   65|      0|#define PR_LIST_HEAD(_l) (_l)->next
  ------------------
 6918|      0|    rv = tls13_DeriveEarlySecrets(ss);
 6919|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (6919:9): [True: 0, False: 0]
  ------------------
 6920|      0|        return SECFailure;
 6921|      0|    }
 6922|       |
 6923|       |    /* Save cwSpec in case we get a HelloRetryRequest and have to send another
 6924|       |     * ClientHello. */
 6925|      0|    ssl_CipherSpecAddRef(ss->ssl3.cwSpec);
 6926|       |
 6927|      0|    rv = tls13_SetCipherSpec(ss, TrafficKeyEarlyApplicationData,
 6928|      0|                             ssl_secret_write, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 6929|      0|    ss->xtnData.selectedPsk = NULL;
 6930|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (6930:9): [True: 0, False: 0]
  ------------------
 6931|      0|        return SECFailure;
 6932|      0|    }
 6933|       |
 6934|      0|    return SECSuccess;
 6935|      0|}
tls13_EncodeVersion:
 7090|  28.2k|{
 7091|  28.2k|    if (variant == ssl_variant_datagram) {
  ------------------
  |  Branch (7091:9): [True: 28.2k, False: 0]
  ------------------
 7092|  28.2k|        return dtls_TLSVersionToDTLSVersion(version);
 7093|  28.2k|    }
 7094|       |    /* Stream-variant encodings do not change. */
 7095|      0|    return (PRUint16)version;
 7096|  28.2k|}
tls13_ClientReadSupportedVersion:
 7100|  8.47k|{
 7101|  8.47k|    PRUint32 temp;
 7102|  8.47k|    TLSExtension *versionExtension;
 7103|  8.47k|    SECItem it;
 7104|  8.47k|    SECStatus rv;
 7105|       |
 7106|       |    /* Update the version based on the extension, as necessary. */
 7107|  8.47k|    versionExtension = ssl3_FindExtension(ss, ssl_tls13_supported_versions_xtn);
 7108|  8.47k|    if (!versionExtension) {
  ------------------
  |  Branch (7108:9): [True: 5.58k, False: 2.89k]
  ------------------
 7109|  5.58k|        return SECSuccess;
 7110|  5.58k|    }
 7111|       |
 7112|       |    /* Struct copy so we don't damage the extension. */
 7113|  2.89k|    it = versionExtension->data;
 7114|       |
 7115|  2.89k|    rv = ssl3_ConsumeHandshakeNumber(ss, &temp, 2, &it.data, &it.len);
 7116|  2.89k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (7116:9): [True: 1, False: 2.89k]
  ------------------
 7117|      1|        return SECFailure;
 7118|      1|    }
 7119|  2.89k|    if (it.len) {
  ------------------
  |  Branch (7119:9): [True: 1, False: 2.89k]
  ------------------
 7120|      1|        FATAL_ERROR(ss, SSL_ERROR_RX_MALFORMED_SERVER_HELLO, illegal_parameter);
  ------------------
  |  |   22|      1|    do {                                     \
  |  |   23|      1|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      1|    do {                                                                           \
  |  |  |  |   15|      1|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      1|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      1|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      1|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      1|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      1|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      1|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      1|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      1|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 7121|      1|        return SECFailure;
 7122|      1|    }
 7123|       |
 7124|  2.89k|    if (temp != tls13_EncodeVersion(SSL_LIBRARY_VERSION_TLS_1_3,
  ------------------
  |  |   21|  2.89k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (7124:9): [True: 13, False: 2.87k]
  ------------------
 7125|  2.89k|                                    ss->protocolVariant)) {
 7126|       |        /* You cannot negotiate < TLS 1.3 with supported_versions. */
 7127|     13|        FATAL_ERROR(ss, SSL_ERROR_RX_MALFORMED_SERVER_HELLO, illegal_parameter);
  ------------------
  |  |   22|     13|    do {                                     \
  |  |   23|     13|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|     13|    do {                                                                           \
  |  |  |  |   15|     13|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|     13|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 13]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|     13|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|     13|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|     13|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|     13|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|     13|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|     13|        tls13_FatalError(ss, prError, desc); \
  |  |   25|     13|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 7128|     13|        return SECFailure;
 7129|     13|    }
 7130|       |
 7131|       |    /* Any endpoint receiving a Hello message with...ServerHello.legacy_version
 7132|       |     * set to 0x0300 (SSL3) MUST abort the handshake with a "protocol_version"
 7133|       |     * alert. [RFC8446, Section D.5]
 7134|       |     *
 7135|       |     * The ServerHello.legacy_version is read into the ss->version field by
 7136|       |     * ssl_ClientReadVersion(). */
 7137|  2.87k|    if (ss->version == SSL_LIBRARY_VERSION_3_0) {
  ------------------
  |  |   17|  2.87k|#define SSL_LIBRARY_VERSION_3_0                 0x0300
  ------------------
  |  Branch (7137:9): [True: 0, False: 2.87k]
  ------------------
 7138|      0|        FATAL_ERROR(ss, SSL_ERROR_RX_MALFORMED_SERVER_HELLO, protocol_version);
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 7139|      0|        return SECFailure;
 7140|      0|    }
 7141|       |
 7142|  2.87k|    ss->version = SSL_LIBRARY_VERSION_TLS_1_3;
  ------------------
  |  |   21|  2.87k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
 7143|  2.87k|    return SECSuccess;
 7144|  2.87k|}
tls13_MaybeTls13:
 7197|  55.7k|{
 7198|  55.7k|    if (ss->version >= SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|  55.7k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (7198:9): [True: 8.85k, False: 46.9k]
  ------------------
 7199|  8.85k|        return PR_TRUE;
  ------------------
  |  |  437|  8.85k|#define PR_TRUE 1
  ------------------
 7200|  8.85k|    }
 7201|       |
 7202|  46.9k|    if (ss->vrange.max < SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|  46.9k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (7202:9): [True: 7.48k, False: 39.4k]
  ------------------
 7203|  7.48k|        return PR_FALSE;
  ------------------
  |  |  438|  7.48k|#define PR_FALSE 0
  ------------------
 7204|  7.48k|    }
 7205|       |
 7206|  39.4k|    if (!(ss->ssl3.hs.preliminaryInfo & ssl_preinfo_version)) {
  ------------------
  |  |  392|  39.4k|#define ssl_preinfo_version (1U << 0)
  ------------------
  |  Branch (7206:9): [True: 22.2k, False: 17.1k]
  ------------------
 7207|  22.2k|        return PR_TRUE;
  ------------------
  |  |  437|  22.2k|#define PR_TRUE 1
  ------------------
 7208|  22.2k|    }
 7209|       |
 7210|  17.1k|    return PR_FALSE;
  ------------------
  |  |  438|  17.1k|#define PR_FALSE 0
  ------------------
 7211|  39.4k|}
tls13_ClientGreaseSetup:
 7217|  7.97k|{
 7218|  7.97k|    if (!ss->opt.enableGrease) {
  ------------------
  |  Branch (7218:9): [True: 4.04k, False: 3.93k]
  ------------------
 7219|  4.04k|        return SECSuccess;
 7220|  4.04k|    }
 7221|       |
 7222|  3.93k|    PORT_Assert(ss->vrange.max >= SSL_LIBRARY_VERSION_TLS_1_3);
  ------------------
  |  |  120|  3.93k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  3.93k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 3.93k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7223|       |
 7224|  3.93k|    if (ss->ssl3.hs.grease) {
  ------------------
  |  Branch (7224:9): [True: 0, False: 3.93k]
  ------------------
 7225|      0|        return SECFailure;
 7226|      0|    }
 7227|  3.93k|    ss->ssl3.hs.grease = PORT_Alloc(sizeof(tls13ClientGrease));
  ------------------
  |  |   52|  3.93k|#define PORT_Alloc PORT_Alloc_Util
  ------------------
 7228|  3.93k|    if (!ss->ssl3.hs.grease) {
  ------------------
  |  Branch (7228:9): [True: 0, False: 3.93k]
  ------------------
 7229|      0|        return SECFailure;
 7230|      0|    }
 7231|       |
 7232|  3.93k|    tls13ClientGrease *grease = ss->ssl3.hs.grease;
 7233|       |    /* We require eight GREASE values and randoms. */
 7234|  3.93k|    PRUint8 random[8];
 7235|       |
 7236|       |    /* Generate random GREASE values. */
 7237|  3.93k|    if (PK11_GenerateRandom(random, sizeof(random)) != SECSuccess) {
  ------------------
  |  Branch (7237:9): [True: 0, False: 3.93k]
  ------------------
 7238|      0|        return SECFailure;
 7239|      0|    }
 7240|  31.4k|    for (size_t i = 0; i < PR_ARRAY_SIZE(grease->idx); i++) {
  ------------------
  |  |  167|  31.4k|#define PR_ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
  ------------------
  |  Branch (7240:24): [True: 27.5k, False: 3.93k]
  ------------------
 7241|  27.5k|        random[i] = ((random[i] & 0xf0) | 0x0a);
 7242|  27.5k|        grease->idx[i] = ((random[i] << 8) | random[i]);
 7243|  27.5k|    }
 7244|       |    /* Specific PskKeyExchangeMode GREASE value. */
 7245|  3.93k|    grease->pskKem = 0x0b + ((random[8 - 1] >> 5) * 0x1f);
 7246|       |
 7247|       |    /* Duplicate extensions are not allowed. */
 7248|  3.93k|    if (grease->idx[grease_extension1] == grease->idx[grease_extension2]) {
  ------------------
  |  Branch (7248:9): [True: 0, False: 3.93k]
  ------------------
 7249|      0|        grease->idx[grease_extension2] ^= 0x1010;
 7250|      0|    }
 7251|       |
 7252|  3.93k|    return SECSuccess;
 7253|  3.93k|}
tls13_ClientGreaseDestroy:
 7258|  18.7k|{
 7259|  18.7k|    if (ss->ssl3.hs.grease) {
  ------------------
  |  Branch (7259:9): [True: 3.93k, False: 14.7k]
  ------------------
 7260|  3.93k|        PORT_Free(ss->ssl3.hs.grease);
  ------------------
  |  |   60|  3.93k|#define PORT_Free PORT_Free_Util
  ------------------
 7261|  3.93k|        ss->ssl3.hs.grease = NULL;
 7262|  3.93k|    }
 7263|  18.7k|}
tls13_MaybeGreaseExtensionType:
 7287|   128k|{
 7288|   128k|    if (*exType != ssl_tls13_grease_xtn) {
  ------------------
  |  Branch (7288:9): [True: 118k, False: 9.53k]
  ------------------
 7289|   118k|        return SECSuccess;
 7290|   118k|    }
 7291|       |
 7292|  9.53k|    PR_ASSERT(ss->opt.enableGrease);
  ------------------
  |  |  208|  9.53k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 9.53k, False: 0]
  |  |  ------------------
  ------------------
 7293|  9.53k|    PR_ASSERT(message == ssl_hs_client_hello ||
  ------------------
  |  |  208|  9.53k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:7): [True: 9.53k, False: 0]
  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 7294|  9.53k|              message == ssl_hs_certificate_request);
 7295|       |
 7296|       |    /* GREASE ClientHello:
 7297|       |     * A client MAY select one or more GREASE extension values and
 7298|       |     * advertise them as extensions with varying length and contents
 7299|       |     * [RFC8701, Section 3.1]. */
 7300|  9.53k|    if (message == ssl_hs_client_hello) {
  ------------------
  |  Branch (7300:9): [True: 9.53k, False: 0]
  ------------------
 7301|  9.53k|        PR_ASSERT(ss->vrange.max >= SSL_LIBRARY_VERSION_TLS_1_3);
  ------------------
  |  |  208|  9.53k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 9.53k, False: 0]
  |  |  ------------------
  ------------------
 7302|       |        /* Check if the first GREASE extension was already added. */
 7303|  9.53k|        if (!ssl3_ExtensionAdvertised(ss, ss->ssl3.hs.grease->idx[grease_extension1])) {
  ------------------
  |  Branch (7303:13): [True: 4.76k, False: 4.76k]
  ------------------
 7304|  4.76k|            *exType = ss->ssl3.hs.grease->idx[grease_extension1];
 7305|  4.76k|        } else {
 7306|  4.76k|            *exType = ss->ssl3.hs.grease->idx[grease_extension2];
 7307|  4.76k|        }
 7308|  9.53k|    }
 7309|       |    /* GREASE CertificateRequest:
 7310|       |     * When sending a CertificateRequest in TLS 1.3, a server MAY behave as
 7311|       |     * follows: A server MAY select one or more GREASE extension values and
 7312|       |     * advertise them as extensions with varying length and contents
 7313|       |     * [RFC8701, Section 4.1]. */
 7314|      0|    else if (message == ssl_hs_certificate_request) {
  ------------------
  |  Branch (7314:14): [True: 0, False: 0]
  ------------------
 7315|      0|        PR_ASSERT(ss->version >= SSL_LIBRARY_VERSION_TLS_1_3);
  ------------------
  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 7316|       |        /* Get random grease extension type. */
 7317|      0|        SECStatus rv = tls13_RandomGreaseValue(exType);
 7318|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (7318:13): [True: 0, False: 0]
  ------------------
 7319|      0|            return SECFailure;
 7320|      0|        }
 7321|      0|    }
 7322|       |
 7323|  9.53k|    return SECSuccess;
 7324|  9.53k|}
tls13con.c:tls13_HandshakeState:
  150|  1.43k|{
  151|  1.43k|    switch (st) {
  152|      0|        STATE_CASE(idle_handshake);
  ------------------
  |  |  146|      0|    case a:           \
  |  |  ------------------
  |  |  |  Branch (146:5): [True: 0, False: 1.43k]
  |  |  ------------------
  |  |  147|      0|        return #a
  ------------------
  153|      0|        STATE_CASE(wait_client_hello);
  ------------------
  |  |  146|      0|    case a:           \
  |  |  ------------------
  |  |  |  Branch (146:5): [True: 0, False: 1.43k]
  |  |  ------------------
  |  |  147|      0|        return #a
  ------------------
  154|      0|        STATE_CASE(wait_end_of_early_data);
  ------------------
  |  |  146|      0|    case a:           \
  |  |  ------------------
  |  |  |  Branch (146:5): [True: 0, False: 1.43k]
  |  |  ------------------
  |  |  147|      0|        return #a
  ------------------
  155|      0|        STATE_CASE(wait_client_cert);
  ------------------
  |  |  146|      0|    case a:           \
  |  |  ------------------
  |  |  |  Branch (146:5): [True: 0, False: 1.43k]
  |  |  ------------------
  |  |  147|      0|        return #a
  ------------------
  156|      0|        STATE_CASE(wait_client_key);
  ------------------
  |  |  146|      0|    case a:           \
  |  |  ------------------
  |  |  |  Branch (146:5): [True: 0, False: 1.43k]
  |  |  ------------------
  |  |  147|      0|        return #a
  ------------------
  157|      0|        STATE_CASE(wait_cert_verify);
  ------------------
  |  |  146|      0|    case a:           \
  |  |  ------------------
  |  |  |  Branch (146:5): [True: 0, False: 1.43k]
  |  |  ------------------
  |  |  147|      0|        return #a
  ------------------
  158|      0|        STATE_CASE(wait_change_cipher);
  ------------------
  |  |  146|      0|    case a:           \
  |  |  ------------------
  |  |  |  Branch (146:5): [True: 0, False: 1.43k]
  |  |  ------------------
  |  |  147|      0|        return #a
  ------------------
  159|      0|        STATE_CASE(wait_finished);
  ------------------
  |  |  146|      0|    case a:           \
  |  |  ------------------
  |  |  |  Branch (146:5): [True: 0, False: 1.43k]
  |  |  ------------------
  |  |  147|      0|        return #a
  ------------------
  160|      0|        STATE_CASE(wait_server_hello);
  ------------------
  |  |  146|      0|    case a:           \
  |  |  ------------------
  |  |  |  Branch (146:5): [True: 0, False: 1.43k]
  |  |  ------------------
  |  |  147|      0|        return #a
  ------------------
  161|      0|        STATE_CASE(wait_certificate_status);
  ------------------
  |  |  146|      0|    case a:           \
  |  |  ------------------
  |  |  |  Branch (146:5): [True: 0, False: 1.43k]
  |  |  ------------------
  |  |  147|      0|        return #a
  ------------------
  162|      0|        STATE_CASE(wait_server_cert);
  ------------------
  |  |  146|      0|    case a:           \
  |  |  ------------------
  |  |  |  Branch (146:5): [True: 0, False: 1.43k]
  |  |  ------------------
  |  |  147|      0|        return #a
  ------------------
  163|      0|        STATE_CASE(wait_server_key);
  ------------------
  |  |  146|      0|    case a:           \
  |  |  ------------------
  |  |  |  Branch (146:5): [True: 0, False: 1.43k]
  |  |  ------------------
  |  |  147|      0|        return #a
  ------------------
  164|      0|        STATE_CASE(wait_cert_request);
  ------------------
  |  |  146|      0|    case a:           \
  |  |  ------------------
  |  |  |  Branch (146:5): [True: 0, False: 1.43k]
  |  |  ------------------
  |  |  147|      0|        return #a
  ------------------
  165|      0|        STATE_CASE(wait_hello_done);
  ------------------
  |  |  146|      0|    case a:           \
  |  |  ------------------
  |  |  |  Branch (146:5): [True: 0, False: 1.43k]
  |  |  ------------------
  |  |  147|      0|        return #a
  ------------------
  166|      0|        STATE_CASE(wait_new_session_ticket);
  ------------------
  |  |  146|      0|    case a:           \
  |  |  ------------------
  |  |  |  Branch (146:5): [True: 0, False: 1.43k]
  |  |  ------------------
  |  |  147|      0|        return #a
  ------------------
  167|  1.43k|        STATE_CASE(wait_encrypted_extensions);
  ------------------
  |  |  146|  1.43k|    case a:           \
  |  |  ------------------
  |  |  |  Branch (146:5): [True: 1.43k, False: 0]
  |  |  ------------------
  |  |  147|  1.43k|        return #a
  ------------------
  168|      0|        default:
  ------------------
  |  Branch (168:9): [True: 0, False: 1.43k]
  ------------------
  169|      0|            break;
  170|  1.43k|    }
  171|      0|    PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  172|      0|    return "unknown";
  173|  1.43k|}
tls13con.c:tls13_InHsStateV:
  205|    452|{
  206|    452|    SSL3WaitState ws;
  207|       |
  208|    642|    while ((ws = va_arg(ap, SSL3WaitState)) != wait_invalid) {
  ------------------
  |  Branch (208:12): [True: 456, False: 186]
  ------------------
  209|    456|        if (TLS13_WAIT_STATE(ws) == ss->ssl3.hs.ws) {
  ------------------
  |  |  180|    456|#define TLS13_WAIT_STATE(ws) (((ws == idle_handshake) || (ws == wait_server_hello)) ? ws : ws | TLS13_WAIT_STATE_MASK)
  |  |  ------------------
  |  |  |  |  176|    471|#define TLS13_WAIT_STATE_MASK 0x80
  |  |  ------------------
  |  |  |  Branch (180:32): [True: 2, False: 454]
  |  |  |  Branch (180:58): [True: 439, False: 15]
  |  |  ------------------
  ------------------
  |  Branch (209:13): [True: 266, False: 190]
  ------------------
  210|    266|            return PR_TRUE;
  ------------------
  |  |  437|    266|#define PR_TRUE 1
  ------------------
  211|    266|        }
  212|    456|    }
  213|    186|    return PR_FALSE;
  ------------------
  |  |  438|    186|#define PR_FALSE 0
  ------------------
  214|    452|}
tls13con.c:tls13_CreateKEMKeyPair:
  375|     40|{
  376|     40|    PORT_Assert(groupDef);
  ------------------
  |  |  120|     40|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|     40|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 40, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  377|       |
  378|     40|    sslKeyPair *keyPair = NULL;
  379|     40|    SECKEYPrivateKey *privKey = NULL;
  380|     40|    SECKEYPublicKey *pubKey = NULL;
  381|     40|    CK_MECHANISM_TYPE mechanism;
  382|     40|    CK_NSS_KEM_PARAMETER_SET_TYPE paramSet;
  383|       |
  384|     40|    switch (groupDef->name) {
  385|      0|        case ssl_grp_kem_xyber768d00:
  ------------------
  |  Branch (385:9): [True: 0, False: 40]
  ------------------
  386|      0|            mechanism = CKM_NSS_KYBER_KEY_PAIR_GEN;
  ------------------
  |  |  267|      0|#define CKM_NSS_KYBER_KEY_PAIR_GEN (CKM_NSS + 45)
  |  |  ------------------
  |  |  |  |  162|      0|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  387|      0|            paramSet = CKP_NSS_KYBER_768_ROUND3;
  ------------------
  |  |  301|      0|#define CKP_NSS_KYBER_768_ROUND3 (CKP_NSS + 1)
  |  |  ------------------
  |  |  |  |  300|      0|#define CKP_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|      0|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKP_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  388|      0|            break;
  389|     40|        case ssl_grp_kem_mlkem768x25519:
  ------------------
  |  Branch (389:9): [True: 40, False: 0]
  ------------------
  390|     40|            mechanism = CKM_NSS_ML_KEM_KEY_PAIR_GEN;
  ------------------
  |  |  277|     40|#define CKM_NSS_ML_KEM_KEY_PAIR_GEN (CKM_NSS + 48)
  |  |  ------------------
  |  |  |  |  162|     40|#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|     40|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     40|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  391|     40|            paramSet = CKP_NSS_ML_KEM_768;
  ------------------
  |  |  302|     40|#define CKP_NSS_ML_KEM_768 (CKP_NSS + 2)
  |  |  ------------------
  |  |  |  |  300|     40|#define CKP_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1309|     40|#define CKM_VENDOR_DEFINED 0x80000000UL
  |  |  |  |  ------------------
  |  |  |  |               #define CKP_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     40|#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  392|     40|            break;
  393|      0|        default:
  ------------------
  |  Branch (393:9): [True: 0, False: 40]
  ------------------
  394|      0|            PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  395|      0|            PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  396|      0|            return SECFailure;
  397|     40|    }
  398|       |
  399|     40|    PK11SlotInfo *slot = PK11_GetBestSlot(mechanism, ss->pkcs11PinArg);
  400|     40|    if (!slot) {
  ------------------
  |  Branch (400:9): [True: 0, False: 40]
  ------------------
  401|      0|        goto loser;
  402|      0|    }
  403|       |
  404|     40|    privKey = PK11_GenerateKeyPairWithOpFlags(slot, mechanism,
  405|     40|                                              &paramSet, &pubKey, PK11_ATTR_SESSION | PK11_ATTR_INSENSITIVE | PK11_ATTR_PUBLIC,
  ------------------
  |  |  195|     40|#define PK11_ATTR_SESSION 0x00000002L
  ------------------
                                                            &paramSet, &pubKey, PK11_ATTR_SESSION | PK11_ATTR_INSENSITIVE | PK11_ATTR_PUBLIC,
  ------------------
  |  |  261|     40|#define PK11_ATTR_INSENSITIVE 0x00000080L
  ------------------
                                                            &paramSet, &pubKey, PK11_ATTR_SESSION | PK11_ATTR_INSENSITIVE | PK11_ATTR_PUBLIC,
  ------------------
  |  |  217|     40|#define PK11_ATTR_PUBLIC 0x00000008L
  ------------------
  406|     40|                                              CKF_DERIVE, CKF_DERIVE, ss->pkcs11PinArg);
  ------------------
  |  | 1364|     40|#define CKF_DERIVE 0x00080000UL
  ------------------
                                                            CKF_DERIVE, CKF_DERIVE, ss->pkcs11PinArg);
  ------------------
  |  | 1364|     40|#define CKF_DERIVE 0x00080000UL
  ------------------
  407|       |
  408|     40|    if (!privKey) {
  ------------------
  |  Branch (408:9): [True: 0, False: 40]
  ------------------
  409|      0|        privKey = PK11_GenerateKeyPairWithOpFlags(slot, mechanism,
  410|      0|                                                  &paramSet, &pubKey, PK11_ATTR_SESSION | PK11_ATTR_SENSITIVE | PK11_ATTR_PRIVATE,
  ------------------
  |  |  195|      0|#define PK11_ATTR_SESSION 0x00000002L
  ------------------
                                                                &paramSet, &pubKey, PK11_ATTR_SESSION | PK11_ATTR_SENSITIVE | PK11_ATTR_PRIVATE,
  ------------------
  |  |  260|      0|#define PK11_ATTR_SENSITIVE 0x00000040L
  ------------------
                                                                &paramSet, &pubKey, PK11_ATTR_SESSION | PK11_ATTR_SENSITIVE | PK11_ATTR_PRIVATE,
  ------------------
  |  |  216|      0|#define PK11_ATTR_PRIVATE 0x00000004L
  ------------------
  411|      0|                                                  CKF_DERIVE, CKF_DERIVE, ss->pkcs11PinArg);
  ------------------
  |  | 1364|      0|#define CKF_DERIVE 0x00080000UL
  ------------------
                                                                CKF_DERIVE, CKF_DERIVE, ss->pkcs11PinArg);
  ------------------
  |  | 1364|      0|#define CKF_DERIVE 0x00080000UL
  ------------------
  412|      0|    }
  413|       |
  414|     40|    PK11_FreeSlot(slot);
  415|     40|    if (!privKey || !pubKey) {
  ------------------
  |  Branch (415:9): [True: 0, False: 40]
  |  Branch (415:21): [True: 0, False: 40]
  ------------------
  416|      0|        goto loser;
  417|      0|    }
  418|       |
  419|     40|    keyPair = ssl_NewKeyPair(privKey, pubKey);
  420|     40|    if (!keyPair) {
  ------------------
  |  Branch (420:9): [True: 0, False: 40]
  ------------------
  421|      0|        goto loser;
  422|      0|    }
  423|       |
  424|     40|    SSL_TRC(50, ("%d: SSL[%d]: Create Kyber ephemeral key %d",
  ------------------
  |  |   71|     40|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 40]
  |  |  ------------------
  |  |   72|     40|    ssl_Trace b
  |  |  ------------------
  |  |  |  Branch (72:15): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  425|     40|                 SSL_GETPID(), ss ? ss->fd : NULL, groupDef->name));
  426|     40|    PRINT_BUF(50, (ss, "Public Key", pubKey->u.kyber.publicValue.data,
  ------------------
  |  |   74|     40|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 40]
  |  |  ------------------
  |  |   75|     40|    ssl_PrintBuf b
  ------------------
  427|     40|                   pubKey->u.kyber.publicValue.len));
  428|     40|#ifdef TRACE
  429|     40|    if (ssl_trace >= 50) {
  ------------------
  |  Branch (429:9): [True: 0, False: 40]
  ------------------
  430|      0|        SECItem d = { siBuffer, NULL, 0 };
  431|      0|        SECStatus rv = PK11_ReadRawAttribute(PK11_TypePrivKey, privKey, CKA_VALUE, &d);
  ------------------
  |  |  516|      0|#define CKA_VALUE 0x00000011UL
  ------------------
  432|      0|        if (rv == SECSuccess) {
  ------------------
  |  Branch (432:13): [True: 0, False: 0]
  ------------------
  433|      0|            PRINT_BUF(50, (ss, "Private Key", d.data, d.len));
  ------------------
  |  |   74|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   75|      0|    ssl_PrintBuf b
  ------------------
  434|      0|            SECITEM_FreeItem(&d, PR_FALSE);
  ------------------
  |  |  108|      0|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                          SECITEM_FreeItem(&d, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  435|      0|        } else {
  436|      0|            SSL_TRC(50, ("Error extracting private key"));
  ------------------
  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    ssl_Trace b
  ------------------
  437|      0|        }
  438|      0|    }
  439|     40|#endif
  440|       |
  441|     40|    *outKeyPair = keyPair;
  442|     40|    return SECSuccess;
  443|       |
  444|      0|loser:
  445|      0|    SECKEY_DestroyPrivateKey(privKey);
  446|      0|    SECKEY_DestroyPublicKey(pubKey);
  447|      0|    ssl_MapLowLevelError(SEC_ERROR_KEYGEN_FAIL);
  448|      0|    return SECFailure;
  449|     40|}
tls13con.c:tls13_ImportDHEKeyShare:
  673|    949|{
  674|    949|    SECStatus rv;
  675|    949|    SECItem publicValue = { siBuffer, NULL, 0 };
  676|       |
  677|    949|    publicValue.data = b;
  678|    949|    publicValue.len = length;
  679|    949|    if (!ssl_IsValidDHEShare(&pubKey->u.dh.prime, &publicValue)) {
  ------------------
  |  Branch (679:9): [True: 9, False: 940]
  ------------------
  680|      9|        PORT_SetError(SSL_ERROR_RX_MALFORMED_DHE_KEY_SHARE);
  ------------------
  |  |   65|      9|#define PORT_SetError PORT_SetError_Util
  ------------------
  681|      9|        return SECFailure;
  682|      9|    }
  683|       |
  684|    940|    peerKey->keyType = dhKey;
  685|    940|    rv = SECITEM_CopyItem(peerKey->arena, &peerKey->u.dh.prime,
  ------------------
  |  |  106|    940|#define SECITEM_CopyItem SECITEM_CopyItem_Util
  ------------------
  686|    940|                          &pubKey->u.dh.prime);
  687|    940|    if (rv != SECSuccess)
  ------------------
  |  Branch (687:9): [True: 0, False: 940]
  ------------------
  688|      0|        return SECFailure;
  689|    940|    rv = SECITEM_CopyItem(peerKey->arena, &peerKey->u.dh.base,
  ------------------
  |  |  106|    940|#define SECITEM_CopyItem SECITEM_CopyItem_Util
  ------------------
  690|    940|                          &pubKey->u.dh.base);
  691|    940|    if (rv != SECSuccess)
  ------------------
  |  Branch (691:9): [True: 0, False: 940]
  ------------------
  692|      0|        return SECFailure;
  693|    940|    rv = SECITEM_CopyItem(peerKey->arena, &peerKey->u.dh.publicValue,
  ------------------
  |  |  106|    940|#define SECITEM_CopyItem SECITEM_CopyItem_Util
  ------------------
  694|    940|                          &publicValue);
  695|    940|    if (rv != SECSuccess)
  ------------------
  |  Branch (695:9): [True: 0, False: 940]
  ------------------
  696|      0|        return SECFailure;
  697|       |
  698|    940|    return SECSuccess;
  699|    940|}
tls13con.c:tls13_UseServerSecret:
  939|  1.60k|{
  940|  1.60k|    return ss->sec.isServer == (direction == ssl_secret_write);
  941|  1.60k|}
tls13con.c:tls13_GetHmacMechanismFromHash:
  337|  9.03k|{
  338|  9.03k|    switch (hashType) {
  339|  2.95k|        case ssl_hash_sha256:
  ------------------
  |  Branch (339:9): [True: 2.95k, False: 6.07k]
  ------------------
  340|  2.95k|            return CKM_SHA256_HMAC;
  ------------------
  |  |  877|  2.95k|#define CKM_SHA256_HMAC 0x00000251UL
  ------------------
  341|  6.07k|        case ssl_hash_sha384:
  ------------------
  |  Branch (341:9): [True: 6.07k, False: 2.95k]
  ------------------
  342|  6.07k|            return CKM_SHA384_HMAC;
  ------------------
  |  |  880|  6.07k|#define CKM_SHA384_HMAC 0x00000261UL
  ------------------
  343|      0|        default:
  ------------------
  |  Branch (343:9): [True: 0, False: 9.03k]
  ------------------
  344|      0|            PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  345|  9.03k|    }
  346|      0|    return CKM_SHA256_HMAC;
  ------------------
  |  |  877|      0|#define CKM_SHA256_HMAC 0x00000251UL
  ------------------
  347|  9.03k|}
tls13con.c:tls13_CheckHsState:
  233|     13|{
  234|     13|    va_list ap;
  235|     13|    va_start(ap, line);
  236|     13|    if (tls13_InHsStateV(ss, ap)) {
  ------------------
  |  Branch (236:9): [True: 0, False: 13]
  ------------------
  237|      0|        va_end(ap);
  238|      0|        return SECSuccess;
  239|      0|    }
  240|     13|    va_end(ap);
  241|       |
  242|     13|    SSL_TRC(3, ("%d: TLS13[%d]: error %s state is (%s) at %s (%s:%d)",
  ------------------
  |  |   71|     13|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 13]
  |  |  ------------------
  |  |   72|     13|    ssl_Trace b
  ------------------
  243|     13|                SSL_GETPID(), ss->fd,
  244|     13|                error_name,
  245|     13|                tls13_HandshakeState(TLS13_BASE_WAIT_STATE(ss->ssl3.hs.ws)),
  246|     13|                func, file, line));
  247|     13|    tls13_FatalError(ss, err, unexpected_message);
  248|     13|    return SECFailure;
  249|     13|}
tls13con.c:tls13_HandleKeyUpdate:
 1160|      2|{
 1161|      2|    SECStatus rv;
 1162|      2|    PRUint32 update;
 1163|       |
 1164|      2|    SSL_TRC(3, ("%d: TLS13[%d]: %s handle key update",
  ------------------
  |  |   71|      2|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 2]
  |  |  ------------------
  |  |   72|      2|    ssl_Trace b
  |  |  ------------------
  |  |  |  Branch (72:15): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1165|      2|                SSL_GETPID(), ss->fd, SSL_ROLE(ss)));
 1166|       |
 1167|      2|    PORT_Assert(ss->opt.noLocks || ssl_HaveRecvBufLock(ss));
  ------------------
  |  |  120|      2|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      3|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 1, False: 1]
  |  |  |  |  |  Branch (208:7): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1168|      2|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|      2|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      3|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 1, False: 1]
  |  |  |  |  |  Branch (208:7): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1169|       |
 1170|      2|    if (!tls13_IsPostHandshake(ss)) {
  ------------------
  |  Branch (1170:9): [True: 2, False: 0]
  ------------------
 1171|      2|        FATAL_ERROR(ss, SSL_ERROR_RX_UNEXPECTED_KEY_UPDATE, unexpected_message);
  ------------------
  |  |   22|      2|    do {                                     \
  |  |   23|      2|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      2|    do {                                                                           \
  |  |  |  |   15|      2|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      2|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      2|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      2|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      2|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      2|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      2|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      2|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      2|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1172|      2|        return SECFailure;
 1173|      2|    }
 1174|       |
 1175|      0|    rv = TLS13_CHECK_HS_STATE(ss, SSL_ERROR_RX_UNEXPECTED_KEY_UPDATE,
  ------------------
  |  |  182|      0|    tls13_CheckHsState(ss, err, #err, __func__, __FILE__, __LINE__, \
  |  |  183|      0|                       __VA_ARGS__,                                 \
  |  |  184|      0|                       wait_invalid)
  ------------------
 1176|      0|                              idle_handshake);
 1177|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1177:9): [True: 0, False: 0]
  ------------------
 1178|       |        /* We should never be idle_handshake prior to firstHsDone. */
 1179|      0|        FATAL_ERROR(ss, SEC_ERROR_LIBRARY_FAILURE, internal_error);
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1180|      0|        return SECFailure;
 1181|      0|    }
 1182|       |
 1183|      0|    rv = ssl3_ConsumeHandshakeNumber(ss, &update, 1, &b, &length);
 1184|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1184:9): [True: 0, False: 0]
  ------------------
 1185|      0|        return SECFailure; /* Error code set already. */
 1186|      0|    }
 1187|      0|    if (length != 0) {
  ------------------
  |  Branch (1187:9): [True: 0, False: 0]
  ------------------
 1188|      0|        FATAL_ERROR(ss, SSL_ERROR_RX_MALFORMED_KEY_UPDATE, decode_error);
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1189|      0|        return SECFailure;
 1190|      0|    }
 1191|      0|    if (!(update == update_requested ||
  ------------------
  |  Branch (1191:11): [True: 0, False: 0]
  ------------------
 1192|      0|          update == update_not_requested)) {
  ------------------
  |  Branch (1192:11): [True: 0, False: 0]
  ------------------
 1193|      0|        FATAL_ERROR(ss, SSL_ERROR_RX_MALFORMED_KEY_UPDATE, decode_error);
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1194|      0|        return SECFailure;
 1195|      0|    }
 1196|       |
 1197|      0|    if (IS_DTLS(ss)) {
  ------------------
  |  |  892|      0|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1198|      0|        return dtls13_HandleKeyUpdate(ss, b, length, update);
 1199|      0|    }
 1200|       |
 1201|      0|    rv = tls13_UpdateTrafficKeys(ss, ssl_secret_read);
 1202|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1202:9): [True: 0, False: 0]
  ------------------
 1203|      0|        return SECFailure; /* Error code set by tls13_UpdateTrafficKeys. */
 1204|      0|    }
 1205|       |
 1206|      0|    if (update == update_requested) {
  ------------------
  |  Branch (1206:9): [True: 0, False: 0]
  ------------------
 1207|      0|        PRBool sendUpdate;
 1208|      0|        if (ss->ssl3.clientCertRequested) {
  ------------------
  |  Branch (1208:13): [True: 0, False: 0]
  ------------------
 1209|       |            /* Post-handshake auth is in progress; defer sending a key update. */
 1210|      0|            ss->ssl3.hs.keyUpdateDeferred = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 1211|      0|            ss->ssl3.hs.deferredKeyUpdateRequest = update_not_requested;
 1212|      0|            sendUpdate = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 1213|      0|        } else if (ss->ssl3.peerRequestedKeyUpdate) {
  ------------------
  |  Branch (1213:20): [True: 0, False: 0]
  ------------------
 1214|       |            /* Only send an update if we have sent with the current spec.  This
 1215|       |             * prevents us from being forced to crank forward pointlessly. */
 1216|      0|            ssl_GetSpecReadLock(ss);
  ------------------
  |  | 1422|      0|    {                                           \
  |  | 1423|      0|        if (!ss->opt.noLocks)                   \
  |  |  ------------------
  |  |  |  Branch (1423:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1424|      0|            NSSRWLock_LockRead((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   47|      0|#define NSSRWLock_LockRead NSSRWLock_LockRead_Util
  |  |  ------------------
  |  | 1425|      0|    }
  ------------------
 1217|      0|            sendUpdate = ss->ssl3.cwSpec->nextSeqNum > 0;
 1218|      0|            ssl_ReleaseSpecReadLock(ss);
  ------------------
  |  | 1427|      0|    {                                             \
  |  | 1428|      0|        if (!ss->opt.noLocks)                     \
  |  |  ------------------
  |  |  |  Branch (1428:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1429|      0|            NSSRWLock_UnlockRead((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   50|      0|#define NSSRWLock_UnlockRead NSSRWLock_UnlockRead_Util
  |  |  ------------------
  |  | 1430|      0|    }
  ------------------
 1219|      0|        } else {
 1220|      0|            sendUpdate = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 1221|      0|        }
 1222|      0|        if (sendUpdate) {
  ------------------
  |  Branch (1222:13): [True: 0, False: 0]
  ------------------
 1223|       |            /* Respond immediately (don't buffer). */
 1224|      0|            rv = tls13_SendKeyUpdate(ss, update_not_requested, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 1225|      0|            if (rv != SECSuccess) {
  ------------------
  |  Branch (1225:17): [True: 0, False: 0]
  ------------------
 1226|      0|                return SECFailure; /* Error already set. */
 1227|      0|            }
 1228|      0|        }
 1229|      0|        ss->ssl3.peerRequestedKeyUpdate = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 1230|      0|    }
 1231|       |
 1232|      0|    return SECSuccess;
 1233|      0|}
tls13con.c:tls13_ComputeEarlySecretsWithPsk:
 1467|  3.99k|{
 1468|  3.99k|    SECStatus rv;
 1469|       |
 1470|  3.99k|    SSL_TRC(5, ("%d: TLS13[%d]: compute early secrets (%s)",
  ------------------
  |  |   71|  3.99k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 3.99k]
  |  |  ------------------
  |  |   72|  3.99k|    ssl_Trace b
  |  |  ------------------
  |  |  |  Branch (72:15): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1471|  3.99k|                SSL_GETPID(), ss->fd, SSL_ROLE(ss)));
 1472|       |
 1473|  3.99k|    PORT_Assert(!ss->ssl3.hs.currentSecret);
  ------------------
  |  |  120|  3.99k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  3.99k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 3.99k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1474|  3.99k|    sslPsk *psk = NULL;
 1475|       |
 1476|  3.99k|    if (ss->sec.isServer) {
  ------------------
  |  Branch (1476:9): [True: 0, False: 3.99k]
  ------------------
 1477|      0|        psk = ss->xtnData.selectedPsk;
 1478|  3.99k|    } else {
 1479|       |        /* Client to use the first PSK for early secrets. */
 1480|  3.99k|        PORT_Assert(!PR_CLIST_IS_EMPTY(&ss->ssl3.hs.psks));
  ------------------
  |  |  120|  3.99k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  3.99k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 3.99k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1481|  3.99k|        psk = (sslPsk *)PR_LIST_HEAD(&ss->ssl3.hs.psks);
  ------------------
  |  |   65|  3.99k|#define PR_LIST_HEAD(_l) (_l)->next
  ------------------
 1482|  3.99k|    }
 1483|  3.99k|    PORT_Assert(psk && psk->key);
  ------------------
  |  |  120|  3.99k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  7.99k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 3.99k, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 3.99k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1484|  3.99k|    PORT_Assert(psk->hash != ssl_hash_none);
  ------------------
  |  |  120|  3.99k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  3.99k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 3.99k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1485|       |
 1486|  3.99k|    PK11SymKey *earlySecret = NULL;
 1487|  3.99k|    rv = tls13_HkdfExtract(NULL, psk->key, psk->hash, &earlySecret);
 1488|  3.99k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1488:9): [True: 0, False: 3.99k]
  ------------------
 1489|      0|        return SECFailure;
 1490|      0|    }
 1491|       |
 1492|       |    /* No longer need the raw input key */
 1493|  3.99k|    PK11_FreeSymKey(psk->key);
 1494|  3.99k|    psk->key = NULL;
 1495|  3.99k|    const char *label = (psk->type == ssl_psk_resume) ? kHkdfLabelResPskBinderKey : kHkdfLabelExtPskBinderKey;
  ------------------
  |  Branch (1495:25): [True: 0, False: 3.99k]
  ------------------
 1496|  3.99k|    rv = tls13_DeriveSecretNullHash(ss, earlySecret,
 1497|  3.99k|                                    label, strlen(label),
 1498|  3.99k|                                    &psk->binderKey, psk->hash);
 1499|  3.99k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1499:9): [True: 0, False: 3.99k]
  ------------------
 1500|      0|        PK11_FreeSymKey(earlySecret);
 1501|      0|        return SECFailure;
 1502|      0|    }
 1503|  3.99k|    ss->ssl3.hs.currentSecret = earlySecret;
 1504|       |
 1505|  3.99k|    return SECSuccess;
 1506|  3.99k|}
tls13con.c:tls13_DeriveSecretWrap:
 4408|  2.86k|{
 4409|  2.86k|    SECStatus rv;
 4410|  2.86k|    SSL3Hashes hashes;
 4411|  2.86k|    char buf[100];
 4412|  2.86k|    const char *label;
 4413|       |
 4414|  2.86k|    if (prefix) {
  ------------------
  |  Branch (4414:9): [True: 2.86k, False: 0]
  ------------------
 4415|  2.86k|        if ((strlen(prefix) + strlen(suffix) + 2) > sizeof(buf)) {
  ------------------
  |  Branch (4415:13): [True: 0, False: 2.86k]
  ------------------
 4416|      0|            PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4417|      0|            PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 4418|      0|            return SECFailure;
 4419|      0|        }
 4420|  2.86k|        (void)PR_snprintf(buf, sizeof(buf), "%s %s",
 4421|  2.86k|                          prefix, suffix);
 4422|  2.86k|        label = buf;
 4423|  2.86k|    } else {
 4424|      0|        label = suffix;
 4425|      0|    }
 4426|       |
 4427|  2.86k|    SSL_TRC(3, ("%d: TLS13[%d]: deriving secret '%s'",
  ------------------
  |  |   71|  2.86k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 2.86k]
  |  |  ------------------
  |  |   72|  2.86k|    ssl_Trace b
  ------------------
 4428|  2.86k|                SSL_GETPID(), ss->fd, label));
 4429|  2.86k|    rv = tls13_ComputeHandshakeHashes(ss, &hashes);
 4430|  2.86k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (4430:9): [True: 0, False: 2.86k]
  ------------------
 4431|      0|        PORT_Assert(0); /* Should never fail */
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4432|      0|        ssl_MapLowLevelError(SEC_ERROR_LIBRARY_FAILURE);
 4433|      0|        return SECFailure;
 4434|      0|    }
 4435|       |
 4436|  2.86k|    rv = tls13_DeriveSecret(ss, key, label, strlen(label),
 4437|  2.86k|                            &hashes, dest, tls13_GetHash(ss));
 4438|  2.86k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (4438:9): [True: 0, False: 2.86k]
  ------------------
 4439|      0|        return SECFailure;
 4440|      0|    }
 4441|       |
 4442|  2.86k|    if (keylogLabel) {
  ------------------
  |  Branch (4442:9): [True: 2.86k, False: 0]
  ------------------
 4443|  2.86k|        ssl3_RecordKeyLog(ss, keylogLabel, *dest);
 4444|  2.86k|    }
 4445|  2.86k|    return SECSuccess;
 4446|  2.86k|}
tls13con.c:tls13_SetKeyExchangeType:
 3548|  1.43k|{
 3549|  1.43k|    ss->sec.keaGroup = group;
 3550|  1.43k|    switch (group->keaType) {
 3551|       |        /* Note: These overwrite on resumption.... so if you start with ECDH
 3552|       |         * and resume with DH, we report DH. That's fine, since no answer
 3553|       |         * is really right. */
 3554|    494|        case ssl_kea_ecdh:
  ------------------
  |  Branch (3554:9): [True: 494, False: 940]
  ------------------
 3555|    494|            ss->ssl3.hs.kea_def_mutable.exchKeyType =
 3556|    494|                ss->statelessResume ? ssl_kea_ecdh_psk : ssl_kea_ecdh;
  ------------------
  |  Branch (3556:17): [True: 0, False: 494]
  ------------------
 3557|    494|            ss->sec.keaType = ssl_kea_ecdh;
 3558|    494|            break;
 3559|      0|        case ssl_kea_ecdh_hybrid:
  ------------------
  |  Branch (3559:9): [True: 0, False: 1.43k]
  ------------------
 3560|      0|            ss->ssl3.hs.kea_def_mutable.exchKeyType =
 3561|      0|                ss->statelessResume ? ssl_kea_ecdh_hybrid_psk : ssl_kea_ecdh_hybrid;
  ------------------
  |  Branch (3561:17): [True: 0, False: 0]
  ------------------
 3562|      0|            ss->sec.keaType = ssl_kea_ecdh_hybrid;
 3563|      0|            break;
 3564|    940|        case ssl_kea_dh:
  ------------------
  |  Branch (3564:9): [True: 940, False: 494]
  ------------------
 3565|    940|            ss->ssl3.hs.kea_def_mutable.exchKeyType =
 3566|    940|                ss->statelessResume ? ssl_kea_dh_psk : ssl_kea_dh;
  ------------------
  |  Branch (3566:17): [True: 0, False: 940]
  ------------------
 3567|    940|            ss->sec.keaType = ssl_kea_dh;
 3568|    940|            break;
 3569|      0|        default:
  ------------------
  |  Branch (3569:9): [True: 0, False: 1.43k]
  ------------------
 3570|      0|            PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3571|  1.43k|    }
 3572|  1.43k|}
tls13con.c:ssl_ListCount:
 2960|  1.29k|{
 2961|  1.29k|    unsigned int c = 0;
 2962|  1.29k|    PRCList *cur;
 2963|  4.01k|    for (cur = PR_NEXT_LINK(list); cur != list; cur = PR_NEXT_LINK(cur)) {
  ------------------
  |  |   47|  1.29k|        ((_e)->next)
  ------------------
                  for (cur = PR_NEXT_LINK(list); cur != list; cur = PR_NEXT_LINK(cur)) {
  ------------------
  |  |   47|  2.72k|        ((_e)->next)
  ------------------
  |  Branch (2963:36): [True: 2.72k, False: 1.29k]
  ------------------
 2964|  2.72k|        ++c;
 2965|  2.72k|    }
 2966|  1.29k|    return c;
 2967|  1.29k|}
tls13con.c:tls13_ReinjectHandshakeTranscript:
 2913|  1.27k|{
 2914|  1.27k|    SSL3Hashes hashes = { 0 };
 2915|  1.27k|    SSL3Hashes echInnerHashes = { 0 };
 2916|  1.27k|    SECStatus rv;
 2917|       |
 2918|       |    /* First compute the hash. */
 2919|  1.27k|    rv = tls13_ComputeHash(ss, &hashes,
 2920|  1.27k|                           ss->ssl3.hs.messages.buf,
 2921|  1.27k|                           ss->ssl3.hs.messages.len,
 2922|  1.27k|                           tls13_GetHash(ss));
 2923|  1.27k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (2923:9): [True: 0, False: 1.27k]
  ------------------
 2924|      0|        return SECFailure;
 2925|      0|    }
 2926|       |
 2927|  1.27k|    if (ss->ssl3.hs.echHpkeCtx) {
  ------------------
  |  Branch (2927:9): [True: 0, False: 1.27k]
  ------------------
 2928|      0|        rv = tls13_ComputeHash(ss, &echInnerHashes,
 2929|      0|                               ss->ssl3.hs.echInnerMessages.buf,
 2930|      0|                               ss->ssl3.hs.echInnerMessages.len,
 2931|      0|                               tls13_GetHash(ss));
 2932|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (2932:13): [True: 0, False: 0]
  ------------------
 2933|      0|            return SECFailure;
 2934|      0|        }
 2935|      0|    }
 2936|       |
 2937|  1.27k|    ssl3_RestartHandshakeHashes(ss);
 2938|       |
 2939|       |    /* Reinject the message. The Default context variant updates
 2940|       |     * the default hash state. Use it for both non-ECH and ECH Outer. */
 2941|  1.27k|    rv = ssl_HashHandshakeMessageDefault(ss, ssl_hs_message_hash,
 2942|  1.27k|                                         hashes.u.raw, hashes.len);
 2943|  1.27k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (2943:9): [True: 0, False: 1.27k]
  ------------------
 2944|      0|        return SECFailure;
 2945|      0|    }
 2946|       |
 2947|  1.27k|    if (ss->ssl3.hs.echHpkeCtx) {
  ------------------
  |  Branch (2947:9): [True: 0, False: 1.27k]
  ------------------
 2948|      0|        rv = ssl_HashHandshakeMessageEchInner(ss, ssl_hs_message_hash,
 2949|      0|                                              echInnerHashes.u.raw,
 2950|      0|                                              echInnerHashes.len);
 2951|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (2951:13): [True: 0, False: 0]
  ------------------
 2952|      0|            return SECFailure;
 2953|      0|        }
 2954|      0|    }
 2955|       |
 2956|  1.27k|    return SECSuccess;
 2957|  1.27k|}
tls13con.c:tls13_HandleCertificateRequest:
 3108|      2|{
 3109|      2|    SECStatus rv;
 3110|      2|    SECItem context = { siBuffer, NULL, 0 };
 3111|      2|    SECItem extensionsData = { siBuffer, NULL, 0 };
 3112|       |
 3113|      2|    SSL_TRC(3, ("%d: TLS13[%d]: handle certificate_request sequence",
  ------------------
  |  |   71|      2|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 2]
  |  |  ------------------
  |  |   72|      2|    ssl_Trace b
  ------------------
 3114|      2|                SSL_GETPID(), ss->fd));
 3115|       |
 3116|      2|    PORT_Assert(ss->opt.noLocks || ssl_HaveRecvBufLock(ss));
  ------------------
  |  |  120|      2|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      3|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 1, False: 1]
  |  |  |  |  |  Branch (208:7): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3117|      2|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|      2|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      3|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 1, False: 1]
  |  |  |  |  |  Branch (208:7): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3118|       |
 3119|       |    /* Client */
 3120|      2|    if (ss->opt.enablePostHandshakeAuth) {
  ------------------
  |  Branch (3120:9): [True: 1, False: 1]
  ------------------
 3121|      1|        rv = TLS13_CHECK_HS_STATE(ss, SSL_ERROR_RX_UNEXPECTED_CERT_REQUEST,
  ------------------
  |  |  182|      1|    tls13_CheckHsState(ss, err, #err, __func__, __FILE__, __LINE__, \
  |  |  183|      1|                       __VA_ARGS__,                                 \
  |  |  184|      1|                       wait_invalid)
  ------------------
 3122|      1|                                  wait_cert_request, idle_handshake);
 3123|      1|    } else {
 3124|      1|        rv = TLS13_CHECK_HS_STATE(ss, SSL_ERROR_RX_UNEXPECTED_CERT_REQUEST,
  ------------------
  |  |  182|      1|    tls13_CheckHsState(ss, err, #err, __func__, __FILE__, __LINE__, \
  |  |  183|      1|                       __VA_ARGS__,                                 \
  |  |  184|      1|                       wait_invalid)
  ------------------
 3125|      1|                                  wait_cert_request);
 3126|      1|    }
 3127|      2|    if (rv != SECSuccess) {
  ------------------
  |  Branch (3127:9): [True: 2, False: 0]
  ------------------
 3128|      2|        return SECFailure;
 3129|      2|    }
 3130|       |
 3131|       |    /*  MUST NOT combine external PSKs with certificate authentication. */
 3132|      0|    if (ss->sec.authType == ssl_auth_psk) {
  ------------------
  |  Branch (3132:9): [True: 0, False: 0]
  ------------------
 3133|      0|        FATAL_ERROR(ss, SSL_ERROR_RX_UNEXPECTED_CERT_REQUEST, unexpected_message);
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3134|      0|        return SECFailure;
 3135|      0|    }
 3136|       |
 3137|      0|    if (tls13_IsPostHandshake(ss)) {
  ------------------
  |  Branch (3137:9): [True: 0, False: 0]
  ------------------
 3138|      0|        PORT_Assert(ss->ssl3.hs.shaPostHandshake == NULL);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3139|      0|        ss->ssl3.hs.shaPostHandshake = PK11_CloneContext(ss->ssl3.hs.sha);
 3140|      0|        if (ss->ssl3.hs.shaPostHandshake == NULL) {
  ------------------
  |  Branch (3140:13): [True: 0, False: 0]
  ------------------
 3141|      0|            ssl_MapLowLevelError(SSL_ERROR_SHA_DIGEST_FAILURE);
 3142|      0|            return SECFailure;
 3143|      0|        }
 3144|      0|        rv = ssl_HashPostHandshakeMessage(ss, ssl_hs_certificate_request, b, length);
 3145|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (3145:13): [True: 0, False: 0]
  ------------------
 3146|      0|            FATAL_ERROR(ss, SEC_ERROR_LIBRARY_FAILURE, internal_error);
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3147|      0|            return SECFailure;
 3148|      0|        }
 3149|       |
 3150|       |        /* clean up anything left from previous handshake. */
 3151|      0|        if (ss->ssl3.clientCertChain != NULL) {
  ------------------
  |  Branch (3151:13): [True: 0, False: 0]
  ------------------
 3152|      0|            CERT_DestroyCertificateList(ss->ssl3.clientCertChain);
 3153|      0|            ss->ssl3.clientCertChain = NULL;
 3154|      0|        }
 3155|      0|        if (ss->ssl3.clientCertificate != NULL) {
  ------------------
  |  Branch (3155:13): [True: 0, False: 0]
  ------------------
 3156|      0|            CERT_DestroyCertificate(ss->ssl3.clientCertificate);
 3157|      0|            ss->ssl3.clientCertificate = NULL;
 3158|      0|        }
 3159|      0|        if (ss->ssl3.clientPrivateKey != NULL) {
  ------------------
  |  Branch (3159:13): [True: 0, False: 0]
  ------------------
 3160|      0|            SECKEY_DestroyPrivateKey(ss->ssl3.clientPrivateKey);
 3161|      0|            ss->ssl3.clientPrivateKey = NULL;
 3162|      0|        }
 3163|      0|        if (ss->ssl3.hs.clientAuthSignatureSchemes != NULL) {
  ------------------
  |  Branch (3163:13): [True: 0, False: 0]
  ------------------
 3164|      0|            PORT_Free(ss->ssl3.hs.clientAuthSignatureSchemes);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 3165|      0|            ss->ssl3.hs.clientAuthSignatureSchemes = NULL;
 3166|      0|            ss->ssl3.hs.clientAuthSignatureSchemesLen = 0;
 3167|      0|        }
 3168|      0|        SECITEM_FreeItem(&ss->xtnData.certReqContext, PR_FALSE);
  ------------------
  |  |  108|      0|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                      SECITEM_FreeItem(&ss->xtnData.certReqContext, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 3169|      0|        ss->xtnData.certReqContext.data = NULL;
 3170|      0|    } else {
 3171|      0|        PORT_Assert(ss->ssl3.clientCertChain == NULL);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3172|      0|        PORT_Assert(ss->ssl3.clientCertificate == NULL);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3173|      0|        PORT_Assert(ss->ssl3.clientPrivateKey == NULL);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3174|      0|        PORT_Assert(ss->ssl3.hs.clientAuthSignatureSchemes == NULL);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3175|      0|        PORT_Assert(ss->ssl3.hs.clientAuthSignatureSchemesLen == 0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3176|      0|        PORT_Assert(!ss->ssl3.hs.clientCertRequested);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3177|      0|        PORT_Assert(ss->xtnData.certReqContext.data == NULL);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3178|      0|    }
 3179|       |
 3180|      0|    rv = ssl3_ConsumeHandshakeVariable(ss, &context, 1, &b, &length);
 3181|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (3181:9): [True: 0, False: 0]
  ------------------
 3182|      0|        return SECFailure;
 3183|      0|    }
 3184|       |
 3185|       |    /* Unless it is a post-handshake client auth, the certificate
 3186|       |     * request context must be empty. */
 3187|      0|    if (!tls13_IsPostHandshake(ss) && context.len > 0) {
  ------------------
  |  Branch (3187:9): [True: 0, False: 0]
  |  Branch (3187:39): [True: 0, False: 0]
  ------------------
 3188|      0|        FATAL_ERROR(ss, SSL_ERROR_RX_MALFORMED_CERT_REQUEST, illegal_parameter);
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3189|      0|        return SECFailure;
 3190|      0|    }
 3191|       |
 3192|      0|    rv = ssl3_ConsumeHandshakeVariable(ss, &extensionsData, 2, &b, &length);
 3193|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (3193:9): [True: 0, False: 0]
  ------------------
 3194|      0|        return SECFailure;
 3195|      0|    }
 3196|       |
 3197|      0|    if (length) {
  ------------------
  |  Branch (3197:9): [True: 0, False: 0]
  ------------------
 3198|      0|        FATAL_ERROR(ss, SSL_ERROR_RX_MALFORMED_CERT_REQUEST, decode_error);
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3199|      0|        return SECFailure;
 3200|      0|    }
 3201|       |
 3202|       |    /* Process all the extensions. */
 3203|      0|    rv = ssl3_HandleExtensions(ss, &extensionsData.data, &extensionsData.len,
 3204|      0|                               ssl_hs_certificate_request);
 3205|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (3205:9): [True: 0, False: 0]
  ------------------
 3206|      0|        return SECFailure;
 3207|      0|    }
 3208|       |
 3209|      0|    if (!ss->xtnData.numSigSchemes) {
  ------------------
  |  Branch (3209:9): [True: 0, False: 0]
  ------------------
 3210|      0|        FATAL_ERROR(ss, SSL_ERROR_MISSING_SIGNATURE_ALGORITHMS_EXTENSION,
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3211|      0|                    missing_extension);
 3212|      0|        return SECFailure;
 3213|      0|    }
 3214|       |
 3215|      0|    rv = SECITEM_CopyItem(NULL, &ss->xtnData.certReqContext, &context);
  ------------------
  |  |  106|      0|#define SECITEM_CopyItem SECITEM_CopyItem_Util
  ------------------
 3216|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (3216:9): [True: 0, False: 0]
  ------------------
 3217|      0|        return SECFailure;
 3218|      0|    }
 3219|       |
 3220|      0|    ss->ssl3.hs.clientCertRequested = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 3221|       |
 3222|      0|    if (ss->firstHsDone) {
  ------------------
  |  Branch (3222:9): [True: 0, False: 0]
  ------------------
 3223|       |
 3224|       |        /* Request a client certificate. */
 3225|      0|        rv = ssl3_BeginHandleCertificateRequest(
 3226|      0|            ss, ss->xtnData.sigSchemes, ss->xtnData.numSigSchemes,
 3227|      0|            &ss->xtnData.certReqAuthorities);
 3228|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (3228:13): [True: 0, False: 0]
  ------------------
 3229|      0|            FATAL_ERROR(ss, SEC_ERROR_LIBRARY_FAILURE, internal_error);
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3230|      0|            return rv;
 3231|      0|        }
 3232|      0|        rv = tls13_SendPostHandshakeCertificate(ss);
 3233|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (3233:13): [True: 0, False: 0]
  ------------------
 3234|      0|            return rv; /* error code is set. */
 3235|      0|        }
 3236|      0|    } else {
 3237|      0|        TLS13_SET_HS_STATE(ss, wait_server_cert);
  ------------------
  |  |   37|      0|    tls13_SetHsState(ss, ws, __func__, __FILE__, __LINE__)
  ------------------
 3238|      0|    }
 3239|      0|    return SECSuccess;
 3240|      0|}
tls13con.c:tls13_ComputeHandshakeSecret:
 1543|  1.43k|{
 1544|  1.43k|    SECStatus rv;
 1545|  1.43k|    PK11SymKey *derivedSecret = NULL;
 1546|  1.43k|    PK11SymKey *newSecret = NULL;
 1547|  1.43k|    SSL_TRC(5, ("%d: TLS13[%d]: compute handshake secret (%s)",
  ------------------
  |  |   71|  1.43k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 1.43k]
  |  |  ------------------
  |  |   72|  1.43k|    ssl_Trace b
  |  |  ------------------
  |  |  |  Branch (72:15): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1548|  1.43k|                SSL_GETPID(), ss->fd, SSL_ROLE(ss)));
 1549|       |
 1550|       |    /* If no PSK, generate the default early secret. */
 1551|  1.43k|    if (!ss->ssl3.hs.currentSecret) {
  ------------------
  |  Branch (1551:9): [True: 1.42k, False: 6]
  ------------------
 1552|  1.42k|        PORT_Assert(!ss->xtnData.selectedPsk);
  ------------------
  |  |  120|  1.42k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.42k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.42k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1553|  1.42k|        rv = tls13_HkdfExtract(NULL, NULL,
 1554|  1.42k|                               tls13_GetHash(ss), &ss->ssl3.hs.currentSecret);
 1555|  1.42k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (1555:13): [True: 0, False: 1.42k]
  ------------------
 1556|      0|            return SECFailure;
 1557|      0|        }
 1558|  1.42k|    }
 1559|  1.43k|    PORT_Assert(ss->ssl3.hs.currentSecret);
  ------------------
  |  |  120|  1.43k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.43k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.43k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1560|  1.43k|    PORT_Assert(ss->ssl3.hs.dheSecret);
  ------------------
  |  |  120|  1.43k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.43k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.43k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1561|       |
 1562|       |    /* Derive-Secret(., "derived", "") */
 1563|  1.43k|    rv = tls13_DeriveSecretNullHash(ss, ss->ssl3.hs.currentSecret,
 1564|  1.43k|                                    kHkdfLabelDerivedSecret,
 1565|  1.43k|                                    strlen(kHkdfLabelDerivedSecret),
 1566|  1.43k|                                    &derivedSecret, tls13_GetHash(ss));
 1567|  1.43k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1567:9): [True: 0, False: 1.43k]
  ------------------
 1568|      0|        LOG_ERROR(ss, SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   14|      0|    do {                                                                           \
  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  ------------------
  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|    ssl_Trace b
  |  |  ------------------
  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  ------------------
  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  ------------------
  |  |   18|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1569|      0|        return rv;
 1570|      0|    }
 1571|       |
 1572|       |    /* HKDF-Extract(ECDHE, .) = Handshake Secret */
 1573|  1.43k|    rv = tls13_HkdfExtract(derivedSecret, ss->ssl3.hs.dheSecret,
 1574|  1.43k|                           tls13_GetHash(ss), &newSecret);
 1575|  1.43k|    PK11_FreeSymKey(derivedSecret);
 1576|  1.43k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1576:9): [True: 0, False: 1.43k]
  ------------------
 1577|      0|        LOG_ERROR(ss, SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   14|      0|    do {                                                                           \
  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  ------------------
  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|    ssl_Trace b
  |  |  ------------------
  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  ------------------
  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  ------------------
  |  |   18|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1578|      0|        return rv;
 1579|      0|    }
 1580|       |
 1581|  1.43k|    PK11_FreeSymKey(ss->ssl3.hs.currentSecret);
 1582|  1.43k|    ss->ssl3.hs.currentSecret = newSecret;
 1583|  1.43k|    return SECSuccess;
 1584|  1.43k|}
tls13con.c:tls13_ComputeHandshakeSecrets:
 1588|  1.43k|{
 1589|  1.43k|    SECStatus rv;
 1590|  1.43k|    PK11SymKey *derivedSecret = NULL;
 1591|  1.43k|    PK11SymKey *newSecret = NULL;
 1592|       |
 1593|  1.43k|    PK11_FreeSymKey(ss->ssl3.hs.dheSecret);
 1594|  1.43k|    ss->ssl3.hs.dheSecret = NULL;
 1595|       |
 1596|  1.43k|    SSL_TRC(5, ("%d: TLS13[%d]: compute handshake secrets (%s)",
  ------------------
  |  |   71|  1.43k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 1.43k]
  |  |  ------------------
  |  |   72|  1.43k|    ssl_Trace b
  |  |  ------------------
  |  |  |  Branch (72:15): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1597|  1.43k|                SSL_GETPID(), ss->fd, SSL_ROLE(ss)));
 1598|       |
 1599|       |    /* Now compute |*HsTrafficSecret| */
 1600|  1.43k|    rv = tls13_DeriveSecretWrap(ss, ss->ssl3.hs.currentSecret,
 1601|  1.43k|                                kHkdfLabelClient,
 1602|  1.43k|                                kHkdfLabelHandshakeTrafficSecret,
 1603|  1.43k|                                keylogLabelClientHsTrafficSecret,
 1604|  1.43k|                                &ss->ssl3.hs.clientHsTrafficSecret);
 1605|  1.43k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1605:9): [True: 0, False: 1.43k]
  ------------------
 1606|      0|        LOG_ERROR(ss, SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   14|      0|    do {                                                                           \
  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  ------------------
  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|    ssl_Trace b
  |  |  ------------------
  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  ------------------
  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  ------------------
  |  |   18|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1607|      0|        return rv;
 1608|      0|    }
 1609|  1.43k|    rv = tls13_DeriveSecretWrap(ss, ss->ssl3.hs.currentSecret,
 1610|  1.43k|                                kHkdfLabelServer,
 1611|  1.43k|                                kHkdfLabelHandshakeTrafficSecret,
 1612|  1.43k|                                keylogLabelServerHsTrafficSecret,
 1613|  1.43k|                                &ss->ssl3.hs.serverHsTrafficSecret);
 1614|  1.43k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1614:9): [True: 0, False: 1.43k]
  ------------------
 1615|      0|        LOG_ERROR(ss, SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   14|      0|    do {                                                                           \
  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  ------------------
  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|    ssl_Trace b
  |  |  ------------------
  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  ------------------
  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  ------------------
  |  |   18|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1616|      0|        return rv;
 1617|      0|    }
 1618|       |
 1619|  1.43k|    if (ss->secretCallback) {
  ------------------
  |  Branch (1619:9): [True: 0, False: 1.43k]
  ------------------
 1620|      0|        SSLSecretDirection dir =
 1621|      0|            ss->sec.isServer ? ssl_secret_read : ssl_secret_write;
  ------------------
  |  Branch (1621:13): [True: 0, False: 0]
  ------------------
 1622|      0|        ss->secretCallback(ss->fd, (PRUint16)TrafficKeyHandshake, dir,
 1623|      0|                           ss->ssl3.hs.clientHsTrafficSecret,
 1624|      0|                           ss->secretCallbackArg);
 1625|      0|        dir = ss->sec.isServer ? ssl_secret_write : ssl_secret_read;
  ------------------
  |  Branch (1625:15): [True: 0, False: 0]
  ------------------
 1626|      0|        ss->secretCallback(ss->fd, (PRUint16)TrafficKeyHandshake, dir,
 1627|      0|                           ss->ssl3.hs.serverHsTrafficSecret,
 1628|      0|                           ss->secretCallbackArg);
 1629|      0|    }
 1630|       |
 1631|  1.43k|    SSL_TRC(5, ("%d: TLS13[%d]: compute master secret (%s)",
  ------------------
  |  |   71|  1.43k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 1.43k]
  |  |  ------------------
  |  |   72|  1.43k|    ssl_Trace b
  |  |  ------------------
  |  |  |  Branch (72:15): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1632|  1.43k|                SSL_GETPID(), ss->fd, SSL_ROLE(ss)));
 1633|       |
 1634|       |    /* Crank HKDF forward to make master secret, which we
 1635|       |     * stuff in current secret. */
 1636|  1.43k|    rv = tls13_DeriveSecretNullHash(ss, ss->ssl3.hs.currentSecret,
 1637|  1.43k|                                    kHkdfLabelDerivedSecret,
 1638|  1.43k|                                    strlen(kHkdfLabelDerivedSecret),
 1639|  1.43k|                                    &derivedSecret, tls13_GetHash(ss));
 1640|  1.43k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1640:9): [True: 0, False: 1.43k]
  ------------------
 1641|      0|        LOG_ERROR(ss, SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   14|      0|    do {                                                                           \
  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  ------------------
  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|    ssl_Trace b
  |  |  ------------------
  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  ------------------
  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  ------------------
  |  |   18|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1642|      0|        return rv;
 1643|      0|    }
 1644|  1.43k|    rv = tls13_HkdfExtract(derivedSecret,
 1645|  1.43k|                           NULL,
 1646|  1.43k|                           tls13_GetHash(ss),
 1647|  1.43k|                           &newSecret);
 1648|  1.43k|    PK11_FreeSymKey(derivedSecret);
 1649|  1.43k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1649:9): [True: 0, False: 1.43k]
  ------------------
 1650|      0|        LOG_ERROR(ss, SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   14|      0|    do {                                                                           \
  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  ------------------
  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|    ssl_Trace b
  |  |  ------------------
  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  ------------------
  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  ------------------
  |  |   18|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1651|      0|        return SECFailure;
 1652|      0|    }
 1653|  1.43k|    PK11_FreeSymKey(ss->ssl3.hs.currentSecret);
 1654|  1.43k|    ss->ssl3.hs.currentSecret = newSecret;
 1655|       |
 1656|  1.43k|    return SECSuccess;
 1657|  1.43k|}
tls13con.c:tls13_HandleServerKeyShare:
 3581|  1.51k|{
 3582|  1.51k|    SECStatus rv;
 3583|  1.51k|    TLS13KeyShareEntry *entry;
 3584|  1.51k|    sslEphemeralKeyPair *keyPair;
 3585|  1.51k|    PK11SymKey *dheSecret = NULL;
 3586|  1.51k|    PK11SymKey *kemSecret = NULL;
 3587|       |
 3588|  1.51k|    SSL_TRC(3, ("%d: TLS13[%d]: handle server_key_share handshake",
  ------------------
  |  |   71|  1.51k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 1.51k]
  |  |  ------------------
  |  |   72|  1.51k|    ssl_Trace b
  ------------------
 3589|  1.51k|                SSL_GETPID(), ss->fd));
 3590|  1.51k|    PORT_Assert(ss->opt.noLocks || ssl_HaveRecvBufLock(ss));
  ------------------
  |  |  120|  1.51k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  2.25k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 772, False: 739]
  |  |  |  |  |  Branch (208:7): [True: 739, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3591|  1.51k|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|  1.51k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  2.25k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 772, False: 739]
  |  |  |  |  |  Branch (208:7): [True: 739, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3592|       |
 3593|       |    /* This list should have one entry. */
 3594|  1.51k|    if (PR_CLIST_IS_EMPTY(&ss->xtnData.remoteKeyShares)) {
  ------------------
  |  |   94|  1.51k|    ((_l)->next == (_l))
  |  |  ------------------
  |  |  |  Branch (94:5): [True: 8, False: 1.50k]
  |  |  ------------------
  ------------------
 3595|      8|        FATAL_ERROR(ss, SSL_ERROR_MISSING_KEY_SHARE, missing_extension);
  ------------------
  |  |   22|      8|    do {                                     \
  |  |   23|      8|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      8|    do {                                                                           \
  |  |  |  |   15|      8|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      8|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 8]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      8|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      8|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      8|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      8|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      8|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      8|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      8|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3596|      8|        return SECFailure;
 3597|      8|    }
 3598|       |
 3599|  1.50k|    entry = (TLS13KeyShareEntry *)PR_NEXT_LINK(&ss->xtnData.remoteKeyShares);
  ------------------
  |  |   47|  1.50k|        ((_e)->next)
  ------------------
 3600|  1.50k|    PORT_Assert(PR_NEXT_LINK(&entry->link) == &ss->xtnData.remoteKeyShares);
  ------------------
  |  |  120|  1.50k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.50k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.50k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3601|       |
 3602|       |    /* Now get our matching key. */
 3603|  1.50k|    keyPair = ssl_LookupEphemeralKeyPair(ss, entry->group);
 3604|  1.50k|    if (!keyPair) {
  ------------------
  |  Branch (3604:9): [True: 13, False: 1.49k]
  ------------------
 3605|     13|        FATAL_ERROR(ss, SSL_ERROR_RX_MALFORMED_KEY_SHARE, illegal_parameter);
  ------------------
  |  |   22|     13|    do {                                     \
  |  |   23|     13|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|     13|    do {                                                                           \
  |  |  |  |   15|     13|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|     13|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 13]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|     13|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|     13|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|     13|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|     13|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|     13|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|     13|        tls13_FatalError(ss, prError, desc); \
  |  |   25|     13|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3606|     13|        return SECFailure;
 3607|     13|    }
 3608|       |
 3609|  1.49k|    PORT_Assert(ssl_NamedGroupEnabled(ss, entry->group));
  ------------------
  |  |  120|  1.49k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.49k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.49k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3610|       |
 3611|  1.49k|    rv = tls13_HandleKeyShare(ss, entry, keyPair->keys,
 3612|  1.49k|                              tls13_GetHash(ss),
 3613|  1.49k|                              &dheSecret);
 3614|  1.49k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (3614:9): [True: 56, False: 1.43k]
  ------------------
 3615|     56|        goto loser; /* Error code already set. */
 3616|     56|    }
 3617|       |
 3618|  1.43k|    if (entry->group->keaType == ssl_kea_ecdh_hybrid) {
  ------------------
  |  Branch (3618:9): [True: 0, False: 1.43k]
  ------------------
 3619|      0|        rv = tls13_HandleKEMCiphertext(ss, entry, keyPair->kemKeys, &kemSecret);
 3620|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (3620:13): [True: 0, False: 0]
  ------------------
 3621|      0|            goto loser; /* Error set by tls13_HandleKEMCiphertext */
 3622|      0|        }
 3623|      0|        switch (entry->group->name) {
 3624|      0|            case ssl_grp_kem_xyber768d00:
  ------------------
  |  Branch (3624:13): [True: 0, False: 0]
  ------------------
 3625|      0|                ss->ssl3.hs.dheSecret = PK11_ConcatSymKeys(dheSecret, kemSecret, CKM_HKDF_DERIVE, CKA_DERIVE);
  ------------------
  |  | 1296|      0|#define CKM_HKDF_DERIVE 0x0000402aUL
  ------------------
                              ss->ssl3.hs.dheSecret = PK11_ConcatSymKeys(dheSecret, kemSecret, CKM_HKDF_DERIVE, CKA_DERIVE);
  ------------------
  |  |  555|      0|#define CKA_DERIVE 0x0000010CUL
  ------------------
 3626|      0|                break;
 3627|      0|            case ssl_grp_kem_mlkem768x25519:
  ------------------
  |  Branch (3627:13): [True: 0, False: 0]
  ------------------
 3628|      0|                ss->ssl3.hs.dheSecret = PK11_ConcatSymKeys(kemSecret, dheSecret, CKM_HKDF_DERIVE, CKA_DERIVE);
  ------------------
  |  | 1296|      0|#define CKM_HKDF_DERIVE 0x0000402aUL
  ------------------
                              ss->ssl3.hs.dheSecret = PK11_ConcatSymKeys(kemSecret, dheSecret, CKM_HKDF_DERIVE, CKA_DERIVE);
  ------------------
  |  |  555|      0|#define CKA_DERIVE 0x0000010CUL
  ------------------
 3629|      0|                break;
 3630|      0|            default:
  ------------------
  |  Branch (3630:13): [True: 0, False: 0]
  ------------------
 3631|      0|                PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3632|      0|                PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 3633|      0|                ss->ssl3.hs.dheSecret = NULL;
 3634|      0|                break;
 3635|      0|        }
 3636|      0|        if (!ss->ssl3.hs.dheSecret) {
  ------------------
  |  Branch (3636:13): [True: 0, False: 0]
  ------------------
 3637|      0|            goto loser; /* Error set by PK11_ConcatSymKeys */
 3638|      0|        }
 3639|      0|        PK11_FreeSymKey(dheSecret);
 3640|      0|        PK11_FreeSymKey(kemSecret);
 3641|  1.43k|    } else {
 3642|  1.43k|        ss->ssl3.hs.dheSecret = dheSecret;
 3643|  1.43k|    }
 3644|       |
 3645|  1.43k|    tls13_SetKeyExchangeType(ss, entry->group);
 3646|  1.43k|    ss->sec.keaKeyBits = SECKEY_PublicKeyStrengthInBits(keyPair->keys->pubKey);
 3647|       |
 3648|  1.43k|    return SECSuccess;
 3649|       |
 3650|     56|loser:
 3651|     56|    PK11_FreeSymKey(dheSecret);
 3652|     56|    PK11_FreeSymKey(kemSecret);
 3653|     56|    FATAL_ERROR(ss, PORT_GetError(), illegal_parameter);
  ------------------
  |  |   22|     56|    do {                                     \
  |  |   23|     56|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|     56|    do {                                                                           \
  |  |  |  |   15|     56|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|     56|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 56]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|     56|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|     56|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|     56|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|     56|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|     56|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|     56|        tls13_FatalError(ss, prError, desc); \
  |  |   25|     56|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3654|     56|    return SECFailure;
 3655|  1.43k|}
tls13con.c:tls13_HandleCertificateDecode:
 3985|      2|{
 3986|      2|    PORT_Assert(ss->opt.noLocks || ssl_HaveRecvBufLock(ss));
  ------------------
  |  |  120|      2|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      3|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 1, False: 1]
  |  |  |  |  |  Branch (208:7): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3987|      2|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|      2|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      3|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 1, False: 1]
  |  |  |  |  |  Branch (208:7): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3988|       |
 3989|      2|    SECStatus rv = SECFailure;
 3990|       |
 3991|      2|    if (!ss->xtnData.certificateCompressionAdvertised) {
  ------------------
  |  Branch (3991:9): [True: 1, False: 1]
  ------------------
 3992|      1|        FATAL_ERROR(ss, SEC_ERROR_UNEXPECTED_COMPRESSED_CERTIFICATE, decode_error);
  ------------------
  |  |   22|      1|    do {                                     \
  |  |   23|      1|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      1|    do {                                                                           \
  |  |  |  |   15|      1|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      1|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      1|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      1|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      1|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      1|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      1|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      1|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      1|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 3993|      1|        return SECFailure;
 3994|      1|    }
 3995|       |
 3996|      1|    rv = tls13_EnsureCerticateExpected(ss);
 3997|      1|    if (rv != SECSuccess) {
  ------------------
  |  Branch (3997:9): [True: 1, False: 0]
  ------------------
 3998|      1|        return SECFailure; /* Code already set. */
 3999|      1|    }
 4000|       |
 4001|      0|    if (ss->firstHsDone) {
  ------------------
  |  Branch (4001:9): [True: 0, False: 0]
  ------------------
 4002|      0|        rv = ssl_HashPostHandshakeMessage(ss, ssl_hs_compressed_certificate, b, length);
 4003|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (4003:13): [True: 0, False: 0]
  ------------------
 4004|      0|            return rv;
 4005|      0|        }
 4006|      0|    }
 4007|       |
 4008|      0|    SSL_TRC(30, ("%d: TLS1.3[%d]: %s handles certificate compression handshake",
  ------------------
  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    ssl_Trace b
  |  |  ------------------
  |  |  |  Branch (72:15): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4009|      0|                 SSL_GETPID(), ss->fd, SSL_ROLE(ss)));
 4010|       |
 4011|      0|    PRINT_BUF(50, (NULL, "The certificate before decoding:", b, length));
  ------------------
  |  |   74|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   75|      0|    ssl_PrintBuf b
  ------------------
 4012|       |    /* Reading CertificateCompressionAlgorithm. */
 4013|      0|    PRUint32 compressionAlg = 0;
 4014|      0|    rv = ssl3_ConsumeHandshakeNumber(ss, &compressionAlg, 2, &b, &length);
 4015|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (4015:9): [True: 0, False: 0]
  ------------------
 4016|      0|        return SECFailure; /* Alert already sent. */
 4017|      0|    }
 4018|       |
 4019|      0|    PRBool compressionAlgorithmIsSupported = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 4020|      0|    SECStatus (*certificateDecodingFunc)(const SECItem *,
 4021|      0|                                         unsigned char *output, size_t outputLen, size_t *usedLen) = NULL;
 4022|      0|    for (int i = 0; i < ss->ssl3.supportedCertCompressionAlgorithmsCount; i++) {
  ------------------
  |  Branch (4022:21): [True: 0, False: 0]
  ------------------
 4023|      0|        if (ss->ssl3.supportedCertCompressionAlgorithms[i].id == compressionAlg) {
  ------------------
  |  Branch (4023:13): [True: 0, False: 0]
  ------------------
 4024|      0|            compressionAlgorithmIsSupported = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 4025|      0|            certificateDecodingFunc = ss->ssl3.supportedCertCompressionAlgorithms[i].decode;
 4026|      0|        }
 4027|      0|    }
 4028|       |
 4029|       |    /* Peer selected a compression algorithm we do not support (and did not advertise). */
 4030|      0|    if (!compressionAlgorithmIsSupported) {
  ------------------
  |  Branch (4030:9): [True: 0, False: 0]
  ------------------
 4031|      0|        PORT_SetError(SEC_ERROR_CERTIFICATE_COMPRESSION_ALGORITHM_NOT_SUPPORTED);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 4032|      0|        FATAL_ERROR(ss, PORT_GetError(), illegal_parameter);
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 4033|      0|        return SECFailure;
 4034|      0|    }
 4035|       |
 4036|       |    /* The algorithm does not support decoding. */
 4037|      0|    if (certificateDecodingFunc == NULL) {
  ------------------
  |  Branch (4037:9): [True: 0, False: 0]
  ------------------
 4038|      0|        PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 4039|      0|        FATAL_ERROR(ss, PORT_GetError(), illegal_parameter);
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 4040|      0|        return SECFailure;
 4041|      0|    }
 4042|       |
 4043|      0|    SSL_TRC(30, ("%d: TLS13[%d]: %s is decoding the certificate using the %s compression algorithm",
  ------------------
  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    ssl_Trace b
  |  |  ------------------
  |  |  |  Branch (72:15): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4044|      0|                 SSL_GETPID(), ss->fd, SSL_ROLE(ss),
 4045|      0|                 ssl3_mapCertificateCompressionAlgorithmToName(ss, compressionAlg)));
 4046|      0|    PRUint32 decodedCertLen = 0;
 4047|      0|    rv = ssl3_ConsumeHandshakeNumber(ss, &decodedCertLen, 3, &b, &length);
 4048|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (4048:9): [True: 0, False: 0]
  ------------------
 4049|      0|        return SECFailure; /* alert has been sent */
 4050|      0|    }
 4051|       |
 4052|       |    /*  If the received CompressedCertificate message cannot be decompressed,
 4053|       |     *  he connection MUST be terminated with the "bad_certificate" alert.
 4054|       |     */
 4055|      0|    if (decodedCertLen == 0) {
  ------------------
  |  Branch (4055:9): [True: 0, False: 0]
  ------------------
 4056|      0|        SSL_TRC(50, ("%d: TLS13[%d]: %s decoded certificate length is incorrect",
  ------------------
  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    ssl_Trace b
  |  |  ------------------
  |  |  |  Branch (72:15): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4057|      0|                     SSL_GETPID(), ss->fd, SSL_ROLE(ss),
 4058|      0|                     ssl3_mapCertificateCompressionAlgorithmToName(ss, compressionAlg)));
 4059|      0|        FATAL_ERROR(ss, SSL_ERROR_RX_MALFORMED_CERTIFICATE, bad_certificate);
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 4060|      0|        return SECFailure;
 4061|      0|    }
 4062|       |
 4063|       |    /* opaque compressed_certificate_message<1..2^24-1>; */
 4064|      0|    PRUint32 compressedCertLen = 0;
 4065|      0|    rv = ssl3_ConsumeHandshakeNumber(ss, &compressedCertLen, 3, &b, &length);
 4066|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (4066:9): [True: 0, False: 0]
  ------------------
 4067|      0|        return SECFailure; /* alert has been sent */
 4068|      0|    }
 4069|       |
 4070|      0|    if (compressedCertLen == 0 || compressedCertLen != length) {
  ------------------
  |  Branch (4070:9): [True: 0, False: 0]
  |  Branch (4070:35): [True: 0, False: 0]
  ------------------
 4071|      0|        FATAL_ERROR(ss, SSL_ERROR_RX_MALFORMED_CERTIFICATE, bad_certificate);
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 4072|      0|        return SECFailure;
 4073|      0|    }
 4074|       |
 4075|       |    /* Decoding received certificate. */
 4076|      0|    PRUint8 *decodedCert = PORT_ZAlloc(decodedCertLen);
  ------------------
  |  |   72|      0|#define PORT_ZAlloc PORT_ZAlloc_Util
  ------------------
 4077|      0|    if (!decodedCert) {
  ------------------
  |  Branch (4077:9): [True: 0, False: 0]
  ------------------
 4078|      0|        return SECFailure;
 4079|      0|    }
 4080|       |
 4081|      0|    size_t actualCertLen = 0;
 4082|       |
 4083|      0|    SECItem encodedCertAsSecItem = { siBuffer, b, compressedCertLen };
 4084|      0|    rv = certificateDecodingFunc(&encodedCertAsSecItem,
 4085|      0|                                 decodedCert, decodedCertLen, &actualCertLen);
 4086|       |
 4087|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (4087:9): [True: 0, False: 0]
  ------------------
 4088|      0|        SSL_TRC(50, ("%d: TLS13[%d]: %s decoding of the certificate has failed",
  ------------------
  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    ssl_Trace b
  |  |  ------------------
  |  |  |  Branch (72:15): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4089|      0|                     SSL_GETPID(), ss->fd, SSL_ROLE(ss),
 4090|      0|                     ssl3_mapCertificateCompressionAlgorithmToName(ss, compressionAlg)));
 4091|      0|        FATAL_ERROR(ss, SSL_ERROR_RX_MALFORMED_CERTIFICATE, bad_certificate);
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 4092|      0|        goto loser;
 4093|      0|    }
 4094|      0|    PRINT_BUF(60, (ss, "consume bytes:", b, compressedCertLen));
  ------------------
  |  |   74|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   75|      0|    ssl_PrintBuf b
  ------------------
 4095|      0|    *b += compressedCertLen;
 4096|      0|    length -= compressedCertLen;
 4097|       |
 4098|       |    /*  If, after decompression, the specified length does not match the actual length,
 4099|       |     *  the party receiving the invalid message MUST abort the connection
 4100|       |     *  with the "bad_certificate" alert.
 4101|       |     */
 4102|      0|    if (actualCertLen != decodedCertLen) {
  ------------------
  |  Branch (4102:9): [True: 0, False: 0]
  ------------------
 4103|      0|        SSL_TRC(50, ("%d: TLS13[%d]: %s certificate length does not correspond to extension length",
  ------------------
  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    ssl_Trace b
  |  |  ------------------
  |  |  |  Branch (72:15): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4104|      0|                     SSL_GETPID(), ss->fd, SSL_ROLE(ss),
 4105|      0|                     ssl3_mapCertificateCompressionAlgorithmToName(ss, compressionAlg)));
 4106|      0|        FATAL_ERROR(ss, SSL_ERROR_RX_MALFORMED_CERTIFICATE, bad_certificate);
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 4107|      0|        goto loser;
 4108|      0|    }
 4109|       |
 4110|      0|    PRINT_BUF(50, (NULL, "Decoded certificate",
  ------------------
  |  |   74|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   75|      0|    ssl_PrintBuf b
  ------------------
 4111|      0|                   decodedCert, decodedCertLen));
 4112|       |
 4113|       |    /* compressed_certificate_message:  The result of applying the indicated
 4114|       |     * compression algorithm to the encoded Certificate message that
 4115|       |     *  would have been sent if certificate compression was not in use.
 4116|       |     *
 4117|       |     * After decompression, the Certificate message MUST be processed as if
 4118|       |     * it were encoded without being compressed.  This way, the parsing and
 4119|       |     * the verification have the same security properties as they would have
 4120|       |     * in TLS normally.
 4121|       |     */
 4122|      0|    rv = tls13_HandleCertificate(ss, decodedCert, decodedCertLen, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 4123|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (4123:9): [True: 0, False: 0]
  ------------------
 4124|      0|        goto loser;
 4125|      0|    }
 4126|       |    /* We allow only one compressed certificate to be handled after each
 4127|       |       certificate compression advertisement.
 4128|       |       See test CertificateCompression_TwoEncodedCertificateRequests. */
 4129|      0|    ss->xtnData.certificateCompressionAdvertised = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 4130|      0|    PORT_Free(decodedCert);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 4131|      0|    return SECSuccess;
 4132|       |
 4133|      0|loser:
 4134|      0|    PORT_Free(decodedCert);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 4135|      0|    return SECFailure;
 4136|      0|}
tls13con.c:tls13_EnsureCerticateExpected:
 3949|      3|{
 3950|      3|    SECStatus rv = SECFailure;
 3951|      3|    PORT_Assert(ss->opt.noLocks || ssl_HaveRecvBufLock(ss));
  ------------------
  |  |  120|      3|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      4|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 2, False: 1]
  |  |  |  |  |  Branch (208:7): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3952|      3|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|      3|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      4|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 2, False: 1]
  |  |  |  |  |  Branch (208:7): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3953|       |
 3954|      3|    if (ss->sec.isServer) {
  ------------------
  |  Branch (3954:9): [True: 0, False: 3]
  ------------------
 3955|       |        /* Receiving this message might be the first sign we have that
 3956|       |         * early data is over, so pretend we received EOED. */
 3957|      0|        rv = tls13_MaybeHandleSuppressedEndOfEarlyData(ss);
 3958|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (3958:13): [True: 0, False: 0]
  ------------------
 3959|      0|            return SECFailure; /* Code already set. */
 3960|      0|        }
 3961|       |
 3962|      0|        if (ss->ssl3.clientCertRequested) {
  ------------------
  |  Branch (3962:13): [True: 0, False: 0]
  ------------------
 3963|      0|            rv = TLS13_CHECK_HS_STATE(ss, SSL_ERROR_RX_UNEXPECTED_CERTIFICATE,
  ------------------
  |  |  182|      0|    tls13_CheckHsState(ss, err, #err, __func__, __FILE__, __LINE__, \
  |  |  183|      0|                       __VA_ARGS__,                                 \
  |  |  184|      0|                       wait_invalid)
  ------------------
 3964|      0|                                      idle_handshake);
 3965|      0|        } else {
 3966|      0|            rv = TLS13_CHECK_HS_STATE(ss, SSL_ERROR_RX_UNEXPECTED_CERTIFICATE,
  ------------------
  |  |  182|      0|    tls13_CheckHsState(ss, err, #err, __func__, __FILE__, __LINE__, \
  |  |  183|      0|                       __VA_ARGS__,                                 \
  |  |  184|      0|                       wait_invalid)
  ------------------
 3967|      0|                                      wait_client_cert);
 3968|      0|        }
 3969|      3|    } else {
 3970|      3|        rv = TLS13_CHECK_HS_STATE(ss, SSL_ERROR_RX_UNEXPECTED_CERTIFICATE,
  ------------------
  |  |  182|      3|    tls13_CheckHsState(ss, err, #err, __func__, __FILE__, __LINE__, \
  |  |  183|      3|                       __VA_ARGS__,                                 \
  |  |  184|      3|                       wait_invalid)
  ------------------
 3971|      3|                                  wait_cert_request, wait_server_cert);
 3972|      3|    }
 3973|      3|    return rv;
 3974|      3|}
tls13con.c:tls13_HandleCertificate:
 4144|      2|{
 4145|      2|    SECStatus rv;
 4146|      2|    SECItem context = { siBuffer, NULL, 0 };
 4147|      2|    SECItem certList;
 4148|      2|    PRBool first = PR_TRUE;
  ------------------
  |  |  437|      2|#define PR_TRUE 1
  ------------------
 4149|      2|    ssl3CertNode *lastCert = NULL;
 4150|       |
 4151|      2|    SSL_TRC(3, ("%d: TLS13[%d]: handle certificate handshake",
  ------------------
  |  |   71|      2|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 2]
  |  |  ------------------
  |  |   72|      2|    ssl_Trace b
  ------------------
 4152|      2|                SSL_GETPID(), ss->fd));
 4153|      2|    PORT_Assert(ss->opt.noLocks || ssl_HaveRecvBufLock(ss));
  ------------------
  |  |  120|      2|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      3|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 1, False: 1]
  |  |  |  |  |  Branch (208:7): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4154|      2|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|      2|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      3|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 1, False: 1]
  |  |  |  |  |  Branch (208:7): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4155|       |
 4156|      2|    rv = tls13_EnsureCerticateExpected(ss);
 4157|      2|    if (rv != SECSuccess) {
  ------------------
  |  Branch (4157:9): [True: 2, False: 0]
  ------------------
 4158|      2|        return SECFailure; /* Code already set. */
 4159|      2|    }
 4160|       |
 4161|       |    /* We can ignore any other cleartext from the client. */
 4162|      0|    if (ss->sec.isServer && IS_DTLS(ss)) {
  ------------------
  |  |  892|      0|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (4162:9): [True: 0, False: 0]
  ------------------
 4163|      0|        ssl_CipherSpecReleaseByEpoch(ss, ssl_secret_read, TrafficKeyClearText);
 4164|      0|        dtls_ReceivedFirstMessageInFlight(ss);
 4165|      0|    }
 4166|       |
 4167|       |    /* AlreadyHashed is true only when Certificate Compression is used. */
 4168|      0|    if (ss->firstHsDone && !alreadyHashed) {
  ------------------
  |  Branch (4168:9): [True: 0, False: 0]
  |  Branch (4168:28): [True: 0, False: 0]
  ------------------
 4169|      0|        rv = ssl_HashPostHandshakeMessage(ss, ssl_hs_certificate, b, length);
 4170|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (4170:13): [True: 0, False: 0]
  ------------------
 4171|      0|            PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 4172|      0|            return SECFailure;
 4173|      0|        }
 4174|      0|    }
 4175|       |
 4176|      0|    if (!ss->firstHsDone && ss->sec.isServer) {
  ------------------
  |  Branch (4176:9): [True: 0, False: 0]
  |  Branch (4176:29): [True: 0, False: 0]
  ------------------
 4177|       |        /* Our first shot an getting an RTT estimate.  If the client took extra
 4178|       |         * time to fetch a certificate, this will be bad, but we can't do much
 4179|       |         * about that. */
 4180|      0|        ss->ssl3.hs.rttEstimate = ssl_Time(ss) - ss->ssl3.hs.rttEstimate;
 4181|      0|    }
 4182|       |
 4183|       |    /* Process the context string */
 4184|      0|    rv = ssl3_ConsumeHandshakeVariable(ss, &context, 1, &b, &length);
 4185|      0|    if (rv != SECSuccess)
  ------------------
  |  Branch (4185:9): [True: 0, False: 0]
  ------------------
 4186|      0|        return SECFailure;
 4187|       |
 4188|      0|    if (ss->ssl3.clientCertRequested) {
  ------------------
  |  Branch (4188:9): [True: 0, False: 0]
  ------------------
 4189|      0|        PORT_Assert(ss->sec.isServer);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4190|      0|        if (SECITEM_CompareItem(&context, &ss->xtnData.certReqContext) != 0) {
  ------------------
  |  |  105|      0|#define SECITEM_CompareItem SECITEM_CompareItem_Util
  ------------------
  |  Branch (4190:13): [True: 0, False: 0]
  ------------------
 4191|      0|            FATAL_ERROR(ss, SSL_ERROR_RX_MALFORMED_CERTIFICATE, illegal_parameter);
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 4192|      0|            return SECFailure;
 4193|      0|        }
 4194|      0|    }
 4195|      0|    rv = ssl3_ConsumeHandshakeVariable(ss, &certList, 3, &b, &length);
 4196|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (4196:9): [True: 0, False: 0]
  ------------------
 4197|      0|        return SECFailure;
 4198|      0|    }
 4199|      0|    if (length) {
  ------------------
  |  Branch (4199:9): [True: 0, False: 0]
  ------------------
 4200|      0|        FATAL_ERROR(ss, SSL_ERROR_RX_MALFORMED_CERTIFICATE, illegal_parameter);
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 4201|      0|        return SECFailure;
 4202|      0|    }
 4203|       |
 4204|      0|    if (!certList.len) {
  ------------------
  |  Branch (4204:9): [True: 0, False: 0]
  ------------------
 4205|      0|        if (!ss->sec.isServer) {
  ------------------
  |  Branch (4205:13): [True: 0, False: 0]
  ------------------
 4206|       |            /* Servers always need to send some cert. */
 4207|      0|            FATAL_ERROR(ss, SSL_ERROR_RX_MALFORMED_CERTIFICATE, bad_certificate);
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 4208|      0|            return SECFailure;
 4209|      0|        } else {
 4210|       |            /* This is TLS's version of a no_certificate alert. */
 4211|       |            /* I'm a server. I've requested a client cert. He hasn't got one. */
 4212|      0|            rv = ssl3_HandleNoCertificate(ss);
 4213|      0|            if (rv != SECSuccess) {
  ------------------
  |  Branch (4213:17): [True: 0, False: 0]
  ------------------
 4214|      0|                return SECFailure;
 4215|      0|            }
 4216|       |
 4217|      0|            TLS13_SET_HS_STATE(ss, wait_finished);
  ------------------
  |  |   37|      0|    tls13_SetHsState(ss, ws, __func__, __FILE__, __LINE__)
  ------------------
 4218|      0|            return SECSuccess;
 4219|      0|        }
 4220|      0|    }
 4221|       |
 4222|       |    /* Now clean up. */
 4223|      0|    ssl3_CleanupPeerCerts(ss);
 4224|      0|    ss->ssl3.peerCertArena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
  ------------------
  |  |   63|      0|#define PORT_NewArena PORT_NewArena_Util
  ------------------
                  ss->ssl3.peerCertArena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
  ------------------
  |  |   60|      0|#define DER_DEFAULT_CHUNKSIZE (2048)
  ------------------
 4225|      0|    if (ss->ssl3.peerCertArena == NULL) {
  ------------------
  |  Branch (4225:9): [True: 0, False: 0]
  ------------------
 4226|      0|        FATAL_ERROR(ss, SEC_ERROR_NO_MEMORY, internal_error);
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 4227|      0|        return SECFailure;
 4228|      0|    }
 4229|       |
 4230|      0|    while (certList.len) {
  ------------------
  |  Branch (4230:12): [True: 0, False: 0]
  ------------------
 4231|      0|        SECItem derCert; // will hold a weak reference into certList
 4232|      0|        rv = tls13_HandleCertificateEntry(ss, &certList, first,
 4233|      0|                                          &derCert);
 4234|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (4234:13): [True: 0, False: 0]
  ------------------
 4235|      0|            ss->xtnData.signedCertTimestamps.len = 0;
 4236|      0|            return SECFailure;
 4237|      0|        }
 4238|       |
 4239|      0|        if (first) {
  ------------------
  |  Branch (4239:13): [True: 0, False: 0]
  ------------------
 4240|      0|            ss->sec.peerCert = CERT_NewTempCertificate(ss->dbHandle, &derCert,
 4241|      0|                                                       NULL, PR_FALSE, PR_TRUE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
                                                                     NULL, PR_FALSE, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 4242|      0|            if (!ss->sec.peerCert) {
  ------------------
  |  Branch (4242:17): [True: 0, False: 0]
  ------------------
 4243|      0|                PRErrorCode errCode = PORT_GetError();
  ------------------
  |  |   62|      0|#define PORT_GetError PORT_GetError_Util
  ------------------
 4244|      0|                switch (errCode) {
 4245|      0|                    case PR_OUT_OF_MEMORY_ERROR:
  ------------------
  |  |   16|      0|#define PR_OUT_OF_MEMORY_ERROR                   (-6000L)
  ------------------
  |  Branch (4245:21): [True: 0, False: 0]
  ------------------
 4246|      0|                    case SEC_ERROR_BAD_DATABASE:
  ------------------
  |  Branch (4246:21): [True: 0, False: 0]
  ------------------
 4247|      0|                    case SEC_ERROR_NO_MEMORY:
  ------------------
  |  Branch (4247:21): [True: 0, False: 0]
  ------------------
 4248|      0|                        FATAL_ERROR(ss, errCode, internal_error);
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 4249|      0|                        return SECFailure;
 4250|      0|                    default:
  ------------------
  |  Branch (4250:21): [True: 0, False: 0]
  ------------------
 4251|      0|                        ssl3_SendAlertForCertError(ss, errCode);
 4252|      0|                        return SECFailure;
 4253|      0|                }
 4254|      0|            }
 4255|       |
 4256|      0|            if (ss->xtnData.signedCertTimestamps.len) {
  ------------------
  |  Branch (4256:17): [True: 0, False: 0]
  ------------------
 4257|      0|                sslSessionID *sid = ss->sec.ci.sid;
 4258|      0|                rv = SECITEM_CopyItem(NULL, &sid->u.ssl3.signedCertTimestamps,
  ------------------
  |  |  106|      0|#define SECITEM_CopyItem SECITEM_CopyItem_Util
  ------------------
 4259|      0|                                      &ss->xtnData.signedCertTimestamps);
 4260|      0|                ss->xtnData.signedCertTimestamps.len = 0;
 4261|      0|                if (rv != SECSuccess) {
  ------------------
  |  Branch (4261:21): [True: 0, False: 0]
  ------------------
 4262|      0|                    FATAL_ERROR(ss, SEC_ERROR_NO_MEMORY, internal_error);
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 4263|      0|                    return SECFailure;
 4264|      0|                }
 4265|      0|            }
 4266|      0|        } else {
 4267|      0|            ssl3CertNode *c = PORT_ArenaNew(ss->ssl3.peerCertArena,
  ------------------
  |  |  153|      0|    (type *)PORT_ArenaAlloc(poolp, sizeof(type))
  |  |  ------------------
  |  |  |  |   53|      0|#define PORT_ArenaAlloc PORT_ArenaAlloc_Util
  |  |  ------------------
  ------------------
 4268|      0|                                            ssl3CertNode);
 4269|      0|            if (!c) {
  ------------------
  |  Branch (4269:17): [True: 0, False: 0]
  ------------------
 4270|      0|                FATAL_ERROR(ss, SEC_ERROR_NO_MEMORY, internal_error);
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 4271|      0|                return SECFailure;
 4272|      0|            }
 4273|      0|            c->derCert = SECITEM_ArenaDupItem(ss->ssl3.peerCertArena,
  ------------------
  |  |  104|      0|#define SECITEM_ArenaDupItem SECITEM_ArenaDupItem_Util
  ------------------
 4274|      0|                                              &derCert);
 4275|      0|            c->next = NULL;
 4276|       |
 4277|      0|            if (lastCert) {
  ------------------
  |  Branch (4277:17): [True: 0, False: 0]
  ------------------
 4278|      0|                lastCert->next = c;
 4279|      0|            } else {
 4280|      0|                ss->ssl3.peerCertChain = c;
 4281|      0|            }
 4282|      0|            lastCert = c;
 4283|      0|        }
 4284|       |
 4285|      0|        first = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 4286|      0|    }
 4287|      0|    SECKEY_UpdateCertPQG(ss->sec.peerCert);
 4288|       |
 4289|      0|    return ssl3_AuthCertificate(ss); /* sets ss->ssl3.hs.ws */
 4290|      0|}
tls13con.c:tls13_SetCipherSpec:
 4696|  1.60k|{
 4697|  1.60k|    TrafficKeyType type;
 4698|  1.60k|    SECStatus rv;
 4699|  1.60k|    ssl3CipherSpec *spec = NULL;
 4700|  1.60k|    ssl3CipherSpec **specp;
 4701|       |
 4702|       |    /* Flush out old handshake data. */
 4703|  1.60k|    ssl_GetXmitBufLock(ss);
  ------------------
  |  | 1466|  1.60k|    {                                           \
  |  | 1467|  1.60k|        if (!ss->opt.noLocks)                   \
  |  |  ------------------
  |  |  |  Branch (1467:13): [True: 762, False: 845]
  |  |  ------------------
  |  | 1468|  1.60k|            PZ_EnterMonitor((ss)->xmitBufLock); \
  |  |  ------------------
  |  |  |  |  256|    762|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1469|  1.60k|    }
  ------------------
 4704|  1.60k|    rv = ssl3_FlushHandshake(ss, ssl_SEND_FLAG_FORCE_INTO_BUFFER);
  ------------------
  |  |  223|  1.60k|#define ssl_SEND_FLAG_FORCE_INTO_BUFFER 0x40000000
  ------------------
 4705|  1.60k|    ssl_ReleaseXmitBufLock(ss);
  ------------------
  |  | 1471|  1.60k|    {                                          \
  |  | 1472|  1.60k|        if (!ss->opt.noLocks)                  \
  |  |  ------------------
  |  |  |  Branch (1472:13): [True: 762, False: 845]
  |  |  ------------------
  |  | 1473|  1.60k|            PZ_ExitMonitor((ss)->xmitBufLock); \
  |  |  ------------------
  |  |  |  |  257|    762|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1474|  1.60k|    }
  ------------------
 4706|  1.60k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (4706:9): [True: 0, False: 1.60k]
  ------------------
 4707|      0|        return SECFailure;
 4708|      0|    }
 4709|       |
 4710|       |    /* Create the new spec. */
 4711|  1.60k|    spec = ssl_CreateCipherSpec(ss, direction);
 4712|  1.60k|    if (!spec) {
  ------------------
  |  Branch (4712:9): [True: 0, False: 1.60k]
  ------------------
 4713|      0|        return SECFailure;
 4714|      0|    }
 4715|  1.60k|    spec->epoch = epoch;
 4716|  1.60k|    spec->nextSeqNum = 0;
 4717|  1.60k|    if (IS_DTLS(ss)) {
  ------------------
  |  |  892|  1.60k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 1.60k, False: 0]
  |  |  ------------------
  ------------------
 4718|  1.60k|        dtls_InitRecvdRecords(&spec->recvdRecords);
 4719|  1.60k|    }
 4720|       |
 4721|       |    /* This depends on spec having a valid direction and epoch. */
 4722|  1.60k|    rv = tls13_SetupPendingCipherSpec(ss, spec);
 4723|  1.60k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (4723:9): [True: 0, False: 1.60k]
  ------------------
 4724|      0|        goto loser;
 4725|      0|    }
 4726|       |
 4727|  1.60k|    type = (TrafficKeyType)PR_MIN(TrafficKeyApplicationData, epoch);
  ------------------
  |  |  158|  1.60k|#define PR_MIN(x,y)     ((x)<(y)?(x):(y))
  |  |  ------------------
  |  |  |  Branch (158:26): [True: 0, False: 1.60k]
  |  |  ------------------
  ------------------
 4728|  1.60k|    rv = tls13_DeriveTrafficKeys(ss, spec, type, deleteSecret);
 4729|  1.60k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (4729:9): [True: 0, False: 1.60k]
  ------------------
 4730|      0|        goto loser;
 4731|      0|    }
 4732|       |
 4733|  1.60k|    rv = tls13_InitPendingContext(ss, spec);
 4734|  1.60k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (4734:9): [True: 0, False: 1.60k]
  ------------------
 4735|      0|        goto loser;
 4736|      0|    }
 4737|       |
 4738|       |    /* Now that we've set almost everything up, finally cut over. */
 4739|  1.60k|    specp = (direction == ssl_secret_read) ? &ss->ssl3.crSpec : &ss->ssl3.cwSpec;
  ------------------
  |  Branch (4739:13): [True: 1.43k, False: 173]
  ------------------
 4740|  1.60k|    ssl_GetSpecWriteLock(ss);
  ------------------
  |  | 1435|  1.60k|    {                                            \
  |  | 1436|  1.60k|        if (!ss->opt.noLocks)                    \
  |  |  ------------------
  |  |  |  Branch (1436:13): [True: 762, False: 845]
  |  |  ------------------
  |  | 1437|  1.60k|            NSSRWLock_LockWrite((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   48|    762|#define NSSRWLock_LockWrite NSSRWLock_LockWrite_Util
  |  |  ------------------
  |  | 1438|  1.60k|    }
  ------------------
 4741|  1.60k|    ssl_CipherSpecRelease(*specp); /* May delete old cipher. */
 4742|  1.60k|    *specp = spec;                 /* Overwrite. */
 4743|  1.60k|    ssl_ReleaseSpecWriteLock(ss);
  ------------------
  |  | 1440|  1.60k|    {                                              \
  |  | 1441|  1.60k|        if (!ss->opt.noLocks)                      \
  |  |  ------------------
  |  |  |  Branch (1441:13): [True: 762, False: 845]
  |  |  ------------------
  |  | 1442|  1.60k|            NSSRWLock_UnlockWrite((ss)->specLock); \
  |  |  ------------------
  |  |  |  |   51|    762|#define NSSRWLock_UnlockWrite NSSRWLock_UnlockWrite_Util
  |  |  ------------------
  |  | 1443|  1.60k|    }
  ------------------
 4744|       |
 4745|  1.60k|    SSL_TRC(3, ("%d: TLS13[%d]: %s installed key for epoch=%d (%s) dir=%s",
  ------------------
  |  |   71|  1.60k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 1.60k]
  |  |  ------------------
  |  |   72|  1.60k|    ssl_Trace b
  |  |  ------------------
  |  |  |  Branch (72:15): [True: 0, False: 0]
  |  |  |  Branch (72:15): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4746|  1.60k|                SSL_GETPID(), ss->fd, SSL_ROLE(ss), spec->epoch,
 4747|  1.60k|                spec->phase, SPEC_DIR(spec)));
 4748|  1.60k|    return SECSuccess;
 4749|       |
 4750|      0|loser:
 4751|      0|    ssl_CipherSpecRelease(spec);
 4752|      0|    return SECFailure;
 4753|  1.60k|}
tls13con.c:tls13_SetupPendingCipherSpec:
 4578|  1.60k|{
 4579|  1.60k|    ssl3CipherSuite suite = ss->ssl3.hs.cipher_suite;
 4580|       |
 4581|  1.60k|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|  1.60k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  2.36k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 845, False: 762]
  |  |  |  |  |  Branch (208:7): [True: 762, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4582|  1.60k|    PORT_Assert(spec->epoch);
  ------------------
  |  |  120|  1.60k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.60k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.60k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4583|       |
 4584|       |    /* Version isn't set when we send 0-RTT data. */
 4585|  1.60k|    spec->version = PR_MAX(SSL_LIBRARY_VERSION_TLS_1_3, ss->version);
  ------------------
  |  |  159|  1.60k|#define PR_MAX(x,y)     ((x)>(y)?(x):(y))
  |  |  ------------------
  |  |  |  Branch (159:26): [True: 0, False: 1.60k]
  |  |  ------------------
  ------------------
 4586|       |
 4587|  1.60k|    ssl_SaveCipherSpec(ss, spec);
 4588|       |    /* We want to keep read cipher specs around longer because
 4589|       |     * there are cases where we might get either epoch N or
 4590|       |     * epoch N+1. */
 4591|  1.60k|    if (IS_DTLS(ss) && spec->direction == ssl_secret_read) {
  ------------------
  |  |  892|  3.21k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 1.60k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (4591:24): [True: 1.43k, False: 173]
  ------------------
 4592|  1.43k|        ssl_CipherSpecAddRef(spec);
 4593|  1.43k|    }
 4594|       |
 4595|  1.60k|    SSL_TRC(3, ("%d: TLS13[%d]: Set Pending Cipher Suite to 0x%04x",
  ------------------
  |  |   71|  1.60k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 1.60k]
  |  |  ------------------
  |  |   72|  1.60k|    ssl_Trace b
  ------------------
 4596|  1.60k|                SSL_GETPID(), ss->fd, suite));
 4597|       |
 4598|  1.60k|    spec->cipherDef = ssl_GetBulkCipherDef(ssl_LookupCipherSuiteDef(suite));
 4599|       |
 4600|  1.60k|    if (spec->epoch == TrafficKeyEarlyApplicationData) {
  ------------------
  |  Branch (4600:9): [True: 0, False: 1.60k]
  ------------------
 4601|      0|        if (ss->xtnData.selectedPsk &&
  ------------------
  |  Branch (4601:13): [True: 0, False: 0]
  ------------------
 4602|      0|            ss->xtnData.selectedPsk->zeroRttSuite != TLS_NULL_WITH_NULL_NULL) {
  ------------------
  |  |   76|      0|#define TLS_NULL_WITH_NULL_NULL                 0x0000
  ------------------
  |  Branch (4602:13): [True: 0, False: 0]
  ------------------
 4603|      0|            spec->earlyDataRemaining = ss->xtnData.selectedPsk->maxEarlyData;
 4604|      0|        }
 4605|      0|    }
 4606|       |
 4607|  1.60k|    tls13_SetSpecRecordVersion(ss, spec);
 4608|       |
 4609|       |    /* The record size limit is reduced by one so that the remainder of the
 4610|       |     * record handling code can use the same checks for all versions. */
 4611|  1.60k|    if (ssl3_ExtensionNegotiated(ss, ssl_record_size_limit_xtn)) {
  ------------------
  |  Branch (4611:9): [True: 0, False: 1.60k]
  ------------------
 4612|      0|        spec->recordSizeLimit = ((spec->direction == ssl_secret_read)
  ------------------
  |  Branch (4612:34): [True: 0, False: 0]
  ------------------
 4613|      0|                                     ? ss->opt.recordSizeLimit
 4614|      0|                                     : ss->xtnData.recordSizeLimit) -
 4615|      0|                                1;
 4616|  1.60k|    } else {
 4617|  1.60k|        spec->recordSizeLimit = MAX_FRAGMENT_LENGTH;
  ------------------
  |  |   35|  1.60k|#define MAX_FRAGMENT_LENGTH 16384
  ------------------
 4618|  1.60k|    }
 4619|  1.60k|    return SECSuccess;
 4620|  1.60k|}
tls13con.c:tls13_DeriveTrafficKeys:
 4472|  1.60k|{
 4473|  1.60k|    size_t keySize = spec->cipherDef->key_size;
 4474|  1.60k|    size_t ivSize = spec->cipherDef->iv_size +
 4475|  1.60k|                    spec->cipherDef->explicit_nonce_size; /* This isn't always going to
 4476|       |                                                           * work, but it does for
 4477|       |                                                           * AES-GCM */
 4478|  1.60k|    CK_MECHANISM_TYPE bulkAlgorithm = ssl3_Alg2Mech(spec->cipherDef->calg);
 4479|  1.60k|    PK11SymKey **prkp = NULL;
 4480|  1.60k|    PK11SymKey *prk = NULL;
 4481|  1.60k|    PRBool clientSecret;
 4482|  1.60k|    SECStatus rv;
 4483|       |    /* These labels are just used for debugging. */
 4484|  1.60k|    static const char kHkdfPhaseEarlyApplicationDataKeys[] = "early application data";
 4485|  1.60k|    static const char kHkdfPhaseHandshakeKeys[] = "handshake data";
 4486|  1.60k|    static const char kHkdfPhaseApplicationDataKeys[] = "application data";
 4487|       |
 4488|  1.60k|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|  1.60k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  2.36k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 845, False: 762]
  |  |  |  |  |  Branch (208:7): [True: 762, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4489|       |
 4490|  1.60k|    clientSecret = !tls13_UseServerSecret(ss, spec->direction);
 4491|  1.60k|    switch (type) {
 4492|      0|        case TrafficKeyEarlyApplicationData:
  ------------------
  |  Branch (4492:9): [True: 0, False: 1.60k]
  ------------------
 4493|      0|            PORT_Assert(clientSecret);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4494|      0|            prkp = &ss->ssl3.hs.clientEarlyTrafficSecret;
 4495|      0|            spec->phase = kHkdfPhaseEarlyApplicationDataKeys;
 4496|      0|            break;
 4497|  1.60k|        case TrafficKeyHandshake:
  ------------------
  |  Branch (4497:9): [True: 1.60k, False: 0]
  ------------------
 4498|  1.60k|            prkp = clientSecret ? &ss->ssl3.hs.clientHsTrafficSecret
  ------------------
  |  Branch (4498:20): [True: 173, False: 1.43k]
  ------------------
 4499|  1.60k|                                : &ss->ssl3.hs.serverHsTrafficSecret;
 4500|  1.60k|            spec->phase = kHkdfPhaseHandshakeKeys;
 4501|  1.60k|            break;
 4502|      0|        case TrafficKeyApplicationData:
  ------------------
  |  Branch (4502:9): [True: 0, False: 1.60k]
  ------------------
 4503|      0|            prkp = clientSecret ? &ss->ssl3.hs.clientTrafficSecret
  ------------------
  |  Branch (4503:20): [True: 0, False: 0]
  ------------------
 4504|      0|                                : &ss->ssl3.hs.serverTrafficSecret;
 4505|      0|            spec->phase = kHkdfPhaseApplicationDataKeys;
 4506|      0|            break;
 4507|      0|        default:
  ------------------
  |  Branch (4507:9): [True: 0, False: 1.60k]
  ------------------
 4508|      0|            LOG_ERROR(ss, SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   14|      0|    do {                                                                           \
  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  ------------------
  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|    ssl_Trace b
  |  |  ------------------
  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  ------------------
  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  ------------------
  |  |   18|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 4509|      0|            PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4510|      0|            return SECFailure;
 4511|  1.60k|    }
 4512|  1.60k|    PORT_Assert(prkp != NULL);
  ------------------
  |  |  120|  1.60k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.60k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.60k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4513|  1.60k|    prk = *prkp;
 4514|       |
 4515|  1.60k|    SSL_TRC(3, ("%d: TLS13[%d]: deriving %s traffic keys epoch=%d (%s)",
  ------------------
  |  |   71|  1.60k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 1.60k]
  |  |  ------------------
  |  |   72|  1.60k|    ssl_Trace b
  |  |  ------------------
  |  |  |  Branch (72:15): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4516|  1.60k|                SSL_GETPID(), ss->fd, SPEC_DIR(spec),
 4517|  1.60k|                spec->epoch, spec->phase));
 4518|       |
 4519|  1.60k|    rv = tls13_HkdfExpandLabel(prk, tls13_GetHash(ss),
 4520|  1.60k|                               NULL, 0,
 4521|  1.60k|                               kHkdfPurposeKey, strlen(kHkdfPurposeKey),
 4522|  1.60k|                               bulkAlgorithm, keySize,
 4523|  1.60k|                               ss->protocolVariant,
 4524|  1.60k|                               &spec->keyMaterial.key);
 4525|  1.60k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (4525:9): [True: 0, False: 1.60k]
  ------------------
 4526|      0|        LOG_ERROR(ss, SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   14|      0|    do {                                                                           \
  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  ------------------
  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|    ssl_Trace b
  |  |  ------------------
  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  ------------------
  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  ------------------
  |  |   18|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 4527|      0|        PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4528|      0|        goto loser;
 4529|      0|    }
 4530|       |
 4531|  1.60k|    if (IS_DTLS(ss) && spec->epoch > 0) {
  ------------------
  |  |  892|  3.21k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 1.60k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (4531:24): [True: 1.60k, False: 0]
  ------------------
 4532|  1.60k|        rv = ssl_CreateMaskingContextInner(spec->version, ss->ssl3.hs.cipher_suite,
 4533|  1.60k|                                           ss->protocolVariant, prk, kHkdfPurposeSn,
 4534|  1.60k|                                           strlen(kHkdfPurposeSn), &spec->maskContext);
 4535|  1.60k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (4535:13): [True: 0, False: 1.60k]
  ------------------
 4536|      0|            LOG_ERROR(ss, SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   14|      0|    do {                                                                           \
  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  ------------------
  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|    ssl_Trace b
  |  |  ------------------
  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  ------------------
  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  ------------------
  |  |   18|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 4537|      0|            PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4538|      0|            goto loser;
 4539|      0|        }
 4540|  1.60k|    }
 4541|       |
 4542|  1.60k|    rv = tls13_HkdfExpandLabelRaw(prk, tls13_GetHash(ss),
 4543|  1.60k|                                  NULL, 0,
 4544|  1.60k|                                  kHkdfPurposeIv, strlen(kHkdfPurposeIv),
 4545|  1.60k|                                  ss->protocolVariant,
 4546|  1.60k|                                  spec->keyMaterial.iv, ivSize);
 4547|  1.60k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (4547:9): [True: 0, False: 1.60k]
  ------------------
 4548|      0|        LOG_ERROR(ss, SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   14|      0|    do {                                                                           \
  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  ------------------
  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|    ssl_Trace b
  |  |  ------------------
  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  ------------------
  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  ------------------
  |  |   18|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 4549|      0|        PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4550|      0|        goto loser;
 4551|      0|    }
 4552|       |
 4553|  1.60k|    if (deleteSecret) {
  ------------------
  |  Branch (4553:9): [True: 0, False: 1.60k]
  ------------------
 4554|      0|        PK11_FreeSymKey(prk);
 4555|      0|        *prkp = NULL;
 4556|      0|    }
 4557|  1.60k|    return SECSuccess;
 4558|       |
 4559|      0|loser:
 4560|      0|    return SECFailure;
 4561|  1.60k|}
tls13con.c:tls13_InitPendingContext:
 4628|  1.60k|{
 4629|  1.60k|    CK_MECHANISM_TYPE encMechanism;
 4630|  1.60k|    CK_ATTRIBUTE_TYPE encMode;
 4631|  1.60k|    SECItem iv;
 4632|  1.60k|    SSLCipherAlgorithm calg;
 4633|       |
 4634|  1.60k|    calg = spec->cipherDef->calg;
 4635|       |
 4636|  1.60k|    encMechanism = ssl3_Alg2Mech(calg);
 4637|  1.60k|    encMode = CKA_NSS_MESSAGE | ((spec->direction == ssl_secret_write) ? CKA_ENCRYPT : CKA_DECRYPT);
  ------------------
  |  |   69|  1.60k|#define CKA_NSS_MESSAGE 0x82000000L
  ------------------
                  encMode = CKA_NSS_MESSAGE | ((spec->direction == ssl_secret_write) ? CKA_ENCRYPT : CKA_DECRYPT);
  ------------------
  |  |  547|    173|#define CKA_ENCRYPT 0x00000104UL
  ------------------
                  encMode = CKA_NSS_MESSAGE | ((spec->direction == ssl_secret_write) ? CKA_ENCRYPT : CKA_DECRYPT);
  ------------------
  |  |  548|  1.43k|#define CKA_DECRYPT 0x00000105UL
  ------------------
  |  Branch (4637:34): [True: 173, False: 1.43k]
  ------------------
 4638|  1.60k|    iv.data = NULL;
 4639|  1.60k|    iv.len = 0;
 4640|       |
 4641|       |    /*
 4642|       |     * build the context
 4643|       |     */
 4644|  1.60k|    spec->cipherContext = PK11_CreateContextBySymKey(encMechanism, encMode,
 4645|  1.60k|                                                     spec->keyMaterial.key,
 4646|  1.60k|                                                     &iv);
 4647|  1.60k|    if (!spec->cipherContext) {
  ------------------
  |  Branch (4647:9): [True: 0, False: 1.60k]
  ------------------
 4648|      0|        ssl_MapLowLevelError(SSL_ERROR_SYM_KEY_CONTEXT_FAILURE);
 4649|      0|        return SECFailure;
 4650|      0|    }
 4651|  1.60k|    return SECSuccess;
 4652|  1.60k|}
tls13con.c:tls13_WriteNonce:
 4910|  10.9k|{
 4911|  10.9k|    size_t i;
 4912|  10.9k|    unsigned int offset = ivOutLen - nonceLen;
 4913|       |
 4914|  10.9k|    PORT_Assert(ivInLen <= ivOutLen);
  ------------------
  |  |  120|  10.9k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  10.9k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 10.9k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4915|  10.9k|    PORT_Assert(nonceLen <= ivOutLen);
  ------------------
  |  |  120|  10.9k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  10.9k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 10.9k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4916|  10.9k|    PORT_Memset(ivOut, 0, ivOutLen);
  ------------------
  |  |  182|  10.9k|#define PORT_Memset memset
  ------------------
 4917|  10.9k|    PORT_Memcpy(ivOut, ivIn, ivInLen);
  ------------------
  |  |  180|  10.9k|#define PORT_Memcpy memcpy
  ------------------
 4918|       |
 4919|       |    /* XOR the last n bytes of the IV with the nonce (should be a counter). */
 4920|  98.3k|    for (i = 0; i < nonceLen; ++i) {
  ------------------
  |  Branch (4920:17): [True: 87.4k, False: 10.9k]
  ------------------
 4921|  87.4k|        ivOut[offset + i] ^= nonce[i];
 4922|  87.4k|    }
 4923|  10.9k|    PRINT_BUF(50, (NULL, "Nonce", ivOut, ivOutLen));
  ------------------
  |  |   74|  10.9k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 10.9k]
  |  |  ------------------
  |  |   75|  10.9k|    ssl_PrintBuf b
  ------------------
 4924|  10.9k|}
tls13con.c:tls13_HandleEncryptedExtensions:
 5019|      2|{
 5020|      2|    SECStatus rv;
 5021|      2|    PRUint32 innerLength;
 5022|      2|    SECItem oldAlpn = { siBuffer, NULL, 0 };
 5023|       |
 5024|      2|    PORT_Assert(ss->opt.noLocks || ssl_HaveRecvBufLock(ss));
  ------------------
  |  |  120|      2|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      3|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 1, False: 1]
  |  |  |  |  |  Branch (208:7): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5025|      2|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|      2|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      3|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 1, False: 1]
  |  |  |  |  |  Branch (208:7): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5026|       |
 5027|      2|    SSL_TRC(3, ("%d: TLS13[%d]: handle encrypted extensions",
  ------------------
  |  |   71|      2|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 2]
  |  |  ------------------
  |  |   72|      2|    ssl_Trace b
  ------------------
 5028|      2|                SSL_GETPID(), ss->fd));
 5029|       |
 5030|      2|    rv = TLS13_CHECK_HS_STATE(ss, SSL_ERROR_RX_UNEXPECTED_ENCRYPTED_EXTENSIONS,
  ------------------
  |  |  182|      2|    tls13_CheckHsState(ss, err, #err, __func__, __FILE__, __LINE__, \
  |  |  183|      2|                       __VA_ARGS__,                                 \
  |  |  184|      2|                       wait_invalid)
  ------------------
 5031|      2|                              wait_encrypted_extensions);
 5032|      2|    if (rv != SECSuccess) {
  ------------------
  |  Branch (5032:9): [True: 2, False: 0]
  ------------------
 5033|      2|        return SECFailure;
 5034|      2|    }
 5035|       |
 5036|      0|    rv = ssl3_ConsumeHandshakeNumber(ss, &innerLength, 2, &b, &length);
 5037|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (5037:9): [True: 0, False: 0]
  ------------------
 5038|      0|        return SECFailure; /* Alert already sent. */
 5039|      0|    }
 5040|      0|    if (innerLength != length) {
  ------------------
  |  Branch (5040:9): [True: 0, False: 0]
  ------------------
 5041|      0|        FATAL_ERROR(ss, SSL_ERROR_RX_MALFORMED_ENCRYPTED_EXTENSIONS,
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 5042|      0|                    illegal_parameter);
 5043|      0|        return SECFailure;
 5044|      0|    }
 5045|       |
 5046|       |    /* If we are doing 0-RTT, then we already have an ALPN value. Stash
 5047|       |     * it for comparison. */
 5048|      0|    if (ss->ssl3.hs.zeroRttState == ssl_0rtt_sent &&
  ------------------
  |  Branch (5048:9): [True: 0, False: 0]
  ------------------
 5049|      0|        ss->xtnData.nextProtoState == SSL_NEXT_PROTO_EARLY_VALUE) {
  ------------------
  |  Branch (5049:9): [True: 0, False: 0]
  ------------------
 5050|      0|        oldAlpn = ss->xtnData.nextProto;
 5051|      0|        ss->xtnData.nextProto.data = NULL;
 5052|      0|        ss->xtnData.nextProtoState = SSL_NEXT_PROTO_NO_SUPPORT;
 5053|      0|    }
 5054|       |
 5055|      0|    rv = ssl3_ParseExtensions(ss, &b, &length);
 5056|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (5056:9): [True: 0, False: 0]
  ------------------
 5057|      0|        return SECFailure; /* Error code set below */
 5058|      0|    }
 5059|       |
 5060|       |    /* Handle the rest of the extensions. */
 5061|      0|    rv = ssl3_HandleParsedExtensions(ss, ssl_hs_encrypted_extensions);
 5062|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (5062:9): [True: 0, False: 0]
  ------------------
 5063|      0|        return SECFailure; /* Error code set below */
 5064|      0|    }
 5065|       |
 5066|       |    /* We can only get here if we offered 0-RTT. */
 5067|      0|    if (ssl3_ExtensionNegotiated(ss, ssl_tls13_early_data_xtn)) {
  ------------------
  |  Branch (5067:9): [True: 0, False: 0]
  ------------------
 5068|      0|        PORT_Assert(ss->ssl3.hs.zeroRttState == ssl_0rtt_sent);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5069|      0|        if (!ss->xtnData.selectedPsk) {
  ------------------
  |  Branch (5069:13): [True: 0, False: 0]
  ------------------
 5070|       |            /* Illegal to accept 0-RTT without also accepting PSK. */
 5071|      0|            FATAL_ERROR(ss, SSL_ERROR_RX_MALFORMED_ENCRYPTED_EXTENSIONS,
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 5072|      0|                        illegal_parameter);
 5073|      0|        }
 5074|      0|        ss->ssl3.hs.zeroRttState = ssl_0rtt_accepted;
 5075|       |
 5076|       |        /* Check that the server negotiated the same ALPN (if any). */
 5077|      0|        if (SECITEM_CompareItem(&oldAlpn, &ss->xtnData.nextProto)) {
  ------------------
  |  |  105|      0|#define SECITEM_CompareItem SECITEM_CompareItem_Util
  ------------------
  |  Branch (5077:13): [True: 0, False: 0]
  ------------------
 5078|      0|            SECITEM_FreeItem(&oldAlpn, PR_FALSE);
  ------------------
  |  |  108|      0|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                          SECITEM_FreeItem(&oldAlpn, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5079|      0|            FATAL_ERROR(ss, SSL_ERROR_NEXT_PROTOCOL_DATA_INVALID,
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 5080|      0|                        illegal_parameter);
 5081|      0|            return SECFailure;
 5082|      0|        }
 5083|       |        /* Check that the server negotiated the same cipher suite. */
 5084|      0|        if (ss->ssl3.hs.cipher_suite != ss->ssl3.hs.zeroRttSuite) {
  ------------------
  |  Branch (5084:13): [True: 0, False: 0]
  ------------------
 5085|      0|            FATAL_ERROR(ss, SSL_ERROR_RX_MALFORMED_ENCRYPTED_EXTENSIONS,
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 5086|      0|                        illegal_parameter);
 5087|      0|            return SECFailure;
 5088|      0|        }
 5089|      0|    } else if (ss->ssl3.hs.zeroRttState == ssl_0rtt_sent) {
  ------------------
  |  Branch (5089:16): [True: 0, False: 0]
  ------------------
 5090|       |        /* Though we sent 0-RTT, the early_data extension wasn't present so the
 5091|       |         * state is unmodified; the server must have rejected 0-RTT. */
 5092|      0|        ss->ssl3.hs.zeroRttState = ssl_0rtt_ignored;
 5093|      0|        ss->ssl3.hs.zeroRttIgnore = ssl_0rtt_ignore_trial;
 5094|      0|    } else {
 5095|      0|        PORT_Assert(ss->ssl3.hs.zeroRttState == ssl_0rtt_none ||
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5096|      0|                    (ss->ssl3.hs.helloRetry &&
 5097|      0|                     ss->ssl3.hs.zeroRttState == ssl_0rtt_ignored));
 5098|      0|    }
 5099|       |
 5100|      0|    SECITEM_FreeItem(&oldAlpn, PR_FALSE);
  ------------------
  |  |  108|      0|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                  SECITEM_FreeItem(&oldAlpn, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5101|      0|    if (ss->ssl3.hs.kea_def->authKeyType == ssl_auth_psk) {
  ------------------
  |  Branch (5101:9): [True: 0, False: 0]
  ------------------
 5102|      0|        TLS13_SET_HS_STATE(ss, wait_finished);
  ------------------
  |  |   37|      0|    tls13_SetHsState(ss, ws, __func__, __FILE__, __LINE__)
  ------------------
 5103|      0|    } else {
 5104|      0|        TLS13_SET_HS_STATE(ss, wait_cert_request);
  ------------------
  |  |   37|      0|    tls13_SetHsState(ss, ws, __func__, __FILE__, __LINE__)
  ------------------
 5105|      0|    }
 5106|       |
 5107|       |    /* Client is done with any PSKs */
 5108|      0|    tls13_DestroyPskList(&ss->ssl3.hs.psks);
 5109|      0|    ss->xtnData.selectedPsk = NULL;
 5110|       |
 5111|      0|    return SECSuccess;
 5112|      0|}
tls13con.c:tls13_HandleCertificateVerify:
 5237|      2|{
 5238|      2|    sslDelegatedCredential *dc = ss->xtnData.peerDelegCred;
 5239|      2|    CERTSubjectPublicKeyInfo *spki;
 5240|      2|    SECKEYPublicKey *pubKey = NULL;
 5241|      2|    SECItem signed_hash = { siBuffer, NULL, 0 };
 5242|      2|    SECStatus rv;
 5243|      2|    SSLSignatureScheme sigScheme;
 5244|      2|    SSLHashType hashAlg;
 5245|      2|    SSL3Hashes tbsHash;
 5246|      2|    SSL3Hashes hashes;
 5247|       |
 5248|      2|    SSL_TRC(3, ("%d: TLS13[%d]: handle certificate_verify handshake",
  ------------------
  |  |   71|      2|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 2]
  |  |  ------------------
  |  |   72|      2|    ssl_Trace b
  ------------------
 5249|      2|                SSL_GETPID(), ss->fd));
 5250|      2|    PORT_Assert(ss->opt.noLocks || ssl_HaveRecvBufLock(ss));
  ------------------
  |  |  120|      2|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      3|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 1, False: 1]
  |  |  |  |  |  Branch (208:7): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5251|      2|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|      2|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      3|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 1, False: 1]
  |  |  |  |  |  Branch (208:7): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5252|       |
 5253|      2|    rv = TLS13_CHECK_HS_STATE(ss, SSL_ERROR_RX_UNEXPECTED_CERT_VERIFY,
  ------------------
  |  |  182|      2|    tls13_CheckHsState(ss, err, #err, __func__, __FILE__, __LINE__, \
  |  |  183|      2|                       __VA_ARGS__,                                 \
  |  |  184|      2|                       wait_invalid)
  ------------------
 5254|      2|                              wait_cert_verify);
 5255|      2|    if (rv != SECSuccess) {
  ------------------
  |  Branch (5255:9): [True: 2, False: 0]
  ------------------
 5256|      2|        return SECFailure;
 5257|      2|    }
 5258|       |
 5259|      0|    rv = tls13_ComputeHandshakeHashes(ss, &hashes);
 5260|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (5260:9): [True: 0, False: 0]
  ------------------
 5261|      0|        return SECFailure;
 5262|      0|    }
 5263|       |
 5264|      0|    if (ss->firstHsDone) {
  ------------------
  |  Branch (5264:9): [True: 0, False: 0]
  ------------------
 5265|      0|        rv = ssl_HashPostHandshakeMessage(ss, ssl_hs_certificate_verify, b, length);
 5266|      0|    } else {
 5267|      0|        rv = ssl_HashHandshakeMessage(ss, ssl_hs_certificate_verify, b, length);
 5268|      0|    }
 5269|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (5269:9): [True: 0, False: 0]
  ------------------
 5270|      0|        PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 5271|      0|        return SECFailure;
 5272|      0|    }
 5273|       |
 5274|      0|    rv = ssl_ConsumeSignatureScheme(ss, &b, &length, &sigScheme);
 5275|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (5275:9): [True: 0, False: 0]
  ------------------
 5276|      0|        FATAL_ERROR(ss, SSL_ERROR_RX_MALFORMED_CERT_VERIFY, illegal_parameter);
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 5277|      0|        return SECFailure;
 5278|      0|    }
 5279|       |
 5280|       |    /* Set the |spki| used to verify the handshake. When verifying with a
 5281|       |     * delegated credential (DC), this corresponds to the DC public key;
 5282|       |     * otherwise it correspond to the public key of the peer's end-entity
 5283|       |     * certificate.
 5284|       |     */
 5285|      0|    if (tls13_IsVerifyingWithDelegatedCredential(ss)) {
  ------------------
  |  Branch (5285:9): [True: 0, False: 0]
  ------------------
 5286|       |        /* DelegatedCredential.cred.expected_cert_verify_algorithm is expected
 5287|       |         * to match CertificateVerify.scheme.
 5288|       |         * DelegatedCredential.cred.expected_cert_verify_algorithm must also be
 5289|       |         * the same as was reported in ssl3_AuthCertificate.
 5290|       |         */
 5291|      0|        if (sigScheme != dc->expectedCertVerifyAlg || sigScheme != ss->sec.signatureScheme) {
  ------------------
  |  Branch (5291:13): [True: 0, False: 0]
  |  Branch (5291:55): [True: 0, False: 0]
  ------------------
 5292|      0|            FATAL_ERROR(ss, SSL_ERROR_DC_CERT_VERIFY_ALG_MISMATCH, illegal_parameter);
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 5293|      0|            return SECFailure;
 5294|      0|        }
 5295|       |
 5296|       |        /* Verify the DC has three steps: (1) use the peer's end-entity
 5297|       |         * certificate to verify DelegatedCredential.signature, (2) check that
 5298|       |         * the certificate has the correct key usage, and (3) check that the DC
 5299|       |         * hasn't expired.
 5300|       |         */
 5301|      0|        rv = tls13_VerifyDelegatedCredential(ss, dc);
 5302|      0|        if (rv != SECSuccess) { /* Calls FATAL_ERROR() */
  ------------------
  |  Branch (5302:13): [True: 0, False: 0]
  ------------------
 5303|      0|            return SECFailure;
 5304|      0|        }
 5305|       |
 5306|      0|        SSL_TRC(3, ("%d: TLS13[%d]: Verifying with delegated credential",
  ------------------
  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    ssl_Trace b
  ------------------
 5307|      0|                    SSL_GETPID(), ss->fd));
 5308|      0|        spki = dc->spki;
 5309|      0|    } else {
 5310|      0|        spki = &ss->sec.peerCert->subjectPublicKeyInfo;
 5311|      0|    }
 5312|       |
 5313|      0|    rv = ssl_CheckSignatureSchemeConsistency(ss, sigScheme, spki);
 5314|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (5314:9): [True: 0, False: 0]
  ------------------
 5315|       |        /* Error set already */
 5316|      0|        FATAL_ERROR(ss, PORT_GetError(), illegal_parameter);
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 5317|      0|        return SECFailure;
 5318|      0|    }
 5319|      0|    hashAlg = ssl_SignatureSchemeToHashType(sigScheme);
 5320|       |
 5321|      0|    rv = tls13_AddContextToHashes(ss, &hashes, hashAlg, PR_FALSE, &tbsHash);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 5322|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (5322:9): [True: 0, False: 0]
  ------------------
 5323|      0|        FATAL_ERROR(ss, SSL_ERROR_DIGEST_FAILURE, internal_error);
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 5324|      0|        return SECFailure;
 5325|      0|    }
 5326|       |
 5327|      0|    rv = ssl3_ConsumeHandshakeVariable(ss, &signed_hash, 2, &b, &length);
 5328|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (5328:9): [True: 0, False: 0]
  ------------------
 5329|      0|        PORT_SetError(SSL_ERROR_RX_MALFORMED_CERT_VERIFY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 5330|      0|        return SECFailure;
 5331|      0|    }
 5332|       |
 5333|      0|    if (length != 0) {
  ------------------
  |  Branch (5333:9): [True: 0, False: 0]
  ------------------
 5334|      0|        FATAL_ERROR(ss, SSL_ERROR_RX_MALFORMED_CERT_VERIFY, decode_error);
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 5335|      0|        return SECFailure;
 5336|      0|    }
 5337|       |
 5338|      0|    pubKey = SECKEY_ExtractPublicKey(spki);
 5339|      0|    if (pubKey == NULL) {
  ------------------
  |  Branch (5339:9): [True: 0, False: 0]
  ------------------
 5340|      0|        ssl_MapLowLevelError(SSL_ERROR_EXTRACT_PUBLIC_KEY_FAILURE);
 5341|      0|        return SECFailure;
 5342|      0|    }
 5343|       |
 5344|      0|    rv = ssl_VerifySignedHashesWithPubKey(ss, pubKey, sigScheme,
 5345|      0|                                          &tbsHash, &signed_hash);
 5346|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (5346:9): [True: 0, False: 0]
  ------------------
 5347|      0|        FATAL_ERROR(ss, PORT_GetError(), decrypt_error);
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 5348|      0|        goto loser;
 5349|      0|    }
 5350|       |
 5351|       |    /* Set the auth type and verify it is what we captured in ssl3_AuthCertificate */
 5352|      0|    if (!ss->sec.isServer) {
  ------------------
  |  Branch (5352:9): [True: 0, False: 0]
  ------------------
 5353|      0|        ss->sec.authType = ssl_SignatureSchemeToAuthType(sigScheme);
 5354|       |
 5355|      0|        uint32_t prelimAuthKeyBits = ss->sec.authKeyBits;
 5356|      0|        rv = ssl_SetAuthKeyBits(ss, pubKey);
 5357|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (5357:13): [True: 0, False: 0]
  ------------------
 5358|      0|            goto loser; /* Alert sent and code set. */
 5359|      0|        }
 5360|       |
 5361|      0|        if (prelimAuthKeyBits != ss->sec.authKeyBits) {
  ------------------
  |  Branch (5361:13): [True: 0, False: 0]
  ------------------
 5362|      0|            FATAL_ERROR(ss, SSL_ERROR_DC_CERT_VERIFY_ALG_MISMATCH, illegal_parameter);
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 5363|      0|            goto loser;
 5364|      0|        }
 5365|      0|    }
 5366|       |
 5367|       |    /* Request a client certificate now if one was requested. */
 5368|      0|    if (ss->ssl3.hs.clientCertRequested) {
  ------------------
  |  Branch (5368:9): [True: 0, False: 0]
  ------------------
 5369|      0|        PORT_Assert(!ss->sec.isServer);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5370|      0|        rv = ssl3_BeginHandleCertificateRequest(
 5371|      0|            ss, ss->xtnData.sigSchemes, ss->xtnData.numSigSchemes,
 5372|      0|            &ss->xtnData.certReqAuthorities);
 5373|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (5373:13): [True: 0, False: 0]
  ------------------
 5374|      0|            FATAL_ERROR(ss, SEC_ERROR_LIBRARY_FAILURE, internal_error);
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 5375|      0|            goto loser;
 5376|      0|        }
 5377|      0|    }
 5378|       |
 5379|      0|    SECKEY_DestroyPublicKey(pubKey);
 5380|      0|    TLS13_SET_HS_STATE(ss, wait_finished);
  ------------------
  |  |   37|      0|    tls13_SetHsState(ss, ws, __func__, __FILE__, __LINE__)
  ------------------
 5381|      0|    return SECSuccess;
 5382|       |
 5383|      0|loser:
 5384|      0|    SECKEY_DestroyPublicKey(pubKey);
 5385|      0|    return SECFailure;
 5386|      0|}
tls13con.c:tls13_ComputePskBinderHash:
 5394|  4.51k|{
 5395|  4.51k|    SECStatus rv;
 5396|  4.51k|    PK11Context *ctx = NULL;
 5397|  4.51k|    sslBuffer *clientResidual = NULL;
 5398|  4.51k|    if (!ss->sec.isServer) {
  ------------------
  |  Branch (5398:9): [True: 4.51k, False: 0]
  ------------------
 5399|       |        /* On the server, HRR residual is already buffered. */
 5400|  4.51k|        clientResidual = ss->ssl3.hs.echHpkeCtx ? &ss->ssl3.hs.echInnerMessages : &ss->ssl3.hs.messages;
  ------------------
  |  Branch (5400:26): [True: 0, False: 4.51k]
  ------------------
 5401|  4.51k|    }
 5402|  4.51k|    PORT_Assert(ss->ssl3.hs.hashType == handshake_hash_unknown);
  ------------------
  |  |  120|  4.51k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  4.51k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 4.51k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5403|  4.51k|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|  4.51k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  6.74k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 2.29k, False: 2.22k]
  |  |  |  |  |  Branch (208:7): [True: 2.22k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5404|       |
 5405|  4.51k|    PRINT_BUF(10, (NULL, "Binder computed over ClientHello",
  ------------------
  |  |   74|  4.51k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 4.51k]
  |  |  ------------------
  |  |   75|  4.51k|    ssl_PrintBuf b
  ------------------
 5406|  4.51k|                   b, length));
 5407|       |
 5408|  4.51k|    ctx = PK11_CreateDigestContext(ssl3_HashTypeToOID(hashType));
 5409|  4.51k|    if (!ctx) {
  ------------------
  |  Branch (5409:9): [True: 0, False: 4.51k]
  ------------------
 5410|      0|        goto loser;
 5411|      0|    }
 5412|  4.51k|    rv = PK11_DigestBegin(ctx);
 5413|  4.51k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (5413:9): [True: 0, False: 4.51k]
  ------------------
 5414|      0|        ssl_MapLowLevelError(SSL_ERROR_SHA_DIGEST_FAILURE);
 5415|      0|        goto loser;
 5416|      0|    }
 5417|       |
 5418|  4.51k|    if (clientResidual && clientResidual->len) {
  ------------------
  |  Branch (5418:9): [True: 4.51k, False: 0]
  |  Branch (5418:27): [True: 316, False: 4.19k]
  ------------------
 5419|    316|        PRINT_BUF(10, (NULL, " with HRR prefix", clientResidual->buf,
  ------------------
  |  |   74|    316|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 316]
  |  |  ------------------
  |  |   75|    316|    ssl_PrintBuf b
  ------------------
 5420|    316|                       clientResidual->len));
 5421|    316|        rv = PK11_DigestOp(ctx, clientResidual->buf, clientResidual->len);
 5422|    316|        if (rv != SECSuccess) {
  ------------------
  |  Branch (5422:13): [True: 0, False: 316]
  ------------------
 5423|      0|            ssl_MapLowLevelError(SSL_ERROR_SHA_DIGEST_FAILURE);
 5424|      0|            goto loser;
 5425|      0|        }
 5426|    316|    }
 5427|       |
 5428|  4.51k|    if (IS_DTLS(ss) && !ss->sec.isServer) {
  ------------------
  |  |  892|  9.03k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 4.51k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (5428:24): [True: 4.51k, False: 0]
  ------------------
 5429|       |        /* Removing the unnecessary header fields.
 5430|       |         * See ssl3_AppendHandshakeHeader.*/
 5431|  4.51k|        PORT_Assert(length >= 12);
  ------------------
  |  |  120|  4.51k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  4.51k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 4.51k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5432|  4.51k|        rv = PK11_DigestOp(ctx, b, 4);
 5433|  4.51k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (5433:13): [True: 0, False: 4.51k]
  ------------------
 5434|      0|            ssl_MapLowLevelError(SSL_ERROR_SHA_DIGEST_FAILURE);
 5435|      0|            goto loser;
 5436|      0|        }
 5437|  4.51k|        rv = PK11_DigestOp(ctx, b + 12, length - 12);
 5438|  4.51k|    } else {
 5439|      0|        rv = PK11_DigestOp(ctx, b, length);
 5440|      0|    }
 5441|  4.51k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (5441:9): [True: 0, False: 4.51k]
  ------------------
 5442|      0|        ssl_MapLowLevelError(SSL_ERROR_SHA_DIGEST_FAILURE);
 5443|      0|        goto loser;
 5444|      0|    }
 5445|  4.51k|    rv = PK11_DigestFinal(ctx, hashes->u.raw, &hashes->len, sizeof(hashes->u.raw));
 5446|  4.51k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (5446:9): [True: 0, False: 4.51k]
  ------------------
 5447|      0|        ssl_MapLowLevelError(SSL_ERROR_SHA_DIGEST_FAILURE);
 5448|      0|        goto loser;
 5449|      0|    }
 5450|       |
 5451|  4.51k|    PK11_DestroyContext(ctx, PR_TRUE);
  ------------------
  |  |  437|  4.51k|#define PR_TRUE 1
  ------------------
 5452|  4.51k|    PRINT_BUF(10, (NULL, "PSK Binder hash", hashes->u.raw, hashes->len));
  ------------------
  |  |   74|  4.51k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 4.51k]
  |  |  ------------------
  |  |   75|  4.51k|    ssl_PrintBuf b
  ------------------
 5453|  4.51k|    return SECSuccess;
 5454|       |
 5455|      0|loser:
 5456|      0|    if (ctx) {
  ------------------
  |  Branch (5456:9): [True: 0, False: 0]
  ------------------
 5457|      0|        PK11_DestroyContext(ctx, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 5458|      0|    }
 5459|      0|    return SECFailure;
 5460|  4.51k|}
tls13con.c:tls13_ComputeFinished:
 5531|  4.51k|{
 5532|  4.51k|    SECStatus rv;
 5533|  4.51k|    PK11Context *hmacCtx = NULL;
 5534|  4.51k|    CK_MECHANISM_TYPE macAlg = tls13_GetHmacMechanismFromHash(hashType);
 5535|  4.51k|    SECItem param = { siBuffer, NULL, 0 };
 5536|  4.51k|    unsigned int outputLenUint;
 5537|  4.51k|    const char *label = kHkdfLabelFinishedSecret;
 5538|  4.51k|    PK11SymKey *secret = NULL;
 5539|       |
 5540|  4.51k|    PORT_Assert(baseKey);
  ------------------
  |  |  120|  4.51k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  4.51k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 4.51k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5541|  4.51k|    SSL_TRC(3, ("%d: TLS13[%d]: %s calculate finished",
  ------------------
  |  |   71|  4.51k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 4.51k]
  |  |  ------------------
  |  |   72|  4.51k|    ssl_Trace b
  |  |  ------------------
  |  |  |  Branch (72:15): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5542|  4.51k|                SSL_GETPID(), ss->fd, SSL_ROLE(ss)));
 5543|  4.51k|    PRINT_BUF(50, (ss, "Handshake hash", hashes->u.raw, hashes->len));
  ------------------
  |  |   74|  4.51k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 4.51k]
  |  |  ------------------
  |  |   75|  4.51k|    ssl_PrintBuf b
  ------------------
 5544|       |
 5545|       |    /* Now derive the appropriate finished secret from the base secret. */
 5546|  4.51k|    rv = tls13_HkdfExpandLabel(baseKey, hashType,
 5547|  4.51k|                               NULL, 0, label, strlen(label),
 5548|  4.51k|                               tls13_GetHmacMechanismFromHash(hashType),
 5549|  4.51k|                               tls13_GetHashSizeForHash(hashType),
 5550|  4.51k|                               ss->protocolVariant, &secret);
 5551|  4.51k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (5551:9): [True: 0, False: 4.51k]
  ------------------
 5552|      0|        goto abort;
 5553|      0|    }
 5554|       |
 5555|  4.51k|    PORT_Assert(hashes->len == tls13_GetHashSizeForHash(hashType));
  ------------------
  |  |  120|  4.51k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  4.51k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 4.51k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5556|  4.51k|    hmacCtx = PK11_CreateContextBySymKey(macAlg, CKA_SIGN,
  ------------------
  |  |  551|  4.51k|#define CKA_SIGN 0x00000108UL
  ------------------
 5557|  4.51k|                                         secret, &param);
 5558|  4.51k|    if (!hmacCtx) {
  ------------------
  |  Branch (5558:9): [True: 0, False: 4.51k]
  ------------------
 5559|      0|        goto abort;
 5560|      0|    }
 5561|       |
 5562|  4.51k|    rv = PK11_DigestBegin(hmacCtx);
 5563|  4.51k|    if (rv != SECSuccess)
  ------------------
  |  Branch (5563:9): [True: 0, False: 4.51k]
  ------------------
 5564|      0|        goto abort;
 5565|       |
 5566|  4.51k|    rv = PK11_DigestOp(hmacCtx, hashes->u.raw, hashes->len);
 5567|  4.51k|    if (rv != SECSuccess)
  ------------------
  |  Branch (5567:9): [True: 0, False: 4.51k]
  ------------------
 5568|      0|        goto abort;
 5569|       |
 5570|  4.51k|    PORT_Assert(maxOutputLen >= tls13_GetHashSizeForHash(hashType));
  ------------------
  |  |  120|  4.51k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  4.51k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 4.51k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5571|  4.51k|    rv = PK11_DigestFinal(hmacCtx, output, &outputLenUint, maxOutputLen);
 5572|  4.51k|    if (rv != SECSuccess)
  ------------------
  |  Branch (5572:9): [True: 0, False: 4.51k]
  ------------------
 5573|      0|        goto abort;
 5574|  4.51k|    *outputLen = outputLenUint;
 5575|       |
 5576|  4.51k|    PK11_FreeSymKey(secret);
 5577|  4.51k|    PK11_DestroyContext(hmacCtx, PR_TRUE);
  ------------------
  |  |  437|  4.51k|#define PR_TRUE 1
  ------------------
 5578|  4.51k|    PRINT_BUF(50, (ss, "finished value", output, outputLenUint));
  ------------------
  |  |   74|  4.51k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 4.51k]
  |  |  ------------------
  |  |   75|  4.51k|    ssl_PrintBuf b
  ------------------
 5579|  4.51k|    return SECSuccess;
 5580|       |
 5581|      0|abort:
 5582|      0|    if (secret) {
  ------------------
  |  Branch (5582:9): [True: 0, False: 0]
  ------------------
 5583|      0|        PK11_FreeSymKey(secret);
 5584|      0|    }
 5585|       |
 5586|      0|    if (hmacCtx) {
  ------------------
  |  Branch (5586:9): [True: 0, False: 0]
  ------------------
 5587|      0|        PK11_DestroyContext(hmacCtx, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 5588|      0|    }
 5589|       |
 5590|      0|    PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 5591|      0|    return SECFailure;
 5592|  4.51k|}
tls13con.c:tls13_ClientHandleFinished:
 5712|      2|{
 5713|      2|    SECStatus rv;
 5714|       |
 5715|      2|    PORT_Assert(ss->opt.noLocks || ssl_HaveRecvBufLock(ss));
  ------------------
  |  |  120|      2|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      3|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 1, False: 1]
  |  |  |  |  |  Branch (208:7): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5716|      2|    PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss));
  ------------------
  |  |  120|      2|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      3|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 1, False: 1]
  |  |  |  |  |  Branch (208:7): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5717|       |
 5718|      2|    SSL_TRC(3, ("%d: TLS13[%d]: client handle finished handshake",
  ------------------
  |  |   71|      2|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 2]
  |  |  ------------------
  |  |   72|      2|    ssl_Trace b
  ------------------
 5719|      2|                SSL_GETPID(), ss->fd));
 5720|       |
 5721|      2|    rv = tls13_CommonHandleFinished(ss, ss->ssl3.hs.serverHsTrafficSecret,
 5722|      2|                                    b, length);
 5723|      2|    if (rv != SECSuccess) {
  ------------------
  |  Branch (5723:9): [True: 2, False: 0]
  ------------------
 5724|      2|        return SECFailure;
 5725|      2|    }
 5726|       |
 5727|      0|    return tls13_SendClientSecondRound(ss);
 5728|      2|}
tls13con.c:tls13_CommonHandleFinished:
 5679|      2|{
 5680|      2|    SECStatus rv;
 5681|      2|    SSL3Hashes hashes;
 5682|       |
 5683|      2|    rv = TLS13_CHECK_HS_STATE(ss, SSL_ERROR_RX_UNEXPECTED_FINISHED,
  ------------------
  |  |  182|      2|    tls13_CheckHsState(ss, err, #err, __func__, __FILE__, __LINE__, \
  |  |  183|      2|                       __VA_ARGS__,                                 \
  |  |  184|      2|                       wait_invalid)
  ------------------
 5684|      2|                              wait_finished);
 5685|      2|    if (rv != SECSuccess) {
  ------------------
  |  Branch (5685:9): [True: 2, False: 0]
  ------------------
 5686|      2|        return SECFailure;
 5687|      2|    }
 5688|      0|    ss->ssl3.hs.endOfFlight = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 5689|       |
 5690|      0|    rv = tls13_ComputeHandshakeHashes(ss, &hashes);
 5691|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (5691:9): [True: 0, False: 0]
  ------------------
 5692|      0|        LOG_ERROR(ss, SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   14|      0|    do {                                                                           \
  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  ------------------
  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|    ssl_Trace b
  |  |  ------------------
  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  ------------------
  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  ------------------
  |  |   18|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 5693|      0|        return SECFailure;
 5694|      0|    }
 5695|       |
 5696|      0|    if (ss->firstHsDone) {
  ------------------
  |  Branch (5696:9): [True: 0, False: 0]
  ------------------
 5697|      0|        rv = ssl_HashPostHandshakeMessage(ss, ssl_hs_finished, b, length);
 5698|      0|    } else {
 5699|      0|        rv = ssl_HashHandshakeMessage(ss, ssl_hs_finished, b, length);
 5700|      0|    }
 5701|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (5701:9): [True: 0, False: 0]
  ------------------
 5702|      0|        PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 5703|      0|        return SECFailure;
 5704|      0|    }
 5705|       |
 5706|      0|    return tls13_VerifyFinished(ss, ssl_hs_finished,
 5707|      0|                                key, b, length, &hashes);
 5708|      0|}
tls13con.c:tls13_HandleNewSessionTicket:
 6249|      1|{
 6250|      1|    SECStatus rv;
 6251|      1|    PRUint32 utmp;
 6252|      1|    NewSessionTicket ticket = { 0 };
 6253|      1|    SECItem data;
 6254|      1|    SECItem ticket_nonce;
 6255|      1|    SECItem ticket_data;
 6256|       |
 6257|      1|    SSL_TRC(3, ("%d: TLS13[%d]: handle new session ticket message",
  ------------------
  |  |   71|      1|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 1]
  |  |  ------------------
  |  |   72|      1|    ssl_Trace b
  ------------------
 6258|      1|                SSL_GETPID(), ss->fd));
 6259|       |
 6260|      1|    rv = TLS13_CHECK_HS_STATE(ss, SSL_ERROR_RX_UNEXPECTED_NEW_SESSION_TICKET,
  ------------------
  |  |  182|      1|    tls13_CheckHsState(ss, err, #err, __func__, __FILE__, __LINE__, \
  |  |  183|      1|                       __VA_ARGS__,                                 \
  |  |  184|      1|                       wait_invalid)
  ------------------
 6261|      1|                              idle_handshake);
 6262|      1|    if (rv != SECSuccess) {
  ------------------
  |  Branch (6262:9): [True: 1, False: 0]
  ------------------
 6263|      1|        return SECFailure;
 6264|      1|    }
 6265|      0|    if (!tls13_IsPostHandshake(ss) || ss->sec.isServer) {
  ------------------
  |  Branch (6265:9): [True: 0, False: 0]
  |  Branch (6265:39): [True: 0, False: 0]
  ------------------
 6266|      0|        FATAL_ERROR(ss, SSL_ERROR_RX_UNEXPECTED_NEW_SESSION_TICKET,
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 6267|      0|                    unexpected_message);
 6268|      0|        return SECFailure;
 6269|      0|    }
 6270|       |
 6271|      0|    ticket.received_timestamp = ssl_Time(ss);
 6272|      0|    rv = ssl3_ConsumeHandshakeNumber(ss, &ticket.ticket_lifetime_hint, 4, &b,
 6273|      0|                                     &length);
 6274|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (6274:9): [True: 0, False: 0]
  ------------------
 6275|      0|        FATAL_ERROR(ss, SSL_ERROR_RX_MALFORMED_NEW_SESSION_TICKET,
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 6276|      0|                    decode_error);
 6277|      0|        return SECFailure;
 6278|      0|    }
 6279|      0|    ticket.ticket.type = siBuffer;
 6280|       |
 6281|      0|    rv = ssl3_ConsumeHandshake(ss, &utmp, sizeof(utmp),
 6282|      0|                               &b, &length);
 6283|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (6283:9): [True: 0, False: 0]
  ------------------
 6284|      0|        PORT_SetError(SSL_ERROR_RX_MALFORMED_NEW_SESSION_TICKET);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 6285|      0|        return SECFailure;
 6286|      0|    }
 6287|      0|    ticket.ticket_age_add = PR_ntohl(utmp);
 6288|       |
 6289|       |    /* The nonce. */
 6290|      0|    rv = ssl3_ConsumeHandshakeVariable(ss, &ticket_nonce, 1, &b, &length);
 6291|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (6291:9): [True: 0, False: 0]
  ------------------
 6292|      0|        FATAL_ERROR(ss, SSL_ERROR_RX_MALFORMED_NEW_SESSION_TICKET,
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 6293|      0|                    decode_error);
 6294|      0|        return SECFailure;
 6295|      0|    }
 6296|       |
 6297|       |    /* Get the ticket value. */
 6298|      0|    rv = ssl3_ConsumeHandshakeVariable(ss, &ticket_data, 2, &b, &length);
 6299|      0|    if (rv != SECSuccess || !ticket_data.len) {
  ------------------
  |  Branch (6299:9): [True: 0, False: 0]
  |  Branch (6299:29): [True: 0, False: 0]
  ------------------
 6300|      0|        FATAL_ERROR(ss, SSL_ERROR_RX_MALFORMED_NEW_SESSION_TICKET,
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 6301|      0|                    decode_error);
 6302|      0|        return SECFailure;
 6303|      0|    }
 6304|       |
 6305|       |    /* Parse extensions. */
 6306|      0|    rv = ssl3_ConsumeHandshakeVariable(ss, &data, 2, &b, &length);
 6307|      0|    if (rv != SECSuccess || length) {
  ------------------
  |  Branch (6307:9): [True: 0, False: 0]
  |  Branch (6307:29): [True: 0, False: 0]
  ------------------
 6308|      0|        FATAL_ERROR(ss, SSL_ERROR_RX_MALFORMED_NEW_SESSION_TICKET,
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 6309|      0|                    decode_error);
 6310|      0|        return SECFailure;
 6311|      0|    }
 6312|       |
 6313|      0|    rv = ssl3_HandleExtensions(ss, &data.data,
 6314|      0|                               &data.len, ssl_hs_new_session_ticket);
 6315|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (6315:9): [True: 0, False: 0]
  ------------------
 6316|      0|        FATAL_ERROR(ss, SSL_ERROR_RX_MALFORMED_NEW_SESSION_TICKET,
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 6317|      0|                    decode_error);
 6318|      0|        return SECFailure;
 6319|      0|    }
 6320|      0|    if (ss->xtnData.max_early_data_size) {
  ------------------
  |  Branch (6320:9): [True: 0, False: 0]
  ------------------
 6321|      0|        ticket.flags |= ticket_allow_early_data;
 6322|      0|        ticket.max_early_data_size = ss->xtnData.max_early_data_size;
 6323|      0|    }
 6324|       |
 6325|      0|    if (!ss->opt.noCache) {
  ------------------
  |  Branch (6325:9): [True: 0, False: 0]
  ------------------
 6326|      0|        PK11SymKey *secret;
 6327|       |
 6328|      0|        PORT_Assert(ss->sec.ci.sid);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6329|      0|        rv = SECITEM_CopyItem(NULL, &ticket.ticket, &ticket_data);
  ------------------
  |  |  106|      0|#define SECITEM_CopyItem SECITEM_CopyItem_Util
  ------------------
 6330|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (6330:13): [True: 0, False: 0]
  ------------------
 6331|      0|            FATAL_ERROR(ss, SEC_ERROR_NO_MEMORY, internal_error);
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 6332|      0|            return SECFailure;
 6333|      0|        }
 6334|      0|        PRINT_BUF(50, (ss, "Caching session ticket",
  ------------------
  |  |   74|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   75|      0|    ssl_PrintBuf b
  ------------------
 6335|      0|                       ticket.ticket.data,
 6336|      0|                       ticket.ticket.len));
 6337|       |
 6338|       |        /* Replace a previous session ticket when
 6339|       |         * we receive a second NewSessionTicket message. */
 6340|      0|        if (ss->sec.ci.sid->cached == in_client_cache ||
  ------------------
  |  Branch (6340:13): [True: 0, False: 0]
  ------------------
 6341|      0|            ss->sec.ci.sid->cached == in_external_cache) {
  ------------------
  |  Branch (6341:13): [True: 0, False: 0]
  ------------------
 6342|       |            /* Create a new session ID. */
 6343|      0|            sslSessionID *sid = ssl3_NewSessionID(ss, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 6344|      0|            if (!sid) {
  ------------------
  |  Branch (6344:17): [True: 0, False: 0]
  ------------------
 6345|      0|                return SECFailure;
 6346|      0|            }
 6347|       |
 6348|       |            /* Copy over the peerCert. */
 6349|      0|            PORT_Assert(ss->sec.ci.sid->peerCert);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6350|      0|            sid->peerCert = CERT_DupCertificate(ss->sec.ci.sid->peerCert);
 6351|      0|            if (!sid->peerCert) {
  ------------------
  |  Branch (6351:17): [True: 0, False: 0]
  ------------------
 6352|      0|                ssl_FreeSID(sid);
 6353|      0|                return SECFailure;
 6354|      0|            }
 6355|       |
 6356|       |            /* Destroy the old SID. */
 6357|      0|            ssl_UncacheSessionID(ss);
 6358|      0|            ssl_FreeSID(ss->sec.ci.sid);
 6359|      0|            ss->sec.ci.sid = sid;
 6360|      0|        }
 6361|       |
 6362|      0|        ssl3_SetSIDSessionTicket(ss->sec.ci.sid, &ticket);
 6363|      0|        PORT_Assert(!ticket.ticket.data);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6364|       |
 6365|      0|        rv = tls13_HkdfExpandLabel(ss->ssl3.hs.resumptionMasterSecret,
 6366|      0|                                   tls13_GetHash(ss),
 6367|      0|                                   ticket_nonce.data, ticket_nonce.len,
 6368|      0|                                   kHkdfLabelResumption,
 6369|      0|                                   strlen(kHkdfLabelResumption),
 6370|      0|                                   CKM_HKDF_DERIVE,
  ------------------
  |  | 1296|      0|#define CKM_HKDF_DERIVE 0x0000402aUL
  ------------------
 6371|      0|                                   tls13_GetHashSize(ss),
 6372|      0|                                   ss->protocolVariant, &secret);
 6373|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (6373:13): [True: 0, False: 0]
  ------------------
 6374|      0|            return SECFailure;
 6375|      0|        }
 6376|       |
 6377|      0|        rv = ssl3_FillInCachedSID(ss, ss->sec.ci.sid, secret);
 6378|      0|        PK11_FreeSymKey(secret);
 6379|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (6379:13): [True: 0, False: 0]
  ------------------
 6380|      0|            return SECFailure;
 6381|      0|        }
 6382|       |
 6383|       |        /* Cache the session. */
 6384|      0|        ssl_CacheSessionID(ss);
 6385|      0|    }
 6386|       |
 6387|      0|    return SECSuccess;
 6388|      0|}
tls13con.c:tls13_FormatAdditionalData:
 6477|  10.7k|{
 6478|  10.7k|    SECStatus rv;
 6479|  10.7k|    sslBuffer buf = SSL_BUFFER_FIXED(aad, maxLength);
  ------------------
  |  |   27|  10.7k|    {                               \
  |  |   28|  10.7k|        b, 0, maxlen, PR_TRUE       \
  |  |  ------------------
  |  |  |  |  437|  10.7k|#define PR_TRUE 1
  |  |  ------------------
  |  |   29|  10.7k|    }
  ------------------
 6480|       |
 6481|  10.7k|    if (IS_DTLS_1_OR_12(ss)) {
  ------------------
  |  |  893|  10.7k|#define IS_DTLS_1_OR_12(ss) (IS_DTLS(ss) && ss->version < SSL_LIBRARY_VERSION_TLS_1_3)
  |  |  ------------------
  |  |  |  |  892|  21.4k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (892:21): [True: 10.7k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IS_DTLS_1_OR_12(ss) (IS_DTLS(ss) && ss->version < SSL_LIBRARY_VERSION_TLS_1_3)
  |  |  ------------------
  |  |  |  |   21|  21.4k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  |  |  ------------------
  |  |  |  Branch (893:45): [True: 0, False: 10.7k]
  |  |  ------------------
  ------------------
 6482|      0|        rv = sslBuffer_AppendNumber(&buf, epoch, 2);
 6483|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (6483:13): [True: 0, False: 0]
  ------------------
 6484|      0|            return SECFailure;
 6485|      0|        }
 6486|      0|    }
 6487|  10.7k|    rv = sslBuffer_AppendNumber(&buf, seqNum, IS_DTLS_1_OR_12(ss) ? 6 : 8);
  ------------------
  |  |  893|  10.7k|#define IS_DTLS_1_OR_12(ss) (IS_DTLS(ss) && ss->version < SSL_LIBRARY_VERSION_TLS_1_3)
  |  |  ------------------
  |  |  |  |  892|  21.4k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (892:21): [True: 10.7k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IS_DTLS_1_OR_12(ss) (IS_DTLS(ss) && ss->version < SSL_LIBRARY_VERSION_TLS_1_3)
  |  |  ------------------
  |  |  |  |   21|  21.4k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  |  |  ------------------
  |  |  |  Branch (893:45): [True: 0, False: 10.7k]
  |  |  ------------------
  ------------------
 6488|  10.7k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (6488:9): [True: 0, False: 10.7k]
  ------------------
 6489|      0|        return SECFailure;
 6490|      0|    }
 6491|       |
 6492|  10.7k|    rv = sslBuffer_Append(&buf, header, headerLen);
 6493|  10.7k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (6493:9): [True: 0, False: 10.7k]
  ------------------
 6494|      0|        return SECFailure;
 6495|      0|    }
 6496|       |
 6497|  10.7k|    *aadLength = buf.len;
 6498|       |
 6499|  10.7k|    return SECSuccess;
 6500|  10.7k|}
tls13con.c:tls13_HandleEndOfEarlyData:
 7000|      1|{
 7001|      1|    SECStatus rv;
 7002|       |
 7003|      1|    PORT_Assert(ss->version >= SSL_LIBRARY_VERSION_TLS_1_3);
  ------------------
  |  |  120|      1|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      1|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7004|       |
 7005|      1|    rv = TLS13_CHECK_HS_STATE(ss, SSL_ERROR_RX_UNEXPECTED_END_OF_EARLY_DATA,
  ------------------
  |  |  182|      1|    tls13_CheckHsState(ss, err, #err, __func__, __FILE__, __LINE__, \
  |  |  183|      1|                       __VA_ARGS__,                                 \
  |  |  184|      1|                       wait_invalid)
  ------------------
 7006|      1|                              wait_end_of_early_data);
 7007|      1|    if (rv != SECSuccess) {
  ------------------
  |  Branch (7007:9): [True: 1, False: 0]
  ------------------
 7008|      1|        return SECFailure;
 7009|      1|    }
 7010|       |
 7011|       |    /* We shouldn't be getting any more early data, and if we do,
 7012|       |     * it is because of reordering and we drop it. */
 7013|      0|    if (IS_DTLS(ss)) {
  ------------------
  |  |  892|      0|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 7014|      0|        ssl_CipherSpecReleaseByEpoch(ss, ssl_secret_read,
 7015|      0|                                     TrafficKeyEarlyApplicationData);
 7016|      0|        dtls_ReceivedFirstMessageInFlight(ss);
 7017|      0|    }
 7018|       |
 7019|      0|    PORT_Assert(ss->ssl3.hs.zeroRttState == ssl_0rtt_accepted);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7020|       |
 7021|      0|    if (length) {
  ------------------
  |  Branch (7021:9): [True: 0, False: 0]
  ------------------
 7022|      0|        FATAL_ERROR(ss, SSL_ERROR_RX_MALFORMED_END_OF_EARLY_DATA, decode_error);
  ------------------
  |  |   22|      0|    do {                                     \
  |  |   23|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |   14|      0|    do {                                                                           \
  |  |  |  |   15|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |   16|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |   17|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |   18|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        tls13_FatalError(ss, prError, desc); \
  |  |   25|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (25:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 7023|      0|        return SECFailure;
 7024|      0|    }
 7025|       |
 7026|      0|    rv = tls13_SetCipherSpec(ss, TrafficKeyHandshake,
 7027|      0|                             ssl_secret_read, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 7028|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (7028:9): [True: 0, False: 0]
  ------------------
 7029|      0|        PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 7030|      0|        return SECFailure;
 7031|      0|    }
 7032|       |
 7033|      0|    ss->ssl3.hs.zeroRttState = ssl_0rtt_done;
 7034|      0|    if (tls13_ShouldRequestClientAuth(ss)) {
  ------------------
  |  Branch (7034:9): [True: 0, False: 0]
  ------------------
 7035|      0|        TLS13_SET_HS_STATE(ss, wait_client_cert);
  ------------------
  |  |   37|      0|    tls13_SetHsState(ss, ws, __func__, __FILE__, __LINE__)
  ------------------
 7036|      0|    } else {
 7037|      0|        TLS13_SET_HS_STATE(ss, wait_finished);
  ------------------
  |  |   37|      0|    tls13_SetHsState(ss, ws, __func__, __FILE__, __LINE__)
  ------------------
 7038|      0|    }
 7039|      0|    return SECSuccess;
 7040|      0|}

tls13_DestroyEchConfigs:
   64|  9.36k|{
   65|  9.36k|    PRCList *cur_p;
   66|  9.36k|    while (!PR_CLIST_IS_EMPTY(list)) {
  ------------------
  |  |   94|  9.36k|    ((_l)->next == (_l))
  ------------------
  |  Branch (66:12): [True: 0, False: 9.36k]
  ------------------
   67|      0|        cur_p = PR_LIST_TAIL(list);
  ------------------
  |  |   66|      0|#define PR_LIST_TAIL(_l) (_l)->prev
  ------------------
   68|      0|        PR_REMOVE_LINK(cur_p);
  ------------------
  |  |   72|      0|    PR_BEGIN_MACRO             \
  |  |  ------------------
  |  |  |  |  123|      0|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |   73|      0|    (_e)->prev->next = (_e)->next; \
  |  |   74|      0|    (_e)->next->prev = (_e)->prev; \
  |  |   75|      0|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|      0|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   69|      0|        tls13_DestroyEchConfig((sslEchConfig *)cur_p);
   70|      0|    }
   71|  9.36k|}
tls13_DestroyEchXtnState:
   75|  39.0k|{
   76|  39.0k|    if (!state) {
  ------------------
  |  Branch (76:9): [True: 39.0k, False: 0]
  ------------------
   77|  39.0k|        return;
   78|  39.0k|    }
   79|      0|    SECITEM_FreeItem(&state->innerCh, PR_FALSE);
  ------------------
  |  |  108|      0|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                  SECITEM_FreeItem(&state->innerCh, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
   80|      0|    SECITEM_FreeItem(&state->senderPubKey, PR_FALSE);
  ------------------
  |  |  108|      0|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                  SECITEM_FreeItem(&state->senderPubKey, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
   81|      0|    SECITEM_FreeItem(&state->retryConfigs, PR_FALSE);
  ------------------
  |  |  108|      0|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                  SECITEM_FreeItem(&state->retryConfigs, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
   82|      0|    PORT_ZFree(state, sizeof(*state));
  ------------------
  |  |   75|      0|#define PORT_ZFree PORT_ZFree_Util
  ------------------
   83|      0|}
tls13_ClientSetupEch:
  755|  9.52k|{
  756|  9.52k|    SECStatus rv;
  757|  9.52k|    HpkeContext *cx = NULL;
  758|  9.52k|    SECKEYPublicKey *pkR = NULL;
  759|  9.52k|    SECItem hpkeInfo = { siBuffer, NULL, 0 };
  760|  9.52k|    sslEchConfig *cfg = NULL;
  761|       |
  762|  9.52k|    if (PR_CLIST_IS_EMPTY(&ss->echConfigs) ||
  ------------------
  |  |   94|  19.0k|    ((_l)->next == (_l))
  |  |  ------------------
  |  |  |  Branch (94:5): [True: 9.52k, False: 0]
  |  |  ------------------
  ------------------
  763|  9.52k|        !ssl_ShouldSendSNIExtension(ss, ss->url) ||
  ------------------
  |  Branch (763:9): [True: 0, False: 0]
  ------------------
  764|  9.52k|        IS_DTLS(ss)) {
  ------------------
  |  |  892|      0|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  765|  9.52k|        return SECSuccess;
  766|  9.52k|    }
  767|       |
  768|       |    /* Maybe apply our own priority if >1. For now, we only support
  769|       |     * one version and one KEM. Each ECHConfig can specify multiple
  770|       |     * KDF/AEADs, so just use the first. */
  771|      0|    cfg = (sslEchConfig *)PR_LIST_HEAD(&ss->echConfigs);
  ------------------
  |  |   65|      0|#define PR_LIST_HEAD(_l) (_l)->next
  ------------------
  772|       |
  773|      0|    SSL_TRC(50, ("%d: TLS13[%d]: Setup client ECH",
  ------------------
  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    ssl_Trace b
  ------------------
  774|      0|                 SSL_GETPID(), ss->fd));
  775|       |
  776|      0|    switch (type) {
  777|      0|        case client_hello_initial:
  ------------------
  |  Branch (777:9): [True: 0, False: 0]
  ------------------
  778|      0|            PORT_Assert(!ss->ssl3.hs.echHpkeCtx && !ss->ssl3.hs.echPublicName);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  779|      0|            cx = PK11_HPKE_NewContext(cfg->contents.kemId, cfg->contents.kdfId,
  780|      0|                                      cfg->contents.aeadId, NULL, NULL);
  781|      0|            break;
  782|      0|        case client_hello_retry:
  ------------------
  |  Branch (782:9): [True: 0, False: 0]
  ------------------
  783|      0|            if (!ss->ssl3.hs.echHpkeCtx || !ss->ssl3.hs.echPublicName) {
  ------------------
  |  Branch (783:17): [True: 0, False: 0]
  |  Branch (783:44): [True: 0, False: 0]
  ------------------
  784|      0|                FATAL_ERROR(ss, SEC_ERROR_LIBRARY_FAILURE, internal_error);
  ------------------
  |  |  175|      0|    do {                                     \
  |  |  176|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |  167|      0|    do {                                                                           \
  |  |  |  |  168|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |  169|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |  170|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |  171|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (171:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  177|      0|        tls13_FatalError(ss, prError, desc); \
  |  |  178|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (178:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  785|      0|                return SECFailure;
  786|      0|            }
  787|       |            /* Nothing else to do. */
  788|      0|            return SECSuccess;
  789|      0|        default:
  ------------------
  |  Branch (789:9): [True: 0, False: 0]
  ------------------
  790|      0|            PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  791|      0|            goto loser;
  792|      0|    }
  793|      0|    if (!cx) {
  ------------------
  |  Branch (793:9): [True: 0, False: 0]
  ------------------
  794|      0|        goto loser;
  795|      0|    }
  796|       |
  797|      0|    rv = PK11_HPKE_Deserialize(cx, cfg->contents.publicKey.data, cfg->contents.publicKey.len, &pkR);
  798|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (798:9): [True: 0, False: 0]
  ------------------
  799|      0|        goto loser;
  800|      0|    }
  801|       |
  802|      0|    if (!SECITEM_AllocItem(NULL, &hpkeInfo, strlen(kHpkeInfoEch) + 1 + cfg->raw.len)) {
  ------------------
  |  |  103|      0|#define SECITEM_AllocItem SECITEM_AllocItem_Util
  ------------------
  |  Branch (802:9): [True: 0, False: 0]
  ------------------
  803|      0|        goto loser;
  804|      0|    }
  805|      0|    PORT_Memcpy(&hpkeInfo.data[0], kHpkeInfoEch, strlen(kHpkeInfoEch));
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
  806|      0|    PORT_Memset(&hpkeInfo.data[strlen(kHpkeInfoEch)], 0, 1);
  ------------------
  |  |  182|      0|#define PORT_Memset memset
  ------------------
  807|      0|    PORT_Memcpy(&hpkeInfo.data[strlen(kHpkeInfoEch) + 1], cfg->raw.data, cfg->raw.len);
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
  808|       |
  809|      0|    PRINT_BUF(50, (ss, "Info", hpkeInfo.data, hpkeInfo.len));
  ------------------
  |  |   74|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   75|      0|    ssl_PrintBuf b
  ------------------
  810|       |
  811|       |    /* Setup with an ephemeral sender keypair. */
  812|      0|    rv = PK11_HPKE_SetupS(cx, NULL, NULL, pkR, &hpkeInfo);
  813|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (813:9): [True: 0, False: 0]
  ------------------
  814|      0|        goto loser;
  815|      0|    }
  816|       |
  817|      0|    rv = ssl3_GetNewRandom(ss->ssl3.hs.client_inner_random);
  818|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (818:9): [True: 0, False: 0]
  ------------------
  819|      0|        goto loser; /* code set */
  820|      0|    }
  821|       |
  822|       |    /* If ECH is rejected, the application will use SSLChannelInfo
  823|       |     * to fetch this field and perform cert chain verification. */
  824|      0|    ss->ssl3.hs.echPublicName = PORT_Strdup(cfg->contents.publicName);
  ------------------
  |  |   69|      0|#define PORT_Strdup PORT_Strdup_Util
  ------------------
  825|      0|    if (!ss->ssl3.hs.echPublicName) {
  ------------------
  |  Branch (825:9): [True: 0, False: 0]
  ------------------
  826|      0|        goto loser;
  827|      0|    }
  828|       |
  829|      0|    ss->ssl3.hs.echHpkeCtx = cx;
  830|      0|    SECKEY_DestroyPublicKey(pkR);
  831|      0|    SECITEM_FreeItem(&hpkeInfo, PR_FALSE);
  ------------------
  |  |  108|      0|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                  SECITEM_FreeItem(&hpkeInfo, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  832|      0|    return SECSuccess;
  833|       |
  834|      0|loser:
  835|      0|    PK11_HPKE_DestroyContext(cx, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  836|      0|    SECKEY_DestroyPublicKey(pkR);
  837|      0|    SECITEM_FreeItem(&hpkeInfo, PR_FALSE);
  ------------------
  |  |  108|      0|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                  SECITEM_FreeItem(&hpkeInfo, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  838|      0|    PORT_Assert(PORT_GetError() != 0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  839|      0|    return SECFailure;
  840|      0|}
tls13_MaybeGreaseEch:
 2134|  11.0k|{
 2135|  11.0k|    SECStatus rv;
 2136|  11.0k|    sslBuffer chInnerXtns = SSL_BUFFER_EMPTY;
  ------------------
  |  |   23|  11.0k|    {                        \
  |  |   24|  11.0k|        NULL, 0, 0, PR_FALSE \
  |  |  ------------------
  |  |  |  |  438|  11.0k|#define PR_FALSE 0
  |  |  ------------------
  |  |   25|  11.0k|    }
  ------------------
 2137|  11.0k|    sslBuffer encodedCh = SSL_BUFFER_EMPTY;
  ------------------
  |  |   23|  11.0k|    {                        \
  |  |   24|  11.0k|        NULL, 0, 0, PR_FALSE \
  |  |  ------------------
  |  |  |  |  438|  11.0k|#define PR_FALSE 0
  |  |  ------------------
  |  |   25|  11.0k|    }
  ------------------
 2138|  11.0k|    sslBuffer greaseBuf = SSL_BUFFER_EMPTY;
  ------------------
  |  |   23|  11.0k|    {                        \
  |  |   24|  11.0k|        NULL, 0, 0, PR_FALSE \
  |  |  ------------------
  |  |  |  |  438|  11.0k|#define PR_FALSE 0
  |  |  ------------------
  |  |   25|  11.0k|    }
  ------------------
 2139|  11.0k|    unsigned int payloadLen;
 2140|  11.0k|    HpkeAeadId aead;
 2141|  11.0k|    PK11SlotInfo *slot = NULL;
 2142|  11.0k|    PK11SymKey *hmacPrk = NULL;
 2143|  11.0k|    PK11SymKey *derivedData = NULL;
 2144|  11.0k|    SECItem *rawData;
 2145|  11.0k|    CK_HKDF_PARAMS params;
 2146|  11.0k|    SECItem paramsi;
 2147|       |    /* 1B aead determinant (don't send), 1B config_id, 32B enc, payload */
 2148|  11.0k|    PR_ASSERT(!ss->sec.isServer);
  ------------------
  |  |  208|  11.0k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 11.0k, False: 0]
  |  |  ------------------
  ------------------
 2149|  11.0k|    const int kNonPayloadLen = 34;
 2150|       |
 2151|  11.0k|    if (!ss->opt.enableTls13GreaseEch || ss->ssl3.hs.echHpkeCtx) {
  ------------------
  |  Branch (2151:9): [True: 5.73k, False: 5.27k]
  |  Branch (2151:42): [True: 0, False: 5.27k]
  ------------------
 2152|  5.73k|        return SECSuccess;
 2153|  5.73k|    }
 2154|       |
 2155|  5.27k|    if (ss->vrange.max < SSL_LIBRARY_VERSION_TLS_1_3 ||
  ------------------
  |  |   21|  10.5k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (2155:9): [True: 714, False: 4.55k]
  ------------------
 2156|  5.27k|        IS_DTLS(ss)) {
  ------------------
  |  |  892|  4.55k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  |  |  ------------------
  |  |  |  Branch (892:21): [True: 4.55k, False: 0]
  |  |  ------------------
  ------------------
 2157|  5.27k|        return SECSuccess;
 2158|  5.27k|    }
 2159|       |
 2160|       |    /* In draft-09, CH2 sends exactly the same GREASE ECH extension. */
 2161|      0|    if (ss->ssl3.hs.helloRetry) {
  ------------------
  |  Branch (2161:9): [True: 0, False: 0]
  ------------------
 2162|      0|        return ssl3_EmplaceExtension(ss, buf, ssl_tls13_encrypted_client_hello_xtn,
 2163|      0|                                     ss->ssl3.hs.greaseEchBuf.buf,
 2164|      0|                                     ss->ssl3.hs.greaseEchBuf.len, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 2165|      0|    }
 2166|       |
 2167|       |    /* Compress the extensions for payload length. */
 2168|      0|    rv = tls13_ConstructInnerExtensionsFromOuter(ss, buf, &chInnerXtns,
 2169|      0|                                                 NULL, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 2170|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (2170:9): [True: 0, False: 0]
  ------------------
 2171|      0|        goto loser; /* Code set */
 2172|      0|    }
 2173|      0|    rv = tls13_EncodeClientHelloInner(ss, preamble, &chInnerXtns, &encodedCh);
 2174|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (2174:9): [True: 0, False: 0]
  ------------------
 2175|      0|        goto loser; /* Code set */
 2176|      0|    }
 2177|      0|    rv = tls13_PadChInner(&encodedCh, ss->ssl3.hs.greaseEchSize, strlen(ss->url));
 2178|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (2178:9): [True: 0, False: 0]
  ------------------
 2179|      0|        goto loser; /* Code set */
 2180|      0|    }
 2181|       |
 2182|      0|    payloadLen = encodedCh.len;
 2183|      0|    payloadLen += TLS13_ECH_AEAD_TAG_LEN; /* Aead tag */
  ------------------
  |  |   26|      0|#define TLS13_ECH_AEAD_TAG_LEN 16
  ------------------
 2184|       |
 2185|       |    /* HMAC-Expand to get something that will pass for ciphertext. */
 2186|      0|    slot = PK11_GetBestSlot(CKM_HKDF_DERIVE, NULL);
  ------------------
  |  | 1296|      0|#define CKM_HKDF_DERIVE 0x0000402aUL
  ------------------
 2187|      0|    if (!slot) {
  ------------------
  |  Branch (2187:9): [True: 0, False: 0]
  ------------------
 2188|      0|        goto loser;
 2189|      0|    }
 2190|       |
 2191|      0|    hmacPrk = PK11_KeyGen(slot, CKM_HKDF_DATA, NULL, SHA256_LENGTH, NULL);
  ------------------
  |  | 1297|      0|#define CKM_HKDF_DATA 0x0000402bUL
  ------------------
                  hmacPrk = PK11_KeyGen(slot, CKM_HKDF_DATA, NULL, SHA256_LENGTH, NULL);
  ------------------
  |  |   41|      0|#define SHA256_LENGTH 32
  ------------------
 2192|      0|    if (!hmacPrk) {
  ------------------
  |  Branch (2192:9): [True: 0, False: 0]
  ------------------
 2193|      0|        goto loser;
 2194|      0|    }
 2195|       |
 2196|      0|    params.bExtract = CK_FALSE;
  ------------------
  |  |   23|      0|#define CK_FALSE 0
  ------------------
 2197|      0|    params.bExpand = CK_TRUE;
  ------------------
  |  |   22|      0|#define CK_TRUE 1
  ------------------
 2198|      0|    params.prfHashMechanism = CKM_SHA256;
  ------------------
  |  |  876|      0|#define CKM_SHA256 0x00000250UL
  ------------------
 2199|      0|    params.pInfo = NULL;
 2200|      0|    params.ulInfoLen = 0;
 2201|      0|    paramsi.data = (unsigned char *)&params;
 2202|      0|    paramsi.len = sizeof(params);
 2203|      0|    derivedData = PK11_DeriveWithFlags(hmacPrk, CKM_HKDF_DATA,
  ------------------
  |  | 1297|      0|#define CKM_HKDF_DATA 0x0000402bUL
  ------------------
 2204|      0|                                       &paramsi, CKM_HKDF_DATA,
  ------------------
  |  | 1297|      0|#define CKM_HKDF_DATA 0x0000402bUL
  ------------------
 2205|      0|                                       CKA_DERIVE, kNonPayloadLen + payloadLen,
  ------------------
  |  |  555|      0|#define CKA_DERIVE 0x0000010CUL
  ------------------
 2206|      0|                                       CKF_VERIFY);
  ------------------
  |  | 1358|      0|#define CKF_VERIFY 0x00002000
  ------------------
 2207|      0|    if (!derivedData) {
  ------------------
  |  Branch (2207:9): [True: 0, False: 0]
  ------------------
 2208|      0|        goto loser;
 2209|      0|    }
 2210|       |
 2211|      0|    rv = PK11_ExtractKeyValue(derivedData);
 2212|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (2212:9): [True: 0, False: 0]
  ------------------
 2213|      0|        goto loser;
 2214|      0|    }
 2215|       |
 2216|      0|    rawData = PK11_GetKeyData(derivedData);
 2217|      0|    if (!rawData) {
  ------------------
  |  Branch (2217:9): [True: 0, False: 0]
  ------------------
 2218|      0|        goto loser;
 2219|      0|    }
 2220|      0|    PORT_Assert(rawData->len == kNonPayloadLen + payloadLen);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2221|       |
 2222|       |    /* struct {
 2223|       |       HpkeSymmetricCipherSuite cipher_suite; // kdf_id, aead_id
 2224|       |       PRUint8 config_id;
 2225|       |       opaque enc<1..2^16-1>;
 2226|       |       opaque payload<1..2^16-1>;
 2227|       |    } ClientECH; */
 2228|       |
 2229|      0|    rv = sslBuffer_AppendNumber(&greaseBuf, ech_xtn_type_outer, 1);
 2230|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (2230:9): [True: 0, False: 0]
  ------------------
 2231|      0|        goto loser;
 2232|      0|    }
 2233|       |    /* Only support SHA256. */
 2234|      0|    rv = sslBuffer_AppendNumber(&greaseBuf, HpkeKdfHkdfSha256, 2);
 2235|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (2235:9): [True: 0, False: 0]
  ------------------
 2236|      0|        goto loser;
 2237|      0|    }
 2238|       |
 2239|       |    /* HpkeAeadAes128Gcm = 1, HpkeAeadChaCha20Poly1305 = 3, */
 2240|      0|    aead = (rawData->data[0] & 1) ? HpkeAeadAes128Gcm : HpkeAeadChaCha20Poly1305;
  ------------------
  |  Branch (2240:12): [True: 0, False: 0]
  ------------------
 2241|      0|    rv = sslBuffer_AppendNumber(&greaseBuf, aead, 2);
 2242|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (2242:9): [True: 0, False: 0]
  ------------------
 2243|      0|        goto loser;
 2244|      0|    }
 2245|       |
 2246|       |    /* config_id */
 2247|      0|    rv = sslBuffer_AppendNumber(&greaseBuf, rawData->data[1], 1);
 2248|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (2248:9): [True: 0, False: 0]
  ------------------
 2249|      0|        goto loser;
 2250|      0|    }
 2251|       |
 2252|       |    /* enc len is fixed 32B for X25519. */
 2253|      0|    rv = sslBuffer_AppendVariable(&greaseBuf, &rawData->data[2], 32, 2);
 2254|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (2254:9): [True: 0, False: 0]
  ------------------
 2255|      0|        goto loser;
 2256|      0|    }
 2257|       |
 2258|      0|    rv = sslBuffer_AppendVariable(&greaseBuf, &rawData->data[kNonPayloadLen], payloadLen, 2);
 2259|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (2259:9): [True: 0, False: 0]
  ------------------
 2260|      0|        goto loser;
 2261|      0|    }
 2262|       |
 2263|       |    /* Mark ECH as advertised so that we can validate any response.
 2264|       |     * We'll use echHpkeCtx to determine if we sent real or GREASE ECH. */
 2265|      0|    rv = ssl3_EmplaceExtension(ss, buf, ssl_tls13_encrypted_client_hello_xtn,
 2266|      0|                               greaseBuf.buf, greaseBuf.len, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 2267|      0|    if (rv != SECSuccess) {
  ------------------
  |  Branch (2267:9): [True: 0, False: 0]
  ------------------
 2268|      0|        goto loser;
 2269|      0|    }
 2270|       |
 2271|       |    /* Stash the GREASE ECH extension - in the case of HRR, CH2 must echo it. */
 2272|      0|    ss->ssl3.hs.greaseEchBuf = greaseBuf;
 2273|       |
 2274|      0|    sslBuffer_Clear(&chInnerXtns);
 2275|      0|    sslBuffer_Clear(&encodedCh);
 2276|      0|    PK11_FreeSymKey(hmacPrk);
 2277|      0|    PK11_FreeSymKey(derivedData);
 2278|      0|    PK11_FreeSlot(slot);
 2279|      0|    return SECSuccess;
 2280|       |
 2281|      0|loser:
 2282|      0|    sslBuffer_Clear(&chInnerXtns);
 2283|      0|    sslBuffer_Clear(&encodedCh);
 2284|      0|    PK11_FreeSymKey(hmacPrk);
 2285|      0|    PK11_FreeSymKey(derivedData);
 2286|      0|    if (slot) {
  ------------------
  |  Branch (2286:9): [True: 0, False: 0]
  ------------------
 2287|      0|        PK11_FreeSlot(slot);
 2288|      0|    }
 2289|      0|    return SECFailure;
 2290|      0|}
tls13_MaybeHandleEchSignal:
 2361|  2.70k|{
 2362|  2.70k|    SECStatus rv;
 2363|  2.70k|    PRUint8 computed[TLS13_ECH_SIGNAL_LEN];
 2364|  2.70k|    const PRUint8 *signal;
 2365|  2.70k|    PORT_Assert(!ss->sec.isServer);
  ------------------
  |  |  120|  2.70k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  2.70k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 2.70k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2366|       |
 2367|       |    /* If !echHpkeCtx, we either didn't advertise or sent GREASE ECH. */
 2368|  2.70k|    if (!ss->ssl3.hs.echHpkeCtx) {
  ------------------
  |  Branch (2368:9): [True: 2.70k, False: 0]
  ------------------
 2369|  2.70k|        SSL_TRC(50, ("%d: TLS13[%d]: client only sent GREASE ECH",
  ------------------
  |  |   71|  2.70k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 2.70k]
  |  |  ------------------
  |  |   72|  2.70k|    ssl_Trace b
  ------------------
 2370|  2.70k|                     SSL_GETPID(), ss->fd));
 2371|  2.70k|        ss->ssl3.hs.preliminaryInfo |= ssl_preinfo_ech;
  ------------------
  |  |  398|  2.70k|#define ssl_preinfo_ech (1U << 4)
  ------------------
 2372|  2.70k|        return SECSuccess;
 2373|  2.70k|    }
 2374|       |
 2375|      0|    PORT_Assert(!IS_DTLS(ss));
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2376|       |
 2377|      0|    if (isHrr) {
  ------------------
  |  Branch (2377:9): [True: 0, False: 0]
  ------------------
 2378|      0|        if (ss->xtnData.ech) {
  ------------------
  |  Branch (2378:13): [True: 0, False: 0]
  ------------------
 2379|      0|            signal = ss->xtnData.ech->hrrConfirmation;
 2380|      0|        } else {
 2381|      0|            SSL_TRC(50, ("%d: TLS13[%d]: client did not receive ECH Xtn from Server HRR",
  ------------------
  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    ssl_Trace b
  ------------------
 2382|      0|                         SSL_GETPID(), ss->fd));
 2383|      0|            signal = NULL;
 2384|      0|            ss->ssl3.hs.echAccepted = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 2385|      0|            ss->ssl3.hs.echDecided = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 2386|      0|        }
 2387|      0|    } else {
 2388|      0|        signal = &ss->ssl3.hs.server_random[SSL3_RANDOM_LENGTH - TLS13_ECH_SIGNAL_LEN];
  ------------------
  |  |   24|      0|#define SSL3_RANDOM_LENGTH 32
  ------------------
                      signal = &ss->ssl3.hs.server_random[SSL3_RANDOM_LENGTH - TLS13_ECH_SIGNAL_LEN];
  ------------------
  |  |   25|      0|#define TLS13_ECH_SIGNAL_LEN 8
  ------------------
 2389|      0|    }
 2390|       |
 2391|      0|    PORT_Assert(ssl3_ExtensionAdvertised(ss, ssl_tls13_encrypted_client_hello_xtn));
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2392|       |
 2393|       |    /* Check ECH Confirmation for HRR ECH Xtn or ServerHello Random */
 2394|      0|    if (signal) {
  ------------------
  |  Branch (2394:9): [True: 0, False: 0]
  ------------------
 2395|      0|        rv = tls13_ComputeEchSignal(ss, isHrr, sh, shLen, computed);
 2396|      0|        if (rv != SECSuccess) {
  ------------------
  |  Branch (2396:13): [True: 0, False: 0]
  ------------------
 2397|      0|            return SECFailure;
 2398|      0|        }
 2399|      0|        PRINT_BUF(100, (ss, "Server Signal", signal, TLS13_ECH_SIGNAL_LEN));
  ------------------
  |  |   74|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   75|      0|    ssl_PrintBuf b
  ------------------
 2400|      0|        PRBool new_decision = !NSS_SecureMemcmp(computed, signal, TLS13_ECH_SIGNAL_LEN);
  ------------------
  |  |   25|      0|#define TLS13_ECH_SIGNAL_LEN 8
  ------------------
 2401|       |        /* Server can't change its mind on whether to accept ECH */
 2402|      0|        if (ss->ssl3.hs.echDecided && new_decision != ss->ssl3.hs.echAccepted) {
  ------------------
  |  Branch (2402:13): [True: 0, False: 0]
  |  Branch (2402:39): [True: 0, False: 0]
  ------------------
 2403|      0|            FATAL_ERROR(ss, SSL_ERROR_RX_MALFORMED_SERVER_HELLO, illegal_parameter);
  ------------------
  |  |  175|      0|    do {                                     \
  |  |  176|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |  167|      0|    do {                                                                           \
  |  |  |  |  168|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |  169|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |  170|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |  171|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (171:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  177|      0|        tls13_FatalError(ss, prError, desc); \
  |  |  178|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (178:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2404|      0|            return SECFailure;
 2405|      0|        }
 2406|      0|        ss->ssl3.hs.echAccepted = new_decision;
 2407|      0|        ss->ssl3.hs.echDecided = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 2408|      0|    }
 2409|       |
 2410|      0|    ss->ssl3.hs.preliminaryInfo |= ssl_preinfo_ech;
  ------------------
  |  |  398|      0|#define ssl_preinfo_ech (1U << 4)
  ------------------
 2411|      0|    if (ss->ssl3.hs.echAccepted) {
  ------------------
  |  Branch (2411:9): [True: 0, False: 0]
  ------------------
 2412|      0|        if (ss->version < SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|      0|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (2412:13): [True: 0, False: 0]
  ------------------
 2413|      0|            FATAL_ERROR(ss, SSL_ERROR_RX_MALFORMED_SERVER_HELLO, illegal_parameter);
  ------------------
  |  |  175|      0|    do {                                     \
  |  |  176|      0|        LOG_ERROR(ss, prError);              \
  |  |  ------------------
  |  |  |  |  167|      0|    do {                                                                           \
  |  |  |  |  168|      0|        SSL_TRC(3, ("%d: TLS13[%d]: fatal error %d in %s (%s:%d)",                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    ssl_Trace b
  |  |  |  |  ------------------
  |  |  |  |  169|      0|                    SSL_GETPID(), ss->fd, prError, __func__, __FILE__, __LINE__)); \
  |  |  |  |  170|      0|        PORT_SetError(prError);                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  |  |  |  |  ------------------
  |  |  |  |  171|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (171:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  177|      0|        tls13_FatalError(ss, prError, desc); \
  |  |  178|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (178:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2414|      0|            return SECFailure;
 2415|      0|        }
 2416|       |        /* Server accepted, but sent an extension which was only advertised in the ClientHelloOuter */
 2417|      0|        if (ss->ssl3.hs.echInvalidExtension) {
  ------------------
  |  Branch (2417:13): [True: 0, False: 0]
  ------------------
 2418|      0|            (void)SSL3_SendAlert(ss, alert_fatal, unsupported_extension);
 2419|      0|            PORT_SetError(SSL_ERROR_RX_UNEXPECTED_EXTENSION);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2420|      0|            return SECFailure;
 2421|      0|        }
 2422|       |
 2423|       |        /* Swap the advertised lists as we've accepted ECH. */
 2424|      0|        PRUint16 *tempArray = ss->xtnData.advertised;
 2425|      0|        PRUint16 tempNum = ss->xtnData.numAdvertised;
 2426|       |
 2427|      0|        ss->xtnData.advertised = ss->xtnData.echAdvertised;
 2428|      0|        ss->xtnData.numAdvertised = ss->xtnData.echNumAdvertised;
 2429|       |
 2430|      0|        ss->xtnData.echAdvertised = tempArray;
 2431|      0|        ss->xtnData.echNumAdvertised = tempNum;
 2432|       |
 2433|       |        /* |enc| must not be included in CH2.ClientECH. */
 2434|      0|        if (ss->ssl3.hs.helloRetry && ss->sec.isServer &&
  ------------------
  |  Branch (2434:13): [True: 0, False: 0]
  |  Branch (2434:39): [True: 0, False: 0]
  ------------------
 2435|      0|            ss->xtnData.ech->senderPubKey.len) {
  ------------------
  |  Branch (2435:13): [True: 0, False: 0]
  ------------------
 2436|      0|            ssl3_ExtSendAlert(ss, alert_fatal, illegal_parameter);
 2437|      0|            PORT_SetError(SSL_ERROR_BAD_2ND_CLIENT_HELLO);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2438|      0|            return SECFailure;
 2439|      0|        }
 2440|      0|        ss->xtnData.negotiated[ss->xtnData.numNegotiated++] = ssl_tls13_encrypted_client_hello_xtn;
 2441|       |
 2442|       |        /* Only overwrite client_random with client_inner_random if CHInner was
 2443|       |         *  succesfully used for handshake (NOT if HRR is received). */
 2444|      0|        if (!isHrr) {
  ------------------
  |  Branch (2444:13): [True: 0, False: 0]
  ------------------
 2445|      0|            PORT_Memcpy(ss->ssl3.hs.client_random, ss->ssl3.hs.client_inner_random, SSL3_RANDOM_LENGTH);
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
                          PORT_Memcpy(ss->ssl3.hs.client_random, ss->ssl3.hs.client_inner_random, SSL3_RANDOM_LENGTH);
  ------------------
  |  |   24|      0|#define SSL3_RANDOM_LENGTH 32
  ------------------
 2446|      0|        }
 2447|      0|    }
 2448|       |    /* If rejected, leave echHpkeCtx and echPublicName for rejection paths. */
 2449|      0|    ssl3_CoalesceEchHandshakeHashes(ss);
 2450|      0|    SSL_TRC(3, ("%d: TLS13[%d]: ECH %s accepted by server",
  ------------------
  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    ssl_Trace b
  |  |  ------------------
  |  |  |  Branch (72:15): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2451|      0|                SSL_GETPID(), ss->fd, ss->ssl3.hs.echAccepted ? "is" : "is not"));
 2452|      0|    return SECSuccess;
 2453|      0|}

tls13_SizeOfKeyShareEntry:
   64|  9.52k|{
   65|       |    /* Size = NamedGroup(2) + length(2) + opaque<?> share */
   66|  9.52k|    PRUint32 size = 2 + 2;
   67|       |
   68|  9.52k|    const SECKEYPublicKey *pubKey = keyPair->keys->pubKey;
   69|  9.52k|    switch (pubKey->keyType) {
   70|  8.40k|        case ecKey:
  ------------------
  |  Branch (70:9): [True: 8.40k, False: 1.12k]
  ------------------
   71|  8.40k|            size += pubKey->u.ec.publicValue.len;
   72|  8.40k|            break;
   73|  1.12k|        case dhKey:
  ------------------
  |  Branch (73:9): [True: 1.12k, False: 8.40k]
  ------------------
   74|  1.12k|            size += pubKey->u.dh.prime.len;
   75|  1.12k|            break;
   76|      0|        default:
  ------------------
  |  Branch (76:9): [True: 0, False: 9.52k]
  ------------------
   77|      0|            PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   78|      0|            return 0;
   79|  9.52k|    }
   80|       |
   81|  9.52k|    if (keyPair->kemKeys) {
  ------------------
  |  Branch (81:9): [True: 40, False: 9.48k]
  ------------------
   82|     40|        PORT_Assert(!keyPair->kemCt);
  ------------------
  |  |  120|     40|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|     40|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 40, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   83|     40|        PORT_Assert(keyPair->group->name == ssl_grp_kem_xyber768d00 || keyPair->group->name == ssl_grp_kem_mlkem768x25519);
  ------------------
  |  |  120|     40|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|     80|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 0, False: 40]
  |  |  |  |  |  Branch (208:7): [True: 40, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   84|     40|        pubKey = keyPair->kemKeys->pubKey;
   85|     40|        size += pubKey->u.kyber.publicValue.len;
   86|     40|    }
   87|  9.52k|    if (keyPair->kemCt) {
  ------------------
  |  Branch (87:9): [True: 0, False: 9.52k]
  ------------------
   88|      0|        PORT_Assert(!keyPair->kemKeys);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   89|      0|        PORT_Assert(keyPair->group->name == ssl_grp_kem_xyber768d00 || keyPair->group->name == ssl_grp_kem_mlkem768x25519);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   90|      0|        size += keyPair->kemCt->len;
   91|      0|    }
   92|       |
   93|  9.52k|    return size;
   94|  9.52k|}
tls13_EncodeKeyShareEntry:
  175|  9.52k|{
  176|  9.52k|    SECStatus rv;
  177|  9.52k|    unsigned int size = tls13_SizeOfKeyShareEntry(keyPair);
  178|       |
  179|  9.52k|    rv = sslBuffer_AppendNumber(buf, keyPair->group->name, 2);
  180|  9.52k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (180:9): [True: 0, False: 9.52k]
  ------------------
  181|      0|        return rv;
  182|      0|    }
  183|       |
  184|  9.52k|    rv = sslBuffer_AppendNumber(buf, size - 4, 2);
  185|  9.52k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (185:9): [True: 0, False: 9.52k]
  ------------------
  186|      0|        return rv;
  187|      0|    }
  188|       |
  189|  9.52k|    switch (keyPair->group->name) {
  190|     40|        case ssl_grp_kem_mlkem768x25519:
  ------------------
  |  Branch (190:9): [True: 40, False: 9.48k]
  ------------------
  191|     40|            rv = tls13_WriteMLKEM768X25519KeyExchangeInfo(buf, keyPair);
  192|     40|            break;
  193|      0|        case ssl_grp_kem_xyber768d00:
  ------------------
  |  Branch (193:9): [True: 0, False: 9.52k]
  ------------------
  194|      0|            rv = tls13_WriteXyber768D00KeyExchangeInfo(buf, keyPair);
  195|      0|            break;
  196|  9.48k|        default:
  ------------------
  |  Branch (196:9): [True: 9.48k, False: 40]
  ------------------
  197|  9.48k|            rv = tls13_WriteKeyExchangeInfo(buf, keyPair);
  198|  9.48k|            break;
  199|  9.52k|    }
  200|  9.52k|    return rv;
  201|  9.52k|}
tls13_ClientSendKeyShareXtn:
  206|  11.0k|{
  207|  11.0k|    SECStatus rv;
  208|  11.0k|    PRCList *cursor;
  209|  11.0k|    unsigned int lengthOffset;
  210|       |
  211|  11.0k|    if (ss->vrange.max < SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|  11.0k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (211:9): [True: 1.47k, False: 9.52k]
  ------------------
  212|  1.47k|        return SECSuccess;
  213|  1.47k|    }
  214|       |
  215|       |    /* Optimistically try to send an ECDHE key using the
  216|       |     * preexisting key (in future will be keys) */
  217|  9.52k|    SSL_TRC(3, ("%d: TLS13[%d]: send client key share xtn",
  ------------------
  |  |   71|  9.52k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 9.52k]
  |  |  ------------------
  |  |   72|  9.52k|    ssl_Trace b
  ------------------
  218|  9.52k|                SSL_GETPID(), ss->fd));
  219|       |
  220|       |    /* Save the offset to the length. */
  221|  9.52k|    rv = sslBuffer_Skip(buf, 2, &lengthOffset);
  222|  9.52k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (222:9): [True: 0, False: 9.52k]
  ------------------
  223|      0|        return SECFailure;
  224|      0|    }
  225|       |
  226|  9.52k|    for (cursor = PR_NEXT_LINK(&ss->ephemeralKeyPairs);
  ------------------
  |  |   47|  9.52k|        ((_e)->next)
  ------------------
  227|  19.0k|         cursor != &ss->ephemeralKeyPairs;
  ------------------
  |  Branch (227:10): [True: 9.52k, False: 9.52k]
  ------------------
  228|  9.52k|         cursor = PR_NEXT_LINK(cursor)) {
  ------------------
  |  |   47|  9.52k|        ((_e)->next)
  ------------------
  229|  9.52k|        sslEphemeralKeyPair *keyPair = (sslEphemeralKeyPair *)cursor;
  230|  9.52k|        rv = tls13_EncodeKeyShareEntry(buf, keyPair);
  231|  9.52k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (231:13): [True: 0, False: 9.52k]
  ------------------
  232|      0|            return SECFailure;
  233|      0|        }
  234|  9.52k|    }
  235|       |
  236|       |    /* GREASE KeyShareEntry:
  237|       |     * [The client] MAY also send KeyShareEntry values for a subset of those
  238|       |     * selected in the "key_share" extension.  For each of these, the
  239|       |     * "key_exchange" field MAY be any value [RFC8701, Section 3.1].
  240|       |     *
  241|       |     * By default we do not send KeyShares for every NamedGroup so the
  242|       |     * ServerKeyShare handshake message / additional round-trip is not
  243|       |     * triggered by sending GREASE KeyShareEntries. */
  244|  9.52k|    if (ss->opt.enableGrease) {
  ------------------
  |  Branch (244:9): [True: 4.76k, False: 4.76k]
  ------------------
  245|  4.76k|        rv = sslBuffer_AppendNumber(buf, ss->ssl3.hs.grease->idx[grease_group], 2);
  246|  4.76k|        if (rv != SECSuccess)
  ------------------
  |  Branch (246:13): [True: 0, False: 4.76k]
  ------------------
  247|      0|            return rv;
  248|       |        /* Entry length */
  249|  4.76k|        rv = sslBuffer_AppendNumber(buf, 2, 2);
  250|  4.76k|        if (rv != SECSuccess)
  ------------------
  |  Branch (250:13): [True: 0, False: 4.76k]
  ------------------
  251|      0|            return rv;
  252|       |        /* Entry value */
  253|  4.76k|        rv = sslBuffer_AppendNumber(buf, 0xCD, 2);
  254|  4.76k|        if (rv != SECSuccess)
  ------------------
  |  Branch (254:13): [True: 0, False: 4.76k]
  ------------------
  255|      0|            return rv;
  256|  4.76k|    }
  257|       |
  258|  9.52k|    rv = sslBuffer_InsertLength(buf, lengthOffset, 2);
  259|  9.52k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (259:9): [True: 0, False: 9.52k]
  ------------------
  260|      0|        return SECFailure;
  261|      0|    }
  262|       |
  263|  9.52k|    *added = PR_TRUE;
  ------------------
  |  |  437|  9.52k|#define PR_TRUE 1
  ------------------
  264|  9.52k|    return SECSuccess;
  265|  9.52k|}
tls13_DecodeKeyShareEntry:
  269|  1.54k|{
  270|  1.54k|    SECStatus rv;
  271|  1.54k|    PRUint64 group;
  272|  1.54k|    const sslNamedGroupDef *groupDef;
  273|  1.54k|    TLS13KeyShareEntry *ks = NULL;
  274|  1.54k|    sslReadBuffer share;
  275|       |
  276|  1.54k|    rv = sslRead_ReadNumber(rdr, 2, &group);
  277|  1.54k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (277:9): [True: 1, False: 1.54k]
  ------------------
  278|      1|        goto loser;
  279|      1|    }
  280|  1.54k|    groupDef = ssl_LookupNamedGroup(group);
  281|  1.54k|    rv = sslRead_ReadVariable(rdr, 2, &share);
  282|  1.54k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (282:9): [True: 27, False: 1.51k]
  ------------------
  283|     27|        goto loser;
  284|     27|    }
  285|       |
  286|       |    /* This has to happen here because we want to consume
  287|       |     * the entire entry even if the group is unknown
  288|       |     * or disabled. */
  289|       |    /* If the group is disabled, continue. */
  290|  1.51k|    if (!groupDef) {
  ------------------
  |  Branch (290:9): [True: 2, False: 1.51k]
  ------------------
  291|      2|        return SECSuccess;
  292|      2|    }
  293|       |
  294|  1.51k|    ks = PORT_ZNew(TLS13KeyShareEntry);
  ------------------
  |  |  148|  1.51k|#define PORT_ZNew(type) (type *)PORT_ZAlloc(sizeof(type))
  |  |  ------------------
  |  |  |  |   72|  1.51k|#define PORT_ZAlloc PORT_ZAlloc_Util
  |  |  ------------------
  ------------------
  295|  1.51k|    if (!ks) {
  ------------------
  |  Branch (295:9): [True: 0, False: 1.51k]
  ------------------
  296|      0|        goto loser;
  297|      0|    }
  298|  1.51k|    ks->group = groupDef;
  299|       |
  300|  1.51k|    rv = SECITEM_MakeItem(NULL, &ks->key_exchange,
  301|  1.51k|                          share.buf, share.len);
  302|  1.51k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (302:9): [True: 0, False: 1.51k]
  ------------------
  303|      0|        goto loser;
  304|      0|    }
  305|       |
  306|  1.51k|    *ksp = ks;
  307|  1.51k|    return SECSuccess;
  308|       |
  309|     28|loser:
  310|     28|    tls13_DestroyKeyShareEntry(ks);
  311|       |
  312|     28|    return SECFailure;
  313|  1.51k|}
tls13_ClientHandleKeyShareXtn:
  320|  1.54k|{
  321|  1.54k|    SECStatus rv;
  322|  1.54k|    PORT_Assert(PR_CLIST_IS_EMPTY(&xtnData->remoteKeyShares));
  ------------------
  |  |  120|  1.54k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.54k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.54k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  323|  1.54k|    TLS13KeyShareEntry *ks = NULL;
  324|       |
  325|  1.54k|    PORT_Assert(!ss->sec.isServer);
  ------------------
  |  |  120|  1.54k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.54k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.54k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  326|       |
  327|       |    /* The server must not send this extension when negotiating < TLS 1.3. */
  328|  1.54k|    if (ss->version < SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|  1.54k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (328:9): [True: 3, False: 1.54k]
  ------------------
  329|      3|        PORT_SetError(SSL_ERROR_EXTENSION_DISALLOWED_FOR_VERSION);
  ------------------
  |  |   65|      3|#define PORT_SetError PORT_SetError_Util
  ------------------
  330|      3|        return SECFailure;
  331|      3|    }
  332|       |
  333|  1.54k|    SSL_TRC(3, ("%d: SSL3[%d]: handle key_share extension",
  ------------------
  |  |   71|  1.54k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 1.54k]
  |  |  ------------------
  |  |   72|  1.54k|    ssl_Trace b
  ------------------
  334|  1.54k|                SSL_GETPID(), ss->fd));
  335|       |
  336|  1.54k|    sslReader rdr = SSL_READER(data->data, data->len);
  ------------------
  |  |   85|  1.54k|    {                    \
  |  |   86|  1.54k|        { b, l }, 0      \
  |  |   87|  1.54k|    }
  ------------------
  337|  1.54k|    rv = tls13_DecodeKeyShareEntry(&rdr, &ks);
  338|  1.54k|    if ((rv != SECSuccess) || !ks) {
  ------------------
  |  Branch (338:9): [True: 28, False: 1.51k]
  |  Branch (338:31): [True: 2, False: 1.51k]
  ------------------
  339|     30|        ssl3_ExtSendAlert(ss, alert_fatal, illegal_parameter);
  340|     30|        PORT_SetError(SSL_ERROR_RX_MALFORMED_KEY_SHARE);
  ------------------
  |  |   65|     30|#define PORT_SetError PORT_SetError_Util
  ------------------
  341|     30|        return SECFailure;
  342|     30|    }
  343|       |
  344|  1.51k|    if (SSL_READER_REMAINING(&rdr)) {
  ------------------
  |  |   91|  1.51k|    ((r)->buf.len - (r)->offset)
  |  |  ------------------
  |  |  |  Branch (91:5): [True: 12, False: 1.50k]
  |  |  ------------------
  ------------------
  345|     12|        tls13_DestroyKeyShareEntry(ks);
  346|     12|        PORT_SetError(SSL_ERROR_RX_MALFORMED_KEY_SHARE);
  ------------------
  |  |   65|     12|#define PORT_SetError PORT_SetError_Util
  ------------------
  347|     12|        return SECFailure;
  348|     12|    }
  349|  1.50k|    PR_APPEND_LINK(&ks->link, &xtnData->remoteKeyShares);
  ------------------
  |  |   57|  1.51k|#define PR_APPEND_LINK(_e,_l) PR_INSERT_BEFORE(_e,_l)
  |  |  ------------------
  |  |  |  |   25|  3.00k|    PR_BEGIN_MACRO       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  123|  1.50k|#define PR_BEGIN_MACRO  do {
  |  |  |  |  ------------------
  |  |  |  |   26|  3.00k|    (_e)->next = (_l);   \
  |  |  |  |   27|  3.00k|    (_e)->prev = (_l)->prev; \
  |  |  |  |   28|  3.00k|    (_l)->prev->next = (_e); \
  |  |  |  |   29|  3.00k|    (_l)->prev = (_e);   \
  |  |  |  |   30|  3.00k|    PR_END_MACRO
  |  |  |  |  ------------------
  |  |  |  |  |  |  124|  1.50k|#define PR_END_MACRO    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  350|       |
  351|  1.50k|    return SECSuccess;
  352|  1.51k|}
tls13_ClientHandleKeyShareXtnHrr:
  357|  1.28k|{
  358|  1.28k|    SECStatus rv;
  359|  1.28k|    PRUint32 tmp;
  360|  1.28k|    const sslNamedGroupDef *group;
  361|       |
  362|  1.28k|    PORT_Assert(!ss->sec.isServer);
  ------------------
  |  |  120|  1.28k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.28k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.28k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  363|  1.28k|    PORT_Assert(ss->vrange.max >= SSL_LIBRARY_VERSION_TLS_1_3);
  ------------------
  |  |  120|  1.28k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.28k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.28k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  364|       |
  365|  1.28k|    SSL_TRC(3, ("%d: SSL3[%d]: handle key_share extension in HRR",
  ------------------
  |  |   71|  1.28k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 1.28k]
  |  |  ------------------
  |  |   72|  1.28k|    ssl_Trace b
  ------------------
  366|  1.28k|                SSL_GETPID(), ss->fd));
  367|       |
  368|  1.28k|    rv = ssl3_ExtConsumeHandshakeNumber(ss, &tmp, 2, &data->data, &data->len);
  369|  1.28k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (369:9): [True: 1, False: 1.28k]
  ------------------
  370|      1|        return SECFailure; /* error code already set */
  371|      1|    }
  372|  1.28k|    if (data->len) {
  ------------------
  |  Branch (372:9): [True: 3, False: 1.27k]
  ------------------
  373|      3|        ssl3_ExtSendAlert(ss, alert_fatal, decode_error);
  374|      3|        PORT_SetError(SSL_ERROR_RX_MALFORMED_HELLO_RETRY_REQUEST);
  ------------------
  |  |   65|      3|#define PORT_SetError PORT_SetError_Util
  ------------------
  375|      3|        return SECFailure;
  376|      3|    }
  377|       |
  378|  1.27k|    group = ssl_LookupNamedGroup((SSLNamedGroup)tmp);
  379|       |    /* If the group is not enabled, or we already have a share for the
  380|       |     * requested group, abort. */
  381|  1.27k|    if (!ssl_NamedGroupEnabled(ss, group) ||
  ------------------
  |  Branch (381:9): [True: 5, False: 1.27k]
  ------------------
  382|  1.27k|        ssl_HaveEphemeralKeyPair(ss, group)) {
  ------------------
  |  Branch (382:9): [True: 1, False: 1.27k]
  ------------------
  383|      6|        ssl3_ExtSendAlert(ss, alert_fatal, illegal_parameter);
  384|      6|        PORT_SetError(SSL_ERROR_RX_MALFORMED_HELLO_RETRY_REQUEST);
  ------------------
  |  |   65|      6|#define PORT_SetError PORT_SetError_Util
  ------------------
  385|      6|        return SECFailure;
  386|      6|    }
  387|       |
  388|       |    /* Now delete all the key shares per [draft-ietf-tls-tls13 S 4.1.2] */
  389|  1.27k|    ssl_FreeEphemeralKeyPairs(CONST_CAST(sslSocket, ss));
  ------------------
  |  |   96|  1.27k|#define CONST_CAST(T, X) ((T *)(X))
  ------------------
  390|       |
  391|       |    /* And replace with our new share. */
  392|  1.27k|    rv = tls13_AddKeyShare(CONST_CAST(sslSocket, ss), group);
  ------------------
  |  |   96|  1.27k|#define CONST_CAST(T, X) ((T *)(X))
  ------------------
  393|  1.27k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (393:9): [True: 0, False: 1.27k]
  ------------------
  394|      0|        ssl3_ExtSendAlert(ss, alert_fatal, internal_error);
  395|      0|        PORT_SetError(SEC_ERROR_KEYGEN_FAIL);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  396|      0|        return SECFailure;
  397|      0|    }
  398|       |
  399|  1.27k|    return SECSuccess;
  400|  1.27k|}
tls13_ClientSendPreSharedKeyXtn:
  506|  11.0k|{
  507|  11.0k|    const static PRUint8 binder[TLS13_MAX_FINISHED_SIZE] = { 0 };
  508|  11.0k|    unsigned int binderLen;
  509|  11.0k|    unsigned int identityLen = 0;
  510|  11.0k|    const PRUint8 *identity = NULL;
  511|  11.0k|    PRTime age;
  512|  11.0k|    SECStatus rv;
  513|       |
  514|       |    /* Exit early if no PSKs or max version < 1.3. */
  515|  11.0k|    if (PR_CLIST_IS_EMPTY(&ss->ssl3.hs.psks) ||
  ------------------
  |  |   94|  22.0k|    ((_l)->next == (_l))
  |  |  ------------------
  |  |  |  Branch (94:5): [True: 5.41k, False: 5.59k]
  |  |  ------------------
  ------------------
  516|  11.0k|        ss->vrange.max < SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|  5.59k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (516:9): [True: 778, False: 4.81k]
  ------------------
  517|  6.19k|        return SECSuccess;
  518|  6.19k|    }
  519|       |
  520|       |    /* ...or if PSK type is resumption, but we're not resuming. */
  521|  4.81k|    sslPsk *psk = (sslPsk *)PR_LIST_HEAD(&ss->ssl3.hs.psks);
  ------------------
  |  |   65|  4.81k|#define PR_LIST_HEAD(_l) (_l)->next
  ------------------
  522|  4.81k|    if (psk->type == ssl_psk_resume && !ss->statelessResume) {
  ------------------
  |  Branch (522:9): [True: 0, False: 4.81k]
  |  Branch (522:40): [True: 0, False: 0]
  ------------------
  523|      0|        return SECSuccess;
  524|      0|    }
  525|       |
  526|       |    /* ...or if PSKs are incompatible with negotiated ciphersuites
  527|       |     * (different hash algorithms) on HRR.
  528|       |     *
  529|       |     * In addition, in its updated ClientHello, the client SHOULD NOT offer any
  530|       |     * pre-shared keys associated with a hash other than that of the selected
  531|       |     * cipher suite.  This allows the client to avoid having to compute partial
  532|       |     * hash transcripts for multiple hashes in the second ClientHello
  533|       |     * [RFC8446, Section 4.1.4]. */
  534|  4.81k|    if (ss->ssl3.hs.helloRetry &&
  ------------------
  |  Branch (534:9): [True: 617, False: 4.19k]
  ------------------
  535|  4.81k|        (psk->hash != ss->ssl3.hs.suite_def->prf_hash)) {
  ------------------
  |  Branch (535:9): [True: 301, False: 316]
  ------------------
  536|    301|        return SECSuccess;
  537|    301|    }
  538|       |
  539|       |    /* Save where this extension starts so that if we have to add padding, it
  540|       |     * can be inserted before this extension. */
  541|  4.51k|    PORT_Assert(buf->len >= 4);
  ------------------
  |  |  120|  4.51k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  4.51k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 4.51k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  542|  4.51k|    xtnData->lastXtnOffset = buf->len - 4;
  543|  4.51k|    PORT_Assert(psk->type == ssl_psk_resume || psk->type == ssl_psk_external);
  ------------------
  |  |  120|  4.51k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  9.03k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 0, False: 4.51k]
  |  |  |  |  |  Branch (208:7): [True: 4.51k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  544|  4.51k|    binderLen = tls13_GetHashSizeForHash(psk->hash);
  545|  4.51k|    if (psk->type == ssl_psk_resume) {
  ------------------
  |  Branch (545:9): [True: 0, False: 4.51k]
  ------------------
  546|       |        /* Send a single ticket identity. */
  547|      0|        NewSessionTicket *session_ticket = &ss->sec.ci.sid->u.ssl3.locked.sessionTicket;
  548|      0|        identityLen = session_ticket->ticket.len;
  549|      0|        identity = session_ticket->ticket.data;
  550|       |
  551|       |        /* Obfuscated age. */
  552|      0|        age = ssl_Time(ss) - session_ticket->received_timestamp;
  553|      0|        age /= PR_USEC_PER_MSEC;
  ------------------
  |  |   30|      0|#define PR_USEC_PER_MSEC    1000L
  ------------------
  554|      0|        age += session_ticket->ticket_age_add;
  555|      0|        PRINT_BUF(50, (ss, "Sending Resumption PSK with identity", identity, identityLen));
  ------------------
  |  |   74|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   75|      0|    ssl_PrintBuf b
  ------------------
  556|  4.51k|    } else if (psk->type == ssl_psk_external) {
  ------------------
  |  Branch (556:16): [True: 4.51k, False: 0]
  ------------------
  557|  4.51k|        identityLen = psk->label.len;
  558|  4.51k|        identity = psk->label.data;
  559|  4.51k|        age = 0;
  560|  4.51k|        PRINT_BUF(50, (ss, "Sending External PSK with label", identity, identityLen));
  ------------------
  |  |   74|  4.51k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 4.51k]
  |  |  ------------------
  |  |   75|  4.51k|    ssl_PrintBuf b
  ------------------
  561|  4.51k|    } else {
  562|      0|        PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  563|      0|        PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  564|      0|        return SECFailure;
  565|      0|    }
  566|       |
  567|       |    /* Length is len(identityLen) + identityLen + len(age) */
  568|  4.51k|    rv = sslBuffer_AppendNumber(buf, 2 + identityLen + 4, 2);
  569|  4.51k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (569:9): [True: 0, False: 4.51k]
  ------------------
  570|      0|        goto loser;
  571|      0|    }
  572|       |
  573|  4.51k|    rv = sslBuffer_AppendVariable(buf, identity,
  574|  4.51k|                                  identityLen, 2);
  575|  4.51k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (575:9): [True: 0, False: 4.51k]
  ------------------
  576|      0|        goto loser;
  577|      0|    }
  578|       |
  579|  4.51k|    rv = sslBuffer_AppendNumber(buf, age, 4);
  580|  4.51k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (580:9): [True: 0, False: 4.51k]
  ------------------
  581|      0|        goto loser;
  582|      0|    }
  583|       |
  584|       |    /* Write out the binder list length. */
  585|  4.51k|    rv = sslBuffer_AppendNumber(buf, binderLen + 1, 2);
  586|  4.51k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (586:9): [True: 0, False: 4.51k]
  ------------------
  587|      0|        goto loser;
  588|      0|    }
  589|       |
  590|       |    /* Write zeroes for the binder for the moment. These
  591|       |     * are overwritten in tls13_WriteExtensionsWithBinder. */
  592|  4.51k|    rv = sslBuffer_AppendVariable(buf, binder, binderLen, 1);
  593|  4.51k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (593:9): [True: 0, False: 4.51k]
  ------------------
  594|      0|        goto loser;
  595|      0|    }
  596|       |
  597|  4.51k|    if (psk->type == ssl_psk_resume) {
  ------------------
  |  Branch (597:9): [True: 0, False: 4.51k]
  ------------------
  598|      0|        xtnData->sentSessionTicketInClientHello = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  599|      0|    }
  600|       |
  601|  4.51k|    *added = PR_TRUE;
  ------------------
  |  |  437|  4.51k|#define PR_TRUE 1
  ------------------
  602|  4.51k|    return SECSuccess;
  603|       |
  604|      0|loser:
  605|      0|    xtnData->ticketTimestampVerified = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  606|      0|    return SECFailure;
  607|  4.51k|}
tls13_ClientHandlePreSharedKeyXtn:
  779|     25|{
  780|     25|    PRUint32 index;
  781|     25|    SECStatus rv;
  782|       |
  783|     25|    SSL_TRC(3, ("%d: SSL3[%d]: handle pre_shared_key extension",
  ------------------
  |  |   71|     25|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 25]
  |  |  ------------------
  |  |   72|     25|    ssl_Trace b
  ------------------
  784|     25|                SSL_GETPID(), ss->fd));
  785|       |
  786|       |    /* The server must not send this extension when negotiating < TLS 1.3. */
  787|     25|    if (ss->version < SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|     25|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (787:9): [True: 1, False: 24]
  ------------------
  788|      1|        PORT_SetError(SSL_ERROR_EXTENSION_DISALLOWED_FOR_VERSION);
  ------------------
  |  |   65|      1|#define PORT_SetError PORT_SetError_Util
  ------------------
  789|      1|        return SECFailure;
  790|      1|    }
  791|       |
  792|     24|    rv = ssl3_ExtConsumeHandshakeNumber(ss, &index, 2, &data->data, &data->len);
  793|     24|    if (rv != SECSuccess)
  ------------------
  |  Branch (793:9): [True: 1, False: 23]
  ------------------
  794|      1|        return SECFailure;
  795|       |
  796|       |    /* This should be the end of the extension. */
  797|     23|    if (data->len) {
  ------------------
  |  Branch (797:9): [True: 2, False: 21]
  ------------------
  798|      2|        PORT_SetError(SSL_ERROR_MALFORMED_PRE_SHARED_KEY);
  ------------------
  |  |   65|      2|#define PORT_SetError PORT_SetError_Util
  ------------------
  799|      2|        return SECFailure;
  800|      2|    }
  801|       |
  802|       |    /* We only sent one PSK label so index must be equal to 0 */
  803|     21|    if (index) {
  ------------------
  |  Branch (803:9): [True: 11, False: 10]
  ------------------
  804|     11|        ssl3_ExtSendAlert(ss, alert_fatal, illegal_parameter);
  805|     11|        PORT_SetError(SSL_ERROR_MALFORMED_PRE_SHARED_KEY);
  ------------------
  |  |   65|     11|#define PORT_SetError PORT_SetError_Util
  ------------------
  806|     11|        return SECFailure;
  807|     11|    }
  808|       |
  809|     10|    PORT_Assert(!PR_CLIST_IS_EMPTY(&ss->ssl3.hs.psks));
  ------------------
  |  |  120|     10|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|     10|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 10, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  810|     10|    sslPsk *candidate = (sslPsk *)PR_LIST_HEAD(&ss->ssl3.hs.psks);
  ------------------
  |  |   65|     10|#define PR_LIST_HEAD(_l) (_l)->next
  ------------------
  811|       |
  812|       |    /* Check that the server-selected ciphersuite hash and PSK hash match. */
  813|     10|    if (candidate->hash != tls13_GetHashForCipherSuite(ss->ssl3.hs.cipher_suite)) {
  ------------------
  |  Branch (813:9): [True: 1, False: 9]
  ------------------
  814|      1|        ssl3_ExtSendAlert(ss, alert_fatal, illegal_parameter);
  815|      1|        return SECFailure;
  816|      1|    }
  817|       |
  818|       |    /* Keep track of negotiated extensions. */
  819|      9|    xtnData->negotiated[xtnData->numNegotiated++] = ssl_tls13_pre_shared_key_xtn;
  820|      9|    xtnData->selectedPsk = candidate;
  821|       |
  822|      9|    return SECSuccess;
  823|     10|}
tls13_ClientSendEarlyDataXtn:
  831|  11.0k|{
  832|  11.0k|    if (!tls13_ClientAllow0Rtt(ss, ss->sec.ci.sid)) {
  ------------------
  |  Branch (832:9): [True: 11.0k, False: 0]
  ------------------
  833|  11.0k|        return SECSuccess;
  834|  11.0k|    }
  835|       |
  836|      0|    *added = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  837|      0|    return SECSuccess;
  838|  11.0k|}
tls13_ClientSendSupportedVersionsXtn:
  938|  11.0k|{
  939|  11.0k|    PRUint16 version;
  940|  11.0k|    unsigned int lengthOffset;
  941|  11.0k|    SECStatus rv;
  942|       |
  943|  11.0k|    if (ss->vrange.max < SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|  11.0k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (943:9): [True: 1.47k, False: 9.52k]
  ------------------
  944|  1.47k|        return SECSuccess;
  945|  1.47k|    }
  946|       |
  947|  9.52k|    SSL_TRC(3, ("%d: TLS13[%d]: client send supported_versions extension",
  ------------------
  |  |   71|  9.52k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 9.52k]
  |  |  ------------------
  |  |   72|  9.52k|    ssl_Trace b
  ------------------
  948|  9.52k|                SSL_GETPID(), ss->fd));
  949|       |
  950|  9.52k|    rv = sslBuffer_Skip(buf, 1, &lengthOffset);
  951|  9.52k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (951:9): [True: 0, False: 9.52k]
  ------------------
  952|      0|        return SECFailure;
  953|      0|    }
  954|       |
  955|  9.52k|    PORT_Assert(!ss->ssl3.hs.echHpkeCtx || ss->vrange.max >= SSL_LIBRARY_VERSION_TLS_1_3);
  ------------------
  |  |  120|  9.52k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  9.52k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 9.52k, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  956|  34.8k|    for (version = ss->vrange.max; version >= ss->vrange.min; --version) {
  ------------------
  |  Branch (956:36): [True: 25.3k, False: 9.52k]
  ------------------
  957|  25.3k|        PRUint16 wire = tls13_EncodeVersion(version,
  958|  25.3k|                                            ss->protocolVariant);
  959|  25.3k|        rv = sslBuffer_AppendNumber(buf, wire, 2);
  960|  25.3k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (960:13): [True: 0, False: 25.3k]
  ------------------
  961|      0|            return SECFailure;
  962|      0|        }
  963|       |
  964|  25.3k|        if (ss->opt.enableDtls13VersionCompat &&
  ------------------
  |  Branch (964:13): [True: 12.5k, False: 12.7k]
  ------------------
  965|  25.3k|            ss->protocolVariant == ssl_variant_datagram) {
  ------------------
  |  Branch (965:13): [True: 12.5k, False: 0]
  ------------------
  966|  12.5k|            switch (version) {
  967|  4.15k|                case SSL_LIBRARY_VERSION_TLS_1_2:
  ------------------
  |  |   20|  4.15k|#define SSL_LIBRARY_VERSION_TLS_1_2             0x0303
  ------------------
  |  Branch (967:17): [True: 4.15k, False: 8.40k]
  ------------------
  968|  7.77k|                case SSL_LIBRARY_VERSION_TLS_1_1:
  ------------------
  |  |   19|  7.77k|#define SSL_LIBRARY_VERSION_TLS_1_1             0x0302
  ------------------
  |  Branch (968:17): [True: 3.62k, False: 8.93k]
  ------------------
  969|  7.77k|                    rv = sslBuffer_AppendNumber(buf, (PRUint16)version, 2);
  970|  7.77k|                    break;
  971|  4.78k|                default:
  ------------------
  |  Branch (971:17): [True: 4.78k, False: 7.77k]
  ------------------
  972|  4.78k|                    continue;
  973|  12.5k|            }
  974|  7.77k|            if (rv != SECSuccess) {
  ------------------
  |  Branch (974:17): [True: 0, False: 7.77k]
  ------------------
  975|      0|                return SECFailure;
  976|      0|            }
  977|  7.77k|        }
  978|  25.3k|    }
  979|       |
  980|       |    /* GREASE SupportedVersions:
  981|       |     * A client MAY select one or more GREASE version values and advertise them
  982|       |     * in the "supported_versions" extension, if sent [RFC8701, Section 3.1]. */
  983|  9.52k|    if (ss->opt.enableGrease) {
  ------------------
  |  Branch (983:9): [True: 4.76k, False: 4.76k]
  ------------------
  984|  4.76k|        rv = sslBuffer_AppendNumber(buf, ss->ssl3.hs.grease->idx[grease_version], 2);
  985|  4.76k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (985:13): [True: 0, False: 4.76k]
  ------------------
  986|      0|            return SECFailure;
  987|      0|        }
  988|  4.76k|    }
  989|       |
  990|  9.52k|    rv = sslBuffer_InsertLength(buf, lengthOffset, 1);
  991|  9.52k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (991:9): [True: 0, False: 9.52k]
  ------------------
  992|      0|        return SECFailure;
  993|      0|    }
  994|       |
  995|  9.52k|    *added = PR_TRUE;
  ------------------
  |  |  437|  9.52k|#define PR_TRUE 1
  ------------------
  996|  9.52k|    return SECSuccess;
  997|  9.52k|}
tls13_ClientHandleHrrCookie:
 1031|    141|{
 1032|    141|    SECStatus rv;
 1033|       |
 1034|    141|    SSL_TRC(3, ("%d: TLS13[%d]: handle cookie extension",
  ------------------
  |  |   71|    141|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 141]
  |  |  ------------------
  |  |   72|    141|    ssl_Trace b
  ------------------
 1035|    141|                SSL_GETPID(), ss->fd));
 1036|       |
 1037|    141|    PORT_Assert(ss->vrange.max >= SSL_LIBRARY_VERSION_TLS_1_3);
  ------------------
  |  |  120|    141|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    141|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 141, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1038|       |
 1039|       |    /* IMPORTANT: this is only valid while the HelloRetryRequest is still valid. */
 1040|    141|    rv = ssl3_ExtConsumeHandshakeVariable(
 1041|    141|        ss, &CONST_CAST(sslSocket, ss)->ssl3.hs.cookie, 2,
  ------------------
  |  |   96|    141|#define CONST_CAST(T, X) ((T *)(X))
  ------------------
 1042|    141|        &data->data, &data->len);
 1043|    141|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1043:9): [True: 1, False: 140]
  ------------------
 1044|      1|        PORT_SetError(SSL_ERROR_RX_MALFORMED_HELLO_RETRY_REQUEST);
  ------------------
  |  |   65|      1|#define PORT_SetError PORT_SetError_Util
  ------------------
 1045|      1|        return SECFailure;
 1046|      1|    }
 1047|    140|    if (!ss->ssl3.hs.cookie.len || data->len) {
  ------------------
  |  Branch (1047:9): [True: 1, False: 139]
  |  Branch (1047:36): [True: 4, False: 135]
  ------------------
 1048|      5|        ssl3_ExtSendAlert(ss, alert_fatal, decode_error);
 1049|      5|        PORT_SetError(SSL_ERROR_RX_MALFORMED_HELLO_RETRY_REQUEST);
  ------------------
  |  |   65|      5|#define PORT_SetError PORT_SetError_Util
  ------------------
 1050|      5|        return SECFailure;
 1051|      5|    }
 1052|       |
 1053|    135|    return SECSuccess;
 1054|    140|}
tls13_ClientSendHrrCookieXtn:
 1059|  11.0k|{
 1060|  11.0k|    SECStatus rv;
 1061|       |
 1062|  11.0k|    if (ss->vrange.max < SSL_LIBRARY_VERSION_TLS_1_3 ||
  ------------------
  |  |   21|  22.0k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (1062:9): [True: 1.47k, False: 9.52k]
  ------------------
 1063|  11.0k|        !ss->ssl3.hs.cookie.len) {
  ------------------
  |  Branch (1063:9): [True: 9.28k, False: 246]
  ------------------
 1064|  10.7k|        return SECSuccess;
 1065|  10.7k|    }
 1066|       |
 1067|    246|    SSL_TRC(3, ("%d: TLS13[%d]: send cookie extension", SSL_GETPID(), ss->fd));
  ------------------
  |  |   71|    246|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 246]
  |  |  ------------------
  |  |   72|    246|    ssl_Trace b
  ------------------
 1068|    246|    rv = sslBuffer_AppendVariable(buf, ss->ssl3.hs.cookie.data,
 1069|    246|                                  ss->ssl3.hs.cookie.len, 2);
 1070|    246|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1070:9): [True: 0, False: 246]
  ------------------
 1071|      0|        return SECFailure;
 1072|      0|    }
 1073|       |
 1074|    246|    *added = PR_TRUE;
  ------------------
  |  |  437|    246|#define PR_TRUE 1
  ------------------
 1075|    246|    return SECSuccess;
 1076|    246|}
tls13_ClientSendPostHandshakeAuthXtn:
 1113|  11.0k|{
 1114|       |    /* Only one post-handshake message is supported: a single
 1115|       |     * NST immediately following the client Finished. */
 1116|  11.0k|    if (!IS_DTLS(ss)) {
  ------------------
  |  |  892|  11.0k|#define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram)
  ------------------
  |  Branch (1116:9): [True: 0, False: 11.0k]
  ------------------
 1117|      0|        SSL_TRC(3, ("%d: TLS13[%d]: send post_handshake_auth extension",
  ------------------
  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    ssl_Trace b
  ------------------
 1118|      0|                    SSL_GETPID(), ss->fd));
 1119|      0|        *added = ss->opt.enablePostHandshakeAuth;
 1120|      0|    }
 1121|  11.0k|    return SECSuccess;
 1122|  11.0k|}
tls13_ClientSendPskModesXtn:
 1157|  11.0k|{
 1158|  11.0k|    SECStatus rv;
 1159|       |
 1160|  11.0k|    if (ss->vrange.max < SSL_LIBRARY_VERSION_TLS_1_3 ||
  ------------------
  |  |   21|  22.0k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (1160:9): [True: 1.47k, False: 9.52k]
  ------------------
 1161|  11.0k|        ss->opt.noCache) {
  ------------------
  |  Branch (1161:9): [True: 4.70k, False: 4.82k]
  ------------------
 1162|  6.18k|        return SECSuccess;
 1163|  6.18k|    }
 1164|       |
 1165|  4.82k|    SSL_TRC(3, ("%d: TLS13[%d]: send psk key exchange modes extension",
  ------------------
  |  |   71|  4.82k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 4.82k]
  |  |  ------------------
  |  |   72|  4.82k|    ssl_Trace b
  ------------------
 1166|  4.82k|                SSL_GETPID(), ss->fd));
 1167|       |
 1168|       |    /* GREASE PskKeyExchangeMode:
 1169|       |     * A client MAY select one or more GREASE PskKeyExchangeMode values and
 1170|       |     * advertise them in the "psk_key_exchange_modes" extension, if sent
 1171|       |     * [RFC8701, Section 3.1]. */
 1172|  4.82k|    if (ss->opt.enableGrease) {
  ------------------
  |  Branch (1172:9): [True: 2.35k, False: 2.47k]
  ------------------
 1173|  2.35k|        rv = sslBuffer_AppendVariable(buf, (PRUint8[]){ tls13_psk_dh_ke, ss->ssl3.hs.grease->pskKem }, 2, 1);
 1174|  2.47k|    } else {
 1175|  2.47k|        rv = sslBuffer_AppendVariable(buf, (PRUint8[]){ tls13_psk_dh_ke }, 1, 1);
 1176|  2.47k|    }
 1177|  4.82k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1177:9): [True: 0, False: 4.82k]
  ------------------
 1178|      0|        return SECFailure;
 1179|      0|    }
 1180|       |
 1181|  4.82k|    *added = PR_TRUE;
  ------------------
  |  |  437|  4.82k|#define PR_TRUE 1
  ------------------
 1182|  4.82k|    return SECSuccess;
 1183|  4.82k|}
tls13_ClientSendDelegatedCredentialsXtn:
 1441|  11.0k|{
 1442|       |    /* Only send the extension if support is enabled and the client can
 1443|       |     * negotiate TLS 1.3. */
 1444|  11.0k|    if (ss->vrange.max < SSL_LIBRARY_VERSION_TLS_1_3 ||
  ------------------
  |  |   21|  22.0k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (1444:9): [True: 1.47k, False: 9.52k]
  ------------------
 1445|  11.0k|        !ss->opt.enableDelegatedCredentials) {
  ------------------
  |  Branch (1445:9): [True: 4.92k, False: 4.60k]
  ------------------
 1446|  6.39k|        return SECSuccess;
 1447|  6.39k|    }
 1448|       |
 1449|       |    /* Filter the schemes that are enabled and acceptable. Save these in
 1450|       |     * the "advertised" list, then encode them to be sent. If we receive
 1451|       |     * a DC in response, validate that it matches one of the advertised
 1452|       |     * schemes. */
 1453|  4.60k|    SSLSignatureScheme filtered[MAX_SIGNATURE_SCHEMES] = { 0 };
 1454|  4.60k|    unsigned int filteredCount = 0;
 1455|  4.60k|    SECStatus rv = ssl3_FilterSigAlgs(ss, ss->vrange.max,
 1456|  4.60k|                                      PR_TRUE /* disableRsae */,
  ------------------
  |  |  437|  4.60k|#define PR_TRUE 1
  ------------------
 1457|  4.60k|                                      PR_FALSE /* forCert */,
  ------------------
  |  |  438|  4.60k|#define PR_FALSE 0
  ------------------
 1458|  4.60k|                                      MAX_SIGNATURE_SCHEMES,
  ------------------
  |  |  250|  4.60k|#define MAX_SIGNATURE_SCHEMES 18
  ------------------
 1459|  4.60k|                                      filtered,
 1460|  4.60k|                                      &filteredCount);
 1461|  4.60k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1461:9): [True: 0, False: 4.60k]
  ------------------
 1462|      0|        return SECFailure;
 1463|      0|    }
 1464|       |
 1465|       |    /* If no schemes available for the DC extension, don't send it. */
 1466|  4.60k|    if (!filteredCount) {
  ------------------
  |  Branch (1466:9): [True: 0, False: 4.60k]
  ------------------
 1467|      0|        return SECSuccess;
 1468|      0|    }
 1469|       |
 1470|  4.60k|    rv = ssl3_EncodeFilteredSigAlgs(ss, filtered, filteredCount,
 1471|  4.60k|                                    PR_FALSE /* GREASE */, buf);
  ------------------
  |  |  438|  4.60k|#define PR_FALSE 0
  ------------------
 1472|  4.60k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1472:9): [True: 0, False: 4.60k]
  ------------------
 1473|      0|        return SECFailure;
 1474|      0|    }
 1475|       |
 1476|  4.60k|    SSLSignatureScheme *dcSchemesAdvertised = PORT_ZNewArray(SSLSignatureScheme,
  ------------------
  |  |  159|  4.60k|    (type *)PORT_ZAlloc(sizeof(type) * (num))
  |  |  ------------------
  |  |  |  |   72|  4.60k|#define PORT_ZAlloc PORT_ZAlloc_Util
  |  |  ------------------
  ------------------
 1477|  4.60k|                                                             filteredCount);
 1478|  4.60k|    if (!dcSchemesAdvertised) {
  ------------------
  |  Branch (1478:9): [True: 0, False: 4.60k]
  ------------------
 1479|      0|        return SECFailure;
 1480|      0|    }
 1481|  23.0k|    for (unsigned int i = 0; i < filteredCount; i++) {
  ------------------
  |  Branch (1481:30): [True: 18.4k, False: 4.60k]
  ------------------
 1482|  18.4k|        dcSchemesAdvertised[i] = filtered[i];
 1483|  18.4k|    }
 1484|       |
 1485|  4.60k|    if (xtnData->delegCredSigSchemesAdvertised) {
  ------------------
  |  Branch (1485:9): [True: 0, False: 4.60k]
  ------------------
 1486|      0|        PORT_Free(xtnData->delegCredSigSchemesAdvertised);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 1487|      0|    }
 1488|  4.60k|    xtnData->delegCredSigSchemesAdvertised = dcSchemesAdvertised;
 1489|  4.60k|    xtnData->numDelegCredSigSchemesAdvertised = filteredCount;
 1490|  4.60k|    *added = PR_TRUE;
  ------------------
  |  |  437|  4.60k|#define PR_TRUE 1
  ------------------
 1491|  4.60k|    return SECSuccess;
 1492|  4.60k|}
tls13_SendEmptyGreaseXtn:
 1850|  11.0k|{
 1851|  11.0k|    if (!ss->opt.enableGrease ||
  ------------------
  |  Branch (1851:9): [True: 5.51k, False: 5.49k]
  ------------------
 1852|  11.0k|        (!ss->sec.isServer && ss->vrange.max < SSL_LIBRARY_VERSION_TLS_1_3) ||
  ------------------
  |  |   21|  5.49k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (1852:10): [True: 5.49k, False: 0]
  |  Branch (1852:31): [True: 723, False: 4.76k]
  ------------------
 1853|  11.0k|        (ss->sec.isServer && ss->version < SSL_LIBRARY_VERSION_TLS_1_3)) {
  ------------------
  |  |   21|      0|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (1853:10): [True: 0, False: 4.76k]
  |  Branch (1853:30): [True: 0, False: 0]
  ------------------
 1854|  6.23k|        return SECSuccess;
 1855|  6.23k|    }
 1856|       |
 1857|  4.76k|    *added = PR_TRUE;
  ------------------
  |  |  437|  4.76k|#define PR_TRUE 1
  ------------------
 1858|  4.76k|    return SECSuccess;
 1859|  11.0k|}
tls13_SendGreaseXtn:
 1865|  11.0k|{
 1866|  11.0k|    if (!ss->opt.enableGrease ||
  ------------------
  |  Branch (1866:9): [True: 5.51k, False: 5.49k]
  ------------------
 1867|  11.0k|        (!ss->sec.isServer && ss->vrange.max < SSL_LIBRARY_VERSION_TLS_1_3) ||
  ------------------
  |  |   21|  5.49k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (1867:10): [True: 5.49k, False: 0]
  |  Branch (1867:31): [True: 723, False: 4.76k]
  ------------------
 1868|  11.0k|        (ss->sec.isServer && ss->version < SSL_LIBRARY_VERSION_TLS_1_3)) {
  ------------------
  |  |   21|      0|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (1868:10): [True: 0, False: 4.76k]
  |  Branch (1868:30): [True: 0, False: 0]
  ------------------
 1869|  6.23k|        return SECSuccess;
 1870|  6.23k|    }
 1871|       |
 1872|  4.76k|    SECStatus rv = sslBuffer_AppendVariable(buf, (PRUint8[]){ 0x00 }, 1, 2);
 1873|  4.76k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1873:9): [True: 0, False: 4.76k]
  ------------------
 1874|      0|        return SECFailure;
 1875|      0|    }
 1876|       |
 1877|  4.76k|    *added = PR_TRUE;
  ------------------
  |  |  437|  4.76k|#define PR_TRUE 1
  ------------------
 1878|  4.76k|    return SECSuccess;
 1879|  4.76k|}
ssl3_SendCertificateCompressionXtn:
 1885|  11.0k|{
 1886|       |    /* enum {
 1887|       |     *  zlib(1),
 1888|       |     *  brotli(2),
 1889|       |     *  zstd(3),
 1890|       |     *  (65535)
 1891|       |     * } CertificateCompressionAlgorithm;
 1892|       |     *
 1893|       |     * struct {
 1894|       |     *      CertificateCompressionAlgorithm algorithms<2..2^8-2>;
 1895|       |     *  } CertificateCompressionAlgorithms;
 1896|       |     */
 1897|       |
 1898|  11.0k|    SECStatus rv = SECFailure;
 1899|  11.0k|    if (ss->ssl3.cwSpec->version < SSL_LIBRARY_VERSION_TLS_1_3) {
  ------------------
  |  |   21|  11.0k|#define SSL_LIBRARY_VERSION_TLS_1_3             0x0304
  ------------------
  |  Branch (1899:9): [True: 1.47k, False: 9.52k]
  ------------------
 1900|  1.47k|        SSL_TRC(50, ("%d: TLS13[%d]: certificate_compression_algorithm extension requires TLS1.3 and above",
  ------------------
  |  |   71|  1.47k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 1.47k]
  |  |  ------------------
  |  |   72|  1.47k|    ssl_Trace b
  ------------------
 1901|  1.47k|                     SSL_GETPID(), ss->fd));
 1902|  1.47k|        return SECSuccess;
 1903|  1.47k|    }
 1904|       |
 1905|  9.52k|    size_t certificateCompressionAlgorithmsLen = ss->ssl3.supportedCertCompressionAlgorithmsCount;
 1906|  9.52k|    if (certificateCompressionAlgorithmsLen == 0) {
  ------------------
  |  Branch (1906:9): [True: 4.95k, False: 4.57k]
  ------------------
 1907|  4.95k|        SSL_TRC(30, ("%d: TLS13[%d]: %s does not support any certificate compression algorithm",
  ------------------
  |  |   71|  4.95k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 4.95k]
  |  |  ------------------
  |  |   72|  4.95k|    ssl_Trace b
  |  |  ------------------
  |  |  |  Branch (72:15): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1908|  4.95k|                     SSL_GETPID(), ss->fd, SSL_ROLE(ss)));
 1909|  4.95k|        return SECSuccess;
 1910|  4.95k|    }
 1911|       |
 1912|  4.57k|    SSL_TRC(30, ("%d: TLS13[%d]: %s sends certificate_compression_algorithm extension",
  ------------------
  |  |   71|  4.57k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 4.57k]
  |  |  ------------------
  |  |   72|  4.57k|    ssl_Trace b
  |  |  ------------------
  |  |  |  Branch (72:15): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1913|  4.57k|                 SSL_GETPID(), ss->fd, SSL_ROLE(ss)));
 1914|  4.57k|    PORT_Assert(certificateCompressionAlgorithmsLen < (0x1u << 8) - 1);
  ------------------
  |  |  120|  4.57k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  4.57k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 4.57k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1915|       |
 1916|  4.57k|    rv = sslBuffer_AppendNumber(buf, certificateCompressionAlgorithmsLen << 1, 1);
 1917|  4.57k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (1917:9): [True: 0, False: 4.57k]
  ------------------
 1918|      0|        return SECFailure;
 1919|      0|    }
 1920|       |
 1921|  9.14k|    for (size_t i = 0; i < certificateCompressionAlgorithmsLen; i++) {
  ------------------
  |  Branch (1921:24): [True: 4.57k, False: 4.57k]
  ------------------
 1922|  4.57k|        rv = sslBuffer_AppendNumber(buf, ss->ssl3.supportedCertCompressionAlgorithms[i].id, 2);
 1923|  4.57k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (1923:13): [True: 0, False: 4.57k]
  ------------------
 1924|      0|            return SECFailure;
 1925|      0|        }
 1926|  4.57k|    }
 1927|       |
 1928|  4.57k|    xtnData->certificateCompressionAdvertised = PR_TRUE;
  ------------------
  |  |  437|  4.57k|#define PR_TRUE 1
  ------------------
 1929|  4.57k|    *added = PR_TRUE;
  ------------------
  |  |  437|  4.57k|#define PR_TRUE 1
  ------------------
 1930|  4.57k|    return SECSuccess;
 1931|  4.57k|}
tls13exthandle.c:tls13_WriteMLKEM768X25519KeyExchangeInfo:
  125|     40|{
  126|     40|    PORT_Assert(keyPair->group->name == ssl_grp_kem_mlkem768x25519);
  ------------------
  |  |  120|     40|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|     40|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 40, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  127|     40|    PORT_Assert(keyPair->keys->pubKey->keyType == ecKey);
  ------------------
  |  |  120|     40|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|     40|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 40, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  128|       |
  129|       |    // Encode the ML-KEM-768 key or ciphertext first, then the X25519 share.
  130|     40|    SECStatus rv;
  131|     40|    if (keyPair->kemKeys) {
  ------------------
  |  Branch (131:9): [True: 40, False: 0]
  ------------------
  132|     40|        PORT_Assert(!keyPair->kemCt);
  ------------------
  |  |  120|     40|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|     40|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 40, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  133|     40|        rv = sslBuffer_Append(buf, keyPair->kemKeys->pubKey->u.kyber.publicValue.data, keyPair->kemKeys->pubKey->u.kyber.publicValue.len);
  134|     40|    } else if (keyPair->kemCt) {
  ------------------
  |  Branch (134:16): [True: 0, False: 0]
  ------------------
  135|      0|        rv = sslBuffer_Append(buf, keyPair->kemCt->data, keyPair->kemCt->len);
  136|      0|    } else {
  137|      0|        PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  138|      0|        PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  139|      0|        rv = SECFailure;
  140|      0|    }
  141|     40|    if (rv != SECSuccess) {
  ------------------
  |  Branch (141:9): [True: 0, False: 40]
  ------------------
  142|      0|        return rv;
  143|      0|    }
  144|       |
  145|     40|    rv = sslBuffer_Append(buf, keyPair->keys->pubKey->u.ec.publicValue.data,
  146|     40|                          keyPair->keys->pubKey->u.ec.publicValue.len);
  147|     40|    return rv;
  148|     40|}
tls13exthandle.c:tls13_WriteKeyExchangeInfo:
  152|  9.48k|{
  153|  9.48k|    SECStatus rv;
  154|  9.48k|    const SECKEYPublicKey *pubKey = keyPair->keys->pubKey;
  155|  9.48k|    switch (pubKey->keyType) {
  156|  8.36k|        case ecKey:
  ------------------
  |  Branch (156:9): [True: 8.36k, False: 1.12k]
  ------------------
  157|  8.36k|            rv = sslBuffer_Append(buf, pubKey->u.ec.publicValue.data,
  158|  8.36k|                                  pubKey->u.ec.publicValue.len);
  159|  8.36k|            break;
  160|  1.12k|        case dhKey:
  ------------------
  |  Branch (160:9): [True: 1.12k, False: 8.36k]
  ------------------
  161|  1.12k|            rv = ssl_AppendPaddedDHKeyShare(buf, pubKey, PR_FALSE);
  ------------------
  |  |  438|  1.12k|#define PR_FALSE 0
  ------------------
  162|  1.12k|            break;
  163|      0|        default:
  ------------------
  |  Branch (163:9): [True: 0, False: 9.48k]
  ------------------
  164|      0|            PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  165|      0|            PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  166|      0|            rv = SECFailure;
  167|      0|            break;
  168|  9.48k|    }
  169|       |
  170|  9.48k|    return rv;
  171|  9.48k|}

tls13_HkdfExtract:
   36|  8.29k|{
   37|  8.29k|    CK_HKDF_PARAMS params;
   38|  8.29k|    SECItem paramsi;
   39|  8.29k|    PK11SymKey *prk;
   40|  8.29k|    static const PRUint8 zeroKeyBuf[HASH_LENGTH_MAX];
   41|  8.29k|    SECItem zeroKeyItem = { siBuffer, CONST_CAST(PRUint8, zeroKeyBuf), kTlsHkdfInfo[baseHash].hashSize };
  ------------------
  |  |   96|  8.29k|#define CONST_CAST(T, X) ((T *)(X))
  ------------------
   42|  8.29k|    PK11SlotInfo *slot = NULL;
   43|  8.29k|    PK11SymKey *newIkm2 = NULL;
   44|  8.29k|    PK11SymKey *newIkm1 = NULL;
   45|  8.29k|    SECStatus rv;
   46|       |
   47|  8.29k|    params.bExtract = CK_TRUE;
  ------------------
  |  |   22|  8.29k|#define CK_TRUE 1
  ------------------
   48|  8.29k|    params.bExpand = CK_FALSE;
  ------------------
  |  |   23|  8.29k|#define CK_FALSE 0
  ------------------
   49|  8.29k|    params.prfHashMechanism = kTlsHkdfInfo[baseHash].pkcs11Mech;
   50|  8.29k|    params.pInfo = NULL;
   51|  8.29k|    params.ulInfoLen = 0UL;
   52|  8.29k|    params.pSalt = NULL;
   53|  8.29k|    params.ulSaltLen = 0UL;
   54|  8.29k|    params.hSaltKey = CK_INVALID_HANDLE;
  ------------------
  |  |   78|  8.29k|#define CK_INVALID_HANDLE 0
  ------------------
   55|       |
   56|  8.29k|    if (!ikm1) {
  ------------------
  |  Branch (56:9): [True: 5.42k, False: 2.86k]
  ------------------
   57|       |        /* PKCS #11 v3.0 has and explict NULL value, which equates to
   58|       |         * a sequence of zeros equal in length to the HMAC. */
   59|  5.42k|        params.ulSaltType = CKF_HKDF_SALT_NULL;
  ------------------
  |  | 2252|  5.42k|#define CKF_HKDF_SALT_NULL 0x00000001UL
  ------------------
   60|  5.42k|    } else {
   61|       |        /* PKCS #11 v3.0 can take the salt as a key handle */
   62|  2.86k|        params.hSaltKey = PK11_GetSymKeyHandle(ikm1);
   63|  2.86k|        params.ulSaltType = CKF_HKDF_SALT_KEY;
  ------------------
  |  | 2254|  2.86k|#define CKF_HKDF_SALT_KEY 0x00000004UL
  ------------------
   64|       |
   65|       |        /* if we have both keys, make sure they are in the same slot */
   66|  2.86k|        if (ikm2) {
  ------------------
  |  Branch (66:13): [True: 1.43k, False: 1.43k]
  ------------------
   67|  1.43k|            rv = PK11_SymKeysToSameSlot(CKM_HKDF_DERIVE,
  ------------------
  |  | 1296|  1.43k|#define CKM_HKDF_DERIVE 0x0000402aUL
  ------------------
   68|  1.43k|                                        CKA_DERIVE, CKA_DERIVE,
  ------------------
  |  |  555|  1.43k|#define CKA_DERIVE 0x0000010CUL
  ------------------
                                                      CKA_DERIVE, CKA_DERIVE,
  ------------------
  |  |  555|  1.43k|#define CKA_DERIVE 0x0000010CUL
  ------------------
   69|  1.43k|                                        ikm2, ikm1, &newIkm2, &newIkm1);
   70|  1.43k|            if (rv != SECSuccess) {
  ------------------
  |  Branch (70:17): [True: 0, False: 1.43k]
  ------------------
   71|      0|                SECItem *salt;
   72|       |                /* couldn't move the keys, try extracting the salt */
   73|      0|                rv = PK11_ExtractKeyValue(ikm1);
   74|      0|                if (rv != SECSuccess)
  ------------------
  |  Branch (74:21): [True: 0, False: 0]
  ------------------
   75|      0|                    return rv;
   76|      0|                salt = PK11_GetKeyData(ikm1);
   77|      0|                if (!salt)
  ------------------
  |  Branch (77:21): [True: 0, False: 0]
  ------------------
   78|      0|                    return SECFailure;
   79|      0|                PORT_Assert(salt->len > 0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   80|       |                /* Set up for Salt as Data instead of Salt as key */
   81|      0|                params.pSalt = salt->data;
   82|      0|                params.ulSaltLen = salt->len;
   83|      0|                params.ulSaltType = CKF_HKDF_SALT_DATA;
  ------------------
  |  | 2253|      0|#define CKF_HKDF_SALT_DATA 0x00000002UL
  ------------------
   84|      0|            }
   85|       |            /* use the new keys */
   86|  1.43k|            if (newIkm1) {
  ------------------
  |  Branch (86:17): [True: 1.42k, False: 6]
  ------------------
   87|       |                /* we've moved the key, get the handle for the new key */
   88|  1.42k|                params.hSaltKey = PK11_GetSymKeyHandle(newIkm1);
   89|       |                /* we don't use ikm1 after this, so don't bother setting it */
   90|  1.42k|            }
   91|  1.43k|            if (newIkm2) {
  ------------------
  |  Branch (91:17): [True: 0, False: 1.43k]
  ------------------
   92|       |                /* new ikm2 key, use the new key */
   93|      0|                ikm2 = newIkm2;
   94|      0|            }
   95|  1.43k|        }
   96|  2.86k|    }
   97|  8.29k|    paramsi.data = (unsigned char *)&params;
   98|  8.29k|    paramsi.len = sizeof(params);
   99|       |
  100|  8.29k|    PORT_Assert(kTlsHkdfInfo[baseHash].pkcs11Mech);
  ------------------
  |  |  120|  8.29k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  8.29k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 8.29k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  101|  8.29k|    PORT_Assert(kTlsHkdfInfo[baseHash].hashSize);
  ------------------
  |  |  120|  8.29k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  8.29k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 8.29k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  102|  8.29k|    PORT_Assert(kTlsHkdfInfo[baseHash].hash == baseHash);
  ------------------
  |  |  120|  8.29k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  8.29k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 8.29k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  103|       |
  104|       |    /* A zero ikm2 is a key of hash-length 0s. */
  105|  8.29k|    if (!ikm2) {
  ------------------
  |  Branch (105:9): [True: 2.86k, False: 5.42k]
  ------------------
  106|       |        /* if we have ikm1, put the zero key in the same slot */
  107|  2.86k|        slot = ikm1 ? PK11_GetSlotFromKey(ikm1) : PK11_GetBestSlot(CKM_HKDF_DERIVE, NULL);
  ------------------
  |  | 1296|  1.42k|#define CKM_HKDF_DERIVE 0x0000402aUL
  ------------------
  |  Branch (107:16): [True: 1.43k, False: 1.42k]
  ------------------
  108|  2.86k|        if (!slot) {
  ------------------
  |  Branch (108:13): [True: 0, False: 2.86k]
  ------------------
  109|      0|            return SECFailure;
  110|      0|        }
  111|       |
  112|  2.86k|        newIkm2 = PK11_ImportDataKey(slot, CKM_HKDF_DERIVE, PK11_OriginUnwrap,
  ------------------
  |  | 1296|  2.86k|#define CKM_HKDF_DERIVE 0x0000402aUL
  ------------------
  113|  2.86k|                                     CKA_DERIVE, &zeroKeyItem, NULL);
  ------------------
  |  |  555|  2.86k|#define CKA_DERIVE 0x0000010CUL
  ------------------
  114|  2.86k|        if (!newIkm2) {
  ------------------
  |  Branch (114:13): [True: 0, False: 2.86k]
  ------------------
  115|      0|            return SECFailure;
  116|      0|        }
  117|  2.86k|        ikm2 = newIkm2;
  118|  2.86k|    }
  119|  8.29k|    PORT_Assert(ikm2);
  ------------------
  |  |  120|  8.29k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  8.29k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 8.29k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  120|       |
  121|  8.29k|    PRINT_BUF(50, (NULL, "HKDF Extract: IKM1/Salt", params.pSalt, params.ulSaltLen));
  ------------------
  |  |   74|  8.29k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 8.29k]
  |  |  ------------------
  |  |   75|  8.29k|    ssl_PrintBuf b
  ------------------
  122|  8.29k|    PRINT_KEY(50, (NULL, "HKDF Extract: IKM2", ikm2));
  ------------------
  |  |   77|  8.29k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (77:9): [True: 0, False: 8.29k]
  |  |  ------------------
  |  |   78|  8.29k|    ssl_PrintKey b
  ------------------
  123|       |
  124|  8.29k|    prk = PK11_Derive(ikm2, CKM_HKDF_DERIVE, &paramsi, CKM_HKDF_DERIVE,
  ------------------
  |  | 1296|  8.29k|#define CKM_HKDF_DERIVE 0x0000402aUL
  ------------------
                  prk = PK11_Derive(ikm2, CKM_HKDF_DERIVE, &paramsi, CKM_HKDF_DERIVE,
  ------------------
  |  | 1296|  8.29k|#define CKM_HKDF_DERIVE 0x0000402aUL
  ------------------
  125|  8.29k|                      CKA_DERIVE, 0);
  ------------------
  |  |  555|  8.29k|#define CKA_DERIVE 0x0000010CUL
  ------------------
  126|  8.29k|    PK11_FreeSymKey(newIkm2);
  127|  8.29k|    PK11_FreeSymKey(newIkm1);
  128|  8.29k|    if (slot)
  ------------------
  |  Branch (128:9): [True: 2.86k, False: 5.42k]
  ------------------
  129|  2.86k|        PK11_FreeSlot(slot);
  130|  8.29k|    if (!prk) {
  ------------------
  |  Branch (130:9): [True: 0, False: 8.29k]
  ------------------
  131|      0|        return SECFailure;
  132|      0|    }
  133|       |
  134|  8.29k|    PRINT_KEY(50, (NULL, "HKDF Extract", prk));
  ------------------
  |  |   77|  8.29k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (77:9): [True: 0, False: 8.29k]
  |  |  ------------------
  |  |   78|  8.29k|    ssl_PrintKey b
  ------------------
  135|  8.29k|    *prkp = prk;
  136|       |
  137|  8.29k|    return SECSuccess;
  138|  8.29k|}
tls13_HkdfExpandLabelGeneral:
  147|  19.0k|{
  148|  19.0k|    CK_HKDF_PARAMS params;
  149|  19.0k|    SECItem paramsi = { siBuffer, NULL, 0 };
  150|       |    /* Size of info array needs to be big enough to hold the maximum Prefix,
  151|       |     * Label, plus HandshakeHash. If it's ever to small, the code will abort.
  152|       |     */
  153|  19.0k|    PRUint8 info[256];
  154|  19.0k|    sslBuffer infoBuf = SSL_BUFFER(info);
  ------------------
  |  |   34|  19.0k|#define SSL_BUFFER(b) SSL_BUFFER_FIXED(b, sizeof(b))
  |  |  ------------------
  |  |  |  |   27|  19.0k|    {                               \
  |  |  |  |   28|  19.0k|        b, 0, maxlen, PR_TRUE       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  437|  19.0k|#define PR_TRUE 1
  |  |  |  |  ------------------
  |  |  |  |   29|  19.0k|    }
  |  |  ------------------
  ------------------
  155|  19.0k|    PK11SymKey *derived;
  156|  19.0k|    SECStatus rv;
  157|  19.0k|    const char *kLabelPrefixTls = "tls13 ";
  158|  19.0k|    const char *kLabelPrefixDtls = "dtls13";
  159|  19.0k|    const unsigned int kLabelPrefixLen =
  160|  19.0k|        (variant == ssl_variant_stream) ? strlen(kLabelPrefixTls) : strlen(kLabelPrefixDtls);
  ------------------
  |  Branch (160:9): [True: 0, False: 19.0k]
  ------------------
  161|  19.0k|    const char *kLabelPrefix =
  162|  19.0k|        (variant == ssl_variant_stream) ? kLabelPrefixTls : kLabelPrefixDtls;
  ------------------
  |  Branch (162:9): [True: 0, False: 19.0k]
  ------------------
  163|       |
  164|  19.0k|    PORT_Assert(prk);
  ------------------
  |  |  120|  19.0k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  19.0k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 19.0k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  165|  19.0k|    PORT_Assert(keyp);
  ------------------
  |  |  120|  19.0k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  19.0k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 19.0k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  166|  19.0k|    if ((handshakeHashLen > 255) ||
  ------------------
  |  Branch (166:9): [True: 0, False: 19.0k]
  ------------------
  167|  19.0k|        (handshakeHash == NULL && handshakeHashLen > 0) ||
  ------------------
  |  Branch (167:10): [True: 9.33k, False: 9.73k]
  |  Branch (167:35): [True: 0, False: 9.33k]
  ------------------
  168|  19.0k|        (labelLen + kLabelPrefixLen > 255)) {
  ------------------
  |  Branch (168:9): [True: 0, False: 19.0k]
  ------------------
  169|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  170|      0|        return SECFailure;
  171|      0|    }
  172|       |
  173|       |    /*
  174|       |     *  [draft-ietf-tls-tls13-11] Section 7.1:
  175|       |     *
  176|       |     *  HKDF-Expand-Label(Secret, Label, HashValue, Length) =
  177|       |     *       HKDF-Expand(Secret, HkdfLabel, Length)
  178|       |     *
  179|       |     *  Where HkdfLabel is specified as:
  180|       |     *
  181|       |     *  struct HkdfLabel {
  182|       |     *    uint16 length;
  183|       |     *    opaque label<9..255>;
  184|       |     *    opaque hash_value<0..255>;
  185|       |     *  };
  186|       |     *
  187|       |     *  Where:
  188|       |     *  - HkdfLabel.length is Length
  189|       |     *  - HkdfLabel.hash_value is HashValue.
  190|       |     *  - HkdfLabel.label is "TLS 1.3, " + Label
  191|       |     *
  192|       |     */
  193|  19.0k|    rv = sslBuffer_AppendNumber(&infoBuf, keySize, 2);
  194|  19.0k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (194:9): [True: 0, False: 19.0k]
  ------------------
  195|      0|        return SECFailure;
  196|      0|    }
  197|  19.0k|    rv = sslBuffer_AppendNumber(&infoBuf, labelLen + kLabelPrefixLen, 1);
  198|  19.0k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (198:9): [True: 0, False: 19.0k]
  ------------------
  199|      0|        return SECFailure;
  200|      0|    }
  201|  19.0k|    rv = sslBuffer_Append(&infoBuf, kLabelPrefix, kLabelPrefixLen);
  202|  19.0k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (202:9): [True: 0, False: 19.0k]
  ------------------
  203|      0|        return SECFailure;
  204|      0|    }
  205|  19.0k|    rv = sslBuffer_Append(&infoBuf, label, labelLen);
  206|  19.0k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (206:9): [True: 0, False: 19.0k]
  ------------------
  207|      0|        return SECFailure;
  208|      0|    }
  209|  19.0k|    rv = sslBuffer_AppendVariable(&infoBuf, handshakeHash, handshakeHashLen, 1);
  210|  19.0k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (210:9): [True: 0, False: 19.0k]
  ------------------
  211|      0|        return SECFailure;
  212|      0|    }
  213|       |
  214|  19.0k|    params.bExtract = CK_FALSE;
  ------------------
  |  |   23|  19.0k|#define CK_FALSE 0
  ------------------
  215|  19.0k|    params.bExpand = CK_TRUE;
  ------------------
  |  |   22|  19.0k|#define CK_TRUE 1
  ------------------
  216|  19.0k|    params.prfHashMechanism = kTlsHkdfInfo[baseHash].pkcs11Mech;
  217|  19.0k|    params.pInfo = SSL_BUFFER_BASE(&infoBuf);
  ------------------
  |  |   35|  19.0k|#define SSL_BUFFER_BASE(b) ((b)->buf)
  ------------------
  218|  19.0k|    params.ulInfoLen = SSL_BUFFER_LEN(&infoBuf);
  ------------------
  |  |   36|  19.0k|#define SSL_BUFFER_LEN(b) ((b)->len)
  ------------------
  219|  19.0k|    paramsi.data = (unsigned char *)&params;
  220|  19.0k|    paramsi.len = sizeof(params);
  221|  19.0k|    derived = PK11_DeriveWithFlags(prk, deriveMech,
  222|  19.0k|                                   &paramsi, algorithm,
  223|  19.0k|                                   CKA_DERIVE, keySize,
  ------------------
  |  |  555|  19.0k|#define CKA_DERIVE 0x0000010CUL
  ------------------
  224|  19.0k|                                   CKF_SIGN | CKF_VERIFY);
  ------------------
  |  | 1356|  19.0k|#define CKF_SIGN 0x00000800UL
  ------------------
                                                 CKF_SIGN | CKF_VERIFY);
  ------------------
  |  | 1358|  19.0k|#define CKF_VERIFY 0x00002000
  ------------------
  225|  19.0k|    if (!derived) {
  ------------------
  |  Branch (225:9): [True: 0, False: 19.0k]
  ------------------
  226|      0|        return SECFailure;
  227|      0|    }
  228|       |
  229|  19.0k|    *keyp = derived;
  230|       |
  231|  19.0k|#ifdef TRACE
  232|  19.0k|    if (ssl_trace >= 50) {
  ------------------
  |  Branch (232:9): [True: 0, False: 19.0k]
  ------------------
  233|       |        /* Make sure the label is null terminated. */
  234|      0|        char labelStr[100];
  235|      0|        PORT_Memcpy(labelStr, label, labelLen);
  ------------------
  |  |  180|      0|#define PORT_Memcpy memcpy
  ------------------
  236|      0|        labelStr[labelLen] = 0;
  237|      0|        SSL_TRC(50, ("HKDF Expand: label='tls13 %s',requested length=%d",
  ------------------
  |  |   71|      0|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    ssl_Trace b
  ------------------
  238|      0|                     labelStr, keySize));
  239|      0|    }
  240|  19.0k|    PRINT_KEY(50, (NULL, "PRK", prk));
  ------------------
  |  |   77|  19.0k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (77:9): [True: 0, False: 19.0k]
  |  |  ------------------
  |  |   78|  19.0k|    ssl_PrintKey b
  ------------------
  241|  19.0k|    PRINT_BUF(50, (NULL, "Hash", handshakeHash, handshakeHashLen));
  ------------------
  |  |   74|  19.0k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 19.0k]
  |  |  ------------------
  |  |   75|  19.0k|    ssl_PrintBuf b
  ------------------
  242|  19.0k|    PRINT_BUF(50, (NULL, "Info", SSL_BUFFER_BASE(&infoBuf),
  ------------------
  |  |   74|  19.0k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (74:9): [True: 0, False: 19.0k]
  |  |  ------------------
  |  |   75|  19.0k|    ssl_PrintBuf b
  ------------------
  243|  19.0k|                   SSL_BUFFER_LEN(&infoBuf)));
  244|  19.0k|    PRINT_KEY(50, (NULL, "Derived key", derived));
  ------------------
  |  |   77|  19.0k|    if (ssl_trace >= (a)) \
  |  |  ------------------
  |  |  |  Branch (77:9): [True: 0, False: 19.0k]
  |  |  ------------------
  |  |   78|  19.0k|    ssl_PrintKey b
  ------------------
  245|  19.0k|#endif
  246|       |
  247|  19.0k|    return SECSuccess;
  248|  19.0k|}
tls13_HkdfExpandLabel:
  256|  17.4k|{
  257|  17.4k|    return tls13_HkdfExpandLabelGeneral(CKM_HKDF_DERIVE, prk, baseHash,
  ------------------
  |  | 1296|  17.4k|#define CKM_HKDF_DERIVE 0x0000402aUL
  ------------------
  258|  17.4k|                                        handshakeHash, handshakeHashLen,
  259|  17.4k|                                        label, labelLen, algorithm, keySize,
  260|  17.4k|                                        variant, keyp);
  261|  17.4k|}
tls13_HkdfExpandLabelRaw:
  269|  1.60k|{
  270|  1.60k|    PK11SymKey *derived = NULL;
  271|  1.60k|    SECItem *rawkey;
  272|  1.60k|    SECStatus rv;
  273|       |
  274|       |    /* the result is not really a key, it's a data object */
  275|  1.60k|    rv = tls13_HkdfExpandLabelGeneral(CKM_HKDF_DATA, prk, baseHash,
  ------------------
  |  | 1297|  1.60k|#define CKM_HKDF_DATA 0x0000402bUL
  ------------------
  276|  1.60k|                                      handshakeHash, handshakeHashLen,
  277|  1.60k|                                      label, labelLen, CKM_HKDF_DERIVE, outputLen,
  ------------------
  |  | 1296|  1.60k|#define CKM_HKDF_DERIVE 0x0000402aUL
  ------------------
  278|  1.60k|                                      variant, &derived);
  279|  1.60k|    if (rv != SECSuccess || !derived) {
  ------------------
  |  Branch (279:9): [True: 0, False: 1.60k]
  |  Branch (279:29): [True: 0, False: 1.60k]
  ------------------
  280|      0|        goto abort;
  281|      0|    }
  282|       |
  283|  1.60k|    rv = PK11_ExtractKeyValue(derived);
  284|  1.60k|    if (rv != SECSuccess) {
  ------------------
  |  Branch (284:9): [True: 0, False: 1.60k]
  ------------------
  285|      0|        goto abort;
  286|      0|    }
  287|       |
  288|  1.60k|    rawkey = PK11_GetKeyData(derived);
  289|  1.60k|    if (!rawkey) {
  ------------------
  |  Branch (289:9): [True: 0, False: 1.60k]
  ------------------
  290|      0|        goto abort;
  291|      0|    }
  292|       |
  293|  1.60k|    PORT_Assert(rawkey->len == outputLen);
  ------------------
  |  |  120|  1.60k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.60k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.60k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  294|  1.60k|    memcpy(output, rawkey->data, outputLen);
  295|  1.60k|    PK11_FreeSymKey(derived);
  296|       |
  297|  1.60k|    return SECSuccess;
  298|       |
  299|      0|abort:
  300|      0|    if (derived) {
  ------------------
  |  Branch (300:9): [True: 0, False: 0]
  ------------------
  301|      0|        PK11_FreeSymKey(derived);
  302|      0|    }
  303|      0|    PORT_SetError(SSL_ERROR_SYM_KEY_CONTEXT_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  304|      0|    return SECFailure;
  305|  1.60k|}

SSLExp_AddExternalPsk0Rtt:
   21|  4.73k|{
   22|       |
   23|  4.73k|    sslSocket *ss = ssl_FindSocket(fd);
   24|  4.73k|    if (!ss) {
  ------------------
  |  Branch (24:9): [True: 0, False: 4.73k]
  ------------------
   25|      0|        SSL_DBG(("%d: SSL[%d]: bad socket in SSLExp_SetExternalPsk",
  ------------------
  |  |   87|      0|    if (ssl_debug) \
  |  |  ------------------
  |  |  |  Branch (87:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   88|      0|    ssl_Trace b
  ------------------
   26|      0|                 SSL_GETPID(), fd));
   27|      0|        return SECFailure;
   28|      0|    }
   29|       |
   30|  4.73k|    if (!key || !identity || !identityLen || identityLen > 0xFFFF ||
  ------------------
  |  Branch (30:9): [True: 0, False: 4.73k]
  |  Branch (30:17): [True: 0, False: 4.73k]
  |  Branch (30:30): [True: 0, False: 4.73k]
  |  Branch (30:46): [True: 0, False: 4.73k]
  ------------------
   31|  4.73k|        (hash != ssl_hash_sha256 && hash != ssl_hash_sha384)) {
  ------------------
  |  Branch (31:10): [True: 3.52k, False: 1.20k]
  |  Branch (31:37): [True: 0, False: 3.52k]
  ------------------
   32|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
   33|      0|        return SECFailure;
   34|      0|    }
   35|       |
   36|  4.73k|    SECItem label = { siBuffer, CONST_CAST(unsigned char, identity), identityLen };
  ------------------
  |  |   96|  4.73k|#define CONST_CAST(T, X) ((T *)(X))
  ------------------
   37|  4.73k|    sslPsk *psk = tls13_MakePsk(PK11_ReferenceSymKey(key), ssl_psk_external,
   38|  4.73k|                                hash, &label);
   39|  4.73k|    if (!psk) {
  ------------------
  |  Branch (39:9): [True: 0, False: 4.73k]
  ------------------
   40|      0|        PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
   41|      0|        return SECFailure;
   42|      0|    }
   43|  4.73k|    psk->zeroRttSuite = zeroRttSuite;
   44|  4.73k|    psk->maxEarlyData = maxEarlyData;
   45|  4.73k|    SECStatus rv = SECFailure;
   46|       |
   47|  4.73k|    ssl_Get1stHandshakeLock(ss);
  ------------------
  |  | 1390|  4.73k|    {                                                             \
  |  | 1391|  4.73k|        if (!ss->opt.noLocks) {                                   \
  |  |  ------------------
  |  |  |  Branch (1391:13): [True: 4.73k, False: 0]
  |  |  ------------------
  |  | 1392|  4.73k|            PORT_Assert(PZ_InMonitor((ss)->firstHandshakeLock) || \
  |  |  ------------------
  |  |  |  |  120|  4.73k|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|  9.46k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:7): [True: 0, False: 4.73k]
  |  |  |  |  |  |  |  Branch (208:7): [True: 4.73k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1393|  4.73k|                        !ssl_HaveRecvBufLock(ss));                \
  |  | 1394|  4.73k|            PZ_EnterMonitor((ss)->firstHandshakeLock);            \
  |  |  ------------------
  |  |  |  |  256|  4.73k|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1395|  4.73k|        }                                                         \
  |  | 1396|  4.73k|    }
  ------------------
   48|  4.73k|    ssl_GetSSL3HandshakeLock(ss);
  ------------------
  |  | 1407|  4.73k|    {                                                 \
  |  | 1408|  4.73k|        if (!ss->opt.noLocks) {                       \
  |  |  ------------------
  |  |  |  Branch (1408:13): [True: 4.73k, False: 0]
  |  |  ------------------
  |  | 1409|  4.73k|            PORT_Assert(!ssl_HaveXmitBufLock(ss));    \
  |  |  ------------------
  |  |  |  |  120|  4.73k|#define PORT_Assert PR_ASSERT
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|  4.73k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (208:6): [True: 4.73k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1410|  4.73k|            PZ_EnterMonitor((ss)->ssl3HandshakeLock); \
  |  |  ------------------
  |  |  |  |  256|  4.73k|#define PZ_EnterMonitor(m) PR_EnterMonitor((m))
  |  |  ------------------
  |  | 1411|  4.73k|        }                                             \
  |  | 1412|  4.73k|    }
  ------------------
   49|       |
   50|  4.73k|    if (ss->psk) {
  ------------------
  |  Branch (50:9): [True: 0, False: 4.73k]
  ------------------
   51|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
   52|      0|        tls13_DestroyPsk(psk);
   53|  4.73k|    } else {
   54|  4.73k|        ss->psk = psk;
   55|  4.73k|        rv = SECSuccess;
   56|  4.73k|        tls13_ResetHandshakePsks(ss, &ss->ssl3.hs.psks);
   57|  4.73k|    }
   58|       |
   59|  4.73k|    ssl_ReleaseSSL3HandshakeLock(ss);
  ------------------
  |  | 1414|  4.73k|    {                                                \
  |  | 1415|  4.73k|        if (!ss->opt.noLocks)                        \
  |  |  ------------------
  |  |  |  Branch (1415:13): [True: 4.73k, False: 0]
  |  |  ------------------
  |  | 1416|  4.73k|            PZ_ExitMonitor((ss)->ssl3HandshakeLock); \
  |  |  ------------------
  |  |  |  |  257|  4.73k|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1417|  4.73k|    }
  ------------------
   60|  4.73k|    ssl_Release1stHandshakeLock(ss);
  ------------------
  |  | 1398|  4.73k|    {                                                 \
  |  | 1399|  4.73k|        if (!ss->opt.noLocks)                         \
  |  |  ------------------
  |  |  |  Branch (1399:13): [True: 4.73k, False: 0]
  |  |  ------------------
  |  | 1400|  4.73k|            PZ_ExitMonitor((ss)->firstHandshakeLock); \
  |  |  ------------------
  |  |  |  |  257|  4.73k|#define PZ_ExitMonitor(m) PR_ExitMonitor((m))
  |  |  ------------------
  |  | 1401|  4.73k|    }
  ------------------
   61|       |
   62|  4.73k|    return rv;
   63|  4.73k|}
SSLExp_AddExternalPsk:
   68|  4.73k|{
   69|  4.73k|    return SSLExp_AddExternalPsk0Rtt(fd, key, identity, identityLen,
   70|  4.73k|                                     hash, TLS_NULL_WITH_NULL_NULL, 0);
  ------------------
  |  |   76|  4.73k|#define TLS_NULL_WITH_NULL_NULL                 0x0000
  ------------------
   71|  4.73k|}
tls13_DestroyPsk:
  143|  18.8k|{
  144|  18.8k|    if (!psk) {
  ------------------
  |  Branch (144:9): [True: 4.63k, False: 14.1k]
  ------------------
  145|  4.63k|        return;
  146|  4.63k|    }
  147|  14.1k|    if (psk->key) {
  ------------------
  |  Branch (147:9): [True: 10.2k, False: 3.99k]
  ------------------
  148|  10.2k|        PK11_FreeSymKey(psk->key);
  149|  10.2k|        psk->key = NULL;
  150|  10.2k|    }
  151|  14.1k|    if (psk->binderKey) {
  ------------------
  |  Branch (151:9): [True: 3.99k, False: 10.2k]
  ------------------
  152|  3.99k|        PK11_FreeSymKey(psk->binderKey);
  153|  3.99k|        psk->binderKey = NULL;
  154|  3.99k|    }
  155|  14.1k|    SECITEM_ZfreeItem(&psk->label, PR_FALSE);
  ------------------
  |  |  110|  14.1k|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                  SECITEM_ZfreeItem(&psk->label, PR_FALSE);
  ------------------
  |  |  438|  14.1k|#define PR_FALSE 0
  ------------------
  156|  14.1k|    PORT_ZFree(psk, sizeof(*psk));
  ------------------
  |  |   75|  14.1k|#define PORT_ZFree PORT_ZFree_Util
  ------------------
  157|  14.1k|}
tls13_DestroyPskList:
  161|  32.8k|{
  162|  32.8k|    PRCList *cur_p;
  163|  42.2k|    while (!PR_CLIST_IS_EMPTY(list)) {
  ------------------
  |  |   94|  42.2k|    ((_l)->next == (_l))
  ------------------
  |  Branch (163:12): [True: 9.46k, False: 32.8k]
  ------------------
  164|  9.46k|        cur_p = PR_LIST_TAIL(list);
  ------------------
  |  |   66|  9.46k|#define PR_LIST_TAIL(_l) (_l)->prev
  ------------------
  165|  9.46k|        PR_REMOVE_LINK(cur_p);
  ------------------
  |  |   72|  9.46k|    PR_BEGIN_MACRO             \
  |  |  ------------------
  |  |  |  |  123|  9.46k|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |   73|  9.46k|    (_e)->prev->next = (_e)->next; \
  |  |   74|  9.46k|    (_e)->next->prev = (_e)->prev; \
  |  |   75|  9.46k|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|  9.46k|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  166|  9.46k|        tls13_DestroyPsk((sslPsk *)cur_p);
  167|  9.46k|    }
  168|  32.8k|}
tls13_MakePsk:
  172|  14.1k|{
  173|  14.1k|    sslPsk *psk = PORT_ZNew(sslPsk);
  ------------------
  |  |  148|  14.1k|#define PORT_ZNew(type) (type *)PORT_ZAlloc(sizeof(type))
  |  |  ------------------
  |  |  |  |   72|  14.1k|#define PORT_ZAlloc PORT_ZAlloc_Util
  |  |  ------------------
  ------------------
  174|  14.1k|    if (!psk) {
  ------------------
  |  Branch (174:9): [True: 0, False: 14.1k]
  ------------------
  175|      0|        PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  176|      0|        return NULL;
  177|      0|    }
  178|  14.1k|    psk->type = pskType;
  179|  14.1k|    psk->hash = hashType;
  180|  14.1k|    psk->key = key;
  181|       |
  182|       |    /* Label is NULL in the resumption case. */
  183|  14.1k|    if (label) {
  ------------------
  |  Branch (183:9): [True: 14.1k, False: 0]
  ------------------
  184|  14.1k|        PORT_Assert(psk->type != ssl_psk_resume);
  ------------------
  |  |  120|  14.1k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  14.1k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 14.1k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  185|  14.1k|        SECStatus rv = SECITEM_CopyItem(NULL, &psk->label, label);
  ------------------
  |  |  106|  14.1k|#define SECITEM_CopyItem SECITEM_CopyItem_Util
  ------------------
  186|  14.1k|        if (rv != SECSuccess) {
  ------------------
  |  Branch (186:13): [True: 0, False: 14.1k]
  ------------------
  187|      0|            PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  188|      0|            tls13_DestroyPsk(psk);
  189|      0|            return NULL;
  190|      0|        }
  191|  14.1k|    }
  192|       |
  193|  14.1k|    return psk;
  194|  14.1k|}
tls13_ResetHandshakePsks:
  200|  14.0k|{
  201|  14.0k|    tls13_DestroyPskList(list);
  202|  14.0k|    PORT_Assert(!ss->xtnData.selectedPsk);
  ------------------
  |  |  120|  14.0k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  14.0k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 14.0k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  203|  14.0k|    ss->xtnData.selectedPsk = NULL;
  204|  14.0k|    if (ss->psk) {
  ------------------
  |  Branch (204:9): [True: 9.46k, False: 4.63k]
  ------------------
  205|  9.46k|        PORT_Assert(ss->psk->type == ssl_psk_external);
  ------------------
  |  |  120|  9.46k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  9.46k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 9.46k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  206|  9.46k|        PORT_Assert(ss->psk->key);
  ------------------
  |  |  120|  9.46k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  9.46k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 9.46k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  207|  9.46k|        PORT_Assert(!ss->psk->binderKey);
  ------------------
  |  |  120|  9.46k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  9.46k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 9.46k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  208|       |
  209|  9.46k|        sslPsk *epsk = tls13_MakePsk(PK11_ReferenceSymKey(ss->psk->key),
  210|  9.46k|                                     ss->psk->type, ss->psk->hash, &ss->psk->label);
  211|  9.46k|        if (!epsk) {
  ------------------
  |  Branch (211:13): [True: 0, False: 9.46k]
  ------------------
  212|      0|            return SECFailure;
  213|      0|        }
  214|  9.46k|        epsk->zeroRttSuite = ss->psk->zeroRttSuite;
  215|  9.46k|        epsk->maxEarlyData = ss->psk->maxEarlyData;
  216|  9.46k|        PR_APPEND_LINK(&epsk->link, list);
  ------------------
  |  |   57|  9.46k|#define PR_APPEND_LINK(_e,_l) PR_INSERT_BEFORE(_e,_l)
  |  |  ------------------
  |  |  |  |   25|  9.46k|    PR_BEGIN_MACRO       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  123|  9.46k|#define PR_BEGIN_MACRO  do {
  |  |  |  |  ------------------
  |  |  |  |   26|  9.46k|    (_e)->next = (_l);   \
  |  |  |  |   27|  9.46k|    (_e)->prev = (_l)->prev; \
  |  |  |  |   28|  9.46k|    (_l)->prev->next = (_e); \
  |  |  |  |   29|  9.46k|    (_l)->prev = (_e);   \
  |  |  |  |   30|  9.46k|    PR_END_MACRO
  |  |  |  |  ------------------
  |  |  |  |  |  |  124|  9.46k|#define PR_END_MACRO    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  217|  9.46k|    }
  218|  14.0k|    return SECSuccess;
  219|  14.0k|}

tls13_ReleaseAntiReplayContext:
   40|  9.36k|{
   41|  9.36k|    if (!ctx) {
  ------------------
  |  Branch (41:9): [True: 9.36k, False: 0]
  ------------------
   42|  9.36k|        return;
   43|  9.36k|    }
   44|      0|    if (PR_ATOMIC_DECREMENT(&ctx->refCount) >= 1) {
  ------------------
  |  |  123|      0|#define PR_ATOMIC_DECREMENT(val) __sync_sub_and_fetch(val, 1)
  ------------------
  |  Branch (44:9): [True: 0, False: 0]
  ------------------
   45|      0|        return;
   46|      0|    }
   47|       |
   48|      0|    if (ctx->lock) {
  ------------------
  |  Branch (48:9): [True: 0, False: 0]
  ------------------
   49|      0|        PZ_DestroyMonitor(ctx->lock);
  ------------------
  |  |  255|      0|#define PZ_DestroyMonitor(m) PR_DestroyMonitor((m))
  ------------------
   50|      0|        ctx->lock = NULL;
   51|      0|    }
   52|      0|    PK11_FreeSymKey(ctx->key);
   53|      0|    ctx->key = NULL;
   54|      0|    sslBloom_Destroy(&ctx->filters[0]);
   55|      0|    sslBloom_Destroy(&ctx->filters[1]);
   56|      0|    PORT_Free(ctx);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
   57|      0|}

tls13_DestroyDelegatedCredential:
  108|  39.0k|{
  109|  39.0k|    if (!dc) {
  ------------------
  |  Branch (109:9): [True: 39.0k, False: 0]
  ------------------
  110|  39.0k|        return;
  111|  39.0k|    }
  112|       |
  113|      0|    SECKEY_DestroySubjectPublicKeyInfo(dc->spki);
  114|      0|    SECITEM_FreeItem(&dc->derSpki, PR_FALSE);
  ------------------
  |  |  108|      0|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                  SECITEM_FreeItem(&dc->derSpki, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  115|      0|    SECITEM_FreeItem(&dc->signature, PR_FALSE);
  ------------------
  |  |  108|      0|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                  SECITEM_FreeItem(&dc->signature, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  116|      0|    PORT_ZFree(dc, sizeof(sslDelegatedCredential));
  ------------------
  |  |   75|      0|#define PORT_ZFree PORT_ZFree_Util
  ------------------
  117|      0|}

DER_SetUInteger:
  130|  8.50k|{
  131|  8.50k|    unsigned char bb[5];
  132|  8.50k|    int len;
  133|       |
  134|  8.50k|    bb[0] = 0;
  135|  8.50k|    bb[1] = (unsigned char)(ui >> 24);
  136|  8.50k|    bb[2] = (unsigned char)(ui >> 16);
  137|  8.50k|    bb[3] = (unsigned char)(ui >> 8);
  138|  8.50k|    bb[4] = (unsigned char)(ui);
  139|       |
  140|       |    /*
  141|       |    ** Small integers are encoded in a single byte. Larger integers
  142|       |    ** require progressively more space.
  143|       |    */
  144|  8.50k|    if (ui > 0x7f) {
  ------------------
  |  Branch (144:9): [True: 0, False: 8.50k]
  ------------------
  145|      0|        if (ui > 0x7fff) {
  ------------------
  |  Branch (145:13): [True: 0, False: 0]
  ------------------
  146|      0|            if (ui > 0x7fffffL) {
  ------------------
  |  Branch (146:17): [True: 0, False: 0]
  ------------------
  147|      0|                if (ui >= 0x80000000L) {
  ------------------
  |  Branch (147:21): [True: 0, False: 0]
  ------------------
  148|      0|                    len = 5;
  149|      0|                } else {
  150|      0|                    len = 4;
  151|      0|                }
  152|      0|            } else {
  153|      0|                len = 3;
  154|      0|            }
  155|      0|        } else {
  156|      0|            len = 2;
  157|      0|        }
  158|  8.50k|    } else {
  159|  8.50k|        len = 1;
  160|  8.50k|    }
  161|       |
  162|  8.50k|    it->data = (unsigned char *)PORT_ArenaAlloc(arena, len);
  ------------------
  |  |   53|  8.50k|#define PORT_ArenaAlloc PORT_ArenaAlloc_Util
  ------------------
  163|  8.50k|    if (it->data == NULL) {
  ------------------
  |  Branch (163:9): [True: 0, False: 8.50k]
  ------------------
  164|      0|        return SECFailure;
  165|      0|    }
  166|       |
  167|  8.50k|    it->len = len;
  168|  8.50k|    PORT_Memcpy(it->data, bb + (sizeof(bb) - len), len);
  ------------------
  |  |  180|  8.50k|#define PORT_Memcpy memcpy
  ------------------
  169|       |
  170|  8.50k|    return SECSuccess;
  171|  8.50k|}
DER_GetInteger_Util:
  179|    753|{
  180|    753|    unsigned long ival;
  181|    753|    PRBool negative;
  182|    753|    unsigned int len = it->len;
  183|    753|    unsigned char *cp = it->data;
  184|    753|    size_t lsize = sizeof(ival);
  185|       |
  186|    753|    PORT_Assert(len);
  ------------------
  |  |  120|    753|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    753|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 753, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  187|    753|    if (!len) {
  ------------------
  |  Branch (187:9): [True: 0, False: 753]
  ------------------
  188|      0|        PORT_SetError(SEC_ERROR_INPUT_LEN);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  189|      0|        return 0;
  190|      0|    }
  191|       |
  192|    753|    negative = (PRBool)(*cp & 0x80);
  193|    753|    ival = negative ? ~0 : 0;
  ------------------
  |  Branch (193:12): [True: 15, False: 738]
  ------------------
  194|       |
  195|       |    /* Ignore leading zeros/ones. */
  196|    763|    while (len && *cp == (unsigned char)ival) {
  ------------------
  |  Branch (196:12): [True: 753, False: 10]
  |  Branch (196:19): [True: 10, False: 743]
  ------------------
  197|     10|        len--;
  198|     10|        cp++;
  199|     10|    }
  200|       |
  201|       |    /* Check for overflow/underflow. */
  202|    753|    if (len > lsize || (len == lsize && (*cp & 0x80) != negative)) {
  ------------------
  |  Branch (202:9): [True: 0, False: 753]
  |  Branch (202:25): [True: 0, False: 753]
  |  Branch (202:41): [True: 0, False: 0]
  ------------------
  203|      0|        PORT_SetError(SEC_ERROR_BAD_DER);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  204|      0|        return negative ? LONG_MIN : LONG_MAX;
  ------------------
  |  Branch (204:16): [True: 0, False: 0]
  ------------------
  205|      0|    }
  206|       |
  207|  1.49k|    while (len--) {
  ------------------
  |  Branch (207:12): [True: 743, False: 753]
  ------------------
  208|    743|        ival <<= 8;
  209|    743|        ival |= *cp++;
  210|    743|    }
  211|       |
  212|    753|    return ival;
  213|    753|}

NSS_InitializePRErrorTable:
   37|      1|{
   38|      1|    return (PR_SUCCESS == PR_CallOnce(&once, nss_InitializePRErrorTableOnce))
  ------------------
  |  Branch (38:12): [True: 1, False: 0]
  ------------------
   39|      1|               ? SECSuccess
   40|      1|               : SECFailure;
   41|      1|}
errstrs.c:nss_InitializePRErrorTableOnce:
   29|      1|{
   30|      1|    return PR_ErrorInstallTable(&sec_et);
   31|      1|}

HASH_GetHashTypeByOidTag_Util:
   12|  18.3k|{
   13|  18.3k|    HASH_HashType ht = HASH_AlgNULL;
   14|       |
   15|  18.3k|    switch (hashOid) {
   16|      0|        case SEC_OID_MD2:
  ------------------
  |  Branch (16:9): [True: 0, False: 18.3k]
  ------------------
   17|      0|            ht = HASH_AlgMD2;
   18|      0|            break;
   19|     38|        case SEC_OID_MD5:
  ------------------
  |  Branch (19:9): [True: 38, False: 18.3k]
  ------------------
   20|     38|            ht = HASH_AlgMD5;
   21|     38|            break;
   22|  5.27k|        case SEC_OID_SHA1:
  ------------------
  |  Branch (22:9): [True: 5.27k, False: 13.0k]
  ------------------
   23|  5.27k|            ht = HASH_AlgSHA1;
   24|  5.27k|            break;
   25|      0|        case SEC_OID_SHA224:
  ------------------
  |  Branch (25:9): [True: 0, False: 18.3k]
  ------------------
   26|      0|            ht = HASH_AlgSHA224;
   27|      0|            break;
   28|  8.39k|        case SEC_OID_SHA256:
  ------------------
  |  Branch (28:9): [True: 8.39k, False: 9.95k]
  ------------------
   29|  8.39k|            ht = HASH_AlgSHA256;
   30|  8.39k|            break;
   31|  3.45k|        case SEC_OID_SHA384:
  ------------------
  |  Branch (31:9): [True: 3.45k, False: 14.8k]
  ------------------
   32|  3.45k|            ht = HASH_AlgSHA384;
   33|  3.45k|            break;
   34|  1.18k|        case SEC_OID_SHA512:
  ------------------
  |  Branch (34:9): [True: 1.18k, False: 17.1k]
  ------------------
   35|  1.18k|            ht = HASH_AlgSHA512;
   36|  1.18k|            break;
   37|      0|        case SEC_OID_SHA3_224:
  ------------------
  |  Branch (37:9): [True: 0, False: 18.3k]
  ------------------
   38|      0|            ht = HASH_AlgSHA3_224;
   39|      0|            break;
   40|      0|        case SEC_OID_SHA3_256:
  ------------------
  |  Branch (40:9): [True: 0, False: 18.3k]
  ------------------
   41|      0|            ht = HASH_AlgSHA3_256;
   42|      0|            break;
   43|      0|        case SEC_OID_SHA3_384:
  ------------------
  |  Branch (43:9): [True: 0, False: 18.3k]
  ------------------
   44|      0|            ht = HASH_AlgSHA3_384;
   45|      0|            break;
   46|      0|        case SEC_OID_SHA3_512:
  ------------------
  |  Branch (46:9): [True: 0, False: 18.3k]
  ------------------
   47|      0|            ht = HASH_AlgSHA3_512;
   48|      0|            break;
   49|      0|        default:
  ------------------
  |  Branch (49:9): [True: 0, False: 18.3k]
  ------------------
   50|      0|            PORT_SetError(SEC_ERROR_INVALID_ALGORITHM);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
   51|      0|            break;
   52|  18.3k|    }
   53|  18.3k|    return ht;
   54|  18.3k|}

NSSRWLock_New_Util:
   74|  9.36k|{
   75|  9.36k|    NSSRWLock *rwlock;
   76|       |
   77|  9.36k|    rwlock = PR_NEWZAP(NSSRWLock);
  ------------------
  |  |   99|  9.36k|#define PR_NEWZAP(_struct) ((_struct*)PR_Calloc(1, sizeof(_struct)))
  ------------------
   78|  9.36k|    if (rwlock == NULL)
  ------------------
  |  Branch (78:9): [True: 0, False: 9.36k]
  ------------------
   79|      0|        return NULL;
   80|       |
   81|  9.36k|    rwlock->rw_lock = PZ_NewLock(nssILockRWLock);
  ------------------
  |  |  243|  9.36k|#define PZ_NewLock(t) PR_NewLock()
  ------------------
   82|  9.36k|    if (rwlock->rw_lock == NULL) {
  ------------------
  |  Branch (82:9): [True: 0, False: 9.36k]
  ------------------
   83|      0|        goto loser;
   84|      0|    }
   85|  9.36k|    rwlock->rw_reader_waitq = PZ_NewCondVar(rwlock->rw_lock);
  ------------------
  |  |  248|  9.36k|#define PZ_NewCondVar(l) PR_NewCondVar((l))
  ------------------
   86|  9.36k|    if (rwlock->rw_reader_waitq == NULL) {
  ------------------
  |  Branch (86:9): [True: 0, False: 9.36k]
  ------------------
   87|      0|        goto loser;
   88|      0|    }
   89|  9.36k|    rwlock->rw_writer_waitq = PZ_NewCondVar(rwlock->rw_lock);
  ------------------
  |  |  248|  9.36k|#define PZ_NewCondVar(l) PR_NewCondVar((l))
  ------------------
   90|  9.36k|    if (rwlock->rw_writer_waitq == NULL) {
  ------------------
  |  Branch (90:9): [True: 0, False: 9.36k]
  ------------------
   91|      0|        goto loser;
   92|      0|    }
   93|  9.36k|    if (lock_name != NULL) {
  ------------------
  |  Branch (93:9): [True: 3, False: 9.36k]
  ------------------
   94|      3|        rwlock->rw_name = (char *)PR_Malloc((PRUint32)strlen(lock_name) + 1);
   95|      3|        if (rwlock->rw_name == NULL) {
  ------------------
  |  Branch (95:13): [True: 0, False: 3]
  ------------------
   96|      0|            goto loser;
   97|      0|        }
   98|      3|        strcpy(rwlock->rw_name, lock_name);
   99|  9.36k|    } else {
  100|  9.36k|        rwlock->rw_name = NULL;
  101|  9.36k|    }
  102|  9.36k|    rwlock->rw_rank = lock_rank;
  103|  9.36k|    rwlock->rw_waiting_readers = 0;
  104|  9.36k|    rwlock->rw_waiting_writers = 0;
  105|  9.36k|    rwlock->rw_reader_locks = 0;
  106|  9.36k|    rwlock->rw_writer_locks = 0;
  107|       |
  108|  9.36k|    return rwlock;
  109|       |
  110|      0|loser:
  111|      0|    NSSRWLock_Destroy(rwlock);
  ------------------
  |  |   45|      0|#define NSSRWLock_Destroy NSSRWLock_Destroy_Util
  ------------------
  112|      0|    return (NULL);
  113|  9.36k|}
NSSRWLock_Destroy_Util:
  120|  9.36k|{
  121|  9.36k|    PR_ASSERT(rwlock != NULL);
  ------------------
  |  |  208|  9.36k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 9.36k, False: 0]
  |  |  ------------------
  ------------------
  122|  9.36k|    PR_ASSERT(rwlock->rw_waiting_readers == 0);
  ------------------
  |  |  208|  9.36k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 9.36k, False: 0]
  |  |  ------------------
  ------------------
  123|  9.36k|    PR_ASSERT(rwlock->rw_writer_locks == 0);
  ------------------
  |  |  208|  9.36k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 9.36k, False: 0]
  |  |  ------------------
  ------------------
  124|  9.36k|    PR_ASSERT(rwlock->rw_reader_locks == 0);
  ------------------
  |  |  208|  9.36k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 9.36k, False: 0]
  |  |  ------------------
  ------------------
  125|       |
  126|       |    /* XXX Shouldn't we lock the PZLock before destroying this?? */
  127|       |
  128|  9.36k|    if (rwlock->rw_name)
  ------------------
  |  Branch (128:9): [True: 3, False: 9.36k]
  ------------------
  129|      3|        PR_Free(rwlock->rw_name);
  130|  9.36k|    if (rwlock->rw_reader_waitq)
  ------------------
  |  Branch (130:9): [True: 9.36k, False: 0]
  ------------------
  131|  9.36k|        PZ_DestroyCondVar(rwlock->rw_reader_waitq);
  ------------------
  |  |  249|  9.36k|#define PZ_DestroyCondVar(v) PR_DestroyCondVar((v))
  ------------------
  132|  9.36k|    if (rwlock->rw_writer_waitq)
  ------------------
  |  Branch (132:9): [True: 9.36k, False: 0]
  ------------------
  133|  9.36k|        PZ_DestroyCondVar(rwlock->rw_writer_waitq);
  ------------------
  |  |  249|  9.36k|#define PZ_DestroyCondVar(v) PR_DestroyCondVar((v))
  ------------------
  134|  9.36k|    if (rwlock->rw_lock)
  ------------------
  |  Branch (134:9): [True: 9.36k, False: 0]
  ------------------
  135|  9.36k|        PZ_DestroyLock(rwlock->rw_lock);
  ------------------
  |  |  244|  9.36k|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
  136|  9.36k|    PR_DELETE(rwlock);
  ------------------
  |  |  110|  9.36k|#define PR_DELETE(_ptr) { PR_Free(_ptr); (_ptr) = NULL; }
  ------------------
  137|  9.36k|}
NSSRWLock_LockRead_Util:
  144|   616k|{
  145|   616k|    PRThread *me = PR_GetCurrentThread();
  146|       |
  147|   616k|    PZ_Lock(rwlock->rw_lock);
  ------------------
  |  |  245|   616k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
  148|       |#ifdef NSS_RWLOCK_RANK_ORDER_DEBUG
  149|       |
  150|       |    /*
  151|       |     * assert that rank ordering is not violated; the rank of 'rwlock' should
  152|       |     * be equal to or greater than the highest rank of all the locks held by
  153|       |     * the thread.
  154|       |     */
  155|       |    PR_ASSERT((rwlock->rw_rank == NSS_RWLOCK_RANK_NONE) ||
  156|       |              (rwlock->rw_rank >= nssRWLock_GetThreadRank(me)));
  157|       |#endif
  158|       |    /*
  159|       |     * wait if write-locked or if a writer is waiting; preference for writers
  160|       |     */
  161|   616k|    UNTIL((rwlock->rw_owner == me) ||    /* I own it, or        */
  ------------------
  |  |   60|  2.46M|#define UNTIL(x) while (!(x))
  |  |  ------------------
  |  |  |  Branch (60:27): [True: 616k, False: 0]
  |  |  |  Branch (60:27): [True: 616k, False: 0]
  |  |  |  Branch (60:27): [True: 0, False: 616k]
  |  |  ------------------
  ------------------
  162|   616k|          ((rwlock->rw_owner == NULL) && /* no-one owns it, and */
  163|   616k|           (rwlock->rw_waiting_writers == 0)))
  164|      0|    { /* no-one is waiting to own */
  165|       |
  166|      0|        rwlock->rw_waiting_readers++;
  167|      0|        PZ_WaitCondVar(rwlock->rw_reader_waitq, PR_INTERVAL_NO_TIMEOUT);
  ------------------
  |  |  250|      0|#define PZ_WaitCondVar(v, t) PR_WaitCondVar((v), (t))
  ------------------
  168|      0|        rwlock->rw_waiting_readers--;
  169|      0|    }
  170|   616k|    rwlock->rw_reader_locks++; /* Increment read-lock count */
  171|       |
  172|   616k|    PZ_Unlock(rwlock->rw_lock);
  ------------------
  |  |  246|   616k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  173|       |
  174|       |#ifdef NSS_RWLOCK_RANK_ORDER_DEBUG
  175|       |    nssRWLock_SetThreadRank(me, rwlock); /* update thread's lock rank */
  176|       |#endif
  177|   616k|}
NSSRWLock_UnlockRead_Util:
  183|   616k|{
  184|   616k|    PZ_Lock(rwlock->rw_lock);
  ------------------
  |  |  245|   616k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
  185|       |
  186|   616k|    PR_ASSERT(rwlock->rw_reader_locks > 0); /* lock must be read locked */
  ------------------
  |  |  208|   616k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 616k, False: 0]
  |  |  ------------------
  ------------------
  187|       |
  188|   616k|    if ((rwlock->rw_reader_locks > 0) &&    /* caller isn't screwey */
  ------------------
  |  Branch (188:9): [True: 616k, False: 0]
  ------------------
  189|   616k|        (--rwlock->rw_reader_locks == 0) && /* not read locked any more */
  ------------------
  |  Branch (189:9): [True: 608k, False: 8.05k]
  ------------------
  190|   616k|        (rwlock->rw_owner == NULL) &&       /* not write locked */
  ------------------
  |  Branch (190:9): [True: 608k, False: 0]
  ------------------
  191|   616k|        (rwlock->rw_waiting_writers > 0)) { /* someone's waiting. */
  ------------------
  |  Branch (191:9): [True: 0, False: 608k]
  ------------------
  192|       |
  193|      0|        PZ_NotifyCondVar(rwlock->rw_writer_waitq); /* wake him up. */
  ------------------
  |  |  251|      0|#define PZ_NotifyCondVar(v) PR_NotifyCondVar((v))
  ------------------
  194|      0|    }
  195|       |
  196|   616k|    PZ_Unlock(rwlock->rw_lock);
  ------------------
  |  |  246|   616k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  197|       |
  198|       |#ifdef NSS_RWLOCK_RANK_ORDER_DEBUG
  199|       |    /*
  200|       |     * update thread's lock rank
  201|       |     */
  202|       |    nssRWLock_UnsetThreadRank(me, rwlock);
  203|       |#endif
  204|   616k|    return;
  205|   616k|}
NSSRWLock_LockWrite_Util:
  212|  33.3k|{
  213|  33.3k|    PRThread *me = PR_GetCurrentThread();
  214|       |
  215|  33.3k|    PZ_Lock(rwlock->rw_lock);
  ------------------
  |  |  245|  33.3k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
  216|       |#ifdef NSS_RWLOCK_RANK_ORDER_DEBUG
  217|       |    /*
  218|       |     * assert that rank ordering is not violated; the rank of 'rwlock' should
  219|       |     * be equal to or greater than the highest rank of all the locks held by
  220|       |     * the thread.
  221|       |     */
  222|       |    PR_ASSERT((rwlock->rw_rank == NSS_RWLOCK_RANK_NONE) ||
  223|       |              (rwlock->rw_rank >= nssRWLock_GetThreadRank(me)));
  224|       |#endif
  225|       |    /*
  226|       |     * wait if read locked or write locked.
  227|       |     */
  228|  33.3k|    PR_ASSERT(rwlock->rw_reader_locks >= 0);
  ------------------
  |  |  208|  33.3k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 33.3k, False: 0]
  |  |  ------------------
  ------------------
  229|  33.3k|    PR_ASSERT(me != NULL);
  ------------------
  |  |  208|  33.3k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 33.3k, False: 0]
  |  |  ------------------
  ------------------
  230|       |
  231|  33.3k|    UNTIL((rwlock->rw_owner == me) ||    /* I own write lock, or */
  ------------------
  |  |   60|   133k|#define UNTIL(x) while (!(x))
  |  |  ------------------
  |  |  |  Branch (60:27): [True: 33.3k, False: 0]
  |  |  |  Branch (60:27): [True: 33.3k, False: 0]
  |  |  |  Branch (60:27): [True: 2, False: 33.3k]
  |  |  ------------------
  ------------------
  232|  33.3k|          ((rwlock->rw_owner == NULL) && /* no writer   and */
  233|  33.3k|           (rwlock->rw_reader_locks == 0)))
  234|      0|    { /* no readers, either. */
  235|       |
  236|      0|        rwlock->rw_waiting_writers++;
  237|      0|        PZ_WaitCondVar(rwlock->rw_writer_waitq, PR_INTERVAL_NO_TIMEOUT);
  ------------------
  |  |  250|      0|#define PZ_WaitCondVar(v, t) PR_WaitCondVar((v), (t))
  ------------------
  238|      0|        rwlock->rw_waiting_writers--;
  239|      0|        PR_ASSERT(rwlock->rw_reader_locks >= 0);
  ------------------
  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  240|      0|    }
  241|       |
  242|  33.3k|    PR_ASSERT(rwlock->rw_reader_locks == 0);
  ------------------
  |  |  208|  33.3k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 33.3k, False: 0]
  |  |  ------------------
  ------------------
  243|       |    /*
  244|       |     * apply write lock
  245|       |     */
  246|  33.3k|    rwlock->rw_owner = me;
  247|  33.3k|    rwlock->rw_writer_locks++; /* Increment write-lock count */
  248|       |
  249|  33.3k|    PZ_Unlock(rwlock->rw_lock);
  ------------------
  |  |  246|  33.3k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  250|       |
  251|       |#ifdef NSS_RWLOCK_RANK_ORDER_DEBUG
  252|       |    /*
  253|       |     * update thread's lock rank
  254|       |     */
  255|       |    nssRWLock_SetThreadRank(me, rwlock);
  256|       |#endif
  257|  33.3k|}
NSSRWLock_UnlockWrite_Util:
  263|  33.3k|{
  264|  33.3k|    PRThread *me = PR_GetCurrentThread();
  265|       |
  266|  33.3k|    PZ_Lock(rwlock->rw_lock);
  ------------------
  |  |  245|  33.3k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
  267|  33.3k|    PR_ASSERT(rwlock->rw_owner == me);      /* lock must be write-locked by me.  */
  ------------------
  |  |  208|  33.3k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 33.3k, False: 0]
  |  |  ------------------
  ------------------
  268|  33.3k|    PR_ASSERT(rwlock->rw_writer_locks > 0); /* lock must be write locked */
  ------------------
  |  |  208|  33.3k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 33.3k, False: 0]
  |  |  ------------------
  ------------------
  269|       |
  270|  33.3k|    if (rwlock->rw_owner == me &&         /* I own it, and            */
  ------------------
  |  Branch (270:9): [True: 33.3k, False: 0]
  ------------------
  271|  33.3k|        rwlock->rw_writer_locks > 0 &&    /* I own it, and            */
  ------------------
  |  Branch (271:9): [True: 33.3k, False: 0]
  ------------------
  272|  33.3k|        --rwlock->rw_writer_locks == 0) { /* I'm all done with it     */
  ------------------
  |  Branch (272:9): [True: 33.3k, False: 2]
  ------------------
  273|       |
  274|  33.3k|        rwlock->rw_owner = NULL; /* I don't own it any more. */
  275|       |
  276|       |        /* Give preference to waiting writers. */
  277|  33.3k|        if (rwlock->rw_waiting_writers > 0) {
  ------------------
  |  Branch (277:13): [True: 0, False: 33.3k]
  ------------------
  278|      0|            if (rwlock->rw_reader_locks == 0)
  ------------------
  |  Branch (278:17): [True: 0, False: 0]
  ------------------
  279|      0|                PZ_NotifyCondVar(rwlock->rw_writer_waitq);
  ------------------
  |  |  251|      0|#define PZ_NotifyCondVar(v) PR_NotifyCondVar((v))
  ------------------
  280|  33.3k|        } else if (rwlock->rw_waiting_readers > 0) {
  ------------------
  |  Branch (280:20): [True: 0, False: 33.3k]
  ------------------
  281|      0|            PZ_NotifyAllCondVar(rwlock->rw_reader_waitq);
  ------------------
  |  |  252|      0|#define PZ_NotifyAllCondVar(v) PR_NotifyAllCondVar((v))
  ------------------
  282|      0|        }
  283|  33.3k|    }
  284|  33.3k|    PZ_Unlock(rwlock->rw_lock);
  ------------------
  |  |  246|  33.3k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  285|       |
  286|       |#ifdef NSS_RWLOCK_RANK_ORDER_DEBUG
  287|       |    /*
  288|       |     * update thread's lock rank
  289|       |     */
  290|       |    nssRWLock_UnsetThreadRank(me, rwlock);
  291|       |#endif
  292|  33.3k|    return;
  293|  33.3k|}
NSSRWLock_HaveWriteLock_Util:
  298|  21.7k|{
  299|  21.7k|    PRBool ownWriteLock;
  300|  21.7k|    PRThread *me = PR_GetCurrentThread();
  301|       |
  302|       |/* This lock call isn't really necessary.
  303|       | ** If this thread is the owner, that fact cannot change during this call,
  304|       | ** because this thread is in this call.
  305|       | ** If this thread is NOT the owner, the owner could change, but it
  306|       | ** could not become this thread.
  307|       | */
  308|       |#if UNNECESSARY
  309|       |    PZ_Lock(rwlock->rw_lock);
  310|       |#endif
  311|  21.7k|    ownWriteLock = (PRBool)(me == rwlock->rw_owner);
  312|       |#if UNNECESSARY
  313|       |    PZ_Unlock(rwlock->rw_lock);
  314|       |#endif
  315|  21.7k|    return ownWriteLock;
  316|  21.7k|}

_SGN_VerifyPKCS1DigestInfo:
   95|      3|{
   96|      3|    SECOidData *hashOid;
   97|      3|    pkcs1Prefix prefix;
   98|      3|    SECStatus rv;
   99|       |
  100|      3|    if (!digest || !digest->data ||
  ------------------
  |  Branch (100:9): [True: 0, False: 3]
  |  Branch (100:20): [True: 0, False: 3]
  ------------------
  101|      3|        !dataRecoveredFromSignature || !dataRecoveredFromSignature->data) {
  ------------------
  |  Branch (101:9): [True: 0, False: 3]
  |  Branch (101:40): [True: 0, False: 3]
  ------------------
  102|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  103|      0|        return SECFailure;
  104|      0|    }
  105|       |
  106|      3|    hashOid = SECOID_FindOIDByTag(digestAlg);
  ------------------
  |  |  116|      3|#define SECOID_FindOIDByTag SECOID_FindOIDByTag_Util
  ------------------
  107|      3|    if (hashOid == NULL) {
  ------------------
  |  Branch (107:9): [True: 0, False: 3]
  ------------------
  108|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  109|      0|        return SECFailure;
  110|      0|    }
  111|       |
  112|      3|    prefix.data = NULL;
  113|       |
  114|      3|    rv = encodePrefix(hashOid, digest->len, &prefix, PR_TRUE);
  ------------------
  |  |  437|      3|#define PR_TRUE 1
  ------------------
  115|       |
  116|      3|    if (rv == SECSuccess) {
  ------------------
  |  Branch (116:9): [True: 3, False: 0]
  ------------------
  117|       |        /* We don't attempt to avoid timing attacks on these comparisons because
  118|       |         * signature verification is a public key operation, not a private key
  119|       |         * operation.
  120|       |         */
  121|       |
  122|      3|        if (dataRecoveredFromSignature->len != prefix.len + digest->len) {
  ------------------
  |  Branch (122:13): [True: 1, False: 2]
  ------------------
  123|      1|            PRBool lengthMismatch = PR_TRUE;
  ------------------
  |  |  437|      1|#define PR_TRUE 1
  ------------------
  124|       |#ifdef NSS_PKCS1_AllowMissingParameters
  125|       |            if (unsafeAllowMissingParameters) {
  126|       |                if (prefix.data) {
  127|       |                    PORT_Free(prefix.data);
  128|       |                    prefix.data = NULL;
  129|       |                }
  130|       |                rv = encodePrefix(hashOid, digest->len, &prefix, PR_FALSE);
  131|       |                if (rv != SECSuccess ||
  132|       |                    dataRecoveredFromSignature->len == prefix.len + digest->len) {
  133|       |                    lengthMismatch = PR_FALSE;
  134|       |                }
  135|       |            }
  136|       |#endif
  137|      1|            if (lengthMismatch) {
  ------------------
  |  Branch (137:17): [True: 1, False: 0]
  ------------------
  138|      1|                PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
  ------------------
  |  |   65|      1|#define PORT_SetError PORT_SetError_Util
  ------------------
  139|      1|                rv = SECFailure;
  140|      1|            }
  141|      1|        }
  142|      3|    }
  143|       |
  144|      3|    if (rv == SECSuccess) {
  ------------------
  |  Branch (144:9): [True: 2, False: 1]
  ------------------
  145|      2|        if (memcmp(dataRecoveredFromSignature->data, prefix.data, prefix.len) ||
  ------------------
  |  Branch (145:13): [True: 0, False: 2]
  ------------------
  146|      2|            memcmp(dataRecoveredFromSignature->data + prefix.len, digest->data,
  ------------------
  |  Branch (146:13): [True: 2, False: 0]
  ------------------
  147|      2|                   digest->len)) {
  148|      2|            PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
  ------------------
  |  |   65|      2|#define PORT_SetError PORT_SetError_Util
  ------------------
  149|      2|            rv = SECFailure;
  150|      2|        }
  151|      2|    }
  152|       |
  153|      3|    if (prefix.data) {
  ------------------
  |  Branch (153:9): [True: 3, False: 0]
  ------------------
  154|      3|        PORT_Free(prefix.data);
  ------------------
  |  |   60|      3|#define PORT_Free PORT_Free_Util
  ------------------
  155|      3|    }
  156|       |
  157|      3|    return rv;
  158|      3|}
pkcs1sig.c:encodePrefix:
   26|      3|{
   27|       |    /* with params coding is:
   28|       |     *  Sequence (2 bytes) {
   29|       |     *      Sequence (2 bytes) {
   30|       |     *               Oid (2 bytes)  {
   31|       |     *                   Oid value (derOid->oid.len)
   32|       |     *               }
   33|       |     *               NULL (2 bytes)
   34|       |     *      }
   35|       |     *      OCTECT (2 bytes);
   36|       |     *
   37|       |     * without params coding is:
   38|       |     *  Sequence (2 bytes) {
   39|       |     *      Sequence (2 bytes) {
   40|       |     *               Oid (2 bytes)  {
   41|       |     *                   Oid value (derOid->oid.len)
   42|       |     *               }
   43|       |     *      }
   44|       |     *      OCTECT (2 bytes);
   45|       |     */
   46|       |
   47|      3|    unsigned int innerSeqLen = 2 + hashOid->oid.len;
   48|      3|    unsigned int outerSeqLen = 2 + innerSeqLen + 2 + digestLen;
   49|      3|    unsigned int extra = 0;
   50|       |
   51|      3|    if (withParams) {
  ------------------
  |  Branch (51:9): [True: 3, False: 0]
  ------------------
   52|      3|        innerSeqLen += 2;
   53|      3|        outerSeqLen += 2;
   54|      3|        extra = 2;
   55|      3|    }
   56|       |
   57|      3|    if (innerSeqLen >= 128 ||
  ------------------
  |  Branch (57:9): [True: 0, False: 3]
  ------------------
   58|      3|        outerSeqLen >= 128 ||
  ------------------
  |  Branch (58:9): [True: 0, False: 3]
  ------------------
   59|      3|        (outerSeqLen + 2 - digestLen) >
  ------------------
  |  Branch (59:9): [True: 0, False: 3]
  ------------------
   60|      3|            (MAX_PREFIX_LEN_EXCLUDING_OID + hashOid->oid.len)) {
  ------------------
  |  |   21|      3|#define MAX_PREFIX_LEN_EXCLUDING_OID 10
  ------------------
   61|       |        /* this is actually a library failure, It shouldn't happen */
   62|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
   63|      0|        return SECFailure;
   64|      0|    }
   65|       |
   66|      3|    prefix->len = 6 + hashOid->oid.len + extra + 2;
   67|      3|    prefix->data = PORT_Alloc(prefix->len);
  ------------------
  |  |   52|      3|#define PORT_Alloc PORT_Alloc_Util
  ------------------
   68|      3|    if (!prefix->data) {
  ------------------
  |  Branch (68:9): [True: 0, False: 3]
  ------------------
   69|      0|        PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
   70|      0|        return SECFailure;
   71|      0|    }
   72|       |
   73|      3|    prefix->data[0] = SEC_ASN1_SEQUENCE | SEC_ASN1_CONSTRUCTED;
  ------------------
  |  |   92|      3|#define SEC_ASN1_SEQUENCE 0x10
  ------------------
                  prefix->data[0] = SEC_ASN1_SEQUENCE | SEC_ASN1_CONSTRUCTED;
  ------------------
  |  |  117|      3|#define SEC_ASN1_CONSTRUCTED 0x20
  ------------------
   74|      3|    prefix->data[1] = outerSeqLen;
   75|      3|    prefix->data[2] = SEC_ASN1_SEQUENCE | SEC_ASN1_CONSTRUCTED;
  ------------------
  |  |   92|      3|#define SEC_ASN1_SEQUENCE 0x10
  ------------------
                  prefix->data[2] = SEC_ASN1_SEQUENCE | SEC_ASN1_CONSTRUCTED;
  ------------------
  |  |  117|      3|#define SEC_ASN1_CONSTRUCTED 0x20
  ------------------
   76|      3|    prefix->data[3] = innerSeqLen;
   77|      3|    prefix->data[4] = SEC_ASN1_OBJECT_ID;
  ------------------
  |  |   82|      3|#define SEC_ASN1_OBJECT_ID 0x06
  ------------------
   78|      3|    prefix->data[5] = hashOid->oid.len;
   79|      3|    PORT_Memcpy(&prefix->data[6], hashOid->oid.data, hashOid->oid.len);
  ------------------
  |  |  180|      3|#define PORT_Memcpy memcpy
  ------------------
   80|      3|    if (withParams) {
  ------------------
  |  Branch (80:9): [True: 3, False: 0]
  ------------------
   81|      3|        prefix->data[6 + hashOid->oid.len] = SEC_ASN1_NULL;
  ------------------
  |  |   81|      3|#define SEC_ASN1_NULL 0x05
  ------------------
   82|      3|        prefix->data[6 + hashOid->oid.len + 1] = 0;
   83|      3|    }
   84|      3|    prefix->data[6 + hashOid->oid.len + extra] = SEC_ASN1_OCTET_STRING;
  ------------------
  |  |   80|      3|#define SEC_ASN1_OCTET_STRING 0x04
  ------------------
   85|      3|    prefix->data[6 + hashOid->oid.len + extra + 1] = digestLen;
   86|       |
   87|      3|    return SECSuccess;
   88|      3|}

SEC_QuickDERDecodeItem_Util:
  818|   100k|{
  819|   100k|    SECStatus rv = SECSuccess;
  820|   100k|    SECItem newsrc;
  821|       |
  822|   100k|    if (!arena || !templateEntry || !src) {
  ------------------
  |  Branch (822:9): [True: 0, False: 100k]
  |  Branch (822:19): [True: 0, False: 100k]
  |  Branch (822:37): [True: 0, False: 100k]
  ------------------
  823|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  824|      0|        rv = SECFailure;
  825|      0|    }
  826|       |
  827|   100k|    if (SECSuccess == rv) {
  ------------------
  |  Branch (827:9): [True: 100k, False: 0]
  ------------------
  828|   100k|        newsrc = *src;
  829|   100k|        rv = DecodeItem(dest, templateEntry, &newsrc, arena, PR_TRUE);
  ------------------
  |  |  437|   100k|#define PR_TRUE 1
  ------------------
  830|   100k|        if (SECSuccess == rv && newsrc.len) {
  ------------------
  |  Branch (830:13): [True: 95.2k, False: 5.16k]
  |  Branch (830:33): [True: 373, False: 94.9k]
  ------------------
  831|    373|            rv = SECFailure;
  832|    373|            PORT_SetError(SEC_ERROR_EXTRA_INPUT);
  ------------------
  |  |   65|    373|#define PORT_SetError PORT_SetError_Util
  ------------------
  833|    373|        }
  834|   100k|    }
  835|       |
  836|   100k|    return rv;
  837|   100k|}
quickder.c:DecodeItem:
  592|   673k|{
  593|   673k|    SECStatus rv = SECSuccess;
  594|   673k|    SECItem temp;
  595|   673k|    SECItem mark = { siBuffer, NULL, 0 };
  596|   673k|    PRBool pop = PR_FALSE;
  ------------------
  |  |  438|   673k|#define PR_FALSE 0
  ------------------
  597|   673k|    PRBool decode = PR_TRUE;
  ------------------
  |  |  437|   673k|#define PR_TRUE 1
  ------------------
  598|   673k|    PRBool save = PR_FALSE;
  ------------------
  |  |  438|   673k|#define PR_FALSE 0
  ------------------
  599|   673k|    unsigned long kind;
  600|   673k|    PRBool match = PR_TRUE;
  ------------------
  |  |  437|   673k|#define PR_TRUE 1
  ------------------
  601|       |
  602|   673k|    PR_ASSERT(src && dest && templateEntry && arena);
  ------------------
  |  |  208|  4.04M|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:7): [True: 673k, False: 0]
  |  |  |  Branch (208:7): [True: 673k, False: 0]
  |  |  |  Branch (208:7): [True: 673k, False: 0]
  |  |  |  Branch (208:7): [True: 673k, False: 0]
  |  |  ------------------
  ------------------
  603|       |#if 0
  604|       |    if (!src || !dest || !templateEntry || !arena)
  605|       |    {
  606|       |        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  607|       |        rv = SECFailure;
  608|       |    }
  609|       |#endif
  610|       |
  611|   673k|    if (SECSuccess == rv) {
  ------------------
  |  Branch (611:9): [True: 673k, False: 0]
  ------------------
  612|       |        /* do the template validation */
  613|   673k|        kind = templateEntry->kind;
  614|   673k|        if (!kind) {
  ------------------
  |  Branch (614:13): [True: 0, False: 673k]
  ------------------
  615|      0|            PORT_SetError(SEC_ERROR_BAD_TEMPLATE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  616|      0|            rv = SECFailure;
  617|      0|        }
  618|   673k|    }
  619|       |
  620|   673k|    if (SECSuccess == rv) {
  ------------------
  |  Branch (620:9): [True: 673k, False: 0]
  ------------------
  621|   673k|#ifdef DEBUG
  622|   673k|        if (kind & SEC_ASN1_DEBUG_BREAK) {
  ------------------
  |  |  160|   673k|#define SEC_ASN1_DEBUG_BREAK 0X400000 /* put this in your template and the \
  ------------------
  |  Branch (622:13): [True: 0, False: 673k]
  ------------------
  623|       |            /* when debugging the decoder or a template that fails to
  624|       |            decode, put SEC_ASN1_DEBUG in the component that gives you
  625|       |            trouble. The decoder will then get to this block and assert.
  626|       |            If you want to debug the rest of the code, you can set a
  627|       |            breakpoint and set dontassert to PR_TRUE, which will let
  628|       |            you skip over the assert and continue the debugging session
  629|       |            past it. */
  630|      0|            PRBool dontassert = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  631|      0|            PR_ASSERT(dontassert); /* set bkpoint here & set dontassert*/
  ------------------
  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  632|      0|        }
  633|   673k|#endif
  634|       |
  635|   673k|        if ((kind & SEC_ASN1_SKIP) ||
  ------------------
  |  |  140|   673k|#define SEC_ASN1_SKIP 0x08000         /* skip a field; only for decoding */
  ------------------
  |  Branch (635:13): [True: 46.1k, False: 627k]
  ------------------
  636|   673k|            (kind & SEC_ASN1_SAVE)) {
  ------------------
  |  |  144|   627k|#define SEC_ASN1_SAVE 0x20000         /* stash away the encoded bytes first; \
  ------------------
  |  Branch (636:13): [True: 20.7k, False: 606k]
  ------------------
  637|       |            /* if skipping or saving this component, don't decode it */
  638|  66.8k|            decode = PR_FALSE;
  ------------------
  |  |  438|  66.8k|#define PR_FALSE 0
  ------------------
  639|  66.8k|        }
  640|       |
  641|   673k|        if (kind & (SEC_ASN1_SAVE | SEC_ASN1_OPTIONAL)) {
  ------------------
  |  |  144|   673k|#define SEC_ASN1_SAVE 0x20000         /* stash away the encoded bytes first; \
  ------------------
                      if (kind & (SEC_ASN1_SAVE | SEC_ASN1_OPTIONAL)) {
  ------------------
  |  |  131|   673k|#define SEC_ASN1_OPTIONAL 0x00100
  ------------------
  |  Branch (641:13): [True: 125k, False: 547k]
  ------------------
  642|       |            /* if saving this component, or if it is optional, we may not want to
  643|       |               move past it, so save the position in case we have to rewind */
  644|   125k|            mark = *src;
  645|   125k|            if (kind & SEC_ASN1_SAVE) {
  ------------------
  |  |  144|   125k|#define SEC_ASN1_SAVE 0x20000         /* stash away the encoded bytes first; \
  ------------------
  |  Branch (645:17): [True: 20.7k, False: 105k]
  ------------------
  646|  20.7k|                save = PR_TRUE;
  ------------------
  |  |  437|  20.7k|#define PR_TRUE 1
  ------------------
  647|  20.7k|                if (0 == (kind & SEC_ASN1_SKIP)) {
  ------------------
  |  |  140|  20.7k|#define SEC_ASN1_SKIP 0x08000         /* skip a field; only for decoding */
  ------------------
  |  Branch (647:21): [True: 20.7k, False: 0]
  ------------------
  648|       |                    /* we will for sure have to rewind when saving this
  649|       |                       component and not skipping it. This is true for all
  650|       |                       legacy uses of SEC_ASN1_SAVE where the following entry
  651|       |                       in the template would causes the same component to be
  652|       |                       processed again */
  653|  20.7k|                    pop = PR_TRUE;
  ------------------
  |  |  437|  20.7k|#define PR_TRUE 1
  ------------------
  654|  20.7k|                }
  655|  20.7k|            }
  656|   125k|        }
  657|       |
  658|   673k|        rv = GetItem(src, &temp, PR_TRUE);
  ------------------
  |  |  437|   673k|#define PR_TRUE 1
  ------------------
  659|   673k|    }
  660|       |
  661|   673k|    if (SECSuccess == rv) {
  ------------------
  |  Branch (661:9): [True: 672k, False: 1.74k]
  ------------------
  662|       |        /* now check if the component matches what we expect in the template */
  663|       |
  664|   672k|        if (PR_TRUE == checkTag)
  ------------------
  |  |  437|   672k|#define PR_TRUE 1
  ------------------
  |  Branch (664:13): [True: 672k, False: 44]
  ------------------
  665|       |
  666|   672k|        {
  667|   672k|            rv = MatchComponentType(templateEntry, &temp, &match, dest);
  668|   672k|        }
  669|       |
  670|   672k|        if ((SECSuccess == rv) && (PR_TRUE != match)) {
  ------------------
  |  |  437|   672k|#define PR_TRUE 1
  ------------------
  |  Branch (670:13): [True: 672k, False: 0]
  |  Branch (670:35): [True: 51.1k, False: 620k]
  ------------------
  671|  51.1k|            if (kind & SEC_ASN1_OPTIONAL) {
  ------------------
  |  |  131|  51.1k|#define SEC_ASN1_OPTIONAL 0x00100
  ------------------
  |  Branch (671:17): [True: 47.8k, False: 3.26k]
  ------------------
  672|       |
  673|       |                /* the optional component is missing. This is not fatal. */
  674|       |                /* Rewind, don't decode, and don't save */
  675|  47.8k|                pop = PR_TRUE;
  ------------------
  |  |  437|  47.8k|#define PR_TRUE 1
  ------------------
  676|  47.8k|                decode = PR_FALSE;
  ------------------
  |  |  438|  47.8k|#define PR_FALSE 0
  ------------------
  677|  47.8k|                save = PR_FALSE;
  ------------------
  |  |  438|  47.8k|#define PR_FALSE 0
  ------------------
  678|  47.8k|            } else {
  679|       |                /* a required component is missing. abort */
  680|  3.26k|                PORT_SetError(SEC_ERROR_BAD_DER);
  ------------------
  |  |   65|  3.26k|#define PORT_SetError PORT_SetError_Util
  ------------------
  681|  3.26k|                rv = SECFailure;
  682|  3.26k|            }
  683|  51.1k|        }
  684|   672k|    }
  685|       |
  686|   673k|    if ((SECSuccess == rv) && (PR_TRUE == decode)) {
  ------------------
  |  |  437|   668k|#define PR_TRUE 1
  ------------------
  |  Branch (686:9): [True: 668k, False: 5.00k]
  |  Branch (686:31): [True: 554k, False: 114k]
  ------------------
  687|       |        /* the order of processing here is is the tricky part */
  688|       |        /* we start with our special cases */
  689|       |        /* first, check the component class */
  690|   554k|        if (kind & SEC_ASN1_INLINE) {
  ------------------
  |  |  134|   554k|#define SEC_ASN1_INLINE 0x00800
  ------------------
  |  Branch (690:13): [True: 77.5k, False: 476k]
  ------------------
  691|       |            /* decode inline template */
  692|  77.5k|            rv = DecodeInline(dest, templateEntry, &temp, arena, PR_TRUE);
  ------------------
  |  |  437|  77.5k|#define PR_TRUE 1
  ------------------
  693|  77.5k|        }
  694|       |
  695|   476k|        else if (kind & SEC_ASN1_EXPLICIT) {
  ------------------
  |  |  132|   476k|#define SEC_ASN1_EXPLICIT 0x00200
  ------------------
  |  Branch (695:18): [True: 35.9k, False: 440k]
  ------------------
  696|  35.9k|            rv = DecodeExplicit(dest, templateEntry, &temp, arena);
  697|   440k|        } else if ((SEC_ASN1_UNIVERSAL != (kind & SEC_ASN1_CLASS_MASK)) &&
  ------------------
  |  |  120|   440k|#define SEC_ASN1_UNIVERSAL 0x00
  ------------------
                      } else if ((SEC_ASN1_UNIVERSAL != (kind & SEC_ASN1_CLASS_MASK)) &&
  ------------------
  |  |  119|   440k|#define SEC_ASN1_CLASS_MASK 0xc0
  ------------------
  |  Branch (697:20): [True: 44, False: 440k]
  ------------------
  698|       |
  699|   440k|                   (!(kind & SEC_ASN1_EXPLICIT))) {
  ------------------
  |  |  132|     44|#define SEC_ASN1_EXPLICIT 0x00200
  ------------------
  |  Branch (699:20): [True: 44, False: 0]
  ------------------
  700|       |
  701|       |            /* decode implicitly tagged components */
  702|     44|            rv = DecodeImplicit(dest, templateEntry, &temp, arena);
  703|   440k|        } else if (kind & SEC_ASN1_POINTER) {
  ------------------
  |  |  135|   440k|#define SEC_ASN1_POINTER 0x01000
  ------------------
  |  Branch (703:20): [True: 17, False: 440k]
  ------------------
  704|     17|            rv = DecodePointer(dest, templateEntry, &temp, arena, PR_TRUE);
  ------------------
  |  |  437|     17|#define PR_TRUE 1
  ------------------
  705|   440k|        } else if (kind & SEC_ASN1_CHOICE) {
  ------------------
  |  |  153|   440k|#define SEC_ASN1_CHOICE 0x100000      /* pick one from a template */
  ------------------
  |  Branch (705:20): [True: 10.3k, False: 430k]
  ------------------
  706|  10.3k|            rv = DecodeChoice(dest, templateEntry, &temp, arena);
  707|   430k|        } else if (kind & SEC_ASN1_ANY) {
  ------------------
  |  |  133|   430k|#define SEC_ASN1_ANY 0x00400
  ------------------
  |  Branch (707:20): [True: 82.7k, False: 347k]
  ------------------
  708|       |            /* catch-all ANY type, don't decode */
  709|  82.7k|            save = PR_TRUE;
  ------------------
  |  |  437|  82.7k|#define PR_TRUE 1
  ------------------
  710|  82.7k|            if (kind & SEC_ASN1_INNER) {
  ------------------
  |  |  141|  82.7k|#define SEC_ASN1_INNER 0x10000        /* with ANY means capture the      \
  ------------------
  |  Branch (710:17): [True: 0, False: 82.7k]
  ------------------
  711|       |                /* skip the tag and length */
  712|      0|                SECItem newtemp = temp;
  713|      0|                rv = GetItem(&newtemp, &temp, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  714|      0|            }
  715|   347k|        } else if (kind & SEC_ASN1_GROUP) {
  ------------------
  |  |  136|   347k|#define SEC_ASN1_GROUP 0x02000        /* with SET or SEQUENCE means \
  ------------------
  |  Branch (715:20): [True: 26.3k, False: 321k]
  ------------------
  716|  26.3k|            if ((SEC_ASN1_SEQUENCE == (kind & SEC_ASN1_TAGNUM_MASK)) ||
  ------------------
  |  |   92|  26.3k|#define SEC_ASN1_SEQUENCE 0x10
  ------------------
                          if ((SEC_ASN1_SEQUENCE == (kind & SEC_ASN1_TAGNUM_MASK)) ||
  ------------------
  |  |   76|  26.3k|#define SEC_ASN1_TAGNUM_MASK 0x1f
  ------------------
  |  Branch (716:17): [True: 15.7k, False: 10.5k]
  ------------------
  717|  26.3k|                (SEC_ASN1_SET == (kind & SEC_ASN1_TAGNUM_MASK))) {
  ------------------
  |  |   93|  10.5k|#define SEC_ASN1_SET 0x11
  ------------------
                              (SEC_ASN1_SET == (kind & SEC_ASN1_TAGNUM_MASK))) {
  ------------------
  |  |   76|  10.5k|#define SEC_ASN1_TAGNUM_MASK 0x1f
  ------------------
  |  Branch (717:17): [True: 10.5k, False: 0]
  ------------------
  718|  26.3k|                rv = DecodeGroup(dest, templateEntry, &temp, arena);
  719|  26.3k|            } else {
  720|       |                /* a group can only be a SET OF or SEQUENCE OF */
  721|      0|                PORT_SetError(SEC_ERROR_BAD_TEMPLATE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  722|      0|                rv = SECFailure;
  723|      0|            }
  724|   321k|        } else if (SEC_ASN1_SEQUENCE == (kind & SEC_ASN1_TAGNUM_MASK)) {
  ------------------
  |  |   92|   321k|#define SEC_ASN1_SEQUENCE 0x10
  ------------------
                      } else if (SEC_ASN1_SEQUENCE == (kind & SEC_ASN1_TAGNUM_MASK)) {
  ------------------
  |  |   76|   321k|#define SEC_ASN1_TAGNUM_MASK 0x1f
  ------------------
  |  Branch (724:20): [True: 146k, False: 174k]
  ------------------
  725|       |            /* plain SEQUENCE */
  726|   146k|            rv = DecodeSequence(dest, templateEntry, &temp, arena);
  727|   174k|        } else {
  728|       |            /* handle all other types as "save" */
  729|       |            /* we should only get here for primitive universal types */
  730|   174k|            SECItem newtemp = temp;
  731|   174k|            rv = GetItem(&newtemp, &temp, PR_FALSE);
  ------------------
  |  |  438|   174k|#define PR_FALSE 0
  ------------------
  732|   174k|            save = PR_TRUE;
  ------------------
  |  |  437|   174k|#define PR_TRUE 1
  ------------------
  733|   174k|            if ((SECSuccess == rv) &&
  ------------------
  |  Branch (733:17): [True: 174k, False: 0]
  ------------------
  734|   174k|                SEC_ASN1_UNIVERSAL == (kind & SEC_ASN1_CLASS_MASK)) {
  ------------------
  |  |  120|   174k|#define SEC_ASN1_UNIVERSAL 0x00
  ------------------
                              SEC_ASN1_UNIVERSAL == (kind & SEC_ASN1_CLASS_MASK)) {
  ------------------
  |  |  119|   174k|#define SEC_ASN1_CLASS_MASK 0xc0
  ------------------
  |  Branch (734:17): [True: 174k, False: 0]
  ------------------
  735|   174k|                unsigned long tagnum = kind & SEC_ASN1_TAGNUM_MASK;
  ------------------
  |  |   76|   174k|#define SEC_ASN1_TAGNUM_MASK 0x1f
  ------------------
  736|   174k|                if (temp.len == 0 && (tagnum == SEC_ASN1_BOOLEAN ||
  ------------------
  |  |   77|    174|#define SEC_ASN1_BOOLEAN 0x01
  ------------------
  |  Branch (736:21): [True: 87, False: 174k]
  |  Branch (736:39): [True: 3, False: 84]
  ------------------
  737|     87|                                      tagnum == SEC_ASN1_INTEGER ||
  ------------------
  |  |   78|    171|#define SEC_ASN1_INTEGER 0x02
  ------------------
  |  Branch (737:39): [True: 6, False: 78]
  ------------------
  738|     87|                                      tagnum == SEC_ASN1_BIT_STRING ||
  ------------------
  |  |   79|    165|#define SEC_ASN1_BIT_STRING 0x03
  ------------------
  |  Branch (738:39): [True: 10, False: 68]
  ------------------
  739|     87|                                      tagnum == SEC_ASN1_OBJECT_ID ||
  ------------------
  |  |   82|    155|#define SEC_ASN1_OBJECT_ID 0x06
  ------------------
  |  Branch (739:39): [True: 6, False: 62]
  ------------------
  740|     87|                                      tagnum == SEC_ASN1_ENUMERATED ||
  ------------------
  |  |   86|    149|#define SEC_ASN1_ENUMERATED 0x0a
  ------------------
  |  Branch (740:39): [True: 0, False: 62]
  ------------------
  741|     87|                                      tagnum == SEC_ASN1_UTC_TIME ||
  ------------------
  |  |   99|    149|#define SEC_ASN1_UTC_TIME 0x17
  ------------------
  |  Branch (741:39): [True: 1, False: 61]
  ------------------
  742|     87|                                      tagnum == SEC_ASN1_GENERALIZED_TIME)) {
  ------------------
  |  |  100|     61|#define SEC_ASN1_GENERALIZED_TIME 0x18
  ------------------
  |  Branch (742:39): [True: 1, False: 60]
  ------------------
  743|       |                    /* these types MUST have at least one content octet */
  744|     27|                    PORT_SetError(SEC_ERROR_BAD_DER);
  ------------------
  |  |   65|     27|#define PORT_SetError PORT_SetError_Util
  ------------------
  745|     27|                    rv = SECFailure;
  746|     27|                } else
  747|   174k|                    switch (tagnum) {
  748|       |                        /* special cases of primitive types */
  749|  32.2k|                        case SEC_ASN1_INTEGER: {
  ------------------
  |  |   78|  32.2k|#define SEC_ASN1_INTEGER 0x02
  ------------------
  |  Branch (749:25): [True: 32.2k, False: 142k]
  ------------------
  750|  32.2k|                            SECItem* destItem = (SECItem*)((char*)dest +
  751|  32.2k|                                                           templateEntry->offset);
  752|  32.2k|                            if (destItem && (siUnsignedInteger == destItem->type)) {
  ------------------
  |  Branch (752:33): [True: 32.2k, False: 0]
  |  Branch (752:45): [True: 21.7k, False: 10.4k]
  ------------------
  753|       |                                /* A leading 0 is only allowed when a value
  754|       |                                 * would otherwise be interpreted as negative. */
  755|  21.7k|                                if (temp.len > 1 && temp.data[0] == 0) {
  ------------------
  |  Branch (755:37): [True: 21.6k, False: 97]
  |  Branch (755:53): [True: 8.02k, False: 13.6k]
  ------------------
  756|  8.02k|                                    temp.data++;
  757|  8.02k|                                    temp.len--;
  758|  8.02k|                                    if (!(temp.data[0] & 0x80)) {
  ------------------
  |  Branch (758:41): [True: 3, False: 8.02k]
  ------------------
  759|      3|                                        PORT_SetError(SEC_ERROR_BAD_DER);
  ------------------
  |  |   65|      3|#define PORT_SetError PORT_SetError_Util
  ------------------
  760|      3|                                        rv = SECFailure;
  761|      3|                                    }
  762|  8.02k|                                }
  763|  21.7k|                            }
  764|  32.2k|                            break;
  765|      0|                        }
  766|       |
  767|  38.4k|                        case SEC_ASN1_BIT_STRING: {
  ------------------
  |  |   79|  38.4k|#define SEC_ASN1_BIT_STRING 0x03
  ------------------
  |  Branch (767:25): [True: 38.4k, False: 135k]
  ------------------
  768|       |                            /* Can't be 8 or more spare bits, or any spare bits
  769|       |                             * if there are no octets. */
  770|  38.4k|                            if (temp.data[0] >= 8 || (temp.data[0] > 0 && temp.len == 1)) {
  ------------------
  |  Branch (770:33): [True: 31, False: 38.4k]
  |  Branch (770:55): [True: 7.12k, False: 31.2k]
  |  Branch (770:75): [True: 21, False: 7.10k]
  ------------------
  771|     52|                                PORT_SetError(SEC_ERROR_BAD_DER);
  ------------------
  |  |   65|     52|#define PORT_SetError PORT_SetError_Util
  ------------------
  772|     52|                                rv = SECFailure;
  773|     52|                                break;
  774|     52|                            }
  775|       |                            /* change the length in the SECItem to be the number
  776|       |                               of bits */
  777|  38.3k|                            temp.len = (temp.len - 1) * 8 - (temp.data[0] & 0x7);
  778|  38.3k|                            temp.data++;
  779|  38.3k|                            break;
  780|  38.4k|                        }
  781|       |
  782|   103k|                        default: {
  ------------------
  |  Branch (782:25): [True: 103k, False: 70.6k]
  ------------------
  783|   103k|                            break;
  784|  38.4k|                        }
  785|   174k|                    }
  786|   174k|            }
  787|   174k|        }
  788|   554k|    }
  789|       |
  790|   673k|    if ((SECSuccess == rv) && (PR_TRUE == save)) {
  ------------------
  |  |  437|   667k|#define PR_TRUE 1
  ------------------
  |  Branch (790:9): [True: 667k, False: 6.76k]
  |  Branch (790:31): [True: 277k, False: 389k]
  ------------------
  791|   277k|        SECItem* destItem = (SECItem*)((char*)dest + templateEntry->offset);
  792|   277k|        if (destItem) {
  ------------------
  |  Branch (792:13): [True: 277k, False: 0]
  ------------------
  793|       |            /* we leave the type alone in the destination SECItem.
  794|       |               If part of the destination was allocated by the decoder, in
  795|       |               cases of POINTER, SET OF and SEQUENCE OF, then type is set to
  796|       |               siBuffer due to the use of PORT_ArenaZAlloc*/
  797|   277k|            destItem->data = temp.len ? temp.data : NULL;
  ------------------
  |  Branch (797:30): [True: 277k, False: 425]
  ------------------
  798|   277k|            destItem->len = temp.len;
  799|   277k|        } else {
  800|      0|            PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  801|      0|            rv = SECFailure;
  802|      0|        }
  803|   277k|    }
  804|       |
  805|   673k|    if (PR_TRUE == pop) {
  ------------------
  |  |  437|   673k|#define PR_TRUE 1
  ------------------
  |  Branch (805:9): [True: 68.6k, False: 605k]
  ------------------
  806|       |        /* we don't want to move ahead, so restore the position */
  807|  68.6k|        *src = mark;
  808|  68.6k|    }
  809|   673k|    return rv;
  810|   673k|}
quickder.c:GetItem:
  115|  1.09M|{
  116|  1.09M|    if ((!src) || (!dest) || (!src->data && src->len)) {
  ------------------
  |  Branch (116:9): [True: 0, False: 1.09M]
  |  Branch (116:19): [True: 0, False: 1.09M]
  |  Branch (116:31): [True: 4, False: 1.09M]
  |  Branch (116:45): [True: 0, False: 4]
  ------------------
  117|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  118|      0|        return SECFailure;
  119|      0|    }
  120|       |
  121|  1.09M|    if (!src->len) {
  ------------------
  |  Branch (121:9): [True: 28.0k, False: 1.06M]
  ------------------
  122|       |        /* reaching the end of the buffer is not an error */
  123|  28.0k|        dest->data = NULL;
  124|  28.0k|        dest->len = 0;
  125|  28.0k|        return SECSuccess;
  126|  28.0k|    }
  127|       |
  128|  1.06M|    dest->data = definite_length_decoder(src->data, src->len, &dest->len,
  129|  1.06M|                                         includeTag);
  130|  1.06M|    if (dest->data == NULL) {
  ------------------
  |  Branch (130:9): [True: 1.81k, False: 1.06M]
  ------------------
  131|  1.81k|        PORT_SetError(SEC_ERROR_BAD_DER);
  ------------------
  |  |   65|  1.81k|#define PORT_SetError PORT_SetError_Util
  ------------------
  132|  1.81k|        return SECFailure;
  133|  1.81k|    }
  134|  1.06M|    src->len -= (int)(dest->data - src->data) + dest->len;
  135|  1.06M|    src->data = dest->data + dest->len;
  136|  1.06M|    return SECSuccess;
  137|  1.06M|}
quickder.c:definite_length_decoder:
   22|  1.06M|{
   23|  1.06M|    unsigned char tag;
   24|  1.06M|    unsigned int used_length = 0;
   25|  1.06M|    unsigned int data_length = 0;
   26|  1.06M|    unsigned char length_field_len = 0;
   27|  1.06M|    unsigned char byte;
   28|  1.06M|    unsigned int i;
   29|       |
   30|  1.06M|    if (used_length >= buf_length) {
  ------------------
  |  Branch (30:9): [True: 0, False: 1.06M]
  ------------------
   31|       |        /* Tag field was not found! */
   32|      0|        return NULL;
   33|      0|    }
   34|  1.06M|    tag = buf[used_length++];
   35|       |
   36|  1.06M|    if (tag == 0) {
  ------------------
  |  Branch (36:9): [True: 474, False: 1.06M]
  ------------------
   37|       |        /* End-of-contents octects should not be present in DER because
   38|       |           DER doesn't use the indefinite length form. */
   39|    474|        return NULL;
   40|    474|    }
   41|       |
   42|  1.06M|    if ((tag & 0x1F) == 0x1F) {
  ------------------
  |  Branch (42:9): [True: 28, False: 1.06M]
  ------------------
   43|       |        /* High tag number (a tag number > 30) is not supported */
   44|     28|        return NULL;
   45|     28|    }
   46|       |
   47|  1.06M|    if (used_length >= buf_length) {
  ------------------
  |  Branch (47:9): [True: 20, False: 1.06M]
  ------------------
   48|       |        /* Length field was not found! */
   49|     20|        return NULL;
   50|     20|    }
   51|  1.06M|    byte = buf[used_length++];
   52|       |
   53|  1.06M|    if (!(byte & 0x80)) {
  ------------------
  |  Branch (53:9): [True: 794k, False: 269k]
  ------------------
   54|       |        /* Short form: The high bit is not set. */
   55|   794k|        data_length = byte; /* clarity; we're returning a 32-bit int. */
   56|   794k|    } else {
   57|       |        /* Long form. Extract the field length */
   58|   269k|        length_field_len = byte & 0x7F;
   59|   269k|        if (length_field_len == 0) {
  ------------------
  |  Branch (59:13): [True: 10, False: 269k]
  ------------------
   60|       |            /* DER doesn't use the indefinite length form. */
   61|     10|            return NULL;
   62|     10|        }
   63|       |
   64|   269k|        if (length_field_len > sizeof(data_length)) {
  ------------------
  |  Branch (64:13): [True: 89, False: 269k]
  ------------------
   65|       |            /* We don't support an extended length field  longer than
   66|       |               4 bytes (2^32) */
   67|     89|            return NULL;
   68|     89|        }
   69|       |
   70|   269k|        if (length_field_len > (buf_length - used_length)) {
  ------------------
  |  Branch (70:13): [True: 8, False: 269k]
  ------------------
   71|       |            /* Extended length field was not found */
   72|      8|            return NULL;
   73|      8|        }
   74|       |
   75|       |        /* Iterate across the extended length field */
   76|   707k|        for (i = 0; i < length_field_len; i++) {
  ------------------
  |  Branch (76:21): [True: 438k, False: 269k]
  ------------------
   77|   438k|            byte = buf[used_length++];
   78|   438k|            data_length = (data_length << 8) | byte;
   79|       |
   80|   438k|            if (i == 0) {
  ------------------
  |  Branch (80:17): [True: 269k, False: 169k]
  ------------------
   81|   269k|                PRBool too_long = PR_FALSE;
  ------------------
  |  |  438|   269k|#define PR_FALSE 0
  ------------------
   82|   269k|                if (length_field_len == 1) {
  ------------------
  |  Branch (82:21): [True: 99.6k, False: 169k]
  ------------------
   83|  99.6k|                    too_long = ((byte & 0x80) == 0); /* Short form suffices */
   84|   169k|                } else {
   85|   169k|                    too_long = (byte == 0); /* This zero byte can be omitted */
   86|   169k|                }
   87|   269k|                if (too_long) {
  ------------------
  |  Branch (87:21): [True: 13, False: 269k]
  ------------------
   88|       |                    /* The length is longer than needed. */
   89|     13|                    return NULL;
   90|     13|                }
   91|   269k|            }
   92|   438k|        }
   93|   269k|    }
   94|       |
   95|  1.06M|    if ((tag & SEC_ASN1_TAGNUM_MASK) == SEC_ASN1_NULL && data_length != 0) {
  ------------------
  |  |   76|  1.06M|#define SEC_ASN1_TAGNUM_MASK 0x1f
  ------------------
                  if ((tag & SEC_ASN1_TAGNUM_MASK) == SEC_ASN1_NULL && data_length != 0) {
  ------------------
  |  |   81|  2.12M|#define SEC_ASN1_NULL 0x05
  ------------------
  |  Branch (95:9): [True: 14.0k, False: 1.04M]
  |  Branch (95:58): [True: 66, False: 14.0k]
  ------------------
   96|       |        /* The DER encoding of NULL has no contents octets */
   97|     66|        return NULL;
   98|     66|    }
   99|       |
  100|  1.06M|    if (data_length > (buf_length - used_length)) {
  ------------------
  |  Branch (100:9): [True: 1.10k, False: 1.06M]
  ------------------
  101|       |        /* The decoded length exceeds the available buffer */
  102|  1.10k|        return NULL;
  103|  1.10k|    }
  104|       |
  105|  1.06M|    if (includeTag) {
  ------------------
  |  Branch (105:9): [True: 678k, False: 383k]
  ------------------
  106|   678k|        data_length += used_length;
  107|   678k|    }
  108|       |
  109|  1.06M|    *out_data_length = data_length;
  110|  1.06M|    return ((unsigned char*)buf + (includeTag ? 0 : used_length));
  ------------------
  |  Branch (110:36): [True: 678k, False: 383k]
  ------------------
  111|  1.06M|}
quickder.c:MatchComponentType:
  144|   682k|{
  145|   682k|    unsigned long kind = 0;
  146|   682k|    unsigned char tag = 0;
  147|       |
  148|   682k|    if ((!item) || (!item->data && item->len) || (!templateEntry) || (!match)) {
  ------------------
  |  Branch (148:9): [True: 0, False: 682k]
  |  Branch (148:21): [True: 27.7k, False: 654k]
  |  Branch (148:36): [True: 0, False: 27.7k]
  |  Branch (148:50): [True: 0, False: 682k]
  |  Branch (148:70): [True: 0, False: 682k]
  ------------------
  149|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  150|      0|        return SECFailure;
  151|      0|    }
  152|       |
  153|   682k|    if (!item->len) {
  ------------------
  |  Branch (153:9): [True: 27.7k, False: 654k]
  ------------------
  154|  27.7k|        *match = PR_FALSE;
  ------------------
  |  |  438|  27.7k|#define PR_FALSE 0
  ------------------
  155|  27.7k|        return SECSuccess;
  156|  27.7k|    }
  157|       |
  158|   654k|    kind = templateEntry->kind;
  159|   654k|    tag = *(unsigned char*)item->data;
  160|       |
  161|   654k|    if (((kind & SEC_ASN1_INLINE) ||
  ------------------
  |  |  134|   654k|#define SEC_ASN1_INLINE 0x00800
  ------------------
  |  Branch (161:10): [True: 77.5k, False: 577k]
  ------------------
  162|   654k|         (kind & SEC_ASN1_POINTER)) &&
  ------------------
  |  |  135|   577k|#define SEC_ASN1_POINTER 0x01000
  ------------------
  |  Branch (162:10): [True: 17, False: 577k]
  ------------------
  163|   654k|        (0 == (kind & SEC_ASN1_TAG_MASK))) {
  ------------------
  |  |   65|  77.6k|#define SEC_ASN1_TAG_MASK 0xff
  ------------------
  |  Branch (163:9): [True: 77.6k, False: 0]
  ------------------
  164|       |        /* These cases are special because the template's "kind" does not
  165|       |           give us the information for the ASN.1 tag of the next item. It can
  166|       |           only be figured out from the subtemplate. */
  167|  77.6k|        if (!(kind & SEC_ASN1_OPTIONAL)) {
  ------------------
  |  |  131|  77.6k|#define SEC_ASN1_OPTIONAL 0x00100
  ------------------
  |  Branch (167:13): [True: 77.6k, False: 0]
  ------------------
  168|       |            /* This is a required component. If there is a type mismatch,
  169|       |               the decoding of the subtemplate will fail, so assume this
  170|       |               is a match at the parent level and let it fail later. This
  171|       |               avoids a redundant check in matching cases */
  172|  77.6k|            *match = PR_TRUE;
  ------------------
  |  |  437|  77.6k|#define PR_TRUE 1
  ------------------
  173|  77.6k|            return SECSuccess;
  174|  77.6k|        } else {
  175|       |            /* optional component. This is the hard case. Now we need to
  176|       |               look at the subtemplate to get the expected kind */
  177|      0|            const SEC_ASN1Template* subTemplate =
  178|      0|                SEC_ASN1GetSubtemplate(templateEntry, dest, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  179|      0|            if (!subTemplate) {
  ------------------
  |  Branch (179:17): [True: 0, False: 0]
  ------------------
  180|      0|                PORT_SetError(SEC_ERROR_BAD_TEMPLATE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  181|      0|                return SECFailure;
  182|      0|            }
  183|      0|            if ((subTemplate->kind & SEC_ASN1_INLINE) ||
  ------------------
  |  |  134|      0|#define SEC_ASN1_INLINE 0x00800
  ------------------
  |  Branch (183:17): [True: 0, False: 0]
  ------------------
  184|      0|                (subTemplate->kind & SEC_ASN1_POINTER)) {
  ------------------
  |  |  135|      0|#define SEC_ASN1_POINTER 0x01000
  ------------------
  |  Branch (184:17): [True: 0, False: 0]
  ------------------
  185|       |                /* disallow nesting SEC_ASN1_POINTER and SEC_ASN1_INLINE,
  186|       |                   otherwise you may get a false positive due to the recursion
  187|       |                   optimization above that always matches the type if the
  188|       |                   component is required . Nesting these should never be
  189|       |                   required, so that no one should miss this ability */
  190|      0|                PORT_SetError(SEC_ERROR_BAD_TEMPLATE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  191|      0|                return SECFailure;
  192|      0|            }
  193|      0|            return MatchComponentType(subTemplate, item, match,
  194|      0|                                      (void*)((char*)dest + templateEntry->offset));
  195|      0|        }
  196|  77.6k|    }
  197|       |
  198|   577k|    if (kind & SEC_ASN1_CHOICE) {
  ------------------
  |  |  153|   577k|#define SEC_ASN1_CHOICE 0x100000      /* pick one from a template */
  ------------------
  |  Branch (198:9): [True: 10.3k, False: 566k]
  ------------------
  199|       |        /* we need to check the component's tag against each choice's tag */
  200|       |        /* XXX it would be nice to save the index of the choice here so that
  201|       |           DecodeChoice wouldn't have to do this again. However, due to the
  202|       |           recursivity of MatchComponentType, we don't know if we are in a
  203|       |           required or optional component, so we can't write anywhere in
  204|       |           the destination within this function */
  205|  10.3k|        unsigned choiceIndex = 1;
  206|  10.3k|        const SEC_ASN1Template* choiceEntry;
  207|  10.4k|        while ((choiceEntry = &templateEntry[choiceIndex++]) && (choiceEntry->kind)) {
  ------------------
  |  Branch (207:16): [True: 10.4k, False: 0]
  |  Branch (207:65): [True: 10.4k, False: 4]
  ------------------
  208|  10.4k|            if ((SECSuccess == MatchComponentType(choiceEntry, item, match,
  ------------------
  |  Branch (208:17): [True: 10.4k, False: 0]
  ------------------
  209|  10.4k|                                                  (void*)((char*)dest + choiceEntry->offset))) &&
  210|  10.4k|                (PR_TRUE == *match)) {
  ------------------
  |  |  437|  10.4k|#define PR_TRUE 1
  ------------------
  |  Branch (210:17): [True: 10.3k, False: 58]
  ------------------
  211|  10.3k|                return SECSuccess;
  212|  10.3k|            }
  213|  10.4k|        }
  214|       |        /* no match, caller must decide if this is BAD DER, or not. */
  215|      4|        *match = PR_FALSE;
  ------------------
  |  |  438|      4|#define PR_FALSE 0
  ------------------
  216|      4|        return SECSuccess;
  217|  10.3k|    }
  218|       |
  219|   566k|    if (kind & SEC_ASN1_ANY) {
  ------------------
  |  |  133|   566k|#define SEC_ASN1_ANY 0x00400
  ------------------
  |  Branch (219:9): [True: 82.7k, False: 484k]
  ------------------
  220|       |        /* SEC_ASN1_ANY always matches */
  221|  82.7k|        *match = PR_TRUE;
  ------------------
  |  |  437|  82.7k|#define PR_TRUE 1
  ------------------
  222|  82.7k|        return SECSuccess;
  223|  82.7k|    }
  224|       |
  225|   484k|    if ((0 == ((unsigned char)kind & SEC_ASN1_TAGNUM_MASK)) &&
  ------------------
  |  |   76|   484k|#define SEC_ASN1_TAGNUM_MASK 0x1f
  ------------------
  |  Branch (225:9): [True: 97.7k, False: 386k]
  ------------------
  226|   484k|        (!(kind & SEC_ASN1_EXPLICIT)) &&
  ------------------
  |  |  132|  97.7k|#define SEC_ASN1_EXPLICIT 0x00200
  ------------------
  |  Branch (226:9): [True: 66.9k, False: 30.8k]
  ------------------
  227|   484k|        (((kind & SEC_ASN1_SAVE) ||
  ------------------
  |  |  144|  66.9k|#define SEC_ASN1_SAVE 0x20000         /* stash away the encoded bytes first; \
  ------------------
  |  Branch (227:11): [True: 20.7k, False: 46.1k]
  ------------------
  228|  66.9k|          (kind & SEC_ASN1_SKIP)) &&
  ------------------
  |  |  140|  46.1k|#define SEC_ASN1_SKIP 0x08000         /* skip a field; only for decoding */
  ------------------
  |  Branch (228:11): [True: 46.0k, False: 40]
  ------------------
  229|  66.9k|         (!(kind & SEC_ASN1_OPTIONAL)))) {
  ------------------
  |  |  131|  66.8k|#define SEC_ASN1_OPTIONAL 0x00100
  ------------------
  |  Branch (229:10): [True: 66.8k, False: 0]
  ------------------
  230|       |        /* when saving or skipping a required component,  a type is not
  231|       |           required in the template. This is for legacy support of
  232|       |           SEC_ASN1_SAVE and SEC_ASN1_SKIP only. XXX I would like to
  233|       |           deprecate these usages and always require a type, as this
  234|       |           disables type checking, and effectively forbids us from
  235|       |           transparently ignoring optional components we aren't aware of */
  236|  66.8k|        *match = PR_TRUE;
  ------------------
  |  |  437|  66.8k|#define PR_TRUE 1
  ------------------
  237|  66.8k|        return SECSuccess;
  238|  66.8k|    }
  239|       |
  240|       |    /* first, do a class check */
  241|   417k|    if ((tag & SEC_ASN1_CLASS_MASK) !=
  ------------------
  |  |  119|   417k|#define SEC_ASN1_CLASS_MASK 0xc0
  ------------------
  |  Branch (241:9): [True: 325, False: 416k]
  ------------------
  242|   417k|        (((unsigned char)kind) & SEC_ASN1_CLASS_MASK)) {
  ------------------
  |  |  119|   417k|#define SEC_ASN1_CLASS_MASK 0xc0
  ------------------
  243|       |        /* this is only to help debugging of the decoder in case of problems */
  244|       |        /* unsigned char tagclass = tag & SEC_ASN1_CLASS_MASK; */
  245|       |        /* unsigned char expectedclass = (unsigned char)kind & SEC_ASN1_CLASS_MASK; */
  246|    325|        *match = PR_FALSE;
  ------------------
  |  |  438|    325|#define PR_FALSE 0
  ------------------
  247|    325|        return SECSuccess;
  248|    325|    }
  249|       |
  250|       |    /* now do a tag check */
  251|   416k|    if (((unsigned char)kind & SEC_ASN1_TAGNUM_MASK) !=
  ------------------
  |  |   76|   416k|#define SEC_ASN1_TAGNUM_MASK 0x1f
  ------------------
  |  Branch (251:9): [True: 23.1k, False: 393k]
  ------------------
  252|   416k|        (tag & SEC_ASN1_TAGNUM_MASK)) {
  ------------------
  |  |   76|   416k|#define SEC_ASN1_TAGNUM_MASK 0x1f
  ------------------
  253|  23.1k|        *match = PR_FALSE;
  ------------------
  |  |  438|  23.1k|#define PR_FALSE 0
  ------------------
  254|  23.1k|        return SECSuccess;
  255|  23.1k|    }
  256|       |
  257|       |    /* now, do a method check. This depends on the class */
  258|   393k|    switch (tag & SEC_ASN1_CLASS_MASK) {
  ------------------
  |  |  119|   393k|#define SEC_ASN1_CLASS_MASK 0xc0
  ------------------
  259|   357k|        case SEC_ASN1_UNIVERSAL:
  ------------------
  |  |  120|   357k|#define SEC_ASN1_UNIVERSAL 0x00
  ------------------
  |  Branch (259:9): [True: 357k, False: 36.0k]
  ------------------
  260|       |            /* For types of the SEC_ASN1_UNIVERSAL class, we know which must be
  261|       |               primitive or constructed based on the tag */
  262|   357k|            switch (tag & SEC_ASN1_TAGNUM_MASK) {
  ------------------
  |  |   76|   357k|#define SEC_ASN1_TAGNUM_MASK 0x1f
  ------------------
  263|   162k|                case SEC_ASN1_SEQUENCE:
  ------------------
  |  |   92|   162k|#define SEC_ASN1_SEQUENCE 0x10
  ------------------
  |  Branch (263:17): [True: 162k, False: 195k]
  ------------------
  264|   172k|                case SEC_ASN1_SET:
  ------------------
  |  |   93|   172k|#define SEC_ASN1_SET 0x11
  ------------------
  |  Branch (264:17): [True: 10.5k, False: 347k]
  ------------------
  265|   172k|                case SEC_ASN1_EMBEDDED_PDV:
  ------------------
  |  |   87|   172k|#define SEC_ASN1_EMBEDDED_PDV 0x0b
  ------------------
  |  Branch (265:17): [True: 0, False: 357k]
  ------------------
  266|       |                    /* this component must be a constructed type */
  267|       |                    /* XXX add any new universal constructed type here */
  268|   172k|                    if (tag & SEC_ASN1_CONSTRUCTED) {
  ------------------
  |  |  117|   172k|#define SEC_ASN1_CONSTRUCTED 0x20
  ------------------
  |  Branch (268:25): [True: 172k, False: 11]
  ------------------
  269|   172k|                        *match = PR_TRUE;
  ------------------
  |  |  437|   172k|#define PR_TRUE 1
  ------------------
  270|   172k|                        return SECSuccess;
  271|   172k|                    }
  272|     11|                    break;
  273|       |
  274|   184k|                default:
  ------------------
  |  Branch (274:17): [True: 184k, False: 172k]
  ------------------
  275|       |                    /* this component must be a primitive type */
  276|   184k|                    if (!(tag & SEC_ASN1_CONSTRUCTED)) {
  ------------------
  |  |  117|   184k|#define SEC_ASN1_CONSTRUCTED 0x20
  ------------------
  |  Branch (276:25): [True: 184k, False: 47]
  ------------------
  277|   184k|                        *match = PR_TRUE;
  ------------------
  |  |  437|   184k|#define PR_TRUE 1
  ------------------
  278|   184k|                        return SECSuccess;
  279|   184k|                    }
  280|     47|                    break;
  281|   357k|            }
  282|     58|            break;
  283|       |
  284|  36.0k|        default:
  ------------------
  |  Branch (284:9): [True: 36.0k, False: 357k]
  ------------------
  285|       |            /* for all other classes, we check the method based on the template */
  286|  36.0k|            if ((unsigned char)(kind & SEC_ASN1_METHOD_MASK) ==
  ------------------
  |  |  115|  36.0k|#define SEC_ASN1_METHOD_MASK 0x20
  ------------------
  |  Branch (286:17): [True: 35.9k, False: 10]
  ------------------
  287|  36.0k|                (tag & SEC_ASN1_METHOD_MASK)) {
  ------------------
  |  |  115|  36.0k|#define SEC_ASN1_METHOD_MASK 0x20
  ------------------
  288|  35.9k|                *match = PR_TRUE;
  ------------------
  |  |  437|  35.9k|#define PR_TRUE 1
  ------------------
  289|  35.9k|                return SECSuccess;
  290|  35.9k|            }
  291|       |            /* method does not match between template and component */
  292|     10|            break;
  293|   393k|    }
  294|       |
  295|     68|    *match = PR_FALSE;
  ------------------
  |  |  438|     68|#define PR_FALSE 0
  ------------------
  296|     68|    return SECSuccess;
  297|   393k|}
quickder.c:DecodeInline:
  402|   113k|{
  403|   113k|    const SEC_ASN1Template* inlineTemplate =
  404|   113k|        SEC_ASN1GetSubtemplate(templateEntry, dest, PR_FALSE);
  ------------------
  |  |  438|   113k|#define PR_FALSE 0
  ------------------
  405|   113k|    return DecodeItem((void*)((char*)dest + templateEntry->offset),
  406|   113k|                      inlineTemplate, src, arena, checkTag);
  407|   113k|}
quickder.c:DecodeExplicit:
  568|  35.9k|{
  569|  35.9k|    SECStatus rv = SECSuccess;
  570|  35.9k|    SECItem subItem;
  571|  35.9k|    SECItem constructed = *src;
  572|       |
  573|  35.9k|    rv = GetItem(&constructed, &subItem, PR_FALSE);
  ------------------
  |  |  438|  35.9k|#define PR_FALSE 0
  ------------------
  574|       |
  575|  35.9k|    if (SECSuccess == rv) {
  ------------------
  |  Branch (575:9): [True: 35.9k, False: 0]
  ------------------
  576|  35.9k|        if (templateEntry->kind & SEC_ASN1_POINTER) {
  ------------------
  |  |  135|  35.9k|#define SEC_ASN1_POINTER 0x01000
  ------------------
  |  Branch (576:13): [True: 0, False: 35.9k]
  ------------------
  577|      0|            rv = DecodePointer(dest, templateEntry, &subItem, arena, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  578|  35.9k|        } else {
  579|  35.9k|            rv = DecodeInline(dest, templateEntry, &subItem, arena, PR_TRUE);
  ------------------
  |  |  437|  35.9k|#define PR_TRUE 1
  ------------------
  580|  35.9k|        }
  581|  35.9k|    }
  582|       |
  583|  35.9k|    return rv;
  584|  35.9k|}
quickder.c:DecodeImplicit:
  434|     44|{
  435|     44|    if (templateEntry->kind & SEC_ASN1_POINTER) {
  ------------------
  |  |  135|     44|#define SEC_ASN1_POINTER 0x01000
  ------------------
  |  Branch (435:9): [True: 0, False: 44]
  ------------------
  436|      0|        return DecodePointer((void*)((char*)dest),
  437|      0|                             templateEntry, src, arena, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  438|     44|    } else {
  439|     44|        return DecodeInline((void*)((char*)dest),
  440|     44|                            templateEntry, src, arena, PR_FALSE);
  ------------------
  |  |  438|     44|#define PR_FALSE 0
  ------------------
  441|     44|    }
  442|     44|}
quickder.c:DecodePointer:
  413|     17|{
  414|     17|    const SEC_ASN1Template* ptrTemplate =
  415|     17|        SEC_ASN1GetSubtemplate(templateEntry, dest, PR_FALSE);
  ------------------
  |  |  438|     17|#define PR_FALSE 0
  ------------------
  416|     17|    if (!ptrTemplate) {
  ------------------
  |  Branch (416:9): [True: 0, False: 17]
  ------------------
  417|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  418|      0|        return SECFailure;
  419|      0|    }
  420|     17|    void* subdata = PORT_ArenaZAlloc(arena, ptrTemplate->size);
  ------------------
  |  |   59|     17|#define PORT_ArenaZAlloc PORT_ArenaZAlloc_Util
  ------------------
  421|     17|    *(void**)((char*)dest + templateEntry->offset) = subdata;
  422|     17|    if (subdata) {
  ------------------
  |  Branch (422:9): [True: 17, False: 0]
  ------------------
  423|     17|        return DecodeItem(subdata, ptrTemplate, src, arena, checkTag);
  424|     17|    } else {
  425|      0|        PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  426|      0|        return SECFailure;
  427|      0|    }
  428|     17|}
quickder.c:DecodeChoice:
  448|  10.3k|{
  449|  10.3k|    SECStatus rv = SECSuccess;
  450|  10.3k|    SECItem choice;
  451|  10.3k|    const SEC_ASN1Template* choiceTemplate = &(templateEntry[1]);
  452|  10.3k|    const SEC_ASN1Template* choiceEntry = NULL;
  453|  10.3k|    unsigned long choiceindex = 0;
  454|       |
  455|       |    /* XXX for a choice component, we should validate the template to make
  456|       |       sure the tags are distinct, in debug builds. This hasn't been
  457|       |       implemented yet */
  458|       |    /* rv = CheckChoiceTemplate(sequenceTemplate); */
  459|       |
  460|       |    /* process it */
  461|  10.4k|    do {
  462|  10.4k|        choice = *src;
  463|  10.4k|        choiceEntry = &choiceTemplate[choiceindex++];
  464|  10.4k|        if (choiceEntry->kind) {
  ------------------
  |  Branch (464:13): [True: 10.4k, False: 2]
  ------------------
  465|  10.4k|            rv = DecodeItem(dest, choiceEntry, &choice, arena, PR_TRUE);
  ------------------
  |  |  437|  10.4k|#define PR_TRUE 1
  ------------------
  466|  10.4k|        }
  467|  10.4k|    } while ((SECFailure == rv) && (choiceEntry->kind));
  ------------------
  |  Branch (467:14): [True: 55, False: 10.3k]
  |  Branch (467:36): [True: 53, False: 2]
  ------------------
  468|       |
  469|  10.3k|    if (SECFailure == rv) {
  ------------------
  |  Branch (469:9): [True: 2, False: 10.3k]
  ------------------
  470|       |        /* the component didn't match any of the choices */
  471|      2|        PORT_SetError(SEC_ERROR_BAD_DER);
  ------------------
  |  |   65|      2|#define PORT_SetError PORT_SetError_Util
  ------------------
  472|  10.3k|    } else {
  473|       |        /* set the type in the union here */
  474|  10.3k|        int* which = (int*)((char*)dest + templateEntry->offset);
  475|  10.3k|        *which = (int)choiceEntry->size;
  476|  10.3k|    }
  477|       |
  478|       |    /* we should have consumed all the bytes by now */
  479|       |    /* fail if we have not */
  480|  10.3k|    if (SECSuccess == rv && choice.len) {
  ------------------
  |  Branch (480:9): [True: 10.3k, False: 2]
  |  Branch (480:29): [True: 0, False: 10.3k]
  ------------------
  481|       |        /* there is extra data that isn't listed in the template */
  482|      0|        PORT_SetError(SEC_ERROR_BAD_DER);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  483|      0|        rv = SECFailure;
  484|      0|    }
  485|  10.3k|    return rv;
  486|  10.3k|}
quickder.c:DecodeGroup:
  492|  26.3k|{
  493|  26.3k|    SECStatus rv = SECSuccess;
  494|  26.3k|    SECItem source;
  495|  26.3k|    SECItem group;
  496|  26.3k|    PRUint32 totalEntries = 0;
  497|  26.3k|    PRUint32 entryIndex = 0;
  498|  26.3k|    void** entries = NULL;
  499|       |
  500|  26.3k|    const SEC_ASN1Template* subTemplate =
  501|  26.3k|        SEC_ASN1GetSubtemplate(templateEntry, dest, PR_FALSE);
  ------------------
  |  |  438|  26.3k|#define PR_FALSE 0
  ------------------
  502|       |
  503|  26.3k|    source = *src;
  504|       |
  505|       |    /* get the group */
  506|  26.3k|    if (SECSuccess == rv) {
  ------------------
  |  Branch (506:9): [True: 26.3k, False: 0]
  ------------------
  507|  26.3k|        rv = GetItem(&source, &group, PR_FALSE);
  ------------------
  |  |  438|  26.3k|#define PR_FALSE 0
  ------------------
  508|  26.3k|    }
  509|       |
  510|       |    /* XXX we should check the subtemplate in debug builds */
  511|  26.3k|    if (SECSuccess == rv) {
  ------------------
  |  Branch (511:9): [True: 26.3k, False: 0]
  ------------------
  512|       |        /* first, count the number of entries. Benchmarking showed that this
  513|       |           counting pass is more efficient than trying to allocate entries as
  514|       |           we read the DER, even if allocating many entries at a time
  515|       |        */
  516|  26.3k|        SECItem counter = group;
  517|  34.6k|        do {
  518|  34.6k|            SECItem anitem;
  519|  34.6k|            rv = GetItem(&counter, &anitem, PR_TRUE);
  ------------------
  |  |  437|  34.6k|#define PR_TRUE 1
  ------------------
  520|  34.6k|            if (SECSuccess == rv && (anitem.len)) {
  ------------------
  |  Branch (520:17): [True: 34.5k, False: 74]
  |  Branch (520:37): [True: 34.2k, False: 307]
  ------------------
  521|  34.2k|                totalEntries++;
  522|  34.2k|            }
  523|  34.6k|        } while ((SECSuccess == rv) && (counter.len));
  ------------------
  |  Branch (523:18): [True: 34.5k, False: 74]
  |  Branch (523:40): [True: 8.35k, False: 26.2k]
  ------------------
  524|       |
  525|  26.3k|        if (SECSuccess == rv) {
  ------------------
  |  Branch (525:13): [True: 26.2k, False: 74]
  ------------------
  526|       |            /* allocate room for pointer array and entries */
  527|       |            /* we want to allocate the array even if there is 0 entry */
  528|  26.2k|            entries = (void**)PORT_ArenaZAlloc(arena, sizeof(void*) * (totalEntries + 1) + /* the extra one is for NULL termination */
  ------------------
  |  |   59|  26.2k|#define PORT_ArenaZAlloc PORT_ArenaZAlloc_Util
  ------------------
  529|  26.2k|                                                          subTemplate->size * totalEntries);
  530|       |
  531|  26.2k|            if (entries) {
  ------------------
  |  Branch (531:17): [True: 26.2k, False: 0]
  ------------------
  532|  26.2k|                entries[totalEntries] = NULL; /* terminate the array */
  533|  26.2k|            } else {
  534|      0|                PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  535|      0|                rv = SECFailure;
  536|      0|            }
  537|  26.2k|            if (SECSuccess == rv) {
  ------------------
  |  Branch (537:17): [True: 26.2k, False: 0]
  ------------------
  538|  26.2k|                void* entriesData = (unsigned char*)entries + (unsigned long)(sizeof(void*) * (totalEntries + 1));
  539|       |                /* and fix the pointers in the array */
  540|  26.2k|                PRUint32 entriesIndex = 0;
  541|  59.8k|                for (entriesIndex = 0; entriesIndex < totalEntries; entriesIndex++) {
  ------------------
  |  Branch (541:40): [True: 33.6k, False: 26.2k]
  ------------------
  542|  33.6k|                    entries[entriesIndex] =
  543|  33.6k|                        (char*)entriesData + (subTemplate->size * entriesIndex);
  544|  33.6k|                }
  545|  26.2k|            }
  546|  26.2k|        }
  547|  26.3k|    }
  548|       |
  549|  26.3k|    if (SECSuccess == rv && totalEntries)
  ------------------
  |  Branch (549:9): [True: 26.2k, False: 74]
  |  Branch (549:29): [True: 25.9k, False: 307]
  ------------------
  550|  31.1k|        do {
  551|  31.1k|            if (!(entryIndex < totalEntries)) {
  ------------------
  |  Branch (551:17): [True: 0, False: 31.1k]
  ------------------
  552|      0|                rv = SECFailure;
  553|      0|                break;
  554|      0|            }
  555|  31.1k|            rv = DecodeItem(entries[entryIndex++], subTemplate, &group, arena, PR_TRUE);
  ------------------
  |  |  437|  31.1k|#define PR_TRUE 1
  ------------------
  556|  31.1k|        } while ((SECSuccess == rv) && (group.len));
  ------------------
  |  Branch (556:18): [True: 31.0k, False: 53]
  |  Branch (556:40): [True: 5.20k, False: 25.8k]
  ------------------
  557|       |    /* we should be at the end of the set by now */
  558|       |    /* save the entries where requested */
  559|      0|    memcpy(((char*)dest + templateEntry->offset), &entries, sizeof(void**));
  560|       |
  561|  26.3k|    return rv;
  562|  26.3k|}
quickder.c:DecodeSequence:
  353|   146k|{
  354|   146k|    SECStatus rv = SECSuccess;
  355|   146k|    SECItem source;
  356|   146k|    SECItem sequence;
  357|   146k|    const SEC_ASN1Template* sequenceTemplate = &(templateEntry[1]);
  358|   146k|    const SEC_ASN1Template* sequenceEntry = NULL;
  359|   146k|    unsigned long seqindex = 0;
  360|       |
  361|   146k|#ifdef DEBUG
  362|       |    /* for a sequence, we need to validate the template. */
  363|   146k|    rv = CheckSequenceTemplate(sequenceTemplate);
  364|   146k|#endif
  365|       |
  366|   146k|    source = *src;
  367|       |
  368|       |    /* get the sequence */
  369|   146k|    if (SECSuccess == rv) {
  ------------------
  |  Branch (369:9): [True: 146k, False: 0]
  ------------------
  370|   146k|        rv = GetItem(&source, &sequence, PR_FALSE);
  ------------------
  |  |  438|   146k|#define PR_FALSE 0
  ------------------
  371|   146k|    }
  372|       |
  373|       |    /* process it */
  374|   146k|    if (SECSuccess == rv)
  ------------------
  |  Branch (374:9): [True: 146k, False: 0]
  ------------------
  375|   563k|        do {
  376|   563k|            sequenceEntry = &sequenceTemplate[seqindex++];
  377|   563k|            if ((sequenceEntry && sequenceEntry->kind) &&
  ------------------
  |  Branch (377:18): [True: 563k, False: 0]
  |  Branch (377:35): [True: 443k, False: 119k]
  ------------------
  378|   563k|                (sequenceEntry->kind != SEC_ASN1_SKIP_REST)) {
  ------------------
  |  |  151|   443k|#define SEC_ASN1_SKIP_REST 0x80000    /* skip all following fields; \
  ------------------
  |  Branch (378:17): [True: 418k, False: 25.6k]
  ------------------
  379|   418k|                rv = DecodeItem(dest, sequenceEntry, &sequence, arena, PR_TRUE);
  ------------------
  |  |  437|   418k|#define PR_TRUE 1
  ------------------
  380|   418k|            }
  381|   563k|        } while ((SECSuccess == rv) &&
  ------------------
  |  Branch (381:18): [True: 562k, False: 1.09k]
  ------------------
  382|   563k|                 (sequenceEntry->kind &&
  ------------------
  |  Branch (382:19): [True: 442k, False: 119k]
  ------------------
  383|   562k|                  sequenceEntry->kind != SEC_ASN1_SKIP_REST));
  ------------------
  |  |  151|   442k|#define SEC_ASN1_SKIP_REST 0x80000    /* skip all following fields; \
  ------------------
  |  Branch (383:19): [True: 417k, False: 25.6k]
  ------------------
  384|       |    /* we should have consumed all the bytes in the sequence by now
  385|       |       unless the caller doesn't care about the rest of the sequence */
  386|   146k|    if (SECSuccess == rv && sequence.len &&
  ------------------
  |  Branch (386:9): [True: 145k, False: 1.09k]
  |  Branch (386:29): [True: 25.6k, False: 119k]
  ------------------
  387|   146k|        sequenceEntry && sequenceEntry->kind != SEC_ASN1_SKIP_REST) {
  ------------------
  |  |  151|  25.6k|#define SEC_ASN1_SKIP_REST 0x80000    /* skip all following fields; \
  ------------------
  |  Branch (387:9): [True: 25.6k, False: 0]
  |  Branch (387:26): [True: 49, False: 25.6k]
  ------------------
  388|       |        /* it isn't 100% clear whether this is a bad DER or a bad template.
  389|       |           The problem is that logically, they don't match - there is extra
  390|       |           data in the DER that the template doesn't know about */
  391|     49|        PORT_SetError(SEC_ERROR_BAD_DER);
  ------------------
  |  |   65|     49|#define PORT_SetError PORT_SetError_Util
  ------------------
  392|     49|        rv = SECFailure;
  393|     49|    }
  394|       |
  395|   146k|    return rv;
  396|   146k|}
quickder.c:CheckSequenceTemplate:
  303|   146k|{
  304|   146k|    SECStatus rv = SECSuccess;
  305|   146k|    const SEC_ASN1Template* sequenceEntry = NULL;
  306|   146k|    unsigned long seqIndex = 0;
  307|   146k|    unsigned long lastEntryIndex = 0;
  308|   146k|    unsigned long ambiguityIndex = 0;
  309|   146k|    PRBool foundAmbiguity = PR_FALSE;
  ------------------
  |  |  438|   146k|#define PR_FALSE 0
  ------------------
  310|       |
  311|   592k|    do {
  312|   592k|        sequenceEntry = &sequenceTemplate[seqIndex++];
  313|   592k|        if (sequenceEntry->kind) {
  ------------------
  |  Branch (313:13): [True: 445k, False: 146k]
  ------------------
  314|       |            /* ensure that we don't have an optional component of SEC_ASN1_ANY
  315|       |               in the middle of the sequence, since we could not handle it */
  316|       |            /* XXX this function needs to dig into the subtemplates to find
  317|       |               the next tag */
  318|   445k|            if ((PR_FALSE == foundAmbiguity) &&
  ------------------
  |  |  438|   445k|#define PR_FALSE 0
  ------------------
  |  Branch (318:17): [True: 445k, False: 0]
  ------------------
  319|   445k|                (sequenceEntry->kind & SEC_ASN1_OPTIONAL) &&
  ------------------
  |  |  131|   445k|#define SEC_ASN1_OPTIONAL 0x00100
  ------------------
  |  Branch (319:17): [True: 105k, False: 339k]
  ------------------
  320|   445k|                (sequenceEntry->kind & SEC_ASN1_ANY)) {
  ------------------
  |  |  133|   105k|#define SEC_ASN1_ANY 0x00400
  ------------------
  |  Branch (320:17): [True: 41.1k, False: 64.6k]
  ------------------
  321|  41.1k|                foundAmbiguity = PR_TRUE;
  ------------------
  |  |  437|  41.1k|#define PR_TRUE 1
  ------------------
  322|  41.1k|                ambiguityIndex = seqIndex - 1;
  323|  41.1k|            }
  324|   445k|        }
  325|   592k|    } while (sequenceEntry->kind);
  ------------------
  |  Branch (325:14): [True: 445k, False: 146k]
  ------------------
  326|       |
  327|   146k|    lastEntryIndex = seqIndex - 2;
  328|       |
  329|   146k|    if (PR_FALSE != foundAmbiguity) {
  ------------------
  |  |  438|   146k|#define PR_FALSE 0
  ------------------
  |  Branch (329:9): [True: 41.1k, False: 105k]
  ------------------
  330|  41.1k|        if (ambiguityIndex < lastEntryIndex) {
  ------------------
  |  Branch (330:13): [True: 0, False: 41.1k]
  ------------------
  331|       |            /* ambiguity can only be tolerated on the last entry */
  332|      0|            PORT_SetError(SEC_ERROR_BAD_TEMPLATE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  333|      0|            rv = SECFailure;
  334|      0|        }
  335|  41.1k|    }
  336|       |
  337|       |    /* XXX also enforce ASN.1 requirement that tags be
  338|       |       distinct for consecutive optional components */
  339|       |
  340|   146k|    return rv;
  341|   146k|}

SECOID_GetAlgorithmTag_Util:
   14|  14.1k|{
   15|  14.1k|    if (id == NULL || id->algorithm.data == NULL)
  ------------------
  |  Branch (15:9): [True: 0, False: 14.1k]
  |  Branch (15:23): [True: 0, False: 14.1k]
  ------------------
   16|      0|        return SEC_OID_UNKNOWN;
   17|       |
   18|  14.1k|    return SECOID_FindOIDTag(&(id->algorithm));
  ------------------
  |  |  117|  14.1k|#define SECOID_FindOIDTag SECOID_FindOIDTag_Util
  ------------------
   19|  14.1k|}

SEC_ASN1EncodeLength:
  397|  1.62k|{
  398|  1.62k|    int lenlen;
  399|       |
  400|  1.62k|    lenlen = SEC_ASN1LengthLength(value);
  ------------------
  |  |  101|  1.62k|#define SEC_ASN1LengthLength SEC_ASN1LengthLength_Util
  ------------------
  401|  1.62k|    if (lenlen == 1) {
  ------------------
  |  Branch (401:9): [True: 1.40k, False: 218]
  ------------------
  402|  1.40k|        buf[0] = value;
  403|  1.40k|    } else {
  404|    218|        int i;
  405|       |
  406|    218|        i = lenlen - 1;
  407|    218|        buf[0] = 0x80 | i;
  408|    436|        while (i) {
  ------------------
  |  Branch (408:16): [True: 218, False: 218]
  ------------------
  409|    218|            buf[i--] = value;
  410|    218|            value >>= 8;
  411|    218|        }
  412|    218|        PORT_Assert(value == 0);
  ------------------
  |  |  120|    218|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    218|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 218, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  413|    218|    }
  414|  1.62k|    return lenlen;
  415|  1.62k|}
SEC_ASN1EncoderUpdate_Util:
 1201|  1.62k|{
 1202|  1.62k|    sec_asn1e_state *state;
 1203|       |
 1204|  1.62k|    if (cx->status == needBytes) {
  ------------------
  |  Branch (1204:9): [True: 0, False: 1.62k]
  ------------------
 1205|      0|        cx->status = keepGoing;
 1206|      0|    }
 1207|       |
 1208|  4.86k|    while (cx->status == keepGoing) {
  ------------------
  |  Branch (1208:12): [True: 4.86k, False: 0]
  ------------------
 1209|  4.86k|        state = cx->current;
 1210|  4.86k|        switch (state->place) {
 1211|  1.62k|            case beforeHeader:
  ------------------
  |  Branch (1211:13): [True: 1.62k, False: 3.24k]
  ------------------
 1212|  1.62k|                sec_asn1e_write_header(state);
 1213|  1.62k|                break;
 1214|  1.62k|            case duringContents:
  ------------------
  |  Branch (1214:13): [True: 1.62k, False: 3.24k]
  ------------------
 1215|  1.62k|                if (cx->from_buf)
  ------------------
  |  Branch (1215:21): [True: 0, False: 1.62k]
  ------------------
 1216|      0|                    sec_asn1e_write_contents_from_buf(state, buf, len);
 1217|  1.62k|                else
 1218|  1.62k|                    sec_asn1e_write_contents(state);
 1219|  1.62k|                break;
 1220|      0|            case duringGroup:
  ------------------
  |  Branch (1220:13): [True: 0, False: 4.86k]
  ------------------
 1221|      0|                sec_asn1e_next_in_group(state);
 1222|      0|                break;
 1223|      0|            case duringSequence:
  ------------------
  |  Branch (1223:13): [True: 0, False: 4.86k]
  ------------------
 1224|      0|                sec_asn1e_next_in_sequence(state);
 1225|      0|                break;
 1226|  1.62k|            case afterContents:
  ------------------
  |  Branch (1226:13): [True: 1.62k, False: 3.24k]
  ------------------
 1227|  1.62k|                sec_asn1e_after_contents(state);
 1228|  1.62k|                break;
 1229|      0|            case afterImplicit:
  ------------------
  |  Branch (1229:13): [True: 0, False: 4.86k]
  ------------------
 1230|      0|            case afterInline:
  ------------------
  |  Branch (1230:13): [True: 0, False: 4.86k]
  ------------------
 1231|      0|            case afterPointer:
  ------------------
  |  Branch (1231:13): [True: 0, False: 4.86k]
  ------------------
 1232|      0|            case afterChoice:
  ------------------
  |  Branch (1232:13): [True: 0, False: 4.86k]
  ------------------
 1233|       |                /*
 1234|       |                 * These states are more documentation than anything.
 1235|       |                 * They just need to force a pop.
 1236|       |                 */
 1237|      0|                PORT_Assert(!state->indefinite);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1238|      0|                state->place = afterContents;
 1239|      0|                break;
 1240|      0|            case notInUse:
  ------------------
  |  Branch (1240:13): [True: 0, False: 4.86k]
  ------------------
 1241|      0|            default:
  ------------------
  |  Branch (1241:13): [True: 0, False: 4.86k]
  ------------------
 1242|       |                /* This is not an error, but rather a plain old BUG! */
 1243|      0|                PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1244|      0|                cx->status = encodeError;
 1245|      0|                break;
 1246|  4.86k|        }
 1247|       |
 1248|  4.86k|        if (cx->status == encodeError)
  ------------------
  |  Branch (1248:13): [True: 0, False: 4.86k]
  ------------------
 1249|      0|            break;
 1250|       |
 1251|       |        /* It might have changed, so we have to update our local copy.  */
 1252|  4.86k|        state = cx->current;
 1253|       |
 1254|       |        /* If it is NULL, we have popped all the way to the top.  */
 1255|  4.86k|        if (state == NULL) {
  ------------------
  |  Branch (1255:13): [True: 1.62k, False: 3.24k]
  ------------------
 1256|  1.62k|            cx->status = allDone;
 1257|  1.62k|            break;
 1258|  1.62k|        }
 1259|  4.86k|    }
 1260|       |
 1261|  1.62k|    if (cx->status == encodeError) {
  ------------------
  |  Branch (1261:9): [True: 0, False: 1.62k]
  ------------------
 1262|      0|        return SECFailure;
 1263|      0|    }
 1264|       |
 1265|  1.62k|    return SECSuccess;
 1266|  1.62k|}
SEC_ASN1EncoderFinish_Util:
 1270|  1.62k|{
 1271|       |    /*
 1272|       |     * XXX anything else that needs to be finished?
 1273|       |     */
 1274|       |
 1275|  1.62k|    PORT_FreeArena(cx->our_pool, PR_FALSE);
  ------------------
  |  |   61|  1.62k|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                  PORT_FreeArena(cx->our_pool, PR_FALSE);
  ------------------
  |  |  438|  1.62k|#define PR_FALSE 0
  ------------------
 1276|  1.62k|}
SEC_ASN1EncoderStart_Util:
 1281|  1.62k|{
 1282|  1.62k|    PLArenaPool *our_pool;
 1283|  1.62k|    SEC_ASN1EncoderContext *cx;
 1284|       |
 1285|  1.62k|    our_pool = PORT_NewArena(SEC_ASN1_DEFAULT_ARENA_SIZE);
  ------------------
  |  |   63|  1.62k|#define PORT_NewArena PORT_NewArena_Util
  ------------------
                  our_pool = PORT_NewArena(SEC_ASN1_DEFAULT_ARENA_SIZE);
  ------------------
  |  |   60|  1.62k|#define SEC_ASN1_DEFAULT_ARENA_SIZE (2048)
  ------------------
 1286|  1.62k|    if (our_pool == NULL)
  ------------------
  |  Branch (1286:9): [True: 0, False: 1.62k]
  ------------------
 1287|      0|        return NULL;
 1288|       |
 1289|  1.62k|    cx = (SEC_ASN1EncoderContext *)PORT_ArenaZAlloc(our_pool, sizeof(*cx));
  ------------------
  |  |   59|  1.62k|#define PORT_ArenaZAlloc PORT_ArenaZAlloc_Util
  ------------------
 1290|  1.62k|    if (cx == NULL) {
  ------------------
  |  Branch (1290:9): [True: 0, False: 1.62k]
  ------------------
 1291|      0|        PORT_FreeArena(our_pool, PR_FALSE);
  ------------------
  |  |   61|      0|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                      PORT_FreeArena(our_pool, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 1292|      0|        return NULL;
 1293|      0|    }
 1294|       |
 1295|  1.62k|    cx->our_pool = our_pool;
 1296|  1.62k|    cx->output_proc = output_proc;
 1297|  1.62k|    cx->output_arg = output_arg;
 1298|       |
 1299|  1.62k|    cx->status = keepGoing;
 1300|       |
 1301|  1.62k|    if (sec_asn1e_push_state(cx, theTemplate, src, PR_FALSE) == NULL ||
  ------------------
  |  |  438|  1.62k|#define PR_FALSE 0
  ------------------
  |  Branch (1301:9): [True: 0, False: 1.62k]
  ------------------
 1302|  1.62k|        sec_asn1e_init_state_based_on_template(cx->current) == NULL) {
  ------------------
  |  Branch (1302:9): [True: 0, False: 1.62k]
  ------------------
 1303|       |        /*
 1304|       |         * Trouble initializing (probably due to failed allocations)
 1305|       |         * requires that we just give up.
 1306|       |         */
 1307|      0|        PORT_FreeArena(our_pool, PR_FALSE);
  ------------------
  |  |   61|      0|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                      PORT_FreeArena(our_pool, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
 1308|      0|        return NULL;
 1309|      0|    }
 1310|       |
 1311|  1.62k|    return cx;
 1312|  1.62k|}
SEC_ASN1Encode_Util:
 1389|  1.62k|{
 1390|  1.62k|    SEC_ASN1EncoderContext *ecx;
 1391|  1.62k|    SECStatus rv;
 1392|       |
 1393|  1.62k|    ecx = SEC_ASN1EncoderStart(src, theTemplate, output_proc, output_arg);
  ------------------
  |  |   98|  1.62k|#define SEC_ASN1EncoderStart SEC_ASN1EncoderStart_Util
  ------------------
 1394|  1.62k|    if (ecx == NULL)
  ------------------
  |  Branch (1394:9): [True: 0, False: 1.62k]
  ------------------
 1395|      0|        return SECFailure;
 1396|       |
 1397|  1.62k|    rv = SEC_ASN1EncoderUpdate(ecx, NULL, 0);
  ------------------
  |  |   99|  1.62k|#define SEC_ASN1EncoderUpdate SEC_ASN1EncoderUpdate_Util
  ------------------
 1398|       |
 1399|  1.62k|    SEC_ASN1EncoderFinish(ecx);
  ------------------
  |  |   94|  1.62k|#define SEC_ASN1EncoderFinish SEC_ASN1EncoderFinish_Util
  ------------------
 1400|  1.62k|    return rv;
 1401|  1.62k|}
SEC_ASN1EncodeItem_Util:
 1487|    810|{
 1488|    810|    unsigned long encoding_length;
 1489|    810|    SECStatus rv;
 1490|       |
 1491|    810|    PORT_Assert(dest == NULL || dest->data == NULL);
  ------------------
  |  |  120|    810|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    810|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 810, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1492|       |
 1493|    810|    encoding_length = 0;
 1494|    810|    rv = SEC_ASN1Encode(src, theTemplate,
  ------------------
  |  |   87|    810|#define SEC_ASN1Encode SEC_ASN1Encode_Util
  ------------------
 1495|    810|                        sec_asn1e_encode_item_count, &encoding_length);
 1496|    810|    if (rv != SECSuccess)
  ------------------
  |  Branch (1496:9): [True: 0, False: 810]
  ------------------
 1497|      0|        return NULL;
 1498|       |
 1499|    810|    dest = sec_asn1e_allocate_item(poolp, dest, encoding_length);
 1500|    810|    if (dest == NULL)
  ------------------
  |  Branch (1500:9): [True: 0, False: 810]
  ------------------
 1501|      0|        return NULL;
 1502|       |
 1503|       |    /* XXX necessary?  This really just checks for a bug in the allocate fn */
 1504|    810|    PORT_Assert(dest->data != NULL);
  ------------------
  |  |  120|    810|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    810|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 810, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1505|    810|    if (dest->data == NULL)
  ------------------
  |  Branch (1505:9): [True: 0, False: 810]
  ------------------
 1506|      0|        return NULL;
 1507|       |
 1508|    810|    dest->len = 0;
 1509|    810|    (void)SEC_ASN1Encode(src, theTemplate, sec_asn1e_encode_item_store, dest);
  ------------------
  |  |   87|    810|#define SEC_ASN1Encode SEC_ASN1Encode_Util
  ------------------
 1510|       |
 1511|    810|    PORT_Assert(encoding_length == dest->len);
  ------------------
  |  |  120|    810|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    810|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 810, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1512|    810|    return dest;
 1513|    810|}
secasn1e.c:sec_asn1e_write_header:
  734|  1.62k|{
  735|  1.62k|    unsigned long contents_length;
  736|  1.62k|    unsigned char tag_number, tag_modifiers;
  737|  1.62k|    sec_asn1e_hdr_encoding hdrException = hdr_normal;
  738|  1.62k|    PRBool indefinite = PR_FALSE;
  ------------------
  |  |  438|  1.62k|#define PR_FALSE 0
  ------------------
  739|       |
  740|  1.62k|    PORT_Assert(state->place == beforeHeader);
  ------------------
  |  |  120|  1.62k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.62k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.62k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  741|       |
  742|  1.62k|    tag_number = state->tag_number;
  743|  1.62k|    tag_modifiers = state->tag_modifiers;
  744|       |
  745|  1.62k|    if (state->underlying_kind == SEC_ASN1_ANY) {
  ------------------
  |  |  133|  1.62k|#define SEC_ASN1_ANY 0x00400
  ------------------
  |  Branch (745:9): [True: 0, False: 1.62k]
  ------------------
  746|      0|        state->place = duringContents;
  747|      0|        return;
  748|      0|    }
  749|       |
  750|  1.62k|    if (state->underlying_kind & SEC_ASN1_CHOICE) {
  ------------------
  |  |  153|  1.62k|#define SEC_ASN1_CHOICE 0x100000      /* pick one from a template */
  ------------------
  |  Branch (750:9): [True: 0, False: 1.62k]
  ------------------
  751|      0|        int indx = sec_asn1e_which_choice(state->src, state->theTemplate);
  752|      0|        if (0 == indx) {
  ------------------
  |  Branch (752:13): [True: 0, False: 0]
  ------------------
  753|       |            /* XXX set an error? "choice not found" */
  754|      0|            state->top->status = encodeError;
  755|      0|            return;
  756|      0|        }
  757|      0|        state->place = afterChoice;
  758|      0|        state = sec_asn1e_push_state(state->top, &state->theTemplate[indx],
  759|      0|                                     (char *)state->src - state->theTemplate->offset,
  760|      0|                                     PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  761|      0|        if (state) {
  ------------------
  |  Branch (761:13): [True: 0, False: 0]
  ------------------
  762|       |            /*
  763|       |             * Do the "before" field notification.
  764|       |             */
  765|      0|            sec_asn1e_notify_before(state->top, state->src, state->depth);
  766|      0|            (void)sec_asn1e_init_state_based_on_template(state);
  767|      0|        }
  768|      0|        return;
  769|      0|    }
  770|       |
  771|       |    /* The !isString test below is apparently intended to ensure that all
  772|       |    ** constructed types receive indefinite length encoding.
  773|       |    */
  774|  1.62k|    indefinite = (PRBool)(state->top->streaming && state->may_stream &&
  ------------------
  |  Branch (774:27): [True: 0, False: 1.62k]
  |  Branch (774:52): [True: 0, False: 0]
  ------------------
  775|  1.62k|                          (state->top->from_buf || !state->is_string));
  ------------------
  |  Branch (775:28): [True: 0, False: 0]
  |  Branch (775:52): [True: 0, False: 0]
  ------------------
  776|       |
  777|       |    /*
  778|       |     * If we are doing a definite-length encoding, first we have to
  779|       |     * walk the data structure to calculate the entire contents length.
  780|       |     * If we are doing an indefinite-length encoding, we still need to
  781|       |     * know if the contents is:
  782|       |     *    optional and to be omitted, or
  783|       |     *    an ANY (header is pre-encoded), or
  784|       |     *    a SAVE or some other kind of template used only by the decoder.
  785|       |     * So, we call this function either way.
  786|       |     */
  787|  1.62k|    contents_length = sec_asn1e_contents_length(state->theTemplate,
  788|  1.62k|                                                state->src,
  789|  1.62k|                                                state->disallowStreaming,
  790|  1.62k|                                                indefinite,
  791|  1.62k|                                                &hdrException);
  792|       |    /*
  793|       |     * We might be told explicitly not to put out a header.
  794|       |     * But it can also be the case, via a pushed subtemplate, that
  795|       |     * sec_asn1e_contents_length could not know that this field is
  796|       |     * really optional.  So check for that explicitly, too.
  797|       |     */
  798|  1.62k|    if (hdrException != hdr_normal ||
  ------------------
  |  Branch (798:9): [True: 0, False: 1.62k]
  ------------------
  799|  1.62k|        (contents_length == 0 && state->optional)) {
  ------------------
  |  Branch (799:10): [True: 0, False: 1.62k]
  |  Branch (799:34): [True: 0, False: 0]
  ------------------
  800|      0|        state->place = afterContents;
  801|      0|        if (state->top->streaming &&
  ------------------
  |  Branch (801:13): [True: 0, False: 0]
  ------------------
  802|      0|            state->may_stream &&
  ------------------
  |  Branch (802:13): [True: 0, False: 0]
  ------------------
  803|      0|            state->top->from_buf) {
  ------------------
  |  Branch (803:13): [True: 0, False: 0]
  ------------------
  804|       |            /* we did not find an optional indefinite string, so we
  805|       |             * don't encode it.  However, if TakeFromBuf is on, we stop
  806|       |             * here anyway to give our caller a chance to intercept at the
  807|       |             * same point where we would stop if the field were present.
  808|       |             */
  809|      0|            state->top->status = needBytes;
  810|      0|        }
  811|      0|        return;
  812|      0|    }
  813|       |
  814|  1.62k|    if (indefinite) {
  ------------------
  |  Branch (814:9): [True: 0, False: 1.62k]
  ------------------
  815|       |        /*
  816|       |         * We need to put out an indefinite-length encoding.
  817|       |         * The only universal types that can be constructed are SETs,
  818|       |         * SEQUENCEs, and strings; so check that it is one of those,
  819|       |         * or that it is not universal (e.g. context-specific).
  820|       |         */
  821|      0|        state->indefinite = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  822|      0|        PORT_Assert((tag_number == SEC_ASN1_SET) || (tag_number == SEC_ASN1_SEQUENCE) || ((tag_modifiers & SEC_ASN1_CLASS_MASK) != 0) || state->is_string);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  823|      0|        tag_modifiers |= SEC_ASN1_CONSTRUCTED;
  ------------------
  |  |  117|      0|#define SEC_ASN1_CONSTRUCTED 0x20
  ------------------
  824|      0|        contents_length = 0;
  825|      0|    }
  826|       |
  827|  1.62k|    sec_asn1e_write_identifier_bytes(state,
  828|  1.62k|                                     (unsigned char)(tag_number | tag_modifiers));
  829|  1.62k|    sec_asn1e_write_length_bytes(state, contents_length, state->indefinite);
  830|       |
  831|  1.62k|    if (contents_length == 0 && !state->indefinite) {
  ------------------
  |  Branch (831:9): [True: 0, False: 1.62k]
  |  Branch (831:33): [True: 0, False: 0]
  ------------------
  832|       |        /*
  833|       |         * If no real contents to encode, then we are done with this field.
  834|       |         */
  835|      0|        state->place = afterContents;
  836|      0|        return;
  837|      0|    }
  838|       |
  839|       |    /*
  840|       |     * An EXPLICIT is nothing but an outer header, which we have already
  841|       |     * written.  Now we need to do the inner header and contents.
  842|       |     */
  843|  1.62k|    if (state->isExplicit) {
  ------------------
  |  Branch (843:9): [True: 0, False: 1.62k]
  ------------------
  844|      0|        const SEC_ASN1Template *subt =
  845|      0|            SEC_ASN1GetSubtemplate(state->theTemplate, state->src, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  846|      0|        state->place = afterContents;
  847|      0|        state = sec_asn1e_push_state(state->top, subt, state->src, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  848|      0|        if (state != NULL) {
  ------------------
  |  Branch (848:13): [True: 0, False: 0]
  ------------------
  849|      0|            (void)sec_asn1e_init_state_based_on_template(state);
  850|      0|        }
  851|      0|        return;
  852|      0|    }
  853|       |
  854|  1.62k|    switch (state->underlying_kind) {
  855|      0|        case SEC_ASN1_SET_OF:
  ------------------
  |  |  167|      0|#define SEC_ASN1_SET_OF (SEC_ASN1_GROUP | SEC_ASN1_SET)
  |  |  ------------------
  |  |  |  |  136|      0|#define SEC_ASN1_GROUP 0x02000        /* with SET or SEQUENCE means \
  |  |  ------------------
  |  |               #define SEC_ASN1_SET_OF (SEC_ASN1_GROUP | SEC_ASN1_SET)
  |  |  ------------------
  |  |  |  |   93|      0|#define SEC_ASN1_SET 0x11
  |  |  ------------------
  ------------------
  |  Branch (855:9): [True: 0, False: 1.62k]
  ------------------
  856|      0|        case SEC_ASN1_SEQUENCE_OF:
  ------------------
  |  |  166|      0|#define SEC_ASN1_SEQUENCE_OF (SEC_ASN1_GROUP | SEC_ASN1_SEQUENCE)
  |  |  ------------------
  |  |  |  |  136|      0|#define SEC_ASN1_GROUP 0x02000        /* with SET or SEQUENCE means \
  |  |  ------------------
  |  |               #define SEC_ASN1_SEQUENCE_OF (SEC_ASN1_GROUP | SEC_ASN1_SEQUENCE)
  |  |  ------------------
  |  |  |  |   92|      0|#define SEC_ASN1_SEQUENCE 0x10
  |  |  ------------------
  ------------------
  |  Branch (856:9): [True: 0, False: 1.62k]
  ------------------
  857|       |            /*
  858|       |             * We need to push a child to handle each member.
  859|       |             */
  860|      0|            {
  861|      0|                void **group;
  862|      0|                const SEC_ASN1Template *subt;
  863|       |
  864|      0|                group = *(void ***)state->src;
  865|      0|                if (group == NULL || *group == NULL) {
  ------------------
  |  Branch (865:21): [True: 0, False: 0]
  |  Branch (865:38): [True: 0, False: 0]
  ------------------
  866|       |                    /*
  867|       |                     * Group is empty; we are done.
  868|       |                     */
  869|      0|                    state->place = afterContents;
  870|      0|                    return;
  871|      0|                }
  872|      0|                state->place = duringGroup;
  873|      0|                subt = SEC_ASN1GetSubtemplate(state->theTemplate, state->src,
  874|      0|                                              PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  875|      0|                state = sec_asn1e_push_state(state->top, subt, *group, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  876|      0|                if (state != NULL) {
  ------------------
  |  Branch (876:21): [True: 0, False: 0]
  ------------------
  877|      0|                    (void)sec_asn1e_init_state_based_on_template(state);
  878|      0|                }
  879|      0|            }
  880|      0|            break;
  881|       |
  882|      0|        case SEC_ASN1_SEQUENCE:
  ------------------
  |  |   92|      0|#define SEC_ASN1_SEQUENCE 0x10
  ------------------
  |  Branch (882:9): [True: 0, False: 1.62k]
  ------------------
  883|      0|        case SEC_ASN1_SET:
  ------------------
  |  |   93|      0|#define SEC_ASN1_SET 0x11
  ------------------
  |  Branch (883:9): [True: 0, False: 1.62k]
  ------------------
  884|       |            /*
  885|       |             * We need to push a child to handle the individual fields.
  886|       |             */
  887|      0|            state->place = duringSequence;
  888|      0|            state = sec_asn1e_push_state(state->top, state->theTemplate + 1,
  889|      0|                                         state->src, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  890|      0|            if (state != NULL) {
  ------------------
  |  Branch (890:17): [True: 0, False: 0]
  ------------------
  891|       |                /*
  892|       |                 * Do the "before" field notification.
  893|       |                 */
  894|      0|                sec_asn1e_notify_before(state->top, state->src, state->depth);
  895|      0|                (void)sec_asn1e_init_state_based_on_template(state);
  896|      0|            }
  897|      0|            break;
  898|       |
  899|  1.62k|        default:
  ------------------
  |  Branch (899:9): [True: 1.62k, False: 0]
  ------------------
  900|       |            /*
  901|       |             * I think we do not need to do anything else.
  902|       |             * XXX Correct?
  903|       |             */
  904|  1.62k|            state->place = duringContents;
  905|  1.62k|            break;
  906|  1.62k|    }
  907|  1.62k|}
secasn1e.c:sec_asn1e_contents_length:
  471|  1.62k|{
  472|  1.62k|    unsigned long encode_kind, underlying_kind;
  473|  1.62k|    PRBool isExplicit, optional, universal, may_stream;
  474|  1.62k|    unsigned long len;
  475|       |
  476|       |    /*
  477|       |     * This function currently calculates the length in all cases
  478|       |     * except the following: when writing out the contents of a
  479|       |     * template that belongs to a state where it was a sub-template
  480|       |     * with the SEC_ASN1_MAY_STREAM bit set and it's parent had the
  481|       |     * optional bit set.  The information that the parent is optional
  482|       |     * and that we should return the length of 0 when that length is
  483|       |     * present since that means the optional field is no longer present.
  484|       |     * So we add the disallowStreaming flag which is passed in when
  485|       |     * writing the contents, but for all recursive calls to
  486|       |     * sec_asn1e_contents_length, we pass PR_FALSE, because this
  487|       |     * function correctly calculates the length for children templates
  488|       |     * from that point on.  Confused yet?  At least you didn't have
  489|       |     * to figure it out.  ;)  -javi
  490|       |     */
  491|  1.62k|    encode_kind = theTemplate->kind;
  492|       |
  493|  1.62k|    universal = ((encode_kind & SEC_ASN1_CLASS_MASK) == SEC_ASN1_UNIVERSAL)
  ------------------
  |  |  119|  1.62k|#define SEC_ASN1_CLASS_MASK 0xc0
  ------------------
                  universal = ((encode_kind & SEC_ASN1_CLASS_MASK) == SEC_ASN1_UNIVERSAL)
  ------------------
  |  |  120|  1.62k|#define SEC_ASN1_UNIVERSAL 0x00
  ------------------
  |  Branch (493:17): [True: 1.62k, False: 0]
  ------------------
  494|  1.62k|                    ? PR_TRUE
  ------------------
  |  |  437|  1.62k|#define PR_TRUE 1
  ------------------
  495|  1.62k|                    : PR_FALSE;
  ------------------
  |  |  438|  1.62k|#define PR_FALSE 0
  ------------------
  496|       |
  497|  1.62k|    isExplicit = (encode_kind & SEC_ASN1_EXPLICIT) ? PR_TRUE : PR_FALSE;
  ------------------
  |  |  132|  1.62k|#define SEC_ASN1_EXPLICIT 0x00200
  ------------------
                  isExplicit = (encode_kind & SEC_ASN1_EXPLICIT) ? PR_TRUE : PR_FALSE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
                  isExplicit = (encode_kind & SEC_ASN1_EXPLICIT) ? PR_TRUE : PR_FALSE;
  ------------------
  |  |  438|  3.24k|#define PR_FALSE 0
  ------------------
  |  Branch (497:18): [True: 0, False: 1.62k]
  ------------------
  498|  1.62k|    encode_kind &= ~SEC_ASN1_EXPLICIT;
  ------------------
  |  |  132|  1.62k|#define SEC_ASN1_EXPLICIT 0x00200
  ------------------
  499|       |
  500|  1.62k|    optional = (encode_kind & SEC_ASN1_OPTIONAL) ? PR_TRUE : PR_FALSE;
  ------------------
  |  |  131|  1.62k|#define SEC_ASN1_OPTIONAL 0x00100
  ------------------
                  optional = (encode_kind & SEC_ASN1_OPTIONAL) ? PR_TRUE : PR_FALSE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
                  optional = (encode_kind & SEC_ASN1_OPTIONAL) ? PR_TRUE : PR_FALSE;
  ------------------
  |  |  438|  3.24k|#define PR_FALSE 0
  ------------------
  |  Branch (500:16): [True: 0, False: 1.62k]
  ------------------
  501|  1.62k|    encode_kind &= ~SEC_ASN1_OPTIONAL;
  ------------------
  |  |  131|  1.62k|#define SEC_ASN1_OPTIONAL 0x00100
  ------------------
  502|       |
  503|  1.62k|    PORT_Assert(!(isExplicit && universal)); /* bad templates */
  ------------------
  |  |  120|  1.62k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.62k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 0, False: 1.62k]
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  504|       |
  505|  1.62k|    may_stream = (encode_kind & SEC_ASN1_MAY_STREAM) ? PR_TRUE : PR_FALSE;
  ------------------
  |  |  146|  1.62k|#define SEC_ASN1_MAY_STREAM 0x40000   /* field or one of its sub-fields may \
  ------------------
                  may_stream = (encode_kind & SEC_ASN1_MAY_STREAM) ? PR_TRUE : PR_FALSE;
  ------------------
  |  |  437|  1.62k|#define PR_TRUE 1
  ------------------
                  may_stream = (encode_kind & SEC_ASN1_MAY_STREAM) ? PR_TRUE : PR_FALSE;
  ------------------
  |  |  438|  1.62k|#define PR_FALSE 0
  ------------------
  |  Branch (505:18): [True: 1.62k, False: 0]
  ------------------
  506|  1.62k|    encode_kind &= ~SEC_ASN1_MAY_STREAM;
  ------------------
  |  |  146|  1.62k|#define SEC_ASN1_MAY_STREAM 0x40000   /* field or one of its sub-fields may \
  ------------------
  507|       |
  508|       |    /* Just clear this to get it out of the way; we do not need it here */
  509|  1.62k|    encode_kind &= ~SEC_ASN1_DYNAMIC;
  ------------------
  |  |  138|  1.62k|#define SEC_ASN1_DYNAMIC 0x04000      /* subtemplate is found by calling \
  ------------------
  510|       |
  511|  1.62k|    if (encode_kind & SEC_ASN1_NO_STREAM) {
  ------------------
  |  |  154|  1.62k|#define SEC_ASN1_NO_STREAM 0X200000   /* This entry will not stream          \
  ------------------
  |  Branch (511:9): [True: 0, False: 1.62k]
  ------------------
  512|      0|        disallowStreaming = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  513|      0|    }
  514|  1.62k|    encode_kind &= ~SEC_ASN1_NO_STREAM;
  ------------------
  |  |  154|  1.62k|#define SEC_ASN1_NO_STREAM 0X200000   /* This entry will not stream          \
  ------------------
  515|       |
  516|  1.62k|    if (encode_kind & SEC_ASN1_CHOICE) {
  ------------------
  |  |  153|  1.62k|#define SEC_ASN1_CHOICE 0x100000      /* pick one from a template */
  ------------------
  |  Branch (516:9): [True: 0, False: 1.62k]
  ------------------
  517|      0|        void *src2;
  518|      0|        int indx = sec_asn1e_which_choice(src, theTemplate);
  519|      0|        if (0 == indx) {
  ------------------
  |  Branch (519:13): [True: 0, False: 0]
  ------------------
  520|       |            /* XXX set an error? "choice not found" */
  521|       |            /* state->top->status = encodeError; */
  522|      0|            return 0;
  523|      0|        }
  524|       |
  525|      0|        src2 = (void *)((char *)src - theTemplate->offset + theTemplate[indx].offset);
  526|       |
  527|      0|        return sec_asn1e_contents_length(&theTemplate[indx], src2,
  528|      0|                                         disallowStreaming, insideIndefinite,
  529|      0|                                         pHdrException);
  530|      0|    }
  531|       |
  532|  1.62k|    if ((encode_kind & (SEC_ASN1_POINTER | SEC_ASN1_INLINE)) || !universal) {
  ------------------
  |  |  135|  1.62k|#define SEC_ASN1_POINTER 0x01000
  ------------------
                  if ((encode_kind & (SEC_ASN1_POINTER | SEC_ASN1_INLINE)) || !universal) {
  ------------------
  |  |  134|  1.62k|#define SEC_ASN1_INLINE 0x00800
  ------------------
  |  Branch (532:9): [True: 0, False: 1.62k]
  |  Branch (532:65): [True: 0, False: 1.62k]
  ------------------
  533|       |        /* XXX any bits we want to disallow (PORT_Assert against) here? */
  534|      0|        theTemplate = SEC_ASN1GetSubtemplate(theTemplate, src, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  535|      0|        if (encode_kind & SEC_ASN1_POINTER) {
  ------------------
  |  |  135|      0|#define SEC_ASN1_POINTER 0x01000
  ------------------
  |  Branch (535:13): [True: 0, False: 0]
  ------------------
  536|      0|            src = *(void **)src;
  537|      0|            if (src == NULL) {
  ------------------
  |  Branch (537:17): [True: 0, False: 0]
  ------------------
  538|      0|                *pHdrException = optional ? hdr_optional : hdr_normal;
  ------------------
  |  Branch (538:34): [True: 0, False: 0]
  ------------------
  539|      0|                return 0;
  540|      0|            }
  541|      0|        } else if (encode_kind & SEC_ASN1_INLINE) {
  ------------------
  |  |  134|      0|#define SEC_ASN1_INLINE 0x00800
  ------------------
  |  Branch (541:20): [True: 0, False: 0]
  ------------------
  542|       |            /* check that there are no extraneous bits */
  543|      0|            if (optional) {
  ------------------
  |  Branch (543:17): [True: 0, False: 0]
  ------------------
  544|      0|                if (PR_FALSE != SEC_ASN1IsTemplateSimple(theTemplate)) {
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  |  Branch (544:21): [True: 0, False: 0]
  ------------------
  545|       |                    /* we now know that the target is a SECItem*, so we can check
  546|       |                       if the source contains one */
  547|      0|                    SECItem *target = (SECItem *)src;
  548|      0|                    if (!target || !target->data || !target->len) {
  ------------------
  |  Branch (548:25): [True: 0, False: 0]
  |  Branch (548:36): [True: 0, False: 0]
  |  Branch (548:53): [True: 0, False: 0]
  ------------------
  549|       |                        /* no valid data to encode subtemplate */
  550|      0|                        *pHdrException = hdr_optional;
  551|      0|                        return 0;
  552|      0|                    }
  553|      0|                } else {
  554|      0|                    PORT_Assert(0); /* complex templates not handled as inline
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  555|       |                                       optional */
  556|      0|                }
  557|      0|            }
  558|      0|        }
  559|       |
  560|      0|        src = (char *)src + theTemplate->offset;
  561|       |
  562|       |        /* recurse to find the length of the subtemplate */
  563|      0|        len = sec_asn1e_contents_length(theTemplate, src, disallowStreaming,
  564|      0|                                        insideIndefinite, pHdrException);
  565|      0|        if (len == 0 && optional) {
  ------------------
  |  Branch (565:13): [True: 0, False: 0]
  |  Branch (565:25): [True: 0, False: 0]
  ------------------
  566|      0|            *pHdrException = hdr_optional;
  567|      0|        } else if (isExplicit) {
  ------------------
  |  Branch (567:20): [True: 0, False: 0]
  ------------------
  568|      0|            if (*pHdrException == hdr_any) {
  ------------------
  |  Branch (568:17): [True: 0, False: 0]
  ------------------
  569|       |                /* *we* do not want to add in a header,
  570|       |                ** but our caller still does.
  571|       |                */
  572|      0|                *pHdrException = hdr_normal;
  573|      0|            } else if (*pHdrException == hdr_normal) {
  ------------------
  |  Branch (573:24): [True: 0, False: 0]
  ------------------
  574|       |                /* if the inner content exists, our length is
  575|       |                 * len(identifier) + len(length) + len(innercontent)
  576|       |                 * XXX we currently assume len(identifier) == 1;
  577|       |                 * to support a high-tag-number this would need to be smarter.
  578|       |                 */
  579|      0|                len += 1 + SEC_ASN1LengthLength(len);
  ------------------
  |  |  101|      0|#define SEC_ASN1LengthLength SEC_ASN1LengthLength_Util
  ------------------
  580|      0|            }
  581|      0|        }
  582|      0|        return len;
  583|      0|    }
  584|  1.62k|    underlying_kind = encode_kind;
  585|       |
  586|       |    /* This is only used in decoding; it plays no part in encoding.  */
  587|  1.62k|    if (underlying_kind & SEC_ASN1_SAVE) {
  ------------------
  |  |  144|  1.62k|#define SEC_ASN1_SAVE 0x20000         /* stash away the encoded bytes first; \
  ------------------
  |  Branch (587:9): [True: 0, False: 1.62k]
  ------------------
  588|       |        /* check that there are no extraneous bits */
  589|      0|        PORT_Assert(underlying_kind == SEC_ASN1_SAVE);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  590|      0|        *pHdrException = hdr_decoder;
  591|      0|        return 0;
  592|      0|    }
  593|       |
  594|  1.62k|#define UNEXPECTED_FLAGS                                                          \
  595|  1.62k|    (SEC_ASN1_EXPLICIT | SEC_ASN1_OPTIONAL | SEC_ASN1_INLINE | SEC_ASN1_POINTER | \
  596|  1.62k|     SEC_ASN1_DYNAMIC | SEC_ASN1_MAY_STREAM | SEC_ASN1_SAVE | SEC_ASN1_SKIP)
  597|       |
  598|       |    /* Having any of these bits is not expected here...  */
  599|  1.62k|    PORT_Assert((underlying_kind & UNEXPECTED_FLAGS) == 0);
  ------------------
  |  |  120|  1.62k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.62k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.62k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  600|  1.62k|    underlying_kind &= ~UNEXPECTED_FLAGS;
  ------------------
  |  |  595|  1.62k|    (SEC_ASN1_EXPLICIT | SEC_ASN1_OPTIONAL | SEC_ASN1_INLINE | SEC_ASN1_POINTER | \
  |  |  ------------------
  |  |  |  |  132|  1.62k|#define SEC_ASN1_EXPLICIT 0x00200
  |  |  ------------------
  |  |                   (SEC_ASN1_EXPLICIT | SEC_ASN1_OPTIONAL | SEC_ASN1_INLINE | SEC_ASN1_POINTER | \
  |  |  ------------------
  |  |  |  |  131|  1.62k|#define SEC_ASN1_OPTIONAL 0x00100
  |  |  ------------------
  |  |                   (SEC_ASN1_EXPLICIT | SEC_ASN1_OPTIONAL | SEC_ASN1_INLINE | SEC_ASN1_POINTER | \
  |  |  ------------------
  |  |  |  |  134|  1.62k|#define SEC_ASN1_INLINE 0x00800
  |  |  ------------------
  |  |                   (SEC_ASN1_EXPLICIT | SEC_ASN1_OPTIONAL | SEC_ASN1_INLINE | SEC_ASN1_POINTER | \
  |  |  ------------------
  |  |  |  |  135|  1.62k|#define SEC_ASN1_POINTER 0x01000
  |  |  ------------------
  |  |  596|  1.62k|     SEC_ASN1_DYNAMIC | SEC_ASN1_MAY_STREAM | SEC_ASN1_SAVE | SEC_ASN1_SKIP)
  |  |  ------------------
  |  |  |  |  138|  1.62k|#define SEC_ASN1_DYNAMIC 0x04000      /* subtemplate is found by calling \
  |  |  ------------------
  |  |                    SEC_ASN1_DYNAMIC | SEC_ASN1_MAY_STREAM | SEC_ASN1_SAVE | SEC_ASN1_SKIP)
  |  |  ------------------
  |  |  |  |  146|  1.62k|#define SEC_ASN1_MAY_STREAM 0x40000   /* field or one of its sub-fields may \
  |  |  ------------------
  |  |                    SEC_ASN1_DYNAMIC | SEC_ASN1_MAY_STREAM | SEC_ASN1_SAVE | SEC_ASN1_SKIP)
  |  |  ------------------
  |  |  |  |  144|  1.62k|#define SEC_ASN1_SAVE 0x20000         /* stash away the encoded bytes first; \
  |  |  ------------------
  |  |                    SEC_ASN1_DYNAMIC | SEC_ASN1_MAY_STREAM | SEC_ASN1_SAVE | SEC_ASN1_SKIP)
  |  |  ------------------
  |  |  |  |  140|  1.62k|#define SEC_ASN1_SKIP 0x08000         /* skip a field; only for decoding */
  |  |  ------------------
  ------------------
  601|  1.62k|#undef UNEXPECTED_FLAGS
  602|       |
  603|  1.62k|    if (underlying_kind & SEC_ASN1_CHOICE) {
  ------------------
  |  |  153|  1.62k|#define SEC_ASN1_CHOICE 0x100000      /* pick one from a template */
  ------------------
  |  Branch (603:9): [True: 0, False: 1.62k]
  ------------------
  604|      0|        void *src2;
  605|      0|        int indx = sec_asn1e_which_choice(src, theTemplate);
  606|      0|        if (0 == indx) {
  ------------------
  |  Branch (606:13): [True: 0, False: 0]
  ------------------
  607|       |            /* XXX set an error? "choice not found" */
  608|       |            /* state->top->status = encodeError; */
  609|      0|            return 0;
  610|      0|        }
  611|       |
  612|      0|        src2 = (void *)((char *)src - theTemplate->offset + theTemplate[indx].offset);
  613|      0|        len = sec_asn1e_contents_length(&theTemplate[indx], src2,
  614|      0|                                        disallowStreaming, insideIndefinite,
  615|      0|                                        pHdrException);
  616|  1.62k|    } else {
  617|  1.62k|        switch (underlying_kind) {
  618|      0|            case SEC_ASN1_SEQUENCE_OF:
  ------------------
  |  |  166|      0|#define SEC_ASN1_SEQUENCE_OF (SEC_ASN1_GROUP | SEC_ASN1_SEQUENCE)
  |  |  ------------------
  |  |  |  |  136|      0|#define SEC_ASN1_GROUP 0x02000        /* with SET or SEQUENCE means \
  |  |  ------------------
  |  |               #define SEC_ASN1_SEQUENCE_OF (SEC_ASN1_GROUP | SEC_ASN1_SEQUENCE)
  |  |  ------------------
  |  |  |  |   92|      0|#define SEC_ASN1_SEQUENCE 0x10
  |  |  ------------------
  ------------------
  |  Branch (618:13): [True: 0, False: 1.62k]
  ------------------
  619|      0|            case SEC_ASN1_SET_OF: {
  ------------------
  |  |  167|      0|#define SEC_ASN1_SET_OF (SEC_ASN1_GROUP | SEC_ASN1_SET)
  |  |  ------------------
  |  |  |  |  136|      0|#define SEC_ASN1_GROUP 0x02000        /* with SET or SEQUENCE means \
  |  |  ------------------
  |  |               #define SEC_ASN1_SET_OF (SEC_ASN1_GROUP | SEC_ASN1_SET)
  |  |  ------------------
  |  |  |  |   93|      0|#define SEC_ASN1_SET 0x11
  |  |  ------------------
  ------------------
  |  Branch (619:13): [True: 0, False: 1.62k]
  ------------------
  620|      0|                const SEC_ASN1Template *tmpt;
  621|      0|                void *sub_src;
  622|      0|                unsigned long sub_len;
  623|      0|                void **group;
  624|       |
  625|      0|                len = 0;
  626|       |
  627|      0|                group = *(void ***)src;
  628|      0|                if (group == NULL)
  ------------------
  |  Branch (628:21): [True: 0, False: 0]
  ------------------
  629|      0|                    break;
  630|       |
  631|      0|                tmpt = SEC_ASN1GetSubtemplate(theTemplate, src, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  632|       |
  633|      0|                for (; *group != NULL; group++) {
  ------------------
  |  Branch (633:24): [True: 0, False: 0]
  ------------------
  634|      0|                    sub_src = (char *)(*group) + tmpt->offset;
  635|      0|                    sub_len = sec_asn1e_contents_length(tmpt, sub_src,
  636|      0|                                                        disallowStreaming,
  637|      0|                                                        insideIndefinite,
  638|      0|                                                        pHdrException);
  639|      0|                    len += sub_len;
  640|       |                    /*
  641|       |                     * XXX The 1 below is the presumed length of the identifier;
  642|       |                     * to support a high-tag-number this would need to be smarter.
  643|       |                     */
  644|      0|                    if (*pHdrException == hdr_normal)
  ------------------
  |  Branch (644:25): [True: 0, False: 0]
  ------------------
  645|      0|                        len += 1 + SEC_ASN1LengthLength(sub_len);
  ------------------
  |  |  101|      0|#define SEC_ASN1LengthLength SEC_ASN1LengthLength_Util
  ------------------
  646|      0|                }
  647|      0|            } break;
  648|       |
  649|      0|            case SEC_ASN1_SEQUENCE:
  ------------------
  |  |   92|      0|#define SEC_ASN1_SEQUENCE 0x10
  ------------------
  |  Branch (649:13): [True: 0, False: 1.62k]
  ------------------
  650|      0|            case SEC_ASN1_SET: {
  ------------------
  |  |   93|      0|#define SEC_ASN1_SET 0x11
  ------------------
  |  Branch (650:13): [True: 0, False: 1.62k]
  ------------------
  651|      0|                const SEC_ASN1Template *tmpt;
  652|      0|                void *sub_src;
  653|      0|                unsigned long sub_len;
  654|       |
  655|      0|                len = 0;
  656|      0|                for (tmpt = theTemplate + 1; tmpt->kind; tmpt++) {
  ------------------
  |  Branch (656:46): [True: 0, False: 0]
  ------------------
  657|      0|                    sub_src = (char *)src + tmpt->offset;
  658|      0|                    sub_len = sec_asn1e_contents_length(tmpt, sub_src,
  659|      0|                                                        disallowStreaming,
  660|      0|                                                        insideIndefinite,
  661|      0|                                                        pHdrException);
  662|      0|                    len += sub_len;
  663|       |                    /*
  664|       |                     * XXX The 1 below is the presumed length of the identifier;
  665|       |                     * to support a high-tag-number this would need to be smarter.
  666|       |                     */
  667|      0|                    if (*pHdrException == hdr_normal)
  ------------------
  |  Branch (667:25): [True: 0, False: 0]
  ------------------
  668|      0|                        len += 1 + SEC_ASN1LengthLength(sub_len);
  ------------------
  |  |  101|      0|#define SEC_ASN1LengthLength SEC_ASN1LengthLength_Util
  ------------------
  669|      0|                }
  670|      0|            } break;
  671|       |
  672|      0|            case SEC_ASN1_BIT_STRING:
  ------------------
  |  |   79|      0|#define SEC_ASN1_BIT_STRING 0x03
  ------------------
  |  Branch (672:13): [True: 0, False: 1.62k]
  ------------------
  673|       |                /* convert bit length to byte */
  674|      0|                len = (((SECItem *)src)->len + 7) >> 3;
  675|       |                /* bit string contents involve an extra octet */
  676|      0|                if (len)
  ------------------
  |  Branch (676:21): [True: 0, False: 0]
  ------------------
  677|      0|                    len++;
  678|      0|                break;
  679|       |
  680|      0|            case SEC_ASN1_INTEGER:
  ------------------
  |  |   78|      0|#define SEC_ASN1_INTEGER 0x02
  ------------------
  |  Branch (680:13): [True: 0, False: 1.62k]
  ------------------
  681|       |                /* ASN.1 INTEGERs are signed.
  682|       |                 * If the source is an unsigned integer, the encoder will need
  683|       |                 * to handle the conversion here.
  684|       |                 */
  685|      0|                {
  686|      0|                    unsigned char *buf = ((SECItem *)src)->data;
  687|      0|                    SECItemType integerType = ((SECItem *)src)->type;
  688|      0|                    len = ((SECItem *)src)->len;
  689|      0|                    while (len > 0) {
  ------------------
  |  Branch (689:28): [True: 0, False: 0]
  ------------------
  690|      0|                        if (*buf != 0) {
  ------------------
  |  Branch (690:29): [True: 0, False: 0]
  ------------------
  691|      0|                            if (*buf & 0x80 && integerType == siUnsignedInteger) {
  ------------------
  |  Branch (691:33): [True: 0, False: 0]
  |  Branch (691:48): [True: 0, False: 0]
  ------------------
  692|      0|                                len++; /* leading zero needed to make number signed */
  693|      0|                            }
  694|      0|                            break; /* reached beginning of number */
  695|      0|                        }
  696|      0|                        if (len == 1) {
  ------------------
  |  Branch (696:29): [True: 0, False: 0]
  ------------------
  697|      0|                            break; /* the number 0 */
  698|      0|                        }
  699|      0|                        if (buf[1] & 0x80) {
  ------------------
  |  Branch (699:29): [True: 0, False: 0]
  ------------------
  700|      0|                            break; /* leading zero already present */
  701|      0|                        }
  702|       |                        /* extraneous leading zero, keep going */
  703|      0|                        buf++;
  704|      0|                        len--;
  705|      0|                    }
  706|      0|                }
  707|      0|                break;
  708|       |
  709|  1.62k|            default:
  ------------------
  |  Branch (709:13): [True: 1.62k, False: 0]
  ------------------
  710|  1.62k|                len = ((SECItem *)src)->len;
  711|  1.62k|                break;
  712|  1.62k|        } /* end switch */
  713|       |
  714|  1.62k|#ifndef WHAT_PROBLEM_DOES_THIS_SOLVE
  715|       |        /* if we're streaming, we may have a secitem w/len 0 as placeholder */
  716|  1.62k|        if (!len && insideIndefinite && may_stream && !disallowStreaming) {
  ------------------
  |  Branch (716:13): [True: 0, False: 1.62k]
  |  Branch (716:21): [True: 0, False: 0]
  |  Branch (716:41): [True: 0, False: 0]
  |  Branch (716:55): [True: 0, False: 0]
  ------------------
  717|      0|            len = 1;
  718|      0|        }
  719|  1.62k|#endif
  720|  1.62k|    } /* end else */
  721|       |
  722|  1.62k|    if (len == 0 && optional)
  ------------------
  |  Branch (722:9): [True: 0, False: 1.62k]
  |  Branch (722:21): [True: 0, False: 0]
  ------------------
  723|      0|        *pHdrException = hdr_optional;
  724|  1.62k|    else if (underlying_kind == SEC_ASN1_ANY)
  ------------------
  |  |  133|  1.62k|#define SEC_ASN1_ANY 0x00400
  ------------------
  |  Branch (724:14): [True: 0, False: 1.62k]
  ------------------
  725|      0|        *pHdrException = hdr_any;
  726|  1.62k|    else
  727|  1.62k|        *pHdrException = hdr_normal;
  728|       |
  729|  1.62k|    return len;
  730|  1.62k|}
secasn1e.c:sec_asn1e_write_identifier_bytes:
  388|  1.62k|{
  389|  1.62k|    char byte;
  390|       |
  391|  1.62k|    byte = (char)value;
  392|  1.62k|    sec_asn1e_write_part(state, &byte, 1, SEC_ASN1_Identifier);
  393|  1.62k|}
secasn1e.c:sec_asn1e_write_part:
  374|  4.86k|{
  375|  4.86k|    SEC_ASN1EncoderContext *cx;
  376|       |
  377|  4.86k|    cx = state->top;
  378|  4.86k|    (*cx->output_proc)(cx->output_arg, buf, len, state->depth, part);
  379|  4.86k|}
secasn1e.c:sec_asn1e_write_length_bytes:
  420|  1.62k|{
  421|  1.62k|    int lenlen;
  422|  1.62k|    unsigned char buf[sizeof(unsigned long) + 1];
  423|       |
  424|  1.62k|    if (indefinite) {
  ------------------
  |  Branch (424:9): [True: 0, False: 1.62k]
  ------------------
  425|      0|        PORT_Assert(value == 0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  426|      0|        buf[0] = 0x80;
  427|      0|        lenlen = 1;
  428|  1.62k|    } else {
  429|  1.62k|        lenlen = SEC_ASN1EncodeLength(buf, value);
  430|  1.62k|    }
  431|       |
  432|  1.62k|    sec_asn1e_write_part(state, (char *)buf, lenlen, SEC_ASN1_Length);
  433|  1.62k|}
secasn1e.c:sec_asn1e_write_contents_bytes:
  438|  1.62k|{
  439|  1.62k|    sec_asn1e_write_part(state, buf, len, SEC_ASN1_Contents);
  440|  1.62k|}
secasn1e.c:sec_asn1e_write_contents:
  981|  1.62k|{
  982|  1.62k|    unsigned long len = 0;
  983|       |
  984|  1.62k|    PORT_Assert(state->place == duringContents);
  ------------------
  |  |  120|  1.62k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.62k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.62k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  985|       |
  986|  1.62k|    switch (state->underlying_kind) {
  987|      0|        case SEC_ASN1_SET:
  ------------------
  |  |   93|      0|#define SEC_ASN1_SET 0x11
  ------------------
  |  Branch (987:9): [True: 0, False: 1.62k]
  ------------------
  988|      0|        case SEC_ASN1_SEQUENCE:
  ------------------
  |  |   92|      0|#define SEC_ASN1_SEQUENCE 0x10
  ------------------
  |  Branch (988:9): [True: 0, False: 1.62k]
  ------------------
  989|      0|            PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  990|      0|            break;
  991|       |
  992|      0|        case SEC_ASN1_BIT_STRING: {
  ------------------
  |  |   79|      0|#define SEC_ASN1_BIT_STRING 0x03
  ------------------
  |  Branch (992:9): [True: 0, False: 1.62k]
  ------------------
  993|      0|            SECItem *item;
  994|      0|            char rem;
  995|       |
  996|      0|            item = (SECItem *)state->src;
  997|      0|            len = (item->len + 7) >> 3;
  998|      0|            rem = (unsigned char)((len << 3) - item->len); /* remaining bits */
  999|      0|            sec_asn1e_write_contents_bytes(state, &rem, 1);
 1000|      0|            sec_asn1e_write_contents_bytes(state, (char *)item->data, len);
 1001|      0|        } break;
 1002|       |
 1003|      0|        case SEC_ASN1_BMP_STRING:
  ------------------
  |  |  106|      0|#define SEC_ASN1_BMP_STRING 0x1e
  ------------------
  |  Branch (1003:9): [True: 0, False: 1.62k]
  ------------------
 1004|       |            /* The number of bytes must be divisable by 2 */
 1005|      0|            if ((((SECItem *)state->src)->len) % 2) {
  ------------------
  |  Branch (1005:17): [True: 0, False: 0]
  ------------------
 1006|      0|                SEC_ASN1EncoderContext *cx;
 1007|       |
 1008|      0|                cx = state->top;
 1009|      0|                cx->status = encodeError;
 1010|      0|                break;
 1011|      0|            }
 1012|       |            /* otherwise, fall through to write the content */
 1013|      0|            goto process_string;
 1014|       |
 1015|      0|        case SEC_ASN1_UNIVERSAL_STRING:
  ------------------
  |  |  104|      0|#define SEC_ASN1_UNIVERSAL_STRING 0x1c
  ------------------
  |  Branch (1015:9): [True: 0, False: 1.62k]
  ------------------
 1016|       |            /* The number of bytes must be divisable by 4 */
 1017|      0|            if ((((SECItem *)state->src)->len) % 4) {
  ------------------
  |  Branch (1017:17): [True: 0, False: 0]
  ------------------
 1018|      0|                SEC_ASN1EncoderContext *cx;
 1019|       |
 1020|      0|                cx = state->top;
 1021|      0|                cx->status = encodeError;
 1022|      0|                break;
 1023|      0|            }
 1024|       |            /* otherwise, fall through to write the content */
 1025|      0|            goto process_string;
 1026|       |
 1027|      0|        case SEC_ASN1_INTEGER:
  ------------------
  |  |   78|      0|#define SEC_ASN1_INTEGER 0x02
  ------------------
  |  Branch (1027:9): [True: 0, False: 1.62k]
  ------------------
 1028|       |            /* ASN.1 INTEGERs are signed.  If the source is an unsigned
 1029|       |             * integer, the encoder will need to handle the conversion here.
 1030|       |             */
 1031|      0|            {
 1032|      0|                unsigned int blen;
 1033|      0|                unsigned char *buf;
 1034|      0|                SECItemType integerType;
 1035|      0|                blen = ((SECItem *)state->src)->len;
 1036|      0|                buf = ((SECItem *)state->src)->data;
 1037|      0|                integerType = ((SECItem *)state->src)->type;
 1038|      0|                while (blen > 0) {
  ------------------
  |  Branch (1038:24): [True: 0, False: 0]
  ------------------
 1039|      0|                    if (*buf & 0x80 && integerType == siUnsignedInteger) {
  ------------------
  |  Branch (1039:25): [True: 0, False: 0]
  |  Branch (1039:40): [True: 0, False: 0]
  ------------------
 1040|      0|                        char zero = 0; /* write a leading 0 */
 1041|      0|                        sec_asn1e_write_contents_bytes(state, &zero, 1);
 1042|       |                        /* and then the remaining buffer */
 1043|      0|                        sec_asn1e_write_contents_bytes(state,
 1044|      0|                                                       (char *)buf, blen);
 1045|      0|                        break;
 1046|      0|                    }
 1047|       |                    /* Check three possibilities:
 1048|       |                     * 1.  No leading zeros, msb of MSB is not 1;
 1049|       |                     * 2.  The number is zero itself;
 1050|       |                     * 3.  Encoding a signed integer with a leading zero,
 1051|       |                     *     keep the zero so that the number is positive.
 1052|       |                     */
 1053|      0|                    if (*buf != 0 ||
  ------------------
  |  Branch (1053:25): [True: 0, False: 0]
  ------------------
 1054|      0|                        blen == 1 ||
  ------------------
  |  Branch (1054:25): [True: 0, False: 0]
  ------------------
 1055|      0|                        (buf[1] & 0x80 && integerType != siUnsignedInteger)) {
  ------------------
  |  Branch (1055:26): [True: 0, False: 0]
  |  Branch (1055:43): [True: 0, False: 0]
  ------------------
 1056|      0|                        sec_asn1e_write_contents_bytes(state,
 1057|      0|                                                       (char *)buf, blen);
 1058|      0|                        break;
 1059|      0|                    }
 1060|       |                    /* byte is 0, continue */
 1061|      0|                    buf++;
 1062|      0|                    blen--;
 1063|      0|                }
 1064|      0|            }
 1065|       |            /* done with this content */
 1066|      0|            break;
 1067|       |
 1068|      0|        process_string:
 1069|  1.62k|        default: {
  ------------------
  |  Branch (1069:9): [True: 1.62k, False: 0]
  ------------------
 1070|  1.62k|            SECItem *item;
 1071|       |
 1072|  1.62k|            item = (SECItem *)state->src;
 1073|  1.62k|            sec_asn1e_write_contents_bytes(state, (char *)item->data,
 1074|  1.62k|                                           item->len);
 1075|  1.62k|        } break;
 1076|  1.62k|    }
 1077|  1.62k|    state->place = afterContents;
 1078|  1.62k|}
secasn1e.c:sec_asn1e_scrub_state:
  130|  1.62k|{
  131|       |    /*
  132|       |     * Some default "scrubbing".
  133|       |     * XXX right set of initializations?
  134|       |     */
  135|  1.62k|    state->place = beforeHeader;
  136|  1.62k|    state->indefinite = PR_FALSE;
  ------------------
  |  |  438|  1.62k|#define PR_FALSE 0
  ------------------
  137|  1.62k|}
secasn1e.c:sec_asn1e_after_contents:
 1174|  1.62k|{
 1175|  1.62k|    PORT_Assert(state->place == afterContents);
  ------------------
  |  |  120|  1.62k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.62k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.62k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1176|       |
 1177|  1.62k|    if (state->indefinite)
  ------------------
  |  Branch (1177:9): [True: 0, False: 1.62k]
  ------------------
 1178|      0|        sec_asn1e_write_end_of_contents_bytes(state);
 1179|       |
 1180|       |    /*
 1181|       |     * Just make my parent be the current state.  It will then clean
 1182|       |     * up after me and free me (or reuse me).
 1183|       |     */
 1184|  1.62k|    state->top->current = state->parent;
 1185|  1.62k|}
secasn1e.c:sec_asn1e_push_state:
   94|  1.62k|{
   95|  1.62k|    sec_asn1e_state *state, *new_state;
   96|       |
   97|  1.62k|    if (theTemplate == NULL) {
  ------------------
  |  Branch (97:9): [True: 0, False: 1.62k]
  ------------------
   98|      0|        cx->status = encodeError;
   99|      0|        return NULL;
  100|      0|    }
  101|       |
  102|  1.62k|    state = cx->current;
  103|  1.62k|    new_state = (sec_asn1e_state *)PORT_ArenaZAlloc(cx->our_pool,
  ------------------
  |  |   59|  1.62k|#define PORT_ArenaZAlloc PORT_ArenaZAlloc_Util
  ------------------
  104|  1.62k|                                                    sizeof(*new_state));
  105|  1.62k|    if (new_state == NULL) {
  ------------------
  |  Branch (105:9): [True: 0, False: 1.62k]
  ------------------
  106|      0|        cx->status = encodeError;
  107|      0|        return NULL;
  108|      0|    }
  109|       |
  110|  1.62k|    new_state->top = cx;
  111|  1.62k|    new_state->parent = state;
  112|  1.62k|    new_state->theTemplate = theTemplate;
  113|  1.62k|    new_state->place = notInUse;
  114|  1.62k|    if (src != NULL)
  ------------------
  |  Branch (114:9): [True: 1.62k, False: 0]
  ------------------
  115|  1.62k|        new_state->src = (char *)src + theTemplate->offset;
  116|       |
  117|  1.62k|    if (state != NULL) {
  ------------------
  |  Branch (117:9): [True: 0, False: 1.62k]
  ------------------
  118|      0|        new_state->depth = state->depth;
  119|      0|        if (new_depth)
  ------------------
  |  Branch (119:13): [True: 0, False: 0]
  ------------------
  120|      0|            new_state->depth++;
  121|      0|        state->child = new_state;
  122|      0|    }
  123|       |
  124|  1.62k|    cx->current = new_state;
  125|  1.62k|    return new_state;
  126|  1.62k|}
secasn1e.c:sec_asn1e_init_state_based_on_template:
  163|  1.62k|{
  164|  1.62k|    PRBool isExplicit, is_string, may_stream, optional, universal;
  165|  1.62k|    PRBool disallowStreaming;
  166|  1.62k|    unsigned char tag_modifiers;
  167|  1.62k|    unsigned long encode_kind, under_kind;
  168|  1.62k|    unsigned long tag_number;
  169|  1.62k|    PRBool isInline = PR_FALSE;
  ------------------
  |  |  438|  1.62k|#define PR_FALSE 0
  ------------------
  170|       |
  171|  1.62k|    encode_kind = state->theTemplate->kind;
  172|       |
  173|  1.62k|    universal = ((encode_kind & SEC_ASN1_CLASS_MASK) == SEC_ASN1_UNIVERSAL)
  ------------------
  |  |  119|  1.62k|#define SEC_ASN1_CLASS_MASK 0xc0
  ------------------
                  universal = ((encode_kind & SEC_ASN1_CLASS_MASK) == SEC_ASN1_UNIVERSAL)
  ------------------
  |  |  120|  1.62k|#define SEC_ASN1_UNIVERSAL 0x00
  ------------------
  |  Branch (173:17): [True: 1.62k, False: 0]
  ------------------
  174|  1.62k|                    ? PR_TRUE
  ------------------
  |  |  437|  1.62k|#define PR_TRUE 1
  ------------------
  175|  1.62k|                    : PR_FALSE;
  ------------------
  |  |  438|  1.62k|#define PR_FALSE 0
  ------------------
  176|       |
  177|  1.62k|    isExplicit = (encode_kind & SEC_ASN1_EXPLICIT) ? PR_TRUE : PR_FALSE;
  ------------------
  |  |  132|  1.62k|#define SEC_ASN1_EXPLICIT 0x00200
  ------------------
                  isExplicit = (encode_kind & SEC_ASN1_EXPLICIT) ? PR_TRUE : PR_FALSE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
                  isExplicit = (encode_kind & SEC_ASN1_EXPLICIT) ? PR_TRUE : PR_FALSE;
  ------------------
  |  |  438|  3.24k|#define PR_FALSE 0
  ------------------
  |  Branch (177:18): [True: 0, False: 1.62k]
  ------------------
  178|  1.62k|    encode_kind &= ~SEC_ASN1_EXPLICIT;
  ------------------
  |  |  132|  1.62k|#define SEC_ASN1_EXPLICIT 0x00200
  ------------------
  179|       |
  180|  1.62k|    optional = (encode_kind & SEC_ASN1_OPTIONAL) ? PR_TRUE : PR_FALSE;
  ------------------
  |  |  131|  1.62k|#define SEC_ASN1_OPTIONAL 0x00100
  ------------------
                  optional = (encode_kind & SEC_ASN1_OPTIONAL) ? PR_TRUE : PR_FALSE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
                  optional = (encode_kind & SEC_ASN1_OPTIONAL) ? PR_TRUE : PR_FALSE;
  ------------------
  |  |  438|  3.24k|#define PR_FALSE 0
  ------------------
  |  Branch (180:16): [True: 0, False: 1.62k]
  ------------------
  181|  1.62k|    encode_kind &= ~SEC_ASN1_OPTIONAL;
  ------------------
  |  |  131|  1.62k|#define SEC_ASN1_OPTIONAL 0x00100
  ------------------
  182|       |
  183|  1.62k|    PORT_Assert(!(isExplicit && universal)); /* bad templates */
  ------------------
  |  |  120|  1.62k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.62k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 0, False: 1.62k]
  |  |  |  |  |  Branch (208:7): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  184|       |
  185|  1.62k|    may_stream = (encode_kind & SEC_ASN1_MAY_STREAM) ? PR_TRUE : PR_FALSE;
  ------------------
  |  |  146|  1.62k|#define SEC_ASN1_MAY_STREAM 0x40000   /* field or one of its sub-fields may \
  ------------------
                  may_stream = (encode_kind & SEC_ASN1_MAY_STREAM) ? PR_TRUE : PR_FALSE;
  ------------------
  |  |  437|  1.62k|#define PR_TRUE 1
  ------------------
                  may_stream = (encode_kind & SEC_ASN1_MAY_STREAM) ? PR_TRUE : PR_FALSE;
  ------------------
  |  |  438|  1.62k|#define PR_FALSE 0
  ------------------
  |  Branch (185:18): [True: 1.62k, False: 0]
  ------------------
  186|  1.62k|    encode_kind &= ~SEC_ASN1_MAY_STREAM;
  ------------------
  |  |  146|  1.62k|#define SEC_ASN1_MAY_STREAM 0x40000   /* field or one of its sub-fields may \
  ------------------
  187|       |
  188|  1.62k|    disallowStreaming = (encode_kind & SEC_ASN1_NO_STREAM) ? PR_TRUE : PR_FALSE;
  ------------------
  |  |  154|  1.62k|#define SEC_ASN1_NO_STREAM 0X200000   /* This entry will not stream          \
  ------------------
                  disallowStreaming = (encode_kind & SEC_ASN1_NO_STREAM) ? PR_TRUE : PR_FALSE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
                  disallowStreaming = (encode_kind & SEC_ASN1_NO_STREAM) ? PR_TRUE : PR_FALSE;
  ------------------
  |  |  438|  3.24k|#define PR_FALSE 0
  ------------------
  |  Branch (188:25): [True: 0, False: 1.62k]
  ------------------
  189|  1.62k|    encode_kind &= ~SEC_ASN1_NO_STREAM;
  ------------------
  |  |  154|  1.62k|#define SEC_ASN1_NO_STREAM 0X200000   /* This entry will not stream          \
  ------------------
  190|       |
  191|       |    /* Just clear this to get it out of the way; we do not need it here */
  192|  1.62k|    encode_kind &= ~SEC_ASN1_DYNAMIC;
  ------------------
  |  |  138|  1.62k|#define SEC_ASN1_DYNAMIC 0x04000      /* subtemplate is found by calling \
  ------------------
  193|       |
  194|  1.62k|    if (encode_kind & SEC_ASN1_CHOICE) {
  ------------------
  |  |  153|  1.62k|#define SEC_ASN1_CHOICE 0x100000      /* pick one from a template */
  ------------------
  |  Branch (194:9): [True: 0, False: 1.62k]
  ------------------
  195|      0|        under_kind = SEC_ASN1_CHOICE;
  ------------------
  |  |  153|      0|#define SEC_ASN1_CHOICE 0x100000      /* pick one from a template */
  ------------------
  196|  1.62k|    } else if ((encode_kind & (SEC_ASN1_POINTER | SEC_ASN1_INLINE)) ||
  ------------------
  |  |  135|  1.62k|#define SEC_ASN1_POINTER 0x01000
  ------------------
                  } else if ((encode_kind & (SEC_ASN1_POINTER | SEC_ASN1_INLINE)) ||
  ------------------
  |  |  134|  1.62k|#define SEC_ASN1_INLINE 0x00800
  ------------------
  |  Branch (196:16): [True: 0, False: 1.62k]
  ------------------
  197|  1.62k|               (!universal && !isExplicit)) {
  ------------------
  |  Branch (197:17): [True: 0, False: 1.62k]
  |  Branch (197:31): [True: 0, False: 0]
  ------------------
  198|      0|        const SEC_ASN1Template *subt;
  199|      0|        void *src = NULL;
  200|       |
  201|      0|        PORT_Assert((encode_kind & (SEC_ASN1_ANY | SEC_ASN1_SKIP)) == 0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  202|       |
  203|      0|        sec_asn1e_scrub_state(state);
  204|       |
  205|      0|        if (encode_kind & SEC_ASN1_POINTER) {
  ------------------
  |  |  135|      0|#define SEC_ASN1_POINTER 0x01000
  ------------------
  |  Branch (205:13): [True: 0, False: 0]
  ------------------
  206|      0|            src = *(void **)state->src;
  207|      0|            state->place = afterPointer;
  208|       |
  209|      0|            if (src == NULL) {
  ------------------
  |  Branch (209:17): [True: 0, False: 0]
  ------------------
  210|       |                /*
  211|       |                 * If this is optional, but NULL, then the field does
  212|       |                 * not need to be encoded.  In this case we are done;
  213|       |                 * we do not want to push a subtemplate.
  214|       |                 */
  215|      0|                if (optional)
  ------------------
  |  Branch (215:21): [True: 0, False: 0]
  ------------------
  216|      0|                    return state;
  217|       |
  218|       |                /*
  219|       |                 * XXX this is an error; need to figure out
  220|       |                 * how to handle this
  221|       |                 */
  222|      0|            }
  223|      0|        } else {
  224|      0|            src = state->src;
  225|      0|            if (encode_kind & SEC_ASN1_INLINE) {
  ------------------
  |  |  134|      0|#define SEC_ASN1_INLINE 0x00800
  ------------------
  |  Branch (225:17): [True: 0, False: 0]
  ------------------
  226|       |                /* check that there are no extraneous bits */
  227|       |                /* PORT_Assert (encode_kind == SEC_ASN1_INLINE && !optional); */
  228|      0|                state->place = afterInline;
  229|      0|                isInline = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  230|      0|            } else {
  231|       |                /*
  232|       |                 * Save the tag modifiers and tag number here before moving
  233|       |                 * on to the next state in case this is a member of a
  234|       |                 * SEQUENCE OF
  235|       |                 */
  236|      0|                state->tag_modifiers = (unsigned char)(encode_kind & (SEC_ASN1_TAG_MASK & ~SEC_ASN1_TAGNUM_MASK));
  ------------------
  |  |   65|      0|#define SEC_ASN1_TAG_MASK 0xff
  ------------------
                              state->tag_modifiers = (unsigned char)(encode_kind & (SEC_ASN1_TAG_MASK & ~SEC_ASN1_TAGNUM_MASK));
  ------------------
  |  |   76|      0|#define SEC_ASN1_TAGNUM_MASK 0x1f
  ------------------
  237|      0|                state->tag_number = (unsigned char)(encode_kind & SEC_ASN1_TAGNUM_MASK);
  ------------------
  |  |   76|      0|#define SEC_ASN1_TAGNUM_MASK 0x1f
  ------------------
  238|       |
  239|      0|                state->place = afterImplicit;
  240|      0|                state->optional = optional;
  241|      0|            }
  242|      0|        }
  243|       |
  244|      0|        subt = SEC_ASN1GetSubtemplate(state->theTemplate, state->src, PR_TRUE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  245|      0|        if (isInline && optional) {
  ------------------
  |  Branch (245:13): [True: 0, False: 0]
  |  Branch (245:25): [True: 0, False: 0]
  ------------------
  246|       |            /* we only handle a very limited set of optional inline cases at
  247|       |               this time */
  248|      0|            if (PR_FALSE != SEC_ASN1IsTemplateSimple(subt)) {
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  |  Branch (248:17): [True: 0, False: 0]
  ------------------
  249|       |                /* we now know that the target is a SECItem*, so we can check
  250|       |                   if the source contains one */
  251|      0|                SECItem *target = (SECItem *)state->src;
  252|      0|                if (!target || !target->data || !target->len) {
  ------------------
  |  Branch (252:21): [True: 0, False: 0]
  |  Branch (252:32): [True: 0, False: 0]
  |  Branch (252:49): [True: 0, False: 0]
  ------------------
  253|       |                    /* no valid data to encode subtemplate */
  254|      0|                    return state;
  255|      0|                }
  256|      0|            } else {
  257|      0|                PORT_Assert(0); /* complex templates are not handled as
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  258|       |                                   inline optional */
  259|      0|            }
  260|      0|        }
  261|      0|        state = sec_asn1e_push_state(state->top, subt, src, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  262|      0|        if (state == NULL)
  ------------------
  |  Branch (262:13): [True: 0, False: 0]
  ------------------
  263|      0|            return state;
  264|       |
  265|      0|        if (universal) {
  ------------------
  |  Branch (265:13): [True: 0, False: 0]
  ------------------
  266|       |            /*
  267|       |             * This is a POINTER or INLINE; just init based on that
  268|       |             * and we are done.
  269|       |             */
  270|      0|            return sec_asn1e_init_state_based_on_template(state);
  271|      0|        }
  272|       |
  273|       |        /*
  274|       |         * This is an implicit, non-universal (meaning, application-private
  275|       |         * or context-specific) field.  This results in a "magic" tag but
  276|       |         * encoding based on the underlying type.  We pushed a new state
  277|       |         * that is based on the subtemplate (the underlying type), but
  278|       |         * now we will sort of alias it to give it some of our properties
  279|       |         * (tag, optional status, etc.).
  280|       |         *
  281|       |         * NB: ALL the following flags in the subtemplate are disallowed
  282|       |         *     and/or ignored: EXPLICIT, OPTIONAL, INNER, INLINE, POINTER.
  283|       |         */
  284|       |
  285|      0|        under_kind = state->theTemplate->kind;
  286|      0|        if ((under_kind & SEC_ASN1_MAY_STREAM) && !disallowStreaming) {
  ------------------
  |  |  146|      0|#define SEC_ASN1_MAY_STREAM 0x40000   /* field or one of its sub-fields may \
  ------------------
  |  Branch (286:13): [True: 0, False: 0]
  |  Branch (286:51): [True: 0, False: 0]
  ------------------
  287|      0|            may_stream = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  288|      0|        }
  289|      0|        under_kind &= ~(SEC_ASN1_MAY_STREAM | SEC_ASN1_DYNAMIC);
  ------------------
  |  |  146|      0|#define SEC_ASN1_MAY_STREAM 0x40000   /* field or one of its sub-fields may \
  ------------------
                      under_kind &= ~(SEC_ASN1_MAY_STREAM | SEC_ASN1_DYNAMIC);
  ------------------
  |  |  138|      0|#define SEC_ASN1_DYNAMIC 0x04000      /* subtemplate is found by calling \
  ------------------
  290|  1.62k|    } else {
  291|  1.62k|        under_kind = encode_kind;
  292|  1.62k|    }
  293|       |
  294|       |/*
  295|       | * Sanity check that there are no unwanted bits marked in under_kind.
  296|       | * These bits were either removed above (after we recorded them) or
  297|       | * they simply should not be found (signalling a bad/broken template).
  298|       | * XXX is this the right set of bits to test here? (i.e. need to add
  299|       | * or remove any?)
  300|       | */
  301|  1.62k|#define UNEXPECTED_FLAGS                                                      \
  302|  1.62k|    (SEC_ASN1_EXPLICIT | SEC_ASN1_OPTIONAL | SEC_ASN1_SKIP | SEC_ASN1_INNER | \
  303|  1.62k|     SEC_ASN1_DYNAMIC | SEC_ASN1_MAY_STREAM | SEC_ASN1_INLINE | SEC_ASN1_POINTER)
  304|       |
  305|  1.62k|    PORT_Assert((under_kind & UNEXPECTED_FLAGS) == 0);
  ------------------
  |  |  120|  1.62k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  1.62k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1.62k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  306|  1.62k|    under_kind &= ~UNEXPECTED_FLAGS;
  ------------------
  |  |  302|  1.62k|    (SEC_ASN1_EXPLICIT | SEC_ASN1_OPTIONAL | SEC_ASN1_SKIP | SEC_ASN1_INNER | \
  |  |  ------------------
  |  |  |  |  132|  1.62k|#define SEC_ASN1_EXPLICIT 0x00200
  |  |  ------------------
  |  |                   (SEC_ASN1_EXPLICIT | SEC_ASN1_OPTIONAL | SEC_ASN1_SKIP | SEC_ASN1_INNER | \
  |  |  ------------------
  |  |  |  |  131|  1.62k|#define SEC_ASN1_OPTIONAL 0x00100
  |  |  ------------------
  |  |                   (SEC_ASN1_EXPLICIT | SEC_ASN1_OPTIONAL | SEC_ASN1_SKIP | SEC_ASN1_INNER | \
  |  |  ------------------
  |  |  |  |  140|  1.62k|#define SEC_ASN1_SKIP 0x08000         /* skip a field; only for decoding */
  |  |  ------------------
  |  |                   (SEC_ASN1_EXPLICIT | SEC_ASN1_OPTIONAL | SEC_ASN1_SKIP | SEC_ASN1_INNER | \
  |  |  ------------------
  |  |  |  |  141|  1.62k|#define SEC_ASN1_INNER 0x10000        /* with ANY means capture the      \
  |  |  ------------------
  |  |  303|  1.62k|     SEC_ASN1_DYNAMIC | SEC_ASN1_MAY_STREAM | SEC_ASN1_INLINE | SEC_ASN1_POINTER)
  |  |  ------------------
  |  |  |  |  138|  1.62k|#define SEC_ASN1_DYNAMIC 0x04000      /* subtemplate is found by calling \
  |  |  ------------------
  |  |                    SEC_ASN1_DYNAMIC | SEC_ASN1_MAY_STREAM | SEC_ASN1_INLINE | SEC_ASN1_POINTER)
  |  |  ------------------
  |  |  |  |  146|  1.62k|#define SEC_ASN1_MAY_STREAM 0x40000   /* field or one of its sub-fields may \
  |  |  ------------------
  |  |                    SEC_ASN1_DYNAMIC | SEC_ASN1_MAY_STREAM | SEC_ASN1_INLINE | SEC_ASN1_POINTER)
  |  |  ------------------
  |  |  |  |  134|  1.62k|#define SEC_ASN1_INLINE 0x00800
  |  |  ------------------
  |  |                    SEC_ASN1_DYNAMIC | SEC_ASN1_MAY_STREAM | SEC_ASN1_INLINE | SEC_ASN1_POINTER)
  |  |  ------------------
  |  |  |  |  135|  1.62k|#define SEC_ASN1_POINTER 0x01000
  |  |  ------------------
  ------------------
  307|  1.62k|#undef UNEXPECTED_FLAGS
  308|       |
  309|  1.62k|    if (encode_kind & SEC_ASN1_ANY) {
  ------------------
  |  |  133|  1.62k|#define SEC_ASN1_ANY 0x00400
  ------------------
  |  Branch (309:9): [True: 0, False: 1.62k]
  ------------------
  310|      0|        PORT_Assert(encode_kind == under_kind);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  311|      0|        tag_modifiers = 0;
  312|      0|        tag_number = 0;
  313|      0|        is_string = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  314|  1.62k|    } else {
  315|  1.62k|        tag_modifiers = (unsigned char)(encode_kind & (SEC_ASN1_TAG_MASK & ~SEC_ASN1_TAGNUM_MASK));
  ------------------
  |  |   65|  1.62k|#define SEC_ASN1_TAG_MASK 0xff
  ------------------
                      tag_modifiers = (unsigned char)(encode_kind & (SEC_ASN1_TAG_MASK & ~SEC_ASN1_TAGNUM_MASK));
  ------------------
  |  |   76|  1.62k|#define SEC_ASN1_TAGNUM_MASK 0x1f
  ------------------
  316|       |        /*
  317|       |         * XXX This assumes only single-octet identifiers.  To handle
  318|       |         * the HIGH TAG form we would need to do some more work, especially
  319|       |         * in how to specify them in the template, because right now we
  320|       |         * do not provide a way to specify more *tag* bits in encode_kind.
  321|       |         */
  322|  1.62k|        tag_number = encode_kind & SEC_ASN1_TAGNUM_MASK;
  ------------------
  |  |   76|  1.62k|#define SEC_ASN1_TAGNUM_MASK 0x1f
  ------------------
  323|       |
  324|  1.62k|        is_string = PR_FALSE;
  ------------------
  |  |  438|  1.62k|#define PR_FALSE 0
  ------------------
  325|  1.62k|        switch (under_kind & SEC_ASN1_TAGNUM_MASK) {
  ------------------
  |  |   76|  1.62k|#define SEC_ASN1_TAGNUM_MASK 0x1f
  ------------------
  |  Branch (325:17): [True: 0, False: 1.62k]
  ------------------
  326|      0|            case SEC_ASN1_SET:
  ------------------
  |  |   93|      0|#define SEC_ASN1_SET 0x11
  ------------------
  |  Branch (326:13): [True: 0, False: 1.62k]
  ------------------
  327|       |                /*
  328|       |                 * XXX A plain old SET (as opposed to a SET OF) is not implemented.
  329|       |                 * If it ever is, remove this assert...
  330|       |                 */
  331|      0|                PORT_Assert((under_kind & SEC_ASN1_GROUP) != 0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  332|       |            /* fallthru */
  333|      0|            case SEC_ASN1_SEQUENCE:
  ------------------
  |  |   92|      0|#define SEC_ASN1_SEQUENCE 0x10
  ------------------
  |  Branch (333:13): [True: 0, False: 1.62k]
  ------------------
  334|      0|                tag_modifiers |= SEC_ASN1_CONSTRUCTED;
  ------------------
  |  |  117|      0|#define SEC_ASN1_CONSTRUCTED 0x20
  ------------------
  335|      0|                break;
  336|      0|            case SEC_ASN1_BIT_STRING:
  ------------------
  |  |   79|      0|#define SEC_ASN1_BIT_STRING 0x03
  ------------------
  |  Branch (336:13): [True: 0, False: 1.62k]
  ------------------
  337|      0|            case SEC_ASN1_BMP_STRING:
  ------------------
  |  |  106|      0|#define SEC_ASN1_BMP_STRING 0x1e
  ------------------
  |  Branch (337:13): [True: 0, False: 1.62k]
  ------------------
  338|      0|            case SEC_ASN1_GENERALIZED_TIME:
  ------------------
  |  |  100|      0|#define SEC_ASN1_GENERALIZED_TIME 0x18
  ------------------
  |  Branch (338:13): [True: 0, False: 1.62k]
  ------------------
  339|      0|            case SEC_ASN1_IA5_STRING:
  ------------------
  |  |   98|      0|#define SEC_ASN1_IA5_STRING 0x16
  ------------------
  |  Branch (339:13): [True: 0, False: 1.62k]
  ------------------
  340|  1.62k|            case SEC_ASN1_OCTET_STRING:
  ------------------
  |  |   80|  1.62k|#define SEC_ASN1_OCTET_STRING 0x04
  ------------------
  |  Branch (340:13): [True: 1.62k, False: 0]
  ------------------
  341|  1.62k|            case SEC_ASN1_PRINTABLE_STRING:
  ------------------
  |  |   95|  1.62k|#define SEC_ASN1_PRINTABLE_STRING 0x13
  ------------------
  |  Branch (341:13): [True: 0, False: 1.62k]
  ------------------
  342|  1.62k|            case SEC_ASN1_T61_STRING:
  ------------------
  |  |   96|  1.62k|#define SEC_ASN1_T61_STRING 0x14
  ------------------
  |  Branch (342:13): [True: 0, False: 1.62k]
  ------------------
  343|  1.62k|            case SEC_ASN1_UNIVERSAL_STRING:
  ------------------
  |  |  104|  1.62k|#define SEC_ASN1_UNIVERSAL_STRING 0x1c
  ------------------
  |  Branch (343:13): [True: 0, False: 1.62k]
  ------------------
  344|  1.62k|            case SEC_ASN1_UTC_TIME:
  ------------------
  |  |   99|  1.62k|#define SEC_ASN1_UTC_TIME 0x17
  ------------------
  |  Branch (344:13): [True: 0, False: 1.62k]
  ------------------
  345|  1.62k|            case SEC_ASN1_UTF8_STRING:
  ------------------
  |  |   88|  1.62k|#define SEC_ASN1_UTF8_STRING 0x0c
  ------------------
  |  Branch (345:13): [True: 0, False: 1.62k]
  ------------------
  346|  1.62k|            case SEC_ASN1_VISIBLE_STRING:
  ------------------
  |  |  102|  1.62k|#define SEC_ASN1_VISIBLE_STRING 0x1a
  ------------------
  |  Branch (346:13): [True: 0, False: 1.62k]
  ------------------
  347|       |                /*
  348|       |                 * We do not yet know if we will be constructing the string,
  349|       |                 * so we have to wait to do this final tag modification.
  350|       |                 */
  351|  1.62k|                is_string = PR_TRUE;
  ------------------
  |  |  437|  1.62k|#define PR_TRUE 1
  ------------------
  352|  1.62k|                break;
  353|  1.62k|        }
  354|  1.62k|    }
  355|       |
  356|  1.62k|    state->tag_modifiers = tag_modifiers;
  357|  1.62k|    state->tag_number = (unsigned char)tag_number;
  358|  1.62k|    state->underlying_kind = under_kind;
  359|  1.62k|    state->isExplicit = isExplicit;
  360|  1.62k|    state->may_stream = may_stream;
  361|  1.62k|    state->is_string = is_string;
  362|  1.62k|    state->optional = optional;
  363|  1.62k|    state->disallowStreaming = disallowStreaming;
  364|       |
  365|  1.62k|    sec_asn1e_scrub_state(state);
  366|       |
  367|  1.62k|    return state;
  368|  1.62k|}
secasn1e.c:sec_asn1e_encode_item_count:
 1410|  2.43k|{
 1411|  2.43k|    unsigned long *count;
 1412|       |
 1413|  2.43k|    count = (unsigned long *)arg;
 1414|  2.43k|    PORT_Assert(count != NULL);
  ------------------
  |  |  120|  2.43k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  2.43k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 2.43k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1415|       |
 1416|  2.43k|    *count += len;
 1417|  2.43k|}
secasn1e.c:sec_asn1e_allocate_item:
 1444|    810|{
 1445|    810|    if (poolp != NULL) {
  ------------------
  |  Branch (1445:9): [True: 0, False: 810]
  ------------------
 1446|      0|        void *release;
 1447|       |
 1448|      0|        release = PORT_ArenaMark(poolp);
  ------------------
  |  |   55|      0|#define PORT_ArenaMark PORT_ArenaMark_Util
  ------------------
 1449|      0|        if (dest == NULL)
  ------------------
  |  Branch (1449:13): [True: 0, False: 0]
  ------------------
 1450|      0|            dest = (SECItem *)PORT_ArenaAlloc(poolp, sizeof(SECItem));
  ------------------
  |  |   53|      0|#define PORT_ArenaAlloc PORT_ArenaAlloc_Util
  ------------------
 1451|      0|        if (dest != NULL) {
  ------------------
  |  Branch (1451:13): [True: 0, False: 0]
  ------------------
 1452|      0|            dest->data = (unsigned char *)PORT_ArenaAlloc(poolp, len);
  ------------------
  |  |   53|      0|#define PORT_ArenaAlloc PORT_ArenaAlloc_Util
  ------------------
 1453|      0|            if (dest->data == NULL) {
  ------------------
  |  Branch (1453:17): [True: 0, False: 0]
  ------------------
 1454|      0|                dest = NULL;
 1455|      0|            }
 1456|      0|        }
 1457|      0|        if (dest == NULL) {
  ------------------
  |  Branch (1457:13): [True: 0, False: 0]
  ------------------
 1458|       |            /* one or both allocations failed; release everything */
 1459|      0|            PORT_ArenaRelease(poolp, release);
  ------------------
  |  |   56|      0|#define PORT_ArenaRelease PORT_ArenaRelease_Util
  ------------------
 1460|      0|        } else {
 1461|       |            /* everything okay; unmark the arena */
 1462|      0|            PORT_ArenaUnmark(poolp, release);
  ------------------
  |  |   58|      0|#define PORT_ArenaUnmark PORT_ArenaUnmark_Util
  ------------------
 1463|      0|        }
 1464|    810|    } else {
 1465|    810|        SECItem *indest;
 1466|       |
 1467|    810|        indest = dest;
 1468|    810|        if (dest == NULL)
  ------------------
  |  Branch (1468:13): [True: 810, False: 0]
  ------------------
 1469|    810|            dest = (SECItem *)PORT_Alloc(sizeof(SECItem));
  ------------------
  |  |   52|    810|#define PORT_Alloc PORT_Alloc_Util
  ------------------
 1470|    810|        if (dest != NULL) {
  ------------------
  |  Branch (1470:13): [True: 810, False: 0]
  ------------------
 1471|    810|            dest->type = siBuffer;
 1472|    810|            dest->data = (unsigned char *)PORT_Alloc(len);
  ------------------
  |  |   52|    810|#define PORT_Alloc PORT_Alloc_Util
  ------------------
 1473|    810|            if (dest->data == NULL) {
  ------------------
  |  Branch (1473:17): [True: 0, False: 810]
  ------------------
 1474|      0|                if (indest == NULL)
  ------------------
  |  Branch (1474:21): [True: 0, False: 0]
  ------------------
 1475|      0|                    PORT_Free(dest);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 1476|      0|                dest = NULL;
 1477|      0|            }
 1478|    810|        }
 1479|    810|    }
 1480|       |
 1481|    810|    return dest;
 1482|    810|}
secasn1e.c:sec_asn1e_encode_item_store:
 1423|  2.43k|{
 1424|  2.43k|    SECItem *dest;
 1425|       |
 1426|  2.43k|    dest = (SECItem *)arg;
 1427|  2.43k|    PORT_Assert(dest != NULL);
  ------------------
  |  |  120|  2.43k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  2.43k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 2.43k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1428|       |
 1429|  2.43k|    if (len > 0) {
  ------------------
  |  Branch (1429:9): [True: 2.43k, False: 0]
  ------------------
 1430|  2.43k|        PORT_Memcpy(dest->data + dest->len, buf, len);
  ------------------
  |  |  180|  2.43k|#define PORT_Memcpy memcpy
  ------------------
 1431|  2.43k|        dest->len += len;
 1432|  2.43k|    }
 1433|  2.43k|}

SEC_ASN1LengthLength_Util:
   21|  1.62k|{
   22|  1.62k|    int lenlen = 1;
   23|       |
   24|  1.62k|    if (len > 0x7f) {
  ------------------
  |  Branch (24:9): [True: 218, False: 1.40k]
  ------------------
   25|    218|        do {
   26|    218|            lenlen++;
   27|    218|            len >>= 8;
   28|    218|        } while (len);
  ------------------
  |  Branch (28:18): [True: 0, False: 218]
  ------------------
   29|    218|    }
   30|       |
   31|  1.62k|    return lenlen;
   32|  1.62k|}
SEC_ASN1GetSubtemplate:
   53|   139k|{
   54|   139k|    const SEC_ASN1Template *subt = NULL;
   55|       |
   56|   139k|    PORT_Assert(theTemplate->sub != NULL);
  ------------------
  |  |  120|   139k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|   139k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 139k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   57|   139k|    if (theTemplate->sub != NULL) {
  ------------------
  |  Branch (57:9): [True: 139k, False: 0]
  ------------------
   58|   139k|        if (theTemplate->kind & SEC_ASN1_DYNAMIC) {
  ------------------
  |  |  138|   139k|#define SEC_ASN1_DYNAMIC 0x04000      /* subtemplate is found by calling \
  ------------------
  |  Branch (58:13): [True: 0, False: 139k]
  ------------------
   59|      0|            SEC_ASN1TemplateChooserPtr chooserp;
   60|       |
   61|      0|            chooserp = *(SEC_ASN1TemplateChooserPtr *)theTemplate->sub;
   62|      0|            if (chooserp) {
  ------------------
  |  Branch (62:17): [True: 0, False: 0]
  ------------------
   63|      0|                if (thing != NULL)
  ------------------
  |  Branch (63:21): [True: 0, False: 0]
  ------------------
   64|      0|                    thing = (char *)thing - theTemplate->offset;
   65|      0|                subt = (*chooserp)(thing, encoding);
   66|      0|            }
   67|   139k|        } else {
   68|   139k|            subt = (SEC_ASN1Template *)theTemplate->sub;
   69|   139k|        }
   70|   139k|    }
   71|   139k|    return subt;
   72|   139k|}

SECITEM_AllocItem_Util:
   16|   162k|{
   17|   162k|    SECItem *result = NULL;
   18|   162k|    void *mark = NULL;
   19|       |
   20|   162k|    if (arena != NULL) {
  ------------------
  |  Branch (20:9): [True: 113k, False: 48.8k]
  ------------------
   21|   113k|        mark = PORT_ArenaMark(arena);
  ------------------
  |  |   55|   113k|#define PORT_ArenaMark PORT_ArenaMark_Util
  ------------------
   22|   113k|    }
   23|       |
   24|   162k|    if (item == NULL) {
  ------------------
  |  Branch (24:9): [True: 19.1k, False: 143k]
  ------------------
   25|  19.1k|        if (arena != NULL) {
  ------------------
  |  Branch (25:13): [True: 1.18k, False: 17.9k]
  ------------------
   26|  1.18k|            result = PORT_ArenaZAlloc(arena, sizeof(SECItem));
  ------------------
  |  |   59|  1.18k|#define PORT_ArenaZAlloc PORT_ArenaZAlloc_Util
  ------------------
   27|  17.9k|        } else {
   28|  17.9k|            result = PORT_ZAlloc(sizeof(SECItem));
  ------------------
  |  |   72|  17.9k|#define PORT_ZAlloc PORT_ZAlloc_Util
  ------------------
   29|  17.9k|        }
   30|  19.1k|        if (result == NULL) {
  ------------------
  |  Branch (30:13): [True: 0, False: 19.1k]
  ------------------
   31|      0|            goto loser;
   32|      0|        }
   33|   143k|    } else {
   34|   143k|        PORT_Assert(item->data == NULL);
  ------------------
  |  |  120|   143k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|   143k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 143k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   35|   143k|        result = item;
   36|   143k|    }
   37|       |
   38|   162k|    result->len = len;
   39|   162k|    if (len) {
  ------------------
  |  Branch (39:9): [True: 162k, False: 38]
  ------------------
   40|   162k|        if (arena != NULL) {
  ------------------
  |  Branch (40:13): [True: 113k, False: 48.8k]
  ------------------
   41|   113k|            result->data = PORT_ArenaAlloc(arena, len);
  ------------------
  |  |   53|   113k|#define PORT_ArenaAlloc PORT_ArenaAlloc_Util
  ------------------
   42|   113k|        } else {
   43|  48.8k|            result->data = PORT_Alloc(len);
  ------------------
  |  |   52|  48.8k|#define PORT_Alloc PORT_Alloc_Util
  ------------------
   44|  48.8k|        }
   45|   162k|        if (result->data == NULL) {
  ------------------
  |  Branch (45:13): [True: 0, False: 162k]
  ------------------
   46|      0|            goto loser;
   47|      0|        }
   48|   162k|    } else {
   49|     38|        result->data = NULL;
   50|     38|    }
   51|       |
   52|   162k|    if (mark) {
  ------------------
  |  Branch (52:9): [True: 113k, False: 48.8k]
  ------------------
   53|   113k|        PORT_ArenaUnmark(arena, mark);
  ------------------
  |  |   58|   113k|#define PORT_ArenaUnmark PORT_ArenaUnmark_Util
  ------------------
   54|   113k|    }
   55|   162k|    return (result);
   56|       |
   57|      0|loser:
   58|      0|    if (arena != NULL) {
  ------------------
  |  Branch (58:9): [True: 0, False: 0]
  ------------------
   59|      0|        if (mark) {
  ------------------
  |  Branch (59:13): [True: 0, False: 0]
  ------------------
   60|      0|            PORT_ArenaRelease(arena, mark);
  ------------------
  |  |   56|      0|#define PORT_ArenaRelease PORT_ArenaRelease_Util
  ------------------
   61|      0|        }
   62|      0|        if (item != NULL) {
  ------------------
  |  Branch (62:13): [True: 0, False: 0]
  ------------------
   63|      0|            item->data = NULL;
   64|      0|            item->len = 0;
   65|      0|        }
   66|      0|    } else {
   67|      0|        if (result != NULL) {
  ------------------
  |  Branch (67:13): [True: 0, False: 0]
  ------------------
   68|      0|            SECITEM_FreeItem(result, (item == NULL) ? PR_TRUE : PR_FALSE);
  ------------------
  |  |  108|      0|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                          SECITEM_FreeItem(result, (item == NULL) ? PR_TRUE : PR_FALSE);
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
                          SECITEM_FreeItem(result, (item == NULL) ? PR_TRUE : PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  |  Branch (68:38): [True: 0, False: 0]
  ------------------
   69|      0|        }
   70|       |        /*
   71|       |         * If item is not NULL, the above has set item->data and
   72|       |         * item->len to 0.
   73|       |         */
   74|      0|    }
   75|      0|    return (NULL);
   76|   162k|}
SECITEM_MakeItem:
   81|  1.59k|{
   82|  1.59k|    SECItem it = { siBuffer, (unsigned char *)data, len };
   83|       |
   84|  1.59k|    return SECITEM_CopyItem(arena, dest, &it);
  ------------------
  |  |  106|  1.59k|#define SECITEM_CopyItem SECITEM_CopyItem_Util
  ------------------
   85|  1.59k|}
SECITEM_CompareItem_Util:
  189|  81.1k|{
  190|  81.1k|    unsigned m;
  191|  81.1k|    int rv;
  192|       |
  193|  81.1k|    if (a == b)
  ------------------
  |  Branch (193:9): [True: 0, False: 81.1k]
  ------------------
  194|      0|        return SECEqual;
  195|  81.1k|    if (!a || !a->len || !a->data)
  ------------------
  |  Branch (195:9): [True: 0, False: 81.1k]
  |  Branch (195:15): [True: 0, False: 81.1k]
  |  Branch (195:26): [True: 0, False: 81.1k]
  ------------------
  196|      0|        return (!b || !b->len || !b->data) ? SECEqual : SECLessThan;
  ------------------
  |  Branch (196:17): [True: 0, False: 0]
  |  Branch (196:23): [True: 0, False: 0]
  |  Branch (196:34): [True: 0, False: 0]
  ------------------
  197|  81.1k|    if (!b || !b->len || !b->data)
  ------------------
  |  Branch (197:9): [True: 0, False: 81.1k]
  |  Branch (197:15): [True: 0, False: 81.1k]
  |  Branch (197:26): [True: 0, False: 81.1k]
  ------------------
  198|      0|        return SECGreaterThan;
  199|       |
  200|  81.1k|    m = ((a->len < b->len) ? a->len : b->len);
  ------------------
  |  Branch (200:10): [True: 335, False: 80.8k]
  ------------------
  201|       |
  202|  81.1k|    rv = PORT_Memcmp(a->data, b->data, m);
  ------------------
  |  |  179|  81.1k|#define PORT_Memcmp memcmp
  ------------------
  203|  81.1k|    if (rv) {
  ------------------
  |  Branch (203:9): [True: 70.1k, False: 10.9k]
  ------------------
  204|  70.1k|        return rv < 0 ? SECLessThan : SECGreaterThan;
  ------------------
  |  Branch (204:16): [True: 27.1k, False: 42.9k]
  ------------------
  205|  70.1k|    }
  206|  10.9k|    if (a->len < b->len) {
  ------------------
  |  Branch (206:9): [True: 57, False: 10.9k]
  ------------------
  207|     57|        return SECLessThan;
  208|     57|    }
  209|  10.9k|    if (a->len == b->len) {
  ------------------
  |  Branch (209:9): [True: 10.8k, False: 54]
  ------------------
  210|  10.8k|        return SECEqual;
  211|  10.8k|    }
  212|     54|    return SECGreaterThan;
  213|  10.9k|}
SECITEM_ItemsAreEqual_Util:
  217|  70.4k|{
  218|  70.4k|    if (a->len != b->len)
  ------------------
  |  Branch (218:9): [True: 945, False: 69.4k]
  ------------------
  219|    945|        return PR_FALSE;
  ------------------
  |  |  438|    945|#define PR_FALSE 0
  ------------------
  220|  69.4k|    if (!a->len)
  ------------------
  |  Branch (220:9): [True: 40, False: 69.4k]
  ------------------
  221|     40|        return PR_TRUE;
  ------------------
  |  |  437|     40|#define PR_TRUE 1
  ------------------
  222|  69.4k|    if (!a->data || !b->data) {
  ------------------
  |  Branch (222:9): [True: 0, False: 69.4k]
  |  Branch (222:21): [True: 0, False: 69.4k]
  ------------------
  223|       |        /* avoid null pointer crash. */
  224|      0|        return (PRBool)(a->data == b->data);
  225|      0|    }
  226|  69.4k|    return (PRBool)!PORT_Memcmp(a->data, b->data, a->len);
  ------------------
  |  |  179|  69.4k|#define PORT_Memcmp memcmp
  ------------------
  227|  69.4k|}
SECITEM_DupItem_Util:
  231|  15.3k|{
  232|  15.3k|    return SECITEM_ArenaDupItem(NULL, from);
  ------------------
  |  |  104|  15.3k|#define SECITEM_ArenaDupItem SECITEM_ArenaDupItem_Util
  ------------------
  233|  15.3k|}
SECITEM_ArenaDupItem_Util:
  237|  16.5k|{
  238|  16.5k|    SECItem *to;
  239|       |
  240|  16.5k|    if (from == NULL) {
  ------------------
  |  Branch (240:9): [True: 0, False: 16.5k]
  ------------------
  241|      0|        return NULL;
  242|      0|    }
  243|       |
  244|  16.5k|    to = SECITEM_AllocItem(arena, NULL, from->len);
  ------------------
  |  |  103|  16.5k|#define SECITEM_AllocItem SECITEM_AllocItem_Util
  ------------------
  245|  16.5k|    if (to == NULL) {
  ------------------
  |  Branch (245:9): [True: 0, False: 16.5k]
  ------------------
  246|      0|        return NULL;
  247|      0|    }
  248|       |
  249|  16.5k|    to->type = from->type;
  250|  16.5k|    if (to->len) {
  ------------------
  |  Branch (250:9): [True: 16.4k, False: 38]
  ------------------
  251|  16.4k|        PORT_Memcpy(to->data, from->data, to->len);
  ------------------
  |  |  180|  16.4k|#define PORT_Memcpy memcpy
  ------------------
  252|  16.4k|    }
  253|       |
  254|  16.5k|    return to;
  255|  16.5k|}
SECITEM_CopyItem_Util:
  259|   120k|{
  260|   120k|    to->type = from->type;
  261|   120k|    if (from->data && from->len) {
  ------------------
  |  Branch (261:9): [True: 111k, False: 8.51k]
  |  Branch (261:23): [True: 111k, False: 4]
  ------------------
  262|   111k|        if (arena) {
  ------------------
  |  Branch (262:13): [True: 82.4k, False: 29.0k]
  ------------------
  263|  82.4k|            to->data = (unsigned char *)PORT_ArenaAlloc(arena, from->len);
  ------------------
  |  |   53|  82.4k|#define PORT_ArenaAlloc PORT_ArenaAlloc_Util
  ------------------
  264|  82.4k|        } else {
  265|  29.0k|            to->data = (unsigned char *)PORT_Alloc(from->len);
  ------------------
  |  |   52|  29.0k|#define PORT_Alloc PORT_Alloc_Util
  ------------------
  266|  29.0k|        }
  267|       |
  268|   111k|        if (!to->data) {
  ------------------
  |  Branch (268:13): [True: 0, False: 111k]
  ------------------
  269|      0|            return SECFailure;
  270|      0|        }
  271|   111k|        PORT_Memcpy(to->data, from->data, from->len);
  ------------------
  |  |  180|   111k|#define PORT_Memcpy memcpy
  ------------------
  272|   111k|        to->len = from->len;
  273|   111k|    } else {
  274|       |        /*
  275|       |         * If from->data is NULL but from->len is nonzero, this function
  276|       |         * will succeed.  Is this right?
  277|       |         */
  278|  8.51k|        to->data = 0;
  279|  8.51k|        to->len = 0;
  280|  8.51k|    }
  281|   120k|    return SECSuccess;
  282|   120k|}
SECITEM_FreeItem_Util:
  286|   244k|{
  287|   244k|    if (zap) {
  ------------------
  |  Branch (287:9): [True: 235k, False: 9.63k]
  ------------------
  288|   235k|        PORT_Free(zap->data);
  ------------------
  |  |   60|   235k|#define PORT_Free PORT_Free_Util
  ------------------
  289|   235k|        zap->data = 0;
  290|   235k|        zap->len = 0;
  291|   235k|        if (freeit) {
  ------------------
  |  Branch (291:13): [True: 28.1k, False: 207k]
  ------------------
  292|  28.1k|            PORT_Free(zap);
  ------------------
  |  |   60|  28.1k|#define PORT_Free PORT_Free_Util
  ------------------
  293|  28.1k|        }
  294|   235k|    }
  295|   244k|}
SECITEM_ZfreeItem_Util:
  299|  41.6k|{
  300|  41.6k|    if (zap) {
  ------------------
  |  Branch (300:9): [True: 41.6k, False: 0]
  ------------------
  301|  41.6k|        PORT_ZFree(zap->data, zap->len);
  ------------------
  |  |   75|  41.6k|#define PORT_ZFree PORT_ZFree_Util
  ------------------
  302|  41.6k|        zap->data = 0;
  303|  41.6k|        zap->len = 0;
  304|  41.6k|        if (freeit) {
  ------------------
  |  Branch (304:13): [True: 1.62k, False: 40.0k]
  ------------------
  305|  1.62k|            PORT_ZFree(zap, sizeof(SECItem));
  ------------------
  |  |   75|  1.62k|#define PORT_ZFree PORT_ZFree_Util
  ------------------
  306|  1.62k|        }
  307|  41.6k|    }
  308|  41.6k|}
SECITEM_Hash:
  319|  78.7k|{
  320|  78.7k|    const SECItem *item = (const SECItem *)key;
  321|  78.7k|    PLHashNumber rv = 0;
  322|       |
  323|  78.7k|    PRUint8 *data = (PRUint8 *)item->data;
  324|  78.7k|    PRUint32 i;
  325|  78.7k|    PRUint8 *rvc = (PRUint8 *)&rv;
  326|       |
  327|   639k|    for (i = 0; i < item->len; i++) {
  ------------------
  |  Branch (327:17): [True: 560k, False: 78.7k]
  ------------------
  328|   560k|        rvc[i % sizeof(rv)] ^= *data;
  329|   560k|        data++;
  330|   560k|    }
  331|       |
  332|  78.7k|    return rv;
  333|  78.7k|}
SECITEM_HashCompare:
  343|  65.0k|{
  344|  65.0k|    const SECItem *i1 = (const SECItem *)k1;
  345|  65.0k|    const SECItem *i2 = (const SECItem *)k2;
  346|       |
  347|  65.0k|    return SECITEM_ItemsAreEqual(i1, i2);
  ------------------
  |  |  109|  65.0k|#define SECITEM_ItemsAreEqual SECITEM_ItemsAreEqual_Util
  ------------------
  348|  65.0k|}
SECITEM_AllocArray:
  352|      2|{
  353|      2|    SECItemArray *result = NULL;
  354|      2|    void *mark = NULL;
  355|       |
  356|      2|    if (array != NULL && array->items != NULL) {
  ------------------
  |  Branch (356:9): [True: 2, False: 0]
  |  Branch (356:26): [True: 0, False: 2]
  ------------------
  357|      0|        PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  358|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  359|      0|        return NULL;
  360|      0|    }
  361|       |
  362|      2|    if (arena != NULL) {
  ------------------
  |  Branch (362:9): [True: 0, False: 2]
  ------------------
  363|      0|        mark = PORT_ArenaMark(arena);
  ------------------
  |  |   55|      0|#define PORT_ArenaMark PORT_ArenaMark_Util
  ------------------
  364|      0|    }
  365|       |
  366|      2|    if (array == NULL) {
  ------------------
  |  Branch (366:9): [True: 0, False: 2]
  ------------------
  367|      0|        if (arena != NULL) {
  ------------------
  |  Branch (367:13): [True: 0, False: 0]
  ------------------
  368|      0|            result = PORT_ArenaZAlloc(arena, sizeof(SECItemArray));
  ------------------
  |  |   59|      0|#define PORT_ArenaZAlloc PORT_ArenaZAlloc_Util
  ------------------
  369|      0|        } else {
  370|      0|            result = PORT_ZAlloc(sizeof(SECItemArray));
  ------------------
  |  |   72|      0|#define PORT_ZAlloc PORT_ZAlloc_Util
  ------------------
  371|      0|        }
  372|      0|        if (result == NULL) {
  ------------------
  |  Branch (372:13): [True: 0, False: 0]
  ------------------
  373|      0|            goto loser;
  374|      0|        }
  375|      2|    } else {
  376|      2|        result = array;
  377|      2|    }
  378|       |
  379|      2|    result->len = len;
  380|      2|    if (len) {
  ------------------
  |  Branch (380:9): [True: 2, False: 0]
  ------------------
  381|      2|        if (arena != NULL) {
  ------------------
  |  Branch (381:13): [True: 0, False: 2]
  ------------------
  382|      0|            result->items = PORT_ArenaZNewArray(arena, SECItem, len);
  ------------------
  |  |  163|      0|    (type *)PORT_ArenaZAlloc(poolp, sizeof(type) * (num))
  |  |  ------------------
  |  |  |  |   59|      0|#define PORT_ArenaZAlloc PORT_ArenaZAlloc_Util
  |  |  ------------------
  ------------------
  383|      2|        } else {
  384|      2|            result->items = PORT_ZNewArray(SECItem, len);
  ------------------
  |  |  159|      2|    (type *)PORT_ZAlloc(sizeof(type) * (num))
  |  |  ------------------
  |  |  |  |   72|      2|#define PORT_ZAlloc PORT_ZAlloc_Util
  |  |  ------------------
  ------------------
  385|      2|        }
  386|      2|        if (result->items == NULL) {
  ------------------
  |  Branch (386:13): [True: 0, False: 2]
  ------------------
  387|      0|            goto loser;
  388|      0|        }
  389|      2|    } else {
  390|      0|        result->items = NULL;
  391|      0|    }
  392|       |
  393|      2|    if (mark) {
  ------------------
  |  Branch (393:9): [True: 0, False: 2]
  ------------------
  394|      0|        PORT_ArenaUnmark(arena, mark);
  ------------------
  |  |   58|      0|#define PORT_ArenaUnmark PORT_ArenaUnmark_Util
  ------------------
  395|      0|    }
  396|      2|    return result;
  397|       |
  398|      0|loser:
  399|      0|    if (arena != NULL) {
  ------------------
  |  Branch (399:9): [True: 0, False: 0]
  ------------------
  400|      0|        if (mark) {
  ------------------
  |  Branch (400:13): [True: 0, False: 0]
  ------------------
  401|      0|            PORT_ArenaRelease(arena, mark);
  ------------------
  |  |   56|      0|#define PORT_ArenaRelease PORT_ArenaRelease_Util
  ------------------
  402|      0|        }
  403|      0|    } else {
  404|      0|        if (result != NULL && array == NULL) {
  ------------------
  |  Branch (404:13): [True: 0, False: 0]
  |  Branch (404:31): [True: 0, False: 0]
  ------------------
  405|      0|            PORT_Free(result);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
  406|      0|        }
  407|      0|    }
  408|      0|    if (array != NULL) {
  ------------------
  |  Branch (408:9): [True: 0, False: 0]
  ------------------
  409|      0|        array->items = NULL;
  410|      0|        array->len = 0;
  411|      0|    }
  412|      0|    return NULL;
  413|      2|}
SECITEM_FreeArray:
  444|      2|{
  445|      2|    secitem_FreeArray(array, PR_FALSE, freeit);
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
  446|      2|}
secitem.c:secitem_FreeArray:
  417|      2|{
  418|      2|    unsigned int i;
  419|       |
  420|      2|    if (!array || !array->len || !array->items)
  ------------------
  |  Branch (420:9): [True: 0, False: 2]
  |  Branch (420:19): [True: 0, False: 2]
  |  Branch (420:34): [True: 0, False: 2]
  ------------------
  421|      0|        return;
  422|       |
  423|      4|    for (i = 0; i < array->len; ++i) {
  ------------------
  |  Branch (423:17): [True: 2, False: 2]
  ------------------
  424|      2|        SECItem *item = &array->items[i];
  425|       |
  426|      2|        if (item->data) {
  ------------------
  |  Branch (426:13): [True: 2, False: 0]
  ------------------
  427|      2|            if (zero_items) {
  ------------------
  |  Branch (427:17): [True: 0, False: 2]
  ------------------
  428|      0|                SECITEM_ZfreeItem(item, PR_FALSE);
  ------------------
  |  |  110|      0|#define SECITEM_ZfreeItem SECITEM_ZfreeItem_Util
  ------------------
                              SECITEM_ZfreeItem(item, PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  429|      2|            } else {
  430|      2|                SECITEM_FreeItem(item, PR_FALSE);
  ------------------
  |  |  108|      2|#define SECITEM_FreeItem SECITEM_FreeItem_Util
  ------------------
                              SECITEM_FreeItem(item, PR_FALSE);
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
  431|      2|            }
  432|      2|        }
  433|      2|    }
  434|      2|    PORT_Free(array->items);
  ------------------
  |  |   60|      2|#define PORT_Free PORT_Free_Util
  ------------------
  435|      2|    array->items = NULL;
  436|      2|    array->len = 0;
  437|       |
  438|      2|    if (freeit)
  ------------------
  |  Branch (438:9): [True: 0, False: 2]
  ------------------
  439|      0|        PORT_Free(array);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
  440|      2|}

SECOID_Init:
 2167|      2|{
 2168|      2|    PLHashEntry *entry;
 2169|      2|    const SECOidData *oid;
 2170|      2|    SECOidTag i;
 2171|      2|    char *envVal;
 2172|       |
 2173|      2|#define NSS_VERSION_VARIABLE __nss_util_version
 2174|      2|#include "verref.h"
  ------------------
  |  |    1|       |/* This Source Code Form is subject to the terms of the Mozilla Public
  |  |    2|       | * License, v. 2.0. If a copy of the MPL was not distributed with this
  |  |    3|       | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  |  |    4|       |
  |  |    5|       |/* This header is used inline in a function to ensure that a version string
  |  |    6|       | * symbol is linked in and not optimized out. A volatile reference is added to
  |  |    7|       | * the variable identified by NSS_VERSION_VARIABLE.
  |  |    8|       | *
  |  |    9|       | * Use this as follows:
  |  |   10|       | *
  |  |   11|       | * #define NSS_VERSION_VARIABLE __nss_ssl_version
  |  |   12|       | * #include "verref.h"
  |  |   13|       | */
  |  |   14|       |
  |  |   15|       |/* Suppress unused variable warnings. */
  |  |   16|       |#ifdef _MSC_VER
  |  |   17|       |#pragma warning(push)
  |  |   18|       |#pragma warning(disable : 4101)
  |  |   19|       |#endif
  |  |   20|       |/* This works for both gcc and clang */
  |  |   21|      2|#if defined(__GNUC__) && !defined(NSS_NO_GCC48)
  |  |   22|      2|#pragma GCC diagnostic push
  |  |   23|      2|#pragma GCC diagnostic ignored "-Wunused-variable"
  |  |   24|      2|#endif
  |  |   25|       |
  |  |   26|       |#ifndef NSS_VERSION_VARIABLE
  |  |   27|       |#error NSS_VERSION_VARIABLE must be set before including "verref.h"
  |  |   28|       |#endif
  |  |   29|      2|{
  |  |   30|      2|    extern const char NSS_VERSION_VARIABLE[];
  |  |   31|      2|#if defined(__GNUC__) || defined(__clang__)
  |  |   32|      2|    __attribute__((unused))
  |  |   33|      2|#endif
  |  |   34|      2|    volatile const char _nss_version_c = NSS_VERSION_VARIABLE[0];
  |  |  ------------------
  |  |  |  | 2173|      2|#define NSS_VERSION_VARIABLE __nss_util_version
  |  |  ------------------
  |  |   35|      2|}
  |  |   36|      2|#undef NSS_VERSION_VARIABLE
  |  |   37|       |
  |  |   38|       |#ifdef _MSC_VER
  |  |   39|       |#pragma warning(pop)
  |  |   40|       |#endif
  |  |   41|      2|#if defined(__GNUC__) && !defined(NSS_NO_GCC48)
  |  |   42|      2|#pragma GCC diagnostic pop
  |  |   43|      2|#endif
  ------------------
 2175|       |
 2176|      2|    if (oidhash) {
  ------------------
  |  Branch (2176:9): [True: 1, False: 1]
  ------------------
 2177|      1|        return SECSuccess; /* already initialized */
 2178|      1|    }
 2179|       |
 2180|       |    /* xyber768d00 must be enabled explicitly */
 2181|      1|    xOids[SEC_OID_XYBER768D00].notPolicyFlags = NSS_USE_ALG_IN_SSL_KX;
  ------------------
  |  |  572|      1|#define NSS_USE_ALG_IN_SSL_KX 0x00000004           /* used in SSL key exchange */
  ------------------
 2182|       |
 2183|      1|    if (!PR_GetEnvSecure("NSS_ALLOW_WEAK_SIGNATURE_ALG")) {
  ------------------
  |  Branch (2183:9): [True: 1, False: 0]
  ------------------
 2184|       |        /* initialize any policy flags that are disabled by default */
 2185|      1|        xOids[SEC_OID_MD2].notPolicyFlags = ~NSS_USE_ALG_IN_PKCS12_DECRYPT;
  ------------------
  |  |  576|      1|#define NSS_USE_ALG_IN_PKCS12_DECRYPT 0x00000040   /* used to decrypt pkcs12 */
  ------------------
 2186|      1|        xOids[SEC_OID_MD4].notPolicyFlags = ~NSS_USE_ALG_IN_PKCS12_DECRYPT;
  ------------------
  |  |  576|      1|#define NSS_USE_ALG_IN_PKCS12_DECRYPT 0x00000040   /* used to decrypt pkcs12 */
  ------------------
 2187|      1|        xOids[SEC_OID_MD5].notPolicyFlags = ~NSS_USE_ALG_IN_PKCS12_DECRYPT;
  ------------------
  |  |  576|      1|#define NSS_USE_ALG_IN_PKCS12_DECRYPT 0x00000040   /* used to decrypt pkcs12 */
  ------------------
 2188|      1|        xOids[SEC_OID_PKCS1_MD2_WITH_RSA_ENCRYPTION].notPolicyFlags = ~0;
 2189|      1|        xOids[SEC_OID_PKCS1_MD4_WITH_RSA_ENCRYPTION].notPolicyFlags = ~0;
 2190|      1|        xOids[SEC_OID_PKCS1_MD5_WITH_RSA_ENCRYPTION].notPolicyFlags = ~0;
 2191|      1|        xOids[SEC_OID_PKCS5_PBE_WITH_MD2_AND_DES_CBC].notPolicyFlags = ~NSS_USE_ALG_IN_PKCS12_DECRYPT;
  ------------------
  |  |  576|      1|#define NSS_USE_ALG_IN_PKCS12_DECRYPT 0x00000040   /* used to decrypt pkcs12 */
  ------------------
 2192|      1|        xOids[SEC_OID_PKCS5_PBE_WITH_MD5_AND_DES_CBC].notPolicyFlags = ~NSS_USE_ALG_IN_PKCS12_DECRYPT;
  ------------------
  |  |  576|      1|#define NSS_USE_ALG_IN_PKCS12_DECRYPT 0x00000040   /* used to decrypt pkcs12 */
  ------------------
 2193|      1|    }
 2194|       |
 2195|       |    /* turn off NSS_USE_POLICY_IN_SSL by default */
 2196|      1|    xOids[SEC_OID_APPLY_SSL_POLICY].notPolicyFlags = NSS_USE_POLICY_IN_SSL;
  ------------------
  |  |  574|      1|#define NSS_USE_POLICY_IN_SSL 0x00000010           /* enable policy in SSL protocol */
  ------------------
 2197|       |    /* turn off TLS REQUIRE EMS by default */
 2198|      1|    xOids[SEC_OID_TLS_REQUIRE_EMS].notPolicyFlags = ~0;
 2199|       |
 2200|      1|    envVal = PR_GetEnvSecure("NSS_HASH_ALG_SUPPORT");
 2201|      1|    if (envVal)
  ------------------
  |  Branch (2201:9): [True: 0, False: 1]
  ------------------
 2202|      0|        handleHashAlgSupport(envVal);
 2203|       |
 2204|      1|    if (secoid_InitDynOidData() != SECSuccess) {
  ------------------
  |  Branch (2204:9): [True: 0, False: 1]
  ------------------
 2205|      0|        PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2206|      0|        PORT_Assert(0); /* this function should never fail */
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2207|      0|        return SECFailure;
 2208|      0|    }
 2209|       |
 2210|      1|    oidhash = PL_NewHashTable(0, SECITEM_Hash, SECITEM_HashCompare,
 2211|      1|                              PL_CompareValues, NULL, NULL);
 2212|      1|    oidmechhash = PL_NewHashTable(0, secoid_HashNumber, PL_CompareValues,
 2213|      1|                                  PL_CompareValues, NULL, NULL);
 2214|       |
 2215|      1|    if (!oidhash || !oidmechhash) {
  ------------------
  |  Branch (2215:9): [True: 0, False: 1]
  |  Branch (2215:21): [True: 0, False: 1]
  ------------------
 2216|      0|        PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2217|      0|        PORT_Assert(0); /*This function should never fail. */
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2218|      0|        return (SECFailure);
 2219|      0|    }
 2220|       |
 2221|    392|    for (i = 0; i < SEC_OID_TOTAL; i++) {
  ------------------
  |  Branch (2221:17): [True: 391, False: 1]
  ------------------
 2222|    391|        oid = &oids[i];
 2223|    391|        PORT_Assert(oid->offset == i);
  ------------------
  |  |  120|    391|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    391|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 391, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2224|    391|        entry = PL_HashTableAdd(oidhash, &oid->oid, (void *)oid);
 2225|       |
 2226|    391|        if (entry == NULL) {
  ------------------
  |  Branch (2226:13): [True: 0, False: 391]
  ------------------
 2227|      0|            PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2228|      0|            PORT_Assert(0); /*This function should never fail. */
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2229|      0|            return (SECFailure);
 2230|      0|        }
 2231|       |
 2232|    391|        if (oid->mechanism != CKM_INVALID_MECHANISM) {
  ------------------
  |  |  155|    391|#define CKM_INVALID_MECHANISM 0xffffffffUL
  ------------------
  |  Branch (2232:13): [True: 108, False: 283]
  ------------------
 2233|    108|            entry = PL_HashTableAdd(oidmechhash,
 2234|    108|                                    (void *)(uintptr_t)oid->mechanism, (void *)oid);
 2235|    108|            if (entry == NULL) {
  ------------------
  |  Branch (2235:17): [True: 0, False: 108]
  ------------------
 2236|      0|                PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2237|      0|                PORT_Assert(0); /* This function should never fail. */
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2238|      0|                return (SECFailure);
 2239|      0|            }
 2240|    108|        }
 2241|    391|    }
 2242|       |
 2243|      1|    PORT_Assert(i == SEC_OID_TOTAL);
  ------------------
  |  |  120|      1|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      1|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2244|       |    /* finally, clear S/MIME from the policy oids. If no one turns on any
 2245|       |     * S/MIME policies after this, then S/MIME will enable the traditional
 2246|       |     * algs when it initializes */
 2247|      1|    (void)NSS_SetAlgorithmPolicyAll(0, NSS_USE_ALG_IN_SMIME);
  ------------------
  |  |  597|      1|#define NSS_USE_ALG_IN_SMIME (NSS_USE_ALG_IN_SMIME_LEGACY | \
  |  |  ------------------
  |  |  |  |  578|      1|#define NSS_USE_ALG_IN_SMIME_LEGACY 0x00000100     /* used to decrypt smime */
  |  |  ------------------
  |  |  598|      1|                              NSS_USE_ALG_IN_SMIME_ENCRYPT)
  |  |  ------------------
  |  |  |  |  579|      1|#define NSS_USE_ALG_IN_SMIME_ENCRYPT 0x00000200    /* used to decrypt smime */
  |  |  ------------------
  ------------------
 2248|       |
 2249|      1|    return (SECSuccess);
 2250|      1|}
SECOID_FindOIDByMechanism:
 2254|  1.58k|{
 2255|  1.58k|    SECOidData *ret;
 2256|       |
 2257|  1.58k|    PR_ASSERT(oidmechhash != NULL);
  ------------------
  |  |  208|  1.58k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 1.58k, False: 0]
  |  |  ------------------
  ------------------
 2258|  1.58k|    if (oidmechhash == NULL && SECOID_Init() != SECSuccess) {
  ------------------
  |  Branch (2258:9): [True: 0, False: 1.58k]
  |  Branch (2258:32): [True: 0, False: 0]
  ------------------
 2259|      0|        PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2260|      0|        return NULL;
 2261|      0|    }
 2262|       |
 2263|  1.58k|    ret = PL_HashTableLookupConst(oidmechhash, (void *)(uintptr_t)mechanism);
 2264|  1.58k|    if (ret == NULL) {
  ------------------
  |  Branch (2264:9): [True: 0, False: 1.58k]
  ------------------
 2265|      0|        PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2266|      0|    }
 2267|       |
 2268|  1.58k|    return (ret);
 2269|  1.58k|}
SECOID_FindOID_Util:
 2273|  78.3k|{
 2274|  78.3k|    SECOidData *ret;
 2275|       |
 2276|  78.3k|    PR_ASSERT(oidhash != NULL);
  ------------------
  |  |  208|  78.3k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  ------------------
  |  |  |  Branch (208:6): [True: 78.3k, False: 0]
  |  |  ------------------
  ------------------
 2277|  78.3k|    if (oidhash == NULL && SECOID_Init() != SECSuccess) {
  ------------------
  |  Branch (2277:9): [True: 0, False: 78.3k]
  |  Branch (2277:28): [True: 0, False: 0]
  ------------------
 2278|      0|        PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2279|      0|        return NULL;
 2280|      0|    }
 2281|       |
 2282|  78.3k|    if ((oid == NULL) || (oid->data == NULL)) {
  ------------------
  |  Branch (2282:9): [True: 0, False: 78.3k]
  |  Branch (2282:26): [True: 0, False: 78.3k]
  ------------------
 2283|      0|        PORT_SetError(SEC_ERROR_UNRECOGNIZED_OID);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2284|      0|        return NULL;
 2285|      0|    }
 2286|       |
 2287|  78.3k|    ret = PL_HashTableLookupConst(oidhash, oid);
 2288|  78.3k|    if (ret == NULL) {
  ------------------
  |  Branch (2288:9): [True: 13.4k, False: 64.9k]
  ------------------
 2289|  13.4k|        ret = secoid_FindDynamic(oid);
 2290|  13.4k|        if (ret == NULL) {
  ------------------
  |  Branch (2290:13): [True: 13.4k, False: 0]
  ------------------
 2291|  13.4k|            PORT_SetError(SEC_ERROR_UNRECOGNIZED_OID);
  ------------------
  |  |   65|  13.4k|#define PORT_SetError PORT_SetError_Util
  ------------------
 2292|  13.4k|        }
 2293|  13.4k|    }
 2294|  78.3k|    return (ret);
 2295|  78.3k|}
SECOID_FindOIDTag_Util:
 2299|  52.1k|{
 2300|  52.1k|    SECOidData *oiddata;
 2301|       |
 2302|  52.1k|    oiddata = SECOID_FindOID(oid);
  ------------------
  |  |  115|  52.1k|#define SECOID_FindOID SECOID_FindOID_Util
  ------------------
 2303|  52.1k|    if (oiddata == NULL) {
  ------------------
  |  Branch (2303:9): [True: 336, False: 51.7k]
  ------------------
 2304|    336|        return SEC_OID_UNKNOWN;
 2305|    336|    }
 2306|       |
 2307|  51.7k|    return oiddata->offset;
 2308|  52.1k|}
SECOID_FindOIDByTag_Util:
 2313|  88.3k|{
 2314|  88.3k|    if (tagnum >= SEC_OID_TOTAL) {
  ------------------
  |  Branch (2314:9): [True: 0, False: 88.3k]
  ------------------
 2315|      0|        return (SECOidData *)secoid_FindDynamicByTag(tagnum);
 2316|      0|    }
 2317|       |
 2318|  88.3k|    PORT_Assert((unsigned int)tagnum < SEC_OID_TOTAL);
  ------------------
  |  |  120|  88.3k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  88.3k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 88.3k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2319|  88.3k|    return (SECOidData *)(&oids[tagnum]);
 2320|  88.3k|}
SECOID_KnownCertExtenOID:
 2324|     29|{
 2325|     29|    SECOidData *oidData;
 2326|       |
 2327|     29|    oidData = SECOID_FindOID(extenOid);
  ------------------
  |  |  115|     29|#define SECOID_FindOID SECOID_FindOID_Util
  ------------------
 2328|     29|    if (oidData == (SECOidData *)NULL)
  ------------------
  |  Branch (2328:9): [True: 15, False: 14]
  ------------------
 2329|     15|        return (PR_FALSE);
  ------------------
  |  |  438|     15|#define PR_FALSE 0
  ------------------
 2330|     14|    return ((oidData->supportedExtension == SUPPORTED_CERT_EXTENSION) ? PR_TRUE : PR_FALSE);
  ------------------
  |  |  437|     14|#define PR_TRUE 1
  ------------------
                  return ((oidData->supportedExtension == SUPPORTED_CERT_EXTENSION) ? PR_TRUE : PR_FALSE);
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  |  Branch (2330:13): [True: 14, False: 0]
  ------------------
 2331|     29|}
SECOID_GetTotalTags:
 2347|      1|{
 2348|      1|    SECOidTag total;
 2349|       |
 2350|       |    /* get the lock to make sure we don't catch and inconsistant value
 2351|       |     * for dynOidEntriesUsed. */
 2352|      1|    NSSRWLock_LockRead(dynOidLock);
  ------------------
  |  |   47|      1|#define NSSRWLock_LockRead NSSRWLock_LockRead_Util
  ------------------
 2353|      1|    total = SEC_OID_TOTAL + dynOidEntriesUsed;
 2354|      1|    NSSRWLock_UnlockRead(dynOidLock);
  ------------------
  |  |   50|      1|#define NSSRWLock_UnlockRead NSSRWLock_UnlockRead_Util
  ------------------
 2355|      1|    return total;
 2356|      1|}
NSS_GetAlgorithmPolicy:
 2383|   884k|{
 2384|   884k|    privXOid *pxo = secoid_FindXOidByTag(tag);
 2385|   884k|    if (!pxo)
  ------------------
  |  Branch (2385:9): [True: 0, False: 884k]
  ------------------
 2386|      0|        return SECFailure;
 2387|   884k|    if (!pValue) {
  ------------------
  |  Branch (2387:9): [True: 0, False: 884k]
  ------------------
 2388|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2389|      0|        return SECFailure;
 2390|      0|    }
 2391|   884k|    *pValue = ~(pxo->notPolicyFlags);
 2392|   884k|    return SECSuccess;
 2393|   884k|}
NSS_SetAlgorithmPolicy:
 2403|    391|{
 2404|    391|    privXOid *pxo = secoid_FindXOidByTag(tag);
 2405|    391|    PRUint32 policyFlags;
 2406|    391|    if (!pxo)
  ------------------
  |  Branch (2406:9): [True: 0, False: 391]
  ------------------
 2407|      0|        return SECFailure;
 2408|       |
 2409|    391|    if (nss_policy_locked) {
  ------------------
  |  Branch (2409:9): [True: 0, False: 391]
  ------------------
 2410|      0|        PORT_SetError(SEC_ERROR_POLICY_LOCKED);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
 2411|      0|        return SECFailure;
 2412|      0|    }
 2413|       |    /* The stored policy flags are the ones complement of the flags as
 2414|       |     * seen by the user.  This is not atomic, but these changes should
 2415|       |     * be done rarely, e.g. at initialization time.
 2416|       |     */
 2417|    391|    policyFlags = ~(pxo->notPolicyFlags);
 2418|    391|    policyFlags = (policyFlags & ~clearBits) | setBits;
 2419|    391|    pxo->notPolicyFlags = ~policyFlags;
 2420|    391|    return SECSuccess;
 2421|    391|}
NSS_SetAlgorithmPolicyAll:
 2426|      1|{
 2427|      1|    SECOidTag tag;
 2428|       |    /* call this once,not once per loop */
 2429|      1|    SECOidTag lastTag = SECOID_GetTotalTags();
 2430|       |
 2431|    392|    for (tag = SEC_OID_UNKNOWN; tag < lastTag; tag++) {
  ------------------
  |  Branch (2431:33): [True: 391, False: 1]
  ------------------
 2432|    391|        SECStatus rv = NSS_SetAlgorithmPolicy(tag, setBits, clearBits);
 2433|       |        /* there are only 2 reasons SetAlgorithmPolicy can fail:
 2434|       |         *  1) we passed an invalid tag, or 2) policy is locked.
 2435|       |         *  The first case should not happen because we are only looping
 2436|       |         *  through known good tags. In the second case, we will always fail,
 2437|       |         *  so there is no point continuing our loop */
 2438|    391|        if (rv != SECSuccess) {
  ------------------
  |  Branch (2438:13): [True: 0, False: 391]
  ------------------
 2439|      0|            return rv;
 2440|      0|        }
 2441|    391|    }
 2442|      1|    return SECSuccess;
 2443|      1|}
SECOID_Shutdown:
 2521|      2|{
 2522|      2|    if (oidhash) {
  ------------------
  |  Branch (2522:9): [True: 1, False: 1]
  ------------------
 2523|      1|        PL_HashTableDestroy(oidhash);
 2524|      1|        oidhash = NULL;
 2525|      1|    }
 2526|      2|    if (oidmechhash) {
  ------------------
  |  Branch (2526:9): [True: 1, False: 1]
  ------------------
 2527|      1|        PL_HashTableDestroy(oidmechhash);
 2528|      1|        oidmechhash = NULL;
 2529|      1|    }
 2530|       |    /* Have to handle the case where the lock was created, but
 2531|       |    ** the pool wasn't.
 2532|       |    ** I'm not going to attempt to create the lock, just to protect
 2533|       |    ** the destruction of data that probably isn't initialized anyway.
 2534|       |    */
 2535|      2|    if (dynOidLock) {
  ------------------
  |  Branch (2535:9): [True: 1, False: 1]
  ------------------
 2536|      1|        SKIP_AFTER_FORK(NSSRWLock_LockWrite(dynOidLock));
  ------------------
  |  | 2513|      1|    if (!parentForkedAfterC_Initialize) \
  |  |  ------------------
  |  |  |  Branch (2513:9): [True: 1, False: 0]
  |  |  ------------------
  |  | 2514|      1|    x
  ------------------
 2537|      1|        if (dynOidHash) {
  ------------------
  |  Branch (2537:13): [True: 0, False: 1]
  ------------------
 2538|      0|            PL_HashTableDestroy(dynOidHash);
 2539|      0|            dynOidHash = NULL;
 2540|      0|        }
 2541|      1|        if (dynOidPool) {
  ------------------
  |  Branch (2541:13): [True: 1, False: 0]
  ------------------
 2542|      1|            PORT_FreeArena(dynOidPool, PR_FALSE);
  ------------------
  |  |   61|      1|#define PORT_FreeArena PORT_FreeArena_Util
  ------------------
                          PORT_FreeArena(dynOidPool, PR_FALSE);
  ------------------
  |  |  438|      1|#define PR_FALSE 0
  ------------------
 2543|      1|            dynOidPool = NULL;
 2544|      1|        }
 2545|      1|        if (dynOidTable) {
  ------------------
  |  Branch (2545:13): [True: 0, False: 1]
  ------------------
 2546|      0|            PORT_Free(dynOidTable);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
 2547|      0|            dynOidTable = NULL;
 2548|      0|        }
 2549|      1|        dynOidEntriesAllocated = 0;
 2550|      1|        dynOidEntriesUsed = 0;
 2551|       |
 2552|      1|        SKIP_AFTER_FORK(NSSRWLock_UnlockWrite(dynOidLock));
  ------------------
  |  | 2513|      1|    if (!parentForkedAfterC_Initialize) \
  |  |  ------------------
  |  |  |  Branch (2513:9): [True: 1, False: 0]
  |  |  ------------------
  |  | 2514|      1|    x
  ------------------
 2553|      1|        SKIP_AFTER_FORK(NSSRWLock_Destroy(dynOidLock));
  ------------------
  |  | 2513|      1|    if (!parentForkedAfterC_Initialize) \
  |  |  ------------------
  |  |  |  Branch (2513:9): [True: 1, False: 0]
  |  |  ------------------
  |  | 2514|      1|    x
  ------------------
 2554|      1|        dynOidLock = NULL;
 2555|      1|    } else {
 2556|       |        /* Since dynOidLock doesn't exist, then all the data it protects
 2557|       |        ** should be uninitialized.  We'll check that (in DEBUG builds),
 2558|       |        ** and then make sure it is so, in case NSS is reinitialized.
 2559|       |        */
 2560|      1|        PORT_Assert(!dynOidHash && !dynOidPool && !dynOidTable &&
  ------------------
  |  |  120|      1|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      8|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 1, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 1, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 1, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 1, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2561|      1|                    !dynOidEntriesAllocated && !dynOidEntriesUsed);
 2562|      1|        dynOidHash = NULL;
 2563|      1|        dynOidPool = NULL;
 2564|      1|        dynOidTable = NULL;
 2565|      1|        dynOidEntriesAllocated = 0;
 2566|      1|        dynOidEntriesUsed = 0;
 2567|      1|    }
 2568|       |    /* we are trashing the old policy state now, also reenable changing
 2569|       |     * the policy as well */
 2570|      2|    nss_policy_locked = PR_FALSE;
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
 2571|      2|    memset(xOids, 0, sizeof xOids);
 2572|      2|    return SECSuccess;
 2573|      2|}
UTIL_SetForkState:
 2577|      2|{
 2578|      2|    parentForkedAfterC_Initialize = forked;
 2579|      2|}
secoid.c:secoid_InitDynOidData:
 1949|      1|{
 1950|      1|    SECStatus rv = SECSuccess;
 1951|       |
 1952|      1|    dynOidLock = NSSRWLock_New(1, "dynamic OID data");
  ------------------
  |  |   49|      1|#define NSSRWLock_New NSSRWLock_New_Util
  ------------------
 1953|      1|    if (!dynOidLock) {
  ------------------
  |  Branch (1953:9): [True: 0, False: 1]
  ------------------
 1954|      0|        return SECFailure; /* Error code should already be set. */
 1955|      0|    }
 1956|      1|    dynOidPool = PORT_NewArena(2048);
  ------------------
  |  |   63|      1|#define PORT_NewArena PORT_NewArena_Util
  ------------------
 1957|      1|    if (!dynOidPool) {
  ------------------
  |  Branch (1957:9): [True: 0, False: 1]
  ------------------
 1958|      0|        rv = SECFailure /* Error code should already be set. */;
 1959|      0|    }
 1960|      1|    return rv;
 1961|      1|}
secoid.c:secoid_HashNumber:
 2128|  1.69k|{
 2129|  1.69k|    return (PLHashNumber)((char *)key - (char *)NULL);
 2130|  1.69k|}
secoid.c:secoid_FindDynamic:
 1988|  13.4k|{
 1989|  13.4k|    SECOidData *ret = NULL;
 1990|       |
 1991|  13.4k|    NSSRWLock_LockRead(dynOidLock);
  ------------------
  |  |   47|  13.4k|#define NSSRWLock_LockRead NSSRWLock_LockRead_Util
  ------------------
 1992|  13.4k|    if (dynOidHash) {
  ------------------
  |  Branch (1992:9): [True: 0, False: 13.4k]
  ------------------
 1993|      0|        ret = (SECOidData *)PL_HashTableLookup(dynOidHash, key);
 1994|      0|    }
 1995|  13.4k|    NSSRWLock_UnlockRead(dynOidLock);
  ------------------
  |  |   50|  13.4k|#define NSSRWLock_UnlockRead NSSRWLock_UnlockRead_Util
  ------------------
 1996|  13.4k|    if (ret == NULL) {
  ------------------
  |  Branch (1996:9): [True: 13.4k, False: 0]
  ------------------
 1997|  13.4k|        PORT_SetError(SEC_ERROR_UNRECOGNIZED_OID);
  ------------------
  |  |   65|  13.4k|#define PORT_SetError PORT_SetError_Util
  ------------------
 1998|  13.4k|    }
 1999|  13.4k|    return ret;
 2000|  13.4k|}
secoid.c:secoid_FindXOidByTag:
 2366|   884k|{
 2367|   884k|    if (tagnum >= SEC_OID_TOTAL) {
  ------------------
  |  Branch (2367:9): [True: 0, False: 884k]
  ------------------
 2368|      0|        dynXOid *dxo = secoid_FindDynamicByTag(tagnum);
 2369|      0|        return (dxo ? &dxo->priv : NULL);
  ------------------
  |  Branch (2369:17): [True: 0, False: 0]
  ------------------
 2370|      0|    }
 2371|       |
 2372|   884k|    PORT_Assert((unsigned int)tagnum < SEC_OID_TOTAL);
  ------------------
  |  |  120|   884k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|   884k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 884k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2373|   884k|    return &xOids[tagnum];
 2374|   884k|}

PORT_Alloc_Util:
   82|  1.01M|{
   83|  1.01M|    void *rv = NULL;
   84|       |
   85|  1.01M|    if (bytes <= MAX_SIZE) {
  ------------------
  |  |   78|  1.01M|#define MAX_SIZE (PR_UINT32_MAX >> 1)
  |  |  ------------------
  |  |  |  |  302|  1.01M|#define PR_UINT32_MAX PR_UINT32(4294967295)
  |  |  |  |  ------------------
  |  |  |  |  |  |  282|  1.01M|#define PR_UINT32(x) x ## U
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (85:9): [True: 1.01M, False: 0]
  ------------------
   86|       |        /* Always allocate a non-zero amount of bytes */
   87|  1.01M|        rv = PR_Malloc(bytes ? bytes : 1);
  ------------------
  |  Branch (87:24): [True: 1.01M, False: 0]
  ------------------
   88|  1.01M|    }
   89|  1.01M|    if (!rv) {
  ------------------
  |  Branch (89:9): [True: 0, False: 1.01M]
  ------------------
   90|      0|        PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
   91|      0|    }
   92|  1.01M|    return rv;
   93|  1.01M|}
PORT_Realloc_Util:
   97|  1.21k|{
   98|  1.21k|    void *rv = NULL;
   99|       |
  100|  1.21k|    if (bytes <= MAX_SIZE) {
  ------------------
  |  |   78|  1.21k|#define MAX_SIZE (PR_UINT32_MAX >> 1)
  |  |  ------------------
  |  |  |  |  302|  1.21k|#define PR_UINT32_MAX PR_UINT32(4294967295)
  |  |  |  |  ------------------
  |  |  |  |  |  |  282|  1.21k|#define PR_UINT32(x) x ## U
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (100:9): [True: 1.21k, False: 0]
  ------------------
  101|  1.21k|        rv = PR_Realloc(oldptr, bytes);
  102|  1.21k|    }
  103|  1.21k|    if (!rv) {
  ------------------
  |  Branch (103:9): [True: 0, False: 1.21k]
  ------------------
  104|      0|        PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  105|      0|    }
  106|  1.21k|    return rv;
  107|  1.21k|}
PORT_ZAlloc_Util:
  111|   515k|{
  112|   515k|    void *rv = NULL;
  113|       |
  114|   515k|    if (bytes <= MAX_SIZE) {
  ------------------
  |  |   78|   515k|#define MAX_SIZE (PR_UINT32_MAX >> 1)
  |  |  ------------------
  |  |  |  |  302|   515k|#define PR_UINT32_MAX PR_UINT32(4294967295)
  |  |  |  |  ------------------
  |  |  |  |  |  |  282|   515k|#define PR_UINT32(x) x ## U
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (114:9): [True: 515k, False: 0]
  ------------------
  115|       |        /* Always allocate a non-zero amount of bytes */
  116|   515k|        rv = PR_Calloc(1, bytes ? bytes : 1);
  ------------------
  |  Branch (116:27): [True: 515k, False: 0]
  ------------------
  117|   515k|    }
  118|   515k|    if (!rv) {
  ------------------
  |  Branch (118:9): [True: 0, False: 515k]
  ------------------
  119|      0|        PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  120|      0|    }
  121|   515k|    return rv;
  122|   515k|}
PORT_ZAllocAligned_Util:
  127|  9.98k|{
  128|  9.98k|    size_t x = alignment - 1;
  129|       |
  130|       |    /* This only works if alignment is a power of 2. */
  131|  9.98k|    if ((alignment == 0) || (alignment & (alignment - 1))) {
  ------------------
  |  Branch (131:9): [True: 0, False: 9.98k]
  |  Branch (131:29): [True: 0, False: 9.98k]
  ------------------
  132|      0|        PORT_SetError(SEC_ERROR_INVALID_ARGS);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  133|      0|        return NULL;
  134|      0|    }
  135|       |
  136|  9.98k|    if (!mem) {
  ------------------
  |  Branch (136:9): [True: 0, False: 9.98k]
  ------------------
  137|      0|        return NULL;
  138|      0|    }
  139|       |
  140|       |    /* Always allocate a non-zero amount of bytes */
  141|  9.98k|    *mem = PORT_ZAlloc((bytes ? bytes : 1) + x);
  ------------------
  |  |   72|  9.98k|#define PORT_ZAlloc PORT_ZAlloc_Util
  ------------------
  |  Branch (141:25): [True: 9.98k, False: 0]
  ------------------
  142|  9.98k|    if (!*mem) {
  ------------------
  |  Branch (142:9): [True: 0, False: 9.98k]
  ------------------
  143|      0|        PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  144|      0|        return NULL;
  145|      0|    }
  146|       |
  147|  9.98k|    return (void *)(((uintptr_t)*mem + x) & ~(uintptr_t)x);
  148|  9.98k|}
PORT_ZAllocAlignedOffset_Util:
  152|  9.98k|{
  153|  9.98k|    PORT_Assert(offset < size);
  ------------------
  |  |  120|  9.98k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  9.98k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 9.98k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  154|  9.98k|    if (offset > size) {
  ------------------
  |  Branch (154:9): [True: 0, False: 9.98k]
  ------------------
  155|      0|        return NULL;
  156|      0|    }
  157|       |
  158|  9.98k|    void *mem = NULL;
  159|  9.98k|    void *v = PORT_ZAllocAligned(size, alignment, &mem);
  ------------------
  |  |   73|  9.98k|#define PORT_ZAllocAligned PORT_ZAllocAligned_Util
  ------------------
  160|  9.98k|    if (!v) {
  ------------------
  |  Branch (160:9): [True: 0, False: 9.98k]
  ------------------
  161|      0|        return NULL;
  162|      0|    }
  163|       |
  164|  9.98k|    PORT_Assert(mem);
  ------------------
  |  |  120|  9.98k|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|  9.98k|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 9.98k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  165|  9.98k|    *((void **)((uintptr_t)v + offset)) = mem;
  166|  9.98k|    return v;
  167|  9.98k|}
PORT_Free_Util:
  171|  1.70M|{
  172|  1.70M|    if (ptr) {
  ------------------
  |  Branch (172:9): [True: 1.26M, False: 439k]
  ------------------
  173|  1.26M|        PR_Free(ptr);
  174|  1.26M|    }
  175|  1.70M|}
PORT_ZFree_Util:
  179|   283k|{
  180|   283k|    if (ptr) {
  ------------------
  |  Branch (180:9): [True: 266k, False: 17.5k]
  ------------------
  181|   266k|        memset(ptr, 0, len);
  182|   266k|        PR_Free(ptr);
  183|   266k|    }
  184|   283k|}
PORT_Strdup_Util:
  188|  36.7k|{
  189|  36.7k|    size_t len = PORT_Strlen(str) + 1;
  ------------------
  |  |  190|  36.7k|#define PORT_Strlen(s) strlen(s)
  ------------------
  190|  36.7k|    char *newstr;
  191|       |
  192|  36.7k|    newstr = (char *)PORT_Alloc(len);
  ------------------
  |  |   52|  36.7k|#define PORT_Alloc PORT_Alloc_Util
  ------------------
  193|  36.7k|    if (newstr) {
  ------------------
  |  Branch (193:9): [True: 36.7k, False: 0]
  ------------------
  194|  36.7k|        PORT_Memcpy(newstr, str, len);
  ------------------
  |  |  180|  36.7k|#define PORT_Memcpy memcpy
  ------------------
  195|  36.7k|    }
  196|  36.7k|    return newstr;
  197|  36.7k|}
PORT_SetError_Util:
  201|   266k|{
  202|   266k|    PR_SetError(value, 0);
  203|   266k|    return;
  204|   266k|}
PORT_GetError_Util:
  208|  35.2k|{
  209|  35.2k|    return (PR_GetError());
  210|  35.2k|}
PORT_SafeZero:
  214|  74.4k|{
  215|       |    /* there are cases where the compiler optimizes away our attempt to clear
  216|       |     * out our stack variables. There are multiple solutions for this problem,
  217|       |     * but they aren't universally accepted on all platforms. This attempts
  218|       |     * to select the best solution available given our os, compilier, and
  219|       |     * libc */
  220|       |#ifdef __STDC_LIB_EXT1__
  221|       |    /* if the os implements C11 annex K, use memset_s */
  222|       |    memset_s(p, n, 0, n);
  223|       |#else
  224|       |    /* _DEFAULT_SORUCE  == BSD source in GCC based environments
  225|       |     * if other environmens support explicit_bzero, their defines
  226|       |     * should be added here */
  227|  74.4k|#if (defined(_DEFAULT_SOURCE) || defined(_BSD_SOURCE)) && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 25))
  228|  74.4k|    explicit_bzero(p, n);
  229|       |#else
  230|       |#ifdef XP_WIN
  231|       |    /* windows has a secure zero funtion */
  232|       |    SecureZeroMemory(p, n);
  233|       |#else
  234|       |    /* if the os doesn't support one of the above, but does support
  235|       |     * memset_explicit, you can add the definition for memset with the
  236|       |     * appropriate define check here */
  237|       |    /* define an explicitly implementated Safe zero if the OS
  238|       |     * doesn't provide one */
  239|       |    if (p != NULL) {
  240|       |        volatile unsigned char *__vl = (unsigned char *)p;
  241|       |        size_t __nl = n;
  242|       |        while (__nl--)
  243|       |            *__vl++ = 0;
  244|       |    }
  245|       |#endif /* no windows SecureZeroMemory */
  246|       |#endif /* no explicit_bzero */
  247|  74.4k|#endif /* no memset_s */
  248|  74.4k|}
PORT_NewArena_Util:
  300|  93.9k|{
  301|  93.9k|    PORTArenaPool *pool;
  302|       |
  303|  93.9k|    if (chunksize > MAX_SIZE) {
  ------------------
  |  |   78|  93.9k|#define MAX_SIZE (PR_UINT32_MAX >> 1)
  |  |  ------------------
  |  |  |  |  302|  93.9k|#define PR_UINT32_MAX PR_UINT32(4294967295)
  |  |  |  |  ------------------
  |  |  |  |  |  |  282|  93.9k|#define PR_UINT32(x) x ## U
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (303:9): [True: 0, False: 93.9k]
  ------------------
  304|      0|        PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  305|      0|        return NULL;
  306|      0|    }
  307|  93.9k|    pool = PORT_ZNew(PORTArenaPool);
  ------------------
  |  |  148|  93.9k|#define PORT_ZNew(type) (type *)PORT_ZAlloc(sizeof(type))
  |  |  ------------------
  |  |  |  |   72|  93.9k|#define PORT_ZAlloc PORT_ZAlloc_Util
  |  |  ------------------
  ------------------
  308|  93.9k|    if (!pool) {
  ------------------
  |  Branch (308:9): [True: 0, False: 93.9k]
  ------------------
  309|      0|        return NULL;
  310|      0|    }
  311|  93.9k|    pool->magic = ARENAPOOL_MAGIC;
  ------------------
  |  |   51|  93.9k|#define ARENAPOOL_MAGIC 0xB8AC9BDF
  ------------------
  312|  93.9k|    pool->lock = PZ_NewLock(nssILockArena);
  ------------------
  |  |  243|  93.9k|#define PZ_NewLock(t) PR_NewLock()
  ------------------
  313|  93.9k|    if (!pool->lock) {
  ------------------
  |  Branch (313:9): [True: 0, False: 93.9k]
  ------------------
  314|      0|        PORT_Free(pool);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
  315|      0|        return NULL;
  316|      0|    }
  317|  93.9k|    PL_InitArenaPool(&pool->arena, "security", chunksize, sizeof(double));
  318|  93.9k|    return (&pool->arena);
  319|  93.9k|}
PORT_InitCheapArena:
  323|  61.8k|{
  324|  61.8k|    pool->magic = CHEAP_ARENAPOOL_MAGIC;
  ------------------
  |  |   53|  61.8k|#define CHEAP_ARENAPOOL_MAGIC 0x3F16BB09
  ------------------
  325|  61.8k|    PL_InitArenaPool(&pool->arena, "security", chunksize, sizeof(double));
  326|  61.8k|}
PORT_ArenaAlloc_Util:
  330|   416k|{
  331|   416k|    void *p = NULL;
  332|       |
  333|   416k|    PORTArenaPool *pool = (PORTArenaPool *)arena;
  334|       |
  335|   416k|    if (size <= 0) {
  ------------------
  |  Branch (335:9): [True: 24, False: 416k]
  ------------------
  336|     24|        size = 1;
  337|     24|    }
  338|       |
  339|   416k|    if (size > MAX_SIZE) {
  ------------------
  |  |   78|   416k|#define MAX_SIZE (PR_UINT32_MAX >> 1)
  |  |  ------------------
  |  |  |  |  302|   416k|#define PR_UINT32_MAX PR_UINT32(4294967295)
  |  |  |  |  ------------------
  |  |  |  |  |  |  282|   416k|#define PR_UINT32(x) x ## U
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (339:9): [True: 0, False: 416k]
  ------------------
  340|       |        /* you lose. */
  341|      0|    } else
  342|       |        /* Is it one of ours?  Assume so and check the magic */
  343|   416k|        if (ARENAPOOL_MAGIC == pool->magic) {
  ------------------
  |  |   51|   416k|#define ARENAPOOL_MAGIC 0xB8AC9BDF
  ------------------
  |  Branch (343:13): [True: 404k, False: 12.5k]
  ------------------
  344|   404k|            PZ_Lock(pool->lock);
  ------------------
  |  |  245|   404k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
  345|   404k|#ifdef THREADMARK
  346|       |            /* Most likely one of ours.  Is there a thread id? */
  347|   404k|            if (pool->marking_thread &&
  ------------------
  |  Branch (347:17): [True: 154k, False: 250k]
  ------------------
  348|   404k|                pool->marking_thread != PR_GetCurrentThread()) {
  ------------------
  |  Branch (348:17): [True: 0, False: 154k]
  ------------------
  349|       |                /* Another thread holds a mark in this arena */
  350|      0|                PZ_Unlock(pool->lock);
  ------------------
  |  |  246|      0|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  351|      0|                PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  352|      0|                PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  353|      0|                return NULL;
  354|      0|            } /* tid != null */
  355|   404k|#endif        /* THREADMARK */
  356|   404k|            PL_ARENA_ALLOCATE(p, arena, size);
  ------------------
  |  |  150|   808k|    PR_BEGIN_MACRO \
  |  |  ------------------
  |  |  |  |  123|   404k|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |  151|   808k|        PLArena *_a = (pool)->current; \
  |  |  152|   808k|        PRUint32 _nb = PL_ARENA_ALIGN(pool, (PRUint32)nb); \
  |  |  ------------------
  |  |  |  |  146|   404k|#define PL_ARENA_ALIGN(pool, n) (((PRUword)(n) + (pool)->mask) & ~(pool)->mask)
  |  |  ------------------
  |  |  153|   808k|        PRUword _p = _a->avail; \
  |  |  154|   808k|        if (_nb < (PRUint32)nb) { \
  |  |  ------------------
  |  |  |  Branch (154:13): [True: 0, False: 404k]
  |  |  ------------------
  |  |  155|      0|            _p = 0; \
  |  |  156|   404k|        } else if (_nb > (_a->limit - _a->avail)) { \
  |  |  ------------------
  |  |  |  Branch (156:20): [True: 83.0k, False: 321k]
  |  |  ------------------
  |  |  157|  83.0k|            _p = (PRUword)PL_ArenaAllocate(pool, _nb); \
  |  |  158|   321k|        } else { \
  |  |  159|   321k|            _a->avail += _nb; \
  |  |  160|   321k|        } \
  |  |  161|   808k|        p = (void *)_p; \
  |  |  162|   808k|        if (p) { \
  |  |  ------------------
  |  |  |  Branch (162:13): [True: 404k, False: 0]
  |  |  ------------------
  |  |  163|   404k|            PL_MAKE_MEM_UNDEFINED(p, (PRUint32)nb); \
  |  |  164|   404k|            PL_ArenaCountAllocation(pool, (PRUint32)nb); \
  |  |  165|   404k|        } \
  |  |  166|   808k|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|   404k|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  357|   404k|            PZ_Unlock(pool->lock);
  ------------------
  |  |  246|   404k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  358|   404k|        } else {
  359|  12.5k|            PL_ARENA_ALLOCATE(p, arena, size);
  ------------------
  |  |  150|  12.5k|    PR_BEGIN_MACRO \
  |  |  ------------------
  |  |  |  |  123|  12.5k|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |  151|  12.5k|        PLArena *_a = (pool)->current; \
  |  |  152|  12.5k|        PRUint32 _nb = PL_ARENA_ALIGN(pool, (PRUint32)nb); \
  |  |  ------------------
  |  |  |  |  146|  12.5k|#define PL_ARENA_ALIGN(pool, n) (((PRUword)(n) + (pool)->mask) & ~(pool)->mask)
  |  |  ------------------
  |  |  153|  12.5k|        PRUword _p = _a->avail; \
  |  |  154|  12.5k|        if (_nb < (PRUint32)nb) { \
  |  |  ------------------
  |  |  |  Branch (154:13): [True: 0, False: 12.5k]
  |  |  ------------------
  |  |  155|      0|            _p = 0; \
  |  |  156|  12.5k|        } else if (_nb > (_a->limit - _a->avail)) { \
  |  |  ------------------
  |  |  |  Branch (156:20): [True: 8.24k, False: 4.33k]
  |  |  ------------------
  |  |  157|  8.24k|            _p = (PRUword)PL_ArenaAllocate(pool, _nb); \
  |  |  158|  8.24k|        } else { \
  |  |  159|  4.33k|            _a->avail += _nb; \
  |  |  160|  4.33k|        } \
  |  |  161|  12.5k|        p = (void *)_p; \
  |  |  162|  12.5k|        if (p) { \
  |  |  ------------------
  |  |  |  Branch (162:13): [True: 12.5k, False: 0]
  |  |  ------------------
  |  |  163|  12.5k|            PL_MAKE_MEM_UNDEFINED(p, (PRUint32)nb); \
  |  |  164|  12.5k|            PL_ArenaCountAllocation(pool, (PRUint32)nb); \
  |  |  165|  12.5k|        } \
  |  |  166|  12.5k|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|  12.5k|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  360|  12.5k|        }
  361|       |
  362|   416k|    if (!p) {
  ------------------
  |  Branch (362:9): [True: 0, False: 416k]
  ------------------
  363|      0|        PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  364|      0|    }
  365|       |
  366|   416k|    return (p);
  367|   416k|}
PORT_ArenaZAlloc_Util:
  371|   103k|{
  372|   103k|    void *p;
  373|       |
  374|   103k|    if (size <= 0)
  ------------------
  |  Branch (374:9): [True: 36, False: 102k]
  ------------------
  375|     36|        size = 1;
  376|       |
  377|   103k|    p = PORT_ArenaAlloc(arena, size);
  ------------------
  |  |   53|   103k|#define PORT_ArenaAlloc PORT_ArenaAlloc_Util
  ------------------
  378|       |
  379|   103k|    if (p) {
  ------------------
  |  Branch (379:9): [True: 103k, False: 0]
  ------------------
  380|   103k|        PORT_Memset(p, 0, size);
  ------------------
  |  |  182|   103k|#define PORT_Memset memset
  ------------------
  381|   103k|    }
  382|       |
  383|   103k|    return (p);
  384|   103k|}
PORT_FreeArena_Util:
  401|  93.9k|{
  402|  93.9k|    PORTArenaPool *pool = (PORTArenaPool *)arena;
  403|  93.9k|    PRLock *lock = (PRLock *)0;
  404|  93.9k|    size_t len = sizeof *arena;
  405|       |
  406|  93.9k|    if (!pool)
  ------------------
  |  Branch (406:9): [True: 0, False: 93.9k]
  ------------------
  407|      0|        return;
  408|  93.9k|    if (ARENAPOOL_MAGIC == pool->magic) {
  ------------------
  |  |   51|  93.9k|#define ARENAPOOL_MAGIC 0xB8AC9BDF
  ------------------
  |  Branch (408:9): [True: 93.9k, False: 0]
  ------------------
  409|  93.9k|        len = sizeof *pool;
  410|  93.9k|        lock = pool->lock;
  411|  93.9k|        PZ_Lock(lock);
  ------------------
  |  |  245|  93.9k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
  412|  93.9k|    }
  413|  93.9k|    if (zero) {
  ------------------
  |  Branch (413:9): [True: 51.0k, False: 42.9k]
  ------------------
  414|  51.0k|        PL_ClearArenaPool(arena, 0);
  415|  51.0k|    }
  416|  93.9k|    (void)PR_CallOnce(&setupUseFreeListOnce, &SetupUseFreeList);
  417|  93.9k|    if (useFreeList) {
  ------------------
  |  Branch (417:9): [True: 93.9k, False: 0]
  ------------------
  418|  93.9k|        PL_FreeArenaPool(arena);
  419|  93.9k|    } else {
  420|      0|        PL_FinishArenaPool(arena);
  421|      0|    }
  422|  93.9k|    PORT_ZFree(arena, len);
  ------------------
  |  |   75|  93.9k|#define PORT_ZFree PORT_ZFree_Util
  ------------------
  423|  93.9k|    if (lock) {
  ------------------
  |  Branch (423:9): [True: 93.9k, False: 0]
  ------------------
  424|  93.9k|        PZ_Unlock(lock);
  ------------------
  |  |  246|  93.9k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  425|  93.9k|        PZ_DestroyLock(lock);
  ------------------
  |  |  244|  93.9k|#define PZ_DestroyLock(k) PR_DestroyLock((k))
  ------------------
  426|  93.9k|    }
  427|  93.9k|}
PORT_DestroyCheapArena:
  431|  61.8k|{
  432|  61.8k|    (void)PR_CallOnce(&setupUseFreeListOnce, &SetupUseFreeList);
  433|  61.8k|    if (useFreeList) {
  ------------------
  |  Branch (433:9): [True: 61.8k, False: 0]
  ------------------
  434|  61.8k|        PL_FreeArenaPool(&pool->arena);
  435|  61.8k|    } else {
  436|      0|        PL_FinishArenaPool(&pool->arena);
  437|      0|    }
  438|  61.8k|}
PORT_ArenaMark_Util:
  465|   123k|{
  466|   123k|    void *result;
  467|       |
  468|   123k|    PORTArenaPool *pool = (PORTArenaPool *)arena;
  469|   123k|    if (ARENAPOOL_MAGIC == pool->magic) {
  ------------------
  |  |   51|   123k|#define ARENAPOOL_MAGIC 0xB8AC9BDF
  ------------------
  |  Branch (469:9): [True: 122k, False: 713]
  ------------------
  470|   122k|        PZ_Lock(pool->lock);
  ------------------
  |  |  245|   122k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
  471|   122k|#ifdef THREADMARK
  472|   122k|        {
  473|   122k|            threadmark_mark *tm, **pw;
  474|   122k|            PRThread *currentThread = PR_GetCurrentThread();
  475|       |
  476|   122k|            if (!pool->marking_thread) {
  ------------------
  |  Branch (476:17): [True: 122k, False: 0]
  ------------------
  477|       |                /* First mark */
  478|   122k|                pool->marking_thread = currentThread;
  479|   122k|            } else if (currentThread != pool->marking_thread) {
  ------------------
  |  Branch (479:24): [True: 0, False: 0]
  ------------------
  480|      0|                PZ_Unlock(pool->lock);
  ------------------
  |  |  246|      0|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  481|      0|                PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  482|      0|                PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  483|      0|                return NULL;
  484|      0|            }
  485|       |
  486|   122k|            result = PL_ARENA_MARK(arena);
  ------------------
  |  |  187|   122k|#define PL_ARENA_MARK(pool) ((void *) (pool)->current->avail)
  ------------------
  487|   122k|            PL_ARENA_ALLOCATE(tm, arena, sizeof(threadmark_mark));
  ------------------
  |  |  150|   122k|    PR_BEGIN_MACRO \
  |  |  ------------------
  |  |  |  |  123|   122k|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |  151|   122k|        PLArena *_a = (pool)->current; \
  |  |  152|   122k|        PRUint32 _nb = PL_ARENA_ALIGN(pool, (PRUint32)nb); \
  |  |  ------------------
  |  |  |  |  146|   122k|#define PL_ARENA_ALIGN(pool, n) (((PRUword)(n) + (pool)->mask) & ~(pool)->mask)
  |  |  ------------------
  |  |  153|   122k|        PRUword _p = _a->avail; \
  |  |  154|   122k|        if (_nb < (PRUint32)nb) { \
  |  |  ------------------
  |  |  |  Branch (154:13): [True: 0, False: 122k]
  |  |  ------------------
  |  |  155|      0|            _p = 0; \
  |  |  156|   122k|        } else if (_nb > (_a->limit - _a->avail)) { \
  |  |  ------------------
  |  |  |  Branch (156:20): [True: 1.13k, False: 121k]
  |  |  ------------------
  |  |  157|  1.13k|            _p = (PRUword)PL_ArenaAllocate(pool, _nb); \
  |  |  158|   121k|        } else { \
  |  |  159|   121k|            _a->avail += _nb; \
  |  |  160|   121k|        } \
  |  |  161|   122k|        p = (void *)_p; \
  |  |  162|   122k|        if (p) { \
  |  |  ------------------
  |  |  |  Branch (162:13): [True: 122k, False: 0]
  |  |  ------------------
  |  |  163|   122k|            PL_MAKE_MEM_UNDEFINED(p, (PRUint32)nb); \
  |  |  164|   122k|            PL_ArenaCountAllocation(pool, (PRUint32)nb); \
  |  |  165|   122k|        } \
  |  |  166|   122k|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|   122k|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  488|   122k|            if (!tm) {
  ------------------
  |  Branch (488:17): [True: 0, False: 122k]
  ------------------
  489|      0|                PZ_Unlock(pool->lock);
  ------------------
  |  |  246|      0|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  490|      0|                PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  491|      0|                return NULL;
  492|      0|            }
  493|       |
  494|   122k|            tm->mark = result;
  495|   122k|            tm->next = (threadmark_mark *)NULL;
  496|       |
  497|   122k|            pw = &pool->first_mark;
  498|   122k|            while (*pw) {
  ------------------
  |  Branch (498:20): [True: 0, False: 122k]
  ------------------
  499|      0|                pw = &(*pw)->next;
  500|      0|            }
  501|       |
  502|   122k|            *pw = tm;
  503|   122k|        }
  504|       |#else  /* THREADMARK */
  505|       |        result = PL_ARENA_MARK(arena);
  506|       |#endif /* THREADMARK */
  507|   122k|        PZ_Unlock(pool->lock);
  ------------------
  |  |  246|   122k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  508|   122k|    } else {
  509|       |        /* a "pure" NSPR arena */
  510|    713|        result = PL_ARENA_MARK(arena);
  ------------------
  |  |  187|    713|#define PL_ARENA_MARK(pool) ((void *) (pool)->current->avail)
  ------------------
  511|    713|    }
  512|   123k|    return result;
  513|   123k|}
PORT_ArenaRelease_Util:
  617|    125|{
  618|    125|    port_ArenaRelease(arena, mark, PR_FALSE);
  ------------------
  |  |  438|    125|#define PR_FALSE 0
  ------------------
  619|    125|}
PORT_ArenaUnmark_Util:
  632|   123k|{
  633|   123k|#ifdef THREADMARK
  634|   123k|    PORTArenaPool *pool = (PORTArenaPool *)arena;
  635|   123k|    if (ARENAPOOL_MAGIC == pool->magic) {
  ------------------
  |  |   51|   123k|#define ARENAPOOL_MAGIC 0xB8AC9BDF
  ------------------
  |  Branch (635:9): [True: 122k, False: 713]
  ------------------
  636|   122k|        threadmark_mark **pw;
  637|       |
  638|   122k|        PZ_Lock(pool->lock);
  ------------------
  |  |  245|   122k|#define PZ_Lock(k) PR_Lock((k))
  ------------------
  639|       |
  640|   122k|        if (PR_GetCurrentThread() != pool->marking_thread) {
  ------------------
  |  Branch (640:13): [True: 0, False: 122k]
  ------------------
  641|      0|            PZ_Unlock(pool->lock);
  ------------------
  |  |  246|      0|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  642|      0|            PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  643|      0|            PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  644|      0|            return /* no error indication available */;
  645|      0|        }
  646|       |
  647|   122k|        pw = &pool->first_mark;
  648|   122k|        while (((threadmark_mark *)NULL != *pw) && (mark != (*pw)->mark)) {
  ------------------
  |  Branch (648:16): [True: 122k, False: 0]
  |  Branch (648:52): [True: 0, False: 122k]
  ------------------
  649|      0|            pw = &(*pw)->next;
  650|      0|        }
  651|       |
  652|   122k|        if ((threadmark_mark *)NULL == *pw) {
  ------------------
  |  Branch (652:13): [True: 0, False: 122k]
  ------------------
  653|       |            /* bad mark */
  654|      0|            PZ_Unlock(pool->lock);
  ------------------
  |  |  246|      0|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  655|      0|            PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  656|      0|            PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  657|      0|            return /* no error indication available */;
  658|      0|        }
  659|       |
  660|   122k|        *pw = (threadmark_mark *)NULL;
  661|       |
  662|   122k|        if (!pool->first_mark) {
  ------------------
  |  Branch (662:13): [True: 122k, False: 0]
  ------------------
  663|   122k|            pool->marking_thread = (PRThread *)NULL;
  664|   122k|        }
  665|       |
  666|   122k|        PZ_Unlock(pool->lock);
  ------------------
  |  |  246|   122k|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  667|   122k|    }
  668|   123k|#endif /* THREADMARK */
  669|   123k|}
PORT_ArenaStrdup_Util:
  673|  10.1k|{
  674|  10.1k|    int len = PORT_Strlen(str) + 1;
  ------------------
  |  |  190|  10.1k|#define PORT_Strlen(s) strlen(s)
  ------------------
  675|  10.1k|    char *newstr;
  676|       |
  677|  10.1k|    newstr = (char *)PORT_ArenaAlloc(arena, len);
  ------------------
  |  |   53|  10.1k|#define PORT_ArenaAlloc PORT_ArenaAlloc_Util
  ------------------
  678|  10.1k|    if (newstr) {
  ------------------
  |  Branch (678:9): [True: 10.1k, False: 0]
  ------------------
  679|  10.1k|        PORT_Memcpy(newstr, str, len);
  ------------------
  |  |  180|  10.1k|#define PORT_Memcpy memcpy
  ------------------
  680|  10.1k|    }
  681|  10.1k|    return newstr;
  682|  10.1k|}
PORT_UCS4_UTF8Conversion:
  717|     97|{
  718|     97|    if (!ucs4Utf8ConvertFunc) {
  ------------------
  |  Branch (718:9): [True: 97, False: 0]
  ------------------
  719|     97|        return sec_port_ucs4_utf8_conversion_function(toUnicode,
  720|     97|                                                      inBuf, inBufLen, outBuf, maxOutBufLen, outBufLen);
  721|     97|    }
  722|       |
  723|      0|    return (*ucs4Utf8ConvertFunc)(toUnicode, inBuf, inBufLen, outBuf,
  724|      0|                                  maxOutBufLen, outBufLen);
  725|     97|}
PORT_UCS2_UTF8Conversion_Util:
  731|     78|{
  732|     78|    if (!ucs2Utf8ConvertFunc) {
  ------------------
  |  Branch (732:9): [True: 78, False: 0]
  ------------------
  733|     78|        return sec_port_ucs2_utf8_conversion_function(toUnicode,
  734|     78|                                                      inBuf, inBufLen, outBuf, maxOutBufLen, outBufLen);
  735|     78|    }
  736|       |
  737|      0|    return (*ucs2Utf8ConvertFunc)(toUnicode, inBuf, inBufLen, outBuf,
  738|      0|                                  maxOutBufLen, outBufLen);
  739|     78|}
PORT_ISO88591_UTF8Conversion:
  745|    132|{
  746|    132|    return sec_port_iso88591_utf8_conversion_function(inBuf, inBufLen,
  747|    132|                                                      outBuf, maxOutBufLen, outBufLen);
  748|    132|}
NSS_SecureMemcmp:
  811|   177k|{
  812|   177k|    const unsigned char *a = (const unsigned char *)ia;
  813|   177k|    const unsigned char *b = (const unsigned char *)ib;
  814|   177k|    int r = 0;
  815|       |
  816|  4.35M|    for (size_t i = 0; i < n; ++i) {
  ------------------
  |  Branch (816:24): [True: 4.18M, False: 177k]
  ------------------
  817|  4.18M|        r |= a[i] ^ b[i];
  818|  4.18M|    }
  819|       |
  820|       |    /* 0 <= r < 256, so -r has bit 8 set when r != 0 */
  821|   177k|    return 1 & (-r >> 8);
  822|   177k|}
NSS_SecureMemcmpZero:
  830|  8.50k|{
  831|  8.50k|    const unsigned char *a = (const unsigned char *)mem;
  832|  8.50k|    int r = 0;
  833|       |
  834|   280k|    for (size_t i = 0; i < n; ++i) {
  ------------------
  |  Branch (834:24): [True: 272k, False: 8.50k]
  ------------------
  835|   272k|        r |= a[i];
  836|   272k|    }
  837|       |
  838|       |    /* 0 <= r < 256, so -r has bit 8 set when r != 0 */
  839|  8.50k|    return 1 & (-r >> 8);
  840|  8.50k|}
NSS_GetSystemFIPSEnabled:
  925|      2|{
  926|       |/* if FIPS is disabled in NSS, always return FALSE, even if the environment
  927|       | * variable is set, or the system is in FIPS mode */
  928|       |#ifndef NSS_FIPS_DISABLED
  929|       |    const char *env;
  930|       |
  931|       |    /* The environment variable is active for all platforms */
  932|       |    env = PR_GetEnvSecure("NSS_FIPS");
  933|       |    /* we generally accept y, Y, 1, FIPS, TRUE, and ON as turning on FIPS
  934|       |     * mode. Anything else is considered 'off' */
  935|       |    if (env && (*env == 'y' || *env == '1' || *env == 'Y' ||
  936|       |                (PORT_Strcasecmp(env, "fips") == 0) ||
  937|       |                (PORT_Strcasecmp(env, "true") == 0) ||
  938|       |                (PORT_Strcasecmp(env, "on") == 0))) {
  939|       |        return PR_TRUE;
  940|       |    }
  941|       |
  942|       |/* currently only Linux has a system FIPS indicator. Add others here
  943|       | * as they become available/known */
  944|       |#ifdef LINUX
  945|       |    {
  946|       |        FILE *f;
  947|       |        char d;
  948|       |        size_t size;
  949|       |        f = fopen("/proc/sys/crypto/fips_enabled", "r");
  950|       |        if (!f)
  951|       |            return PR_FALSE;
  952|       |
  953|       |        size = fread(&d, 1, 1, f);
  954|       |        fclose(f);
  955|       |        if (size != 1)
  956|       |            return PR_FALSE;
  957|       |        if (d == '1')
  958|       |            return PR_TRUE;
  959|       |    }
  960|       |#endif /* LINUX */
  961|       |#endif /* NSS_FIPS_DISABLED == 0 */
  962|      2|    return PR_FALSE;
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
  963|      2|}
secport.c:SetupUseFreeList:
  391|      1|{
  392|      1|    useFreeList = (PR_GetEnvSecure("NSS_DISABLE_ARENA_FREE_LIST") == NULL);
  393|      1|    return PR_SUCCESS;
  394|      1|}
secport.c:port_ArenaRelease:
  561|    125|{
  562|    125|    PORTArenaPool *pool = (PORTArenaPool *)arena;
  563|    125|    if (ARENAPOOL_MAGIC == pool->magic) {
  ------------------
  |  |   51|    125|#define ARENAPOOL_MAGIC 0xB8AC9BDF
  ------------------
  |  Branch (563:9): [True: 125, False: 0]
  ------------------
  564|    125|        PZ_Lock(pool->lock);
  ------------------
  |  |  245|    125|#define PZ_Lock(k) PR_Lock((k))
  ------------------
  565|    125|#ifdef THREADMARK
  566|    125|        {
  567|    125|            threadmark_mark **pw;
  568|       |
  569|    125|            if (PR_GetCurrentThread() != pool->marking_thread) {
  ------------------
  |  Branch (569:17): [True: 0, False: 125]
  ------------------
  570|      0|                PZ_Unlock(pool->lock);
  ------------------
  |  |  246|      0|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  571|      0|                PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  572|      0|                PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  573|      0|                return /* no error indication available */;
  574|      0|            }
  575|       |
  576|    125|            pw = &pool->first_mark;
  577|    125|            while (*pw && (mark != (*pw)->mark)) {
  ------------------
  |  Branch (577:20): [True: 125, False: 0]
  |  Branch (577:27): [True: 0, False: 125]
  ------------------
  578|      0|                pw = &(*pw)->next;
  579|      0|            }
  580|       |
  581|    125|            if (!*pw) {
  ------------------
  |  Branch (581:17): [True: 0, False: 125]
  ------------------
  582|       |                /* bad mark */
  583|      0|                PZ_Unlock(pool->lock);
  ------------------
  |  |  246|      0|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  584|      0|                PORT_SetError(SEC_ERROR_NO_MEMORY);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  585|      0|                PORT_Assert(0);
  ------------------
  |  |  120|      0|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  586|      0|                return /* no error indication available */;
  587|      0|            }
  588|       |
  589|    125|            *pw = (threadmark_mark *)NULL;
  590|       |
  591|    125|            if (zero) {
  ------------------
  |  Branch (591:17): [True: 0, False: 125]
  ------------------
  592|      0|                port_ArenaZeroAfterMark(arena, mark);
  593|      0|            }
  594|    125|            PL_ARENA_RELEASE(arena, mark);
  ------------------
  |  |  210|    125|    PR_BEGIN_MACRO \
  |  |  ------------------
  |  |  |  |  123|    125|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |  211|    125|        char *_m = (char *)(mark); \
  |  |  212|    125|        PLArena *_a = (pool)->current; \
  |  |  213|    125|        if (PR_UPTRDIFF(_m, _a->base) <= PR_UPTRDIFF(_a->avail, _a->base)) { \
  |  |  ------------------
  |  |  |  |  188|    125|#define PR_UPTRDIFF(p,q) ((PRUword)(p) - (PRUword)(q))
  |  |  ------------------
  |  |                       if (PR_UPTRDIFF(_m, _a->base) <= PR_UPTRDIFF(_a->avail, _a->base)) { \
  |  |  ------------------
  |  |  |  |  188|    125|#define PR_UPTRDIFF(p,q) ((PRUword)(p) - (PRUword)(q))
  |  |  ------------------
  |  |  |  Branch (213:13): [True: 115, False: 10]
  |  |  ------------------
  |  |  214|    115|            _a->avail = (PRUword)PL_ARENA_ALIGN(pool, _m); \
  |  |  ------------------
  |  |  |  |  146|    115|#define PL_ARENA_ALIGN(pool, n) (((PRUword)(n) + (pool)->mask) & ~(pool)->mask)
  |  |  ------------------
  |  |  215|    115|            PL_CLEAR_UNUSED(_a); \
  |  |  ------------------
  |  |  |  |  198|    115|#define PL_CLEAR_UNUSED(a) PL_CLEAR_UNUSED_PATTERN((a), PL_FREE_PATTERN)
  |  |  |  |  ------------------
  |  |  |  |  |  |  191|    115|    PR_BEGIN_MACRO \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  123|    115|#define PR_BEGIN_MACRO  do {
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|    115|        PR_ASSERT((a)->avail <= (a)->limit); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  208|    115|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (208:6): [True: 115, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|    115|        PL_MAKE_MEM_UNDEFINED((void*)(a)->avail, (a)->limit - (a)->avail); \
  |  |  |  |  |  |  194|    115|        memset((void*)(a)->avail, (pattern), (a)->limit - (a)->avail); \
  |  |  |  |  |  |  195|    115|    PR_END_MACRO
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  124|    115|#define PR_END_MACRO    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  216|    115|            PL_MAKE_MEM_NOACCESS((void*)_a->avail, _a->limit - _a->avail); \
  |  |  217|    115|            PL_ArenaCountRetract(pool, _m); \
  |  |  218|    115|        } else { \
  |  |  219|     10|            PL_ArenaRelease(pool, _m); \
  |  |  220|     10|        } \
  |  |  221|    125|        PL_ArenaCountRelease(pool, _m); \
  |  |  222|    125|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|    125|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  595|       |
  596|    125|            if (!pool->first_mark) {
  ------------------
  |  Branch (596:17): [True: 125, False: 0]
  ------------------
  597|    125|                pool->marking_thread = (PRThread *)NULL;
  598|    125|            }
  599|    125|        }
  600|       |#else  /* THREADMARK */
  601|       |        if (zero) {
  602|       |            port_ArenaZeroAfterMark(arena, mark);
  603|       |        }
  604|       |        PL_ARENA_RELEASE(arena, mark);
  605|       |#endif /* THREADMARK */
  606|    125|        PZ_Unlock(pool->lock);
  ------------------
  |  |  246|    125|#define PZ_Unlock(k) PR_Unlock((k))
  ------------------
  607|    125|    } else {
  608|      0|        if (zero) {
  ------------------
  |  Branch (608:13): [True: 0, False: 0]
  ------------------
  609|      0|            port_ArenaZeroAfterMark(arena, mark);
  610|      0|        }
  611|      0|        PL_ARENA_RELEASE(arena, mark);
  ------------------
  |  |  210|      0|    PR_BEGIN_MACRO \
  |  |  ------------------
  |  |  |  |  123|      0|#define PR_BEGIN_MACRO  do {
  |  |  ------------------
  |  |  211|      0|        char *_m = (char *)(mark); \
  |  |  212|      0|        PLArena *_a = (pool)->current; \
  |  |  213|      0|        if (PR_UPTRDIFF(_m, _a->base) <= PR_UPTRDIFF(_a->avail, _a->base)) { \
  |  |  ------------------
  |  |  |  |  188|      0|#define PR_UPTRDIFF(p,q) ((PRUword)(p) - (PRUword)(q))
  |  |  ------------------
  |  |                       if (PR_UPTRDIFF(_m, _a->base) <= PR_UPTRDIFF(_a->avail, _a->base)) { \
  |  |  ------------------
  |  |  |  |  188|      0|#define PR_UPTRDIFF(p,q) ((PRUword)(p) - (PRUword)(q))
  |  |  ------------------
  |  |  |  Branch (213:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  214|      0|            _a->avail = (PRUword)PL_ARENA_ALIGN(pool, _m); \
  |  |  ------------------
  |  |  |  |  146|      0|#define PL_ARENA_ALIGN(pool, n) (((PRUword)(n) + (pool)->mask) & ~(pool)->mask)
  |  |  ------------------
  |  |  215|      0|            PL_CLEAR_UNUSED(_a); \
  |  |  ------------------
  |  |  |  |  198|      0|#define PL_CLEAR_UNUSED(a) PL_CLEAR_UNUSED_PATTERN((a), PL_FREE_PATTERN)
  |  |  |  |  ------------------
  |  |  |  |  |  |  191|      0|    PR_BEGIN_MACRO \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  123|      0|#define PR_BEGIN_MACRO  do {
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|      0|        PR_ASSERT((a)->avail <= (a)->limit); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  208|      0|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (208:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|      0|        PL_MAKE_MEM_UNDEFINED((void*)(a)->avail, (a)->limit - (a)->avail); \
  |  |  |  |  |  |  194|      0|        memset((void*)(a)->avail, (pattern), (a)->limit - (a)->avail); \
  |  |  |  |  |  |  195|      0|    PR_END_MACRO
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  124|      0|#define PR_END_MACRO    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  216|      0|            PL_MAKE_MEM_NOACCESS((void*)_a->avail, _a->limit - _a->avail); \
  |  |  217|      0|            PL_ArenaCountRetract(pool, _m); \
  |  |  218|      0|        } else { \
  |  |  219|      0|            PL_ArenaRelease(pool, _m); \
  |  |  220|      0|        } \
  |  |  221|      0|        PL_ArenaCountRelease(pool, _m); \
  |  |  222|      0|    PR_END_MACRO
  |  |  ------------------
  |  |  |  |  124|      0|#define PR_END_MACRO    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:34): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  612|      0|    }
  613|    125|}

sec_port_ucs4_utf8_conversion_function:
  132|     97|{
  133|     97|    PORT_Assert((unsigned int *)NULL != outBufLen);
  ------------------
  |  |  120|     97|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|     97|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 97, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  134|       |
  135|     97|    if (toUnicode) {
  ------------------
  |  Branch (135:9): [True: 0, False: 97]
  ------------------
  136|      0|        unsigned int i, len = 0;
  137|       |
  138|      0|        for (i = 0; i < inBufLen;) {
  ------------------
  |  Branch (138:21): [True: 0, False: 0]
  ------------------
  139|      0|            if ((inBuf[i] & 0x80) == 0x00)
  ------------------
  |  Branch (139:17): [True: 0, False: 0]
  ------------------
  140|      0|                i += 1;
  141|      0|            else if ((inBuf[i] & 0xE0) == 0xC0)
  ------------------
  |  Branch (141:22): [True: 0, False: 0]
  ------------------
  142|      0|                i += 2;
  143|      0|            else if ((inBuf[i] & 0xF0) == 0xE0)
  ------------------
  |  Branch (143:22): [True: 0, False: 0]
  ------------------
  144|      0|                i += 3;
  145|      0|            else if ((inBuf[i] & 0xF8) == 0xF0)
  ------------------
  |  Branch (145:22): [True: 0, False: 0]
  ------------------
  146|      0|                i += 4;
  147|      0|            else
  148|      0|                return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  149|       |
  150|      0|            len += 4;
  151|      0|        }
  152|       |
  153|      0|        if (len > maxOutBufLen) {
  ------------------
  |  Branch (153:13): [True: 0, False: 0]
  ------------------
  154|      0|            *outBufLen = len;
  155|      0|            return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  156|      0|        }
  157|       |
  158|      0|        len = 0;
  159|       |
  160|      0|        for (i = 0; i < inBufLen;) {
  ------------------
  |  Branch (160:21): [True: 0, False: 0]
  ------------------
  161|      0|            PRUint32 ucs4 = sec_port_read_utf8(&i, inBuf, inBufLen);
  162|       |
  163|      0|            if (ucs4 == BAD_UTF8)
  ------------------
  |  |   63|      0|#define BAD_UTF8 ((PRUint32)-1)
  ------------------
  |  Branch (163:17): [True: 0, False: 0]
  ------------------
  164|      0|                return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  165|       |
  166|      0|            outBuf[len + L_0] = 0x00;
  ------------------
  |  |   56|      0|#define L_0 0
  ------------------
  167|      0|            outBuf[len + L_1] = (unsigned char)(ucs4 >> 16);
  ------------------
  |  |   57|      0|#define L_1 1
  ------------------
  168|      0|            outBuf[len + L_2] = (unsigned char)(ucs4 >> 8);
  ------------------
  |  |   58|      0|#define L_2 2
  ------------------
  169|      0|            outBuf[len + L_3] = (unsigned char)ucs4;
  ------------------
  |  |   59|      0|#define L_3 3
  ------------------
  170|       |
  171|      0|            len += 4;
  172|      0|        }
  173|       |
  174|      0|        *outBufLen = len;
  175|      0|        return PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  176|     97|    } else {
  177|     97|        unsigned int i, len = 0;
  178|     97|        PORT_Assert((inBufLen % 4) == 0);
  ------------------
  |  |  120|     97|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|     97|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 97, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  179|     97|        if ((inBufLen % 4) != 0) {
  ------------------
  |  Branch (179:13): [True: 0, False: 97]
  ------------------
  180|      0|            *outBufLen = 0;
  181|      0|            return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  182|      0|        }
  183|       |
  184|    205|        for (i = 0; i < inBufLen; i += 4) {
  ------------------
  |  Branch (184:21): [True: 142, False: 63]
  ------------------
  185|    142|            if ((inBuf[i + L_0] > 0x00) || (inBuf[i + L_1] > 0x10)) {
  ------------------
  |  |   56|    142|#define L_0 0
  ------------------
                          if ((inBuf[i + L_0] > 0x00) || (inBuf[i + L_1] > 0x10)) {
  ------------------
  |  |   57|    117|#define L_1 1
  ------------------
  |  Branch (185:17): [True: 25, False: 117]
  |  Branch (185:44): [True: 9, False: 108]
  ------------------
  186|     34|                *outBufLen = 0;
  187|     34|                return PR_FALSE;
  ------------------
  |  |  438|     34|#define PR_FALSE 0
  ------------------
  188|    108|            } else if (inBuf[i + L_1] >= 0x01)
  ------------------
  |  |   57|    108|#define L_1 1
  ------------------
  |  Branch (188:24): [True: 21, False: 87]
  ------------------
  189|     21|                len += 4;
  190|     87|            else if (inBuf[i + L_2] >= 0x08)
  ------------------
  |  |   58|     87|#define L_2 2
  ------------------
  |  Branch (190:22): [True: 36, False: 51]
  ------------------
  191|     36|                len += 3;
  192|     51|            else if ((inBuf[i + L_2] > 0x00) || (inBuf[i + L_3] >= 0x80))
  ------------------
  |  |   58|     51|#define L_2 2
  ------------------
                          else if ((inBuf[i + L_2] > 0x00) || (inBuf[i + L_3] >= 0x80))
  ------------------
  |  |   59|     32|#define L_3 3
  ------------------
  |  Branch (192:22): [True: 19, False: 32]
  |  Branch (192:49): [True: 12, False: 20]
  ------------------
  193|     31|                len += 2;
  194|     20|            else
  195|     20|                len += 1;
  196|    142|        }
  197|       |
  198|     63|        if (len > maxOutBufLen) {
  ------------------
  |  Branch (198:13): [True: 0, False: 63]
  ------------------
  199|      0|            *outBufLen = len;
  200|      0|            return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  201|      0|        }
  202|       |
  203|     63|        len = 0;
  204|       |
  205|    161|        for (i = 0; i < inBufLen; i += 4) {
  ------------------
  |  Branch (205:21): [True: 98, False: 63]
  ------------------
  206|     98|            if (inBuf[i + L_1] >= 0x01) {
  ------------------
  |  |   57|     98|#define L_1 1
  ------------------
  |  Branch (206:17): [True: 19, False: 79]
  ------------------
  207|       |                /* 0001 0000-001F FFFF -> 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx */
  208|       |                /* 00000000 000abcde fghijklm nopqrstu ->
  209|       |                   11110abc 10defghi 10jklmno 10pqrstu */
  210|       |
  211|     19|                outBuf[len + 0] = 0xF0 | ((inBuf[i + L_1] & 0x1C) >> 2);
  ------------------
  |  |   57|     19|#define L_1 1
  ------------------
  212|     19|                outBuf[len + 1] = 0x80 | ((inBuf[i + L_1] & 0x03) << 4) | ((inBuf[i + L_2] & 0xF0) >> 4);
  ------------------
  |  |   57|     19|#define L_1 1
  ------------------
                              outBuf[len + 1] = 0x80 | ((inBuf[i + L_1] & 0x03) << 4) | ((inBuf[i + L_2] & 0xF0) >> 4);
  ------------------
  |  |   58|     19|#define L_2 2
  ------------------
  213|     19|                outBuf[len + 2] = 0x80 | ((inBuf[i + L_2] & 0x0F) << 2) | ((inBuf[i + L_3] & 0xC0) >> 6);
  ------------------
  |  |   58|     19|#define L_2 2
  ------------------
                              outBuf[len + 2] = 0x80 | ((inBuf[i + L_2] & 0x0F) << 2) | ((inBuf[i + L_3] & 0xC0) >> 6);
  ------------------
  |  |   59|     19|#define L_3 3
  ------------------
  214|     19|                outBuf[len + 3] = 0x80 | ((inBuf[i + L_3] & 0x3F) >> 0);
  ------------------
  |  |   59|     19|#define L_3 3
  ------------------
  215|       |
  216|     19|                len += 4;
  217|     79|            } else if (inBuf[i + L_2] >= 0x08) {
  ------------------
  |  |   58|     79|#define L_2 2
  ------------------
  |  Branch (217:24): [True: 33, False: 46]
  ------------------
  218|       |                /* 0000 0800-0000 FFFF -> 1110xxxx 10xxxxxx 10xxxxxx */
  219|       |                /* 00000000 00000000 abcdefgh ijklmnop ->
  220|       |                   1110abcd 10efghij 10klmnop */
  221|       |
  222|     33|                outBuf[len + 0] = 0xE0 | ((inBuf[i + L_2] & 0xF0) >> 4);
  ------------------
  |  |   58|     33|#define L_2 2
  ------------------
  223|     33|                outBuf[len + 1] = 0x80 | ((inBuf[i + L_2] & 0x0F) << 2) | ((inBuf[i + L_3] & 0xC0) >> 6);
  ------------------
  |  |   58|     33|#define L_2 2
  ------------------
                              outBuf[len + 1] = 0x80 | ((inBuf[i + L_2] & 0x0F) << 2) | ((inBuf[i + L_3] & 0xC0) >> 6);
  ------------------
  |  |   59|     33|#define L_3 3
  ------------------
  224|     33|                outBuf[len + 2] = 0x80 | ((inBuf[i + L_3] & 0x3F) >> 0);
  ------------------
  |  |   59|     33|#define L_3 3
  ------------------
  225|       |
  226|     33|                len += 3;
  227|     46|            } else if ((inBuf[i + L_2] > 0x00) || (inBuf[i + L_3] >= 0x80)) {
  ------------------
  |  |   58|     46|#define L_2 2
  ------------------
                          } else if ((inBuf[i + L_2] > 0x00) || (inBuf[i + L_3] >= 0x80)) {
  ------------------
  |  |   59|     30|#define L_3 3
  ------------------
  |  Branch (227:24): [True: 16, False: 30]
  |  Branch (227:51): [True: 12, False: 18]
  ------------------
  228|       |                /* 0000 0080-0000 07FF -> 110xxxxx 10xxxxxx */
  229|       |                /* 00000000 00000000 00000abc defghijk ->
  230|       |                   110abcde 10fghijk */
  231|       |
  232|     28|                outBuf[len + 0] = 0xC0 | ((inBuf[i + L_2] & 0x07) << 2) | ((inBuf[i + L_3] & 0xC0) >> 6);
  ------------------
  |  |   58|     28|#define L_2 2
  ------------------
                              outBuf[len + 0] = 0xC0 | ((inBuf[i + L_2] & 0x07) << 2) | ((inBuf[i + L_3] & 0xC0) >> 6);
  ------------------
  |  |   59|     28|#define L_3 3
  ------------------
  233|     28|                outBuf[len + 1] = 0x80 | ((inBuf[i + L_3] & 0x3F) >> 0);
  ------------------
  |  |   59|     28|#define L_3 3
  ------------------
  234|       |
  235|     28|                len += 2;
  236|     28|            } else {
  237|       |                /* 0000 0000-0000 007F -> 0xxxxxx */
  238|       |                /* 00000000 00000000 00000000 0abcdefg ->
  239|       |                   0abcdefg */
  240|       |
  241|     18|                outBuf[len + 0] = (inBuf[i + L_3] & 0x7F);
  ------------------
  |  |   59|     18|#define L_3 3
  ------------------
  242|       |
  243|     18|                len += 1;
  244|     18|            }
  245|     98|        }
  246|       |
  247|     63|        *outBufLen = len;
  248|     63|        return PR_TRUE;
  ------------------
  |  |  437|     63|#define PR_TRUE 1
  ------------------
  249|     63|    }
  250|     97|}
sec_port_ucs2_utf8_conversion_function:
  260|     78|{
  261|     78|    PORT_Assert((unsigned int *)NULL != outBufLen);
  ------------------
  |  |  120|     78|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|     78|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 78, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  262|       |
  263|     78|    if (toUnicode) {
  ------------------
  |  Branch (263:9): [True: 0, False: 78]
  ------------------
  264|      0|        unsigned int i, len = 0;
  265|       |
  266|      0|        for (i = 0; i < inBufLen;) {
  ------------------
  |  Branch (266:21): [True: 0, False: 0]
  ------------------
  267|      0|            if ((inBuf[i] & 0x80) == 0x00) {
  ------------------
  |  Branch (267:17): [True: 0, False: 0]
  ------------------
  268|      0|                i += 1;
  269|      0|                len += 2;
  270|      0|            } else if ((inBuf[i] & 0xE0) == 0xC0) {
  ------------------
  |  Branch (270:24): [True: 0, False: 0]
  ------------------
  271|      0|                i += 2;
  272|      0|                len += 2;
  273|      0|            } else if ((inBuf[i] & 0xF0) == 0xE0) {
  ------------------
  |  Branch (273:24): [True: 0, False: 0]
  ------------------
  274|      0|                i += 3;
  275|      0|                len += 2;
  276|      0|            } else if ((inBuf[i] & 0xF8) == 0xF0) {
  ------------------
  |  Branch (276:24): [True: 0, False: 0]
  ------------------
  277|      0|                i += 4;
  278|      0|                len += 4;
  279|      0|            } else
  280|      0|                return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  281|      0|        }
  282|       |
  283|      0|        if (len > maxOutBufLen) {
  ------------------
  |  Branch (283:13): [True: 0, False: 0]
  ------------------
  284|      0|            *outBufLen = len;
  285|      0|            return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  286|      0|        }
  287|       |
  288|      0|        len = 0;
  289|       |
  290|      0|        for (i = 0; i < inBufLen;) {
  ------------------
  |  Branch (290:21): [True: 0, False: 0]
  ------------------
  291|      0|            PRUint32 ucs4 = sec_port_read_utf8(&i, inBuf, inBufLen);
  292|       |
  293|      0|            if (ucs4 == BAD_UTF8)
  ------------------
  |  |   63|      0|#define BAD_UTF8 ((PRUint32)-1)
  ------------------
  |  Branch (293:17): [True: 0, False: 0]
  ------------------
  294|      0|                return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  295|       |
  296|      0|            if (ucs4 < 0x10000) {
  ------------------
  |  Branch (296:17): [True: 0, False: 0]
  ------------------
  297|      0|                outBuf[len + H_0] = (unsigned char)(ucs4 >> 8);
  ------------------
  |  |   60|      0|#define H_0 0
  ------------------
  298|      0|                outBuf[len + H_1] = (unsigned char)ucs4;
  ------------------
  |  |   61|      0|#define H_1 1
  ------------------
  299|      0|                len += 2;
  300|      0|            } else {
  301|      0|                ucs4 -= 0x10000;
  302|      0|                outBuf[len + 0 + H_0] = (unsigned char)(0xD8 | ((ucs4 >> 18) & 0x3));
  ------------------
  |  |   60|      0|#define H_0 0
  ------------------
  303|      0|                outBuf[len + 0 + H_1] = (unsigned char)(ucs4 >> 10);
  ------------------
  |  |   61|      0|#define H_1 1
  ------------------
  304|      0|                outBuf[len + 2 + H_0] = (unsigned char)(0xDC | ((ucs4 >> 8) & 0x3));
  ------------------
  |  |   60|      0|#define H_0 0
  ------------------
  305|      0|                outBuf[len + 2 + H_1] = (unsigned char)ucs4;
  ------------------
  |  |   61|      0|#define H_1 1
  ------------------
  306|      0|                len += 4;
  307|      0|            }
  308|      0|        }
  309|       |
  310|      0|        *outBufLen = len;
  311|      0|        return PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  312|     78|    } else {
  313|     78|        unsigned int i, len = 0;
  314|     78|        PORT_Assert((inBufLen % 2) == 0);
  ------------------
  |  |  120|     78|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|     78|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 78, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  315|     78|        if ((inBufLen % 2) != 0) {
  ------------------
  |  Branch (315:13): [True: 0, False: 78]
  ------------------
  316|      0|            *outBufLen = 0;
  317|      0|            return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  318|      0|        }
  319|       |
  320|    315|        for (i = 0; i < inBufLen; i += 2) {
  ------------------
  |  Branch (320:21): [True: 255, False: 60]
  ------------------
  321|    255|            if ((inBuf[i + H_0] == 0x00) && ((inBuf[i + H_1] & 0x80) == 0x00))
  ------------------
  |  |   60|    255|#define H_0 0
  ------------------
                          if ((inBuf[i + H_0] == 0x00) && ((inBuf[i + H_1] & 0x80) == 0x00))
  ------------------
  |  |   61|     97|#define H_1 1
  ------------------
  |  Branch (321:17): [True: 97, False: 158]
  |  Branch (321:45): [True: 56, False: 41]
  ------------------
  322|     56|                len += 1;
  323|    199|            else if (inBuf[i + H_0] < 0x08)
  ------------------
  |  |   60|    199|#define H_0 0
  ------------------
  |  Branch (323:22): [True: 62, False: 137]
  ------------------
  324|     62|                len += 2;
  325|    137|            else if (((inBuf[i + H_0] & 0xFC) == 0xD8)) {
  ------------------
  |  |   60|    137|#define H_0 0
  ------------------
  |  Branch (325:22): [True: 28, False: 109]
  ------------------
  326|     28|                if (((inBufLen - i) > 2) && ((inBuf[i + 2 + H_0] & 0xFC) == 0xDC)) {
  ------------------
  |  |   60|     25|#define H_0 0
  ------------------
  |  Branch (326:21): [True: 25, False: 3]
  |  Branch (326:45): [True: 16, False: 9]
  ------------------
  327|     16|                    i += 2;
  328|     16|                    len += 4;
  329|     16|                } else {
  330|     12|                    return PR_FALSE;
  ------------------
  |  |  438|     12|#define PR_FALSE 0
  ------------------
  331|     12|                }
  332|    109|            } else if ((inBuf[i + H_0] & 0xFC) == 0xDC) {
  ------------------
  |  |   60|    109|#define H_0 0
  ------------------
  |  Branch (332:24): [True: 6, False: 103]
  ------------------
  333|      6|                return PR_FALSE;
  ------------------
  |  |  438|      6|#define PR_FALSE 0
  ------------------
  334|    103|            } else {
  335|    103|                len += 3;
  336|    103|            }
  337|    255|        }
  338|       |
  339|     60|        if (len > maxOutBufLen) {
  ------------------
  |  Branch (339:13): [True: 0, False: 60]
  ------------------
  340|      0|            *outBufLen = len;
  341|      0|            return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  342|      0|        }
  343|       |
  344|     60|        len = 0;
  345|       |
  346|    276|        for (i = 0; i < inBufLen; i += 2) {
  ------------------
  |  Branch (346:21): [True: 216, False: 60]
  ------------------
  347|    216|            if ((inBuf[i + H_0] == 0x00) && ((inBuf[i + H_1] & 0x80) == 0x00)) {
  ------------------
  |  |   60|    216|#define H_0 0
  ------------------
                          if ((inBuf[i + H_0] == 0x00) && ((inBuf[i + H_1] & 0x80) == 0x00)) {
  ------------------
  |  |   61|     94|#define H_1 1
  ------------------
  |  Branch (347:17): [True: 94, False: 122]
  |  Branch (347:45): [True: 55, False: 39]
  ------------------
  348|       |                /* 0000-007F -> 0xxxxxx */
  349|       |                /* 00000000 0abcdefg -> 0abcdefg */
  350|       |
  351|     55|                outBuf[len] = inBuf[i + H_1] & 0x7F;
  ------------------
  |  |   61|     55|#define H_1 1
  ------------------
  352|       |
  353|     55|                len += 1;
  354|    161|            } else if (inBuf[i + H_0] < 0x08) {
  ------------------
  |  |   60|    161|#define H_0 0
  ------------------
  |  Branch (354:24): [True: 59, False: 102]
  ------------------
  355|       |                /* 0080-07FF -> 110xxxxx 10xxxxxx */
  356|       |                /* 00000abc defghijk -> 110abcde 10fghijk */
  357|       |
  358|     59|                outBuf[len + 0] = 0xC0 | ((inBuf[i + H_0] & 0x07) << 2) | ((inBuf[i + H_1] & 0xC0) >> 6);
  ------------------
  |  |   60|     59|#define H_0 0
  ------------------
                              outBuf[len + 0] = 0xC0 | ((inBuf[i + H_0] & 0x07) << 2) | ((inBuf[i + H_1] & 0xC0) >> 6);
  ------------------
  |  |   61|     59|#define H_1 1
  ------------------
  359|     59|                outBuf[len + 1] = 0x80 | ((inBuf[i + H_1] & 0x3F) >> 0);
  ------------------
  |  |   61|     59|#define H_1 1
  ------------------
  360|       |
  361|     59|                len += 2;
  362|    102|            } else if ((inBuf[i + H_0] & 0xFC) == 0xD8) {
  ------------------
  |  |   60|    102|#define H_0 0
  ------------------
  |  Branch (362:24): [True: 14, False: 88]
  ------------------
  363|     14|                int abcde, BCDE;
  364|       |
  365|     14|                PORT_Assert(((inBufLen - i) > 2) && ((inBuf[i + 2 + H_0] & 0xFC) == 0xDC));
  ------------------
  |  |  120|     14|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|     28|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:7): [True: 14, False: 0]
  |  |  |  |  |  Branch (208:7): [True: 14, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  366|       |
  367|       |                /* D800-DBFF DC00-DFFF -> 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx */
  368|       |                /* 110110BC DEfghijk 110111lm nopqrstu ->
  369|       |                   { Let abcde = BCDE + 1 }
  370|       |                   11110abc 10defghi 10jklmno 10pqrstu */
  371|       |
  372|     14|                BCDE = ((inBuf[i + H_0] & 0x03) << 2) | ((inBuf[i + H_1] & 0xC0) >> 6);
  ------------------
  |  |   60|     14|#define H_0 0
  ------------------
                              BCDE = ((inBuf[i + H_0] & 0x03) << 2) | ((inBuf[i + H_1] & 0xC0) >> 6);
  ------------------
  |  |   61|     14|#define H_1 1
  ------------------
  373|     14|                abcde = BCDE + 1;
  374|       |
  375|     14|                outBuf[len + 0] = 0xF0 | ((abcde & 0x1C) >> 2);
  376|     14|                outBuf[len + 1] = 0x80 | ((abcde & 0x03) << 4) | ((inBuf[i + 0 + H_1] & 0x3C) >> 2);
  ------------------
  |  |   61|     14|#define H_1 1
  ------------------
  377|     14|                outBuf[len + 2] = 0x80 | ((inBuf[i + 0 + H_1] & 0x03) << 4) | ((inBuf[i + 2 + H_0] & 0x03) << 2) | ((inBuf[i + 2 + H_1] & 0xC0) >> 6);
  ------------------
  |  |   61|     14|#define H_1 1
  ------------------
                              outBuf[len + 2] = 0x80 | ((inBuf[i + 0 + H_1] & 0x03) << 4) | ((inBuf[i + 2 + H_0] & 0x03) << 2) | ((inBuf[i + 2 + H_1] & 0xC0) >> 6);
  ------------------
  |  |   60|     14|#define H_0 0
  ------------------
                              outBuf[len + 2] = 0x80 | ((inBuf[i + 0 + H_1] & 0x03) << 4) | ((inBuf[i + 2 + H_0] & 0x03) << 2) | ((inBuf[i + 2 + H_1] & 0xC0) >> 6);
  ------------------
  |  |   61|     14|#define H_1 1
  ------------------
  378|     14|                outBuf[len + 3] = 0x80 | ((inBuf[i + 2 + H_1] & 0x3F) >> 0);
  ------------------
  |  |   61|     14|#define H_1 1
  ------------------
  379|       |
  380|     14|                i += 2;
  381|     14|                len += 4;
  382|     88|            } else {
  383|       |                /* 0800-FFFF -> 1110xxxx 10xxxxxx 10xxxxxx */
  384|       |                /* abcdefgh ijklmnop -> 1110abcd 10efghij 10klmnop */
  385|       |
  386|     88|                outBuf[len + 0] = 0xE0 | ((inBuf[i + H_0] & 0xF0) >> 4);
  ------------------
  |  |   60|     88|#define H_0 0
  ------------------
  387|     88|                outBuf[len + 1] = 0x80 | ((inBuf[i + H_0] & 0x0F) << 2) | ((inBuf[i + H_1] & 0xC0) >> 6);
  ------------------
  |  |   60|     88|#define H_0 0
  ------------------
                              outBuf[len + 1] = 0x80 | ((inBuf[i + H_0] & 0x0F) << 2) | ((inBuf[i + H_1] & 0xC0) >> 6);
  ------------------
  |  |   61|     88|#define H_1 1
  ------------------
  388|     88|                outBuf[len + 2] = 0x80 | ((inBuf[i + H_1] & 0x3F) >> 0);
  ------------------
  |  |   61|     88|#define H_1 1
  ------------------
  389|       |
  390|     88|                len += 3;
  391|     88|            }
  392|    216|        }
  393|       |
  394|     60|        *outBufLen = len;
  395|     60|        return PR_TRUE;
  ------------------
  |  |  437|     60|#define PR_TRUE 1
  ------------------
  396|     60|    }
  397|     78|}
sec_port_iso88591_utf8_conversion_function:
  406|    132|{
  407|    132|    unsigned int i, len = 0;
  408|       |
  409|    132|    PORT_Assert((unsigned int *)NULL != outBufLen);
  ------------------
  |  |  120|    132|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|    132|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 132, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  410|       |
  411|  1.10k|    for (i = 0; i < inBufLen; i++) {
  ------------------
  |  Branch (411:17): [True: 972, False: 132]
  ------------------
  412|    972|        if ((inBuf[i] & 0x80) == 0x00)
  ------------------
  |  Branch (412:13): [True: 814, False: 158]
  ------------------
  413|    814|            len += 1;
  414|    158|        else
  415|    158|            len += 2;
  416|    972|    }
  417|       |
  418|    132|    if (len > maxOutBufLen) {
  ------------------
  |  Branch (418:9): [True: 0, False: 132]
  ------------------
  419|      0|        *outBufLen = len;
  420|      0|        return PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  421|      0|    }
  422|       |
  423|    132|    len = 0;
  424|       |
  425|  1.10k|    for (i = 0; i < inBufLen; i++) {
  ------------------
  |  Branch (425:17): [True: 972, False: 132]
  ------------------
  426|    972|        if ((inBuf[i] & 0x80) == 0x00) {
  ------------------
  |  Branch (426:13): [True: 814, False: 158]
  ------------------
  427|       |            /* 00-7F -> 0xxxxxxx */
  428|       |            /* 0abcdefg -> 0abcdefg */
  429|       |
  430|    814|            outBuf[len] = inBuf[i];
  431|    814|            len += 1;
  432|    814|        } else {
  433|       |            /* 80-FF <- 110xxxxx 10xxxxxx */
  434|       |            /* 00000000 abcdefgh -> 110000ab 10cdefgh */
  435|       |
  436|    158|            outBuf[len + 0] = 0xC0 | ((inBuf[i] & 0xC0) >> 6);
  437|    158|            outBuf[len + 1] = 0x80 | ((inBuf[i] & 0x3F) >> 0);
  438|       |
  439|    158|            len += 2;
  440|    158|        }
  441|    972|    }
  442|       |
  443|    132|    *outBufLen = len;
  444|    132|    return PR_TRUE;
  ------------------
  |  |  437|    132|#define PR_TRUE 1
  ------------------
  445|    132|}

NSSUTIL_DoModuleDBFunction:
  899|      2|{
  900|      2|    char *secmod = NULL;
  901|      2|    char *appName = NULL;
  902|      2|    char *filename = NULL;
  903|      2|    NSSDBType dbType = NSS_DB_TYPE_NONE;
  904|      2|    PRBool rw;
  905|      2|    static char *success = "Success";
  906|      2|    char **rvstr = NULL;
  907|       |
  908|      2|    secmod = _NSSUTIL_GetSecmodName(parameters, &dbType, &appName,
  909|      2|                                    &filename, &rw);
  910|      2|    if ((dbType == NSS_DB_TYPE_LEGACY) ||
  ------------------
  |  Branch (910:9): [True: 0, False: 2]
  ------------------
  911|      2|        (dbType == NSS_DB_TYPE_MULTIACCESS)) {
  ------------------
  |  Branch (911:9): [True: 0, False: 2]
  ------------------
  912|       |        /* we can't handle the old database, only softoken can */
  913|      0|        PORT_SetError(SEC_ERROR_LEGACY_DATABASE);
  ------------------
  |  |   65|      0|#define PORT_SetError PORT_SetError_Util
  ------------------
  914|      0|        rvstr = NULL;
  915|      0|        goto done;
  916|      0|    }
  917|       |
  918|      2|    switch (function) {
  ------------------
  |  Branch (918:13): [True: 0, False: 2]
  ------------------
  919|      1|        case SECMOD_MODULE_DB_FUNCTION_FIND:
  ------------------
  |  |  557|      1|#define SECMOD_MODULE_DB_FUNCTION_FIND 0
  ------------------
  |  Branch (919:9): [True: 1, False: 1]
  ------------------
  920|      1|            rvstr = nssutil_ReadSecmodDB(appName, filename,
  921|      1|                                         secmod, (char *)parameters, rw);
  922|      1|            break;
  923|      0|        case SECMOD_MODULE_DB_FUNCTION_ADD:
  ------------------
  |  |  558|      0|#define SECMOD_MODULE_DB_FUNCTION_ADD 1
  ------------------
  |  Branch (923:9): [True: 0, False: 2]
  ------------------
  924|      0|            rvstr = (nssutil_AddSecmodDBEntry(appName, filename,
  ------------------
  |  Branch (924:21): [True: 0, False: 0]
  ------------------
  925|      0|                                              secmod, (char *)args, rw) == SECSuccess)
  926|      0|                        ? &success
  927|      0|                        : NULL;
  928|      0|            break;
  929|      0|        case SECMOD_MODULE_DB_FUNCTION_DEL:
  ------------------
  |  |  559|      0|#define SECMOD_MODULE_DB_FUNCTION_DEL 2
  ------------------
  |  Branch (929:9): [True: 0, False: 2]
  ------------------
  930|      0|            rvstr = (nssutil_DeleteSecmodDBEntry(appName, filename,
  ------------------
  |  Branch (930:21): [True: 0, False: 0]
  ------------------
  931|      0|                                                 secmod, (char *)args, rw) == SECSuccess)
  932|      0|                        ? &success
  933|      0|                        : NULL;
  934|      0|            break;
  935|      1|        case SECMOD_MODULE_DB_FUNCTION_RELEASE:
  ------------------
  |  |  560|      1|#define SECMOD_MODULE_DB_FUNCTION_RELEASE 3
  ------------------
  |  Branch (935:9): [True: 1, False: 1]
  ------------------
  936|      1|            rvstr = (nssutil_ReleaseSecmodDBData(appName, filename,
  ------------------
  |  Branch (936:21): [True: 1, False: 0]
  ------------------
  937|      1|                                                 secmod, (char **)args, rw) == SECSuccess)
  938|      1|                        ? &success
  939|      1|                        : NULL;
  940|      1|            break;
  941|      2|    }
  942|      2|done:
  943|      2|    if (secmod)
  ------------------
  |  Branch (943:9): [True: 0, False: 2]
  ------------------
  944|      0|        PR_smprintf_free(secmod);
  945|      2|    if (appName)
  ------------------
  |  Branch (945:9): [True: 0, False: 2]
  ------------------
  946|      0|        PORT_Free(appName);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
  947|      2|    if (filename)
  ------------------
  |  Branch (947:9): [True: 0, False: 2]
  ------------------
  948|      0|        PORT_Free(filename);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
  949|      2|    return rvstr;
  950|      2|}
utilmod.c:nssutil_ReadSecmodDB:
  375|      1|{
  376|      1|    FILE *fd = NULL;
  377|      1|    char **moduleList = NULL;
  378|      1|    int moduleCount = 1;
  379|      1|    int useCount = SECMOD_STEP;
  ------------------
  |  |  294|      1|#define SECMOD_STEP 10
  ------------------
  380|      1|    char line[MAX_LINE_LENGTH];
  381|      1|    PRBool internal = PR_FALSE;
  ------------------
  |  |  438|      1|#define PR_FALSE 0
  ------------------
  382|      1|    PRBool skipParams = PR_FALSE;
  ------------------
  |  |  438|      1|#define PR_FALSE 0
  ------------------
  383|      1|    char *moduleString = NULL;
  384|      1|    char *paramsValue = NULL;
  385|      1|    PRBool failed = PR_TRUE;
  ------------------
  |  |  437|      1|#define PR_TRUE 1
  ------------------
  386|       |
  387|      1|    moduleList = (char **)PORT_ZAlloc(useCount * sizeof(char *));
  ------------------
  |  |   72|      1|#define PORT_ZAlloc PORT_ZAlloc_Util
  ------------------
  388|      1|    if (moduleList == NULL)
  ------------------
  |  Branch (388:9): [True: 0, False: 1]
  ------------------
  389|      0|        return NULL;
  390|       |
  391|      1|    if (dbname == NULL) {
  ------------------
  |  Branch (391:9): [True: 1, False: 0]
  ------------------
  392|      1|        goto return_default;
  393|      1|    }
  394|       |
  395|       |    /* do we really want to use streams here */
  396|      0|    fd = os_fopen(dbname, "r");
  ------------------
  |  |  215|      0|#define os_fopen fopen
  ------------------
  397|      0|    if (fd == NULL)
  ------------------
  |  Branch (397:9): [True: 0, False: 0]
  ------------------
  398|      0|        goto done;
  399|       |
  400|       |    /*
  401|       |     * the following loop takes line separated config lines and collapses
  402|       |     * the lines to a single string, escaping and quoting as necessary.
  403|       |     */
  404|       |    /* loop state variables */
  405|      0|    moduleString = NULL;   /* current concatenated string */
  406|      0|    internal = PR_FALSE;   /* is this an internal module */
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  407|      0|    skipParams = PR_FALSE; /* did we find an override parameter block*/
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  408|      0|    paramsValue = NULL;    /* the current parameter block value */
  409|      0|    do {
  410|      0|        int len;
  411|       |
  412|      0|        if (fgets(line, sizeof(line), fd) == NULL) {
  ------------------
  |  Branch (412:13): [True: 0, False: 0]
  ------------------
  413|      0|            goto endloop;
  414|      0|        }
  415|       |
  416|       |        /* remove the ending newline */
  417|      0|        len = PORT_Strlen(line);
  ------------------
  |  |  190|      0|#define PORT_Strlen(s) strlen(s)
  ------------------
  418|      0|        if (len >= 2 && line[len - 2] == '\r' && line[len - 1] == '\n') {
  ------------------
  |  Branch (418:13): [True: 0, False: 0]
  |  Branch (418:25): [True: 0, False: 0]
  |  Branch (418:50): [True: 0, False: 0]
  ------------------
  419|      0|            len = len - 2;
  420|      0|            line[len] = 0;
  421|      0|        } else if (len && (line[len - 1] == '\n' || line[len - 1] == '\r')) {
  ------------------
  |  Branch (421:20): [True: 0, False: 0]
  |  Branch (421:28): [True: 0, False: 0]
  |  Branch (421:53): [True: 0, False: 0]
  ------------------
  422|      0|            len--;
  423|      0|            line[len] = 0;
  424|      0|        }
  425|      0|        if (*line == '#') {
  ------------------
  |  Branch (425:13): [True: 0, False: 0]
  ------------------
  426|      0|            continue;
  427|      0|        }
  428|      0|        if (*line != 0) {
  ------------------
  |  Branch (428:13): [True: 0, False: 0]
  ------------------
  429|       |            /*
  430|       |             * The PKCS #11 group standard assumes blocks of strings
  431|       |             * separated by new lines, clumped by new lines. Internally
  432|       |             * we take strings separated by spaces, so we may need to escape
  433|       |             * certain spaces.
  434|       |             */
  435|      0|            char *value = PORT_Strchr(line, '=');
  ------------------
  |  |  186|      0|#define PORT_Strchr strchr
  ------------------
  436|       |
  437|       |            /* there is no value, write out the stanza as is */
  438|      0|            if (value == NULL || value[1] == 0) {
  ------------------
  |  Branch (438:17): [True: 0, False: 0]
  |  Branch (438:34): [True: 0, False: 0]
  ------------------
  439|      0|                if (moduleString) {
  ------------------
  |  Branch (439:21): [True: 0, False: 0]
  ------------------
  440|      0|                    moduleString = nssutil_DupnCat(moduleString, " ", 1);
  441|      0|                    if (moduleString == NULL)
  ------------------
  |  Branch (441:25): [True: 0, False: 0]
  ------------------
  442|      0|                        goto loser;
  443|      0|                }
  444|      0|                moduleString = nssutil_DupCat(moduleString, line);
  445|      0|                if (moduleString == NULL)
  ------------------
  |  Branch (445:21): [True: 0, False: 0]
  ------------------
  446|      0|                    goto loser;
  447|       |                /* value is already quoted, just write it out */
  448|      0|            } else if (value[1] == '"') {
  ------------------
  |  Branch (448:24): [True: 0, False: 0]
  ------------------
  449|      0|                if (moduleString) {
  ------------------
  |  Branch (449:21): [True: 0, False: 0]
  ------------------
  450|      0|                    moduleString = nssutil_DupnCat(moduleString, " ", 1);
  451|      0|                    if (moduleString == NULL)
  ------------------
  |  Branch (451:25): [True: 0, False: 0]
  ------------------
  452|      0|                        goto loser;
  453|      0|                }
  454|      0|                moduleString = nssutil_DupCat(moduleString, line);
  455|      0|                if (moduleString == NULL)
  ------------------
  |  Branch (455:21): [True: 0, False: 0]
  ------------------
  456|      0|                    goto loser;
  457|       |                /* we have an override parameter section, remember that
  458|       |                 * we found this (see following comment about why this
  459|       |                 * is necessary). */
  460|      0|                if (PORT_Strncasecmp(line, "parameters", 10) == 0) {
  ------------------
  |  |  191|      0|#define PORT_Strncasecmp PL_strncasecmp
  ------------------
  |  Branch (460:21): [True: 0, False: 0]
  ------------------
  461|      0|                    skipParams = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  462|      0|                }
  463|       |                /*
  464|       |                 * The internal token always overrides it's parameter block
  465|       |                 * from the passed in parameters, so wait until then end
  466|       |                 * before we include the parameter block in case we need to
  467|       |                 * override it. NOTE: if the parameter block is quoted with ("),
  468|       |                 * this override does not happen. This allows you to override
  469|       |                 * the application's parameter configuration.
  470|       |                 *
  471|       |                 * parameter block state is controlled by the following variables:
  472|       |                 *  skipParams - Bool : set to true of we have an override param
  473|       |                 *    block (all other blocks, either implicit or explicit are
  474|       |                 *    ignored).
  475|       |                 *  paramsValue - char * : pointer to the current param block. In
  476|       |                 *    the absence of overrides, paramsValue is set to the first
  477|       |                 *    parameter block we find. All subsequent blocks are ignored.
  478|       |                 *    When we find an internal token, the application passed
  479|       |                 *    parameters take precident.
  480|       |                 */
  481|      0|            } else if (PORT_Strncasecmp(line, "parameters", 10) == 0) {
  ------------------
  |  |  191|      0|#define PORT_Strncasecmp PL_strncasecmp
  ------------------
  |  Branch (481:24): [True: 0, False: 0]
  ------------------
  482|       |                /* already have parameters */
  483|      0|                if (paramsValue) {
  ------------------
  |  Branch (483:21): [True: 0, False: 0]
  ------------------
  484|      0|                    continue;
  485|      0|                }
  486|      0|                paramsValue = NSSUTIL_Quote(&value[1], '"');
  487|      0|                if (paramsValue == NULL)
  ------------------
  |  Branch (487:21): [True: 0, False: 0]
  ------------------
  488|      0|                    goto loser;
  489|      0|                continue;
  490|      0|            } else {
  491|       |                /* may need to quote */
  492|      0|                char *newLine;
  493|      0|                if (moduleString) {
  ------------------
  |  Branch (493:21): [True: 0, False: 0]
  ------------------
  494|      0|                    moduleString = nssutil_DupnCat(moduleString, " ", 1);
  495|      0|                    if (moduleString == NULL)
  ------------------
  |  Branch (495:25): [True: 0, False: 0]
  ------------------
  496|      0|                        goto loser;
  497|      0|                }
  498|      0|                moduleString = nssutil_DupnCat(moduleString, line, value - line + 1);
  499|      0|                if (moduleString == NULL)
  ------------------
  |  Branch (499:21): [True: 0, False: 0]
  ------------------
  500|      0|                    goto loser;
  501|      0|                newLine = NSSUTIL_Quote(&value[1], '"');
  502|      0|                if (newLine == NULL)
  ------------------
  |  Branch (502:21): [True: 0, False: 0]
  ------------------
  503|      0|                    goto loser;
  504|      0|                moduleString = nssutil_DupCat(moduleString, newLine);
  505|      0|                PORT_Free(newLine);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
  506|      0|                if (moduleString == NULL)
  ------------------
  |  Branch (506:21): [True: 0, False: 0]
  ------------------
  507|      0|                    goto loser;
  508|      0|            }
  509|       |
  510|       |            /* check to see if it's internal? */
  511|      0|            if (PORT_Strncasecmp(line, "NSS=", 4) == 0) {
  ------------------
  |  |  191|      0|#define PORT_Strncasecmp PL_strncasecmp
  ------------------
  |  Branch (511:17): [True: 0, False: 0]
  ------------------
  512|       |                /* This should be case insensitive! reviewers make
  513|       |                 * me fix it if it's not */
  514|      0|                if (PORT_Strstr(line, "internal")) {
  ------------------
  |  |  196|      0|#define PORT_Strstr strstr
  ------------------
  |  Branch (514:21): [True: 0, False: 0]
  ------------------
  515|      0|                    internal = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  516|       |                    /* override the parameters */
  517|      0|                    if (paramsValue) {
  ------------------
  |  Branch (517:25): [True: 0, False: 0]
  ------------------
  518|      0|                        PORT_Free(paramsValue);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
  519|      0|                    }
  520|      0|                    paramsValue = NSSUTIL_Quote(params, '"');
  521|      0|                }
  522|      0|            }
  523|      0|            continue;
  524|      0|        }
  525|      0|        if ((moduleString == NULL) || (*moduleString == 0)) {
  ------------------
  |  Branch (525:13): [True: 0, False: 0]
  |  Branch (525:39): [True: 0, False: 0]
  ------------------
  526|      0|            continue;
  527|      0|        }
  528|       |
  529|      0|    endloop:
  530|       |        /*
  531|       |         * if we are here, we have found a complete stanza. Now write out
  532|       |         * any param section we may have found.
  533|       |         */
  534|      0|        if (paramsValue) {
  ------------------
  |  Branch (534:13): [True: 0, False: 0]
  ------------------
  535|       |            /* we had an override */
  536|      0|            if (!skipParams) {
  ------------------
  |  Branch (536:17): [True: 0, False: 0]
  ------------------
  537|      0|                moduleString = nssutil_DupnCat(moduleString, " parameters=", 12);
  538|      0|                if (moduleString == NULL)
  ------------------
  |  Branch (538:21): [True: 0, False: 0]
  ------------------
  539|      0|                    goto loser;
  540|      0|                moduleString = nssutil_DupCat(moduleString, paramsValue);
  541|      0|                if (moduleString == NULL)
  ------------------
  |  Branch (541:21): [True: 0, False: 0]
  ------------------
  542|      0|                    goto loser;
  543|      0|            }
  544|      0|            PORT_Free(paramsValue);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
  545|      0|            paramsValue = NULL;
  546|      0|        }
  547|       |
  548|      0|        if ((moduleCount + 1) >= useCount) {
  ------------------
  |  Branch (548:13): [True: 0, False: 0]
  ------------------
  549|      0|            SECStatus rv;
  550|      0|            rv = nssutil_growList(&moduleList, &useCount, moduleCount + 1);
  551|      0|            if (rv != SECSuccess) {
  ------------------
  |  Branch (551:17): [True: 0, False: 0]
  ------------------
  552|      0|                goto loser;
  553|      0|            }
  554|      0|        }
  555|       |
  556|      0|        if (internal) {
  ------------------
  |  Branch (556:13): [True: 0, False: 0]
  ------------------
  557|      0|            moduleList[0] = moduleString;
  558|      0|        } else {
  559|      0|            moduleList[moduleCount] = moduleString;
  560|      0|            moduleCount++;
  561|      0|        }
  562|      0|        moduleString = NULL;
  563|      0|        internal = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  564|      0|        skipParams = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  565|      0|    } while (!feof(fd));
  ------------------
  |  Branch (565:14): [True: 0, False: 0]
  ------------------
  566|       |
  567|      0|    if (moduleString) {
  ------------------
  |  Branch (567:9): [True: 0, False: 0]
  ------------------
  568|      0|        PORT_Free(moduleString);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
  569|      0|        moduleString = NULL;
  570|      0|    }
  571|      0|done:
  572|       |#ifndef NSS_DISABLE_DBM
  573|       |    /* if we couldn't open a pkcs11 database, look for the old one */
  574|       |    if (fd == NULL) {
  575|       |        char *olddbname = _NSSUTIL_GetOldSecmodName(dbname, filename);
  576|       |        PRStatus status;
  577|       |
  578|       |        /* couldn't get the old name */
  579|       |        if (!olddbname) {
  580|       |            goto bail;
  581|       |        }
  582|       |
  583|       |        /* old one exists */
  584|       |        status = _NSSUTIL_Access(olddbname, PR_ACCESS_EXISTS);
  585|       |        if (status == PR_SUCCESS) {
  586|       |            PR_smprintf_free(olddbname);
  587|       |            PORT_ZFree(moduleList, useCount * sizeof(char *));
  588|       |            PORT_SetError(SEC_ERROR_LEGACY_DATABASE);
  589|       |            return NULL;
  590|       |        }
  591|       |
  592|       |    bail:
  593|       |        if (olddbname) {
  594|       |            PR_smprintf_free(olddbname);
  595|       |        }
  596|       |    }
  597|       |#endif // NSS_DISABLE_DBM
  598|       |
  599|      1|return_default:
  600|       |
  601|      1|    if (!moduleList[0]) {
  ------------------
  |  Branch (601:9): [True: 1, False: 0]
  ------------------
  602|      1|        char *newParams;
  603|      1|        moduleString = PORT_Strdup(NSSUTIL_DEFAULT_INTERNAL_INIT1);
  ------------------
  |  |   69|      1|#define PORT_Strdup PORT_Strdup_Util
  ------------------
                      moduleString = PORT_Strdup(NSSUTIL_DEFAULT_INTERNAL_INIT1);
  ------------------
  |  |   40|      1|    "library= name=\"NSS Internal PKCS #11 Module\" parameters="
  ------------------
  604|      1|        newParams = NSSUTIL_Quote(params, '"');
  605|      1|        if (newParams == NULL)
  ------------------
  |  Branch (605:13): [True: 0, False: 1]
  ------------------
  606|      0|            goto loser;
  607|      1|        moduleString = nssutil_DupCat(moduleString, newParams);
  608|      1|        PORT_Free(newParams);
  ------------------
  |  |   60|      1|#define PORT_Free PORT_Free_Util
  ------------------
  609|      1|        if (moduleString == NULL)
  ------------------
  |  Branch (609:13): [True: 0, False: 1]
  ------------------
  610|      0|            goto loser;
  611|      1|        moduleString = nssutil_DupCat(moduleString,
  612|      1|                                      NSSUTIL_DEFAULT_INTERNAL_INIT2);
  ------------------
  |  |   42|      1|    " NSS=\"Flags=internal,critical trustOrder=75 cipherOrder=100 slotParams=(1={"
  ------------------
  613|      1|        if (moduleString == NULL)
  ------------------
  |  Branch (613:13): [True: 0, False: 1]
  ------------------
  614|      0|            goto loser;
  615|      1|        moduleString = nssutil_DupCat(moduleString,
  616|      1|                                      NSSUTIL_DEFAULT_SFTKN_FLAGS);
  ------------------
  |  |   46|      1|    "slotFlags=[ECC,RSA,DSA,DH,RC2,RC4,DES,RANDOM,SHA1,MD5,MD2,SSL,TLS,AES,Camellia,SEED,SHA256,SHA512]"
  ------------------
  617|      1|        if (moduleString == NULL)
  ------------------
  |  Branch (617:13): [True: 0, False: 1]
  ------------------
  618|      0|            goto loser;
  619|      1|        moduleString = nssutil_DupCat(moduleString,
  620|      1|                                      NSSUTIL_DEFAULT_INTERNAL_INIT3);
  ------------------
  |  |   44|      1|    " askpw=any timeout=30})\""
  ------------------
  621|      1|        if (moduleString == NULL)
  ------------------
  |  Branch (621:13): [True: 0, False: 1]
  ------------------
  622|      0|            goto loser;
  623|      1|        moduleList[0] = moduleString;
  624|      1|        moduleString = NULL;
  625|      1|    }
  626|      1|    failed = PR_FALSE;
  ------------------
  |  |  438|      1|#define PR_FALSE 0
  ------------------
  627|       |
  628|      1|loser:
  629|       |    /*
  630|       |     * cleanup
  631|       |     */
  632|       |    /* deal with trust cert db here */
  633|      1|    if (moduleString) {
  ------------------
  |  Branch (633:9): [True: 0, False: 1]
  ------------------
  634|      0|        PORT_Free(moduleString);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
  635|      0|        moduleString = NULL;
  636|      0|    }
  637|      1|    if (paramsValue) {
  ------------------
  |  Branch (637:9): [True: 0, False: 1]
  ------------------
  638|      0|        PORT_Free(paramsValue);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
  639|      0|        paramsValue = NULL;
  640|      0|    }
  641|      1|    if (failed || (moduleList[0] == NULL)) {
  ------------------
  |  Branch (641:9): [True: 0, False: 1]
  |  Branch (641:19): [True: 0, False: 1]
  ------------------
  642|       |        /* This is wrong! FIXME */
  643|      0|        nssutil_releaseSpecList(moduleList);
  644|      0|        moduleList = NULL;
  645|      0|        failed = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  646|      0|    }
  647|      1|    if (fd != NULL) {
  ------------------
  |  Branch (647:9): [True: 0, False: 1]
  ------------------
  648|      0|        fclose(fd);
  649|      1|    } else if (!failed && rw) {
  ------------------
  |  Branch (649:16): [True: 1, False: 0]
  |  Branch (649:27): [True: 0, False: 1]
  ------------------
  650|       |        /* update our internal module */
  651|      0|        nssutil_AddSecmodDBEntry(appName, filename, dbname, moduleList[0], rw);
  652|      0|    }
  653|      1|    return moduleList;
  654|      1|}
utilmod.c:nssutil_DupnCat:
  255|      4|{
  256|      4|    int baseStringLen = baseString ? PORT_Strlen(baseString) : 0;
  ------------------
  |  |  190|      4|#define PORT_Strlen(s) strlen(s)
  ------------------
  |  Branch (256:25): [True: 4, False: 0]
  ------------------
  257|      4|    int len = baseStringLen + 1;
  258|      4|    char *newString;
  259|       |
  260|      4|    len += str_len;
  261|      4|    newString = (char *)PORT_Realloc(baseString, len);
  ------------------
  |  |   64|      4|#define PORT_Realloc PORT_Realloc_Util
  ------------------
  262|      4|    if (newString == NULL) {
  ------------------
  |  Branch (262:9): [True: 0, False: 4]
  ------------------
  263|      0|        PORT_Free(baseString);
  ------------------
  |  |   60|      0|#define PORT_Free PORT_Free_Util
  ------------------
  264|      0|        return NULL;
  265|      0|    }
  266|      4|    PORT_Memcpy(&newString[baseStringLen], str, str_len);
  ------------------
  |  |  180|      4|#define PORT_Memcpy memcpy
  ------------------
  267|      4|    newString[len - 1] = 0;
  268|      4|    return newString;
  269|      4|}
utilmod.c:nssutil_DupCat:
  275|      4|{
  276|      4|    return nssutil_DupnCat(baseString, str, PORT_Strlen(str));
  ------------------
  |  |  190|      4|#define PORT_Strlen(s) strlen(s)
  ------------------
  277|      4|}
utilmod.c:nssutil_releaseSpecList:
  283|      1|{
  284|      1|    if (moduleSpecList) {
  ------------------
  |  Branch (284:9): [True: 1, False: 0]
  ------------------
  285|      1|        char **index;
  286|      2|        for (index = moduleSpecList; *index; index++) {
  ------------------
  |  Branch (286:38): [True: 1, False: 1]
  ------------------
  287|      1|            PORT_Free(*index);
  ------------------
  |  |   60|      1|#define PORT_Free PORT_Free_Util
  ------------------
  288|      1|        }
  289|      1|        PORT_Free(moduleSpecList);
  ------------------
  |  |   60|      1|#define PORT_Free PORT_Free_Util
  ------------------
  290|      1|    }
  291|      1|    return SECSuccess;
  292|      1|}
utilmod.c:nssutil_ReleaseSecmodDBData:
  660|      1|{
  661|      1|    if (moduleSpecList) {
  ------------------
  |  Branch (661:9): [True: 1, False: 0]
  ------------------
  662|      1|        nssutil_releaseSpecList(moduleSpecList);
  663|      1|    }
  664|      1|    return SECSuccess;
  665|      1|}

NSSUTIL_ArgGetPair:
   20|     90|{
   21|     90|    switch (c) {
   22|     75|        case '\'':
  ------------------
  |  Branch (22:9): [True: 75, False: 15]
  ------------------
   23|     75|            return c;
   24|      6|        case '\"':
  ------------------
  |  Branch (24:9): [True: 6, False: 84]
  ------------------
   25|      6|            return c;
   26|      0|        case '<':
  ------------------
  |  Branch (26:9): [True: 0, False: 90]
  ------------------
   27|      0|            return '>';
   28|      2|        case '{':
  ------------------
  |  Branch (28:9): [True: 2, False: 88]
  ------------------
   29|      2|            return '}';
   30|      5|        case '[':
  ------------------
  |  Branch (30:9): [True: 5, False: 85]
  ------------------
   31|      5|            return ']';
   32|      2|        case '(':
  ------------------
  |  Branch (32:9): [True: 2, False: 88]
  ------------------
   33|      2|            return ')';
   34|      0|        default:
  ------------------
  |  Branch (34:9): [True: 0, False: 90]
  ------------------
   35|      0|            break;
   36|     90|    }
   37|      0|    return ' ';
   38|     90|}
NSSUTIL_ArgIsBlank:
   42|  3.36k|{
   43|  3.36k|    return isspace((unsigned char)c);
   44|  3.36k|}
NSSUTIL_ArgIsEscape:
   48|  6.98k|{
   49|  6.98k|    return c == '\\';
   50|  6.98k|}
NSSUTIL_ArgIsQuote:
   54|    219|{
   55|    219|    switch (c) {
   56|     86|        case '\'':
  ------------------
  |  Branch (56:9): [True: 86, False: 133]
  ------------------
   57|     98|        case '\"':
  ------------------
  |  Branch (57:9): [True: 12, False: 207]
  ------------------
   58|     98|        case '<':
  ------------------
  |  Branch (58:9): [True: 0, False: 219]
  ------------------
   59|    101|        case '{': /* } end curly to keep vi bracket matching working */
  ------------------
  |  Branch (59:9): [True: 3, False: 216]
  ------------------
   60|    104|        case '(': /* ) */
  ------------------
  |  Branch (60:9): [True: 3, False: 216]
  ------------------
   61|    110|        case '[': /* ] */
  ------------------
  |  Branch (61:9): [True: 6, False: 213]
  ------------------
   62|    110|            return PR_TRUE;
  ------------------
  |  |  437|    110|#define PR_TRUE 1
  ------------------
   63|    109|        default:
  ------------------
  |  Branch (63:9): [True: 109, False: 110]
  ------------------
   64|    109|            break;
   65|    219|    }
   66|    109|    return PR_FALSE;
  ------------------
  |  |  438|    109|#define PR_FALSE 0
  ------------------
   67|    219|}
NSSUTIL_ArgStrip:
   71|    121|{
   72|    205|    while (*c && NSSUTIL_ArgIsBlank(*c))
  ------------------
  |  Branch (72:12): [True: 191, False: 14]
  |  Branch (72:18): [True: 84, False: 107]
  ------------------
   73|     84|        c++;
   74|    121|    return c;
   75|    121|}
NSSUTIL_ArgFindEnd:
   83|    155|{
   84|    155|    char endChar = ' ';
   85|    155|    PRBool lastEscape = PR_FALSE;
  ------------------
  |  |  438|    155|#define PR_FALSE 0
  ------------------
   86|       |
   87|    155|    if (NSSUTIL_ArgIsQuote(*string)) {
  ------------------
  |  Branch (87:9): [True: 90, False: 65]
  ------------------
   88|     90|        endChar = NSSUTIL_ArgGetPair(*string);
   89|     90|        string++;
   90|     90|    }
   91|       |
   92|  4.10k|    for (; *string; string++) {
  ------------------
  |  Branch (92:12): [True: 4.08k, False: 22]
  ------------------
   93|  4.08k|        if (lastEscape) {
  ------------------
  |  Branch (93:13): [True: 0, False: 4.08k]
  ------------------
   94|      0|            lastEscape = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
   95|      0|            continue;
   96|      0|        }
   97|  4.08k|        if (NSSUTIL_ArgIsEscape(*string) && !lastEscape) {
  ------------------
  |  Branch (97:13): [True: 0, False: 4.08k]
  |  Branch (97:45): [True: 0, False: 0]
  ------------------
   98|      0|            lastEscape = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
   99|      0|            continue;
  100|      0|        }
  101|  4.08k|        if ((endChar == ' ') && NSSUTIL_ArgIsBlank(*string))
  ------------------
  |  Branch (101:13): [True: 2.37k, False: 1.70k]
  |  Branch (101:33): [True: 43, False: 2.33k]
  ------------------
  102|     43|            break;
  103|  4.04k|        if (*string == endChar) {
  ------------------
  |  Branch (103:13): [True: 90, False: 3.95k]
  ------------------
  104|     90|            break;
  105|     90|        }
  106|  4.04k|    }
  107|       |
  108|    155|    return string;
  109|    155|}
NSSUTIL_ArgFetchValue:
  117|     65|{
  118|     65|    const char *end = NSSUTIL_ArgFindEnd(string);
  119|     65|    char *retString, *copyString;
  120|     65|    PRBool lastEscape = PR_FALSE;
  ------------------
  |  |  438|     65|#define PR_FALSE 0
  ------------------
  121|     65|    int len;
  122|       |
  123|     65|    len = end - string;
  124|     65|    if (len == 0) {
  ------------------
  |  Branch (124:9): [True: 1, False: 64]
  ------------------
  125|      1|        *pcount = 0;
  126|      1|        return NULL;
  127|      1|    }
  128|       |
  129|     64|    copyString = retString = (char *)PORT_Alloc(len + 1);
  ------------------
  |  |   52|     64|#define PORT_Alloc PORT_Alloc_Util
  ------------------
  130|       |
  131|     64|    if (*end)
  ------------------
  |  Branch (131:9): [True: 48, False: 16]
  ------------------
  132|     48|        len++;
  133|     64|    *pcount = len;
  134|     64|    if (retString == NULL)
  ------------------
  |  Branch (134:9): [True: 0, False: 64]
  ------------------
  135|      0|        return NULL;
  136|       |
  137|     64|    if (NSSUTIL_ArgIsQuote(*string))
  ------------------
  |  Branch (137:9): [True: 20, False: 44]
  ------------------
  138|     20|        string++;
  139|  2.96k|    for (; string < end; string++) {
  ------------------
  |  Branch (139:12): [True: 2.90k, False: 64]
  ------------------
  140|  2.90k|        if (NSSUTIL_ArgIsEscape(*string) && !lastEscape) {
  ------------------
  |  Branch (140:13): [True: 0, False: 2.90k]
  |  Branch (140:45): [True: 0, False: 0]
  ------------------
  141|      0|            lastEscape = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  142|      0|            continue;
  143|      0|        }
  144|  2.90k|        lastEscape = PR_FALSE;
  ------------------
  |  |  438|  2.90k|#define PR_FALSE 0
  ------------------
  145|  2.90k|        *copyString++ = *string;
  146|  2.90k|    }
  147|     64|    *copyString = 0;
  148|     64|    return retString;
  149|     64|}
NSSUTIL_ArgSkipParameter:
  156|     90|{
  157|     90|    const char *end;
  158|       |    /* look for the end of the <name>= */
  159|    885|    for (; *string; string++) {
  ------------------
  |  Branch (159:12): [True: 885, False: 0]
  ------------------
  160|    885|        if (*string == '=') {
  ------------------
  |  Branch (160:13): [True: 90, False: 795]
  ------------------
  161|     90|            string++;
  162|     90|            break;
  163|     90|        }
  164|    795|        if (NSSUTIL_ArgIsBlank(*string))
  ------------------
  |  Branch (164:13): [True: 0, False: 795]
  ------------------
  165|      0|            return (string);
  166|    795|    }
  167|       |
  168|     90|    end = NSSUTIL_ArgFindEnd(string);
  169|     90|    if (*end)
  ------------------
  |  Branch (169:9): [True: 84, False: 6]
  ------------------
  170|     84|        end++;
  171|     90|    return end;
  172|     90|}
NSSUTIL_ArgGetParamValue:
  179|     52|{
  180|     52|    char searchValue[256];
  181|     52|    size_t paramLen = strlen(paramName);
  182|     52|    char *returnValue = NULL;
  183|     52|    int next;
  184|       |
  185|     52|    if ((parameters == NULL) || (*parameters == 0))
  ------------------
  |  Branch (185:9): [True: 0, False: 52]
  |  Branch (185:33): [True: 0, False: 52]
  ------------------
  186|      0|        return NULL;
  187|       |
  188|     52|    PORT_Assert(paramLen + 2 < sizeof(searchValue));
  ------------------
  |  |  120|     52|#define PORT_Assert PR_ASSERT
  |  |  ------------------
  |  |  |  |  208|     52|    ((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (208:6): [True: 52, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  189|       |
  190|     52|    PORT_Strcpy(searchValue, paramName);
  ------------------
  |  |  189|     52|#define PORT_Strcpy strcpy
  ------------------
  191|     52|    PORT_Strcat(searchValue, "=");
  ------------------
  |  |  185|     52|#define PORT_Strcat strcat
  ------------------
  192|    123|    while (*parameters) {
  ------------------
  |  Branch (192:12): [True: 116, False: 7]
  ------------------
  193|    116|        if (PORT_Strncasecmp(parameters, searchValue, paramLen + 1) == 0) {
  ------------------
  |  |  191|    116|#define PORT_Strncasecmp PL_strncasecmp
  ------------------
  |  Branch (193:13): [True: 45, False: 71]
  ------------------
  194|     45|            parameters += paramLen + 1;
  195|     45|            returnValue = NSSUTIL_ArgFetchValue(parameters, &next);
  196|     45|            break;
  197|     71|        } else {
  198|     71|            parameters = NSSUTIL_ArgSkipParameter(parameters);
  199|     71|        }
  200|     71|        parameters = NSSUTIL_ArgStrip(parameters);
  201|     71|    }
  202|     52|    return returnValue;
  203|     52|}
NSSUTIL_ArgNextFlag:
  210|    137|{
  211|  1.32k|    for (; *flags; flags++) {
  ------------------
  |  Branch (211:12): [True: 1.30k, False: 23]
  ------------------
  212|  1.30k|        if (*flags == ',') {
  ------------------
  |  Branch (212:13): [True: 114, False: 1.18k]
  ------------------
  213|    114|            flags++;
  214|    114|            break;
  215|    114|        }
  216|  1.30k|    }
  217|    137|    return flags;
  218|    137|}
NSSUTIL_ArgHasFlag:
  225|     41|{
  226|     41|    char *flags;
  227|     41|    const char *index;
  228|     41|    int len = strlen(flag);
  229|     41|    PRBool found = PR_FALSE;
  ------------------
  |  |  438|     41|#define PR_FALSE 0
  ------------------
  230|       |
  231|     41|    flags = NSSUTIL_ArgGetParamValue(label, parameters);
  232|     41|    if (flags == NULL)
  ------------------
  |  Branch (232:9): [True: 2, False: 39]
  ------------------
  233|      2|        return PR_FALSE;
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
  234|       |
  235|    158|    for (index = flags; *index; index = NSSUTIL_ArgNextFlag(index)) {
  ------------------
  |  Branch (235:25): [True: 136, False: 22]
  ------------------
  236|    136|        if (PORT_Strncasecmp(index, flag, len) == 0) {
  ------------------
  |  |  191|    136|#define PORT_Strncasecmp PL_strncasecmp
  ------------------
  |  Branch (236:13): [True: 17, False: 119]
  ------------------
  237|     17|            found = PR_TRUE;
  ------------------
  |  |  437|     17|#define PR_TRUE 1
  ------------------
  238|     17|            break;
  239|     17|        }
  240|    136|    }
  241|     39|    PORT_Free(flags);
  ------------------
  |  |   60|     39|#define PORT_Free PORT_Free_Util
  ------------------
  242|     39|    return found;
  243|     41|}
NSSUTIL_ArgDecodeNumber:
  250|      4|{
  251|      4|    int radix = 10;
  252|      4|    unsigned long value = 0;
  253|      4|    long retValue = 0;
  254|      4|    int sign = 1;
  255|      4|    int digit;
  256|       |
  257|      4|    if (num == NULL)
  ------------------
  |  Branch (257:9): [True: 0, False: 4]
  ------------------
  258|      0|        return retValue;
  259|       |
  260|      4|    num = NSSUTIL_ArgStrip(num);
  261|       |
  262|      4|    if (*num == '-') {
  ------------------
  |  Branch (262:9): [True: 0, False: 4]
  ------------------
  263|      0|        sign = -1;
  264|      0|        num++;
  265|      0|    }
  266|       |
  267|      4|    if (*num == '0') {
  ------------------
  |  Branch (267:9): [True: 0, False: 4]
  ------------------
  268|      0|        radix = 8;
  269|      0|        num++;
  270|      0|        if ((*num == 'x') || (*num == 'X')) {
  ------------------
  |  Branch (270:13): [True: 0, False: 0]
  |  Branch (270:30): [True: 0, False: 0]
  ------------------
  271|      0|            radix = 16;
  272|      0|            num++;
  273|      0|        }
  274|      0|    }
  275|       |
  276|     12|    for (; *num; num++) {
  ------------------
  |  Branch (276:12): [True: 8, False: 4]
  ------------------
  277|      8|        if (isdigit((unsigned char)*num)) {
  278|      8|            digit = *num - '0';
  279|      8|        } else if ((*num >= 'a') && (*num <= 'f')) {
  ------------------
  |  Branch (279:20): [True: 0, False: 0]
  |  Branch (279:37): [True: 0, False: 0]
  ------------------
  280|      0|            digit = *num - 'a' + 10;
  281|      0|        } else if ((*num >= 'A') && (*num <= 'F')) {
  ------------------
  |  Branch (281:20): [True: 0, False: 0]
  |  Branch (281:37): [True: 0, False: 0]
  ------------------
  282|      0|            digit = *num - 'A' + 10;
  283|      0|        } else {
  284|      0|            break;
  285|      0|        }
  286|      8|        if (digit >= radix)
  ------------------
  |  Branch (286:13): [True: 0, False: 8]
  ------------------
  287|      0|            break;
  288|      8|        value = value * radix + digit;
  289|      8|    }
  290|       |
  291|      4|    retValue = ((int)value) * sign;
  292|      4|    return retValue;
  293|      4|}
NSSUTIL_ArgGetLabel:
  301|      1|{
  302|      1|    char *name = NULL;
  303|      1|    const char *string;
  304|      1|    int len;
  305|       |
  306|       |    /* look for the end of the <label>= */
  307|      2|    for (string = inString; *string; string++) {
  ------------------
  |  Branch (307:29): [True: 2, False: 0]
  ------------------
  308|      2|        if (*string == '=') {
  ------------------
  |  Branch (308:13): [True: 1, False: 1]
  ------------------
  309|      1|            break;
  310|      1|        }
  311|      1|        if (NSSUTIL_ArgIsBlank(*string))
  ------------------
  |  Branch (311:13): [True: 0, False: 1]
  ------------------
  312|      0|            break;
  313|      1|    }
  314|       |
  315|      1|    len = string - inString;
  316|       |
  317|      1|    *next = len;
  318|      1|    if (*string == '=')
  ------------------
  |  Branch (318:9): [True: 1, False: 0]
  ------------------
  319|      1|        (*next) += 1;
  320|      1|    if (len > 0) {
  ------------------
  |  Branch (320:9): [True: 1, False: 0]
  ------------------
  321|      1|        name = PORT_Alloc(len + 1);
  ------------------
  |  |   52|      1|#define PORT_Alloc PORT_Alloc_Util
  ------------------
  322|      1|        PORT_Strncpy(name, inString, len);
  ------------------
  |  |  194|      1|#define PORT_Strncpy strncpy
  ------------------
  323|      1|        name[len] = 0;
  324|      1|    }
  325|      1|    return name;
  326|      1|}
NSSUTIL_ArgReadLong:
  334|      5|{
  335|      5|    char *value;
  336|      5|    long retValue;
  337|      5|    if (isdefault)
  ------------------
  |  Branch (337:9): [True: 0, False: 5]
  ------------------
  338|      0|        *isdefault = PR_FALSE;
  ------------------
  |  |  438|      0|#define PR_FALSE 0
  ------------------
  339|       |
  340|      5|    value = NSSUTIL_ArgGetParamValue(label, params);
  341|      5|    if (value == NULL) {
  ------------------
  |  Branch (341:9): [True: 2, False: 3]
  ------------------
  342|      2|        if (isdefault)
  ------------------
  |  Branch (342:13): [True: 0, False: 2]
  ------------------
  343|      0|            *isdefault = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  344|      2|        return defValue;
  345|      2|    }
  346|      3|    retValue = NSSUTIL_ArgDecodeNumber(value);
  347|      3|    if (value)
  ------------------
  |  Branch (347:9): [True: 3, False: 0]
  ------------------
  348|      3|        PORT_Free(value);
  ------------------
  |  |   60|      3|#define PORT_Free PORT_Free_Util
  ------------------
  349|       |
  350|      3|    return retValue;
  351|      5|}
NSSUTIL_Quote:
  421|      1|{
  422|      1|    return nssutil_escapeQuotes(string, quote, PR_TRUE);
  ------------------
  |  |  437|      1|#define PR_TRUE 1
  ------------------
  423|      1|}
NSSUTIL_DoubleEscape:
  445|      9|{
  446|      9|    char *round1 = NULL;
  447|      9|    char *retValue = NULL;
  448|      9|    if (string == NULL) {
  ------------------
  |  Branch (448:9): [True: 0, False: 9]
  ------------------
  449|      0|        goto done;
  450|      0|    }
  451|      9|    round1 = nssutil_escapeQuotes(string, quote1, PR_FALSE);
  ------------------
  |  |  438|      9|#define PR_FALSE 0
  ------------------
  452|      9|    if (round1) {
  ------------------
  |  Branch (452:9): [True: 9, False: 0]
  ------------------
  453|      9|        retValue = nssutil_escapeQuotes(round1, quote2, PR_FALSE);
  ------------------
  |  |  438|      9|#define PR_FALSE 0
  ------------------
  454|      9|        PORT_Free(round1);
  ------------------
  |  |   60|      9|#define PORT_Free PORT_Free_Util
  ------------------
  455|      9|    }
  456|       |
  457|      9|done:
  458|      9|    if (retValue == NULL) {
  ------------------
  |  Branch (458:9): [True: 0, False: 9]
  ------------------
  459|      0|        retValue = PORT_Strdup("");
  ------------------
  |  |   69|      0|#define PORT_Strdup PORT_Strdup_Util
  ------------------
  460|      0|    }
  461|      9|    return retValue;
  462|      9|}
NSSUTIL_ArgParseSlotFlags:
  621|      1|{
  622|      1|    char *flags;
  623|      1|    const char *index;
  624|      1|    unsigned long retValue = 0;
  625|      1|    int i;
  626|      1|    PRBool all = PR_FALSE;
  ------------------
  |  |  438|      1|#define PR_FALSE 0
  ------------------
  627|       |
  628|      1|    flags = NSSUTIL_ArgGetParamValue(label, params);
  629|      1|    if (flags == NULL)
  ------------------
  |  Branch (629:9): [True: 0, False: 1]
  ------------------
  630|      0|        return 0;
  631|       |
  632|      1|    if (PORT_Strcasecmp(flags, "all") == 0)
  ------------------
  |  |  184|      1|#define PORT_Strcasecmp PL_strcasecmp
  ------------------
  |  Branch (632:9): [True: 0, False: 1]
  ------------------
  633|      0|        all = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
  634|       |
  635|     19|    for (index = flags; *index; index = NSSUTIL_ArgNextFlag(index)) {
  ------------------
  |  Branch (635:25): [True: 18, False: 1]
  ------------------
  636|    414|        for (i = 0; i < nssutil_argSlotFlagTableSize; i++) {
  ------------------
  |  Branch (636:21): [True: 396, False: 18]
  ------------------
  637|    396|            if (all ||
  ------------------
  |  Branch (637:17): [True: 0, False: 396]
  ------------------
  638|    396|                (PORT_Strncasecmp(index, nssutil_argSlotFlagTable[i].name,
  ------------------
  |  |  191|    396|#define PORT_Strncasecmp PL_strncasecmp
  ------------------
  |  Branch (638:17): [True: 18, False: 378]
  ------------------
  639|    396|                                  nssutil_argSlotFlagTable[i].len) == 0)) {
  640|     18|                retValue |= nssutil_argSlotFlagTable[i].value;
  641|     18|            }
  642|    396|        }
  643|     18|    }
  644|      1|    PORT_Free(flags);
  ------------------
  |  |   60|      1|#define PORT_Free PORT_Free_Util
  ------------------
  645|      1|    return retValue;
  646|      1|}
NSSUTIL_ArgParseSlotInfo:
  681|      2|{
  682|      2|    const char *slotIndex;
  683|      2|    struct NSSUTILPreSlotInfoStr *slotInfo = NULL;
  684|      2|    int i = 0, count = 0, next;
  685|       |
  686|      2|    *retCount = 0;
  687|      2|    if ((slotParams == NULL) || (*slotParams == 0))
  ------------------
  |  Branch (687:9): [True: 1, False: 1]
  |  Branch (687:33): [True: 0, False: 1]
  ------------------
  688|      1|        return NULL;
  689|       |
  690|       |    /* first count the number of slots */
  691|      2|    for (slotIndex = NSSUTIL_ArgStrip(slotParams); *slotIndex;
  ------------------
  |  Branch (691:52): [True: 1, False: 1]
  ------------------
  692|      1|         slotIndex = NSSUTIL_ArgStrip(NSSUTIL_ArgSkipParameter(slotIndex))) {
  693|      1|        count++;
  694|      1|    }
  695|       |
  696|       |    /* get the data structures */
  697|      1|    if (arena) {
  ------------------
  |  Branch (697:9): [True: 1, False: 0]
  ------------------
  698|      1|        slotInfo = PORT_ArenaZNewArray(arena,
  ------------------
  |  |  163|      1|    (type *)PORT_ArenaZAlloc(poolp, sizeof(type) * (num))
  |  |  ------------------
  |  |  |  |   59|      1|#define PORT_ArenaZAlloc PORT_ArenaZAlloc_Util
  |  |  ------------------
  ------------------
  699|      1|                                       struct NSSUTILPreSlotInfoStr, count);
  700|      1|    } else {
  701|      0|        slotInfo = PORT_ZNewArray(struct NSSUTILPreSlotInfoStr, count);
  ------------------
  |  |  159|      0|    (type *)PORT_ZAlloc(sizeof(type) * (num))
  |  |  ------------------
  |  |  |  |   72|      0|#define PORT_ZAlloc PORT_ZAlloc_Util
  |  |  ------------------
  ------------------
  702|      0|    }
  703|      1|    if (slotInfo == NULL)
  ------------------
  |  Branch (703:9): [True: 0, False: 1]
  ------------------
  704|      0|        return NULL;
  705|       |
  706|      1|    for (slotIndex = NSSUTIL_ArgStrip(slotParams), i = 0;
  707|      2|         *slotIndex && i < count;) {
  ------------------
  |  Branch (707:10): [True: 1, False: 1]
  |  Branch (707:24): [True: 1, False: 0]
  ------------------
  708|      1|        char *name;
  709|      1|        name = NSSUTIL_ArgGetLabel(slotIndex, &next);
  710|      1|        slotIndex += next;
  711|       |
  712|      1|        if (!NSSUTIL_ArgIsBlank(*slotIndex)) {
  ------------------
  |  Branch (712:13): [True: 1, False: 0]
  ------------------
  713|      1|            char *args = NSSUTIL_ArgFetchValue(slotIndex, &next);
  714|      1|            slotIndex += next;
  715|      1|            if (args) {
  ------------------
  |  Branch (715:17): [True: 1, False: 0]
  ------------------
  716|      1|                nssutil_argDecodeSingleSlotInfo(name, args, &slotInfo[i]);
  717|      1|                i++;
  718|      1|                PORT_Free(args);
  ------------------
  |  |   60|      1|#define PORT_Free PORT_Free_Util
  ------------------
  719|      1|            }
  720|      1|        }
  721|      1|        if (name)
  ------------------
  |  Branch (721:13): [True: 1, False: 0]
  ------------------
  722|      1|            PORT_Free(name);
  ------------------
  |  |   60|      1|#define PORT_Free PORT_Free_Util
  ------------------
  723|      1|        slotIndex = NSSUTIL_ArgStrip(slotIndex);
  724|      1|    }
  725|      1|    *retCount = i;
  726|      1|    return slotInfo;
  727|      1|}
NSSUTIL_ArgParseModuleSpecEx:
  836|      2|{
  837|      2|    int next;
  838|      2|    modulespec = NSSUTIL_ArgStrip(modulespec);
  839|       |
  840|      2|    *lib = *mod = *parameters = *nss = *config = 0;
  841|       |
  842|      9|    while (*modulespec) {
  ------------------
  |  Branch (842:12): [True: 7, False: 2]
  ------------------
  843|      7|        NSSUTIL_HANDLE_STRING_ARG(modulespec, *lib, "library=", ;)
  ------------------
  |  |   21|      7|    if (PORT_Strncasecmp(param, value, sizeof(value) - 1) == 0) { \
  |  |  ------------------
  |  |  |  |  191|      7|#define PORT_Strncasecmp PL_strncasecmp
  |  |  ------------------
  |  |  |  Branch (21:9): [True: 1, False: 6]
  |  |  ------------------
  |  |   22|      1|        param += sizeof(value) - 1;                               \
  |  |   23|      1|        if (target)                                               \
  |  |  ------------------
  |  |  |  Branch (23:13): [True: 0, False: 1]
  |  |  ------------------
  |  |   24|      1|            PORT_Free(target);                                    \
  |  |  ------------------
  |  |  |  |   60|      0|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   25|      1|        target = NSSUTIL_ArgFetchValue(param, &next);             \
  |  |   26|      1|        param += next;                                            \
  |  |   27|      1|        command;                                                  \
  |  |   28|      1|    } else
  ------------------
  844|      6|        NSSUTIL_HANDLE_STRING_ARG(modulespec, *mod, "name=", ;)
  ------------------
  |  |   21|      6|    if (PORT_Strncasecmp(param, value, sizeof(value) - 1) == 0) { \
  |  |  ------------------
  |  |  |  |  191|      6|#define PORT_Strncasecmp PL_strncasecmp
  |  |  ------------------
  |  |  |  Branch (21:9): [True: 2, False: 4]
  |  |  ------------------
  |  |   22|      2|        param += sizeof(value) - 1;                               \
  |  |   23|      2|        if (target)                                               \
  |  |  ------------------
  |  |  |  Branch (23:13): [True: 0, False: 2]
  |  |  ------------------
  |  |   24|      2|            PORT_Free(target);                                    \
  |  |  ------------------
  |  |  |  |   60|      0|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   25|      2|        target = NSSUTIL_ArgFetchValue(param, &next);             \
  |  |   26|      2|        param += next;                                            \
  |  |   27|      2|        command;                                                  \
  |  |   28|      2|    } else
  ------------------
  845|      4|        NSSUTIL_HANDLE_STRING_ARG(modulespec, *parameters, "parameters=", ;)
  ------------------
  |  |   21|      4|    if (PORT_Strncasecmp(param, value, sizeof(value) - 1) == 0) { \
  |  |  ------------------
  |  |  |  |  191|      4|#define PORT_Strncasecmp PL_strncasecmp
  |  |  ------------------
  |  |  |  Branch (21:9): [True: 2, False: 2]
  |  |  ------------------
  |  |   22|      2|        param += sizeof(value) - 1;                               \
  |  |   23|      2|        if (target)                                               \
  |  |  ------------------
  |  |  |  Branch (23:13): [True: 0, False: 2]
  |  |  ------------------
  |  |   24|      2|            PORT_Free(target);                                    \
  |  |  ------------------
  |  |  |  |   60|      0|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   25|      2|        target = NSSUTIL_ArgFetchValue(param, &next);             \
  |  |   26|      2|        param += next;                                            \
  |  |   27|      2|        command;                                                  \
  |  |   28|      2|    } else
  ------------------
  846|      2|        NSSUTIL_HANDLE_STRING_ARG(modulespec, *nss, "nss=", ;)
  ------------------
  |  |   21|      2|    if (PORT_Strncasecmp(param, value, sizeof(value) - 1) == 0) { \
  |  |  ------------------
  |  |  |  |  191|      2|#define PORT_Strncasecmp PL_strncasecmp
  |  |  ------------------
  |  |  |  Branch (21:9): [True: 2, False: 0]
  |  |  ------------------
  |  |   22|      2|        param += sizeof(value) - 1;                               \
  |  |   23|      2|        if (target)                                               \
  |  |  ------------------
  |  |  |  Branch (23:13): [True: 0, False: 2]
  |  |  ------------------
  |  |   24|      2|            PORT_Free(target);                                    \
  |  |  ------------------
  |  |  |  |   60|      0|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   25|      2|        target = NSSUTIL_ArgFetchValue(param, &next);             \
  |  |   26|      2|        param += next;                                            \
  |  |   27|      2|        command;                                                  \
  |  |   28|      2|    } else
  ------------------
  847|      0|        NSSUTIL_HANDLE_STRING_ARG(modulespec, *config, "config=", ;)
  ------------------
  |  |   21|      0|    if (PORT_Strncasecmp(param, value, sizeof(value) - 1) == 0) { \
  |  |  ------------------
  |  |  |  |  191|      0|#define PORT_Strncasecmp PL_strncasecmp
  |  |  ------------------
  |  |  |  Branch (21:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   22|      0|        param += sizeof(value) - 1;                               \
  |  |   23|      0|        if (target)                                               \
  |  |  ------------------
  |  |  |  Branch (23:13): [True: 0, False: 0]
  |  |  ------------------
  |  |   24|      0|            PORT_Free(target);                                    \
  |  |  ------------------
  |  |  |  |   60|      0|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   25|      0|        target = NSSUTIL_ArgFetchValue(param, &next);             \
  |  |   26|      0|        param += next;                                            \
  |  |   27|      0|        command;                                                  \
  |  |   28|      0|    } else
  ------------------
  848|      0|        NSSUTIL_HANDLE_FINAL_ARG(modulespec)
  ------------------
  |  |   31|      0|    {                                            \
  |  |   32|      0|        param = NSSUTIL_ArgSkipParameter(param); \
  |  |   33|      0|    }                                            \
  |  |   34|      7|    param = NSSUTIL_ArgStrip(param);
  ------------------
  849|      7|    }
  850|      2|    return SECSuccess;
  851|      2|}
NSSUTIL_ArgParseCipherFlags:
 1008|      2|{
 1009|      2|    newCiphers[0] = newCiphers[1] = 0;
 1010|      2|    if ((cipherList == NULL) || (*cipherList == 0))
  ------------------
  |  Branch (1010:9): [True: 2, False: 0]
  |  Branch (1010:33): [True: 0, False: 0]
  ------------------
 1011|      2|        return;
 1012|       |
 1013|      0|    for (; *cipherList; cipherList = NSSUTIL_ArgNextFlag(cipherList)) {
  ------------------
  |  Branch (1013:12): [True: 0, False: 0]
  ------------------
 1014|      0|        if (PORT_Strncasecmp(cipherList, NSSUTIL_ARG_FORTEZZA_FLAG,
  ------------------
  |  |  191|      0|#define PORT_Strncasecmp PL_strncasecmp
  ------------------
                      if (PORT_Strncasecmp(cipherList, NSSUTIL_ARG_FORTEZZA_FLAG,
  ------------------
  |  | 1002|      0|#define NSSUTIL_ARG_FORTEZZA_FLAG "FORTEZZA"
  ------------------
  |  Branch (1014:13): [True: 0, False: 0]
  ------------------
 1015|      0|                             sizeof(NSSUTIL_ARG_FORTEZZA_FLAG) - 1) == 0) {
  ------------------
  |  | 1002|      0|#define NSSUTIL_ARG_FORTEZZA_FLAG "FORTEZZA"
  ------------------
 1016|      0|            newCiphers[0] |= SECMOD_FORTEZZA_FLAG;
  ------------------
  |  |   18|      0|#define SECMOD_FORTEZZA_FLAG 0x00000040L
  ------------------
 1017|      0|        }
 1018|       |
 1019|       |        /* add additional flags here as necessary */
 1020|       |        /* direct bit mapping escape */
 1021|      0|        if (*cipherList == 0) {
  ------------------
  |  Branch (1021:13): [True: 0, False: 0]
  ------------------
 1022|      0|            if (cipherList[1] == 'l') {
  ------------------
  |  Branch (1022:17): [True: 0, False: 0]
  ------------------
 1023|      0|                newCiphers[1] |= atoi(&cipherList[2]);
 1024|      0|            } else {
 1025|      0|                newCiphers[0] |= atoi(&cipherList[2]);
 1026|      0|            }
 1027|      0|        }
 1028|      0|    }
 1029|      0|}
_NSSUTIL_EvaluateConfigDir:
 1196|      2|{
 1197|      2|    NSSDBType dbType;
 1198|      2|    PRBool checkEnvDefaultDB = PR_FALSE;
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
 1199|      2|    *appName = NULL;
 1200|       |    /* force the default */
 1201|      2|    dbType = NSS_DB_TYPE_SQL;
 1202|      2|    if (configdir == NULL) {
  ------------------
  |  Branch (1202:9): [True: 0, False: 2]
  ------------------
 1203|      0|        checkEnvDefaultDB = PR_TRUE;
  ------------------
  |  |  437|      0|#define PR_TRUE 1
  ------------------
 1204|      2|    } else if (PORT_Strncmp(configdir, MULTIACCESS, sizeof(MULTIACCESS) - 1) == 0) {
  ------------------
  |  |  193|      2|#define PORT_Strncmp strncmp
  ------------------
                  } else if (PORT_Strncmp(configdir, MULTIACCESS, sizeof(MULTIACCESS) - 1) == 0) {
  ------------------
  |  | 1191|      2|#define MULTIACCESS "multiaccess:"
  ------------------
                  } else if (PORT_Strncmp(configdir, MULTIACCESS, sizeof(MULTIACCESS) - 1) == 0) {
  ------------------
  |  | 1191|      2|#define MULTIACCESS "multiaccess:"
  ------------------
  |  Branch (1204:16): [True: 0, False: 2]
  ------------------
 1205|      0|        char *cdir;
 1206|      0|        dbType = NSS_DB_TYPE_MULTIACCESS;
 1207|       |
 1208|      0|        *appName = PORT_Strdup(configdir + sizeof(MULTIACCESS) - 1);
  ------------------
  |  |   69|      0|#define PORT_Strdup PORT_Strdup_Util
  ------------------
                      *appName = PORT_Strdup(configdir + sizeof(MULTIACCESS) - 1);
  ------------------
  |  | 1191|      0|#define MULTIACCESS "multiaccess:"
  ------------------
 1209|      0|        if (*appName == NULL) {
  ------------------
  |  Branch (1209:13): [True: 0, False: 0]
  ------------------
 1210|      0|            return configdir;
 1211|      0|        }
 1212|      0|        cdir = *appName;
 1213|      0|        while (*cdir && *cdir != ':') {
  ------------------
  |  Branch (1213:16): [True: 0, False: 0]
  |  Branch (1213:25): [True: 0, False: 0]
  ------------------
 1214|      0|            cdir++;
 1215|      0|        }
 1216|      0|        if (*cdir == ':') {
  ------------------
  |  Branch (1216:13): [True: 0, False: 0]
  ------------------
 1217|      0|            *cdir = 0;
 1218|      0|            cdir++;
 1219|      0|        }
 1220|      0|        configdir = cdir;
 1221|      2|    } else if (PORT_Strncmp(configdir, SQLDB, sizeof(SQLDB) - 1) == 0) {
  ------------------
  |  |  193|      2|#define PORT_Strncmp strncmp
  ------------------
                  } else if (PORT_Strncmp(configdir, SQLDB, sizeof(SQLDB) - 1) == 0) {
  ------------------
  |  | 1188|      2|#define SQLDB "sql:"
  ------------------
                  } else if (PORT_Strncmp(configdir, SQLDB, sizeof(SQLDB) - 1) == 0) {
  ------------------
  |  | 1188|      2|#define SQLDB "sql:"
  ------------------
  |  Branch (1221:16): [True: 0, False: 2]
  ------------------
 1222|      0|        dbType = NSS_DB_TYPE_SQL;
 1223|      0|        configdir = configdir + sizeof(SQLDB) - 1;
  ------------------
  |  | 1188|      0|#define SQLDB "sql:"
  ------------------
 1224|      2|    } else if (PORT_Strncmp(configdir, EXTERNDB, sizeof(EXTERNDB) - 1) == 0) {
  ------------------
  |  |  193|      2|#define PORT_Strncmp strncmp
  ------------------
                  } else if (PORT_Strncmp(configdir, EXTERNDB, sizeof(EXTERNDB) - 1) == 0) {
  ------------------
  |  | 1189|      2|#define EXTERNDB "extern:"
  ------------------
                  } else if (PORT_Strncmp(configdir, EXTERNDB, sizeof(EXTERNDB) - 1) == 0) {
  ------------------
  |  | 1189|      2|#define EXTERNDB "extern:"
  ------------------
  |  Branch (1224:16): [True: 0, False: 2]
  ------------------
 1225|      0|        dbType = NSS_DB_TYPE_EXTERN;
 1226|      0|        configdir = configdir + sizeof(EXTERNDB) - 1;
  ------------------
  |  | 1189|      0|#define EXTERNDB "extern:"
  ------------------
 1227|      2|    } else if (PORT_Strncmp(configdir, LEGACY, sizeof(LEGACY) - 1) == 0) {
  ------------------
  |  |  193|      2|#define PORT_Strncmp strncmp
  ------------------
                  } else if (PORT_Strncmp(configdir, LEGACY, sizeof(LEGACY) - 1) == 0) {
  ------------------
  |  | 1190|      2|#define LEGACY "dbm:"
  ------------------
                  } else if (PORT_Strncmp(configdir, LEGACY, sizeof(LEGACY) - 1) == 0) {
  ------------------
  |  | 1190|      2|#define LEGACY "dbm:"
  ------------------
  |  Branch (1227:16): [True: 0, False: 2]
  ------------------
 1228|      0|        dbType = NSS_DB_TYPE_LEGACY;
 1229|      0|        configdir = configdir + sizeof(LEGACY) - 1;
  ------------------
  |  | 1190|      0|#define LEGACY "dbm:"
  ------------------
 1230|      2|    } else {
 1231|      2|        checkEnvDefaultDB = PR_TRUE;
  ------------------
  |  |  437|      2|#define PR_TRUE 1
  ------------------
 1232|      2|    }
 1233|       |
 1234|       |    /* look up the default from the environment */
 1235|      2|    if (checkEnvDefaultDB) {
  ------------------
  |  Branch (1235:9): [True: 2, False: 0]
  ------------------
 1236|      2|        char *defaultType = PR_GetEnvSecure("NSS_DEFAULT_DB_TYPE");
 1237|      2|        if (defaultType != NULL) {
  ------------------
  |  Branch (1237:13): [True: 0, False: 2]
  ------------------
 1238|      0|            if (PORT_Strncmp(defaultType, SQLDB, sizeof(SQLDB) - 2) == 0) {
  ------------------
  |  |  193|      0|#define PORT_Strncmp strncmp
  ------------------
                          if (PORT_Strncmp(defaultType, SQLDB, sizeof(SQLDB) - 2) == 0) {
  ------------------
  |  | 1188|      0|#define SQLDB "sql:"
  ------------------
                          if (PORT_Strncmp(defaultType, SQLDB, sizeof(SQLDB) - 2) == 0) {
  ------------------
  |  | 1188|      0|#define SQLDB "sql:"
  ------------------
  |  Branch (1238:17): [True: 0, False: 0]
  ------------------
 1239|      0|                dbType = NSS_DB_TYPE_SQL;
 1240|      0|            } else if (PORT_Strncmp(defaultType, EXTERNDB, sizeof(EXTERNDB) - 2) == 0) {
  ------------------
  |  |  193|      0|#define PORT_Strncmp strncmp
  ------------------
                          } else if (PORT_Strncmp(defaultType, EXTERNDB, sizeof(EXTERNDB) - 2) == 0) {
  ------------------
  |  | 1189|      0|#define EXTERNDB "extern:"
  ------------------
                          } else if (PORT_Strncmp(defaultType, EXTERNDB, sizeof(EXTERNDB) - 2) == 0) {
  ------------------
  |  | 1189|      0|#define EXTERNDB "extern:"
  ------------------
  |  Branch (1240:24): [True: 0, False: 0]
  ------------------
 1241|      0|                dbType = NSS_DB_TYPE_EXTERN;
 1242|      0|            } else if (PORT_Strncmp(defaultType, LEGACY, sizeof(LEGACY) - 2) == 0) {
  ------------------
  |  |  193|      0|#define PORT_Strncmp strncmp
  ------------------
                          } else if (PORT_Strncmp(defaultType, LEGACY, sizeof(LEGACY) - 2) == 0) {
  ------------------
  |  | 1190|      0|#define LEGACY "dbm:"
  ------------------
                          } else if (PORT_Strncmp(defaultType, LEGACY, sizeof(LEGACY) - 2) == 0) {
  ------------------
  |  | 1190|      0|#define LEGACY "dbm:"
  ------------------
  |  Branch (1242:24): [True: 0, False: 0]
  ------------------
 1243|      0|                dbType = NSS_DB_TYPE_LEGACY;
 1244|      0|            }
 1245|      0|        }
 1246|      2|    }
 1247|       |    /* if the caller has already set a type, don't change it */
 1248|      2|    if (*pdbType == NSS_DB_TYPE_NONE) {
  ------------------
  |  Branch (1248:9): [True: 2, False: 0]
  ------------------
 1249|      2|        *pdbType = dbType;
 1250|      2|    }
 1251|      2|    return configdir;
 1252|      2|}
_NSSUTIL_GetSecmodName:
 1257|      2|{
 1258|      2|    int next;
 1259|      2|    char *configdir = NULL;
 1260|      2|    char *secmodName = NULL;
 1261|      2|    char *value = NULL;
 1262|      2|    const char *save_params = param;
 1263|      2|    const char *lconfigdir;
 1264|      2|    PRBool noModDB = PR_FALSE;
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
 1265|      2|    param = NSSUTIL_ArgStrip(param);
 1266|       |
 1267|     22|    while (*param) {
  ------------------
  |  Branch (1267:12): [True: 20, False: 2]
  ------------------
 1268|     20|        NSSUTIL_HANDLE_STRING_ARG(param, configdir, "configDir=", ;)
  ------------------
  |  |   21|     20|    if (PORT_Strncasecmp(param, value, sizeof(value) - 1) == 0) { \
  |  |  ------------------
  |  |  |  |  191|     20|#define PORT_Strncasecmp PL_strncasecmp
  |  |  ------------------
  |  |  |  Branch (21:9): [True: 2, False: 18]
  |  |  ------------------
  |  |   22|      2|        param += sizeof(value) - 1;                               \
  |  |   23|      2|        if (target)                                               \
  |  |  ------------------
  |  |  |  Branch (23:13): [True: 0, False: 2]
  |  |  ------------------
  |  |   24|      2|            PORT_Free(target);                                    \
  |  |  ------------------
  |  |  |  |   60|      0|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   25|      2|        target = NSSUTIL_ArgFetchValue(param, &next);             \
  |  |   26|      2|        param += next;                                            \
  |  |   27|      2|        command;                                                  \
  |  |   28|      2|    } else
  ------------------
 1269|     18|        NSSUTIL_HANDLE_STRING_ARG(param, secmodName, "secmod=", ;)
  ------------------
  |  |   21|     18|    if (PORT_Strncasecmp(param, value, sizeof(value) - 1) == 0) { \
  |  |  ------------------
  |  |  |  |  191|     18|#define PORT_Strncasecmp PL_strncasecmp
  |  |  ------------------
  |  |  |  Branch (21:9): [True: 2, False: 16]
  |  |  ------------------
  |  |   22|      2|        param += sizeof(value) - 1;                               \
  |  |   23|      2|        if (target)                                               \
  |  |  ------------------
  |  |  |  Branch (23:13): [True: 0, False: 2]
  |  |  ------------------
  |  |   24|      2|            PORT_Free(target);                                    \
  |  |  ------------------
  |  |  |  |   60|      0|#define PORT_Free PORT_Free_Util
  |  |  ------------------
  |  |   25|      2|        target = NSSUTIL_ArgFetchValue(param, &next);             \
  |  |   26|      2|        param += next;                                            \
  |  |   27|      2|        command;                                                  \
  |  |   28|      2|    } else
  ------------------
 1270|     16|        NSSUTIL_HANDLE_FINAL_ARG(param)
  ------------------
  |  |   31|     16|    {                                            \
  |  |   32|     16|        param = NSSUTIL_ArgSkipParameter(param); \
  |  |   33|     16|    }                                            \
  |  |   34|     20|    param = NSSUTIL_ArgStrip(param);
  ------------------
 1271|     20|    }
 1272|       |
 1273|      2|    *rw = PR_TRUE;
  ------------------
  |  |  437|      2|#define PR_TRUE 1
  ------------------
 1274|      2|    if (NSSUTIL_ArgHasFlag("flags", "readOnly", save_params)) {
  ------------------
  |  Branch (1274:9): [True: 2, False: 0]
  ------------------
 1275|      2|        *rw = PR_FALSE;
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
 1276|      2|    }
 1277|       |
 1278|      2|    if (!secmodName || *secmodName == '\0') {
  ------------------
  |  Branch (1278:9): [True: 0, False: 2]
  |  Branch (1278:24): [True: 2, False: 0]
  ------------------
 1279|      2|        if (secmodName)
  ------------------
  |  Branch (1279:13): [True: 2, False: 0]
  ------------------
 1280|      2|            PORT_Free(secmodName);
  ------------------
  |  |   60|      2|#define PORT_Free PORT_Free_Util
  ------------------
 1281|      2|        secmodName = PORT_Strdup(SECMOD_DB);
  ------------------
  |  |   69|      2|#define PORT_Strdup PORT_Strdup_Util
  ------------------
                      secmodName = PORT_Strdup(SECMOD_DB);
  ------------------
  |  | 1192|      2|#define SECMOD_DB "secmod.db"
  ------------------
 1282|      2|    }
 1283|       |
 1284|      2|    *filename = secmodName;
 1285|      2|    lconfigdir = _NSSUTIL_EvaluateConfigDir(configdir, dbType, appName);
 1286|       |
 1287|      2|    if (NSSUTIL_ArgHasFlag("flags", "noModDB", save_params)) {
  ------------------
  |  Branch (1287:9): [True: 2, False: 0]
  ------------------
 1288|       |        /* there isn't a module db, don't load the legacy support */
 1289|      2|        noModDB = PR_TRUE;
  ------------------
  |  |  437|      2|#define PR_TRUE 1
  ------------------
 1290|      2|        *dbType = NSS_DB_TYPE_SQL;
 1291|      2|        PORT_Free(*filename);
  ------------------
  |  |   60|      2|#define PORT_Free PORT_Free_Util
  ------------------
 1292|      2|        *filename = NULL;
 1293|      2|        *rw = PR_FALSE;
  ------------------
  |  |  438|      2|#define PR_FALSE 0
  ------------------
 1294|      2|    }
 1295|       |
 1296|       |    /* only use the renamed secmod for legacy databases */
 1297|      2|    if ((*dbType != NSS_DB_TYPE_LEGACY) &&
  ------------------
  |  Branch (1297:9): [True: 2, False: 0]
  ------------------
 1298|      2|        (*dbType != NSS_DB_TYPE_MULTIACCESS) &&
  ------------------
  |  Branch (1298:9): [True: 2, False: 0]
  ------------------
 1299|      2|        !NSSUTIL_ArgHasFlag("flags", "forceSecmodChoice", save_params)) {
  ------------------
  |  Branch (1299:9): [True: 2, False: 0]
  ------------------
 1300|      2|        secmodName = "pkcs11.txt";
 1301|      2|    }
 1302|       |
 1303|      2|    if (noModDB) {
  ------------------
  |  Branch (1303:9): [True: 2, False: 0]
  ------------------
 1304|      2|        value = NULL;
 1305|      2|    } else if (lconfigdir && lconfigdir[0] != '\0') {
  ------------------
  |  Branch (1305:16): [True: 0, False: 0]
  |  Branch (1305:30): [True: 0, False: 0]
  ------------------
 1306|      0|        value = PR_smprintf("%s" NSSUTIL_PATH_SEPARATOR "%s",
 1307|      0|                            lconfigdir, secmodName);
 1308|      0|    } else {
 1309|      0|        value = PR_smprintf("%s", secmodName);
 1310|      0|    }
 1311|      2|    if (configdir)
  ------------------
  |  Branch (1311:9): [True: 2, False: 0]
  ------------------
 1312|      2|        PORT_Free(configdir);
  ------------------
  |  |   60|      2|#define PORT_Free PORT_Free_Util
  ------------------
 1313|      2|    return value;
 1314|      2|}
utilpars.c:nssutil_escapeQuotesSize:
  359|     19|{
  360|     19|    int escapes = 0, size = 0;
  361|     19|    const char *src;
  362|       |
  363|     19|    size = addquotes ? 2 : 0;
  ------------------
  |  Branch (363:12): [True: 1, False: 18]
  ------------------
  364|    215|    for (src = string; *src; src++) {
  ------------------
  |  Branch (364:24): [True: 196, False: 19]
  ------------------
  365|    196|        if ((*src == quote) || (*src == '\\'))
  ------------------
  |  Branch (365:13): [True: 0, False: 196]
  |  Branch (365:32): [True: 0, False: 196]
  ------------------
  366|      0|            escapes++;
  367|    196|        size++;
  368|    196|    }
  369|     19|    return size + escapes + 1;
  370|     19|}
utilpars.c:nssutil_escapeQuotes:
  374|     19|{
  375|     19|    char *newString = 0;
  376|     19|    int size = 0;
  377|     19|    const char *src;
  378|     19|    char *dest;
  379|       |
  380|     19|    size = nssutil_escapeQuotesSize(string, quote, addquotes);
  381|       |
  382|     19|    dest = newString = PORT_ZAlloc(size);
  ------------------
  |  |   72|     19|#define PORT_ZAlloc PORT_ZAlloc_Util
  ------------------
  383|     19|    if (newString == NULL) {
  ------------------
  |  Branch (383:9): [True: 0, False: 19]
  ------------------
  384|      0|        return NULL;
  385|      0|    }
  386|       |
  387|     19|    if (addquotes)
  ------------------
  |  Branch (387:9): [True: 1, False: 18]
  ------------------
  388|      1|        *dest++ = quote;
  389|    215|    for (src = string; *src; src++, dest++) {
  ------------------
  |  Branch (389:24): [True: 196, False: 19]
  ------------------
  390|    196|        if ((*src == '\\') || (*src == quote)) {
  ------------------
  |  Branch (390:13): [True: 0, False: 196]
  |  Branch (390:31): [True: 0, False: 196]
  ------------------
  391|      0|            *dest++ = '\\';
  392|      0|        }
  393|    196|        *dest = *src;
  394|    196|    }
  395|     19|    if (addquotes)
  ------------------
  |  Branch (395:9): [True: 1, False: 18]
  ------------------
  396|      1|        *dest = quote;
  397|       |
  398|     19|    return newString;
  399|     19|}
utilpars.c:nssutil_argDecodeSingleSlotInfo:
  652|      1|{
  653|      1|    char *askpw;
  654|       |
  655|      1|    slotInfo->slotID = NSSUTIL_ArgDecodeNumber(name);
  656|      1|    slotInfo->defaultFlags = NSSUTIL_ArgParseSlotFlags("slotFlags", params);
  657|      1|    slotInfo->timeout = NSSUTIL_ArgReadLong("timeout", params, 0, NULL);
  658|       |
  659|      1|    askpw = NSSUTIL_ArgGetParamValue("askpw", params);
  660|      1|    slotInfo->askpw = 0;
  661|       |
  662|      1|    if (askpw) {
  ------------------
  |  Branch (662:9): [True: 1, False: 0]
  ------------------
  663|      1|        if (PORT_Strcasecmp(askpw, "every") == 0) {
  ------------------
  |  |  184|      1|#define PORT_Strcasecmp PL_strcasecmp
  ------------------
  |  Branch (663:13): [True: 0, False: 1]
  ------------------
  664|      0|            slotInfo->askpw = -1;
  665|      1|        } else if (PORT_Strcasecmp(askpw, "timeout") == 0) {
  ------------------
  |  |  184|      1|#define PORT_Strcasecmp PL_strcasecmp
  ------------------
  |  Branch (665:20): [True: 0, False: 1]
  ------------------
  666|      0|            slotInfo->askpw = 1;
  667|      0|        }
  668|      1|        PORT_Free(askpw);
  ------------------
  |  |   60|      1|#define PORT_Free PORT_Free_Util
  ------------------
  669|      1|        slotInfo->defaultFlags |= PK11_OWN_PW_DEFAULTS;
  ------------------
  |  |   36|      1|#define PK11_OWN_PW_DEFAULTS 0x20000000L
  ------------------
  670|      1|    }
  671|      1|    slotInfo->hasRootCerts = NSSUTIL_ArgHasFlag("rootFlags", "hasRootCerts",
  672|      1|                                                params);
  673|      1|    slotInfo->hasRootTrust = NSSUTIL_ArgHasFlag("rootFlags", "hasRootTrust",
  674|      1|                                                params);
  675|      1|}

